Version Description
- 2018-12-11 =
- Added: new post notification default subject to highlight how to use Subject Line variables;
- Improved: minor tweaks and fixes;
Download this release
Release Info
Developer | wysija |
Plugin | MailPoet Newsletters (New) |
Version | 3.16.2 |
Comparing to | |
See all releases |
Code changes from version 3.16.1 to 3.16.2
assets/css/{admin.0c9a7aa2.css → admin.8988cd0e.css}
RENAMED
@@ -1337,7 +1337,7 @@ span.feedback-tooltip {
|
|
1337 |
body.mailpoet_modal_opened {
|
1338 |
overflow: hidden;
|
1339 |
}
|
1340 |
-
|
1341 |
height: 100%;
|
1342 |
left: 0;
|
1343 |
overflow-y: auto;
|
@@ -1347,6 +1347,24 @@ body.mailpoet_modal_opened {
|
|
1347 |
width: 100%;
|
1348 |
z-index: 100000;
|
1349 |
background-color: rgba(0,0,0,0.6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1350 |
}
|
1351 |
.mailpoet_modal_highlight {
|
1352 |
pointer-events: none;
|
@@ -1356,22 +1374,24 @@ body.mailpoet_modal_opened {
|
|
1356 |
-webkit-box-shadow: 0px 0px 20px 2px rgba(255,255,255,0.75);
|
1357 |
box-shadow: 0px 0px 20px 2px rgba(255,255,255,0.75);
|
1358 |
}
|
1359 |
-
|
1360 |
background-color: transparent;
|
1361 |
}
|
1362 |
-
|
1363 |
background-color: rgba(0,0,0,0.6) !important;
|
1364 |
-
display:
|
1365 |
-
|
1366 |
-
|
|
|
|
|
|
|
|
|
|
|
1367 |
display: block;
|
1368 |
}
|
1369 |
-
|
1370 |
-
display: none;
|
1371 |
-
position: absolute;
|
1372 |
z-index: 25;
|
1373 |
-
|
1374 |
-
margin: 0;
|
1375 |
}
|
1376 |
.mailpoet_popup_wrapper {
|
1377 |
background-color: #f0f0f0;
|
@@ -1384,14 +1404,14 @@ body.mailpoet_modal_opened {
|
|
1384 |
.mailpoet_overlay_hidden .mailpoet_popup_wrapper {
|
1385 |
border: 1px solid #333;
|
1386 |
}
|
1387 |
-
|
1388 |
background-color: #222;
|
1389 |
border: 1px solid #333;
|
1390 |
height: 27px;
|
1391 |
margin: 0;
|
1392 |
padding: 0 30px 0 0;
|
1393 |
}
|
1394 |
-
|
1395 |
color: #cfcfcf;
|
1396 |
font-size: 12px;
|
1397 |
font-weight: normal;
|
@@ -1403,11 +1423,14 @@ body.mailpoet_modal_opened {
|
|
1403 |
padding: 10px 10px 10px 10px;
|
1404 |
height: 92%;
|
1405 |
}
|
1406 |
-
|
|
|
|
|
|
|
1407 |
top: 32px;
|
1408 |
overflow: hidden;
|
1409 |
}
|
1410 |
-
|
1411 |
display: none;
|
1412 |
position: fixed;
|
1413 |
z-index: 100002;
|
@@ -1433,13 +1456,13 @@ body.mailpoet_modal_opened {
|
|
1433 |
top: 0;
|
1434 |
z-index: 0;
|
1435 |
}
|
1436 |
-
|
1437 |
margin: 0;
|
1438 |
padding: 0;
|
1439 |
position: relative;
|
1440 |
height: 0;
|
1441 |
}
|
1442 |
-
|
1443 |
color: #cfcfcf;
|
1444 |
background-color: #222;
|
1445 |
border-left: 1px solid #444;
|
@@ -1454,8 +1477,10 @@ body.mailpoet_modal_opened {
|
|
1454 |
.mailpoet_panel_body {
|
1455 |
padding: 10px 10px 36px 10px;
|
1456 |
}
|
1457 |
-
|
1458 |
background: url("../img/modal_close_button.png") 7px 7px no-repeat;
|
|
|
|
|
1459 |
height: 30px;
|
1460 |
overflow: hidden;
|
1461 |
padding: 0;
|
@@ -1464,15 +1489,15 @@ body.mailpoet_modal_opened {
|
|
1464 |
z-index: 2;
|
1465 |
outline: 0 none;
|
1466 |
}
|
1467 |
-
|
1468 |
right: 0;
|
1469 |
top: 0;
|
1470 |
}
|
1471 |
-
|
1472 |
right: 10px;
|
1473 |
top: 7px;
|
1474 |
}
|
1475 |
-
|
1476 |
outline: 0 none;
|
1477 |
}
|
1478 |
.mailpoet_align_left {
|
@@ -1488,20 +1513,13 @@ body.mailpoet_modal_opened {
|
|
1488 |
text-align: right;
|
1489 |
}
|
1490 |
@media screen and (max-width: 782px) {
|
1491 |
-
|
1492 |
top: 46px;
|
1493 |
}
|
1494 |
.mailpoet_panel_body {
|
1495 |
padding-bottom: 52px;
|
1496 |
}
|
1497 |
}
|
1498 |
-
#mailpoet_loading {
|
1499 |
-
position: relative;
|
1500 |
-
left: 50%;
|
1501 |
-
top: 50%;
|
1502 |
-
margin-left: -75px;
|
1503 |
-
margin-top: -16px;
|
1504 |
-
}
|
1505 |
.mailpoet_loading {
|
1506 |
height: 32px;
|
1507 |
width: 150px;
|
@@ -1545,7 +1563,6 @@ body.mailpoet_modal_opened {
|
|
1545 |
margin-left: 17px;
|
1546 |
width: 32px;
|
1547 |
}
|
1548 |
-
#mailpoet_modal_loading_1,
|
1549 |
.mailpoet_modal_loading_1 {
|
1550 |
-webkit-animation-delay: 0.39s;
|
1551 |
-moz-animation-delay: 0.39s;
|
@@ -1553,7 +1570,6 @@ body.mailpoet_modal_opened {
|
|
1553 |
-ms-animation-delay: 0.39s;
|
1554 |
animation-delay: 0.39s;
|
1555 |
}
|
1556 |
-
#mailpoet_modal_loading_2,
|
1557 |
.mailpoet_modal_loading_2 {
|
1558 |
-webkit-animation-delay: 0.91s;
|
1559 |
-moz-animation-delay: 0.91s;
|
@@ -1561,7 +1577,6 @@ body.mailpoet_modal_opened {
|
|
1561 |
-ms-animation-delay: 0.91s;
|
1562 |
animation-delay: 0.91s;
|
1563 |
}
|
1564 |
-
#mailpoet_modal_loading_3,
|
1565 |
.mailpoet_modal_loading_3 {
|
1566 |
-webkit-animation-delay: 1.17s;
|
1567 |
-moz-animation-delay: 1.17s;
|
@@ -2552,6 +2567,10 @@ rgba(0,0,0,0.3)
|
|
2552 |
#mailpoet_form_segments.parsley-error + span .select2-selection {
|
2553 |
border: 1px solid #b94a48;
|
2554 |
}
|
|
|
|
|
|
|
|
|
2555 |
.mailpoet_listing_loading tbody tr,
|
2556 |
.mailpoet_form_loading tbody tr {
|
2557 |
opacity: 0.2;
|
@@ -2964,7 +2983,7 @@ textarea.parsley-error {
|
|
2964 |
.parsley-custom-error-message {
|
2965 |
color: #b94a48;
|
2966 |
}
|
2967 |
-
#mailpoet_settings .
|
2968 |
display: none;
|
2969 |
}
|
2970 |
#mailpoet_settings .form-table th {
|
@@ -3543,124 +3562,6 @@ textarea.parsley-error {
|
|
3543 |
.error_msg {
|
3544 |
color: #f00;
|
3545 |
}
|
3546 |
-
body.react-confirm-alert-body-element {
|
3547 |
-
overflow: hidden;
|
3548 |
-
}
|
3549 |
-
|
3550 |
-
.react-confirm-alert-blur {
|
3551 |
-
filter: url(#gaussian-blur);
|
3552 |
-
filter: blur(2px);
|
3553 |
-
-webkit-filter: blur(2px);
|
3554 |
-
}
|
3555 |
-
|
3556 |
-
.react-confirm-alert-overlay {
|
3557 |
-
position: fixed;
|
3558 |
-
top: 0;
|
3559 |
-
left: 0;
|
3560 |
-
right: 0;
|
3561 |
-
bottom: 0;
|
3562 |
-
z-index: 99;
|
3563 |
-
background: rgba(255, 255, 255, 0.9);
|
3564 |
-
display: -webkit-flex;
|
3565 |
-
display: -moz-flex;
|
3566 |
-
display: -ms-flex;
|
3567 |
-
display: -o-flex;
|
3568 |
-
display: flex;
|
3569 |
-
justify-content: center;
|
3570 |
-
-ms-align-items: center;
|
3571 |
-
align-items: center;
|
3572 |
-
opacity: 0;
|
3573 |
-
-webkit-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
|
3574 |
-
-moz-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
|
3575 |
-
-o-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
|
3576 |
-
animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
|
3577 |
-
}
|
3578 |
-
|
3579 |
-
.react-confirm-alert-body {
|
3580 |
-
font-family: Arial, Helvetica, sans-serif;
|
3581 |
-
width: 400px;
|
3582 |
-
padding: 30px;
|
3583 |
-
text-align: left;
|
3584 |
-
background: #fff;
|
3585 |
-
border-radius: 10px;
|
3586 |
-
box-shadow: 0 20px 75px rgba(0, 0, 0, 0.13);
|
3587 |
-
color: #666;
|
3588 |
-
}
|
3589 |
-
|
3590 |
-
.react-confirm-alert-svg {
|
3591 |
-
position: absolute;
|
3592 |
-
top: 0;
|
3593 |
-
left: 0;
|
3594 |
-
}
|
3595 |
-
|
3596 |
-
.react-confirm-alert-body > h1 {
|
3597 |
-
margin-top: 0;
|
3598 |
-
}
|
3599 |
-
|
3600 |
-
.react-confirm-alert-body > h3 {
|
3601 |
-
margin: 0;
|
3602 |
-
font-size: 16px;
|
3603 |
-
}
|
3604 |
-
|
3605 |
-
.react-confirm-alert-button-group {
|
3606 |
-
display: -webkit-flex;
|
3607 |
-
display: -moz-flex;
|
3608 |
-
display: -ms-flex;
|
3609 |
-
display: -o-flex;
|
3610 |
-
display: flex;
|
3611 |
-
justify-content: flex-start;
|
3612 |
-
margin-top: 20px;
|
3613 |
-
}
|
3614 |
-
|
3615 |
-
.react-confirm-alert-button-group > button {
|
3616 |
-
outline: none;
|
3617 |
-
background: #333;
|
3618 |
-
border: none;
|
3619 |
-
display: inline-block;
|
3620 |
-
padding: 6px 18px;
|
3621 |
-
color: #eee;
|
3622 |
-
margin-right: 10px;
|
3623 |
-
border-radius: 5px;
|
3624 |
-
font-size: 12px;
|
3625 |
-
cursor: pointer;
|
3626 |
-
}
|
3627 |
-
|
3628 |
-
@-webkit-keyframes react-confirm-alert-fadeIn {
|
3629 |
-
from {
|
3630 |
-
opacity: 0;
|
3631 |
-
}
|
3632 |
-
to {
|
3633 |
-
opacity: 1;
|
3634 |
-
}
|
3635 |
-
}
|
3636 |
-
|
3637 |
-
@-moz-keyframes react-confirm-alert-fadeIn {
|
3638 |
-
from {
|
3639 |
-
opacity: 0;
|
3640 |
-
}
|
3641 |
-
to {
|
3642 |
-
opacity: 1;
|
3643 |
-
}
|
3644 |
-
}
|
3645 |
-
|
3646 |
-
@-o-keyframes react-confirm-alert-fadeIn {
|
3647 |
-
from {
|
3648 |
-
opacity: 0;
|
3649 |
-
}
|
3650 |
-
to {
|
3651 |
-
opacity: 1;
|
3652 |
-
}
|
3653 |
-
}
|
3654 |
-
|
3655 |
-
@keyframes react-confirm-alert-fadeIn {
|
3656 |
-
from {
|
3657 |
-
opacity: 0;
|
3658 |
-
}
|
3659 |
-
to {
|
3660 |
-
opacity: 1;
|
3661 |
-
}
|
3662 |
-
}
|
3663 |
-
|
3664 |
.introjs-overlay {
|
3665 |
position: absolute;
|
3666 |
box-sizing: content-box;
|
1337 |
body.mailpoet_modal_opened {
|
1338 |
overflow: hidden;
|
1339 |
}
|
1340 |
+
.mailpoet_modal_overlay {
|
1341 |
height: 100%;
|
1342 |
left: 0;
|
1343 |
overflow-y: auto;
|
1347 |
width: 100%;
|
1348 |
z-index: 100000;
|
1349 |
background-color: rgba(0,0,0,0.6);
|
1350 |
+
display: -webkit-box;
|
1351 |
+
display: -moz-box;
|
1352 |
+
display: -webkit-flex;
|
1353 |
+
display: -ms-flexbox;
|
1354 |
+
display: box;
|
1355 |
+
display: flex;
|
1356 |
+
-webkit-box-align: center;
|
1357 |
+
-moz-box-align: center;
|
1358 |
+
-o-box-align: center;
|
1359 |
+
-ms-flex-align: center;
|
1360 |
+
-webkit-align-items: center;
|
1361 |
+
align-items: center;
|
1362 |
+
-webkit-box-pack: center;
|
1363 |
+
-moz-box-pack: center;
|
1364 |
+
-o-box-pack: center;
|
1365 |
+
-ms-flex-pack: center;
|
1366 |
+
-webkit-justify-content: center;
|
1367 |
+
justify-content: center;
|
1368 |
}
|
1369 |
.mailpoet_modal_highlight {
|
1370 |
pointer-events: none;
|
1374 |
-webkit-box-shadow: 0px 0px 20px 2px rgba(255,255,255,0.75);
|
1375 |
box-shadow: 0px 0px 20px 2px rgba(255,255,255,0.75);
|
1376 |
}
|
1377 |
+
.mailpoet_modal_overlay.mailpoet_overlay_hidden {
|
1378 |
background-color: transparent;
|
1379 |
}
|
1380 |
+
.mailpoet_modal_overlay.mailpoet_overlay_loading {
|
1381 |
background-color: rgba(0,0,0,0.6) !important;
|
1382 |
+
display: -webkit-box !important;
|
1383 |
+
display: -moz-box !important;
|
1384 |
+
display: -webkit-flex !important;
|
1385 |
+
display: -ms-flexbox !important;
|
1386 |
+
display: box !important;
|
1387 |
+
display: flex !important;
|
1388 |
+
}
|
1389 |
+
.mailpoet_modal_opened .mailpoet_modal_overlay {
|
1390 |
display: block;
|
1391 |
}
|
1392 |
+
.mailpoet_popup {
|
|
|
|
|
1393 |
z-index: 25;
|
1394 |
+
margin: auto;
|
|
|
1395 |
}
|
1396 |
.mailpoet_popup_wrapper {
|
1397 |
background-color: #f0f0f0;
|
1404 |
.mailpoet_overlay_hidden .mailpoet_popup_wrapper {
|
1405 |
border: 1px solid #333;
|
1406 |
}
|
1407 |
+
.mailpoet_popup_title {
|
1408 |
background-color: #222;
|
1409 |
border: 1px solid #333;
|
1410 |
height: 27px;
|
1411 |
margin: 0;
|
1412 |
padding: 0 30px 0 0;
|
1413 |
}
|
1414 |
+
.mailpoet_popup_title h2 {
|
1415 |
color: #cfcfcf;
|
1416 |
font-size: 12px;
|
1417 |
font-weight: normal;
|
1423 |
padding: 10px 10px 10px 10px;
|
1424 |
height: 92%;
|
1425 |
}
|
1426 |
+
.mailpoet_popup_body .button + .button {
|
1427 |
+
margin-left: 10px;
|
1428 |
+
}
|
1429 |
+
.mailpoet_modal_overlay.mailpoet_panel_overlay {
|
1430 |
top: 32px;
|
1431 |
overflow: hidden;
|
1432 |
}
|
1433 |
+
.mailpoet_panel {
|
1434 |
display: none;
|
1435 |
position: fixed;
|
1436 |
z-index: 100002;
|
1456 |
top: 0;
|
1457 |
z-index: 0;
|
1458 |
}
|
1459 |
+
.mailpoet_panel_title {
|
1460 |
margin: 0;
|
1461 |
padding: 0;
|
1462 |
position: relative;
|
1463 |
height: 0;
|
1464 |
}
|
1465 |
+
.mailpoet_panel_title h2 {
|
1466 |
color: #cfcfcf;
|
1467 |
background-color: #222;
|
1468 |
border-left: 1px solid #444;
|
1477 |
.mailpoet_panel_body {
|
1478 |
padding: 10px 10px 36px 10px;
|
1479 |
}
|
1480 |
+
.mailpoet_modal_close {
|
1481 |
background: url("../img/modal_close_button.png") 7px 7px no-repeat;
|
1482 |
+
border: 0;
|
1483 |
+
cursor: pointer;
|
1484 |
height: 30px;
|
1485 |
overflow: hidden;
|
1486 |
padding: 0;
|
1489 |
z-index: 2;
|
1490 |
outline: 0 none;
|
1491 |
}
|
1492 |
+
.mailpoet_popup .mailpoet_modal_close {
|
1493 |
right: 0;
|
1494 |
top: 0;
|
1495 |
}
|
1496 |
+
.mailpoet_panel .mailpoet_modal_close {
|
1497 |
right: 10px;
|
1498 |
top: 7px;
|
1499 |
}
|
1500 |
+
.mailpoet_modal_close:focus {
|
1501 |
outline: 0 none;
|
1502 |
}
|
1503 |
.mailpoet_align_left {
|
1513 |
text-align: right;
|
1514 |
}
|
1515 |
@media screen and (max-width: 782px) {
|
1516 |
+
.mailpoet_modal_overlay.mailpoet_panel_overlay {
|
1517 |
top: 46px;
|
1518 |
}
|
1519 |
.mailpoet_panel_body {
|
1520 |
padding-bottom: 52px;
|
1521 |
}
|
1522 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1523 |
.mailpoet_loading {
|
1524 |
height: 32px;
|
1525 |
width: 150px;
|
1563 |
margin-left: 17px;
|
1564 |
width: 32px;
|
1565 |
}
|
|
|
1566 |
.mailpoet_modal_loading_1 {
|
1567 |
-webkit-animation-delay: 0.39s;
|
1568 |
-moz-animation-delay: 0.39s;
|
1570 |
-ms-animation-delay: 0.39s;
|
1571 |
animation-delay: 0.39s;
|
1572 |
}
|
|
|
1573 |
.mailpoet_modal_loading_2 {
|
1574 |
-webkit-animation-delay: 0.91s;
|
1575 |
-moz-animation-delay: 0.91s;
|
1577 |
-ms-animation-delay: 0.91s;
|
1578 |
animation-delay: 0.91s;
|
1579 |
}
|
|
|
1580 |
.mailpoet_modal_loading_3 {
|
1581 |
-webkit-animation-delay: 1.17s;
|
1582 |
-moz-animation-delay: 1.17s;
|
2567 |
#mailpoet_form_segments.parsley-error + span .select2-selection {
|
2568 |
border: 1px solid #b94a48;
|
2569 |
}
|
2570 |
+
.mailpoet_form_field_settings_text {
|
2571 |
+
width: 100%;
|
2572 |
+
min-height: 100px;
|
2573 |
+
}
|
2574 |
.mailpoet_listing_loading tbody tr,
|
2575 |
.mailpoet_form_loading tbody tr {
|
2576 |
opacity: 0.2;
|
2983 |
.parsley-custom-error-message {
|
2984 |
color: #b94a48;
|
2985 |
}
|
2986 |
+
#mailpoet_settings .mailpoet_tab_panel {
|
2987 |
display: none;
|
2988 |
}
|
2989 |
#mailpoet_settings .form-table th {
|
3562 |
.error_msg {
|
3563 |
color: #f00;
|
3564 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3565 |
.introjs-overlay {
|
3566 |
position: absolute;
|
3567 |
box-sizing: content-box;
|
assets/css/manifest.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
{
|
2 |
"admin-global.css": "admin-global.bcd24dab.css",
|
3 |
-
"admin.css": "admin.
|
4 |
"importExport.css": "importExport.b3745466.css",
|
5 |
-
"newsletter_editor.css": "newsletter_editor.
|
6 |
"public.css": "public.cae357df.css",
|
7 |
"rtl.css": "rtl.58324dad.css"
|
8 |
}
|
1 |
{
|
2 |
"admin-global.css": "admin-global.bcd24dab.css",
|
3 |
+
"admin.css": "admin.8988cd0e.css",
|
4 |
"importExport.css": "importExport.b3745466.css",
|
5 |
+
"newsletter_editor.css": "newsletter_editor.2f6ce55a.css",
|
6 |
"public.css": "public.cae357df.css",
|
7 |
"rtl.css": "rtl.58324dad.css"
|
8 |
}
|
assets/css/{newsletter_editor.0e234e1c.css → newsletter_editor.2f6ce55a.css}
RENAMED
@@ -1289,7 +1289,7 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1289 |
background-color: #eee;
|
1290 |
color: #444;
|
1291 |
}
|
1292 |
-
.
|
1293 |
color: #999;
|
1294 |
}
|
1295 |
#mailpoet_editor {
|
1289 |
background-color: #eee;
|
1290 |
color: #444;
|
1291 |
}
|
1292 |
+
.mailpoet_settings_notice {
|
1293 |
color: #999;
|
1294 |
}
|
1295 |
#mailpoet_editor {
|
assets/js/admin.6e1f275b.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
webpackJsonp([2],{188:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Tabs(props){var tabLinks=tabs.map(function(tab){var tabClasses=(0,_classnames2.default)("nav-tab",{"nav-tab-active":props.tab===tab.name});return _react2.default.createElement(_reactRouterDom.Link,{key:"tab-"+tab.name,className:tabClasses,to:tab.link},tab.label)});return _react2.default.createElement("h2",{className:"nav-tab-wrapper"},tabLinks)}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(7),_classnames=__webpack_require__(8),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),tabs=[{name:"knowledgeBase",label:_mailpoet2.default.I18n.t("tabKnowledgeBaseTitle"),link:"/knowledgeBase"},{name:"systemStatus",label:_mailpoet2.default.I18n.t("tabSystemStatusTitle"),link:"/systemStatus"},{name:"systemInfo",label:_mailpoet2.default.I18n.t("tabSystemInfoTitle"),link:"/systemInfo"},{name:"yourPrivacy",label:_mailpoet2.default.I18n.t("tabYourPrivacyTitle"),link:"/yourPrivacy"}];Tabs.propTypes={tab:_propTypes2.default.string},Tabs.defaultProps={tab:"knowledgeBase"},module.exports=Tabs},292:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function confirmAlert(props){_reactDom2.default.render(_react2.default.createElement(ConfirmAlert,props),document.getElementById("mailpoet_confirm_alert_holder"))}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();exports.default=confirmAlert;var _mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(11),_reactDom2=_interopRequireDefault(_reactDom),ConfirmAlert=function(_React$Component){function ConfirmAlert(props){_classCallCheck(this,ConfirmAlert);var _this=_possibleConstructorReturn(this,(ConfirmAlert.__proto__||Object.getPrototypeOf(ConfirmAlert)).call(this,props));return _this.componentWillUpdate=function(){_this.state.show||_this.setState({show:!0})},_this.onClose=function(){_this.setState({show:!1})},_this.onConfirm=function(){_this.onClose(),_this.props.onConfirm()},_this.state={show:!0},_this}return _inherits(ConfirmAlert,_React$Component),_createClass(ConfirmAlert,[{key:"render",value:function(){var _props=this.props,title=_props.title,message=_props.message,confirmLabel=_props.confirmLabel,cancelLabel=_props.cancelLabel;return this.state.show&&_react2.default.createElement("div",{className:"mailpoet_modal_overlay"},_react2.default.createElement("div",{className:"mailpoet_popup",tabIndex:"-1"},_react2.default.createElement("div",{className:"mailpoet_popup_wrapper"},_react2.default.createElement("button",{className:"mailpoet_modal_close",onClick:this.onClose}),title&&_react2.default.createElement("div",{className:"mailpoet_popup_title"},_react2.default.createElement("h2",null,title)),_react2.default.createElement("div",{className:"mailpoet_popup_body clearfix"},_react2.default.createElement("p",{className:"mailpoet_hp_email_label"},message),_react2.default.createElement("button",{className:"button button-secondary",onClick:this.onClose},cancelLabel),_react2.default.createElement("button",{className:"button button-primary",onClick:this.onConfirm},confirmLabel)))))}}]),ConfirmAlert}(_react2.default.Component);ConfirmAlert.propTypes={title:_propTypes2.default.string,message:_propTypes2.default.string.isRequired,cancelLabel:_propTypes2.default.string,confirmLabel:_propTypes2.default.string,onConfirm:_propTypes2.default.func.isRequired},ConfirmAlert.defaultProps={title:_mailpoet2.default.I18n.t("confirmTitle"),cancelLabel:_mailpoet2.default.I18n.t("cancelLabel"),confirmLabel:_mailpoet2.default.I18n.t("confirmLabel")}},293:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_select=__webpack_require__(263),_select2=_interopRequireDefault(_select),_common=__webpack_require__(269),intervalField={name:"intervalType",values:_common.intervalValues},timeOfDayField={name:"timeOfDay",values:_common.timeOfDayValues},weekDayField={name:"weekDay",values:_common.weekDayValues},monthDayField={name:"monthDay",values:_common.monthDayValues},nthWeekDayField={name:"nthWeekDay",values:_common.nthWeekDayValues},NotificationScheduling=function(_React$Component){function NotificationScheduling(){var _ref,_temp,_this,_ret;_classCallCheck(this,NotificationScheduling);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NotificationScheduling.__proto__||Object.getPrototypeOf(NotificationScheduling)).call.apply(_ref,[this].concat(args))),_this.getCurrentValue=function(){return _this.props.item[_this.props.field.name]||{}},_this.handleValueChange=function(name,value){var oldValue=_this.getCurrentValue(),newValue={};return newValue[name]=value,_this.props.onValueChange({target:{name:_this.props.field.name,value:_underscore2.default.extend({},oldValue,newValue)}})},_this.handleIntervalChange=function(event){return _this.handleValueChange("intervalType",event.target.value)},_this.handleTimeOfDayChange=function(event){return _this.handleValueChange("timeOfDay",event.target.value)},_this.handleWeekDayChange=function(event){return _this.handleValueChange("weekDay",event.target.value)},_this.handleMonthDayChange=function(event){return _this.handleValueChange("monthDay",event.target.value)},_this.handleNthWeekDayChange=function(event){return _this.handleValueChange("nthWeekDay",event.target.value)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NotificationScheduling,_React$Component),_createClass(NotificationScheduling,[{key:"render",value:function(){var value=this.getCurrentValue(),timeOfDaySelection=void 0,weekDaySelection=void 0,monthDaySelection=void 0,nthWeekDaySelection=void 0;return"immediately"!==value.intervalType&&(timeOfDaySelection=_react2.default.createElement(_select2.default,{field:timeOfDayField,item:this.getCurrentValue(),onValueChange:this.handleTimeOfDayChange})),"weekly"!==value.intervalType&&"nthWeekDay"!==value.intervalType||(weekDaySelection=_react2.default.createElement(_select2.default,{field:weekDayField,item:this.getCurrentValue(),onValueChange:this.handleWeekDayChange})),"monthly"===value.intervalType&&(monthDaySelection=_react2.default.createElement(_select2.default,{field:monthDayField,item:this.getCurrentValue(),onValueChange:this.handleMonthDayChange})),"nthWeekDay"===value.intervalType&&(nthWeekDaySelection=_react2.default.createElement(_select2.default,{field:nthWeekDayField,item:this.getCurrentValue(),onValueChange:this.handleNthWeekDayChange})),_react2.default.createElement("div",null,_react2.default.createElement(_select2.default,{field:intervalField,item:this.getCurrentValue(),onValueChange:this.handleIntervalChange,automationId:"newsletter_interval_type"}),nthWeekDaySelection,monthDaySelection,weekDaySelection,timeOfDaySelection)}}]),NotificationScheduling}(_react2.default.Component);NotificationScheduling.propTypes={item:_propTypes2.default.object.isRequired,field:_propTypes2.default.shape({name:_propTypes2.default.string}).isRequired,onValueChange:_propTypes2.default.func.isRequired},module.exports=NotificationScheduling},295:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),KeyValueTable=function(props){return _react2.default.createElement("table",{className:"widefat fixed",style:{maxWidth:props.max_width}},_react2.default.createElement("tbody",null,props.rows.map(function(row){return _react2.default.createElement("tr",{key:"row_"+row.key},_react2.default.createElement("td",{className:"row-title"},row.key),_react2.default.createElement("td",null,row.value))})))};KeyValueTable.propTypes={max_width:_propTypes2.default.string,rows:_propTypes2.default.arrayOf(_propTypes2.default.shape({key:_propTypes2.default.string.isRequired,value:_propTypes2.default.oneOfType([_propTypes2.default.string,_propTypes2.default.number,_propTypes2.default.element]).isRequired})).isRequired},KeyValueTable.defaultProps={max_width:"auto"},module.exports=KeyValueTable},296:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),TasksListDataRow=function(props){return _react2.default.createElement("tr",null,_react2.default.createElement("td",{className:"column column-primary"},props.task.id),_react2.default.createElement("td",{className:"column"},props.task.type),_react2.default.createElement("td",{className:"column"},props.task.newsletter?_react2.default.createElement("a",{href:props.task.newsletter.preview_url,"data-newsletter-id":props.task.newsletter.newsletter_id,"data-queue-id":props.task.newsletter.queue_id,target:"_blank"},props.task.newsletter.subject||_mailpoet2.default.I18n.t("preview")):_mailpoet2.default.I18n.t("none")),_react2.default.createElement("td",{className:"column"},props.task.priority),props.show_scheduled_at?_react2.default.createElement("td",{className:"column-date"},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(1e3*props.task.scheduled_at))):null,_react2.default.createElement("td",{className:"column-date"},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(1e3*props.task.updated_at))))};TasksListDataRow.propTypes={show_scheduled_at:_propTypes2.default.bool,task:_propTypes2.default.shape({id:_propTypes2.default.number.isRequired,type:_propTypes2.default.string.isRequired,priority:_propTypes2.default.number.isRequired,updated_at:_propTypes2.default.number.isRequired,scheduled_at:_propTypes2.default.number,status:_propTypes2.default.string,newsletter:_propTypes2.default.shape({newsletter_id:_propTypes2.default.number.isRequired,queue_id:_propTypes2.default.number.isRequired,preview_url:_propTypes2.default.string.isRequired,subject:_propTypes2.default.string})}).isRequired},TasksListDataRow.defaultProps={show_scheduled_at:!1,task:{newsletter:null}},module.exports=TasksListDataRow},390:function(module,exports,__webpack_require__){"use strict";__webpack_require__(391),__webpack_require__(395),__webpack_require__(423),__webpack_require__(427),__webpack_require__(429),__webpack_require__(431),__webpack_require__(441),__webpack_require__(443),__webpack_require__(444),__webpack_require__(447),__webpack_require__(448),__webpack_require__(457),__webpack_require__(459)},391:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(11),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(7),_list=__webpack_require__(392),_list2=_interopRequireDefault(_list),_form=__webpack_require__(393),_form2=_interopRequireDefault(_form),container=document.getElementById("subscribers_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{path:"/new",component:_form2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/edit/:id",component:_form2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"*",component:_list2.default}))),container)},392:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(7),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_classnames=__webpack_require__(8),_classnames2=_interopRequireDefault(_classnames),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(23),_listing2=_interopRequireDefault(_listing),_selection=__webpack_require__(283),_selection2=_interopRequireDefault(_selection),columns=[{name:"email",label:_mailpoet2.default.I18n.t("subscriber"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),sortable:!0},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"created_at",label:_mailpoet2.default.I18n.t("subscribedOn"),sortable:!0},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberTrashed"):_mailpoet2.default.I18n.t("multipleSubscribersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberDeleted"):_mailpoet2.default.I18n.t("multipleSubscribersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberRestored"):_mailpoet2.default.I18n.t("multipleSubscribersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onNoItemsFound:function(group){return"bounced"===group&&!window.mailpoet_premium_active&&!window.mss_active&&_react2.default.createElement("div",null,_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("bouncedSubscribersHelp")),_react2.default.createElement("p",null,_react2.default.createElement("a",{href:"admin.php?page=mailpoet-premium",className:"button-primary"},_mailpoet2.default.I18n.t("bouncedSubscribersPremiumButtonText"))))}},bulkActions=[{name:"moveToList",label:_mailpoet2.default.I18n.t("moveToList"),onSelect:function(){var field={id:"move_to_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#move_to_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersMovedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"addToList",label:_mailpoet2.default.I18n.t("addToList"),onSelect:function(){var field={id:"add_to_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#add_to_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersAddedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromList",label:_mailpoet2.default.I18n.t("removeFromList"),onSelect:function(){var field={id:"remove_from_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!("default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#remove_from_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersRemovedFromList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromAllLists",label:_mailpoet2.default.I18n.t("removeFromAllLists"),onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersRemovedFromAllLists").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"sendConfirmationEmail",label:_mailpoet2.default.I18n.t("resendConfirmationEmail"),onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleConfirmationEmailsSent").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:_mailpoet2.default.I18n.t("edit"),link:function(subscriber){return _react2.default.createElement(_reactRouterDom.Link,{to:"/edit/"+subscriber.id},_mailpoet2.default.I18n.t("edit"))}},{name:"trash",display:function(subscriber){return 0===Number(subscriber.wp_user_id)}}],SubscriberList=function(_React$Component){function SubscriberList(){var _ref,_temp,_this,_ret;_classCallCheck(this,SubscriberList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=SubscriberList.__proto__||Object.getPrototypeOf(SubscriberList)).call.apply(_ref,[this].concat(args))),_this.getSegmentFromId=function(segmentId){var result=!1;return window.mailpoet_segments.forEach(function(segment){segment.id===segmentId&&(result=segment)}),result},_this.renderItem=function(subscriber,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions","column-username"),status="";switch(subscriber.status){case"subscribed":status=_mailpoet2.default.I18n.t("subscribed");break;case"unconfirmed":status=_mailpoet2.default.I18n.t("unconfirmed");break;case"unsubscribed":status=_mailpoet2.default.I18n.t("unsubscribed");break;case"bounced":status=_mailpoet2.default.I18n.t("bounced");break;default:status="Invalid"}var segments=!1;if(subscriber.subscriptions.length>0){var subscribedSegments=[];subscriber.subscriptions.forEach(function(subscription){var segment=_this.getSegmentFromId(subscription.segment_id);!1!==segment&&"subscribed"===subscription.status&&subscribedSegments.push(segment.name)}),segments=_react2.default.createElement("span",null,subscribedSegments.join(", "))}return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement(_reactRouterDom.Link,{className:"row-title",to:"/edit/"+subscriber.id},subscriber.email)),_react2.default.createElement("p",{style:{margin:0}},subscriber.first_name," ",subscriber.last_name),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},status),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("subscribedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(subscriber.created_at))),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(subscriber.updated_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(SubscriberList,_React$Component),_createClass(SubscriberList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/new"},_mailpoet2.default.I18n.t("new")),_react2.default.createElement("a",{className:"page-title-action",href:"?page=mailpoet-import#step1"},_mailpoet2.default.I18n.t("import")),_react2.default.createElement("a",{id:"mailpoet_export_button",className:"page-title-action",href:"?page=mailpoet-export"},_mailpoet2.default.I18n.t("export"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"subscribers",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,messages:messages,sort_by:"created_at",sort_order:"desc"}))}}]),SubscriberList}(_react2.default.Component);SubscriberList.propTypes={location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},module.exports=SubscriberList},393:function(module,exports,__webpack_require__){"use strict";(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(394)}).call(exports,__webpack_require__(6))},394:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function beforeFormContent(subscriber){if(Number(subscriber.wp_user_id)>0)return _react2.default.createElement("p",{className:"description"},(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("WPUserEditNotice"),/\[link\](.*?)\[\/link\]/g,function(match,i){return _react2.default.createElement("a",{key:i,href:"user-edit.php?user_id="+subscriber.wp_user_id},match)}))}function afterFormContent(){return _react2.default.createElement("p",{className:"description"},_react2.default.createElement("strong",null,_mailpoet2.default.I18n.t("tip"))," ",_mailpoet2.default.I18n.t("customFieldsTip"))}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(7),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_form=__webpack_require__(187),_form2=_interopRequireDefault(_form),_reactStringReplace=__webpack_require__(22),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),fields=[{name:"email",label:_mailpoet2.default.I18n.t("email"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"first_name",label:_mailpoet2.default.I18n.t("firstname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"last_name",label:_mailpoet2.default.I18n.t("lastname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"status",label:_mailpoet2.default.I18n.t("status"),type:"select",values:{subscribed:_mailpoet2.default.I18n.t("subscribed"),unconfirmed:_mailpoet2.default.I18n.t("unconfirmed"),unsubscribed:_mailpoet2.default.I18n.t("unsubscribed"),bounced:_mailpoet2.default.I18n.t("bounced")},filter:function(subscriber,value){return!(Number(subscriber.wp_user_id)>0&&"unconfirmed"===value)}},{name:"segments",label:_mailpoet2.default.I18n.t("lists"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectList"),tip:_mailpoet2.default.I18n.t("welcomeEmailTip"),api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,selected:function(subscriber){return!1===Array.isArray(subscriber.subscriptions)?null:subscriber.subscriptions.filter(function(subscription){return"subscribed"===subscription.status}).map(function(subscription){return subscription.segment_id})},filter:function(segment){return!segment.deleted_at&&"default"===segment.type},getLabel:function(segment){return segment.name+" ("+segment.subscribers+")"},getSearchLabel:function(segment,subscriber){var label="";return void 0!==subscriber.subscriptions&&subscriber.subscriptions.forEach(function(subscription){if(segment.id===subscription.segment_id&&(label=segment.name,"unsubscribed"===subscription.status)){var unsubscribedAt=_mailpoet2.default.Date.format(subscription.updated_at);label+=" (%$1s)".replace("%$1s",_mailpoet2.default.I18n.t("unsubscribedOn").replace("%$1s",unsubscribedAt))}}),label}}];(window.mailpoet_custom_fields||[]).forEach(function(customField){var field={name:"cf_"+customField.id,label:customField.name,type:customField.type};switch(customField.params&&(field.params=customField.params),customField.params.values&&(field.values=customField.params.values),customField.type){case"date":field.year_placeholder=_mailpoet2.default.I18n.t("year"),field.month_placeholder=_mailpoet2.default.I18n.t("month"),field.day_placeholder=_mailpoet2.default.I18n.t("day");break;case"select":field.placeholder="-";break;default:field.placeholder=""}fields.push(field)});var messages={onUpdate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("subscriberUpdated"))},onCreate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("subscriberAdded")),_mailpoet2.default.trackEvent("Subscribers > Add new",{"MailPoet Free version":window.mailpoet_version})}},SubscriberForm=function(_React$Component){function SubscriberForm(){return _classCallCheck(this,SubscriberForm),_possibleConstructorReturn(this,(SubscriberForm.__proto__||Object.getPrototypeOf(SubscriberForm)).apply(this,arguments))}return _inherits(SubscriberForm,_React$Component),_createClass(SubscriberForm,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("subscriber"),_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/"},_mailpoet2.default.I18n.t("backToList"))),_react2.default.createElement(_form2.default,{endpoint:"subscribers",fields:fields,params:this.props.match.params,messages:messages,beforeFormContent:beforeFormContent,afterFormContent:afterFormContent}))}}]),SubscriberForm}(_react2.default.Component);SubscriberForm.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired},module.exports=SubscriberForm},395:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(11),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(7),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_types=__webpack_require__(396),_types2=_interopRequireDefault(_types),_templates=__webpack_require__(397),_templates2=_interopRequireDefault(_templates),_send=__webpack_require__(402),_send2=_interopRequireDefault(_send),_congratulate=__webpack_require__(411),_congratulate2=_interopRequireDefault(_congratulate),_standard=__webpack_require__(416),_standard2=_interopRequireDefault(_standard),_notification=__webpack_require__(417),_notification2=_interopRequireDefault(_notification),_welcome=__webpack_require__(418),_welcome2=_interopRequireDefault(_welcome),_events_list=__webpack_require__(290),_events_list2=_interopRequireDefault(_events_list),_standard3=__webpack_require__(419),_standard4=_interopRequireDefault(_standard3),_welcome3=__webpack_require__(420),_welcome4=_interopRequireDefault(_welcome3),_notification3=__webpack_require__(421),_notification4=_interopRequireDefault(_notification3),_notification_history=__webpack_require__(422),_notification_history2=_interopRequireDefault(_notification_history);((function(_React$Component){function App(){return _classCallCheck(this,App),_possibleConstructorReturn(this,(App.__proto__||Object.getPrototypeOf(App)).apply(this,arguments))}return _inherits(App,_React$Component),_createClass(App,[{key:"render",value:function(){return this.props.children}}]),App})(_react2.default.Component)).propTypes={children:_propTypes2.default.element.isRequired};var container=document.getElementById("newsletters_container");if(container){var routes=[{path:"/standard(/)**",component:_standard4.default},{path:"/welcome(/)**",component:_welcome4.default},{path:"/notification/history/:parent_id(/)**",component:_notification_history2.default},{path:"/notification(/)**",component:_notification4.default},{path:"/new/standard",component:_standard2.default},{path:"/new/notification",component:_notification2.default},{path:"/new/welcome",component:_welcome2.default},{path:"/new",component:_types2.default},{name:"template",path:"/template/:id",component:_templates2.default},{path:"/send/congratulate/:id",component:_congratulate2.default},{path:"/send/:id",component:_send2.default}];routes=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_before_router",[].concat(_toConsumableArray(routes),_toConsumableArray(function(){return window.mailpoet_automatic_emails?_underscore2.default.map(window.mailpoet_automatic_emails,function(automaticEmail){return{path:"new/"+automaticEmail.slug,name:automaticEmail.slug,component:_events_list2.default,data:{email:automaticEmail}}}):null}()))),window.mailpoet_listing=_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{exact:!0,path:"/",render:function(){return _react2.default.createElement(_reactRouterDom.Redirect,{to:"/standard"})}}),routes.map(function(route){return _react2.default.createElement(_reactRouterDom.Route,{key:route.path,path:route.path,component:route.component,name:route.name||null,data:route.data||null,render:route.render})}))),container)}},396:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(21),_breadcrumb2=_interopRequireDefault(_breadcrumb),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_reactRouterDom=__webpack_require__(7),NewsletterTypes=function(_React$Component){function NewsletterTypes(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterTypes);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterTypes.__proto__||Object.getPrototypeOf(NewsletterTypes)).call.apply(_ref,[this].concat(args))),_this.setupNewsletter=function(type){void 0!==type&&(_this.props.history.push("/new/"+type),_mailpoet2.default.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}))},_this.getAutomaticEmails=function(){return window.mailpoet_automatic_emails?_underscore2.default.map(window.mailpoet_automatic_emails,function(automaticEmail){var email=automaticEmail,onClick=_underscore2.default.partial(_this.setupNewsletter,automaticEmail.slug);return email.action=function(){return _react2.default.createElement("div",null,_react2.default.createElement("a",{className:"button button-primary",onClick:onClick,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp")))}(),email}):[]},_this.createNewsletter=function(type){_mailpoet2.default.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:type,subject:_mailpoet2.default.I18n.t("draftNewsletterTitle")}}).done(function(response){_this.props.history.push("/template/"+response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterTypes,_React$Component),_createClass(NewsletterTypes,[{key:"render",value:function(){var createStandardNewsletter=_underscore2.default.partial(this.createNewsletter,"standard"),createNotificationNewsletter=_underscore2.default.partial(this.setupNewsletter,"notification"),createWelcomeNewsletter=_underscore2.default.partial(this.setupNewsletter,"welcome"),defaultTypes=[{slug:"standard",title:_mailpoet2.default.I18n.t("regularNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("regularNewsletterTypeDescription"),action:function(){return _react2.default.createElement("a",{className:"button button-primary","data-automation-id":"create_standard",onClick:createStandardNewsletter,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("create"))}()},{slug:"welcome",title:_mailpoet2.default.I18n.t("welcomeNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("welcomeNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/254-video-guide-to-welcome-emails",action:function(){return _react2.default.createElement("a",{className:"button button-primary",onClick:createWelcomeNewsletter,"data-automation-id":"create_welcome",onKeyDown:function(event){["keydown","keypress"].includes(event.type)&&["Enter"," "].includes(event.key)&&(event.preventDefault(),createWelcomeNewsletter())},role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp"))}()},{slug:"notification",title:_mailpoet2.default.I18n.t("postNotificationNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("postNotificationNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/210-video-guide-to-post-notifications",action:function(){return _react2.default.createElement("a",{className:"button button-primary","data-automation-id":"create_notification",onClick:createNotificationNewsletter,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp"))}()}],types=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_types",[].concat(defaultTypes,_toConsumableArray(this.getAutomaticEmails())),this),badgeClassName=!0===window.mailpoet_is_new_user?"mailpoet_badge mailpoet_badge_video":"mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey";return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("pickCampaignType")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("ul",{className:"mailpoet_boxes clearfix"},types.map(function(type){return _react2.default.createElement("li",{key:type.slug,"data-type":type.slug,className:"mailpoet_newsletter_types"},_react2.default.createElement("div",null,_react2.default.createElement("div",{className:"mailpoet_thumbnail"},type.thumbnailImage?_react2.default.createElement("img",{src:type.thumbnailImage,alt:""}):null),_react2.default.createElement("div",{className:"mailpoet_description"},_react2.default.createElement("h3",null,type.title," ",type.beta?"("+_mailpoet2.default.I18n.t("beta")+")":""),_react2.default.createElement("p",null,type.description),type.videoGuide&&_react2.default.createElement("a",{className:badgeClassName,href:type.videoGuide,target:"_blank"},_react2.default.createElement("span",{className:"dashicons dashicons-format-video"}),_mailpoet2.default.I18n.t("seeVideoGuide"))),_react2.default.createElement("div",{className:"mailpoet_actions"},type.action)))},this)))}}]),NewsletterTypes}(_react2.default.Component);NewsletterTypes.propTypes={history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=(0,_reactRouterDom.withRouter)(NewsletterTypes)},397:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(21),_breadcrumb2=_interopRequireDefault(_breadcrumb),_loading=__webpack_require__(398),_loading2=_interopRequireDefault(_loading),_tabs=__webpack_require__(399),_tabs2=_interopRequireDefault(_tabs),_template_box=__webpack_require__(400),_template_box2=_interopRequireDefault(_template_box),_import_template=__webpack_require__(401),_import_template2=_interopRequireDefault(_import_template),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),getEditorUrl=function(id){return"admin.php?page=mailpoet-newsletter-editor&id="+id},templatesCategories=[{name:"standard",label:_mailpoet2.default.I18n.t("tabStandardTitle")},{name:"welcome",label:_mailpoet2.default.I18n.t("tabWelcomeTitle")},{name:"notification",label:_mailpoet2.default.I18n.t("tabNotificationTitle")}];window.mailpoet_woocommerce_active&&templatesCategories.push({name:"woocommerce",label:_mailpoet2.default.I18n.t("tabWoocommerceTitle")}),templatesCategories.push.apply(templatesCategories,[{name:"all",label:_mailpoet2.default.I18n.t("allTemplates")},{name:"recent",label:_mailpoet2.default.I18n.t("recentlySent")},{name:"saved",label:_mailpoet2.default.I18n.t("savedTemplates")}]);var NewsletterTemplates=function(_React$Component){function NewsletterTemplates(props){_classCallCheck(this,NewsletterTemplates);var _this=_possibleConstructorReturn(this,(NewsletterTemplates.__proto__||Object.getPrototypeOf(NewsletterTemplates)).call(this,props));return _this.state={loading:!0,templates:{},emailType:null,selectedTab:""},_this.templates={},_this.addTemplate=_this.addTemplate.bind(_this),_this.afterTemplateDelete=_this.afterTemplateDelete.bind(_this),_this.afterTemplateSelect=_this.afterTemplateSelect.bind(_this),_this.afterTemplateImport=_this.afterTemplateImport.bind(_this),_this}return _inherits(NewsletterTemplates,_React$Component),_createClass(NewsletterTemplates,[{key:"componentWillMount",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"getAll"}).done(function(response){0===response.data.length&&(response.data=[{name:_mailpoet2.default.I18n.t("mailpoetGuideTemplateTitle"),categories:'["welcome", "notification", "standard", "woocommerce"]',readonly:"1"}]),response.data.forEach(_this2.addTemplate),_this2.sortTemplates()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this2.selectInitialTab()})}},{key:"addTemplate",value:function(template){var _this3=this,categoriesNames=templatesCategories.map(function(category){return category.name}),categories=void 0;try{categories=JSON.parse(template.categories).filter(function(name){return-1!==categoriesNames.indexOf(name)})}catch(err){categories=[]}0===categories.length&&categories.push("saved"),categories.forEach(function(category){void 0===_this3.templates[category]&&(_this3.templates[category]=[]),_this3.templates[category].unshift(template)})}},{key:"sortTemplates",value:function(){var _this4=this;Object.keys(this.templates).forEach(function(category){_this4.templates[category].sort(function(a,b){return parseInt(a.id,10)<parseInt(b.id,10)?1:-1})})}},{key:"selectInitialTab",value:function(){var _this5=this,emailType=void 0,selectedTab="standard";_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:this.props.match.params.id}}).done(function(response){emailType=response.data.type,_underscore2.default.findWhere(templatesCategories,{name:response.data.type})&&(selectedTab=response.data.type)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this5.setState({templates:_this5.templates,emailType:emailType,selectedTab:selectedTab,loading:!1})})}},{key:"afterTemplateDelete",value:function(success,id){var _this6=this;success&&Object.keys(this.templates).forEach(function(category){_this6.templates[category]=_this6.templates[category].filter(function(template){return template.id!==id})}),this.setState({templates:this.templates,loading:!1})}},{key:"afterTemplateSelect",value:function(success,id){success?window.location=getEditorUrl(id):this.setState({loading:!1})}},{key:"afterTemplateImport",value:function(success,template){success&&this.addTemplate(template),this.setState({templates:this.templates,selectedTab:success?"saved":"import",loading:!1})}},{key:"render",value:function(){var _this7=this;if(this.state.loading)return _react2.default.createElement(_loading2.default,null);var tabs=templatesCategories.concat({name:"import",label:_mailpoet2.default.I18n.t("tabImportTitle")}),selectedTab=this.state.selectedTab,content=null;if("import"===selectedTab)content=_react2.default.createElement(_import_template2.default,{beforeImport:function(){return _this7.setState({loading:!0})},afterImport:this.afterTemplateImport});else{var templates=this.state.templates[this.state.selectedTab]||[];templates=0===templates.length?this.state.loading?null:_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("noTemplates")):templates.map(function(template,index){return _react2.default.createElement(_template_box2.default,_extends({key:template.id,index:index,newsletterId:_this7.props.match.params.id,beforeDelete:function(){return _this7.setState({loading:!0})},afterDelete:_this7.afterTemplateDelete,beforeSelect:function(){return _this7.setState({loading:!0})},afterSelect:_this7.afterTemplateSelect},template))}),content=_react2.default.createElement("ul",{className:"mailpoet_boxes clearfix"},templates)}var breadcrumb=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_template_breadcrumb",_react2.default.createElement(_breadcrumb2.default,{step:"template"}),this.state.emailType,"template");return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("selectTemplateTitle")),breadcrumb,_react2.default.createElement(_tabs2.default,{tabs:tabs,selected:this.state.selectedTab,select:function(name){return _this7.setState({selectedTab:name})}}),content)}}]),NewsletterTemplates}(_react2.default.Component);NewsletterTemplates.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired},exports.default=NewsletterTemplates},398:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),Loading=function(_React$Component){function Loading(){return _classCallCheck(this,Loading),_possibleConstructorReturn(this,(Loading.__proto__||Object.getPrototypeOf(Loading)).apply(this,arguments))}return _inherits(Loading,_React$Component),_createClass(Loading,[{key:"componentWillMount",value:function(){_mailpoet2.default.Modal.loading(!0)}},{key:"componentWillUnmount",value:function(){_mailpoet2.default.Modal.loading(!1)}},{key:"render",value:function(){return null}}]),Loading}(_react2.default.Component);exports.default=Loading},399:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_reactTooltip=__webpack_require__(158),_reactTooltip2=_interopRequireDefault(_reactTooltip),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(22),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),tooltipText=(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("tooltipTemplateTabs"),/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{href:"https://mailpoet.polldaddy.com/s/select-template-feedback",key:"feedback",target:"_blank",rel:"noopener noreferrer"},match)}),Tabs=function(_ref){var tabs=_ref.tabs,selected=_ref.selected,select=_ref.select;return _react2.default.createElement("div",{className:"wp-filter hide-if-no-js"},_react2.default.createElement("ul",{className:"filter-links"},tabs.map(function(_ref2){var name=_ref2.name,label=_ref2.label;return _react2.default.createElement("li",{key:name},_react2.default.createElement("a",{href:"javascript:",className:selected===name?"current":"",onClick:function(){return select(name)}}," ",label))})),_react2.default.createElement("span",{className:"feedback-tooltip newsletter-templates-feedback","data-event":"click","data-tip":!0,"data-for":"feedback-newsletter-templates-tabs"},_mailpoet2.default.I18n.t("feedback")),_react2.default.createElement(_reactTooltip2.default,{globalEventOff:"click",multiline:!0,id:"feedback-newsletter-templates-tabs",efect:"solid",place:"bottom"},_react2.default.createElement("span",{style:{pointerEvents:"all",display:"inline-block"}},tooltipText)))};Tabs.propTypes={selected:_propTypes2.default.string.isRequired,select:_propTypes2.default.func.isRequired,tabs:_propTypes2.default.arrayOf(_propTypes2.default.shape({label:_propTypes2.default.string.isRequired,name:_propTypes2.default.string.isRequired}).isRequired).isRequired},exports.default=Tabs},400:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_confirm_alert=__webpack_require__(292),_confirm_alert2=_interopRequireDefault(_confirm_alert),TemplateBox=function(_React$Component){function TemplateBox(props){_classCallCheck(this,TemplateBox);var _this=_possibleConstructorReturn(this,(TemplateBox.__proto__||Object.getPrototypeOf(TemplateBox)).call(this,props));return _this.onPreview=_this.onPreview.bind(_this),_this.onDelete=_this.onDelete.bind(_this),_this.onSelect=_this.onSelect.bind(_this),_this}return _inherits(TemplateBox,_React$Component),_createClass(TemplateBox,[{key:"onDelete",value:function(){var _props=this.props,id=_props.id,name=_props.name,beforeDelete=_props.beforeDelete,afterDelete=_props.afterDelete,onConfirm=function(){beforeDelete(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"delete",data:{id:id}}).done(function(){afterDelete(!0,id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterDelete(!1)})};(0,_confirm_alert2.default)({message:_mailpoet2.default.I18n.t("confirmTemplateDeletion").replace("%$1s",name),onConfirm:onConfirm})}},{key:"onPreview",value:function(){_mailpoet2.default.Modal.popup({title:this.props.name,template:'<div class="mailpoet_boxes_preview" style="background-color: {{ body.globalStyles.body.backgroundColor }}"><img src="{{ thumbnail }}" /></div>',data:this.props})}},{key:"onSelect",value:function(){var _props2=this.props,newsletterId=_props2.newsletterId,name=_props2.name,beforeSelect=_props2.beforeSelect,afterSelect=_props2.afterSelect;beforeSelect(),_mailpoet2.default.trackEvent("Emails > Template selected",{"MailPoet Free version":window.mailpoet_version,"Email name":name}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:{id:newsletterId,template_id:this.props.id}}).done(function(response){afterSelect(!0,response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterSelect(!1)})}},{key:"render",value:function(){var _props3=this.props,index=_props3.index,name=_props3.name,thumbnail=_props3.thumbnail,readonly=_props3.readonly,deleteLink=_react2.default.createElement("div",{className:"mailpoet_delete button button-secondary"},_react2.default.createElement("a",{href:"javascript:;",onClick:this.onDelete},_mailpoet2.default.I18n.t("delete"))),preview="";return"string"==typeof thumbnail&&thumbnail.length>0&&(preview=_react2.default.createElement("a",{href:"javascript:;",onClick:this.onPreview},_react2.default.createElement("img",{src:thumbnail,alt:_mailpoet2.default.I18n.t("templatePreview")}),_react2.default.createElement("div",{className:"mailpoet_overlay"},_react2.default.createElement("p",{className:"mailpoet_more_details"},_mailpoet2.default.I18n.t("zoom"))))),_react2.default.createElement("li",{className:"mailpoet_template_boxes","data-automation-id":"select_template_box"},_react2.default.createElement("div",{className:"mailpoet_thumbnail"},preview),_react2.default.createElement("div",{className:"mailpoet_description"},_react2.default.createElement("h3",null,name)),_react2.default.createElement("div",{className:"mailpoet_actions"},"1"!==readonly&&deleteLink,_react2.default.createElement("a",{className:"button button-primary","data-automation-id":"select_template_"+index,onClick:this.onSelect,role:"button",tabIndex:0}," ",_mailpoet2.default.I18n.t("select")," ")))}}]),TemplateBox}(_react2.default.Component);TemplateBox.propTypes={index:_propTypes2.default.number.isRequired,id:_propTypes2.default.string.isRequired,newsletterId:_propTypes2.default.string.isRequired,name:_propTypes2.default.string.isRequired,thumbnail:_propTypes2.default.string.isRequired,readonly:_propTypes2.default.string.isRequired,beforeDelete:_propTypes2.default.func.isRequired,afterDelete:_propTypes2.default.func.isRequired,beforeSelect:_propTypes2.default.func.isRequired,afterSelect:_propTypes2.default.func.isRequired},exports.default=TemplateBox},401:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_helpTooltip=__webpack_require__(157),_helpTooltip2=_interopRequireDefault(_helpTooltip),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),ImportTemplate=function(_React$Component){function ImportTemplate(props){_classCallCheck(this,ImportTemplate);var _this=_possibleConstructorReturn(this,(ImportTemplate.__proto__||Object.getPrototypeOf(ImportTemplate)).call(this,props));return _this.fileRef=_react2.default.createRef(),_this.handleSubmit=_this.handleSubmit.bind(_this),_this}return _inherits(ImportTemplate,_React$Component),_createClass(ImportTemplate,[{key:"saveTemplate",value:function(_saveTemplate){var template=_saveTemplate,_props=this.props,beforeImport=_props.beforeImport,afterImport=_props.afterImport;_underscore2.default.isUndefined(template.body)||(template.body=JSON.stringify(template.body));try{template.categories=JSON.parse(template.categories)}catch(err){template.categories=[]}-1===template.categories.indexOf("saved")&&template.categories.push("saved"),-1===template.categories.indexOf("standard")&&-1===template.categories.indexOf("welcome")&&-1===template.categories.indexOf("notification")&&template.categories.push("standard"),template.categories=JSON.stringify(template.categories),beforeImport(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:template}).done(function(response){afterImport(!0,response.data)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterImport(!1)})}},{key:"handleSubmit",value:function(e){var _this2=this;if(e.preventDefault(),_underscore2.default.size(this.fileRef.current.files)<=0)return!1;var file=_underscore2.default.first(this.fileRef.current.files),reader=new FileReader;return reader.onload=function(evt){try{_this2.saveTemplate(JSON.parse(evt.target.result)),_mailpoet2.default.trackEvent("Emails > Template imported",{"MailPoet Free version":window.mailpoet_version})}catch(err){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("templateFileMalformedError"))}},reader.readAsText(file),!0}},{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("importTemplateTitle"),_react2.default.createElement(_helpTooltip2.default,{tooltip:_mailpoet2.default.I18n.t("helpTooltipTemplateUpload"),place:"right",className:"tooltip-help-import-template"})),_react2.default.createElement("form",{onSubmit:this.handleSubmit},_react2.default.createElement("input",{type:"file",placeholder:_mailpoet2.default.I18n.t("selectJsonFileToUpload"),ref:this.fileRef}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"submit",value:_mailpoet2.default.I18n.t("upload")}))))}}]),ImportTemplate}(_react2.default.Component);ImportTemplate.propTypes={beforeImport:_propTypes2.default.func.isRequired,afterImport:_propTypes2.default.func.isRequired},exports.default=ImportTemplate},402:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(32),_createReactClass2=_interopRequireDefault(_createReactClass),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_breadcrumb=__webpack_require__(21),_breadcrumb2=_interopRequireDefault(_breadcrumb),_form=__webpack_require__(187),_form2=_interopRequireDefault(_form),_standard=__webpack_require__(403),_standard2=_interopRequireDefault(_standard),_notification=__webpack_require__(407),_notification2=_interopRequireDefault(_notification),_welcome=__webpack_require__(408),_welcome2=_interopRequireDefault(_welcome),_helpTooltip=__webpack_require__(157),_helpTooltip2=_interopRequireDefault(_helpTooltip),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),_thumbnail=__webpack_require__(294),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_reactRouterDom=__webpack_require__(7),NewsletterSend=(0,_createReactClass2.default)({displayName:"NewsletterSend",propTypes:{match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired,history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},getInitialState:function(){return{fields:[],item:{},loading:!0}},componentDidMount:function(){this.loadItem(this.props.match.params.id),(0,_jquery2.default)("#mailpoet_newsletter").parsley()},componentWillReceiveProps:function(props){this.loadItem(props.match.params.id)},getFieldsByNewsletter:function(newsletter){return this.getSubtype(newsletter).getFields(newsletter)},getSendButtonOptions:function(){return this.getSubtype(this.state.item).getSendButtonOptions(this.state.item)},getSubtype:function(newsletter){switch(newsletter.type){case"notification":return _notification2.default;case"welcome":return _welcome2.default;default:return _wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_newsletter_fields",_standard2.default,newsletter)}},isValid:function(){return(0,_jquery2.default)("#mailpoet_newsletter").parsley().isValid()},loadItem:function(id){var _this=this;this.setState({loading:!0}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){_this.setState({loading:!1,item:response.data,fields:_this.getFieldsByNewsletter(response.data)})}).fail(function(){_this.setState({loading:!1,item:{}},function(){_this.props.history.push("/new")})})},saveTemplate:function(response,done){var _this2=this;(0,_thumbnail.fromUrl)(response.meta.preview_url).then(function(thumbnail){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:{newsletter_id:response.data.id,name:response.data.subject,thumbnail:thumbnail,body:JSON.stringify(response.data.body),categories:'["recent"]'}}).then(done).fail(function(err){_this2.showError(err),_this2.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1),done()})}).catch(function(err){_this2.showError({errors:[err]})})},handleSend:function(e){var _this3=this;return e.preventDefault(),this.isValid()?(_mailpoet2.default.Modal.loading(!0),this.saveNewsletter(e).done(function(){_this3.setState({loading:!0})}).done(function(response){switch(response.data.type){case"notification":case"welcome":return _this3.activateNewsletter(response);default:return _this3.sendNewsletter(response)}}).fail(function(err){_this3.showError(err),_this3.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})):(0,_jquery2.default)("#mailpoet_newsletter").parsley().validate()},sendNewsletter:function(newsletter){var _this4=this;return _mailpoet2.default.Ajax.post(_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_parameters",{api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"add",data:{newsletter_id:this.state.item.id}},this.state.item)).done(function(response){_this4.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return _mailpoet2.default.Modal.loading(!1),void _this4.props.history.push("/send/congratulate/"+_this4.state.item.id);_this4.props.history.push(_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_response_redirect","/"+(_this4.state.item.type||""),_this4.state.item));var customResponse=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_response",_this4.state.item,response);_underscore2.default.isFunction(customResponse)?customResponse():"scheduled"===response.data.status?(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterHasBeenScheduled")),_mailpoet2.default.trackEvent("Emails > Newsletter sent",{scheduled:!0,"MailPoet Free version":window.mailpoet_version})):(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterBeingSent")),_mailpoet2.default.trackEvent("Emails > Newsletter sent",{scheduled:!1,"MailPoet Free version":window.mailpoet_version})),_mailpoet2.default.Modal.loading(!1)})}).fail(function(err){_this4.showError(err),_this4.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})},activateNewsletter:function(newsletter){var _this5=this;return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:this.props.match.params.id,status:"active"}}).done(function(response){_this5.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return _mailpoet2.default.Modal.loading(!1),void _this5.props.history.push("/send/congratulate/"+_this5.state.item.id);_this5.props.history.push("/"+(_this5.state.item.type||""));var opts=_this5.state.item.options;"welcome"===response.data.type?(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("welcomeEmailActivated")),_mailpoet2.default.trackEvent("Emails > Welcome email activated",{"MailPoet Free version":window.mailpoet_version,"List type":opts.event,Delay:opts.afterTimeNumber+" "+opts.afterTimeType})):"notification"===response.data.type&&(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("postNotificationActivated")),_mailpoet2.default.trackEvent("Emails > Post notifications activated",{"MailPoet Free version":window.mailpoet_version,Frequency:opts.intervalType})),_mailpoet2.default.Modal.loading(!1)})}).fail(function(err){_this5.showError(err),_this5.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})},handleResume:function(e){var _this6=this;return e.preventDefault(),this.isValid()?this.saveNewsletter(e).done(function(){_this6.setState({loading:!0})}).done(function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:_this6.state.item.id}}).done(function(){_this6.props.history.push("/"+(_this6.state.item.type||"")),_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterSendingHasBeenResumed"))}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}).fail(function(err){_this6.showError(err)}).always(function(){_this6.setState({loading:!1})}):(0,_jquery2.default)("#mailpoet_newsletter").parsley().validate(),!1},handleSave:function(e){var _this7=this;e.preventDefault(),this.saveNewsletter(e).done(function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterUpdated"))}).done(function(){_this7.props.history.push("/"+(_this7.state.item.type||""))}).fail(function(err){_this7.showError(err)})},handleRedirectToDesign:function(e){var _this8=this;e.preventDefault();var redirectTo=e.target.href;this.saveNewsletter(e).done(function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterUpdated"))}).done(function(){window.location=redirectTo}).fail(function(err){_this8.showError(err)})},saveNewsletter:function(){var data=this.state.item;data.queue=void 0,this.setState({loading:!0});var IGNORED_NEWSLETTER_PROPERTIES=["preheader","body","created_at","deleted_at","hash","status","updated_at","type"],newsletterData=_underscore2.default.omit(data,IGNORED_NEWSLETTER_PROPERTIES);return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:newsletterData})},showError:function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})},handleFormChange:function(e){var item=this.state.item;return item[e.target.name]=e.target.value,this.setState({item:item}),!0},render:function(){var isPaused="sending"===this.state.item.status&&this.state.item.queue&&"paused"===this.state.item.queue.status,fields=this.state.fields.map(function(field){var newField=field;return"segments"!==field.name&&"options"!==field.name||(newField.disabled=isPaused),newField}),sendButtonOptions=this.getSendButtonOptions(),breadcrumb=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_breadcrumb",_react2.default.createElement(_breadcrumb2.default,{step:"send"}),this.state.item.type,"send");return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("finalNewsletterStep")),breadcrumb,_react2.default.createElement(_form2.default,{id:"mailpoet_newsletter",fields:fields,automationId:"newsletter_send_form",item:this.state.item,loading:this.state.loading,onChange:this.handleFormChange,onSubmit:this.handleSave},_react2.default.createElement("p",{className:"submit"},isPaused?_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleResume,value:_mailpoet2.default.I18n.t("resume")}):_react2.default.createElement("input",_extends({className:"button button-primary",type:"button",onClick:this.handleSend,value:_mailpoet2.default.I18n.t("send")},sendButtonOptions))," ",_react2.default.createElement("input",{className:"button button-secondary",type:"submit",value:_mailpoet2.default.I18n.t("saveDraftAndClose")})," ",_mailpoet2.default.I18n.t("orSimply")," ",_react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+this.props.match.params.id,onClick:this.handleRedirectToDesign},_mailpoet2.default.I18n.t("goBackToDesign")),"."),!isPaused&&sendButtonOptions.disabled&&"disabled"===sendButtonOptions.disabled&&_react2.default.createElement(_helpTooltip2.default,{tooltip:_mailpoet2.default.I18n.t("helpTooltipSendEmail"),tooltipId:"helpTooltipSendEmail"})))}});module.exports=(0,_reactRouterDom.withRouter)(NewsletterSend)},403:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_date_time=__webpack_require__(404),_date_time2=_interopRequireDefault(_date_time),currentTime=window.mailpoet_current_time||"00:00",defaultDateTime=window.mailpoet_current_date+" 00:00:00",timeOfDayItems=window.mailpoet_schedule_time_of_day,dateDisplayFormat=window.mailpoet_date_display_format,dateStorageFormat=window.mailpoet_date_storage_format,StandardScheduling=function(_React$Component){function StandardScheduling(){var _ref,_temp,_this,_ret;_classCallCheck(this,StandardScheduling);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=StandardScheduling.__proto__||Object.getPrototypeOf(StandardScheduling)).call.apply(_ref,[this].concat(args))),_this.getCurrentValue=function(){var schedulingOptions={isScheduled:"0",scheduledAt:defaultDateTime};return _underscore2.default.defaults(_this.props.item[_this.props.field.name]||{},schedulingOptions)},_this.getDateValidation=function(){return{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noScheduledDateError"),"data-parsley-errors-container":"#mailpoet_scheduling"}},_this.isScheduled=function(){return"1"===_this.getCurrentValue().isScheduled},_this.handleCheckboxChange=function(event){var changeEvent=event;return changeEvent.target.value=event.target.checked?"1":"0",_this.handleValueChange(changeEvent)},_this.handleValueChange=function(event){var oldValue=_this.getCurrentValue(),newValue={};return newValue[event.target.name]=event.target.value,_this.props.onValueChange({target:{name:_this.props.field.name,value:_underscore2.default.extend({},oldValue,newValue)}})},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(StandardScheduling,_React$Component),_createClass(StandardScheduling,[{key:"render",value:function(){var schedulingOptions=void 0;return this.isScheduled()&&(schedulingOptions=_react2.default.createElement("span",{id:"mailpoet_scheduling"},_react2.default.createElement(_date_time2.default,{name:"scheduledAt",value:this.getCurrentValue().scheduledAt,onChange:this.handleValueChange,disabled:this.props.field.disabled,dateValidation:this.getDateValidation(),defaultDateTime:defaultDateTime,timeOfDayItems:timeOfDayItems,dateDisplayFormat:dateDisplayFormat,dateStorageFormat:dateStorageFormat})," ",_react2.default.createElement("span",null,_mailpoet2.default.I18n.t("websiteTimeIs")," ",_react2.default.createElement("code",null,currentTime)))),_react2.default.createElement("div",null,_react2.default.createElement("input",{type:"checkbox",value:"1",checked:this.isScheduled(),disabled:this.props.field.disabled,name:"isScheduled",onChange:this.handleCheckboxChange}),schedulingOptions)}}]),StandardScheduling}(_react2.default.Component);StandardScheduling.propTypes={item:_propTypes2.default.object,field:_propTypes2.default.shape({name:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool}).isRequired,onValueChange:_propTypes2.default.func.isRequired},StandardScheduling.defaultProps={item:{}};var fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"segments",label:_mailpoet2.default.I18n.t("segments"),tip:_mailpoet2.default.I18n.t("segmentsTip"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return segment.name+" ("+parseInt(segment.subscribers,10).toLocaleString()+")"},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return _underscore2.default.map(segmentIds,function(id){return _underscore2.default.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]},{name:"options",label:_mailpoet2.default.I18n.t("scheduleIt"),type:"reactComponent",component:StandardScheduling}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(newsletter){var newsletterOptions=newsletter||{},isScheduled="object"===_typeof(newsletterOptions.options)&&"1"===newsletterOptions.options.isScheduled,options={value:isScheduled?_mailpoet2.default.I18n.t("schedule"):_mailpoet2.default.I18n.t("send")};return"sent"!==newsletterOptions.status&&"sending"!==newsletterOptions.status||(options.disabled="disabled"),options}}},404:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_date_text=__webpack_require__(405),_date_text2=_interopRequireDefault(_date_text),_time_select=__webpack_require__(406),_time_select2=_interopRequireDefault(_time_select),DateTime=function(_React$Component){function DateTime(props){_classCallCheck(this,DateTime);var _this=_possibleConstructorReturn(this,(DateTime.__proto__||Object.getPrototypeOf(DateTime)).call(this,props));return _initialiseProps.call(_this),_this.state=_this.buildStateFromProps(props),_this}return _inherits(DateTime,_React$Component),_createClass(DateTime,[{key:"componentWillReceiveProps",value:function(nextProps){this.setState(this.buildStateFromProps(nextProps))}},{key:"render",value:function(){return _react2.default.createElement("span",null,_react2.default.createElement(_date_text2.default,{name:"date",value:this.state.date,onChange:this.handleChange,displayFormat:this.props.dateDisplayFormat,storageFormat:this.props.dateStorageFormat,disabled:this.props.disabled,validation:this.props.dateValidation}),_react2.default.createElement(_time_select2.default,{name:"time",value:this.state.time,onChange:this.handleChange,disabled:this.props.disabled,validation:this.props.timeValidation,timeOfDayItems:this.props.timeOfDayItems}))}}]),DateTime}(_react2.default.Component),_initialiseProps=function(){var _this2=this;this.getDateTime=function(){return[_this2.state.date,_this2.state.time].join(_this2.DATE_TIME_SEPARATOR)},this.DATE_TIME_SEPARATOR=" ",this.buildStateFromProps=function(props){var value=props.value||_this2.props.defaultDateTime,_value$split=value.split(_this2.DATE_TIME_SEPARATOR),_value$split2=_slicedToArray(_value$split,2);return{date:_value$split2[0],time:_value$split2[1]}},this.handleChange=function(event){var newState={};newState[event.target.name]=event.target.value,_this2.setState(newState,_this2.propagateChange)},this.propagateChange=function(){_this2.props.onChange&&_this2.props.onChange({target:{name:_this2.props.name||"",value:_this2.getDateTime()}})}};DateTime.propTypes={defaultDateTime:_propTypes2.default.string.isRequired,dateDisplayFormat:_propTypes2.default.string.isRequired,dateStorageFormat:_propTypes2.default.string.isRequired,onChange:_propTypes2.default.func,name:_propTypes2.default.string,disabled:_propTypes2.default.bool,dateValidation:_propTypes2.default.object.isRequired,timeValidation:_propTypes2.default.any,timeOfDayItems:_propTypes2.default.objectOf(_propTypes2.default.string).isRequired},DateTime.defaultProps={onChange:void 0,name:"",disabled:!1,timeValidation:void 0},module.exports=DateTime},405:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),datepickerTranslations={closeText:_mailpoet2.default.I18n.t("close"),currentText:_mailpoet2.default.I18n.t("today"),nextText:_mailpoet2.default.I18n.t("next"),prevText:_mailpoet2.default.I18n.t("previous"),monthNames:[_mailpoet2.default.I18n.t("january"),_mailpoet2.default.I18n.t("february"),_mailpoet2.default.I18n.t("march"),_mailpoet2.default.I18n.t("april"),_mailpoet2.default.I18n.t("may"),_mailpoet2.default.I18n.t("june"),_mailpoet2.default.I18n.t("july"),_mailpoet2.default.I18n.t("august"),_mailpoet2.default.I18n.t("september"),_mailpoet2.default.I18n.t("october"),_mailpoet2.default.I18n.t("november"),_mailpoet2.default.I18n.t("december")],monthNamesShort:[_mailpoet2.default.I18n.t("januaryShort"),_mailpoet2.default.I18n.t("februaryShort"),_mailpoet2.default.I18n.t("marchShort"),_mailpoet2.default.I18n.t("aprilShort"),_mailpoet2.default.I18n.t("mayShort"),_mailpoet2.default.I18n.t("juneShort"),_mailpoet2.default.I18n.t("julyShort"),_mailpoet2.default.I18n.t("augustShort"),_mailpoet2.default.I18n.t("septemberShort"),_mailpoet2.default.I18n.t("octoberShort"),_mailpoet2.default.I18n.t("novemberShort"),_mailpoet2.default.I18n.t("decemberShort")],dayNames:[_mailpoet2.default.I18n.t("sunday"),_mailpoet2.default.I18n.t("monday"),_mailpoet2.default.I18n.t("tuesday"),_mailpoet2.default.I18n.t("wednesday"),_mailpoet2.default.I18n.t("thursday"),_mailpoet2.default.I18n.t("friday"),_mailpoet2.default.I18n.t("saturday")],dayNamesShort:[_mailpoet2.default.I18n.t("sundayShort"),_mailpoet2.default.I18n.t("mondayShort"),_mailpoet2.default.I18n.t("tuesdayShort"),_mailpoet2.default.I18n.t("wednesdayShort"),_mailpoet2.default.I18n.t("thursdayShort"),_mailpoet2.default.I18n.t("fridayShort"),_mailpoet2.default.I18n.t("saturdayShort")],dayNamesMin:[_mailpoet2.default.I18n.t("sundayMin"),_mailpoet2.default.I18n.t("mondayMin"),_mailpoet2.default.I18n.t("tuesdayMin"),_mailpoet2.default.I18n.t("wednesdayMin"),_mailpoet2.default.I18n.t("thursdayMin"),_mailpoet2.default.I18n.t("fridayMin"),_mailpoet2.default.I18n.t("saturdayMin")]},DateText=function(_React$Component){function DateText(props){_classCallCheck(this,DateText);var _this=_possibleConstructorReturn(this,(DateText.__proto__||Object.getPrototypeOf(DateText)).call(this,props));return _this.onChange=function(event){var changeEvent=event,displayDate=changeEvent.target.value,storageDate=_this.getStorageDate(displayDate);changeEvent.target.value=storageDate,_this.props.onChange(changeEvent)},_this.getFieldName=function(){return _this.props.name||"date"},_this.getDisplayDate=function(date){var formatting={parseFormat:_this.props.storageFormat,format:_this.props.displayFormat};return _mailpoet2.default.Date.format(date,formatting)},_this.getStorageDate=function(date){var formatting={parseFormat:_this.props.displayFormat,format:_this.props.storageFormat};return _mailpoet2.default.Date.format(date,formatting)},_this.dateInput=_react2.default.createRef(),_this}return _inherits(DateText,_React$Component),_createClass(DateText,[{key:"componentDidMount",value:function(){var $element=(0,_jquery2.default)(this.dateInput.current),that=this;$element.datepicker&&(_jquery2.default.datepicker.parseDate=function(format,value){return _mailpoet2.default.Date.toDate(value,{parseFormat:this.props.displayFormat,format:format})},_jquery2.default.datepicker.formatDate=function(format,value){return _mailpoet2.default.Date.format(value,{format:format})},$element.datepicker(_underscore2.default.extend({dateFormat:this.props.displayFormat,isRTL:!1,onSelect:function(value){that.onChange({target:{name:that.getFieldName(),value:value}})}},datepickerTranslations)),this.datepickerInitialized=!0)}},{key:"componentWillUnmount",value:function(){this.datepickerInitialized&&(0,_jquery2.default)(this.dateInput.current).datepicker("destroy")}},{key:"render",value:function(){return _react2.default.createElement("input",_extends({type:"text",size:"30",name:this.getFieldName(),value:this.getDisplayDate(this.props.value),readOnly:!0,disabled:this.props.disabled,onChange:this.onChange,ref:this.dateInput},this.props.validation))}}]),DateText}(_react2.default.Component);DateText.propTypes={displayFormat:_propTypes2.default.string.isRequired,onChange:_propTypes2.default.func.isRequired,name:_propTypes2.default.string,storageFormat:_propTypes2.default.string.isRequired,value:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool.isRequired,validation:_propTypes2.default.object.isRequired},DateText.defaultProps={name:"date"},module.exports=DateText},406:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),TimeSelect=function(_React$Component){function TimeSelect(){return _classCallCheck(this,TimeSelect),_possibleConstructorReturn(this,(TimeSelect.__proto__||Object.getPrototypeOf(TimeSelect)).apply(this,arguments))}return _inherits(TimeSelect,_React$Component),_createClass(TimeSelect,[{key:"render",value:function(){var _this2=this,options=Object.keys(this.props.timeOfDayItems).map(function(value){return _react2.default.createElement("option",{key:"option-"+_this2.props.timeOfDayItems[value],value:value},_this2.props.timeOfDayItems[value])});return _react2.default.createElement("select",_extends({name:this.props.name||"time",value:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange},this.props.validation),options)}}]),TimeSelect}(_react2.default.Component);TimeSelect.propTypes={timeOfDayItems:_propTypes2.default.objectOf(_propTypes2.default.string).isRequired,name:_propTypes2.default.string,value:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool,onChange:_propTypes2.default.func.isRequired,validation:_propTypes2.default.object},TimeSelect.defaultProps={name:"time",disabled:!1,validation:{}},module.exports=TimeSelect},407:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_scheduling=__webpack_require__(293),_scheduling2=_interopRequireDefault(_scheduling),fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("postNotificationSubjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"options",label:_mailpoet2.default.I18n.t("selectFrequency"),type:"reactComponent",component:_scheduling2.default},{name:"segments",label:_mailpoet2.default.I18n.t("segments"),tip:_mailpoet2.default.I18n.t("segmentsTip"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return segment.name+" ("+parseInt(segment.subscribers,10).toLocaleString()+")"},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return _underscore2.default.map(segmentIds,function(id){return _underscore2.default.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(){return{value:_mailpoet2.default.I18n.t("activate")}}}},408:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_scheduling=__webpack_require__(268),_scheduling2=_interopRequireDefault(_scheduling),fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"options",label:_mailpoet2.default.I18n.t("sendWelcomeEmailWhen"),type:"reactComponent",component:_scheduling2.default},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(){return{value:_mailpoet2.default.I18n.t("activate")}}}},411:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function successPageClosed(){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_congratulate_after_first_newsletter:!1}}).always(function(){window.location=window.mailpoet_main_page})}function renderSuccess(newsletter,testingPassed){return testingPassed&&_mailpoet2.default.trackEvent("Cron testing done",{"Cron is working":"true"}),_react2.default.createElement(_success2.default,{illustrationImageUrl:window.mailpoet_congratulations_success_image,successClicked:successPageClosed,newsletter:newsletter})}function renderFail(){return _mailpoet2.default.trackEvent("Cron testing done",{"Cron is working":"false"}),_react2.default.createElement(_fail2.default,{failClicked:function(){window.location=window.mailpoet_main_page}})}function renderLoading(showRichLoadingScreen){return _react2.default.createElement(_loading2.default,{illustrationImageUrl:window.mailpoet_congratulations_loading_image,successClicked:successPageClosed,showRichLoadingScreen:showRichLoadingScreen})}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_moment=__webpack_require__(0),_moment2=_interopRequireDefault(_moment),_success=__webpack_require__(412),_success2=_interopRequireDefault(_success),_fail=__webpack_require__(413),_fail2=_interopRequireDefault(_fail),_loading=__webpack_require__(414),_loading2=_interopRequireDefault(_loading),Congratulate=function(_React$Component){function Congratulate(props){_classCallCheck(this,Congratulate);var _this=_possibleConstructorReturn(this,(Congratulate.__proto__||Object.getPrototypeOf(Congratulate)).call(this,props));return _this.state={loading:!0,fail:!1,newsletter:null,testingPassed:!1,timeStart:(0,_moment2.default)(),minimumLoadingTimePassed:!1},_this.tick=_this.tick.bind(_this),_this}return _inherits(Congratulate,_React$Component),_createClass(Congratulate,[{key:"componentDidMount",value:function(){this.loadNewsletter(this.props.match.params.id),this.tick()}},{key:"componentWillReceiveProps",value:function(props){this.loadNewsletter(props.match.params.id)}},{key:"tick",value:function(){(0,_moment2.default)().subtract(20,"second").isAfter(this.state.timeStart)&&this.setState({error:!0,loading:!1}),this.state.loading&&this.loadNewsletter(this.props.match.params.id),(0,_moment2.default)().subtract(6,"seconds").isAfter(this.state.timeStart)&&this.setState({minimumLoadingTimePassed:!0}),!this.state.loading&&this.state.minimumLoadingTimePassed||setTimeout(this.tick,2e3)}},{key:"loadNewsletter",value:function(id){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){return _this2.newsletterLoaded(response.data)})}},{key:"newsletterLoaded",value:function(newsletter){"standard"!==newsletter.type||"scheduled"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,minimumLoadingTimePassed:!0}):"sent"===newsletter.status||"sending"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,testingPassed:!0}):this.setState({newsletter:newsletter})}},{key:"renderContent",value:function(){return this.state.loading||!this.state.minimumLoadingTimePassed?renderLoading(!!this.state.newsletter):this.state.error?renderFail():renderSuccess(this.state.newsletter,this.state.testingPassed)}},{key:"render",value:function(){return _react2.default.createElement("div",{className:"newsletter_congratulate_page"},this.renderContent())}}]),Congratulate}(_react2.default.Component);Congratulate.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired},module.exports=Congratulate},412:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderHeader(newsletter){return"welcome"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsWelcomeEmailSuccessHeader"):"notification"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsPostNotificationSuccessHeader"):"automatic"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsWooSuccessHeader"):"scheduled"===newsletter.status?_mailpoet2.default.I18n.t("congratulationsScheduleSuccessHeader"):_mailpoet2.default.I18n.t("congratulationsSendSuccessHeader")}function Success(props){return _react2.default.createElement("div",{className:"mailpoet_congratulate_success"},_react2.default.createElement("h1",null,renderHeader(props.newsletter)),_react2.default.createElement("img",{src:props.illustrationImageUrl,alt:"",width:"750",height:"250"}),_react2.default.createElement("button",{className:"button",onClick:props.successClicked},_mailpoet2.default.I18n.t("close")))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet);Success.propTypes={successClicked:_propTypes2.default.func.isRequired,illustrationImageUrl:_propTypes2.default.string.isRequired,newsletter:_propTypes2.default.shape({status:_propTypes2.default.string.isRequired,type:_propTypes2.default.string.isRequired}).isRequired},module.exports=Success},413:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Fail(props){return _react2.default.createElement("div",{className:"mailpoet_centered"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("congratulationsSendFailHeader")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("congratulationsSendFailExplain"),/\[link\](.*?)\[\/link\]/g,function(match,i){return _react2.default.createElement("a",{key:i,target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/231-sending-does-not-work"},match)})),_react2.default.createElement("button",{className:"button",onClick:props.failClicked},_mailpoet2.default.I18n.t("close")))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_reactStringReplace=__webpack_require__(22),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet);Fail.propTypes={failClicked:_propTypes2.default.func.isRequired},module.exports=Fail},414:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderRichData(showRichData,illustrationImageUrl){return showRichData?_react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"mailpoet_newsletter_loading_header"},_mailpoet2.default.I18n.t("congratulationsLoadingHeader")),_react2.default.createElement("img",{src:illustrationImageUrl,alt:"",width:"800px",height:"266px"})):_react2.default.createElement("div",null)}function Loading(props){return _react2.default.createElement("div",{className:"mailpoet_newsletter_loading"},_react2.default.createElement(_loading2.default,null),renderRichData(props.showRichLoadingScreen,props.illustrationImageUrl))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_loading=__webpack_require__(415),_loading2=_interopRequireDefault(_loading);Loading.propTypes={illustrationImageUrl:_propTypes2.default.string.isRequired,showRichLoadingScreen:_propTypes2.default.bool.isRequired},module.exports=Loading},415:function(module,exports,__webpack_require__){"use strict";function Loading(){return _react2.default.createElement("div",{className:"mailpoet_loading"},_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_1"}),_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_2"}),_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_3"}))}var _react=__webpack_require__(1),_react2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_react);module.exports=Loading},416:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(21),_breadcrumb2=_interopRequireDefault(_breadcrumb),_reactRouterDom=__webpack_require__(7),NewsletterStandard=function(_React$Component){function NewsletterStandard(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterStandard);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterStandard.__proto__||Object.getPrototypeOf(NewsletterStandard)).call.apply(_ref,[this].concat(args))),_this.showTemplateSelection=function(newsletterId){_this.props.history.push("/template/"+newsletterId)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterStandard,_React$Component),_createClass(NewsletterStandard,[{key:"componentDidMount",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:"standard"}}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("regularNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}))}}]),NewsletterStandard}(_react2.default.Component);NewsletterStandard.propTypes={history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=(0,_reactRouterDom.withRouter)(NewsletterStandard)},417:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(21),_breadcrumb2=_interopRequireDefault(_breadcrumb),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_scheduling=__webpack_require__(293),_scheduling2=_interopRequireDefault(_scheduling),_reactRouterDom=__webpack_require__(7),field={name:"options",type:"reactComponent",component:_scheduling2.default},NewsletterNotification=function(_React$Component){function NewsletterNotification(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterNotification);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterNotification.__proto__||Object.getPrototypeOf(NewsletterNotification)).call.apply(_ref,[this].concat(args))),_this.state={options:{intervalType:"daily",timeOfDay:0,weekDay:1,monthDay:0,nthWeekDay:1}},_this.handleValueChange=function(event){var state=_this.state;state[event.target.name]=event.target.value,_this.setState(state)},_this.handleNext=function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:_underscore2.default.extend({},_this.state,{type:"notification",subject:_mailpoet2.default.I18n.t("draftPostNotificationTitle")})}).done(function(response){_this.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_this.showTemplateSelection=function(newsletterId){_this.props.history.push("/template/"+newsletterId)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterNotification,_React$Component),_createClass(NewsletterNotification,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("postNotificationNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("h3",null,_mailpoet2.default.I18n.t("selectFrequency")),_react2.default.createElement(_scheduling2.default,{item:this.state,field:field,onValueChange:this.handleValueChange}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:_mailpoet2.default.I18n.t("next")})))}}]),NewsletterNotification}(_react2.default.Component);NewsletterNotification.propTypes={history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=(0,_reactRouterDom.withRouter)(NewsletterNotification)},418:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_breadcrumb=__webpack_require__(21),_breadcrumb2=_interopRequireDefault(_breadcrumb),_scheduling=__webpack_require__(268),_scheduling2=_interopRequireDefault(_scheduling),field={name:"options",label:"Event",type:"reactComponent",component:_scheduling2.default},NewsletterWelcome=function(_React$Component){function NewsletterWelcome(props){_classCallCheck(this,NewsletterWelcome);var _this=_possibleConstructorReturn(this,(NewsletterWelcome.__proto__||Object.getPrototypeOf(NewsletterWelcome)).call(this,props)),availableSegments=window.mailpoet_segments||[],defaultSegment=1;return availableSegments=availableSegments.filter(function(segment){return"default"===segment.type}),_underscore2.default.size(availableSegments)>0&&(defaultSegment=_underscore2.default.first(availableSegments).id),_this.state={options:{event:"segment",segment:defaultSegment,role:"subscriber",afterTimeNumber:1,afterTimeType:"immediate"}},_this.handleValueChange=_this.handleValueChange.bind(_this),_this.handleNext=_this.handleNext.bind(_this),_this}return _inherits(NewsletterWelcome,_React$Component),_createClass(NewsletterWelcome,[{key:"handleValueChange",value:function(event){var state=this.state;state[event.target.name]=event.target.value,this.setState(state)}},{key:"handleNext",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:_underscore2.default.extend({},this.state,{type:"welcome",subject:_mailpoet2.default.I18n.t("draftNewsletterTitle")})}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"showTemplateSelection",value:function(newsletterId){this.props.history.push("/template/"+newsletterId)}},{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("h3",null,_mailpoet2.default.I18n.t("selectEventToSendWelcomeEmail")),_react2.default.createElement(_scheduling2.default,{item:this.state,field:field,onValueChange:this.handleValueChange}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:_mailpoet2.default.I18n.t("next")})))}}]),NewsletterWelcome}(_react2.default.Component);NewsletterWelcome.propTypes={history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},exports.default=NewsletterWelcome},419:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(32),_createReactClass2=_interopRequireDefault(_createReactClass),_classnames=__webpack_require__(8),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_confirm_alert=__webpack_require__(292),_confirm_alert2=_interopRequireDefault(_confirm_alert),_listing=__webpack_require__(23),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(172),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(174),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(173),mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status")},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:_mailpoet2.default.I18n.t("sentOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],confirmEdit=function(newsletter){var redirectToEditing=function(){window.location.href="?page=mailpoet-newsletter-editor&id="+newsletter.id};newsletter.queue&&"sending"===newsletter.status&&null===newsletter.queue.status?(0,_confirm_alert2.default)({message:_mailpoet2.default.I18n.t("confirmEdit"),onConfirm:redirectToEditing}):redirectToEditing()},newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"edit",label:_mailpoet2.default.I18n.t("edit"),onClick:confirmEdit},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_standard_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_standard_actions",newsletterActions);var NewsletterListStandard=(0,_createReactClass2.default)({displayName:"NewsletterListStandard",propTypes:{location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},mixins:[_mixins.QueueMixin,_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"javascript:;",onClick:function(){return confirmEdit(newsletter)}},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("sentOn")},_react2.default.createElement("abbr",null,newsletter.sent_at?_mailpoet2.default.Date.format(newsletter.sent_at):_mailpoet2.default.I18n.t("notSentYet"))))},render:function(){var _this=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"standard"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"standard",base_url:"standard",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});module.exports=NewsletterListStandard},420:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(32),_createReactClass2=_interopRequireDefault(_createReactClass),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(23),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(172),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(174),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(173),_classnames=__webpack_require__(8),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),mailpoetRoles=window.mailpoet_roles||{},mailpoetSegments=window.mailpoet_segments||{},mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),width:145},{name:"settings",label:_mailpoet2.default.I18n.t("settings")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"edit",link:function(newsletter){return _react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},_mailpoet2.default.I18n.t("edit"))}},{name:"trash"}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_welcome_notification_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_welcome_notification_actions",newsletterActions);var NewsletterListWelcome=(0,_createReactClass2.default)({displayName:"NewsletterListWelcome",propTypes:{location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},mixins:[_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],updateStatus:function(e){var _this=this;e.persist(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("welcomeEmailActivated")),_this.forceUpdate()}).fail(function(response){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("welcomeEmailActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){var totalSentMessage=_mailpoet2.default.I18n.t("sentToXSubscribers").replace("%$1d",newsletter.total_sent.toLocaleString()),totalScheduledMessage=_mailpoet2.default.I18n.t("scheduledToXSubscribers").replace("%$1d",newsletter.total_scheduled.toLocaleString());return _react2.default.createElement("div",null,_react2.default.createElement("p",null,_react2.default.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},_react2.default.createElement("option",{value:"active"},_mailpoet2.default.I18n.t("active")),_react2.default.createElement("option",{value:"draft"},_mailpoet2.default.I18n.t("inactive")))),_react2.default.createElement("p",null,totalSentMessage," ",_react2.default.createElement("br",null),totalScheduledMessage))},renderSettings:function(newsletter){var sendingEvent=void 0,sendingDelay=void 0,segment=void 0;switch(newsletter.options.event){case"user":sendingEvent="mailpoet_all"===newsletter.options.role?_mailpoet2.default.I18n.t("welcomeEventWPUserAnyRole"):_mailpoet2.default.I18n.t("welcomeEventWPUserWithRole").replace("%$1s",mailpoetRoles[newsletter.options.role]);break;default:if(void 0===(segment=_underscore2.default.find(mailpoetSegments,function(seg){return Number(seg.id)===Number(newsletter.options.segment)})))return _react2.default.createElement("span",{className:"mailpoet_error"},_mailpoet2.default.I18n.t("sendingToSegmentsNotSpecified"));sendingEvent=_mailpoet2.default.I18n.t("welcomeEventSegment").replace("%$1s",segment.name)}if(sendingEvent&&"immediate"!==newsletter.options.afterTimeType){switch(newsletter.options.afterTimeType){case"hours":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayHours").replace("%$1d",newsletter.options.afterTimeNumber);break;case"days":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayDays").replace("%$1d",newsletter.options.afterTimeNumber);break;case"weeks":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayWeeks").replace("%$1d",newsletter.options.afterTimeNumber);break;default:sendingDelay=_mailpoet2.default.I18n.t("sendingDelayInvalid")}sendingEvent+=" ["+sendingDelay+"]."}return _react2.default.createElement("span",null,sendingEvent)},renderItem:function(newsletter,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderStatus(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("settings")},this.renderSettings(newsletter)),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,newsletter.total_sent>0&&newsletter.statistics)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"welcome"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"welcome",base_url:"welcome",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});module.exports=NewsletterListWelcome},421:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(32),_createReactClass2=_interopRequireDefault(_createReactClass),_reactRouterDom=__webpack_require__(7),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(23),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(172),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(174),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(173),_classnames=__webpack_require__(8),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_common=__webpack_require__(269),messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),width:100},{name:"settings",label:_mailpoet2.default.I18n.t("settings")},{name:"history",label:_mailpoet2.default.I18n.t("history"),width:100},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"edit",link:function(newsletter){return _react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},_mailpoet2.default.I18n.t("edit"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],NewsletterListNotification=(0,_createReactClass2.default)({displayName:"NewsletterListNotification",propTypes:{location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},mixins:[_mixins.MailerMixin,_mixins.CronMixin],updateStatus:function(e){var _this=this;e.persist(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("postNotificationActivated")),_this.forceUpdate()}).fail(function(response){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("postNotificationActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){return _react2.default.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},_react2.default.createElement("option",{value:"active"},_mailpoet2.default.I18n.t("active")),_react2.default.createElement("option",{value:"draft"},_mailpoet2.default.I18n.t("inactive")))},renderSettings:function(newsletter){var sendingFrequency=void 0,segments=newsletter.segments.map(function(segment){return segment.name}),sendingToSegments=_mailpoet2.default.I18n.t("ifNewContentToSegments").replace("%$1s",segments.join(", "));if(0===segments.length)return _react2.default.createElement("span",{className:"mailpoet_error"},_mailpoet2.default.I18n.t("sendingToSegmentsNotSpecified"));switch(newsletter.options.intervalType){case"daily":sendingFrequency=_mailpoet2.default.I18n.t("sendDaily").replace("%$1s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"weekly":sendingFrequency=_mailpoet2.default.I18n.t("sendWeekly").replace("%$1s",_common.weekDayValues[newsletter.options.weekDay]).replace("%$2s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"monthly":sendingFrequency=_mailpoet2.default.I18n.t("sendMonthly").replace("%$1s",_common.monthDayValues[newsletter.options.monthDay]).replace("%$2s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"nthWeekDay":sendingFrequency=_mailpoet2.default.I18n.t("sendNthWeekDay").replace("%$1s",_common.nthWeekDayValues[newsletter.options.nthWeekDay]).replace("%$2s",_common.weekDayValues[newsletter.options.weekDay]).replace("%$3s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"immediately":sendingFrequency=_mailpoet2.default.I18n.t("sendImmediately");break;default:sendingFrequency="Invalid sending frequency"}return _react2.default.createElement("span",null,sendingFrequency," ",sendingToSegments)},renderHistoryLink:function(newsletter){return 0===Number(newsletter.children_count)?_mailpoet2.default.I18n.t("notSentYet"):_react2.default.createElement(_reactRouterDom.Link,{"data-automation-id":"history-"+newsletter.id,to:"/notification/history/"+newsletter.id},_mailpoet2.default.I18n.t("viewHistory"))},renderItem:function(newsletter,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderStatus(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("settings")},this.renderSettings(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("history")},this.renderHistoryLink(newsletter)),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"notification"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"notification",base_url:"notification",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});module.exports=NewsletterListNotification},422:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(32),_createReactClass2=_interopRequireDefault(_createReactClass),_reactRouterDom=__webpack_require__(7),_classnames=__webpack_require__(8),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(13),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(23),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(172),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(174),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(173),mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject")},{name:"status",label:_mailpoet2.default.I18n.t("status")},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:_mailpoet2.default.I18n.t("sentOn")}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_notification_history_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_notification_history_actions",newsletterActions);var NewsletterListNotificationHistory=(0,_createReactClass2.default)({displayName:"NewsletterListNotificationHistory",propTypes:{location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},mixins:[_mixins.QueueMixin,_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("sentOn")},newsletter.sent_at?_mailpoet2.default.Date.format(newsletter.sent_at):_mailpoet2.default.I18n.t("notSentYet")))},render:function(){var _this=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"notification"}),_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/notification"},_mailpoet2.default.I18n.t("backToPostNotifications")),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"notification_history",base_url:"notification/history/:parent_id",onRenderItem:this.renderItem,columns:columns,item_actions:newsletterActions,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});module.exports=NewsletterListNotificationHistory},423:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(11),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(7),_list=__webpack_require__(424),_list2=_interopRequireDefault(_list),_form=__webpack_require__(425),_form2=_interopRequireDefault(_form),container=document.getElementById("segments_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{path:"/new",component:_form2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/edit/:id",component:_form2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"*",component:_list2.default}))),container)},424:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(7),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_classnames=__webpack_require__(8),_classnames2=_interopRequireDefault(_classnames),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(23),_listing2=_interopRequireDefault(_listing),columns=[{name:"name",label:_mailpoet2.default.I18n.t("name"),sortable:!0},{name:"description",label:_mailpoet2.default.I18n.t("description")},{name:"subscribed",label:_mailpoet2.default.I18n.t("subscribed")},{name:"unconfirmed",label:_mailpoet2.default.I18n.t("unconfirmed")},{name:"unsubscribed",label:_mailpoet2.default.I18n.t("unsubscribed")},{name:"bounced",label:_mailpoet2.default.I18n.t("bounced")},{name:"created_at",label:_mailpoet2.default.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentTrashed"):_mailpoet2.default.I18n.t("multipleSegmentsTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentDeleted"):_mailpoet2.default.I18n.t("multipleSegmentsDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentRestored"):_mailpoet2.default.I18n.t("multipleSegmentsRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",link:function(item){return _react2.default.createElement(_reactRouterDom.Link,{to:"/edit/"+item.id},_mailpoet2.default.I18n.t("edit"))},display:function(segment){return"wp_users"!==segment.type}},{name:"duplicate_segment",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(item,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"duplicate",data:{id:item.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("listDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"!==segment.type}},{name:"read_more",link:function(){return _react2.default.createElement("a",{href:"http://docs.mailpoet.com/article/133-the-wordpress-users-list",target:"_blank",rel:"noopener noreferrer"},_mailpoet2.default.I18n.t("readMore"))},display:function(segment){return"wp_users"===segment.type}},{name:"synchronize_segment",label:_mailpoet2.default.I18n.t("forceSync"),onClick:function(item,refresh){_mailpoet2.default.Modal.loading(!0),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"synchronize"}).done(function(){_mailpoet2.default.Modal.loading(!1),_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("listSynchronized").replace("%$1s",item.name)),refresh()}).fail(function(response){_mailpoet2.default.Modal.loading(!1),response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"===segment.type}},{name:"view_subscribers",link:function(item){return _react2.default.createElement("a",{href:item.subscribers_url},_mailpoet2.default.I18n.t("viewSubscribers"))}},{name:"trash",display:function(segment){return"wp_users"!==segment.type}}],SegmentList=function(_React$Component){function SegmentList(){var _ref,_temp,_this,_ret;_classCallCheck(this,SegmentList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=SegmentList.__proto__||Object.getPrototypeOf(SegmentList)).call.apply(_ref,[this].concat(args))),_this.renderItem=function(segment,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),subscribed=Number(segment.subscribers_count.subscribed||0),unconfirmed=Number(segment.subscribers_count.unconfirmed||0),unsubscribed=Number(segment.subscribers_count.unsubscribed||0),bounced=Number(segment.subscribers_count.bounced||0),segmentName=void 0;return segmentName="wp_users"===segment.type?_react2.default.createElement("span",{className:"row-title"},segment.name):_react2.default.createElement(_reactRouterDom.Link,{className:"row-title",to:"/edit/"+segment.id},segment.name),_react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,segmentName),actions),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("description")},_react2.default.createElement("abbr",null,segment.description)),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("subscribed")},_react2.default.createElement("abbr",null,subscribed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("unconfirmed")},_react2.default.createElement("abbr",null,unconfirmed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("unsubscribed")},_react2.default.createElement("abbr",null,unsubscribed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("bounced")},_react2.default.createElement("abbr",null,bounced.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("createdOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(segment.created_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(SegmentList,_React$Component),_createClass(SegmentList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/new"},_mailpoet2.default.I18n.t("new"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:messages,search:!1,endpoint:"segments",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,sort_by:"name",sort_order:"asc"}))}}]),SegmentList}(_react2.default.Component);SegmentList.propTypes={location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},module.exports=SegmentList},425:function(module,exports,__webpack_require__){"use strict";(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(426)}).call(exports,__webpack_require__(6))},426:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(7),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_form=__webpack_require__(187),_form2=_interopRequireDefault(_form),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),fields=[{name:"name",label:_mailpoet2.default.I18n.t("name"),type:"text"},{name:"description",label:_mailpoet2.default.I18n.t("description"),type:"textarea",tip:_mailpoet2.default.I18n.t("segmentDescriptionTip")}],messages={onUpdate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("segmentUpdated"))},onCreate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("segmentAdded")),_mailpoet2.default.trackEvent("Lists > Add new",{"MailPoet Free version":window.mailpoet_version})}},SegmentForm=function(props){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("segment"),_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/"},_mailpoet2.default.I18n.t("backToList"))),_react2.default.createElement(_form2.default,{endpoint:"segments",fields:fields,params:props.match.params,messages:messages}))};SegmentForm.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired},exports.default=SegmentForm},427:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(11),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(7),_list=__webpack_require__(428),_list2=_interopRequireDefault(_list),container=document.getElementById("forms_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Route,{path:"*",component:_list2.default})),container)},428:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_classnames=__webpack_require__(8),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(23),_listing2=_interopRequireDefault(_listing),columns=[{name:"name",label:_mailpoet2.default.I18n.t("formName"),sortable:!0},{name:"segments",label:_mailpoet2.default.I18n.t("segments")},{name:"signups",label:_mailpoet2.default.I18n.t("signups")},{name:"created_at",label:_mailpoet2.default.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormTrashed"):_mailpoet2.default.I18n.t("multipleFormsTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormDeleted"):_mailpoet2.default.I18n.t("multipleFormsDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormRestored"):_mailpoet2.default.I18n.t("multipleFormsRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:_mailpoet2.default.I18n.t("edit"),link:function(item){return _react2.default.createElement("a",{href:"admin.php?page=mailpoet-form-editor&id="+item.id},_mailpoet2.default.I18n.t("edit"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(item,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"duplicate",data:{id:item.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("formDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],FormList=function(_React$Component){function FormList(){var _ref,_temp,_this,_ret;_classCallCheck(this,FormList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=FormList.__proto__||Object.getPrototypeOf(FormList)).call.apply(_ref,[this].concat(args))),_this.createForm=function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"create"}).done(function(response){window.location=window.mailpoet_form_edit_url+response.data.id}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_this.renderItem=function(form,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=window.mailpoet_segments.filter(function(segment){return-1!==_jquery2.default.inArray(segment.id,form.segments)}).map(function(segment){return segment.name}).join(", ");return"user"===form.settings.segments_selected_by&&(segments=_mailpoet2.default.I18n.t("userChoice")+" "+segments),_react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-form-editor&id="+form.id},form.name)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("segments")},segments),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("signups")},form.signups),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("createdOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(form.created_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(FormList,_React$Component),_createClass(FormList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement("a",{className:"page-title-action",href:"javascript:;",onClick:this.createForm,"data-automation-id":"create_new_form"},_mailpoet2.default.I18n.t("new"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:messages,search:!1,endpoint:"forms",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions}))}}]),FormList}(_react2.default.Component);FormList.propTypes={location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},module.exports=FormList},429:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(18),__webpack_require__(5),__webpack_require__(2)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,jQuery,mp){var MailPoet=mp;0!==jQuery("#mailpoet_settings").length&&(MailPoet.Router=new(Backbone.Router.extend({routes:{"":"defaultRoute","mta(/:group)":"sendingMethodGroup","(:tab)":"tabs"},defaultRoute:function(){this.tabs("basics")},sendingMethodGroup:function(group){this.tabs("mta"),jQuery("#mailpoet_sending_method_setup, .mailpoet_sending_method").hide(),jQuery(".mailpoet_settings_submit").hide(),null===group?jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").fadeIn():(jQuery("#mailpoet_mta_spf")["mailpoet"===group?"hide":"show"](),jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").hide(),jQuery('.mailpoet_sending_method[data-group="'+group+'"]').show(),jQuery("#mailpoet_sending_method_setup").fadeIn())},tabs:function(tab){jQuery(".nav-tab-wrapper a").removeClass("nav-tab-active"),jQuery(".mailpoet_tab_panel, .mailpoet_section").hide(),jQuery('a.nav-tab[href="#'+tab+'"]').addClass("nav-tab-active").blur(),jQuery('.mailpoet_tab_panel[data-tab="'+tab+'"]').length>0&&jQuery('.mailpoet_tab_panel[data-tab="'+tab+'"]').show(),jQuery(".mailpoet_settings_submit").show(),MailPoet.trackEvent("User has clicked a tab in Settings",{"MailPoet Free version":window.mailpoet_version,"Tab ID":tab})}})),jQuery(document).ready(function(){Backbone.History.started||Backbone.history.start()}))}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},431:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(11),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(7),_knowledge_base=__webpack_require__(432),_knowledge_base2=_interopRequireDefault(_knowledge_base),_system_info=__webpack_require__(433),_system_info2=_interopRequireDefault(_system_info),_system_status=__webpack_require__(434),_system_status2=_interopRequireDefault(_system_status),_your_privacy=__webpack_require__(440),_your_privacy2=_interopRequireDefault(_your_privacy),container=document.getElementById("help_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{exact:!0,path:"/",render:function(){return _react2.default.createElement(_reactRouterDom.Redirect,{to:"/knowledgeBase"})}}),_react2.default.createElement(_reactRouterDom.Route,{path:"/knowledgeBase",component:_knowledge_base2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/systemStatus",component:_system_status2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/systemInfo",component:_system_info2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/yourPrivacy",component:_your_privacy2.default}))),container)},432:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function KnowledgeBase(){return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"knowledgeBase"}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("knowledgeBaseIntro")),_react2.default.createElement("ul",null,_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/116-common-problems"},"Common Problems")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/165-newsletters"},"Newsletters")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/156-migration-questions"},"Migration Questions")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/149-sending-methods"},"Sending Methods")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/139-subscription-forms"},"Subscription Forms")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/114-getting-started"},"Getting Started")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/123-newsletter-designer"},"Newsletter Designer")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/121-subscribers-and-lists"},"Subscribers and Lists"))),_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/",className:"button button-primary"},_mailpoet2.default.I18n.t("knowledgeBaseButton")))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_tabs=__webpack_require__(188),_tabs2=_interopRequireDefault(_tabs);module.exports=KnowledgeBase},433:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function handleFocus(event){event.target.select()}function printData(data){if(_underscore2.default.isObject(data)){var printableData=Object.keys(data).map(function(key){return key+": "+data[key]});return _react2.default.createElement("textarea",{readOnly:!0,onFocus:handleFocus,value:printableData.join("\n"),style:{width:"100%",height:"400px"}})}return _react2.default.createElement("p",null,_mailpoet2.default.I18n.t("systemInfoDataError"))}function SystemInfo(){var systemInfoData=window.systemInfoData;return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"systemInfo"}),_react2.default.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("systemInfoIntro"))),printData(systemInfoData))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_tabs=__webpack_require__(188),_tabs2=_interopRequireDefault(_tabs);module.exports=SystemInfo},434:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderStatusMessage(status,error,link){var noticeType=status?"success":"error",noticeMessage=status?_mailpoet2.default.I18n.t("systemStatusConnectionSuccessful"):_mailpoet2.default.I18n.t("systemStatusConnectionUnsuccessful")+" "+error;return link&&(noticeMessage=(0,_reactStringReplace2.default)(noticeMessage,/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{href:""+link,key:"kb-link"},match)})),_react2.default.createElement("div",{className:"mailpoet_notice notice inline notice-"+noticeType,style:{marginTop:"1em"}},_react2.default.createElement("p",null,noticeMessage))}function renderCronSection(data){var status=data.cron.isReachable,url=data.cron.url;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusCronTitle")),_react2.default.createElement("p",null,_react2.default.createElement("a",{href:url,target:"_blank"},url)),renderStatusMessage(status,_mailpoet2.default.I18n.t("systemStatusCronConnectionUnsuccessfulInfo"),"//beta.docs.mailpoet.com/article/231-sending-does-not-work"))}function renderMSSSection(data){if(data.mss.enabled){var status=data.mss.enabled.isReachable;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusMSSTitle")),renderStatusMessage(status,_mailpoet2.default.I18n.t("systemStatusMSSConnectionUnsuccessfulInfo"),!1))}}function SystemStatus(){var systemStatusData=window.systemStatusData;return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"systemStatus"}),_react2.default.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},_react2.default.createElement("p",null,systemStatusData.mss.enabled?_mailpoet2.default.I18n.t("systemStatusIntroCronMSS"):_mailpoet2.default.I18n.t("systemStatusIntroCron"))),renderCronSection(systemStatusData),renderMSSSection(systemStatusData),_react2.default.createElement(_cron_status2.default,{status_data:systemStatusData.cronStatus}),_react2.default.createElement(_queue_status2.default,{status_data:systemStatusData.queueStatus}))}var _mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactStringReplace=__webpack_require__(22),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),_cron_status=__webpack_require__(435),_cron_status2=_interopRequireDefault(_cron_status),_queue_status=__webpack_require__(437),_queue_status2=_interopRequireDefault(_queue_status),_tabs=__webpack_require__(188),_tabs2=_interopRequireDefault(_tabs);module.exports=SystemStatus},435:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_key_value_table=__webpack_require__(295),_key_value_table2=_interopRequireDefault(_key_value_table),_print_boolean=__webpack_require__(436),_print_boolean2=_interopRequireDefault(_print_boolean),CronStatus=function(props){var status=props.status_data,activeStatusMapping={active:_mailpoet2.default.I18n.t("running"),inactive:_mailpoet2.default.I18n.t("cronWaiting")};return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusCronStatusTitle")),_react2.default.createElement(_key_value_table2.default,{max_width:"400px",rows:[{key:_mailpoet2.default.I18n.t("accessible"),value:_react2.default.createElement(_print_boolean2.default,null,status.accessible)},{key:_mailpoet2.default.I18n.t("status"),value:activeStatusMapping[status.status]?activeStatusMapping[status.status]:_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastUpdated"),value:status.updated_at?_mailpoet2.default.Date.full(1e3*status.updated_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastRunStarted"),value:status.run_accessed_at?_mailpoet2.default.Date.full(1e3*status.run_started_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastRunCompleted"),value:status.run_completed_at?_mailpoet2.default.Date.full(1e3*status.run_completed_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastSeenError"),value:status.last_error||_mailpoet2.default.I18n.t("none")}]}))};CronStatus.propTypes={status_data:_propTypes2.default.shape({accessible:_propTypes2.default.bool,status:_propTypes2.default.string,updated_at:_propTypes2.default.number,run_accessed_at:_propTypes2.default.number,run_completed_at:_propTypes2.default.number}).isRequired},CronStatus.defaultProps={status_data:{accessible:null,status:null,updated_at:null,run_accessed_at:null,run_completed_at:null}},module.exports=CronStatus},436:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),PrintBoolean=function(props){return _react2.default.createElement("span",null,!0===props.children&&props.truthy||!1===props.children&&props.falsy||props.unknown)};PrintBoolean.propTypes={truthy:_propTypes2.default.string,falsy:_propTypes2.default.string,unknown:_propTypes2.default.string,children:_propTypes2.default.bool},PrintBoolean.defaultProps={truthy:_mailpoet2.default.I18n.t("yes"),falsy:_mailpoet2.default.I18n.t("no"),unknown:_mailpoet2.default.I18n.t("unknown"),children:null},module.exports=PrintBoolean},437:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_key_value_table=__webpack_require__(295),_key_value_table2=_interopRequireDefault(_key_value_table),_tasks_list=__webpack_require__(438),_tasks_list2=_interopRequireDefault(_tasks_list),_tasks_list_data_row=__webpack_require__(296),_tasks_list_data_row2=_interopRequireDefault(_tasks_list_data_row),QueueStatus=function(props){var status=props.status_data;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusQueueTitle")),_react2.default.createElement(_key_value_table2.default,{max_width:"400px",rows:[{key:_mailpoet2.default.I18n.t("status"),value:"paused"===status.status?_mailpoet2.default.I18n.t("paused"):_mailpoet2.default.I18n.t("running")},{key:_mailpoet2.default.I18n.t("startedAt"),value:status.started?_mailpoet2.default.Date.full(1e3*status.started):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("sentEmails"),value:status.sent||0},{key:_mailpoet2.default.I18n.t("retryAttempt"),value:status.retry_attempt||_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("retryAt"),value:status.retry_at?_mailpoet2.default.Date.full(1e3*status.retry_at):_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("error"),value:status.error?status.error.error_message:_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("totalCompletedTasks"),value:status.tasksStatusCounts.completed},{key:_mailpoet2.default.I18n.t("totalRunningTasks"),value:status.tasksStatusCounts.running},{key:_mailpoet2.default.I18n.t("totalPausedTasks"),value:status.tasksStatusCounts.paused},{key:_mailpoet2.default.I18n.t("totalScheduledTasks"),value:status.tasksStatusCounts.scheduled}]}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("scheduledTasks")),_react2.default.createElement(_tasks_list2.default,{show_scheduled_at:!0,tasks:status.latestTasks.filter(function(task){return"scheduled"===task.status})}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("runningTasks")),_react2.default.createElement(_tasks_list2.default,{tasks:status.latestTasks.filter(function(task){return null===task.status})}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("completedTasks")),_react2.default.createElement(_tasks_list2.default,{tasks:status.latestTasks.filter(function(task){return"completed"===task.status})}))};QueueStatus.propTypes={status_data:_propTypes2.default.shape({status:_propTypes2.default.string,started:_propTypes2.default.number,sent:_propTypes2.default.number,retry_attempt:_propTypes2.default.number,retry_at:_propTypes2.default.number,error:_propTypes2.default.shape({operation:_propTypes2.default.string,error_message:_propTypes2.default.string}),tasksStatusCounts:_propTypes2.default.shape({completed:_propTypes2.default.number.isRequired,running:_propTypes2.default.number.isRequired,paused:_propTypes2.default.number.isRequired,scheduled:_propTypes2.default.number.isRequired}).isRequired,latestTasks:_propTypes2.default.arrayOf(_tasks_list_data_row2.default.propTypes.task).isRequired}).isRequired},QueueStatus.defaultProps={status_data:{status:null,started:null,sent:null,retry_attempt:null,retry_at:null,error:null}},module.exports=QueueStatus},438:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_tasks_list_data_row=__webpack_require__(296),_tasks_list_data_row2=_interopRequireDefault(_tasks_list_data_row),_tasks_list_labels_row=__webpack_require__(439),_tasks_list_labels_row2=_interopRequireDefault(_tasks_list_labels_row),TasksList=function(props){var colsCount=props.show_scheduled_at?6:5;return _react2.default.createElement("table",{className:"widefat fixed striped"},_react2.default.createElement("thead",null,_react2.default.createElement(_tasks_list_labels_row2.default,{show_scheduled_at:props.show_scheduled_at})),_react2.default.createElement("tbody",null,props.tasks.length?props.tasks.map(function(task){return _react2.default.createElement(_tasks_list_data_row2.default,{key:task.id,task:task,show_scheduled_at:props.show_scheduled_at})}):_react2.default.createElement("tr",{className:"no-items"},_react2.default.createElement("td",{colSpan:colsCount},_mailpoet2.default.I18n.t("nothingToShow")))),_react2.default.createElement("tfoot",null,_react2.default.createElement(_tasks_list_labels_row2.default,{show_scheduled_at:props.show_scheduled_at})))};TasksList.propTypes={show_scheduled_at:_propTypes2.default.bool,tasks:_propTypes2.default.arrayOf(_tasks_list_data_row2.default.propTypes.task).isRequired},TasksList.defaultProps={show_scheduled_at:!1},module.exports=TasksList},439:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),TasksListLabelsRow=function(props){return _react2.default.createElement("tr",null,_react2.default.createElement("th",{className:"row-title"},"Id"),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("type")),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("email")),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("priority")),props.show_scheduled_at?_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("scheduledAt")):null,_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("updatedAt")))};TasksListLabelsRow.propTypes={show_scheduled_at:_propTypes2.default.bool},TasksListLabelsRow.defaultProps={show_scheduled_at:!1},module.exports=TasksListLabelsRow},440:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function YourPrivacy(){return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"yourPrivacy"}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent1")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent2")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent3")),_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://www.mailpoet.com/privacy-notice/",className:"button button-primary"},_mailpoet2.default.I18n.t("yourPrivacyButton")))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_tabs=__webpack_require__(188),_tabs2=_interopRequireDefault(_tabs);module.exports=YourPrivacy},441:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Intro(){if(!(introActive||innerWidth<=960)){var intro=(0,_intro2.default)();intro.setOptions({steps:introSteps,nextLabel:_mailpoet2.default.I18n.t("introNext")+" →",prevLabel:"← "+_mailpoet2.default.I18n.t("introBack"),skipLabel:_mailpoet2.default.I18n.t("introSkip"),doneLabel:_mailpoet2.default.I18n.t("introDone"),positionPrecedence:["right","left","bottom","top"],buttonClass:"button",hidePrev:!0,hideNext:!0,helperElementPadding:12,scrollToElement:!1,showStepNumbers:!1,tooltipPosition:"auto"}),intro.onbeforechange(function(){var step=intro._currentStep,element=introSteps[step].element;intro._introItems[step].element="string"==typeof element?document.querySelector(element):element}),intro.onafterchange(function(targetElement){if("fixed"===getComputedStyle(targetElement).getPropertyValue("position")){var helperLayer=document.querySelector(".introjs-helperLayer"),referenceLayer=document.querySelector(".introjs-tooltipReferenceLayer");referenceLayer.style.top=parseInt(referenceLayer.style.top,10)-pageYOffset+"px",helperLayer.style.top=parseInt(helperLayer.style.top,10)-pageYOffset+"px"}}),intro.onexit(function(){introActive=!1,document.body.classList.remove("mailpoet-intro-active")}),intro.onskip(function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_intro:0}})}),intro.start(),introActive=!0,document.body.classList.add("mailpoet-intro-active")}}var _intro=__webpack_require__(442),_intro2=_interopRequireDefault(_intro),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),introSteps=[{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-segments]").parentNode,intro:_mailpoet2.default.I18n.t("introLists")},{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-forms]").parentNode,intro:_mailpoet2.default.I18n.t("introForms")},{element:"#hs-beacon:not(.hs-beacon-hidden) iframe, .olark-launch-button",intro:_mailpoet2.default.I18n.t("introChat")},{element:"#mailpoet-new-email",intro:_mailpoet2.default.I18n.t("introEmails")}],introActive=!1;_mailpoet2.default.showIntro=Intro},442:function(module,exports,__webpack_require__){!function(f){module.exports=f(),module.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),f().apply(this,arguments)}}(function(){function IntroJs(obj){this._targetElement=obj,this._introItems=[],this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",doneLabel:"Done",hidePrev:!1,hideNext:!1,tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintAnimation:!0,buttonClass:"introjs-button"}}function _introForElement(targetElm,group){var allIntroSteps=targetElm.querySelectorAll("*[data-intro]"),introItems=[];if(this._options.steps)_forEach(this._options.steps,function(step){var currentItem=_cloneObject(step);if(currentItem.step=introItems.length+1,"string"==typeof currentItem.element&&(currentItem.element=document.querySelector(currentItem.element)),void 0===currentItem.element||null===currentItem.element){var floatingElementQuery=document.querySelector(".introjsFloatingElement");null===floatingElementQuery&&(floatingElementQuery=document.createElement("div"),floatingElementQuery.className="introjsFloatingElement",document.body.appendChild(floatingElementQuery)),currentItem.element=floatingElementQuery,currentItem.position="floating"}currentItem.scrollTo=currentItem.scrollTo||this._options.scrollTo,void 0===currentItem.disableInteraction&&(currentItem.disableInteraction=this._options.disableInteraction),null!==currentItem.element&&introItems.push(currentItem)}.bind(this));else{var disableInteraction,elmsLength=allIntroSteps.length;if(elmsLength<1)return!1;_forEach(allIntroSteps,function(currentElement){if((!group||currentElement.getAttribute("data-intro-group")===group)&&"none"!==currentElement.style.display){var step=parseInt(currentElement.getAttribute("data-step"),10);disableInteraction=void 0!==currentElement.getAttribute("data-disable-interaction")?!!currentElement.getAttribute("data-disable-interaction"):this._options.disableInteraction,step>0&&(introItems[step-1]={element:currentElement,intro:currentElement.getAttribute("data-intro"),step:parseInt(currentElement.getAttribute("data-step"),10),tooltipClass:currentElement.getAttribute("data-tooltipclass"),highlightClass:currentElement.getAttribute("data-highlightclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:currentElement.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:disableInteraction})}}.bind(this));var nextStep=0;_forEach(allIntroSteps,function(currentElement){if((!group||currentElement.getAttribute("data-intro-group")===group)&&null===currentElement.getAttribute("data-step")){for(;;){if(void 0===introItems[nextStep])break;nextStep++}disableInteraction=void 0!==currentElement.getAttribute("data-disable-interaction")?!!currentElement.getAttribute("data-disable-interaction"):this._options.disableInteraction,introItems[nextStep]={element:currentElement,intro:currentElement.getAttribute("data-intro"),step:nextStep+1,tooltipClass:currentElement.getAttribute("data-tooltipclass"),highlightClass:currentElement.getAttribute("data-highlightclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:currentElement.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:disableInteraction}}}.bind(this))}for(var tempIntroItems=[],z=0;z<introItems.length;z++)introItems[z]&&tempIntroItems.push(introItems[z]);return introItems=tempIntroItems,introItems.sort(function(a,b){return a.step-b.step}),this._introItems=introItems,_addOverlayLayer.call(this,targetElm)&&(_nextStep.call(this),this._options.keyboardNavigation&&DOMEvent.on(window,"keydown",_onKeyDown,this,!0),DOMEvent.on(window,"resize",_onResize,this,!0)),!1}function _onResize(){this.refresh.call(this)}function _onKeyDown(e){var code=null===e.code?e.which:e.code;if(null===code&&(code=null===e.charCode?e.keyCode:e.charCode),"Escape"!==code&&27!==code||!0!==this._options.exitOnEsc){if("ArrowLeft"===code||37===code)_previousStep.call(this);else if("ArrowRight"===code||39===code)_nextStep.call(this);else if("Enter"===code||13===code){var target=e.target||e.srcElement;target&&target.className.match("introjs-prevbutton")?_previousStep.call(this):target&&target.className.match("introjs-skipbutton")?(this._introItems.length-1===this._currentStep&&"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),_exitIntro.call(this,this._targetElement)):target&&target.getAttribute("data-stepnumber")?target.click():_nextStep.call(this),e.preventDefault?e.preventDefault():e.returnValue=!1}}else _exitIntro.call(this,this._targetElement)}function _cloneObject(object){if(null===object||"object"!=typeof object||void 0!==object.nodeType)return object;var temp={};for(var key in object)void 0!==window.jQuery&&object[key]instanceof window.jQuery?temp[key]=object[key]:temp[key]=_cloneObject(object[key]);return temp}function _goToStep(step){this._currentStep=step-2,void 0!==this._introItems&&_nextStep.call(this)}function _goToStepNumber(step){this._currentStepNumber=step,void 0!==this._introItems&&_nextStep.call(this)}function _nextStep(){this._direction="forward",void 0!==this._currentStepNumber&&_forEach(this._introItems,function(item,i){item.step===this._currentStepNumber&&(this._currentStep=i-1,this._currentStepNumber=void 0)}.bind(this)),void 0===this._currentStep?this._currentStep=0:++this._currentStep;var nextStep=this._introItems[this._currentStep],continueStep=!0;return void 0!==this._introBeforeChangeCallback&&(continueStep=this._introBeforeChangeCallback.call(this,nextStep.element)),!1===continueStep?(--this._currentStep,!1):this._introItems.length<=this._currentStep?("function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void _exitIntro.call(this,this._targetElement)):void _showElement.call(this,nextStep)}function _previousStep(){if(this._direction="backward",0===this._currentStep)return!1;--this._currentStep;var nextStep=this._introItems[this._currentStep],continueStep=!0;if(void 0!==this._introBeforeChangeCallback&&(continueStep=this._introBeforeChangeCallback.call(this,nextStep.element)),!1===continueStep)return++this._currentStep,!1;_showElement.call(this,nextStep)}function _refresh(){if(_setHelperLayerPosition.call(this,document.querySelector(".introjs-helperLayer")),_setHelperLayerPosition.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),_setHelperLayerPosition.call(this,document.querySelector(".introjs-disableInteraction")),void 0!==this._currentStep&&null!==this._currentStep){var oldHelperNumberLayer=document.querySelector(".introjs-helperNumberLayer"),oldArrowLayer=document.querySelector(".introjs-arrow"),oldtooltipContainer=document.querySelector(".introjs-tooltip");_placeTooltip.call(this,this._introItems[this._currentStep].element,oldtooltipContainer,oldArrowLayer,oldHelperNumberLayer)}return _reAlignHints.call(this),this}function _exitIntro(targetElement,force){var continueExit=!0;if(void 0!==this._introBeforeExitCallback&&(continueExit=this._introBeforeExitCallback.call(this)),force||!1!==continueExit){var overlayLayers=targetElement.querySelectorAll(".introjs-overlay");overlayLayers&&overlayLayers.length&&_forEach(overlayLayers,function(overlayLayer){overlayLayer.style.opacity=0,window.setTimeout(function(){this.parentNode&&this.parentNode.removeChild(this)}.bind(overlayLayer),500)}.bind(this));var helperLayer=targetElement.querySelector(".introjs-helperLayer");helperLayer&&helperLayer.parentNode.removeChild(helperLayer);var referenceLayer=targetElement.querySelector(".introjs-tooltipReferenceLayer");referenceLayer&&referenceLayer.parentNode.removeChild(referenceLayer);var disableInteractionLayer=targetElement.querySelector(".introjs-disableInteraction");disableInteractionLayer&&disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);var floatingElement=document.querySelector(".introjsFloatingElement");floatingElement&&floatingElement.parentNode.removeChild(floatingElement),_removeShowElement();_forEach(document.querySelectorAll(".introjs-fixParent"),function(parent){_removeClass(parent,/introjs-fixParent/g)}),DOMEvent.off(window,"keydown",_onKeyDown,this,!0),DOMEvent.off(window,"resize",_onResize,this,!0),void 0!==this._introExitCallback&&this._introExitCallback.call(this),this._currentStep=void 0}}function _placeTooltip(targetElement,tooltipLayer,arrowLayer,helperNumberLayer,hintMode){var currentStepObj,tooltipOffset,targetOffset,windowSize,currentTooltipPosition,tooltipCssClass="";if(hintMode=hintMode||!1,tooltipLayer.style.top=null,tooltipLayer.style.right=null,tooltipLayer.style.bottom=null,tooltipLayer.style.left=null,tooltipLayer.style.marginLeft=null,tooltipLayer.style.marginTop=null,arrowLayer.style.display="inherit",void 0!==helperNumberLayer&&null!==helperNumberLayer&&(helperNumberLayer.style.top=null,helperNumberLayer.style.left=null),this._introItems[this._currentStep]){currentStepObj=this._introItems[this._currentStep],tooltipCssClass="string"==typeof currentStepObj.tooltipClass?currentStepObj.tooltipClass:this._options.tooltipClass,tooltipLayer.className=("introjs-tooltip "+tooltipCssClass).replace(/^\s+|\s+$/g,""),tooltipLayer.setAttribute("role","dialog"),currentTooltipPosition=this._introItems[this._currentStep].position,"floating"!==currentTooltipPosition&&(currentTooltipPosition=_determineAutoPosition.call(this,targetElement,tooltipLayer,currentTooltipPosition));var tooltipLayerStyleLeft;switch(targetOffset=_getOffset(targetElement),tooltipOffset=_getOffset(tooltipLayer),windowSize=_getWinSize(),_addClass(tooltipLayer,"introjs-"+currentTooltipPosition),currentTooltipPosition){case"top-right-aligned":arrowLayer.className="introjs-arrow bottom-right";var tooltipLayerStyleRight=0;_checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"top-middle-aligned":arrowLayer.className="introjs-arrow bottom-middle";var tooltipLayerStyleLeftRight=targetOffset.width/2-tooltipOffset.width/2;hintMode&&(tooltipLayerStyleLeftRight+=5),_checkLeft(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,tooltipLayer)&&(tooltipLayer.style.right=null,_checkRight(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,windowSize,tooltipLayer)),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"top-left-aligned":case"top":arrowLayer.className="introjs-arrow bottom",tooltipLayerStyleLeft=hintMode?0:15,_checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"right":tooltipLayer.style.left=targetOffset.width+20+"px",targetOffset.top+tooltipOffset.height>windowSize.height?(arrowLayer.className="introjs-arrow left-bottom",tooltipLayer.style.top="-"+(tooltipOffset.height-targetOffset.height-20)+"px"):arrowLayer.className="introjs-arrow left";break;case"left":hintMode||!0!==this._options.showStepNumbers||(tooltipLayer.style.top="15px"),targetOffset.top+tooltipOffset.height>windowSize.height?(tooltipLayer.style.top="-"+(tooltipOffset.height-targetOffset.height-20)+"px",arrowLayer.className="introjs-arrow right-bottom"):arrowLayer.className="introjs-arrow right",tooltipLayer.style.right=targetOffset.width+20+"px";break;case"floating":arrowLayer.style.display="none",tooltipLayer.style.left="50%",tooltipLayer.style.top="50%",tooltipLayer.style.marginLeft="-"+tooltipOffset.width/2+"px",tooltipLayer.style.marginTop="-"+tooltipOffset.height/2+"px",void 0!==helperNumberLayer&&null!==helperNumberLayer&&(helperNumberLayer.style.left="-"+(tooltipOffset.width/2+18)+"px",helperNumberLayer.style.top="-"+(tooltipOffset.height/2+18)+"px");break;case"bottom-right-aligned":arrowLayer.className="introjs-arrow top-right",tooltipLayerStyleRight=0,_checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer),tooltipLayer.style.top=targetOffset.height+20+"px";break;case"bottom-middle-aligned":arrowLayer.className="introjs-arrow top-middle",tooltipLayerStyleLeftRight=targetOffset.width/2-tooltipOffset.width/2,hintMode&&(tooltipLayerStyleLeftRight+=5),_checkLeft(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,tooltipLayer)&&(tooltipLayer.style.right=null,_checkRight(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,windowSize,tooltipLayer)),tooltipLayer.style.top=targetOffset.height+20+"px";break;default:arrowLayer.className="introjs-arrow top",tooltipLayerStyleLeft=0,_checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer),tooltipLayer.style.top=targetOffset.height+20+"px"}}}function _checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer){return targetOffset.left+tooltipLayerStyleLeft+tooltipOffset.width>windowSize.width?(tooltipLayer.style.left=windowSize.width-tooltipOffset.width-targetOffset.left+"px",!1):(tooltipLayer.style.left=tooltipLayerStyleLeft+"px",!0)}function _checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer){return targetOffset.left+targetOffset.width-tooltipLayerStyleRight-tooltipOffset.width<0?(tooltipLayer.style.left=-targetOffset.left+"px",!1):(tooltipLayer.style.right=tooltipLayerStyleRight+"px",!0)}function _determineAutoPosition(targetElement,tooltipLayer,desiredTooltipPosition){var possiblePositions=this._options.positionPrecedence.slice(),windowSize=_getWinSize(),tooltipHeight=_getOffset(tooltipLayer).height+10,tooltipWidth=_getOffset(tooltipLayer).width+20,targetElementRect=targetElement.getBoundingClientRect(),calculatedPosition="floating";targetElementRect.bottom+tooltipHeight+tooltipHeight>windowSize.height&&_removeEntry(possiblePositions,"bottom"),targetElementRect.top-tooltipHeight<0&&_removeEntry(possiblePositions,"top"),targetElementRect.right+tooltipWidth>windowSize.width&&_removeEntry(possiblePositions,"right"),targetElementRect.left-tooltipWidth<0&&_removeEntry(possiblePositions,"left");var desiredAlignment=function(pos){var hyphenIndex=pos.indexOf("-");return-1!==hyphenIndex?pos.substr(hyphenIndex):""}(desiredTooltipPosition||"");return desiredTooltipPosition&&(desiredTooltipPosition=desiredTooltipPosition.split("-")[0]),possiblePositions.length&&(calculatedPosition="auto"!==desiredTooltipPosition&&possiblePositions.indexOf(desiredTooltipPosition)>-1?desiredTooltipPosition:possiblePositions[0]),-1!==["top","bottom"].indexOf(calculatedPosition)&&(calculatedPosition+=_determineAutoAlignment(targetElementRect.left,tooltipWidth,windowSize,desiredAlignment)),calculatedPosition}function _determineAutoAlignment(offsetLeft,tooltipWidth,windowSize,desiredAlignment){var halfTooltipWidth=tooltipWidth/2,winWidth=Math.min(windowSize.width,window.screen.width),possibleAlignments=["-left-aligned","-middle-aligned","-right-aligned"];return winWidth-offsetLeft<tooltipWidth&&_removeEntry(possibleAlignments,"-left-aligned"),(offsetLeft<halfTooltipWidth||winWidth-offsetLeft<halfTooltipWidth)&&_removeEntry(possibleAlignments,"-middle-aligned"),offsetLeft<tooltipWidth&&_removeEntry(possibleAlignments,"-right-aligned"),possibleAlignments.length?-1!==possibleAlignments.indexOf(desiredAlignment)?desiredAlignment:possibleAlignments[0]:"-middle-aligned"}function _removeEntry(stringArray,stringToRemove){stringArray.indexOf(stringToRemove)>-1&&stringArray.splice(stringArray.indexOf(stringToRemove),1)}function _setHelperLayerPosition(helperLayer){if(helperLayer){if(!this._introItems[this._currentStep])return;var currentElement=this._introItems[this._currentStep],elementPosition=_getOffset(currentElement.element),widthHeightPadding=this._options.helperElementPadding;_isFixed(currentElement.element)?_addClass(helperLayer,"introjs-fixedTooltip"):_removeClass(helperLayer,"introjs-fixedTooltip"),"floating"===currentElement.position&&(widthHeightPadding=0),helperLayer.style.cssText="width: "+(elementPosition.width+widthHeightPadding)+"px; height:"+(elementPosition.height+widthHeightPadding)+"px; top:"+(elementPosition.top-widthHeightPadding/2)+"px;left: "+(elementPosition.left-widthHeightPadding/2)+"px;"}}function _disableInteraction(){var disableInteractionLayer=document.querySelector(".introjs-disableInteraction");null===disableInteractionLayer&&(disableInteractionLayer=document.createElement("div"),disableInteractionLayer.className="introjs-disableInteraction",this._targetElement.appendChild(disableInteractionLayer)),_setHelperLayerPosition.call(this,disableInteractionLayer)}function _setAnchorAsButton(anchor){anchor.setAttribute("role","button"),anchor.tabIndex=0}function _showElement(targetElement){void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,targetElement.element);var nextTooltipButton,prevTooltipButton,skipTooltipButton,scrollParent,self=this,oldHelperLayer=document.querySelector(".introjs-helperLayer"),oldReferenceLayer=document.querySelector(".introjs-tooltipReferenceLayer"),highlightClass="introjs-helperLayer";if("string"==typeof targetElement.highlightClass&&(highlightClass+=" "+targetElement.highlightClass),"string"==typeof this._options.highlightClass&&(highlightClass+=" "+this._options.highlightClass),null!==oldHelperLayer){var oldHelperNumberLayer=oldReferenceLayer.querySelector(".introjs-helperNumberLayer"),oldtooltipLayer=oldReferenceLayer.querySelector(".introjs-tooltiptext"),oldArrowLayer=oldReferenceLayer.querySelector(".introjs-arrow"),oldtooltipContainer=oldReferenceLayer.querySelector(".introjs-tooltip");if(skipTooltipButton=oldReferenceLayer.querySelector(".introjs-skipbutton"),prevTooltipButton=oldReferenceLayer.querySelector(".introjs-prevbutton"),nextTooltipButton=oldReferenceLayer.querySelector(".introjs-nextbutton"),oldHelperLayer.className=highlightClass,oldtooltipContainer.style.opacity=0,oldtooltipContainer.style.display="none",null!==oldHelperNumberLayer){var lastIntroItem=this._introItems[targetElement.step-2>=0?targetElement.step-2:0];(null!==lastIntroItem&&"forward"===this._direction&&"floating"===lastIntroItem.position||"backward"===this._direction&&"floating"===targetElement.position)&&(oldHelperNumberLayer.style.opacity=0)}scrollParent=_getScrollParent(targetElement.element),scrollParent!==document.body&&_scrollParentToElement(scrollParent,targetElement.element),_setHelperLayerPosition.call(self,oldHelperLayer),_setHelperLayerPosition.call(self,oldReferenceLayer);_forEach(document.querySelectorAll(".introjs-fixParent"),function(parent){_removeClass(parent,/introjs-fixParent/g)}),_removeShowElement(),self._lastShowElementTimer&&window.clearTimeout(self._lastShowElementTimer),self._lastShowElementTimer=window.setTimeout(function(){null!==oldHelperNumberLayer&&(oldHelperNumberLayer.innerHTML=targetElement.step),oldtooltipLayer.innerHTML=targetElement.intro,oldtooltipContainer.style.display="block",_placeTooltip.call(self,targetElement.element,oldtooltipContainer,oldArrowLayer,oldHelperNumberLayer),self._options.showBullets&&(oldReferenceLayer.querySelector(".introjs-bullets li > a.active").className="",oldReferenceLayer.querySelector('.introjs-bullets li > a[data-stepnumber="'+targetElement.step+'"]').className="active"),oldReferenceLayer.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+_getProgress.call(self)+"%;",oldReferenceLayer.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",_getProgress.call(self)),oldtooltipContainer.style.opacity=1,oldHelperNumberLayer&&(oldHelperNumberLayer.style.opacity=1),void 0!==skipTooltipButton&&null!==skipTooltipButton&&/introjs-donebutton/gi.test(skipTooltipButton.className)?skipTooltipButton.focus():void 0!==nextTooltipButton&&null!==nextTooltipButton&&nextTooltipButton.focus(),_scrollTo.call(self,targetElement.scrollTo,targetElement,oldtooltipLayer)},350)}else{var helperLayer=document.createElement("div"),referenceLayer=document.createElement("div"),arrowLayer=document.createElement("div"),tooltipLayer=document.createElement("div"),tooltipTextLayer=document.createElement("div"),bulletsLayer=document.createElement("div"),progressLayer=document.createElement("div"),buttonsLayer=document.createElement("div");helperLayer.className=highlightClass,referenceLayer.className="introjs-tooltipReferenceLayer",scrollParent=_getScrollParent(targetElement.element),scrollParent!==document.body&&_scrollParentToElement(scrollParent,targetElement.element),_setHelperLayerPosition.call(self,helperLayer),_setHelperLayerPosition.call(self,referenceLayer),this._targetElement.appendChild(helperLayer),this._targetElement.appendChild(referenceLayer),arrowLayer.className="introjs-arrow",tooltipTextLayer.className="introjs-tooltiptext",tooltipTextLayer.innerHTML=targetElement.intro,bulletsLayer.className="introjs-bullets",!1===this._options.showBullets&&(bulletsLayer.style.display="none");var ulContainer=document.createElement("ul");ulContainer.setAttribute("role","tablist");var anchorClick=function(){self.goToStep(this.getAttribute("data-stepnumber"))};_forEach(this._introItems,function(item,i){var innerLi=document.createElement("li"),anchorLink=document.createElement("a");innerLi.setAttribute("role","presentation"),anchorLink.setAttribute("role","tab"),anchorLink.onclick=anchorClick,i===targetElement.step-1&&(anchorLink.className="active"),_setAnchorAsButton(anchorLink),anchorLink.innerHTML=" ",anchorLink.setAttribute("data-stepnumber",item.step),innerLi.appendChild(anchorLink),ulContainer.appendChild(innerLi)}),bulletsLayer.appendChild(ulContainer),progressLayer.className="introjs-progress",!1===this._options.showProgress&&(progressLayer.style.display="none");var progressBar=document.createElement("div");progressBar.className="introjs-progressbar",progressBar.setAttribute("role","progress"),progressBar.setAttribute("aria-valuemin",0),progressBar.setAttribute("aria-valuemax",100),progressBar.setAttribute("aria-valuenow",_getProgress.call(this)),progressBar.style.cssText="width:"+_getProgress.call(this)+"%;",progressLayer.appendChild(progressBar),buttonsLayer.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(buttonsLayer.style.display="none"),tooltipLayer.className="introjs-tooltip",tooltipLayer.appendChild(tooltipTextLayer),tooltipLayer.appendChild(bulletsLayer),tooltipLayer.appendChild(progressLayer);var helperNumberLayer=document.createElement("span");!0===this._options.showStepNumbers&&(helperNumberLayer.className="introjs-helperNumberLayer",helperNumberLayer.innerHTML=targetElement.step,referenceLayer.appendChild(helperNumberLayer)),tooltipLayer.appendChild(arrowLayer),referenceLayer.appendChild(tooltipLayer),nextTooltipButton=document.createElement("a"),nextTooltipButton.onclick=function(){self._introItems.length-1!==self._currentStep&&_nextStep.call(self)},_setAnchorAsButton(nextTooltipButton),nextTooltipButton.innerHTML=this._options.nextLabel,prevTooltipButton=document.createElement("a"),prevTooltipButton.onclick=function(){0!==self._currentStep&&_previousStep.call(self)},_setAnchorAsButton(prevTooltipButton),prevTooltipButton.innerHTML=this._options.prevLabel,skipTooltipButton=document.createElement("a"),skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton ",_setAnchorAsButton(skipTooltipButton),skipTooltipButton.innerHTML=this._options.skipLabel,skipTooltipButton.onclick=function(){self._introItems.length-1===self._currentStep&&"function"==typeof self._introCompleteCallback&&self._introCompleteCallback.call(self),self._introItems.length-1!==self._currentStep&&"function"==typeof self._introExitCallback&&self._introExitCallback.call(self),self._introSkipCallback.call(self),_exitIntro.call(self,self._targetElement)},buttonsLayer.appendChild(skipTooltipButton),this._introItems.length>1&&(buttonsLayer.appendChild(prevTooltipButton),buttonsLayer.appendChild(nextTooltipButton)),tooltipLayer.appendChild(buttonsLayer),_placeTooltip.call(self,targetElement.element,tooltipLayer,arrowLayer,helperNumberLayer),_scrollTo.call(this,targetElement.scrollTo,targetElement,tooltipLayer)}var disableInteractionLayer=self._targetElement.querySelector(".introjs-disableInteraction");disableInteractionLayer&&disableInteractionLayer.parentNode.removeChild(disableInteractionLayer),targetElement.disableInteraction&&_disableInteraction.call(self),0===this._currentStep&&this._introItems.length>1?(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton"),!0===this._options.hidePrev?(void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton introjs-hidden"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&_addClass(nextTooltipButton,"introjs-fullbutton")):void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton introjs-disabled"),void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.skipLabel)):this._introItems.length-1===this._currentStep||1===this._introItems.length?(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.doneLabel,_addClass(skipTooltipButton,"introjs-donebutton")),void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton"),!0===this._options.hideNext?(void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton introjs-hidden"),void 0!==prevTooltipButton&&null!==prevTooltipButton&&_addClass(prevTooltipButton,"introjs-fullbutton")):void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton introjs-disabled")):(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton"),void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton"),void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.skipLabel)),prevTooltipButton.setAttribute("role","button"),nextTooltipButton.setAttribute("role","button"),skipTooltipButton.setAttribute("role","button"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&nextTooltipButton.focus(),_setShowElement(targetElement),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,targetElement.element)}function _scrollTo(scrollTo,targetElement,tooltipLayer){if("off"!==scrollTo){var rect;if(this._options.scrollToElement&&(rect="tooltip"===scrollTo?tooltipLayer.getBoundingClientRect():targetElement.element.getBoundingClientRect(),!_elementInViewport(targetElement.element))){var winHeight=_getWinSize().height;rect.bottom-(rect.bottom-rect.top)<0||targetElement.element.clientHeight>winHeight?window.scrollBy(0,rect.top-(winHeight/2-rect.height/2)-this._options.scrollPadding):window.scrollBy(0,rect.top-(winHeight/2-rect.height/2)+this._options.scrollPadding)}}}function _removeShowElement(){_forEach(document.querySelectorAll(".introjs-showElement"),function(elm){_removeClass(elm,/introjs-[a-zA-Z]+/g)})}function _setShowElement(targetElement){var parentElm;if(targetElement.element instanceof SVGElement)for(parentElm=targetElement.element.parentNode;null!==targetElement.element.parentNode&&parentElm.tagName&&"body"!==parentElm.tagName.toLowerCase();)"svg"===parentElm.tagName.toLowerCase()&&_addClass(parentElm,"introjs-showElement introjs-relativePosition"),parentElm=parentElm.parentNode;_addClass(targetElement.element,"introjs-showElement");var currentElementPosition=_getPropValue(targetElement.element,"position");for("absolute"!==currentElementPosition&&"relative"!==currentElementPosition&&"fixed"!==currentElementPosition&&_addClass(targetElement.element,"introjs-relativePosition"),parentElm=targetElement.element.parentNode;null!==parentElm&&parentElm.tagName&&"body"!==parentElm.tagName.toLowerCase();){var zIndex=_getPropValue(parentElm,"z-index"),opacity=parseFloat(_getPropValue(parentElm,"opacity")),transform=_getPropValue(parentElm,"transform")||_getPropValue(parentElm,"-webkit-transform")||_getPropValue(parentElm,"-moz-transform")||_getPropValue(parentElm,"-ms-transform")||_getPropValue(parentElm,"-o-transform");(/[0-9]+/.test(zIndex)||opacity<1||"none"!==transform&&void 0!==transform)&&_addClass(parentElm,"introjs-fixParent"),parentElm=parentElm.parentNode}}function _forEach(arr,forEachFnc,completeFnc){if(arr)for(var i=0,len=arr.length;i<len;i++)forEachFnc(arr[i],i);"function"==typeof completeFnc&&completeFnc()}function _addClass(element,className){if(element instanceof SVGElement){var pre=element.getAttribute("class")||"";element.setAttribute("class",pre+" "+className)}else if(void 0!==element.classList){var classes=className.split(" ");_forEach(classes,function(cls){element.classList.add(cls)})}else element.className.match(className)||(element.className+=" "+className)}function _removeClass(element,classNameRegex){if(element instanceof SVGElement){var pre=element.getAttribute("class")||"";element.setAttribute("class",pre.replace(classNameRegex,"").replace(/^\s+|\s+$/g,""))}else element.className=element.className.replace(classNameRegex,"").replace(/^\s+|\s+$/g,"")}function _getPropValue(element,propName){var propValue="";return element.currentStyle?propValue=element.currentStyle[propName]:document.defaultView&&document.defaultView.getComputedStyle&&(propValue=document.defaultView.getComputedStyle(element,null).getPropertyValue(propName)),propValue&&propValue.toLowerCase?propValue.toLowerCase():propValue}function _isFixed(element){var p=element.parentNode;return!(!p||"HTML"===p.nodeName)&&("fixed"===_getPropValue(element,"position")||_isFixed(p))}function _getWinSize(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var D=document.documentElement;return{width:D.clientWidth,height:D.clientHeight}}function _elementInViewport(el){var rect=el.getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom+80<=window.innerHeight&&rect.right<=window.innerWidth}function _addOverlayLayer(targetElm){var overlayLayer=document.createElement("div"),styleText="",self=this;if(overlayLayer.className="introjs-overlay",targetElm.tagName&&"body"!==targetElm.tagName.toLowerCase()){var elementPosition=_getOffset(targetElm);elementPosition&&(styleText+="width: "+elementPosition.width+"px; height:"+elementPosition.height+"px; top:"+elementPosition.top+"px;left: "+elementPosition.left+"px;",overlayLayer.style.cssText=styleText)}else styleText+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",overlayLayer.style.cssText=styleText;return targetElm.appendChild(overlayLayer),overlayLayer.onclick=function(){!0===self._options.exitOnOverlayClick&&_exitIntro.call(self,targetElm)},window.setTimeout(function(){styleText+="opacity: "+self._options.overlayOpacity.toString()+";",overlayLayer.style.cssText=styleText},10),!0}function _removeHintTooltip(){var tooltip=document.querySelector(".introjs-hintReference");if(tooltip){var step=tooltip.getAttribute("data-step");return tooltip.parentNode.removeChild(tooltip),step}}function _populateHints(targetElm){if(this._introItems=[],this._options.hints)_forEach(this._options.hints,function(hint){var currentItem=_cloneObject(hint);"string"==typeof currentItem.element&&(currentItem.element=document.querySelector(currentItem.element)),currentItem.hintPosition=currentItem.hintPosition||this._options.hintPosition,currentItem.hintAnimation=currentItem.hintAnimation||this._options.hintAnimation,null!==currentItem.element&&this._introItems.push(currentItem)}.bind(this));else{var hints=targetElm.querySelectorAll("*[data-hint]");if(!hints||!hints.length)return!1;_forEach(hints,function(currentElement){var hintAnimation=currentElement.getAttribute("data-hintanimation");hintAnimation=hintAnimation?"true"===hintAnimation:this._options.hintAnimation,this._introItems.push({element:currentElement,hint:currentElement.getAttribute("data-hint"),hintPosition:currentElement.getAttribute("data-hintposition")||this._options.hintPosition,hintAnimation:hintAnimation,tooltipClass:currentElement.getAttribute("data-tooltipclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition})}.bind(this))}_addHints.call(this),DOMEvent.on(document,"click",_removeHintTooltip,this,!1),DOMEvent.on(window,"resize",_reAlignHints,this,!0)}function _reAlignHints(){_forEach(this._introItems,function(item){void 0!==item.targetElement&&_alignHintPosition.call(this,item.hintPosition,item.element,item.targetElement)}.bind(this))}function _hintQuerySelectorAll(selector){var hintsWrapper=document.querySelector(".introjs-hints");return hintsWrapper?hintsWrapper.querySelectorAll(selector):[]}function _hideHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];_removeHintTooltip.call(this),hint&&_addClass(hint,"introjs-hidehint"),void 0!==this._hintCloseCallback&&this._hintCloseCallback.call(this,stepId)}function _hideHints(){_forEach(_hintQuerySelectorAll(".introjs-hint"),function(hint){_hideHint.call(this,hint.getAttribute("data-step"))}.bind(this))}function _showHints(){var hints=_hintQuerySelectorAll(".introjs-hint");hints&&hints.length?_forEach(hints,function(hint){_showHint.call(this,hint.getAttribute("data-step"))}.bind(this)):_populateHints.call(this,this._targetElement)}function _showHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];hint&&_removeClass(hint,/introjs-hidehint/g)}function _removeHints(){_forEach(_hintQuerySelectorAll(".introjs-hint"),function(hint){_removeHint.call(this,hint.getAttribute("data-step"))}.bind(this))}function _removeHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];hint&&hint.parentNode.removeChild(hint)}function _addHints(){var self=this,hintsWrapper=document.querySelector(".introjs-hints");null===hintsWrapper&&(hintsWrapper=document.createElement("div"),hintsWrapper.className="introjs-hints");var getHintClick=function(i){return function(e){var evt=e||window.event;evt.stopPropagation&&evt.stopPropagation(),null!==evt.cancelBubble&&(evt.cancelBubble=!0),_showHintDialog.call(self,i)}};_forEach(this._introItems,function(item,i){if(!document.querySelector('.introjs-hint[data-step="'+i+'"]')){var hint=document.createElement("a");_setAnchorAsButton(hint),hint.onclick=getHintClick(i),hint.className="introjs-hint",item.hintAnimation||_addClass(hint,"introjs-hint-no-anim"),_isFixed(item.element)&&_addClass(hint,"introjs-fixedhint");var hintDot=document.createElement("div");hintDot.className="introjs-hint-dot";var hintPulse=document.createElement("div");hintPulse.className="introjs-hint-pulse",hint.appendChild(hintDot),hint.appendChild(hintPulse),hint.setAttribute("data-step",i),item.targetElement=item.element,item.element=hint,_alignHintPosition.call(this,item.hintPosition,hint,item.targetElement),hintsWrapper.appendChild(hint)}}.bind(this)),document.body.appendChild(hintsWrapper),void 0!==this._hintsAddedCallback&&this._hintsAddedCallback.call(this)}function _alignHintPosition(position,hint,element){var offset=_getOffset.call(this,element);switch(position){default:case"top-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+"px";break;case"top-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+"px";break;case"bottom-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"bottom-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"middle-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"middle-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"middle-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"bottom-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"top-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+"px"}}function _showHintDialog(stepId){var hintElement=document.querySelector('.introjs-hint[data-step="'+stepId+'"]'),item=this._introItems[stepId];void 0!==this._hintClickCallback&&this._hintClickCallback.call(this,hintElement,item,stepId);var removedStep=_removeHintTooltip.call(this);if(parseInt(removedStep,10)!==stepId){var tooltipLayer=document.createElement("div"),tooltipTextLayer=document.createElement("div"),arrowLayer=document.createElement("div"),referenceLayer=document.createElement("div");tooltipLayer.className="introjs-tooltip",tooltipLayer.onclick=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},tooltipTextLayer.className="introjs-tooltiptext";var tooltipWrapper=document.createElement("p");tooltipWrapper.innerHTML=item.hint;var closeButton=document.createElement("a");closeButton.className=this._options.buttonClass,closeButton.setAttribute("role","button"),closeButton.innerHTML=this._options.hintButtonLabel,closeButton.onclick=_hideHint.bind(this,stepId),tooltipTextLayer.appendChild(tooltipWrapper),tooltipTextLayer.appendChild(closeButton),arrowLayer.className="introjs-arrow",tooltipLayer.appendChild(arrowLayer),tooltipLayer.appendChild(tooltipTextLayer),this._currentStep=hintElement.getAttribute("data-step"),referenceLayer.className="introjs-tooltipReferenceLayer introjs-hintReference",referenceLayer.setAttribute("data-step",hintElement.getAttribute("data-step")),_setHelperLayerPosition.call(this,referenceLayer),referenceLayer.appendChild(tooltipLayer),document.body.appendChild(referenceLayer),_placeTooltip.call(this,hintElement,tooltipLayer,arrowLayer,null,!0)}}function _getOffset(element){var body=document.body,docEl=document.documentElement,scrollTop=window.pageYOffset||docEl.scrollTop||body.scrollTop,scrollLeft=window.pageXOffset||docEl.scrollLeft||body.scrollLeft,x=element.getBoundingClientRect();return{top:x.top+scrollTop,width:x.width,height:x.height,left:x.left+scrollLeft}}function _getScrollParent(element){var style=window.getComputedStyle(element),excludeStaticParent="absolute"===style.position,overflowRegex=/(auto|scroll)/;if("fixed"===style.position)return document.body;for(var parent=element;parent=parent.parentElement;)if(style=window.getComputedStyle(parent),(!excludeStaticParent||"static"!==style.position)&&overflowRegex.test(style.overflow+style.overflowY+style.overflowX))return parent;return document.body}function _scrollParentToElement(parent,element){parent.scrollTop=element.offsetTop-parent.offsetTop}function _getProgress(){return parseInt(this._currentStep+1,10)/this._introItems.length*100}function _mergeOptions(obj1,obj2){var attrname,obj3={};for(attrname in obj1)obj3[attrname]=obj1[attrname];for(attrname in obj2)obj3[attrname]=obj2[attrname];return obj3}var _stamp=function(){var keys={};return function(obj,key){return key=key||"introjs-stamp",keys[key]=keys[key]||0,void 0===obj[key]&&(obj[key]=keys[key]++),obj[key]}}(),DOMEvent=function(){function DOMEvent(){var events_key="introjs_event";this._id=function(obj,type,listener,context){return type+_stamp(listener)+(context?"_"+_stamp(context):"")},this.on=function(obj,type,listener,context,useCapture){var id=this._id.apply(this,arguments),handler=function(e){return listener.call(context||obj,e||window.event)};"addEventListener"in obj?obj.addEventListener(type,handler,useCapture):"attachEvent"in obj&&obj.attachEvent("on"+type,handler),obj[events_key]=obj[events_key]||{},obj[events_key][id]=handler},this.off=function(obj,type,listener,context,useCapture){var id=this._id.apply(this,arguments),handler=obj[events_key]&&obj[events_key][id];"removeEventListener"in obj?obj.removeEventListener(type,handler,useCapture):"detachEvent"in obj&&obj.detachEvent("on"+type,handler),obj[events_key][id]=null}}return new DOMEvent}(),introJs=function(targetElm){var instance;if("object"==typeof targetElm)instance=new IntroJs(targetElm);else if("string"==typeof targetElm){var targetElement=document.querySelector(targetElm);if(!targetElement)throw new Error("There is no element with given selector.");instance=new IntroJs(targetElement)}else instance=new IntroJs(document.body);return introJs.instances[_stamp(instance,"introjs-instance")]=instance,instance};return introJs.version="2.9.0",introJs.instances={},introJs.fn=IntroJs.prototype={clone:function(){return new IntroJs(this)},setOption:function(option,value){return this._options[option]=value,this},setOptions:function(options){return this._options=_mergeOptions(this._options,options),this},start:function(group){return _introForElement.call(this,this._targetElement,group),this},goToStep:function(step){return _goToStep.call(this,step),this},addStep:function(options){return this._options.steps||(this._options.steps=[]),this._options.steps.push(options),this},addSteps:function(steps){if(steps.length){for(var index=0;index<steps.length;index++)this.addStep(steps[index]);return this}},goToStepNumber:function(step){return _goToStepNumber.call(this,step),this},nextStep:function(){return _nextStep.call(this),this},previousStep:function(){return _previousStep.call(this),this},exit:function(force){return _exitIntro.call(this,this._targetElement,force),this},refresh:function(){return _refresh.call(this),this},onbeforechange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=providedCallback,this},onchange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=providedCallback,this},onafterchange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=providedCallback,this},oncomplete:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=providedCallback,this},onhintsadded:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=providedCallback,this},onhintclick:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=providedCallback,this},onhintclose:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=providedCallback,this},onexit:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=providedCallback,this},onskip:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=providedCallback,this},onbeforeexit:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=providedCallback,this},addHints:function(){return _populateHints.call(this,this._targetElement),this},hideHint:function(stepId){return _hideHint.call(this,stepId),this},hideHints:function(){return _hideHints.call(this),this},showHint:function(stepId){return _showHint.call(this,stepId),this},showHints:function(){return _showHints.call(this),this},removeHints:function(){return _removeHints.call(this),this},removeHint:function(stepId){return _removeHint.call(this,stepId),this},showHintDialog:function(stepId){return _showHintDialog.call(this,stepId),this}},introJs})},443:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(2)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(MailPoet){function eventHandler(){return confirm(MailPoet.I18n.t("reinstallConfirmation"))&&(MailPoet.trackEvent("User has reinstalled MailPoet via Settings",{"MailPoet Free version":window.mailpoet_version}),MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"setup",action:"reset"}).always(function(){MailPoet.Modal.loading(!1)}).done(function(){window.location="admin.php?page=mailpoet-newsletters"}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})),!1}var element;(element=document.getElementById("mailpoet_reinstall"))&&element.addEventListener("click",eventHandler,!1)}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},444:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(18),__webpack_require__(4),__webpack_require__(5),__webpack_require__(2),__webpack_require__(175),__webpack_require__(445),__webpack_require__(446),__webpack_require__(0)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,_,jQuery,MailPoet,Handlebars,Papa,AsyncQueue,Moment){jQuery("#mailpoet_subscribers_import").length&&jQuery(document).ready(function(){function showCurrentStep(){MailPoet.Notice.hide(),MailPoet.Modal.loading(!1),jQuery('#mailpoet_subscribers_import > div[id^="step"]').hide(),jQuery(location.hash).show()}var router;jQuery('input[name="select_method"]').attr("checked",!1),router=new(Backbone.Router.extend({routes:{"":"home",step1:"step1",step2:"step2",step3:"step3"},home:function(){this.navigate("step1",{trigger:!0})}})),router.on("route:step1",function(){function toggleNextStepButton(element,condition){if("on"===condition)return void element.closest("table a").removeClass("button-disabled");element.closest("table a").addClass("button-disabled")}function parseCSV(isFile){var processedSubscribers=[],parsedEmails=[],duplicateEmails=[],invalidEmails=[],emailColumnPosition=null,columnCount=null,isHeaderFound=!1,detectAndCleanupEmail=function(emailString){var test,email=jQuery("<div />").html(emailString).text();return email=email.toLowerCase().replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g,"").replace(/\s+|%\d+|,+/g,""),test=/<(.*?)>/.exec(email),test&&(email=test[1].trim()),test=/mailto:(?:\s+)?(.*)/.exec(email),test&&(email=test[1].trim()),!!window.mailpoet_email_regex.test(email)&&email};return{skipEmptyLines:!0,delimiter:"",newline:"",comments:!1,error:function(){MailPoet.Notice.hide(),MailPoet.Notice.error(MailPoet.I18n.t("dataProcessingError"))},complete:function(CSV){var email,emailAddress,rowData,rowColumnCount,errorNotice;Object.keys(CSV.data).forEach(function(rowCount){rowData=CSV.data[rowCount].map(function(el){return el.trim()}),rowColumnCount=rowData.length,null===columnCount&&(columnCount=rowColumnCount),rowColumnCount===columnCount&&(null===emailColumnPosition?(Object.keys(rowData).forEach(function(column){emailAddress=detectAndCleanupEmail(rowData[column]),null===emailColumnPosition&&window.mailpoet_email_regex.test(emailAddress)&&(emailColumnPosition=column,parsedEmails[emailAddress]=!0,rowData[column]=emailAddress,processedSubscribers[emailAddress]=rowData)}),null===emailColumnPosition&&0===parseInt(rowCount,10)&&(isHeaderFound=!0,processedSubscribers[0]=rowData)):""!==rowData[emailColumnPosition]&&(email=detectAndCleanupEmail(rowData[emailColumnPosition]),_.has(parsedEmails,email)?duplicateEmails.push(email):window.mailpoet_email_regex.test(email)?(parsedEmails[email]=!0,rowData[emailColumnPosition]=email,processedSubscribers[email]=rowData):invalidEmails.push(rowData[emailColumnPosition])))}),processedSubscribers=_.values(processedSubscribers),processedSubscribers&&(isHeaderFound&&processedSubscribers.length>=2||!isHeaderFound&&processedSubscribers.length>=1)?(window.importData.step1={header:window.mailpoet_email_regex.test(processedSubscribers[0][emailColumnPosition])?null:processedSubscribers.shift(),subscribers:processedSubscribers,subscribersCount:processedSubscribers.length,duplicate:duplicateEmails,invalid:invalidEmails},MailPoet.trackEvent("Subscribers import started",{source:isFile?"file upload":"pasted data","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})):(MailPoet.Modal.loading(!1),errorNotice=MailPoet.I18n.t("noValidRecords"),errorNotice=errorNotice.replace("[link]",MailPoet.I18n.t("csvKBLink")),errorNotice=errorNotice.replace("[/link]","</a>"),MailPoet.Notice.error(errorNotice))}}}function displayMailChimpLists(data){var listSelectElement=mailChimpListsContainerElement.find("select");listSelectElement.data("select2")?(listSelectElement.select2("data",data),listSelectElement.trigger("change")):listSelectElement.select2({data:data,width:"20em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).change(function(){null!==jQuery(this).val()?toggleNextStepButton(mailChimpProcessButtonElement,"on"):toggleNextStepButton(mailChimpProcessButtonElement,"off")}).trigger("change"),mailChimpListsContainerElement.show()}var methodProcessContainerTemplate,currentStepE,methodSelectionElement,pasteInputElement,pasteInputPlaceholderElement,pasteProcessButtonElement,mailChimpKeyInputElement,mailChimpKeyVerifyButtonElement,mailChimpListsContainerElement,mailChimpProcessButtonElement,uploadElement,uploadProcessButtonElement;if(window.mailpoetColumns=jQuery.map(window.mailpoetColumns,function(column){var col=column;return col.validation_rule=!1,col}),void 0!==window.importData.step1)return void showCurrentStep();methodProcessContainerTemplate=Handlebars.compile(jQuery("#method_process_template").html()),jQuery(".mailpoet_method_process").html(methodProcessContainerTemplate()),currentStepE=jQuery(location.hash),methodSelectionElement=jQuery("#select_method"),pasteInputElement=jQuery("#paste_input"),pasteInputPlaceholderElement=pasteInputElement.data("placeholder").replace(/\\n/g,"\n"),pasteProcessButtonElement=jQuery("#method_paste > div.mailpoet_method_process").find("a.mailpoet_process"),mailChimpKeyInputElement=jQuery("#mailchimp_key"),mailChimpKeyVerifyButtonElement=jQuery("#mailchimp_key_verify"),mailChimpListsContainerElement=jQuery("#mailchimp_lists"),mailChimpProcessButtonElement=jQuery("#method_mailchimp > div.mailpoet_method_process").find("a.mailpoet_process"),uploadElement=jQuery("#file_local"),uploadProcessButtonElement=jQuery("#method_file > div.mailpoet_method_process").find("a.mailpoet_process"),methodSelectionElement.change(function(){var availableMethods=jQuery(':radio[name="select_method"]'),selectedMethod=availableMethods.index(availableMethods.filter(":checked"));MailPoet.Notice.hide(),currentStepE.find(".inside").children('div[id^="method_"]').hide(),currentStepE.find(".inside").children('div[id^="method_"]:eq('+selectedMethod+")").show().find("table").show()}),showCurrentStep(),pasteInputElement.attr("value",pasteInputPlaceholderElement).css("color","#999").focus(function(){jQuery(this).val()===pasteInputPlaceholderElement&&jQuery(this).attr("value","").css("color","#222")}).blur(function(){""===jQuery(this).val()&&jQuery(this).attr("value",pasteInputPlaceholderElement).css("color","#999")}).keyup(function(){toggleNextStepButton(pasteProcessButtonElement,""!==this.value.trim()?"on":"off")}),pasteProcessButtonElement.click(function(){var pasteSize=encodeURI(pasteInputElement.val()).split(/%..|./).length-1;if(MailPoet.Notice.hide(),pasteSize>window.maxPostSizeBytes)return void MailPoet.Notice.error(MailPoet.I18n.t("maxPostSizeNotice"));MailPoet.Modal.loading(!0),setTimeout(function(){Papa.parse(pasteInputElement.val(),parseCSV(!1))},10)}),uploadElement.change(function(){var ext=this.value.match(/[^.]+$/);MailPoet.Notice.hide(),null!==ext&&"csv"===ext[0].toLowerCase()||(this.value="",MailPoet.Notice.error(MailPoet.I18n.t("wrongFileFormat"))),toggleNextStepButton(uploadProcessButtonElement,""!==this.value.trim()?"on":"off")}),uploadProcessButtonElement.click(function(){""!==uploadElement.val().trim()&&(MailPoet.Modal.loading(!0),setTimeout(function(){uploadElement.parse({config:parseCSV(!0)})},10))}),mailChimpKeyInputElement.keyup(function(){""!==this.value.trim()&&/[a-zA-Z0-9]{32}-/.exec(this.value.trim())||(mailChimpListsContainerElement.hide(),jQuery(".mailpoet_mailchimp-key-status").html("").removeClass("mailpoet_mailchimp-ok mailpoet_mailchimp-error"),toggleNextStepButton(mailChimpProcessButtonElement,"off"))}),mailChimpKeyVerifyButtonElement.click(function(){MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpLists",data:{api_key:mailChimpKeyInputElement.val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){jQuery(".mailpoet_mailchimp-key-status").html("").removeClass().addClass("mailpoet_mailchimp-key-status mailpoet_mailchimp-ok"),0===response.data.length?(jQuery(".mailpoet_mailchimp-key-status").html(MailPoet.I18n.t("noMailChimpLists")),mailChimpListsContainerElement.hide(),toggleNextStepButton(mailChimpProcessButtonElement,"off")):displayMailChimpLists(response.data)}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),mailChimpProcessButtonElement.click(function(){mailChimpProcessButtonElement.closest("table a").hasClass("button-disabled")||(MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpSubscribers",data:{api_key:mailChimpKeyInputElement.val(),lists:mailChimpListsContainerElement.find("select").val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){window.importData.step1=response.data,MailPoet.trackEvent("Subscribers import started",{source:"MailChimp","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))})}),router.on("route:step2",function(){function toggleNextStepButton(condition){if("on"===condition)return void nextStepButton.removeClass("button-disabled");nextStepButton.addClass("button-disabled")}function enableSegmentSelection(segments){segmentSelectElement.data("select2")&&(segmentSelectElement.html("").select2("destroy"),toggleNextStepButton("off")),segmentSelectElement.select2({data:segments,width:"20em",templateResult:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"},templateSelection:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"}}).change(function(){var segmentSelectionNotice=jQuery('[data-id="notice_segmentSelection"]');this.value?(jQuery('[data-id="notice_segmentSelection"]').remove(),jQuery(".mailpoet_notice.error:visible").length||toggleNextStepButton("on")):(segmentSelectionNotice.length||MailPoet.Notice.error(MailPoet.I18n.t("segmentSelectionRequired"),{static:!0,scroll:!0,id:"notice_segmentSelection",hideClose:!0}),toggleNextStepButton("off"))})}function filterSubscribers(){var displayedColumns,subscribersClone=jQuery.extend(!0,{},subscribers),preventNextStep=!1;jQuery('[data-id="notice_invalidEmail"], [data-id="notice_invalidDate"]').remove(),displayedColumns=jQuery.map(jQuery(".mailpoet_subscribers_column_data_match"),function(element,elementIndex){var columnId=jQuery(element).data("column-id"),validationRule=jQuery(element).data("validation-rule");return jQuery(element).val(columnId).trigger("change"),{id:columnId,index:elementIndex,validationRule:validationRule,element:element}}),jQuery.map(window.mailpoetColumns,function(column){var firstRowData,validationRule,testedFormat,allowedDateFormats,matchedColumn=_.find(displayedColumns,function(data){return data.id===column.id});"email"===column.id&&(window.mailpoet_email_regex.test(subscribersClone.subscribers[0][matchedColumn.index])?MailPoet.Notice.hide("invalidEmail"):(preventNextStep=!0,jQuery('[data-id="notice_invalidEmail"]').length||MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidElement"),{static:!0,scroll:!0,hideClose:!0,id:"invalidEmail"}))),"date"===column.type&&matchedColumn&&(allowedDateFormats=[Moment.ISO_8601,"YYYY/MM/DD","MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD","YYYY/DD/MM","MM/YYYY","YYYY/MM","YYYY"],firstRowData=subscribersClone.subscribers[0][matchedColumn.index],validationRule=!1,""===firstRowData.trim()?(subscribersClone.subscribers[0][matchedColumn.index]='<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+MailPoet.I18n.t("emptyFirstRowDate")+"</span> ",preventNextStep=!0):Object.keys(allowedDateFormats).forEach(function(format){if(testedFormat=allowedDateFormats[format],Moment(firstRowData,testedFormat,!0).isValid())return validationRule="function"==typeof testedFormat?"datetime":testedFormat,void jQuery(matchedColumn.element).data("validation-rule",validationRule);"datetime"===validationRule&&(validationRule=Moment.ISO_8601)}),jQuery.map(subscribersClone.subscribers,function(dataSubscribers,index){var data=dataSubscribers,rowData=data[matchedColumn.index],date=Moment(rowData,testedFormat,!0);index!==fillerPosition&&""!==rowData.trim()&&(date.isValid()?data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match" title="'+MailPoet.I18n.t("verifyDateMatch")+'">'+MailPoet.Date.format(date)+"</span> "):(data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+new Handlebars.SafeString(MailPoet.I18n.t("dateMatchError"))+"</span> "),preventNextStep=!0))}),preventNextStep&&!jQuery(".mailpoet_invalidDate").length&&MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidDate"),{static:!0,scroll:!0,hideClose:!0,id:"invalidDate"}))}),jQuery("#subscribers_data > table > tbody").html(subscribersDataTemplatePartial(subscribersClone)),preventNextStep?toggleNextStepButton("off"):!jQuery(".mailpoet_notice.error:visible").length&&segmentSelectElement.val()&&toggleNextStepButton("on")}var nextStepButton,previousStepButton,subscribers,subscribersDataTemplate,subscribersDataTemplatePartial,subscribersDataParseResultsTemplate,segmentSelectElement,maxRowsToShow,filler,fillerArray,fillerPosition,importResults,duplicates;if(void 0===window.importData.step1)return void router.navigate("step1",{trigger:!0});nextStepButton=jQuery("#step2_process"),previousStepButton=jQuery("#return_to_step1"),subscribers=jQuery.extend(!0,{},window.importData.step1),subscribersDataTemplate=Handlebars.compile(jQuery("#subscribers_data_template").html()),subscribersDataTemplatePartial=Handlebars.compile(jQuery("#subscribers_data_template_partial").html()),subscribersDataParseResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_parse_results_template").html()),segmentSelectElement=jQuery("#mailpoet_segments_select"),maxRowsToShow=10,filler=". . .",fillerArray=Array.apply(null,new Array(subscribers.subscribers[0].length)).map(String.prototype.valueOf,filler),showCurrentStep(),jQuery("#subscribers_data_parse_results:visible").html(""),jQuery("#subscribers_data_import_results:visible").hide(),(subscribers.invalid.length||subscribers.duplicate.length)&&(duplicates={},subscribers.duplicate.forEach(function(subscriberEmail){duplicates[subscriberEmail]=(duplicates[subscriberEmail]||0)+1}),subscribers.duplicate=[],Object.keys(duplicates).forEach(function(email){duplicates[email]>1?subscribers.duplicate.push(email+" (x"+duplicates[email]+")"):subscribers.duplicate.push(email)}),importResults={notice:MailPoet.I18n.t("importNoticeSkipped").replace("%1$s","<strong>"+(subscribers.invalid.length+subscribers.duplicate.length)+"</strong>"),invalid:subscribers.invalid.length?MailPoet.I18n.t("importNoticeInvalid").replace("%1$s","<strong>"+subscribers.invalid.length.toLocaleString()+"</strong>").replace("%2$s",subscribers.invalid.join(", ")):null,duplicate:subscribers.duplicate.length?MailPoet.I18n.t("importNoticeDuplicate").replace("%1$s","<strong>"+subscribers.duplicate.length+"</strong>").replace("%2$s",subscribers.duplicate.join(", ")):null},jQuery("#subscribers_data_parse_results").html(subscribersDataParseResultsTemplate(importResults))),jQuery(".mailpoet_subscribers_data_parse_results_details_show").click(function(){var details=jQuery(".mailpoet_subscribers_data_parse_results_details");jQuery(details).toggle(),this.text=jQuery(details).is(":visible")?MailPoet.I18n.t("hideDetails"):MailPoet.I18n.t("showDetails")}),window.mailpoetSegments.length?jQuery(".mailpoet_segments").show():jQuery(".mailpoet_no_segments").show(),jQuery(".mailpoet_create_segment").click(function(){MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewList"),template:jQuery("#new_segment_template").html()}),jQuery("#new_segment_name").keypress(function(e){13===e.which&&jQuery("#new_segment_process").click()}),jQuery("#new_segment_process").click(function(){var segmentName=jQuery("#new_segment_name").val().trim(),segmentDescription=jQuery("#new_segment_description").val().trim();MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"addSegment",data:{name:segmentName,description:segmentDescription}}).done(function(response){var selectedValues;window.mailpoetSegments.push({id:response.data.id,name:response.data.name,subscriberCount:0}),selectedValues=segmentSelectElement.val(),null===selectedValues?selectedValues=[response.data.id]:selectedValues.push(response.data.id),enableSegmentSelection(window.mailpoetSegments),segmentSelectElement.val(selectedValues).trigger("change"),jQuery(".mailpoet_segments:hidden").show(),jQuery(".mailpoet_no_segments:visible").hide(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&(MailPoet.Notice.hide(),MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#new_segment_name"}))})}),jQuery("#new_segment_cancel").click(function(){MailPoet.Modal.close()})}),Handlebars.registerPartial("subscribers_data_template_partial",subscribersDataTemplatePartial),Handlebars.registerHelper("show_and_match_columns",function(helperSubscribers,options){var columnData,columnId,headerName,headerNameMatch,displayedColumns=[],displayedColumnsIds=[];return Object.keys(helperSubscribers.subscribers[0]).forEach(function(i){columnData=helperSubscribers.subscribers[0][i],columnId="ignore",columnData%1!=0&&window.mailpoet_email_regex.test(columnData)?columnId="email":helperSubscribers.header&&(headerName=helperSubscribers.header[i],headerNameMatch=window.mailpoetColumns.map(function(el){return el.name}).indexOf(headerName),-1!==headerNameMatch?columnId=window.mailpoetColumns[headerNameMatch].id:headerName&&(/first|first name|given name/i.test(headerName)?columnId="first_name":/last|last name/i.test(headerName)&&(columnId="last_name"))),columnId="ignore"!==columnId&&-1===displayedColumnsIds.indexOf(columnId)?columnId:"ignore",displayedColumns[i]={column_id:columnId},displayedColumnsIds.push(columnId)}),options.fn(displayedColumns)}),Handlebars.registerHelper("sanitize_data",function(data){return data instanceof Handlebars.SafeString?data:new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data))}),Handlebars.registerHelper("calculate_index",function(rawIndex){var index=parseInt(rawIndex,10);return index===maxRowsToShow&&subscribers.subscribersCount>maxRowsToShow+1?(fillerPosition=index,filler):index===subscribers.subscribers.length-1?subscribers.subscribersCount.toLocaleString():index+1}),subscribers.subscribersCount>maxRowsToShow+1&&subscribers.subscribers.splice(maxRowsToShow,subscribers.subscribersCount-(maxRowsToShow+1),fillerArray),jQuery("#subscribers_data > table").html(subscribersDataTemplate(subscribers)),jQuery("select.mailpoet_subscribers_column_data_match").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).on("select2:selecting",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.args.data.id;"create"===selectedOptionId?(selectEvent.preventDefault(),jQuery(selectElement).select2("close"),MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewField"),template:jQuery("#form_template_field_form").html()}),jQuery("#form_field_new").parsley().on("form:submit",function(){var data=jQuery(this.$element).mailpoetSerializeObject();return MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:data}).done(function(response){var newColumnData={id:response.data.id,name:response.data.name,type:response.data.type,params:response.data.params,custom:!0};2===window.mailpoetColumnsSelect2.length&&window.mailpoetColumnsSelect2.push({name:MailPoet.I18n.t("userColumns"),children:[]}),window.mailpoetColumnsSelect2[2].children.push(newColumnData),window.mailpoetColumns.push(newColumnData),jQuery("select.mailpoet_subscribers_column_data_match").each(function(){jQuery(this).html("").select2("destroy").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}})}),jQuery(selectElement).data("column-id",newColumnData.id),jQuery(selectElement).data("validation-rule",!1),filterSubscribers(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#field_name"})}),!1})):jQuery("select.mailpoet_subscribers_column_data_match").each(function(){var element=this,elementId=jQuery(element).val();elementId===selectedOptionId&&"ignore"!==elementId&&(confirm(MailPoet.I18n.t("selectedValueAlreadyMatched")+" "+MailPoet.I18n.t("confirmCorrespondingColumn"))?jQuery(element).data("column-id","ignore"):(selectEvent.preventDefault(),jQuery(selectElement).select2("close")))})}).on("select2:select",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.data.id;jQuery(selectElement).data("column-id",selectedOptionId),filterSubscribers()}),previousStepButton.off().on("click",function(){router.navigate("step1",{trigger:!0})}),nextStepButton.off().on("click",function(){var clickSubscribers,splitSubscribers,columns={},queue=new jQuery.AsyncQueue,batchNumber=0,timestamp=Date.now()/1e3,clickImportResults={created:0,updated:0,errors:[],segments:[]};jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),splitSubscribers=function(localSubscribers,size){return localSubscribers.reduce(function(res,item,index){return index%size==0&&res.push([]),res[res.length-1].push(item),res},[])},clickSubscribers=splitSubscribers(window.importData.step1.subscribers,2e3),_.each(jQuery("select.mailpoet_subscribers_column_data_match"),function(column,columnIndex){var columnId=jQuery(column).data("column-id"),validationRule=jQuery(column).data("validation-rule");"ignore"!==columnId&&(columns[columnId]={index:columnIndex,validation_rule:validationRule})}),_.each(clickSubscribers,function(){queue.add(function(addQueue){addQueue.pause(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processImport",data:JSON.stringify({columns:columns,subscribers:clickSubscribers[batchNumber],timestamp:timestamp,segments:segmentSelectElement.val(),updateSubscribers:"yes"===jQuery(':radio[name="subscriber_update_option"]:checked').val()})}).done(function(response){clickImportResults.created+=response.data.created,clickImportResults.updated+=response.data.updated,clickImportResults.segments=response.data.segments,clickImportResults.added_to_segment_with_welcome_notification=response.data.added_to_segment_with_welcome_notification,addQueue.run()}).fail(function(response){MailPoet.Modal.loading(!1),response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}),batchNumber+=1})}),queue.run(),queue.onComplete(function(){MailPoet.Modal.loading(!1),clickImportResults.errors.length>0&&!clickImportResults.updated&&!clickImportResults.created?MailPoet.Notice.error(_.flatten(clickImportResults.errors)):(window.mailpoetSegments=clickImportResults.segments,clickImportResults.segments=_.map(segmentSelectElement.select2("data"),function(data){return data.name}),window.importData.step2=clickImportResults,enableSegmentSelection(window.mailpoetSegments),router.navigate("step3",{trigger:!0}))}))}),filterSubscribers(),enableSegmentSelection(window.mailpoetSegments)}),router.on("route:step3",function(){var subscribersDataImportResultsTemplate,exportMenuElement,importResults;if(void 0===window.importData.step2)return void router.navigate("step2",{trigger:!0});showCurrentStep(),window.importData.step2.errors.length>0&&MailPoet.Notice.error(_.flatten(window.importData.step2.errors)),MailPoet.trackEvent("Subscribers import finished",{"Subscribers created":window.importData.step2.created,"Subscribers updated":window.importData.step2.updated,"MailPoet Free version":window.mailpoet_version}),subscribersDataImportResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_import_results_template").html()),exportMenuElement=jQuery("span.mailpoet_export"),importResults={created:!!window.importData.step2.created&&MailPoet.I18n.t("subscribersCreated").replace("%1$s","<strong>"+window.importData.step2.created.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),updated:!!window.importData.step2.updated&&MailPoet.I18n.t("subscribersUpdated").replace("%1$s","<strong>"+window.importData.step2.updated.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),no_action:!window.importData.step2.created&&!window.importData.step2.updated,added_to_segment_with_welcome_notification:window.importData.step2.added_to_segment_with_welcome_notification},jQuery("#subscribers_data_import_results").html(subscribersDataImportResultsTemplate(importResults)).show(),jQuery("a.mailpoet_import_again").off().click(function(){jQuery("#subscribers_data_import_results").hide(),router.navigate("step1",{trigger:!0})}),jQuery("a.mailpoet_view_subscribers").off().click(function(){window.location.href="admin.php?page=mailpoet-subscribers"}),importResults.created&&exportMenuElement.not(":visible")&&exportMenuElement.show(),window.importData.step2=void 0}),Backbone.History.started||Backbone.history.start()})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},445:function(module,exports){/*!
|
2 |
+
Papa Parse
|
3 |
+
v4.1.1
|
4 |
+
https://github.com/mholt/PapaParse
|
5 |
+
*/
|
6 |
+
!function(e){"use strict";function t(t,r){if(r=r||{},r.worker&&w.WORKERS_SUPPORTED){var n=h();return n.userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=m(r.step),r.chunk=m(r.chunk),r.complete=m(r.complete),r.error=m(r.error),delete r.worker,void n.postMessage({input:t,config:r,workerId:n.id})}var o=null;return"string"==typeof t?o=r.download?new i(r):new a(r):(e.File&&t instanceof File||t instanceof Object)&&(o=new s(r)),o.stream(t)}function r(e,t){function n(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function i(e,t){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(n){for(var a=0;a<e.length;a++)a>0&&(r+=u),r+=s(e[a],a);t.length>0&&(r+=f)}for(var o=0;o<t.length;o++){for(var h=n?e.length:t[o].length,d=0;h>d;d++){d>0&&(r+=u);var c=n&&i?e[d]:d;r+=s(t[o][c],d)}o<t.length-1&&(r+=f)}return r}function s(e,t){return void 0===e||null===e?"":(e=e.toString().replace(/"/g,'""'),"boolean"==typeof o&&o||o instanceof Array&&o[t]||a(e,w.BAD_DELIMITERS)||e.indexOf(u)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1)?'"'+e+'"':e)}function a(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return!0;return!1}var o=!1,u=",",f="\r\n";if(function(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==w.BAD_DELIMITERS.indexOf(t.delimiter)&&(u=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(o=t.quotes),"string"==typeof t.newline&&(f=t.newline))}(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(n(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:n(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function n(t){function r(e){var t=_(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},r.call(this,t),this.parseChunk=function(t){var r=this._partialLine+t;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=n.meta.cursor;this._finished||(this._partialLine=r.substring(i-this._baseIndex),this._baseIndex=i),n&&n.data&&(this._rowCount+=n.data.length);var s=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(k)e.postMessage({results:n,workerId:w.WORKER_ID,finished:s});else if(m(this._config.chunk)){if(this._config.chunk(n,this._handle),this._paused)return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),!s||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),s||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(t){m(this._config.error)?this._config.error(t):k&&this._config.error&&e.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function i(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=w.RemoteChunkSize),n.call(this,e);var r;this._nextChunk=k?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(r=new XMLHttpRequest,k||(r.onload=g(this._chunkLoaded,this),r.onerror=g(this._chunkError,this)),r.open("GET",this._input,!k),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+e),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(t){this._chunkError(t.message)}k&&0==r.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==r.readyState){if(r.status<200||r.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(r),this.parseChunk(r.responseText)}},this._chunkError=function(e){var t=r.statusText||e;this._sendError(t)}}function s(e){e=e||{},e.chunkSize||(e.chunkSize=w.LocalChunkSize),n.call(this,e);var t,r,i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,i?(t=new FileReader,t.onload=g(this._chunkLoaded,this),t.onerror=g(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function a(e){e=e||{},n.call(this,e);var t,r;this.stream=function(e){return t=e,r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):"",this._finished=!r,this.parseChunk(t)}}}function o(e){function t(){if(b&&c&&(f("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),c=!1),e.skipEmptyLines)for(var t=0;t<b.data.length;t++)1==b.data[t].length&&""==b.data[t][0]&&b.data.splice(t--,1);return r()&&n(),i()}function r(){return e.header&&0==y.length}function n(){if(b){for(var e=0;r()&&e<b.data.length;e++)for(var t=0;t<b.data[e].length;t++)y.push(b.data[e][t]);b.data.splice(0,1)}}function i(){if(!b||!e.header&&!e.dynamicTyping)return b;for(var t=0;t<b.data.length;t++){for(var r={},n=0;n<b.data[t].length;n++){if(e.dynamicTyping){var i=b.data[t][n];b.data[t][n]="true"==i||"TRUE"==i||"false"!=i&&"FALSE"!=i&&o(i)}e.header&&(n>=y.length?(r.__parsed_extra||(r.__parsed_extra=[]),r.__parsed_extra.push(b.data[t][n])):r[y[n]]=b.data[t][n])}e.header&&(b.data[t]=r,n>y.length?f("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+n,t):n<y.length&&f("FieldMismatch","TooFewFields","Too few fields: expected "+y.length+" fields but parsed "+n,t))}return e.header&&b.meta&&(b.meta.fields=y),b}function s(t){for(var r,n,i,s=[",","\t","|",";",w.RECORD_SEP,w.UNIT_SEP],a=0;a<s.length;a++){var o=s[a],f=0,h=0;i=void 0;for(var d=new u({delimiter:o,preview:10}).parse(t),c=0;c<d.data.length;c++){var l=d.data[c].length;h+=l,void 0!==i?l>1&&(f+=Math.abs(l-i),i=l):i=l}h/=d.data.length,(void 0===n||n>f)&&h>1.99&&(n=f,r=o)}return e.delimiter=r,{successful:!!r,bestDelimiter:r}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var r=0,n=0;n<t.length;n++)"\n"==t[n][0]&&r++;return r>=t.length/2?"\r\n":"\r"}function o(e){return l.test(e)?parseFloat(e):e}function f(e,t,r,n){b.errors.push({type:e,code:t,message:r,row:n})}var h,d,c,l=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,g=0,v=!1,k=!1,y=[],b={data:[],errors:[],meta:{}};if(m(e.step)){var R=e.step;e.step=function(n){if(b=n,r())t();else{if(t(),0==b.data.length)return;g+=n.data.length,e.preview&&g>e.preview?d.abort():R(b,p)}}}this.parse=function(r,n,i){if(e.newline||(e.newline=a(r)),c=!1,!e.delimiter){var o=s(r);o.successful?e.delimiter=o.bestDelimiter:(c=!0,e.delimiter=w.DefaultDelimiter),b.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,h=r,d=new u(f),b=d.parse(h,n,i),t(),v?{meta:{paused:!0}}:b||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,d.abort(),h=h.substr(d.getCharIndex())},this.resume=function(){v=!1,p.streamer.parseChunk(h)},this.aborted=function(){return k},this.abort=function(){k=!0,d.abort(),b.meta.aborted=!0,m(e.complete)&&e.complete(b),h=""}}function u(e){e=e||{};var t=e.delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode;if(("string"!=typeof t||w.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";!0===n?n="#":("string"!=typeof n||w.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=r&&"\r"!=r&&"\r\n"!=r&&(r="\n");var o=0,u=!1;this.parse=function(e,f,h){function d(e){b.push(e),S=o}function c(t){return h?p():(t||(t=e.substr(o)),w.push(t),o=g,d(w),y&&_(),p())}function l(t){o=t,d(w),w=[],O=e.indexOf(r,o)}function p(e){return{data:b,errors:R,meta:{delimiter:t,linebreak:r,aborted:u,truncated:!!e,cursor:S+(f||0)}}}function _(){i(p()),b=[],R=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,m=t.length,v=r.length,k=n.length,y="function"==typeof i;o=0;var b=[],R=[],w=[],S=0;if(!e)return p();if(a||!1!==a&&-1===e.indexOf('"')){for(var E=e.split(r),C=0;C<E.length;C++){var w=E[C];if(o+=w.length,C!==E.length-1)o+=r.length;else if(h)return p();if(!n||w.substr(0,k)!=n){if(y){if(b=[],d(w.split(t)),_(),u)return p()}else d(w.split(t));if(s&&C>=s)return b=b.slice(0,s),p(!0)}}return p()}for(var x=e.indexOf(t,o),O=e.indexOf(r,o);;)if('"'!=e[o])if(n&&0===w.length&&e.substr(o,k)===n){if(-1==O)return p();o=O+v,O=e.indexOf(r,o),x=e.indexOf(t,o)}else if(-1!==x&&(O>x||-1===O))w.push(e.substring(o,x)),o=x+m,x=e.indexOf(t,o);else{if(-1===O)break;if(w.push(e.substring(o,O)),l(O+v),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0)}else{var I=o;for(o++;;){var I=e.indexOf('"',I+1);if(-1===I)return h||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:o}),c();if(I===g-1){var D=e.substring(o,I).replace(/""/g,'"');return c(D)}if('"'!=e[I+1]){if(e[I+1]==t){w.push(e.substring(o,I).replace(/""/g,'"')),o=I+1+m,x=e.indexOf(t,o),O=e.indexOf(r,o);break}if(e.substr(I+1,v)===r){if(w.push(e.substring(o,I).replace(/""/g,'"')),l(I+1+v),x=e.indexOf(t,o),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0);break}}else I++}}return c()},this.abort=function(){u=!0},this.getCharIndex=function(){return o}}function h(){if(!w.WORKERS_SUPPORTED)return!1;if(!y&&null===w.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=new e.Worker(w.SCRIPT_PATH||v);return t.onmessage=d,t.id=R++,b[t.id]=t,t}function d(e){var t=e.data,r=b[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},s={abort:i,pause:l,resume:l};if(m(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else m(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var r=b[e];m(r.userComplete)&&r.userComplete(t),r.terminate(),delete b[e]}function l(){throw"Not implemented."}function p(t){var r=t.data;if(void 0===w.WORKER_ID&&r&&(w.WORKER_ID=r.workerId),"string"==typeof r.input)e.postMessage({workerId:w.WORKER_ID,results:w.parse(r.input,r.config),finished:!0});else if(e.File&&r.input instanceof File||r.input instanceof Object){var n=w.parse(r.input,r.config);n&&e.postMessage({workerId:w.WORKER_ID,results:n,finished:!0})}}function _(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var r in e)t[r]=_(e[r]);return t}function g(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var v,k=!e.document&&!!e.postMessage,y=!1,b={},R=0,w={};if(w.parse=t,w.unparse=r,w.RECORD_SEP=String.fromCharCode(30),w.UNIT_SEP=String.fromCharCode(31),w.BYTE_ORDER_MARK="\ufeff",w.BAD_DELIMITERS=["\r","\n",'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!!e.Worker,w.SCRIPT_PATH=null,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=u,w.ParserHandle=o,w.NetworkStreamer=i,w.FileStreamer=s,w.StringStreamer=a,void 0!==module&&module.exports?module.exports=w:m(e.define)&&e.define.amd?e.define(function(){return w}):e.Papa=w,e.jQuery){var S=e.jQuery;S.fn.parse=function(t){function r(){if(0==a.length)return void(m(t.complete)&&t.complete());var e=a[0];if(m(t.before)){var r=t.before(e.file,e.inputElem);if("object"==typeof r){if("abort"==r.action)return void n("AbortError",e.file,e.inputElem,r.reason);if("skip"==r.action)return void i();"object"==typeof r.config&&(e.instanceConfig=S.extend(e.instanceConfig,r.config))}else if("skip"==r)return void i()}var s=e.instanceConfig.complete;e.instanceConfig.complete=function(t){m(s)&&s(t,e.file,e.inputElem),i()},w.parse(e.file,e.instanceConfig)}function n(e,r,n,i){m(t.error)&&t.error({name:e},r,n,i)}function i(){a.splice(0,1),r()}var s=t.config||{},a=[];return this.each(function(){if("INPUT"!=S(this).prop("tagName").toUpperCase()||"file"!=S(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0==this.files.length)return!0;for(var r=0;r<this.files.length;r++)a.push({file:this.files[r],inputElem:this,instanceConfig:S.extend({},s)})}),r(),this}}k?e.onmessage=p:w.WORKERS_SUPPORTED&&(v=function(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}(),document.body?document.addEventListener("DOMContentLoaded",function(){y=!0},!0):y=!0),i.prototype=Object.create(n.prototype),i.prototype.constructor=i,s.prototype=Object.create(n.prototype),s.prototype.constructor=s,a.prototype=Object.create(a.prototype),a.prototype.constructor=a}("undefined"!=typeof window?window:this)},446:function(module,exports){!function($){$.AsyncQueue=function(){var failureFunc,completeFunc,lastCallbackData,_run,that=this,queue=[],paused=!1;return _run=function(){var f=queue.shift();f?(f.apply(that,[that]),!1===paused&&_run()):completeFunc&&completeFunc.apply(that)},this.onFailure=function(func){failureFunc=func},this.onComplete=function(func){completeFunc=func},this.add=function(func){return queue.push(func),this},this.storeData=function(dataObject){return lastCallbackData=dataObject,this},this.lastCallbackData=function(){return lastCallbackData},this.run=function(){paused=!1,_run()},this.pause=function(){return paused=!0,this},this.failure=function(){if(paused=!0,failureFunc){var args=[that];for(i=0;i<arguments.length;i++)args.push(arguments[i]);failureFunc.apply(that,args)}},this}}(jQuery)},447:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(4),__webpack_require__(5),__webpack_require__(2),__webpack_require__(175)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(_,jQuery,MailPoet,Handlebars){jQuery("#mailpoet_subscribers_export").length&&jQuery(document).ready(function(){function toggleNextStepButton(condition){"on"===condition?nextStepButton.removeClass("button-disabled"):nextStepButton.addClass("button-disabled")}var segmentsContainerElement,subscriberFieldsContainerElement,nextStepButton,renderSegmentsAndFields,subscribersExportTemplate;window.exportData.segments&&(subscribersExportTemplate=Handlebars.compile(jQuery("#mailpoet_subscribers_export_template").html()),jQuery("#mailpoet_subscribers_export > div.inside").html(subscribersExportTemplate(window.exportData)),segmentsContainerElement=jQuery("#export_lists"),subscriberFieldsContainerElement=jQuery("#export_columns"),nextStepButton=jQuery("a.mailpoet_export_process"),renderSegmentsAndFields=function(container,data){container.data("select2")&&container.html("").select2("destroy"),container.select2({data:data,width:"20em",templateResult:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name},templateSelection:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name}}).on("select2:selecting",function(selectEvent){var allOptions,selectElement=this,selectedOptionId=selectEvent.params.args.data.id,fieldsToExclude=["select","deselect"];_.contains(fieldsToExclude,selectedOptionId)&&(selectEvent.preventDefault(),"deselect"===selectedOptionId?jQuery(selectElement).val("").trigger("change"):(allOptions=[],_.each(container.find("option"),function(field){_.contains(fieldsToExclude,field.value)||allOptions.push(field.value)}),jQuery(selectElement).val(allOptions).trigger("change")),jQuery(selectElement).select2("close"))}).on("change",function(){toggleNextStepButton(window.exportData.segments&&segmentsContainerElement.select2("data").length&&subscriberFieldsContainerElement.select2("data").length||!window.exportData.segments&&subscriberFieldsContainerElement.select2("data").length?"on":"off")})},window.segments.forEach(function(item){segmentsContainerElement.append(jQuery("<option></option>").attr("value",item.id).text(item.name))}),renderSegmentsAndFields(segmentsContainerElement,window.segments),renderSegmentsAndFields(subscriberFieldsContainerElement,window.subscriberFieldsSelect2),subscriberFieldsContainerElement.val(["email","first_name","last_name","list_status","global_status"]).trigger("change"),nextStepButton.click(function(){var exportFormat;jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),exportFormat=jQuery(':radio[name="option_format"]:checked').val(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processExport",data:JSON.stringify({export_format_option:exportFormat,segments:!!window.exportData.segments&&segmentsContainerElement.val(),subscriber_fields:subscriberFieldsContainerElement.val()})}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){var resultMessage=MailPoet.I18n.t("exportMessage").replace("%1$s","<strong>"+parseInt(response.data.totalExported,10).toLocaleString()+"</strong>").replace("[link]",'<a href="'+response.data.exportFileURL+'" target="_blank" >').replace("[/link]","</a>");jQuery("#export_result_notice").html("<p>"+resultMessage+"</p>").show(),window.location.href=response.data.exportFileURL,MailPoet.trackEvent("Subscribers export completed",{"Total exported":response.data.totalExported,"File Format":exportFormat,"MailPoet Free version":window.mailpoet_version})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))}))})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},448:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(11),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(7),_steps_controller=__webpack_require__(449),_steps_controller2=_interopRequireDefault(_steps_controller),container=document.getElementById("welcome_wizard_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement("div",null,_react2.default.createElement(_reactRouterDom.Route,{exact:!0,path:"/",render:function(){return _react2.default.createElement(_reactRouterDom.Redirect,{to:"/steps/1"})}}),_react2.default.createElement(_reactRouterDom.Route,{path:"/steps/:step",component:_steps_controller2.default}))),container)},449:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_header=__webpack_require__(450),_header2=_interopRequireDefault(_header),_sender_step=__webpack_require__(452),_sender_step2=_interopRequireDefault(_sender_step),_migrated_user_step=__webpack_require__(453),_migrated_user_step2=_interopRequireDefault(_migrated_user_step),_help_info_step=__webpack_require__(454),_help_info_step2=_interopRequireDefault(_help_info_step),_usage_tracking_step=__webpack_require__(455),_usage_tracking_step2=_interopRequireDefault(_usage_tracking_step),_woo_commerce_step=__webpack_require__(456),_woo_commerce_step2=_interopRequireDefault(_woo_commerce_step),WelcomeWizardStepsController=function(_React$Component){function WelcomeWizardStepsController(props){_classCallCheck(this,WelcomeWizardStepsController);var _this=_possibleConstructorReturn(this,(WelcomeWizardStepsController.__proto__||Object.getPrototypeOf(WelcomeWizardStepsController)).call(this,props));return _this.state={stepsCount:window.is_woocommerce_active?4:3,shouldSetSender:!window.is_mp2_migration_complete,loading:!1,sender:window.sender_data},_this.finishWizard=_this.finishWizard.bind(_this),_this.updateSettings=_this.updateSettings.bind(_this),_this.activateTracking=_this.activateTracking.bind(_this),_this.updateSender=_this.updateSender.bind(_this),_this.submitSender=_this.submitSender.bind(_this),_this.showWooCommerceStepOrFinish=_this.showWooCommerceStepOrFinish.bind(_this),_this.componentDidUpdate(),_this}return _inherits(WelcomeWizardStepsController,_React$Component),_createClass(WelcomeWizardStepsController,[{key:"componentDidUpdate",value:function(){var step=parseInt(this.props.match.params.step,10);(step>this.state.stepsCount||step<1)&&this.props.history.push("/steps/1")}},{key:"finishWizard",value:function(){this.setState({loading:!0}),window.location=window.finish_wizard_url}},{key:"showWooCommerceStepOrFinish",value:function(){4===this.state.stepsCount?this.props.history.push("/steps/4"):this.finishWizard()}},{key:"updateSettings",value:function(data){var _this2=this;return this.setState({loading:!0}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:data}).then(function(){return _this2.setState({loading:!1})}).fail(function(response){_this2.setState({loading:!1}),response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"activateTracking",value:function(){var _this3=this;this.updateSettings({analytics:{enabled:!0}}).then(function(){return _this3.showWooCommerceStepOrFinish()})}},{key:"updateSender",value:function(data){this.setState({sender:Object.assign({},this.state.sender,data)})}},{key:"submitSender",value:function(){var _this4=this;this.updateSettings({sender:this.state.sender}).then(function(){return _this4.props.history.push("/steps/2")})}},{key:"render",value:function(){var _this5=this,step=parseInt(this.props.match.params.step,10);return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},_react2.default.createElement(_header2.default,{current_step:step,steps_count:this.state.stepsCount,logo_src:window.mailpoet_logo_url}),1===step&&this.state.shouldSetSender?_react2.default.createElement(_sender_step2.default,{update_sender:this.updateSender,submit_sender:this.submitSender,finish:this.finishWizard,loading:this.state.loading,sender:this.state.sender}):null,1!==step||this.state.shouldSetSender?null:_react2.default.createElement(_migrated_user_step2.default,{next:function(){return _this5.props.history.push("/steps/2")}}),2===step?_react2.default.createElement(_help_info_step2.default,{next:function(){return _this5.props.history.push("/steps/3")}}):null,3===step?_react2.default.createElement(_usage_tracking_step2.default,{skip_action:this.showWooCommerceStepOrFinish,allow_action:this.activateTracking,allow_text:4===this.state.stepsCount?_mailpoet2.default.I18n.t("allowAndContinue"):_mailpoet2.default.I18n.t("allowAndFinish"),loading:this.state.loading}):null,4===step?_react2.default.createElement(_woo_commerce_step2.default,{next:this.finishWizard,screenshot_src:window.woocommerce_screenshot_url,loading:this.state.loading}):null)}}]),WelcomeWizardStepsController}(_react2.default.Component);WelcomeWizardStepsController.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({step:_propTypes2.default.string}).isRequired}).isRequired,history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=WelcomeWizardStepsController},450:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_stepped_progess_bar=__webpack_require__(451),_stepped_progess_bar2=_interopRequireDefault(_stepped_progess_bar),WelcomeWizardHeader=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_centered_column mailpoet_welcome_wizard_header"},_react2.default.createElement("img",{src:props.logo_src,width:"200",alt:"MailPoet logo"}),props.current_step<=props.steps_count?_react2.default.createElement(_stepped_progess_bar2.default,{steps_count:props.steps_count,step:props.current_step}):null)};WelcomeWizardHeader.propTypes={current_step:_propTypes2.default.number.isRequired,steps_count:_propTypes2.default.number.isRequired,logo_src:_propTypes2.default.string.isRequired},module.exports=WelcomeWizardHeader},451:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),SteppedProgressBar=function(props){return props.step>props.steps_count?null:_react2.default.createElement("div",{className:"mailpoet_stepped_progress_bar"},[].concat(_toConsumableArray(Array(props.steps_count).keys())).map(function(step){return _react2.default.createElement("div",{className:"mailpoet_stepped_progress_bar_step "+(step<props.step?"active":""),key:"step_"+step,style:{width:Math.floor(100/props.steps_count)+"%"}})}))};SteppedProgressBar.propTypes={steps_count:_propTypes2.default.number.isRequired,step:_propTypes2.default.number.isRequired},module.exports=SteppedProgressBar},452:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),WelcomeWizardSenderStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardLetsStartTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardSenderText")),_react2.default.createElement("form",{id:"mailpoet_sender_form",className:"mailpoet_welcome_wizard_centered_column "+(props.loading?"mailpoet_sender_form_loading":""),onSubmit:function(e){e.preventDefault(),(0,_jquery2.default)("#mailpoet_sender_form").parsley().validate()&&props.submit_sender()}},_react2.default.createElement("label",{htmlFor:"senderName"},_mailpoet2.default.I18n.t("senderName"),":",_react2.default.createElement("input",{name:"senderName",type:"text",placeholder:"John Doe",value:props.sender?props.sender.name:"","data-parsley-required":!0,onChange:function(e){return props.update_sender({name:e.target.value})}})),_react2.default.createElement("label",{htmlFor:"senderAddress"},_mailpoet2.default.I18n.t("senderAddress"),":",_react2.default.createElement("input",{name:"senderAddress",type:"text",placeholder:"john@doe.com",value:props.sender?props.sender.address:"","data-parsley-required":!0,"data-parsley-type":"email",onChange:function(e){return props.update_sender({address:e.target.value})}})),_react2.default.createElement("input",{className:"button button-primary",type:"submit",value:_mailpoet2.default.I18n.t("next")}),_react2.default.createElement("a",{onClick:props.finish,href:"#finish"},_mailpoet2.default.I18n.t("noThanksSkip"))))};WelcomeWizardSenderStep.propTypes={finish:_propTypes2.default.func.isRequired,loading:_propTypes2.default.bool.isRequired,update_sender:_propTypes2.default.func.isRequired,submit_sender:_propTypes2.default.func.isRequired,sender:_propTypes2.default.shape({name:_propTypes2.default.string,address:_propTypes2.default.string})},WelcomeWizardSenderStep.defaultProps={sender:null},module.exports=WelcomeWizardSenderStep},453:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),WelcomeWizardMigratedUserStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardLetsStartTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardSenderMigratedUserText")),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},_react2.default.createElement("button",{className:"button button-primary",onClick:props.next},_mailpoet2.default.I18n.t("next"))))};WelcomeWizardMigratedUserStep.propTypes={next:_propTypes2.default.func.isRequired},module.exports=WelcomeWizardMigratedUserStep},454:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(22),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),WelcomeWizardHelpInfoStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_welcome_wizard_support_button"}),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardYouCanContactText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)}))),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_badge mailpoet_badge_video mailpoet_welcome_wizard_video_badge"},_react2.default.createElement("span",{className:"dashicons dashicons-format-video"}),_mailpoet2.default.I18n.t("seeVideoGuide")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardAboutVideosText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)}))),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_welcome_wizard_mail_icon"}),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardAboutCourseText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)})),_react2.default.createElement("iframe",{id:"mailpoet_form_iframe",width:"100%",scrolling:"no",frameBorder:"0",title:"Apply to course",src:"https://newsletters.mailpoet.com?mailpoet_form_iframe=13",className:"mailpoet_form_iframe",marginWidth:"0",marginHeight:"0",allowtransparency:"true"})),_react2.default.createElement("button",{className:"button button-primary",onClick:props.next},_mailpoet2.default.I18n.t("next")))};module.exports=WelcomeWizardHelpInfoStep,WelcomeWizardHelpInfoStep.propTypes={next:_propTypes2.default.func.isRequired},module.exports=WelcomeWizardHelpInfoStep},455:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(22),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),WelcomeWizardUsageTrackingStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardUsageTrackingStepTitle")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardTrackingText"),/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{key:"docs_link",href:"https://beta.docs.mailpoet.com/article/130-sharing-your-data-with-us",target:"_blank",rel:"noopener noreferrer"},match)})),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n "+(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},_react2.default.createElement("button",{className:"button",onClick:props.skip_action,disabled:props.loading},_mailpoet2.default.I18n.t("skip")),_react2.default.createElement("button",{className:"button button-primary",onClick:props.allow_action,disabled:props.loading},props.allow_text)))};module.exports=WelcomeWizardUsageTrackingStep,WelcomeWizardUsageTrackingStep.propTypes={allow_action:_propTypes2.default.func.isRequired,allow_text:_propTypes2.default.string.isRequired,skip_action:_propTypes2.default.func.isRequired,loading:_propTypes2.default.bool.isRequired}},456:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),WelcomeWizardWooCommerceStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardWooCommerceStepTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardHelpingShopOwnersText")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardWooCommerceEmailsText")),_react2.default.createElement("img",{src:props.screenshot_src,className:"mailpoet_welcome_wizard_woo_screenshot",alt:"WooCommerce email"}),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n "+(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},_react2.default.createElement("button",{className:"button button-primary",onClick:props.next,disabled:props.loading},_mailpoet2.default.I18n.t("gotIt"))))};module.exports=WelcomeWizardWooCommerceStep,WelcomeWizardWooCommerceStep.propTypes={next:_propTypes2.default.func.isRequired,screenshot_src:_propTypes2.default.string.isRequired,loading:_propTypes2.default.bool.isRequired}},457:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _reactDom=__webpack_require__(11),_reactDom2=_interopRequireDefault(_reactDom),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_new_subscriber_announcement=__webpack_require__(458),_new_subscriber_announcement2=_interopRequireDefault(_new_subscriber_announcement),container=document.getElementById("new_subscriber_announcement");container&&_reactDom2.default.render(_react2.default.createElement(_new_subscriber_announcement2.default,{installedAt:window.mailpoet_installed_at,imageUrl:window.mailpoet_new_subscriber_announcement_image}),container)},458:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(3),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(2),_mailpoet2=_interopRequireDefault(_mailpoet),_moment=__webpack_require__(0),_moment2=_interopRequireDefault(_moment),_in_app_announcement=__webpack_require__(267),_in_app_announcement2=_interopRequireDefault(_in_app_announcement),NewSubscriberNotificationAnnouncement=function(props){return _react2.default.createElement(_in_app_announcement2.default,{validUntil:(0,_moment2.default)(props.installedAt).add(3,"months").toDate(),height:"700px",showOnlyOnceSlug:"new_subscriber_notification",showToNewUser:!1},_react2.default.createElement("div",{className:"new_subscriber_notification_announcement"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("announcementHeader")),_react2.default.createElement("img",{src:props.imageUrl,width:"600px",height:"460px",alt:""}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("announcementParagraph1"),_react2.default.createElement("br",null),_mailpoet2.default.I18n.t("announcementParagraph2"))))};NewSubscriberNotificationAnnouncement.propTypes={installedAt:_propTypes2.default.string.isRequired,imageUrl:_propTypes2.default.string.isRequired},module.exports=NewSubscriberNotificationAnnouncement},459:function(module,exports,__webpack_require__){"use strict";(function(setImmediate){function displayPoll(){window.mailpoet_display_nps_poll&&window.satismeter&&window.mailpoet_installed_at_isoFormat&&(window.satismeter({writeKey:"6L479eVPXk7pBn6S",userId:window.mailpoet_current_wp_user.ID+window.mailpoet_site_url,traits:{name:window.mailpoet_current_wp_user.user_nicename,email:window.mailpoet_current_wp_user.user_email,createdAt:window.mailpoet_installed_at_isoFormat}}),window.satismeter({writeKey:"k0aJAsQAWI2ERyGv",userId:window.mailpoet_current_wp_user.ID+window.mailpoet_site_url,traits:{name:window.mailpoet_current_wp_user.user_nicename,email:window.mailpoet_current_wp_user.user_email,createdAt:window.mailpoet_installed_at_isoFormat}}))}setImmediate(displayPoll)}).call(exports,__webpack_require__(281).setImmediate)}},[390]);
|
assets/js/admin.ab396c6f.js
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
webpackJsonp([2],[,,,,,,,,,,,,,function(module,exports,__webpack_require__){function defineProp(name,value){return delete module.exports[name],module.exports[name]=value,value}var Parser=__webpack_require__(166),DomHandler=__webpack_require__(231);module.exports={Parser:Parser,Tokenizer:__webpack_require__(167),ElementType:__webpack_require__(20),DomHandler:DomHandler,get FeedHandler(){return defineProp("FeedHandler",__webpack_require__(233))},get Stream(){return defineProp("Stream",__webpack_require__(234))},get WritableStream(){return defineProp("WritableStream",__webpack_require__(171))},get ProxyHandler(){return defineProp("ProxyHandler",__webpack_require__(241))},get DomUtils(){return defineProp("DomUtils",__webpack_require__(242))},get CollectingHandler(){return defineProp("CollectingHandler",__webpack_require__(254))},DefaultHandler:DomHandler,get RssHandler(){return defineProp("RssHandler",this.FeedHandler)},parseDOM:function(data,options){var handler=new DomHandler(options);return new Parser(handler,options).end(data),handler.dom},parseFeed:function(feed,options){var handler=new module.exports.FeedHandler(options);return new Parser(handler,options).end(feed),handler.dom},createDomStream:function(cb,options,elementCb){var handler=new DomHandler(cb,options,elementCb);return new Parser(handler,options)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},,,,function(module,exports,__webpack_require__){(function(global){module.exports=global.Backbone=__webpack_require__(280)}).call(exports,__webpack_require__(6))},,,function(module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(elem){return"tag"===elem.type||"script"===elem.type||"style"===elem.type}}},,function(module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function processNodes(nodes,transform){return nodes.filter(function(node){return!(0,_isEmptyTextNode2.default)(node)}).map(function(node,index){var transformed=void 0;return"function"!=typeof transform||null!==(transformed=transform(node,index))&&!transformed?(0,_convertNodeToElement2.default)(node,index,transform):transformed})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=processNodes;var _isEmptyTextNode=__webpack_require__(227),_isEmptyTextNode2=_interopRequireDefault(_isEmptyTextNode),_convertNodeToElement=__webpack_require__(165),_convertNodeToElement2=_interopRequireDefault(_convertNodeToElement)},function(module,exports){module.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}},function(module,exports){module.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Tooltip(props){var tooltipId=props.tooltipId,tooltip=props.tooltip;return props.tooltipId||"string"!=typeof props.tooltip||(tooltipId=props.tooltip),"string"==typeof props.tooltip&&(tooltip=_react2.default.createElement("span",{style:{pointerEvents:"all",maxWidth:"400px",display:"inline-block"}},(0,_reactHtmlParser2.default)(props.tooltip))),_react2.default.createElement("span",{className:props.className},_react2.default.createElement("span",{style:{cursor:"pointer"},className:"tooltip dashicons dashicons-editor-help","data-event":"click","data-tip":!0,"data-for":tooltipId}),_react2.default.createElement(_reactTooltip2.default,{globalEventOff:"click",multiline:!0,id:tooltipId,efect:"solid",place:props.place},tooltip))}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactTooltip=__webpack_require__(162),_reactTooltip2=_interopRequireDefault(_reactTooltip),_reactHtmlParser=__webpack_require__(226),_reactHtmlParser2=_interopRequireDefault(_reactHtmlParser);Tooltip.propTypes={tooltipId:_propTypes2.default.string,tooltip:_propTypes2.default.node.isRequired,place:_propTypes2.default.string,className:_propTypes2.default.string},Tooltip.defaultProps={tooltipId:void 0,place:void 0,className:void 0},module.exports=Tooltip},,,,function(module,exports,__webpack_require__){"use strict";function convertNodeToElement(node,index,transform){return _elementTypes2.default[node.type](node,index,transform)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=convertNodeToElement;var _elementTypes=__webpack_require__(228),_elementTypes2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_elementTypes)},function(module,exports,__webpack_require__){function Parser(cbs,options){this._options=options||{},this._cbs=cbs||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this._foreignContext=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(Tokenizer=this._options.Tokenizer),this._tokenizer=new Tokenizer(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var Tokenizer=__webpack_require__(167),formTags={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},openImpliesClose={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:formTags,input:formTags,output:formTags,button:formTags,datalist:formTags,textarea:formTags,option:{option:!0},optgroup:{optgroup:!0}},voidElements={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},foreignContextElements={__proto__:null,math:!0,svg:!0},htmlIntegrationElements={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0,foreignObject:!0,desc:!0,title:!0},re_nameEnd=/\s|\//;__webpack_require__(22)(Parser,__webpack_require__(230).EventEmitter),Parser.prototype._updatePosition=function(initialOffset){null===this.endIndex?this._tokenizer._sectionStart<=initialOffset?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-initialOffset:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},Parser.prototype.ontext=function(data){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(data)},Parser.prototype.onopentagname=function(name){if(this._lowerCaseTagNames&&(name=name.toLowerCase()),this._tagname=name,!this._options.xmlMode&&name in openImpliesClose)for(var el;(el=this._stack[this._stack.length-1])in openImpliesClose[name];this.onclosetag(el));!this._options.xmlMode&&name in voidElements||(this._stack.push(name),name in foreignContextElements?this._foreignContext.push(!0):name in htmlIntegrationElements&&this._foreignContext.push(!1)),this._cbs.onopentagname&&this._cbs.onopentagname(name),this._cbs.onopentag&&(this._attribs={})},Parser.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in voidElements&&this._cbs.onclosetag(this._tagname),this._tagname=""},Parser.prototype.onclosetag=function(name){if(this._updatePosition(1),this._lowerCaseTagNames&&(name=name.toLowerCase()),!this._stack.length||name in voidElements&&!this._options.xmlMode)this._options.xmlMode||"br"!==name&&"p"!==name||(this.onopentagname(name),this._closeCurrentTag());else{var pos=this._stack.lastIndexOf(name);if(-1!==pos)if(this._cbs.onclosetag)for(pos=this._stack.length-pos;pos--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=pos;else"p"!==name||this._options.xmlMode||(this.onopentagname(name),this._closeCurrentTag())}},Parser.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing||this._foreignContext[this._foreignContext.length-1]?this._closeCurrentTag():this.onopentagend()},Parser.prototype._closeCurrentTag=function(){var name=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===name&&(this._cbs.onclosetag&&this._cbs.onclosetag(name),this._stack.pop(),(name in foreignContextElements||name in htmlIntegrationElements)&&this._foreignContext.pop())},Parser.prototype.onattribname=function(name){this._lowerCaseAttributeNames&&(name=name.toLowerCase()),this._attribname=name},Parser.prototype.onattribdata=function(value){this._attribvalue+=value},Parser.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},Parser.prototype._getInstructionName=function(value){var idx=value.search(re_nameEnd),name=idx<0?value:value.substr(0,idx);return this._lowerCaseTagNames&&(name=name.toLowerCase()),name},Parser.prototype.ondeclaration=function(value){if(this._cbs.onprocessinginstruction){var name=this._getInstructionName(value);this._cbs.onprocessinginstruction("!"+name,"!"+value)}},Parser.prototype.onprocessinginstruction=function(value){if(this._cbs.onprocessinginstruction){var name=this._getInstructionName(value);this._cbs.onprocessinginstruction("?"+name,"?"+value)}},Parser.prototype.oncomment=function(value){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(value),this._cbs.oncommentend&&this._cbs.oncommentend()},Parser.prototype.oncdata=function(value){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(value),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+value+"]]")},Parser.prototype.onerror=function(err){this._cbs.onerror&&this._cbs.onerror(err)},Parser.prototype.onend=function(){if(this._cbs.onclosetag)for(var i=this._stack.length;i>0;this._cbs.onclosetag(this._stack[--i]));this._cbs.onend&&this._cbs.onend()},Parser.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},Parser.prototype.parseComplete=function(data){this.reset(),this.end(data)},Parser.prototype.write=function(chunk){this._tokenizer.write(chunk)},Parser.prototype.end=function(chunk){this._tokenizer.end(chunk)},Parser.prototype.pause=function(){this._tokenizer.pause()},Parser.prototype.resume=function(){this._tokenizer.resume()},Parser.prototype.parseChunk=Parser.prototype.write,Parser.prototype.done=Parser.prototype.end,module.exports=Parser},function(module,exports,__webpack_require__){function whitespace(c){return" "===c||"\n"===c||"\t"===c||"\f"===c||"\r"===c}function ifElseState(upper,SUCCESS,FAILURE){var lower=upper.toLowerCase();return upper===lower?function(c){c===lower?this._state=SUCCESS:(this._state=FAILURE,this._index--)}:function(c){c===lower||c===upper?this._state=SUCCESS:(this._state=FAILURE,this._index--)}}function consumeSpecialNameChar(upper,NEXT_STATE){var lower=upper.toLowerCase();return function(c){c===lower||c===upper?this._state=NEXT_STATE:(this._state=IN_TAG_NAME,this._index--)}}function Tokenizer(options,cbs){this._state=TEXT,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=TEXT,this._special=SPECIAL_NONE,this._cbs=cbs,this._running=!0,this._ended=!1,this._xmlMode=!(!options||!options.xmlMode),this._decodeEntities=!(!options||!options.decodeEntities)}module.exports=Tokenizer;var decodeCodePoint=__webpack_require__(168),entityMap=__webpack_require__(31),legacyMap=__webpack_require__(169),xmlMap=__webpack_require__(32),i=0,TEXT=i++,BEFORE_TAG_NAME=i++,IN_TAG_NAME=i++,IN_SELF_CLOSING_TAG=i++,BEFORE_CLOSING_TAG_NAME=i++,IN_CLOSING_TAG_NAME=i++,AFTER_CLOSING_TAG_NAME=i++,BEFORE_ATTRIBUTE_NAME=i++,IN_ATTRIBUTE_NAME=i++,AFTER_ATTRIBUTE_NAME=i++,BEFORE_ATTRIBUTE_VALUE=i++,IN_ATTRIBUTE_VALUE_DQ=i++,IN_ATTRIBUTE_VALUE_SQ=i++,IN_ATTRIBUTE_VALUE_NQ=i++,BEFORE_DECLARATION=i++,IN_DECLARATION=i++,IN_PROCESSING_INSTRUCTION=i++,BEFORE_COMMENT=i++,IN_COMMENT=i++,AFTER_COMMENT_1=i++,AFTER_COMMENT_2=i++,BEFORE_CDATA_1=i++,BEFORE_CDATA_2=i++,BEFORE_CDATA_3=i++,BEFORE_CDATA_4=i++,BEFORE_CDATA_5=i++,BEFORE_CDATA_6=i++,IN_CDATA=i++,AFTER_CDATA_1=i++,AFTER_CDATA_2=i++,BEFORE_SPECIAL=i++,BEFORE_SPECIAL_END=i++,BEFORE_SCRIPT_1=i++,BEFORE_SCRIPT_2=i++,BEFORE_SCRIPT_3=i++,BEFORE_SCRIPT_4=i++,BEFORE_SCRIPT_5=i++,AFTER_SCRIPT_1=i++,AFTER_SCRIPT_2=i++,AFTER_SCRIPT_3=i++,AFTER_SCRIPT_4=i++,AFTER_SCRIPT_5=i++,BEFORE_STYLE_1=i++,BEFORE_STYLE_2=i++,BEFORE_STYLE_3=i++,BEFORE_STYLE_4=i++,AFTER_STYLE_1=i++,AFTER_STYLE_2=i++,AFTER_STYLE_3=i++,AFTER_STYLE_4=i++,BEFORE_ENTITY=i++,BEFORE_NUMERIC_ENTITY=i++,IN_NAMED_ENTITY=i++,IN_NUMERIC_ENTITY=i++,IN_HEX_ENTITY=i++,j=0,SPECIAL_NONE=j++,SPECIAL_SCRIPT=j++,SPECIAL_STYLE=j++;Tokenizer.prototype._stateText=function(c){"<"===c?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=BEFORE_TAG_NAME,this._sectionStart=this._index):this._decodeEntities&&this._special===SPECIAL_NONE&&"&"===c&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=TEXT,this._state=BEFORE_ENTITY,this._sectionStart=this._index)},Tokenizer.prototype._stateBeforeTagName=function(c){"/"===c?this._state=BEFORE_CLOSING_TAG_NAME:"<"===c?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===c||this._special!==SPECIAL_NONE||whitespace(c)?this._state=TEXT:"!"===c?(this._state=BEFORE_DECLARATION,this._sectionStart=this._index+1):"?"===c?(this._state=IN_PROCESSING_INSTRUCTION,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==c&&"S"!==c?IN_TAG_NAME:BEFORE_SPECIAL,this._sectionStart=this._index)},Tokenizer.prototype._stateInTagName=function(c){("/"===c||">"===c||whitespace(c))&&(this._emitToken("onopentagname"),this._state=BEFORE_ATTRIBUTE_NAME,this._index--)},Tokenizer.prototype._stateBeforeCloseingTagName=function(c){whitespace(c)||(">"===c?this._state=TEXT:this._special!==SPECIAL_NONE?"s"===c||"S"===c?this._state=BEFORE_SPECIAL_END:(this._state=TEXT,this._index--):(this._state=IN_CLOSING_TAG_NAME,this._sectionStart=this._index))},Tokenizer.prototype._stateInCloseingTagName=function(c){(">"===c||whitespace(c))&&(this._emitToken("onclosetag"),this._state=AFTER_CLOSING_TAG_NAME,this._index--)},Tokenizer.prototype._stateAfterCloseingTagName=function(c){">"===c&&(this._state=TEXT,this._sectionStart=this._index+1)},Tokenizer.prototype._stateBeforeAttributeName=function(c){">"===c?(this._cbs.onopentagend(),this._state=TEXT,this._sectionStart=this._index+1):"/"===c?this._state=IN_SELF_CLOSING_TAG:whitespace(c)||(this._state=IN_ATTRIBUTE_NAME,this._sectionStart=this._index)},Tokenizer.prototype._stateInSelfClosingTag=function(c){">"===c?(this._cbs.onselfclosingtag(),this._state=TEXT,this._sectionStart=this._index+1):whitespace(c)||(this._state=BEFORE_ATTRIBUTE_NAME,this._index--)},Tokenizer.prototype._stateInAttributeName=function(c){("="===c||"/"===c||">"===c||whitespace(c))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=AFTER_ATTRIBUTE_NAME,this._index--)},Tokenizer.prototype._stateAfterAttributeName=function(c){"="===c?this._state=BEFORE_ATTRIBUTE_VALUE:"/"===c||">"===c?(this._cbs.onattribend(),this._state=BEFORE_ATTRIBUTE_NAME,this._index--):whitespace(c)||(this._cbs.onattribend(),this._state=IN_ATTRIBUTE_NAME,this._sectionStart=this._index)},Tokenizer.prototype._stateBeforeAttributeValue=function(c){'"'===c?(this._state=IN_ATTRIBUTE_VALUE_DQ,this._sectionStart=this._index+1):"'"===c?(this._state=IN_ATTRIBUTE_VALUE_SQ,this._sectionStart=this._index+1):whitespace(c)||(this._state=IN_ATTRIBUTE_VALUE_NQ,this._sectionStart=this._index,this._index--)},Tokenizer.prototype._stateInAttributeValueDoubleQuotes=function(c){'"'===c?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=BEFORE_ATTRIBUTE_NAME):this._decodeEntities&&"&"===c&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=BEFORE_ENTITY,this._sectionStart=this._index)},Tokenizer.prototype._stateInAttributeValueSingleQuotes=function(c){"'"===c?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=BEFORE_ATTRIBUTE_NAME):this._decodeEntities&&"&"===c&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=BEFORE_ENTITY,this._sectionStart=this._index)},Tokenizer.prototype._stateInAttributeValueNoQuotes=function(c){whitespace(c)||">"===c?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=BEFORE_ATTRIBUTE_NAME,this._index--):this._decodeEntities&&"&"===c&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=BEFORE_ENTITY,this._sectionStart=this._index)},Tokenizer.prototype._stateBeforeDeclaration=function(c){this._state="["===c?BEFORE_CDATA_1:"-"===c?BEFORE_COMMENT:IN_DECLARATION},Tokenizer.prototype._stateInDeclaration=function(c){">"===c&&(this._cbs.ondeclaration(this._getSection()),this._state=TEXT,this._sectionStart=this._index+1)},Tokenizer.prototype._stateInProcessingInstruction=function(c){">"===c&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=TEXT,this._sectionStart=this._index+1)},Tokenizer.prototype._stateBeforeComment=function(c){"-"===c?(this._state=IN_COMMENT,this._sectionStart=this._index+1):this._state=IN_DECLARATION},Tokenizer.prototype._stateInComment=function(c){"-"===c&&(this._state=AFTER_COMMENT_1)},Tokenizer.prototype._stateAfterComment1=function(c){this._state="-"===c?AFTER_COMMENT_2:IN_COMMENT},Tokenizer.prototype._stateAfterComment2=function(c){">"===c?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=TEXT,this._sectionStart=this._index+1):"-"!==c&&(this._state=IN_COMMENT)},Tokenizer.prototype._stateBeforeCdata1=ifElseState("C",BEFORE_CDATA_2,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata2=ifElseState("D",BEFORE_CDATA_3,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata3=ifElseState("A",BEFORE_CDATA_4,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata4=ifElseState("T",BEFORE_CDATA_5,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata5=ifElseState("A",BEFORE_CDATA_6,IN_DECLARATION),Tokenizer.prototype._stateBeforeCdata6=function(c){"["===c?(this._state=IN_CDATA,this._sectionStart=this._index+1):(this._state=IN_DECLARATION,this._index--)},Tokenizer.prototype._stateInCdata=function(c){"]"===c&&(this._state=AFTER_CDATA_1)},Tokenizer.prototype._stateAfterCdata1=function(c){this._state="]"===c?AFTER_CDATA_2:IN_CDATA},Tokenizer.prototype._stateAfterCdata2=function(c){">"===c?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=TEXT,this._sectionStart=this._index+1):"]"!==c&&(this._state=IN_CDATA)},Tokenizer.prototype._stateBeforeSpecial=function(c){"c"===c||"C"===c?this._state=BEFORE_SCRIPT_1:"t"===c||"T"===c?this._state=BEFORE_STYLE_1:(this._state=IN_TAG_NAME,this._index--)},Tokenizer.prototype._stateBeforeSpecialEnd=function(c){this._special!==SPECIAL_SCRIPT||"c"!==c&&"C"!==c?this._special!==SPECIAL_STYLE||"t"!==c&&"T"!==c?this._state=TEXT:this._state=AFTER_STYLE_1:this._state=AFTER_SCRIPT_1},Tokenizer.prototype._stateBeforeScript1=consumeSpecialNameChar("R",BEFORE_SCRIPT_2),Tokenizer.prototype._stateBeforeScript2=consumeSpecialNameChar("I",BEFORE_SCRIPT_3),Tokenizer.prototype._stateBeforeScript3=consumeSpecialNameChar("P",BEFORE_SCRIPT_4),Tokenizer.prototype._stateBeforeScript4=consumeSpecialNameChar("T",BEFORE_SCRIPT_5),Tokenizer.prototype._stateBeforeScript5=function(c){("/"===c||">"===c||whitespace(c))&&(this._special=SPECIAL_SCRIPT),this._state=IN_TAG_NAME,this._index--},Tokenizer.prototype._stateAfterScript1=ifElseState("R",AFTER_SCRIPT_2,TEXT),Tokenizer.prototype._stateAfterScript2=ifElseState("I",AFTER_SCRIPT_3,TEXT),Tokenizer.prototype._stateAfterScript3=ifElseState("P",AFTER_SCRIPT_4,TEXT),Tokenizer.prototype._stateAfterScript4=ifElseState("T",AFTER_SCRIPT_5,TEXT),Tokenizer.prototype._stateAfterScript5=function(c){">"===c||whitespace(c)?(this._special=SPECIAL_NONE,this._state=IN_CLOSING_TAG_NAME,this._sectionStart=this._index-6,this._index--):this._state=TEXT},Tokenizer.prototype._stateBeforeStyle1=consumeSpecialNameChar("Y",BEFORE_STYLE_2),Tokenizer.prototype._stateBeforeStyle2=consumeSpecialNameChar("L",BEFORE_STYLE_3),Tokenizer.prototype._stateBeforeStyle3=consumeSpecialNameChar("E",BEFORE_STYLE_4),Tokenizer.prototype._stateBeforeStyle4=function(c){("/"===c||">"===c||whitespace(c))&&(this._special=SPECIAL_STYLE),this._state=IN_TAG_NAME,this._index--},Tokenizer.prototype._stateAfterStyle1=ifElseState("Y",AFTER_STYLE_2,TEXT),Tokenizer.prototype._stateAfterStyle2=ifElseState("L",AFTER_STYLE_3,TEXT),Tokenizer.prototype._stateAfterStyle3=ifElseState("E",AFTER_STYLE_4,TEXT),Tokenizer.prototype._stateAfterStyle4=function(c){">"===c||whitespace(c)?(this._special=SPECIAL_NONE,this._state=IN_CLOSING_TAG_NAME,this._sectionStart=this._index-5,this._index--):this._state=TEXT},Tokenizer.prototype._stateBeforeEntity=ifElseState("#",BEFORE_NUMERIC_ENTITY,IN_NAMED_ENTITY),Tokenizer.prototype._stateBeforeNumericEntity=ifElseState("X",IN_HEX_ENTITY,IN_NUMERIC_ENTITY),Tokenizer.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var entity=this._buffer.substring(this._sectionStart+1,this._index),map=this._xmlMode?xmlMap:entityMap;map.hasOwnProperty(entity)&&(this._emitPartial(map[entity]),this._sectionStart=this._index+1)}},Tokenizer.prototype._parseLegacyEntity=function(){var start=this._sectionStart+1,limit=this._index-start;for(limit>6&&(limit=6);limit>=2;){var entity=this._buffer.substr(start,limit);if(legacyMap.hasOwnProperty(entity))return this._emitPartial(legacyMap[entity]),void(this._sectionStart+=limit+1);limit--}},Tokenizer.prototype._stateInNamedEntity=function(c){";"===c?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(c<"a"||c>"z")&&(c<"A"||c>"Z")&&(c<"0"||c>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==TEXT?"="!==c&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},Tokenizer.prototype._decodeNumericEntity=function(offset,base){var sectionStart=this._sectionStart+offset;if(sectionStart!==this._index){var entity=this._buffer.substring(sectionStart,this._index),parsed=parseInt(entity,base);this._emitPartial(decodeCodePoint(parsed)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},Tokenizer.prototype._stateInNumericEntity=function(c){";"===c?(this._decodeNumericEntity(2,10),this._sectionStart++):(c<"0"||c>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},Tokenizer.prototype._stateInHexEntity=function(c){";"===c?(this._decodeNumericEntity(3,16),this._sectionStart++):(c<"a"||c>"f")&&(c<"A"||c>"F")&&(c<"0"||c>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},Tokenizer.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._bufferOffset+=this._index,this._index=0):this._running&&(this._state===TEXT?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer="",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},Tokenizer.prototype.write=function(chunk){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=chunk,this._parse()},Tokenizer.prototype._parse=function(){for(;this._index<this._buffer.length&&this._running;){var c=this._buffer.charAt(this._index);this._state===TEXT?this._stateText(c):this._state===BEFORE_TAG_NAME?this._stateBeforeTagName(c):this._state===IN_TAG_NAME?this._stateInTagName(c):this._state===BEFORE_CLOSING_TAG_NAME?this._stateBeforeCloseingTagName(c):this._state===IN_CLOSING_TAG_NAME?this._stateInCloseingTagName(c):this._state===AFTER_CLOSING_TAG_NAME?this._stateAfterCloseingTagName(c):this._state===IN_SELF_CLOSING_TAG?this._stateInSelfClosingTag(c):this._state===BEFORE_ATTRIBUTE_NAME?this._stateBeforeAttributeName(c):this._state===IN_ATTRIBUTE_NAME?this._stateInAttributeName(c):this._state===AFTER_ATTRIBUTE_NAME?this._stateAfterAttributeName(c):this._state===BEFORE_ATTRIBUTE_VALUE?this._stateBeforeAttributeValue(c):this._state===IN_ATTRIBUTE_VALUE_DQ?this._stateInAttributeValueDoubleQuotes(c):this._state===IN_ATTRIBUTE_VALUE_SQ?this._stateInAttributeValueSingleQuotes(c):this._state===IN_ATTRIBUTE_VALUE_NQ?this._stateInAttributeValueNoQuotes(c):this._state===BEFORE_DECLARATION?this._stateBeforeDeclaration(c):this._state===IN_DECLARATION?this._stateInDeclaration(c):this._state===IN_PROCESSING_INSTRUCTION?this._stateInProcessingInstruction(c):this._state===BEFORE_COMMENT?this._stateBeforeComment(c):this._state===IN_COMMENT?this._stateInComment(c):this._state===AFTER_COMMENT_1?this._stateAfterComment1(c):this._state===AFTER_COMMENT_2?this._stateAfterComment2(c):this._state===BEFORE_CDATA_1?this._stateBeforeCdata1(c):this._state===BEFORE_CDATA_2?this._stateBeforeCdata2(c):this._state===BEFORE_CDATA_3?this._stateBeforeCdata3(c):this._state===BEFORE_CDATA_4?this._stateBeforeCdata4(c):this._state===BEFORE_CDATA_5?this._stateBeforeCdata5(c):this._state===BEFORE_CDATA_6?this._stateBeforeCdata6(c):this._state===IN_CDATA?this._stateInCdata(c):this._state===AFTER_CDATA_1?this._stateAfterCdata1(c):this._state===AFTER_CDATA_2?this._stateAfterCdata2(c):this._state===BEFORE_SPECIAL?this._stateBeforeSpecial(c):this._state===BEFORE_SPECIAL_END?this._stateBeforeSpecialEnd(c):this._state===BEFORE_SCRIPT_1?this._stateBeforeScript1(c):this._state===BEFORE_SCRIPT_2?this._stateBeforeScript2(c):this._state===BEFORE_SCRIPT_3?this._stateBeforeScript3(c):this._state===BEFORE_SCRIPT_4?this._stateBeforeScript4(c):this._state===BEFORE_SCRIPT_5?this._stateBeforeScript5(c):this._state===AFTER_SCRIPT_1?this._stateAfterScript1(c):this._state===AFTER_SCRIPT_2?this._stateAfterScript2(c):this._state===AFTER_SCRIPT_3?this._stateAfterScript3(c):this._state===AFTER_SCRIPT_4?this._stateAfterScript4(c):this._state===AFTER_SCRIPT_5?this._stateAfterScript5(c):this._state===BEFORE_STYLE_1?this._stateBeforeStyle1(c):this._state===BEFORE_STYLE_2?this._stateBeforeStyle2(c):this._state===BEFORE_STYLE_3?this._stateBeforeStyle3(c):this._state===BEFORE_STYLE_4?this._stateBeforeStyle4(c):this._state===AFTER_STYLE_1?this._stateAfterStyle1(c):this._state===AFTER_STYLE_2?this._stateAfterStyle2(c):this._state===AFTER_STYLE_3?this._stateAfterStyle3(c):this._state===AFTER_STYLE_4?this._stateAfterStyle4(c):this._state===BEFORE_ENTITY?this._stateBeforeEntity(c):this._state===BEFORE_NUMERIC_ENTITY?this._stateBeforeNumericEntity(c):this._state===IN_NAMED_ENTITY?this._stateInNamedEntity(c):this._state===IN_NUMERIC_ENTITY?this._stateInNumericEntity(c):this._state===IN_HEX_ENTITY?this._stateInHexEntity(c):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},Tokenizer.prototype.pause=function(){this._running=!1},Tokenizer.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},Tokenizer.prototype.end=function(chunk){this._ended&&this._cbs.onerror(Error(".end() after done!")),chunk&&this.write(chunk),this._ended=!0,this._running&&this._finish()},Tokenizer.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},Tokenizer.prototype._handleTrailingData=function(){var data=this._buffer.substr(this._sectionStart);this._state===IN_CDATA||this._state===AFTER_CDATA_1||this._state===AFTER_CDATA_2?this._cbs.oncdata(data):this._state===IN_COMMENT||this._state===AFTER_COMMENT_1||this._state===AFTER_COMMENT_2?this._cbs.oncomment(data):this._state!==IN_NAMED_ENTITY||this._xmlMode?this._state!==IN_NUMERIC_ENTITY||this._xmlMode?this._state!==IN_HEX_ENTITY||this._xmlMode?this._state!==IN_TAG_NAME&&this._state!==BEFORE_ATTRIBUTE_NAME&&this._state!==BEFORE_ATTRIBUTE_VALUE&&this._state!==AFTER_ATTRIBUTE_NAME&&this._state!==IN_ATTRIBUTE_NAME&&this._state!==IN_ATTRIBUTE_VALUE_SQ&&this._state!==IN_ATTRIBUTE_VALUE_DQ&&this._state!==IN_ATTRIBUTE_VALUE_NQ&&this._state!==IN_CLOSING_TAG_NAME&&this._cbs.ontext(data):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},Tokenizer.prototype.reset=function(){Tokenizer.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},Tokenizer.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},Tokenizer.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},Tokenizer.prototype._emitToken=function(name){this._cbs[name](this._getSection()),this._sectionStart=-1},Tokenizer.prototype._emitPartial=function(value){this._baseState!==TEXT?this._cbs.onattribdata(value):this._cbs.ontext(value)}},function(module,exports,__webpack_require__){function decodeCodePoint(codePoint){if(codePoint>=55296&&codePoint<=57343||codePoint>1114111)return"�";codePoint in decodeMap&&(codePoint=decodeMap[codePoint]);var output="";return codePoint>65535&&(codePoint-=65536,output+=String.fromCharCode(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),output+=String.fromCharCode(codePoint)}var decodeMap=__webpack_require__(229);module.exports=decodeCodePoint},function(module,exports){module.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(module,exports){var NodePrototype=module.exports={get firstChild(){var children=this.children;return children&&children[0]||null},get lastChild(){var children=this.children;return children&&children[children.length-1]||null},get nodeType(){return nodeTypes[this.type]||nodeTypes.element}},domLvl1={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},nodeTypes={element:1,text:3,cdata:4,comment:8};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(NodePrototype,key,{get:function(){return this[shorthand]||null},set:function(val){return this[shorthand]=val,val}})})},function(module,exports,__webpack_require__){function Stream(cbs,options){var parser=this._parser=new Parser(cbs,options),decoder=this._decoder=new StringDecoder;WritableStream.call(this,{decodeStrings:!1}),this.once("finish",function(){parser.end(decoder.end())})}module.exports=Stream;var Parser=__webpack_require__(166),WritableStream=__webpack_require__(235).Writable,StringDecoder=__webpack_require__(236).StringDecoder,Buffer=__webpack_require__(172).Buffer;__webpack_require__(22)(Stream,WritableStream),WritableStream.prototype._write=function(chunk,encoding,cb){chunk instanceof Buffer&&(chunk=this._decoder.write(chunk)),this._parser.write(chunk),cb()}},function(module,exports,__webpack_require__){"use strict";(function(global){function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(that=new Uint8Array(length),that.__proto__=Buffer.prototype):(null===that&&(that=new Buffer(length)),that.length=length),that}function Buffer(arg,encodingOrOffset,length){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(arg,encodingOrOffset,length);if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}function from(that,value,encodingOrOffset,length){if("number"==typeof value)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer?fromArrayBuffer(that,value,encodingOrOffset,length):"string"==typeof value?fromString(that,value,encodingOrOffset):fromObject(that,value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be a number');if(size<0)throw new RangeError('"size" argument must not be negative')}function alloc(that,size,fill,encoding){return assertSize(size),size<=0?createBuffer(that,size):void 0!==fill?"string"==typeof encoding?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill):createBuffer(that,size)}function allocUnsafe(that,size){if(assertSize(size),that=createBuffer(that,size<0?0:0|checked(size)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;i<size;++i)that[i]=0;return that}function fromString(that,string,encoding){if("string"==typeof encoding&&""!==encoding||(encoding="utf8"),!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');var length=0|byteLength(string,encoding);that=createBuffer(that,length);var actual=that.write(string,encoding);return actual!==length&&(that=that.slice(0,actual)),that}function fromArrayLike(that,array){var length=array.length<0?0:0|checked(array.length);that=createBuffer(that,length);for(var i=0;i<length;i+=1)that[i]=255&array[i];return that}function fromArrayBuffer(that,array,byteOffset,length){if(array.byteLength,byteOffset<0||array.byteLength<byteOffset)throw new RangeError("'offset' is out of bounds");if(array.byteLength<byteOffset+(length||0))throw new RangeError("'length' is out of bounds");return array=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length),Buffer.TYPED_ARRAY_SUPPORT?(that=array,that.__proto__=Buffer.prototype):that=fromArrayLike(that,array),that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length);return that=createBuffer(that,len),0===that.length?that:(obj.copy(that,0,0,len),that)}if(obj){if("undefined"!=typeof ArrayBuffer&&obj.buffer instanceof ArrayBuffer||"length"in obj)return"number"!=typeof obj.length||isnan(obj.length)?createBuffer(that,0):fromArrayLike(that,obj);if("Buffer"===obj.type&&isArray(obj.data))return fromArrayLike(that,obj.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function SlowBuffer(length){return+length!=length&&(length=0),Buffer.alloc(+length)}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if(end>>>=0,start>>>=0,end<=start)return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,isNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;var strLen=string.length;if(strLen%2!=0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i<end;){var firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128==(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!=0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){value<0&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){value<0&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i)buf[offset+i]=value>>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!=0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;i<length;++i){if((codePoint=string.charCodeAt(i))>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}function utf16leToBytes(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isnan(val){return val!==val}/*!
|
2 |
-
* The buffer module from node.js, for the browser.
|
3 |
-
*
|
4 |
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
5 |
-
* @license MIT
|
6 |
-
*/
|
7 |
-
var base64=__webpack_require__(238),ieee754=__webpack_require__(239),isArray=__webpack_require__(240);exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:function(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(arr){return arr.__proto__=Buffer.prototype,arr},Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)},Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);var i;if(void 0===length)for(length=0,i=0;i<list.length;++i)length+=list[i].length;var buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var len=this.length;if(len%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(len%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function(){var len=this.length;if(len%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function(){var length=0|this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),"<Buffer "+str+">"},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset|=0,isFinite(length)?(length|=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len)<0&&(start=0):start>len&&(start=len),end<0?(end+=len)<0&&(end=0):end>len&&(end=len),end<start&&(end=start);var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)newBuf=this.subarray(start,end),newBuf.__proto__=Buffer.prototype;else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,void 0);for(var i=0;i<sliceLen;++i)newBuf[i]=this[i+start]}return newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,byteLength|=0,!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0)}var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,byteLength|=0,!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0)}var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var i,len=end-start;if(this===target&&start<targetStart&&targetStart<end)for(i=len-1;i>=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<len;++i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),1===val.length){var code=val.charCodeAt(0);code<256&&(val=code)}if(void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding)}else"number"==typeof val&&(val&=255);if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString()),len=bytes.length;for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g}).call(exports,__webpack_require__(6))},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function generatePropsFromAttributes(attributes,key){var props=_extends({},(0,_htmlAttributesToReact2.default)(attributes),{key:key});return"string"==typeof props.style||props.style instanceof String?props.style=(0,_inlineStyleToObject2.default)(props.style):delete props.style,props}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target};exports.default=generatePropsFromAttributes;var _htmlAttributesToReact=__webpack_require__(257),_htmlAttributesToReact2=_interopRequireDefault(_htmlAttributesToReact),_inlineStyleToObject=__webpack_require__(260),_inlineStyleToObject2=_interopRequireDefault(_inlineStyleToObject)},function(module,exports,__webpack_require__){"use strict";function isValidTagOrAttributeName(tagName){return nameCache.hasOwnProperty(tagName)||(nameCache[tagName]=VALID_TAG_REGEX.test(tagName)),nameCache[tagName]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isValidTagOrAttributeName;var VALID_TAG_REGEX=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,nameCache={}},,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Tabs(props){var tabLinks=tabs.map(function(tab){var tabClasses=(0,_classnames2.default)("nav-tab",{"nav-tab-active":props.tab===tab.name});return _react2.default.createElement(_reactRouterDom.Link,{key:"tab-"+tab.name,className:tabClasses,to:tab.link},tab.label)});return _react2.default.createElement("h2",{className:"nav-tab-wrapper"},tabLinks)}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(8),_classnames=__webpack_require__(9),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),tabs=[{name:"knowledgeBase",label:_mailpoet2.default.I18n.t("tabKnowledgeBaseTitle"),link:"/knowledgeBase"},{name:"systemStatus",label:_mailpoet2.default.I18n.t("tabSystemStatusTitle"),link:"/systemStatus"},{name:"systemInfo",label:_mailpoet2.default.I18n.t("tabSystemInfoTitle"),link:"/systemInfo"},{name:"yourPrivacy",label:_mailpoet2.default.I18n.t("tabYourPrivacyTitle"),link:"/yourPrivacy"}];Tabs.propTypes={tab:_propTypes2.default.string},Tabs.defaultProps={tab:"knowledgeBase"},module.exports=Tabs},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.htmlparser2=exports.convertNodeToElement=exports.processNodes=void 0;var _processNodes=__webpack_require__(30);Object.defineProperty(exports,"processNodes",{enumerable:!0,get:function(){return _interopRequireDefault(_processNodes).default}});var _convertNodeToElement=__webpack_require__(165);Object.defineProperty(exports,"convertNodeToElement",{enumerable:!0,get:function(){return _interopRequireDefault(_convertNodeToElement).default}});var _htmlparser=__webpack_require__(13);Object.defineProperty(exports,"htmlparser2",{enumerable:!0,get:function(){return _interopRequireDefault(_htmlparser).default}});var _HtmlParser=__webpack_require__(264),_HtmlParser2=_interopRequireDefault(_HtmlParser);exports.default=_HtmlParser2.default},function(module,exports,__webpack_require__){"use strict";function isEmptyTextNode(node){return"text"===node.type&&/\r?\n/.test(node.data)&&""===node.data.trim()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isEmptyTextNode},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(exports,"__esModule",{value:!0});var _ElementType$Text$Ele,_htmlparser=__webpack_require__(13),_TextElementType=__webpack_require__(255),_TextElementType2=_interopRequireDefault(_TextElementType),_TagElementType=__webpack_require__(256),_TagElementType2=_interopRequireDefault(_TagElementType),_StyleElementType=__webpack_require__(262),_StyleElementType2=_interopRequireDefault(_StyleElementType),_UnsupportedElementType=__webpack_require__(263),_UnsupportedElementType2=_interopRequireDefault(_UnsupportedElementType);exports.default=(_ElementType$Text$Ele={},_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Text,_TextElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Tag,_TagElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Style,_StyleElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Directive,_UnsupportedElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Comment,_UnsupportedElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Script,_UnsupportedElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.CDATA,_UnsupportedElementType2.default),_defineProperty(_ElementType$Text$Ele,_htmlparser.ElementType.Doctype,_UnsupportedElementType2.default),_ElementType$Text$Ele)},function(module,exports){module.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if((er=arguments[1])instanceof Error)throw er;var err=new Error('Uncaught, unspecified "error" event. ('+er+")");throw err.context=er,err}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;i<len;i++)listeners[i].apply(this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned&&(m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners)&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){return this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},function(module,exports,__webpack_require__){function DomHandler(callback,options,elementCB){"object"==typeof callback?(elementCB=options,options=callback,callback=null):"function"==typeof options&&(elementCB=options,options=defaultOpts),this._callback=callback,this._options=options||defaultOpts,this._elementCB=elementCB,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var ElementType=__webpack_require__(20),re_whitespace=/\s+/g,NodePrototype=__webpack_require__(170),ElementPrototype=__webpack_require__(232),defaultOpts={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1};DomHandler.prototype.onparserinit=function(parser){this._parser=parser},DomHandler.prototype.onreset=function(){DomHandler.call(this,this._callback,this._options,this._elementCB)},DomHandler.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},DomHandler.prototype._handleCallback=DomHandler.prototype.onerror=function(error){if("function"==typeof this._callback)this._callback(error,this.dom);else if(error)throw error},DomHandler.prototype.onclosetag=function(){var elem=this._tagStack.pop();this._options.withEndIndices&&elem&&(elem.endIndex=this._parser.endIndex),this._elementCB&&this._elementCB(elem)},DomHandler.prototype._createDomElement=function(properties){if(!this._options.withDomLvl1)return properties;var element;element="tag"===properties.type?Object.create(ElementPrototype):Object.create(NodePrototype);for(var key in properties)properties.hasOwnProperty(key)&&(element[key]=properties[key]);return element},DomHandler.prototype._addDomElement=function(element){var parent=this._tagStack[this._tagStack.length-1],siblings=parent?parent.children:this.dom,previousSibling=siblings[siblings.length-1];element.next=null,this._options.withStartIndices&&(element.startIndex=this._parser.startIndex),this._options.withEndIndices&&(element.endIndex=this._parser.endIndex),previousSibling?(element.prev=previousSibling,previousSibling.next=element):element.prev=null,siblings.push(element),element.parent=parent||null},DomHandler.prototype.onopentag=function(name,attribs){var properties={type:"script"===name?ElementType.Script:"style"===name?ElementType.Style:ElementType.Tag,name:name,attribs:attribs,children:[]},element=this._createDomElement(properties);this._addDomElement(element),this._tagStack.push(element)},DomHandler.prototype.ontext=function(data){var lastTag,normalize=this._options.normalizeWhitespace||this._options.ignoreWhitespace;if(!this._tagStack.length&&this.dom.length&&(lastTag=this.dom[this.dom.length-1]).type===ElementType.Text)normalize?lastTag.data=(lastTag.data+data).replace(re_whitespace," "):lastTag.data+=data;else if(this._tagStack.length&&(lastTag=this._tagStack[this._tagStack.length-1])&&(lastTag=lastTag.children[lastTag.children.length-1])&&lastTag.type===ElementType.Text)normalize?lastTag.data=(lastTag.data+data).replace(re_whitespace," "):lastTag.data+=data;else{normalize&&(data=data.replace(re_whitespace," "));var element=this._createDomElement({data:data,type:ElementType.Text});this._addDomElement(element)}},DomHandler.prototype.oncomment=function(data){var lastTag=this._tagStack[this._tagStack.length-1];if(lastTag&&lastTag.type===ElementType.Comment)return void(lastTag.data+=data);var properties={data:data,type:ElementType.Comment},element=this._createDomElement(properties);this._addDomElement(element),this._tagStack.push(element)},DomHandler.prototype.oncdatastart=function(){var properties={children:[{data:"",type:ElementType.Text}],type:ElementType.CDATA},element=this._createDomElement(properties);this._addDomElement(element),this._tagStack.push(element)},DomHandler.prototype.oncommentend=DomHandler.prototype.oncdataend=function(){this._tagStack.pop()},DomHandler.prototype.onprocessinginstruction=function(name,data){var element=this._createDomElement({name:name,data:data,type:ElementType.Directive});this._addDomElement(element)},module.exports=DomHandler},function(module,exports,__webpack_require__){var NodePrototype=__webpack_require__(170),ElementPrototype=module.exports=Object.create(NodePrototype),domLvl1={tagName:"name"};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(ElementPrototype,key,{get:function(){return this[shorthand]||null},set:function(val){return this[shorthand]=val,val}})})},function(module,exports,__webpack_require__){function FeedHandler(callback,options){this.init(callback,options)}function getElements(what,where){return DomUtils.getElementsByTagName(what,where,!0)}function getOneElement(what,where){return DomUtils.getElementsByTagName(what,where,!0,1)[0]}function fetch(what,where,recurse){return DomUtils.getText(DomUtils.getElementsByTagName(what,where,recurse,1)).trim()}function addConditionally(obj,prop,what,where,recurse){var tmp=fetch(what,where,recurse);tmp&&(obj[prop]=tmp)}var index=__webpack_require__(13),DomHandler=index.DomHandler,DomUtils=index.DomUtils;__webpack_require__(22)(FeedHandler,DomHandler),FeedHandler.prototype.init=DomHandler;var isValidFeed=function(value){return"rss"===value||"feed"===value||"rdf:RDF"===value};FeedHandler.prototype.onend=function(){var tmp,childs,feed={},feedRoot=getOneElement(isValidFeed,this.dom);feedRoot&&("feed"===feedRoot.name?(childs=feedRoot.children,feed.type="atom",addConditionally(feed,"id","id",childs),addConditionally(feed,"title","title",childs),(tmp=getOneElement("link",childs))&&(tmp=tmp.attribs)&&(tmp=tmp.href)&&(feed.link=tmp),addConditionally(feed,"description","subtitle",childs),(tmp=fetch("updated",childs))&&(feed.updated=new Date(tmp)),addConditionally(feed,"author","email",childs,!0),feed.items=getElements("entry",childs).map(function(item){var tmp,entry={};return item=item.children,addConditionally(entry,"id","id",item),addConditionally(entry,"title","title",item),(tmp=getOneElement("link",item))&&(tmp=tmp.attribs)&&(tmp=tmp.href)&&(entry.link=tmp),(tmp=fetch("summary",item)||fetch("content",item))&&(entry.description=tmp),(tmp=fetch("updated",item))&&(entry.pubDate=new Date(tmp)),entry})):(childs=getOneElement("channel",feedRoot.children).children,feed.type=feedRoot.name.substr(0,3),feed.id="",addConditionally(feed,"title","title",childs),addConditionally(feed,"link","link",childs),addConditionally(feed,"description","description",childs),(tmp=fetch("lastBuildDate",childs))&&(feed.updated=new Date(tmp)),addConditionally(feed,"author","managingEditor",childs,!0),feed.items=getElements("item",feedRoot.children).map(function(item){var tmp,entry={};return item=item.children,addConditionally(entry,"id","guid",item),addConditionally(entry,"title","title",item),addConditionally(entry,"link","link",item),addConditionally(entry,"description","description",item),(tmp=fetch("pubDate",item))&&(entry.pubDate=new Date(tmp)),entry}))),this.dom=feed,DomHandler.prototype._handleCallback.call(this,feedRoot?null:Error("couldn't find root of feed"))},module.exports=FeedHandler},function(module,exports,__webpack_require__){function Stream(options){Parser.call(this,new Cbs(this),options)}function Cbs(scope){this.scope=scope}module.exports=Stream;var Parser=__webpack_require__(171);__webpack_require__(22)(Stream,Parser),Stream.prototype.readable=!0;var EVENTS=__webpack_require__(13).EVENTS;Object.keys(EVENTS).forEach(function(name){if(0===EVENTS[name])Cbs.prototype["on"+name]=function(){this.scope.emit(name)};else if(1===EVENTS[name])Cbs.prototype["on"+name]=function(a){this.scope.emit(name,a)};else{if(2!==EVENTS[name])throw Error("wrong number of arguments!");Cbs.prototype["on"+name]=function(a,b){this.scope.emit(name,a,b)}}})},function(module,exports){},function(module,exports,__webpack_require__){"use strict";function _normalizeEncoding(enc){if(!enc)return"utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if("string"!=typeof nenc&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(nb)}function utf8CheckByte(byte){return byte<=127?0:byte>>5==6?2:byte>>4==14?3:byte>>3==30?4:-1}function utf8CheckIncomplete(self,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self.lastNeed=nb-1),nb):--j<i?0:(nb=utf8CheckByte(buf[j]))>=0?(nb>0&&(self.lastNeed=nb-2),nb):--j<i?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(2===nb?nb=0:self.lastNeed=nb-3),nb):0)}function utf8CheckExtraBytes(self,buf,p){if(128!=(192&buf[0]))return self.lastNeed=0,"�".repeat(p);if(self.lastNeed>1&&buf.length>1){if(128!=(192&buf[1]))return self.lastNeed=1,"�".repeat(p+1);if(self.lastNeed>2&&buf.length>2&&128!=(192&buf[2]))return self.lastNeed=2,"�".repeat(p+2)}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf,p);return void 0!==r?r:this.lastNeed<=buf.length?(buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(buf.copy(this.lastChar,p,0,buf.length),void(this.lastNeed-=buf.length))}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"�".repeat(this.lastTotal-this.lastNeed):r}function utf16Text(buf,i){if((buf.length-i)%2==0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0===n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}var Buffer=__webpack_require__(237).Buffer,isEncoding=Buffer.isEncoding||function(encoding){switch((encoding=""+encoding)&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(void 0===(r=this.fillLast(buf)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length}},function(module,exports,__webpack_require__){function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}var buffer=__webpack_require__(172),Buffer=buffer.Buffer;Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0!==fill?"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},function(module,exports,__webpack_require__){"use strict";function placeHoldersCount(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===b64[len-2]?2:"="===b64[len-1]?1:0}function byteLength(b64){return 3*b64.length/4-placeHoldersCount(b64)}function toByteArray(b64){var i,l,tmp,placeHolders,arr,len=b64.length;placeHolders=placeHoldersCount(b64),arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0;i<l;i+=4)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[L++]=tmp>>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;return 2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp),arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]}function encodeChunk(uint8,start,end){for(var tmp,output=[],i=start;i<end;i+=3)tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output.push(tripletToBase64(tmp));return output.join("")}function fromByteArray(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,output="",parts=[],i=0,len2=len-extraBytes;i<len2;i+=16383)parts.push(encodeChunk(uint8,i,i+16383>len2?len2:i+16383));return 1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="="),parts.push(output),parts.join("")}exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},function(module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},function(module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},function(module,exports,__webpack_require__){function ProxyHandler(cbs){this._cbs=cbs||{}}module.exports=ProxyHandler;var EVENTS=__webpack_require__(13).EVENTS;Object.keys(EVENTS).forEach(function(name){if(0===EVENTS[name])name="on"+name,ProxyHandler.prototype[name]=function(){this._cbs[name]&&this._cbs[name]()};else if(1===EVENTS[name])name="on"+name,ProxyHandler.prototype[name]=function(a){this._cbs[name]&&this._cbs[name](a)};else{if(2!==EVENTS[name])throw Error("wrong number of arguments");name="on"+name,ProxyHandler.prototype[name]=function(a,b){this._cbs[name]&&this._cbs[name](a,b)}}})},function(module,exports,__webpack_require__){var DomUtils=module.exports;[__webpack_require__(243),__webpack_require__(249),__webpack_require__(250),__webpack_require__(251),__webpack_require__(252),__webpack_require__(253)].forEach(function(ext){Object.keys(ext).forEach(function(key){DomUtils[key]=ext[key].bind(DomUtils)})})},function(module,exports,__webpack_require__){function getInnerHTML(elem,opts){return elem.children?elem.children.map(function(elem){return getOuterHTML(elem,opts)}).join(""):""}function getText(elem){return Array.isArray(elem)?elem.map(getText).join(""):isTag(elem)?"br"===elem.name?"\n":getText(elem.children):elem.type===ElementType.CDATA?getText(elem.children):elem.type===ElementType.Text?elem.data:""}var ElementType=__webpack_require__(20),getOuterHTML=__webpack_require__(244),isTag=ElementType.isTag;module.exports={getInnerHTML:getInnerHTML,getOuterHTML:getOuterHTML,getText:getText}},function(module,exports,__webpack_require__){function formatAttrs(attributes,opts){if(attributes){var value,output="";for(var key in attributes)value=attributes[key],output&&(output+=" "),!value&&booleanAttributes[key]?output+=key:output+=key+'="'+(opts.decodeEntities?entities.encodeXML(value):value)+'"';return output}}function renderTag(elem,opts){"svg"===elem.name&&(opts={decodeEntities:opts.decodeEntities,xmlMode:!0});var tag="<"+elem.name,attribs=formatAttrs(elem.attribs,opts);return attribs&&(tag+=" "+attribs),!opts.xmlMode||elem.children&&0!==elem.children.length?(tag+=">",elem.children&&(tag+=render(elem.children,opts)),singleTag[elem.name]&&!opts.xmlMode||(tag+="</"+elem.name+">")):tag+="/>",tag}function renderDirective(elem){return"<"+elem.data+">"}function renderText(elem,opts){var data=elem.data||"";return!opts.decodeEntities||elem.parent&&elem.parent.name in unencodedElements||(data=entities.encodeXML(data)),data}function renderCdata(elem){return"<![CDATA["+elem.children[0].data+"]]>"}function renderComment(elem){return"\x3c!--"+elem.data+"--\x3e"}var ElementType=__webpack_require__(245),entities=__webpack_require__(246),booleanAttributes={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},unencodedElements={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},singleTag={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},render=module.exports=function(dom,opts){Array.isArray(dom)||dom.cheerio||(dom=[dom]),opts=opts||{};for(var output="",i=0;i<dom.length;i++){var elem=dom[i];"root"===elem.type?output+=render(elem.children,opts):ElementType.isTag(elem)?output+=renderTag(elem,opts):elem.type===ElementType.Directive?output+=renderDirective(elem):elem.type===ElementType.Comment?output+=renderComment(elem):elem.type===ElementType.CDATA?output+=renderCdata(elem):output+=renderText(elem,opts)}return output}},function(module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(elem){return"tag"===elem.type||"script"===elem.type||"style"===elem.type}}},function(module,exports,__webpack_require__){var encode=__webpack_require__(247),decode=__webpack_require__(248);exports.decode=function(data,level){return(!level||level<=0?decode.XML:decode.HTML)(data)},exports.decodeStrict=function(data,level){return(!level||level<=0?decode.XML:decode.HTMLStrict)(data)},exports.encode=function(data,level){return(!level||level<=0?encode.XML:encode.HTML)(data)},exports.encodeXML=encode.XML,exports.encodeHTML4=exports.encodeHTML5=exports.encodeHTML=encode.HTML,exports.decodeXML=exports.decodeXMLStrict=decode.XML,exports.decodeHTML4=exports.decodeHTML5=exports.decodeHTML=decode.HTML,exports.decodeHTML4Strict=exports.decodeHTML5Strict=exports.decodeHTMLStrict=decode.HTMLStrict,exports.escape=encode.escape},function(module,exports,__webpack_require__){function getInverseObj(obj){return Object.keys(obj).sort().reduce(function(inverse,name){return inverse[obj[name]]="&"+name+";",inverse},{})}function getInverseReplacer(inverse){var single=[],multiple=[];return Object.keys(inverse).forEach(function(k){1===k.length?single.push("\\"+k):multiple.push(k)}),multiple.unshift("["+single.join("")+"]"),new RegExp(multiple.join("|"),"g")}function singleCharReplacer(c){return"&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(c){return"&#x"+(1024*(c.charCodeAt(0)-55296)+c.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function getInverse(inverse,re){function func(name){return inverse[name]}return function(data){return data.replace(re,func).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}function escapeXML(data){return data.replace(re_xmlChars,singleCharReplacer).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}var inverseXML=getInverseObj(__webpack_require__(32)),xmlReplacer=getInverseReplacer(inverseXML);exports.XML=getInverse(inverseXML,xmlReplacer);var inverseHTML=getInverseObj(__webpack_require__(31)),htmlReplacer=getInverseReplacer(inverseHTML);exports.HTML=getInverse(inverseHTML,htmlReplacer);var re_nonASCII=/[^\0-\x7F]/g,re_astralSymbols=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,re_xmlChars=getInverseReplacer(inverseXML);exports.escape=escapeXML},function(module,exports,__webpack_require__){function getStrictDecoder(map){var keys=Object.keys(map).join("|"),replace=getReplacer(map);keys+="|#[xX][\\da-fA-F]+|#\\d+";var re=new RegExp("&(?:"+keys+");","g");return function(str){return String(str).replace(re,replace)}}function sorter(a,b){return a<b?1:-1}function getReplacer(map){return function(str){return"#"===str.charAt(1)?decodeCodePoint("X"===str.charAt(2)||"x"===str.charAt(2)?parseInt(str.substr(3),16):parseInt(str.substr(2),10)):map[str.slice(1,-1)]}}var entityMap=__webpack_require__(31),legacyMap=__webpack_require__(169),xmlMap=__webpack_require__(32),decodeCodePoint=__webpack_require__(168),decodeXMLStrict=getStrictDecoder(xmlMap),decodeHTMLStrict=getStrictDecoder(entityMap),decodeHTML=function(){function replacer(str){return";"!==str.substr(-1)&&(str+=";"),replace(str)}for(var legacy=Object.keys(legacyMap).sort(sorter),keys=Object.keys(entityMap).sort(sorter),i=0,j=0;i<keys.length;i++)legacy[j]===keys[i]?(keys[i]+=";?",j++):keys[i]+=";";var re=new RegExp("&(?:"+keys.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),replace=getReplacer(entityMap);return function(str){return String(str).replace(re,replacer)}}();module.exports={XML:decodeXMLStrict,HTML:decodeHTML,HTMLStrict:decodeHTMLStrict}},function(module,exports){var getChildren=exports.getChildren=function(elem){return elem.children},getParent=exports.getParent=function(elem){return elem.parent};exports.getSiblings=function(elem){var parent=getParent(elem);return parent?getChildren(parent):[elem]},exports.getAttributeValue=function(elem,name){return elem.attribs&&elem.attribs[name]},exports.hasAttrib=function(elem,name){return!!elem.attribs&&hasOwnProperty.call(elem.attribs,name)},exports.getName=function(elem){return elem.name}},function(module,exports){exports.removeElement=function(elem){if(elem.prev&&(elem.prev.next=elem.next),elem.next&&(elem.next.prev=elem.prev),elem.parent){var childs=elem.parent.children;childs.splice(childs.lastIndexOf(elem),1)}},exports.replaceElement=function(elem,replacement){var prev=replacement.prev=elem.prev;prev&&(prev.next=replacement);var next=replacement.next=elem.next;next&&(next.prev=replacement);var parent=replacement.parent=elem.parent;if(parent){var childs=parent.children;childs[childs.lastIndexOf(elem)]=replacement}},exports.appendChild=function(elem,child){if(child.parent=elem,1!==elem.children.push(child)){var sibling=elem.children[elem.children.length-2];sibling.next=child,child.prev=sibling,child.next=null}},exports.append=function(elem,next){var parent=elem.parent,currNext=elem.next;if(next.next=currNext,next.prev=elem,elem.next=next,next.parent=parent,currNext){if(currNext.prev=next,parent){var childs=parent.children;childs.splice(childs.lastIndexOf(currNext),0,next)}}else parent&&parent.children.push(next)},exports.prepend=function(elem,prev){var parent=elem.parent;if(parent){var childs=parent.children;childs.splice(childs.lastIndexOf(elem),0,prev)}elem.prev&&(elem.prev.next=prev),prev.parent=parent,prev.prev=elem.prev,prev.next=elem,elem.prev=prev}},function(module,exports,__webpack_require__){function filter(test,element,recurse,limit){return Array.isArray(element)||(element=[element]),"number"==typeof limit&&isFinite(limit)||(limit=1/0),find(test,element,!1!==recurse,limit)}function find(test,elems,recurse,limit){for(var childs,result=[],i=0,j=elems.length;i<j&&!(test(elems[i])&&(result.push(elems[i]),--limit<=0))&&(childs=elems[i].children,!(recurse&&childs&&childs.length>0&&(childs=find(test,childs,recurse,limit),result=result.concat(childs),(limit-=childs.length)<=0)));i++);return result}function findOneChild(test,elems){for(var i=0,l=elems.length;i<l;i++)if(test(elems[i]))return elems[i];return null}function findOne(test,elems){for(var elem=null,i=0,l=elems.length;i<l&&!elem;i++)isTag(elems[i])&&(test(elems[i])?elem=elems[i]:elems[i].children.length>0&&(elem=findOne(test,elems[i].children)));return elem}function existsOne(test,elems){for(var i=0,l=elems.length;i<l;i++)if(isTag(elems[i])&&(test(elems[i])||elems[i].children.length>0&&existsOne(test,elems[i].children)))return!0;return!1}function findAll(test,rootElems){for(var result=[],stack=rootElems.slice();stack.length;){var elem=stack.shift();isTag(elem)&&(elem.children&&elem.children.length>0&&stack.unshift.apply(stack,elem.children),test(elem)&&result.push(elem))}return result}var isTag=__webpack_require__(20).isTag;module.exports={filter:filter,find:find,findOneChild:findOneChild,findOne:findOne,existsOne:existsOne,findAll:findAll}},function(module,exports,__webpack_require__){function getAttribCheck(attrib,value){return"function"==typeof value?function(elem){return elem.attribs&&value(elem.attribs[attrib])}:function(elem){return elem.attribs&&elem.attribs[attrib]===value}}function combineFuncs(a,b){return function(elem){return a(elem)||b(elem)}}var ElementType=__webpack_require__(20),isTag=exports.isTag=ElementType.isTag;exports.testElement=function(options,element){for(var key in options)if(options.hasOwnProperty(key)){if("tag_name"===key){if(!isTag(element)||!options.tag_name(element.name))return!1}else if("tag_type"===key){if(!options.tag_type(element.type))return!1}else if("tag_contains"===key){if(isTag(element)||!options.tag_contains(element.data))return!1}else if(!element.attribs||!options[key](element.attribs[key]))return!1}else;return!0};var Checks={tag_name:function(name){return"function"==typeof name?function(elem){return isTag(elem)&&name(elem.name)}:"*"===name?isTag:function(elem){return isTag(elem)&&elem.name===name}},tag_type:function(type){return"function"==typeof type?function(elem){return type(elem.type)}:function(elem){return elem.type===type}},tag_contains:function(data){return"function"==typeof data?function(elem){return!isTag(elem)&&data(elem.data)}:function(elem){return!isTag(elem)&&elem.data===data}}};exports.getElements=function(options,element,recurse,limit){var funcs=Object.keys(options).map(function(key){var value=options[key];return key in Checks?Checks[key](value):getAttribCheck(key,value)});return 0===funcs.length?[]:this.filter(funcs.reduce(combineFuncs),element,recurse,limit)},exports.getElementById=function(id,element,recurse){return Array.isArray(element)||(element=[element]),this.findOne(getAttribCheck("id",id),element,!1!==recurse)},exports.getElementsByTagName=function(name,element,recurse,limit){return this.filter(Checks.tag_name(name),element,recurse,limit)},exports.getElementsByTagType=function(type,element,recurse,limit){return this.filter(Checks.tag_type(type),element,recurse,limit)}},function(module,exports){exports.removeSubsets=function(nodes){for(var node,ancestor,replace,idx=nodes.length;--idx>-1;){for(node=ancestor=nodes[idx],nodes[idx]=null,replace=!0;ancestor;){if(nodes.indexOf(ancestor)>-1){replace=!1,nodes.splice(idx,1);break}ancestor=ancestor.parent}replace&&(nodes[idx]=node)}return nodes};var POSITION={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},comparePos=exports.compareDocumentPosition=function(nodeA,nodeB){var current,sharedParent,siblings,aSibling,bSibling,idx,aParents=[],bParents=[];if(nodeA===nodeB)return 0;for(current=nodeA;current;)aParents.unshift(current),current=current.parent;for(current=nodeB;current;)bParents.unshift(current),current=current.parent;for(idx=0;aParents[idx]===bParents[idx];)idx++;return 0===idx?POSITION.DISCONNECTED:(sharedParent=aParents[idx-1],siblings=sharedParent.children,aSibling=aParents[idx],bSibling=bParents[idx],siblings.indexOf(aSibling)>siblings.indexOf(bSibling)?sharedParent===nodeB?POSITION.FOLLOWING|POSITION.CONTAINED_BY:POSITION.FOLLOWING:sharedParent===nodeA?POSITION.PRECEDING|POSITION.CONTAINS:POSITION.PRECEDING)};exports.uniqueSort=function(nodes){var node,position,idx=nodes.length;for(nodes=nodes.slice();--idx>-1;)node=nodes[idx],(position=nodes.indexOf(node))>-1&&position<idx&&nodes.splice(idx,1);return nodes.sort(function(a,b){var relative=comparePos(a,b);return relative&POSITION.PRECEDING?-1:relative&POSITION.FOLLOWING?1:0}),nodes}},function(module,exports,__webpack_require__){function CollectingHandler(cbs){this._cbs=cbs||{},this.events=[]}module.exports=CollectingHandler;var EVENTS=__webpack_require__(13).EVENTS;Object.keys(EVENTS).forEach(function(name){if(0===EVENTS[name])name="on"+name,CollectingHandler.prototype[name]=function(){this.events.push([name]),this._cbs[name]&&this._cbs[name]()};else if(1===EVENTS[name])name="on"+name,CollectingHandler.prototype[name]=function(a){this.events.push([name,a]),this._cbs[name]&&this._cbs[name](a)};else{if(2!==EVENTS[name])throw Error("wrong number of arguments");name="on"+name,CollectingHandler.prototype[name]=function(a,b){this.events.push([name,a,b]),this._cbs[name]&&this._cbs[name](a,b)}}}),CollectingHandler.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},CollectingHandler.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var i=0,len=this.events.length;i<len;i++)if(this._cbs[this.events[i][0]]){var num=this.events[i].length;1===num?this._cbs[this.events[i][0]]():2===num?this._cbs[this.events[i][0]](this.events[i][1]):this._cbs[this.events[i][0]](this.events[i][1],this.events[i][2])}}},function(module,exports,__webpack_require__){"use strict";function TextElementType(node){return node.data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=TextElementType},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function TagElementType(node,index,transform){var tagName=node.name;if(!(0,_isValidTagOrAttributeName2.default)(tagName))return null;var props=(0,_generatePropsFromAttributes2.default)(node.attribs,index),children=null;return-1===_VoidElements2.default.indexOf(tagName)&&(children=(0,_processNodes2.default)(node.children,transform)),_react2.default.createElement(tagName,props,children)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=TagElementType;var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_processNodes=__webpack_require__(30),_processNodes2=_interopRequireDefault(_processNodes),_generatePropsFromAttributes=__webpack_require__(173),_generatePropsFromAttributes2=_interopRequireDefault(_generatePropsFromAttributes),_VoidElements=__webpack_require__(261),_VoidElements2=_interopRequireDefault(_VoidElements),_isValidTagOrAttributeName=__webpack_require__(174),_isValidTagOrAttributeName2=_interopRequireDefault(_isValidTagOrAttributeName)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function htmlAttributesToReact(attributes){return Object.keys(attributes).filter(function(attr){return(0,_isValidTagOrAttributeName2.default)(attr)}).reduce(function(mappedAttributes,attribute){var lowerCaseAttribute=attribute.toLowerCase(),name=_ReactAttributes2.default[lowerCaseAttribute]||lowerCaseAttribute;return mappedAttributes[name]=getParsedAttributeValue(name,attributes[attribute]),mappedAttributes},{})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=htmlAttributesToReact;var _BooleanAttributes=__webpack_require__(258),_BooleanAttributes2=_interopRequireDefault(_BooleanAttributes),_ReactAttributes=__webpack_require__(259),_ReactAttributes2=_interopRequireDefault(_ReactAttributes),_isValidTagOrAttributeName=__webpack_require__(174),_isValidTagOrAttributeName2=_interopRequireDefault(_isValidTagOrAttributeName),getParsedAttributeValue=function(attribute,value){return _BooleanAttributes2.default.map(function(attr){return attr.toLowerCase()}).indexOf(attribute.toLowerCase())>=0&&(value=attribute),value}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=["allowfullScreen","async","autoplay","capture","checked","controls","default","defer","disabled","formnovalidate","hidden","loop","multiple","muted","novalidate","open","playsinline","readonly","required","reversed","scoped","seamless","selected","itemscope"]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={accept:"accept","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",allowtransparency:"allowTransparency",alt:"alt",as:"as",async:"async",autocomplete:"autoComplete",autoplay:"autoPlay",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",challenge:"challenge",checked:"checked",cite:"cite",classid:"classID",class:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlsList:"controlsList",coords:"coords",crossorigin:"crossOrigin",data:"data",datetime:"dateTime",default:"default",defer:"defer",dir:"dir",disabled:"disabled",download:"download",draggable:"draggable",enctype:"encType",form:"form",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",for:"htmlFor","http-equiv":"httpEquiv",icon:"icon",id:"id",inputmode:"inputMode",integrity:"integrity",is:"is",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginheight:"marginHeight",marginwidth:"marginWidth",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",slot:"slot",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",datatype:"datatype",inlist:"inlist",prefix:"prefix",property:"property",resource:"resource",typeof:"typeof",vocab:"vocab",autocapitalize:"autoCapitalize",autocorrect:"autoCorrect",autosave:"autoSave",color:"color",itemprop:"itemProp",itemscope:"itemScope",itemtype:"itemType",itemid:"itemID",itemref:"itemRef",results:"results",security:"security",unselectable:"unselectable"}},function(module,exports,__webpack_require__){"use strict";function InlineStyleToObject(){var inlineStyle=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return""===inlineStyle?{}:inlineStyle.split(";").reduce(function(styleObject,stylePropertyValue){var _stylePropertyValue$s=stylePropertyValue.split(/^([^:]+):/).filter(function(val,i){return i>0}).map(function(item){return item.trim().toLowerCase()}),_stylePropertyValue$s2=_slicedToArray(_stylePropertyValue$s,2),property=_stylePropertyValue$s2[0],value=_stylePropertyValue$s2[1];return void 0===value?styleObject:(property=property.replace(/^-ms-/,"ms-").replace(/-(.)/g,function(_,character){return character.toUpperCase()}),styleObject[property]=value,styleObject)},{})}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports.default=InlineStyleToObject},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function StyleElementType(node,index){var styles=void 0;node.children.length>0&&(styles=node.children[0].data);var props=(0,_generatePropsFromAttributes2.default)(node.attribs,index);return _react2.default.createElement("style",props,styles)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=StyleElementType;var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_generatePropsFromAttributes=__webpack_require__(173),_generatePropsFromAttributes2=_interopRequireDefault(_generatePropsFromAttributes)},function(module,exports,__webpack_require__){"use strict";function UnsupportedElementType(){return null}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=UnsupportedElementType},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function HtmlParser(html){var _ref=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_ref$decodeEntities=_ref.decodeEntities,decodeEntities=void 0===_ref$decodeEntities||_ref$decodeEntities,transform=_ref.transform,_ref$preprocessNodes=_ref.preprocessNodes,preprocessNodes=void 0===_ref$preprocessNodes?function(nodes){return nodes}:_ref$preprocessNodes,nodes=preprocessNodes(_htmlparser2.default.parseDOM(html,{decodeEntities:decodeEntities}));return(0,_processNodes2.default)(nodes,transform)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=HtmlParser;var _htmlparser=__webpack_require__(13),_htmlparser2=_interopRequireDefault(_htmlparser),_processNodes=__webpack_require__(30),_processNodes2=_interopRequireDefault(_processNodes)},,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fromNewsletter=exports.fromUrl=exports.fromDom=void 0;var _underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_html2canvas=__webpack_require__(278),_html2canvas2=_interopRequireDefault(_html2canvas),fromDom=exports.fromDom=function(element){return(0,_html2canvas2.default)(element,{logging:!1}).then(function(canvas){return canvas.toDataURL("image/jpeg")})},fromUrl=exports.fromUrl=function(url){return new Promise(function(resolve,reject){var iframe=document.createElement("iframe"),protocol=location.href.startsWith("https://")?"https:":"http:";iframe.src=protocol+url.replace(/^https?:/,""),iframe.style.opacity=0,iframe.scrolling="no",iframe.onload=function(){fromDom(iframe.contentDocument.documentElement).then(function(image){document.body.removeChild(iframe),resolve(image)}).catch(function(){document.body.removeChild(iframe),reject(_mailpoet2.default.I18n.t("errorWhileTakingScreenshot"))})};var onError=function(){document.body.removeChild(iframe),reject(_mailpoet2.default.I18n.t("errorWhileTakingScreenshot"))};iframe.onerror=onError,iframe.onError=onError,iframe.className="mailpoet_template_iframe";try{document.body.appendChild(iframe)}catch(err){onError()}})};exports.fromNewsletter=function(data){return new Promise(function(resolve,reject){var json=data;_underscore2.default.isUndefined(json.body)||(json.body=JSON.stringify(json.body)),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"showPreview",data:json}).done(function(response){return fromUrl(response.meta.preview_url).then(resolve).catch(reject)}).fail(function(response){return reject(response.errors)})})}},function(module,exports,__webpack_require__){(function(global){module.exports=global.html2canvas=__webpack_require__(279)}).call(exports,__webpack_require__(6))},function(module,exports,__webpack_require__){/*!
|
8 |
-
* html2canvas 1.0.0-alpha.12 <https://html2canvas.hertzen.com>
|
9 |
-
* Copyright (c) 2018 Niklas von Hertzen <https://hertzen.com>
|
10 |
-
* Released under MIT License
|
11 |
-
*/
|
12 |
-
!function(root,factory){module.exports=factory()}(0,function(){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=27)}([function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),HEX3=/^#([a-f0-9]{3})$/i,hex3=function(value){var match=value.match(HEX3);return!!match&&[parseInt(match[1][0]+match[1][0],16),parseInt(match[1][1]+match[1][1],16),parseInt(match[1][2]+match[1][2],16),null]},HEX6=/^#([a-f0-9]{6})$/i,hex6=function(value){var match=value.match(HEX6);return!!match&&[parseInt(match[1].substring(0,2),16),parseInt(match[1].substring(2,4),16),parseInt(match[1].substring(4,6),16),null]},RGB=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,rgb=function(value){var match=value.match(RGB);return!!match&&[Number(match[1]),Number(match[2]),Number(match[3]),null]},RGBA=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/,rgba=function(value){var match=value.match(RGBA);return!!(match&&match.length>4)&&[Number(match[1]),Number(match[2]),Number(match[3]),Number(match[4])]},fromArray=function(array){return[Math.min(array[0],255),Math.min(array[1],255),Math.min(array[2],255),array.length>3?array[3]:null]},namedColor=function(name){var color=NAMED_COLORS[name.toLowerCase()];return color||!1},Color=function(){function Color(value){_classCallCheck(this,Color);var _ref=Array.isArray(value)?fromArray(value):hex3(value)||rgb(value)||rgba(value)||namedColor(value)||hex6(value)||[0,0,0,null],_ref2=_slicedToArray(_ref,4),r=_ref2[0],g=_ref2[1],b=_ref2[2],a=_ref2[3];this.r=r,this.g=g,this.b=b,this.a=a}return _createClass(Color,[{key:"isTransparent",value:function(){return 0===this.a}},{key:"toString",value:function(){return null!==this.a&&1!==this.a?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":"rgb("+this.r+","+this.g+","+this.b+")"}}]),Color}();exports.default=Color;var NAMED_COLORS={transparent:[0,0,0,0],aliceblue:[240,248,255,null],antiquewhite:[250,235,215,null],aqua:[0,255,255,null],aquamarine:[127,255,212,null],azure:[240,255,255,null],beige:[245,245,220,null],bisque:[255,228,196,null],black:[0,0,0,null],blanchedalmond:[255,235,205,null],blue:[0,0,255,null],blueviolet:[138,43,226,null],brown:[165,42,42,null],burlywood:[222,184,135,null],cadetblue:[95,158,160,null],chartreuse:[127,255,0,null],chocolate:[210,105,30,null],coral:[255,127,80,null],cornflowerblue:[100,149,237,null],cornsilk:[255,248,220,null],crimson:[220,20,60,null],cyan:[0,255,255,null],darkblue:[0,0,139,null],darkcyan:[0,139,139,null],darkgoldenrod:[184,134,11,null],darkgray:[169,169,169,null],darkgreen:[0,100,0,null],darkgrey:[169,169,169,null],darkkhaki:[189,183,107,null],darkmagenta:[139,0,139,null],darkolivegreen:[85,107,47,null],darkorange:[255,140,0,null],darkorchid:[153,50,204,null],darkred:[139,0,0,null],darksalmon:[233,150,122,null],darkseagreen:[143,188,143,null],darkslateblue:[72,61,139,null],darkslategray:[47,79,79,null],darkslategrey:[47,79,79,null],darkturquoise:[0,206,209,null],darkviolet:[148,0,211,null],deeppink:[255,20,147,null],deepskyblue:[0,191,255,null],dimgray:[105,105,105,null],dimgrey:[105,105,105,null],dodgerblue:[30,144,255,null],firebrick:[178,34,34,null],floralwhite:[255,250,240,null],forestgreen:[34,139,34,null],fuchsia:[255,0,255,null],gainsboro:[220,220,220,null],ghostwhite:[248,248,255,null],gold:[255,215,0,null],goldenrod:[218,165,32,null],gray:[128,128,128,null],green:[0,128,0,null],greenyellow:[173,255,47,null],grey:[128,128,128,null],honeydew:[240,255,240,null],hotpink:[255,105,180,null],indianred:[205,92,92,null],indigo:[75,0,130,null],ivory:[255,255,240,null],khaki:[240,230,140,null],lavender:[230,230,250,null],lavenderblush:[255,240,245,null],lawngreen:[124,252,0,null],lemonchiffon:[255,250,205,null],lightblue:[173,216,230,null],lightcoral:[240,128,128,null],lightcyan:[224,255,255,null],lightgoldenrodyellow:[250,250,210,null],lightgray:[211,211,211,null],lightgreen:[144,238,144,null],lightgrey:[211,211,211,null],lightpink:[255,182,193,null],lightsalmon:[255,160,122,null],lightseagreen:[32,178,170,null],lightskyblue:[135,206,250,null],lightslategray:[119,136,153,null],lightslategrey:[119,136,153,null],lightsteelblue:[176,196,222,null],lightyellow:[255,255,224,null],lime:[0,255,0,null],limegreen:[50,205,50,null],linen:[250,240,230,null],magenta:[255,0,255,null],maroon:[128,0,0,null],mediumaquamarine:[102,205,170,null],mediumblue:[0,0,205,null],mediumorchid:[186,85,211,null],mediumpurple:[147,112,219,null],mediumseagreen:[60,179,113,null],mediumslateblue:[123,104,238,null],mediumspringgreen:[0,250,154,null],mediumturquoise:[72,209,204,null],mediumvioletred:[199,21,133,null],midnightblue:[25,25,112,null],mintcream:[245,255,250,null],mistyrose:[255,228,225,null],moccasin:[255,228,181,null],navajowhite:[255,222,173,null],navy:[0,0,128,null],oldlace:[253,245,230,null],olive:[128,128,0,null],olivedrab:[107,142,35,null],orange:[255,165,0,null],orangered:[255,69,0,null],orchid:[218,112,214,null],palegoldenrod:[238,232,170,null],palegreen:[152,251,152,null],paleturquoise:[175,238,238,null],palevioletred:[219,112,147,null],papayawhip:[255,239,213,null],peachpuff:[255,218,185,null],peru:[205,133,63,null],pink:[255,192,203,null],plum:[221,160,221,null],powderblue:[176,224,230,null],purple:[128,0,128,null],rebeccapurple:[102,51,153,null],red:[255,0,0,null],rosybrown:[188,143,143,null],royalblue:[65,105,225,null],saddlebrown:[139,69,19,null],salmon:[250,128,114,null],sandybrown:[244,164,96,null],seagreen:[46,139,87,null],seashell:[255,245,238,null],sienna:[160,82,45,null],silver:[192,192,192,null],skyblue:[135,206,235,null],slateblue:[106,90,205,null],slategray:[112,128,144,null],slategrey:[112,128,144,null],snow:[255,250,250,null],springgreen:[0,255,127,null],steelblue:[70,130,180,null],tan:[210,180,140,null],teal:[0,128,128,null],thistle:[216,191,216,null],tomato:[255,99,71,null],turquoise:[64,224,208,null],violet:[238,130,238,null],wheat:[245,222,179,null],white:[255,255,255,null],whitesmoke:[245,245,245,null],yellow:[255,255,0,null],yellowgreen:[154,205,50,null]};exports.TRANSPARENT=new Color([0,0,0,0])},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.calculateLengthFromValueWithUnit=exports.LENGTH_TYPE=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_NodeContainer=__webpack_require__(3),LENGTH_TYPE=(function(obj){obj&&obj.__esModule}(_NodeContainer),exports.LENGTH_TYPE={PX:0,PERCENTAGE:1}),Length=function(){function Length(value){_classCallCheck(this,Length),this.type="%"===value.substr(value.length-1)?LENGTH_TYPE.PERCENTAGE:LENGTH_TYPE.PX;var parsedValue=parseFloat(value);isNaN(parsedValue)&&console.error('Invalid value given for Length: "'+value+'"'),this.value=isNaN(parsedValue)?0:parsedValue}return _createClass(Length,[{key:"isPercentage",value:function(){return this.type===LENGTH_TYPE.PERCENTAGE}},{key:"getAbsoluteValue",value:function(parentLength){return this.isPercentage()?parentLength*(this.value/100):this.value}}],[{key:"create",value:function(v){return new Length(v)}}]),Length}();exports.default=Length;var getRootFontSize=function getRootFontSize(container){var parent=container.parent;return parent?getRootFontSize(parent):parseFloat(container.style.font.fontSize)};exports.calculateLengthFromValueWithUnit=function(container,value,unit){switch(unit){case"px":case"%":return new Length(value+unit);case"em":case"rem":var length=new Length(value);return length.value*="em"===unit?parseFloat(container.style.font.fontSize):getRootFontSize(container),length;default:return new Length("0")}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseBoundCurves=exports.calculatePaddingBoxPath=exports.calculateBorderBoxPath=exports.parsePathForBorder=exports.parseDocumentSize=exports.calculateContentBox=exports.calculatePaddingBox=exports.parseBounds=exports.Bounds=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Vector=__webpack_require__(7),_Vector2=_interopRequireDefault(_Vector),_BezierCurve=__webpack_require__(32),_BezierCurve2=_interopRequireDefault(_BezierCurve),Bounds=exports.Bounds=function(){function Bounds(x,y,w,h){_classCallCheck(this,Bounds),this.left=x,this.top=y,this.width=w,this.height=h}return _createClass(Bounds,null,[{key:"fromClientRect",value:function(clientRect,scrollX,scrollY){return new Bounds(clientRect.left+scrollX,clientRect.top+scrollY,clientRect.width,clientRect.height)}}]),Bounds}(),createPathFromCurves=(exports.parseBounds=function(node,scrollX,scrollY){return Bounds.fromClientRect(node.getBoundingClientRect(),scrollX,scrollY)},exports.calculatePaddingBox=function(bounds,borders){return new Bounds(bounds.left+borders[3].borderWidth,bounds.top+borders[0].borderWidth,bounds.width-(borders[1].borderWidth+borders[3].borderWidth),bounds.height-(borders[0].borderWidth+borders[2].borderWidth))},exports.calculateContentBox=function(bounds,padding,borders){var paddingTop=padding[0].value,paddingRight=padding[1].value,paddingBottom=padding[2].value,paddingLeft=padding[3].value;return new Bounds(bounds.left+paddingLeft+borders[3].borderWidth,bounds.top+paddingTop+borders[0].borderWidth,bounds.width-(borders[1].borderWidth+borders[3].borderWidth+paddingLeft+paddingRight),bounds.height-(borders[0].borderWidth+borders[2].borderWidth+paddingTop+paddingBottom))},exports.parseDocumentSize=function(document){var body=document.body,documentElement=document.documentElement;if(!body||!documentElement)throw new Error("Unable to get document size");var width=Math.max(Math.max(body.scrollWidth,documentElement.scrollWidth),Math.max(body.offsetWidth,documentElement.offsetWidth),Math.max(body.clientWidth,documentElement.clientWidth)),height=Math.max(Math.max(body.scrollHeight,documentElement.scrollHeight),Math.max(body.offsetHeight,documentElement.offsetHeight),Math.max(body.clientHeight,documentElement.clientHeight));return new Bounds(0,0,width,height)},exports.parsePathForBorder=function(curves,borderSide){switch(borderSide){case 0:return createPathFromCurves(curves.topLeftOuter,curves.topLeftInner,curves.topRightOuter,curves.topRightInner);case 1:return createPathFromCurves(curves.topRightOuter,curves.topRightInner,curves.bottomRightOuter,curves.bottomRightInner);case 2:return createPathFromCurves(curves.bottomRightOuter,curves.bottomRightInner,curves.bottomLeftOuter,curves.bottomLeftInner);case 3:default:return createPathFromCurves(curves.bottomLeftOuter,curves.bottomLeftInner,curves.topLeftOuter,curves.topLeftInner)}},function(outer1,inner1,outer2,inner2){var path=[];return outer1 instanceof _BezierCurve2.default?path.push(outer1.subdivide(.5,!1)):path.push(outer1),outer2 instanceof _BezierCurve2.default?path.push(outer2.subdivide(.5,!0)):path.push(outer2),inner2 instanceof _BezierCurve2.default?path.push(inner2.subdivide(.5,!0).reverse()):path.push(inner2),inner1 instanceof _BezierCurve2.default?path.push(inner1.subdivide(.5,!1).reverse()):path.push(inner1),path}),CORNER=(exports.calculateBorderBoxPath=function(curves){return[curves.topLeftOuter,curves.topRightOuter,curves.bottomRightOuter,curves.bottomLeftOuter]},exports.calculatePaddingBoxPath=function(curves){return[curves.topLeftInner,curves.topRightInner,curves.bottomRightInner,curves.bottomLeftInner]},exports.parseBoundCurves=function(bounds,borders,borderRadius){var tlh=borderRadius[CORNER.TOP_LEFT][0].getAbsoluteValue(bounds.width),tlv=borderRadius[CORNER.TOP_LEFT][1].getAbsoluteValue(bounds.height),trh=borderRadius[CORNER.TOP_RIGHT][0].getAbsoluteValue(bounds.width),trv=borderRadius[CORNER.TOP_RIGHT][1].getAbsoluteValue(bounds.height),brh=borderRadius[CORNER.BOTTOM_RIGHT][0].getAbsoluteValue(bounds.width),brv=borderRadius[CORNER.BOTTOM_RIGHT][1].getAbsoluteValue(bounds.height),blh=borderRadius[CORNER.BOTTOM_LEFT][0].getAbsoluteValue(bounds.width),blv=borderRadius[CORNER.BOTTOM_LEFT][1].getAbsoluteValue(bounds.height),factors=[];factors.push((tlh+trh)/bounds.width),factors.push((blh+brh)/bounds.width),factors.push((tlv+blv)/bounds.height),factors.push((trv+brv)/bounds.height);var maxFactor=Math.max.apply(Math,factors);maxFactor>1&&(tlh/=maxFactor,tlv/=maxFactor,trh/=maxFactor,trv/=maxFactor,brh/=maxFactor,brv/=maxFactor,blh/=maxFactor,blv/=maxFactor);var topWidth=bounds.width-trh,rightHeight=bounds.height-brv,bottomWidth=bounds.width-brh,leftHeight=bounds.height-blv;return{topLeftOuter:tlh>0||tlv>0?getCurvePoints(bounds.left,bounds.top,tlh,tlv,CORNER.TOP_LEFT):new _Vector2.default(bounds.left,bounds.top),topLeftInner:tlh>0||tlv>0?getCurvePoints(bounds.left+borders[3].borderWidth,bounds.top+borders[0].borderWidth,Math.max(0,tlh-borders[3].borderWidth),Math.max(0,tlv-borders[0].borderWidth),CORNER.TOP_LEFT):new _Vector2.default(bounds.left+borders[3].borderWidth,bounds.top+borders[0].borderWidth),topRightOuter:trh>0||trv>0?getCurvePoints(bounds.left+topWidth,bounds.top,trh,trv,CORNER.TOP_RIGHT):new _Vector2.default(bounds.left+bounds.width,bounds.top),topRightInner:trh>0||trv>0?getCurvePoints(bounds.left+Math.min(topWidth,bounds.width+borders[3].borderWidth),bounds.top+borders[0].borderWidth,topWidth>bounds.width+borders[3].borderWidth?0:trh-borders[3].borderWidth,trv-borders[0].borderWidth,CORNER.TOP_RIGHT):new _Vector2.default(bounds.left+bounds.width-borders[1].borderWidth,bounds.top+borders[0].borderWidth),bottomRightOuter:brh>0||brv>0?getCurvePoints(bounds.left+bottomWidth,bounds.top+rightHeight,brh,brv,CORNER.BOTTOM_RIGHT):new _Vector2.default(bounds.left+bounds.width,bounds.top+bounds.height),bottomRightInner:brh>0||brv>0?getCurvePoints(bounds.left+Math.min(bottomWidth,bounds.width-borders[3].borderWidth),bounds.top+Math.min(rightHeight,bounds.height+borders[0].borderWidth),Math.max(0,brh-borders[1].borderWidth),brv-borders[2].borderWidth,CORNER.BOTTOM_RIGHT):new _Vector2.default(bounds.left+bounds.width-borders[1].borderWidth,bounds.top+bounds.height-borders[2].borderWidth),bottomLeftOuter:blh>0||blv>0?getCurvePoints(bounds.left,bounds.top+leftHeight,blh,blv,CORNER.BOTTOM_LEFT):new _Vector2.default(bounds.left,bounds.top+bounds.height),bottomLeftInner:blh>0||blv>0?getCurvePoints(bounds.left+borders[3].borderWidth,bounds.top+leftHeight,Math.max(0,blh-borders[3].borderWidth),blv-borders[2].borderWidth,CORNER.BOTTOM_LEFT):new _Vector2.default(bounds.left+borders[3].borderWidth,bounds.top+bounds.height-borders[2].borderWidth)}},{TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_RIGHT:2,BOTTOM_LEFT:3}),getCurvePoints=function(x,y,r1,r2,position){var kappa=(Math.sqrt(2)-1)/3*4,ox=r1*kappa,oy=r2*kappa,xm=x+r1,ym=y+r2;switch(position){case CORNER.TOP_LEFT:return new _BezierCurve2.default(new _Vector2.default(x,ym),new _Vector2.default(x,ym-oy),new _Vector2.default(xm-ox,y),new _Vector2.default(xm,y));case CORNER.TOP_RIGHT:return new _BezierCurve2.default(new _Vector2.default(x,y),new _Vector2.default(x+ox,y),new _Vector2.default(xm,ym-oy),new _Vector2.default(xm,ym));case CORNER.BOTTOM_RIGHT:return new _BezierCurve2.default(new _Vector2.default(xm,y),new _Vector2.default(xm,y+oy),new _Vector2.default(x+ox,ym),new _Vector2.default(x,ym));case CORNER.BOTTOM_LEFT:default:return new _BezierCurve2.default(new _Vector2.default(xm,ym),new _Vector2.default(xm-ox,ym),new _Vector2.default(x,y+oy),new _Vector2.default(x,y))}}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Color=__webpack_require__(0),_Color2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Color),_Util=__webpack_require__(4),_background=__webpack_require__(5),_border=__webpack_require__(12),_borderRadius=__webpack_require__(33),_display=__webpack_require__(34),_float=__webpack_require__(35),_font=__webpack_require__(36),_letterSpacing=__webpack_require__(37),_lineBreak=__webpack_require__(38),_listStyle=__webpack_require__(8),_margin=__webpack_require__(39),_overflow=__webpack_require__(40),_overflowWrap=__webpack_require__(18),_padding=__webpack_require__(17),_position=__webpack_require__(19),_textDecoration=__webpack_require__(11),_textShadow=__webpack_require__(41),_textTransform=__webpack_require__(20),_transform=__webpack_require__(42),_visibility=__webpack_require__(43),_wordBreak=__webpack_require__(44),_zIndex=__webpack_require__(45),_Bounds=__webpack_require__(2),_Input=__webpack_require__(21),_ListItem=__webpack_require__(14),INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],NodeContainer=function(){function NodeContainer(node,parent,resourceLoader,index){var _this=this;_classCallCheck(this,NodeContainer),this.parent=parent,this.tagName=node.tagName,this.index=index,this.childNodes=[],this.listItems=[],"number"==typeof node.start&&(this.listStart=node.start);var defaultView=node.ownerDocument.defaultView,scrollX=defaultView.pageXOffset,scrollY=defaultView.pageYOffset,style=defaultView.getComputedStyle(node,null),display=(0,_display.parseDisplay)(style.display),IS_INPUT="radio"===node.type||"checkbox"===node.type,position=(0,_position.parsePosition)(style.position);if(this.style={background:IS_INPUT?_Input.INPUT_BACKGROUND:(0,_background.parseBackground)(style,resourceLoader),border:IS_INPUT?_Input.INPUT_BORDERS:(0,_border.parseBorder)(style),borderRadius:(node instanceof defaultView.HTMLInputElement||node instanceof HTMLInputElement)&&IS_INPUT?(0,_Input.getInputBorderRadius)(node):(0,_borderRadius.parseBorderRadius)(style),color:IS_INPUT?_Input.INPUT_COLOR:new _Color2.default(style.color),display:display,float:(0,_float.parseCSSFloat)(style.float),font:(0,_font.parseFont)(style),letterSpacing:(0,_letterSpacing.parseLetterSpacing)(style.letterSpacing),listStyle:display===_display.DISPLAY.LIST_ITEM?(0,_listStyle.parseListStyle)(style):null,lineBreak:(0,_lineBreak.parseLineBreak)(style.lineBreak),margin:(0,_margin.parseMargin)(style),opacity:parseFloat(style.opacity),overflow:-1===INPUT_TAGS.indexOf(node.tagName)?(0,_overflow.parseOverflow)(style.overflow):_overflow.OVERFLOW.HIDDEN,overflowWrap:(0,_overflowWrap.parseOverflowWrap)(style.overflowWrap?style.overflowWrap:style.wordWrap),padding:(0,_padding.parsePadding)(style),position:position,textDecoration:(0,_textDecoration.parseTextDecoration)(style),textShadow:(0,_textShadow.parseTextShadow)(style.textShadow),textTransform:(0,_textTransform.parseTextTransform)(style.textTransform),transform:(0,_transform.parseTransform)(style),visibility:(0,_visibility.parseVisibility)(style.visibility),wordBreak:(0,_wordBreak.parseWordBreak)(style.wordBreak),zIndex:(0,_zIndex.parseZIndex)(position!==_position.POSITION.STATIC?style.zIndex:"auto")},this.isTransformed()&&(node.style.transform="matrix(1,0,0,1,0,0)"),display===_display.DISPLAY.LIST_ITEM){var listOwner=(0,_ListItem.getListOwner)(this);if(listOwner){var listIndex=listOwner.listItems.length;listOwner.listItems.push(this),this.listIndex=node.hasAttribute("value")&&"number"==typeof node.value?node.value:0===listIndex?"number"==typeof listOwner.listStart?listOwner.listStart:1:listOwner.listItems[listIndex-1].listIndex+1}}"IMG"===node.tagName&&node.addEventListener("load",function(){_this.bounds=(0,_Bounds.parseBounds)(node,scrollX,scrollY),_this.curvedBounds=(0,_Bounds.parseBoundCurves)(_this.bounds,_this.style.border,_this.style.borderRadius)}),this.image=getImage(node,resourceLoader),this.bounds=IS_INPUT?(0,_Input.reformatInputBounds)((0,_Bounds.parseBounds)(node,scrollX,scrollY)):(0,_Bounds.parseBounds)(node,scrollX,scrollY),this.curvedBounds=(0,_Bounds.parseBoundCurves)(this.bounds,this.style.border,this.style.borderRadius),this.name=node.tagName.toLowerCase()+(node.id?"#"+node.id:"")+node.className.toString().split(" ").map(function(s){return s.length?"."+s:""}).join("")}return _createClass(NodeContainer,[{key:"getClipPaths",value:function(){var parentClips=this.parent?this.parent.getClipPaths():[];return this.style.overflow!==_overflow.OVERFLOW.VISIBLE?parentClips.concat([(0,_Bounds.calculatePaddingBoxPath)(this.curvedBounds)]):parentClips}},{key:"isInFlow",value:function(){return this.isRootElement()&&!this.isFloating()&&!this.isAbsolutelyPositioned()}},{key:"isVisible",value:function(){return!(0,_Util.contains)(this.style.display,_display.DISPLAY.NONE)&&this.style.opacity>0&&this.style.visibility===_visibility.VISIBILITY.VISIBLE}},{key:"isAbsolutelyPositioned",value:function(){return this.style.position!==_position.POSITION.STATIC&&this.style.position!==_position.POSITION.RELATIVE}},{key:"isPositioned",value:function(){return this.style.position!==_position.POSITION.STATIC}},{key:"isFloating",value:function(){return this.style.float!==_float.FLOAT.NONE}},{key:"isRootElement",value:function(){return null===this.parent}},{key:"isTransformed",value:function(){return null!==this.style.transform}},{key:"isPositionedWithZIndex",value:function(){return this.isPositioned()&&!this.style.zIndex.auto}},{key:"isInlineLevel",value:function(){return(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_BLOCK)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_FLEX)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_GRID)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_LIST_ITEM)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_TABLE)}},{key:"isInlineBlockOrInlineTable",value:function(){return(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_BLOCK)||(0,_Util.contains)(this.style.display,_display.DISPLAY.INLINE_TABLE)}}]),NodeContainer}();exports.default=NodeContainer;var getImage=function(node,resourceLoader){if(node instanceof node.ownerDocument.defaultView.SVGSVGElement||node instanceof SVGSVGElement){var s=new XMLSerializer;return resourceLoader.loadImage("data:image/svg+xml,"+encodeURIComponent(s.serializeToString(node)))}switch(node.tagName){case"IMG":var img=node;return resourceLoader.loadImage(img.currentSrc||img.src);case"CANVAS":var canvas=node;return resourceLoader.loadCanvas(canvas);case"IFRAME":var iframeKey=node.getAttribute("data-html2canvas-internal-iframe-key");if(iframeKey)return iframeKey}return null}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.contains=function(bit,value){return 0!=(bit&value)},exports.distance=function(a,b){return Math.sqrt(a*a+b*b)},exports.copyCSSStyles=function(style,target){for(var i=style.length-1;i>=0;i--){var property=style.item(i);"content"!==property&&target.style.setProperty(property,style.getPropertyValue(property))}return target},exports.SMALL_IMAGE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseBackgroundImage=exports.parseBackground=exports.calculateBackgroundRepeatPath=exports.calculateBackgroundPosition=exports.calculateBackgroungPositioningArea=exports.calculateBackgroungPaintingArea=exports.calculateGradientBackgroundSize=exports.calculateBackgroundSize=exports.BACKGROUND_ORIGIN=exports.BACKGROUND_CLIP=exports.BACKGROUND_SIZE=exports.BACKGROUND_REPEAT=void 0;var _Color=__webpack_require__(0),_Color2=_interopRequireDefault(_Color),_Length=__webpack_require__(1),_Length2=_interopRequireDefault(_Length),_Size=__webpack_require__(31),_Size2=_interopRequireDefault(_Size),_Vector=__webpack_require__(7),_Vector2=_interopRequireDefault(_Vector),_Bounds=__webpack_require__(2),_padding=__webpack_require__(17),BACKGROUND_REPEAT=exports.BACKGROUND_REPEAT={REPEAT:0,NO_REPEAT:1,REPEAT_X:2,REPEAT_Y:3},BACKGROUND_SIZE=exports.BACKGROUND_SIZE={AUTO:0,CONTAIN:1,COVER:2,LENGTH:3},BACKGROUND_CLIP=exports.BACKGROUND_CLIP={BORDER_BOX:0,PADDING_BOX:1,CONTENT_BOX:2},BACKGROUND_ORIGIN=exports.BACKGROUND_ORIGIN=BACKGROUND_CLIP,BackgroundSize=function BackgroundSize(size){switch(_classCallCheck(this,BackgroundSize),size){case"contain":this.size=BACKGROUND_SIZE.CONTAIN;break;case"cover":this.size=BACKGROUND_SIZE.COVER;break;case"auto":this.size=BACKGROUND_SIZE.AUTO;break;default:this.value=new _Length2.default(size)}},AUTO_SIZE=(exports.calculateBackgroundSize=function(backgroundImage,image,bounds){var width=0,height=0,size=backgroundImage.size;if(size[0].size===BACKGROUND_SIZE.CONTAIN||size[0].size===BACKGROUND_SIZE.COVER){var targetRatio=bounds.width/bounds.height,currentRatio=image.width/image.height;return targetRatio<currentRatio!=(size[0].size===BACKGROUND_SIZE.COVER)?new _Size2.default(bounds.width,bounds.width/currentRatio):new _Size2.default(bounds.height*currentRatio,bounds.height)}return size[0].value&&(width=size[0].value.getAbsoluteValue(bounds.width)),size[0].size===BACKGROUND_SIZE.AUTO&&size[1].size===BACKGROUND_SIZE.AUTO?height=image.height:size[1].size===BACKGROUND_SIZE.AUTO?height=width/image.width*image.height:size[1].value&&(height=size[1].value.getAbsoluteValue(bounds.height)),size[0].size===BACKGROUND_SIZE.AUTO&&(width=height/image.height*image.width),new _Size2.default(width,height)},exports.calculateGradientBackgroundSize=function(backgroundImage,bounds){var size=backgroundImage.size,width=size[0].value?size[0].value.getAbsoluteValue(bounds.width):bounds.width,height=size[1].value?size[1].value.getAbsoluteValue(bounds.height):size[0].value?width:bounds.height;return new _Size2.default(width,height)},new BackgroundSize("auto")),parseBackgroundClip=(exports.calculateBackgroungPaintingArea=function(curves,clip){switch(clip){case BACKGROUND_CLIP.BORDER_BOX:return(0,_Bounds.calculateBorderBoxPath)(curves);case BACKGROUND_CLIP.PADDING_BOX:default:return(0,_Bounds.calculatePaddingBoxPath)(curves)}},exports.calculateBackgroungPositioningArea=function(backgroundOrigin,bounds,padding,border){var paddingBox=(0,_Bounds.calculatePaddingBox)(bounds,border);switch(backgroundOrigin){case BACKGROUND_ORIGIN.BORDER_BOX:return bounds;case BACKGROUND_ORIGIN.CONTENT_BOX:var paddingLeft=padding[_padding.PADDING_SIDES.LEFT].getAbsoluteValue(bounds.width),paddingRight=padding[_padding.PADDING_SIDES.RIGHT].getAbsoluteValue(bounds.width),paddingTop=padding[_padding.PADDING_SIDES.TOP].getAbsoluteValue(bounds.width),paddingBottom=padding[_padding.PADDING_SIDES.BOTTOM].getAbsoluteValue(bounds.width);return new _Bounds.Bounds(paddingBox.left+paddingLeft,paddingBox.top+paddingTop,paddingBox.width-paddingLeft-paddingRight,paddingBox.height-paddingTop-paddingBottom);case BACKGROUND_ORIGIN.PADDING_BOX:default:return paddingBox}},exports.calculateBackgroundPosition=function(position,size,bounds){return new _Vector2.default(position[0].getAbsoluteValue(bounds.width-size.width),position[1].getAbsoluteValue(bounds.height-size.height))},exports.calculateBackgroundRepeatPath=function(background,position,size,backgroundPositioningArea,bounds){switch(background.repeat){case BACKGROUND_REPEAT.REPEAT_X:return[new _Vector2.default(Math.round(bounds.left),Math.round(backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(bounds.left+bounds.width),Math.round(backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(bounds.left+bounds.width),Math.round(size.height+backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(bounds.left),Math.round(size.height+backgroundPositioningArea.top+position.y))];case BACKGROUND_REPEAT.REPEAT_Y:return[new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x),Math.round(bounds.top)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x+size.width),Math.round(bounds.top)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x+size.width),Math.round(bounds.height+bounds.top)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x),Math.round(bounds.height+bounds.top))];case BACKGROUND_REPEAT.NO_REPEAT:return[new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x),Math.round(backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x+size.width),Math.round(backgroundPositioningArea.top+position.y)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x+size.width),Math.round(backgroundPositioningArea.top+position.y+size.height)),new _Vector2.default(Math.round(backgroundPositioningArea.left+position.x),Math.round(backgroundPositioningArea.top+position.y+size.height))];default:return[new _Vector2.default(Math.round(bounds.left),Math.round(bounds.top)),new _Vector2.default(Math.round(bounds.left+bounds.width),Math.round(bounds.top)),new _Vector2.default(Math.round(bounds.left+bounds.width),Math.round(bounds.height+bounds.top)),new _Vector2.default(Math.round(bounds.left),Math.round(bounds.height+bounds.top))]}},exports.parseBackground=function(style,resourceLoader){return{backgroundColor:new _Color2.default(style.backgroundColor),backgroundImage:parseBackgroundImages(style,resourceLoader),backgroundClip:parseBackgroundClip(style.backgroundClip),backgroundOrigin:parseBackgroundOrigin(style.backgroundOrigin)}},function(backgroundClip){switch(backgroundClip){case"padding-box":return BACKGROUND_CLIP.PADDING_BOX;case"content-box":return BACKGROUND_CLIP.CONTENT_BOX}return BACKGROUND_CLIP.BORDER_BOX}),parseBackgroundOrigin=function(backgroundOrigin){switch(backgroundOrigin){case"padding-box":return BACKGROUND_ORIGIN.PADDING_BOX;case"content-box":return BACKGROUND_ORIGIN.CONTENT_BOX}return BACKGROUND_ORIGIN.BORDER_BOX},parseBackgroundRepeat=function(backgroundRepeat){switch(backgroundRepeat.trim()){case"no-repeat":return BACKGROUND_REPEAT.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return BACKGROUND_REPEAT.REPEAT_X;case"repeat-y":case"no-repeat repeat":return BACKGROUND_REPEAT.REPEAT_Y;case"repeat":return BACKGROUND_REPEAT.REPEAT}return console.error('Invalid background-repeat value "'+backgroundRepeat+'"'),BACKGROUND_REPEAT.REPEAT},parseBackgroundImages=function(style,resourceLoader){var sources=parseBackgroundImage(style.backgroundImage).map(function(backgroundImage){if("url"===backgroundImage.method){var key=resourceLoader.loadImage(backgroundImage.args[0]);backgroundImage.args=key?[key]:[]}return backgroundImage}),positions=style.backgroundPosition.split(","),repeats=style.backgroundRepeat.split(","),sizes=style.backgroundSize.split(",");return sources.map(function(source,index){var size=(sizes[index]||"auto").trim().split(" ").map(parseBackgroundSize),position=(positions[index]||"auto").trim().split(" ").map(parseBackgoundPosition);return{source:source,repeat:parseBackgroundRepeat("string"==typeof repeats[index]?repeats[index]:repeats[0]),size:size.length<2?[size[0],AUTO_SIZE]:[size[0],size[1]],position:position.length<2?[position[0],position[0]]:[position[0],position[1]]}})},parseBackgroundSize=function(size){return"auto"===size?AUTO_SIZE:new BackgroundSize(size)},parseBackgoundPosition=function(position){switch(position){case"bottom":case"right":return new _Length2.default("100%");case"left":case"top":return new _Length2.default("0%");case"auto":return new _Length2.default("0")}return new _Length2.default(position)},parseBackgroundImage=exports.parseBackgroundImage=function(image){var whitespace=/^\s$/,results=[],args=[],method="",quote=null,definition="",mode=0,numParen=0,appendResult=function(){var prefix="";if(method){'"'===definition.substr(0,1)&&(definition=definition.substr(1,definition.length-2)),definition&&args.push(definition.trim());var prefix_i=method.indexOf("-",1)+1;"-"===method.substr(0,1)&&prefix_i>0&&(prefix=method.substr(0,prefix_i).toLowerCase(),method=method.substr(prefix_i)),method=method.toLowerCase(),"none"!==method&&results.push({prefix:prefix,method:method,args:args})}args=[],method=definition=""};return image.split("").forEach(function(c){if(0!==mode||!whitespace.test(c)){switch(c){case'"':quote?quote===c&&(quote=null):quote=c;break;case"(":if(quote)break;if(0===mode)return void(mode=1);numParen++;break;case")":if(quote)break;if(1===mode){if(0===numParen)return mode=0,void appendResult();numParen--}break;case",":if(quote)break;if(0===mode)return void appendResult();if(1===mode&&0===numParen&&!method.match(/^url$/i))return args.push(definition.trim()),void(definition="")}0===mode?method+=c:definition+=c}}),appendResult(),results}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.PATH={VECTOR:0,BEZIER_CURVE:1,CIRCLE:2}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _Path=__webpack_require__(6),Vector=function Vector(x,y){_classCallCheck(this,Vector),this.type=_Path.PATH.VECTOR,this.x=x,this.y=y,isNaN(x)&&console.error("Invalid x value given for Vector"),isNaN(y)&&console.error("Invalid y value given for Vector")};exports.default=Vector},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseListStyle=exports.parseListStyleType=exports.LIST_STYLE_TYPE=exports.LIST_STYLE_POSITION=void 0;var _background=__webpack_require__(5),LIST_STYLE_POSITION=exports.LIST_STYLE_POSITION={INSIDE:0,OUTSIDE:1},LIST_STYLE_TYPE=exports.LIST_STYLE_TYPE={NONE:-1,DISC:0,CIRCLE:1,SQUARE:2,DECIMAL:3,CJK_DECIMAL:4,DECIMAL_LEADING_ZERO:5,LOWER_ROMAN:6,UPPER_ROMAN:7,LOWER_GREEK:8,LOWER_ALPHA:9,UPPER_ALPHA:10,ARABIC_INDIC:11,ARMENIAN:12,BENGALI:13,CAMBODIAN:14,CJK_EARTHLY_BRANCH:15,CJK_HEAVENLY_STEM:16,CJK_IDEOGRAPHIC:17,DEVANAGARI:18,ETHIOPIC_NUMERIC:19,GEORGIAN:20,GUJARATI:21,GURMUKHI:22,HEBREW:22,HIRAGANA:23,HIRAGANA_IROHA:24,JAPANESE_FORMAL:25,JAPANESE_INFORMAL:26,KANNADA:27,KATAKANA:28,KATAKANA_IROHA:29,KHMER:30,KOREAN_HANGUL_FORMAL:31,KOREAN_HANJA_FORMAL:32,KOREAN_HANJA_INFORMAL:33,LAO:34,LOWER_ARMENIAN:35,MALAYALAM:36,MONGOLIAN:37,MYANMAR:38,ORIYA:39,PERSIAN:40,SIMP_CHINESE_FORMAL:41,SIMP_CHINESE_INFORMAL:42,TAMIL:43,TELUGU:44,THAI:45,TIBETAN:46,TRAD_CHINESE_FORMAL:47,TRAD_CHINESE_INFORMAL:48,UPPER_ARMENIAN:49,DISCLOSURE_OPEN:50,DISCLOSURE_CLOSED:51},parseListStyleType=exports.parseListStyleType=function(type){switch(type){case"disc":return LIST_STYLE_TYPE.DISC;case"circle":return LIST_STYLE_TYPE.CIRCLE;case"square":return LIST_STYLE_TYPE.SQUARE;case"decimal":return LIST_STYLE_TYPE.DECIMAL;case"cjk-decimal":return LIST_STYLE_TYPE.CJK_DECIMAL;case"decimal-leading-zero":return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;case"lower-roman":return LIST_STYLE_TYPE.LOWER_ROMAN;case"upper-roman":return LIST_STYLE_TYPE.UPPER_ROMAN;case"lower-greek":return LIST_STYLE_TYPE.LOWER_GREEK;case"lower-alpha":return LIST_STYLE_TYPE.LOWER_ALPHA;case"upper-alpha":return LIST_STYLE_TYPE.UPPER_ALPHA;case"arabic-indic":return LIST_STYLE_TYPE.ARABIC_INDIC;case"armenian":return LIST_STYLE_TYPE.ARMENIAN;case"bengali":return LIST_STYLE_TYPE.BENGALI;case"cambodian":return LIST_STYLE_TYPE.CAMBODIAN;case"cjk-earthly-branch":return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;case"cjk-ideographic":return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;case"devanagari":return LIST_STYLE_TYPE.DEVANAGARI;case"ethiopic-numeric":return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;case"georgian":return LIST_STYLE_TYPE.GEORGIAN;case"gujarati":return LIST_STYLE_TYPE.GUJARATI;case"gurmukhi":return LIST_STYLE_TYPE.GURMUKHI;case"hebrew":return LIST_STYLE_TYPE.HEBREW;case"hiragana":return LIST_STYLE_TYPE.HIRAGANA;case"hiragana-iroha":return LIST_STYLE_TYPE.HIRAGANA_IROHA;case"japanese-formal":return LIST_STYLE_TYPE.JAPANESE_FORMAL;case"japanese-informal":return LIST_STYLE_TYPE.JAPANESE_INFORMAL;case"kannada":return LIST_STYLE_TYPE.KANNADA;case"katakana":return LIST_STYLE_TYPE.KATAKANA;case"katakana-iroha":return LIST_STYLE_TYPE.KATAKANA_IROHA;case"khmer":return LIST_STYLE_TYPE.KHMER;case"korean-hangul-formal":return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;case"lao":return LIST_STYLE_TYPE.LAO;case"lower-armenian":return LIST_STYLE_TYPE.LOWER_ARMENIAN;case"malayalam":return LIST_STYLE_TYPE.MALAYALAM;case"mongolian":return LIST_STYLE_TYPE.MONGOLIAN;case"myanmar":return LIST_STYLE_TYPE.MYANMAR;case"oriya":return LIST_STYLE_TYPE.ORIYA;case"persian":return LIST_STYLE_TYPE.PERSIAN;case"simp-chinese-formal":return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;case"tamil":return LIST_STYLE_TYPE.TAMIL;case"telugu":return LIST_STYLE_TYPE.TELUGU;case"thai":return LIST_STYLE_TYPE.THAI;case"tibetan":return LIST_STYLE_TYPE.TIBETAN;case"trad-chinese-formal":return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;case"upper-armenian":return LIST_STYLE_TYPE.UPPER_ARMENIAN;case"disclosure-open":return LIST_STYLE_TYPE.DISCLOSURE_OPEN;case"disclosure-closed":return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;case"none":default:return LIST_STYLE_TYPE.NONE}},parseListStylePosition=(exports.parseListStyle=function(style){var listStyleImage=(0,_background.parseBackgroundImage)(style.getPropertyValue("list-style-image"));return{listStyleType:parseListStyleType(style.getPropertyValue("list-style-type")),listStyleImage:listStyleImage.length?listStyleImage[0]:null,listStylePosition:parseListStylePosition(style.getPropertyValue("list-style-position"))}},function(position){switch(position){case"inside":return LIST_STYLE_POSITION.INSIDE;case"outside":default:return LIST_STYLE_POSITION.OUTSIDE}})},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function capitalize(m,p1,p2){return m.length>0?p1+p2.toUpperCase():m}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_textTransform=__webpack_require__(20),_TextBounds=__webpack_require__(22),TextContainer=function(){function TextContainer(text,parent,bounds){_classCallCheck(this,TextContainer),this.text=text,this.parent=parent,this.bounds=bounds}return _createClass(TextContainer,null,[{key:"fromTextNode",value:function(node,parent){var text=transform(node.data,parent.style.textTransform);return new TextContainer(text,parent,(0,_TextBounds.parseTextBounds)(text,parent,node))}}]),TextContainer}();exports.default=TextContainer;var CAPITALIZE=/(^|\s|:|-|\(|\))([a-z])/g,transform=function(text,_transform){switch(_transform){case _textTransform.TEXT_TRANSFORM.LOWERCASE:return text.toLowerCase();case _textTransform.TEXT_TRANSFORM.CAPITALIZE:return text.replace(CAPITALIZE,capitalize);case _textTransform.TEXT_TRANSFORM.UPPERCASE:return text.toUpperCase();default:return text}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _ForeignObjectRenderer=__webpack_require__(23),testRangeBounds=function(document){if(document.createRange){var range=document.createRange();if(range.getBoundingClientRect){var testElement=document.createElement("boundtest");testElement.style.height="123px",testElement.style.display="block",document.body.appendChild(testElement),range.selectNode(testElement);var rangeBounds=range.getBoundingClientRect(),rangeHeight=Math.round(rangeBounds.height);if(document.body.removeChild(testElement),123===rangeHeight)return!0}}return!1},testBase64=function(document,src){var img=new Image,canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");return new Promise(function(resolve){img.src=src;var onload=function(){try{ctx.drawImage(img,0,0),canvas.toDataURL()}catch(e){return resolve(!1)}return resolve(!0)};img.onload=onload,img.onerror=function(){return resolve(!1)},!0===img.complete&&setTimeout(function(){onload()},500)})},testCORS=function(){return void 0!==(new Image).crossOrigin},testResponseType=function(){return"string"==typeof(new XMLHttpRequest).responseType},testSVG=function(document){var img=new Image,canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");img.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{ctx.drawImage(img,0,0),canvas.toDataURL()}catch(e){return!1}return!0},isGreenPixel=function(data){return 0===data[0]&&255===data[1]&&0===data[2]&&255===data[3]},testForeignObject=function(document){var canvas=document.createElement("canvas");canvas.width=100,canvas.height=100;var ctx=canvas.getContext("2d");ctx.fillStyle="rgb(0, 255, 0)",ctx.fillRect(0,0,100,100);var img=new Image,greenImageSrc=canvas.toDataURL();img.src=greenImageSrc;var svg=(0,_ForeignObjectRenderer.createForeignObjectSVG)(100,100,0,0,img);return ctx.fillStyle="red",ctx.fillRect(0,0,100,100),(0,_ForeignObjectRenderer.loadSerializedSVG)(svg).then(function(img){ctx.drawImage(img,0,0);var data=ctx.getImageData(0,0,100,100).data;ctx.fillStyle="red",ctx.fillRect(0,0,100,100);var node=document.createElement("div");return node.style.backgroundImage="url("+greenImageSrc+")",node.style.height="100px",isGreenPixel(data)?(0,_ForeignObjectRenderer.loadSerializedSVG)((0,_ForeignObjectRenderer.createForeignObjectSVG)(100,100,0,0,node)):Promise.reject(!1)}).then(function(img){return ctx.drawImage(img,0,0),isGreenPixel(ctx.getImageData(0,0,100,100).data)}).catch(function(e){return!1})},FEATURES={get SUPPORT_RANGE_BOUNDS(){var value=testRangeBounds(document);return Object.defineProperty(FEATURES,"SUPPORT_RANGE_BOUNDS",{value:value}),value},get SUPPORT_SVG_DRAWING(){var value=testSVG(document);return Object.defineProperty(FEATURES,"SUPPORT_SVG_DRAWING",{value:value}),value},get SUPPORT_BASE64_DRAWING(){return function(src){var _value=testBase64(document,src);return Object.defineProperty(FEATURES,"SUPPORT_BASE64_DRAWING",{value:function(){return _value}}),_value}},get SUPPORT_FOREIGNOBJECT_DRAWING(){var value="function"==typeof Array.from&&"function"==typeof window.fetch?testForeignObject(document):Promise.resolve(!1);return Object.defineProperty(FEATURES,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:value}),value},get SUPPORT_CORS_IMAGES(){var value=testCORS();return Object.defineProperty(FEATURES,"SUPPORT_CORS_IMAGES",{value:value}),value},get SUPPORT_RESPONSE_TYPE(){var value=testResponseType();return Object.defineProperty(FEATURES,"SUPPORT_RESPONSE_TYPE",{value:value}),value},get SUPPORT_CORS_XHR(){var value="withCredentials"in new XMLHttpRequest;return Object.defineProperty(FEATURES,"SUPPORT_CORS_XHR",{value:value}),value}};exports.default=FEATURES},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseTextDecoration=exports.TEXT_DECORATION_LINE=exports.TEXT_DECORATION=exports.TEXT_DECORATION_STYLE=void 0;var _Color=__webpack_require__(0),_Color2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Color),TEXT_DECORATION_STYLE=exports.TEXT_DECORATION_STYLE={SOLID:0,DOUBLE:1,DOTTED:2,DASHED:3,WAVY:4},TEXT_DECORATION=exports.TEXT_DECORATION={NONE:null},TEXT_DECORATION_LINE=exports.TEXT_DECORATION_LINE={UNDERLINE:1,OVERLINE:2,LINE_THROUGH:3,BLINK:4},parseLine=function(line){switch(line){case"underline":return TEXT_DECORATION_LINE.UNDERLINE;case"overline":return TEXT_DECORATION_LINE.OVERLINE;case"line-through":return TEXT_DECORATION_LINE.LINE_THROUGH}return TEXT_DECORATION_LINE.BLINK},parseTextDecorationLine=function(line){return"none"===line?null:line.split(" ").map(parseLine)},parseTextDecorationStyle=function(style){switch(style){case"double":return TEXT_DECORATION_STYLE.DOUBLE;case"dotted":return TEXT_DECORATION_STYLE.DOTTED;case"dashed":return TEXT_DECORATION_STYLE.DASHED;case"wavy":return TEXT_DECORATION_STYLE.WAVY}return TEXT_DECORATION_STYLE.SOLID};exports.parseTextDecoration=function(style){var textDecorationLine=parseTextDecorationLine(style.textDecorationLine?style.textDecorationLine:style.textDecoration);return null===textDecorationLine?TEXT_DECORATION.NONE:{textDecorationLine:textDecorationLine,textDecorationColor:style.textDecorationColor?new _Color2.default(style.textDecorationColor):null,textDecorationStyle:parseTextDecorationStyle(style.textDecorationStyle)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseBorder=exports.BORDER_SIDES=exports.BORDER_STYLE=void 0;var _Color=__webpack_require__(0),_Color2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Color),BORDER_STYLE=exports.BORDER_STYLE={NONE:0,SOLID:1},BORDER_SIDES=exports.BORDER_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},SIDES=Object.keys(BORDER_SIDES).map(function(s){return s.toLowerCase()}),parseBorderStyle=function(style){switch(style){case"none":return BORDER_STYLE.NONE}return BORDER_STYLE.SOLID};exports.parseBorder=function(style){return SIDES.map(function(side){var borderColor=new _Color2.default(style.getPropertyValue("border-"+side+"-color")),borderStyle=parseBorderStyle(style.getPropertyValue("border-"+side+"-style")),borderWidth=parseFloat(style.getPropertyValue("border-"+side+"-width"));return{borderColor:borderColor,borderStyle:borderStyle,borderWidth:isNaN(borderWidth)?0:borderWidth}})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});for(var chars=(exports.toCodePoints=function(str){for(var codePoints=[],i=0,length=str.length;i<length;){var value=str.charCodeAt(i++);if(value>=55296&&value<=56319&&i<length){var extra=str.charCodeAt(i++);56320==(64512&extra)?codePoints.push(((1023&value)<<10)+(1023&extra)+65536):(codePoints.push(value),i--)}else codePoints.push(value)}return codePoints},exports.fromCodePoint=function(){if(String.fromCodePoint)return String.fromCodePoint.apply(String,arguments);var length=arguments.length;if(!length)return"";for(var codeUnits=[],index=-1,result="";++index<length;){var codePoint=arguments.length<=index?void 0:arguments[index];codePoint<=65535?codeUnits.push(codePoint):(codePoint-=65536,codeUnits.push(55296+(codePoint>>10),codePoint%1024+56320)),(index+1===length||codeUnits.length>16384)&&(result+=String.fromCharCode.apply(String,codeUnits),codeUnits.length=0)}return result},"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),lookup="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i=0;i<chars.length;i++)lookup[chars.charCodeAt(i)]=i;exports.decode=function(base64){var bufferLength=.75*base64.length,len=base64.length,i=void 0,p=0,encoded1=void 0,encoded2=void 0,encoded3=void 0,encoded4=void 0;"="===base64[base64.length-1]&&(bufferLength--,"="===base64[base64.length-2]&&bufferLength--);var buffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(bufferLength):new Array(bufferLength),bytes=Array.isArray(buffer)?buffer:new Uint8Array(buffer);for(i=0;i<len;i+=4)encoded1=lookup[base64.charCodeAt(i)],encoded2=lookup[base64.charCodeAt(i+1)],encoded3=lookup[base64.charCodeAt(i+2)],encoded4=lookup[base64.charCodeAt(i+3)],bytes[p++]=encoded1<<2|encoded2>>4,bytes[p++]=(15&encoded2)<<4|encoded3>>2,bytes[p++]=(3&encoded3)<<6|63&encoded4;return buffer},exports.polyUint16Array=function(buffer){for(var length=buffer.length,bytes=[],_i=0;_i<length;_i+=2)bytes.push(buffer[_i+1]<<8|buffer[_i]);return bytes},exports.polyUint32Array=function(buffer){for(var length=buffer.length,bytes=[],_i2=0;_i2<length;_i2+=4)bytes.push(buffer[_i2+3]<<24|buffer[_i2+2]<<16|buffer[_i2+1]<<8|buffer[_i2]);return bytes}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createCounterText=exports.inlineListItemElement=exports.getListOwner=void 0;var _Util=__webpack_require__(4),_NodeContainer=__webpack_require__(3),_NodeContainer2=_interopRequireDefault(_NodeContainer),_TextContainer=__webpack_require__(9),_TextContainer2=_interopRequireDefault(_TextContainer),_listStyle=__webpack_require__(8),_Unicode=__webpack_require__(24),ancestorTypes=["OL","UL","MENU"],ROMAN_UPPER=(exports.getListOwner=function(container){var parent=container.parent;if(!parent)return null;do{if(-1!==ancestorTypes.indexOf(parent.tagName))return parent;parent=parent.parent}while(parent);return container.parent},exports.inlineListItemElement=function(node,container,resourceLoader){var listStyle=container.style.listStyle;if(listStyle){var style=node.ownerDocument.defaultView.getComputedStyle(node,null),wrapper=node.ownerDocument.createElement("html2canvaswrapper");switch((0,_Util.copyCSSStyles)(style,wrapper),wrapper.style.position="absolute",wrapper.style.bottom="auto",wrapper.style.display="block",wrapper.style.letterSpacing="normal",listStyle.listStylePosition){case _listStyle.LIST_STYLE_POSITION.OUTSIDE:wrapper.style.left="auto",wrapper.style.right=node.ownerDocument.defaultView.innerWidth-container.bounds.left-container.style.margin[1].getAbsoluteValue(container.bounds.width)+7+"px",wrapper.style.textAlign="right";break;case _listStyle.LIST_STYLE_POSITION.INSIDE:wrapper.style.left=container.bounds.left-container.style.margin[3].getAbsoluteValue(container.bounds.width)+"px",wrapper.style.right="auto",wrapper.style.textAlign="left"}var text=void 0,MARGIN_TOP=container.style.margin[0].getAbsoluteValue(container.bounds.width),styleImage=listStyle.listStyleImage;if(styleImage)if("url"===styleImage.method){var image=node.ownerDocument.createElement("img");image.src=styleImage.args[0],wrapper.style.top=container.bounds.top-MARGIN_TOP+"px",wrapper.style.width="auto",wrapper.style.height="auto",wrapper.appendChild(image)}else{var size=.5*parseFloat(container.style.font.fontSize);wrapper.style.top=container.bounds.top-MARGIN_TOP+container.bounds.height-1.5*size+"px",wrapper.style.width=size+"px",wrapper.style.height=size+"px",wrapper.style.backgroundImage=style.listStyleImage}else"number"==typeof container.listIndex&&(text=node.ownerDocument.createTextNode(createCounterText(container.listIndex,listStyle.listStyleType,!0)),wrapper.appendChild(text),wrapper.style.top=container.bounds.top-MARGIN_TOP+"px");var body=node.ownerDocument.body;body.appendChild(wrapper),text?(container.childNodes.push(_TextContainer2.default.fromTextNode(text,container)),body.removeChild(wrapper)):container.childNodes.push(new _NodeContainer2.default(wrapper,container,resourceLoader,0))}},{integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]}),ARMENIAN={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},HEBREW={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},GEORGIAN={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},createAdditiveCounter=function(value,min,max,symbols,fallback,suffix){return value<min||value>max?createCounterText(value,fallback,suffix.length>0):symbols.integers.reduce(function(string,integer,index){for(;value>=integer;)value-=integer,string+=symbols.values[index];return string},"")+suffix},createCounterStyleWithSymbolResolver=function(value,codePointRangeLength,isNumeric,resolver){var string="";do{isNumeric||value--,string=resolver(value)+string,value/=codePointRangeLength}while(value*codePointRangeLength>=codePointRangeLength);return string},createCounterStyleFromRange=function(value,codePointRangeStart,codePointRangeEnd,isNumeric,suffix){var codePointRangeLength=codePointRangeEnd-codePointRangeStart+1;return(value<0?"-":"")+(createCounterStyleWithSymbolResolver(Math.abs(value),codePointRangeLength,isNumeric,function(codePoint){return(0,_Unicode.fromCodePoint)(Math.floor(codePoint%codePointRangeLength)+codePointRangeStart)})+suffix)},createCounterStyleFromSymbols=function(value,symbols){var suffix=arguments.length>2&&void 0!==arguments[2]?arguments[2]:". ",codePointRangeLength=symbols.length;return createCounterStyleWithSymbolResolver(Math.abs(value),codePointRangeLength,!1,function(codePoint){return symbols[Math.floor(codePoint%codePointRangeLength)]})+suffix},createCJKCounter=function(value,numbers,multipliers,negativeSign,suffix,flags){if(value<-9999||value>9999)return createCounterText(value,_listStyle.LIST_STYLE_TYPE.CJK_DECIMAL,suffix.length>0);var tmp=Math.abs(value),string=suffix;if(0===tmp)return numbers[0]+string;for(var digit=0;tmp>0&&digit<=4;digit++){var coefficient=tmp%10;0===coefficient&&(0,_Util.contains)(flags,1)&&""!==string?string=numbers[coefficient]+string:coefficient>1||1===coefficient&&0===digit||1===coefficient&&1===digit&&(0,_Util.contains)(flags,2)||1===coefficient&&1===digit&&(0,_Util.contains)(flags,4)&&value>100||1===coefficient&&digit>1&&(0,_Util.contains)(flags,8)?string=numbers[coefficient]+(digit>0?multipliers[digit-1]:"")+string:1===coefficient&&digit>0&&(string=multipliers[digit-1]+string),tmp=Math.floor(tmp/10)}return(value<0?negativeSign:"")+string},createCounterText=exports.createCounterText=function(value,type,appendSuffix){var defaultSuffix=appendSuffix?". ":"",cjkSuffix=appendSuffix?"、":"",koreanSuffix=appendSuffix?", ":"";switch(type){case _listStyle.LIST_STYLE_TYPE.DISC:return"•";case _listStyle.LIST_STYLE_TYPE.CIRCLE:return"◦";case _listStyle.LIST_STYLE_TYPE.SQUARE:return"◾";case _listStyle.LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:var string=createCounterStyleFromRange(value,48,57,!0,defaultSuffix);return string.length<4?"0"+string:string;case _listStyle.LIST_STYLE_TYPE.CJK_DECIMAL:return createCounterStyleFromSymbols(value,"〇一二三四五六七八九",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.LOWER_ROMAN:return createAdditiveCounter(value,1,3999,ROMAN_UPPER,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix).toLowerCase();case _listStyle.LIST_STYLE_TYPE.UPPER_ROMAN:return createAdditiveCounter(value,1,3999,ROMAN_UPPER,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.LOWER_GREEK:return createCounterStyleFromRange(value,945,969,!1,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.LOWER_ALPHA:return createCounterStyleFromRange(value,97,122,!1,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.UPPER_ALPHA:return createCounterStyleFromRange(value,65,90,!1,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.ARABIC_INDIC:return createCounterStyleFromRange(value,1632,1641,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.ARMENIAN:case _listStyle.LIST_STYLE_TYPE.UPPER_ARMENIAN:return createAdditiveCounter(value,1,9999,ARMENIAN,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.LOWER_ARMENIAN:return createAdditiveCounter(value,1,9999,ARMENIAN,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix).toLowerCase();case _listStyle.LIST_STYLE_TYPE.BENGALI:return createCounterStyleFromRange(value,2534,2543,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.CAMBODIAN:case _listStyle.LIST_STYLE_TYPE.KHMER:return createCounterStyleFromRange(value,6112,6121,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:return createCounterStyleFromSymbols(value,"子丑寅卯辰巳午未申酉戌亥",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:return createCounterStyleFromSymbols(value,"甲乙丙丁戊己庚辛壬癸",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:case _listStyle.LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:return createCJKCounter(value,"零一二三四五六七八九","十百千萬","負",cjkSuffix,14);case _listStyle.LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:return createCJKCounter(value,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",cjkSuffix,15);case _listStyle.LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:return createCJKCounter(value,"零一二三四五六七八九","十百千萬","负",cjkSuffix,14);case _listStyle.LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:return createCJKCounter(value,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",cjkSuffix,15);case _listStyle.LIST_STYLE_TYPE.JAPANESE_INFORMAL:return createCJKCounter(value,"〇一二三四五六七八九","十百千万","マイナス",cjkSuffix,0);case _listStyle.LIST_STYLE_TYPE.JAPANESE_FORMAL:return createCJKCounter(value,"零壱弐参四伍六七八九","拾百千万","マイナス",cjkSuffix,7);case _listStyle.LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:return createCJKCounter(value,"영일이삼사오육칠팔구","십백천만","마이너스 ",koreanSuffix,7);case _listStyle.LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:return createCJKCounter(value,"零一二三四五六七八九","十百千萬","마이너스 ",koreanSuffix,0);case _listStyle.LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:return createCJKCounter(value,"零壹貳參四五六七八九","拾百千","마이너스 ",koreanSuffix,7);case _listStyle.LIST_STYLE_TYPE.DEVANAGARI:return createCounterStyleFromRange(value,2406,2415,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.GEORGIAN:return createAdditiveCounter(value,1,19999,GEORGIAN,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.GUJARATI:return createCounterStyleFromRange(value,2790,2799,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.GURMUKHI:return createCounterStyleFromRange(value,2662,2671,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.HEBREW:return createAdditiveCounter(value,1,10999,HEBREW,_listStyle.LIST_STYLE_TYPE.DECIMAL,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.HIRAGANA:return createCounterStyleFromSymbols(value,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case _listStyle.LIST_STYLE_TYPE.HIRAGANA_IROHA:return createCounterStyleFromSymbols(value,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case _listStyle.LIST_STYLE_TYPE.KANNADA:return createCounterStyleFromRange(value,3302,3311,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.KATAKANA:return createCounterStyleFromSymbols(value,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.KATAKANA_IROHA:return createCounterStyleFromSymbols(value,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",cjkSuffix);case _listStyle.LIST_STYLE_TYPE.LAO:return createCounterStyleFromRange(value,3792,3801,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.MONGOLIAN:return createCounterStyleFromRange(value,6160,6169,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.MYANMAR:return createCounterStyleFromRange(value,4160,4169,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.ORIYA:return createCounterStyleFromRange(value,2918,2927,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.PERSIAN:return createCounterStyleFromRange(value,1776,1785,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.TAMIL:return createCounterStyleFromRange(value,3046,3055,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.TELUGU:return createCounterStyleFromRange(value,3174,3183,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.THAI:return createCounterStyleFromRange(value,3664,3673,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.TIBETAN:return createCounterStyleFromRange(value,3872,3881,!0,defaultSuffix);case _listStyle.LIST_STYLE_TYPE.DECIMAL:default:return createCounterStyleFromRange(value,48,57,!0,defaultSuffix)}}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Path=__webpack_require__(6),_textDecoration=__webpack_require__(11),addColorStops=function(gradient,canvasGradient){var maxStop=Math.max.apply(null,gradient.colorStops.map(function(colorStop){return colorStop.stop})),f=1/Math.max(1,maxStop);gradient.colorStops.forEach(function(colorStop){canvasGradient.addColorStop(f*colorStop.stop,colorStop.color.toString())})},CanvasRenderer=function(){function CanvasRenderer(canvas){_classCallCheck(this,CanvasRenderer),this.canvas=canvas||document.createElement("canvas")}return _createClass(CanvasRenderer,[{key:"render",value:function(options){this.ctx=this.canvas.getContext("2d"),this.options=options,this.canvas.width=Math.floor(options.width*options.scale),this.canvas.height=Math.floor(options.height*options.scale),this.canvas.style.width=options.width+"px",this.canvas.style.height=options.height+"px",this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-options.x,-options.y),this.ctx.textBaseline="bottom",options.logger.log("Canvas renderer initialized ("+options.width+"x"+options.height+" at "+options.x+","+options.y+") with scale "+this.options.scale)}},{key:"clip",value:function(clipPaths,callback){var _this=this;clipPaths.length&&(this.ctx.save(),clipPaths.forEach(function(path){_this.path(path),_this.ctx.clip()})),callback(),clipPaths.length&&this.ctx.restore()}},{key:"drawImage",value:function(image,source,destination){this.ctx.drawImage(image,source.left,source.top,source.width,source.height,destination.left,destination.top,destination.width,destination.height)}},{key:"drawShape",value:function(path,color){this.path(path),this.ctx.fillStyle=color.toString(),this.ctx.fill()}},{key:"fill",value:function(color){this.ctx.fillStyle=color.toString(),this.ctx.fill()}},{key:"getTarget",value:function(){return this.canvas.getContext("2d").setTransform(1,0,0,1,0,0),Promise.resolve(this.canvas)}},{key:"path",value:function(_path){var _this2=this;this.ctx.beginPath(),Array.isArray(_path)?_path.forEach(function(point,index){var start=point.type===_Path.PATH.VECTOR?point:point.start;0===index?_this2.ctx.moveTo(start.x,start.y):_this2.ctx.lineTo(start.x,start.y),point.type===_Path.PATH.BEZIER_CURVE&&_this2.ctx.bezierCurveTo(point.startControl.x,point.startControl.y,point.endControl.x,point.endControl.y,point.end.x,point.end.y)}):this.ctx.arc(_path.x+_path.radius,_path.y+_path.radius,_path.radius,0,2*Math.PI,!0),this.ctx.closePath()}},{key:"rectangle",value:function(x,y,width,height,color){this.ctx.fillStyle=color.toString(),this.ctx.fillRect(x,y,width,height)}},{key:"renderLinearGradient",value:function(bounds,gradient){var linearGradient=this.ctx.createLinearGradient(bounds.left+gradient.direction.x1,bounds.top+gradient.direction.y1,bounds.left+gradient.direction.x0,bounds.top+gradient.direction.y0);addColorStops(gradient,linearGradient),this.ctx.fillStyle=linearGradient,this.ctx.fillRect(bounds.left,bounds.top,bounds.width,bounds.height)}},{key:"renderRadialGradient",value:function(bounds,gradient){var _this3=this,x=bounds.left+gradient.center.x,y=bounds.top+gradient.center.y,radialGradient=this.ctx.createRadialGradient(x,y,0,x,y,gradient.radius.x);if(radialGradient)if(addColorStops(gradient,radialGradient),this.ctx.fillStyle=radialGradient,gradient.radius.x!==gradient.radius.y){var midX=bounds.left+.5*bounds.width,midY=bounds.top+.5*bounds.height,f=gradient.radius.y/gradient.radius.x,invF=1/f;this.transform(midX,midY,[1,0,0,f,0,0],function(){return _this3.ctx.fillRect(bounds.left,invF*(bounds.top-midY)+midY,bounds.width,bounds.height*invF)})}else this.ctx.fillRect(bounds.left,bounds.top,bounds.width,bounds.height)}},{key:"renderRepeat",value:function(path,image,imageSize,offsetX,offsetY){this.path(path),this.ctx.fillStyle=this.ctx.createPattern(this.resizeImage(image,imageSize),"repeat"),this.ctx.translate(offsetX,offsetY),this.ctx.fill(),this.ctx.translate(-offsetX,-offsetY)}},{key:"renderTextNode",value:function(textBounds,color,font,textDecoration,textShadows){var _this4=this;this.ctx.font=[font.fontStyle,font.fontVariant,font.fontWeight,font.fontSize,font.fontFamily].join(" "),textBounds.forEach(function(text){if(_this4.ctx.fillStyle=color.toString(),textShadows&&text.text.trim().length?textShadows.slice(0).reverse().forEach(function(textShadow){_this4.ctx.shadowColor=textShadow.color.toString(),_this4.ctx.shadowOffsetX=textShadow.offsetX*_this4.options.scale,_this4.ctx.shadowOffsetY=textShadow.offsetY*_this4.options.scale,_this4.ctx.shadowBlur=textShadow.blur,_this4.ctx.fillText(text.text,text.bounds.left,text.bounds.top+text.bounds.height)}):_this4.ctx.fillText(text.text,text.bounds.left,text.bounds.top+text.bounds.height),null!==textDecoration){var textDecorationColor=textDecoration.textDecorationColor||color;textDecoration.textDecorationLine.forEach(function(textDecorationLine){switch(textDecorationLine){case _textDecoration.TEXT_DECORATION_LINE.UNDERLINE:var _options$fontMetrics$=_this4.options.fontMetrics.getMetrics(font),baseline=_options$fontMetrics$.baseline;_this4.rectangle(text.bounds.left,Math.round(text.bounds.top+baseline),text.bounds.width,1,textDecorationColor);break;case _textDecoration.TEXT_DECORATION_LINE.OVERLINE:_this4.rectangle(text.bounds.left,Math.round(text.bounds.top),text.bounds.width,1,textDecorationColor);break;case _textDecoration.TEXT_DECORATION_LINE.LINE_THROUGH:var _options$fontMetrics$2=_this4.options.fontMetrics.getMetrics(font),middle=_options$fontMetrics$2.middle;_this4.rectangle(text.bounds.left,Math.ceil(text.bounds.top+middle),text.bounds.width,1,textDecorationColor)}})}})}},{key:"resizeImage",value:function(image,size){if(image.width===size.width&&image.height===size.height)return image;var canvas=this.canvas.ownerDocument.createElement("canvas");return canvas.width=size.width,canvas.height=size.height,canvas.getContext("2d").drawImage(image,0,0,image.width,image.height,0,0,size.width,size.height),canvas}},{key:"setOpacity",value:function(opacity){this.ctx.globalAlpha=opacity}},{key:"transform",value:function(offsetX,offsetY,matrix,callback){this.ctx.save(),this.ctx.translate(offsetX,offsetY),this.ctx.transform(matrix[0],matrix[1],matrix[2],matrix[3],matrix[4],matrix[5]),this.ctx.translate(-offsetX,-offsetY),callback(),this.ctx.restore()}}]),CanvasRenderer}();exports.default=CanvasRenderer},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),Logger=function(){function Logger(enabled,id,start){_classCallCheck(this,Logger),this.enabled="undefined"!=typeof window&&enabled,this.start=start||Date.now(),this.id=id}return _createClass(Logger,[{key:"child",value:function(id){return new Logger(this.enabled,id,this.start)}},{key:"log",value:function(){if(this.enabled&&window.console&&window.console.log){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-this.start+"ms",this.id?"html2canvas ("+this.id+"):":"html2canvas:"].concat([].slice.call(args,0)))}}},{key:"error",value:function(){if(this.enabled&&window.console&&window.console.error){for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];Function.prototype.bind.call(window.console.error,window.console).apply(window.console,[Date.now()-this.start+"ms",this.id?"html2canvas ("+this.id+"):":"html2canvas:"].concat([].slice.call(args,0)))}}}]),Logger}();exports.default=Logger},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parsePadding=exports.PADDING_SIDES=void 0;var _Length=__webpack_require__(1),_Length2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Length),SIDES=(exports.PADDING_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},["top","right","bottom","left"]);exports.parsePadding=function(style){return SIDES.map(function(side){return new _Length2.default(style.getPropertyValue("padding-"+side))})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var OVERFLOW_WRAP=exports.OVERFLOW_WRAP={NORMAL:0,BREAK_WORD:1};exports.parseOverflowWrap=function(overflow){switch(overflow){case"break-word":return OVERFLOW_WRAP.BREAK_WORD;case"normal":default:return OVERFLOW_WRAP.NORMAL}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var POSITION=exports.POSITION={STATIC:0,RELATIVE:1,ABSOLUTE:2,FIXED:3,STICKY:4};exports.parsePosition=function(position){switch(position){case"relative":return POSITION.RELATIVE;case"absolute":return POSITION.ABSOLUTE;case"fixed":return POSITION.FIXED;case"sticky":return POSITION.STICKY}return POSITION.STATIC}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var TEXT_TRANSFORM=exports.TEXT_TRANSFORM={NONE:0,LOWERCASE:1,UPPERCASE:2,CAPITALIZE:3};exports.parseTextTransform=function(textTransform){switch(textTransform){case"uppercase":return TEXT_TRANSFORM.UPPERCASE;case"lowercase":return TEXT_TRANSFORM.LOWERCASE;case"capitalize":return TEXT_TRANSFORM.CAPITALIZE}return TEXT_TRANSFORM.NONE}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.reformatInputBounds=exports.inlineSelectElement=exports.inlineTextAreaElement=exports.inlineInputElement=exports.getInputBorderRadius=exports.INPUT_BACKGROUND=exports.INPUT_BORDERS=exports.INPUT_COLOR=void 0;var _TextContainer=__webpack_require__(9),_TextContainer2=_interopRequireDefault(_TextContainer),_background=__webpack_require__(5),_border=__webpack_require__(12),_Circle=__webpack_require__(50),_Circle2=_interopRequireDefault(_Circle),_Vector=__webpack_require__(7),_Vector2=_interopRequireDefault(_Vector),_Color=__webpack_require__(0),_Color2=_interopRequireDefault(_Color),_Length=__webpack_require__(1),_Length2=_interopRequireDefault(_Length),_Util=(__webpack_require__(2),__webpack_require__(22),__webpack_require__(4)),INPUT_BORDER_COLOR=(exports.INPUT_COLOR=new _Color2.default([42,42,42]),new _Color2.default([165,165,165])),INPUT_BACKGROUND_COLOR=new _Color2.default([222,222,222]),INPUT_BORDER={borderWidth:1,borderColor:INPUT_BORDER_COLOR,borderStyle:_border.BORDER_STYLE.SOLID},RADIO_BORDER_RADIUS=(exports.INPUT_BORDERS=[INPUT_BORDER,INPUT_BORDER,INPUT_BORDER,INPUT_BORDER],exports.INPUT_BACKGROUND={backgroundColor:INPUT_BACKGROUND_COLOR,backgroundImage:[],backgroundClip:_background.BACKGROUND_CLIP.PADDING_BOX,backgroundOrigin:_background.BACKGROUND_ORIGIN.PADDING_BOX},new _Length2.default("50%")),RADIO_BORDER_RADIUS_TUPLE=[RADIO_BORDER_RADIUS,RADIO_BORDER_RADIUS],INPUT_RADIO_BORDER_RADIUS=[RADIO_BORDER_RADIUS_TUPLE,RADIO_BORDER_RADIUS_TUPLE,RADIO_BORDER_RADIUS_TUPLE,RADIO_BORDER_RADIUS_TUPLE],CHECKBOX_BORDER_RADIUS=new _Length2.default("3px"),CHECKBOX_BORDER_RADIUS_TUPLE=[CHECKBOX_BORDER_RADIUS,CHECKBOX_BORDER_RADIUS],INPUT_CHECKBOX_BORDER_RADIUS=[CHECKBOX_BORDER_RADIUS_TUPLE,CHECKBOX_BORDER_RADIUS_TUPLE,CHECKBOX_BORDER_RADIUS_TUPLE,CHECKBOX_BORDER_RADIUS_TUPLE],inlineFormElement=(exports.getInputBorderRadius=function(node){return"radio"===node.type?INPUT_RADIO_BORDER_RADIUS:INPUT_CHECKBOX_BORDER_RADIUS},exports.inlineInputElement=function(node,container){if("radio"===node.type||"checkbox"===node.type){if(node.checked){var size=Math.min(container.bounds.width,container.bounds.height);container.childNodes.push("checkbox"===node.type?[new _Vector2.default(container.bounds.left+.39363*size,container.bounds.top+.79*size),new _Vector2.default(container.bounds.left+.16*size,container.bounds.top+.5549*size),new _Vector2.default(container.bounds.left+.27347*size,container.bounds.top+.44071*size),new _Vector2.default(container.bounds.left+.39694*size,container.bounds.top+.5649*size),new _Vector2.default(container.bounds.left+.72983*size,container.bounds.top+.23*size),new _Vector2.default(container.bounds.left+.84*size,container.bounds.top+.34085*size),new _Vector2.default(container.bounds.left+.39363*size,container.bounds.top+.79*size)]:new _Circle2.default(container.bounds.left+size/4,container.bounds.top+size/4,size/4))}}else inlineFormElement(getInputValue(node),node,container,!1)},exports.inlineTextAreaElement=function(node,container){inlineFormElement(node.value,node,container,!0)},exports.inlineSelectElement=function(node,container){var option=node.options[node.selectedIndex||0];inlineFormElement(option?option.text||"":"",node,container,!1)},exports.reformatInputBounds=function(bounds){return bounds.width>bounds.height?(bounds.left+=(bounds.width-bounds.height)/2,bounds.width=bounds.height):bounds.width<bounds.height&&(bounds.top+=(bounds.height-bounds.width)/2,bounds.height=bounds.width),bounds},function(value,node,container,allowLinebreak){var body=node.ownerDocument.body;if(value.length>0&&body){var wrapper=node.ownerDocument.createElement("html2canvaswrapper");(0,_Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node,null),wrapper),wrapper.style.position="absolute",wrapper.style.left=container.bounds.left+"px",wrapper.style.top=container.bounds.top+"px",allowLinebreak||(wrapper.style.whiteSpace="nowrap");var text=node.ownerDocument.createTextNode(value);wrapper.appendChild(text),body.appendChild(wrapper),container.childNodes.push(_TextContainer2.default.fromTextNode(text,container)),body.removeChild(wrapper)}}),getInputValue=function(node){var value="password"===node.type?new Array(node.value.length+1).join("•"):node.value;return 0===value.length?node.placeholder||"":value}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseTextBounds=exports.TextBounds=void 0;var _Bounds=__webpack_require__(2),_textDecoration=__webpack_require__(11),_Feature=__webpack_require__(10),_Feature2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Feature),_Unicode=__webpack_require__(24),TextBounds=exports.TextBounds=function TextBounds(text,bounds){_classCallCheck(this,TextBounds),this.text=text,this.bounds=bounds},getWrapperBounds=(exports.parseTextBounds=function(value,parent,node){for(var letterRendering=0!==parent.style.letterSpacing,textList=letterRendering?(0,_Unicode.toCodePoints)(value).map(function(i){return(0,_Unicode.fromCodePoint)(i)}):(0,_Unicode.breakWords)(value,parent),length=textList.length,defaultView=node.parentNode?node.parentNode.ownerDocument.defaultView:null,scrollX=defaultView?defaultView.pageXOffset:0,scrollY=defaultView?defaultView.pageYOffset:0,textBounds=[],offset=0,i=0;i<length;i++){var text=textList[i];if(parent.style.textDecoration!==_textDecoration.TEXT_DECORATION.NONE||text.trim().length>0)if(_Feature2.default.SUPPORT_RANGE_BOUNDS)textBounds.push(new TextBounds(text,getRangeBounds(node,offset,text.length,scrollX,scrollY)));else{var replacementNode=node.splitText(text.length);textBounds.push(new TextBounds(text,getWrapperBounds(node,scrollX,scrollY))),node=replacementNode}else _Feature2.default.SUPPORT_RANGE_BOUNDS||(node=node.splitText(text.length));offset+=text.length}return textBounds},function(node,scrollX,scrollY){var wrapper=node.ownerDocument.createElement("html2canvaswrapper");wrapper.appendChild(node.cloneNode(!0));var parentNode=node.parentNode;if(parentNode){parentNode.replaceChild(wrapper,node);var bounds=(0,_Bounds.parseBounds)(wrapper,scrollX,scrollY);return wrapper.firstChild&&parentNode.replaceChild(wrapper.firstChild,wrapper),bounds}return new _Bounds.Bounds(0,0,0,0)}),getRangeBounds=function(node,offset,length,scrollX,scrollY){var range=node.ownerDocument.createRange();return range.setStart(node,offset),range.setEnd(node,offset+length),_Bounds.Bounds.fromClientRect(range.getBoundingClientRect(),scrollX,scrollY)}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),ForeignObjectRenderer=function(){function ForeignObjectRenderer(element){_classCallCheck(this,ForeignObjectRenderer),this.element=element}return _createClass(ForeignObjectRenderer,[{key:"render",value:function(options){var _this=this;this.options=options,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.canvas.width=Math.floor(options.width)*options.scale,this.canvas.height=Math.floor(options.height)*options.scale,this.canvas.style.width=options.width+"px",this.canvas.style.height=options.height+"px",options.logger.log("ForeignObject renderer initialized ("+options.width+"x"+options.height+" at "+options.x+","+options.y+") with scale "+options.scale);var svg=createForeignObjectSVG(Math.max(options.windowWidth,options.width)*options.scale,Math.max(options.windowHeight,options.height)*options.scale,options.scrollX*options.scale,options.scrollY*options.scale,this.element);return loadSerializedSVG(svg).then(function(img){return options.backgroundColor&&(_this.ctx.fillStyle=options.backgroundColor.toString(),_this.ctx.fillRect(0,0,options.width*options.scale,options.height*options.scale)),_this.ctx.drawImage(img,-options.x*options.scale,-options.y*options.scale),_this.canvas})}}]),ForeignObjectRenderer}();exports.default=ForeignObjectRenderer;var createForeignObjectSVG=exports.createForeignObjectSVG=function(width,height,x,y,node){var xmlns="http://www.w3.org/2000/svg",svg=document.createElementNS(xmlns,"svg"),foreignObject=document.createElementNS(xmlns,"foreignObject");return svg.setAttributeNS(null,"width",width),svg.setAttributeNS(null,"height",height),foreignObject.setAttributeNS(null,"width","100%"),foreignObject.setAttributeNS(null,"height","100%"),foreignObject.setAttributeNS(null,"x",x),foreignObject.setAttributeNS(null,"y",y),foreignObject.setAttributeNS(null,"externalResourcesRequired","true"),svg.appendChild(foreignObject),foreignObject.appendChild(node),svg},loadSerializedSVG=exports.loadSerializedSVG=function(svg){return new Promise(function(resolve,reject){var img=new Image;img.onload=function(){return resolve(img)},img.onerror=reject,img.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(svg))})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.breakWords=exports.fromCodePoint=exports.toCodePoints=void 0;var _cssLineBreak=__webpack_require__(46);Object.defineProperty(exports,"toCodePoints",{enumerable:!0,get:function(){return _cssLineBreak.toCodePoints}}),Object.defineProperty(exports,"fromCodePoint",{enumerable:!0,get:function(){return _cssLineBreak.fromCodePoint}});var _NodeContainer=__webpack_require__(3),_overflowWrap=(function(obj){obj&&obj.__esModule}(_NodeContainer),__webpack_require__(18));exports.breakWords=function(str,parent){for(var breaker=(0,_cssLineBreak.LineBreaker)(str,{lineBreak:parent.style.lineBreak,wordBreak:parent.style.overflowWrap===_overflowWrap.OVERFLOW_WRAP.BREAK_WORD?"break-word":parent.style.wordBreak}),words=[],bk=void 0;!(bk=breaker.next()).done;)words.push(bk.value.slice());return words}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FontMetrics=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Util=__webpack_require__(4);exports.FontMetrics=function(){function FontMetrics(document){_classCallCheck(this,FontMetrics),this._data={},this._document=document}return _createClass(FontMetrics,[{key:"_parseMetrics",value:function(font){var container=this._document.createElement("div"),img=this._document.createElement("img"),span=this._document.createElement("span"),body=this._document.body;if(!body)throw new Error("No document found for font metrics");container.style.visibility="hidden",container.style.fontFamily=font.fontFamily,container.style.fontSize=font.fontSize,container.style.margin="0",container.style.padding="0",body.appendChild(container),img.src=_Util.SMALL_IMAGE,img.width=1,img.height=1,img.style.margin="0",img.style.padding="0",img.style.verticalAlign="baseline",span.style.fontFamily=font.fontFamily,span.style.fontSize=font.fontSize,span.style.margin="0",span.style.padding="0",span.appendChild(this._document.createTextNode("Hidden Text")),container.appendChild(span),container.appendChild(img);var baseline=img.offsetTop-span.offsetTop+2;container.removeChild(span),container.appendChild(this._document.createTextNode("Hidden Text")),container.style.lineHeight="normal",img.style.verticalAlign="super";var middle=img.offsetTop-container.offsetTop+2;return body.removeChild(container),{baseline:baseline,middle:middle}}},{key:"getMetrics",value:function(font){var key=font.fontFamily+" "+font.fontSize;return void 0===this._data[key]&&(this._data[key]=this._parseMetrics(font)),this._data[key]}}]),FontMetrics}()},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Proxy=void 0;var _Feature=__webpack_require__(10),_Feature2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Feature);exports.Proxy=function(src,options){if(!options.proxy)return Promise.reject("No proxy defined");var proxy=options.proxy;return new Promise(function(resolve,reject){var responseType=_Feature2.default.SUPPORT_CORS_XHR&&_Feature2.default.SUPPORT_RESPONSE_TYPE?"blob":"text",xhr=_Feature2.default.SUPPORT_CORS_XHR?new XMLHttpRequest:new XDomainRequest;if(xhr.onload=function(){if(xhr instanceof XMLHttpRequest)if(200===xhr.status)if("text"===responseType)resolve(xhr.response);else{var reader=new FileReader;reader.addEventListener("load",function(){return resolve(reader.result)},!1),reader.addEventListener("error",function(e){return reject(e)},!1),reader.readAsDataURL(xhr.response)}else reject("Failed to proxy resource "+src.substring(0,256)+" with status code "+xhr.status);else resolve(xhr.responseText)},xhr.onerror=reject,xhr.open("GET",proxy+"?url="+encodeURIComponent(src)+"&responseType="+responseType),"text"!==responseType&&xhr instanceof XMLHttpRequest&&(xhr.responseType=responseType),options.imageTimeout){var timeout=options.imageTimeout;xhr.timeout=timeout,xhr.ontimeout=function(){return reject("Timed out ("+timeout+"ms) proxying "+src.substring(0,256))}}xhr.send()})}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_CanvasRenderer=__webpack_require__(15),_CanvasRenderer2=_interopRequireDefault(_CanvasRenderer),_Logger=__webpack_require__(16),_Logger2=_interopRequireDefault(_Logger),_Window=__webpack_require__(28),html2canvas=function(element,conf){var config=conf||{},logger=new _Logger2.default("boolean"!=typeof config.logging||config.logging);logger.log("html2canvas 1.0.0-alpha.12"),"function"==typeof config.onrendered&&logger.error("onrendered option is deprecated, html2canvas returns a Promise with the canvas as the value");var ownerDocument=element.ownerDocument;if(!ownerDocument)return Promise.reject("Provided element is not within a Document");var defaultView=ownerDocument.defaultView,defaultOptions={async:!0,allowTaint:!1,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,scale:defaultView.devicePixelRatio||1,target:new _CanvasRenderer2.default(config.canvas),useCORS:!1,windowWidth:defaultView.innerWidth,windowHeight:defaultView.innerHeight,scrollX:defaultView.pageXOffset,scrollY:defaultView.pageYOffset},result=(0,_Window.renderElement)(element,_extends({},defaultOptions,config),logger);return result.catch(function(e){throw logger.error(e),e})};html2canvas.CanvasRenderer=_CanvasRenderer2.default,module.exports=html2canvas},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.renderElement=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_Logger=__webpack_require__(16),_NodeParser=(_interopRequireDefault(_Logger),__webpack_require__(29)),_Renderer=__webpack_require__(51),_Renderer2=_interopRequireDefault(_Renderer),_ForeignObjectRenderer=__webpack_require__(23),_ForeignObjectRenderer2=_interopRequireDefault(_ForeignObjectRenderer),_Feature=__webpack_require__(10),_Feature2=_interopRequireDefault(_Feature),_Bounds=__webpack_require__(2),_Clone=__webpack_require__(54),_Font=__webpack_require__(25),_Color=__webpack_require__(0),_Color2=_interopRequireDefault(_Color);exports.renderElement=function renderElement(element,options,logger){var ownerDocument=element.ownerDocument,windowBounds=new _Bounds.Bounds(options.scrollX,options.scrollY,options.windowWidth,options.windowHeight),documentBackgroundColor=ownerDocument.documentElement?new _Color2.default(getComputedStyle(ownerDocument.documentElement).backgroundColor):_Color.TRANSPARENT,bodyBackgroundColor=ownerDocument.body?new _Color2.default(getComputedStyle(ownerDocument.body).backgroundColor):_Color.TRANSPARENT,backgroundColor=element===ownerDocument.documentElement?documentBackgroundColor.isTransparent()?bodyBackgroundColor.isTransparent()?options.backgroundColor?new _Color2.default(options.backgroundColor):null:bodyBackgroundColor:documentBackgroundColor:options.backgroundColor?new _Color2.default(options.backgroundColor):null;return(options.foreignObjectRendering?_Feature2.default.SUPPORT_FOREIGNOBJECT_DRAWING:Promise.resolve(!1)).then(function(supportForeignObject){return supportForeignObject?function(cloner){return logger.log("Document cloned, using foreignObject rendering"),cloner.inlineFonts(ownerDocument).then(function(){return cloner.resourceLoader.ready()}).then(function(){var renderer=new _ForeignObjectRenderer2.default(cloner.documentElement),defaultView=ownerDocument.defaultView,scrollX=defaultView.pageXOffset,scrollY=defaultView.pageYOffset,isDocument="HTML"===element.tagName||"BODY"===element.tagName,_ref=isDocument?(0,_Bounds.parseDocumentSize)(ownerDocument):(0,_Bounds.parseBounds)(element,scrollX,scrollY),width=_ref.width,height=_ref.height,left=_ref.left,top=_ref.top;return renderer.render({backgroundColor:backgroundColor,logger:logger,scale:options.scale,x:"number"==typeof options.x?options.x:left,y:"number"==typeof options.y?options.y:top,width:"number"==typeof options.width?options.width:Math.ceil(width),height:"number"==typeof options.height?options.height:Math.ceil(height),windowWidth:options.windowWidth,windowHeight:options.windowHeight,scrollX:options.scrollX,scrollY:options.scrollY})})}(new _Clone.DocumentCloner(element,options,logger,!0,renderElement)):(0,_Clone.cloneWindow)(ownerDocument,windowBounds,element,options,logger,renderElement).then(function(_ref2){var _ref3=_slicedToArray(_ref2,3),container=_ref3[0],clonedElement=_ref3[1],resourceLoader=_ref3[2];logger.log("Document cloned, using computed rendering");var stack=(0,_NodeParser.NodeParser)(clonedElement,resourceLoader,logger),clonedDocument=clonedElement.ownerDocument;return backgroundColor===stack.container.style.background.backgroundColor&&(stack.container.style.background.backgroundColor=_Color.TRANSPARENT),resourceLoader.ready().then(function(imageStore){var fontMetrics=new _Font.FontMetrics(clonedDocument);logger.log("Starting renderer");var defaultView=clonedDocument.defaultView,scrollX=defaultView.pageXOffset,scrollY=defaultView.pageYOffset,isDocument="HTML"===clonedElement.tagName||"BODY"===clonedElement.tagName,_ref4=isDocument?(0,_Bounds.parseDocumentSize)(ownerDocument):(0,_Bounds.parseBounds)(clonedElement,scrollX,scrollY),width=_ref4.width,height=_ref4.height,left=_ref4.left,top=_ref4.top,renderOptions={backgroundColor:backgroundColor,fontMetrics:fontMetrics,imageStore:imageStore,logger:logger,scale:options.scale,x:"number"==typeof options.x?options.x:left,y:"number"==typeof options.y?options.y:top,width:"number"==typeof options.width?options.width:Math.ceil(width),height:"number"==typeof options.height?options.height:Math.ceil(height)};if(Array.isArray(options.target))return Promise.all(options.target.map(function(target){return new _Renderer2.default(target,renderOptions).render(stack)}));var renderer=new _Renderer2.default(options.target,renderOptions),canvas=renderer.render(stack);return!0===options.removeContainer&&(container.parentNode?container.parentNode.removeChild(container):logger.log("Cannot detach cloned iframe as it is not in the DOM anymore")),canvas})})})}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.NodeParser=void 0;var _StackingContext=__webpack_require__(30),_StackingContext2=_interopRequireDefault(_StackingContext),_NodeContainer=__webpack_require__(3),_NodeContainer2=_interopRequireDefault(_NodeContainer),_TextContainer=__webpack_require__(9),_TextContainer2=_interopRequireDefault(_TextContainer),_Input=__webpack_require__(21),_ListItem=__webpack_require__(14),_listStyle=__webpack_require__(8),IGNORED_NODE_NAMES=(exports.NodeParser=function(node,resourceLoader,logger){logger.log("Starting node parsing");var index=0,container=new _NodeContainer2.default(node,null,resourceLoader,index++),stack=new _StackingContext2.default(container,null,!0);return parseNodeTree(node,container,stack,resourceLoader,index),logger.log("Finished parsing node tree"),stack},["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"]),parseNodeTree=function parseNodeTree(node,parent,stack,resourceLoader,index){if(index>5e4)throw new Error("Recursion error while parsing node tree");for(var nextNode,childNode=node.firstChild;childNode;childNode=nextNode){nextNode=childNode.nextSibling;var defaultView=childNode.ownerDocument.defaultView;if(childNode instanceof defaultView.Text||childNode instanceof Text||defaultView.parent&&childNode instanceof defaultView.parent.Text)childNode.data.trim().length>0&&parent.childNodes.push(_TextContainer2.default.fromTextNode(childNode,parent));else if(childNode instanceof defaultView.HTMLElement||childNode instanceof HTMLElement||defaultView.parent&&childNode instanceof defaultView.parent.HTMLElement){if(-1===IGNORED_NODE_NAMES.indexOf(childNode.nodeName)){var container=new _NodeContainer2.default(childNode,parent,resourceLoader,index++);if(container.isVisible()){"INPUT"===childNode.tagName?(0,_Input.inlineInputElement)(childNode,container):"TEXTAREA"===childNode.tagName?(0,_Input.inlineTextAreaElement)(childNode,container):"SELECT"===childNode.tagName?(0,_Input.inlineSelectElement)(childNode,container):container.style.listStyle&&container.style.listStyle.listStyleType!==_listStyle.LIST_STYLE_TYPE.NONE&&(0,_ListItem.inlineListItemElement)(childNode,container,resourceLoader);var SHOULD_TRAVERSE_CHILDREN="TEXTAREA"!==childNode.tagName,treatAsRealStackingContext=createsRealStackingContext(container,childNode);if(treatAsRealStackingContext||createsStackingContext(container)){var parentStack=treatAsRealStackingContext||container.isPositioned()?stack.getRealParentStackingContext():stack,childStack=new _StackingContext2.default(container,parentStack,treatAsRealStackingContext);parentStack.contexts.push(childStack),SHOULD_TRAVERSE_CHILDREN&&parseNodeTree(childNode,container,childStack,resourceLoader,index)}else stack.children.push(container),SHOULD_TRAVERSE_CHILDREN&&parseNodeTree(childNode,container,stack,resourceLoader,index)}}}else if(childNode instanceof defaultView.SVGSVGElement||childNode instanceof SVGSVGElement||defaultView.parent&&childNode instanceof defaultView.parent.SVGSVGElement){var _container=new _NodeContainer2.default(childNode,parent,resourceLoader,index++),_treatAsRealStackingContext=createsRealStackingContext(_container,childNode);if(_treatAsRealStackingContext||createsStackingContext(_container)){var _parentStack=_treatAsRealStackingContext||_container.isPositioned()?stack.getRealParentStackingContext():stack,_childStack=new _StackingContext2.default(_container,_parentStack,_treatAsRealStackingContext);_parentStack.contexts.push(_childStack)}else stack.children.push(_container)}}},createsRealStackingContext=function(container,node){return container.isRootElement()||container.isPositionedWithZIndex()||container.style.opacity<1||container.isTransformed()||isBodyWithTransparentRoot(container,node)},createsStackingContext=function(container){return container.isPositioned()||container.isFloating()},isBodyWithTransparentRoot=function(container,node){return"BODY"===node.nodeName&&container.parent instanceof _NodeContainer2.default&&container.parent.style.background.backgroundColor.isTransparent()}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_NodeContainer=__webpack_require__(3),StackingContext=(function(obj){obj&&obj.__esModule}(_NodeContainer),__webpack_require__(19),function(){function StackingContext(container,parent,treatAsRealStackingContext){_classCallCheck(this,StackingContext),this.container=container,this.parent=parent,this.contexts=[],this.children=[],this.treatAsRealStackingContext=treatAsRealStackingContext}return _createClass(StackingContext,[{key:"getOpacity",value:function(){return this.parent?this.container.style.opacity*this.parent.getOpacity():this.container.style.opacity}},{key:"getRealParentStackingContext",value:function(){return!this.parent||this.treatAsRealStackingContext?this:this.parent.getRealParentStackingContext()}}]),StackingContext}());exports.default=StackingContext},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var Size=function Size(width,height){_classCallCheck(this,Size),this.width=width,this.height=height};exports.default=Size},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Path=__webpack_require__(6),_Vector=__webpack_require__(7),_Vector2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Vector),lerp=function(a,b,t){return new _Vector2.default(a.x+(b.x-a.x)*t,a.y+(b.y-a.y)*t)},BezierCurve=function(){function BezierCurve(start,startControl,endControl,end){_classCallCheck(this,BezierCurve),this.type=_Path.PATH.BEZIER_CURVE,this.start=start,this.startControl=startControl,this.endControl=endControl,this.end=end}return _createClass(BezierCurve,[{key:"subdivide",value:function(t,firstHalf){var ab=lerp(this.start,this.startControl,t),bc=lerp(this.startControl,this.endControl,t),cd=lerp(this.endControl,this.end,t),abbc=lerp(ab,bc,t),bccd=lerp(bc,cd,t),dest=lerp(abbc,bccd,t);return firstHalf?new BezierCurve(this.start,ab,abbc,dest):new BezierCurve(dest,bccd,cd,this.end)}},{key:"reverse",value:function(){return new BezierCurve(this.end,this.endControl,this.startControl,this.start)}}]),BezierCurve}();exports.default=BezierCurve},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseBorderRadius=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_Length=__webpack_require__(1),_Length2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Length),SIDES=["top-left","top-right","bottom-right","bottom-left"];exports.parseBorderRadius=function(style){return SIDES.map(function(side){var value=style.getPropertyValue("border-"+side+"-radius"),_value$split$map=value.split(" ").map(_Length2.default.create),_value$split$map2=_slicedToArray(_value$split$map,2),horizontal=_value$split$map2[0],vertical=_value$split$map2[1];return void 0===vertical?[horizontal,horizontal]:[horizontal,vertical]})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var DISPLAY=exports.DISPLAY={NONE:1,BLOCK:2,INLINE:4,RUN_IN:8,FLOW:16,FLOW_ROOT:32,TABLE:64,FLEX:128,GRID:256,RUBY:512,SUBGRID:1024,LIST_ITEM:2048,TABLE_ROW_GROUP:4096,TABLE_HEADER_GROUP:8192,TABLE_FOOTER_GROUP:16384,TABLE_ROW:32768,TABLE_CELL:65536,TABLE_COLUMN_GROUP:1<<17,TABLE_COLUMN:1<<18,TABLE_CAPTION:1<<19,RUBY_BASE:1<<20,RUBY_TEXT:1<<21,RUBY_BASE_CONTAINER:1<<22,RUBY_TEXT_CONTAINER:1<<23,CONTENTS:1<<24,INLINE_BLOCK:1<<25,INLINE_LIST_ITEM:1<<26,INLINE_TABLE:1<<27,INLINE_FLEX:1<<28,INLINE_GRID:1<<29},parseDisplayValue=function(display){switch(display){case"block":return DISPLAY.BLOCK;case"inline":return DISPLAY.INLINE;case"run-in":return DISPLAY.RUN_IN;case"flow":return DISPLAY.FLOW;case"flow-root":return DISPLAY.FLOW_ROOT;case"table":return DISPLAY.TABLE;case"flex":return DISPLAY.FLEX;case"grid":return DISPLAY.GRID;case"ruby":return DISPLAY.RUBY;case"subgrid":return DISPLAY.SUBGRID;case"list-item":return DISPLAY.LIST_ITEM;case"table-row-group":return DISPLAY.TABLE_ROW_GROUP;case"table-header-group":return DISPLAY.TABLE_HEADER_GROUP;case"table-footer-group":return DISPLAY.TABLE_FOOTER_GROUP;case"table-row":return DISPLAY.TABLE_ROW;case"table-cell":return DISPLAY.TABLE_CELL;case"table-column-group":return DISPLAY.TABLE_COLUMN_GROUP;case"table-column":return DISPLAY.TABLE_COLUMN;case"table-caption":return DISPLAY.TABLE_CAPTION;case"ruby-base":return DISPLAY.RUBY_BASE;case"ruby-text":return DISPLAY.RUBY_TEXT;case"ruby-base-container":return DISPLAY.RUBY_BASE_CONTAINER;case"ruby-text-container":return DISPLAY.RUBY_TEXT_CONTAINER;case"contents":return DISPLAY.CONTENTS;case"inline-block":return DISPLAY.INLINE_BLOCK;case"inline-list-item":return DISPLAY.INLINE_LIST_ITEM;case"inline-table":return DISPLAY.INLINE_TABLE;case"inline-flex":return DISPLAY.INLINE_FLEX;case"inline-grid":return DISPLAY.INLINE_GRID}return DISPLAY.NONE},setDisplayBit=function(bit,display){return bit|parseDisplayValue(display)};exports.parseDisplay=function(display){return display.split(" ").reduce(setDisplayBit,0)}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var FLOAT=exports.FLOAT={NONE:0,LEFT:1,RIGHT:2,INLINE_START:3,INLINE_END:4};exports.parseCSSFloat=function(float){switch(float){case"left":return FLOAT.LEFT;case"right":return FLOAT.RIGHT;case"inline-start":return FLOAT.INLINE_START;case"inline-end":return FLOAT.INLINE_END}return FLOAT.NONE}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var parseFontWeight=function(weight){switch(weight){case"normal":return 400;case"bold":return 700}var value=parseInt(weight,10);return isNaN(value)?400:value};exports.parseFont=function(style){return{fontFamily:style.fontFamily,fontSize:style.fontSize,fontStyle:style.fontStyle,fontVariant:style.fontVariant,fontWeight:parseFontWeight(style.fontWeight)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.parseLetterSpacing=function(letterSpacing){if("normal"===letterSpacing)return 0;var value=parseFloat(letterSpacing);return isNaN(value)?0:value}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var LINE_BREAK=exports.LINE_BREAK={NORMAL:"normal",STRICT:"strict"};exports.parseLineBreak=function(wordBreak){switch(wordBreak){case"strict":return LINE_BREAK.STRICT;case"normal":default:return LINE_BREAK.NORMAL}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseMargin=void 0;var _Length=__webpack_require__(1),_Length2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Length),SIDES=["top","right","bottom","left"];exports.parseMargin=function(style){return SIDES.map(function(side){return new _Length2.default(style.getPropertyValue("margin-"+side))})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var OVERFLOW=exports.OVERFLOW={VISIBLE:0,HIDDEN:1,SCROLL:2,AUTO:3};exports.parseOverflow=function(overflow){switch(overflow){case"hidden":return OVERFLOW.HIDDEN;case"scroll":return OVERFLOW.SCROLL;case"auto":return OVERFLOW.AUTO;case"visible":default:return OVERFLOW.VISIBLE}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseTextShadow=void 0;var _Color=__webpack_require__(0),_Color2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Color),NUMBER=/^([+-]|\d|\.)$/i;exports.parseTextShadow=function(textShadow){if("none"===textShadow||"string"!=typeof textShadow)return null;for(var currentValue="",isLength=!1,values=[],shadows=[],numParens=0,color=null,appendValue=function(){currentValue.length&&(isLength?values.push(parseFloat(currentValue)):color=new _Color2.default(currentValue)),isLength=!1,currentValue=""},appendShadow=function(){values.length&&null!==color&&shadows.push({color:color,offsetX:values[0]||0,offsetY:values[1]||0,blur:values[2]||0}),values.splice(0,values.length),color=null},i=0;i<textShadow.length;i++){var c=textShadow[i];switch(c){case"(":currentValue+=c,numParens++;break;case")":currentValue+=c,numParens--;break;case",":0===numParens?(appendValue(),appendShadow()):currentValue+=c;break;case" ":0===numParens?appendValue():currentValue+=c;break;default:0===currentValue.length&&NUMBER.test(c)&&(isLength=!0),currentValue+=c}}return appendValue(),appendShadow(),0===shadows.length?null:shadows}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseTransform=void 0;var _Length=__webpack_require__(1),_Length2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Length),toFloat=function(s){return parseFloat(s.trim())},MATRIX=/(matrix|matrix3d)\((.+)\)/,parseTransformOrigin=(exports.parseTransform=function(style){var transform=parseTransformMatrix(style.transform||style.webkitTransform||style.mozTransform||style.msTransform||style.oTransform);return null===transform?null:{transform:transform,transformOrigin:parseTransformOrigin(style.transformOrigin||style.webkitTransformOrigin||style.mozTransformOrigin||style.msTransformOrigin||style.oTransformOrigin)}},function(origin){if("string"!=typeof origin){var v=new _Length2.default("0");return[v,v]}var values=origin.split(" ").map(_Length2.default.create);return[values[0],values[1]]}),parseTransformMatrix=function(transform){if("none"===transform||"string"!=typeof transform)return null;var match=transform.match(MATRIX);if(match){if("matrix"===match[1]){var matrix=match[2].split(",").map(toFloat);return[matrix[0],matrix[1],matrix[2],matrix[3],matrix[4],matrix[5]]}var matrix3d=match[2].split(",").map(toFloat);return[matrix3d[0],matrix3d[1],matrix3d[4],matrix3d[5],matrix3d[12],matrix3d[13]]}return null}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var VISIBILITY=exports.VISIBILITY={VISIBLE:0,HIDDEN:1,COLLAPSE:2};exports.parseVisibility=function(visibility){switch(visibility){case"hidden":return VISIBILITY.HIDDEN;case"collapse":return VISIBILITY.COLLAPSE;case"visible":default:return VISIBILITY.VISIBLE}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var WORD_BREAK=exports.WORD_BREAK={NORMAL:"normal",BREAK_ALL:"break-all",KEEP_ALL:"keep-all"};exports.parseWordBreak=function(wordBreak){switch(wordBreak){case"break-all":return WORD_BREAK.BREAK_ALL;case"keep-all":return WORD_BREAK.KEEP_ALL;case"normal":default:return WORD_BREAK.NORMAL}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.parseZIndex=function(zIndex){var auto="auto"===zIndex;return{auto:auto,order:auto?0:parseInt(zIndex,10)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _Util=__webpack_require__(13);Object.defineProperty(exports,"toCodePoints",{enumerable:!0,get:function(){return _Util.toCodePoints}}),Object.defineProperty(exports,"fromCodePoint",{enumerable:!0,get:function(){return _Util.fromCodePoint}});var _LineBreak=__webpack_require__(47);Object.defineProperty(exports,"LineBreaker",{enumerable:!0,get:function(){return _LineBreak.LineBreaker}})},function(module,exports,__webpack_require__){"use strict";function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.LineBreaker=exports.inlineBreakOpportunities=exports.lineBreakAtIndex=exports.codePointsToCharacterClasses=exports.UnicodeTrie=exports.BREAK_ALLOWED=exports.BREAK_NOT_ALLOWED=exports.BREAK_MANDATORY=exports.classes=exports.LETTER_NUMBER_MODIFIER=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_Trie=__webpack_require__(48),_linebreakTrie=__webpack_require__(49),_linebreakTrie2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_linebreakTrie),_Util=__webpack_require__(13),LETTER_NUMBER_MODIFIER=exports.LETTER_NUMBER_MODIFIER=50,BREAK_MANDATORY=(exports.classes={BK:1,CR:2,LF:3,CM:4,NL:5,SG:6,WJ:7,ZW:8,GL:9,SP:10,ZWJ:11,B2:12,BA:13,BB:14,HY:15,CB:16,CL:17,CP:18,EX:19,IN:20,NS:21,OP:22,QU:23,IS:24,NU:25,PO:26,PR:27,SY:28,AI:29,AL:30,CJ:31,EB:32,EM:33,H2:34,H3:35,HL:36,ID:37,JL:38,JV:39,JT:40,RI:41,SA:42,XX:43},exports.BREAK_MANDATORY="!"),BREAK_NOT_ALLOWED=exports.BREAK_NOT_ALLOWED="×",BREAK_ALLOWED=exports.BREAK_ALLOWED="÷",UnicodeTrie=exports.UnicodeTrie=(0,_Trie.createTrieFromBase64)(_linebreakTrie2.default),ALPHABETICS=[30,36],HARD_LINE_BREAKS=[1,2,3,5],SPACE=[10,8],PREFIX_POSTFIX=[27,26],LINE_BREAKS=HARD_LINE_BREAKS.concat(SPACE),KOREAN_SYLLABLE_BLOCK=[38,39,40,34,35],HYPHEN=[15,13],codePointsToCharacterClasses=exports.codePointsToCharacterClasses=function(codePoints){var lineBreak=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"strict",types=[],indicies=[],categories=[];return codePoints.forEach(function(codePoint,index){var classType=UnicodeTrie.get(codePoint);if(classType>LETTER_NUMBER_MODIFIER?(categories.push(!0),classType-=LETTER_NUMBER_MODIFIER):categories.push(!1),-1!==["normal","auto","loose"].indexOf(lineBreak)&&-1!==[8208,8211,12316,12448].indexOf(codePoint))return indicies.push(index),types.push(16);if(4===classType||11===classType){if(0===index)return indicies.push(index),types.push(30);var prev=types[index-1];return-1===LINE_BREAKS.indexOf(prev)?(indicies.push(indicies[index-1]),types.push(prev)):(indicies.push(index),types.push(30))}return indicies.push(index),31===classType?types.push("strict"===lineBreak?21:37):42===classType?types.push(30):29===classType?types.push(30):43===classType?codePoint>=131072&&codePoint<=196605||codePoint>=196608&&codePoint<=262141?types.push(37):types.push(30):void types.push(classType)}),[indicies,types,categories]},isAdjacentWithSpaceIgnored=function(a,b,currentIndex,classTypes){var current=classTypes[currentIndex];if(Array.isArray(a)?-1!==a.indexOf(current):a===current)for(var i=currentIndex;i<=classTypes.length;){i++;var next=classTypes[i];if(next===b)return!0;if(10!==next)break}if(10===current)for(var _i=currentIndex;_i>0;){_i--;var prev=classTypes[_i];if(Array.isArray(a)?-1!==a.indexOf(prev):a===prev)for(var n=currentIndex;n<=classTypes.length;){n++;var _next=classTypes[n];if(_next===b)return!0;if(10!==_next)break}if(10!==prev)break}return!1},previousNonSpaceClassType=function(currentIndex,classTypes){for(var i=currentIndex;i>=0;){var type=classTypes[i];if(10!==type)return type;i--}return 0},_lineBreakAtIndex=function(codePoints,classTypes,indicies,index,forbiddenBreaks){if(0===indicies[index])return BREAK_NOT_ALLOWED;var currentIndex=index-1;if(Array.isArray(forbiddenBreaks)&&!0===forbiddenBreaks[currentIndex])return BREAK_NOT_ALLOWED;var beforeIndex=currentIndex-1,afterIndex=currentIndex+1,current=classTypes[currentIndex],before=beforeIndex>=0?classTypes[beforeIndex]:0,next=classTypes[afterIndex];if(2===current&&3===next)return BREAK_NOT_ALLOWED;if(-1!==HARD_LINE_BREAKS.indexOf(current))return BREAK_MANDATORY;if(-1!==HARD_LINE_BREAKS.indexOf(next))return BREAK_NOT_ALLOWED;if(-1!==SPACE.indexOf(next))return BREAK_NOT_ALLOWED;if(8===previousNonSpaceClassType(currentIndex,classTypes))return BREAK_ALLOWED;if(11===UnicodeTrie.get(codePoints[currentIndex])&&(37===next||32===next||33===next))return BREAK_NOT_ALLOWED;if(7===current||7===next)return BREAK_NOT_ALLOWED;if(9===current)return BREAK_NOT_ALLOWED;if(-1===[10,13,15].indexOf(current)&&9===next)return BREAK_NOT_ALLOWED;if(-1!==[17,18,19,24,28].indexOf(next))return BREAK_NOT_ALLOWED;if(22===previousNonSpaceClassType(currentIndex,classTypes))return BREAK_NOT_ALLOWED;if(isAdjacentWithSpaceIgnored(23,22,currentIndex,classTypes))return BREAK_NOT_ALLOWED;if(isAdjacentWithSpaceIgnored([17,18],21,currentIndex,classTypes))return BREAK_NOT_ALLOWED;if(isAdjacentWithSpaceIgnored(12,12,currentIndex,classTypes))return BREAK_NOT_ALLOWED;if(10===current)return BREAK_ALLOWED;if(23===current||23===next)return BREAK_NOT_ALLOWED;if(16===next||16===current)return BREAK_ALLOWED;if(-1!==[13,15,21].indexOf(next)||14===current)return BREAK_NOT_ALLOWED;if(36===before&&-1!==HYPHEN.indexOf(current))return BREAK_NOT_ALLOWED;if(28===current&&36===next)return BREAK_NOT_ALLOWED;if(20===next&&-1!==ALPHABETICS.concat(20,19,25,37,32,33).indexOf(current))return BREAK_NOT_ALLOWED;if(-1!==ALPHABETICS.indexOf(next)&&25===current||-1!==ALPHABETICS.indexOf(current)&&25===next)return BREAK_NOT_ALLOWED;if(27===current&&-1!==[37,32,33].indexOf(next)||-1!==[37,32,33].indexOf(current)&&26===next)return BREAK_NOT_ALLOWED;if(-1!==ALPHABETICS.indexOf(current)&&-1!==PREFIX_POSTFIX.indexOf(next)||-1!==PREFIX_POSTFIX.indexOf(current)&&-1!==ALPHABETICS.indexOf(next))return BREAK_NOT_ALLOWED;if(-1!==[27,26].indexOf(current)&&(25===next||-1!==[22,15].indexOf(next)&&25===classTypes[afterIndex+1])||-1!==[22,15].indexOf(current)&&25===next||25===current&&-1!==[25,28,24].indexOf(next))return BREAK_NOT_ALLOWED;if(-1!==[25,28,24,17,18].indexOf(next))for(var prevIndex=currentIndex;prevIndex>=0;){var type=classTypes[prevIndex];if(25===type)return BREAK_NOT_ALLOWED;if(-1===[28,24].indexOf(type))break;prevIndex--}if(-1!==[27,26].indexOf(next))for(var _prevIndex=-1!==[17,18].indexOf(current)?beforeIndex:currentIndex;_prevIndex>=0;){var _type=classTypes[_prevIndex];if(25===_type)return BREAK_NOT_ALLOWED;if(-1===[28,24].indexOf(_type))break;_prevIndex--}if(38===current&&-1!==[38,39,34,35].indexOf(next)||-1!==[39,34].indexOf(current)&&-1!==[39,40].indexOf(next)||-1!==[40,35].indexOf(current)&&40===next)return BREAK_NOT_ALLOWED;if(-1!==KOREAN_SYLLABLE_BLOCK.indexOf(current)&&-1!==[20,26].indexOf(next)||-1!==KOREAN_SYLLABLE_BLOCK.indexOf(next)&&27===current)return BREAK_NOT_ALLOWED;if(-1!==ALPHABETICS.indexOf(current)&&-1!==ALPHABETICS.indexOf(next))return BREAK_NOT_ALLOWED;if(24===current&&-1!==ALPHABETICS.indexOf(next))return BREAK_NOT_ALLOWED;if(-1!==ALPHABETICS.concat(25).indexOf(current)&&22===next||-1!==ALPHABETICS.concat(25).indexOf(next)&&18===current)return BREAK_NOT_ALLOWED;if(41===current&&41===next){for(var i=indicies[currentIndex],count=1;i>0&&(i--,41===classTypes[i]);)count++;if(count%2!=0)return BREAK_NOT_ALLOWED}return 32===current&&33===next?BREAK_NOT_ALLOWED:BREAK_ALLOWED},cssFormattedClasses=(exports.lineBreakAtIndex=function(codePoints,index){if(0===index)return BREAK_NOT_ALLOWED;if(index>=codePoints.length)return BREAK_MANDATORY;var _codePointsToCharacte=codePointsToCharacterClasses(codePoints),_codePointsToCharacte2=_slicedToArray(_codePointsToCharacte,2),indicies=_codePointsToCharacte2[0],classTypes=_codePointsToCharacte2[1];return _lineBreakAtIndex(codePoints,classTypes,indicies,index)},function(codePoints,options){options||(options={lineBreak:"normal",wordBreak:"normal"});var _codePointsToCharacte3=codePointsToCharacterClasses(codePoints,options.lineBreak),_codePointsToCharacte4=_slicedToArray(_codePointsToCharacte3,3),indicies=_codePointsToCharacte4[0],classTypes=_codePointsToCharacte4[1],isLetterNumber=_codePointsToCharacte4[2];return"break-all"!==options.wordBreak&&"break-word"!==options.wordBreak||(classTypes=classTypes.map(function(type){return-1!==[25,30,42].indexOf(type)?37:type})),[indicies,classTypes,"keep-all"===options.wordBreak?isLetterNumber.map(function(isLetterNumber,i){return isLetterNumber&&codePoints[i]>=19968&&codePoints[i]<=40959}):null]}),Break=(exports.inlineBreakOpportunities=function(str,options){var codePoints=(0,_Util.toCodePoints)(str),output=BREAK_NOT_ALLOWED,_cssFormattedClasses=cssFormattedClasses(codePoints,options),_cssFormattedClasses2=_slicedToArray(_cssFormattedClasses,3),indicies=_cssFormattedClasses2[0],classTypes=_cssFormattedClasses2[1],forbiddenBreakpoints=_cssFormattedClasses2[2];return codePoints.forEach(function(codePoint,i){output+=(0,_Util.fromCodePoint)(codePoint)+(i>=codePoints.length-1?BREAK_MANDATORY:_lineBreakAtIndex(codePoints,classTypes,indicies,i+1,forbiddenBreakpoints))}),output},function(){function Break(codePoints,lineBreak,start,end){_classCallCheck(this,Break),this._codePoints=codePoints,this.required=lineBreak===BREAK_MANDATORY,this.start=start,this.end=end}return _createClass(Break,[{key:"slice",value:function(){return _Util.fromCodePoint.apply(void 0,_toConsumableArray(this._codePoints.slice(this.start,this.end)))}}]),Break}());exports.LineBreaker=function(str,options){var codePoints=(0,_Util.toCodePoints)(str),_cssFormattedClasses3=cssFormattedClasses(codePoints,options),_cssFormattedClasses4=_slicedToArray(_cssFormattedClasses3,3),indicies=_cssFormattedClasses4[0],classTypes=_cssFormattedClasses4[1],forbiddenBreakpoints=_cssFormattedClasses4[2],length=codePoints.length,lastEnd=0,nextIndex=0;return{next:function(){if(nextIndex>=length)return{done:!0};for(var lineBreak=BREAK_NOT_ALLOWED;nextIndex<length&&(lineBreak=_lineBreakAtIndex(codePoints,classTypes,indicies,++nextIndex,forbiddenBreakpoints))===BREAK_NOT_ALLOWED;);if(lineBreak!==BREAK_NOT_ALLOWED||nextIndex===length){var value=new Break(codePoints,lineBreak,lastEnd,nextIndex);return lastEnd=nextIndex,{value:value,done:!1}}return{done:!0}}}}},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Trie=exports.createTrieFromBase64=exports.UTRIE2_INDEX_2_MASK=exports.UTRIE2_INDEX_2_BLOCK_LENGTH=exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH=exports.UTRIE2_INDEX_1_OFFSET=exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH=exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET=exports.UTRIE2_INDEX_2_BMP_LENGTH=exports.UTRIE2_LSCP_INDEX_2_LENGTH=exports.UTRIE2_DATA_MASK=exports.UTRIE2_DATA_BLOCK_LENGTH=exports.UTRIE2_LSCP_INDEX_2_OFFSET=exports.UTRIE2_SHIFT_1_2=exports.UTRIE2_INDEX_SHIFT=exports.UTRIE2_SHIFT_1=exports.UTRIE2_SHIFT_2=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Util=__webpack_require__(13),UTRIE2_SHIFT_2=exports.UTRIE2_SHIFT_2=5,UTRIE2_SHIFT_1=exports.UTRIE2_SHIFT_1=11,UTRIE2_INDEX_SHIFT=exports.UTRIE2_INDEX_SHIFT=2,UTRIE2_SHIFT_1_2=exports.UTRIE2_SHIFT_1_2=UTRIE2_SHIFT_1-UTRIE2_SHIFT_2,UTRIE2_LSCP_INDEX_2_OFFSET=exports.UTRIE2_LSCP_INDEX_2_OFFSET=65536>>UTRIE2_SHIFT_2,UTRIE2_DATA_BLOCK_LENGTH=exports.UTRIE2_DATA_BLOCK_LENGTH=1<<UTRIE2_SHIFT_2,UTRIE2_DATA_MASK=exports.UTRIE2_DATA_MASK=UTRIE2_DATA_BLOCK_LENGTH-1,UTRIE2_LSCP_INDEX_2_LENGTH=exports.UTRIE2_LSCP_INDEX_2_LENGTH=1024>>UTRIE2_SHIFT_2,UTRIE2_INDEX_2_BMP_LENGTH=exports.UTRIE2_INDEX_2_BMP_LENGTH=UTRIE2_LSCP_INDEX_2_OFFSET+UTRIE2_LSCP_INDEX_2_LENGTH,UTRIE2_UTF8_2B_INDEX_2_OFFSET=exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET=UTRIE2_INDEX_2_BMP_LENGTH,UTRIE2_UTF8_2B_INDEX_2_LENGTH=exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH=32,UTRIE2_INDEX_1_OFFSET=exports.UTRIE2_INDEX_1_OFFSET=UTRIE2_UTF8_2B_INDEX_2_OFFSET+UTRIE2_UTF8_2B_INDEX_2_LENGTH,UTRIE2_OMITTED_BMP_INDEX_1_LENGTH=exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH=65536>>UTRIE2_SHIFT_1,UTRIE2_INDEX_2_BLOCK_LENGTH=exports.UTRIE2_INDEX_2_BLOCK_LENGTH=1<<UTRIE2_SHIFT_1_2,UTRIE2_INDEX_2_MASK=exports.UTRIE2_INDEX_2_MASK=UTRIE2_INDEX_2_BLOCK_LENGTH-1,Trie=(exports.createTrieFromBase64=function(base64){var buffer=(0,_Util.decode)(base64),view32=Array.isArray(buffer)?(0,_Util.polyUint32Array)(buffer):new Uint32Array(buffer),view16=Array.isArray(buffer)?(0,_Util.polyUint16Array)(buffer):new Uint16Array(buffer),index=view16.slice(12,view32[4]/2),data=2===view32[5]?view16.slice((24+view32[4])/2):view32.slice(Math.ceil((24+view32[4])/4));return new Trie(view32[0],view32[1],view32[2],view32[3],index,data)},exports.Trie=function(){function Trie(initialValue,errorValue,highStart,highValueIndex,index,data){_classCallCheck(this,Trie),this.initialValue=initialValue,this.errorValue=errorValue,this.highStart=highStart,this.highValueIndex=highValueIndex,this.index=index,this.data=data}return _createClass(Trie,[{key:"get",value:function(codePoint){var ix=void 0;if(codePoint>=0){if(codePoint<55296||codePoint>56319&&codePoint<=65535)return ix=this.index[codePoint>>UTRIE2_SHIFT_2],ix=(ix<<UTRIE2_INDEX_SHIFT)+(codePoint&UTRIE2_DATA_MASK),this.data[ix];if(codePoint<=65535)return ix=this.index[UTRIE2_LSCP_INDEX_2_OFFSET+(codePoint-55296>>UTRIE2_SHIFT_2)],ix=(ix<<UTRIE2_INDEX_SHIFT)+(codePoint&UTRIE2_DATA_MASK),this.data[ix];if(codePoint<this.highStart)return ix=UTRIE2_INDEX_1_OFFSET-UTRIE2_OMITTED_BMP_INDEX_1_LENGTH+(codePoint>>UTRIE2_SHIFT_1),ix=this.index[ix],ix+=codePoint>>UTRIE2_SHIFT_2&UTRIE2_INDEX_2_MASK,ix=this.index[ix],ix=(ix<<UTRIE2_INDEX_SHIFT)+(codePoint&UTRIE2_DATA_MASK),this.data[ix];if(codePoint<=1114111)return this.data[this.highValueIndex]}return this.errorValue}}]),Trie}())},function(module,exports,__webpack_require__){"use strict";module.exports="KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA"},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _Path=__webpack_require__(6),Circle=function Circle(x,y,radius){_classCallCheck(this,Circle),this.type=_Path.PATH.CIRCLE,this.x=x,this.y=y,this.radius=radius,isNaN(x)&&console.error("Invalid x value given for Circle"),isNaN(y)&&console.error("Invalid y value given for Circle"),isNaN(radius)&&console.error("Invalid radius value given for Circle")};exports.default=Circle},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Bounds=__webpack_require__(2),_Gradient=(__webpack_require__(25),__webpack_require__(52)),_TextContainer=__webpack_require__(9),_TextContainer2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_TextContainer),_background=__webpack_require__(5),_border=__webpack_require__(12),Renderer=function(){function Renderer(target,options){_classCallCheck(this,Renderer),this.target=target,this.options=options,target.render(options)}return _createClass(Renderer,[{key:"renderNode",value:function(container){container.isVisible()&&(this.renderNodeBackgroundAndBorders(container),this.renderNodeContent(container))}},{key:"renderNodeContent",value:function(container){var _this=this,callback=function(){if(container.childNodes.length&&container.childNodes.forEach(function(child){if(child instanceof _TextContainer2.default){var style=child.parent.style;_this.target.renderTextNode(child.bounds,style.color,style.font,style.textDecoration,style.textShadow)}else _this.target.drawShape(child,container.style.color)}),container.image){var _image=_this.options.imageStore.get(container.image);if(_image){var contentBox=(0,_Bounds.calculateContentBox)(container.bounds,container.style.padding,container.style.border),_width="number"==typeof _image.width&&_image.width>0?_image.width:contentBox.width,_height="number"==typeof _image.height&&_image.height>0?_image.height:contentBox.height;_width>0&&_height>0&&_this.target.clip([(0,_Bounds.calculatePaddingBoxPath)(container.curvedBounds)],function(){_this.target.drawImage(_image,new _Bounds.Bounds(0,0,_width,_height),contentBox)})}}},paths=container.getClipPaths();paths.length?this.target.clip(paths,callback):callback()}},{key:"renderNodeBackgroundAndBorders",value:function(container){var _this2=this,HAS_BACKGROUND=!container.style.background.backgroundColor.isTransparent()||container.style.background.backgroundImage.length,hasRenderableBorders=container.style.border.some(function(border){return border.borderStyle!==_border.BORDER_STYLE.NONE&&!border.borderColor.isTransparent()}),callback=function(){var backgroundPaintingArea=(0,_background.calculateBackgroungPaintingArea)(container.curvedBounds,container.style.background.backgroundClip);HAS_BACKGROUND&&_this2.target.clip([backgroundPaintingArea],function(){container.style.background.backgroundColor.isTransparent()||_this2.target.fill(container.style.background.backgroundColor),_this2.renderBackgroundImage(container)}),container.style.border.forEach(function(border,side){border.borderStyle===_border.BORDER_STYLE.NONE||border.borderColor.isTransparent()||_this2.renderBorder(border,side,container.curvedBounds)})};if(HAS_BACKGROUND||hasRenderableBorders){var paths=container.parent?container.parent.getClipPaths():[];paths.length?this.target.clip(paths,callback):callback()}}},{key:"renderBackgroundImage",value:function(container){var _this3=this;container.style.background.backgroundImage.slice(0).reverse().forEach(function(backgroundImage){"url"===backgroundImage.source.method&&backgroundImage.source.args.length?_this3.renderBackgroundRepeat(container,backgroundImage):/gradient/i.test(backgroundImage.source.method)&&_this3.renderBackgroundGradient(container,backgroundImage)})}},{key:"renderBackgroundRepeat",value:function(container,background){var image=this.options.imageStore.get(background.source.args[0]);if(image){var backgroundPositioningArea=(0,_background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin,container.bounds,container.style.padding,container.style.border),backgroundImageSize=(0,_background.calculateBackgroundSize)(background,image,backgroundPositioningArea),position=(0,_background.calculateBackgroundPosition)(background.position,backgroundImageSize,backgroundPositioningArea),_path=(0,_background.calculateBackgroundRepeatPath)(background,position,backgroundImageSize,backgroundPositioningArea,container.bounds),_offsetX=Math.round(backgroundPositioningArea.left+position.x),_offsetY=Math.round(backgroundPositioningArea.top+position.y);this.target.renderRepeat(_path,image,backgroundImageSize,_offsetX,_offsetY)}}},{key:"renderBackgroundGradient",value:function(container,background){var backgroundPositioningArea=(0,_background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin,container.bounds,container.style.padding,container.style.border),backgroundImageSize=(0,_background.calculateGradientBackgroundSize)(background,backgroundPositioningArea),position=(0,_background.calculateBackgroundPosition)(background.position,backgroundImageSize,backgroundPositioningArea),gradientBounds=new _Bounds.Bounds(Math.round(backgroundPositioningArea.left+position.x),Math.round(backgroundPositioningArea.top+position.y),backgroundImageSize.width,backgroundImageSize.height),gradient=(0,_Gradient.parseGradient)(container,background.source,gradientBounds);if(gradient)switch(gradient.type){case _Gradient.GRADIENT_TYPE.LINEAR_GRADIENT:this.target.renderLinearGradient(gradientBounds,gradient);break;case _Gradient.GRADIENT_TYPE.RADIAL_GRADIENT:this.target.renderRadialGradient(gradientBounds,gradient)}}},{key:"renderBorder",value:function(border,side,curvePoints){this.target.drawShape((0,_Bounds.parsePathForBorder)(curvePoints,side),border.borderColor)}},{key:"renderStack",value:function(stack){var _this4=this;if(stack.container.isVisible()){var _opacity=stack.getOpacity();_opacity!==this._opacity&&(this.target.setOpacity(stack.getOpacity()),this._opacity=_opacity);var _transform=stack.container.style.transform;null!==_transform?this.target.transform(stack.container.bounds.left+_transform.transformOrigin[0].value,stack.container.bounds.top+_transform.transformOrigin[1].value,_transform.transform,function(){return _this4.renderStackContent(stack)}):this.renderStackContent(stack)}}},{key:"renderStackContent",value:function(stack){var _splitStackingContext=splitStackingContexts(stack),_splitStackingContext2=_slicedToArray(_splitStackingContext,5),negativeZIndex=_splitStackingContext2[0],zeroOrAutoZIndexOrTransformedOrOpacity=_splitStackingContext2[1],positiveZIndex=_splitStackingContext2[2],nonPositionedFloats=_splitStackingContext2[3],nonPositionedInlineLevel=_splitStackingContext2[4],_splitDescendants=splitDescendants(stack),_splitDescendants2=_slicedToArray(_splitDescendants,2),inlineLevel=_splitDescendants2[0],nonInlineLevel=_splitDescendants2[1];this.renderNodeBackgroundAndBorders(stack.container),negativeZIndex.sort(sortByZIndex).forEach(this.renderStack,this),this.renderNodeContent(stack.container),nonInlineLevel.forEach(this.renderNode,this),nonPositionedFloats.forEach(this.renderStack,this),nonPositionedInlineLevel.forEach(this.renderStack,this),inlineLevel.forEach(this.renderNode,this),zeroOrAutoZIndexOrTransformedOrOpacity.forEach(this.renderStack,this),positiveZIndex.sort(sortByZIndex).forEach(this.renderStack,this)}},{key:"render",value:function(stack){var _this5=this;this.options.backgroundColor&&this.target.rectangle(this.options.x,this.options.y,this.options.width,this.options.height,this.options.backgroundColor),this.renderStack(stack);var target=this.target.getTarget();return target.then(function(output){return _this5.options.logger.log("Render completed"),output})}}]),Renderer}();exports.default=Renderer;var splitDescendants=function(stack){for(var inlineLevel=[],nonInlineLevel=[],length=stack.children.length,i=0;i<length;i++){var child=stack.children[i];child.isInlineLevel()?inlineLevel.push(child):nonInlineLevel.push(child)}return[inlineLevel,nonInlineLevel]},splitStackingContexts=function(stack){for(var negativeZIndex=[],zeroOrAutoZIndexOrTransformedOrOpacity=[],positiveZIndex=[],nonPositionedFloats=[],nonPositionedInlineLevel=[],length=stack.contexts.length,i=0;i<length;i++){var child=stack.contexts[i];child.container.isPositioned()||child.container.style.opacity<1||child.container.isTransformed()?child.container.style.zIndex.order<0?negativeZIndex.push(child):child.container.style.zIndex.order>0?positiveZIndex.push(child):zeroOrAutoZIndexOrTransformedOrOpacity.push(child):child.container.isFloating()?nonPositionedFloats.push(child):nonPositionedInlineLevel.push(child)}return[negativeZIndex,zeroOrAutoZIndexOrTransformedOrOpacity,positiveZIndex,nonPositionedFloats,nonPositionedInlineLevel]},sortByZIndex=function(a,b){return a.container.style.zIndex.order>b.container.style.zIndex.order?1:a.container.style.zIndex.order<b.container.style.zIndex.order?-1:a.container.index>b.container.index?1:-1}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformWebkitRadialGradientArgs=exports.parseGradient=exports.RadialGradient=exports.LinearGradient=exports.RADIAL_GRADIENT_SHAPE=exports.GRADIENT_TYPE=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_NodeContainer=__webpack_require__(3),_Angle=(_interopRequireDefault(_NodeContainer),__webpack_require__(53)),_Color=__webpack_require__(0),_Color2=_interopRequireDefault(_Color),_Length=__webpack_require__(1),_Length2=_interopRequireDefault(_Length),_Util=__webpack_require__(4),SIDE_OR_CORNER=/^(to )?(left|top|right|bottom)( (left|top|right|bottom))?$/i,PERCENTAGE_ANGLES=/^([+-]?\d*\.?\d+)% ([+-]?\d*\.?\d+)%$/i,ENDS_WITH_LENGTH=/(px)|%|( 0)$/i,FROM_TO_COLORSTOP=/^(from|to|color-stop)\((?:([\d.]+)(%)?,\s*)?(.+?)\)$/i,RADIAL_SHAPE_DEFINITION=/^\s*(circle|ellipse)?\s*((?:([\d.]+)(px|r?em|%)\s*(?:([\d.]+)(px|r?em|%))?)|closest-side|closest-corner|farthest-side|farthest-corner)?\s*(?:at\s*(?:(left|center|right)|([\d.]+)(px|r?em|%))\s+(?:(top|center|bottom)|([\d.]+)(px|r?em|%)))?(?:\s|$)/i,GRADIENT_TYPE=exports.GRADIENT_TYPE={LINEAR_GRADIENT:0,RADIAL_GRADIENT:1},RADIAL_GRADIENT_SHAPE=exports.RADIAL_GRADIENT_SHAPE={CIRCLE:0,ELLIPSE:1},LENGTH_FOR_POSITION={left:new _Length2.default("0%"),top:new _Length2.default("0%"),center:new _Length2.default("50%"),right:new _Length2.default("100%"),bottom:new _Length2.default("100%")},LinearGradient=exports.LinearGradient=function LinearGradient(colorStops,direction){_classCallCheck(this,LinearGradient),this.type=GRADIENT_TYPE.LINEAR_GRADIENT,this.colorStops=colorStops,this.direction=direction},RadialGradient=exports.RadialGradient=function RadialGradient(colorStops,shape,center,radius){_classCallCheck(this,RadialGradient),this.type=GRADIENT_TYPE.RADIAL_GRADIENT,this.colorStops=colorStops,this.shape=shape,this.center=center,this.radius=radius},parseColorStops=(exports.parseGradient=function(container,_ref,bounds){var args=_ref.args,method=_ref.method,prefix=_ref.prefix;return"linear-gradient"===method?parseLinearGradient(args,bounds,!!prefix):"gradient"===method&&"linear"===args[0]?parseLinearGradient(["to bottom"].concat(transformObsoleteColorStops(args.slice(3))),bounds,!!prefix):"radial-gradient"===method?parseRadialGradient(container,"-webkit-"===prefix?transformWebkitRadialGradientArgs(args):args,bounds):"gradient"===method&&"radial"===args[0]?parseRadialGradient(container,transformObsoleteColorStops(transformWebkitRadialGradientArgs(args.slice(1))),bounds):void 0},function(args,firstColorStopIndex,lineLength){for(var colorStops=[],i=firstColorStopIndex;i<args.length;i++){var value=args[i],HAS_LENGTH=ENDS_WITH_LENGTH.test(value),lastSpaceIndex=value.lastIndexOf(" "),_color=new _Color2.default(HAS_LENGTH?value.substring(0,lastSpaceIndex):value),_stop=HAS_LENGTH?new _Length2.default(value.substring(lastSpaceIndex+1)):i===firstColorStopIndex?new _Length2.default("0%"):i===args.length-1?new _Length2.default("100%"):null;colorStops.push({color:_color,stop:_stop})}for(var absoluteValuedColorStops=colorStops.map(function(_ref2){var color=_ref2.color,stop=_ref2.stop;return{color:color,stop:0===lineLength?0:stop?stop.getAbsoluteValue(lineLength)/lineLength:null}}),previousColorStop=absoluteValuedColorStops[0].stop,_i=0;_i<absoluteValuedColorStops.length;_i++)if(null!==previousColorStop){var _stop2=absoluteValuedColorStops[_i].stop;if(null===_stop2){for(var n=_i;null===absoluteValuedColorStops[n].stop;)n++;for(var steps=n-_i+1,nextColorStep=absoluteValuedColorStops[n].stop,stepSize=(nextColorStep-previousColorStop)/steps;_i<n;_i++)previousColorStop=absoluteValuedColorStops[_i].stop=previousColorStop+stepSize}else previousColorStop=_stop2}return absoluteValuedColorStops}),parseLinearGradient=function(args,bounds,hasPrefix){var angle=(0,_Angle.parseAngle)(args[0]),HAS_SIDE_OR_CORNER=SIDE_OR_CORNER.test(args[0]),HAS_DIRECTION=HAS_SIDE_OR_CORNER||null!==angle||PERCENTAGE_ANGLES.test(args[0]),direction=HAS_DIRECTION?null!==angle?calculateGradientDirection(hasPrefix?angle-.5*Math.PI:angle,bounds):HAS_SIDE_OR_CORNER?parseSideOrCorner(args[0],bounds):parsePercentageAngle(args[0],bounds):calculateGradientDirection(Math.PI,bounds),firstColorStopIndex=HAS_DIRECTION?1:0,lineLength=Math.min((0,_Util.distance)(Math.abs(direction.x0)+Math.abs(direction.x1),Math.abs(direction.y0)+Math.abs(direction.y1)),2*bounds.width,2*bounds.height);return new LinearGradient(parseColorStops(args,firstColorStopIndex,lineLength),direction)},parseRadialGradient=function(container,args,bounds){var m=args[0].match(RADIAL_SHAPE_DEFINITION),shape=m&&("circle"===m[1]||void 0!==m[3]&&void 0===m[5])?RADIAL_GRADIENT_SHAPE.CIRCLE:RADIAL_GRADIENT_SHAPE.ELLIPSE,radius={},center={};m&&(void 0!==m[3]&&(radius.x=(0,_Length.calculateLengthFromValueWithUnit)(container,m[3],m[4]).getAbsoluteValue(bounds.width)),void 0!==m[5]&&(radius.y=(0,_Length.calculateLengthFromValueWithUnit)(container,m[5],m[6]).getAbsoluteValue(bounds.height)),m[7]?center.x=LENGTH_FOR_POSITION[m[7].toLowerCase()]:void 0!==m[8]&&(center.x=(0,_Length.calculateLengthFromValueWithUnit)(container,m[8],m[9])),m[10]?center.y=LENGTH_FOR_POSITION[m[10].toLowerCase()]:void 0!==m[11]&&(center.y=(0,_Length.calculateLengthFromValueWithUnit)(container,m[11],m[12])));var gradientCenter={x:void 0===center.x?bounds.width/2:center.x.getAbsoluteValue(bounds.width),y:void 0===center.y?bounds.height/2:center.y.getAbsoluteValue(bounds.height)},gradientRadius=calculateRadius(m&&m[2]||"farthest-corner",shape,gradientCenter,radius,bounds);return new RadialGradient(parseColorStops(args,m?1:0,Math.min(gradientRadius.x,gradientRadius.y)),shape,gradientCenter,gradientRadius)},calculateGradientDirection=function(radian,bounds){var width=bounds.width,height=bounds.height,HALF_WIDTH=.5*width,HALF_HEIGHT=.5*height,lineLength=Math.abs(width*Math.sin(radian))+Math.abs(height*Math.cos(radian)),HALF_LINE_LENGTH=lineLength/2,x0=HALF_WIDTH+Math.sin(radian)*HALF_LINE_LENGTH,y0=HALF_HEIGHT-Math.cos(radian)*HALF_LINE_LENGTH;return{x0:x0,x1:width-x0,y0:y0,y1:height-y0}},parseTopRight=function(bounds){return Math.acos(bounds.width/2/((0,_Util.distance)(bounds.width,bounds.height)/2))},parseSideOrCorner=function(side,bounds){switch(side){case"bottom":case"to top":return calculateGradientDirection(0,bounds);case"left":case"to right":return calculateGradientDirection(Math.PI/2,bounds);case"right":case"to left":return calculateGradientDirection(3*Math.PI/2,bounds);case"top right":case"right top":case"to bottom left":case"to left bottom":return calculateGradientDirection(Math.PI+parseTopRight(bounds),bounds);case"top left":case"left top":case"to bottom right":case"to right bottom":return calculateGradientDirection(Math.PI-parseTopRight(bounds),bounds);case"bottom left":case"left bottom":case"to top right":case"to right top":return calculateGradientDirection(parseTopRight(bounds),bounds);case"bottom right":case"right bottom":case"to top left":case"to left top":return calculateGradientDirection(2*Math.PI-parseTopRight(bounds),bounds);case"top":case"to bottom":default:return calculateGradientDirection(Math.PI,bounds)}},parsePercentageAngle=function(angle,bounds){var _angle$split$map=angle.split(" ").map(parseFloat),_angle$split$map2=_slicedToArray(_angle$split$map,2),left=_angle$split$map2[0],top=_angle$split$map2[1],ratio=left/100*bounds.width/(top/100*bounds.height);return calculateGradientDirection(Math.atan(isNaN(ratio)?1:ratio)+Math.PI/2,bounds)},findCorner=function(bounds,x,y,closest){return[{x:0,y:0},{x:0,y:bounds.height},{x:bounds.width,y:0},{x:bounds.width,y:bounds.height}].reduce(function(stat,corner){var d=(0,_Util.distance)(x-corner.x,y-corner.y);return(closest?d<stat.optimumDistance:d>stat.optimumDistance)?{optimumCorner:corner,optimumDistance:d}:stat},{optimumDistance:closest?1/0:-1/0,optimumCorner:null}).optimumCorner},calculateRadius=function(extent,shape,center,radius,bounds){var x=center.x,y=center.y,rx=0,ry=0;switch(extent){case"closest-side":shape===RADIAL_GRADIENT_SHAPE.CIRCLE?rx=ry=Math.min(Math.abs(x),Math.abs(x-bounds.width),Math.abs(y),Math.abs(y-bounds.height)):shape===RADIAL_GRADIENT_SHAPE.ELLIPSE&&(rx=Math.min(Math.abs(x),Math.abs(x-bounds.width)),ry=Math.min(Math.abs(y),Math.abs(y-bounds.height)));break;case"closest-corner":if(shape===RADIAL_GRADIENT_SHAPE.CIRCLE)rx=ry=Math.min((0,_Util.distance)(x,y),(0,_Util.distance)(x,y-bounds.height),(0,_Util.distance)(x-bounds.width,y),(0,_Util.distance)(x-bounds.width,y-bounds.height));else if(shape===RADIAL_GRADIENT_SHAPE.ELLIPSE){var c=Math.min(Math.abs(y),Math.abs(y-bounds.height))/Math.min(Math.abs(x),Math.abs(x-bounds.width)),corner=findCorner(bounds,x,y,!0);rx=(0,_Util.distance)(corner.x-x,(corner.y-y)/c),ry=c*rx}break;case"farthest-side":shape===RADIAL_GRADIENT_SHAPE.CIRCLE?rx=ry=Math.max(Math.abs(x),Math.abs(x-bounds.width),Math.abs(y),Math.abs(y-bounds.height)):shape===RADIAL_GRADIENT_SHAPE.ELLIPSE&&(rx=Math.max(Math.abs(x),Math.abs(x-bounds.width)),ry=Math.max(Math.abs(y),Math.abs(y-bounds.height)));break;case"farthest-corner":if(shape===RADIAL_GRADIENT_SHAPE.CIRCLE)rx=ry=Math.max((0,_Util.distance)(x,y),(0,_Util.distance)(x,y-bounds.height),(0,_Util.distance)(x-bounds.width,y),(0,_Util.distance)(x-bounds.width,y-bounds.height));else if(shape===RADIAL_GRADIENT_SHAPE.ELLIPSE){var _c=Math.max(Math.abs(y),Math.abs(y-bounds.height))/Math.max(Math.abs(x),Math.abs(x-bounds.width)),_corner=findCorner(bounds,x,y,!1);rx=(0,_Util.distance)(_corner.x-x,(_corner.y-y)/_c),ry=_c*rx}break;default:rx=radius.x||0,ry=void 0!==radius.y?radius.y:rx}return{x:rx,y:ry}},transformWebkitRadialGradientArgs=exports.transformWebkitRadialGradientArgs=function(args){var shape="",radius="",extent="",position="",idx=0,POSITION=/^(left|center|right|\d+(?:px|r?em|%)?)(?:\s+(top|center|bottom|\d+(?:px|r?em|%)?))?$/i,SHAPE_AND_EXTENT=/^(circle|ellipse)?\s*(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)?$/i,RADIUS=/^\d+(px|r?em|%)?(?:\s+\d+(px|r?em|%)?)?$/i,matchStartPosition=args[idx].match(POSITION);matchStartPosition&&idx++;var matchShapeExtent=args[idx].match(SHAPE_AND_EXTENT);matchShapeExtent&&(shape=matchShapeExtent[1]||"",extent=matchShapeExtent[2]||"","contain"===extent?extent="closest-side":"cover"===extent&&(extent="farthest-corner"),idx++);var matchStartRadius=args[idx].match(RADIUS);matchStartRadius&&idx++;var matchEndPosition=args[idx].match(POSITION);matchEndPosition&&idx++;var matchEndRadius=args[idx].match(RADIUS);matchEndRadius&&idx++;var matchPosition=matchEndPosition||matchStartPosition;matchPosition&&matchPosition[1]&&(position=matchPosition[1]+(/^\d+$/.test(matchPosition[1])?"px":""),matchPosition[2]&&(position+=" "+matchPosition[2]+(/^\d+$/.test(matchPosition[2])?"px":"")));var matchRadius=matchEndRadius||matchStartRadius;return matchRadius&&(radius=matchRadius[0],matchRadius[1]||(radius+="px")),!position||shape||radius||extent||(radius=position,position=""),position&&(position="at "+position),[[shape,extent,radius,position].filter(function(s){return!!s}).join(" ")].concat(args.slice(idx))},transformObsoleteColorStops=function(args){return args.map(function(color){return color.match(FROM_TO_COLORSTOP)}).map(function(v,index){if(!v)return args[index];switch(v[1]){case"from":return v[4]+" 0%";case"to":return v[4]+" 100%";case"color-stop":return"%"===v[3]?v[4]+" "+v[2]:v[4]+" "+100*parseFloat(v[2])+"%"}})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ANGLE=/([+-]?\d*\.?\d+)(deg|grad|rad|turn)/i;exports.parseAngle=function(angle){var match=angle.match(ANGLE);if(match){var value=parseFloat(match[1]);switch(match[2].toLowerCase()){case"deg":return Math.PI*value/180;case"grad":return Math.PI/200*value;case"rad":return value;case"turn":return 2*Math.PI*value}}return null}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.cloneWindow=exports.DocumentCloner=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Bounds=__webpack_require__(2),_Proxy=__webpack_require__(26),_ResourceLoader=__webpack_require__(55),_ResourceLoader2=_interopRequireDefault(_ResourceLoader),_Util=__webpack_require__(4),_background=__webpack_require__(5),_CanvasRenderer=__webpack_require__(15),_CanvasRenderer2=_interopRequireDefault(_CanvasRenderer),_PseudoNodeContent=__webpack_require__(56),DocumentCloner=exports.DocumentCloner=function(){function DocumentCloner(element,options,logger,copyInline,renderer){_classCallCheck(this,DocumentCloner),this.referenceElement=element,this.scrolledElements=[],this.copyStyles=copyInline,this.inlineImages=copyInline,this.logger=logger,this.options=options,this.renderer=renderer,this.resourceLoader=new _ResourceLoader2.default(options,logger,window),this.pseudoContentData={counters:{},quoteDepth:0},this.documentElement=this.cloneNode(element.ownerDocument.documentElement)}return _createClass(DocumentCloner,[{key:"inlineAllImages",value:function(node){var _this=this;if(this.inlineImages&&node){var style=node.style;Promise.all((0,_background.parseBackgroundImage)(style.backgroundImage).map(function(backgroundImage){return"url"===backgroundImage.method?_this.resourceLoader.inlineImage(backgroundImage.args[0]).then(function(img){return img&&"string"==typeof img.src?'url("'+img.src+'")':"none"}).catch(function(e){_this.logger.log("Unable to load image",e)}):Promise.resolve(""+backgroundImage.prefix+backgroundImage.method+"("+backgroundImage.args.join(",")+")")})).then(function(backgroundImages){backgroundImages.length>1&&(style.backgroundColor=""),style.backgroundImage=backgroundImages.join(",")}),node instanceof HTMLImageElement&&this.resourceLoader.inlineImage(node.src).then(function(img){if(img&&node instanceof HTMLImageElement&&node.parentNode){var parentNode=node.parentNode,clonedChild=(0,_Util.copyCSSStyles)(node.style,img.cloneNode(!1));parentNode.replaceChild(clonedChild,node)}}).catch(function(e){_this.logger.log("Unable to load image",e)})}}},{key:"inlineFonts",value:function(document){var _this2=this;return Promise.all(Array.from(document.styleSheets).map(function(sheet){return sheet.href?fetch(sheet.href).then(function(res){return res.text()}).then(function(text){return createStyleSheetFontsFromText(text,sheet.href)}).catch(function(e){return _this2.logger.log("Unable to load stylesheet",e),[]}):getSheetFonts(sheet,document)})).then(function(fonts){return fonts.reduce(function(acc,font){return acc.concat(font)},[])}).then(function(fonts){return Promise.all(fonts.map(function(font){return fetch(font.formats[0].src).then(function(response){return response.blob()}).then(function(blob){return new Promise(function(resolve,reject){var reader=new FileReader;reader.onerror=reject,reader.onload=function(){var result=reader.result;resolve(result)},reader.readAsDataURL(blob)})}).then(function(dataUri){return font.fontFace.setProperty("src",'url("'+dataUri+'")'),"@font-face {"+font.fontFace.cssText+" "})}))}).then(function(fontCss){var style=document.createElement("style");style.textContent=fontCss.join("\n"),_this2.documentElement.appendChild(style)})}},{key:"createElementClone",value:function(node){var _this3=this;if(this.copyStyles&&node instanceof HTMLCanvasElement){var img=node.ownerDocument.createElement("img");try{return img.src=node.toDataURL(),img}catch(e){this.logger.log("Unable to clone canvas contents, canvas is tainted")}}if(node instanceof HTMLIFrameElement){var tempIframe=node.cloneNode(!1),iframeKey=generateIframeKey();tempIframe.setAttribute("data-html2canvas-internal-iframe-key",iframeKey);var _parseBounds=(0,_Bounds.parseBounds)(node,0,0),width=_parseBounds.width,height=_parseBounds.height;return this.resourceLoader.cache[iframeKey]=getIframeDocumentElement(node,this.options).then(function(documentElement){return _this3.renderer(documentElement,{async:_this3.options.async,allowTaint:_this3.options.allowTaint,backgroundColor:"#ffffff",canvas:null,imageTimeout:_this3.options.imageTimeout,logging:_this3.options.logging,proxy:_this3.options.proxy,removeContainer:_this3.options.removeContainer,scale:_this3.options.scale,foreignObjectRendering:_this3.options.foreignObjectRendering,useCORS:_this3.options.useCORS,target:new _CanvasRenderer2.default,width:width,height:height,x:0,y:0,windowWidth:documentElement.ownerDocument.defaultView.innerWidth,windowHeight:documentElement.ownerDocument.defaultView.innerHeight,scrollX:documentElement.ownerDocument.defaultView.pageXOffset,scrollY:documentElement.ownerDocument.defaultView.pageYOffset},_this3.logger.child(iframeKey))}).then(function(canvas){return new Promise(function(resolve,reject){var iframeCanvas=document.createElement("img");iframeCanvas.onload=function(){return resolve(canvas)},iframeCanvas.onerror=reject,iframeCanvas.src=canvas.toDataURL(),tempIframe.parentNode&&tempIframe.parentNode.replaceChild((0,_Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node),iframeCanvas),tempIframe)})}),tempIframe}if(node instanceof HTMLStyleElement&&node.sheet&&node.sheet.cssRules){var css=[].slice.call(node.sheet.cssRules,0).reduce(function(css,rule){try{return rule&&rule.cssText?css+rule.cssText:css}catch(err){return _this3.logger.log("Unable to access cssText property",rule.name),css}},""),style=node.cloneNode(!1);return style.textContent=css,style}return node.cloneNode(!1)}},{key:"cloneNode",value:function(node){var clone=node.nodeType===Node.TEXT_NODE?document.createTextNode(node.nodeValue):this.createElementClone(node),window=node.ownerDocument.defaultView,style=node instanceof window.HTMLElement?window.getComputedStyle(node):null,styleBefore=node instanceof window.HTMLElement?window.getComputedStyle(node,":before"):null,styleAfter=node instanceof window.HTMLElement?window.getComputedStyle(node,":after"):null;this.referenceElement===node&&clone instanceof window.HTMLElement&&(this.clonedReferenceElement=clone),clone instanceof window.HTMLBodyElement&&createPseudoHideStyles(clone);for(var counters=(0,_PseudoNodeContent.parseCounterReset)(style,this.pseudoContentData),contentBefore=(0,_PseudoNodeContent.resolvePseudoContent)(node,styleBefore,this.pseudoContentData),child=node.firstChild;child;child=child.nextSibling)child.nodeType===Node.ELEMENT_NODE&&("SCRIPT"===child.nodeName||child.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(child))||this.copyStyles&&"STYLE"===child.nodeName||clone.appendChild(this.cloneNode(child));var contentAfter=(0,_PseudoNodeContent.resolvePseudoContent)(node,styleAfter,this.pseudoContentData);if((0,_PseudoNodeContent.popCounters)(counters,this.pseudoContentData),node instanceof window.HTMLElement&&clone instanceof window.HTMLElement)switch(styleBefore&&this.inlineAllImages(inlinePseudoElement(node,clone,styleBefore,contentBefore,PSEUDO_BEFORE)),styleAfter&&this.inlineAllImages(inlinePseudoElement(node,clone,styleAfter,contentAfter,PSEUDO_AFTER)),!style||!this.copyStyles||node instanceof HTMLIFrameElement||(0,_Util.copyCSSStyles)(style,clone),this.inlineAllImages(clone),0===node.scrollTop&&0===node.scrollLeft||this.scrolledElements.push([clone,node.scrollLeft,node.scrollTop]),node.nodeName){case"CANVAS":this.copyStyles||cloneCanvasContents(node,clone);break;case"TEXTAREA":case"SELECT":clone.value=node.value}return clone}}]),DocumentCloner}(),getSheetFonts=function(sheet,document){return(sheet.cssRules?Array.from(sheet.cssRules):[]).filter(function(rule){return rule.type===CSSRule.FONT_FACE_RULE}).map(function(rule){for(var src=(0,_background.parseBackgroundImage)(rule.style.getPropertyValue("src")),formats=[],i=0;i<src.length;i++)if("url"===src[i].method&&src[i+1]&&"format"===src[i+1].method){var a=document.createElement("a");a.href=src[i].args[0],document.body&&document.body.appendChild(a);var font={src:a.href,format:src[i+1].args[0]};formats.push(font)}return{formats:formats.filter(function(font){return/^woff/i.test(font.format)}),fontFace:rule.style}}).filter(function(font){return font.formats.length})},createStyleSheetFontsFromText=function(text,baseHref){var doc=document.implementation.createHTMLDocument(""),base=document.createElement("base");base.href=baseHref;var style=document.createElement("style");return style.textContent=text,doc.head&&doc.head.appendChild(base),doc.body&&doc.body.appendChild(style),style.sheet?getSheetFonts(style.sheet,doc):[]},restoreOwnerScroll=function(ownerDocument,x,y){!ownerDocument.defaultView||x===ownerDocument.defaultView.pageXOffset&&y===ownerDocument.defaultView.pageYOffset||ownerDocument.defaultView.scrollTo(x,y)},cloneCanvasContents=function(canvas,clonedCanvas){try{if(clonedCanvas){clonedCanvas.width=canvas.width,clonedCanvas.height=canvas.height;var ctx=canvas.getContext("2d"),clonedCtx=clonedCanvas.getContext("2d");ctx?clonedCtx.putImageData(ctx.getImageData(0,0,canvas.width,canvas.height),0,0):clonedCtx.drawImage(canvas,0,0)}}catch(e){}},inlinePseudoElement=function(node,clone,style,contentItems,pseudoElt){if(style&&style.content&&"none"!==style.content&&"-moz-alt-content"!==style.content&&"none"!==style.display){var anonymousReplacedElement=clone.ownerDocument.createElement("html2canvaspseudoelement");if((0,_Util.copyCSSStyles)(style,anonymousReplacedElement),contentItems)for(var len=contentItems.length,i=0;i<len;i++){var item=contentItems[i];switch(item.type){case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.IMAGE:var img=clone.ownerDocument.createElement("img");img.src=(0,_background.parseBackgroundImage)("url("+item.value+")")[0].args[0],img.style.opacity="1",anonymousReplacedElement.appendChild(img);break;case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.TEXT:anonymousReplacedElement.appendChild(clone.ownerDocument.createTextNode(item.value))}}return anonymousReplacedElement.className=PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+PSEUDO_HIDE_ELEMENT_CLASS_AFTER,clone.className+=pseudoElt===PSEUDO_BEFORE?" "+PSEUDO_HIDE_ELEMENT_CLASS_BEFORE:" "+PSEUDO_HIDE_ELEMENT_CLASS_AFTER,pseudoElt===PSEUDO_BEFORE?clone.insertBefore(anonymousReplacedElement,clone.firstChild):clone.appendChild(anonymousReplacedElement),anonymousReplacedElement}},PSEUDO_BEFORE=":before",PSEUDO_AFTER=":after",PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",createPseudoHideStyles=function(body){createStyles(body,"."+PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+PSEUDO_BEFORE+'{\n content: "" !important;\n display: none !important;\n}\n .'+PSEUDO_HIDE_ELEMENT_CLASS_AFTER+PSEUDO_AFTER+'{\n content: "" !important;\n display: none !important;\n}')},createStyles=function(body,styles){var style=body.ownerDocument.createElement("style");style.innerHTML=styles,body.appendChild(style)},initNode=function(_ref){var _ref2=_slicedToArray(_ref,3),element=_ref2[0],x=_ref2[1],y=_ref2[2];element.scrollLeft=x,element.scrollTop=y},generateIframeKey=function(){return Math.ceil(Date.now()+1e7*Math.random()).toString(16)},DATA_URI_REGEXP=/^data:text\/(.+);(base64)?,(.*)$/i,getIframeDocumentElement=function(node,options){try{return Promise.resolve(node.contentWindow.document.documentElement)}catch(e){return options.proxy?(0,_Proxy.Proxy)(node.src,options).then(function(html){var match=html.match(DATA_URI_REGEXP);return match?"base64"===match[2]?window.atob(decodeURIComponent(match[3])):decodeURIComponent(match[3]):Promise.reject()}).then(function(html){return createIframeContainer(node.ownerDocument,(0,_Bounds.parseBounds)(node,0,0)).then(function(cloneIframeContainer){var cloneWindow=cloneIframeContainer.contentWindow,documentClone=cloneWindow.document;documentClone.open(),documentClone.write(html);var iframeLoad=iframeLoader(cloneIframeContainer).then(function(){return documentClone.documentElement});return documentClone.close(),iframeLoad})}):Promise.reject()}},createIframeContainer=function(ownerDocument,bounds){var cloneIframeContainer=ownerDocument.createElement("iframe");return cloneIframeContainer.className="html2canvas-container",cloneIframeContainer.style.visibility="hidden",cloneIframeContainer.style.position="fixed",cloneIframeContainer.style.left="-10000px",cloneIframeContainer.style.top="0px",cloneIframeContainer.style.border="0",cloneIframeContainer.width=bounds.width.toString(),cloneIframeContainer.height=bounds.height.toString(),cloneIframeContainer.scrolling="no",cloneIframeContainer.setAttribute("data-html2canvas-ignore","true"),ownerDocument.body?(ownerDocument.body.appendChild(cloneIframeContainer),Promise.resolve(cloneIframeContainer)):Promise.reject("Body element not found in Document that is getting rendered")},iframeLoader=function(cloneIframeContainer){var cloneWindow=cloneIframeContainer.contentWindow,documentClone=cloneWindow.document;return new Promise(function(resolve,reject){cloneWindow.onload=cloneIframeContainer.onload=documentClone.onreadystatechange=function(){var interval=setInterval(function(){documentClone.body.childNodes.length>0&&"complete"===documentClone.readyState&&(clearInterval(interval),resolve(cloneIframeContainer))},50)}})},serializeDoctype=(exports.cloneWindow=function(ownerDocument,bounds,referenceElement,options,logger,renderer){var cloner=new DocumentCloner(referenceElement,options,logger,!1,renderer),scrollX=ownerDocument.defaultView.pageXOffset,scrollY=ownerDocument.defaultView.pageYOffset;return createIframeContainer(ownerDocument,bounds).then(function(cloneIframeContainer){var cloneWindow=cloneIframeContainer.contentWindow,documentClone=cloneWindow.document,iframeLoad=iframeLoader(cloneIframeContainer).then(function(){cloner.scrolledElements.forEach(initNode),cloneWindow.scrollTo(bounds.left,bounds.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||cloneWindow.scrollY===bounds.top&&cloneWindow.scrollX===bounds.left||(documentClone.documentElement.style.top=-bounds.top+"px",documentClone.documentElement.style.left=-bounds.left+"px",documentClone.documentElement.style.position="absolute");var result=Promise.resolve([cloneIframeContainer,cloner.clonedReferenceElement,cloner.resourceLoader]),onclone=options.onclone;return cloner.clonedReferenceElement instanceof cloneWindow.HTMLElement||cloner.clonedReferenceElement instanceof ownerDocument.defaultView.HTMLElement||cloner.clonedReferenceElement instanceof HTMLElement?"function"==typeof onclone?Promise.resolve().then(function(){return onclone(documentClone)}).then(function(){return result}):result:Promise.reject("Error finding the "+referenceElement.nodeName+" in the cloned document")});return documentClone.open(),documentClone.write(serializeDoctype(document.doctype)+"<html></html>"),restoreOwnerScroll(referenceElement.ownerDocument,scrollX,scrollY),documentClone.replaceChild(documentClone.adoptNode(cloner.documentElement),documentClone.documentElement),documentClone.close(),iframeLoad})},function(doctype){var str="";return doctype&&(str+="<!DOCTYPE ",doctype.name&&(str+=doctype.name),doctype.internalSubset&&(str+=doctype.internalSubset),doctype.publicId&&(str+='"'+doctype.publicId+'"'),doctype.systemId&&(str+='"'+doctype.systemId+'"'),str+=">"),str})},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResourceStore=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Feature=__webpack_require__(10),_Feature2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_Feature),_Proxy=__webpack_require__(26),ResourceLoader=function(){function ResourceLoader(options,logger,window){_classCallCheck(this,ResourceLoader),this.options=options,this._window=window,this.origin=this.getOrigin(window.location.href),this.cache={},this.logger=logger,this._index=0}return _createClass(ResourceLoader,[{key:"loadImage",value:function(src){var _this=this;if(this.hasResourceInCache(src))return src;if(isBlobImage(src))return this.cache[src]=_loadImage(src,this.options.imageTimeout||0),src;if(!isSVG(src)||_Feature2.default.SUPPORT_SVG_DRAWING){if(!0===this.options.allowTaint||isInlineImage(src)||this.isSameOrigin(src))return this.addImage(src,src,!1);if(!this.isSameOrigin(src)){if("string"==typeof this.options.proxy)return this.cache[src]=(0,_Proxy.Proxy)(src,this.options).then(function(src){return _loadImage(src,_this.options.imageTimeout||0)}),src;if(!0===this.options.useCORS&&_Feature2.default.SUPPORT_CORS_IMAGES)return this.addImage(src,src,!0)}}}},{key:"inlineImage",value:function(src){var _this2=this;return isInlineImage(src)?_loadImage(src,this.options.imageTimeout||0):this.hasResourceInCache(src)?this.cache[src]:this.isSameOrigin(src)||"string"!=typeof this.options.proxy?this.xhrImage(src):this.cache[src]=(0,_Proxy.Proxy)(src,this.options).then(function(src){return _loadImage(src,_this2.options.imageTimeout||0)})}},{key:"xhrImage",value:function(src){var _this3=this;return this.cache[src]=new Promise(function(resolve,reject){var xhr=new XMLHttpRequest;if(xhr.onreadystatechange=function(){if(4===xhr.readyState)if(200!==xhr.status)reject("Failed to fetch image "+src.substring(0,256)+" with status code "+xhr.status);else{var reader=new FileReader;reader.addEventListener("load",function(){var result=reader.result;resolve(result)},!1),reader.addEventListener("error",function(e){return reject(e)},!1),reader.readAsDataURL(xhr.response)}},xhr.responseType="blob",_this3.options.imageTimeout){var timeout=_this3.options.imageTimeout;xhr.timeout=timeout,xhr.ontimeout=function(){return reject("Timed out ("+timeout+"ms) fetching "+src.substring(0,256))}}xhr.open("GET",src,!0),xhr.send()}).then(function(src){return _loadImage(src,_this3.options.imageTimeout||0)}),this.cache[src]}},{key:"loadCanvas",value:function(node){var key=String(this._index++);return this.cache[key]=Promise.resolve(node),key}},{key:"hasResourceInCache",value:function(key){return void 0!==this.cache[key]}},{key:"addImage",value:function(key,src,useCORS){var _this4=this;this.logger.log("Added image "+key.substring(0,256));var imageLoadHandler=function(supportsDataImages){return new Promise(function(resolve,reject){var img=new Image;if(img.onload=function(){return resolve(img)},supportsDataImages&&!useCORS||(img.crossOrigin="anonymous"),img.onerror=reject,img.src=src,!0===img.complete&&setTimeout(function(){resolve(img)},500),_this4.options.imageTimeout){var timeout=_this4.options.imageTimeout;setTimeout(function(){return reject("Timed out ("+timeout+"ms) fetching "+src.substring(0,256))},timeout)}})};return this.cache[key]=isInlineBase64Image(src)&&!isSVG(src)?_Feature2.default.SUPPORT_BASE64_DRAWING(src).then(imageLoadHandler):imageLoadHandler(!0),key}},{key:"isSameOrigin",value:function(url){return this.getOrigin(url)===this.origin}},{key:"getOrigin",value:function(url){var link=this._link||(this._link=this._window.document.createElement("a"));return link.href=url,link.href=link.href,link.protocol+link.hostname+link.port}},{key:"ready",value:function(){var _this5=this,keys=Object.keys(this.cache),values=keys.map(function(str){return _this5.cache[str].catch(function(e){return _this5.logger.log("Unable to load image",e),null})});return Promise.all(values).then(function(images){return _this5.logger.log("Finished loading "+images.length+" images",images),new ResourceStore(keys,images)})}}]),ResourceLoader}();exports.default=ResourceLoader;var ResourceStore=exports.ResourceStore=function(){function ResourceStore(keys,resources){_classCallCheck(this,ResourceStore),this._keys=keys,this._resources=resources}return _createClass(ResourceStore,[{key:"get",value:function(key){var index=this._keys.indexOf(key);return-1===index?null:this._resources[index]}}]),ResourceStore}(),INLINE_SVG=/^data:image\/svg\+xml/i,INLINE_BASE64=/^data:image\/.*;base64,/i,INLINE_IMG=/^data:image\/.*/i,isInlineImage=function(src){return INLINE_IMG.test(src)},isInlineBase64Image=function(src){return INLINE_BASE64.test(src)},isBlobImage=function(src){return"blob"===src.substr(0,4)},isSVG=function(src){return"svg"===src.substr(-3).toLowerCase()||INLINE_SVG.test(src)},_loadImage=function(src,timeout){return new Promise(function(resolve,reject){var img=new Image;img.onload=function(){return resolve(img)},img.onerror=reject,img.src=src,!0===img.complete&&setTimeout(function(){resolve(img)},500),timeout&&setTimeout(function(){return reject("Timed out ("+timeout+"ms) loading image")},timeout)})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseContent=exports.resolvePseudoContent=exports.popCounters=exports.parseCounterReset=exports.TOKEN_TYPE=exports.PSEUDO_CONTENT_ITEM_TYPE=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_ListItem=__webpack_require__(14),_listStyle=__webpack_require__(8),PSEUDO_CONTENT_ITEM_TYPE=exports.PSEUDO_CONTENT_ITEM_TYPE={TEXT:0,IMAGE:1},TOKEN_TYPE=exports.TOKEN_TYPE={STRING:0,ATTRIBUTE:1,URL:2,COUNTER:3,COUNTERS:4,OPENQUOTE:5,CLOSEQUOTE:6},parseContent=(exports.parseCounterReset=function(style,data){if(!style||!style.counterReset||"none"===style.counterReset)return[];for(var counterNames=[],counterResets=style.counterReset.split(/\s*,\s*/),lenCounterResets=counterResets.length,i=0;i<lenCounterResets;i++){var _counterResets$i$spli=counterResets[i].split(/\s+/),_counterResets$i$spli2=_slicedToArray(_counterResets$i$spli,2),counterName=_counterResets$i$spli2[0],initialValue=_counterResets$i$spli2[1];counterNames.push(counterName);var counter=data.counters[counterName];counter||(counter=data.counters[counterName]=[]),counter.push(parseInt(initialValue||0,10))}return counterNames},exports.popCounters=function(counterNames,data){for(var lenCounters=counterNames.length,i=0;i<lenCounters;i++)data.counters[counterNames[i]].pop()},exports.resolvePseudoContent=function(node,style,data){if(!style||!style.content||"none"===style.content||"-moz-alt-content"===style.content||"none"===style.display)return null;var tokens=parseContent(style.content),len=tokens.length,contentItems=[],s="",counterIncrement=style.counterIncrement;if(counterIncrement&&"none"!==counterIncrement){var _counterIncrement$spl=counterIncrement.split(/\s+/),_counterIncrement$spl2=_slicedToArray(_counterIncrement$spl,2),counterName=_counterIncrement$spl2[0],incrementValue=_counterIncrement$spl2[1],counter=data.counters[counterName];counter&&(counter[counter.length-1]+=void 0===incrementValue?1:parseInt(incrementValue,10))}for(var i=0;i<len;i++){var token=tokens[i];switch(token.type){case TOKEN_TYPE.STRING:s+=token.value||"";break;case TOKEN_TYPE.ATTRIBUTE:node instanceof HTMLElement&&token.value&&(s+=node.getAttribute(token.value)||"");break;case TOKEN_TYPE.COUNTER:var _counter=data.counters[token.name||""];_counter&&(s+=formatCounterValue([_counter[_counter.length-1]],"",token.format));break;case TOKEN_TYPE.COUNTERS:var _counters=data.counters[token.name||""];_counters&&(s+=formatCounterValue(_counters,token.glue,token.format));break;case TOKEN_TYPE.OPENQUOTE:s+=getQuote(style,!0,data.quoteDepth),data.quoteDepth++;break;case TOKEN_TYPE.CLOSEQUOTE:data.quoteDepth--,s+=getQuote(style,!1,data.quoteDepth);break;case TOKEN_TYPE.URL:s&&(contentItems.push({type:PSEUDO_CONTENT_ITEM_TYPE.TEXT,value:s}),s=""),contentItems.push({type:PSEUDO_CONTENT_ITEM_TYPE.IMAGE,value:token.value||""})}}return s&&contentItems.push({type:PSEUDO_CONTENT_ITEM_TYPE.TEXT,value:s}),contentItems},exports.parseContent=function(content,cache){if(cache&&cache[content])return cache[content];for(var tokens=[],len=content.length,isString=!1,isEscaped=!1,isFunction=!1,str="",functionName="",args=[],i=0;i<len;i++){var c=content.charAt(i);switch(c){case"'":case'"':isEscaped?str+=c:(isString=!isString,isFunction||isString||(tokens.push({type:TOKEN_TYPE.STRING,value:str}),str=""));break;case"\\":isEscaped?(str+=c,isEscaped=!1):isEscaped=!0;break;case"(":isString?str+=c:(isFunction=!0,functionName=str,str="",args=[]);break;case")":if(isString)str+=c;else if(isFunction){switch(str&&args.push(str),functionName){case"attr":args.length>0&&tokens.push({type:TOKEN_TYPE.ATTRIBUTE,value:args[0]});break;case"counter":if(args.length>0){var counter={type:TOKEN_TYPE.COUNTER,name:args[0]};args.length>1&&(counter.format=args[1]),tokens.push(counter)}break;case"counters":if(args.length>0){var _counters2={type:TOKEN_TYPE.COUNTERS,name:args[0]};args.length>1&&(_counters2.glue=args[1]),args.length>2&&(_counters2.format=args[2]),tokens.push(_counters2)}break;case"url":args.length>0&&tokens.push({type:TOKEN_TYPE.URL,value:args[0]})}isFunction=!1,str=""}break;case",":isString?str+=c:isFunction&&(args.push(str),str="");break;case" ":case"\t":isString?str+=c:str&&(addOtherToken(tokens,str),str="");break;default:str+=c}"\\"!==c&&(isEscaped=!1)}return str&&addOtherToken(tokens,str),cache&&(cache[content]=tokens),tokens}),addOtherToken=function(tokens,identifier){switch(identifier){case"open-quote":tokens.push({type:TOKEN_TYPE.OPENQUOTE});break;case"close-quote":tokens.push({type:TOKEN_TYPE.CLOSEQUOTE})}},getQuote=function(style,isOpening,quoteDepth){var quotes=style.quotes?style.quotes.split(/\s+/):["'\"'","'\"'"],idx=2*quoteDepth;return idx>=quotes.length&&(idx=quotes.length-2),isOpening||++idx,quotes[idx].replace(/^["']|["']$/g,"")},formatCounterValue=function(counter,glue,format){for(var len=counter.length,result="",i=0;i<len;i++)i>0&&(result+=glue||""),result+=(0,_ListItem.createCounterText)(counter[i],(0,_listStyle.parseListStyleType)(format||"decimal"),!1);return result}}])})},function(module,exports,__webpack_require__){(function(global){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(factory){var root="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(4),__webpack_require__(5),exports],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(_,$,exports){root.Backbone=factory(root,exports,_,$)}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}(function(root,Backbone,_,$){var previousBackbone=root.Backbone,slice=Array.prototype.slice;Backbone.VERSION="1.3.3",Backbone.$=$,Backbone.noConflict=function(){return root.Backbone=previousBackbone,this},Backbone.emulateHTTP=!1,Backbone.emulateJSON=!1;var addMethod=function(length,method,attribute){switch(length){case 1:return function(){return _[method](this[attribute])};case 2:return function(value){return _[method](this[attribute],value)};case 3:return function(iteratee,context){return _[method](this[attribute],cb(iteratee,this),context)};case 4:return function(iteratee,defaultVal,context){return _[method](this[attribute],cb(iteratee,this),defaultVal,context)};default:return function(){var args=slice.call(arguments);return args.unshift(this[attribute]),_[method].apply(_,args)}}},addUnderscoreMethods=function(Class,methods,attribute){_.each(methods,function(length,method){_[method]&&(Class.prototype[method]=addMethod(length,method,attribute))})},cb=function(iteratee,instance){return _.isFunction(iteratee)?iteratee:_.isObject(iteratee)&&!instance._isModel(iteratee)?modelMatcher(iteratee):_.isString(iteratee)?function(model){return model.get(iteratee)}:iteratee},modelMatcher=function(attrs){var matcher=_.matches(attrs);return function(model){return matcher(model.attributes)}},Events=Backbone.Events={},eventSplitter=/\s+/,eventsApi=function(iteratee,events,name,callback,opts){var names,i=0;if(name&&"object"==typeof name){void 0!==callback&&"context"in opts&&void 0===opts.context&&(opts.context=callback);for(names=_.keys(name);i<names.length;i++)events=eventsApi(iteratee,events,names[i],name[names[i]],opts)}else if(name&&eventSplitter.test(name))for(names=name.split(eventSplitter);i<names.length;i++)events=iteratee(events,names[i],callback,opts);else events=iteratee(events,name,callback,opts);return events};Events.on=function(name,callback,context){return internalOn(this,name,callback,context)};var internalOn=function(obj,name,callback,context,listening){if(obj._events=eventsApi(onApi,obj._events||{},name,callback,{context:context,ctx:obj,listening:listening}),listening){(obj._listeners||(obj._listeners={}))[listening.id]=listening}return obj};Events.listenTo=function(obj,name,callback){if(!obj)return this;var id=obj._listenId||(obj._listenId=_.uniqueId("l")),listeningTo=this._listeningTo||(this._listeningTo={}),listening=listeningTo[id];if(!listening){var thisId=this._listenId||(this._listenId=_.uniqueId("l"));listening=listeningTo[id]={obj:obj,objId:id,id:thisId,listeningTo:listeningTo,count:0}}return internalOn(obj,name,callback,this,listening),this};var onApi=function(events,name,callback,options){if(callback){var handlers=events[name]||(events[name]=[]),context=options.context,ctx=options.ctx,listening=options.listening;listening&&listening.count++,handlers.push({callback:callback,context:context,ctx:context||ctx,listening:listening})}return events};Events.off=function(name,callback,context){return this._events?(this._events=eventsApi(offApi,this._events,name,callback,{context:context,listeners:this._listeners}),this):this},Events.stopListening=function(obj,name,callback){var listeningTo=this._listeningTo;if(!listeningTo)return this;for(var ids=obj?[obj._listenId]:_.keys(listeningTo),i=0;i<ids.length;i++){var listening=listeningTo[ids[i]];if(!listening)break;listening.obj.off(name,callback,this)}return this};var offApi=function(events,name,callback,options){if(events){var listening,i=0,context=options.context,listeners=options.listeners;if(name||callback||context){for(var names=name?[name]:_.keys(events);i<names.length;i++){name=names[i];var handlers=events[name];if(!handlers)break;for(var remaining=[],j=0;j<handlers.length;j++){var handler=handlers[j];callback&&callback!==handler.callback&&callback!==handler.callback._callback||context&&context!==handler.context?remaining.push(handler):(listening=handler.listening)&&0==--listening.count&&(delete listeners[listening.id],delete listening.listeningTo[listening.objId])}remaining.length?events[name]=remaining:delete events[name]}return events}for(var ids=_.keys(listeners);i<ids.length;i++)listening=listeners[ids[i]],delete listeners[listening.id],delete listening.listeningTo[listening.objId]}};Events.once=function(name,callback,context){var events=eventsApi(onceMap,{},name,callback,_.bind(this.off,this));return"string"==typeof name&&null==context&&(callback=void 0),this.on(events,callback,context)},Events.listenToOnce=function(obj,name,callback){var events=eventsApi(onceMap,{},name,callback,_.bind(this.stopListening,this,obj));return this.listenTo(obj,events)};var onceMap=function(map,name,callback,offer){if(callback){var once=map[name]=_.once(function(){offer(name,once),callback.apply(this,arguments)});once._callback=callback}return map};Events.trigger=function(name){if(!this._events)return this;for(var length=Math.max(0,arguments.length-1),args=Array(length),i=0;i<length;i++)args[i]=arguments[i+1];return eventsApi(triggerApi,this._events,name,void 0,args),this};var triggerApi=function(objEvents,name,callback,args){if(objEvents){var events=objEvents[name],allEvents=objEvents.all;events&&allEvents&&(allEvents=allEvents.slice()),events&&triggerEvents(events,args),allEvents&&triggerEvents(allEvents,[name].concat(args))}return objEvents},triggerEvents=function(events,args){var ev,i=-1,l=events.length,a1=args[0],a2=args[1],a3=args[2];switch(args.length){case 0:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx);return;case 1:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1);return;case 2:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1,a2);return;case 3:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1,a2,a3);return;default:for(;++i<l;)(ev=events[i]).callback.apply(ev.ctx,args);return}};Events.bind=Events.on,Events.unbind=Events.off,_.extend(Backbone,Events);var Model=Backbone.Model=function(attributes,options){var attrs=attributes||{};options||(options={}),this.cid=_.uniqueId(this.cidPrefix),this.attributes={},options.collection&&(this.collection=options.collection),options.parse&&(attrs=this.parse(attrs,options)||{});var defaults=_.result(this,"defaults");attrs=_.defaults(_.extend({},defaults,attrs),defaults),this.set(attrs,options),this.changed={},this.initialize.apply(this,arguments)};_.extend(Model.prototype,Events,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(options){return _.clone(this.attributes)},sync:function(){return Backbone.sync.apply(this,arguments)},get:function(attr){return this.attributes[attr]},escape:function(attr){return _.escape(this.get(attr))},has:function(attr){return null!=this.get(attr)},matches:function(attrs){return!!_.iteratee(attrs,this)(this.attributes)},set:function(key,val,options){if(null==key)return this;var attrs;if("object"==typeof key?(attrs=key,options=val):(attrs={})[key]=val,options||(options={}),!this._validate(attrs,options))return!1;var unset=options.unset,silent=options.silent,changes=[],changing=this._changing;this._changing=!0,changing||(this._previousAttributes=_.clone(this.attributes),this.changed={});var current=this.attributes,changed=this.changed,prev=this._previousAttributes;for(var attr in attrs)val=attrs[attr],_.isEqual(current[attr],val)||changes.push(attr),_.isEqual(prev[attr],val)?delete changed[attr]:changed[attr]=val,unset?delete current[attr]:current[attr]=val;if(this.idAttribute in attrs&&(this.id=this.get(this.idAttribute)),!silent){changes.length&&(this._pending=options);for(var i=0;i<changes.length;i++)this.trigger("change:"+changes[i],this,current[changes[i]],options)}if(changing)return this;if(!silent)for(;this._pending;)options=this._pending,this._pending=!1,this.trigger("change",this,options);return this._pending=!1,this._changing=!1,this},unset:function(attr,options){return this.set(attr,void 0,_.extend({},options,{unset:!0}))},clear:function(options){var attrs={};for(var key in this.attributes)attrs[key]=void 0;return this.set(attrs,_.extend({},options,{unset:!0}))},hasChanged:function(attr){return null==attr?!_.isEmpty(this.changed):_.has(this.changed,attr)},changedAttributes:function(diff){if(!diff)return!!this.hasChanged()&&_.clone(this.changed);var old=this._changing?this._previousAttributes:this.attributes,changed={};for(var attr in diff){var val=diff[attr];_.isEqual(old[attr],val)||(changed[attr]=val)}return!!_.size(changed)&&changed},previous:function(attr){return null!=attr&&this._previousAttributes?this._previousAttributes[attr]:null},previousAttributes:function(){return _.clone(this._previousAttributes)},fetch:function(options){options=_.extend({parse:!0},options);var model=this,success=options.success;return options.success=function(resp){var serverAttrs=options.parse?model.parse(resp,options):resp;if(!model.set(serverAttrs,options))return!1;success&&success.call(options.context,model,resp,options),model.trigger("sync",model,resp,options)},wrapError(this,options),this.sync("read",this,options)},save:function(key,val,options){var attrs;null==key||"object"==typeof key?(attrs=key,options=val):(attrs={})[key]=val,options=_.extend({validate:!0,parse:!0},options);var wait=options.wait;if(attrs&&!wait){if(!this.set(attrs,options))return!1}else if(!this._validate(attrs,options))return!1;var model=this,success=options.success,attributes=this.attributes;options.success=function(resp){model.attributes=attributes;var serverAttrs=options.parse?model.parse(resp,options):resp;if(wait&&(serverAttrs=_.extend({},attrs,serverAttrs)),serverAttrs&&!model.set(serverAttrs,options))return!1;success&&success.call(options.context,model,resp,options),model.trigger("sync",model,resp,options)},wrapError(this,options),attrs&&wait&&(this.attributes=_.extend({},attributes,attrs));var method=this.isNew()?"create":options.patch?"patch":"update";"patch"!==method||options.attrs||(options.attrs=attrs);var xhr=this.sync(method,this,options);return this.attributes=attributes,xhr},destroy:function(options){options=options?_.clone(options):{};var model=this,success=options.success,wait=options.wait,destroy=function(){model.stopListening(),model.trigger("destroy",model,model.collection,options)};options.success=function(resp){wait&&destroy(),success&&success.call(options.context,model,resp,options),model.isNew()||model.trigger("sync",model,resp,options)};var xhr=!1;return this.isNew()?_.defer(options.success):(wrapError(this,options),xhr=this.sync("delete",this,options)),wait||destroy(),xhr},url:function(){var base=_.result(this,"urlRoot")||_.result(this.collection,"url")||urlError();if(this.isNew())return base;var id=this.get(this.idAttribute);return base.replace(/[^\/]$/,"$&/")+encodeURIComponent(id)},parse:function(resp,options){return resp},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(options){return this._validate({},_.extend({},options,{validate:!0}))},_validate:function(attrs,options){if(!options.validate||!this.validate)return!0;attrs=_.extend({},this.attributes,attrs);var error=this.validationError=this.validate(attrs,options)||null;return!error||(this.trigger("invalid",this,error,_.extend(options,{validationError:error})),!1)}}),addUnderscoreMethods(Model,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var Collection=Backbone.Collection=function(models,options){options||(options={}),options.model&&(this.model=options.model),void 0!==options.comparator&&(this.comparator=options.comparator),this._reset(),this.initialize.apply(this,arguments),models&&this.reset(models,_.extend({silent:!0},options))},setOptions={add:!0,remove:!0,merge:!0},addOptions={add:!0,remove:!1},splice=function(array,insert,at){at=Math.min(Math.max(at,0),array.length);var i,tail=Array(array.length-at),length=insert.length;for(i=0;i<tail.length;i++)tail[i]=array[i+at];for(i=0;i<length;i++)array[i+at]=insert[i];for(i=0;i<tail.length;i++)array[i+length+at]=tail[i]};_.extend(Collection.prototype,Events,{model:Model,initialize:function(){},toJSON:function(options){return this.map(function(model){return model.toJSON(options)})},sync:function(){return Backbone.sync.apply(this,arguments)},add:function(models,options){return this.set(models,_.extend({merge:!1},options,addOptions))},remove:function(models,options){options=_.extend({},options);var singular=!_.isArray(models);models=singular?[models]:models.slice();var removed=this._removeModels(models,options);return!options.silent&&removed.length&&(options.changes={added:[],merged:[],removed:removed},this.trigger("update",this,options)),singular?removed[0]:removed},set:function(models,options){if(null!=models){options=_.extend({},setOptions,options),options.parse&&!this._isModel(models)&&(models=this.parse(models,options)||[]);var singular=!_.isArray(models);models=singular?[models]:models.slice();var at=options.at;null!=at&&(at=+at),at>this.length&&(at=this.length),at<0&&(at+=this.length+1);var model,i,set=[],toAdd=[],toMerge=[],toRemove=[],modelMap={},add=options.add,merge=options.merge,remove=options.remove,sort=!1,sortable=this.comparator&&null==at&&!1!==options.sort,sortAttr=_.isString(this.comparator)?this.comparator:null;for(i=0;i<models.length;i++){model=models[i];var existing=this.get(model);if(existing){if(merge&&model!==existing){var attrs=this._isModel(model)?model.attributes:model;options.parse&&(attrs=existing.parse(attrs,options)),existing.set(attrs,options),toMerge.push(existing),sortable&&!sort&&(sort=existing.hasChanged(sortAttr))}modelMap[existing.cid]||(modelMap[existing.cid]=!0,set.push(existing)),models[i]=existing}else add&&(model=models[i]=this._prepareModel(model,options))&&(toAdd.push(model),this._addReference(model,options),modelMap[model.cid]=!0,set.push(model))}if(remove){for(i=0;i<this.length;i++)model=this.models[i],modelMap[model.cid]||toRemove.push(model);toRemove.length&&this._removeModels(toRemove,options)}var orderChanged=!1,replace=!sortable&&add&&remove;if(set.length&&replace?(orderChanged=this.length!==set.length||_.some(this.models,function(m,index){return m!==set[index]}),this.models.length=0,splice(this.models,set,0),this.length=this.models.length):toAdd.length&&(sortable&&(sort=!0),splice(this.models,toAdd,null==at?this.length:at),this.length=this.models.length),sort&&this.sort({silent:!0}),!options.silent){for(i=0;i<toAdd.length;i++)null!=at&&(options.index=at+i),model=toAdd[i],model.trigger("add",model,this,options);(sort||orderChanged)&&this.trigger("sort",this,options),(toAdd.length||toRemove.length||toMerge.length)&&(options.changes={added:toAdd,removed:toRemove,merged:toMerge},this.trigger("update",this,options))}return singular?models[0]:models}},reset:function(models,options){options=options?_.clone(options):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],options);return options.previousModels=this.models,this._reset(),models=this.add(models,_.extend({silent:!0},options)),options.silent||this.trigger("reset",this,options),models},push:function(model,options){return this.add(model,_.extend({at:this.length},options))},pop:function(options){var model=this.at(this.length-1);return this.remove(model,options)},unshift:function(model,options){return this.add(model,_.extend({at:0},options))},shift:function(options){var model=this.at(0);return this.remove(model,options)},slice:function(){return slice.apply(this.models,arguments)},get:function(obj){if(null!=obj)return this._byId[obj]||this._byId[this.modelId(obj.attributes||obj)]||obj.cid&&this._byId[obj.cid]},has:function(obj){return null!=this.get(obj)},at:function(index){return index<0&&(index+=this.length),this.models[index]},where:function(attrs,first){return this[first?"find":"filter"](attrs)},findWhere:function(attrs){return this.where(attrs,!0)},sort:function(options){var comparator=this.comparator;if(!comparator)throw new Error("Cannot sort a set without a comparator");options||(options={});var length=comparator.length;return _.isFunction(comparator)&&(comparator=_.bind(comparator,this)),1===length||_.isString(comparator)?this.models=this.sortBy(comparator):this.models.sort(comparator),options.silent||this.trigger("sort",this,options),this},pluck:function(attr){return this.map(attr+"")},fetch:function(options){options=_.extend({parse:!0},options);var success=options.success,collection=this;return options.success=function(resp){var method=options.reset?"reset":"set";collection[method](resp,options),success&&success.call(options.context,collection,resp,options),collection.trigger("sync",collection,resp,options)},wrapError(this,options),this.sync("read",this,options)},create:function(model,options){options=options?_.clone(options):{};var wait=options.wait;if(!(model=this._prepareModel(model,options)))return!1;wait||this.add(model,options);var collection=this,success=options.success;return options.success=function(m,resp,callbackOpts){wait&&collection.add(m,callbackOpts),success&&success.call(callbackOpts.context,m,resp,callbackOpts)},model.save(null,options),model},parse:function(resp,options){return resp},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(attrs){return attrs[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(attrs,options){if(this._isModel(attrs))return attrs.collection||(attrs.collection=this),attrs;options=options?_.clone(options):{},options.collection=this;var model=new this.model(attrs,options);return model.validationError?(this.trigger("invalid",this,model.validationError,options),!1):model},_removeModels:function(models,options){for(var removed=[],i=0;i<models.length;i++){var model=this.get(models[i]);if(model){var index=this.indexOf(model);this.models.splice(index,1),this.length--,delete this._byId[model.cid];var id=this.modelId(model.attributes);null!=id&&delete this._byId[id],options.silent||(options.index=index,model.trigger("remove",model,this,options)),removed.push(model),this._removeReference(model,options)}}return removed},_isModel:function(model){return model instanceof Model},_addReference:function(model,options){this._byId[model.cid]=model;var id=this.modelId(model.attributes);null!=id&&(this._byId[id]=model),model.on("all",this._onModelEvent,this)},_removeReference:function(model,options){delete this._byId[model.cid];var id=this.modelId(model.attributes);null!=id&&delete this._byId[id],this===model.collection&&delete model.collection,model.off("all",this._onModelEvent,this)},_onModelEvent:function(event,model,collection,options){if(model){if(("add"===event||"remove"===event)&&collection!==this)return;if("destroy"===event&&this.remove(model,options),"change"===event){var prevId=this.modelId(model.previousAttributes()),id=this.modelId(model.attributes);prevId!==id&&(null!=prevId&&delete this._byId[prevId],null!=id&&(this._byId[id]=model))}}this.trigger.apply(this,arguments)}}),addUnderscoreMethods(Collection,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var View=Backbone.View=function(options){this.cid=_.uniqueId("view"),_.extend(this,_.pick(options,viewOptions)),this._ensureElement(),this.initialize.apply(this,arguments)},delegateEventSplitter=/^(\S+)\s*(.*)$/,viewOptions=["model","collection","el","id","attributes","className","tagName","events"];_.extend(View.prototype,Events,{tagName:"div",$:function(selector){return this.$el.find(selector)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(element){return this.undelegateEvents(),this._setElement(element),this.delegateEvents(),this},_setElement:function(el){this.$el=el instanceof Backbone.$?el:Backbone.$(el),this.el=this.$el[0]},delegateEvents:function(events){if(events||(events=_.result(this,"events")),!events)return this;this.undelegateEvents();for(var key in events){var method=events[key];if(_.isFunction(method)||(method=this[method]),method){var match=key.match(delegateEventSplitter);this.delegate(match[1],match[2],_.bind(method,this))}}return this},delegate:function(eventName,selector,listener){return this.$el.on(eventName+".delegateEvents"+this.cid,selector,listener),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(eventName,selector,listener){return this.$el.off(eventName+".delegateEvents"+this.cid,selector,listener),this},_createElement:function(tagName){return document.createElement(tagName)},_ensureElement:function(){if(this.el)this.setElement(_.result(this,"el"));else{var attrs=_.extend({},_.result(this,"attributes"));this.id&&(attrs.id=_.result(this,"id")),this.className&&(attrs.class=_.result(this,"className")),this.setElement(this._createElement(_.result(this,"tagName"))),this._setAttributes(attrs)}},_setAttributes:function(attributes){this.$el.attr(attributes)}}),Backbone.sync=function(method,model,options){var type=methodMap[method];_.defaults(options||(options={}),{emulateHTTP:Backbone.emulateHTTP,emulateJSON:Backbone.emulateJSON});var params={type:type,dataType:"json"};if(options.url||(params.url=_.result(model,"url")||urlError()),null!=options.data||!model||"create"!==method&&"update"!==method&&"patch"!==method||(params.contentType="application/json",params.data=JSON.stringify(options.attrs||model.toJSON(options))),options.emulateJSON&&(params.contentType="application/x-www-form-urlencoded",params.data=params.data?{model:params.data}:{}),options.emulateHTTP&&("PUT"===type||"DELETE"===type||"PATCH"===type)){params.type="POST",options.emulateJSON&&(params.data._method=type);var beforeSend=options.beforeSend;options.beforeSend=function(xhr){if(xhr.setRequestHeader("X-HTTP-Method-Override",type),beforeSend)return beforeSend.apply(this,arguments)}}"GET"===params.type||options.emulateJSON||(params.processData=!1);var error=options.error;options.error=function(xhr,textStatus,errorThrown){options.textStatus=textStatus,options.errorThrown=errorThrown,error&&error.call(options.context,xhr,textStatus,errorThrown)};var xhr=options.xhr=Backbone.ajax(_.extend(params,options));return model.trigger("request",model,xhr,options),xhr};var methodMap={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};Backbone.ajax=function(){return Backbone.$.ajax.apply(Backbone.$,arguments)};var Router=Backbone.Router=function(options){options||(options={}),options.routes&&(this.routes=options.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},optionalParam=/\((.*?)\)/g,namedParam=/(\(\?)?:\w+/g,splatParam=/\*\w+/g,escapeRegExp=/[\-{}\[\]+?.,\\\^$|#\s]/g;_.extend(Router.prototype,Events,{initialize:function(){},route:function(route,name,callback){_.isRegExp(route)||(route=this._routeToRegExp(route)),_.isFunction(name)&&(callback=name,name=""),callback||(callback=this[name]);var router=this;return Backbone.history.route(route,function(fragment){var args=router._extractParameters(route,fragment);!1!==router.execute(callback,args,name)&&(router.trigger.apply(router,["route:"+name].concat(args)),router.trigger("route",name,args),Backbone.history.trigger("route",router,name,args))}),this},execute:function(callback,args,name){callback&&callback.apply(this,args)},navigate:function(fragment,options){return Backbone.history.navigate(fragment,options),this},_bindRoutes:function(){if(this.routes){this.routes=_.result(this,"routes");for(var route,routes=_.keys(this.routes);null!=(route=routes.pop());)this.route(route,this.routes[route])}},_routeToRegExp:function(route){return route=route.replace(escapeRegExp,"\\$&").replace(optionalParam,"(?:$1)?").replace(namedParam,function(match,optional){return optional?match:"([^/?]+)"}).replace(splatParam,"([^?]*?)"),new RegExp("^"+route+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(route,fragment){var params=route.exec(fragment).slice(1);return _.map(params,function(param,i){return i===params.length-1?param||null:param?decodeURIComponent(param):null})}});var History=Backbone.History=function(){this.handlers=[],this.checkUrl=_.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},routeStripper=/^[#\/]|\s+$/g,rootStripper=/^\/+|\/+$/g,pathStripper=/#.*$/;History.started=!1,_.extend(History.prototype,Events,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(fragment){return decodeURI(fragment.replace(/%25/g,"%2525"))},getSearch:function(){var match=this.location.href.replace(/#.*/,"").match(/\?.+/);return match?match[0]:""},getHash:function(window){var match=(window||this).location.href.match(/#(.*)$/);return match?match[1]:""},getPath:function(){var path=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===path.charAt(0)?path.slice(1):path},getFragment:function(fragment){return null==fragment&&(fragment=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),fragment.replace(routeStripper,"")},start:function(options){if(History.started)throw new Error("Backbone.history has already been started");if(History.started=!0,this.options=_.extend({root:"/"},this.options,options),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(rootStripper,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var rootPath=this.root.slice(0,-1)||"/";return this.location.replace(rootPath+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var body=document.body,iWindow=body.insertBefore(this.iframe,body.firstChild).contentWindow;iWindow.document.open(),iWindow.document.close(),iWindow.location.hash="#"+this.fragment}var addEventListener=window.addEventListener||function(eventName,listener){return attachEvent("on"+eventName,listener)};if(this._usePushState?addEventListener("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?addEventListener("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var removeEventListener=window.removeEventListener||function(eventName,listener){return detachEvent("on"+eventName,listener)};this._usePushState?removeEventListener("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&removeEventListener("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),History.started=!1},route:function(route,callback){this.handlers.unshift({route:route,callback:callback})},checkUrl:function(e){var current=this.getFragment();if(current===this.fragment&&this.iframe&&(current=this.getHash(this.iframe.contentWindow)),current===this.fragment)return!1;this.iframe&&this.navigate(current),this.loadUrl()},loadUrl:function(fragment){return!!this.matchRoot()&&(fragment=this.fragment=this.getFragment(fragment),_.some(this.handlers,function(handler){if(handler.route.test(fragment))return handler.callback(fragment),!0}))},navigate:function(fragment,options){if(!History.started)return!1;options&&!0!==options||(options={trigger:!!options}),fragment=this.getFragment(fragment||"");var rootPath=this.root;""!==fragment&&"?"!==fragment.charAt(0)||(rootPath=rootPath.slice(0,-1)||"/");var url=rootPath+fragment;if(fragment=this.decodeFragment(fragment.replace(pathStripper,"")),this.fragment!==fragment){if(this.fragment=fragment,this._usePushState)this.history[options.replace?"replaceState":"pushState"]({},document.title,url);else{if(!this._wantsHashChange)return this.location.assign(url);if(this._updateHash(this.location,fragment,options.replace),this.iframe&&fragment!==this.getHash(this.iframe.contentWindow)){var iWindow=this.iframe.contentWindow;options.replace||(iWindow.document.open(),iWindow.document.close()),this._updateHash(iWindow.location,fragment,options.replace)}}return options.trigger?this.loadUrl(fragment):void 0}},_updateHash:function(location,fragment,replace){if(replace){var href=location.href.replace(/(javascript:|#).*$/,"");location.replace(href+"#"+fragment)}else location.hash="#"+fragment}}),Backbone.history=new History;var extend=function(protoProps,staticProps){var child,parent=this;return child=protoProps&&_.has(protoProps,"constructor")?protoProps.constructor:function(){return parent.apply(this,arguments)},_.extend(child,parent,staticProps),child.prototype=_.create(parent.prototype,protoProps),child.prototype.constructor=child,child.__super__=parent.prototype,child};Model.extend=Collection.extend=Router.extend=View.extend=History.extend=extend;var urlError=function(){throw new Error('A "url" property or function must be specified')},wrapError=function(model,options){var error=options.error;options.error=function(resp){error&&error.call(options.context,model,resp,options),model.trigger("error",model,resp,options)}};return Backbone})}).call(exports,__webpack_require__(6))},,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function createSVGBlurReconfirm(){var svgNS="http://www.w3.org/2000/svg",feGaussianBlur=document.createElementNS(svgNS,"feGaussianBlur");feGaussianBlur.setAttribute("stdDeviation","0.7");var filter=document.createElementNS(svgNS,"filter");filter.setAttribute("id","gaussian-blur"),filter.appendChild(feGaussianBlur);var svgElem=document.createElementNS(svgNS,"svg");svgElem.setAttribute("id","react-confirm-alert-firm-svg"),svgElem.setAttribute("class","react-confirm-alert-svg"),svgElem.appendChild(filter),document.body.appendChild(svgElem)}function removeSVGBlurReconfirm(){var svg=document.getElementById("react-confirm-alert-firm-svg");svg.parentNode.removeChild(svg),document.body.children[0].classList.remove("react-confirm-alert-blur")}function createElementReconfirm(properties){document.body.children[0].classList.add("react-confirm-alert-blur");var divTarget=document.createElement("div");divTarget.id="react-confirm-alert",document.body.appendChild(divTarget),(0,_reactDom.render)(_react2.default.createElement(ReactConfirmAlert,properties),divTarget)}function removeElementReconfirm(){var target=document.getElementById("react-confirm-alert");(0,_reactDom.unmountComponentAtNode)(target),target.parentNode.removeChild(target)}function addBodyClass(){document.body.classList.add("react-confirm-alert-body-element")}function removeBodyClass(){document.body.classList.remove("react-confirm-alert-body-element")}function confirmAlert(properties){addBodyClass(),createSVGBlurReconfirm(),createElementReconfirm(properties)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_temp2,_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();exports.confirmAlert=confirmAlert;var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_reactDom=__webpack_require__(12),ReactConfirmAlert=(_temp2=_class=function(_Component){function ReactConfirmAlert(){var _ref,_temp,_this,_ret;_classCallCheck(this,ReactConfirmAlert);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=ReactConfirmAlert.__proto__||Object.getPrototypeOf(ReactConfirmAlert)).call.apply(_ref,[this].concat(args))),_this.handleClickButton=function(button){button.onClick&&button.onClick(),_this.close()},_this.close=function(){removeBodyClass(),removeElementReconfirm(),removeSVGBlurReconfirm()},_this.keyboardClose=function(event){27===event.keyCode&&_this.close()},_this.componentDidMount=function(){document.addEventListener("keydown",_this.keyboardClose,!1)},_this.componentWillUnmount=function(){document.removeEventListener("keydown",_this.keyboardClose,!1),_this.props.willUnmount()},_this.renderCustomUI=function(){var _this$props=_this.props,title=_this$props.title,message=_this$props.message;return(0,_this$props.customUI)({title:title,message:message,onClose:_this.close})},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(ReactConfirmAlert,_Component),_createClass(ReactConfirmAlert,[{key:"render",value:function(){var _this2=this,_props=this.props,title=_props.title,message=_props.message,buttons=_props.buttons,childrenElement=_props.childrenElement,customUI=_props.customUI;return _react2.default.createElement("div",{className:"react-confirm-alert-overlay"},_react2.default.createElement("div",{className:"react-confirm-alert"},customUI?this.renderCustomUI():_react2.default.createElement("div",{className:"react-confirm-alert-body"},title&&_react2.default.createElement("h1",null,title),message,childrenElement(),_react2.default.createElement("div",{className:"react-confirm-alert-button-group"},buttons.map(function(button,i){return _react2.default.createElement("button",{key:i,onClick:function(){return _this2.handleClickButton(button)}},button.label)})))))}}]),ReactConfirmAlert}(_react.Component),_class.propTypes={title:_propTypes2.default.string,message:_propTypes2.default.string,buttons:_propTypes2.default.array.isRequired,childrenElement:_propTypes2.default.func,customUI:_propTypes2.default.func,willUnmount:_propTypes2.default.func},_class.defaultProps={buttons:[{label:"Cancel",onClick:function(){return null}},{label:"Confirm",onClick:function(){return null}}],childrenElement:function(){return null},willUnmount:function(){return null}},_temp2);exports.default=ReactConfirmAlert},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_select=__webpack_require__(273),_select2=_interopRequireDefault(_select),_common=__webpack_require__(276),intervalField={name:"intervalType",values:_common.intervalValues},timeOfDayField={name:"timeOfDay",values:_common.timeOfDayValues},weekDayField={name:"weekDay",values:_common.weekDayValues},monthDayField={name:"monthDay",values:_common.monthDayValues},nthWeekDayField={name:"nthWeekDay",values:_common.nthWeekDayValues},NotificationScheduling=function(_React$Component){function NotificationScheduling(){var _ref,_temp,_this,_ret;_classCallCheck(this,NotificationScheduling);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NotificationScheduling.__proto__||Object.getPrototypeOf(NotificationScheduling)).call.apply(_ref,[this].concat(args))),_this.getCurrentValue=function(){return _this.props.item[_this.props.field.name]||{}},_this.handleValueChange=function(name,value){var oldValue=_this.getCurrentValue(),newValue={};return newValue[name]=value,_this.props.onValueChange({target:{name:_this.props.field.name,value:_underscore2.default.extend({},oldValue,newValue)}})},_this.handleIntervalChange=function(event){return _this.handleValueChange("intervalType",event.target.value)},_this.handleTimeOfDayChange=function(event){return _this.handleValueChange("timeOfDay",event.target.value)},_this.handleWeekDayChange=function(event){return _this.handleValueChange("weekDay",event.target.value)},_this.handleMonthDayChange=function(event){return _this.handleValueChange("monthDay",event.target.value)},_this.handleNthWeekDayChange=function(event){return _this.handleValueChange("nthWeekDay",event.target.value)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NotificationScheduling,_React$Component),_createClass(NotificationScheduling,[{key:"render",value:function(){var value=this.getCurrentValue(),timeOfDaySelection=void 0,weekDaySelection=void 0,monthDaySelection=void 0,nthWeekDaySelection=void 0;return"immediately"!==value.intervalType&&(timeOfDaySelection=_react2.default.createElement(_select2.default,{field:timeOfDayField,item:this.getCurrentValue(),onValueChange:this.handleTimeOfDayChange})),"weekly"!==value.intervalType&&"nthWeekDay"!==value.intervalType||(weekDaySelection=_react2.default.createElement(_select2.default,{field:weekDayField,item:this.getCurrentValue(),onValueChange:this.handleWeekDayChange})),"monthly"===value.intervalType&&(monthDaySelection=_react2.default.createElement(_select2.default,{field:monthDayField,item:this.getCurrentValue(),onValueChange:this.handleMonthDayChange})),"nthWeekDay"===value.intervalType&&(nthWeekDaySelection=_react2.default.createElement(_select2.default,{field:nthWeekDayField,item:this.getCurrentValue(),onValueChange:this.handleNthWeekDayChange})),_react2.default.createElement("div",null,_react2.default.createElement(_select2.default,{field:intervalField,item:this.getCurrentValue(),onValueChange:this.handleIntervalChange,automationId:"newsletter_interval_type"}),nthWeekDaySelection,monthDaySelection,weekDaySelection,timeOfDaySelection)}}]),NotificationScheduling}(_react2.default.Component);NotificationScheduling.propTypes={item:_propTypes2.default.object.isRequired,field:_propTypes2.default.shape({name:_propTypes2.default.string}).isRequired,onValueChange:_propTypes2.default.func.isRequired},module.exports=NotificationScheduling},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),KeyValueTable=function(props){return _react2.default.createElement("table",{className:"widefat fixed",style:{maxWidth:props.max_width}},_react2.default.createElement("tbody",null,props.rows.map(function(row){return _react2.default.createElement("tr",{key:"row_"+row.key},_react2.default.createElement("td",{className:"row-title"},row.key),_react2.default.createElement("td",null,row.value))})))};KeyValueTable.propTypes={max_width:_propTypes2.default.string,rows:_propTypes2.default.arrayOf(_propTypes2.default.shape({key:_propTypes2.default.string.isRequired,value:_propTypes2.default.oneOfType([_propTypes2.default.string,_propTypes2.default.number,_propTypes2.default.element]).isRequired})).isRequired},KeyValueTable.defaultProps={max_width:"auto"},module.exports=KeyValueTable},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),TasksListDataRow=function(props){return _react2.default.createElement("tr",null,_react2.default.createElement("td",{className:"column column-primary"},props.task.id),_react2.default.createElement("td",{className:"column"},props.task.type),_react2.default.createElement("td",{className:"column"},props.task.newsletter?_react2.default.createElement("a",{href:props.task.newsletter.preview_url,"data-newsletter-id":props.task.newsletter.newsletter_id,"data-queue-id":props.task.newsletter.queue_id,target:"_blank"},props.task.newsletter.subject||_mailpoet2.default.I18n.t("preview")):_mailpoet2.default.I18n.t("none")),_react2.default.createElement("td",{className:"column"},props.task.priority),props.show_scheduled_at?_react2.default.createElement("td",{className:"column-date"},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(1e3*props.task.scheduled_at))):null,_react2.default.createElement("td",{className:"column-date"},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(1e3*props.task.updated_at))))};TasksListDataRow.propTypes={show_scheduled_at:_propTypes2.default.bool,task:_propTypes2.default.shape({id:_propTypes2.default.number.isRequired,type:_propTypes2.default.string.isRequired,priority:_propTypes2.default.number.isRequired,updated_at:_propTypes2.default.number.isRequired,scheduled_at:_propTypes2.default.number,status:_propTypes2.default.string,newsletter:_propTypes2.default.shape({newsletter_id:_propTypes2.default.number.isRequired,queue_id:_propTypes2.default.number.isRequired,preview_url:_propTypes2.default.string.isRequired,subject:_propTypes2.default.string})}).isRequired},TasksListDataRow.defaultProps={show_scheduled_at:!1,task:{newsletter:null}},module.exports=TasksListDataRow},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){__webpack_require__(412),__webpack_require__(416),__webpack_require__(442),__webpack_require__(446),__webpack_require__(448),__webpack_require__(449),__webpack_require__(459),__webpack_require__(460),__webpack_require__(461),__webpack_require__(464),__webpack_require__(465),__webpack_require__(474),module.exports=__webpack_require__(476)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(12),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(8),_list=__webpack_require__(413),_list2=_interopRequireDefault(_list),_form=__webpack_require__(414),_form2=_interopRequireDefault(_form),container=document.getElementById("subscribers_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{path:"/new",component:_form2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/edit/:id",component:_form2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"*",component:_list2.default}))),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(8),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_classnames=__webpack_require__(9),_classnames2=_interopRequireDefault(_classnames),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(27),_listing2=_interopRequireDefault(_listing),_selection=__webpack_require__(296),_selection2=_interopRequireDefault(_selection),columns=[{name:"email",label:_mailpoet2.default.I18n.t("subscriber"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),sortable:!0},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"created_at",label:_mailpoet2.default.I18n.t("subscribedOn"),sortable:!0},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberTrashed"):_mailpoet2.default.I18n.t("multipleSubscribersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberDeleted"):_mailpoet2.default.I18n.t("multipleSubscribersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSubscriberRestored"):_mailpoet2.default.I18n.t("multipleSubscribersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onNoItemsFound:function(group){return"bounced"===group&&!window.mailpoet_premium_active&&!window.mss_active&&_react2.default.createElement("div",null,_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("bouncedSubscribersHelp")),_react2.default.createElement("p",null,_react2.default.createElement("a",{href:"admin.php?page=mailpoet-premium",className:"button-primary"},_mailpoet2.default.I18n.t("bouncedSubscribersPremiumButtonText"))))}},bulkActions=[{name:"moveToList",label:_mailpoet2.default.I18n.t("moveToList"),onSelect:function(){var field={id:"move_to_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#move_to_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersMovedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"addToList",label:_mailpoet2.default.I18n.t("addToList"),onSelect:function(){var field={id:"add_to_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#add_to_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersAddedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromList",label:_mailpoet2.default.I18n.t("removeFromList"),onSelect:function(){var field={id:"remove_from_segment",api_version:window.mailpoet_api_version,endpoint:"segments",filter:function(segment){return!("default"!==segment.type)}};return _react2.default.createElement(_selection2.default,{field:field})},getData:function(){return{segment_id:Number((0,_jquery2.default)("#remove_from_segment").val())}},onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersRemovedFromList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromAllLists",label:_mailpoet2.default.I18n.t("removeFromAllLists"),onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleSubscribersRemovedFromAllLists").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"sendConfirmationEmail",label:_mailpoet2.default.I18n.t("resendConfirmationEmail"),onSuccess:function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("multipleConfirmationEmailsSent").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:_mailpoet2.default.I18n.t("edit"),link:function(subscriber){return _react2.default.createElement(_reactRouterDom.Link,{to:"/edit/"+subscriber.id},_mailpoet2.default.I18n.t("edit"))}},{name:"trash",display:function(subscriber){return 0===Number(subscriber.wp_user_id)}}],SubscriberList=function(_React$Component){function SubscriberList(){var _ref,_temp,_this,_ret;_classCallCheck(this,SubscriberList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=SubscriberList.__proto__||Object.getPrototypeOf(SubscriberList)).call.apply(_ref,[this].concat(args))),_this.getSegmentFromId=function(segmentId){var result=!1;return window.mailpoet_segments.forEach(function(segment){segment.id===segmentId&&(result=segment)}),result},_this.renderItem=function(subscriber,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions","column-username"),status="";switch(subscriber.status){case"subscribed":status=_mailpoet2.default.I18n.t("subscribed");break;case"unconfirmed":status=_mailpoet2.default.I18n.t("unconfirmed");break;case"unsubscribed":status=_mailpoet2.default.I18n.t("unsubscribed");break;case"bounced":status=_mailpoet2.default.I18n.t("bounced");break;default:status="Invalid"}var segments=!1;if(subscriber.subscriptions.length>0){var subscribedSegments=[];subscriber.subscriptions.forEach(function(subscription){var segment=_this.getSegmentFromId(subscription.segment_id);!1!==segment&&"subscribed"===subscription.status&&subscribedSegments.push(segment.name)}),segments=_react2.default.createElement("span",null,subscribedSegments.join(", "))}return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement(_reactRouterDom.Link,{className:"row-title",to:"/edit/"+subscriber.id},subscriber.email)),_react2.default.createElement("p",{style:{margin:0}},subscriber.first_name," ",subscriber.last_name),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},status),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("subscribedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(subscriber.created_at))),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(subscriber.updated_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(SubscriberList,_React$Component),_createClass(SubscriberList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/new"},_mailpoet2.default.I18n.t("new")),_react2.default.createElement("a",{className:"page-title-action",href:"?page=mailpoet-import#step1"},_mailpoet2.default.I18n.t("import")),_react2.default.createElement("a",{id:"mailpoet_export_button",className:"page-title-action",href:"?page=mailpoet-export"},_mailpoet2.default.I18n.t("export"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"subscribers",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,messages:messages,sort_by:"created_at",sort_order:"desc"}))}}]),SubscriberList}(_react2.default.Component);SubscriberList.propTypes={location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},module.exports=SubscriberList},function(module,exports,__webpack_require__){"use strict";(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(415)}).call(exports,__webpack_require__(6))},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function beforeFormContent(subscriber){if(Number(subscriber.wp_user_id)>0)return _react2.default.createElement("p",{className:"description"},(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("WPUserEditNotice"),/\[link\](.*?)\[\/link\]/g,function(match,i){return _react2.default.createElement("a",{key:i,href:"user-edit.php?user_id="+subscriber.wp_user_id},match)}))}function afterFormContent(){return _react2.default.createElement("p",{className:"description"},_react2.default.createElement("strong",null,_mailpoet2.default.I18n.t("tip"))," ",_mailpoet2.default.I18n.t("customFieldsTip"))}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(8),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_form=__webpack_require__(189),_form2=_interopRequireDefault(_form),_reactStringReplace=__webpack_require__(26),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),fields=[{name:"email",label:_mailpoet2.default.I18n.t("email"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"first_name",label:_mailpoet2.default.I18n.t("firstname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"last_name",label:_mailpoet2.default.I18n.t("lastname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"status",label:_mailpoet2.default.I18n.t("status"),type:"select",values:{subscribed:_mailpoet2.default.I18n.t("subscribed"),unconfirmed:_mailpoet2.default.I18n.t("unconfirmed"),unsubscribed:_mailpoet2.default.I18n.t("unsubscribed"),bounced:_mailpoet2.default.I18n.t("bounced")},filter:function(subscriber,value){return!(Number(subscriber.wp_user_id)>0&&"unconfirmed"===value)}},{name:"segments",label:_mailpoet2.default.I18n.t("lists"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectList"),tip:_mailpoet2.default.I18n.t("welcomeEmailTip"),api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,selected:function(subscriber){return!1===Array.isArray(subscriber.subscriptions)?null:subscriber.subscriptions.filter(function(subscription){return"subscribed"===subscription.status}).map(function(subscription){return subscription.segment_id})},filter:function(segment){return!segment.deleted_at&&"default"===segment.type},getLabel:function(segment){return segment.name+" ("+segment.subscribers+")"},getSearchLabel:function(segment,subscriber){var label="";return void 0!==subscriber.subscriptions&&subscriber.subscriptions.forEach(function(subscription){if(segment.id===subscription.segment_id&&(label=segment.name,"unsubscribed"===subscription.status)){var unsubscribedAt=_mailpoet2.default.Date.format(subscription.updated_at);label+=" (%$1s)".replace("%$1s",_mailpoet2.default.I18n.t("unsubscribedOn").replace("%$1s",unsubscribedAt))}}),label}}];(window.mailpoet_custom_fields||[]).forEach(function(customField){var field={name:"cf_"+customField.id,label:customField.name,type:customField.type};switch(customField.params&&(field.params=customField.params),customField.params.values&&(field.values=customField.params.values),customField.type){case"date":field.year_placeholder=_mailpoet2.default.I18n.t("year"),field.month_placeholder=_mailpoet2.default.I18n.t("month"),field.day_placeholder=_mailpoet2.default.I18n.t("day");break;case"select":field.placeholder="-";break;default:field.placeholder=""}fields.push(field)});var messages={onUpdate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("subscriberUpdated"))},onCreate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("subscriberAdded")),_mailpoet2.default.trackEvent("Subscribers > Add new",{"MailPoet Free version":window.mailpoet_version})}},SubscriberForm=function(_React$Component){function SubscriberForm(){return _classCallCheck(this,SubscriberForm),_possibleConstructorReturn(this,(SubscriberForm.__proto__||Object.getPrototypeOf(SubscriberForm)).apply(this,arguments))}return _inherits(SubscriberForm,_React$Component),_createClass(SubscriberForm,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("subscriber"),_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/"},_mailpoet2.default.I18n.t("backToList"))),_react2.default.createElement(_form2.default,{endpoint:"subscribers",fields:fields,params:this.props.match.params,messages:messages,beforeFormContent:beforeFormContent,afterFormContent:afterFormContent}))}}]),SubscriberForm}(_react2.default.Component);SubscriberForm.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired},module.exports=SubscriberForm},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(12),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(8),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_types=__webpack_require__(417),_types2=_interopRequireDefault(_types),_templates=__webpack_require__(418),_templates2=_interopRequireDefault(_templates),_send=__webpack_require__(423),_send2=_interopRequireDefault(_send),_congratulate=__webpack_require__(430),_congratulate2=_interopRequireDefault(_congratulate),_standard=__webpack_require__(435),_standard2=_interopRequireDefault(_standard),_notification=__webpack_require__(436),_notification2=_interopRequireDefault(_notification),_welcome=__webpack_require__(437),_welcome2=_interopRequireDefault(_welcome),_events_list=__webpack_require__(299),_events_list2=_interopRequireDefault(_events_list),_standard3=__webpack_require__(438),_standard4=_interopRequireDefault(_standard3),_welcome3=__webpack_require__(439),_welcome4=_interopRequireDefault(_welcome3),_notification3=__webpack_require__(440),_notification4=_interopRequireDefault(_notification3),_notification_history=__webpack_require__(441),_notification_history2=_interopRequireDefault(_notification_history);((function(_React$Component){function App(){return _classCallCheck(this,App),_possibleConstructorReturn(this,(App.__proto__||Object.getPrototypeOf(App)).apply(this,arguments))}return _inherits(App,_React$Component),_createClass(App,[{key:"render",value:function(){return this.props.children}}]),App})(_react2.default.Component)).propTypes={children:_propTypes2.default.element.isRequired};var container=document.getElementById("newsletters_container");if(container){var routes=[{path:"/standard(/)**",component:_standard4.default},{path:"/welcome(/)**",component:_welcome4.default},{path:"/notification/history/:parent_id(/)**",component:_notification_history2.default},{path:"/notification(/)**",component:_notification4.default},{path:"/new/standard",component:_standard2.default},{path:"/new/notification",component:_notification2.default},{path:"/new/welcome",component:_welcome2.default},{path:"/new",component:_types2.default},{name:"template",path:"/template/:id",component:_templates2.default},{path:"/send/congratulate/:id",component:_congratulate2.default},{path:"/send/:id",component:_send2.default}];routes=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_before_router",[].concat(_toConsumableArray(routes),_toConsumableArray(function(){return window.mailpoet_automatic_emails?_underscore2.default.map(window.mailpoet_automatic_emails,function(automaticEmail){return{path:"new/"+automaticEmail.slug,name:automaticEmail.slug,component:_events_list2.default,data:{email:automaticEmail}}}):null}()))),window.mailpoet_listing=_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{exact:!0,path:"/",render:function(){return _react2.default.createElement(_reactRouterDom.Redirect,{to:"/standard"})}}),routes.map(function(route){return _react2.default.createElement(_reactRouterDom.Route,{key:route.path,path:route.path,component:route.component,name:route.name||null,data:route.data||null,render:route.render})}))),container)}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(23),_breadcrumb2=_interopRequireDefault(_breadcrumb),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_reactRouterDom=__webpack_require__(8),NewsletterTypes=function(_React$Component){function NewsletterTypes(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterTypes);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterTypes.__proto__||Object.getPrototypeOf(NewsletterTypes)).call.apply(_ref,[this].concat(args))),_this.setupNewsletter=function(type){void 0!==type&&(_this.props.history.push("/new/"+type),_mailpoet2.default.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}))},_this.getAutomaticEmails=function(){return window.mailpoet_automatic_emails?_underscore2.default.map(window.mailpoet_automatic_emails,function(automaticEmail){var email=automaticEmail,onClick=_underscore2.default.partial(_this.setupNewsletter,automaticEmail.slug);return email.action=function(){return _react2.default.createElement("div",null,_react2.default.createElement("a",{className:"button button-primary",onClick:onClick,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp")))}(),email}):[]},_this.createNewsletter=function(type){_mailpoet2.default.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:type,subject:_mailpoet2.default.I18n.t("draftNewsletterTitle")}}).done(function(response){_this.props.history.push("/template/"+response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterTypes,_React$Component),_createClass(NewsletterTypes,[{key:"render",value:function(){var createStandardNewsletter=_underscore2.default.partial(this.createNewsletter,"standard"),createNotificationNewsletter=_underscore2.default.partial(this.setupNewsletter,"notification"),createWelcomeNewsletter=_underscore2.default.partial(this.setupNewsletter,"welcome"),defaultTypes=[{slug:"standard",title:_mailpoet2.default.I18n.t("regularNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("regularNewsletterTypeDescription"),action:function(){return _react2.default.createElement("a",{className:"button button-primary","data-automation-id":"create_standard",onClick:createStandardNewsletter,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("create"))}()},{slug:"welcome",title:_mailpoet2.default.I18n.t("welcomeNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("welcomeNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/254-video-guide-to-welcome-emails",action:function(){return _react2.default.createElement("a",{className:"button button-primary",onClick:createWelcomeNewsletter,"data-automation-id":"create_welcome",onKeyDown:function(event){["keydown","keypress"].includes(event.type)&&["Enter"," "].includes(event.key)&&(event.preventDefault(),createWelcomeNewsletter())},role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp"))}()},{slug:"notification",title:_mailpoet2.default.I18n.t("postNotificationNewsletterTypeTitle"),description:_mailpoet2.default.I18n.t("postNotificationNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/210-video-guide-to-post-notifications",action:function(){return _react2.default.createElement("a",{className:"button button-primary","data-automation-id":"create_notification",onClick:createNotificationNewsletter,role:"button",tabIndex:0},_mailpoet2.default.I18n.t("setUp"))}()}],types=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_types",[].concat(defaultTypes,_toConsumableArray(this.getAutomaticEmails())),this),badgeClassName=!0===window.mailpoet_is_new_user?"mailpoet_badge mailpoet_badge_video":"mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey";return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("pickCampaignType")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("ul",{className:"mailpoet_boxes clearfix"},types.map(function(type){return _react2.default.createElement("li",{key:type.slug,"data-type":type.slug,className:"mailpoet_newsletter_types"},_react2.default.createElement("div",null,_react2.default.createElement("div",{className:"mailpoet_thumbnail"},type.thumbnailImage?_react2.default.createElement("img",{src:type.thumbnailImage,alt:""}):null),_react2.default.createElement("div",{className:"mailpoet_description"},_react2.default.createElement("h3",null,type.title," ",type.beta?"("+_mailpoet2.default.I18n.t("beta")+")":""),_react2.default.createElement("p",null,type.description),type.videoGuide&&_react2.default.createElement("a",{className:badgeClassName,href:type.videoGuide,target:"_blank"},_react2.default.createElement("span",{className:"dashicons dashicons-format-video"}),_mailpoet2.default.I18n.t("seeVideoGuide"))),_react2.default.createElement("div",{className:"mailpoet_actions"},type.action)))},this)))}}]),NewsletterTypes}(_react2.default.Component);NewsletterTypes.propTypes={history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=(0,_reactRouterDom.withRouter)(NewsletterTypes)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(23),_breadcrumb2=_interopRequireDefault(_breadcrumb),_loading=__webpack_require__(419),_loading2=_interopRequireDefault(_loading),_tabs=__webpack_require__(420),_tabs2=_interopRequireDefault(_tabs),_template_box=__webpack_require__(421),_template_box2=_interopRequireDefault(_template_box),_import_template=__webpack_require__(422),_import_template2=_interopRequireDefault(_import_template),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),getEditorUrl=function(id){return"admin.php?page=mailpoet-newsletter-editor&id="+id},templatesCategories=[{name:"standard",label:_mailpoet2.default.I18n.t("tabStandardTitle")},{name:"welcome",label:_mailpoet2.default.I18n.t("tabWelcomeTitle")},{name:"notification",label:_mailpoet2.default.I18n.t("tabNotificationTitle")}];window.mailpoet_woocommerce_active&&templatesCategories.push({name:"woocommerce",label:_mailpoet2.default.I18n.t("tabWoocommerceTitle")}),templatesCategories.push.apply(templatesCategories,[{name:"all",label:_mailpoet2.default.I18n.t("allTemplates")},{name:"recent",label:_mailpoet2.default.I18n.t("recentlySent")},{name:"saved",label:_mailpoet2.default.I18n.t("savedTemplates")}]);var NewsletterTemplates=function(_React$Component){function NewsletterTemplates(props){_classCallCheck(this,NewsletterTemplates);var _this=_possibleConstructorReturn(this,(NewsletterTemplates.__proto__||Object.getPrototypeOf(NewsletterTemplates)).call(this,props));return _this.state={loading:!0,templates:{},emailType:null,selectedTab:""},_this.templates={},_this.addTemplate=_this.addTemplate.bind(_this),_this.afterTemplateDelete=_this.afterTemplateDelete.bind(_this),_this.afterTemplateSelect=_this.afterTemplateSelect.bind(_this),_this.afterTemplateImport=_this.afterTemplateImport.bind(_this),_this}return _inherits(NewsletterTemplates,_React$Component),_createClass(NewsletterTemplates,[{key:"componentWillMount",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"getAll"}).done(function(response){0===response.data.length&&(response.data=[{name:_mailpoet2.default.I18n.t("mailpoetGuideTemplateTitle"),categories:'["welcome", "notification", "standard", "woocommerce"]',readonly:"1"}]),response.data.forEach(_this2.addTemplate),_this2.sortTemplates()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this2.selectInitialTab()})}},{key:"addTemplate",value:function(template){var _this3=this,categoriesNames=templatesCategories.map(function(category){return category.name}),categories=void 0;try{categories=JSON.parse(template.categories).filter(function(name){return-1!==categoriesNames.indexOf(name)})}catch(err){categories=[]}0===categories.length&&categories.push("saved"),categories.forEach(function(category){void 0===_this3.templates[category]&&(_this3.templates[category]=[]),_this3.templates[category].unshift(template)})}},{key:"sortTemplates",value:function(){var _this4=this;Object.keys(this.templates).forEach(function(category){_this4.templates[category].sort(function(a,b){return parseInt(a.id,10)<parseInt(b.id,10)?1:-1})})}},{key:"selectInitialTab",value:function(){var _this5=this,emailType=void 0,selectedTab="standard";_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:this.props.match.params.id}}).done(function(response){emailType=response.data.type,_underscore2.default.findWhere(templatesCategories,{name:response.data.type})&&(selectedTab=response.data.type)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this5.setState({templates:_this5.templates,emailType:emailType,selectedTab:selectedTab,loading:!1})})}},{key:"afterTemplateDelete",value:function(success,id){var _this6=this;success&&Object.keys(this.templates).forEach(function(category){_this6.templates[category]=_this6.templates[category].filter(function(template){return template.id!==id})}),this.setState({templates:this.templates,loading:!1})}},{key:"afterTemplateSelect",value:function(success,id){success?window.location=getEditorUrl(id):this.setState({loading:!1})}},{key:"afterTemplateImport",value:function(success,template){success&&this.addTemplate(template),this.setState({templates:this.templates,selectedTab:success?"saved":"import",loading:!1})}},{key:"render",value:function(){var _this7=this;if(this.state.loading)return _react2.default.createElement(_loading2.default,null);var tabs=templatesCategories.concat({name:"import",label:_mailpoet2.default.I18n.t("tabImportTitle")}),selectedTab=this.state.selectedTab,content=null;if("import"===selectedTab)content=_react2.default.createElement(_import_template2.default,{beforeImport:function(){return _this7.setState({loading:!0})},afterImport:this.afterTemplateImport});else{var templates=this.state.templates[this.state.selectedTab]||[];templates=0===templates.length?this.state.loading?null:_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("noTemplates")):templates.map(function(template,index){return _react2.default.createElement(_template_box2.default,_extends({key:template.id,index:index,newsletterId:_this7.props.match.params.id,beforeDelete:function(){return _this7.setState({loading:!0})},afterDelete:_this7.afterTemplateDelete,beforeSelect:function(){return _this7.setState({loading:!0})},afterSelect:_this7.afterTemplateSelect},template))}),content=_react2.default.createElement("ul",{className:"mailpoet_boxes clearfix"},templates)}var breadcrumb=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_template_breadcrumb",_react2.default.createElement(_breadcrumb2.default,{step:"template"}),this.state.emailType,"template");return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("selectTemplateTitle")),breadcrumb,_react2.default.createElement(_tabs2.default,{tabs:tabs,selected:this.state.selectedTab,select:function(name){return _this7.setState({selectedTab:name})}}),content)}}]),NewsletterTemplates}(_react2.default.Component);NewsletterTemplates.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired},exports.default=NewsletterTemplates},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),Loading=function(_React$Component){function Loading(){return _classCallCheck(this,Loading),_possibleConstructorReturn(this,(Loading.__proto__||Object.getPrototypeOf(Loading)).apply(this,arguments))}return _inherits(Loading,_React$Component),_createClass(Loading,[{key:"componentWillMount",value:function(){_mailpoet2.default.Modal.loading(!0)}},{key:"componentWillUnmount",value:function(){_mailpoet2.default.Modal.loading(!1)}},{key:"render",value:function(){return null}}]),Loading}(_react2.default.Component);exports.default=Loading},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_reactTooltip=__webpack_require__(162),_reactTooltip2=_interopRequireDefault(_reactTooltip),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(26),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),tooltipText=(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("tooltipTemplateTabs"),/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{href:"https://mailpoet.polldaddy.com/s/select-template-feedback",key:"feedback",target:"_blank",rel:"noopener noreferrer"},match)}),Tabs=function(_ref){var tabs=_ref.tabs,selected=_ref.selected,select=_ref.select;return _react2.default.createElement("div",{className:"wp-filter hide-if-no-js"},_react2.default.createElement("ul",{className:"filter-links"},tabs.map(function(_ref2){var name=_ref2.name,label=_ref2.label;return _react2.default.createElement("li",{key:name},_react2.default.createElement("a",{href:"javascript:",className:selected===name?"current":"",onClick:function(){return select(name)}}," ",label))})),_react2.default.createElement("span",{className:"feedback-tooltip newsletter-templates-feedback","data-event":"click","data-tip":!0,"data-for":"feedback-newsletter-templates-tabs"},_mailpoet2.default.I18n.t("feedback")),_react2.default.createElement(_reactTooltip2.default,{globalEventOff:"click",multiline:!0,id:"feedback-newsletter-templates-tabs",efect:"solid",place:"bottom"},_react2.default.createElement("span",{style:{pointerEvents:"all",display:"inline-block"}},tooltipText)))};Tabs.propTypes={selected:_propTypes2.default.string.isRequired,select:_propTypes2.default.func.isRequired,tabs:_propTypes2.default.arrayOf(_propTypes2.default.shape({label:_propTypes2.default.string.isRequired,name:_propTypes2.default.string.isRequired}).isRequired).isRequired},exports.default=Tabs},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_reactConfirmAlert=__webpack_require__(301),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),TemplateBox=function(_React$Component){function TemplateBox(props){_classCallCheck(this,TemplateBox);var _this=_possibleConstructorReturn(this,(TemplateBox.__proto__||Object.getPrototypeOf(TemplateBox)).call(this,props));return _this.onPreview=_this.onPreview.bind(_this),_this.onDelete=_this.onDelete.bind(_this),_this.onSelect=_this.onSelect.bind(_this),_this}return _inherits(TemplateBox,_React$Component),_createClass(TemplateBox,[{key:"onDelete",value:function(){var _props=this.props,id=_props.id,name=_props.name,beforeDelete=_props.beforeDelete,afterDelete=_props.afterDelete,onConfirm=function(){beforeDelete(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"delete",data:{id:id}}).done(function(){afterDelete(!0,id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterDelete(!1)})};(0,_reactConfirmAlert.confirmAlert)({title:_mailpoet2.default.I18n.t("confirmTitle"),message:_mailpoet2.default.I18n.t("confirmTemplateDeletion").replace("%$1s",name),confirmLabel:_mailpoet2.default.I18n.t("confirmLabel"),cancelLabel:_mailpoet2.default.I18n.t("cancelLabel"),onConfirm:onConfirm,onCancel:function(){}})}},{key:"onPreview",value:function(){_mailpoet2.default.Modal.popup({title:this.props.name,template:'<div class="mailpoet_boxes_preview" style="background-color: {{ body.globalStyles.body.backgroundColor }}"><img src="{{ thumbnail }}" /></div>',data:this.props})}},{key:"onSelect",value:function(){var _props2=this.props,newsletterId=_props2.newsletterId,name=_props2.name,beforeSelect=_props2.beforeSelect,afterSelect=_props2.afterSelect;beforeSelect(),_mailpoet2.default.trackEvent("Emails > Template selected",{"MailPoet Free version":window.mailpoet_version,"Email name":name}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:{id:newsletterId,template_id:this.props.id}}).done(function(response){afterSelect(!0,response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterSelect(!1)})}},{key:"render",value:function(){var _props3=this.props,index=_props3.index,name=_props3.name,thumbnail=_props3.thumbnail,readonly=_props3.readonly,deleteLink=_react2.default.createElement("div",{className:"mailpoet_delete button button-secondary"},_react2.default.createElement("a",{href:"javascript:;",onClick:this.onDelete},_mailpoet2.default.I18n.t("delete"))),preview="";return"string"==typeof thumbnail&&thumbnail.length>0&&(preview=_react2.default.createElement("a",{href:"javascript:;",onClick:this.onPreview},_react2.default.createElement("img",{src:thumbnail,alt:_mailpoet2.default.I18n.t("templatePreview")}),_react2.default.createElement("div",{className:"mailpoet_overlay"},_react2.default.createElement("p",{className:"mailpoet_more_details"},_mailpoet2.default.I18n.t("zoom"))))),_react2.default.createElement("li",{className:"mailpoet_template_boxes","data-automation-id":"select_template_box"},_react2.default.createElement("div",{className:"mailpoet_thumbnail"},preview),_react2.default.createElement("div",{className:"mailpoet_description"},_react2.default.createElement("h3",null,name)),_react2.default.createElement("div",{className:"mailpoet_actions"},"1"!==readonly&&deleteLink,_react2.default.createElement("a",{className:"button button-primary","data-automation-id":"select_template_"+index,onClick:this.onSelect,role:"button",tabIndex:0}," ",_mailpoet2.default.I18n.t("select")," ")))}}]),TemplateBox}(_react2.default.Component);TemplateBox.propTypes={index:_propTypes2.default.number.isRequired,id:_propTypes2.default.string.isRequired,newsletterId:_propTypes2.default.string.isRequired,name:_propTypes2.default.string.isRequired,thumbnail:_propTypes2.default.string.isRequired,readonly:_propTypes2.default.string.isRequired,beforeDelete:_propTypes2.default.func.isRequired,afterDelete:_propTypes2.default.func.isRequired,beforeSelect:_propTypes2.default.func.isRequired,afterSelect:_propTypes2.default.func.isRequired},exports.default=TemplateBox},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_helpTooltip=__webpack_require__(161),_helpTooltip2=_interopRequireDefault(_helpTooltip),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),ImportTemplate=function(_React$Component){function ImportTemplate(props){_classCallCheck(this,ImportTemplate);var _this=_possibleConstructorReturn(this,(ImportTemplate.__proto__||Object.getPrototypeOf(ImportTemplate)).call(this,props));return _this.fileRef=_react2.default.createRef(),_this.handleSubmit=_this.handleSubmit.bind(_this),_this}return _inherits(ImportTemplate,_React$Component),_createClass(ImportTemplate,[{key:"saveTemplate",value:function(_saveTemplate){var template=_saveTemplate,_props=this.props,beforeImport=_props.beforeImport,afterImport=_props.afterImport;_underscore2.default.isUndefined(template.body)||(template.body=JSON.stringify(template.body));try{template.categories=JSON.parse(template.categories)}catch(err){template.categories=[]}-1===template.categories.indexOf("saved")&&template.categories.push("saved"),-1===template.categories.indexOf("standard")&&-1===template.categories.indexOf("welcome")&&-1===template.categories.indexOf("notification")&&template.categories.push("standard"),template.categories=JSON.stringify(template.categories),beforeImport(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:template}).done(function(response){afterImport(!0,response.data)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterImport(!1)})}},{key:"handleSubmit",value:function(e){var _this2=this;if(e.preventDefault(),_underscore2.default.size(this.fileRef.current.files)<=0)return!1;var file=_underscore2.default.first(this.fileRef.current.files),reader=new FileReader;return reader.onload=function(evt){try{_this2.saveTemplate(JSON.parse(evt.target.result)),_mailpoet2.default.trackEvent("Emails > Template imported",{"MailPoet Free version":window.mailpoet_version})}catch(err){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("templateFileMalformedError"))}},reader.readAsText(file),!0}},{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("importTemplateTitle"),_react2.default.createElement(_helpTooltip2.default,{tooltip:_mailpoet2.default.I18n.t("helpTooltipTemplateUpload"),place:"right",className:"tooltip-help-import-template"})),_react2.default.createElement("form",{onSubmit:this.handleSubmit},_react2.default.createElement("input",{type:"file",placeholder:_mailpoet2.default.I18n.t("selectJsonFileToUpload"),ref:this.fileRef}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"submit",value:_mailpoet2.default.I18n.t("upload")}))))}}]),ImportTemplate}(_react2.default.Component);ImportTemplate.propTypes={beforeImport:_propTypes2.default.func.isRequired,afterImport:_propTypes2.default.func.isRequired},exports.default=ImportTemplate},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(35),_createReactClass2=_interopRequireDefault(_createReactClass),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_breadcrumb=__webpack_require__(23),_breadcrumb2=_interopRequireDefault(_breadcrumb),_form=__webpack_require__(189),_form2=_interopRequireDefault(_form),_standard=__webpack_require__(424),_standard2=_interopRequireDefault(_standard),_notification=__webpack_require__(428),_notification2=_interopRequireDefault(_notification),_welcome=__webpack_require__(429),_welcome2=_interopRequireDefault(_welcome),_helpTooltip=__webpack_require__(161),_helpTooltip2=_interopRequireDefault(_helpTooltip),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),_thumbnail=__webpack_require__(277),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_reactRouterDom=__webpack_require__(8),NewsletterSend=(0,_createReactClass2.default)({displayName:"NewsletterSend",propTypes:{match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired,history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},getInitialState:function(){return{fields:[],item:{},loading:!0}},componentDidMount:function(){this.loadItem(this.props.match.params.id),(0,_jquery2.default)("#mailpoet_newsletter").parsley()},componentWillReceiveProps:function(props){this.loadItem(props.match.params.id)},getFieldsByNewsletter:function(newsletter){return this.getSubtype(newsletter).getFields(newsletter)},getSendButtonOptions:function(){return this.getSubtype(this.state.item).getSendButtonOptions(this.state.item)},getSubtype:function(newsletter){switch(newsletter.type){case"notification":return _notification2.default;case"welcome":return _welcome2.default;default:return _wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_newsletter_fields",_standard2.default,newsletter)}},isValid:function(){return(0,_jquery2.default)("#mailpoet_newsletter").parsley().isValid()},loadItem:function(id){var _this=this;this.setState({loading:!0}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){_this.setState({loading:!1,item:response.data,fields:_this.getFieldsByNewsletter(response.data)})}).fail(function(){_this.setState({loading:!1,item:{}},function(){_this.props.history.push("/new")})})},saveTemplate:function(response,done){var _this2=this;(0,_thumbnail.fromUrl)(response.meta.preview_url).then(function(thumbnail){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:{newsletter_id:response.data.id,name:response.data.subject,thumbnail:thumbnail,body:JSON.stringify(response.data.body),categories:'["recent"]'}}).then(done).fail(function(err){_this2.showError(err),_this2.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1),done()})}).catch(function(err){_this2.showError({errors:[err]})})},handleSend:function(e){var _this3=this;return e.preventDefault(),this.isValid()?(_mailpoet2.default.Modal.loading(!0),this.saveNewsletter(e).done(function(){_this3.setState({loading:!0})}).done(function(response){switch(response.data.type){case"notification":case"welcome":return _this3.activateNewsletter(response);default:return _this3.sendNewsletter(response)}}).fail(function(err){_this3.showError(err),_this3.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})):(0,_jquery2.default)("#mailpoet_newsletter").parsley().validate()},sendNewsletter:function(newsletter){var _this4=this;return _mailpoet2.default.Ajax.post(_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_parameters",{api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"add",data:{newsletter_id:this.state.item.id}},this.state.item)).done(function(response){_this4.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return _mailpoet2.default.Modal.loading(!1),void _this4.props.history.push("/send/congratulate/"+_this4.state.item.id);_this4.props.history.push(_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_response_redirect","/"+(_this4.state.item.type||""),_this4.state.item));var customResponse=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_server_request_response",_this4.state.item,response);_underscore2.default.isFunction(customResponse)?customResponse():"scheduled"===response.data.status?(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterHasBeenScheduled")),_mailpoet2.default.trackEvent("Emails > Newsletter sent",{scheduled:!0,"MailPoet Free version":window.mailpoet_version})):(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterBeingSent")),_mailpoet2.default.trackEvent("Emails > Newsletter sent",{scheduled:!1,"MailPoet Free version":window.mailpoet_version})),_mailpoet2.default.Modal.loading(!1)})}).fail(function(err){_this4.showError(err),_this4.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})},activateNewsletter:function(newsletter){var _this5=this;return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:this.props.match.params.id,status:"active"}}).done(function(response){_this5.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return _mailpoet2.default.Modal.loading(!1),void _this5.props.history.push("/send/congratulate/"+_this5.state.item.id);_this5.props.history.push("/"+(_this5.state.item.type||""));var opts=_this5.state.item.options;"welcome"===response.data.type?(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("welcomeEmailActivated")),_mailpoet2.default.trackEvent("Emails > Welcome email activated",{"MailPoet Free version":window.mailpoet_version,"List type":opts.event,Delay:opts.afterTimeNumber+" "+opts.afterTimeType})):"notification"===response.data.type&&(_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("postNotificationActivated")),_mailpoet2.default.trackEvent("Emails > Post notifications activated",{"MailPoet Free version":window.mailpoet_version,Frequency:opts.intervalType})),_mailpoet2.default.Modal.loading(!1)})}).fail(function(err){_this5.showError(err),_this5.setState({loading:!1}),_mailpoet2.default.Modal.loading(!1)})},handleResume:function(e){var _this6=this;return e.preventDefault(),this.isValid()?this.saveNewsletter(e).done(function(){_this6.setState({loading:!0})}).done(function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:_this6.state.item.id}}).done(function(){_this6.props.history.push("/"+(_this6.state.item.type||"")),_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterSendingHasBeenResumed"))}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}).fail(function(err){_this6.showError(err)}).always(function(){_this6.setState({loading:!1})}):(0,_jquery2.default)("#mailpoet_newsletter").parsley().validate(),!1},handleSave:function(e){var _this7=this;e.preventDefault(),this.saveNewsletter(e).done(function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterUpdated"))}).done(function(){_this7.props.history.push("/"+(_this7.state.item.type||""))}).fail(function(err){_this7.showError(err)})},handleRedirectToDesign:function(e){var _this8=this;e.preventDefault();var redirectTo=e.target.href;this.saveNewsletter(e).done(function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterUpdated"))}).done(function(){window.location=redirectTo}).fail(function(err){_this8.showError(err)})},saveNewsletter:function(){var data=this.state.item;data.queue=void 0,this.setState({loading:!0});var IGNORED_NEWSLETTER_PROPERTIES=["preheader","body","created_at","deleted_at","hash","status","updated_at","type"],newsletterData=_underscore2.default.omit(data,IGNORED_NEWSLETTER_PROPERTIES);return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:newsletterData})},showError:function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})},handleFormChange:function(e){var item=this.state.item;return item[e.target.name]=e.target.value,this.setState({item:item}),!0},render:function(){var isPaused="sending"===this.state.item.status&&this.state.item.queue&&"paused"===this.state.item.queue.status,fields=this.state.fields.map(function(field){var newField=field;return"segments"!==field.name&&"options"!==field.name||(newField.disabled=isPaused),newField}),sendButtonOptions=this.getSendButtonOptions(),breadcrumb=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_send_breadcrumb",_react2.default.createElement(_breadcrumb2.default,{step:"send"}),this.state.item.type,"send");return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("finalNewsletterStep")),breadcrumb,_react2.default.createElement(_form2.default,{id:"mailpoet_newsletter",fields:fields,automationId:"newsletter_send_form",item:this.state.item,loading:this.state.loading,onChange:this.handleFormChange,onSubmit:this.handleSave},_react2.default.createElement("p",{className:"submit"},isPaused?_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleResume,value:_mailpoet2.default.I18n.t("resume")}):_react2.default.createElement("input",_extends({className:"button button-primary",type:"button",onClick:this.handleSend,value:_mailpoet2.default.I18n.t("send")},sendButtonOptions))," ",_react2.default.createElement("input",{className:"button button-secondary",type:"submit",value:_mailpoet2.default.I18n.t("saveDraftAndClose")})," ",_mailpoet2.default.I18n.t("orSimply")," ",_react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+this.props.match.params.id,onClick:this.handleRedirectToDesign},_mailpoet2.default.I18n.t("goBackToDesign")),"."),!isPaused&&sendButtonOptions.disabled&&"disabled"===sendButtonOptions.disabled&&_react2.default.createElement(_helpTooltip2.default,{tooltip:_mailpoet2.default.I18n.t("helpTooltipSendEmail"),tooltipId:"helpTooltipSendEmail"})))}});module.exports=(0,_reactRouterDom.withRouter)(NewsletterSend)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_date_time=__webpack_require__(425),_date_time2=_interopRequireDefault(_date_time),currentTime=window.mailpoet_current_time||"00:00",defaultDateTime=window.mailpoet_current_date+" 00:00:00",timeOfDayItems=window.mailpoet_schedule_time_of_day,dateDisplayFormat=window.mailpoet_date_display_format,dateStorageFormat=window.mailpoet_date_storage_format,StandardScheduling=function(_React$Component){function StandardScheduling(){var _ref,_temp,_this,_ret;_classCallCheck(this,StandardScheduling);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=StandardScheduling.__proto__||Object.getPrototypeOf(StandardScheduling)).call.apply(_ref,[this].concat(args))),_this.getCurrentValue=function(){var schedulingOptions={isScheduled:"0",scheduledAt:defaultDateTime};return _underscore2.default.defaults(_this.props.item[_this.props.field.name]||{},schedulingOptions)},_this.getDateValidation=function(){return{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noScheduledDateError"),"data-parsley-errors-container":"#mailpoet_scheduling"}},_this.isScheduled=function(){return"1"===_this.getCurrentValue().isScheduled},_this.handleCheckboxChange=function(event){var changeEvent=event;return changeEvent.target.value=event.target.checked?"1":"0",_this.handleValueChange(changeEvent)},_this.handleValueChange=function(event){var oldValue=_this.getCurrentValue(),newValue={};return newValue[event.target.name]=event.target.value,_this.props.onValueChange({target:{name:_this.props.field.name,value:_underscore2.default.extend({},oldValue,newValue)}})},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(StandardScheduling,_React$Component),_createClass(StandardScheduling,[{key:"render",value:function(){var schedulingOptions=void 0;return this.isScheduled()&&(schedulingOptions=_react2.default.createElement("span",{id:"mailpoet_scheduling"},_react2.default.createElement(_date_time2.default,{name:"scheduledAt",value:this.getCurrentValue().scheduledAt,onChange:this.handleValueChange,disabled:this.props.field.disabled,dateValidation:this.getDateValidation(),defaultDateTime:defaultDateTime,timeOfDayItems:timeOfDayItems,dateDisplayFormat:dateDisplayFormat,dateStorageFormat:dateStorageFormat})," ",_react2.default.createElement("span",null,_mailpoet2.default.I18n.t("websiteTimeIs")," ",_react2.default.createElement("code",null,currentTime)))),_react2.default.createElement("div",null,_react2.default.createElement("input",{type:"checkbox",value:"1",checked:this.isScheduled(),disabled:this.props.field.disabled,name:"isScheduled",onChange:this.handleCheckboxChange}),schedulingOptions)}}]),StandardScheduling}(_react2.default.Component);StandardScheduling.propTypes={item:_propTypes2.default.object,field:_propTypes2.default.shape({name:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool}).isRequired,onValueChange:_propTypes2.default.func.isRequired},StandardScheduling.defaultProps={item:{}};var fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"segments",label:_mailpoet2.default.I18n.t("segments"),tip:_mailpoet2.default.I18n.t("segmentsTip"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return segment.name+" ("+parseInt(segment.subscribers,10).toLocaleString()+")"},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return _underscore2.default.map(segmentIds,function(id){return _underscore2.default.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]},{name:"options",label:_mailpoet2.default.I18n.t("scheduleIt"),type:"reactComponent",component:StandardScheduling}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(newsletter){var newsletterOptions=newsletter||{},isScheduled="object"===_typeof(newsletterOptions.options)&&"1"===newsletterOptions.options.isScheduled,options={value:isScheduled?_mailpoet2.default.I18n.t("schedule"):_mailpoet2.default.I18n.t("send")};return"sent"!==newsletterOptions.status&&"sending"!==newsletterOptions.status||(options.disabled="disabled"),options}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_date_text=__webpack_require__(426),_date_text2=_interopRequireDefault(_date_text),_time_select=__webpack_require__(427),_time_select2=_interopRequireDefault(_time_select),DateTime=function(_React$Component){function DateTime(props){_classCallCheck(this,DateTime);var _this=_possibleConstructorReturn(this,(DateTime.__proto__||Object.getPrototypeOf(DateTime)).call(this,props));return _initialiseProps.call(_this),_this.state=_this.buildStateFromProps(props),_this}return _inherits(DateTime,_React$Component),_createClass(DateTime,[{key:"componentWillReceiveProps",value:function(nextProps){this.setState(this.buildStateFromProps(nextProps))}},{key:"render",value:function(){return _react2.default.createElement("span",null,_react2.default.createElement(_date_text2.default,{name:"date",value:this.state.date,onChange:this.handleChange,displayFormat:this.props.dateDisplayFormat,storageFormat:this.props.dateStorageFormat,disabled:this.props.disabled,validation:this.props.dateValidation}),_react2.default.createElement(_time_select2.default,{name:"time",value:this.state.time,onChange:this.handleChange,disabled:this.props.disabled,validation:this.props.timeValidation,timeOfDayItems:this.props.timeOfDayItems}))}}]),DateTime}(_react2.default.Component),_initialiseProps=function(){var _this2=this;this.getDateTime=function(){return[_this2.state.date,_this2.state.time].join(_this2.DATE_TIME_SEPARATOR)},this.DATE_TIME_SEPARATOR=" ",this.buildStateFromProps=function(props){var value=props.value||_this2.props.defaultDateTime,_value$split=value.split(_this2.DATE_TIME_SEPARATOR),_value$split2=_slicedToArray(_value$split,2);return{date:_value$split2[0],time:_value$split2[1]}},this.handleChange=function(event){var newState={};newState[event.target.name]=event.target.value,_this2.setState(newState,_this2.propagateChange)},this.propagateChange=function(){_this2.props.onChange&&_this2.props.onChange({target:{name:_this2.props.name||"",value:_this2.getDateTime()}})}};DateTime.propTypes={defaultDateTime:_propTypes2.default.string.isRequired,dateDisplayFormat:_propTypes2.default.string.isRequired,dateStorageFormat:_propTypes2.default.string.isRequired,onChange:_propTypes2.default.func,name:_propTypes2.default.string,disabled:_propTypes2.default.bool,dateValidation:_propTypes2.default.object.isRequired,timeValidation:_propTypes2.default.any,timeOfDayItems:_propTypes2.default.objectOf(_propTypes2.default.string).isRequired},DateTime.defaultProps={onChange:void 0,name:"",disabled:!1,timeValidation:void 0},module.exports=DateTime},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),datepickerTranslations={closeText:_mailpoet2.default.I18n.t("close"),currentText:_mailpoet2.default.I18n.t("today"),nextText:_mailpoet2.default.I18n.t("next"),prevText:_mailpoet2.default.I18n.t("previous"),monthNames:[_mailpoet2.default.I18n.t("january"),_mailpoet2.default.I18n.t("february"),_mailpoet2.default.I18n.t("march"),_mailpoet2.default.I18n.t("april"),_mailpoet2.default.I18n.t("may"),_mailpoet2.default.I18n.t("june"),_mailpoet2.default.I18n.t("july"),_mailpoet2.default.I18n.t("august"),_mailpoet2.default.I18n.t("september"),_mailpoet2.default.I18n.t("october"),_mailpoet2.default.I18n.t("november"),_mailpoet2.default.I18n.t("december")],monthNamesShort:[_mailpoet2.default.I18n.t("januaryShort"),_mailpoet2.default.I18n.t("februaryShort"),_mailpoet2.default.I18n.t("marchShort"),_mailpoet2.default.I18n.t("aprilShort"),_mailpoet2.default.I18n.t("mayShort"),_mailpoet2.default.I18n.t("juneShort"),_mailpoet2.default.I18n.t("julyShort"),_mailpoet2.default.I18n.t("augustShort"),_mailpoet2.default.I18n.t("septemberShort"),_mailpoet2.default.I18n.t("octoberShort"),_mailpoet2.default.I18n.t("novemberShort"),_mailpoet2.default.I18n.t("decemberShort")],dayNames:[_mailpoet2.default.I18n.t("sunday"),_mailpoet2.default.I18n.t("monday"),_mailpoet2.default.I18n.t("tuesday"),_mailpoet2.default.I18n.t("wednesday"),_mailpoet2.default.I18n.t("thursday"),_mailpoet2.default.I18n.t("friday"),_mailpoet2.default.I18n.t("saturday")],dayNamesShort:[_mailpoet2.default.I18n.t("sundayShort"),_mailpoet2.default.I18n.t("mondayShort"),_mailpoet2.default.I18n.t("tuesdayShort"),_mailpoet2.default.I18n.t("wednesdayShort"),_mailpoet2.default.I18n.t("thursdayShort"),_mailpoet2.default.I18n.t("fridayShort"),_mailpoet2.default.I18n.t("saturdayShort")],dayNamesMin:[_mailpoet2.default.I18n.t("sundayMin"),_mailpoet2.default.I18n.t("mondayMin"),_mailpoet2.default.I18n.t("tuesdayMin"),_mailpoet2.default.I18n.t("wednesdayMin"),_mailpoet2.default.I18n.t("thursdayMin"),_mailpoet2.default.I18n.t("fridayMin"),_mailpoet2.default.I18n.t("saturdayMin")]},DateText=function(_React$Component){function DateText(props){_classCallCheck(this,DateText);var _this=_possibleConstructorReturn(this,(DateText.__proto__||Object.getPrototypeOf(DateText)).call(this,props));return _this.onChange=function(event){var changeEvent=event,displayDate=changeEvent.target.value,storageDate=_this.getStorageDate(displayDate);changeEvent.target.value=storageDate,_this.props.onChange(changeEvent)},_this.getFieldName=function(){return _this.props.name||"date"},_this.getDisplayDate=function(date){var formatting={parseFormat:_this.props.storageFormat,format:_this.props.displayFormat};return _mailpoet2.default.Date.format(date,formatting)},_this.getStorageDate=function(date){var formatting={parseFormat:_this.props.displayFormat,format:_this.props.storageFormat};return _mailpoet2.default.Date.format(date,formatting)},_this.dateInput=_react2.default.createRef(),_this}return _inherits(DateText,_React$Component),_createClass(DateText,[{key:"componentDidMount",value:function(){var $element=(0,_jquery2.default)(this.dateInput.current),that=this;$element.datepicker&&(_jquery2.default.datepicker.parseDate=function(format,value){return _mailpoet2.default.Date.toDate(value,{parseFormat:this.props.displayFormat,format:format})},_jquery2.default.datepicker.formatDate=function(format,value){return _mailpoet2.default.Date.format(value,{format:format})},$element.datepicker(_underscore2.default.extend({dateFormat:this.props.displayFormat,isRTL:!1,onSelect:function(value){that.onChange({target:{name:that.getFieldName(),value:value}})}},datepickerTranslations)),this.datepickerInitialized=!0)}},{key:"componentWillUnmount",value:function(){this.datepickerInitialized&&(0,_jquery2.default)(this.dateInput.current).datepicker("destroy")}},{key:"render",value:function(){return _react2.default.createElement("input",_extends({type:"text",size:"30",name:this.getFieldName(),value:this.getDisplayDate(this.props.value),readOnly:!0,disabled:this.props.disabled,onChange:this.onChange,ref:this.dateInput},this.props.validation))}}]),DateText}(_react2.default.Component);DateText.propTypes={displayFormat:_propTypes2.default.string.isRequired,onChange:_propTypes2.default.func.isRequired,name:_propTypes2.default.string,storageFormat:_propTypes2.default.string.isRequired,value:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool.isRequired,validation:_propTypes2.default.object.isRequired},DateText.defaultProps={name:"date"},module.exports=DateText},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),TimeSelect=function(_React$Component){function TimeSelect(){return _classCallCheck(this,TimeSelect),_possibleConstructorReturn(this,(TimeSelect.__proto__||Object.getPrototypeOf(TimeSelect)).apply(this,arguments))}return _inherits(TimeSelect,_React$Component),_createClass(TimeSelect,[{key:"render",value:function(){var _this2=this,options=Object.keys(this.props.timeOfDayItems).map(function(value){return _react2.default.createElement("option",{key:"option-"+_this2.props.timeOfDayItems[value],value:value},_this2.props.timeOfDayItems[value])});return _react2.default.createElement("select",_extends({name:this.props.name||"time",value:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange},this.props.validation),options)}}]),TimeSelect}(_react2.default.Component);TimeSelect.propTypes={timeOfDayItems:_propTypes2.default.objectOf(_propTypes2.default.string).isRequired,name:_propTypes2.default.string,value:_propTypes2.default.string.isRequired,disabled:_propTypes2.default.bool,onChange:_propTypes2.default.func.isRequired,validation:_propTypes2.default.object},TimeSelect.defaultProps={name:"time",disabled:!1,validation:{}},module.exports=TimeSelect},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_scheduling=__webpack_require__(302),_scheduling2=_interopRequireDefault(_scheduling),fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("postNotificationSubjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"options",label:_mailpoet2.default.I18n.t("selectFrequency"),type:"reactComponent",component:_scheduling2.default},{name:"segments",label:_mailpoet2.default.I18n.t("segments"),tip:_mailpoet2.default.I18n.t("segmentsTip"),type:"selection",placeholder:_mailpoet2.default.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return segment.name+" ("+parseInt(segment.subscribers,10).toLocaleString()+")"},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return _underscore2.default.map(segmentIds,function(id){return _underscore2.default.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(){return{value:_mailpoet2.default.I18n.t("activate")}}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_scheduling=__webpack_require__(275),_scheduling2=_interopRequireDefault(_scheduling),fields=[{name:"subject",label:_mailpoet2.default.I18n.t("subjectLine"),tip:_mailpoet2.default.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":_mailpoet2.default.I18n.t("emptySubjectLineError")}},{name:"options",label:_mailpoet2.default.I18n.t("sendWelcomeEmailWhen"),type:"reactComponent",component:_scheduling2.default},{name:"sender",label:_mailpoet2.default.I18n.t("sender"),tip:_mailpoet2.default.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:_mailpoet2.default.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:_mailpoet2.default.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:_mailpoet2.default.I18n.t("replyTo"),tip:_mailpoet2.default.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:_mailpoet2.default.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),module.exports={getFields:function(){return fields},getSendButtonOptions:function(){return{value:_mailpoet2.default.I18n.t("activate")}}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function successPageClosed(){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_congratulate_after_first_newsletter:!1}}).always(function(){window.location=window.mailpoet_main_page})}function renderSuccess(newsletter,testingPassed){return testingPassed&&_mailpoet2.default.trackEvent("Cron testing done",{"Cron is working":"true"}),_react2.default.createElement(_success2.default,{illustrationImageUrl:window.mailpoet_congratulations_success_image,successClicked:successPageClosed,newsletter:newsletter})}function renderFail(){return _mailpoet2.default.trackEvent("Cron testing done",{"Cron is working":"false"}),_react2.default.createElement(_fail2.default,{failClicked:function(){window.location=window.mailpoet_main_page}})}function renderLoading(showRichLoadingScreen){return _react2.default.createElement(_loading2.default,{illustrationImageUrl:window.mailpoet_congratulations_loading_image,successClicked:successPageClosed,showRichLoadingScreen:showRichLoadingScreen})}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_moment=__webpack_require__(0),_moment2=_interopRequireDefault(_moment),_success=__webpack_require__(431),_success2=_interopRequireDefault(_success),_fail=__webpack_require__(432),_fail2=_interopRequireDefault(_fail),_loading=__webpack_require__(433),_loading2=_interopRequireDefault(_loading),Congratulate=function(_React$Component){function Congratulate(props){_classCallCheck(this,Congratulate);var _this=_possibleConstructorReturn(this,(Congratulate.__proto__||Object.getPrototypeOf(Congratulate)).call(this,props));return _this.state={loading:!0,fail:!1,newsletter:null,testingPassed:!1,timeStart:(0,_moment2.default)(),minimumLoadingTimePassed:!1},_this.tick=_this.tick.bind(_this),_this}return _inherits(Congratulate,_React$Component),_createClass(Congratulate,[{key:"componentDidMount",value:function(){this.loadNewsletter(this.props.match.params.id),this.tick()}},{key:"componentWillReceiveProps",value:function(props){this.loadNewsletter(props.match.params.id)}},{key:"tick",value:function(){(0,_moment2.default)().subtract(20,"second").isAfter(this.state.timeStart)&&this.setState({error:!0,loading:!1}),this.state.loading&&this.loadNewsletter(this.props.match.params.id),(0,_moment2.default)().subtract(6,"seconds").isAfter(this.state.timeStart)&&this.setState({minimumLoadingTimePassed:!0}),!this.state.loading&&this.state.minimumLoadingTimePassed||setTimeout(this.tick,2e3)}},{key:"loadNewsletter",value:function(id){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){return _this2.newsletterLoaded(response.data)})}},{key:"newsletterLoaded",value:function(newsletter){"standard"!==newsletter.type||"scheduled"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,minimumLoadingTimePassed:!0}):"sent"===newsletter.status||"sending"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,testingPassed:!0}):this.setState({newsletter:newsletter})}},{key:"renderContent",value:function(){return this.state.loading||!this.state.minimumLoadingTimePassed?renderLoading(!!this.state.newsletter):this.state.error?renderFail():renderSuccess(this.state.newsletter,this.state.testingPassed)}},{key:"render",value:function(){return _react2.default.createElement("div",{className:"newsletter_congratulate_page"},this.renderContent())}}]),Congratulate}(_react2.default.Component);Congratulate.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired},module.exports=Congratulate},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderHeader(newsletter){return"welcome"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsWelcomeEmailSuccessHeader"):"notification"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsPostNotificationSuccessHeader"):"automatic"===newsletter.type?_mailpoet2.default.I18n.t("congratulationsWooSuccessHeader"):"scheduled"===newsletter.status?_mailpoet2.default.I18n.t("congratulationsScheduleSuccessHeader"):_mailpoet2.default.I18n.t("congratulationsSendSuccessHeader")}function Success(props){return _react2.default.createElement("div",{className:"mailpoet_congratulate_success"},_react2.default.createElement("h1",null,renderHeader(props.newsletter)),_react2.default.createElement("img",{src:props.illustrationImageUrl,alt:"",width:"750",height:"250"}),_react2.default.createElement("button",{className:"button",onClick:props.successClicked},_mailpoet2.default.I18n.t("close")))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet);Success.propTypes={successClicked:_propTypes2.default.func.isRequired,illustrationImageUrl:_propTypes2.default.string.isRequired,newsletter:_propTypes2.default.shape({status:_propTypes2.default.string.isRequired,type:_propTypes2.default.string.isRequired}).isRequired},module.exports=Success},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Fail(props){return _react2.default.createElement("div",{className:"mailpoet_centered"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("congratulationsSendFailHeader")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("congratulationsSendFailExplain"),/\[link\](.*?)\[\/link\]/g,function(match,i){return _react2.default.createElement("a",{key:i,target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/231-sending-does-not-work"},match)})),_react2.default.createElement("button",{className:"button",onClick:props.failClicked},_mailpoet2.default.I18n.t("close")))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_reactStringReplace=__webpack_require__(26),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet);Fail.propTypes={failClicked:_propTypes2.default.func.isRequired},module.exports=Fail},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderRichData(showRichData,illustrationImageUrl){return showRichData?_react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"mailpoet_newsletter_loading_header"},_mailpoet2.default.I18n.t("congratulationsLoadingHeader")),_react2.default.createElement("img",{src:illustrationImageUrl,alt:"",width:"800px",height:"266px"})):_react2.default.createElement("div",null)}function Loading(props){return _react2.default.createElement("div",{className:"mailpoet_newsletter_loading"},_react2.default.createElement(_loading2.default,null),renderRichData(props.showRichLoadingScreen,props.illustrationImageUrl))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_loading=__webpack_require__(434),_loading2=_interopRequireDefault(_loading);Loading.propTypes={illustrationImageUrl:_propTypes2.default.string.isRequired,showRichLoadingScreen:_propTypes2.default.bool.isRequired},module.exports=Loading},function(module,exports,__webpack_require__){"use strict";function Loading(){return _react2.default.createElement("div",{className:"mailpoet_loading"},_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_1"}),_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_2"}),_react2.default.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_3"}))}var _react=__webpack_require__(1),_react2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_react);module.exports=Loading},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(23),_breadcrumb2=_interopRequireDefault(_breadcrumb),_reactRouterDom=__webpack_require__(8),NewsletterStandard=function(_React$Component){function NewsletterStandard(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterStandard);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterStandard.__proto__||Object.getPrototypeOf(NewsletterStandard)).call.apply(_ref,[this].concat(args))),_this.showTemplateSelection=function(newsletterId){_this.props.history.push("/template/"+newsletterId)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterStandard,_React$Component),_createClass(NewsletterStandard,[{key:"componentDidMount",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:"standard"}}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("regularNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}))}}]),NewsletterStandard}(_react2.default.Component);NewsletterStandard.propTypes={history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=(0,_reactRouterDom.withRouter)(NewsletterStandard)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_breadcrumb=__webpack_require__(23),_breadcrumb2=_interopRequireDefault(_breadcrumb),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_scheduling=__webpack_require__(302),_scheduling2=_interopRequireDefault(_scheduling),_reactRouterDom=__webpack_require__(8),field={name:"options",type:"reactComponent",component:_scheduling2.default},NewsletterNotification=function(_React$Component){function NewsletterNotification(){var _ref,_temp,_this,_ret;_classCallCheck(this,NewsletterNotification);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=NewsletterNotification.__proto__||Object.getPrototypeOf(NewsletterNotification)).call.apply(_ref,[this].concat(args))),_this.state={options:{intervalType:"daily",timeOfDay:0,weekDay:1,monthDay:0,nthWeekDay:1}},_this.handleValueChange=function(event){var state=_this.state;state[event.target.name]=event.target.value,_this.setState(state)},_this.handleNext=function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:_underscore2.default.extend({},_this.state,{type:"notification",subject:_mailpoet2.default.I18n.t("draftNewsletterTitle")})}).done(function(response){_this.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_this.showTemplateSelection=function(newsletterId){_this.props.history.push("/template/"+newsletterId)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(NewsletterNotification,_React$Component),_createClass(NewsletterNotification,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("postNotificationNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("h3",null,_mailpoet2.default.I18n.t("selectFrequency")),_react2.default.createElement(_scheduling2.default,{item:this.state,field:field,onValueChange:this.handleValueChange}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:_mailpoet2.default.I18n.t("next")})))}}]),NewsletterNotification}(_react2.default.Component);NewsletterNotification.propTypes={history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=(0,_reactRouterDom.withRouter)(NewsletterNotification)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_breadcrumb=__webpack_require__(23),_breadcrumb2=_interopRequireDefault(_breadcrumb),_scheduling=__webpack_require__(275),_scheduling2=_interopRequireDefault(_scheduling),field={name:"options",label:"Event",type:"reactComponent",component:_scheduling2.default},NewsletterWelcome=function(_React$Component){function NewsletterWelcome(props){_classCallCheck(this,NewsletterWelcome);var _this=_possibleConstructorReturn(this,(NewsletterWelcome.__proto__||Object.getPrototypeOf(NewsletterWelcome)).call(this,props)),availableSegments=window.mailpoet_segments||[],defaultSegment=1;return availableSegments=availableSegments.filter(function(segment){return"default"===segment.type}),_underscore2.default.size(availableSegments)>0&&(defaultSegment=_underscore2.default.first(availableSegments).id),_this.state={options:{event:"segment",segment:defaultSegment,role:"subscriber",afterTimeNumber:1,afterTimeType:"immediate"}},_this.handleValueChange=_this.handleValueChange.bind(_this),_this.handleNext=_this.handleNext.bind(_this),_this}return _inherits(NewsletterWelcome,_React$Component),_createClass(NewsletterWelcome,[{key:"handleValueChange",value:function(event){var state=this.state;state[event.target.name]=event.target.value,this.setState(state)}},{key:"handleNext",value:function(){var _this2=this;_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:_underscore2.default.extend({},this.state,{type:"welcome",subject:_mailpoet2.default.I18n.t("draftNewsletterTitle")})}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"showTemplateSelection",value:function(newsletterId){this.props.history.push("/template/"+newsletterId)}},{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeNewsletterTypeTitle")),_react2.default.createElement(_breadcrumb2.default,{step:"type"}),_react2.default.createElement("h3",null,_mailpoet2.default.I18n.t("selectEventToSendWelcomeEmail")),_react2.default.createElement(_scheduling2.default,{item:this.state,field:field,onValueChange:this.handleValueChange}),_react2.default.createElement("p",{className:"submit"},_react2.default.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:_mailpoet2.default.I18n.t("next")})))}}]),NewsletterWelcome}(_react2.default.Component);NewsletterWelcome.propTypes={history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},exports.default=NewsletterWelcome},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(35),_createReactClass2=_interopRequireDefault(_createReactClass),_reactConfirmAlert=__webpack_require__(301),_classnames=__webpack_require__(9),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(27),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(177),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(179),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(178),mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status")},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:_mailpoet2.default.I18n.t("sentOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],confirmEdit=function(newsletter){var redirectToEditing=function(){window.location.href="?page=mailpoet-newsletter-editor&id="+newsletter.id};newsletter.queue&&"sending"===newsletter.status&&null===newsletter.queue.status?(0,_reactConfirmAlert.confirmAlert)({title:_mailpoet2.default.I18n.t("confirmTitle"),message:_mailpoet2.default.I18n.t("confirmEdit"),confirmLabel:_mailpoet2.default.I18n.t("confirmLabel"),cancelLabel:_mailpoet2.default.I18n.t("cancelLabel"),onConfirm:redirectToEditing}):redirectToEditing()},newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"edit",label:_mailpoet2.default.I18n.t("edit"),onClick:confirmEdit},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_standard_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_standard_actions",newsletterActions);var NewsletterListStandard=(0,_createReactClass2.default)({displayName:"NewsletterListStandard",propTypes:{location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},mixins:[_mixins.QueueMixin,_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"javascript:;",onClick:function(){return confirmEdit(newsletter)}},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("sentOn")},_react2.default.createElement("abbr",null,newsletter.sent_at?_mailpoet2.default.Date.format(newsletter.sent_at):_mailpoet2.default.I18n.t("notSentYet"))))},render:function(){var _this=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"standard"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"standard",base_url:"standard",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});module.exports=NewsletterListStandard},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(35),_createReactClass2=_interopRequireDefault(_createReactClass),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(27),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(177),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(179),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(178),_classnames=__webpack_require__(9),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),mailpoetRoles=window.mailpoet_roles||{},mailpoetSegments=window.mailpoet_segments||{},mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),width:145},{name:"settings",label:_mailpoet2.default.I18n.t("settings")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"edit",link:function(newsletter){return _react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},_mailpoet2.default.I18n.t("edit"))}},{name:"trash"}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_welcome_notification_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_welcome_notification_actions",newsletterActions);var NewsletterListWelcome=(0,_createReactClass2.default)({displayName:"NewsletterListWelcome",propTypes:{location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},mixins:[_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],updateStatus:function(e){var _this=this;e.persist(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("welcomeEmailActivated")),_this.forceUpdate()}).fail(function(response){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("welcomeEmailActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){var totalSentMessage=_mailpoet2.default.I18n.t("sentToXSubscribers").replace("%$1d",newsletter.total_sent.toLocaleString()),totalScheduledMessage=_mailpoet2.default.I18n.t("scheduledToXSubscribers").replace("%$1d",newsletter.total_scheduled.toLocaleString());return _react2.default.createElement("div",null,_react2.default.createElement("p",null,_react2.default.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},_react2.default.createElement("option",{value:"active"},_mailpoet2.default.I18n.t("active")),_react2.default.createElement("option",{value:"draft"},_mailpoet2.default.I18n.t("inactive")))),_react2.default.createElement("p",null,totalSentMessage," ",_react2.default.createElement("br",null),totalScheduledMessage))},renderSettings:function(newsletter){var sendingEvent=void 0,sendingDelay=void 0,segment=void 0;switch(newsletter.options.event){case"user":sendingEvent="mailpoet_all"===newsletter.options.role?_mailpoet2.default.I18n.t("welcomeEventWPUserAnyRole"):_mailpoet2.default.I18n.t("welcomeEventWPUserWithRole").replace("%$1s",mailpoetRoles[newsletter.options.role]);break;default:if(void 0===(segment=_underscore2.default.find(mailpoetSegments,function(seg){return Number(seg.id)===Number(newsletter.options.segment)})))return _react2.default.createElement("span",{className:"mailpoet_error"},_mailpoet2.default.I18n.t("sendingToSegmentsNotSpecified"));sendingEvent=_mailpoet2.default.I18n.t("welcomeEventSegment").replace("%$1s",segment.name)}if(sendingEvent&&"immediate"!==newsletter.options.afterTimeType){switch(newsletter.options.afterTimeType){case"hours":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayHours").replace("%$1d",newsletter.options.afterTimeNumber);break;case"days":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayDays").replace("%$1d",newsletter.options.afterTimeNumber);break;case"weeks":sendingDelay=_mailpoet2.default.I18n.t("sendingDelayWeeks").replace("%$1d",newsletter.options.afterTimeNumber);break;default:sendingDelay=_mailpoet2.default.I18n.t("sendingDelayInvalid")}sendingEvent+=" ["+sendingDelay+"]."}return _react2.default.createElement("span",null,sendingEvent)},renderItem:function(newsletter,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderStatus(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("settings")},this.renderSettings(newsletter)),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,newsletter.total_sent>0&&newsletter.statistics)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"welcome"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"welcome",base_url:"welcome",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});module.exports=NewsletterListWelcome},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(35),_createReactClass2=_interopRequireDefault(_createReactClass),_reactRouterDom=__webpack_require__(8),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(27),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(177),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(179),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(178),_classnames=__webpack_require__(9),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_common=__webpack_require__(276),messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterTrashed"):_mailpoet2.default.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterDeleted"):_mailpoet2.default.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneNewsletterRestored"):_mailpoet2.default.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject"),sortable:!0},{name:"status",label:_mailpoet2.default.I18n.t("status"),width:100},{name:"settings",label:_mailpoet2.default.I18n.t("settings")},{name:"history",label:_mailpoet2.default.I18n.t("history"),width:100},{name:"updated_at",label:_mailpoet2.default.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}},{name:"edit",link:function(newsletter){return _react2.default.createElement("a",{href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},_mailpoet2.default.I18n.t("edit"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(newsletter,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],NewsletterListNotification=(0,_createReactClass2.default)({displayName:"NewsletterListNotification",propTypes:{location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},mixins:[_mixins.MailerMixin,_mixins.CronMixin],updateStatus:function(e){var _this=this;e.persist(),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("postNotificationActivated")),_this.forceUpdate()}).fail(function(response){_mailpoet2.default.Notice.error(_mailpoet2.default.I18n.t("postNotificationActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){return _react2.default.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},_react2.default.createElement("option",{value:"active"},_mailpoet2.default.I18n.t("active")),_react2.default.createElement("option",{value:"draft"},_mailpoet2.default.I18n.t("inactive")))},renderSettings:function(newsletter){var sendingFrequency=void 0,segments=newsletter.segments.map(function(segment){return segment.name}),sendingToSegments=_mailpoet2.default.I18n.t("ifNewContentToSegments").replace("%$1s",segments.join(", "));if(0===segments.length)return _react2.default.createElement("span",{className:"mailpoet_error"},_mailpoet2.default.I18n.t("sendingToSegmentsNotSpecified"));switch(newsletter.options.intervalType){case"daily":sendingFrequency=_mailpoet2.default.I18n.t("sendDaily").replace("%$1s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"weekly":sendingFrequency=_mailpoet2.default.I18n.t("sendWeekly").replace("%$1s",_common.weekDayValues[newsletter.options.weekDay]).replace("%$2s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"monthly":sendingFrequency=_mailpoet2.default.I18n.t("sendMonthly").replace("%$1s",_common.monthDayValues[newsletter.options.monthDay]).replace("%$2s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"nthWeekDay":sendingFrequency=_mailpoet2.default.I18n.t("sendNthWeekDay").replace("%$1s",_common.nthWeekDayValues[newsletter.options.nthWeekDay]).replace("%$2s",_common.weekDayValues[newsletter.options.weekDay]).replace("%$3s",_common.timeOfDayValues[newsletter.options.timeOfDay]);break;case"immediately":sendingFrequency=_mailpoet2.default.I18n.t("sendImmediately");break;default:sendingFrequency="Invalid sending frequency"}return _react2.default.createElement("span",null,sendingFrequency," ",sendingToSegments)},renderHistoryLink:function(newsletter){return 0===Number(newsletter.children_count)?_mailpoet2.default.I18n.t("notSentYet"):_react2.default.createElement(_reactRouterDom.Link,{"data-automation-id":"history-"+newsletter.id,to:"/notification/history/"+newsletter.id},_mailpoet2.default.I18n.t("viewHistory"))},renderItem:function(newsletter,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id="+newsletter.id},newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderStatus(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("settings")},this.renderSettings(newsletter)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("history")},this.renderHistoryLink(newsletter)),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("lastModifiedOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"notification"}),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"notification",base_url:"notification",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});module.exports=NewsletterListNotification},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_createReactClass=__webpack_require__(35),_createReactClass2=_interopRequireDefault(_createReactClass),_reactRouterDom=__webpack_require__(8),_classnames=__webpack_require__(9),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_wpJsHooks=__webpack_require__(14),_wpJsHooks2=_interopRequireDefault(_wpJsHooks),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(27),_listing2=_interopRequireDefault(_listing),_tabs=__webpack_require__(177),_tabs2=_interopRequireDefault(_tabs),_heading=__webpack_require__(179),_heading2=_interopRequireDefault(_heading),_mixins=__webpack_require__(178),mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,columns=[{name:"subject",label:_mailpoet2.default.I18n.t("subject")},{name:"status",label:_mailpoet2.default.I18n.t("status")},{name:"segments",label:_mailpoet2.default.I18n.t("lists")},{name:"statistics",label:_mailpoet2.default.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:_mailpoet2.default.I18n.t("sentOn")}],newsletterActions=[{name:"view",link:function(newsletter){return _react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},_mailpoet2.default.I18n.t("preview"))}}];_wpJsHooks2.default.addFilter("mailpoet_newsletters_listings_notification_history_actions",_mixins.StatisticsMixin.addStatsCTAAction),newsletterActions=_wpJsHooks2.default.applyFilters("mailpoet_newsletters_listings_notification_history_actions",newsletterActions);var NewsletterListNotificationHistory=(0,_createReactClass2.default)({displayName:"NewsletterListNotificationHistory",propTypes:{location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},mixins:[_mixins.QueueMixin,_mixins.StatisticsMixin,_mixins.MailerMixin,_mixins.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return _react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{href:newsletter.preview_url,target:"_blank"},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("sentOn")},newsletter.sent_at?_mailpoet2.default.Date.format(newsletter.sent_at):_mailpoet2.default.I18n.t("notSentYet")))},render:function(){var _this=this;return _react2.default.createElement("div",null,_react2.default.createElement(_heading2.default,null),_react2.default.createElement(_tabs2.default,{tab:"notification"}),_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/notification"},_mailpoet2.default.I18n.t("backToPostNotifications")),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"notification_history",base_url:"notification/history/:parent_id",onRenderItem:this.renderItem,columns:columns,item_actions:newsletterActions,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});module.exports=NewsletterListNotificationHistory},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(12),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(8),_list=__webpack_require__(443),_list2=_interopRequireDefault(_list),_form=__webpack_require__(444),_form2=_interopRequireDefault(_form),container=document.getElementById("segments_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{path:"/new",component:_form2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/edit/:id",component:_form2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"*",component:_list2.default}))),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(8),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_classnames=__webpack_require__(9),_classnames2=_interopRequireDefault(_classnames),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(27),_listing2=_interopRequireDefault(_listing),columns=[{name:"name",label:_mailpoet2.default.I18n.t("name"),sortable:!0},{name:"description",label:_mailpoet2.default.I18n.t("description")},{name:"subscribed",label:_mailpoet2.default.I18n.t("subscribed")},{name:"unconfirmed",label:_mailpoet2.default.I18n.t("unconfirmed")},{name:"unsubscribed",label:_mailpoet2.default.I18n.t("unsubscribed")},{name:"bounced",label:_mailpoet2.default.I18n.t("bounced")},{name:"created_at",label:_mailpoet2.default.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentTrashed"):_mailpoet2.default.I18n.t("multipleSegmentsTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentDeleted"):_mailpoet2.default.I18n.t("multipleSegmentsDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneSegmentRestored"):_mailpoet2.default.I18n.t("multipleSegmentsRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",link:function(item){return _react2.default.createElement(_reactRouterDom.Link,{to:"/edit/"+item.id},_mailpoet2.default.I18n.t("edit"))},display:function(segment){return"wp_users"!==segment.type}},{name:"duplicate_segment",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(item,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"duplicate",data:{id:item.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("listDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"!==segment.type}},{name:"read_more",link:function(){return _react2.default.createElement("a",{href:"http://docs.mailpoet.com/article/133-the-wordpress-users-list",target:"_blank",rel:"noopener noreferrer"},_mailpoet2.default.I18n.t("readMore"))},display:function(segment){return"wp_users"===segment.type}},{name:"synchronize_segment",label:_mailpoet2.default.I18n.t("forceSync"),onClick:function(item,refresh){_mailpoet2.default.Modal.loading(!0),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"synchronize"}).done(function(){_mailpoet2.default.Modal.loading(!1),_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("listSynchronized").replace("%$1s",item.name)),refresh()}).fail(function(response){_mailpoet2.default.Modal.loading(!1),response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"===segment.type}},{name:"view_subscribers",link:function(item){return _react2.default.createElement("a",{href:item.subscribers_url},_mailpoet2.default.I18n.t("viewSubscribers"))}},{name:"trash",display:function(segment){return"wp_users"!==segment.type}}],SegmentList=function(_React$Component){function SegmentList(){var _ref,_temp,_this,_ret;_classCallCheck(this,SegmentList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=SegmentList.__proto__||Object.getPrototypeOf(SegmentList)).call.apply(_ref,[this].concat(args))),_this.renderItem=function(segment,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),subscribed=Number(segment.subscribers_count.subscribed||0),unconfirmed=Number(segment.subscribers_count.unconfirmed||0),unsubscribed=Number(segment.subscribers_count.unsubscribed||0),bounced=Number(segment.subscribers_count.bounced||0),segmentName=void 0;return segmentName="wp_users"===segment.type?_react2.default.createElement("span",{className:"row-title"},segment.name):_react2.default.createElement(_reactRouterDom.Link,{className:"row-title",to:"/edit/"+segment.id},segment.name),_react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,segmentName),actions),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("description")},_react2.default.createElement("abbr",null,segment.description)),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("subscribed")},_react2.default.createElement("abbr",null,subscribed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("unconfirmed")},_react2.default.createElement("abbr",null,unconfirmed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("unsubscribed")},_react2.default.createElement("abbr",null,unsubscribed.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("bounced")},_react2.default.createElement("abbr",null,bounced.toLocaleString())),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("createdOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(segment.created_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(SegmentList,_React$Component),_createClass(SegmentList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/new"},_mailpoet2.default.I18n.t("new"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:messages,search:!1,endpoint:"segments",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,sort_by:"name",sort_order:"asc"}))}}]),SegmentList}(_react2.default.Component);SegmentList.propTypes={location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},module.exports=SegmentList},function(module,exports,__webpack_require__){"use strict";(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(445)}).call(exports,__webpack_require__(6))},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(8),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_form=__webpack_require__(189),_form2=_interopRequireDefault(_form),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),fields=[{name:"name",label:_mailpoet2.default.I18n.t("name"),type:"text"},{name:"description",label:_mailpoet2.default.I18n.t("description"),type:"textarea",tip:_mailpoet2.default.I18n.t("segmentDescriptionTip")}],messages={onUpdate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("segmentUpdated"))},onCreate:function(){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("segmentAdded")),_mailpoet2.default.trackEvent("Lists > Add new",{"MailPoet Free version":window.mailpoet_version})}},SegmentForm=function(props){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("segment"),_react2.default.createElement(_reactRouterDom.Link,{className:"page-title-action",to:"/"},_mailpoet2.default.I18n.t("backToList"))),_react2.default.createElement(_form2.default,{endpoint:"segments",fields:fields,params:props.match.params,messages:messages}))};SegmentForm.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({id:_propTypes2.default.string}).isRequired}).isRequired},exports.default=SegmentForm},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(12),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(8),_list=__webpack_require__(447),_list2=_interopRequireDefault(_list),container=document.getElementById("forms_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Route,{path:"*",component:_list2.default})),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_classnames=__webpack_require__(9),_classnames2=_interopRequireDefault(_classnames),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_listing=__webpack_require__(27),_listing2=_interopRequireDefault(_listing),columns=[{name:"name",label:_mailpoet2.default.I18n.t("formName"),sortable:!0},{name:"segments",label:_mailpoet2.default.I18n.t("segments")},{name:"signups",label:_mailpoet2.default.I18n.t("signups")},{name:"created_at",label:_mailpoet2.default.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormTrashed"):_mailpoet2.default.I18n.t("multipleFormsTrashed").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormDeleted"):_mailpoet2.default.I18n.t("multipleFormsDeleted").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?_mailpoet2.default.I18n.t("oneFormRestored"):_mailpoet2.default.I18n.t("multipleFormsRestored").replace("%$1d",count.toLocaleString()),_mailpoet2.default.Notice.success(message)}},bulkActions=[{name:"trash",label:_mailpoet2.default.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:_mailpoet2.default.I18n.t("edit"),link:function(item){return _react2.default.createElement("a",{href:"admin.php?page=mailpoet-form-editor&id="+item.id},_mailpoet2.default.I18n.t("edit"))}},{name:"duplicate",label:_mailpoet2.default.I18n.t("duplicate"),onClick:function(item,refresh){return _mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"duplicate",data:{id:item.id}}).done(function(response){_mailpoet2.default.Notice.success(_mailpoet2.default.I18n.t("formDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],FormList=function(_React$Component){function FormList(){var _ref,_temp,_this,_ret;_classCallCheck(this,FormList);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=FormList.__proto__||Object.getPrototypeOf(FormList)).call.apply(_ref,[this].concat(args))),_this.createForm=function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"create"}).done(function(response){window.location=window.mailpoet_form_edit_url+response.data.id}).fail(function(response){response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},_this.renderItem=function(form,actions){var rowClasses=(0,_classnames2.default)("manage-column","column-primary","has-row-actions"),segments=window.mailpoet_segments.filter(function(segment){return-1!==_jquery2.default.inArray(segment.id,form.segments)}).map(function(segment){return segment.name}).join(", ");return"user"===form.settings.segments_selected_by&&(segments=_mailpoet2.default.I18n.t("userChoice")+" "+segments),_react2.default.createElement("div",null,_react2.default.createElement("td",{className:rowClasses},_react2.default.createElement("strong",null,_react2.default.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-form-editor&id="+form.id},form.name)),actions),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("segments")},segments),_react2.default.createElement("td",{className:"column","data-colname":_mailpoet2.default.I18n.t("signups")},form.signups),_react2.default.createElement("td",{className:"column-date","data-colname":_mailpoet2.default.I18n.t("createdOn")},_react2.default.createElement("abbr",null,_mailpoet2.default.Date.format(form.created_at))))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(FormList,_React$Component),_createClass(FormList,[{key:"render",value:function(){return _react2.default.createElement("div",null,_react2.default.createElement("h1",{className:"title"},_mailpoet2.default.I18n.t("pageTitle")," ",_react2.default.createElement("a",{className:"page-title-action",href:"javascript:;",onClick:this.createForm,"data-automation-id":"create_new_form"},_mailpoet2.default.I18n.t("new"))),_react2.default.createElement(_listing2.default,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:messages,search:!1,endpoint:"forms",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions}))}}]),FormList}(_react2.default.Component);FormList.propTypes={location:_propTypes2.default.object.isRequired,match:_propTypes2.default.shape({params:_propTypes2.default.object}).isRequired},module.exports=FormList},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(17),__webpack_require__(5),__webpack_require__(3)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,jQuery,mp){var MailPoet=mp;0!==jQuery("#mailpoet_settings").length&&(MailPoet.Router=new(Backbone.Router.extend({routes:{"":"defaultRoute","mta(/:group)":"sendingMethodGroup","(:tab)":"tabs"},defaultRoute:function(){this.tabs("basics")},sendingMethodGroup:function(group){this.tabs("mta"),jQuery("#mailpoet_sending_method_setup, .mailpoet_sending_method").hide(),jQuery(".mailpoet_settings_submit").hide(),null===group?jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").fadeIn():(jQuery("#mailpoet_mta_spf")["mailpoet"===group?"hide":"show"](),jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").hide(),jQuery('.mailpoet_sending_method[data-group="'+group+'"]').show(),jQuery("#mailpoet_sending_method_setup").fadeIn())},tabs:function(tab){jQuery(".nav-tab-wrapper a").removeClass("nav-tab-active"),jQuery(".mailpoet_panel, .mailpoet_section").hide(),jQuery('a.nav-tab[href="#'+tab+'"]').addClass("nav-tab-active").blur(),jQuery('.mailpoet_panel[data-tab="'+tab+'"]').length>0&&jQuery('.mailpoet_panel[data-tab="'+tab+'"]').show(),jQuery(".mailpoet_settings_submit").show(),MailPoet.trackEvent("User has clicked a tab in Settings",{"MailPoet Free version":window.mailpoet_version,"Tab ID":tab})}})),jQuery(document).ready(function(){Backbone.History.started||Backbone.history.start()}))}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(12),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(8),_knowledge_base=__webpack_require__(450),_knowledge_base2=_interopRequireDefault(_knowledge_base),_system_info=__webpack_require__(451),_system_info2=_interopRequireDefault(_system_info),_system_status=__webpack_require__(452),_system_status2=_interopRequireDefault(_system_status),_your_privacy=__webpack_require__(458),_your_privacy2=_interopRequireDefault(_your_privacy),container=document.getElementById("help_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{exact:!0,path:"/",render:function(){return _react2.default.createElement(_reactRouterDom.Redirect,{to:"/knowledgeBase"})}}),_react2.default.createElement(_reactRouterDom.Route,{path:"/knowledgeBase",component:_knowledge_base2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/systemStatus",component:_system_status2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/systemInfo",component:_system_info2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/yourPrivacy",component:_your_privacy2.default}))),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function KnowledgeBase(){return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"knowledgeBase"}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("knowledgeBaseIntro")),_react2.default.createElement("ul",null,_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/116-common-problems"},"Common Problems")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/165-newsletters"},"Newsletters")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/156-migration-questions"},"Migration Questions")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/149-sending-methods"},"Sending Methods")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/139-subscription-forms"},"Subscription Forms")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/114-getting-started"},"Getting Started")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/123-newsletter-designer"},"Newsletter Designer")),_react2.default.createElement("li",null,_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/121-subscribers-and-lists"},"Subscribers and Lists"))),_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/",className:"button button-primary"},_mailpoet2.default.I18n.t("knowledgeBaseButton")))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_tabs=__webpack_require__(191),_tabs2=_interopRequireDefault(_tabs);module.exports=KnowledgeBase},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function handleFocus(event){event.target.select()}function printData(data){if(_underscore2.default.isObject(data)){var printableData=Object.keys(data).map(function(key){return key+": "+data[key]});return _react2.default.createElement("textarea",{readOnly:!0,onFocus:handleFocus,value:printableData.join("\n"),style:{width:"100%",height:"400px"}})}return _react2.default.createElement("p",null,_mailpoet2.default.I18n.t("systemInfoDataError"))}function SystemInfo(){var systemInfoData=window.systemInfoData;return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"systemInfo"}),_react2.default.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("systemInfoIntro"))),printData(systemInfoData))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_underscore=__webpack_require__(4),_underscore2=_interopRequireDefault(_underscore),_tabs=__webpack_require__(191),_tabs2=_interopRequireDefault(_tabs);module.exports=SystemInfo},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderStatusMessage(status,error,link){var noticeType=status?"success":"error",noticeMessage=status?_mailpoet2.default.I18n.t("systemStatusConnectionSuccessful"):_mailpoet2.default.I18n.t("systemStatusConnectionUnsuccessful")+" "+error;return link&&(noticeMessage=(0,_reactStringReplace2.default)(noticeMessage,/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{href:""+link,key:"kb-link"},match)})),_react2.default.createElement("div",{className:"mailpoet_notice notice inline notice-"+noticeType,style:{marginTop:"1em"}},_react2.default.createElement("p",null,noticeMessage))}function renderCronSection(data){var status=data.cron.isReachable,url=data.cron.url;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusCronTitle")),_react2.default.createElement("p",null,_react2.default.createElement("a",{href:url,target:"_blank"},url)),renderStatusMessage(status,_mailpoet2.default.I18n.t("systemStatusCronConnectionUnsuccessfulInfo"),"//beta.docs.mailpoet.com/article/231-sending-does-not-work"))}function renderMSSSection(data){if(data.mss.enabled){var status=data.mss.enabled.isReachable;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusMSSTitle")),renderStatusMessage(status,_mailpoet2.default.I18n.t("systemStatusMSSConnectionUnsuccessfulInfo"),!1))}}function SystemStatus(){var systemStatusData=window.systemStatusData;return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"systemStatus"}),_react2.default.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},_react2.default.createElement("p",null,systemStatusData.mss.enabled?_mailpoet2.default.I18n.t("systemStatusIntroCronMSS"):_mailpoet2.default.I18n.t("systemStatusIntroCron"))),renderCronSection(systemStatusData),renderMSSSection(systemStatusData),_react2.default.createElement(_cron_status2.default,{status_data:systemStatusData.cronStatus}),_react2.default.createElement(_queue_status2.default,{status_data:systemStatusData.queueStatus}))}var _mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactStringReplace=__webpack_require__(26),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),_cron_status=__webpack_require__(453),_cron_status2=_interopRequireDefault(_cron_status),_queue_status=__webpack_require__(455),_queue_status2=_interopRequireDefault(_queue_status),_tabs=__webpack_require__(191),_tabs2=_interopRequireDefault(_tabs);module.exports=SystemStatus},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_key_value_table=__webpack_require__(303),_key_value_table2=_interopRequireDefault(_key_value_table),_print_boolean=__webpack_require__(454),_print_boolean2=_interopRequireDefault(_print_boolean),CronStatus=function(props){var status=props.status_data,activeStatusMapping={active:_mailpoet2.default.I18n.t("running"),inactive:_mailpoet2.default.I18n.t("cronWaiting")};return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusCronStatusTitle")),_react2.default.createElement(_key_value_table2.default,{max_width:"400px",rows:[{key:_mailpoet2.default.I18n.t("accessible"),value:_react2.default.createElement(_print_boolean2.default,null,status.accessible)},{key:_mailpoet2.default.I18n.t("status"),value:activeStatusMapping[status.status]?activeStatusMapping[status.status]:_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastUpdated"),value:status.updated_at?_mailpoet2.default.Date.full(1e3*status.updated_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastRunStarted"),value:status.run_accessed_at?_mailpoet2.default.Date.full(1e3*status.run_started_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastRunCompleted"),value:status.run_completed_at?_mailpoet2.default.Date.full(1e3*status.run_completed_at):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("lastSeenError"),value:status.last_error||_mailpoet2.default.I18n.t("none")}]}))};CronStatus.propTypes={status_data:_propTypes2.default.shape({accessible:_propTypes2.default.bool,status:_propTypes2.default.string,updated_at:_propTypes2.default.number,run_accessed_at:_propTypes2.default.number,run_completed_at:_propTypes2.default.number}).isRequired},CronStatus.defaultProps={status_data:{accessible:null,status:null,updated_at:null,run_accessed_at:null,run_completed_at:null}},module.exports=CronStatus},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),PrintBoolean=function(props){return _react2.default.createElement("span",null,!0===props.children&&props.truthy||!1===props.children&&props.falsy||props.unknown)};PrintBoolean.propTypes={truthy:_propTypes2.default.string,falsy:_propTypes2.default.string,unknown:_propTypes2.default.string,children:_propTypes2.default.bool},PrintBoolean.defaultProps={truthy:_mailpoet2.default.I18n.t("yes"),falsy:_mailpoet2.default.I18n.t("no"),unknown:_mailpoet2.default.I18n.t("unknown"),children:null},module.exports=PrintBoolean},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_key_value_table=__webpack_require__(303),_key_value_table2=_interopRequireDefault(_key_value_table),_tasks_list=__webpack_require__(456),_tasks_list2=_interopRequireDefault(_tasks_list),_tasks_list_data_row=__webpack_require__(304),_tasks_list_data_row2=_interopRequireDefault(_tasks_list_data_row),QueueStatus=function(props){var status=props.status_data;return _react2.default.createElement("div",null,_react2.default.createElement("h2",null,_mailpoet2.default.I18n.t("systemStatusQueueTitle")),_react2.default.createElement(_key_value_table2.default,{max_width:"400px",rows:[{key:_mailpoet2.default.I18n.t("status"),value:"paused"===status.status?_mailpoet2.default.I18n.t("paused"):_mailpoet2.default.I18n.t("running")},{key:_mailpoet2.default.I18n.t("startedAt"),value:status.started?_mailpoet2.default.Date.full(1e3*status.started):_mailpoet2.default.I18n.t("unknown")},{key:_mailpoet2.default.I18n.t("sentEmails"),value:status.sent||0},{key:_mailpoet2.default.I18n.t("retryAttempt"),value:status.retry_attempt||_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("retryAt"),value:status.retry_at?_mailpoet2.default.Date.full(1e3*status.retry_at):_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("error"),value:status.error?status.error.error_message:_mailpoet2.default.I18n.t("none")},{key:_mailpoet2.default.I18n.t("totalCompletedTasks"),value:status.tasksStatusCounts.completed},{key:_mailpoet2.default.I18n.t("totalRunningTasks"),value:status.tasksStatusCounts.running},{key:_mailpoet2.default.I18n.t("totalPausedTasks"),value:status.tasksStatusCounts.paused},{key:_mailpoet2.default.I18n.t("totalScheduledTasks"),value:status.tasksStatusCounts.scheduled}]}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("scheduledTasks")),_react2.default.createElement(_tasks_list2.default,{show_scheduled_at:!0,tasks:status.latestTasks.filter(function(task){return"scheduled"===task.status})}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("runningTasks")),_react2.default.createElement(_tasks_list2.default,{tasks:status.latestTasks.filter(function(task){return null===task.status})}),_react2.default.createElement("h4",null,_mailpoet2.default.I18n.t("completedTasks")),_react2.default.createElement(_tasks_list2.default,{tasks:status.latestTasks.filter(function(task){return"completed"===task.status})}))};QueueStatus.propTypes={status_data:_propTypes2.default.shape({status:_propTypes2.default.string,started:_propTypes2.default.number,sent:_propTypes2.default.number,retry_attempt:_propTypes2.default.number,retry_at:_propTypes2.default.number,error:_propTypes2.default.shape({operation:_propTypes2.default.string,error_message:_propTypes2.default.string}),tasksStatusCounts:_propTypes2.default.shape({completed:_propTypes2.default.number.isRequired,running:_propTypes2.default.number.isRequired,paused:_propTypes2.default.number.isRequired,scheduled:_propTypes2.default.number.isRequired}).isRequired,latestTasks:_propTypes2.default.arrayOf(_tasks_list_data_row2.default.propTypes.task).isRequired}).isRequired},QueueStatus.defaultProps={status_data:{status:null,started:null,sent:null,retry_attempt:null,retry_at:null,error:null}},module.exports=QueueStatus},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_tasks_list_data_row=__webpack_require__(304),_tasks_list_data_row2=_interopRequireDefault(_tasks_list_data_row),_tasks_list_labels_row=__webpack_require__(457),_tasks_list_labels_row2=_interopRequireDefault(_tasks_list_labels_row),TasksList=function(props){var colsCount=props.show_scheduled_at?6:5;return _react2.default.createElement("table",{className:"widefat fixed striped"},_react2.default.createElement("thead",null,_react2.default.createElement(_tasks_list_labels_row2.default,{show_scheduled_at:props.show_scheduled_at})),_react2.default.createElement("tbody",null,props.tasks.length?props.tasks.map(function(task){return _react2.default.createElement(_tasks_list_data_row2.default,{key:task.id,task:task,show_scheduled_at:props.show_scheduled_at})}):_react2.default.createElement("tr",{className:"no-items"},_react2.default.createElement("td",{colSpan:colsCount},_mailpoet2.default.I18n.t("nothingToShow")))),_react2.default.createElement("tfoot",null,_react2.default.createElement(_tasks_list_labels_row2.default,{show_scheduled_at:props.show_scheduled_at})))};TasksList.propTypes={show_scheduled_at:_propTypes2.default.bool,tasks:_propTypes2.default.arrayOf(_tasks_list_data_row2.default.propTypes.task).isRequired},TasksList.defaultProps={show_scheduled_at:!1},module.exports=TasksList},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),TasksListLabelsRow=function(props){return _react2.default.createElement("tr",null,_react2.default.createElement("th",{className:"row-title"},"Id"),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("type")),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("email")),_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("priority")),props.show_scheduled_at?_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("scheduledAt")):null,_react2.default.createElement("th",{className:"row-title"},_mailpoet2.default.I18n.t("updatedAt")))};TasksListLabelsRow.propTypes={show_scheduled_at:_propTypes2.default.bool},TasksListLabelsRow.defaultProps={show_scheduled_at:!1},module.exports=TasksListLabelsRow},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function YourPrivacy(){return _react2.default.createElement("div",null,_react2.default.createElement(_tabs2.default,{tab:"yourPrivacy"}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent1")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent2")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("yourPrivacyContent3")),_react2.default.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://www.mailpoet.com/privacy-notice/",className:"button button-primary"},_mailpoet2.default.I18n.t("yourPrivacyButton")))}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_tabs=__webpack_require__(191),_tabs2=_interopRequireDefault(_tabs);module.exports=YourPrivacy},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Intro(){if(!(introActive||innerWidth<=960)){var intro=(0,_intro2.default)();intro.setOptions({steps:introSteps,nextLabel:_mailpoet2.default.I18n.t("introNext")+" →",prevLabel:"← "+_mailpoet2.default.I18n.t("introBack"),skipLabel:_mailpoet2.default.I18n.t("introSkip"),doneLabel:_mailpoet2.default.I18n.t("introDone"),positionPrecedence:["right","left","bottom","top"],buttonClass:"button",hidePrev:!0,hideNext:!0,helperElementPadding:12,scrollToElement:!1,showStepNumbers:!1,tooltipPosition:"auto"}),intro.onbeforechange(function(){var step=intro._currentStep,element=introSteps[step].element;intro._introItems[step].element="string"==typeof element?document.querySelector(element):element}),intro.onafterchange(function(targetElement){if("fixed"===getComputedStyle(targetElement).getPropertyValue("position")){var helperLayer=document.querySelector(".introjs-helperLayer"),referenceLayer=document.querySelector(".introjs-tooltipReferenceLayer");referenceLayer.style.top=parseInt(referenceLayer.style.top,10)-pageYOffset+"px",helperLayer.style.top=parseInt(helperLayer.style.top,10)-pageYOffset+"px"}}),intro.onexit(function(){introActive=!1,document.body.classList.remove("mailpoet-intro-active")}),intro.onskip(function(){_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_intro:0}})}),intro.start(),introActive=!0,document.body.classList.add("mailpoet-intro-active")}}var _intro=__webpack_require__(297),_intro2=_interopRequireDefault(_intro),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),introSteps=[{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-segments]").parentNode,intro:_mailpoet2.default.I18n.t("introLists")},{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-forms]").parentNode,intro:_mailpoet2.default.I18n.t("introForms")},{element:"#hs-beacon:not(.hs-beacon-hidden) iframe, .olark-launch-button",intro:_mailpoet2.default.I18n.t("introChat")},{element:"#mailpoet-new-email",intro:_mailpoet2.default.I18n.t("introEmails")}],introActive=!1;_mailpoet2.default.showIntro=Intro},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(3)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(MailPoet){function eventHandler(){return confirm(MailPoet.I18n.t("reinstallConfirmation"))&&(MailPoet.trackEvent("User has reinstalled MailPoet via Settings",{"MailPoet Free version":window.mailpoet_version}),MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"setup",action:"reset"}).always(function(){MailPoet.Modal.loading(!1)}).done(function(){window.location="admin.php?page=mailpoet-newsletters"}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})),!1}var element;(element=document.getElementById("mailpoet_reinstall"))&&element.addEventListener("click",eventHandler,!1)}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(17),__webpack_require__(4),__webpack_require__(5),__webpack_require__(3),__webpack_require__(180),__webpack_require__(462),__webpack_require__(463),__webpack_require__(0)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,_,jQuery,MailPoet,Handlebars,Papa,AsyncQueue,Moment){jQuery("#mailpoet_subscribers_import").length&&jQuery(document).ready(function(){function showCurrentStep(){MailPoet.Notice.hide(),MailPoet.Modal.loading(!1),jQuery('#mailpoet_subscribers_import > div[id^="step"]').hide(),jQuery(location.hash).show()}var router;jQuery('input[name="select_method"]').attr("checked",!1),router=new(Backbone.Router.extend({routes:{"":"home",step1:"step1",step2:"step2",step3:"step3"},home:function(){this.navigate("step1",{trigger:!0})}})),router.on("route:step1",function(){function toggleNextStepButton(element,condition){if("on"===condition)return void element.closest("table a").removeClass("button-disabled");element.closest("table a").addClass("button-disabled")}function parseCSV(isFile){var processedSubscribers=[],parsedEmails=[],duplicateEmails=[],invalidEmails=[],emailColumnPosition=null,columnCount=null,isHeaderFound=!1,detectAndCleanupEmail=function(emailString){var test,email=jQuery("<div />").html(emailString).text();return email=email.toLowerCase().replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g,"").replace(/\s+|%\d+|,+/g,""),test=/<(.*?)>/.exec(email),test&&(email=test[1].trim()),test=/mailto:(?:\s+)?(.*)/.exec(email),test&&(email=test[1].trim()),!!window.mailpoet_email_regex.test(email)&&email};return{skipEmptyLines:!0,delimiter:"",newline:"",comments:!1,error:function(){MailPoet.Notice.hide(),MailPoet.Notice.error(MailPoet.I18n.t("dataProcessingError"))},complete:function(CSV){var email,emailAddress,rowData,rowColumnCount,errorNotice;Object.keys(CSV.data).forEach(function(rowCount){rowData=CSV.data[rowCount].map(function(el){return el.trim()}),rowColumnCount=rowData.length,null===columnCount&&(columnCount=rowColumnCount),rowColumnCount===columnCount&&(null===emailColumnPosition?(Object.keys(rowData).forEach(function(column){emailAddress=detectAndCleanupEmail(rowData[column]),null===emailColumnPosition&&window.mailpoet_email_regex.test(emailAddress)&&(emailColumnPosition=column,parsedEmails[emailAddress]=!0,rowData[column]=emailAddress,processedSubscribers[emailAddress]=rowData)}),null===emailColumnPosition&&0===parseInt(rowCount,10)&&(isHeaderFound=!0,processedSubscribers[0]=rowData)):""!==rowData[emailColumnPosition]&&(email=detectAndCleanupEmail(rowData[emailColumnPosition]),_.has(parsedEmails,email)?duplicateEmails.push(email):window.mailpoet_email_regex.test(email)?(parsedEmails[email]=!0,rowData[emailColumnPosition]=email,processedSubscribers[email]=rowData):invalidEmails.push(rowData[emailColumnPosition])))}),processedSubscribers=_.values(processedSubscribers),processedSubscribers&&(isHeaderFound&&processedSubscribers.length>=2||!isHeaderFound&&processedSubscribers.length>=1)?(window.importData.step1={header:window.mailpoet_email_regex.test(processedSubscribers[0][emailColumnPosition])?null:processedSubscribers.shift(),subscribers:processedSubscribers,subscribersCount:processedSubscribers.length,duplicate:duplicateEmails,invalid:invalidEmails},MailPoet.trackEvent("Subscribers import started",{source:isFile?"file upload":"pasted data","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})):(MailPoet.Modal.loading(!1),errorNotice=MailPoet.I18n.t("noValidRecords"),errorNotice=errorNotice.replace("[link]",MailPoet.I18n.t("csvKBLink")),errorNotice=errorNotice.replace("[/link]","</a>"),MailPoet.Notice.error(errorNotice))}}}function displayMailChimpLists(data){var listSelectElement=mailChimpListsContainerElement.find("select");listSelectElement.data("select2")?(listSelectElement.select2("data",data),listSelectElement.trigger("change")):listSelectElement.select2({data:data,width:"20em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).change(function(){null!==jQuery(this).val()?toggleNextStepButton(mailChimpProcessButtonElement,"on"):toggleNextStepButton(mailChimpProcessButtonElement,"off")}).trigger("change"),mailChimpListsContainerElement.show()}var methodProcessContainerTemplate,currentStepE,methodSelectionElement,pasteInputElement,pasteInputPlaceholderElement,pasteProcessButtonElement,mailChimpKeyInputElement,mailChimpKeyVerifyButtonElement,mailChimpListsContainerElement,mailChimpProcessButtonElement,uploadElement,uploadProcessButtonElement;if(window.mailpoetColumns=jQuery.map(window.mailpoetColumns,function(column){var col=column;return col.validation_rule=!1,col}),void 0!==window.importData.step1)return void showCurrentStep();methodProcessContainerTemplate=Handlebars.compile(jQuery("#method_process_template").html()),jQuery(".mailpoet_method_process").html(methodProcessContainerTemplate()),currentStepE=jQuery(location.hash),methodSelectionElement=jQuery("#select_method"),pasteInputElement=jQuery("#paste_input"),pasteInputPlaceholderElement=pasteInputElement.data("placeholder").replace(/\\n/g,"\n"),pasteProcessButtonElement=jQuery("#method_paste > div.mailpoet_method_process").find("a.mailpoet_process"),mailChimpKeyInputElement=jQuery("#mailchimp_key"),mailChimpKeyVerifyButtonElement=jQuery("#mailchimp_key_verify"),mailChimpListsContainerElement=jQuery("#mailchimp_lists"),mailChimpProcessButtonElement=jQuery("#method_mailchimp > div.mailpoet_method_process").find("a.mailpoet_process"),uploadElement=jQuery("#file_local"),uploadProcessButtonElement=jQuery("#method_file > div.mailpoet_method_process").find("a.mailpoet_process"),methodSelectionElement.change(function(){var availableMethods=jQuery(':radio[name="select_method"]'),selectedMethod=availableMethods.index(availableMethods.filter(":checked"));MailPoet.Notice.hide(),currentStepE.find(".inside").children('div[id^="method_"]').hide(),currentStepE.find(".inside").children('div[id^="method_"]:eq('+selectedMethod+")").show().find("table").show()}),showCurrentStep(),pasteInputElement.attr("value",pasteInputPlaceholderElement).css("color","#999").focus(function(){jQuery(this).val()===pasteInputPlaceholderElement&&jQuery(this).attr("value","").css("color","#222")}).blur(function(){""===jQuery(this).val()&&jQuery(this).attr("value",pasteInputPlaceholderElement).css("color","#999")}).keyup(function(){toggleNextStepButton(pasteProcessButtonElement,""!==this.value.trim()?"on":"off")}),pasteProcessButtonElement.click(function(){var pasteSize=encodeURI(pasteInputElement.val()).split(/%..|./).length-1;if(MailPoet.Notice.hide(),pasteSize>window.maxPostSizeBytes)return void MailPoet.Notice.error(MailPoet.I18n.t("maxPostSizeNotice"));MailPoet.Modal.loading(!0),setTimeout(function(){Papa.parse(pasteInputElement.val(),parseCSV(!1))},10)}),uploadElement.change(function(){var ext=this.value.match(/[^.]+$/);MailPoet.Notice.hide(),null!==ext&&"csv"===ext[0].toLowerCase()||(this.value="",MailPoet.Notice.error(MailPoet.I18n.t("wrongFileFormat"))),toggleNextStepButton(uploadProcessButtonElement,""!==this.value.trim()?"on":"off")}),uploadProcessButtonElement.click(function(){""!==uploadElement.val().trim()&&(MailPoet.Modal.loading(!0),setTimeout(function(){uploadElement.parse({config:parseCSV(!0)})},10))}),mailChimpKeyInputElement.keyup(function(){""!==this.value.trim()&&/[a-zA-Z0-9]{32}-/.exec(this.value.trim())||(mailChimpListsContainerElement.hide(),jQuery(".mailpoet_mailchimp-key-status").html("").removeClass("mailpoet_mailchimp-ok mailpoet_mailchimp-error"),toggleNextStepButton(mailChimpProcessButtonElement,"off"))}),mailChimpKeyVerifyButtonElement.click(function(){MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpLists",data:{api_key:mailChimpKeyInputElement.val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){jQuery(".mailpoet_mailchimp-key-status").html("").removeClass().addClass("mailpoet_mailchimp-key-status mailpoet_mailchimp-ok"),0===response.data.length?(jQuery(".mailpoet_mailchimp-key-status").html(MailPoet.I18n.t("noMailChimpLists")),mailChimpListsContainerElement.hide(),toggleNextStepButton(mailChimpProcessButtonElement,"off")):displayMailChimpLists(response.data)}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),mailChimpProcessButtonElement.click(function(){mailChimpProcessButtonElement.closest("table a").hasClass("button-disabled")||(MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpSubscribers",data:{api_key:mailChimpKeyInputElement.val(),lists:mailChimpListsContainerElement.find("select").val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){window.importData.step1=response.data,MailPoet.trackEvent("Subscribers import started",{source:"MailChimp","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))})}),router.on("route:step2",function(){function toggleNextStepButton(condition){if("on"===condition)return void nextStepButton.removeClass("button-disabled");nextStepButton.addClass("button-disabled")}function enableSegmentSelection(segments){segmentSelectElement.data("select2")&&(segmentSelectElement.html("").select2("destroy"),toggleNextStepButton("off")),segmentSelectElement.select2({data:segments,width:"20em",templateResult:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"},templateSelection:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"}}).change(function(){var segmentSelectionNotice=jQuery('[data-id="notice_segmentSelection"]');this.value?(jQuery('[data-id="notice_segmentSelection"]').remove(),jQuery(".mailpoet_notice.error:visible").length||toggleNextStepButton("on")):(segmentSelectionNotice.length||MailPoet.Notice.error(MailPoet.I18n.t("segmentSelectionRequired"),{static:!0,scroll:!0,id:"notice_segmentSelection",hideClose:!0}),toggleNextStepButton("off"))})}function filterSubscribers(){var displayedColumns,subscribersClone=jQuery.extend(!0,{},subscribers),preventNextStep=!1;jQuery('[data-id="notice_invalidEmail"], [data-id="notice_invalidDate"]').remove(),displayedColumns=jQuery.map(jQuery(".mailpoet_subscribers_column_data_match"),function(element,elementIndex){var columnId=jQuery(element).data("column-id"),validationRule=jQuery(element).data("validation-rule");return jQuery(element).val(columnId).trigger("change"),{id:columnId,index:elementIndex,validationRule:validationRule,element:element}}),jQuery.map(window.mailpoetColumns,function(column){var firstRowData,validationRule,testedFormat,allowedDateFormats,matchedColumn=_.find(displayedColumns,function(data){return data.id===column.id});"email"===column.id&&(window.mailpoet_email_regex.test(subscribersClone.subscribers[0][matchedColumn.index])?MailPoet.Notice.hide("invalidEmail"):(preventNextStep=!0,jQuery('[data-id="notice_invalidEmail"]').length||MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidElement"),{static:!0,scroll:!0,hideClose:!0,id:"invalidEmail"}))),"date"===column.type&&matchedColumn&&(allowedDateFormats=[Moment.ISO_8601,"YYYY/MM/DD","MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD","YYYY/DD/MM","MM/YYYY","YYYY/MM","YYYY"],firstRowData=subscribersClone.subscribers[0][matchedColumn.index],validationRule=!1,""===firstRowData.trim()?(subscribersClone.subscribers[0][matchedColumn.index]='<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+MailPoet.I18n.t("emptyFirstRowDate")+"</span> ",preventNextStep=!0):Object.keys(allowedDateFormats).forEach(function(format){if(testedFormat=allowedDateFormats[format],Moment(firstRowData,testedFormat,!0).isValid())return validationRule="function"==typeof testedFormat?"datetime":testedFormat,void jQuery(matchedColumn.element).data("validation-rule",validationRule);"datetime"===validationRule&&(validationRule=Moment.ISO_8601)}),jQuery.map(subscribersClone.subscribers,function(dataSubscribers,index){var data=dataSubscribers,rowData=data[matchedColumn.index],date=Moment(rowData,testedFormat,!0);index!==fillerPosition&&""!==rowData.trim()&&(date.isValid()?data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match" title="'+MailPoet.I18n.t("verifyDateMatch")+'">'+MailPoet.Date.format(date)+"</span> "):(data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+new Handlebars.SafeString(MailPoet.I18n.t("dateMatchError"))+"</span> "),preventNextStep=!0))}),preventNextStep&&!jQuery(".mailpoet_invalidDate").length&&MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidDate"),{static:!0,scroll:!0,hideClose:!0,id:"invalidDate"}))}),jQuery("#subscribers_data > table > tbody").html(subscribersDataTemplatePartial(subscribersClone)),preventNextStep?toggleNextStepButton("off"):!jQuery(".mailpoet_notice.error:visible").length&&segmentSelectElement.val()&&toggleNextStepButton("on")}var nextStepButton,previousStepButton,subscribers,subscribersDataTemplate,subscribersDataTemplatePartial,subscribersDataParseResultsTemplate,segmentSelectElement,maxRowsToShow,filler,fillerArray,fillerPosition,importResults,duplicates;if(void 0===window.importData.step1)return void router.navigate("step1",{trigger:!0});nextStepButton=jQuery("#step2_process"),previousStepButton=jQuery("#return_to_step1"),subscribers=jQuery.extend(!0,{},window.importData.step1),subscribersDataTemplate=Handlebars.compile(jQuery("#subscribers_data_template").html()),subscribersDataTemplatePartial=Handlebars.compile(jQuery("#subscribers_data_template_partial").html()),subscribersDataParseResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_parse_results_template").html()),segmentSelectElement=jQuery("#mailpoet_segments_select"),maxRowsToShow=10,filler=". . .",fillerArray=Array.apply(null,new Array(subscribers.subscribers[0].length)).map(String.prototype.valueOf,filler),showCurrentStep(),jQuery("#subscribers_data_parse_results:visible").html(""),jQuery("#subscribers_data_import_results:visible").hide(),(subscribers.invalid.length||subscribers.duplicate.length)&&(duplicates={},subscribers.duplicate.forEach(function(subscriberEmail){duplicates[subscriberEmail]=(duplicates[subscriberEmail]||0)+1}),subscribers.duplicate=[],Object.keys(duplicates).forEach(function(email){duplicates[email]>1?subscribers.duplicate.push(email+" (x"+duplicates[email]+")"):subscribers.duplicate.push(email)}),importResults={notice:MailPoet.I18n.t("importNoticeSkipped").replace("%1$s","<strong>"+(subscribers.invalid.length+subscribers.duplicate.length)+"</strong>"),invalid:subscribers.invalid.length?MailPoet.I18n.t("importNoticeInvalid").replace("%1$s","<strong>"+subscribers.invalid.length.toLocaleString()+"</strong>").replace("%2$s",subscribers.invalid.join(", ")):null,duplicate:subscribers.duplicate.length?MailPoet.I18n.t("importNoticeDuplicate").replace("%1$s","<strong>"+subscribers.duplicate.length+"</strong>").replace("%2$s",subscribers.duplicate.join(", ")):null},jQuery("#subscribers_data_parse_results").html(subscribersDataParseResultsTemplate(importResults))),jQuery(".mailpoet_subscribers_data_parse_results_details_show").click(function(){var details=jQuery(".mailpoet_subscribers_data_parse_results_details");jQuery(details).toggle(),this.text=jQuery(details).is(":visible")?MailPoet.I18n.t("hideDetails"):MailPoet.I18n.t("showDetails")}),window.mailpoetSegments.length?jQuery(".mailpoet_segments").show():jQuery(".mailpoet_no_segments").show(),jQuery(".mailpoet_create_segment").click(function(){MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewList"),template:jQuery("#new_segment_template").html()}),jQuery("#new_segment_name").keypress(function(e){13===e.which&&jQuery("#new_segment_process").click()}),jQuery("#new_segment_process").click(function(){var segmentName=jQuery("#new_segment_name").val().trim(),segmentDescription=jQuery("#new_segment_description").val().trim();MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"addSegment",data:{name:segmentName,description:segmentDescription}}).done(function(response){var selectedValues;window.mailpoetSegments.push({id:response.data.id,name:response.data.name,subscriberCount:0}),selectedValues=segmentSelectElement.val(),null===selectedValues?selectedValues=[response.data.id]:selectedValues.push(response.data.id),enableSegmentSelection(window.mailpoetSegments),segmentSelectElement.val(selectedValues).trigger("change"),jQuery(".mailpoet_segments:hidden").show(),jQuery(".mailpoet_no_segments:visible").hide(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&(MailPoet.Notice.hide(),MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#new_segment_name"}))})}),jQuery("#new_segment_cancel").click(function(){MailPoet.Modal.close()})}),Handlebars.registerPartial("subscribers_data_template_partial",subscribersDataTemplatePartial),Handlebars.registerHelper("show_and_match_columns",function(helperSubscribers,options){var columnData,columnId,headerName,headerNameMatch,displayedColumns=[],displayedColumnsIds=[];return Object.keys(helperSubscribers.subscribers[0]).forEach(function(i){columnData=helperSubscribers.subscribers[0][i],columnId="ignore",columnData%1!=0&&window.mailpoet_email_regex.test(columnData)?columnId="email":helperSubscribers.header&&(headerName=helperSubscribers.header[i],headerNameMatch=window.mailpoetColumns.map(function(el){return el.name}).indexOf(headerName),-1!==headerNameMatch?columnId=window.mailpoetColumns[headerNameMatch].id:headerName&&(/first|first name|given name/i.test(headerName)?columnId="first_name":/last|last name/i.test(headerName)&&(columnId="last_name"))),columnId="ignore"!==columnId&&-1===displayedColumnsIds.indexOf(columnId)?columnId:"ignore",displayedColumns[i]={column_id:columnId},displayedColumnsIds.push(columnId)}),options.fn(displayedColumns)}),Handlebars.registerHelper("sanitize_data",function(data){return data instanceof Handlebars.SafeString?data:new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data))}),Handlebars.registerHelper("calculate_index",function(rawIndex){var index=parseInt(rawIndex,10);return index===maxRowsToShow&&subscribers.subscribersCount>maxRowsToShow+1?(fillerPosition=index,filler):index===subscribers.subscribers.length-1?subscribers.subscribersCount.toLocaleString():index+1}),subscribers.subscribersCount>maxRowsToShow+1&&subscribers.subscribers.splice(maxRowsToShow,subscribers.subscribersCount-(maxRowsToShow+1),fillerArray),jQuery("#subscribers_data > table").html(subscribersDataTemplate(subscribers)),jQuery("select.mailpoet_subscribers_column_data_match").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).on("select2:selecting",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.args.data.id;"create"===selectedOptionId?(selectEvent.preventDefault(),jQuery(selectElement).select2("close"),MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewField"),template:jQuery("#form_template_field_form").html()}),jQuery("#form_field_new").parsley().on("form:submit",function(){var data=jQuery(this.$element).mailpoetSerializeObject();return MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:data}).done(function(response){var newColumnData={id:response.data.id,name:response.data.name,type:response.data.type,params:response.data.params,custom:!0};2===window.mailpoetColumnsSelect2.length&&window.mailpoetColumnsSelect2.push({name:MailPoet.I18n.t("userColumns"),children:[]}),window.mailpoetColumnsSelect2[2].children.push(newColumnData),window.mailpoetColumns.push(newColumnData),jQuery("select.mailpoet_subscribers_column_data_match").each(function(){jQuery(this).html("").select2("destroy").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}})}),jQuery(selectElement).data("column-id",newColumnData.id),jQuery(selectElement).data("validation-rule",!1),filterSubscribers(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#field_name"})}),!1})):jQuery("select.mailpoet_subscribers_column_data_match").each(function(){var element=this,elementId=jQuery(element).val();elementId===selectedOptionId&&"ignore"!==elementId&&(confirm(MailPoet.I18n.t("selectedValueAlreadyMatched")+" "+MailPoet.I18n.t("confirmCorrespondingColumn"))?jQuery(element).data("column-id","ignore"):(selectEvent.preventDefault(),jQuery(selectElement).select2("close")))})}).on("select2:select",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.data.id;jQuery(selectElement).data("column-id",selectedOptionId),filterSubscribers()}),previousStepButton.off().on("click",function(){router.navigate("step1",{trigger:!0})}),nextStepButton.off().on("click",function(){var clickSubscribers,splitSubscribers,columns={},queue=new jQuery.AsyncQueue,batchNumber=0,timestamp=Date.now()/1e3,clickImportResults={created:0,updated:0,errors:[],segments:[]};jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),splitSubscribers=function(localSubscribers,size){return localSubscribers.reduce(function(res,item,index){return index%size==0&&res.push([]),res[res.length-1].push(item),res},[])},clickSubscribers=splitSubscribers(window.importData.step1.subscribers,2e3),_.each(jQuery("select.mailpoet_subscribers_column_data_match"),function(column,columnIndex){var columnId=jQuery(column).data("column-id"),validationRule=jQuery(column).data("validation-rule");"ignore"!==columnId&&(columns[columnId]={index:columnIndex,validation_rule:validationRule})}),_.each(clickSubscribers,function(){queue.add(function(addQueue){addQueue.pause(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processImport",data:JSON.stringify({columns:columns,subscribers:clickSubscribers[batchNumber],timestamp:timestamp,segments:segmentSelectElement.val(),updateSubscribers:"yes"===jQuery(':radio[name="subscriber_update_option"]:checked').val()})}).done(function(response){clickImportResults.created+=response.data.created,clickImportResults.updated+=response.data.updated,clickImportResults.segments=response.data.segments,clickImportResults.added_to_segment_with_welcome_notification=response.data.added_to_segment_with_welcome_notification,addQueue.run()}).fail(function(response){MailPoet.Modal.loading(!1),response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}),batchNumber+=1})}),queue.run(),queue.onComplete(function(){MailPoet.Modal.loading(!1),clickImportResults.errors.length>0&&!clickImportResults.updated&&!clickImportResults.created?MailPoet.Notice.error(_.flatten(clickImportResults.errors)):(window.mailpoetSegments=clickImportResults.segments,clickImportResults.segments=_.map(segmentSelectElement.select2("data"),function(data){return data.name}),window.importData.step2=clickImportResults,enableSegmentSelection(window.mailpoetSegments),router.navigate("step3",{trigger:!0}))}))}),filterSubscribers(),enableSegmentSelection(window.mailpoetSegments)}),router.on("route:step3",function(){var subscribersDataImportResultsTemplate,exportMenuElement,importResults;if(void 0===window.importData.step2)return void router.navigate("step2",{trigger:!0});showCurrentStep(),window.importData.step2.errors.length>0&&MailPoet.Notice.error(_.flatten(window.importData.step2.errors)),MailPoet.trackEvent("Subscribers import finished",{"Subscribers created":window.importData.step2.created,"Subscribers updated":window.importData.step2.updated,"MailPoet Free version":window.mailpoet_version}),subscribersDataImportResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_import_results_template").html()),exportMenuElement=jQuery("span.mailpoet_export"),importResults={created:!!window.importData.step2.created&&MailPoet.I18n.t("subscribersCreated").replace("%1$s","<strong>"+window.importData.step2.created.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),updated:!!window.importData.step2.updated&&MailPoet.I18n.t("subscribersUpdated").replace("%1$s","<strong>"+window.importData.step2.updated.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),no_action:!window.importData.step2.created&&!window.importData.step2.updated,added_to_segment_with_welcome_notification:window.importData.step2.added_to_segment_with_welcome_notification},jQuery("#subscribers_data_import_results").html(subscribersDataImportResultsTemplate(importResults)).show(),jQuery("a.mailpoet_import_again").off().click(function(){jQuery("#subscribers_data_import_results").hide(),router.navigate("step1",{trigger:!0})}),jQuery("a.mailpoet_view_subscribers").off().click(function(){window.location.href="admin.php?page=mailpoet-subscribers"}),importResults.created&&exportMenuElement.not(":visible")&&exportMenuElement.show(),window.importData.step2=void 0}),Backbone.History.started||Backbone.history.start()})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(module,exports){/*!
|
13 |
-
Papa Parse
|
14 |
-
v4.1.1
|
15 |
-
https://github.com/mholt/PapaParse
|
16 |
-
*/
|
17 |
-
!function(e){"use strict";function t(t,r){if(r=r||{},r.worker&&w.WORKERS_SUPPORTED){var n=h();return n.userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=m(r.step),r.chunk=m(r.chunk),r.complete=m(r.complete),r.error=m(r.error),delete r.worker,void n.postMessage({input:t,config:r,workerId:n.id})}var o=null;return"string"==typeof t?o=r.download?new i(r):new a(r):(e.File&&t instanceof File||t instanceof Object)&&(o=new s(r)),o.stream(t)}function r(e,t){function n(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function i(e,t){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(n){for(var a=0;a<e.length;a++)a>0&&(r+=u),r+=s(e[a],a);t.length>0&&(r+=f)}for(var o=0;o<t.length;o++){for(var h=n?e.length:t[o].length,d=0;h>d;d++){d>0&&(r+=u);var c=n&&i?e[d]:d;r+=s(t[o][c],d)}o<t.length-1&&(r+=f)}return r}function s(e,t){return void 0===e||null===e?"":(e=e.toString().replace(/"/g,'""'),"boolean"==typeof o&&o||o instanceof Array&&o[t]||a(e,w.BAD_DELIMITERS)||e.indexOf(u)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1)?'"'+e+'"':e)}function a(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return!0;return!1}var o=!1,u=",",f="\r\n";if(function(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==w.BAD_DELIMITERS.indexOf(t.delimiter)&&(u=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(o=t.quotes),"string"==typeof t.newline&&(f=t.newline))}(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(n(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:n(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function n(t){function r(e){var t=_(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},r.call(this,t),this.parseChunk=function(t){var r=this._partialLine+t;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=n.meta.cursor;this._finished||(this._partialLine=r.substring(i-this._baseIndex),this._baseIndex=i),n&&n.data&&(this._rowCount+=n.data.length);var s=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(k)e.postMessage({results:n,workerId:w.WORKER_ID,finished:s});else if(m(this._config.chunk)){if(this._config.chunk(n,this._handle),this._paused)return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),!s||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),s||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(t){m(this._config.error)?this._config.error(t):k&&this._config.error&&e.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function i(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=w.RemoteChunkSize),n.call(this,e);var r;this._nextChunk=k?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(r=new XMLHttpRequest,k||(r.onload=g(this._chunkLoaded,this),r.onerror=g(this._chunkError,this)),r.open("GET",this._input,!k),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+e),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(t){this._chunkError(t.message)}k&&0==r.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==r.readyState){if(r.status<200||r.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(r),this.parseChunk(r.responseText)}},this._chunkError=function(e){var t=r.statusText||e;this._sendError(t)}}function s(e){e=e||{},e.chunkSize||(e.chunkSize=w.LocalChunkSize),n.call(this,e);var t,r,i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,i?(t=new FileReader,t.onload=g(this._chunkLoaded,this),t.onerror=g(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function a(e){e=e||{},n.call(this,e);var t,r;this.stream=function(e){return t=e,r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):"",this._finished=!r,this.parseChunk(t)}}}function o(e){function t(){if(b&&c&&(f("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),c=!1),e.skipEmptyLines)for(var t=0;t<b.data.length;t++)1==b.data[t].length&&""==b.data[t][0]&&b.data.splice(t--,1);return r()&&n(),i()}function r(){return e.header&&0==y.length}function n(){if(b){for(var e=0;r()&&e<b.data.length;e++)for(var t=0;t<b.data[e].length;t++)y.push(b.data[e][t]);b.data.splice(0,1)}}function i(){if(!b||!e.header&&!e.dynamicTyping)return b;for(var t=0;t<b.data.length;t++){for(var r={},n=0;n<b.data[t].length;n++){if(e.dynamicTyping){var i=b.data[t][n];b.data[t][n]="true"==i||"TRUE"==i||"false"!=i&&"FALSE"!=i&&o(i)}e.header&&(n>=y.length?(r.__parsed_extra||(r.__parsed_extra=[]),r.__parsed_extra.push(b.data[t][n])):r[y[n]]=b.data[t][n])}e.header&&(b.data[t]=r,n>y.length?f("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+n,t):n<y.length&&f("FieldMismatch","TooFewFields","Too few fields: expected "+y.length+" fields but parsed "+n,t))}return e.header&&b.meta&&(b.meta.fields=y),b}function s(t){for(var r,n,i,s=[",","\t","|",";",w.RECORD_SEP,w.UNIT_SEP],a=0;a<s.length;a++){var o=s[a],f=0,h=0;i=void 0;for(var d=new u({delimiter:o,preview:10}).parse(t),c=0;c<d.data.length;c++){var l=d.data[c].length;h+=l,void 0!==i?l>1&&(f+=Math.abs(l-i),i=l):i=l}h/=d.data.length,(void 0===n||n>f)&&h>1.99&&(n=f,r=o)}return e.delimiter=r,{successful:!!r,bestDelimiter:r}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var r=0,n=0;n<t.length;n++)"\n"==t[n][0]&&r++;return r>=t.length/2?"\r\n":"\r"}function o(e){return l.test(e)?parseFloat(e):e}function f(e,t,r,n){b.errors.push({type:e,code:t,message:r,row:n})}var h,d,c,l=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,g=0,v=!1,k=!1,y=[],b={data:[],errors:[],meta:{}};if(m(e.step)){var R=e.step;e.step=function(n){if(b=n,r())t();else{if(t(),0==b.data.length)return;g+=n.data.length,e.preview&&g>e.preview?d.abort():R(b,p)}}}this.parse=function(r,n,i){if(e.newline||(e.newline=a(r)),c=!1,!e.delimiter){var o=s(r);o.successful?e.delimiter=o.bestDelimiter:(c=!0,e.delimiter=w.DefaultDelimiter),b.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,h=r,d=new u(f),b=d.parse(h,n,i),t(),v?{meta:{paused:!0}}:b||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,d.abort(),h=h.substr(d.getCharIndex())},this.resume=function(){v=!1,p.streamer.parseChunk(h)},this.aborted=function(){return k},this.abort=function(){k=!0,d.abort(),b.meta.aborted=!0,m(e.complete)&&e.complete(b),h=""}}function u(e){e=e||{};var t=e.delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode;if(("string"!=typeof t||w.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";!0===n?n="#":("string"!=typeof n||w.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=r&&"\r"!=r&&"\r\n"!=r&&(r="\n");var o=0,u=!1;this.parse=function(e,f,h){function d(e){b.push(e),S=o}function c(t){return h?p():(t||(t=e.substr(o)),w.push(t),o=g,d(w),y&&_(),p())}function l(t){o=t,d(w),w=[],O=e.indexOf(r,o)}function p(e){return{data:b,errors:R,meta:{delimiter:t,linebreak:r,aborted:u,truncated:!!e,cursor:S+(f||0)}}}function _(){i(p()),b=[],R=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,m=t.length,v=r.length,k=n.length,y="function"==typeof i;o=0;var b=[],R=[],w=[],S=0;if(!e)return p();if(a||!1!==a&&-1===e.indexOf('"')){for(var E=e.split(r),C=0;C<E.length;C++){var w=E[C];if(o+=w.length,C!==E.length-1)o+=r.length;else if(h)return p();if(!n||w.substr(0,k)!=n){if(y){if(b=[],d(w.split(t)),_(),u)return p()}else d(w.split(t));if(s&&C>=s)return b=b.slice(0,s),p(!0)}}return p()}for(var x=e.indexOf(t,o),O=e.indexOf(r,o);;)if('"'!=e[o])if(n&&0===w.length&&e.substr(o,k)===n){if(-1==O)return p();o=O+v,O=e.indexOf(r,o),x=e.indexOf(t,o)}else if(-1!==x&&(O>x||-1===O))w.push(e.substring(o,x)),o=x+m,x=e.indexOf(t,o);else{if(-1===O)break;if(w.push(e.substring(o,O)),l(O+v),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0)}else{var I=o;for(o++;;){var I=e.indexOf('"',I+1);if(-1===I)return h||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:o}),c();if(I===g-1){var D=e.substring(o,I).replace(/""/g,'"');return c(D)}if('"'!=e[I+1]){if(e[I+1]==t){w.push(e.substring(o,I).replace(/""/g,'"')),o=I+1+m,x=e.indexOf(t,o),O=e.indexOf(r,o);break}if(e.substr(I+1,v)===r){if(w.push(e.substring(o,I).replace(/""/g,'"')),l(I+1+v),x=e.indexOf(t,o),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0);break}}else I++}}return c()},this.abort=function(){u=!0},this.getCharIndex=function(){return o}}function h(){if(!w.WORKERS_SUPPORTED)return!1;if(!y&&null===w.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=new e.Worker(w.SCRIPT_PATH||v);return t.onmessage=d,t.id=R++,b[t.id]=t,t}function d(e){var t=e.data,r=b[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},s={abort:i,pause:l,resume:l};if(m(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else m(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var r=b[e];m(r.userComplete)&&r.userComplete(t),r.terminate(),delete b[e]}function l(){throw"Not implemented."}function p(t){var r=t.data;if(void 0===w.WORKER_ID&&r&&(w.WORKER_ID=r.workerId),"string"==typeof r.input)e.postMessage({workerId:w.WORKER_ID,results:w.parse(r.input,r.config),finished:!0});else if(e.File&&r.input instanceof File||r.input instanceof Object){var n=w.parse(r.input,r.config);n&&e.postMessage({workerId:w.WORKER_ID,results:n,finished:!0})}}function _(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var r in e)t[r]=_(e[r]);return t}function g(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var v,k=!e.document&&!!e.postMessage,y=!1,b={},R=0,w={};if(w.parse=t,w.unparse=r,w.RECORD_SEP=String.fromCharCode(30),w.UNIT_SEP=String.fromCharCode(31),w.BYTE_ORDER_MARK="\ufeff",w.BAD_DELIMITERS=["\r","\n",'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!!e.Worker,w.SCRIPT_PATH=null,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=u,w.ParserHandle=o,w.NetworkStreamer=i,w.FileStreamer=s,w.StringStreamer=a,void 0!==module&&module.exports?module.exports=w:m(e.define)&&e.define.amd?e.define(function(){return w}):e.Papa=w,e.jQuery){var S=e.jQuery;S.fn.parse=function(t){function r(){if(0==a.length)return void(m(t.complete)&&t.complete());var e=a[0];if(m(t.before)){var r=t.before(e.file,e.inputElem);if("object"==typeof r){if("abort"==r.action)return void n("AbortError",e.file,e.inputElem,r.reason);if("skip"==r.action)return void i();"object"==typeof r.config&&(e.instanceConfig=S.extend(e.instanceConfig,r.config))}else if("skip"==r)return void i()}var s=e.instanceConfig.complete;e.instanceConfig.complete=function(t){m(s)&&s(t,e.file,e.inputElem),i()},w.parse(e.file,e.instanceConfig)}function n(e,r,n,i){m(t.error)&&t.error({name:e},r,n,i)}function i(){a.splice(0,1),r()}var s=t.config||{},a=[];return this.each(function(){if("INPUT"!=S(this).prop("tagName").toUpperCase()||"file"!=S(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0==this.files.length)return!0;for(var r=0;r<this.files.length;r++)a.push({file:this.files[r],inputElem:this,instanceConfig:S.extend({},s)})}),r(),this}}k?e.onmessage=p:w.WORKERS_SUPPORTED&&(v=function(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}(),document.body?document.addEventListener("DOMContentLoaded",function(){y=!0},!0):y=!0),i.prototype=Object.create(n.prototype),i.prototype.constructor=i,s.prototype=Object.create(n.prototype),s.prototype.constructor=s,a.prototype=Object.create(a.prototype),a.prototype.constructor=a}("undefined"!=typeof window?window:this)},function(module,exports){!function($){$.AsyncQueue=function(){var failureFunc,completeFunc,lastCallbackData,_run,that=this,queue=[],paused=!1;return _run=function(){var f=queue.shift();f?(f.apply(that,[that]),!1===paused&&_run()):completeFunc&&completeFunc.apply(that)},this.onFailure=function(func){failureFunc=func},this.onComplete=function(func){completeFunc=func},this.add=function(func){return queue.push(func),this},this.storeData=function(dataObject){return lastCallbackData=dataObject,this},this.lastCallbackData=function(){return lastCallbackData},this.run=function(){paused=!1,_run()},this.pause=function(){return paused=!0,this},this.failure=function(){if(paused=!0,failureFunc){var args=[that];for(i=0;i<arguments.length;i++)args.push(arguments[i]);failureFunc.apply(that,args)}},this}}(jQuery)},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(4),__webpack_require__(5),__webpack_require__(3),__webpack_require__(180)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(_,jQuery,MailPoet,Handlebars){jQuery("#mailpoet_subscribers_export").length&&jQuery(document).ready(function(){function toggleNextStepButton(condition){"on"===condition?nextStepButton.removeClass("button-disabled"):nextStepButton.addClass("button-disabled")}var segmentsContainerElement,subscriberFieldsContainerElement,nextStepButton,renderSegmentsAndFields,subscribersExportTemplate;window.exportData.segments&&(subscribersExportTemplate=Handlebars.compile(jQuery("#mailpoet_subscribers_export_template").html()),jQuery("#mailpoet_subscribers_export > div.inside").html(subscribersExportTemplate(window.exportData)),segmentsContainerElement=jQuery("#export_lists"),subscriberFieldsContainerElement=jQuery("#export_columns"),nextStepButton=jQuery("a.mailpoet_export_process"),renderSegmentsAndFields=function(container,data){container.data("select2")&&container.html("").select2("destroy"),container.select2({data:data,width:"20em",templateResult:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name},templateSelection:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name}}).on("select2:selecting",function(selectEvent){var allOptions,selectElement=this,selectedOptionId=selectEvent.params.args.data.id,fieldsToExclude=["select","deselect"];_.contains(fieldsToExclude,selectedOptionId)&&(selectEvent.preventDefault(),"deselect"===selectedOptionId?jQuery(selectElement).val("").trigger("change"):(allOptions=[],_.each(container.find("option"),function(field){_.contains(fieldsToExclude,field.value)||allOptions.push(field.value)}),jQuery(selectElement).val(allOptions).trigger("change")),jQuery(selectElement).select2("close"))}).on("change",function(){toggleNextStepButton(window.exportData.segments&&segmentsContainerElement.select2("data").length&&subscriberFieldsContainerElement.select2("data").length||!window.exportData.segments&&subscriberFieldsContainerElement.select2("data").length?"on":"off")})},window.segments.forEach(function(item){segmentsContainerElement.append(jQuery("<option></option>").attr("value",item.id).text(item.name))}),renderSegmentsAndFields(segmentsContainerElement,window.segments),renderSegmentsAndFields(subscriberFieldsContainerElement,window.subscriberFieldsSelect2),subscriberFieldsContainerElement.val(["email","first_name","last_name","list_status","global_status"]).trigger("change"),nextStepButton.click(function(){var exportFormat;jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),exportFormat=jQuery(':radio[name="option_format"]:checked').val(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processExport",data:JSON.stringify({export_format_option:exportFormat,segments:!!window.exportData.segments&&segmentsContainerElement.val(),subscriber_fields:subscriberFieldsContainerElement.val()})}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){var resultMessage=MailPoet.I18n.t("exportMessage").replace("%1$s","<strong>"+parseInt(response.data.totalExported,10).toLocaleString()+"</strong>").replace("[link]",'<a href="'+response.data.exportFileURL+'" target="_blank" >').replace("[/link]","</a>");jQuery("#export_result_notice").html("<p>"+resultMessage+"</p>").show(),window.location.href=response.data.exportFileURL,MailPoet.trackEvent("Subscribers export completed",{"Total exported":response.data.totalExported,"File Format":exportFormat,"MailPoet Free version":window.mailpoet_version})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))}))})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactDom=__webpack_require__(12),_reactDom2=_interopRequireDefault(_reactDom),_reactRouterDom=__webpack_require__(8),_steps_controller=__webpack_require__(466),_steps_controller2=_interopRequireDefault(_steps_controller),container=document.getElementById("welcome_wizard_container");container&&_reactDom2.default.render(_react2.default.createElement(_reactRouterDom.HashRouter,null,_react2.default.createElement("div",null,_react2.default.createElement(_reactRouterDom.Route,{exact:!0,path:"/",render:function(){return _react2.default.createElement(_reactRouterDom.Redirect,{to:"/steps/1"})}}),_react2.default.createElement(_reactRouterDom.Route,{path:"/steps/:step",component:_steps_controller2.default}))),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_header=__webpack_require__(467),_header2=_interopRequireDefault(_header),_sender_step=__webpack_require__(469),_sender_step2=_interopRequireDefault(_sender_step),_migrated_user_step=__webpack_require__(470),_migrated_user_step2=_interopRequireDefault(_migrated_user_step),_help_info_step=__webpack_require__(471),_help_info_step2=_interopRequireDefault(_help_info_step),_usage_tracking_step=__webpack_require__(472),_usage_tracking_step2=_interopRequireDefault(_usage_tracking_step),_woo_commerce_step=__webpack_require__(473),_woo_commerce_step2=_interopRequireDefault(_woo_commerce_step),WelcomeWizardStepsController=function(_React$Component){function WelcomeWizardStepsController(props){_classCallCheck(this,WelcomeWizardStepsController);var _this=_possibleConstructorReturn(this,(WelcomeWizardStepsController.__proto__||Object.getPrototypeOf(WelcomeWizardStepsController)).call(this,props));return _this.state={stepsCount:window.is_woocommerce_active?4:3,shouldSetSender:!window.is_mp2_migration_complete,loading:!1,sender:window.sender_data},_this.finishWizard=_this.finishWizard.bind(_this),_this.updateSettings=_this.updateSettings.bind(_this),_this.activateTracking=_this.activateTracking.bind(_this),_this.updateSender=_this.updateSender.bind(_this),_this.submitSender=_this.submitSender.bind(_this),_this.showWooCommerceStepOrFinish=_this.showWooCommerceStepOrFinish.bind(_this),_this.componentDidUpdate(),_this}return _inherits(WelcomeWizardStepsController,_React$Component),_createClass(WelcomeWizardStepsController,[{key:"componentDidUpdate",value:function(){var step=parseInt(this.props.match.params.step,10);(step>this.state.stepsCount||step<1)&&this.props.history.push("/steps/1")}},{key:"finishWizard",value:function(){this.setState({loading:!0}),window.location=window.finish_wizard_url}},{key:"showWooCommerceStepOrFinish",value:function(){4===this.state.stepsCount?this.props.history.push("/steps/4"):this.finishWizard()}},{key:"updateSettings",value:function(data){var _this2=this;return this.setState({loading:!0}),_mailpoet2.default.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:data}).then(function(){return _this2.setState({loading:!1})}).fail(function(response){_this2.setState({loading:!1}),response.errors.length>0&&_mailpoet2.default.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"activateTracking",value:function(){var _this3=this;this.updateSettings({analytics:{enabled:!0}}).then(function(){return _this3.showWooCommerceStepOrFinish()})}},{key:"updateSender",value:function(data){this.setState({sender:Object.assign({},this.state.sender,data)})}},{key:"submitSender",value:function(){var _this4=this;this.updateSettings({sender:this.state.sender}).then(function(){return _this4.props.history.push("/steps/2")})}},{key:"render",value:function(){var _this5=this,step=parseInt(this.props.match.params.step,10);return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},_react2.default.createElement(_header2.default,{current_step:step,steps_count:this.state.stepsCount,logo_src:window.mailpoet_logo_url}),1===step&&this.state.shouldSetSender?_react2.default.createElement(_sender_step2.default,{update_sender:this.updateSender,submit_sender:this.submitSender,finish:this.finishWizard,loading:this.state.loading,sender:this.state.sender}):null,1!==step||this.state.shouldSetSender?null:_react2.default.createElement(_migrated_user_step2.default,{next:function(){return _this5.props.history.push("/steps/2")}}),2===step?_react2.default.createElement(_help_info_step2.default,{next:function(){return _this5.props.history.push("/steps/3")}}):null,3===step?_react2.default.createElement(_usage_tracking_step2.default,{skip_action:this.showWooCommerceStepOrFinish,allow_action:this.activateTracking,allow_text:4===this.state.stepsCount?_mailpoet2.default.I18n.t("allowAndContinue"):_mailpoet2.default.I18n.t("allowAndFinish"),loading:this.state.loading}):null,4===step?_react2.default.createElement(_woo_commerce_step2.default,{next:this.finishWizard,screenshot_src:window.woocommerce_screenshot_url,loading:this.state.loading}):null)}}]),WelcomeWizardStepsController}(_react2.default.Component);WelcomeWizardStepsController.propTypes={match:_propTypes2.default.shape({params:_propTypes2.default.shape({step:_propTypes2.default.string}).isRequired}).isRequired,history:_propTypes2.default.shape({push:_propTypes2.default.func.isRequired}).isRequired},module.exports=WelcomeWizardStepsController},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_stepped_progess_bar=__webpack_require__(468),_stepped_progess_bar2=_interopRequireDefault(_stepped_progess_bar),WelcomeWizardHeader=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_centered_column mailpoet_welcome_wizard_header"},_react2.default.createElement("img",{src:props.logo_src,width:"200",alt:"MailPoet logo"}),props.current_step<=props.steps_count?_react2.default.createElement(_stepped_progess_bar2.default,{steps_count:props.steps_count,step:props.current_step}):null)};WelcomeWizardHeader.propTypes={current_step:_propTypes2.default.number.isRequired,steps_count:_propTypes2.default.number.isRequired,logo_src:_propTypes2.default.string.isRequired},module.exports=WelcomeWizardHeader},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),SteppedProgressBar=function(props){return props.step>props.steps_count?null:_react2.default.createElement("div",{className:"mailpoet_stepped_progress_bar"},[].concat(_toConsumableArray(Array(props.steps_count).keys())).map(function(step){return _react2.default.createElement("div",{className:"mailpoet_stepped_progress_bar_step "+(step<props.step?"active":""),key:"step_"+step,style:{width:Math.floor(100/props.steps_count)+"%"}})}))};SteppedProgressBar.propTypes={steps_count:_propTypes2.default.number.isRequired,step:_propTypes2.default.number.isRequired},module.exports=SteppedProgressBar},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_jquery=__webpack_require__(5),_jquery2=_interopRequireDefault(_jquery),WelcomeWizardSenderStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardLetsStartTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardSenderText")),_react2.default.createElement("form",{id:"mailpoet_sender_form",className:"mailpoet_welcome_wizard_centered_column "+(props.loading?"mailpoet_sender_form_loading":""),onSubmit:function(e){e.preventDefault(),(0,_jquery2.default)("#mailpoet_sender_form").parsley().validate()&&props.submit_sender()}},_react2.default.createElement("label",{htmlFor:"senderName"},_mailpoet2.default.I18n.t("senderName"),":",_react2.default.createElement("input",{name:"senderName",type:"text",placeholder:"John Doe",value:props.sender?props.sender.name:"","data-parsley-required":!0,onChange:function(e){return props.update_sender({name:e.target.value})}})),_react2.default.createElement("label",{htmlFor:"senderAddress"},_mailpoet2.default.I18n.t("senderAddress"),":",_react2.default.createElement("input",{name:"senderAddress",type:"text",placeholder:"john@doe.com",value:props.sender?props.sender.address:"","data-parsley-required":!0,"data-parsley-type":"email",onChange:function(e){return props.update_sender({address:e.target.value})}})),_react2.default.createElement("input",{className:"button button-primary",type:"submit",value:_mailpoet2.default.I18n.t("next")}),_react2.default.createElement("a",{onClick:props.finish,href:"#finish"},_mailpoet2.default.I18n.t("noThanksSkip"))))};WelcomeWizardSenderStep.propTypes={finish:_propTypes2.default.func.isRequired,loading:_propTypes2.default.bool.isRequired,update_sender:_propTypes2.default.func.isRequired,submit_sender:_propTypes2.default.func.isRequired,sender:_propTypes2.default.shape({name:_propTypes2.default.string,address:_propTypes2.default.string})},WelcomeWizardSenderStep.defaultProps={sender:null},module.exports=WelcomeWizardSenderStep},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),WelcomeWizardMigratedUserStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardLetsStartTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardSenderMigratedUserText")),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},_react2.default.createElement("button",{className:"button button-primary",onClick:props.next},_mailpoet2.default.I18n.t("next"))))};WelcomeWizardMigratedUserStep.propTypes={next:_propTypes2.default.func.isRequired},module.exports=WelcomeWizardMigratedUserStep},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(26),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),WelcomeWizardHelpInfoStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_welcome_wizard_support_button"}),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardYouCanContactText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)}))),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_badge mailpoet_badge_video mailpoet_welcome_wizard_video_badge"},_react2.default.createElement("span",{className:"dashicons dashicons-format-video"}),_mailpoet2.default.I18n.t("seeVideoGuide")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardAboutVideosText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)}))),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},_react2.default.createElement("span",{className:"mailpoet_welcome_wizard_mail_icon"}),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardAboutCourseText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return _react2.default.createElement("strong",{key:match},match)})),_react2.default.createElement("iframe",{id:"mailpoet_form_iframe",width:"100%",scrolling:"no",frameBorder:"0",title:"Apply to course",src:"https://newsletters.mailpoet.com?mailpoet_form_iframe=13",className:"mailpoet_form_iframe",marginWidth:"0",marginHeight:"0",allowtransparency:"true"})),_react2.default.createElement("button",{className:"button button-primary",onClick:props.next},_mailpoet2.default.I18n.t("next")))};module.exports=WelcomeWizardHelpInfoStep,WelcomeWizardHelpInfoStep.propTypes={next:_propTypes2.default.func.isRequired},module.exports=WelcomeWizardHelpInfoStep},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_reactStringReplace=__webpack_require__(26),_reactStringReplace2=_interopRequireDefault(_reactStringReplace),WelcomeWizardUsageTrackingStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardUsageTrackingStepTitle")),_react2.default.createElement("p",null,(0,_reactStringReplace2.default)(_mailpoet2.default.I18n.t("welcomeWizardTrackingText"),/\[link\](.*?)\[\/link\]/g,function(match){return _react2.default.createElement("a",{key:"docs_link",href:"https://beta.docs.mailpoet.com/article/130-sharing-your-data-with-us",target:"_blank",rel:"noopener noreferrer"},match)})),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n "+(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},_react2.default.createElement("button",{className:"button",onClick:props.skip_action,disabled:props.loading},_mailpoet2.default.I18n.t("skip")),_react2.default.createElement("button",{className:"button button-primary",onClick:props.allow_action,disabled:props.loading},props.allow_text)))};module.exports=WelcomeWizardUsageTrackingStep,WelcomeWizardUsageTrackingStep.propTypes={allow_action:_propTypes2.default.func.isRequired,allow_text:_propTypes2.default.string.isRequired,skip_action:_propTypes2.default.func.isRequired,loading:_propTypes2.default.bool.isRequired}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),WelcomeWizardWooCommerceStep=function(props){return _react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("welcomeWizardWooCommerceStepTitle")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardHelpingShopOwnersText")),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("welcomeWizardWooCommerceEmailsText")),_react2.default.createElement("img",{src:props.screenshot_src,className:"mailpoet_welcome_wizard_woo_screenshot",alt:"WooCommerce email"}),_react2.default.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n "+(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},_react2.default.createElement("button",{className:"button button-primary",onClick:props.next,disabled:props.loading},_mailpoet2.default.I18n.t("gotIt"))))};module.exports=WelcomeWizardWooCommerceStep,WelcomeWizardWooCommerceStep.propTypes={next:_propTypes2.default.func.isRequired,screenshot_src:_propTypes2.default.string.isRequired,loading:_propTypes2.default.bool.isRequired}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _reactDom=__webpack_require__(12),_reactDom2=_interopRequireDefault(_reactDom),_react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_new_subscriber_announcement=__webpack_require__(475),_new_subscriber_announcement2=_interopRequireDefault(_new_subscriber_announcement),container=document.getElementById("new_subscriber_announcement");container&&_reactDom2.default.render(_react2.default.createElement(_new_subscriber_announcement2.default,{installedAt:window.mailpoet_installed_at,imageUrl:window.mailpoet_new_subscriber_announcement_image}),container)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_propTypes=__webpack_require__(2),_propTypes2=_interopRequireDefault(_propTypes),_mailpoet=__webpack_require__(3),_mailpoet2=_interopRequireDefault(_mailpoet),_moment=__webpack_require__(0),_moment2=_interopRequireDefault(_moment),_in_app_announcement=__webpack_require__(274),_in_app_announcement2=_interopRequireDefault(_in_app_announcement),NewSubscriberNotificationAnnouncement=function(props){return _react2.default.createElement(_in_app_announcement2.default,{validUntil:(0,_moment2.default)(props.installedAt).add(3,"months").toDate(),height:"700px",showOnlyOnceSlug:"new_subscriber_notification",showToNewUser:!1},_react2.default.createElement("div",{className:"new_subscriber_notification_announcement"},_react2.default.createElement("h1",null,_mailpoet2.default.I18n.t("announcementHeader")),_react2.default.createElement("img",{src:props.imageUrl,width:"600px",height:"460px",alt:""}),_react2.default.createElement("p",null,_mailpoet2.default.I18n.t("announcementParagraph1"),_react2.default.createElement("br",null),_mailpoet2.default.I18n.t("announcementParagraph2"))))};NewSubscriberNotificationAnnouncement.propTypes={installedAt:_propTypes2.default.string.isRequired,imageUrl:_propTypes2.default.string.isRequired},module.exports=NewSubscriberNotificationAnnouncement},function(module,exports,__webpack_require__){"use strict";(function(setImmediate){function displayPoll(){window.mailpoet_display_nps_poll&&window.satismeter&&window.mailpoet_installed_at_isoFormat&&(window.satismeter({writeKey:"6L479eVPXk7pBn6S",userId:window.mailpoet_current_wp_user.ID+window.mailpoet_site_url,traits:{name:window.mailpoet_current_wp_user.user_nicename,email:window.mailpoet_current_wp_user.user_email,createdAt:window.mailpoet_installed_at_isoFormat}}),window.satismeter({writeKey:"k0aJAsQAWI2ERyGv",userId:window.mailpoet_current_wp_user.ID+window.mailpoet_site_url,traits:{name:window.mailpoet_current_wp_user.user_nicename,email:window.mailpoet_current_wp_user.user_email,createdAt:window.mailpoet_installed_at_isoFormat}}))}setImmediate(displayPoll)}).call(exports,__webpack_require__(294).setImmediate)}],[411]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin_vendor.6e1f275b.js
ADDED
@@ -0,0 +1,57 @@
|
|
|
1 |
+
webpackJsonp([0],[function(module,exports,__webpack_require__){(function(module){!function(global,factory){module.exports=factory()}(0,function(){"use strict";function hooks(){return hookCallback.apply(null,arguments)}function isArray(input){return input instanceof Array||"[object Array]"===Object.prototype.toString.call(input)}function isObject(input){return null!=input&&"[object Object]"===Object.prototype.toString.call(input)}function isObjectEmpty(obj){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(obj).length;var k;for(k in obj)if(obj.hasOwnProperty(k))return!1;return!0}function isUndefined(input){return void 0===input}function isNumber(input){return"number"==typeof input||"[object Number]"===Object.prototype.toString.call(input)}function isDate(input){return input instanceof Date||"[object Date]"===Object.prototype.toString.call(input)}function map(arr,fn){var i,res=[];for(i=0;i<arr.length;++i)res.push(fn(arr[i],i));return res}function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function extend(a,b){for(var i in b)hasOwnProp(b,i)&&(a[i]=b[i]);return hasOwnProp(b,"toString")&&(a.toString=b.toString),hasOwnProp(b,"valueOf")&&(a.valueOf=b.valueOf),a}function createUTC(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,!0).utc()}function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function getParsingFlags(m){return null==m._pf&&(m._pf=defaultParsingFlags()),m._pf}function isValid(m){if(null==m._isValid){var flags=getParsingFlags(m),parsedParts=some.call(flags.parsedDateParts,function(i){return null!=i}),isNowValid=!isNaN(m._d.getTime())&&flags.overflow<0&&!flags.empty&&!flags.invalidMonth&&!flags.invalidWeekday&&!flags.weekdayMismatch&&!flags.nullInput&&!flags.invalidFormat&&!flags.userInvalidated&&(!flags.meridiem||flags.meridiem&&parsedParts);if(m._strict&&(isNowValid=isNowValid&&0===flags.charsLeftOver&&0===flags.unusedTokens.length&&void 0===flags.bigHour),null!=Object.isFrozen&&Object.isFrozen(m))return isNowValid;m._isValid=isNowValid}return m._isValid}function createInvalid(flags){var m=createUTC(NaN);return null!=flags?extend(getParsingFlags(m),flags):getParsingFlags(m).userInvalidated=!0,m}function copyConfig(to,from){var i,prop,val;if(isUndefined(from._isAMomentObject)||(to._isAMomentObject=from._isAMomentObject),isUndefined(from._i)||(to._i=from._i),isUndefined(from._f)||(to._f=from._f),isUndefined(from._l)||(to._l=from._l),isUndefined(from._strict)||(to._strict=from._strict),isUndefined(from._tzm)||(to._tzm=from._tzm),isUndefined(from._isUTC)||(to._isUTC=from._isUTC),isUndefined(from._offset)||(to._offset=from._offset),isUndefined(from._pf)||(to._pf=getParsingFlags(from)),isUndefined(from._locale)||(to._locale=from._locale),momentProperties.length>0)for(i=0;i<momentProperties.length;i++)prop=momentProperties[i],val=from[prop],isUndefined(val)||(to[prop]=val);return to}function Moment(config){copyConfig(this,config),this._d=new Date(null!=config._d?config._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===updateInProgress&&(updateInProgress=!0,hooks.updateOffset(this),updateInProgress=!1)}function isMoment(obj){return obj instanceof Moment||null!=obj&&null!=obj._isAMomentObject}function absFloor(number){return number<0?Math.ceil(number)||0:Math.floor(number)}function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;return 0!==coercedNumber&&isFinite(coercedNumber)&&(value=absFloor(coercedNumber)),value}function compareArrays(array1,array2,dontConvert){var i,len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0;for(i=0;i<len;i++)(dontConvert&&array1[i]!==array2[i]||!dontConvert&&toInt(array1[i])!==toInt(array2[i]))&&diffs++;return diffs+lengthDiff}function warn(msg){!1===hooks.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+msg)}function deprecate(msg,fn){var firstTime=!0;return extend(function(){if(null!=hooks.deprecationHandler&&hooks.deprecationHandler(null,msg),firstTime){for(var arg,args=[],i=0;i<arguments.length;i++){if(arg="","object"==typeof arguments[i]){arg+="\n["+i+"] ";for(var key in arguments[0])arg+=key+": "+arguments[0][key]+", ";arg=arg.slice(0,-2)}else arg=arguments[i];args.push(arg)}warn(msg+"\nArguments: "+Array.prototype.slice.call(args).join("")+"\n"+(new Error).stack),firstTime=!1}return fn.apply(this,arguments)},fn)}function deprecateSimple(name,msg){null!=hooks.deprecationHandler&&hooks.deprecationHandler(name,msg),deprecations[name]||(warn(msg),deprecations[name]=!0)}function isFunction(input){return input instanceof Function||"[object Function]"===Object.prototype.toString.call(input)}function set(config){var prop,i;for(i in config)prop=config[i],isFunction(prop)?this[i]=prop:this["_"+i]=prop;this._config=config,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(parentConfig,childConfig){var prop,res=extend({},parentConfig);for(prop in childConfig)hasOwnProp(childConfig,prop)&&(isObject(parentConfig[prop])&&isObject(childConfig[prop])?(res[prop]={},extend(res[prop],parentConfig[prop]),extend(res[prop],childConfig[prop])):null!=childConfig[prop]?res[prop]=childConfig[prop]:delete res[prop]);for(prop in parentConfig)hasOwnProp(parentConfig,prop)&&!hasOwnProp(childConfig,prop)&&isObject(parentConfig[prop])&&(res[prop]=extend({},res[prop]));return res}function Locale(config){null!=config&&this.set(config)}function calendar(key,mom,now){var output=this._calendar[key]||this._calendar.sameElse;return isFunction(output)?output.call(mom,now):output}function longDateFormat(key){var format=this._longDateFormat[key],formatUpper=this._longDateFormat[key.toUpperCase()];return format||!formatUpper?format:(this._longDateFormat[key]=formatUpper.replace(/MMMM|MM|DD|dddd/g,function(val){return val.slice(1)}),this._longDateFormat[key])}function invalidDate(){return this._invalidDate}function ordinal(number){return this._ordinal.replace("%d",number)}function relativeTime(number,withoutSuffix,string,isFuture){var output=this._relativeTime[string];return isFunction(output)?output(number,withoutSuffix,string,isFuture):output.replace(/%d/i,number)}function pastFuture(diff,output){var format=this._relativeTime[diff>0?"future":"past"];return isFunction(format)?format(output):format.replace(/%s/i,output)}function addUnitAlias(unit,shorthand){var lowerCase=unit.toLowerCase();aliases[lowerCase]=aliases[lowerCase+"s"]=aliases[shorthand]=unit}function normalizeUnits(units){return"string"==typeof units?aliases[units]||aliases[units.toLowerCase()]:void 0}function normalizeObjectUnits(inputObject){var normalizedProp,prop,normalizedInput={};for(prop in inputObject)hasOwnProp(inputObject,prop)&&(normalizedProp=normalizeUnits(prop))&&(normalizedInput[normalizedProp]=inputObject[prop]);return normalizedInput}function addUnitPriority(unit,priority){priorities[unit]=priority}function getPrioritizedUnits(unitsObj){var units=[];for(var u in unitsObj)units.push({unit:u,priority:priorities[u]});return units.sort(function(a,b){return a.priority-b.priority}),units}function zeroFill(number,targetLength,forceSign){var absNumber=""+Math.abs(number),zerosToFill=targetLength-absNumber.length;return(number>=0?forceSign?"+":"":"-")+Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber}function addFormatToken(token,padded,ordinal,callback){var func=callback;"string"==typeof callback&&(func=function(){return this[callback]()}),token&&(formatTokenFunctions[token]=func),padded&&(formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2])}),ordinal&&(formatTokenFunctions[ordinal]=function(){return this.localeData().ordinal(func.apply(this,arguments),token)})}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|\]$/g,""):input.replace(/\\/g,"")}function makeFormatFunction(format){var i,length,array=format.match(formattingTokens);for(i=0,length=array.length;i<length;i++)formatTokenFunctions[array[i]]?array[i]=formatTokenFunctions[array[i]]:array[i]=removeFormattingTokens(array[i]);return function(mom){var i,output="";for(i=0;i<length;i++)output+=isFunction(array[i])?array[i].call(mom,format):array[i];return output}}function formatMoment(m,format){return m.isValid()?(format=expandFormat(format,m.localeData()),formatFunctions[format]=formatFunctions[format]||makeFormatFunction(format),formatFunctions[format](m)):m.localeData().invalidDate()}function expandFormat(format,locale){function replaceLongDateFormatTokens(input){return locale.longDateFormat(input)||input}var i=5;for(localFormattingTokens.lastIndex=0;i>=0&&localFormattingTokens.test(format);)format=format.replace(localFormattingTokens,replaceLongDateFormatTokens),localFormattingTokens.lastIndex=0,i-=1;return format}function addRegexToken(token,regex,strictRegex){regexes[token]=isFunction(regex)?regex:function(isStrict,localeData){return isStrict&&strictRegex?strictRegex:regex}}function getParseRegexForToken(token,config){return hasOwnProp(regexes,token)?regexes[token](config._strict,config._locale):new RegExp(unescapeFormat(token))}function unescapeFormat(s){return regexEscape(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4}))}function regexEscape(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function addParseToken(token,callback){var i,func=callback;for("string"==typeof token&&(token=[token]),isNumber(callback)&&(func=function(input,array){array[callback]=toInt(input)}),i=0;i<token.length;i++)tokens[token[i]]=func}function addWeekParseToken(token,callback){addParseToken(token,function(input,array,config,token){config._w=config._w||{},callback(input,config._w,config,token)})}function addTimeToArrayFromToken(token,input,config){null!=input&&hasOwnProp(tokens,token)&&tokens[token](input,config._a,config,token)}function daysInYear(year){return isLeapYear(year)?366:365}function isLeapYear(year){return year%4==0&&year%100!=0||year%400==0}function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(unit,keepTime){return function(value){return null!=value?(set$1(this,unit,value),hooks.updateOffset(this,keepTime),this):get(this,unit)}}function get(mom,unit){return mom.isValid()?mom._d["get"+(mom._isUTC?"UTC":"")+unit]():NaN}function set$1(mom,unit,value){mom.isValid()&&!isNaN(value)&&("FullYear"===unit&&isLeapYear(mom.year())&&1===mom.month()&&29===mom.date()?mom._d["set"+(mom._isUTC?"UTC":"")+unit](value,mom.month(),daysInMonth(value,mom.month())):mom._d["set"+(mom._isUTC?"UTC":"")+unit](value))}function stringGet(units){return units=normalizeUnits(units),isFunction(this[units])?this[units]():this}function stringSet(units,value){if("object"==typeof units){units=normalizeObjectUnits(units);for(var prioritized=getPrioritizedUnits(units),i=0;i<prioritized.length;i++)this[prioritized[i].unit](units[prioritized[i].unit])}else if(units=normalizeUnits(units),isFunction(this[units]))return this[units](value);return this}function mod(n,x){return(n%x+x)%x}function daysInMonth(year,month){if(isNaN(year)||isNaN(month))return NaN;var modMonth=mod(month,12);return year+=(month-modMonth)/12,1===modMonth?isLeapYear(year)?29:28:31-modMonth%7%2}function localeMonths(m,format){return m?isArray(this._months)?this._months[m.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(format)?"format":"standalone"][m.month()]:isArray(this._months)?this._months:this._months.standalone}function localeMonthsShort(m,format){return m?isArray(this._monthsShort)?this._monthsShort[m.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(format)?"format":"standalone"][m.month()]:isArray(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(monthName,format,strict){var i,ii,mom,llc=monthName.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)mom=createUTC([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(mom,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(mom,"").toLocaleLowerCase();return strict?"MMM"===format?(ii=indexOf.call(this._shortMonthsParse,llc),-1!==ii?ii:null):(ii=indexOf.call(this._longMonthsParse,llc),-1!==ii?ii:null):"MMM"===format?-1!==(ii=indexOf.call(this._shortMonthsParse,llc))?ii:(ii=indexOf.call(this._longMonthsParse,llc),-1!==ii?ii:null):-1!==(ii=indexOf.call(this._longMonthsParse,llc))?ii:(ii=indexOf.call(this._shortMonthsParse,llc),-1!==ii?ii:null)}function localeMonthsParse(monthName,format,strict){var i,mom,regex;if(this._monthsParseExact)return handleStrictParse.call(this,monthName,format,strict);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(mom=createUTC([2e3,i]),strict&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(mom,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(mom,"").replace(".","")+"$","i")),strict||this._monthsParse[i]||(regex="^"+this.months(mom,"")+"|^"+this.monthsShort(mom,""),this._monthsParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&"MMMM"===format&&this._longMonthsParse[i].test(monthName))return i;if(strict&&"MMM"===format&&this._shortMonthsParse[i].test(monthName))return i;if(!strict&&this._monthsParse[i].test(monthName))return i}}function setMonth(mom,value){var dayOfMonth;if(!mom.isValid())return mom;if("string"==typeof value)if(/^\d+$/.test(value))value=toInt(value);else if(value=mom.localeData().monthsParse(value),!isNumber(value))return mom;return dayOfMonth=Math.min(mom.date(),daysInMonth(mom.year(),value)),mom._d["set"+(mom._isUTC?"UTC":"")+"Month"](value,dayOfMonth),mom}function getSetMonth(value){return null!=value?(setMonth(this,value),hooks.updateOffset(this,!0),this):get(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(isStrict){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),isStrict?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&isStrict?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(isStrict){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),isStrict?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&isStrict?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function cmpLenRev(a,b){return b.length-a.length}var i,mom,shortPieces=[],longPieces=[],mixedPieces=[];for(i=0;i<12;i++)mom=createUTC([2e3,i]),shortPieces.push(this.monthsShort(mom,"")),longPieces.push(this.months(mom,"")),mixedPieces.push(this.months(mom,"")),mixedPieces.push(this.monthsShort(mom,""));for(shortPieces.sort(cmpLenRev),longPieces.sort(cmpLenRev),mixedPieces.sort(cmpLenRev),i=0;i<12;i++)shortPieces[i]=regexEscape(shortPieces[i]),longPieces[i]=regexEscape(longPieces[i]);for(i=0;i<24;i++)mixedPieces[i]=regexEscape(mixedPieces[i]);this._monthsRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+longPieces.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+shortPieces.join("|")+")","i")}function createDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);return y<100&&y>=0&&isFinite(date.getFullYear())&&date.setFullYear(y),date}function createUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));return y<100&&y>=0&&isFinite(date.getUTCFullYear())&&date.setUTCFullYear(y),date}function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy;return-(7+createUTCDate(year,0,fwd).getUTCDay()-dow)%7+fwd-1}function dayOfYearFromWeeks(year,week,weekday,dow,doy){var resYear,resDayOfYear,localWeekday=(7+weekday-dow)%7,weekOffset=firstWeekOffset(year,dow,doy),dayOfYear=1+7*(week-1)+localWeekday+weekOffset;return dayOfYear<=0?(resYear=year-1,resDayOfYear=daysInYear(resYear)+dayOfYear):dayOfYear>daysInYear(year)?(resYear=year+1,resDayOfYear=dayOfYear-daysInYear(year)):(resYear=year,resDayOfYear=dayOfYear),{year:resYear,dayOfYear:resDayOfYear}}function weekOfYear(mom,dow,doy){var resWeek,resYear,weekOffset=firstWeekOffset(mom.year(),dow,doy),week=Math.floor((mom.dayOfYear()-weekOffset-1)/7)+1;return week<1?(resYear=mom.year()-1,resWeek=week+weeksInYear(resYear,dow,doy)):week>weeksInYear(mom.year(),dow,doy)?(resWeek=week-weeksInYear(mom.year(),dow,doy),resYear=mom.year()+1):(resYear=mom.year(),resWeek=week),{week:resWeek,year:resYear}}function weeksInYear(year,dow,doy){var weekOffset=firstWeekOffset(year,dow,doy),weekOffsetNext=firstWeekOffset(year+1,dow,doy);return(daysInYear(year)-weekOffset+weekOffsetNext)/7}function localeWeek(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week}function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(input){var week=this.localeData().week(this);return null==input?week:this.add(7*(input-week),"d")}function getSetISOWeek(input){var week=weekOfYear(this,1,4).week;return null==input?week:this.add(7*(input-week),"d")}function parseWeekday(input,locale){return"string"!=typeof input?input:isNaN(input)?(input=locale.weekdaysParse(input),"number"==typeof input?input:null):parseInt(input,10)}function parseIsoWeekday(input,locale){return"string"==typeof input?locale.weekdaysParse(input)%7||7:isNaN(input)?null:input}function localeWeekdays(m,format){return m?isArray(this._weekdays)?this._weekdays[m.day()]:this._weekdays[this._weekdays.isFormat.test(format)?"format":"standalone"][m.day()]:isArray(this._weekdays)?this._weekdays:this._weekdays.standalone}function localeWeekdaysShort(m){return m?this._weekdaysShort[m.day()]:this._weekdaysShort}function localeWeekdaysMin(m){return m?this._weekdaysMin[m.day()]:this._weekdaysMin}function handleStrictParse$1(weekdayName,format,strict){var i,ii,mom,llc=weekdayName.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)mom=createUTC([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(mom,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(mom,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(mom,"").toLocaleLowerCase();return strict?"dddd"===format?(ii=indexOf.call(this._weekdaysParse,llc),-1!==ii?ii:null):"ddd"===format?(ii=indexOf.call(this._shortWeekdaysParse,llc),-1!==ii?ii:null):(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):"dddd"===format?-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._shortWeekdaysParse,llc))?ii:(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):"ddd"===format?-1!==(ii=indexOf.call(this._shortWeekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):-1!==(ii=indexOf.call(this._minWeekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:(ii=indexOf.call(this._shortWeekdaysParse,llc),-1!==ii?ii:null)}function localeWeekdaysParse(weekdayName,format,strict){var i,mom,regex;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,weekdayName,format,strict);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(mom=createUTC([2e3,1]).day(i),strict&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(mom,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(mom,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(mom,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(regex="^"+this.weekdays(mom,"")+"|^"+this.weekdaysShort(mom,"")+"|^"+this.weekdaysMin(mom,""),this._weekdaysParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&"dddd"===format&&this._fullWeekdaysParse[i].test(weekdayName))return i;if(strict&&"ddd"===format&&this._shortWeekdaysParse[i].test(weekdayName))return i;if(strict&&"dd"===format&&this._minWeekdaysParse[i].test(weekdayName))return i;if(!strict&&this._weekdaysParse[i].test(weekdayName))return i}}function getSetDayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;var day=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=input?(input=parseWeekday(input,this.localeData()),this.add(input-day,"d")):day}function getSetLocaleDayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;var weekday=(this.day()+7-this.localeData()._week.dow)%7;return null==input?weekday:this.add(input-weekday,"d")}function getSetISODayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;if(null!=input){var weekday=parseIsoWeekday(input,this.localeData());return this.day(this.day()%7?weekday:weekday-7)}return this.day()||7}function weekdaysRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&isStrict?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function cmpLenRev(a,b){return b.length-a.length}var i,mom,minp,shortp,longp,minPieces=[],shortPieces=[],longPieces=[],mixedPieces=[];for(i=0;i<7;i++)mom=createUTC([2e3,1]).day(i),minp=this.weekdaysMin(mom,""),shortp=this.weekdaysShort(mom,""),longp=this.weekdays(mom,""),minPieces.push(minp),shortPieces.push(shortp),longPieces.push(longp),mixedPieces.push(minp),mixedPieces.push(shortp),mixedPieces.push(longp);for(minPieces.sort(cmpLenRev),shortPieces.sort(cmpLenRev),longPieces.sort(cmpLenRev),mixedPieces.sort(cmpLenRev),i=0;i<7;i++)shortPieces[i]=regexEscape(shortPieces[i]),longPieces[i]=regexEscape(longPieces[i]),mixedPieces[i]=regexEscape(mixedPieces[i]);this._weekdaysRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+longPieces.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+shortPieces.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+minPieces.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}function meridiem(token,lowercase){addFormatToken(token,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),lowercase)})}function matchMeridiem(isStrict,locale){return locale._meridiemParse}function localeIsPM(input){return"p"===(input+"").toLowerCase().charAt(0)}function localeMeridiem(hours,minutes,isLower){return hours>11?isLower?"pm":"PM":isLower?"am":"AM"}function normalizeLocale(key){return key?key.toLowerCase().replace("_","-"):key}function chooseLocale(names){for(var j,next,locale,split,i=0;i<names.length;){for(split=normalizeLocale(names[i]).split("-"),j=split.length,next=normalizeLocale(names[i+1]),next=next?next.split("-"):null;j>0;){if(locale=loadLocale(split.slice(0,j).join("-")))return locale;if(next&&next.length>=j&&compareArrays(split,next,!0)>=j-1)break;j--}i++}return globalLocale}function loadLocale(name){var oldLocale=null;if(!locales[name]&&void 0!==module&&module&&module.exports)try{oldLocale=globalLocale._abbr;__webpack_require__(193)("./"+name),getSetGlobalLocale(oldLocale)}catch(e){}return locales[name]}function getSetGlobalLocale(key,values){var data;return key&&(data=isUndefined(values)?getLocale(key):defineLocale(key,values),data?globalLocale=data:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+key+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(name,config){if(null!==config){var locale,parentConfig=baseConfig;if(config.abbr=name,null!=locales[name])deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),parentConfig=locales[name]._config;else if(null!=config.parentLocale)if(null!=locales[config.parentLocale])parentConfig=locales[config.parentLocale]._config;else{if(null==(locale=loadLocale(config.parentLocale)))return localeFamilies[config.parentLocale]||(localeFamilies[config.parentLocale]=[]),localeFamilies[config.parentLocale].push({name:name,config:config}),null;parentConfig=locale._config}return locales[name]=new Locale(mergeConfigs(parentConfig,config)),localeFamilies[name]&&localeFamilies[name].forEach(function(x){defineLocale(x.name,x.config)}),getSetGlobalLocale(name),locales[name]}return delete locales[name],null}function updateLocale(name,config){if(null!=config){var locale,tmpLocale,parentConfig=baseConfig;tmpLocale=loadLocale(name),null!=tmpLocale&&(parentConfig=tmpLocale._config),config=mergeConfigs(parentConfig,config),locale=new Locale(config),locale.parentLocale=locales[name],locales[name]=locale,getSetGlobalLocale(name)}else null!=locales[name]&&(null!=locales[name].parentLocale?locales[name]=locales[name].parentLocale:null!=locales[name]&&delete locales[name]);return locales[name]}function getLocale(key){var locale;if(key&&key._locale&&key._locale._abbr&&(key=key._locale._abbr),!key)return globalLocale;if(!isArray(key)){if(locale=loadLocale(key))return locale;key=[key]}return chooseLocale(key)}function listLocales(){return keys(locales)}function checkOverflow(m){var overflow,a=m._a;return a&&-2===getParsingFlags(m).overflow&&(overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||24===a[HOUR]&&(0!==a[MINUTE]||0!==a[SECOND]||0!==a[MILLISECOND])?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(m)._overflowDayOfYear&&(overflow<YEAR||overflow>DATE)&&(overflow=DATE),getParsingFlags(m)._overflowWeeks&&-1===overflow&&(overflow=WEEK),getParsingFlags(m)._overflowWeekday&&-1===overflow&&(overflow=WEEKDAY),getParsingFlags(m).overflow=overflow),m}function defaults(a,b,c){return null!=a?a:null!=b?b:c}function currentDateArray(config){var nowValue=new Date(hooks.now());return config._useUTC?[nowValue.getUTCFullYear(),nowValue.getUTCMonth(),nowValue.getUTCDate()]:[nowValue.getFullYear(),nowValue.getMonth(),nowValue.getDate()]}function configFromArray(config){var i,date,currentDate,expectedWeekday,yearToUse,input=[];if(!config._d){for(currentDate=currentDateArray(config),config._w&&null==config._a[DATE]&&null==config._a[MONTH]&&dayOfYearFromWeekInfo(config),null!=config._dayOfYear&&(yearToUse=defaults(config._a[YEAR],currentDate[YEAR]),(config._dayOfYear>daysInYear(yearToUse)||0===config._dayOfYear)&&(getParsingFlags(config)._overflowDayOfYear=!0),date=createUTCDate(yearToUse,0,config._dayOfYear),config._a[MONTH]=date.getUTCMonth(),config._a[DATE]=date.getUTCDate()),i=0;i<3&&null==config._a[i];++i)config._a[i]=input[i]=currentDate[i];for(;i<7;i++)config._a[i]=input[i]=null==config._a[i]?2===i?1:0:config._a[i];24===config._a[HOUR]&&0===config._a[MINUTE]&&0===config._a[SECOND]&&0===config._a[MILLISECOND]&&(config._nextDay=!0,config._a[HOUR]=0),config._d=(config._useUTC?createUTCDate:createDate).apply(null,input),expectedWeekday=config._useUTC?config._d.getUTCDay():config._d.getDay(),null!=config._tzm&&config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),config._nextDay&&(config._a[HOUR]=24),config._w&&void 0!==config._w.d&&config._w.d!==expectedWeekday&&(getParsingFlags(config).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp,weekdayOverflow;if(w=config._w,null!=w.GG||null!=w.W||null!=w.E)dow=1,doy=4,weekYear=defaults(w.GG,config._a[YEAR],weekOfYear(createLocal(),1,4).year),week=defaults(w.W,1),((weekday=defaults(w.E,1))<1||weekday>7)&&(weekdayOverflow=!0);else{dow=config._locale._week.dow,doy=config._locale._week.doy;var curWeek=weekOfYear(createLocal(),dow,doy);weekYear=defaults(w.gg,config._a[YEAR],curWeek.year),week=defaults(w.w,curWeek.week),null!=w.d?((weekday=w.d)<0||weekday>6)&&(weekdayOverflow=!0):null!=w.e?(weekday=w.e+dow,(w.e<0||w.e>6)&&(weekdayOverflow=!0)):weekday=dow}week<1||week>weeksInYear(weekYear,dow,doy)?getParsingFlags(config)._overflowWeeks=!0:null!=weekdayOverflow?getParsingFlags(config)._overflowWeekday=!0:(temp=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),config._a[YEAR]=temp.year,config._dayOfYear=temp.dayOfYear)}function configFromISO(config){var i,l,allowTime,dateFormat,timeFormat,tzFormat,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string);if(match){for(getParsingFlags(config).iso=!0,i=0,l=isoDates.length;i<l;i++)if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0],allowTime=!1!==isoDates[i][2];break}if(null==dateFormat)return void(config._isValid=!1);if(match[3]){for(i=0,l=isoTimes.length;i<l;i++)if(isoTimes[i][1].exec(match[3])){timeFormat=(match[2]||" ")+isoTimes[i][0];break}if(null==timeFormat)return void(config._isValid=!1)}if(!allowTime&&null!=timeFormat)return void(config._isValid=!1);if(match[4]){if(!tzRegex.exec(match[4]))return void(config._isValid=!1);tzFormat="Z"}config._f=dateFormat+(timeFormat||"")+(tzFormat||""),configFromStringAndFormat(config)}else config._isValid=!1}function extractFromRFC2822Strings(yearStr,monthStr,dayStr,hourStr,minuteStr,secondStr){var result=[untruncateYear(yearStr),defaultLocaleMonthsShort.indexOf(monthStr),parseInt(dayStr,10),parseInt(hourStr,10),parseInt(minuteStr,10)];return secondStr&&result.push(parseInt(secondStr,10)),result}function untruncateYear(yearStr){var year=parseInt(yearStr,10);return year<=49?2e3+year:year<=999?1900+year:year}function preprocessRFC2822(s){return s.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function checkWeekday(weekdayStr,parsedInput,config){if(weekdayStr){if(defaultLocaleWeekdaysShort.indexOf(weekdayStr)!==new Date(parsedInput[0],parsedInput[1],parsedInput[2]).getDay())return getParsingFlags(config).weekdayMismatch=!0,config._isValid=!1,!1}return!0}function calculateOffset(obsOffset,militaryOffset,numOffset){if(obsOffset)return obsOffsets[obsOffset];if(militaryOffset)return 0;var hm=parseInt(numOffset,10),m=hm%100;return(hm-m)/100*60+m}function configFromRFC2822(config){var match=rfc2822.exec(preprocessRFC2822(config._i));if(match){var parsedArray=extractFromRFC2822Strings(match[4],match[3],match[2],match[5],match[6],match[7]);if(!checkWeekday(match[1],parsedArray,config))return;config._a=parsedArray,config._tzm=calculateOffset(match[8],match[9],match[10]),config._d=createUTCDate.apply(null,config._a),config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),getParsingFlags(config).rfc2822=!0}else config._isValid=!1}function configFromString(config){var matched=aspNetJsonRegex.exec(config._i);if(null!==matched)return void(config._d=new Date(+matched[1]));configFromISO(config),!1===config._isValid&&(delete config._isValid,configFromRFC2822(config),!1===config._isValid&&(delete config._isValid,hooks.createFromInputFallback(config)))}function configFromStringAndFormat(config){if(config._f===hooks.ISO_8601)return void configFromISO(config);if(config._f===hooks.RFC_2822)return void configFromRFC2822(config);config._a=[],getParsingFlags(config).empty=!0;var i,parsedInput,tokens,token,skipped,string=""+config._i,stringLength=string.length,totalParsedInputLength=0;for(tokens=expandFormat(config._f,config._locale).match(formattingTokens)||[],i=0;i<tokens.length;i++)token=tokens[i],parsedInput=(string.match(getParseRegexForToken(token,config))||[])[0],parsedInput&&(skipped=string.substr(0,string.indexOf(parsedInput)),skipped.length>0&&getParsingFlags(config).unusedInput.push(skipped),string=string.slice(string.indexOf(parsedInput)+parsedInput.length),totalParsedInputLength+=parsedInput.length),formatTokenFunctions[token]?(parsedInput?getParsingFlags(config).empty=!1:getParsingFlags(config).unusedTokens.push(token),addTimeToArrayFromToken(token,parsedInput,config)):config._strict&&!parsedInput&&getParsingFlags(config).unusedTokens.push(token);getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength,string.length>0&&getParsingFlags(config).unusedInput.push(string),config._a[HOUR]<=12&&!0===getParsingFlags(config).bigHour&&config._a[HOUR]>0&&(getParsingFlags(config).bigHour=void 0),getParsingFlags(config).parsedDateParts=config._a.slice(0),getParsingFlags(config).meridiem=config._meridiem,config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem),configFromArray(config),checkOverflow(config)}function meridiemFixWrap(locale,hour,meridiem){var isPm;return null==meridiem?hour:null!=locale.meridiemHour?locale.meridiemHour(hour,meridiem):null!=locale.isPM?(isPm=locale.isPM(meridiem),isPm&&hour<12&&(hour+=12),isPm||12!==hour||(hour=0),hour):hour}function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(0===config._f.length)return getParsingFlags(config).invalidFormat=!0,void(config._d=new Date(NaN));for(i=0;i<config._f.length;i++)currentScore=0,tempConfig=copyConfig({},config),null!=config._useUTC&&(tempConfig._useUTC=config._useUTC),tempConfig._f=config._f[i],configFromStringAndFormat(tempConfig),isValid(tempConfig)&&(currentScore+=getParsingFlags(tempConfig).charsLeftOver,currentScore+=10*getParsingFlags(tempConfig).unusedTokens.length,getParsingFlags(tempConfig).score=currentScore,(null==scoreToBeat||currentScore<scoreToBeat)&&(scoreToBeat=currentScore,bestMoment=tempConfig));extend(config,bestMoment||tempConfig)}function configFromObject(config){if(!config._d){var i=normalizeObjectUnits(config._i);config._a=map([i.year,i.month,i.day||i.date,i.hour,i.minute,i.second,i.millisecond],function(obj){return obj&&parseInt(obj,10)}),configFromArray(config)}}function createFromConfig(config){var res=new Moment(checkOverflow(prepareConfig(config)));return res._nextDay&&(res.add(1,"d"),res._nextDay=void 0),res}function prepareConfig(config){var input=config._i,format=config._f;return config._locale=config._locale||getLocale(config._l),null===input||void 0===format&&""===input?createInvalid({nullInput:!0}):("string"==typeof input&&(config._i=input=config._locale.preparse(input)),isMoment(input)?new Moment(checkOverflow(input)):(isDate(input)?config._d=input:isArray(format)?configFromStringAndArray(config):format?configFromStringAndFormat(config):configFromInput(config),isValid(config)||(config._d=null),config))}function configFromInput(config){var input=config._i;isUndefined(input)?config._d=new Date(hooks.now()):isDate(input)?config._d=new Date(input.valueOf()):"string"==typeof input?configFromString(config):isArray(input)?(config._a=map(input.slice(0),function(obj){return parseInt(obj,10)}),configFromArray(config)):isObject(input)?configFromObject(config):isNumber(input)?config._d=new Date(input):hooks.createFromInputFallback(config)}function createLocalOrUTC(input,format,locale,strict,isUTC){var c={};return!0!==locale&&!1!==locale||(strict=locale,locale=void 0),(isObject(input)&&isObjectEmpty(input)||isArray(input)&&0===input.length)&&(input=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=isUTC,c._l=locale,c._i=input,c._f=format,c._strict=strict,createFromConfig(c)}function createLocal(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,!1)}function pickBy(fn,moments){var res,i;if(1===moments.length&&isArray(moments[0])&&(moments=moments[0]),!moments.length)return createLocal();for(res=moments[0],i=1;i<moments.length;++i)moments[i].isValid()&&!moments[i][fn](res)||(res=moments[i]);return res}function min(){return pickBy("isBefore",[].slice.call(arguments,0))}function max(){return pickBy("isAfter",[].slice.call(arguments,0))}function isDurationValid(m){for(var key in m)if(-1===indexOf.call(ordering,key)||null!=m[key]&&isNaN(m[key]))return!1;for(var unitHasDecimal=!1,i=0;i<ordering.length;++i)if(m[ordering[i]]){if(unitHasDecimal)return!1;parseFloat(m[ordering[i]])!==toInt(m[ordering[i]])&&(unitHasDecimal=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months=normalizedInput.month||0,weeks=normalizedInput.week||0,days=normalizedInput.day||0,hours=normalizedInput.hour||0,minutes=normalizedInput.minute||0,seconds=normalizedInput.second||0,milliseconds=normalizedInput.millisecond||0;this._isValid=isDurationValid(normalizedInput),this._milliseconds=+milliseconds+1e3*seconds+6e4*minutes+1e3*hours*60*60,this._days=+days+7*weeks,this._months=+months+3*quarters+12*years,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(obj){return obj instanceof Duration}function absRound(number){return number<0?-1*Math.round(-1*number):Math.round(number)}function offset(token,separator){addFormatToken(token,0,0,function(){var offset=this.utcOffset(),sign="+";return offset<0&&(offset=-offset,sign="-"),sign+zeroFill(~~(offset/60),2)+separator+zeroFill(~~offset%60,2)})}function offsetFromString(matcher,string){var matches=(string||"").match(matcher);if(null===matches)return null;var chunk=matches[matches.length-1]||[],parts=(chunk+"").match(chunkOffset)||["-",0,0],minutes=60*parts[1]+toInt(parts[2]);return 0===minutes?0:"+"===parts[0]?minutes:-minutes}function cloneWithOffset(input,model){var res,diff;return model._isUTC?(res=model.clone(),diff=(isMoment(input)||isDate(input)?input.valueOf():createLocal(input).valueOf())-res.valueOf(),res._d.setTime(res._d.valueOf()+diff),hooks.updateOffset(res,!1),res):createLocal(input).local()}function getDateOffset(m){return 15*-Math.round(m._d.getTimezoneOffset()/15)}function getSetOffset(input,keepLocalTime,keepMinutes){var localAdjust,offset=this._offset||0;if(!this.isValid())return null!=input?this:NaN;if(null!=input){if("string"==typeof input){if(null===(input=offsetFromString(matchShortOffset,input)))return this}else Math.abs(input)<16&&!keepMinutes&&(input*=60);return!this._isUTC&&keepLocalTime&&(localAdjust=getDateOffset(this)),this._offset=input,this._isUTC=!0,null!=localAdjust&&this.add(localAdjust,"m"),offset!==input&&(!keepLocalTime||this._changeInProgress?addSubtract(this,createDuration(input-offset,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?offset:getDateOffset(this)}function getSetZone(input,keepLocalTime){return null!=input?("string"!=typeof input&&(input=-input),this.utcOffset(input,keepLocalTime),this):-this.utcOffset()}function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime)}function setOffsetToLocal(keepLocalTime){return this._isUTC&&(this.utcOffset(0,keepLocalTime),this._isUTC=!1,keepLocalTime&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var tZone=offsetFromString(matchOffset,this._i);null!=tZone?this.utcOffset(tZone):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(input){return!!this.isValid()&&(input=input?createLocal(input).utcOffset():0,(this.utcOffset()-input)%60==0)}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var c={};if(copyConfig(c,this),c=prepareConfig(c),c._a){var other=c._isUTC?createUTC(c._a):createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function isLocal(){return!!this.isValid()&&!this._isUTC}function isUtcOffset(){return!!this.isValid()&&this._isUTC}function isUtc(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function createDuration(input,key){var sign,ret,diffRes,duration=input,match=null;return isDuration(input)?duration={ms:input._milliseconds,d:input._days,M:input._months}:isNumber(input)?(duration={},key?duration[key]=input:duration.milliseconds=input):(match=aspNetRegex.exec(input))?(sign="-"===match[1]?-1:1,duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(absRound(1e3*match[MILLISECOND]))*sign}):(match=isoRegex.exec(input))?(sign="-"===match[1]?-1:(match[1],1),duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),w:parseIso(match[4],sign),d:parseIso(match[5],sign),h:parseIso(match[6],sign),m:parseIso(match[7],sign),s:parseIso(match[8],sign)}):null==duration?duration={}:"object"==typeof duration&&("from"in duration||"to"in duration)&&(diffRes=momentsDifference(createLocal(duration.from),createLocal(duration.to)),duration={},duration.ms=diffRes.milliseconds,duration.M=diffRes.months),ret=new Duration(duration),isDuration(input)&&hasOwnProp(input,"_locale")&&(ret._locale=input._locale),ret}function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(",","."));return(isNaN(res)?0:res)*sign}function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};return res.months=other.month()-base.month()+12*(other.year()-base.year()),base.clone().add(res.months,"M").isAfter(other)&&--res.months,res.milliseconds=+other-+base.clone().add(res.months,"M"),res}function momentsDifference(base,other){var res;return base.isValid()&&other.isValid()?(other=cloneWithOffset(other,base),base.isBefore(other)?res=positiveMomentsDifference(base,other):(res=positiveMomentsDifference(other,base),res.milliseconds=-res.milliseconds,res.months=-res.months),res):{milliseconds:0,months:0}}function createAdder(direction,name){return function(val,period){var dur,tmp;return null===period||isNaN(+period)||(deprecateSimple(name,"moment()."+name+"(period, number) is deprecated. Please use moment()."+name+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),tmp=val,val=period,period=tmp),val="string"==typeof val?+val:val,dur=createDuration(val,period),addSubtract(this,dur,direction),this}}function addSubtract(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=absRound(duration._days),months=absRound(duration._months);mom.isValid()&&(updateOffset=null==updateOffset||updateOffset,months&&setMonth(mom,get(mom,"Month")+months*isAdding),days&&set$1(mom,"Date",get(mom,"Date")+days*isAdding),milliseconds&&mom._d.setTime(mom._d.valueOf()+milliseconds*isAdding),updateOffset&&hooks.updateOffset(mom,days||months))}function getCalendarFormat(myMoment,now){var diff=myMoment.diff(now,"days",!0);return diff<-6?"sameElse":diff<-1?"lastWeek":diff<0?"lastDay":diff<1?"sameDay":diff<2?"nextDay":diff<7?"nextWeek":"sameElse"}function calendar$1(time,formats){var now=time||createLocal(),sod=cloneWithOffset(now,this).startOf("day"),format=hooks.calendarFormat(this,sod)||"sameElse",output=formats&&(isFunction(formats[format])?formats[format].call(this,now):formats[format]);return this.format(output||this.localeData().calendar(format,this,createLocal(now)))}function clone(){return new Moment(this)}function isAfter(input,units){var localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(isUndefined(units)?"millisecond":units),"millisecond"===units?this.valueOf()>localInput.valueOf():localInput.valueOf()<this.clone().startOf(units).valueOf())}function isBefore(input,units){var localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(isUndefined(units)?"millisecond":units),"millisecond"===units?this.valueOf()<localInput.valueOf():this.clone().endOf(units).valueOf()<localInput.valueOf())}function isBetween(from,to,units,inclusivity){return inclusivity=inclusivity||"()",("("===inclusivity[0]?this.isAfter(from,units):!this.isBefore(from,units))&&(")"===inclusivity[1]?this.isBefore(to,units):!this.isAfter(to,units))}function isSame(input,units){var inputMs,localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(units||"millisecond"),"millisecond"===units?this.valueOf()===localInput.valueOf():(inputMs=localInput.valueOf(),this.clone().startOf(units).valueOf()<=inputMs&&inputMs<=this.clone().endOf(units).valueOf()))}function isSameOrAfter(input,units){return this.isSame(input,units)||this.isAfter(input,units)}function isSameOrBefore(input,units){return this.isSame(input,units)||this.isBefore(input,units)}function diff(input,units,asFloat){var that,zoneDelta,output;if(!this.isValid())return NaN;if(that=cloneWithOffset(input,this),!that.isValid())return NaN;switch(zoneDelta=6e4*(that.utcOffset()-this.utcOffset()),units=normalizeUnits(units)){case"year":output=monthDiff(this,that)/12;break;case"month":output=monthDiff(this,that);break;case"quarter":output=monthDiff(this,that)/3;break;case"second":output=(this-that)/1e3;break;case"minute":output=(this-that)/6e4;break;case"hour":output=(this-that)/36e5;break;case"day":output=(this-that-zoneDelta)/864e5;break;case"week":output=(this-that-zoneDelta)/6048e5;break;default:output=this-that}return asFloat?output:absFloor(output)}function monthDiff(a,b){var anchor2,adjust,wholeMonthDiff=12*(b.year()-a.year())+(b.month()-a.month()),anchor=a.clone().add(wholeMonthDiff,"months");return b-anchor<0?(anchor2=a.clone().add(wholeMonthDiff-1,"months"),adjust=(b-anchor)/(anchor-anchor2)):(anchor2=a.clone().add(wholeMonthDiff+1,"months"),adjust=(b-anchor)/(anchor2-anchor)),-(wholeMonthDiff+adjust)||0}function toString(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(keepOffset){if(!this.isValid())return null;var utc=!0!==keepOffset,m=utc?this.clone().utc():this;return m.year()<0||m.year()>9999?formatMoment(m,utc?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction(Date.prototype.toISOString)?utc?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",formatMoment(m,"Z")):formatMoment(m,utc?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var func="moment",zone="";this.isLocal()||(func=0===this.utcOffset()?"moment.utc":"moment.parseZone",zone="Z");var prefix="["+func+'("]',year=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",suffix=zone+'[")]';return this.format(prefix+year+"-MM-DD[T]HH:mm:ss.SSS"+suffix)}function format(inputString){inputString||(inputString=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var output=formatMoment(this,inputString);return this.localeData().postformat(output)}function from(time,withoutSuffix){return this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())?createDuration({to:this,from:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function fromNow(withoutSuffix){return this.from(createLocal(),withoutSuffix)}function to(time,withoutSuffix){return this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())?createDuration({from:this,to:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function toNow(withoutSuffix){return this.to(createLocal(),withoutSuffix)}function locale(key){var newLocaleData;return void 0===key?this._locale._abbr:(newLocaleData=getLocale(key),null!=newLocaleData&&(this._locale=newLocaleData),this)}function localeData(){return this._locale}function startOf(units){switch(units=normalizeUnits(units)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===units&&this.weekday(0),"isoWeek"===units&&this.isoWeekday(1),"quarter"===units&&this.month(3*Math.floor(this.month()/3)),this}function endOf(units){return void 0===(units=normalizeUnits(units))||"millisecond"===units?this:("date"===units&&(units="day"),this.startOf(units).add(1,"isoWeek"===units?"week":units).subtract(1,"ms"))}function valueOf(){return this._d.valueOf()-6e4*(this._offset||0)}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray(){var m=this;return[m.year(),m.month(),m.date(),m.hour(),m.minute(),m.second(),m.millisecond()]}function toObject(){var m=this;return{years:m.year(),months:m.month(),date:m.date(),hours:m.hours(),minutes:m.minutes(),seconds:m.seconds(),milliseconds:m.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function addWeekYearFormatToken(token,getter){addFormatToken(0,[token,token.length],0,getter)}function getSetWeekYear(input){return getSetWeekYearHelper.call(this,input,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(input){return getSetWeekYearHelper.call(this,input,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getWeeksInYear(){var weekInfo=this.localeData()._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy)}function getSetWeekYearHelper(input,week,weekday,dow,doy){var weeksTarget;return null==input?weekOfYear(this,dow,doy).year:(weeksTarget=weeksInYear(input,dow,doy),week>weeksTarget&&(week=weeksTarget),setWeekAll.call(this,input,week,weekday,dow,doy))}function setWeekAll(weekYear,week,weekday,dow,doy){var dayOfYearData=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),date=createUTCDate(dayOfYearData.year,0,dayOfYearData.dayOfYear);return this.year(date.getUTCFullYear()),this.month(date.getUTCMonth()),this.date(date.getUTCDate()),this}function getSetQuarter(input){return null==input?Math.ceil((this.month()+1)/3):this.month(3*(input-1)+this.month()%3)}function getSetDayOfYear(input){var dayOfYear=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==input?dayOfYear:this.add(input-dayOfYear,"d")}function parseMs(input,array){array[MILLISECOND]=toInt(1e3*("0."+input))}function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}function createUnix(input){return createLocal(1e3*input)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(string){return string}function get$1(format,index,field,setter){var locale=getLocale(),utc=createUTC().set(setter,index);return locale[field](utc,format)}function listMonthsImpl(format,index,field){if(isNumber(format)&&(index=format,format=void 0),format=format||"",null!=index)return get$1(format,index,field,"month");var i,out=[];for(i=0;i<12;i++)out[i]=get$1(format,i,field,"month");return out}function listWeekdaysImpl(localeSorted,format,index,field){"boolean"==typeof localeSorted?(isNumber(format)&&(index=format,format=void 0),format=format||""):(format=localeSorted,index=format,localeSorted=!1,isNumber(format)&&(index=format,format=void 0),format=format||"");var locale=getLocale(),shift=localeSorted?locale._week.dow:0;if(null!=index)return get$1(format,(index+shift)%7,field,"day");var i,out=[];for(i=0;i<7;i++)out[i]=get$1(format,(i+shift)%7,field,"day");return out}function listMonths(format,index){return listMonthsImpl(format,index,"months")}function listMonthsShort(format,index){return listMonthsImpl(format,index,"monthsShort")}function listWeekdays(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdays")}function listWeekdaysShort(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdaysShort")}function listWeekdaysMin(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdaysMin")}function abs(){var data=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),data.milliseconds=mathAbs(data.milliseconds),data.seconds=mathAbs(data.seconds),data.minutes=mathAbs(data.minutes),data.hours=mathAbs(data.hours),data.months=mathAbs(data.months),data.years=mathAbs(data.years),this}function addSubtract$1(duration,input,value,direction){var other=createDuration(input,value);return duration._milliseconds+=direction*other._milliseconds,duration._days+=direction*other._days,duration._months+=direction*other._months,duration._bubble()}function add$1(input,value){return addSubtract$1(this,input,value,1)}function subtract$1(input,value){return addSubtract$1(this,input,value,-1)}function absCeil(number){return number<0?Math.floor(number):Math.ceil(number)}function bubble(){var seconds,minutes,hours,years,monthsFromDays,milliseconds=this._milliseconds,days=this._days,months=this._months,data=this._data;return milliseconds>=0&&days>=0&&months>=0||milliseconds<=0&&days<=0&&months<=0||(milliseconds+=864e5*absCeil(monthsToDays(months)+days),days=0,months=0),data.milliseconds=milliseconds%1e3,seconds=absFloor(milliseconds/1e3),data.seconds=seconds%60,minutes=absFloor(seconds/60),data.minutes=minutes%60,hours=absFloor(minutes/60),data.hours=hours%24,days+=absFloor(hours/24),monthsFromDays=absFloor(daysToMonths(days)),months+=monthsFromDays,days-=absCeil(monthsToDays(monthsFromDays)),years=absFloor(months/12),months%=12,data.days=days,data.months=months,data.years=years,this}function daysToMonths(days){return 4800*days/146097}function monthsToDays(months){return 146097*months/4800}function as(units){if(!this.isValid())return NaN;var days,months,milliseconds=this._milliseconds;if("month"===(units=normalizeUnits(units))||"year"===units)return days=this._days+milliseconds/864e5,months=this._months+daysToMonths(days),"month"===units?months:months/12;switch(days=this._days+Math.round(monthsToDays(this._months)),units){case"week":return days/7+milliseconds/6048e5;case"day":return days+milliseconds/864e5;case"hour":return 24*days+milliseconds/36e5;case"minute":return 1440*days+milliseconds/6e4;case"second":return 86400*days+milliseconds/1e3;case"millisecond":return Math.floor(864e5*days)+milliseconds;default:throw new Error("Unknown unit "+units)}}function valueOf$1(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*toInt(this._months/12):NaN}function makeAs(alias){return function(){return this.as(alias)}}function clone$1(){return createDuration(this)}function get$2(units){return units=normalizeUnits(units),this.isValid()?this[units+"s"]():NaN}function makeGetter(name){return function(){return this.isValid()?this._data[name]:NaN}}function weeks(){return absFloor(this.days()/7)}function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture)}function relativeTime$1(posNegDuration,withoutSuffix,locale){var duration=createDuration(posNegDuration).abs(),seconds=round(duration.as("s")),minutes=round(duration.as("m")),hours=round(duration.as("h")),days=round(duration.as("d")),months=round(duration.as("M")),years=round(duration.as("y")),a=seconds<=thresholds.ss&&["s",seconds]||seconds<thresholds.s&&["ss",seconds]||minutes<=1&&["m"]||minutes<thresholds.m&&["mm",minutes]||hours<=1&&["h"]||hours<thresholds.h&&["hh",hours]||days<=1&&["d"]||days<thresholds.d&&["dd",days]||months<=1&&["M"]||months<thresholds.M&&["MM",months]||years<=1&&["y"]||["yy",years];return a[2]=withoutSuffix,a[3]=+posNegDuration>0,a[4]=locale,substituteTimeAgo.apply(null,a)}function getSetRelativeTimeRounding(roundingFunction){return void 0===roundingFunction?round:"function"==typeof roundingFunction&&(round=roundingFunction,!0)}function getSetRelativeTimeThreshold(threshold,limit){return void 0!==thresholds[threshold]&&(void 0===limit?thresholds[threshold]:(thresholds[threshold]=limit,"s"===threshold&&(thresholds.ss=limit-1),!0))}function humanize(withSuffix){if(!this.isValid())return this.localeData().invalidDate();var locale=this.localeData(),output=relativeTime$1(this,!withSuffix,locale);return withSuffix&&(output=locale.pastFuture(+this,output)),locale.postformat(output)}function sign(x){return(x>0)-(x<0)||+x}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var minutes,hours,years,seconds=abs$1(this._milliseconds)/1e3,days=abs$1(this._days),months=abs$1(this._months);minutes=absFloor(seconds/60),hours=absFloor(minutes/60),seconds%=60,minutes%=60,years=absFloor(months/12),months%=12;var Y=years,M=months,D=days,h=hours,m=minutes,s=seconds?seconds.toFixed(3).replace(/\.?0+$/,""):"",total=this.asSeconds();if(!total)return"P0D";var totalSign=total<0?"-":"",ymSign=sign(this._months)!==sign(total)?"-":"",daysSign=sign(this._days)!==sign(total)?"-":"",hmsSign=sign(this._milliseconds)!==sign(total)?"-":"";return totalSign+"P"+(Y?ymSign+Y+"Y":"")+(M?ymSign+M+"M":"")+(D?daysSign+D+"D":"")+(h||m||s?"T":"")+(h?hmsSign+h+"H":"")+(m?hmsSign+m+"M":"")+(s?hmsSign+s+"S":"")}var hookCallback,some;some=Array.prototype.some?Array.prototype.some:function(fun){for(var t=Object(this),len=t.length>>>0,i=0;i<len;i++)if(i in t&&fun.call(this,t[i],i,t))return!0;return!1};var momentProperties=hooks.momentProperties=[],updateInProgress=!1,deprecations={};hooks.suppressDeprecationWarnings=!1,hooks.deprecationHandler=null;var keys;keys=Object.keys?Object.keys:function(obj){var i,res=[];for(i in obj)hasOwnProp(obj,i)&&res.push(i);return res};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},defaultDayOfMonthOrdinalParse=/\d{1,2}/,defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},aliases={},priorities={},formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={},match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match3to4=/\d\d\d\d?/,match5to6=/\d\d\d\d\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,regexes={},tokens={},YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK=7,WEEKDAY=8;addFormatToken("Y",0,0,function(){var y=this.year();return y<=9999?""+y:"+"+y}),addFormatToken(0,["YY",2],0,function(){return this.year()%100}),addFormatToken(0,["YYYY",4],0,"year"),addFormatToken(0,["YYYYY",5],0,"year"),addFormatToken(0,["YYYYYY",6,!0],0,"year"),addUnitAlias("year","y"),addUnitPriority("year",1),addRegexToken("Y",matchSigned),addRegexToken("YY",match1to2,match2),addRegexToken("YYYY",match1to4,match4),addRegexToken("YYYYY",match1to6,match6),addRegexToken("YYYYYY",match1to6,match6),addParseToken(["YYYYY","YYYYYY"],YEAR),addParseToken("YYYY",function(input,array){array[YEAR]=2===input.length?hooks.parseTwoDigitYear(input):toInt(input)}),addParseToken("YY",function(input,array){array[YEAR]=hooks.parseTwoDigitYear(input)}),addParseToken("Y",function(input,array){array[YEAR]=parseInt(input,10)}),hooks.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2e3)};var indexOf,getSetYear=makeGetSet("FullYear",!0);indexOf=Array.prototype.indexOf?Array.prototype.indexOf:function(o){var i;for(i=0;i<this.length;++i)if(this[i]===o)return i;return-1},addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1}),addFormatToken("MMM",0,0,function(format){return this.localeData().monthsShort(this,format)}),addFormatToken("MMMM",0,0,function(format){return this.localeData().months(this,format)}),addUnitAlias("month","M"),addUnitPriority("month",8),addRegexToken("M",match1to2),addRegexToken("MM",match1to2,match2),addRegexToken("MMM",function(isStrict,locale){return locale.monthsShortRegex(isStrict)}),addRegexToken("MMMM",function(isStrict,locale){return locale.monthsRegex(isStrict)}),addParseToken(["M","MM"],function(input,array){array[MONTH]=toInt(input)-1}),addParseToken(["MMM","MMMM"],function(input,array,config,token){var month=config._locale.monthsParse(input,token,config._strict);null!=month?array[MONTH]=month:getParsingFlags(config).invalidMonth=input});var MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),defaultMonthsShortRegex=matchWord,defaultMonthsRegex=matchWord;addFormatToken("w",["ww",2],"wo","week"),addFormatToken("W",["WW",2],"Wo","isoWeek"),addUnitAlias("week","w"),addUnitAlias("isoWeek","W"),addUnitPriority("week",5),addUnitPriority("isoWeek",5),addRegexToken("w",match1to2),addRegexToken("ww",match1to2,match2),addRegexToken("W",match1to2),addRegexToken("WW",match1to2,match2),addWeekParseToken(["w","ww","W","WW"],function(input,week,config,token){week[token.substr(0,1)]=toInt(input)});var defaultLocaleWeek={dow:0,doy:6};addFormatToken("d",0,"do","day"),addFormatToken("dd",0,0,function(format){return this.localeData().weekdaysMin(this,format)}),addFormatToken("ddd",0,0,function(format){return this.localeData().weekdaysShort(this,format)}),addFormatToken("dddd",0,0,function(format){return this.localeData().weekdays(this,format)}),addFormatToken("e",0,0,"weekday"),addFormatToken("E",0,0,"isoWeekday"),addUnitAlias("day","d"),addUnitAlias("weekday","e"),addUnitAlias("isoWeekday","E"),addUnitPriority("day",11),addUnitPriority("weekday",11),addUnitPriority("isoWeekday",11),addRegexToken("d",match1to2),addRegexToken("e",match1to2),addRegexToken("E",match1to2),addRegexToken("dd",function(isStrict,locale){return locale.weekdaysMinRegex(isStrict)}),addRegexToken("ddd",function(isStrict,locale){return locale.weekdaysShortRegex(isStrict)}),addRegexToken("dddd",function(isStrict,locale){return locale.weekdaysRegex(isStrict)}),addWeekParseToken(["dd","ddd","dddd"],function(input,week,config,token){var weekday=config._locale.weekdaysParse(input,token,config._strict);null!=weekday?week.d=weekday:getParsingFlags(config).invalidWeekday=input}),addWeekParseToken(["d","e","E"],function(input,week,config,token){week[token]=toInt(input)});var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;addFormatToken("H",["HH",2],0,"hour"),addFormatToken("h",["hh",2],0,hFormat),addFormatToken("k",["kk",2],0,kFormat),addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)}),addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)}),addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),meridiem("a",!0),meridiem("A",!1),addUnitAlias("hour","h"),addUnitPriority("hour",13),addRegexToken("a",matchMeridiem),addRegexToken("A",matchMeridiem),addRegexToken("H",match1to2),addRegexToken("h",match1to2),addRegexToken("k",match1to2),addRegexToken("HH",match1to2,match2),addRegexToken("hh",match1to2,match2),addRegexToken("kk",match1to2,match2),addRegexToken("hmm",match3to4),addRegexToken("hmmss",match5to6),addRegexToken("Hmm",match3to4),addRegexToken("Hmmss",match5to6),addParseToken(["H","HH"],HOUR),addParseToken(["k","kk"],function(input,array,config){var kInput=toInt(input);array[HOUR]=24===kInput?0:kInput}),addParseToken(["a","A"],function(input,array,config){config._isPm=config._locale.isPM(input),config._meridiem=input}),addParseToken(["h","hh"],function(input,array,config){array[HOUR]=toInt(input),getParsingFlags(config).bigHour=!0}),addParseToken("hmm",function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos)),array[MINUTE]=toInt(input.substr(pos)),getParsingFlags(config).bigHour=!0}),addParseToken("hmmss",function(input,array,config){var pos1=input.length-4,pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1)),array[MINUTE]=toInt(input.substr(pos1,2)),array[SECOND]=toInt(input.substr(pos2)),getParsingFlags(config).bigHour=!0}),addParseToken("Hmm",function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos)),array[MINUTE]=toInt(input.substr(pos))}),addParseToken("Hmmss",function(input,array,config){var pos1=input.length-4,pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1)),array[MINUTE]=toInt(input.substr(pos1,2)),array[SECOND]=toInt(input.substr(pos2))});var globalLocale,defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0),baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((\-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(config){config._d=new Date(config._i+(config._useUTC?" UTC":""))}),hooks.ISO_8601=function(){},hooks.RFC_2822=function(){};var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var other=createLocal.apply(null,arguments);return this.isValid()&&other.isValid()?other<this?this:other:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var other=createLocal.apply(null,arguments);return this.isValid()&&other.isValid()?other>this?this:other:createInvalid()}),now=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];offset("Z",":"),offset("ZZ",""),addRegexToken("Z",matchShortOffset),addRegexToken("ZZ",matchShortOffset),addParseToken(["Z","ZZ"],function(input,array,config){config._useUTC=!0,config._tzm=offsetFromString(matchShortOffset,input)});var chunkOffset=/([\+\-]|\d\d)/gi;hooks.updateOffset=function(){};var aspNetRegex=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;createDuration.fn=Duration.prototype,createDuration.invalid=createInvalid$1;var add=createAdder(1,"add"),subtract=createAdder(-1,"subtract");hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(key){return void 0===key?this.localeData():this.locale(key)});addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100}),addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),addUnitAlias("weekYear","gg"),addUnitAlias("isoWeekYear","GG"),addUnitPriority("weekYear",1),addUnitPriority("isoWeekYear",1),addRegexToken("G",matchSigned),addRegexToken("g",matchSigned),addRegexToken("GG",match1to2,match2),addRegexToken("gg",match1to2,match2),addRegexToken("GGGG",match1to4,match4),addRegexToken("gggg",match1to4,match4),addRegexToken("GGGGG",match1to6,match6),addRegexToken("ggggg",match1to6,match6),addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(input,week,config,token){week[token.substr(0,2)]=toInt(input)}),addWeekParseToken(["gg","GG"],function(input,week,config,token){week[token]=hooks.parseTwoDigitYear(input)}),addFormatToken("Q",0,"Qo","quarter"),addUnitAlias("quarter","Q"),addUnitPriority("quarter",7),addRegexToken("Q",match1),addParseToken("Q",function(input,array){array[MONTH]=3*(toInt(input)-1)}),addFormatToken("D",["DD",2],"Do","date"),addUnitAlias("date","D"),addUnitPriority("date",9),addRegexToken("D",match1to2),addRegexToken("DD",match1to2,match2),addRegexToken("Do",function(isStrict,locale){return isStrict?locale._dayOfMonthOrdinalParse||locale._ordinalParse:locale._dayOfMonthOrdinalParseLenient}),addParseToken(["D","DD"],DATE),addParseToken("Do",function(input,array){array[DATE]=toInt(input.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addUnitAlias("dayOfYear","DDD"),addUnitPriority("dayOfYear",4),addRegexToken("DDD",match1to3),addRegexToken("DDDD",match3),addParseToken(["DDD","DDDD"],function(input,array,config){config._dayOfYear=toInt(input)}),addFormatToken("m",["mm",2],0,"minute"),addUnitAlias("minute","m"),addUnitPriority("minute",14),addRegexToken("m",match1to2),addRegexToken("mm",match1to2,match2),addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addUnitAlias("second","s"),addUnitPriority("second",15),addRegexToken("s",match1to2),addRegexToken("ss",match1to2,match2),addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)}),addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),addFormatToken(0,["SSS",3],0,"millisecond"),addFormatToken(0,["SSSS",4],0,function(){return 10*this.millisecond()}),addFormatToken(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),addFormatToken(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),addFormatToken(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),addFormatToken(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),addFormatToken(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),addUnitAlias("millisecond","ms"),addUnitPriority("millisecond",16),addRegexToken("S",match1to3,match1),addRegexToken("SS",match1to3,match2),addRegexToken("SSS",match1to3,match3);var token;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);var getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr"),addFormatToken("zz",0,0,"zoneName");var proto=Moment.prototype;proto.add=add,proto.calendar=calendar$1,proto.clone=clone,proto.diff=diff,proto.endOf=endOf,proto.format=format,proto.from=from,proto.fromNow=fromNow,proto.to=to,proto.toNow=toNow,proto.get=stringGet,proto.invalidAt=invalidAt,proto.isAfter=isAfter,proto.isBefore=isBefore,proto.isBetween=isBetween,proto.isSame=isSame,proto.isSameOrAfter=isSameOrAfter,proto.isSameOrBefore=isSameOrBefore,proto.isValid=isValid$2,proto.lang=lang,proto.locale=locale,proto.localeData=localeData,proto.max=prototypeMax,proto.min=prototypeMin,proto.parsingFlags=parsingFlags,proto.set=stringSet,proto.startOf=startOf,proto.subtract=subtract,proto.toArray=toArray,proto.toObject=toObject,proto.toDate=toDate,proto.toISOString=toISOString,proto.inspect=inspect,proto.toJSON=toJSON,proto.toString=toString,proto.unix=unix,proto.valueOf=valueOf,proto.creationData=creationData,proto.year=getSetYear,proto.isLeapYear=getIsLeapYear,proto.weekYear=getSetWeekYear,proto.isoWeekYear=getSetISOWeekYear,proto.quarter=proto.quarters=getSetQuarter,proto.month=getSetMonth,proto.daysInMonth=getDaysInMonth,proto.week=proto.weeks=getSetWeek,proto.isoWeek=proto.isoWeeks=getSetISOWeek,proto.weeksInYear=getWeeksInYear,proto.isoWeeksInYear=getISOWeeksInYear,proto.date=getSetDayOfMonth,proto.day=proto.days=getSetDayOfWeek,proto.weekday=getSetLocaleDayOfWeek,proto.isoWeekday=getSetISODayOfWeek,proto.dayOfYear=getSetDayOfYear,proto.hour=proto.hours=getSetHour,proto.minute=proto.minutes=getSetMinute,proto.second=proto.seconds=getSetSecond,proto.millisecond=proto.milliseconds=getSetMillisecond,proto.utcOffset=getSetOffset,proto.utc=setOffsetToUTC,proto.local=setOffsetToLocal,proto.parseZone=setOffsetToParsedOffset,proto.hasAlignedHourOffset=hasAlignedHourOffset,proto.isDST=isDaylightSavingTime,proto.isLocal=isLocal,proto.isUtcOffset=isUtcOffset,proto.isUtc=isUtc,proto.isUTC=isUtc,proto.zoneAbbr=getZoneAbbr,proto.zoneName=getZoneName,proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth),proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth),proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear),proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone),proto.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);var proto$1=Locale.prototype;proto$1.calendar=calendar,proto$1.longDateFormat=longDateFormat,proto$1.invalidDate=invalidDate,proto$1.ordinal=ordinal,proto$1.preparse=preParsePostFormat,proto$1.postformat=preParsePostFormat,proto$1.relativeTime=relativeTime,proto$1.pastFuture=pastFuture,proto$1.set=set,proto$1.months=localeMonths,proto$1.monthsShort=localeMonthsShort,proto$1.monthsParse=localeMonthsParse,proto$1.monthsRegex=monthsRegex,proto$1.monthsShortRegex=monthsShortRegex,proto$1.week=localeWeek,proto$1.firstDayOfYear=localeFirstDayOfYear,proto$1.firstDayOfWeek=localeFirstDayOfWeek,proto$1.weekdays=localeWeekdays,proto$1.weekdaysMin=localeWeekdaysMin,proto$1.weekdaysShort=localeWeekdaysShort,proto$1.weekdaysParse=localeWeekdaysParse,proto$1.weekdaysRegex=weekdaysRegex,proto$1.weekdaysShortRegex=weekdaysShortRegex,proto$1.weekdaysMinRegex=weekdaysMinRegex,proto$1.isPM=localeIsPM,proto$1.meridiem=localeMeridiem,getSetGlobalLocale("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(number){var b=number%10;return number+(1===toInt(number%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th")}}),hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale),hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs,asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asYears=makeAs("y"),milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years"),round=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,M:11},abs$1=Math.abs,proto$2=Duration.prototype;return proto$2.isValid=isValid$1,proto$2.abs=abs,proto$2.add=add$1,proto$2.subtract=subtract$1,proto$2.as=as,proto$2.asMilliseconds=asMilliseconds,proto$2.asSeconds=asSeconds,proto$2.asMinutes=asMinutes,proto$2.asHours=asHours,proto$2.asDays=asDays,proto$2.asWeeks=asWeeks,proto$2.asMonths=asMonths,proto$2.asYears=asYears,proto$2.valueOf=valueOf$1,proto$2._bubble=bubble,proto$2.clone=clone$1,proto$2.get=get$2,proto$2.milliseconds=milliseconds,proto$2.seconds=seconds,proto$2.minutes=minutes,proto$2.hours=hours,proto$2.days=days,proto$2.weeks=weeks,proto$2.months=months,proto$2.years=years,proto$2.humanize=humanize,proto$2.toISOString=toISOString$1,proto$2.toString=toISOString$1,proto$2.toJSON=toISOString$1,proto$2.locale=locale,proto$2.localeData=localeData,proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1),proto$2.lang=lang,addFormatToken("X",0,0,"unix"),addFormatToken("x",0,0,"valueOf"),addRegexToken("x",matchSigned),addRegexToken("X",matchTimestamp),addParseToken("X",function(input,array,config){config._d=new Date(1e3*parseFloat(input,10))}),addParseToken("x",function(input,array,config){config._d=new Date(toInt(input))}),hooks.version="2.22.1",function(callback){hookCallback=callback}(createLocal),hooks.fn=proto,hooks.min=min,hooks.max=max,hooks.now=now,hooks.utc=createUTC,hooks.unix=createUnix,hooks.months=listMonths,hooks.isDate=isDate,hooks.locale=getSetGlobalLocale,hooks.invalid=createInvalid,hooks.duration=createDuration,hooks.isMoment=isMoment,hooks.weekdays=listWeekdays,hooks.parseZone=createInZone,hooks.localeData=getLocale,hooks.isDuration=isDuration,hooks.monthsShort=listMonthsShort,hooks.weekdaysMin=listWeekdaysMin,hooks.defineLocale=defineLocale,hooks.updateLocale=updateLocale,hooks.locales=listLocales,hooks.weekdaysShort=listWeekdaysShort,hooks.normalizeUnits=normalizeUnits,hooks.relativeTimeRounding=getSetRelativeTimeRounding,hooks.relativeTimeThreshold=getSetRelativeTimeThreshold,hooks.calendarFormat=getCalendarFormat,hooks.prototype=proto,hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},hooks})}).call(exports,__webpack_require__(177)(module))},function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.React=__webpack_require__(198)}).call(exports,__webpack_require__(6))},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(){var MailPoet={};return window.MailPoet=MailPoet,MailPoet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),__webpack_require__(176),__webpack_require__(192),__webpack_require__(194),__webpack_require__(178),__webpack_require__(179),__webpack_require__(195),__webpack_require__(196),__webpack_require__(197)},function(module,exports,__webpack_require__){module.exports=__webpack_require__(204)()},function(module,exports,__webpack_require__){(function(global){module.exports=global._=__webpack_require__(191)}).call(exports,__webpack_require__(6))},function(module,exports){module.exports=jQuery},,function(module,__webpack_exports__,__webpack_require__){"use strict";Object.defineProperty(__webpack_exports__,"__esModule",{value:!0});var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__=__webpack_require__(347);__webpack_require__.d(__webpack_exports__,"BrowserRouter",function(){return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__.a});var __WEBPACK_IMPORTED_MODULE_1__HashRouter__=__webpack_require__(348);__webpack_require__.d(__webpack_exports__,"HashRouter",function(){return __WEBPACK_IMPORTED_MODULE_1__HashRouter__.a});var __WEBPACK_IMPORTED_MODULE_2__Link__=__webpack_require__(285);__webpack_require__.d(__webpack_exports__,"Link",function(){return __WEBPACK_IMPORTED_MODULE_2__Link__.a});var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__=__webpack_require__(349);__webpack_require__.d(__webpack_exports__,"MemoryRouter",function(){return __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__.a});var __WEBPACK_IMPORTED_MODULE_4__NavLink__=__webpack_require__(351);__webpack_require__.d(__webpack_exports__,"NavLink",function(){return __WEBPACK_IMPORTED_MODULE_4__NavLink__.a});var __WEBPACK_IMPORTED_MODULE_5__Prompt__=__webpack_require__(352);__webpack_require__.d(__webpack_exports__,"Prompt",function(){return __WEBPACK_IMPORTED_MODULE_5__Prompt__.a});var __WEBPACK_IMPORTED_MODULE_6__Redirect__=__webpack_require__(354);__webpack_require__.d(__webpack_exports__,"Redirect",function(){return __WEBPACK_IMPORTED_MODULE_6__Redirect__.a});var __WEBPACK_IMPORTED_MODULE_7__Route__=__webpack_require__(286);__webpack_require__.d(__webpack_exports__,"Route",function(){return __WEBPACK_IMPORTED_MODULE_7__Route__.a});var __WEBPACK_IMPORTED_MODULE_8__Router__=__webpack_require__(264);__webpack_require__.d(__webpack_exports__,"Router",function(){return __WEBPACK_IMPORTED_MODULE_8__Router__.a});var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__=__webpack_require__(356);__webpack_require__.d(__webpack_exports__,"StaticRouter",function(){return __WEBPACK_IMPORTED_MODULE_9__StaticRouter__.a});var __WEBPACK_IMPORTED_MODULE_10__Switch__=__webpack_require__(358);__webpack_require__.d(__webpack_exports__,"Switch",function(){return __WEBPACK_IMPORTED_MODULE_10__Switch__.a});var __WEBPACK_IMPORTED_MODULE_11__generatePath__=__webpack_require__(360);__webpack_require__.d(__webpack_exports__,"generatePath",function(){return __WEBPACK_IMPORTED_MODULE_11__generatePath__.a});var __WEBPACK_IMPORTED_MODULE_12__matchPath__=__webpack_require__(361);__webpack_require__.d(__webpack_exports__,"matchPath",function(){return __WEBPACK_IMPORTED_MODULE_12__matchPath__.a});var __WEBPACK_IMPORTED_MODULE_13__withRouter__=__webpack_require__(362);__webpack_require__.d(__webpack_exports__,"withRouter",function(){return __WEBPACK_IMPORTED_MODULE_13__withRouter__.a})},function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.ClassNames=__webpack_require__(207)}).call(exports,__webpack_require__(6))},,,function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.ReactDOM=__webpack_require__(200)}).call(exports,__webpack_require__(6))},function(module,exports,__webpack_require__){function defineProp(name,value){return delete module.exports[name],module.exports[name]=value,value}var Parser=__webpack_require__(161),DomHandler=__webpack_require__(224);module.exports={Parser:Parser,Tokenizer:__webpack_require__(162),ElementType:__webpack_require__(17),DomHandler:DomHandler,get FeedHandler(){return defineProp("FeedHandler",__webpack_require__(226))},get Stream(){return defineProp("Stream",__webpack_require__(227))},get WritableStream(){return defineProp("WritableStream",__webpack_require__(166))},get ProxyHandler(){return defineProp("ProxyHandler",__webpack_require__(234))},get DomUtils(){return defineProp("DomUtils",__webpack_require__(235))},get CollectingHandler(){return defineProp("CollectingHandler",__webpack_require__(247))},DefaultHandler:DomHandler,get RssHandler(){return defineProp("RssHandler",this.FeedHandler)},parseDOM:function(data,options){var handler=new DomHandler(options);return new Parser(handler,options).end(data),handler.dom},parseFeed:function(feed,options){var handler=new module.exports.FeedHandler(options);return new Parser(handler,options).end(feed),handler.dom},createDomStream:function(cb,options,elementCb){var handler=new DomHandler(cb,options,elementCb);return new Parser(handler,options)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},,function(module,exports,__webpack_require__){"use strict";var invariant=function(condition,format,a,b,c,d,e,f){if(!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]})),error.name="Invariant Violation"}throw error.framesToPop=1,error}};module.exports=invariant},function(module,exports,__webpack_require__){"use strict";var warning=function(){};module.exports=warning},,function(module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style"
|