MailPoet Newsletters (New) - Version 3.35.4

Version Description

  • 2019-09-10 =
  • Improved: resend confirmation emails is now on a subscriber by subscriber basis;
  • Fixed: CSV export no longers require the ZIP extension;
  • Fixed: WooCommerce list counted in List Listings bulk action UI when list is hidden;
  • Fixed: captcha success not being displayed;
  • Fixed: global subscription status for WooCommerce users.
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (New)
Version 3.35.4
Comparing to
See all releases

Code changes from version 3.35.3 to 3.35.4

Files changed (86) hide show
  1. assets/dist/js/admin.84dfeb1a.chunk.js +0 -34
  2. assets/dist/js/admin.fe09345e.chunk.js +34 -0
  3. assets/dist/js/{admin_vendor.84dfeb1a.chunk.js → admin_vendor.fe09345e.chunk.js} +0 -0
  4. assets/dist/js/{admin_vendor_chunk.84dfeb1a.chunk.js → admin_vendor_chunk.fe09345e.chunk.js} +0 -0
  5. assets/dist/js/{form_editor.84dfeb1a.chunk.js → form_editor.fe09345e.chunk.js} +0 -0
  6. assets/dist/js/{mailpoet.84dfeb1a.chunk.js → mailpoet.fe09345e.chunk.js} +0 -0
  7. assets/dist/js/manifest.json +7 -7
  8. assets/dist/js/{newsletter_editor.84dfeb1a.chunk.js → newsletter_editor.fe09345e.chunk.js} +0 -0
  9. assets/dist/js/{vendor.84dfeb1a.js → vendor.fe09345e.js} +0 -0
  10. generated/FreeCachedContainer.php +12 -14
  11. generated/doctrine-metadata/3c040156894ce311867edd71cf2273e1 +0 -0
  12. lang/mailpoet-ar.mo +0 -0
  13. lang/mailpoet-bg_BG.mo +0 -0
  14. lang/mailpoet-ca.mo +0 -0
  15. lang/mailpoet-cs_CZ.mo +0 -0
  16. lang/mailpoet-da_DK.mo +0 -0
  17. lang/mailpoet-de_DE.mo +0 -0
  18. lang/mailpoet-el.mo +0 -0
  19. lang/mailpoet-en_GB.mo +0 -0
  20. lang/mailpoet-es_ES.mo +0 -0
  21. lang/mailpoet-es_MX.mo +0 -0
  22. lang/mailpoet-fa_IR.mo +0 -0
  23. lang/mailpoet-fr_CA.mo +0 -0
  24. lang/mailpoet-fr_FR.mo +0 -0
  25. lang/mailpoet-he_IL.mo +0 -0
  26. lang/mailpoet-hu_HU.mo +0 -0
  27. lang/mailpoet-it_IT.mo +0 -0
  28. lang/mailpoet-ja.mo +0 -0
  29. lang/mailpoet-nb_NO.mo +0 -0
  30. lang/mailpoet-nl_NL.mo +0 -0
  31. lang/mailpoet-pl_PL.mo +0 -0
  32. lang/mailpoet-pt_BR.mo +0 -0
  33. lang/mailpoet-pt_PT.mo +0 -0
  34. lang/mailpoet-ro_RO.mo +0 -0
  35. lang/mailpoet-ru_RU.mo +0 -0
  36. lang/mailpoet-sq.mo +0 -0
  37. lang/mailpoet-sr_RS.mo +0 -0
  38. lang/mailpoet-sv_SE.mo +0 -0
  39. lang/mailpoet-tr_TR.mo +0 -0
  40. lang/mailpoet-vi.mo +0 -0
  41. lang/mailpoet-zh_CN.mo +0 -0
  42. lang/mailpoet.pot +113 -103
  43. lib/API/JSON/API.php +2 -0
  44. lib/API/JSON/v1/Subscribers.php +23 -2
  45. lib/AdminPages/PageRenderer.php +5 -0
  46. lib/AdminPages/Pages/Subscribers.php +3 -0
  47. lib/DI/ContainerConfigurator.php +1 -1
  48. lib/Entities/FeatureFlagEntity.php +1 -1
  49. lib/Models/Model.php +3 -0
  50. lib/Models/Newsletter.php +2 -1
  51. lib/Models/NewsletterOption.php +6 -0
  52. lib/Models/NewsletterPost.php +5 -0
  53. lib/Models/NewsletterSegment.php +5 -0
  54. lib/Models/Segment.php +5 -1
  55. lib/Models/StatisticsOpens.php +5 -0
  56. lib/Models/StatisticsUnsubscribes.php +5 -0
  57. lib/Models/StatsNotification.php +5 -0
  58. lib/Models/Subscriber.php +0 -9
  59. lib/Models/SubscriberIP.php +3 -0
  60. lib/Subscribers/ImportExport/Export/Export.php +1 -1
  61. lib/Subscribers/SubscriberActions.php +0 -26
  62. lib/Subscription/CaptchaRenderer.php +32 -6
  63. lib/WP/Functions.php +32 -8
  64. lib/WooCommerce/Subscription.php +9 -0
  65. mailpoet.php +2 -2
  66. mailpoet_initializer.php +15 -2
  67. readme.txt +8 -1
  68. vendor-prefixed/autoload.php +1 -1
  69. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/CacheLoggerChain.php +1 -1
  70. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverride.php +1 -1
  71. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverrides.php +1 -1
  72. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/AttributeOverrides.php +1 -1
  73. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityResult.php +1 -1
  74. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinColumns.php +1 -1
  75. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinTable.php +2 -2
  76. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedNativeQueries.php +1 -1
  77. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedQueries.php +1 -1
  78. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMapping.php +2 -2
  79. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMappings.php +1 -1
  80. vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/Table.php +2 -2
  81. vendor/autoload.php +1 -1
  82. vendor/composer/autoload_real.php +7 -7
  83. vendor/composer/autoload_static.php +5 -5
  84. views/newsletters.html +12 -4
  85. views/subscribers/importExport/export.html +1 -1
  86. views/subscribers/subscribers.html +2 -1
assets/dist/js/admin.84dfeb1a.chunk.js DELETED
@@ -1,34 +0,0 @@
1
- (window.mailpoetJsonp=window.mailpoetJsonp||[]).push([[2,3],{100:function(e,t,a){var n=a(602),r=a(603),i=a(611);e.exports=function(e){return n(e)||r(e)||i()}},23:function(e,t,a){
2
- /**!
3
-
4
- @license
5
- handlebars v4.1.2
6
-
7
- Copyright (C) 2011-2017 by Yehuda Katz
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- */
28
- var n;n=function(){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}return a.m=e,a.c=t,a.p="",a(0)}([function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=n(a(2)),i=n(a(35)),o=a(36),s=a(41),l=n(a(42)),c=n(a(39)),u=n(a(34)),p=r.default.create;function d(){var e=p();return e.compile=function(t,a){return s.compile(t,a,e)},e.precompile=function(t,a){return s.precompile(t,a,e)},e.AST=i.default,e.Compiler=s.Compiler,e.JavaScriptCompiler=l.default,e.Parser=o.parser,e.parse=o.parse,e}var m=d();m.create=d,u.default(m),m.Visitor=c.default,m.default=m,t.default=m,e.exports=t.default},function(e,t){"use strict";t.default=function(e){return e&&e.__esModule?e:{default:e}},t.__esModule=!0},function(e,t,a){"use strict";var n=a(3).default,r=a(1).default;t.__esModule=!0;var i=n(a(4)),o=r(a(21)),s=r(a(6)),l=n(a(5)),c=n(a(22)),u=r(a(34));function p(){var e=new i.HandlebarsEnvironment;return l.extend(e,i),e.SafeString=o.default,e.Exception=s.default,e.Utils=l,e.escapeExpression=l.escapeExpression,e.VM=c,e.template=function(t){return c.template(t,e)},e}var d=p();d.create=p,u.default(d),d.default=d,t.default=d,e.exports=t.default},function(e,t){"use strict";t.default=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t},t.__esModule=!0},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.HandlebarsEnvironment=c;var r=a(5),i=n(a(6)),o=a(10),s=a(18),l=n(a(20));t.VERSION="4.1.2";t.COMPILER_REVISION=7;t.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};function c(e,t,a){this.helpers=e||{},this.partials=t||{},this.decorators=a||{},o.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}c.prototype={constructor:c,logger:l.default,log:l.default.log,registerHelper:function(e,t){if("[object Object]"===r.toString.call(e)){if(t)throw new i.default("Arg not supported with multiple helpers");r.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if("[object Object]"===r.toString.call(e))r.extend(this.partials,e);else{if(void 0===t)throw new i.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if("[object Object]"===r.toString.call(e)){if(t)throw new i.default("Arg not supported with multiple decorators");r.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]}};var u=l.default.log;t.log=u,t.createFrame=r.createFrame,t.logger=l.default},function(e,t){"use strict";t.__esModule=!0,t.extend=o,t.indexOf=function(e,t){for(var a=0,n=e.length;a<n;a++)if(e[a]===t)return a;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}if(!r.test(e))return e;return e.replace(n,i)},t.isEmpty=function(e){return!e&&0!==e||!(!c(e)||0!==e.length)},t.createFrame=function(e){var t=o({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},n=/[&<>"'`=]/g,r=/[&<>"'`=]/;function i(e){return a[e]}function o(e){for(var t=1;t<arguments.length;t++)for(var a in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],a)&&(e[a]=arguments[t][a]);return e}var s=Object.prototype.toString;t.toString=s;var l=function(e){return"function"==typeof e};l(/x/)&&(t.isFunction=l=function(e){return"function"==typeof e&&"[object Function]"===s.call(e)}),t.isFunction=l;var c=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===s.call(e)};t.isArray=c},function(e,t,a){"use strict";var n=a(7).default;t.__esModule=!0;var r=["description","fileName","lineNumber","message","name","number","stack"];function i(e,t){var a=t&&t.loc,o=void 0,s=void 0;a&&(e+=" - "+(o=a.start.line)+":"+(s=a.start.column));for(var l=Error.prototype.constructor.call(this,e),c=0;c<r.length;c++)this[r[c]]=l[r[c]];Error.captureStackTrace&&Error.captureStackTrace(this,i);try{a&&(this.lineNumber=o,n?Object.defineProperty(this,"column",{value:s,enumerable:!0}):this.column=s)}catch(e){}}i.prototype=new Error,t.default=i,e.exports=t.default},function(e,t,a){e.exports={default:a(8),__esModule:!0}},function(e,t,a){var n=a(9);e.exports=function(e,t,a){return n.setDesc(e,t,a)}},function(e,t){var a=Object;e.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.registerDefaultHelpers=function(e){r.default(e),i.default(e),o.default(e),s.default(e),l.default(e),c.default(e),u.default(e)};var r=n(a(11)),i=n(a(12)),o=n(a(13)),s=n(a(14)),l=n(a(15)),c=n(a(16)),u=n(a(17))},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5);t.default=function(e){e.registerHelper("blockHelperMissing",function(t,a){var r=a.inverse,i=a.fn;if(!0===t)return i(this);if(!1===t||null==t)return r(this);if(n.isArray(t))return t.length>0?(a.ids&&(a.ids=[a.name]),e.helpers.each(t,a)):r(this);if(a.data&&a.ids){var o=n.createFrame(a.data);o.contextPath=n.appendContextPath(a.data.contextPath,a.name),a={data:o}}return i(t,a)})},e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=a(5),i=n(a(6));t.default=function(e){e.registerHelper("each",function(e,t){if(!t)throw new i.default("Must pass iterator to #each");var a=t.fn,n=t.inverse,o=0,s="",l=void 0,c=void 0;function u(t,n,i){l&&(l.key=t,l.index=n,l.first=0===n,l.last=!!i,c&&(l.contextPath=c+t)),s+=a(e[t],{data:l,blockParams:r.blockParams([e[t],t],[c+t,null])})}if(t.data&&t.ids&&(c=r.appendContextPath(t.data.contextPath,t.ids[0])+"."),r.isFunction(e)&&(e=e.call(this)),t.data&&(l=r.createFrame(t.data)),e&&"object"==typeof e)if(r.isArray(e))for(var p=e.length;o<p;o++)o in e&&u(o,o,o===e.length-1);else{var d=void 0;for(var m in e)e.hasOwnProperty(m)&&(void 0!==d&&u(d,o-1),d=m,o++);void 0!==d&&u(d,o-1,!0)}return 0===o&&(s=n(this)),s})},e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=n(a(6));t.default=function(e){e.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},e.exports=t.default},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5);t.default=function(e){e.registerHelper("if",function(e,t){return n.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||n.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,a){return e.helpers.if.call(this,t,{fn:a.inverse,inverse:a.fn,hash:a.hash})})},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],a=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var r=1;null!=a.hash.level?r=a.hash.level:a.data&&null!=a.data.level&&(r=a.data.level),t[0]=r,e.log.apply(e,t)})},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",function(e,t){return e?"constructor"!==t||e.propertyIsEnumerable(t)?e[t]:void 0:e})},e.exports=t.default},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5);t.default=function(e){e.registerHelper("with",function(e,t){n.isFunction(e)&&(e=e.call(this));var a=t.fn;if(n.isEmpty(e))return t.inverse(this);var r=t.data;return t.data&&t.ids&&((r=n.createFrame(t.data)).contextPath=n.appendContextPath(t.data.contextPath,t.ids[0])),a(e,{data:r,blockParams:n.blockParams([e],[r&&r.contextPath])})})},e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.registerDefaultDecorators=function(e){r.default(e)};var r=n(a(19))},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5);t.default=function(e){e.registerDecorator("inline",function(e,t,a,r){var i=e;return t.partials||(t.partials={},i=function(r,i){var o=a.partials;a.partials=n.extend({},o,t.partials);var s=e(r,i);return a.partials=o,s}),t.partials[r.args[0]]=r.fn,i})},e.exports=t.default},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if("string"==typeof e){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),"undefined"!=typeof console&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t="log");for(var a=arguments.length,n=Array(a>1?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];console[t].apply(console,n)}}};t.default=r,e.exports=t.default},function(e,t){"use strict";function a(e){this.string=e}t.__esModule=!0,a.prototype.toString=a.prototype.toHTML=function(){return""+this.string},t.default=a,e.exports=t.default},function(e,t,a){"use strict";var n=a(23).default,r=a(3).default,i=a(1).default;t.__esModule=!0,t.checkRevision=function(e){var t=e&&e[0]||1,a=l.COMPILER_REVISION;if(t!==a){if(t<a){var n=l.REVISION_CHANGES[a],r=l.REVISION_CHANGES[t];throw new s.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+r+").")}throw new s.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}},t.template=function(e,t){if(!t)throw new s.default("No environment passed to template");if(!e||!e.main)throw new s.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var a={strict:function(e,t){if(!(t in e))throw new s.default('"'+t+'" not defined in '+e);return e[t]},lookup:function(e,t){for(var a=e.length,n=0;n<a;n++)if(e[n]&&null!=e[n][t])return e[n][t]},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:o.escapeExpression,invokePartial:function(a,n,r){r.hash&&(n=o.extend({},n,r.hash),r.ids&&(r.ids[0]=!0));a=t.VM.resolvePartial.call(this,a,n,r);var i=t.VM.invokePartial.call(this,a,n,r);null==i&&t.compile&&(r.partials[r.name]=t.compile(a,e.compilerOptions,t),i=r.partials[r.name](n,r));if(null!=i){if(r.indent){for(var l=i.split("\n"),c=0,u=l.length;c<u&&(l[c]||c+1!==u);c++)l[c]=r.indent+l[c];i=l.join("\n")}return i}throw new s.default("The partial "+r.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var a=e[t];return a.decorator=e[t+"_d"],a},programs:[],program:function(e,t,a,n,r){var i=this.programs[e],o=this.fn(e);return t||r||n||a?i=c(this,e,o,t,a,n,r):i||(i=this.programs[e]=c(this,e,o)),i},data:function(e,t){for(;e&&t--;)e=e._parent;return e},merge:function(e,t){var a=e||t;return e&&t&&e!==t&&(a=o.extend({},t,e)),a},nullContext:n({}),noop:t.VM.noop,compilerInfo:e.compiler};function r(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=n.data;r._setup(n),!n.partial&&e.useData&&(i=function(e,t){t&&"root"in t||((t=t?l.createFrame(t):{}).root=e);return t}(t,i));var o=void 0,s=e.useBlockParams?[]:void 0;function c(t){return""+e.main(a,t,a.helpers,a.partials,i,s,o)}return e.useDepths&&(o=n.depths?t!=n.depths[0]?[t].concat(n.depths):n.depths:[t]),(c=p(e.main,c,a,n.depths||[],i,s))(t,n)}return r.isTop=!0,r._setup=function(n){n.partial?(a.helpers=n.helpers,a.partials=n.partials,a.decorators=n.decorators):(a.helpers=a.merge(n.helpers,t.helpers),e.usePartial&&(a.partials=a.merge(n.partials,t.partials)),(e.usePartial||e.useDecorators)&&(a.decorators=a.merge(n.decorators,t.decorators)))},r._child=function(t,n,r,i){if(e.useBlockParams&&!r)throw new s.default("must pass block params");if(e.useDepths&&!i)throw new s.default("must pass parent depths");return c(a,t,e[t],n,0,r,i)},r},t.wrapProgram=c,t.resolvePartial=function(e,t,a){e?e.call||a.name||(a.name=e,e=a.partials[e]):e="@partial-block"===a.name?a.data["partial-block"]:a.partials[a.name];return e},t.invokePartial=function(e,t,a){var n=a.data&&a.data["partial-block"];a.partial=!0,a.ids&&(a.data.contextPath=a.ids[0]||a.data.contextPath);var r=void 0;a.fn&&a.fn!==u&&function(){a.data=l.createFrame(a.data);var e=a.fn;r=a.data["partial-block"]=function(t){var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return a.data=l.createFrame(a.data),a.data["partial-block"]=n,e(t,a)},e.partials&&(a.partials=o.extend({},a.partials,e.partials))}();void 0===e&&r&&(e=r);if(void 0===e)throw new s.default("The partial "+a.name+" could not be found");if(e instanceof Function)return e(t,a)},t.noop=u;var o=r(a(5)),s=i(a(6)),l=a(4);function c(e,t,a,n,r,i,o){function s(t){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=o;return!o||t==o[0]||t===e.nullContext&&null===o[0]||(s=[t].concat(o)),a(e,t,e.helpers,e.partials,r.data||n,i&&[r.blockParams].concat(i),s)}return(s=p(a,s,e,o,n,i)).program=t,s.depth=o?o.length:0,s.blockParams=r||0,s}function u(){return""}function p(e,t,a,n,r,i){if(e.decorator){var s={};t=e.decorator(t,s,a,n&&n[0],r,i,n),o.extend(t,s)}return t}},function(e,t,a){e.exports={default:a(24),__esModule:!0}},function(e,t,a){a(25),e.exports=a(30).Object.seal},function(e,t,a){var n=a(26);a(27)("seal",function(e){return function(t){return e&&n(t)?e(t):t}})},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,a){var n=a(28),r=a(30),i=a(33);e.exports=function(e,t){var a=(r.Object||{})[e]||Object[e],o={};o[e]=t(a),n(n.S+n.F*i(function(){a(1)}),"Object",o)}},function(e,t,a){var n=a(29),r=a(30),i=a(31),o=function(e,t,a){var s,l,c,u=e&o.F,p=e&o.G,d=e&o.S,m=e&o.P,h=e&o.B,f=e&o.W,g=p?r:r[t]||(r[t]={}),_=p?n:d?n[t]:(n[t]||{}).prototype;for(s in p&&(a=t),a)(l=!u&&_&&s in _)&&s in g||(c=l?_[s]:a[s],g[s]=p&&"function"!=typeof _[s]?a[s]:h&&l?i(c,n):f&&_[s]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t.prototype=e.prototype,t}(c):m&&"function"==typeof c?i(Function.call,c):c,m&&((g.prototype||(g.prototype={}))[s]=c))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,e.exports=o},function(e,t){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},function(e,t){var a=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=a)},function(e,t,a){var n=a(32);e.exports=function(e,t,a){if(n(e),void 0===t)return e;switch(a){case 1:return function(a){return e.call(t,a)};case 2:return function(a,n){return e.call(t,a,n)};case 3:return function(a,n,r){return e.call(t,a,n,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){(function(a){"use strict";t.__esModule=!0,t.default=function(e){var t=void 0!==a?a:window,n=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=n),e}},e.exports=t.default}).call(t,function(){return this}())},function(e,t){"use strict";t.__esModule=!0;var a={helpers:{helperExpression:function(e){return"SubExpression"===e.type||("MustacheStatement"===e.type||"BlockStatement"===e.type)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return 1===e.parts.length&&!a.helpers.scopedId(e)&&!e.depth}}};t.default=a,e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default,r=a(3).default;t.__esModule=!0,t.parse=function(e,t){if("Program"===e.type)return e;return i.default.yy=c,c.locInfo=function(e){return new c.SourceLocation(t&&t.srcName,e)},new o.default(t).accept(i.default.parse(e))};var i=n(a(37)),o=n(a(38)),s=r(a(40)),l=a(5);t.parser=i.default;var c={};l.extend(c,s)},function(e,t){"use strict";t.__esModule=!0;var a=function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(e,t,a,n,r,i,o){var s=i.length-1;switch(r){case 1:return i[s-1];case 2:this.$=n.prepareProgram(i[s]);break;case 3:case 4:case 5:case 6:case 7:case 8:this.$=i[s];break;case 9:this.$={type:"CommentStatement",value:n.stripComment(i[s]),strip:n.stripFlags(i[s],i[s]),loc:n.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:i[s],value:i[s],loc:n.locInfo(this._$)};break;case 11:this.$=n.prepareRawBlock(i[s-2],i[s-1],i[s],this._$);break;case 12:this.$={path:i[s-3],params:i[s-2],hash:i[s-1]};break;case 13:this.$=n.prepareBlock(i[s-3],i[s-2],i[s-1],i[s],!1,this._$);break;case 14:this.$=n.prepareBlock(i[s-3],i[s-2],i[s-1],i[s],!0,this._$);break;case 15:this.$={open:i[s-5],path:i[s-4],params:i[s-3],hash:i[s-2],blockParams:i[s-1],strip:n.stripFlags(i[s-5],i[s])};break;case 16:case 17:this.$={path:i[s-4],params:i[s-3],hash:i[s-2],blockParams:i[s-1],strip:n.stripFlags(i[s-5],i[s])};break;case 18:this.$={strip:n.stripFlags(i[s-1],i[s-1]),program:i[s]};break;case 19:var l=n.prepareBlock(i[s-2],i[s-1],i[s],i[s],!1,this._$),c=n.prepareProgram([l],i[s-1].loc);c.chained=!0,this.$={strip:i[s-2].strip,program:c,chain:!0};break;case 20:this.$=i[s];break;case 21:this.$={path:i[s-1],strip:n.stripFlags(i[s-2],i[s])};break;case 22:case 23:this.$=n.prepareMustache(i[s-3],i[s-2],i[s-1],i[s-4],n.stripFlags(i[s-4],i[s]),this._$);break;case 24:this.$={type:"PartialStatement",name:i[s-3],params:i[s-2],hash:i[s-1],indent:"",strip:n.stripFlags(i[s-4],i[s]),loc:n.locInfo(this._$)};break;case 25:this.$=n.preparePartialBlock(i[s-2],i[s-1],i[s],this._$);break;case 26:this.$={path:i[s-3],params:i[s-2],hash:i[s-1],strip:n.stripFlags(i[s-4],i[s])};break;case 27:case 28:this.$=i[s];break;case 29:this.$={type:"SubExpression",path:i[s-3],params:i[s-2],hash:i[s-1],loc:n.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:i[s],loc:n.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:n.id(i[s-2]),value:i[s],loc:n.locInfo(this._$)};break;case 32:this.$=n.id(i[s-1]);break;case 33:case 34:this.$=i[s];break;case 35:this.$={type:"StringLiteral",value:i[s],original:i[s],loc:n.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(i[s]),original:Number(i[s]),loc:n.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===i[s],original:"true"===i[s],loc:n.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:n.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:n.locInfo(this._$)};break;case 40:case 41:this.$=i[s];break;case 42:this.$=n.preparePath(!0,i[s],this._$);break;case 43:this.$=n.preparePath(!1,i[s],this._$);break;case 44:i[s-2].push({part:n.id(i[s]),original:i[s],separator:i[s-1]}),this.$=i[s-2];break;case 45:this.$=[{part:n.id(i[s]),original:i[s]}];break;case 46:this.$=[];break;case 47:i[s-1].push(i[s]);break;case 48:this.$=[i[s]];break;case 49:i[s-1].push(i[s]);break;case 50:this.$=[];break;case 51:i[s-1].push(i[s]);break;case 58:this.$=[];break;case 59:i[s-1].push(i[s]);break;case 64:this.$=[];break;case 65:i[s-1].push(i[s]);break;case 70:this.$=[];break;case 71:i[s-1].push(i[s]);break;case 78:this.$=[];break;case 79:i[s-1].push(i[s]);break;case 82:this.$=[];break;case 83:i[s-1].push(i[s]);break;case 86:this.$=[];break;case 87:i[s-1].push(i[s]);break;case 90:this.$=[];break;case 91:i[s-1].push(i[s]);break;case 94:this.$=[];break;case 95:i[s-1].push(i[s]);break;case 98:this.$=[i[s]];break;case 99:i[s-1].push(i[s]);break;case 100:this.$=[i[s]];break;case 101:i[s-1].push(i[s])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,a=[0],n=[null],r=[],i=this.table,o="",s=0,l=0,c=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var u=this.lexer.yylloc;r.push(u);var p=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,m,h,f,g,_,b,v,y,w,E={};;){if(h=a[a.length-1],this.defaultActions[h]?f=this.defaultActions[h]:(null==d&&(w=void 0,"number"!=typeof(w=t.lexer.lex()||1)&&(w=t.symbols_[w]||w),d=w),f=i[h]&&i[h][d]),void 0===f||!f.length||!f[0]){var k="";if(!c){for(_ in y=[],i[h])this.terminals_[_]&&_>2&&y.push("'"+this.terminals_[_]+"'");k=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+y.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:u,expected:y})}}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+h+", token: "+d);switch(f[0]){case 1:a.push(d),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),a.push(f[1]),d=null,m?(d=m,m=null):(l=this.lexer.yyleng,o=this.lexer.yytext,s=this.lexer.yylineno,u=this.lexer.yylloc,c>0&&c--);break;case 2:if(b=this.productions_[f[1]][1],E.$=n[n.length-b],E._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},p&&(E._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),void 0!==(g=this.performAction.call(E,o,l,s,this.yy,f[1],n,r)))return g;b&&(a=a.slice(0,-1*b*2),n=n.slice(0,-1*b),r=r.slice(0,-1*b)),a.push(this.productions_[f[1]][0]),n.push(E.$),r.push(E._$),v=i[a[a.length-2]][a[a.length-1]],a.push(v);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,a=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,a,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length&&(!(a=this._input.match(this.rules[i[o]]))||t&&!(a[0].length>t[0].length)||(t=a,n=o,this.options.flex));o++);return t?((r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,a,n){function r(e,a){return t.yytext=t.yytext.substring(e,t.yyleng-a+e)}switch(a){case 0:if("\\\\"===t.yytext.slice(-2)?(r(0,1),this.begin("mu")):"\\"===t.yytext.slice(-1)?(r(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(r(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=r(1,2).replace(/\\"/g,'"'),80;case 32:return t.yytext=r(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return e}();function a(){this.yy={}}return e.lexer=t,a.prototype=e,e.Parser=a,new a}();t.default=a,e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=n(a(39));function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=e}function o(e,t,a){void 0===t&&(t=e.length);var n=e[t-1],r=e[t-2];return n?"ContentStatement"===n.type?(r||!a?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original):void 0:a}function s(e,t,a){void 0===t&&(t=-1);var n=e[t+1],r=e[t+2];return n?"ContentStatement"===n.type?(r||!a?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original):void 0:a}function l(e,t,a){var n=e[null==t?0:t+1];if(n&&"ContentStatement"===n.type&&(a||!n.rightStripped)){var r=n.value;n.value=n.value.replace(a?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==r}}function c(e,t,a){var n=e[null==t?e.length-1:t-1];if(n&&"ContentStatement"===n.type&&(a||!n.leftStripped)){var r=n.value;return n.value=n.value.replace(a?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==r,n.leftStripped}}i.prototype=new r.default,i.prototype.Program=function(e){var t=!this.options.ignoreStandalone,a=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,r=0,i=n.length;r<i;r++){var u=n[r],p=this.accept(u);if(p){var d=o(n,r,a),m=s(n,r,a),h=p.openStandalone&&d,f=p.closeStandalone&&m,g=p.inlineStandalone&&d&&m;p.close&&l(n,r,!0),p.open&&c(n,r,!0),t&&g&&(l(n,r),c(n,r)&&"PartialStatement"===u.type&&(u.indent=/([ \t]+$)/.exec(n[r-1].original)[1])),t&&h&&(l((u.program||u.inverse).body),c(n,r)),t&&f&&(l(n,r),c((u.inverse||u.program).body))}}return e},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,a=e.program&&e.inverse,n=a,r=a;if(a&&a.chained)for(n=a.body[0].program;r.chained;)r=r.body[r.body.length-1].program;var i={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:s(t.body),closeStandalone:o((n||t).body)};if(e.openStrip.close&&l(t.body,null,!0),a){var u=e.inverseStrip;u.open&&c(t.body,null,!0),u.close&&l(n.body,null,!0),e.closeStrip.open&&c(r.body,null,!0),!this.options.ignoreStandalone&&o(t.body)&&s(n.body)&&(c(t.body),l(n.body))}else e.closeStrip.open&&c(t.body,null,!0);return i},i.prototype.Decorator=i.prototype.MustacheStatement=function(e){return e.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}},t.default=i,e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=n(a(6));function i(){this.parents=[]}function o(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function s(e){o.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function l(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}i.prototype={constructor:i,mutating:!1,acceptKey:function(e,t){var a=this.accept(e[t]);if(this.mutating){if(a&&!i.prototype[a.type])throw new r.default('Unexpected node type "'+a.type+'" found when accepting '+t+" on "+e.type);e[t]=a}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new r.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,a=e.length;t<a;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,a--)},accept:function(e){if(e){if(!this[e.type])throw new r.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);return this.current=this.parents.shift(),!this.mutating||t?t:!1!==t?e:void 0}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:o,Decorator:o,BlockStatement:s,DecoratorBlock:s,PartialStatement:l,PartialBlockStatement:function(e){l.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:o,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}},t.default=i,e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.SourceLocation=function(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}},t.id=function(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e},t.stripFlags=function(e,t){return{open:"~"===e.charAt(2),close:"~"===t.charAt(t.length-3)}},t.stripComment=function(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")},t.preparePath=function(e,t,a){a=this.locInfo(a);for(var n=e?"@":"",i=[],o=0,s=0,l=t.length;s<l;s++){var c=t[s].part,u=t[s].original!==c;if(n+=(t[s].separator||"")+c,u||".."!==c&&"."!==c&&"this"!==c)i.push(c);else{if(i.length>0)throw new r.default("Invalid path: "+n,{loc:a});".."===c&&o++}}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:a}},t.prepareMustache=function(e,t,a,n,r,i){var o=n.charAt(3)||n.charAt(2),s="{"!==o&&"&"!==o;return{type:/\*/.test(n)?"Decorator":"MustacheStatement",path:e,params:t,hash:a,escaped:s,strip:r,loc:this.locInfo(i)}},t.prepareRawBlock=function(e,t,a,n){i(e,a),n=this.locInfo(n);var r={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}},t.prepareBlock=function(e,t,a,n,o,s){n&&n.path&&i(e,n);var l=/\*/.test(e.open);t.blockParams=e.blockParams;var c=void 0,u=void 0;if(a){if(l)throw new r.default("Unexpected inverse block on decorator",a);a.chain&&(a.program.body[0].closeStrip=n.strip),u=a.strip,c=a.program}o&&(o=c,c=t,t=o);return{type:l?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:c,openStrip:e.strip,inverseStrip:u,closeStrip:n&&n.strip,loc:this.locInfo(s)}},t.prepareProgram=function(e,t){if(!t&&e.length){var a=e[0].loc,n=e[e.length-1].loc;a&&n&&(t={source:a.source,start:{line:a.start.line,column:a.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:e,strip:{},loc:t}},t.preparePartialBlock=function(e,t,a,n){return i(e,a),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:a&&a.strip,loc:this.locInfo(n)}};var r=n(a(6));function i(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var a={loc:e.path.loc};throw new r.default(e.path.original+" doesn't match "+t,a)}}},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.Compiler=l,t.precompile=function(e,t,a){if(null==e||"string"!=typeof e&&"Program"!==e.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);"data"in(t=t||{})||(t.data=!0);t.compat&&(t.useDepths=!0);var n=a.parse(e,t),i=(new a.Compiler).compile(n,t);return(new a.JavaScriptCompiler).compile(i,t)},t.compile=function(e,t,a){void 0===t&&(t={});if(null==e||"string"!=typeof e&&"Program"!==e.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);"data"in(t=i.extend({},t))||(t.data=!0);t.compat&&(t.useDepths=!0);var n=void 0;function o(){var n=a.parse(e,t),r=(new a.Compiler).compile(n,t),i=(new a.JavaScriptCompiler).compile(r,t,void 0,!0);return a.template(i)}function s(e,t){return n||(n=o()),n.call(this,e,t)}return s._setup=function(e){return n||(n=o()),n._setup(e)},s._child=function(e,t,a,r){return n||(n=o()),n._child(e,t,a,r)},s};var r=n(a(6)),i=a(5),o=n(a(35)),s=[].slice;function l(){}function c(e,t){if(e===t)return!0;if(i.isArray(e)&&i.isArray(t)&&e.length===t.length){for(var a=0;a<e.length;a++)if(!c(e[a],t[a]))return!1;return!0}}function u(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}l.prototype={compiler:l,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var a=0;a<t;a++){var n=this.opcodes[a],r=e.opcodes[a];if(n.opcode!==r.opcode||!c(n.args,r.args))return!1}t=this.children.length;for(a=0;a<t;a++)if(!this.children[a].equals(e.children[a]))return!1;return!0},guid:0,compile:function(e,t){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[];var a=t.knownHelpers;if(t.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},a)for(var n in a)this.options.knownHelpers[n]=a[n];return this.accept(e)},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),a=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[a]=t,this.useDepths=this.useDepths||t.useDepths,a},accept:function(e){if(!this[e.type])throw new r.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,a=t.length,n=0;n<a;n++)this.accept(t[n]);return this.options.blockParams.shift(),this.isSimple=1===a,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){u(e);var t=e.program,a=e.inverse;t=t&&this.compileProgram(t),a=a&&this.compileProgram(a);var n=this.classifySexpr(e);"helper"===n?this.helperSexpr(e,t,a):"simple"===n?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",a),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,a),this.opcode("pushProgram",t),this.opcode("pushProgram",a),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),a=this.setupFullMustacheParams(e,t,void 0),n=e.path;this.useDecorators=!0,this.opcode("registerDecorator",a.length,n.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var a=e.params;if(a.length>1)throw new r.default("Unsupported number of partial arguments: "+a.length,e);a.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):a.push({type:"PathExpression",parts:[],depth:0}));var n=e.name.original,i="SubExpression"===e.name.type;i&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",i,n,o),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){u(e);var t=this.classifySexpr(e);"simple"===t?this.simpleSexpr(e):"helper"===t?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,a){var n=e.path,r=n.parts[0],i=null!=t||null!=a;this.opcode("getContext",n.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",a),n.strict=!0,this.accept(n),this.opcode("invokeAmbiguous",r,i)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,a){var n=this.setupFullMustacheParams(e,t,a),i=e.path,s=i.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",n.length,s);else{if(this.options.knownHelpersOnly)throw new r.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",n.length,i.original,o.default.helpers.simpleId(i))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],a=o.default.helpers.scopedId(e),n=!e.depth&&!a&&this.blockParamIndex(t);n?this.opcode("lookupBlockParam",n,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,a):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,a=0,n=t.length;for(this.opcode("pushHash");a<n;a++)this.pushParam(t[a].value);for(;a--;)this.opcode("assignToHash",t[a].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:s.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=o.default.helpers.simpleId(e.path),a=t&&!!this.blockParamIndex(e.path.parts[0]),n=!a&&o.default.helpers.helperExpression(e),r=!a&&(n||t);if(r&&!n){var i=e.path.parts[0],s=this.options;s.knownHelpers[i]?n=!0:s.knownHelpersOnly&&(r=!1)}return n?"helper":r?"ambiguous":"simple"},pushParams:function(e){for(var t=0,a=e.length;t<a;t++)this.pushParam(e[t])},pushParam:function(e){var t=null!=e.value?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),"SubExpression"===e.type&&this.accept(e);else{if(this.trackIds){var a=void 0;if(!e.parts||o.default.helpers.scopedId(e)||e.depth||(a=this.blockParamIndex(e.parts[0])),a){var n=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",a,n)}else(t=e.original||t).replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,a,n){var r=e.params;return this.pushParams(r),this.opcode("pushProgram",t),this.opcode("pushProgram",a),e.hash?this.accept(e.hash):this.opcode("emptyHash",n),r},blockParamIndex:function(e){for(var t=0,a=this.options.blockParams.length;t<a;t++){var n=this.options.blockParams[t],r=n&&i.indexOf(n,e);if(n&&r>=0)return[t,r]}}}},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=a(4),i=n(a(6)),o=a(5),s=n(a(43));function l(e){this.value=e}function c(){}c.prototype={nameLookup:function(e,t){return"constructor"===t?["(",e,".propertyIsEnumerable('constructor') ? ",e,".constructor : undefined",")"]:c.isValidJavaScriptVariableName(t)?[e,".",t]:[e,"[",JSON.stringify(t),"]"]},depthedLookup:function(e){return[this.aliasable("container.lookup"),'(depths, "',e,'")']},compilerInfo:function(){var e=r.COMPILER_REVISION;return[e,r.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,a){return o.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:a?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},compile:function(e,t,a,n){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!n,this.name=this.environment.name,this.isChild=!!a,this.context=a||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var r=e.opcodes,o=void 0,s=void 0,l=void 0,c=void 0;for(l=0,c=r.length;l<c;l++)o=r[l],this.source.currentLocation=o.loc,s=s||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=s,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new i.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),n?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(n);if(this.isChild)return u;var p={compiler:this.compilerInfo(),main:u};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var d=this.context,m=d.programs,h=d.decorators;for(l=0,c=m.length;l<c;l++)m[l]&&(p[l]=m[l],h[l]&&(p[l+"_d"]=h[l],p.useDecorators=!0));return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),n?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),t.srcName?(p=p.toStringWithSourceMap({file:t.destName})).map=p.map&&p.map.toString():p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new s.default(this.options.srcName),this.decorators=new s.default(this.options.srcName)},createFunctionContext:function(e){var t="",a=this.stackVars.concat(this.registers.list);a.length>0&&(t+=", "+a.join(", "));var n=0;for(var r in this.aliases){var i=this.aliases[r];this.aliases.hasOwnProperty(r)&&i.children&&i.referenceCount>1&&(t+=", alias"+ ++n+"="+r,i.children[0]="alias"+n)}var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var s=this.mergeSource(t);return e?(o.push(s),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),") {\n ",s,"}"])},mergeSource:function(e){var t=this.environment.isSimple,a=!this.forceBuffer,n=void 0,r=void 0,i=void 0,o=void 0;return this.source.each(function(e){e.appendToBuffer?(i?e.prepend(" + "):i=e,o=e):(i&&(r?i.prepend("buffer += "):n=!0,o.add(";"),i=o=void 0),r=!0,t||(a=!1))}),a?i?(i.prepend("return "),o.add(";")):r||this.source.push('return "";'):(e+=", buffer = "+(n?"":this.initializeBuffer()),i?(i.prepend("return buffer + "),o.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(n?"":";\n")),this.source.merge()},blockValue:function(e){var t=this.aliasable("helpers.blockHelperMissing"),a=[this.contextName(0)];this.setupHelperArgs(e,0,a);var n=this.popStack();a.splice(1,0,n),this.push(this.source.functionCall(t,"call",a))},ambiguousBlockValue:function(){var e=this.aliasable("helpers.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var a=this.topStack();t.splice(1,0,a),this.pushSource(["if (!",this.lastHelper,") { ",a," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(e){return[" != null ? ",e,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,a,n){var r=0;n||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(e[r++])),this.resolvePath("context",e,r,t,a)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,a){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,a)},resolvePath:function(e,t,a,n,r){var i=this;if(this.options.strict||this.options.assumeObjects)this.push(function(e,t,a,n){var r=t.popStack(),i=0,o=a.length;e&&o--;for(;i<o;i++)r=t.nameLookup(r,a[i],n);return e?[t.aliasable("container.strict"),"(",r,", ",t.quotedString(a[i]),")"]:r}(this.options.strict&&r,this,t,e));else for(var o=t.length;a<o;a++)this.replaceStack(function(r){var o=i.nameLookup(r,t[a],e);return n?[" && ",o]:[" != null ? ",o," : ",r]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),"SubExpression"!==t&&("string"==typeof e?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){null!=e?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,t){var a=this.nameLookup("decorators",t,"decorator"),n=this.setupHelperArgs(t,e);this.decorators.push(["fn = ",this.decorators.functionCall(a,"",["fn","props","container",n])," || fn;"])},invokeHelper:function(e,t,a){var n=this.popStack(),r=this.setupHelper(e,t),i=a?[r.name," || "]:"",o=["("].concat(i,n);this.options.strict||o.push(" || ",this.aliasable("helpers.helperMissing")),o.push(")"),this.push(this.source.functionCall(o,"call",r.callParams))},invokeKnownHelper:function(e,t){var a=this.setupHelper(e,t);this.push(this.source.functionCall(a.name,"call",a.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var a=this.popStack();this.emptyHash();var n=this.setupHelper(0,e,t),r=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",e,"helper")," || ",a,")"];this.options.strict||(r[0]="(helper = ",r.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",r,n.paramsInit?["),(",n.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",n.callParams)," : helper))"])},invokePartial:function(e,t,a){var n=[],r=this.setupParams(t,1,n);e&&(t=this.popStack(),delete r.name),a&&(r.indent=JSON.stringify(a)),r.helpers="helpers",r.partials="partials",r.decorators="container.decorators",e?n.unshift(t):n.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(r.depths="depths"),r=this.objectLiteral(r),n.push(r),this.push(this.source.functionCall("container.invokePartial","",n))},assignToHash:function(e){var t=this.popStack(),a=void 0,n=void 0,r=void 0;this.trackIds&&(r=this.popStack()),this.stringParams&&(n=this.popStack(),a=this.popStack());var i=this.hash;a&&(i.contexts[e]=a),n&&(i.types[e]=n),r&&(i.ids[e]=r),i.values[e]=t},pushId:function(e,t,a){"BlockParam"===e?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(a?" + "+JSON.stringify("."+a):"")):"PathExpression"===e?this.pushString(t):"SubExpression"===e?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:c,compileChildren:function(e,t){for(var a=e.children,n=void 0,r=void 0,i=0,o=a.length;i<o;i++){n=a[i],r=new this.compiler;var s=this.matchExistingProgram(n);if(null==s){this.context.programs.push("");var l=this.context.programs.length;n.index=l,n.name="program"+l,this.context.programs[l]=r.compile(n,t,this.context,!this.precompile),this.context.decorators[l]=r.decorators,this.context.environments[l]=n,this.useDepths=this.useDepths||r.useDepths,this.useBlockParams=this.useBlockParams||r.useBlockParams,n.useDepths=this.useDepths,n.useBlockParams=this.useBlockParams}else n.index=s.index,n.name="program"+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(e){for(var t=0,a=this.context.environments.length;t<a;t++){var n=this.context.environments[t];if(n&&n.equals(e))return n}},programExpression:function(e){var t=this.environment.children[e],a=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths"),"container.program("+a.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof l||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new l(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var t=["("],a=void 0,n=void 0,r=void 0;if(!this.isInline())throw new i.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof l)t=["(",a=[o.value]],r=!0;else{n=!0;var s=this.incrStack();t=["((",this.push(s)," = ",o,")"],a=this.topStack()}var c=e.call(this,a);r||this.popStack(),n&&this.stackSlot--,this.push(t.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,a=e.length;t<a;t++){var n=e[t];if(n instanceof l)this.compileStack.push(n);else{var r=this.incrStack();this.pushSource([r," = ",n,";"]),this.compileStack.push(r)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),a=(t?this.inlineStack:this.compileStack).pop();if(!e&&a instanceof l)return a.value;if(!t){if(!this.stackSlot)throw new i.default("Invalid stack pop");this.stackSlot--}return a},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof l?t.value:t},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):((t=this.aliases[e]=this.source.wrap(e)).aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,a){var n=[];return{params:n,paramsInit:this.setupHelperArgs(t,e,n,a),name:this.nameLookup("helpers",t,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(n)}},setupParams:function(e,t,a){var n={},r=[],i=[],o=[],s=!a,l=void 0;s&&(a=[]),n.name=this.quotedString(e),n.hash=this.popStack(),this.trackIds&&(n.hashIds=this.popStack()),this.stringParams&&(n.hashTypes=this.popStack(),n.hashContexts=this.popStack());var c=this.popStack(),u=this.popStack();(u||c)&&(n.fn=u||"container.noop",n.inverse=c||"container.noop");for(var p=t;p--;)l=this.popStack(),a[p]=l,this.trackIds&&(o[p]=this.popStack()),this.stringParams&&(i[p]=this.popStack(),r[p]=this.popStack());return s&&(n.args=this.source.generateArray(a)),this.trackIds&&(n.ids=this.source.generateArray(o)),this.stringParams&&(n.types=this.source.generateArray(i),n.contexts=this.source.generateArray(r)),this.options.data&&(n.data="data"),this.useBlockParams&&(n.blockParams="blockParams"),n},setupHelperArgs:function(e,t,a,n){var r=this.setupParams(e,t,a);return r=this.objectLiteral(r),n?(this.useRegister("options"),a.push("options"),["options=",r]):a?(a.push(r),""):r}},function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=c.RESERVED_WORDS={},a=0,n=e.length;a<n;a++)t[e[a]]=!0}(),c.isValidJavaScriptVariableName=function(e){return!c.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)},t.default=c,e.exports=t.default},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5),r=void 0;try{}catch(e){}function i(e,t,a){if(n.isArray(e)){for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.wrap(e[i],a));return r}return"boolean"==typeof e||"number"==typeof e?e+"":e}function o(e){this.srcFile=e,this.source=[]}r||((r=function(e,t,a,n){this.src="",n&&this.add(n)}).prototype={add:function(e){n.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){n.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),o.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([" ",t,"\n"])}),e},each:function(e){for(var t=0,a=this.source.length;t<a;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new r(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return e instanceof r?e:(e=i(e,this,t),new r(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,a){return a=this.generateList(a),this.wrap([e,t?"."+t+"(":"(",a,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var t=[];for(var a in e)if(e.hasOwnProperty(a)){var n=i(e[a],this);"undefined"!==n&&t.push([this.quotedString(a),":",n])}var r=this.generateList(t);return r.prepend("{"),r.add("}"),r},generateList:function(e){for(var t=this.empty(),a=0,n=e.length;a<n;a++)a&&t.add(","),t.add(i(e[a],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}},t.default=o,e.exports=t.default}])},e.exports=n()},299:function(e,t,a){var n=a(659),r=a(661),i=a(665),o=a(667),s=a(669),l=a(672),c=a(7);e.exports=function(e){for(var t=1;t<arguments.length;t++){var a,u=null!=arguments[t]?arguments[t]:{},p=l(u);"function"==typeof s&&(p=o(p).call(p,i(a=s(u)).call(a,function(e){return r(u,e).enumerable}))),n(p).call(p,function(t){c(e,t,u[t])})}return e}},331:function(e,t,a){e.exports=a(653)},4:function(e,t){e.exports=jQuery},492:function(e,t,a){(function(t){t.MailPoetLib||(t.MailPoetLib={}),e.exports=t.MailPoetLib.Form=a(601)}).call(this,a(19))},493:function(e,t,a){(function(t){t.MailPoetLib||(t.MailPoetLib={}),e.exports=t.MailPoetLib.Form=a(638)}).call(this,a(19))},494:function(e,t,a){e.exports=a(677)},512:function(e,t,a){e.exports=a(612)},514:function(e,t,a){e.exports=a(634)},515:function(e,t,a){var n;n=function(){function e(e){this._targetElement=e,this._introItems=[],this._options={nextLabel:"Next &rarr;",prevLabel:"&larr; 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 t(e,t){var o=e.querySelectorAll("*[data-intro]"),l=[];if(this._options.steps)_(this._options.steps,function(e){var t=r(e);if(t.step=l.length+1,"string"==typeof t.element&&(t.element=document.querySelector(t.element)),void 0===t.element||null===t.element){var a=document.querySelector(".introjsFloatingElement");null===a&&((a=document.createElement("div")).className="introjsFloatingElement",document.body.appendChild(a)),t.element=a,t.position="floating"}t.scrollTo=t.scrollTo||this._options.scrollTo,void 0===t.disableInteraction&&(t.disableInteraction=this._options.disableInteraction),null!==t.element&&l.push(t)}.bind(this));else{var c;if(o.length<1)return!1;_(o,function(e){if((!t||e.getAttribute("data-intro-group")===t)&&"none"!==e.style.display){var a=parseInt(e.getAttribute("data-step"),10);c=void 0!==e.getAttribute("data-disable-interaction")?!!e.getAttribute("data-disable-interaction"):this._options.disableInteraction,a>0&&(l[a-1]={element:e,intro:e.getAttribute("data-intro"),step:parseInt(e.getAttribute("data-step"),10),tooltipClass:e.getAttribute("data-tooltipclass"),highlightClass:e.getAttribute("data-highlightclass"),position:e.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:e.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:c})}}.bind(this));var u=0;_(o,function(e){if((!t||e.getAttribute("data-intro-group")===t)&&null===e.getAttribute("data-step")){for(;void 0!==l[u];)u++;c=void 0!==e.getAttribute("data-disable-interaction")?!!e.getAttribute("data-disable-interaction"):this._options.disableInteraction,l[u]={element:e,intro:e.getAttribute("data-intro"),step:u+1,tooltipClass:e.getAttribute("data-tooltipclass"),highlightClass:e.getAttribute("data-highlightclass"),position:e.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:e.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:c}}}.bind(this))}for(var p=[],d=0;d<l.length;d++)l[d]&&p.push(l[d]);return(l=p).sort(function(e,t){return e.step-t.step}),this._introItems=l,function(e){var t=document.createElement("div"),a="",n=this;if(t.className="introjs-overlay",e.tagName&&"body"!==e.tagName.toLowerCase()){var r=L(e);r&&(a+="width: "+r.width+"px; height:"+r.height+"px; top:"+r.top+"px;left: "+r.left+"px;",t.style.cssText=a)}else a+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",t.style.cssText=a;return e.appendChild(t),t.onclick=function(){!0===n._options.exitOnOverlayClick&&s.call(n,e)},window.setTimeout(function(){a+="opacity: "+n._options.overlayOpacity.toString()+";",t.style.cssText=a},10),!0}.call(this,e)&&(i.call(this),this._options.keyboardNavigation&&y.on(window,"keydown",n,this,!0),y.on(window,"resize",a,this,!0)),!1}function a(){this.refresh.call(this)}function n(e){var t=null===e.code?e.which:e.code;if(null===t&&(t=null===e.charCode?e.keyCode:e.charCode),"Escape"!==t&&27!==t||!0!==this._options.exitOnEsc){if("ArrowLeft"===t||37===t)o.call(this);else if("ArrowRight"===t||39===t)i.call(this);else if("Enter"===t||13===t){var a=e.target||e.srcElement;a&&a.className.match("introjs-prevbutton")?o.call(this):a&&a.className.match("introjs-skipbutton")?(this._introItems.length-1===this._currentStep&&"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),s.call(this,this._targetElement)):a&&a.getAttribute("data-stepnumber")?a.click():i.call(this),e.preventDefault?e.preventDefault():e.returnValue=!1}}else s.call(this,this._targetElement)}function r(e){if(null===e||"object"!=typeof e||void 0!==e.nodeType)return e;var t={};for(var a in e)void 0!==window.jQuery&&e[a]instanceof window.jQuery?t[a]=e[a]:t[a]=r(e[a]);return t}function i(){this._direction="forward",void 0!==this._currentStepNumber&&_(this._introItems,function(e,t){e.step===this._currentStepNumber&&(this._currentStep=t-1,this._currentStepNumber=void 0)}.bind(this)),void 0===this._currentStep?this._currentStep=0:++this._currentStep;var e=this._introItems[this._currentStep],t=!0;return void 0!==this._introBeforeChangeCallback&&(t=this._introBeforeChangeCallback.call(this,e.element)),!1===t?(--this._currentStep,!1):this._introItems.length<=this._currentStep?("function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void s.call(this,this._targetElement)):void h.call(this,e)}function o(){if(this._direction="backward",0===this._currentStep)return!1;--this._currentStep;var e=this._introItems[this._currentStep],t=!0;if(void 0!==this._introBeforeChangeCallback&&(t=this._introBeforeChangeCallback.call(this,e.element)),!1===t)return++this._currentStep,!1;h.call(this,e)}function s(e,t){var r=!0;if(void 0!==this._introBeforeExitCallback&&(r=this._introBeforeExitCallback.call(this)),t||!1!==r){var i=e.querySelectorAll(".introjs-overlay");i&&i.length&&_(i,function(e){e.style.opacity=0,window.setTimeout(function(){this.parentNode&&this.parentNode.removeChild(this)}.bind(e),500)}.bind(this));var o=e.querySelector(".introjs-helperLayer");o&&o.parentNode.removeChild(o);var s=e.querySelector(".introjs-tooltipReferenceLayer");s&&s.parentNode.removeChild(s);var l=e.querySelector(".introjs-disableInteraction");l&&l.parentNode.removeChild(l);var c=document.querySelector(".introjsFloatingElement");c&&c.parentNode.removeChild(c),g(),_(document.querySelectorAll(".introjs-fixParent"),function(e){E(e,/introjs-fixParent/g)}),y.off(window,"keydown",n,this,!0),y.off(window,"resize",a,this,!0),void 0!==this._introExitCallback&&this._introExitCallback.call(this),this._currentStep=void 0}}function l(e,t,a,n,r){var i,o,s,l,d,m="";if(r=r||!1,t.style.top=null,t.style.right=null,t.style.bottom=null,t.style.left=null,t.style.marginLeft=null,t.style.marginTop=null,a.style.display="inherit",null!=n&&(n.style.top=null,n.style.left=null),this._introItems[this._currentStep])switch(m="string"==typeof(i=this._introItems[this._currentStep]).tooltipClass?i.tooltipClass:this._options.tooltipClass,t.className=("introjs-tooltip "+m).replace(/^\s+|\s+$/g,""),t.setAttribute("role","dialog"),"floating"!==(d=this._introItems[this._currentStep].position)&&(d=function(e,t,a){var n=this._options.positionPrecedence.slice(),r=S(),i=L(t).height+10,o=L(t).width+20,s=e.getBoundingClientRect(),l="floating";s.bottom+i+i>r.height&&p(n,"bottom");s.top-i<0&&p(n,"top");s.right+o>r.width&&p(n,"right");s.left-o<0&&p(n,"left");var c=(u=a||"",d=u.indexOf("-"),-1!==d?u.substr(d):"");var u,d;a&&(a=a.split("-")[0]);n.length&&(l="auto"!==a&&n.indexOf(a)>-1?a:n[0]);-1!==["top","bottom"].indexOf(l)&&(l+=function(e,t,a,n){var r=t/2,i=Math.min(a.width,window.screen.width),o=["-left-aligned","-middle-aligned","-right-aligned"],s="";i-e<t&&p(o,"-left-aligned");(e<r||i-e<r)&&p(o,"-middle-aligned");e<t&&p(o,"-right-aligned");s=o.length?-1!==o.indexOf(n)?n:o[0]:"-middle-aligned";return s}(s.left,o,r,c));return l}.call(this,e,t,d)),s=L(e),o=L(t),l=S(),w(t,"introjs-"+d),d){case"top-right-aligned":a.className="introjs-arrow bottom-right";var h=0;u(s,h,o,t),t.style.bottom=s.height+20+"px";break;case"top-middle-aligned":a.className="introjs-arrow bottom-middle";var f=s.width/2-o.width/2;r&&(f+=5),u(s,f,o,t)&&(t.style.right=null,c(s,f,o,l,t)),t.style.bottom=s.height+20+"px";break;case"top-left-aligned":case"top":a.className="introjs-arrow bottom",c(s,r?0:15,o,l,t),t.style.bottom=s.height+20+"px";break;case"right":t.style.left=s.width+20+"px",s.top+o.height>l.height?(a.className="introjs-arrow left-bottom",t.style.top="-"+(o.height-s.height-20)+"px"):a.className="introjs-arrow left";break;case"left":r||!0!==this._options.showStepNumbers||(t.style.top="15px"),s.top+o.height>l.height?(t.style.top="-"+(o.height-s.height-20)+"px",a.className="introjs-arrow right-bottom"):a.className="introjs-arrow right",t.style.right=s.width+20+"px";break;case"floating":a.style.display="none",t.style.left="50%",t.style.top="50%",t.style.marginLeft="-"+o.width/2+"px",t.style.marginTop="-"+o.height/2+"px",null!=n&&(n.style.left="-"+(o.width/2+18)+"px",n.style.top="-"+(o.height/2+18)+"px");break;case"bottom-right-aligned":a.className="introjs-arrow top-right",u(s,h=0,o,t),t.style.top=s.height+20+"px";break;case"bottom-middle-aligned":a.className="introjs-arrow top-middle",f=s.width/2-o.width/2,r&&(f+=5),u(s,f,o,t)&&(t.style.right=null,c(s,f,o,l,t)),t.style.top=s.height+20+"px";break;default:a.className="introjs-arrow top",c(s,0,o,l,t),t.style.top=s.height+20+"px"}}function c(e,t,a,n,r){return e.left+t+a.width>n.width?(r.style.left=n.width-a.width-e.left+"px",!1):(r.style.left=t+"px",!0)}function u(e,t,a,n){return e.left+e.width-t-a.width<0?(n.style.left=-e.left+"px",!1):(n.style.right=t+"px",!0)}function p(e,t){e.indexOf(t)>-1&&e.splice(e.indexOf(t),1)}function d(e){if(e){if(!this._introItems[this._currentStep])return;var t=this._introItems[this._currentStep],a=L(t.element),n=this._options.helperElementPadding;I(t.element)?w(e,"introjs-fixedTooltip"):E(e,"introjs-fixedTooltip"),"floating"===t.position&&(n=0),e.style.cssText="width: "+(a.width+n)+"px; height:"+(a.height+n)+"px; top:"+(a.top-n/2)+"px;left: "+(a.left-n/2)+"px;"}}function m(e){e.setAttribute("role","button"),e.tabIndex=0}function h(e){void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,e.element);var t,a,n,r,c=this,u=document.querySelector(".introjs-helperLayer"),p=document.querySelector(".introjs-tooltipReferenceLayer"),h="introjs-helperLayer";if("string"==typeof e.highlightClass&&(h+=" "+e.highlightClass),"string"==typeof this._options.highlightClass&&(h+=" "+this._options.highlightClass),null!==u){var b=p.querySelector(".introjs-helperNumberLayer"),v=p.querySelector(".introjs-tooltiptext"),y=p.querySelector(".introjs-arrow"),I=p.querySelector(".introjs-tooltip");if(n=p.querySelector(".introjs-skipbutton"),a=p.querySelector(".introjs-prevbutton"),t=p.querySelector(".introjs-nextbutton"),u.className=h,I.style.opacity=0,I.style.display="none",null!==b){var S=this._introItems[e.step-2>=0?e.step-2:0];(null!==S&&"forward"===this._direction&&"floating"===S.position||"backward"===this._direction&&"floating"===e.position)&&(b.style.opacity=0)}(r=D(e.element))!==document.body&&q(r,e.element),d.call(c,u),d.call(c,p),_(document.querySelectorAll(".introjs-fixParent"),function(e){E(e,/introjs-fixParent/g)}),g(),c._lastShowElementTimer&&window.clearTimeout(c._lastShowElementTimer),c._lastShowElementTimer=window.setTimeout(function(){null!==b&&(b.innerHTML=e.step),v.innerHTML=e.intro,I.style.display="block",l.call(c,e.element,I,y,b),c._options.showBullets&&(p.querySelector(".introjs-bullets li > a.active").className="",p.querySelector('.introjs-bullets li > a[data-stepnumber="'+e.step+'"]').className="active"),p.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+M.call(c)+"%;",p.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",M.call(c)),I.style.opacity=1,b&&(b.style.opacity=1),null!=n&&/introjs-donebutton/gi.test(n.className)?n.focus():null!=t&&t.focus(),f.call(c,e.scrollTo,e,v)},350)}else{var N=document.createElement("div"),x=document.createElement("div"),C=document.createElement("div"),T=document.createElement("div"),P=document.createElement("div"),R=document.createElement("div"),A=document.createElement("div"),j=document.createElement("div");N.className=h,x.className="introjs-tooltipReferenceLayer",(r=D(e.element))!==document.body&&q(r,e.element),d.call(c,N),d.call(c,x),this._targetElement.appendChild(N),this._targetElement.appendChild(x),C.className="introjs-arrow",P.className="introjs-tooltiptext",P.innerHTML=e.intro,R.className="introjs-bullets",!1===this._options.showBullets&&(R.style.display="none");var O=document.createElement("ul");O.setAttribute("role","tablist");var L=function(){c.goToStep(this.getAttribute("data-stepnumber"))};_(this._introItems,function(t,a){var n=document.createElement("li"),r=document.createElement("a");n.setAttribute("role","presentation"),r.setAttribute("role","tab"),r.onclick=L,a===e.step-1&&(r.className="active"),m(r),r.innerHTML="&nbsp;",r.setAttribute("data-stepnumber",t.step),n.appendChild(r),O.appendChild(n)}),R.appendChild(O),A.className="introjs-progress",!1===this._options.showProgress&&(A.style.display="none");var F=document.createElement("div");F.className="introjs-progressbar",F.setAttribute("role","progress"),F.setAttribute("aria-valuemin",0),F.setAttribute("aria-valuemax",100),F.setAttribute("aria-valuenow",M.call(this)),F.style.cssText="width:"+M.call(this)+"%;",A.appendChild(F),j.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(j.style.display="none"),T.className="introjs-tooltip",T.appendChild(P),T.appendChild(R),T.appendChild(A);var B=document.createElement("span");!0===this._options.showStepNumbers&&(B.className="introjs-helperNumberLayer",B.innerHTML=e.step,x.appendChild(B)),T.appendChild(C),x.appendChild(T),(t=document.createElement("a")).onclick=function(){c._introItems.length-1!==c._currentStep&&i.call(c)},m(t),t.innerHTML=this._options.nextLabel,(a=document.createElement("a")).onclick=function(){0!==c._currentStep&&o.call(c)},m(a),a.innerHTML=this._options.prevLabel,(n=document.createElement("a")).className=this._options.buttonClass+" introjs-skipbutton ",m(n),n.innerHTML=this._options.skipLabel,n.onclick=function(){c._introItems.length-1===c._currentStep&&"function"==typeof c._introCompleteCallback&&c._introCompleteCallback.call(c),c._introItems.length-1!==c._currentStep&&"function"==typeof c._introExitCallback&&c._introExitCallback.call(c),c._introSkipCallback.call(c),s.call(c,c._targetElement)},j.appendChild(n),this._introItems.length>1&&(j.appendChild(a),j.appendChild(t)),T.appendChild(j),l.call(c,e.element,T,C,B),f.call(this,e.scrollTo,e,T)}var $=c._targetElement.querySelector(".introjs-disableInteraction");$&&$.parentNode.removeChild($),e.disableInteraction&&function(){var e=document.querySelector(".introjs-disableInteraction");null===e&&((e=document.createElement("div")).className="introjs-disableInteraction",this._targetElement.appendChild(e)),d.call(this,e)}.call(c),0===this._currentStep&&this._introItems.length>1?(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=t&&(t.className=this._options.buttonClass+" introjs-nextbutton"),!0===this._options.hidePrev?(null!=a&&(a.className=this._options.buttonClass+" introjs-prevbutton introjs-hidden"),null!=t&&w(t,"introjs-fullbutton")):null!=a&&(a.className=this._options.buttonClass+" introjs-prevbutton introjs-disabled"),null!=n&&(n.innerHTML=this._options.skipLabel)):this._introItems.length-1===this._currentStep||1===this._introItems.length?(null!=n&&(n.innerHTML=this._options.doneLabel,w(n,"introjs-donebutton")),null!=a&&(a.className=this._options.buttonClass+" introjs-prevbutton"),!0===this._options.hideNext?(null!=t&&(t.className=this._options.buttonClass+" introjs-nextbutton introjs-hidden"),null!=a&&w(a,"introjs-fullbutton")):null!=t&&(t.className=this._options.buttonClass+" introjs-nextbutton introjs-disabled")):(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=a&&(a.className=this._options.buttonClass+" introjs-prevbutton"),null!=t&&(t.className=this._options.buttonClass+" introjs-nextbutton"),null!=n&&(n.innerHTML=this._options.skipLabel)),a.setAttribute("role","button"),t.setAttribute("role","button"),n.setAttribute("role","button"),null!=t&&t.focus(),function(e){var t;if(e.element instanceof SVGElement)for(t=e.element.parentNode;null!==e.element.parentNode&&t.tagName&&"body"!==t.tagName.toLowerCase();)"svg"===t.tagName.toLowerCase()&&w(t,"introjs-showElement introjs-relativePosition"),t=t.parentNode;w(e.element,"introjs-showElement");var a=k(e.element,"position");"absolute"!==a&&"relative"!==a&&"fixed"!==a&&w(e.element,"introjs-relativePosition");t=e.element.parentNode;for(;null!==t&&t.tagName&&"body"!==t.tagName.toLowerCase();){var n=k(t,"z-index"),r=parseFloat(k(t,"opacity")),i=k(t,"transform")||k(t,"-webkit-transform")||k(t,"-moz-transform")||k(t,"-ms-transform")||k(t,"-o-transform");(/[0-9]+/.test(n)||r<1||"none"!==i&&void 0!==i)&&w(t,"introjs-fixParent"),t=t.parentNode}}(e),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,e.element)}function f(e,t,a){var n;if("off"!==e&&(this._options.scrollToElement&&(n="tooltip"===e?a.getBoundingClientRect():t.element.getBoundingClientRect(),!function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom+80<=window.innerHeight&&t.right<=window.innerWidth}(t.element)))){var r=S().height;n.bottom-(n.bottom-n.top)<0||t.element.clientHeight>r?window.scrollBy(0,n.top-(r/2-n.height/2)-this._options.scrollPadding):window.scrollBy(0,n.top-(r/2-n.height/2)+this._options.scrollPadding)}}function g(){_(document.querySelectorAll(".introjs-showElement"),function(e){E(e,/introjs-[a-zA-Z]+/g)})}function _(e,t,a){if(e)for(var n=0,r=e.length;n<r;n++)t(e[n],n);"function"==typeof a&&a()}var b,v=(b={},function(e,t){return b[t=t||"introjs-stamp"]=b[t]||0,void 0===e[t]&&(e[t]=b[t]++),e[t]}),y=function(){return new function(){var e="introjs_event";this._id=function(e,t,a,n){return t+v(a)+(n?"_"+v(n):"")},this.on=function(t,a,n,r,i){var o=this._id.apply(this,arguments),s=function(e){return n.call(r||t,e||window.event)};"addEventListener"in t?t.addEventListener(a,s,i):"attachEvent"in t&&t.attachEvent("on"+a,s),t[e]=t[e]||{},t[e][o]=s},this.off=function(t,a,n,r,i){var o=this._id.apply(this,arguments),s=t[e]&&t[e][o];"removeEventListener"in t?t.removeEventListener(a,s,i):"detachEvent"in t&&t.detachEvent("on"+a,s),t[e][o]=null}}}();function w(e,t){if(e instanceof SVGElement){var a=e.getAttribute("class")||"";e.setAttribute("class",a+" "+t)}else{if(void 0!==e.classList)_(t.split(" "),function(t){e.classList.add(t)});else e.className.match(t)||(e.className+=" "+t)}}function E(e,t){if(e instanceof SVGElement){var a=e.getAttribute("class")||"";e.setAttribute("class",a.replace(t,"").replace(/^\s+|\s+$/g,""))}else e.className=e.className.replace(t,"").replace(/^\s+|\s+$/g,"")}function k(e,t){var a="";return e.currentStyle?a=e.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(a=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),a&&a.toLowerCase?a.toLowerCase():a}function I(e){var t=e.parentNode;return!(!t||"HTML"===t.nodeName)&&("fixed"===k(e,"position")||I(t))}function S(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function N(){var e=document.querySelector(".introjs-hintReference");if(e){var t=e.getAttribute("data-step");return e.parentNode.removeChild(e),t}}function x(e){if(this._introItems=[],this._options.hints)_(this._options.hints,function(e){var t=r(e);"string"==typeof t.element&&(t.element=document.querySelector(t.element)),t.hintPosition=t.hintPosition||this._options.hintPosition,t.hintAnimation=t.hintAnimation||this._options.hintAnimation,null!==t.element&&this._introItems.push(t)}.bind(this));else{var t=e.querySelectorAll("*[data-hint]");if(!t||!t.length)return!1;_(t,function(e){var t=e.getAttribute("data-hintanimation");t=t?"true"===t:this._options.hintAnimation,this._introItems.push({element:e,hint:e.getAttribute("data-hint"),hintPosition:e.getAttribute("data-hintposition")||this._options.hintPosition,hintAnimation:t,tooltipClass:e.getAttribute("data-tooltipclass"),position:e.getAttribute("data-position")||this._options.tooltipPosition})}.bind(this))}(function(){var e=this,t=document.querySelector(".introjs-hints");null===t&&((t=document.createElement("div")).className="introjs-hints");_(this._introItems,function(a,n){if(!document.querySelector('.introjs-hint[data-step="'+n+'"]')){var r=document.createElement("a");m(r),r.onclick=function(t){return function(a){var n=a||window.event;n.stopPropagation&&n.stopPropagation(),null!==n.cancelBubble&&(n.cancelBubble=!0),O.call(e,t)}}(n),r.className="introjs-hint",a.hintAnimation||w(r,"introjs-hint-no-anim"),I(a.element)&&w(r,"introjs-fixedhint");var i=document.createElement("div");i.className="introjs-hint-dot";var o=document.createElement("div");o.className="introjs-hint-pulse",r.appendChild(i),r.appendChild(o),r.setAttribute("data-step",n),a.targetElement=a.element,a.element=r,j.call(this,a.hintPosition,r,a.targetElement),t.appendChild(r)}}.bind(this)),document.body.appendChild(t),void 0!==this._hintsAddedCallback&&this._hintsAddedCallback.call(this)}).call(this),y.on(document,"click",N,this,!1),y.on(window,"resize",C,this,!0)}function C(){_(this._introItems,function(e){void 0!==e.targetElement&&j.call(this,e.hintPosition,e.element,e.targetElement)}.bind(this))}function T(e){var t=document.querySelector(".introjs-hints");return t?t.querySelectorAll(e):[]}function P(e){var t=T('.introjs-hint[data-step="'+e+'"]')[0];N.call(this),t&&w(t,"introjs-hidehint"),void 0!==this._hintCloseCallback&&this._hintCloseCallback.call(this,e)}function R(e){var t=T('.introjs-hint[data-step="'+e+'"]')[0];t&&E(t,/introjs-hidehint/g)}function A(e){var t=T('.introjs-hint[data-step="'+e+'"]')[0];t&&t.parentNode.removeChild(t)}function j(e,t,a){var n=L.call(this,a);switch(e){default:case"top-left":t.style.left=n.left+"px",t.style.top=n.top+"px";break;case"top-right":t.style.left=n.left+n.width-20+"px",t.style.top=n.top+"px";break;case"bottom-left":t.style.left=n.left+"px",t.style.top=n.top+n.height-20+"px";break;case"bottom-right":t.style.left=n.left+n.width-20+"px",t.style.top=n.top+n.height-20+"px";break;case"middle-left":t.style.left=n.left+"px",t.style.top=n.top+(n.height-20)/2+"px";break;case"middle-right":t.style.left=n.left+n.width-20+"px",t.style.top=n.top+(n.height-20)/2+"px";break;case"middle-middle":t.style.left=n.left+(n.width-20)/2+"px",t.style.top=n.top+(n.height-20)/2+"px";break;case"bottom-middle":t.style.left=n.left+(n.width-20)/2+"px",t.style.top=n.top+n.height-20+"px";break;case"top-middle":t.style.left=n.left+(n.width-20)/2+"px",t.style.top=n.top+"px"}}function O(e){var t=document.querySelector('.introjs-hint[data-step="'+e+'"]'),a=this._introItems[e];void 0!==this._hintClickCallback&&this._hintClickCallback.call(this,t,a,e);var n=N.call(this);if(parseInt(n,10)!==e){var r=document.createElement("div"),i=document.createElement("div"),o=document.createElement("div"),s=document.createElement("div");r.className="introjs-tooltip",r.onclick=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},i.className="introjs-tooltiptext";var c=document.createElement("p");c.innerHTML=a.hint;var u=document.createElement("a");u.className=this._options.buttonClass,u.setAttribute("role","button"),u.innerHTML=this._options.hintButtonLabel,u.onclick=P.bind(this,e),i.appendChild(c),i.appendChild(u),o.className="introjs-arrow",r.appendChild(o),r.appendChild(i),this._currentStep=t.getAttribute("data-step"),s.className="introjs-tooltipReferenceLayer introjs-hintReference",s.setAttribute("data-step",t.getAttribute("data-step")),d.call(this,s),s.appendChild(r),document.body.appendChild(s),l.call(this,t,r,o,null,!0)}}function L(e){var t=document.body,a=document.documentElement,n=window.pageYOffset||a.scrollTop||t.scrollTop,r=window.pageXOffset||a.scrollLeft||t.scrollLeft,i=e.getBoundingClientRect();return{top:i.top+n,width:i.width,height:i.height,left:i.left+r}}function D(e){var t=window.getComputedStyle(e),a="absolute"===t.position,n=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(var r=e;r=r.parentElement;)if(t=window.getComputedStyle(r),(!a||"static"!==t.position)&&n.test(t.overflow+t.overflowY+t.overflowX))return r;return document.body}function q(e,t){e.scrollTop=t.offsetTop-e.offsetTop}function M(){return parseInt(this._currentStep+1,10)/this._introItems.length*100}var F=function(t){var a;if("object"==typeof t)a=new e(t);else if("string"==typeof t){var n=document.querySelector(t);if(!n)throw new Error("There is no element with given selector.");a=new e(n)}else a=new e(document.body);return F.instances[v(a,"introjs-instance")]=a,a};return F.version="2.9.0",F.instances={},F.fn=e.prototype={clone:function(){return new e(this)},setOption:function(e,t){return this._options[e]=t,this},setOptions:function(e){return this._options=function(e,t){var a,n={};for(a in e)n[a]=e[a];for(a in t)n[a]=t[a];return n}(this._options,e),this},start:function(e){return t.call(this,this._targetElement,e),this},goToStep:function(e){return function(e){this._currentStep=e-2,void 0!==this._introItems&&i.call(this)}.call(this,e),this},addStep:function(e){return this._options.steps||(this._options.steps=[]),this._options.steps.push(e),this},addSteps:function(e){if(e.length){for(var t=0;t<e.length;t++)this.addStep(e[t]);return this}},goToStepNumber:function(e){return function(e){this._currentStepNumber=e,void 0!==this._introItems&&i.call(this)}.call(this,e),this},nextStep:function(){return i.call(this),this},previousStep:function(){return o.call(this),this},exit:function(e){return s.call(this,this._targetElement,e),this},refresh:function(){return function(){if(d.call(this,document.querySelector(".introjs-helperLayer")),d.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),d.call(this,document.querySelector(".introjs-disableInteraction")),void 0!==this._currentStep&&null!==this._currentStep){var e=document.querySelector(".introjs-helperNumberLayer"),t=document.querySelector(".introjs-arrow"),a=document.querySelector(".introjs-tooltip");l.call(this,this._introItems[this._currentStep].element,a,t,e)}return C.call(this),this}.call(this),this},onbeforechange:function(e){if("function"!=typeof e)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=e,this},onchange:function(e){if("function"!=typeof e)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=e,this},onafterchange:function(e){if("function"!=typeof e)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=e,this},oncomplete:function(e){if("function"!=typeof e)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=e,this},onhintsadded:function(e){if("function"!=typeof e)throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=e,this},onhintclick:function(e){if("function"!=typeof e)throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=e,this},onhintclose:function(e){if("function"!=typeof e)throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=e,this},onexit:function(e){if("function"!=typeof e)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=e,this},onskip:function(e){if("function"!=typeof e)throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=e,this},onbeforeexit:function(e){if("function"!=typeof e)throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=e,this},addHints:function(){return x.call(this,this._targetElement),this},hideHint:function(e){return P.call(this,e),this},hideHints:function(){return function(){_(T(".introjs-hint"),function(e){P.call(this,e.getAttribute("data-step"))}.bind(this))}.call(this),this},showHint:function(e){return R.call(this,e),this},showHints:function(){return function(){var e=T(".introjs-hint");e&&e.length?_(e,function(e){R.call(this,e.getAttribute("data-step"))}.bind(this)):x.call(this,this._targetElement)}.call(this),this},removeHints:function(){return function(){_(T(".introjs-hint"),function(e){A.call(this,e.getAttribute("data-step"))}.bind(this))}.call(this),this},removeHint:function(e){return A.call(this,e),this},showHintDialog:function(e){return O.call(this,e),this}},F},e.exports=n(),e.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),n().apply(this,arguments)}},516:function(e,t,a){
29
- /*!
30
- Papa Parse
31
- v4.1.1
32
- https://github.com/mholt/PapaParse
33
- */
34
- !function(t){"use strict";function a(e){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:{}},function(e){var t=p(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}.call(this,e),this.parseChunk=function(e){var a=this._partialLine+e;this._partialLine="";var n=this._handle.parse(a,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var r=n.meta.cursor;this._finished||(this._partialLine=a.substring(r-this._baseIndex),this._baseIndex=r),n&&n.data&&(this._rowCount+=n.data.length);var i=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(f)t.postMessage({results:n,workerId:v.WORKER_ID,finished:i});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),!i||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),i||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(e){m(this._config.error)?this._config.error(e):f&&this._config.error&&t.postMessage({workerId:v.WORKER_ID,error:e,finished:!1})}}function n(e){var t;(e=e||{}).chunkSize||(e.chunkSize=v.RemoteChunkSize),a.call(this,e),this._nextChunk=f?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,f||(t.onload=d(this._chunkLoaded,this),t.onerror=d(this._chunkError,this)),t.open("GET",this._input,!f),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+e),t.setRequestHeader("If-None-Match","webkit-no-cache")}try{t.send()}catch(e){this._chunkError(e.message)}f&&0==t.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){if(4==t.readyState){if(t.status<200||t.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>function(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)}},this._chunkError=function(e){var a=t.statusText||e;this._sendError(a)}}function r(e){(e=e||{}).chunkSize||(e.chunkSize=v.LocalChunkSize),a.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=d(this._chunkLoaded,this),t.onerror=d(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 a=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,a)}var i=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:i}})},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 i(e){var t;e=e||{},a.call(this,e),this.stream=function(e){return e,t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,a=e?t.substr(0,e):t;return t=e?t.substr(e):"",this._finished=!t,this.parseChunk(a)}}}function o(e){function t(){if(_&&l&&(r("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+v.DefaultDelimiter+"'"),l=!1),e.skipEmptyLines)for(var t=0;t<_.data.length;t++)1==_.data[t].length&&""==_.data[t][0]&&_.data.splice(t--,1);return a()&&function(){if(_){for(var e=0;a()&&e<_.data.length;e++)for(var t=0;t<_.data[e].length;t++)g.push(_.data[e][t]);_.data.splice(0,1)}}(),function(){if(!_||!e.header&&!e.dynamicTyping)return _;for(var t=0;t<_.data.length;t++){for(var a={},i=0;i<_.data[t].length;i++){if(e.dynamicTyping){var o=_.data[t][i];_.data[t][i]="true"==o||"TRUE"==o||"false"!=o&&"FALSE"!=o&&n(o)}e.header&&(i>=g.length?(a.__parsed_extra||(a.__parsed_extra=[]),a.__parsed_extra.push(_.data[t][i])):a[g[i]]=_.data[t][i])}e.header&&(_.data[t]=a,i>g.length?r("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+i,t):i<g.length&&r("FieldMismatch","TooFewFields","Too few fields: expected "+g.length+" fields but parsed "+i,t))}return e.header&&_.meta&&(_.meta.fields=g),_}()}function a(){return e.header&&0==g.length}function n(e){return c.test(e)?parseFloat(e):e}function r(e,t,a,n){_.errors.push({type:e,code:t,message:a,row:n})}var i,o,l,c=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,u=this,d=0,h=!1,f=!1,g=[],_={data:[],errors:[],meta:{}};if(m(e.step)){var b=e.step;e.step=function(n){if(_=n,a())t();else{if(t(),0==_.data.length)return;d+=n.data.length,e.preview&&d>e.preview?o.abort():b(_,u)}}}this.parse=function(a,n,r){if(e.newline||(e.newline=function(e){var t=(e=e.substr(0,1048576)).split("\r");if(1==t.length)return"\n";for(var a=0,n=0;n<t.length;n++)"\n"==t[n][0]&&a++;return a>=t.length/2?"\r\n":"\r"}(a)),l=!1,!e.delimiter){var c=function(t){for(var a,n,r,i=[",","\t","|",";",v.RECORD_SEP,v.UNIT_SEP],o=0;o<i.length;o++){var l=i[o],c=0,u=0;r=void 0;for(var p=new s({delimiter:l,preview:10}).parse(t),d=0;d<p.data.length;d++){var m=p.data[d].length;u+=m,void 0!==r?m>1&&(c+=Math.abs(m-r),r=m):r=m}u/=p.data.length,(void 0===n||n>c)&&u>1.99&&(n=c,a=l)}return e.delimiter=a,{successful:!!a,bestDelimiter:a}}(a);c.successful?e.delimiter=c.bestDelimiter:(l=!0,e.delimiter=v.DefaultDelimiter),_.meta.delimiter=e.delimiter}var u=p(e);return e.preview&&e.header&&u.preview++,i=a,o=new s(u),_=o.parse(i,n,r),t(),h?{meta:{paused:!0}}:_||{meta:{paused:!1}}},this.paused=function(){return h},this.pause=function(){h=!0,o.abort(),i=i.substr(o.getCharIndex())},this.resume=function(){h=!1,u.streamer.parseChunk(i)},this.aborted=function(){return f},this.abort=function(){f=!0,o.abort(),_.meta.aborted=!0,m(e.complete)&&e.complete(_),i=""}}function s(e){var t=(e=e||{}).delimiter,a=e.newline,n=e.comments,r=e.step,i=e.preview,o=e.fastMode;if(("string"!=typeof t||v.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";!0===n?n="#":("string"!=typeof n||v.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=a&&"\r"!=a&&"\r\n"!=a&&(a="\n");var s=0,l=!1;this.parse=function(e,c,u){function p(e){w.push(e),I=s}function d(t){return u?h():(t||(t=e.substr(s)),k.push(t),s=g,p(k),y&&f(),h())}function m(t){s=t,p(k),k=[],C=e.indexOf(a,s)}function h(e){return{data:w,errors:E,meta:{delimiter:t,linebreak:a,aborted:l,truncated:!!e,cursor:I+(c||0)}}}function f(){r(h()),w=[],E=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,_=t.length,b=a.length,v=n.length,y="function"==typeof r;s=0;var w=[],E=[],k=[],I=0;if(!e)return h();if(o||!1!==o&&-1===e.indexOf('"')){for(var S=e.split(a),N=0;N<S.length;N++){k=S[N];if(s+=k.length,N!==S.length-1)s+=a.length;else if(u)return h();if(!n||k.substr(0,v)!=n){if(y){if(w=[],p(k.split(t)),f(),l)return h()}else p(k.split(t));if(i&&N>=i)return w=w.slice(0,i),h(!0)}}return h()}for(var x=e.indexOf(t,s),C=e.indexOf(a,s);;)if('"'!=e[s])if(n&&0===k.length&&e.substr(s,v)===n){if(-1==C)return h();s=C+b,C=e.indexOf(a,s),x=e.indexOf(t,s)}else if(-1!==x&&(C>x||-1===C))k.push(e.substring(s,x)),s=x+_,x=e.indexOf(t,s);else{if(-1===C)break;if(k.push(e.substring(s,C)),m(C+b),y&&(f(),l))return h();if(i&&w.length>=i)return h(!0)}else{var T=s;for(s++;;){if(-1===(T=e.indexOf('"',T+1)))return u||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:s}),d();if(T===g-1)return d(e.substring(s,T).replace(/""/g,'"'));if('"'!=e[T+1]){if(e[T+1]==t){k.push(e.substring(s,T).replace(/""/g,'"')),s=T+1+_,x=e.indexOf(t,s),C=e.indexOf(a,s);break}if(e.substr(T+1,b)===a){if(k.push(e.substring(s,T).replace(/""/g,'"')),m(T+1+b),x=e.indexOf(t,s),y&&(f(),l))return h();if(i&&w.length>=i)return h(!0);break}}else T++}}return d()},this.abort=function(){l=!0},this.getCharIndex=function(){return s}}function l(e){var t=e.data,a=_[t.workerId],n=!1;if(t.error)a.userError(t.error,t.file);else if(t.results&&t.results.data){var r={abort:function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:u,resume:u};if(m(a.userStep)){for(var i=0;i<t.results.data.length&&(a.userStep({data:[t.results.data[i]],errors:t.results.errors,meta:t.results.meta},r),!n);i++);delete t.results}else m(a.userChunk)&&(a.userChunk(t.results,r,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var a=_[e];m(a.userComplete)&&a.userComplete(t),a.terminate(),delete _[e]}function u(){throw"Not implemented."}function p(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var a in e)t[a]=p(e[a]);return t}function d(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var h,f=!t.document&&!!t.postMessage,g=!1,_={},b=0,v={};if(v.parse=function(e,a){if((a=a||{}).worker&&v.WORKERS_SUPPORTED){var o=function(){if(!v.WORKERS_SUPPORTED)return!1;if(!g&&null===v.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 e=new t.Worker(v.SCRIPT_PATH||h);return e.onmessage=l,e.id=b++,_[e.id]=e,e}();return o.userStep=a.step,o.userChunk=a.chunk,o.userComplete=a.complete,o.userError=a.error,a.step=m(a.step),a.chunk=m(a.chunk),a.complete=m(a.complete),a.error=m(a.error),delete a.worker,void o.postMessage({input:e,config:a,workerId:o.id})}var s=null;return"string"==typeof e?s=a.download?new n(a):new i(a):(t.File&&e instanceof File||e instanceof Object)&&(s=new r(a)),s.stream(e)},v.unparse=function(e,t){function a(e){if("object"!=typeof e)return[];var t=[];for(var a in e)t.push(a);return t}function n(e,t){var a="";"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 l=0;l<e.length;l++)l>0&&(a+=o),a+=r(e[l],l);t.length>0&&(a+=s)}for(var c=0;c<t.length;c++){for(var u=n?e.length:t[c].length,p=0;u>p;p++){p>0&&(a+=o);var d=n&&i?e[p]:p;a+=r(t[c][d],p)}c<t.length-1&&(a+=s)}return a}function r(e,t){return null==e?"":(e=e.toString().replace(/"/g,'""'),"boolean"==typeof i&&i||i instanceof Array&&i[t]||function(e,t){for(var a=0;a<t.length;a++)if(e.indexOf(t[a])>-1)return!0;return!1}(e,v.BAD_DELIMITERS)||e.indexOf(o)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1)?'"'+e+'"':e)}var i=!1,o=",",s="\r\n";if("object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==v.BAD_DELIMITERS.indexOf(t.delimiter)&&(o=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(i=t.quotes),"string"==typeof t.newline&&(s=t.newline)),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return n(null,e);if("object"==typeof e[0])return n(a(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:a(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),n(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"},v.RECORD_SEP=String.fromCharCode(30),v.UNIT_SEP=String.fromCharCode(31),v.BYTE_ORDER_MARK="\ufeff",v.BAD_DELIMITERS=["\r","\n",'"',v.BYTE_ORDER_MARK],v.WORKERS_SUPPORTED=!!t.Worker,v.SCRIPT_PATH=null,v.LocalChunkSize=10485760,v.RemoteChunkSize=5242880,v.DefaultDelimiter=",",v.Parser=s,v.ParserHandle=o,v.NetworkStreamer=n,v.FileStreamer=r,v.StringStreamer=i,e.exports?e.exports=v:m(t.define)&&t.define.amd?t.define(function(){return v}):t.Papa=v,t.jQuery){var y=t.jQuery;y.fn.parse=function(e){function a(){if(0!=i.length){var t=i[0];if(m(e.before)){var a=e.before(t.file,t.inputElem);if("object"==typeof a){if("abort"==a.action)return void function(t,a,n,r){m(e.error)&&e.error({name:t},a,n,r)}("AbortError",t.file,t.inputElem,a.reason);if("skip"==a.action)return void n();"object"==typeof a.config&&(t.instanceConfig=y.extend(t.instanceConfig,a.config))}else if("skip"==a)return void n()}var r=t.instanceConfig.complete;t.instanceConfig.complete=function(e){m(r)&&r(e,t.file,t.inputElem),n()},v.parse(t.file,t.instanceConfig)}else m(e.complete)&&e.complete()}function n(){i.splice(0,1),a()}var r=e.config||{},i=[];return this.each(function(){if(!("INPUT"==y(this).prop("tagName").toUpperCase()&&"file"==y(this).attr("type").toLowerCase()&&t.FileReader)||!this.files||0==this.files.length)return!0;for(var e=0;e<this.files.length;e++)i.push({file:this.files[e],inputElem:this,instanceConfig:y.extend({},r)})}),a(),this}}f?t.onmessage=function(e){var a=e.data;if(void 0===v.WORKER_ID&&a&&(v.WORKER_ID=a.workerId),"string"==typeof a.input)t.postMessage({workerId:v.WORKER_ID,results:v.parse(a.input,a.config),finished:!0});else if(t.File&&a.input instanceof File||a.input instanceof Object){var n=v.parse(a.input,a.config);n&&t.postMessage({workerId:v.WORKER_ID,results:n,finished:!0})}}:v.WORKERS_SUPPORTED&&(h=function(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}(),document.body?document.addEventListener("DOMContentLoaded",function(){g=!0},!0):g=!0),n.prototype=Object.create(a.prototype),n.prototype.constructor=n,r.prototype=Object.create(a.prototype),r.prototype.constructor=r,i.prototype=Object.create(i.prototype),i.prototype.constructor=i}("undefined"!=typeof window?window:this)},517:function(e,t,a){e.exports=a(644)},518:function(e,t,a){e.exports=a(648)},601:function(e,t,a){"use strict";a.r(t);var n=a(11),r=a.n(n),i=a(10),o=a.n(i),s=a(12),l=a.n(s),c=a(13),u=a.n(c),p=a(14),d=a.n(p),m=a(43),h=a.n(m),f=a(30),g=a.n(f),_=a(15),b=a.n(_),v=a(22),y=a.n(v),w=a(8),E=a.n(w),k=a(73),I=a.n(k),S=a(0),N=a.n(S),x=a(302),C=a(1),T=a(2),P=a.n(T),R=a(126),A=a.n(R),j=a(37),O=a.n(j),L=[{name:"email",label:C.a.I18n.t("email"),type:"text",disabled:function(e){return Number(e.wp_user_id>0)||1===Number(e.is_woocommerce_user)}},{name:"first_name",label:C.a.I18n.t("firstname"),type:"text",disabled:function(e){return Number(e.wp_user_id>0)||1===Number(e.is_woocommerce_user)}},{name:"last_name",label:C.a.I18n.t("lastname"),type:"text",disabled:function(e){return Number(e.wp_user_id>0)||1===Number(e.is_woocommerce_user)}},{name:"status",label:C.a.I18n.t("status"),type:"select",automationId:"subscriber-status",values:{subscribed:C.a.I18n.t("subscribed"),unconfirmed:C.a.I18n.t("unconfirmed"),unsubscribed:C.a.I18n.t("unsubscribed"),inactive:C.a.I18n.t("inactive"),bounced:C.a.I18n.t("bounced")}},{name:"segments",label:C.a.I18n.t("lists"),type:"selection",placeholder:C.a.I18n.t("selectList"),tip:C.a.I18n.t("welcomeEmailTip"),api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,selected:function(e){var t,a;return!1===I()(e.subscriptions)?null:E()(t=y()(a=e.subscriptions).call(a,function(e){return"subscribed"===e.status})).call(t,function(e){return e.segment_id})},filter:function(e){return!e.deleted_at&&"default"===e.type},getLabel:function(e){var t;return b()(t="".concat(e.name," (")).call(t,e.subscribers,")")},getSearchLabel:function(e,t){var a,n="";void 0!==t.subscriptions&&g()(a=t.subscriptions).call(a,function(t){if(e.id===t.segment_id&&(n=e.name,"unsubscribed"===t.status)){var a=C.a.Date.format(t.updated_at);n+=" (%$1s)".replace("%$1s",C.a.I18n.t("unsubscribedOn").replace("%$1s",a))}});return n}}],D=window.mailpoet_custom_fields||[];g()(D).call(D,function(e){var t={name:"cf_".concat(e.id),label:e.name,type:e.type};switch(e.params&&(t.params=e.params),h()(e.params)&&(t.values=h()(e.params)),e.type){case"date":t.year_placeholder=C.a.I18n.t("year"),t.month_placeholder=C.a.I18n.t("month"),t.day_placeholder=C.a.I18n.t("day");break;case"select":t.placeholder="-";break;default:t.placeholder=""}L.push(t)});var q={onUpdate:function(){C.a.Notice.success(C.a.I18n.t("subscriberUpdated"))},onCreate:function(){C.a.Notice.success(C.a.I18n.t("subscriberAdded")),C.a.trackEvent("Subscribers > Add new",{"MailPoet Free version":window.mailpoet_version})}};function M(e){if(Number(e.wp_user_id)>0)return N.a.createElement("p",{className:"description"},O()(C.a.I18n.t("WPUserEditNotice"),/\[link\](.*?)\[\/link\]/g,function(t,a){return N.a.createElement("a",{key:a,href:"user-edit.php?user_id=".concat(e.wp_user_id)},t)}))}function F(){return N.a.createElement("p",{className:"description"},N.a.createElement("strong",null,C.a.I18n.t("tip"))," ",C.a.I18n.t("customFieldsTip"))}var B=function(e){function t(){return r()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),o()(t,[{key:"render",value:function(){return N.a.createElement("div",null,N.a.createElement("h1",{className:"title"},C.a.I18n.t("subscriber"),N.a.createElement(x.a,{className:"page-title-action",to:"/"},C.a.I18n.t("backToList"))),N.a.createElement(A.a,{automationId:"subscriber_edit_form",endpoint:"subscribers",fields:L,params:this.props.match.params,messages:q,beforeFormContent:M,afterFormContent:F}))}}]),t}(N.a.Component);B.propTypes={match:P.a.shape({params:P.a.shape({id:P.a.string}).isRequired}).isRequired},t.default=B},602:function(e,t,a){var n=a(503);e.exports=function(e){if(n(e)){for(var t=0,a=new Array(e.length);t<e.length;t++)a[t]=e[t];return a}}},603:function(e,t,a){var n=a(604),r=a(608);e.exports=function(e){if(r(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return n(e)}},604:function(e,t,a){e.exports=a(605)},605:function(e,t,a){e.exports=a(606)},606:function(e,t,a){a(92),a(607);var n=a(24);e.exports=n.Array.from},607:function(e,t,a){var n=a(17),r=a(309);n({target:"Array",stat:!0,forced:!a(506)(function(e){Array.from(e)})},{from:r})},608:function(e,t,a){e.exports=a(609)},609:function(e,t,a){a(87),a(92),e.exports=a(610)},610:function(e,t,a){var n=a(86),r=a(27),i=a(69),o=r("iterator");e.exports=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(n(t))}},611:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},612:function(e,t,a){e.exports=a(613)},613:function(e,t,a){var n=a(614),r=Array.prototype;e.exports=function(e){var t=e.sort;return e===r||e instanceof Array&&t===r.sort?n:t}},614:function(e,t,a){a(615);var n=a(40);e.exports=n("Array").sort},615:function(e,t,a){"use strict";var n=a(17),r=a(68),i=a(48),o=a(26),s=a(105),l=[].sort,c=[1,2,3],u=o(function(){c.sort(void 0)}),p=o(function(){c.sort(null)}),d=s("sort");n({target:"Array",proto:!0,forced:u||!p||d},{sort:function(e){return void 0===e?l.call(i(this)):l.call(i(this),r(e))}})},634:function(e,t,a){e.exports=a(635)},635:function(e,t,a){a(636);var n=a(24);e.exports=n.Number.isFinite},636:function(e,t,a){a(17)({target:"Number",stat:!0},{isFinite:a(637)})},637:function(e,t,a){var n=a(25).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&n(e)}},638:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(302),o=a(1),s=a(126),l=a.n(s),c=a(2),u=a.n(c),p=[{name:"name",label:o.a.I18n.t("name"),type:"text"},{name:"description",label:o.a.I18n.t("description"),type:"textarea",tip:o.a.I18n.t("segmentDescriptionTip")}],d={onUpdate:function(){o.a.Notice.success(o.a.I18n.t("segmentUpdated"))},onCreate:function(){o.a.Notice.success(o.a.I18n.t("segmentAdded")),o.a.trackEvent("Lists > Add new",{"MailPoet Free version":window.mailpoet_version})}},m=function(e){return r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},o.a.I18n.t("segment"),r.a.createElement(i.a,{className:"page-title-action",to:"/"},o.a.I18n.t("backToList"))),r.a.createElement(l.a,{endpoint:"segments",fields:p,params:e.match.params,messages:d}))};m.propTypes={match:u.a.shape({params:u.a.shape({id:u.a.string}).isRequired}).isRequired},t.default=m},644:function(e,t,a){e.exports=a(645)},645:function(e,t,a){var n=a(646),r=Array.prototype;e.exports=function(e){var t=e.slice;return e===r||e instanceof Array&&t===r.slice?n:t}},646:function(e,t,a){a(647);var n=a(40);e.exports=n("Array").slice},647:function(e,t,a){"use strict";var n=a(17),r=a(39),i=a(88),o=a(104),s=a(60),l=a(51),c=a(120),u=a(95),p=a(27)("species"),d=[].slice,m=Math.max;n({target:"Array",proto:!0,forced:!u("slice")},{slice:function(e,t){var a,n,u,h=l(this),f=s(h.length),g=o(e,f),_=o(void 0===t?f:t,f);if(i(h)&&("function"!=typeof(a=h.constructor)||a!==Array&&!i(a.prototype)?r(a)&&null===(a=a[p])&&(a=void 0):a=void 0,a===Array||void 0===a))return d.call(h,g,_);for(n=new(void 0===a?Array:a)(m(_-g,0)),u=0;g<_;g++,u++)g in h&&c(n,u,h[g]);return n.length=u,n}})},648:function(e,t,a){e.exports=a(649)},649:function(e,t,a){var n=a(650),r=Array.prototype;e.exports=function(e){var t=e.fill;return e===r||e instanceof Array&&t===r.fill?n:t}},650:function(e,t,a){a(651);var n=a(40);e.exports=n("Array").fill},651:function(e,t,a){var n=a(17),r=a(652),i=a(107);n({target:"Array",proto:!0},{fill:r}),i("fill")},652:function(e,t,a){"use strict";var n=a(48),r=a(104),i=a(60);e.exports=function(e){for(var t=n(this),a=i(t.length),o=arguments.length,s=r(o>1?arguments[1]:void 0,a),l=o>2?arguments[2]:void 0,c=void 0===l?a:r(l,a);c>s;)t[s++]=e;return t}},653:function(e,t,a){e.exports=a(654)},654:function(e,t,a){var n=a(655),r=Array.prototype;e.exports=function(e){var t=e.reduce;return e===r||e instanceof Array&&t===r.reduce?n:t}},655:function(e,t,a){a(656);var n=a(40);e.exports=n("Array").reduce},656:function(e,t,a){"use strict";var n=a(17),r=a(657).left;n({target:"Array",proto:!0,forced:a(105)("reduce")},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},657:function(e,t,a){var n=a(68),r=a(48),i=a(84),o=a(60),s=function(e){return function(t,a,s,l){n(a);var c=r(t),u=i(c),p=o(c.length),d=e?p-1:0,m=e?-1:1;if(s<2)for(;;){if(d in u){l=u[d],d+=m;break}if(d+=m,e?d<0:p<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:p>d;d+=m)d in u&&(l=a(l,u[d],d,c));return l}};e.exports={left:s(!1),right:s(!0)}},658:function(e,t){jQuery.AsyncQueue=function(){var e,t,a,n,r=this,o=[],s=!1;return n=function(){var e=o.shift();e?(e.apply(r,[r]),!1===s&&n()):t&&t.apply(r)},this.onFailure=function(t){e=t},this.onComplete=function(e){t=e},this.add=function(e){return o.push(e),this},this.storeData=function(e){return a=e,this},this.lastCallbackData=function(){return a},this.run=function(){s=!1,n()},this.pause=function(){return s=!0,this},this.failure=function(){if(s=!0,e){var t=[r];for(i=0;i<arguments.length;i++)t.push(arguments[i]);e.apply(r,t)}},this}},659:function(e,t,a){e.exports=a(660)},660:function(e,t,a){e.exports=a(318)},661:function(e,t,a){e.exports=a(662)},662:function(e,t,a){e.exports=a(663)},663:function(e,t,a){a(664);var n=a(24).Object,r=e.exports=function(e,t){return n.getOwnPropertyDescriptor(e,t)};n.getOwnPropertyDescriptor.sham&&(r.sham=!0)},664:function(e,t,a){var n=a(17),r=a(26),i=a(51),o=a(90).f,s=a(41),l=r(function(){o(1)});n({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return o(i(e),t)}})},665:function(e,t,a){e.exports=a(666)},666:function(e,t,a){e.exports=a(317)},667:function(e,t,a){e.exports=a(668)},668:function(e,t,a){e.exports=a(320)},669:function(e,t,a){e.exports=a(670)},670:function(e,t,a){e.exports=a(671)},671:function(e,t,a){a(306);var n=a(24);e.exports=n.Object.getOwnPropertySymbols},672:function(e,t,a){e.exports=a(673)},673:function(e,t,a){e.exports=a(307)},677:function(e,t,a){e.exports=a(678)},678:function(e,t,a){a(679);var n=a(24);e.exports=n.Object.values},679:function(e,t,a){var n=a(17),r=a(680).values;n({target:"Object",stat:!0},{values:function(e){return r(e)}})},680:function(e,t,a){var n=a(41),r=a(85),i=a(51),o=a(83).f,s=function(e){return function(t){for(var a,s=i(t),l=r(s),c=l.length,u=0,p=[];c>u;)a=l[u++],n&&!o.call(s,a)||p.push(e?[a,s[a]]:s[a]);return p}};e.exports={entries:s(!0),values:s(!1)}},705:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(35),o=a.n(i),s=a(323),l=a.n(s),c=a(2),u=a.n(c),p=a(124),d=a(53),m=a.n(d),h=a(56),f=a.n(h),g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e};function _(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var b=function(e){function t(){var a,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return a=n=_(this,e.call.apply(e,[this].concat(i))),n.state={match:n.computeMatch(n.props.history.location.pathname)},_(n,a)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getChildContext=function(){return{router:g({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},t.prototype.computeMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}},t.prototype.componentWillMount=function(){var e=this,t=this.props,a=t.children,n=t.history;f()(null==a||1===r.a.Children.count(a),"A <Router> may have only one child element"),this.unlisten=n.listen(function(){e.setState({match:e.computeMatch(n.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){m()(this.props.history===e.history,"You cannot change <Router history>")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?r.a.Children.only(e):null},t}(r.a.Component);b.propTypes={history:u.a.object.isRequired,children:u.a.node},b.contextTypes={router:u.a.object},b.childContextTypes={router:u.a.object.isRequired};var v=b;function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var w=function(e){function t(){var a,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return a=n=y(this,e.call.apply(e,[this].concat(i))),n.history=Object(p.createHashHistory)(n.props),y(n,a)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){l()(!this.props.history,"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return r.a.createElement(v,{history:this.history,children:this.props.children})},t}(r.a.Component);w.propTypes={basename:u.a.string,getUserConfirmation:u.a.func,hashType:u.a.oneOf(["hashbang","noslash","slash"]),children:u.a.node};var E=w,k=a(327);var I=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){f()(this.context.router,"You should not use <Switch> outside a <Router>")},t.prototype.componentWillReceiveProps=function(e){m()(!(e.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),m()(!(!e.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,a=this.props.location||e.location,n=void 0,i=void 0;return r.a.Children.forEach(t,function(t){if(null==n&&r.a.isValidElement(t)){var o=t.props,s=o.path,l=o.exact,c=o.strict,u=o.sensitive,p=o.from,d=s||p;i=t,n=Object(k.a)(a.pathname,{path:d,exact:l,strict:c,sensitive:u},e.match)}}),n?r.a.cloneElement(i,{location:a,computedMatch:n}):null},t}(r.a.Component);I.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},I.propTypes={children:u.a.node,location:u.a.object};var S=I,N=a(326).a,x=a(30),C=a.n(x),T=a(15),P=a.n(T),R=a(11),A=a.n(R),j=a(10),O=a.n(j),L=a(12),D=a.n(L),q=a(13),M=a.n(q),F=a(6),B=a.n(F),$=a(14),V=a.n($),H=a(7),W=a.n(H),z=a(302),U=a(4),K=a.n(U),G=a(1),J=a(18),Y=a.n(J),Q=a(61),X=a.n(Q),Z=a(111),ee=a.n(Z),te=[{name:"email",label:G.a.I18n.t("subscriber"),sortable:!0},{name:"status",label:G.a.I18n.t("status"),sortable:!0},{name:"segments",label:G.a.I18n.t("lists")},{name:"created_at",label:G.a.I18n.t("subscribedOn"),sortable:!0},{name:"updated_at",label:G.a.I18n.t("lastModifiedOn"),sortable:!0}],ae={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSubscriberTrashed"):G.a.I18n.t("multipleSubscribersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSubscriberDeleted"):G.a.I18n.t("multipleSubscribersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSubscriberRestored"):G.a.I18n.t("multipleSubscribersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onNoItemsFound:function(e){return"bounced"===e&&!window.mailpoet_premium_active&&!window.mss_active&&r.a.createElement("div",null,r.a.createElement("p",null,G.a.I18n.t("bouncedSubscribersHelp")),r.a.createElement("p",null,r.a.createElement("a",{href:"admin.php?page=mailpoet-premium",className:"button-primary"},G.a.I18n.t("bouncedSubscribersPremiumButtonText"))))}},ne=[{name:"moveToList",label:G.a.I18n.t("moveToList"),onSelect:function(){return r.a.createElement(ee.a,{field:{id:"move_to_segment",name:"move_to_segment",endpoint:"segments",filter:function(e){return!(e.deleted_at||"default"!==e.type)}}})},getData:function(){return{segment_id:Number(K()("#move_to_segment").val())}},onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleSubscribersMovedToList").replace("%$1d",Number(e.meta.count).toLocaleString()).replace("%$2s",e.meta.segment))}},{name:"addToList",label:G.a.I18n.t("addToList"),onSelect:function(){return r.a.createElement(ee.a,{field:{id:"add_to_segment",name:"add_to_segment",endpoint:"segments",filter:function(e){return!(e.deleted_at||"default"!==e.type)}}})},getData:function(){return{segment_id:Number(K()("#add_to_segment").val())}},onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleSubscribersAddedToList").replace("%$1d",Number(e.meta.count).toLocaleString()).replace("%$2s",e.meta.segment))}},{name:"removeFromList",label:G.a.I18n.t("removeFromList"),onSelect:function(){return r.a.createElement(ee.a,{field:{id:"remove_from_segment",name:"remove_from_segment",endpoint:"segments",filter:function(e){return!("default"!==e.type)}}})},getData:function(){return{segment_id:Number(K()("#remove_from_segment").val())}},onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleSubscribersRemovedFromList").replace("%$1d",Number(e.meta.count).toLocaleString()).replace("%$2s",e.meta.segment))}},{name:"removeFromAllLists",label:G.a.I18n.t("removeFromAllLists"),onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleSubscribersRemovedFromAllLists").replace("%$1d",Number(e.meta.count).toLocaleString()))}},{name:"sendConfirmationEmail",label:G.a.I18n.t("resendConfirmationEmail"),onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleConfirmationEmailsSent").replace("%$1d",Number(e.meta.count).toLocaleString()))}},{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:ae.onTrash}],re=[{name:"edit",label:G.a.I18n.t("edit"),link:function(e){return r.a.createElement(z.a,{to:"/edit/".concat(e.id)},G.a.I18n.t("edit"))}},{name:"trash",display:function(e){return 0===Number(e.wp_user_id)&&0===Number(e.is_woocommerce_user)}}],ie=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"getSegmentFromId",function(e){var t,a=!1;return C()(t=window.mailpoet_segments).call(t,function(t){t.id===e&&(a=t)}),a}),W()(B()(n),"renderItem",function(e,t){var a=Y()("manage-column","column-primary","has-row-actions","column-username"),i="";switch(e.status){case"subscribed":i=G.a.I18n.t("subscribed");break;case"unconfirmed":i=G.a.I18n.t("unconfirmed");break;case"unsubscribed":i=G.a.I18n.t("unsubscribed");break;case"inactive":i=G.a.I18n.t("inactive");break;case"bounced":i=G.a.I18n.t("bounced");break;default:i="Invalid"}var o=!1;if(e.subscriptions.length>0){var s,l=[];C()(s=e.subscriptions).call(s,function(e){var t=n.getSegmentFromId(e.segment_id);!1!==t&&"subscribed"===e.status&&l.push(t.name)}),o=r.a.createElement("span",null,l.join(", "))}return r.a.createElement("div",null,r.a.createElement("td",{className:a},r.a.createElement("strong",null,r.a.createElement(z.a,{className:"row-title",to:"/edit/".concat(e.id)},e.email)),r.a.createElement("p",{style:{margin:0}},e.first_name," ",e.last_name),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},i),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("lists")},o),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("subscribedOn")},r.a.createElement("abbr",null,G.a.Date.format(e.created_at))),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("lastModifiedOn")},r.a.createElement("abbr",null,G.a.Date.format(e.updated_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},G.a.I18n.t("pageTitle")," ",r.a.createElement(z.a,{className:"page-title-action",to:"/new"},G.a.I18n.t("new")),r.a.createElement("a",{className:"page-title-action",href:"?page=mailpoet-import","data-automation-id":"import-subscribers-button"},G.a.I18n.t("import")),r.a.createElement("a",{id:"mailpoet_export_button",className:"page-title-action",href:"?page=mailpoet-export"},G.a.I18n.t("export"))),r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"subscribers",onRenderItem:this.renderItem,columns:te,bulk_actions:ne,item_actions:re,messages:ae,sort_by:"created_at",sort_order:"desc"}))}}]),t}(r.a.Component);ie.propTypes={location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired};var oe=ie,se=a(492),le=a.n(se),ce=document.getElementById("subscribers_container");ce&&o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{path:"/new",component:le.a}),r.a.createElement(N,{path:"/edit/:id",component:le.a}),r.a.createElement(N,{path:"*",component:oe}))),ce);var ue=a(100),pe=a.n(ue),de=a(8),me=a.n(de),he=a(129),fe=a(136),ge=a.n(fe),_e={},be=0,ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===e?e:function(e){var t=e,a=_e[t]||(_e[t]={});if(a[e])return a[e];var n=ge.a.compile(e);return be<1e4&&(a[e]=n,be++),n}(e)(t,{pretty:!0})},ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e};var we=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},t.prototype.componentWillMount=function(){f()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(he.createLocation)(e.to),a=Object(he.createLocation)(this.props.to);Object(he.locationsAreEqual)(t,a)?m()(!1,"You tried to redirect to the same route you're currently on: \""+a.pathname+a.search+'"'):this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,a=e.to;return t?"string"==typeof a?ve(a,t.params):ye({},a,{pathname:ve(a.pathname,t.params)}):a},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,a=this.computeTo(this.props);t?e.push(a):e.replace(a)},t.prototype.render=function(){return null},t}(r.a.Component);we.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},we.defaultProps={push:!1},we.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired};var Ee=we,ke=a(33),Ie=a.n(ke),Se=a(3),Ne=a.n(Se),xe=a(38),Ce=a.n(xe),Te=a(62),Pe=a.n(Te),Re=a(714),Ae=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"setupNewsletter",function(e){void 0!==e&&(n.props.history.push("/new/".concat(e)),G.a.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":e}))}),W()(B()(n),"getAutomaticEmails",function(){return window.mailpoet_automatic_emails?me()(Ne.a).call(Ne.a,window.mailpoet_automatic_emails,function(e){var t=e,a=window.mailpoet_premium_active?Ne.a.partial(n.setupNewsletter,e.slug):void 0;return t.disabled=!window.mailpoet_premium_active,t.action=r.a.createElement("div",null,r.a.createElement("a",{className:"button button-primary",onClick:a,role:"button",tabIndex:0,disabled:!window.mailpoet_premium_active,onKeyDown:function(e){var t,a;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(a=["Enter"," "]).call(a,e.key)&&(e.preventDefault(),n.onClick())}},G.a.I18n.t("setUp"))),t}):[]}),W()(B()(n),"createNewsletter",function(e){G.a.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":e}),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:e,subject:G.a.I18n.t("draftNewsletterTitle")}}).done(function(e){n.props.history.push("/template/".concat(e.data.id))}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}),n}return V()(t,e),O()(t,[{key:"render",value:function(){var e,t=Ne.a.partial(this.createNewsletter,"standard"),a=Ne.a.partial(this.setupNewsletter,"notification"),n=Ne.a.partial(this.setupNewsletter,"welcome"),i=[{slug:"standard",title:G.a.I18n.t("regularNewsletterTypeTitle"),description:G.a.I18n.t("regularNewsletterTypeDescription"),action:r.a.createElement("a",{className:"button button-primary","data-automation-id":"create_standard",onClick:t,role:"button",tabIndex:0,onKeyDown:function(e){var a,n;Ce()(a=["keydown","keypress"]).call(a,e.type)&&Ce()(n=["Enter"," "]).call(n,e.key)&&(e.preventDefault(),t())}},G.a.I18n.t("create"))},{slug:"welcome",title:G.a.I18n.t("welcomeNewsletterTypeTitle"),description:G.a.I18n.t("welcomeNewsletterTypeDescription"),videoGuide:"https://kb.mailpoet.com/article/254-video-guide-to-welcome-emails",videoGuideBeacon:"5b05ebf20428635ba8b2aa53",action:r.a.createElement("a",{className:"button button-primary",onClick:n,"data-automation-id":"create_welcome",onKeyDown:function(e){var t,a;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(a=["Enter"," "]).call(a,e.key)&&(e.preventDefault(),n())},role:"button",tabIndex:0},G.a.I18n.t("setUp"))},{slug:"notification",title:G.a.I18n.t("postNotificationNewsletterTypeTitle"),description:G.a.I18n.t("postNotificationNewsletterTypeDescription"),videoGuide:"https://kb.mailpoet.com/article/210-video-guide-to-post-notifications",videoGuideBeacon:"59ba6fb3042863033a1cd5a5",action:r.a.createElement("a",{className:"button button-primary","data-automation-id":"create_notification",onClick:a,role:"button",tabIndex:0,onKeyDown:function(e){var t,n;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(n=["Enter"," "]).call(n,e.key)&&(e.preventDefault(),a())}},G.a.I18n.t("setUp"))}],o=Ie.a.applyFilters("mailpoet_newsletters_types",P()(e=[]).call(e,i,pe()(this.getAutomaticEmails())),this),s=!0===window.mailpoet_is_new_user?"mailpoet_badge mailpoet_badge_video":"mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey";return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("pickCampaignType")),r.a.createElement(Pe.a,{step:"type"}),r.a.createElement("ul",{className:"mailpoet_boxes mailpoet_boxes_types"},me()(o).call(o,function(e){return r.a.createElement("li",{key:e.slug,"data-type":e.slug,className:"mailpoet_newsletter_types"},r.a.createElement("div",{className:"mailpoet_thumbnail"},e.thumbnailImage?r.a.createElement("img",{src:e.thumbnailImage,alt:""}):null),r.a.createElement("div",{className:"mailpoet_boxes_content"},r.a.createElement("div",{className:"mailpoet_description"},r.a.createElement("h3",null,e.title," ",e.beta?"(".concat(G.a.I18n.t("beta"),")"):""),r.a.createElement("p",null,e.description),e.disabled&&r.a.createElement("p",{"data-automation-id":"".concat(e.slug,"_premium_feature_notice")},r.a.createElement("span",{style:{color:"red"}},G.a.I18n.t("premiumFeature"))," ",r.a.createElement("a",{href:"?page=mailpoet-premium"},G.a.I18n.t("learnMore"))),e.videoGuide&&r.a.createElement("a",{className:s,href:e.videoGuide,"data-beacon-article":e.videoGuideBeacon,target:"_blank",rel:"noopener noreferrer"},r.a.createElement("span",{className:"dashicons dashicons-format-video"}),G.a.I18n.t("seeVideoGuide"))),r.a.createElement("div",{className:"mailpoet_actions"},e.action)))},this)))}}]),t}(r.a.Component);W()(Ae,"propTypes",{history:u.a.shape({push:u.a.func.isRequired}).isRequired});var je=Object(Re.a)(Ae),Oe=a(44),Le=a.n(Oe),De=a(20),qe=a.n(De),Me=a(512),Fe=a.n(Me),Be=a(36),$e=a.n(Be),Ve=a(29),He=a.n(Ve),We=a(22),ze=a.n(We),Ue=a(9),Ke=a.n(Ue),Ge=function(e){function t(){return A()(this,t),D()(this,M()(t).apply(this,arguments))}return V()(t,e),O()(t,[{key:"componentWillMount",value:function(){G.a.Modal.loading(!0)}},{key:"componentWillUnmount",value:function(){G.a.Modal.loading(!1)}},{key:"render",value:function(){return null}}]),t}(r.a.Component),Je=function(e){var t=e.tabs,a=e.selected,n=e.select;return r.a.createElement("div",{className:"wp-filter hide-if-no-js"},r.a.createElement("ul",{className:"filter-links"},me()(t).call(t,function(e){var t=e.name,i=e.label;return r.a.createElement("li",{key:t},r.a.createElement("a",{href:"javascript:",className:a===t?"current":"",onClick:function(){return n(t)}}," ",i))})))};Je.propTypes={selected:u.a.string.isRequired,select:u.a.func.isRequired,tabs:u.a.arrayOf(u.a.shape({label:u.a.string.isRequired,name:u.a.string.isRequired}).isRequired).isRequired};var Ye=Je,Qe=a(296),Xe=a.n(Qe),Ze=function(e){return G.a.Modal.popup({title:e.title,template:Xe.a.renderToString(r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,e.message),r.a.createElement("button",{id:"mailpoet_alert_cancel",className:"button button-secondary",type:"button"},e.cancelLabel),r.a.createElement("button",{id:"mailpoet_alert_confirm",className:"button button-primary",type:"submit"},e.confirmLabel))),onInit:function(){document.getElementById("mailpoet_alert_confirm").addEventListener("click",function(){G.a.Modal.close(),e.onConfirm()}),document.getElementById("mailpoet_alert_cancel").addEventListener("click",function(){return G.a.Modal.close()})}}),null};function et(e){Xe.a.renderToString(r.a.createElement(Ze,e))}Ze.propTypes={title:u.a.string,message:u.a.string.isRequired,cancelLabel:u.a.string,confirmLabel:u.a.string,onConfirm:u.a.func.isRequired},Ze.defaultProps={title:G.a.I18n.t("confirmTitle"),cancelLabel:G.a.I18n.t("cancelLabel"),confirmLabel:G.a.I18n.t("confirmLabel")};var tt=function(e){function t(e){var a,n,r,i;return A()(this,t),(i=D()(this,M()(t).call(this,e))).onPreview=Ke()(a=i.onPreview).call(a,B()(i)),i.onDelete=Ke()(n=i.onDelete).call(n,B()(i)),i.onSelect=Ke()(r=i.onSelect).call(r,B()(i)),i}return V()(t,e),O()(t,[{key:"onDelete",value:function(){var e=this.props,t=e.id,a=e.name,n=e.beforeDelete,r=e.afterDelete;et({message:G.a.I18n.t("confirmTemplateDeletion").replace("%$1s",a),onConfirm:function(){n(),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"delete",data:{id:t}}).done(function(){r(!0,t)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0}),r(!1)})}})}},{key:"onPreview",value:function(){G.a.Modal.popup({title:this.props.name,template:'<img src="{{ thumbnail }}" />',data:this.props})}},{key:"onSelect",value:function(){var e=this.props,t=e.newsletterId,a=e.name,n=e.beforeSelect,r=e.afterSelect;n(),G.a.trackEvent("Emails > Template selected",{"MailPoet Free version":window.mailpoet_version,"Email name":a}),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:{id:t,template_id:this.props.id}}).done(function(e){r(!0,e.data.id)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0});r(!1)})}},{key:"render",value:function(){var e=this,t=this.props,a=t.index,n=t.name,i=t.thumbnail,o=t.readonly,s=r.a.createElement("button",{className:"mailpoet_delete button button-secondary",onClick:this.onDelete,type:"button"},G.a.I18n.t("delete")),l="";return"string"==typeof i&&i.length>0&&(l=r.a.createElement("a",{href:"javascript:;",onClick:this.onPreview},r.a.createElement("img",{src:i,alt:G.a.I18n.t("templatePreview")}),r.a.createElement("div",{className:"mailpoet_overlay"},r.a.createElement("p",{className:"mailpoet_more_details"},G.a.I18n.t("zoom"))))),r.a.createElement("li",{className:"mailpoet_template_boxes","data-automation-id":"select_template_box"},r.a.createElement("div",{className:"mailpoet_thumbnail"},l),r.a.createElement("div",{className:"mailpoet_template_content"},r.a.createElement("div",{className:"mailpoet_description"},r.a.createElement("h3",null,n)),r.a.createElement("div",{className:"mailpoet_actions"},"1"!==o&&s,r.a.createElement("a",{className:"button button-primary","data-automation-id":"select_template_".concat(a),onClick:this.onSelect,role:"button",tabIndex:0,onKeyDown:function(t){var a,n;Ce()(a=["keydown","keypress"]).call(a,t.type)&&Ce()(n=["Enter"," "]).call(n,t.key)&&(t.preventDefault(),e.onSelect())}}," ",G.a.I18n.t("select")," "))))}}]),t}(r.a.Component);tt.propTypes={index:u.a.number.isRequired,id:u.a.string.isRequired,newsletterId:u.a.string.isRequired,name:u.a.string.isRequired,thumbnail:u.a.string.isRequired,readonly:u.a.string.isRequired,beforeDelete:u.a.func.isRequired,afterDelete:u.a.func.isRequired,beforeSelect:u.a.func.isRequired,afterSelect:u.a.func.isRequired};var at=tt,nt=a(31),rt=a.n(nt),it=a(79),ot=a.n(it),st=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).fileRef=r.a.createRef(),n.handleSubmit=Ke()(a=n.handleSubmit).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"saveTemplate",value:function(e){var t,a,n,r,i=e,o=this.props,s=o.beforeImport,l=o.afterImport;Ne.a.isUndefined(i.body)||(i.body=rt()(i.body));try{i.categories=JSON.parse(i.categories)}catch(e){i.categories=[]}-1===He()(t=i.categories).call(t,"saved")&&i.categories.push("saved"),-1===He()(a=i.categories).call(a,"standard")&&-1===He()(n=i.categories).call(n,"welcome")&&-1===He()(r=i.categories).call(r,"notification")&&i.categories.push("standard"),i.categories=rt()(i.categories),s(),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:i}).done(function(e){l(!0,e.data)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0});l(!1)})}},{key:"handleSubmit",value:function(e){var t=this;if(e.preventDefault(),Ne.a.size(this.fileRef.current.files)<=0)return!1;var a=Ne.a.first(this.fileRef.current.files),n=new FileReader;return n.onload=function(e){try{t.saveTemplate(JSON.parse(e.target.result)),G.a.trackEvent("Emails > Template imported",{"MailPoet Free version":window.mailpoet_version})}catch(e){G.a.Notice.error(G.a.I18n.t("templateFileMalformedError"))}},n.readAsText(a),!0}},{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("importTemplateTitle"),r.a.createElement(ot.a,{tooltip:G.a.I18n.t("helpTooltipTemplateUpload"),place:"right",className:"tooltip-help-import-template"})),r.a.createElement("form",{onSubmit:this.handleSubmit},r.a.createElement("input",{type:"file",placeholder:G.a.I18n.t("selectJsonFileToUpload"),ref:this.fileRef}),r.a.createElement("p",{className:"submit"},r.a.createElement("input",{className:"button button-primary",type:"submit",value:G.a.I18n.t("upload")}))))}}]),t}(r.a.Component);st.propTypes={beforeImport:u.a.func.isRequired,afterImport:u.a.func.isRequired};var lt=st,ct=[{name:"standard",label:G.a.I18n.t("tabStandardTitle")},{name:"welcome",label:G.a.I18n.t("tabWelcomeTitle")},{name:"notification",label:G.a.I18n.t("tabNotificationTitle")}];window.mailpoet_woocommerce_active&&ct.push({name:"woocommerce",label:G.a.I18n.t("tabWoocommerceTitle")}),ct.push.apply(ct,[{name:"all",label:G.a.I18n.t("allTemplates")},{name:"recent",label:G.a.I18n.t("recentlySent")},{name:"saved",label:G.a.I18n.t("savedTemplates")}]);var ut=function(e){function t(e){var a,n,r,i,o;return A()(this,t),(o=D()(this,M()(t).call(this,e))).state={loading:!0,templates:{},emailType:null,selectedTab:""},o.templates={},o.addTemplate=Ke()(a=o.addTemplate).call(a,B()(o)),o.afterTemplateDelete=Ke()(n=o.afterTemplateDelete).call(n,B()(o)),o.afterTemplateSelect=Ke()(r=o.afterTemplateSelect).call(r,B()(o)),o.afterTemplateImport=Ke()(i=o.afterTemplateImport).call(i,B()(o)),o}return V()(t,e),O()(t,[{key:"componentWillMount",value:function(){var e=this;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"getAll"}).done(function(t){var a;0===t.data.length&&(t.data=[{name:G.a.I18n.t("mailpoetGuideTemplateTitle"),categories:'["welcome", "notification", "standard", "woocommerce"]',readonly:"1"}]),C()(a=t.data).call(a,e.addTemplate),e.sortTemplates()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}).always(function(){e.selectInitialTab()})}},{key:"addTemplate",value:function(e){var t,a=this,n=me()(ct).call(ct,function(e){return e.name});try{var r;t=ze()(r=JSON.parse(e.categories)).call(r,function(e){return-1!==He()(n).call(n,e)})}catch(e){t=[]}0===t.length&&t.push("saved"),C()(t).call(t,function(t){void 0===a.templates[t]&&(a.templates[t]=[]),a.templates[t].unshift(e)})}},{key:"sortTemplates",value:function(){var e,t=this;C()(e=$e()(this.templates)).call(e,function(e){var a;Fe()(a=t.templates[e]).call(a,function(e,t){return qe()(e.id,10)<qe()(t.id,10)?1:-1})})}},{key:"selectInitialTab",value:function(){var e,t=this,a="standard";G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:this.props.match.params.id}}).done(function(t){e=t.data.type,Ne.a.findWhere(ct,{name:t.data.type})?a=t.data.type:"automatic"===t.data.type&&Ne.a.findWhere(ct,{name:t.data.options.group})&&(a=t.data.options.group)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}).always(function(){t.setState({templates:t.templates,emailType:e,selectedTab:a,loading:!1})})}},{key:"afterTemplateDelete",value:function(e,t){var a,n=this;e&&C()(a=$e()(this.templates)).call(a,function(e){var a;n.templates[e]=ze()(a=n.templates[e]).call(a,function(e){return e.id!==t})});this.setState({templates:this.templates,loading:!1})}},{key:"afterTemplateSelect",value:function(e,t){e?window.location=function(e){return"admin.php?page=mailpoet-newsletter-editor&id=".concat(e)}(t):this.setState({loading:!1})}},{key:"afterTemplateImport",value:function(e,t){e&&this.addTemplate(t),this.setState({templates:this.templates,selectedTab:e?"saved":"import",loading:!1})}},{key:"render",value:function(){var e=this;if(this.state.loading)return r.a.createElement(Ge,null);var t=P()(ct).call(ct,{name:"import",label:G.a.I18n.t("tabImportTitle")}),a=null;if("import"===this.state.selectedTab)a=r.a.createElement(lt,{beforeImport:function(){return e.setState({loading:!0})},afterImport:this.afterTemplateImport});else{var n=this.state.templates[this.state.selectedTab]||[];n=0===n.length?this.state.loading?null:r.a.createElement("p",null,G.a.I18n.t("noTemplates")):me()(n).call(n,function(t,a){return r.a.createElement(at,Le()({key:t.id,index:a,newsletterId:e.props.match.params.id,beforeDelete:function(){return e.setState({loading:!0})},afterDelete:e.afterTemplateDelete,beforeSelect:function(){return e.setState({loading:!0})},afterSelect:e.afterTemplateSelect},t))}),a=r.a.createElement("ul",{className:"mailpoet_boxes clearfix"},n)}var i=Ie.a.applyFilters("mailpoet_newsletters_template_breadcrumb",r.a.createElement(Pe.a,{step:"template"}),this.state.emailType,"template");return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("selectTemplateTitle")),i,r.a.createElement(Ye,{tabs:t,selected:this.state.selectedTab,select:function(t){return e.setState({selectedTab:t})}}),a)}}]),t}(r.a.Component);ut.propTypes={match:u.a.shape({params:u.a.shape({id:u.a.string}).isRequired}).isRequired};var pt=ut,dt=a(89),mt=a.n(dt),ht=a(141),ft=a.n(ht),gt=a(126),_t=a.n(gt),bt=a(49),vt=a.n(bt),yt=a(28),wt=a.n(yt),Et=a(130),kt=a.n(Et),It=a(21),St=a.n(It),Nt={closeText:G.a.I18n.t("close"),currentText:G.a.I18n.t("today"),nextText:G.a.I18n.t("next"),prevText:G.a.I18n.t("previous"),monthNames:[G.a.I18n.t("january"),G.a.I18n.t("february"),G.a.I18n.t("march"),G.a.I18n.t("april"),G.a.I18n.t("may"),G.a.I18n.t("june"),G.a.I18n.t("july"),G.a.I18n.t("august"),G.a.I18n.t("september"),G.a.I18n.t("october"),G.a.I18n.t("november"),G.a.I18n.t("december")],monthNamesShort:[G.a.I18n.t("januaryShort"),G.a.I18n.t("februaryShort"),G.a.I18n.t("marchShort"),G.a.I18n.t("aprilShort"),G.a.I18n.t("mayShort"),G.a.I18n.t("juneShort"),G.a.I18n.t("julyShort"),G.a.I18n.t("augustShort"),G.a.I18n.t("septemberShort"),G.a.I18n.t("octoberShort"),G.a.I18n.t("novemberShort"),G.a.I18n.t("decemberShort")],dayNames:[G.a.I18n.t("sunday"),G.a.I18n.t("monday"),G.a.I18n.t("tuesday"),G.a.I18n.t("wednesday"),G.a.I18n.t("thursday"),G.a.I18n.t("friday"),G.a.I18n.t("saturday")],dayNamesShort:[G.a.I18n.t("sundayShort"),G.a.I18n.t("mondayShort"),G.a.I18n.t("tuesdayShort"),G.a.I18n.t("wednesdayShort"),G.a.I18n.t("thursdayShort"),G.a.I18n.t("fridayShort"),G.a.I18n.t("saturdayShort")],dayNamesMin:[G.a.I18n.t("sundayMin"),G.a.I18n.t("mondayMin"),G.a.I18n.t("tuesdayMin"),G.a.I18n.t("wednesdayMin"),G.a.I18n.t("thursdayMin"),G.a.I18n.t("fridayMin"),G.a.I18n.t("saturdayMin")]},xt=function(e){function t(e){var a;return A()(this,t),a=D()(this,M()(t).call(this,e)),W()(B()(a),"onChange",function(e){var t=e,n=t.target.value,r=a.getStorageDate(n);t.target.value=r,a.props.onChange(t)}),W()(B()(a),"getFieldName",function(){return a.props.name||"date"}),W()(B()(a),"getDisplayDate",function(e){var t={parseFormat:a.props.storageFormat,format:a.props.displayFormat};return G.a.Date.format(e,t)}),W()(B()(a),"getStorageDate",function(e){var t={parseFormat:a.props.displayFormat,format:a.props.storageFormat};return G.a.Date.format(e,t)}),a.dateInput=r.a.createRef(),a}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=K()(this.dateInput.current),t=this;e.datepicker&&(K.a.datepicker.parseDate=function(e,t){return G.a.Date.toDate(t,{parseFormat:this.props.displayFormat,format:e})},K.a.datepicker.formatDate=function(e,t){return G.a.Date.format(t,{format:e})},e.datepicker(Ne.a.extend({dateFormat:this.props.displayFormat,firstDay:window.mailpoet_start_of_week,isRTL:!1,onSelect:function(e){t.onChange({target:{name:t.getFieldName(),value:e}})}},Nt)),this.datepickerInitialized=!0)}},{key:"componentWillUnmount",value:function(){this.datepickerInitialized&&K()(this.dateInput.current).datepicker("destroy")}},{key:"render",value:function(){return r.a.createElement("input",Le()({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))}}]),t}(r.a.Component);xt.propTypes={displayFormat:u.a.string.isRequired,onChange:u.a.func.isRequired,name:u.a.string,storageFormat:u.a.string.isRequired,value:u.a.string.isRequired,disabled:u.a.bool.isRequired,validation:u.a.object.isRequired},xt.defaultProps={name:"date"};var Ct=xt,Tt=function(e){function t(){return A()(this,t),D()(this,M()(t).apply(this,arguments))}return V()(t,e),O()(t,[{key:"render",value:function(){var e,t=this,a=me()(e=$e()(this.props.timeOfDayItems)).call(e,function(e){return r.a.createElement("option",{key:"option-".concat(t.props.timeOfDayItems[e]),value:e},t.props.timeOfDayItems[e])});return r.a.createElement("select",Le()({name:this.props.name||"time",value:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange},this.props.validation),a)}}]),t}(r.a.Component);Tt.propTypes={timeOfDayItems:u.a.objectOf(u.a.string).isRequired,name:u.a.string,value:u.a.string.isRequired,disabled:u.a.bool,onChange:u.a.func.isRequired,validation:u.a.object},Tt.defaultProps={name:"time",disabled:!1,validation:{}};var Pt=Tt,Rt=function(e){function t(e){var a;return A()(this,t),a=D()(this,M()(t).call(this,e)),W()(B()(a),"DATE_TIME_SEPARATOR"," "),W()(B()(a),"getDateTime",function(){return[a.state.date,a.state.time].join(a.DATE_TIME_SEPARATOR)}),W()(B()(a),"buildStateFromProps",function(e){var t=(e.value||a.props.defaultDateTime).split(a.DATE_TIME_SEPARATOR),n=St()(t,2);return{date:n[0],time:n[1]}}),W()(B()(a),"handleChange",function(e){var t={};t[e.target.name]=e.target.value,a.setState(t,a.propagateChange)}),W()(B()(a),"propagateChange",function(){a.props.onChange&&a.props.onChange({target:{name:a.props.name||"",value:a.getDateTime()}})}),a.state=a.buildStateFromProps(e),a}return V()(t,e),O()(t,[{key:"componentDidUpdate",value:function(e){var t=this;this.props.value===e.value&&this.props.defaultDateTime===e.defaultDateTime||kt()(function(){t.setState(t.buildStateFromProps(t.props))})}},{key:"render",value:function(){return r.a.createElement("span",null,r.a.createElement(Ct,{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}),r.a.createElement(Pt,{name:"time",value:this.state.time,onChange:this.handleChange,disabled:this.props.disabled,validation:this.props.timeValidation,timeOfDayItems:this.props.timeOfDayItems}))}}]),t}(r.a.Component);Rt.propTypes={value:u.a.string,defaultDateTime:u.a.string.isRequired,dateDisplayFormat:u.a.string.isRequired,dateStorageFormat:u.a.string.isRequired,onChange:u.a.func,name:u.a.string,disabled:u.a.bool,dateValidation:u.a.object.isRequired,timeValidation:u.a.any,timeOfDayItems:u.a.objectOf(u.a.string).isRequired},Rt.defaultProps={onChange:void 0,name:"",disabled:!1,timeValidation:void 0,value:void 0};var At=Rt,jt=a(137),Ot=a.n(jt),Lt=a(37),Dt=a.n(Lt),qt=window.location.hostname.replace("www.",""),Mt="contact@".concat(qt),Ft=function(e){var t,a=e.emailAddress;if(e.mssActive)return null;var n=a.split("@").pop().toLowerCase();return He()(t=window.mailpoet_free_domains).call(t,n)>-1?r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"sender_email_address_warning","data-acceptance-id":"freemail-sender-warning-old-installation"},G.a.I18n.t("senderEmailAddressWarning1")),r.a.createElement("p",{className:"sender_email_address_warning"},Dt()(G.a.I18n.t("senderEmailAddressWarning2"),/(%suggested|%originalSender|<em>.*<\/em>)/,function(e){return"%suggested"===e?Mt:"%originalSender"===e?r.a.createElement("em",{key:"sender-email"},a):r.a.createElement("em",{key:"reply-to"},e.replace(/<\/?em>/g,""))})),r.a.createElement("p",{className:"sender_email_address_warning"},r.a.createElement("a",{href:"https://kb.mailpoet.com/article/259-your-from-address-cannot-be-yahoo-com-gmail-com-outlook-com","data-beacon-article":"5be5911104286304a71c176e",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("senderEmailAddressWarning3")))):null};Ft.propTypes={emailAddress:u.a.string.isRequired,mssActive:u.a.bool.isRequired};var Bt=Ft,$t=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).state={emailAddress:e.item.sender_address},n.onChange=Ke()(a=n.onChange).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"onChange",value:function(e){this.setState({emailAddress:e.target.value}),this.props.onValueChange(e)}},{key:"render",value:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Ot.a,Le()({},this.props,{onValueChange:this.onChange})),r.a.createElement("div",{className:"regular-text"},r.a.createElement(Bt,{emailAddress:this.state.emailAddress,mssActive:window.mailpoet_mss_active})))}}]),t}(r.a.Component);$t.propTypes={item:u.a.shape({sender_address:u.a.string.isRequired}).isRequired,onValueChange:u.a.func},$t.defaultProps={onValueChange:function(){}};var Vt=$t,Ht=window.mailpoet_current_time||"00:00",Wt="".concat(window.mailpoet_current_date," 00:00:00"),zt=window.mailpoet_schedule_time_of_day,Ut=window.mailpoet_date_display_format,Kt=window.mailpoet_date_storage_format,Gt=function(e){function t(){var e,a,n;A()(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,i))),W()(B()(n),"getCurrentValue",function(){var e={isScheduled:"0",scheduledAt:Wt};return Ne.a.defaults(n.props.item[n.props.field.name]||{},e)}),W()(B()(n),"getDateValidation",function(){return{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("noScheduledDateError"),"data-parsley-errors-container":"#mailpoet_scheduling"}}),W()(B()(n),"isScheduled",function(){return"1"===n.getCurrentValue().isScheduled}),W()(B()(n),"handleCheckboxChange",function(e){var t=e;return t.target.value=e.target.checked?"1":"0",n.handleValueChange(t)}),W()(B()(n),"handleValueChange",function(e){var t=n.getCurrentValue(),a={};return a[e.target.name]=e.target.value,n.props.onValueChange({target:{name:n.props.field.name,value:Ne.a.extend({},t,a)}})}),n}return V()(t,e),O()(t,[{key:"render",value:function(){var e;return this.isScheduled()&&(e=r.a.createElement("span",{id:"mailpoet_scheduling"},r.a.createElement(At,{name:"scheduledAt",value:this.getCurrentValue().scheduledAt,onChange:this.handleValueChange,disabled:this.props.field.disabled,dateValidation:this.getDateValidation(),defaultDateTime:Wt,timeOfDayItems:zt,dateDisplayFormat:Ut,dateStorageFormat:Kt})," ",r.a.createElement("span",null,G.a.I18n.t("websiteTimeIs")," ",r.a.createElement("code",null,Ht)))),r.a.createElement("div",null,r.a.createElement("input",{type:"checkbox",value:"1",checked:this.isScheduled(),disabled:this.props.field.disabled,name:"isScheduled",onChange:this.handleCheckboxChange}),e)}}]),t}(r.a.Component);Gt.propTypes={item:u.a.object,field:u.a.shape({name:u.a.string.isRequired,disabled:u.a.bool}).isRequired,onValueChange:u.a.func.isRequired},Gt.defaultProps={item:{}};var Jt=[{name:"subject",label:G.a.I18n.t("subjectLine"),tip:G.a.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("emptySubjectLineError")}},{name:"segments",label:G.a.I18n.t("segments"),tip:G.a.I18n.t("segmentsTip"),type:"selection",placeholder:G.a.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(e){return!e.deleted_at},getLabel:function(e){var t;return P()(t="".concat(e.name," (")).call(t,qe()(e.subscribers,10).toLocaleString(),")")},transformChangedValue:function(e){var t=this.getItems();return me()(Ne.a).call(Ne.a,e,function(e){return wt()(Ne.a).call(Ne.a,t,function(t){return t.id===e})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:G.a.I18n.t("sender"),tip:G.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:G.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"reactComponent",component:Vt,placeholder:G.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:G.a.I18n.t("replyTo"),tip:G.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:G.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:G.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]},{name:"options",label:G.a.I18n.t("scheduleIt"),type:"reactComponent",component:Gt}];Jt=Ie.a.applyFilters("mailpoet_newsletters_3rd_step_fields",Jt);var Yt={getFields:function(){return Jt},getSendButtonOptions:function(e){var t=e||{},a={value:"object"===vt()(t.options)&&"1"===t.options.isScheduled?G.a.I18n.t("schedule"):G.a.I18n.t("send")};return"sent"!==t.status&&"sending"!==t.status||(a.disabled="disabled"),a}},Qt=a(74),Xt=a(63),Zt={name:"intervalType",values:Xt.intervalValues},ea={name:"timeOfDay",values:Xt.timeOfDayValues},ta={name:"weekDay",values:Xt.weekDayValues},aa={name:"monthDay",values:Xt.monthDayValues},na={name:"nthWeekDay",values:Xt.nthWeekDayValues},ra=function(e){function t(){var e,a,n;A()(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,i))),W()(B()(n),"getCurrentValue",function(){return n.props.item[n.props.field.name]||{}}),W()(B()(n),"handleValueChanges",function(e){var t=n.getCurrentValue();return n.props.onValueChange({target:{name:n.props.field.name,value:Ne.a.extend({},t,e)}})}),W()(B()(n),"handleIntervalChange",function(e){var t=e.target.value,a={};a.intervalType=t,"monthly"===t&&(a.monthDay="1"),n.handleValueChanges(a)}),W()(B()(n),"handleTimeOfDayChange",function(e){return n.handleValueChanges({timeOfDay:e.target.value})}),W()(B()(n),"handleWeekDayChange",function(e){return n.handleValueChanges({weekDay:e.target.value})}),W()(B()(n),"handleMonthDayChange",function(e){return n.handleValueChanges({monthDay:e.target.value})}),W()(B()(n),"handleNthWeekDayChange",function(e){return n.handleValueChanges({nthWeekDay:e.target.value})}),n}return V()(t,e),O()(t,[{key:"render",value:function(){var e,t,a,n,i=this.getCurrentValue();return"immediately"!==i.intervalType&&(e=r.a.createElement(Qt.a,{field:ea,item:this.getCurrentValue(),onValueChange:this.handleTimeOfDayChange})),"weekly"!==i.intervalType&&"nthWeekDay"!==i.intervalType||(t=r.a.createElement(Qt.a,{field:ta,item:this.getCurrentValue(),onValueChange:this.handleWeekDayChange})),"monthly"===i.intervalType&&(a=r.a.createElement(Qt.a,{field:aa,item:this.getCurrentValue(),onValueChange:this.handleMonthDayChange})),"nthWeekDay"===i.intervalType&&(n=r.a.createElement(Qt.a,{field:na,item:this.getCurrentValue(),onValueChange:this.handleNthWeekDayChange})),r.a.createElement("div",null,r.a.createElement(Qt.a,{field:Zt,item:this.getCurrentValue(),onValueChange:this.handleIntervalChange,automationId:"newsletter_interval_type"}),n,a,t,e)}}]),t}(r.a.Component);ra.propTypes={item:u.a.object.isRequired,field:u.a.shape({name:u.a.string}).isRequired,onValueChange:u.a.func.isRequired};var ia=ra,oa=[{name:"subject",label:G.a.I18n.t("subjectLine"),tip:G.a.I18n.t("postNotificationSubjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("emptySubjectLineError")}},{name:"options",label:G.a.I18n.t("selectFrequency"),type:"reactComponent",component:ia},{name:"segments",label:G.a.I18n.t("segments"),tip:G.a.I18n.t("segmentsTip"),type:"selection",placeholder:G.a.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(e){return!e.deleted_at},getLabel:function(e){var t;return P()(t="".concat(e.name," (")).call(t,qe()(e.subscribers,10).toLocaleString(),")")},transformChangedValue:function(e){var t=this.getItems();return me()(Ne.a).call(Ne.a,e,function(e){return wt()(Ne.a).call(Ne.a,t,function(t){return t.id===e})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:G.a.I18n.t("sender"),tip:G.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:G.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"reactComponent",component:Vt,placeholder:G.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:G.a.I18n.t("replyTo"),tip:G.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:G.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:G.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];oa=Ie.a.applyFilters("mailpoet_newsletters_3rd_step_fields",oa);var sa={getFields:function(){return oa},getSendButtonOptions:function(){return{value:G.a.I18n.t("activate")}}},la=a(138),ca=[{name:"subject",label:G.a.I18n.t("subjectLine"),tip:G.a.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("emptySubjectLineError")}},{name:"options",label:G.a.I18n.t("sendWelcomeEmailWhen"),type:"reactComponent",component:la.default},{name:"sender",label:G.a.I18n.t("sender"),tip:G.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:G.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"reactComponent",component:Vt,placeholder:G.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:G.a.I18n.t("replyTo"),tip:G.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:G.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:G.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];ca=Ie.a.applyFilters("mailpoet_newsletters_3rd_step_fields",ca);var ua={getFields:function(){return ca},getSendButtonOptions:function(){return{value:G.a.I18n.t("activate")}}},pa=a(297),da=function(e){function t(e){var a;return A()(this,t),a=D()(this,M()(t).call(this,e)),W()(B()(a),"getFieldsByNewsletter",function(e){return a.getSubtype(e).getFields(e)}),W()(B()(a),"getSendButtonOptions",function(){return a.getSubtype(a.state.item).getSendButtonOptions(a.state.item)}),W()(B()(a),"getSubtype",function(e){switch(e.type){case"notification":return sa;case"welcome":return ua;default:return Ie.a.applyFilters("mailpoet_newsletters_send_newsletter_fields",Yt,e)}}),W()(B()(a),"getThumbnailPromise",function(e){return a.state.thumbnailPromise?a.state.thumbnailPromise:Object(pa.b)(e)}),W()(B()(a),"isValid",function(){return K()("#mailpoet_newsletter").parsley().isValid()}),W()(B()(a),"isValidFromAddress",ft()(mt.a.mark(function e(){var t,n;return mt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("MailPoet"===window.mailpoet_mta_method){e.next=2;break}return e.abrupt("return",!0);case 2:return e.next=4,a.loadAuthorizedEmailAddresses();case 4:return t=e.sent,n=a.state.item.sender_address,e.abrupt("return",-1!==He()(t).call(t,n));case 7:case"end":return e.stop()}},e)}))),W()(B()(a),"showInvalidFromAddressError",function(){var e=Dt()(G.a.I18n.t("newsletterInvalidFromAddress"),"%$1s",function(){return a.state.item.sender_address});e=Dt()(e,/\[link\](.*?)\[\/link\]/g,function(e){return'<a href="https://account.mailpoet.com/authorization" target="_blank" rel="noopener noreferrer">'.concat(e,"</a>")}),K()("#field_sender_address").parsley().addError("invalidFromAddress",{message:e.join(""),updateClass:!0})}),W()(B()(a),"removeInvalidFromAddressError",function(){K()("#field_sender_address").parsley().removeError("invalidFromAddress",{updateClass:!0})}),W()(B()(a),"loadItem",function(e){return a.setState({loading:!0}),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:e}}).done(function(e){var t="draft"===e.data.status?a.getThumbnailPromise(e.meta.preview_url):null;a.setState({item:e.data,fields:a.getFieldsByNewsletter(e.data),thumbnailPromise:t})}).fail(function(){a.setState({item:{}},function(){a.props.history.push("/new")})})}),W()(B()(a),"saveTemplate",function(e,t){a.getThumbnailPromise(e.meta.preview_url).then(function(n){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:{newsletter_id:e.data.id,name:e.data.subject,thumbnail:n,body:rt()(e.data.body),categories:'["recent"]'}}).fail(function(e){a.showError(e),a.setState({loading:!1}),G.a.Modal.loading(!1)}),t()}).catch(function(e){a.showError({errors:[e]})})}),W()(B()(a),"loadAuthorizedEmailAddresses",ft()(mt.a.mark(function e(){var t;return mt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("MailPoet"===window.mailpoet_mta_method){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"mailer",action:"getAuthorizedEmailAddresses"});case 4:return t=e.sent,e.abrupt("return",t.data||[]);case 6:case"end":return e.stop()}},e)}))),W()(B()(a),"handleSend",function(e){return e.preventDefault(),a.removeInvalidFromAddressError(),a.isValid()?(G.a.Modal.loading(!0),a.isValidFromAddress().then(function(t){return t?a.saveNewsletter(e).done(function(){a.setState({loading:!0})}).done(function(e){switch(e.data.type){case"notification":case"welcome":return a.activateNewsletter(e);default:return a.sendNewsletter(e)}}).fail(function(e){a.showError(e),a.setState({loading:!1}),G.a.Modal.loading(!1)}):(a.showInvalidFromAddressError(),G.a.Modal.loading(!1))})):K()("#mailpoet_newsletter").parsley().validate()}),W()(B()(a),"sendNewsletter",function(e){return G.a.Ajax.post(Ie.a.applyFilters("mailpoet_newsletters_send_server_request_parameters",{api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"add",data:{newsletter_id:a.state.item.id}},a.state.item)).done(function(t){a.saveTemplate(e,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return G.a.Modal.loading(!1),void a.props.history.push("/send/congratulate/".concat(a.state.item.id));a.props.history.push(Ie.a.applyFilters("mailpoet_newsletters_send_server_request_response_redirect","/".concat(a.state.item.type||""),a.state.item));var e=Ie.a.applyFilters("mailpoet_newsletters_send_server_request_response",a.state.item,t);Ne.a.isFunction(e)?e():"scheduled"===t.data.status?(G.a.Notice.success(G.a.I18n.t("newsletterHasBeenScheduled")),G.a.trackEvent("Emails > Newsletter sent",{scheduled:!0,"MailPoet Free version":window.mailpoet_version})):(G.a.Notice.success(G.a.I18n.t("newsletterBeingSent"),{id:"mailpoet_notice_being_sent"}),G.a.trackEvent("Emails > Newsletter sent",{scheduled:!1,"MailPoet Free version":window.mailpoet_version})),G.a.Modal.loading(!1)})}).fail(function(e){a.showError(e),a.setState({loading:!1}),G.a.Modal.loading(!1)})}),W()(B()(a),"activateNewsletter",function(e){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:a.props.match.params.id,status:"active"}}).done(function(t){a.saveTemplate(e,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return G.a.Modal.loading(!1),void a.props.history.push("/send/congratulate/".concat(a.state.item.id));a.props.history.push("/".concat(a.state.item.type||""));var e,n=a.state.item.options;"welcome"===t.data.type?(G.a.Notice.success(G.a.I18n.t("welcomeEmailActivated")),G.a.trackEvent("Emails > Welcome email activated",{"MailPoet Free version":window.mailpoet_version,"List type":n.event,Delay:P()(e="".concat(n.afterTimeNumber," ")).call(e,n.afterTimeType)})):"notification"===t.data.type&&(G.a.Notice.success(G.a.I18n.t("postNotificationActivated")),G.a.trackEvent("Emails > Post notifications activated",{"MailPoet Free version":window.mailpoet_version,Frequency:n.intervalType}));G.a.Modal.loading(!1)})}).fail(function(e){a.showError(e),a.setState({loading:!1}),G.a.Modal.loading(!1)})}),W()(B()(a),"handleResume",function(e){return e.preventDefault(),a.isValid()?a.saveNewsletter(e).done(function(){a.setState({loading:!0})}).done(function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:a.state.item.id}}).done(function(){a.props.history.push("/".concat(a.state.item.type||"")),G.a.Notice.success(G.a.I18n.t("newsletterSendingHasBeenResumed"))}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}).fail(function(e){a.showError(e)}).always(function(){a.setState({loading:!1})}):K()("#mailpoet_newsletter").parsley().validate(),!1}),W()(B()(a),"handleSave",function(e){e.preventDefault(),a.saveNewsletter(e).done(function(){G.a.Notice.success(G.a.I18n.t("newsletterUpdated"))}).done(function(){var e="automatic"===a.state.item.type?a.state.item.options.group:a.state.item.type;a.props.history.push("/".concat(e||""))}).fail(function(e){a.showError(e)})}),W()(B()(a),"handleRedirectToDesign",function(e){e.preventDefault();var t=e.target.href;a.saveNewsletter(e).done(function(){G.a.Notice.success(G.a.I18n.t("newsletterUpdated"))}).done(function(){window.location=t}).fail(function(e){a.showError(e)})}),W()(B()(a),"saveNewsletter",function(){var e=a.state.item;e.queue=void 0,a.setState({loading:!0});var t=Ne.a.omit(e,["preheader","body","created_at","deleted_at","hash","status","updated_at","type"]);return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:t})}),W()(B()(a),"showError",function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}),W()(B()(a),"handleFormChange",function(e){var t=e.target.name,n=e.target.value;return a.setState(function(e){var a=e.item;return a[t]=n,{item:a}}),!0}),a.state={fields:[],item:{},loading:!0,thumbnailPromise:null},a}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=this;this.loadItem(this.props.match.params.id).always(function(){e.setState({loading:!1})}),K()("#mailpoet_newsletter").parsley()}},{key:"componentDidUpdate",value:function(e){var t=this;this.props.match.params.id!==e.match.params.id&&this.loadItem(this.props.match.params.id).always(function(){t.setState({loading:!1})})}},{key:"render",value:function(){var e,t="sending"===this.state.item.status&&this.state.item.queue&&"paused"===this.state.item.queue.status,a=me()(e=this.state.fields).call(e,function(e){var a=e;return"segments"!==e.name&&"options"!==e.name||(a.disabled=t),a}),n=this.getSendButtonOptions(),i=Ie.a.applyFilters("mailpoet_newsletters_send_breadcrumb",r.a.createElement(Pe.a,{step:"send"}),this.state.item.type,"send");return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("finalNewsletterStep")),i,r.a.createElement(_t.a,{id:"mailpoet_newsletter",fields:a,automationId:"newsletter_send_form",item:this.state.item,loading:this.state.loading,onChange:this.handleFormChange,onSubmit:this.handleSave},r.a.createElement("p",{className:"submit"},t?r.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleResume,value:G.a.I18n.t("resume")}):r.a.createElement("input",Le()({className:"button button-primary",type:"button",onClick:this.handleSend,value:G.a.I18n.t("send")},n))," ",r.a.createElement("input",{className:"button button-secondary",type:"submit",value:G.a.I18n.t("saveDraftAndClose")})," ",G.a.I18n.t("orSimply")," ",r.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(this.props.match.params.id),onClick:this.handleRedirectToDesign},G.a.I18n.t("goBackToDesign")),"."),!t&&n.disabled&&"disabled"===n.disabled&&r.a.createElement(ot.a,{tooltip:G.a.I18n.t("helpTooltipSendEmail"),tooltipId:"helpTooltipSendEmail"})))}}]),t}(r.a.Component);W()(da,"displayName","NewsletterSend"),W()(da,"propTypes",{match:u.a.shape({params:u.a.shape({id:u.a.string}).isRequired}).isRequired,history:u.a.shape({push:u.a.func.isRequired}).isRequired});var ma=Object(Re.a)(da),ha=a(52),fa=a.n(ha),ga=a(5),_a=a.n(ga);function ba(e){var t,a="standard"===e.newsletter.type&&"scheduled"!==e.newsletter.status;return a&&G.a.Poll.successDelivery.initTypeformScript(),r.a.createElement("div",{className:"mailpoet_congratulate_success"},r.a.createElement("h1",null,"welcome"===(t=e.newsletter).type?G.a.I18n.t("congratulationsWelcomeEmailSuccessHeader"):"notification"===t.type?G.a.I18n.t("congratulationsPostNotificationSuccessHeader"):"automatic"===t.type?G.a.I18n.t("congratulationsWooSuccessHeader"):"scheduled"===t.status?G.a.I18n.t("congratulationsScheduleSuccessHeader"):G.a.I18n.t("congratulationsSendSuccessHeader")),r.a.createElement("img",{src:e.illustrationImageUrl,alt:"",width:"750",height:"250"}),a&&r.a.createElement("div",{className:"typeform-widget","data-url":"https://mailpoet.typeform.com/to/ciWID6","data-transparency":"100","data-hide-headers":"true","data-hide-footer":"true"}),r.a.createElement("button",{type:"button",className:"button",onClick:e.successClicked},G.a.I18n.t("close")))}ba.propTypes={successClicked:u.a.func.isRequired,illustrationImageUrl:u.a.string.isRequired,newsletter:u.a.shape({status:u.a.string.isRequired,type:u.a.string.isRequired}).isRequired};var va=ba;function ya(e){return r.a.createElement("div",{className:"mailpoet_centered"},r.a.createElement("h1",null,G.a.I18n.t("congratulationsSendFailHeader")),r.a.createElement("p",null,Dt()(G.a.I18n.t("congratulationsSendFailExplain"),/\[link\](.*?)\[\/link\]/g,function(e,t){return r.a.createElement("a",{key:t,target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/231-sending-does-not-work","data-beacon-article":"5a0257ac2c7d3a272c0d7ad6"},e)})),r.a.createElement("button",{type:"button",className:"button",onClick:e.failClicked},G.a.I18n.t("close")))}ya.propTypes={failClicked:u.a.func.isRequired};var wa=ya;var Ea=function(){return r.a.createElement("div",{className:"mailpoet_loading"},r.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_1"}),r.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_2"}),r.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_3"}))};function ka(e){return r.a.createElement("div",{className:"mailpoet_newsletter_loading"},r.a.createElement(Ea,null),(t=e.showRichLoadingScreen,a=e.illustrationImageUrl,t?r.a.createElement("div",null,r.a.createElement("h1",{className:"mailpoet_newsletter_loading_header"},G.a.I18n.t("congratulationsLoadingHeader")),r.a.createElement("img",{src:a,alt:"",width:"800px",height:"266px"})):r.a.createElement("div",null)));var t,a}ka.propTypes={illustrationImageUrl:u.a.string.isRequired,showRichLoadingScreen:u.a.bool.isRequired};var Ia=ka;function Sa(){return G.a.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})}var Na=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).state={loading:!0,newsletter:null,testingPassed:!1,timeStart:_a()(),minimumLoadingTimePassed:!1},n.tick=Ke()(a=n.tick).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){this.loadNewsletter(this.props.match.params.id),this.tick()}},{key:"componentDidUpdate",value:function(e){e.match.params.id!==this.props.match.params.id&&this.loadNewsletter(this.props.match.params.id)}},{key:"tick",value:function(){_a()().subtract(20,"second").isAfter(this.state.timeStart)&&this.setState({error:!0,loading:!1}),this.state.loading&&this.loadNewsletter(this.props.match.params.id),_a()().subtract(6,"seconds").isAfter(this.state.timeStart)&&this.setState({minimumLoadingTimePassed:!0}),!this.state.loading&&this.state.minimumLoadingTimePassed||fa()(this.tick,2e3)}},{key:"loadNewsletter",value:function(e){var t=this;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:e}}).done(function(e){return t.newsletterLoaded(e.data)})}},{key:"newsletterLoaded",value:function(e){"standard"!==e.type||"scheduled"===e.status?this.setState({newsletter:e,loading:!1,minimumLoadingTimePassed:!0}):"sent"===e.status||"sending"===e.status?this.setState({newsletter:e,loading:!1,testingPassed:!0}):this.setState({newsletter:e})}},{key:"renderContent",value:function(){return this.state.loading||!this.state.minimumLoadingTimePassed?(e=!!this.state.newsletter,r.a.createElement(Ia,{illustrationImageUrl:window.mailpoet_congratulations_loading_image,successClicked:Sa,showRichLoadingScreen:e})):this.state.error?(G.a.trackEvent("Cron testing done",{"Cron is working":"false"}),r.a.createElement(wa,{failClicked:function(){window.location=window.mailpoet_main_page}})):(t=this.state.newsletter,this.state.testingPassed&&G.a.trackEvent("Cron testing done",{"Cron is working":"true"}),r.a.createElement(va,{illustrationImageUrl:window.mailpoet_congratulations_success_image,successClicked:Sa,newsletter:t}));var e,t}},{key:"render",value:function(){return r.a.createElement("div",{className:"newsletter_congratulate_page"},this.renderContent())}}]),t}(r.a.Component);Na.propTypes={match:u.a.shape({params:u.a.shape({id:u.a.string}).isRequired}).isRequired};var xa=Na,Ca=function(e){function t(){var e,a,n;A()(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,i))),W()(B()(n),"showTemplateSelection",function(e){n.props.history.push("/template/".concat(e))}),n}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=this;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:"standard"}}).done(function(t){e.showTemplateSelection(t.data.id)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("regularNewsletterTypeTitle")),r.a.createElement(Pe.a,{step:"type"}))}}]),t}(r.a.Component);W()(Ca,"propTypes",{history:u.a.shape({push:u.a.func.isRequired}).isRequired});var Ta=Object(Re.a)(Ca),Pa={name:"options",type:"reactComponent",component:ia},Ra=function(e){function t(){var e,a,n;A()(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,i))),W()(B()(n),"state",{options:{intervalType:"daily",timeOfDay:0,weekDay:1,monthDay:0,nthWeekDay:1}}),W()(B()(n),"handleValueChange",function(e){var t=n.state;t[e.target.name]=e.target.value,n.setState(t)}),W()(B()(n),"handleNext",function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:Ne.a.extend({},n.state,{type:"notification",subject:G.a.I18n.t("draftPostNotificationTitle")})}).done(function(e){n.showTemplateSelection(e.data.id)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}),W()(B()(n),"showTemplateSelection",function(e){n.props.history.push("/template/".concat(e))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("postNotificationNewsletterTypeTitle")),r.a.createElement(Pe.a,{step:"type"}),r.a.createElement("h3",null,G.a.I18n.t("selectFrequency")),r.a.createElement(ia,{item:this.state,field:Pa,onValueChange:this.handleValueChange}),r.a.createElement("p",{className:"submit"},r.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:G.a.I18n.t("next")})))}}]),t}(r.a.Component);W()(Ra,"propTypes",{history:u.a.shape({push:u.a.func.isRequired}).isRequired});var Aa=Object(Re.a)(Ra),ja={name:"options",label:"Event",type:"reactComponent",component:la.default},Oa=function(e){function t(e){var a,n,r;A()(this,t),r=D()(this,M()(t).call(this,e));var i=window.mailpoet_segments||[],o=1;return i=ze()(i).call(i,function(e){return"default"===e.type}),Ne.a.size(i)>0&&(o=Ne.a.first(i).id),r.state={options:{event:"segment",segment:o,role:"subscriber",afterTimeNumber:1,afterTimeType:"immediate"}},r.handleValueChange=Ke()(a=r.handleValueChange).call(a,B()(r)),r.handleNext=Ke()(n=r.handleNext).call(n,B()(r)),r}return V()(t,e),O()(t,[{key:"handleValueChange",value:function(e){var t=this.state;t[e.target.name]=e.target.value,this.setState(t)}},{key:"handleNext",value:function(){var e=this;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:Ne.a.extend({},this.state,{type:"welcome",subject:G.a.I18n.t("draftNewsletterTitle")})}).done(function(t){e.showTemplateSelection(t.data.id)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{key:"showTemplateSelection",value:function(e){this.props.history.push("/template/".concat(e))}},{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("welcomeNewsletterTypeTitle")),r.a.createElement(Pe.a,{step:"type"}),r.a.createElement("h3",null,G.a.I18n.t("selectEventToSendWelcomeEmail")),r.a.createElement(la.default,{item:this.state,field:ja,onValueChange:this.handleValueChange}),r.a.createElement("p",{className:"submit"},r.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:G.a.I18n.t("next")})))}}]),t}(r.a.Component);Oa.propTypes={history:u.a.shape({push:u.a.func.isRequired}).isRequired};var La=Oa,Da=a(490),qa=a.n(Da),Ma=a(97),Fa=a.n(Ma),Ba=a(98),$a=a.n(Ba),Va=a(99),Ha=a.n(Va),Wa=a(514),za=a.n(Wa),Ua=function(e){var t=r.a.useState(!1),a=St()(t,2),n=a[0],i=a[1],s=r.a.useRef(null),l=r.a.useRef(null);return r.a.useEffect(function(){return e.timeout&&(l.current=fa()(function(){return i(!0)},e.timeout)),function(){return l.current?clearTimeout(l.current):null}},[e.timeout]),r.a.useLayoutEffect(function(){e.scroll&&s.current&&s.current.scrollIntoView(!1)},[e.scroll]),n?null:o.a.createPortal(r.a.createElement("div",{ref:s,className:"mailpoet_base_notice mailpoet_".concat(e.type,"_notice")},e.children),document.getElementById("mailpoet_notices"))};Ua.propTypes={type:u.a.oneOf(["success","info","warning","error"]).isRequired,scroll:u.a.bool,timeout:u.a.oneOfType([u.a.number,u.a.oneOf([!1])]),children:u.a.oneOfType([u.a.string,u.a.element,u.a.arrayOf(u.a.element)]).isRequired},Ua.defaultProps={timeout:1e4,scroll:!1};var Ka=Ua,Ga=function(e){var t=e.errors;return t.length<1?null:r.a.createElement(Ka,{type:"error"},me()(t).call(t,function(e){return r.a.createElement("p",{key:e.message},e.message)}))};Ga.propTypes={errors:u.a.arrayOf(u.a.shape({message:u.a.string.isRequired})).isRequired};var Ja=Ga,Ya=u.a.shape({status:u.a.string,count_processed:u.a.string.isRequired,count_total:u.a.string.isRequired,scheduled_at:u.a.string}),Qa=u.a.shape({id:u.a.number.isRequired,queue:u.a.oneOfType([Ya,u.a.bool])}),Xa=function(e){var t=e.queue,a=Y()("mailpoet_progress",{mailpoet_progress_complete:"completed"===t.status}),n=Math.round(100*t.count_processed/t.count_total),i=0;return za()(n)?(i=n,n+="%"):n=G.a.I18n.t("noSubscribers"),r.a.createElement("div",{className:a},r.a.createElement("span",{className:"mailpoet_progress_bar",style:{width:"".concat(i,"%")}}),r.a.createElement("span",{className:"mailpoet_progress_label"},n))};Xa.propTypes={queue:Ya.isRequired};var Za=function(e){var t=e.newsletter;return r.a.createElement(z.a,{to:"/sending-status/".concat(t.id),"data-automation-id":"sending_status_".concat(t.id)},r.a.createElement("span",null,G.a.I18n.t("newsletterQueueCompleted").replace("%$1d",qe()(t.queue.count_processed,10).toLocaleString()).replace("%$2d",qe()(t.queue.count_total,10).toLocaleString())))};Za.propTypes={newsletter:Qa.isRequired};var en=function(e){var t=e.className,a=e.onClick,n=e.children;return r.a.createElement("a",{className:Y()("button",t),style:{display:"inline-block"},href:"javascript:;",onClick:a},n)};en.propTypes={className:u.a.string,onClick:u.a.func.isRequired,children:u.a.string.isRequired},en.defaultProps={className:""};var tn=function(e){var t=e.newsletter,a=r.a.useState("paused"===t.queue.status),n=St()(a,2),i=n[0],o=n[1],s=r.a.useState([]),l=St()(s,2),c=l[0],u=l[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement(Ja,{errors:c}),r.a.createElement("span",null,qe()(t.queue.count_processed,10).toLocaleString(),"/",qe()(t.queue.count_total,10).toLocaleString(),"  ",i&&r.a.createElement(en,{onClick:function(){u([]),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:t.id}}).done(function(){return o(!1)}).fail(function(e){return u(e.errors)})}},G.a.I18n.t("resume")),!i&&r.a.createElement(en,{className:"mailpoet_pause",onClick:function(){u([]),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"pause",data:{newsletter_id:t.id}}).done(function(){return o(!0)}).fail(function(e){return u(e.errors)})}},G.a.I18n.t("pause"))))};tn.propTypes={newsletter:Qa.isRequired};var an=function(e){var t=e.newsletter,a=e.mailerLog;return t.queue?"paused"===a.status&&"completed"!==t.queue.status?r.a.createElement("span",null,G.a.I18n.t("paused")):"scheduled"===t.queue.status?r.a.createElement("span",null,G.a.I18n.t("scheduledFor")," ",G.a.Date.format(t.queue.scheduled_at)):r.a.createElement("div",null,r.a.createElement(Xa,{queue:t.queue}),r.a.createElement("p",{style:{textAlign:"center"}},"completed"===t.queue.status&&r.a.createElement(Za,{newsletter:t}),"completed"!==t.queue.status&&r.a.createElement(tn,{newsletter:t}))):r.a.createElement("span",null,G.a.I18n.t("notSentYet"))};an.propTypes={newsletter:Qa.isRequired,mailerLog:u.a.shape({status:u.a.string}).isRequired};var nn=an,rn=a(127),on=a.n(rn),sn=a(47),ln=!!window.mailpoet_tracking_enabled,cn={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterTrashed"):G.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterDeleted"):G.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterRestored"):G.a.I18n.t("multipleNewslettersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},un=[{name:"subject",label:G.a.I18n.t("subject"),sortable:!0},{name:"status",label:G.a.I18n.t("status")},{name:"segments",label:G.a.I18n.t("lists")},{name:"statistics",label:G.a.I18n.t("statistics"),display:ln},{name:"sent_at",label:G.a.I18n.t("sentOn"),sortable:!0}],pn=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:cn.onTrash}],dn=function(e){var t=function(){window.location.href="?page=mailpoet-newsletter-editor&id=".concat(e.id)};e.queue&&"sending"===e.status&&null===e.queue.status?et({message:G.a.I18n.t("confirmEdit"),onConfirm:t}):t()},mn=[{name:"view",link:function(e){return r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("preview"))}},{name:"edit",label:G.a.I18n.t("edit"),onClick:dn},{name:"duplicate",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("newsletterDuplicated").replace("%$1s",e.data.subject)),t()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{name:"trash"}];mn=Object(sn.addStatsCTAAction)(mn);var hn=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"renderItem",function(e,t,a){var n,i=Y()("manage-column","column-primary","has-row-actions"),o=me()(n=e.segments).call(n,function(e){return e.name}).join(", ");return r.a.createElement("div",null,r.a.createElement("td",{className:i},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"javascript:;",onClick:function(){return dn(e)}},e.queue.newsletter_rendered_subject||e.subject)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},r.a.createElement(nn,{newsletter:e,mailerLog:a.mta_log})),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("lists")},o),!0===ln?r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("statistics")},r.a.createElement(on.a,{newsletter:e,currentTime:a.current_time})):null,r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("sentOn")},r.a.createElement("abbr",null,e.sent_at?G.a.Date.format(e.sent_at):G.a.I18n.t("notSentYet"))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement($a.a,null),r.a.createElement(Ha.a,{hasNews:window.mailpoet_feature_announcement_has_news}),r.a.createElement(Fa.a,{tab:"standard"}),r.a.createElement(X.a,{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:un,bulk_actions:pn,item_actions:mn,messages:cn,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}}))}}]),t}(r.a.Component);W()(hn,"displayName","NewsletterListStandard"),W()(hn,"propTypes",{location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired});var fn=hn,gn=window.mailpoet_roles||{},_n=window.mailpoet_segments||{},bn=!!window.mailpoet_tracking_enabled,vn={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterTrashed"):G.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterDeleted"):G.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterRestored"):G.a.I18n.t("multipleNewslettersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},yn=[{name:"subject",label:G.a.I18n.t("subject"),sortable:!0},{name:"status",label:G.a.I18n.t("status"),width:145},{name:"settings",label:G.a.I18n.t("settings")},{name:"statistics",label:G.a.I18n.t("statistics"),display:bn},{name:"updated_at",label:G.a.I18n.t("lastModifiedOn"),sortable:!0}],wn=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:vn.onTrash}],En=[{name:"view",link:function(e){return r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("preview"))}},{name:"duplicate",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("newsletterDuplicated").replace("%$1s",e.data.subject)),t()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{name:"edit",link:function(e){return r.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(e.id)},G.a.I18n.t("edit"))}},{name:"trash"}];En=Object(sn.addStatsCTAAction)(En);var kn=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"updateStatus",function(e){e.persist(),G.a.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(e){"active"===e.data.status&&G.a.Notice.success(G.a.I18n.t("welcomeEmailActivated")),n.forceUpdate()}).fail(function(t){G.a.Notice.error(G.a.I18n.t("welcomeEmailActivationFailed")),e.target.value=t.status})}),W()(B()(n),"renderStatus",function(e){var t=G.a.I18n.t("sentToXSubscribers").replace("%$1d",e.total_sent.toLocaleString()),a=G.a.I18n.t("scheduledToXSubscribers").replace("%$1d",e.total_scheduled.toLocaleString());return r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("select",{"data-id":e.id,defaultValue:e.status,onChange:n.updateStatus},r.a.createElement("option",{value:"active"},G.a.I18n.t("active")),r.a.createElement("option",{value:"draft"},G.a.I18n.t("inactive")))),r.a.createElement("p",null,r.a.createElement(z.a,{to:"/sending-status/".concat(e.id),"data-automation-id":"sending_status_".concat(e.id)},t)," ",r.a.createElement("br",null),a))}),W()(B()(n),"renderSettings",function(e){var t,a,n;switch(e.options.event){case"user":t="mailpoet_all"===e.options.role?G.a.I18n.t("welcomeEventWPUserAnyRole"):G.a.I18n.t("welcomeEventWPUserWithRole").replace("%$1s",gn[e.options.role]);break;default:if(void 0===(n=wt()(Ne.a).call(Ne.a,_n,function(t){return Number(t.id)===Number(e.options.segment)})))return r.a.createElement("span",{className:"mailpoet_error"},G.a.I18n.t("sendingToSegmentsNotSpecified"));t=G.a.I18n.t("welcomeEventSegment").replace("%$1s",n.name)}if(t&&"immediate"!==e.options.afterTimeType){switch(e.options.afterTimeType){case"minutes":a=G.a.I18n.t("sendingDelayMinutes").replace("%$1d",e.options.afterTimeNumber);break;case"hours":a=G.a.I18n.t("sendingDelayHours").replace("%$1d",e.options.afterTimeNumber);break;case"days":a=G.a.I18n.t("sendingDelayDays").replace("%$1d",e.options.afterTimeNumber);break;case"weeks":a=G.a.I18n.t("sendingDelayWeeks").replace("%$1d",e.options.afterTimeNumber);break;default:a=G.a.I18n.t("sendingDelayInvalid")}t+=" [".concat(a,"].")}return r.a.createElement("span",null,t)}),W()(B()(n),"renderItem",function(e,t){var a=Y()("manage-column","column-primary","has-row-actions");return r.a.createElement("div",null,r.a.createElement("td",{className:a},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id=".concat(e.id)},e.subject)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},n.renderStatus(e)),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("settings")},n.renderSettings(e)),!0===bn?r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("statistics")},r.a.createElement(on.a,{newsletter:e,isSent:e.total_sent>0&&!!e.statistics})):null,r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("lastModifiedOn")},r.a.createElement("abbr",null,G.a.Date.format(e.updated_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement($a.a,null),r.a.createElement(Ha.a,{hasNews:window.mailpoet_feature_announcement_has_news}),r.a.createElement(Fa.a,{tab:"welcome"}),r.a.createElement(X.a,{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:yn,bulk_actions:wn,item_actions:En,messages:vn,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}}))}}]),t}(r.a.Component);W()(kn,"displayName","NewsletterListWelcome"),W()(kn,"propTypes",{location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired});var In=kn,Sn={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterTrashed"):G.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterDeleted"):G.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterRestored"):G.a.I18n.t("multipleNewslettersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},Nn=[{name:"subject",label:G.a.I18n.t("subject"),sortable:!0},{name:"status",label:G.a.I18n.t("status"),width:100},{name:"settings",label:G.a.I18n.t("settings")},{name:"history",label:G.a.I18n.t("history"),width:100},{name:"updated_at",label:G.a.I18n.t("lastModifiedOn"),sortable:!0}],xn=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:Sn.onTrash}],Cn=[{name:"view",link:function(e){return r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("preview"))}},{name:"edit",link:function(e){return r.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(e.id)},G.a.I18n.t("edit"))}},{name:"duplicate",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("newsletterDuplicated").replace("%$1s",e.data.subject)),t()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{name:"trash"}],Tn=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"updateStatus",function(e){e.persist(),G.a.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(e){"active"===e.data.status&&G.a.Notice.success(G.a.I18n.t("postNotificationActivated")),n.forceUpdate()}).fail(function(t){G.a.Notice.error(G.a.I18n.t("postNotificationActivationFailed")),e.target.value=t.status})}),W()(B()(n),"renderStatus",function(e){return r.a.createElement("select",{"data-id":e.id,defaultValue:e.status,onChange:n.updateStatus},r.a.createElement("option",{value:"active"},G.a.I18n.t("active")),r.a.createElement("option",{value:"draft"},G.a.I18n.t("inactive")))}),W()(B()(n),"renderSettings",function(e){var t,a,n=me()(t=e.segments).call(t,function(e){return e.name}),i=G.a.I18n.t("ifNewContentToSegments").replace("%$1s",n.join(", "));if(0===n.length)return r.a.createElement("span",{className:"mailpoet_error"},G.a.I18n.t("sendingToSegmentsNotSpecified"));switch(e.options.intervalType){case"daily":a=G.a.I18n.t("sendDaily").replace("%$1s",Xt.timeOfDayValues[e.options.timeOfDay]);break;case"weekly":a=G.a.I18n.t("sendWeekly").replace("%$1s",Xt.weekDayValues[e.options.weekDay]).replace("%$2s",Xt.timeOfDayValues[e.options.timeOfDay]);break;case"monthly":a=G.a.I18n.t("sendMonthly").replace("%$1s",Xt.monthDayValues[e.options.monthDay]).replace("%$2s",Xt.timeOfDayValues[e.options.timeOfDay]);break;case"nthWeekDay":a=G.a.I18n.t("sendNthWeekDay").replace("%$1s",Xt.nthWeekDayValues[e.options.nthWeekDay]).replace("%$2s",Xt.weekDayValues[e.options.weekDay]).replace("%$3s",Xt.timeOfDayValues[e.options.timeOfDay]);break;case"immediately":a=G.a.I18n.t("sendImmediately");break;default:a="Invalid sending frequency"}return r.a.createElement("span",null,a," ",i)}),W()(B()(n),"renderHistoryLink",function(e){return 0===Number(e.children_count)?G.a.I18n.t("notSentYet"):r.a.createElement(z.a,{"data-automation-id":"history-".concat(e.id),to:"/notification/history/".concat(e.id)},G.a.I18n.t("viewHistory"))}),W()(B()(n),"renderItem",function(e,t){var a=Y()("manage-column","column-primary","has-row-actions");return r.a.createElement("div",null,r.a.createElement("td",{className:a},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id=".concat(e.id)},e.subject)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},n.renderStatus(e)),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("settings")},n.renderSettings(e)),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("history")},n.renderHistoryLink(e)),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("lastModifiedOn")},r.a.createElement("abbr",null,G.a.Date.format(e.updated_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement($a.a,null),r.a.createElement(Ha.a,{hasNews:window.mailpoet_feature_announcement_has_news}),r.a.createElement(Fa.a,{tab:"notification"}),r.a.createElement(X.a,{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:Nn,bulk_actions:xn,item_actions:Cn,messages:Sn,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}}))}}]),t}(r.a.Component);W()(Tn,"displayName","NewsletterListNotification"),W()(Tn,"propTypes",{location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired});var Pn=Tn,Rn=!!window.mailpoet_tracking_enabled,An=[{name:"subject",label:G.a.I18n.t("subject")},{name:"status",label:G.a.I18n.t("status")},{name:"segments",label:G.a.I18n.t("lists")},{name:"statistics",label:G.a.I18n.t("statistics"),display:Rn},{name:"sent_at",label:G.a.I18n.t("sentOn")}],jn={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterTrashed"):G.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterDeleted"):G.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterRestored"):G.a.I18n.t("multipleNewslettersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},On=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:jn.onTrash}],Ln=Object(sn.addStatsCTAAction)([{name:"view",link:function(e){return r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("preview"))}},{name:"trash"}]),Dn=function(e,t,a){var n,i=Y()("manage-column","column-primary","has-row-actions"),o=me()(n=e.segments).call(n,function(e){return e.name}).join(", ");return r.a.createElement(r.a.Fragment,null,r.a.createElement("td",{className:i},r.a.createElement("strong",null,r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},e.queue.newsletter_rendered_subject||e.subject)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},r.a.createElement(nn,{newsletter:e,mailerLog:a.mta_log})),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("lists")},o),!0===Rn?r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("statistics")},r.a.createElement(on.a,{newsletter:e,currentTime:a.current_time})):null,r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("sentOn")},e.sent_at?G.a.Date.format(e.sent_at):G.a.I18n.t("notSentYet")))},qn=function(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement($a.a,null),r.a.createElement(Ha.a,{hasNews:window.mailpoet_feature_announcement_has_news}),r.a.createElement(Fa.a,{tab:"notification"}),r.a.createElement(z.a,{className:"page-title-action",to:"/notification"},G.a.I18n.t("backToPostNotifications")),r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:e.location,params:e.match.params,endpoint:"newsletters",type:"notification_history",base_url:"notification/history/:parent_id",onRenderItem:Dn,columns:An,messages:jn,item_actions:Ln,bulk_actions:On,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}}))};qn.propTypes={location:u.a.shape({pathname:u.a.string}).isRequired,match:u.a.shape({params:u.a.shape({id:u.a.string})}).isRequired};var Mn=qn,Fn=[{name:"subscriber_id",label:G.a.I18n.t("subscriber"),sortable:!0},{name:"status",label:G.a.I18n.t("sendingStatus")},{name:"failureReason",label:G.a.I18n.t("failureReason")}],Bn={onNoItemsFound:function(){return G.a.I18n.t("noSendingTaskFound")}},$n=function(e){var t=e.match.params.id,a=r.a.useState(""),n=St()(a,2),i=n[0],o=n[1];return r.a.useEffect(function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:t}}).done(function(e){return o(e.data.subject)}).fail(function(e){return G.a.Notice.showApiErrorNotice(e)})},[t]),r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,G.a.I18n.t("sendingStatusTitle")),r.a.createElement(Hn,{newsletterId:t,newsletterSubject:i}),r.a.createElement(Vn,{location:e.location,params:e.match.params}))};$n.propTypes={location:u.a.shape({pathname:u.a.string}).isRequired,match:u.a.shape({params:u.a.shape({id:u.a.string.isRequired}).isRequired}).isRequired};var Vn=r.a.memo(function(e){var t=e.location,a=e.params;return r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:t,params:a,endpoint:"sending_task_subscribers",base_url:"sending-status/:id",onRenderItem:function(e){return r.a.createElement("div",null,r.a.createElement(Wn,e))},getListingItemKey:function(e){var t;return P()(t="".concat(e.taskId,"-")).call(t,e.subscriberId)},columns:Fn,messages:Bn,auto_refresh:!0,sort_by:"failed",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}})},function(e,t){return e.location.pathname===t.location.pathname&&e.params.id===t.params.id});Vn.propTypes={location:u.a.shape({pathname:u.a.string}).isRequired,params:u.a.shape({id:u.a.string.isRequired}).isRequired};var Hn=function(e){var t=e.newsletterId,a=e.newsletterSubject;return t&&a?r.a.createElement("p",null,r.a.createElement(z.a,{to:"/stats/".concat(t)},a)):null};Hn.propTypes={newsletterId:u.a.string,newsletterSubject:u.a.string},Hn.defaultProps={newsletterId:null,newsletterSubject:null};var Wn=function(e){var t,a,n,i,o=e.error,s=e.failed,l=e.taskId,c=e.processed,u=e.email,p=e.subscriberId,d=e.lastName,m=e.firstName,h=Y()("manage-column","column-primary","has-row-actions"),f=G.a.I18n.t("unprocessed");return"1"===c&&(f="1"===s?r.a.createElement("span",null,G.a.I18n.t("failed"),r.a.createElement("br",null),r.a.createElement("a",{className:"button",href:"javascript:;",onClick:function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sending_task_subscribers",action:"resend",data:{taskId:l,subscriberId:p}}).done(function(){return window.mailpoet_listing.forceUpdate()}).fail(function(e){return G.a.Notice.showApiErrorNotice(e)})}},G.a.I18n.t("resend"))):G.a.I18n.t("sent")),r.a.createElement(r.a.Fragment,null,r.a.createElement("td",{"data-automation-id":P()(t="name_".concat(l,"_")).call(t,p),className:h},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-subscribers#/edit/".concat(p)},u)),r.a.createElement("p",{style:{margin:0}},P()(a="".concat(m," ")).call(a,d))),r.a.createElement("td",{className:"column","data-automation-id":P()(n="status_".concat(l,"_")).call(n,p),"data-colname":G.a.I18n.t("sendingStatus")},f),r.a.createElement("td",{className:"column","data-automation-id":P()(i="error_".concat(l,"_")).call(i,p),"data-colname":G.a.I18n.t("failureReason")},o))};Wn.propTypes={error:u.a.string,email:u.a.string.isRequired,failed:u.a.string.isRequired,taskId:u.a.string.isRequired,lastName:u.a.string.isRequired,firstName:u.a.string.isRequired,processed:u.a.string.isRequired,subscriberId:u.a.string.isRequired},Wn.defaultProps={error:""};var zn=$n,Un=a(112),Kn=a.n(Un),Gn=function(e){var t,a,n,i=e.newsletter,o=i.total_sent||0,s=0,l=0,c=0;o>0&&(s=100*i.statistics.clicked/o,l=100*i.statistics.opened/o,c=100*i.statistics.unsubscribed/o);var u,p=G.a.Num.toLocaleFixed(s,1),d=G.a.Num.toLocaleFixed(l,1),m=G.a.Num.toLocaleFixed(c,1),h=P()(t="".concat(d,"% ")).call(t,G.a.I18n.t("percentageOpened")),f=P()(a="".concat(p,"% ")).call(a,G.a.I18n.t("percentageClicked")),g=P()(n="".concat(m,"% ")).call(n,G.a.I18n.t("percentageUnsubscribed"));return u=o>=20&&i.statistics.opened>=5?r.a.createElement("div",{className:"mailpoet_stat_grey"},r.a.createElement("div",{className:"mailpoet_stat_big mailpoet_stat_spaced"},r.a.createElement(Kn.a,{stat:"opened",rate:l,headline:h})),r.a.createElement("div",{className:"mailpoet_stat_big mailpoet_stat_spaced"},r.a.createElement(Kn.a,{stat:"clicked",rate:s,headline:f})),Ie.a.applyFilters("mailpoet_newsletters_revenues_stats",null,i.statistics.revenue),r.a.createElement("div",null,r.a.createElement(Kn.a,{stat:"unsubscribed",rate:c,headline:g}))):r.a.createElement("div",{className:"mailpoet_stat_grey"},r.a.createElement("div",{className:"mailpoet_stat_big mailpoet_stat_spaced"},h),r.a.createElement("div",{className:"mailpoet_stat_big mailpoet_stat_spaced"},f),Ie.a.applyFilters("mailpoet_newsletters_revenues_stats",null,i.statistics.revenue),r.a.createElement("div",null,g)),r.a.createElement("div",null,r.a.createElement("p",{className:"mailpoet_stat_grey mailpoet_stat_big"},G.a.I18n.t("statsTotalSent")," ",qe()(o,10).toLocaleString()),u,i.ga_campaign&&r.a.createElement("p",null,G.a.I18n.t("googleAnalytics"),":",i.ga_campaign),r.a.createElement("p",null,r.a.createElement("a",{href:"https://kb.mailpoet.com/article/190-whats-a-good-email-open-rate",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("readMoreOnStats"))))};Gn.propTypes={newsletter:u.a.shape({ga_campaign:u.a.string,total_sent:u.a.number,statistics:u.a.shape({clicked:u.a.number,opened:u.a.number,unsubscribed:u.a.number,revenue:u.a.shape({currency:u.a.string.isRequired,value:u.a.number.isRequired,formatted:u.a.string.isRequired,count:u.a.number.isRequired})}).isRequired}).isRequired};var Jn=Gn;function Yn(e,t){var a,n="";e&&(n=t?P()(a="".concat(t," <")).call(a,e,">"):e);return n}function Qn(e){var t,a=e.newsletter,n=a.queue.scheduled_at||a.queue.created_at,i=Yn(a.sender_address||"",a.sender_name||""),o=Yn(a.reply_to_address||"",a.reply_to_name||""),s=me()(t=a.segments||[]).call(t,function(e){return e.name}).join(", ");return r.a.createElement("div",null,r.a.createElement("div",{className:"mailpoet_stat_spaced"},r.a.createElement("a",{href:a.preview_url,className:"button-secondary",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("statsPreviewNewsletter"))),r.a.createElement("p",null,G.a.I18n.t("statsDateSent"),":"," ",G.a.Date.format(n)),s&&r.a.createElement("p",null,G.a.I18n.t("statsToSegments"),":"," ",s),r.a.createElement("p",null,G.a.I18n.t("statsFromAddress"),":"," ",i),o&&r.a.createElement("p",null,G.a.I18n.t("statsReplyToAddress"),":"," ",o))}Qn.propTypes={newsletter:u.a.shape({queue:u.a.shape({scheduled_at:u.a.string,created_at:u.a.string}).isRequired,sender_address:u.a.string,sender_name:u.a.string,reply_to_address:u.a.string,reply_to_name:u.a.string,segments:u.a.array}).isRequired};var Xn=Qn,Zn=function(){if(window.mailpoet_premium_active)return null;var e=null;return e=window.mailpoet_subscribers_count<=window.mailpoet_free_premium_subscribers_limit?r.a.createElement("a",{className:"button",href:G.a.MailPoetComUrlFactory.getFreePlanUrl({utm_medium:"stats",utm_campaign:"signup"}),target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("premiumBannerCtaFree")):r.a.createElement("a",{className:"button",href:G.a.MailPoetComUrlFactory.getPricingPageUrl(window.mailpoet_subscribers_count),target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("premiumBannerCtaPremium")),r.a.createElement("div",{className:"mailpoet_stats_premium_banner"},r.a.createElement("h1",null,G.a.I18n.t("premiumBannerTitle")),r.a.createElement("p",null,e),r.a.createElement("a",{href:"admin.php?page=mailpoet-premium"},G.a.I18n.t("premiumBannerLink")))},er=function(e){function t(e){var a;return A()(this,t),(a=D()(this,M()(t).call(this,e))).state={item:{},loading:!0},a}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=this.props.match;window.scrollTo(0,0),this.loadItem(e.params.id)}},{key:"componentDidUpdate",value:function(e){e.match.params.id!==this.props.match.params.id&&this.loadItem(this.props.match.params.id)}},{key:"loadItem",value:function(e){var t=this,a=this.props.history;this.setState({loading:!0}),G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:window.mailpoet_premium_active?"stats":"newsletters",action:window.mailpoet_premium_active?"get":"getWithStats",data:{id:e}}).always(function(){G.a.Modal.loading(!1)}).done(function(e){t.setState({loading:!1,item:e.data})}).fail(function(e){var n;G.a.Notice.error(me()(n=e.errors).call(n,function(e){return e.message}),{scroll:!0}),t.setState({loading:!1,item:{}},function(){a.push("/")})})}},{key:"render",value:function(){var e,t=this.state,a=t.item,n=t.loading,i=a,o=this.props,s=o.match,l=o.location;return n||!i.queue?r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},G.a.I18n.t("statsTitle"),r.a.createElement(z.a,{className:"page-title-action",to:"/"},G.a.I18n.t("backToList")))):r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},P()(e="".concat(G.a.I18n.t("statsTitle"),": ")).call(e,i.subject),r.a.createElement(z.a,{className:"page-title-action",to:"/"},G.a.I18n.t("backToList"))),r.a.createElement("div",{className:"mailpoet_stat_triple-spaced"},r.a.createElement("div",{className:"mailpoet_stat_info"},r.a.createElement(Xn,{newsletter:i})),r.a.createElement("div",{className:"mailpoet_stat_general"},r.a.createElement(Jn,{newsletter:i})),r.a.createElement("div",{style:{clear:"both"}})),r.a.createElement("h2",null,G.a.I18n.t("clickedLinks")),r.a.createElement("div",{className:"mailpoet_stat_triple-spaced"},Ie.a.applyFilters("mailpoet_newsletters_clicked_links_table",r.a.createElement(Zn,null),i.clicked_links)),r.a.createElement("div",{className:"mailpoet_stat_triple-spaced"},Ie.a.applyFilters("mailpoet_newsletters_purchased_products",null,i)),r.a.createElement("h2",null,G.a.I18n.t("subscriberEngagement")),Ie.a.applyFilters("mailpoet_newsletters_subscriber_engagement",r.a.createElement(Zn,null),l,s.params,i))}}]),t}(r.a.Component);er.propTypes={match:u.a.shape({params:u.a.object.isRequired}).isRequired,location:u.a.object.isRequired,history:u.a.shape({push:u.a.func.isRequired}).isRequired};var tr=Object(Re.a)(er);(function(e){function t(){return A()(this,t),D()(this,M()(t).apply(this,arguments))}return V()(t,e),O()(t,[{key:"render",value:function(){return this.props.children}}]),t}(r.a.Component)).propTypes={children:u.a.element.isRequired};var ar=document.getElementById("newsletters_container");if(ar){var nr,rr=[{path:"/standard/(.*)?",component:fn},{path:"/welcome/(.*)?",component:In},{path:"/notification/history/:parent_id/(.*)?",component:Mn},{path:"/notification/(.*)?",component:Pn},{path:"/new/standard",component:Ta},{path:"/new/notification",component:Aa},{path:"/new/welcome",component:La},{path:"/new",component:je},{name:"template",path:"/template/:id",component:pt},{path:"/send/congratulate/:id",component:xa},{path:"/send/:id",component:ma},{path:"/sending-status/:id/(.*)?",component:zn},{path:"/stats/:id/(.*)?",component:tr}];rr=Ie.a.applyFilters("mailpoet_newsletters_before_router",P()(nr=[]).call(nr,pe()(rr),pe()(window.mailpoet_automatic_emails?me()(Ne.a).call(Ne.a,window.mailpoet_automatic_emails,function(e){return{path:"new/".concat(e.slug),name:e.slug,component:qa.a,data:{email:e}}}):null))),window.mailpoet_listing=o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{exact:!0,path:"/",render:function(){return r.a.createElement(Ee,{to:"/standard"})}}),me()(rr).call(rr,function(e){return r.a.createElement(N,{key:e.path,path:e.path,component:e.component,name:e.name||null,data:e.data||null,render:e.render})}))),ar)}var ir=function(e){return"wp_users"===e.type},or=function(e){return"woocommerce_users"===e.type},sr=function(e){return ir(e)||or(e)},lr=[{name:"name",label:G.a.I18n.t("name"),sortable:!0},{name:"description",label:G.a.I18n.t("description")},{name:"subscribed",label:G.a.I18n.t("subscribed")},{name:"unconfirmed",label:G.a.I18n.t("unconfirmed")},{name:"unsubscribed",label:G.a.I18n.t("unsubscribed")},{name:"inactive",label:G.a.I18n.t("inactive")},{name:"bounced",label:G.a.I18n.t("bounced")},{name:"created_at",label:G.a.I18n.t("createdOn"),sortable:!0}],cr={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSegmentTrashed"):G.a.I18n.t("multipleSegmentsTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSegmentDeleted"):G.a.I18n.t("multipleSegmentsDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSegmentRestored"):G.a.I18n.t("multipleSegmentsRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},ur=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:cr.onTrash}],pr=[{name:"edit",link:function(e){return r.a.createElement(z.a,{to:"/edit/".concat(e.id)},G.a.I18n.t("edit"))},display:function(e){return!sr(e)}},{name:"duplicate_segment",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("listDuplicated").replace("%$1s",e.data.name)),t()}).fail(function(e){var t;G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})},display:function(e){return!sr(e)}},{name:"read_more",link:function(){return r.a.createElement("a",{href:"https://kb.mailpoet.com/article/133-the-wordpress-users-list",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("readMore"))},display:function(e){return ir(e)}},{name:"synchronize_segment",label:G.a.I18n.t("forceSync"),onClick:function(e,t){G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"synchronize",data:{type:e.type}}).done(function(){G.a.Modal.loading(!1),G.a.Notice.success(G.a.I18n.t("listSynchronized").replace("%$1s",e.name)),t()}).fail(function(e){var t;(G.a.Modal.loading(!1),e.errors.length>0)&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})},display:function(e){return ir(e)||or(e)}},{name:"view_subscribers",link:function(e){return r.a.createElement("a",{href:e.subscribers_url,"data-automation-id":"view_subscribers_".concat(e.name)},G.a.I18n.t("viewSubscribers"))}},{name:"trash",display:function(e){return!sr(e)}}],dr=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"renderItem",function(e,t){var a,n=Y()("manage-column","column-primary","has-row-actions"),i=Number(e.subscribers_count.subscribed||0),o=Number(e.subscribers_count.unconfirmed||0),s=Number(e.subscribers_count.unsubscribed||0),l=Number(e.subscribers_count.inactive||0),c=Number(e.subscribers_count.bounced||0);return a=sr(e)?r.a.createElement("span",{className:"row-title"},e.name):r.a.createElement(z.a,{className:"row-title",to:"/edit/".concat(e.id)},e.name),r.a.createElement("div",null,r.a.createElement("td",{className:n,"data-automation-id":"segment_name_".concat(e.name)},r.a.createElement("strong",null,a),t),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("description")},r.a.createElement("abbr",null,e.description)),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("subscribed")},r.a.createElement("abbr",null,i.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("unconfirmed")},r.a.createElement("abbr",null,o.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("unsubscribed")},r.a.createElement("abbr",null,s.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("inactive")},r.a.createElement("abbr",null,l.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("bounced")},r.a.createElement("abbr",null,c.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("createdOn")},r.a.createElement("abbr",null,G.a.Date.format(e.created_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",{className:"mailpoet-segments-listing"},r.a.createElement("h1",{className:"title"},G.a.I18n.t("pageTitle")," ",r.a.createElement(z.a,{className:"page-title-action",to:"/new"},G.a.I18n.t("new"))),r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:cr,search:!1,endpoint:"segments",onRenderItem:this.renderItem,columns:lr,bulk_actions:ur,item_actions:pr,sort_by:"name",sort_order:"asc"}))}}]),t}(r.a.Component);dr.propTypes={location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired};var mr=dr,hr=a(493),fr=a.n(hr),gr=document.getElementById("segments_container");gr&&o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{path:"/new",component:fr.a}),r.a.createElement(N,{path:"/edit/:id",component:fr.a}),r.a.createElement(N,{path:"*",component:mr}))),gr);var _r=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).state={senderAddress:e.senderAddress,senderName:e.senderName,replyToName:e.replyToName,replyToAddress:e.replyToAddress},n.onChange=Ke()(a=n.onChange).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"onChange",value:function(e,t){var a={};a[e]=t.target.value,this.setState(a)}},{key:"render",value:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("label",{htmlFor:"settings[from_name]"},G.a.I18n.t("from")),r.a.createElement("input",{type:"text",id:"settings[from_name]","data-automation-id":"settings-page-from-name-field",name:"sender[name]",value:this.state.senderName,onChange:Object(Se.partial)(this.onChange,"senderName"),placeholder:G.a.I18n.t("yourName")}),r.a.createElement("input",{type:"email",id:"settings[from_email]",name:"sender[address]","data-automation-id":"settings-page-from-email-field",value:this.state.senderAddress,onChange:Object(Se.partial)(this.onChange,"senderAddress"),placeholder:"from@mydomain.com"})),r.a.createElement("div",{className:"regular-text"},r.a.createElement(Bt,{emailAddress:this.state.senderAddress,mssActive:this.props.mssActive})),r.a.createElement("p",null,r.a.createElement("label",{htmlFor:"settings[reply_name]"},G.a.I18n.t("replyTo")),r.a.createElement("input",{type:"text",id:"settings[reply_name]",name:"reply_to[name]",value:this.state.replyToName,onChange:Object(Se.partial)(this.onChange,"replyToName"),placeholder:G.a.I18n.t("yourName")}),r.a.createElement("input",{type:"email",id:"settings[reply_email]",name:"reply_to[address]",value:this.state.replyToAddress,onChange:Object(Se.partial)(this.onChange,"replyToAddress"),placeholder:"reply_to@mydomain.com"})))}}]),t}(r.a.Component);_r.propTypes={senderAddress:u.a.string.isRequired,senderName:u.a.string.isRequired,replyToAddress:u.a.string.isRequired,replyToName:u.a.string.isRequired,mssActive:u.a.bool.isRequired};var br=_r,vr=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).state={senderAddress:e.senderAddress,senderName:e.senderName},n.onChange=Ke()(a=n.onChange).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"onChange",value:function(e,t){var a={};a[e]=t.target.value,this.setState(a)}},{key:"render",value:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement("th",{scope:"row"},r.a.createElement("label",{htmlFor:"settings[signup_confirmation_from_name]"},G.a.I18n.t("from"))),r.a.createElement("td",null,r.a.createElement("p",null,r.a.createElement("input",{type:"text",id:"settings[signup_confirmation_from_name]",name:"signup_confirmation[from][name]","data-automation-id":"signup_confirmation_email_from_name",value:this.state.senderName,onChange:Object(Se.partial)(this.onChange,"senderName"),placeholder:G.a.I18n.t("yourName")}),r.a.createElement("input",{type:"email",id:"settings[signup_confirmation_from_email]",name:"signup_confirmation[from][address]","data-automation-id":"signup_confirmation_email_from_email",value:this.state.senderAddress,onChange:Object(Se.partial)(this.onChange,"senderAddress"),placeholder:"confirmation@mydomain.com",size:"28"})),r.a.createElement("div",{className:"regular-text"},r.a.createElement(Bt,{emailAddress:this.state.senderAddress,mssActive:this.props.mssActive}))))}}]),t}(r.a.Component);vr.propTypes={senderAddress:u.a.string.isRequired,senderName:u.a.string.isRequired,mssActive:u.a.bool.isRequired};var yr=vr,wr=document.getElementById("settings_sender_container");wr&&o.a.render(r.a.createElement(br,{senderAddress:window.mailpoet_settings_sender_adddress,senderName:window.mailpoet_settings_sender_name,replyToAddress:window.mailpoet_settings_reply_to_address,replyToName:window.mailpoet_settings_reply_to_name,mssActive:window.mailpoet_mss_active}),wr);var Er=document.getElementById("settings_signup_confirmation_sender_container");Er&&o.a.render(r.a.createElement(yr,{senderAddress:window.mailpoet_settings_signup_confirmation_address,senderName:window.mailpoet_settings_signup_confirmation_name,mssActive:window.mailpoet_mss_active}),Er);var kr=[{name:"name",label:G.a.I18n.t("formName"),sortable:!0},{name:"segments",label:G.a.I18n.t("segments")},{name:"signups",label:G.a.I18n.t("signups")},{name:"created_at",label:G.a.I18n.t("createdOn"),sortable:!0}],Ir={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneFormTrashed"):G.a.I18n.t("multipleFormsTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneFormDeleted"):G.a.I18n.t("multipleFormsDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneFormRestored"):G.a.I18n.t("multipleFormsRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},Sr=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:Ir.onTrash}],Nr=[{name:"edit",label:G.a.I18n.t("edit"),link:function(e){return r.a.createElement("a",{href:"admin.php?page=mailpoet-form-editor&id=".concat(e.id)},G.a.I18n.t("edit"))}},{name:"duplicate",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("formDuplicated").replace("%$1s",e.data.name)),t()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{name:"trash"}],xr=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"createForm",function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"create"}).done(function(e){window.location=window.mailpoet_form_edit_url+e.data.id}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}),W()(B()(n),"renderItem",function(e,t){var a,n,i,o=Y()("manage-column","column-primary","has-row-actions"),s=me()(a=ze()(n=window.mailpoet_segments).call(n,function(t){return-1!==K.a.inArray(t.id,e.segments)})).call(a,function(e){return e.name}).join(", ");"user"===e.settings.segments_selected_by&&(s=P()(i="".concat(G.a.I18n.t("userChoice")," ")).call(i,s));return r.a.createElement("div",null,r.a.createElement("td",{className:o},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-form-editor&id=".concat(e.id)},e.name)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("segments")},s),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("signups")},e.signups),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("createdOn")},r.a.createElement("abbr",null,G.a.Date.format(e.created_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},G.a.I18n.t("pageTitle")," ",r.a.createElement("button",{className:"page-title-action",href:"javascript:;",onClick:this.createForm,"data-automation-id":"create_new_form",type:"button"},G.a.I18n.t("new"))),r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:Ir,search:!1,endpoint:"forms",onRenderItem:this.renderItem,columns:kr,bulk_actions:Sr,item_actions:Nr}))}}]),t}(r.a.Component);xr.propTypes={location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired};var Cr=xr,Tr=document.getElementById("forms_container");Tr&&o.a.render(r.a.createElement(E,null,r.a.createElement(N,{path:"*",component:Cr})),Tr);var Pr=a(55),Rr=a.n(Pr),Ar=G.a;K()("#mailpoet_settings").length>0&&(Ar.Router=new(Rr.a.Router.extend({routes:{"":"defaultRoute","mta(/:group)":"sendingMethodGroup","(:tab)":"tabs"},defaultRoute:function(){this.tabs("basics")},sendingMethodGroup:function(e){this.tabs("mta"),K()("#mailpoet_sending_method_setup, .mailpoet_sending_method").hide(),K()(".mailpoet_settings_submit").hide(),null===e?K()(".mailpoet_sending_methods, .mailpoet_sending_methods_help").fadeIn():(K()("#mailpoet_mta_spf")["mailpoet"===e?"hide":"show"](),K()(".mailpoet_sending_methods, .mailpoet_sending_methods_help").hide(),K()('.mailpoet_sending_method[data-group="'+e+'"]').show(),K()("#mailpoet_sending_method_setup").fadeIn())},tabs:function(e){K()(".nav-tab-wrapper a").removeClass("nav-tab-active"),K()(".mailpoet_tab_panel, .mailpoet_section").hide(),K()('a.nav-tab[href="#'+e+'"]').addClass("nav-tab-active").blur(),K()('.mailpoet_tab_panel[data-tab="'+e+'"]').length>0&&K()('.mailpoet_tab_panel[data-tab="'+e+'"]').show(),K()(".mailpoet_settings_submit").show(),Ar.trackEvent("User has clicked a tab in Settings",{"MailPoet Free version":window.mailpoet_version,"Tab ID":e})}})),K()(document).ready(function(){Rr.a.History.started||Rr.a.history.start()}));var jr=[{name:"knowledgeBase",label:G.a.I18n.t("tabKnowledgeBaseTitle"),link:"/knowledgeBase"},{name:"systemStatus",label:G.a.I18n.t("tabSystemStatusTitle"),link:"/systemStatus"},{name:"systemInfo",label:G.a.I18n.t("tabSystemInfoTitle"),link:"/systemInfo"},{name:"yourPrivacy",label:G.a.I18n.t("tabYourPrivacyTitle"),link:"/yourPrivacy"}];function Or(e){var t=me()(jr).call(jr,function(t){var a=Y()("nav-tab",{"nav-tab-active":e.tab===t.name});return r.a.createElement(z.a,{key:"tab-".concat(t.name),className:a,to:t.link},t.label)});return r.a.createElement("h2",{className:"nav-tab-wrapper"},t)}Or.propTypes={tab:u.a.string},Or.defaultProps={tab:"knowledgeBase"};var Lr=Or;var Dr=function(){return r.a.createElement("div",null,r.a.createElement(Lr,{tab:"knowledgeBase"}),r.a.createElement("p",null,G.a.I18n.t("knowledgeBaseIntro")),r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/116-common-problems"},"Common Problems")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/165-newsletters"},"Newsletters")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/156-migration-questions"},"Migration Questions")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/149-sending-methods"},"Sending Methods")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/139-subscription-forms"},"Subscription Forms")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/114-getting-started"},"Getting Started")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/123-newsletter-designer"},"Newsletter Designer")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/121-subscribers-and-lists"},"Subscribers and Lists"))),r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/",className:"button button-primary"},G.a.I18n.t("knowledgeBaseButton")))};function qr(e){e.target.select()}var Mr=function(){var e=window.systemInfoData;return r.a.createElement("div",null,r.a.createElement(Lr,{tab:"systemInfo"}),r.a.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},r.a.createElement("p",null,G.a.I18n.t("systemInfoIntro"))),function(e){if(Ne.a.isObject(e)){var t,a=me()(t=$e()(e)).call(t,function(t){var a;return P()(a="".concat(t,": ")).call(a,e[t])});return r.a.createElement("textarea",{readOnly:!0,onFocus:qr,value:a.join("\n"),style:{width:"100%",height:"400px"}})}return r.a.createElement("p",null,G.a.I18n.t("systemInfoDataError"))}(e))},Fr=a(73),Br=a.n(Fr),$r=function(e){var t;return r.a.createElement("table",{className:"widefat fixed",style:{maxWidth:e.max_width}},r.a.createElement("tbody",null,me()(t=e.rows).call(t,function(e){return r.a.createElement("tr",{key:"row_".concat(e.key)},r.a.createElement("td",{className:"row-title"},e.key),r.a.createElement("td",null,e.value))})))};$r.propTypes={max_width:u.a.string,rows:u.a.arrayOf(u.a.shape({key:u.a.string.isRequired,value:u.a.oneOfType([u.a.string,u.a.number,u.a.element]).isRequired})).isRequired},$r.defaultProps={max_width:"auto"};var Vr=$r,Hr=function(e){return r.a.createElement("span",null,!0===e.children&&e.truthy||!1===e.children&&e.falsy||e.unknown)};Hr.propTypes={truthy:u.a.string,falsy:u.a.string,unknown:u.a.string,children:u.a.bool},Hr.defaultProps={truthy:G.a.I18n.t("yes"),falsy:G.a.I18n.t("no"),unknown:G.a.I18n.t("unknown"),children:null};var Wr=Hr,zr=function(e){var t,a=e.status_data,n={active:G.a.I18n.t("running"),inactive:G.a.I18n.t("cronWaiting")},i=Br()(a.last_error)?r.a.createElement(r.a.Fragment,null,me()(t=a.last_error).call(t,function(e){return r.a.createElement("div",{key:e.worker},e.worker,":"," ",r.a.createElement("i",null,e.message))})):a.last_error;return r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("systemStatusCronStatusTitle")),r.a.createElement(Vr,{max_width:"400px",rows:[{key:G.a.I18n.t("accessible"),value:r.a.createElement(Wr,null,a.accessible)},{key:G.a.I18n.t("status"),value:n[a.status]?n[a.status]:G.a.I18n.t("unknown")},{key:G.a.I18n.t("lastUpdated"),value:a.updated_at?G.a.Date.full(1e3*a.updated_at):G.a.I18n.t("unknown")},{key:G.a.I18n.t("lastRunStarted"),value:a.run_accessed_at?G.a.Date.full(1e3*a.run_started_at):G.a.I18n.t("unknown")},{key:G.a.I18n.t("lastRunCompleted"),value:a.run_completed_at?G.a.Date.full(1e3*a.run_completed_at):G.a.I18n.t("unknown")},{key:G.a.I18n.t("lastSeenError"),value:i||G.a.I18n.t("none")},{key:G.a.I18n.t("lastSeenErrorDate"),value:a.last_error_date?G.a.Date.full(1e3*a.last_error_date):G.a.I18n.t("unknown")}]}))};zr.propTypes={status_data:u.a.shape({accessible:u.a.bool,status:u.a.string,updated_at:u.a.number,run_accessed_at:u.a.number,run_completed_at:u.a.number}).isRequired};var Ur=zr,Kr=function(e){return r.a.createElement("tr",null,r.a.createElement("td",{className:"column column-primary"},e.task.id),r.a.createElement("td",{className:"column"},e.task.type),r.a.createElement("td",{className:"column"},e.task.newsletter?r.a.createElement("a",{href:e.task.newsletter.preview_url,"data-newsletter-id":e.task.newsletter.newsletter_id,"data-queue-id":e.task.newsletter.queue_id,target:"_blank",rel:"noopener noreferrer"},e.task.newsletter.subject||G.a.I18n.t("preview")):G.a.I18n.t("none")),r.a.createElement("td",{className:"column"},e.task.priority),e.show_scheduled_at?r.a.createElement("td",{className:"column-date"},r.a.createElement("abbr",null,G.a.Date.format(1e3*e.task.scheduled_at))):null,r.a.createElement("td",{className:"column-date"},r.a.createElement("abbr",null,G.a.Date.format(1e3*e.task.updated_at))))};Kr.propTypes={show_scheduled_at:u.a.bool,task:u.a.shape({id:u.a.number.isRequired,type:u.a.string.isRequired,priority:u.a.number.isRequired,updated_at:u.a.number.isRequired,scheduled_at:u.a.number,status:u.a.string,newsletter:u.a.shape({newsletter_id:u.a.number.isRequired,queue_id:u.a.number.isRequired,preview_url:u.a.string.isRequired,subject:u.a.string})}).isRequired},Kr.defaultProps={show_scheduled_at:!1};var Gr=Kr,Jr=function(e){return r.a.createElement("tr",null,r.a.createElement("th",{className:"row-title"},"Id"),r.a.createElement("th",{className:"row-title"},G.a.I18n.t("type")),r.a.createElement("th",{className:"row-title"},G.a.I18n.t("email")),r.a.createElement("th",{className:"row-title"},G.a.I18n.t("priority")),e.show_scheduled_at?r.a.createElement("th",{className:"row-title"},G.a.I18n.t("scheduledAt")):null,r.a.createElement("th",{className:"row-title"},G.a.I18n.t("updatedAt")))};Jr.propTypes={show_scheduled_at:u.a.bool},Jr.defaultProps={show_scheduled_at:!1};var Yr=Jr,Qr=function(e){var t,a=e.show_scheduled_at?6:5;return r.a.createElement("table",{className:"widefat fixed striped"},r.a.createElement("thead",null,r.a.createElement(Yr,{show_scheduled_at:e.show_scheduled_at})),r.a.createElement("tbody",null,e.tasks.length?me()(t=e.tasks).call(t,function(t){return r.a.createElement(Gr,{key:t.id,task:t,show_scheduled_at:e.show_scheduled_at})}):r.a.createElement("tr",{className:"no-items"},r.a.createElement("td",{colSpan:a},G.a.I18n.t("nothingToShow")))),r.a.createElement("tfoot",null,r.a.createElement(Yr,{show_scheduled_at:e.show_scheduled_at})))};Qr.propTypes={show_scheduled_at:u.a.bool,tasks:u.a.arrayOf(Gr.propTypes.task).isRequired},Qr.defaultProps={show_scheduled_at:!1};var Xr=Qr,Zr=function(e){var t,a,n,i=e.status_data;return r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("systemStatusQueueTitle")),r.a.createElement(Vr,{max_width:"400px",rows:[{key:G.a.I18n.t("status"),value:"paused"===i.status?G.a.I18n.t("paused"):G.a.I18n.t("running")},{key:G.a.I18n.t("startedAt"),value:i.started?G.a.Date.full(1e3*i.started):G.a.I18n.t("unknown")},{key:G.a.I18n.t("sentEmails"),value:i.sent||0},{key:G.a.I18n.t("retryAttempt"),value:i.retry_attempt||G.a.I18n.t("none")},{key:G.a.I18n.t("retryAt"),value:i.retry_at?G.a.Date.full(1e3*i.retry_at):G.a.I18n.t("none")},{key:G.a.I18n.t("error"),value:i.error?i.error.error_message:G.a.I18n.t("none")},{key:G.a.I18n.t("totalCompletedTasks"),value:i.tasksStatusCounts.completed},{key:G.a.I18n.t("totalRunningTasks"),value:i.tasksStatusCounts.running},{key:G.a.I18n.t("totalPausedTasks"),value:i.tasksStatusCounts.paused},{key:G.a.I18n.t("totalScheduledTasks"),value:i.tasksStatusCounts.scheduled}]}),r.a.createElement("h4",null,G.a.I18n.t("scheduledTasks")),r.a.createElement(Xr,{show_scheduled_at:!0,tasks:ze()(t=i.latestTasks).call(t,function(e){return"scheduled"===e.status})}),r.a.createElement("h4",null,G.a.I18n.t("runningTasks")),r.a.createElement(Xr,{tasks:ze()(a=i.latestTasks).call(a,function(e){return null===e.status})}),r.a.createElement("h4",null,G.a.I18n.t("completedTasks")),r.a.createElement(Xr,{tasks:ze()(n=i.latestTasks).call(n,function(e){return"completed"===e.status})}))};Zr.propTypes={status_data:u.a.shape({status:u.a.string,started:u.a.number,sent:u.a.number,retry_attempt:u.a.number,retry_at:u.a.number,error:u.a.shape({operation:u.a.string,error_message:u.a.string}),tasksStatusCounts:u.a.shape({completed:u.a.number.isRequired,running:u.a.number.isRequired,paused:u.a.number.isRequired,scheduled:u.a.number.isRequired}).isRequired,latestTasks:u.a.arrayOf(Gr.propTypes.task).isRequired}).isRequired};var ei=Zr;function ti(e,t,a,n,i){var o,s=e?"success":"error",l=e?G.a.I18n.t("systemStatusConnectionSuccessful"):P()(o="".concat(G.a.I18n.t("systemStatusConnectionUnsuccessful")," ")).call(o,t);return a&&(l=Dt()(l,/\[link\](.*?)\[\/link\]/g,function(e){return r.a.createElement("a",{href:a,"data-beacon-article":n,key:"kb-link"},e)})),r.a.createElement("div",{className:"mailpoet_notice notice inline notice-".concat(s),style:{marginTop:"1em"}},r.a.createElement("p",null,l),i?r.a.createElement("p",null,r.a.createElement("i",null,i)):null)}var ai=function(){var e,t,a,n,i,o=window.systemStatusData;return r.a.createElement("div",null,r.a.createElement(Lr,{tab:"systemStatus"}),r.a.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},r.a.createElement("p",null,o.mss.enabled?G.a.I18n.t("systemStatusIntroCronMSS"):G.a.I18n.t("systemStatusIntroCron"))),(t=(e=o).cron.isReachable,a=e.cron.url,n=G.a.I18n.t("systemStatusCronConnectionUnsuccessfulInfo"),i=t?null:e.cron.pingResponse,r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("systemStatusCronTitle")),r.a.createElement("p",null,r.a.createElement("a",{href:a,target:"_blank",rel:"noopener noreferrer"},a)),ti(t,n,"https://kb.mailpoet.com/article/231-sending-does-not-work","5a0257ac2c7d3a272c0d7ad6",i))),function(e){if(e.mss.enabled){var t=e.mss.enabled.isReachable;return r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("systemStatusMSSTitle")),ti(t,G.a.I18n.t("systemStatusMSSConnectionUnsuccessfulInfo"),!1))}}(o),r.a.createElement(Ur,{status_data:o.cronStatus}),r.a.createElement(ei,{status_data:o.queueStatus}))};var ni=function(){return r.a.createElement("div",null,r.a.createElement(Lr,{tab:"yourPrivacy"}),r.a.createElement("p",null,G.a.I18n.t("yourPrivacyContent1")),r.a.createElement("p",null,G.a.I18n.t("yourPrivacyContent2")),r.a.createElement("p",null,G.a.I18n.t("yourPrivacyContent3")),r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://www.mailpoet.com/privacy-notice/",className:"button button-primary"},G.a.I18n.t("yourPrivacyButton")))},ri=document.getElementById("help_container");ri&&o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{exact:!0,path:"/",render:function(){return r.a.createElement(Ee,{to:"/knowledgeBase"})}}),r.a.createElement(N,{path:"/knowledgeBase",component:Dr}),r.a.createElement(N,{path:"/systemStatus",component:ai}),r.a.createElement(N,{path:"/systemInfo",component:Mr}),r.a.createElement(N,{path:"/yourPrivacy",component:ni}))),ri);var ii=a(515),oi=a.n(ii),si=[{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-segments]").parentNode,intro:G.a.I18n.t("introLists")},{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-forms]").parentNode,intro:G.a.I18n.t("introForms")},{element:".mailpoet-chat",intro:G.a.I18n.t("introChat")},{element:"#mailpoet-new-email",intro:G.a.I18n.t("introEmails")}],li=!1;G.a.showIntro=function(){if(!(li||window.innerWidth<=960)){var e=oi()();e.setOptions({steps:si,nextLabel:"".concat(G.a.I18n.t("introNext")," →"),prevLabel:"← ".concat(G.a.I18n.t("introBack")),skipLabel:G.a.I18n.t("introSkip"),doneLabel:G.a.I18n.t("introDone"),positionPrecedence:["right","left","bottom","top"],buttonClass:"button",hidePrev:!0,hideNext:!0,helperElementPadding:12,scrollToElement:!1,showStepNumbers:!1,tooltipPosition:"auto"}),e.onafterchange(function(e){if("fixed"===getComputedStyle(e).getPropertyValue("position")){var t=document.querySelector(".introjs-helperLayer"),a=document.querySelector(".introjs-tooltipReferenceLayer");a.style.top="".concat(qe()(a.style.top,10)-window.pageYOffset,"px"),t.style.top="".concat(qe()(t.style.top,10)-window.pageYOffset,"px")}}),e.onexit(function(){li=!1,document.body.classList.remove("mailpoet-intro-active")}),e.onskip(function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_intro:0}})}),e.start(),li=!0,document.body.classList.add("mailpoet-intro-active")}};var ci,ui=function(e){return"show_poll_success_delivery_".concat(e)},pi=function(){if(!document.getElementById("typef_orm")){var e=document.createElement("script");e.id="typef_orm",e.src="https://embed.typeform.com/embed.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}},di={successDelivery:{canShow:function(e,t){return"en"===window.mailpoet_locale&&"1"===window.mailpoet_polls_visibility[ui(e)]&&(t||"PHPMail"===window.mailpoet_polls_data.mta_method)},initTypeformScript:pi,setPollShown:function(e){var t={};t[ui(e)]="0",G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:t}),window.mailpoet_polls_visibility[ui(e)]="0"},showModal:function(e,t){G.a.Modal.popup({onInit:pi,template:'\n <div class="typeform-widget"\n data-url="https://mailpoet.typeform.com/to/'.concat(t,'"\n data-transparency="100"\n data-hide-headers="true"\n data-hide-footer="true"\n style="width: 500px; height: 500px; max-width: 100%; max-height: 100%;"\n ></div>\n ')})}}};G.a.Poll=di,(ci=document.getElementById("mailpoet_reinstall"))&&ci.addEventListener("click",function(){return confirm(G.a.I18n.t("reinstallConfirmation"))&&(G.a.trackEvent("User has reinstalled MailPoet via Settings",{"MailPoet Free version":window.mailpoet_version}),G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"setup",action:"reset"}).always(function(){G.a.Modal.loading(!1)}).done(function(){window.location="admin.php?page=mailpoet-newsletters"}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})),!1},!1);var mi=Object(Re.a)(function(e){var t=e.children,a=e.location.pathname;return Object(n.useEffect)(function(){window.scrollTo(0,0)},[a]),t||null}),hi=a(54),fi=a.n(hi),gi=r.a.createContext({isNewUser:window.mailpoet_is_new_user,segments:window.mailpoetSegments});function _i(e){var t=e.activeMethod,a=e.onMethodChange,n=r.a.useContext(gi).isNewUser,i=Y()("mailpoet_badge","mailpoet_badge_video",{mailpoet_badge_video_grey:!n});return r.a.createElement(r.a.Fragment,null,r.a.createElement("form",{className:"mailpoet_import_selection_form"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("methodSelectionHead")),r.a.createElement("label",{htmlFor:"import-paste-method"},r.a.createElement("input",{type:"radio",name:"select_method","data-automation-id":"import-paste-method",id:"import-paste-method",checked:"paste-method"===t,onChange:function(){return a("paste-method")}}),G.a.I18n.t("methodPaste")),r.a.createElement("label",{htmlFor:"import-csv-method"},r.a.createElement("input",{type:"radio",name:"select_method","data-automation-id":"import-csv-method",id:"import-csv-method",checked:"file-method"===t,onChange:function(){return a("file-method")}}),G.a.I18n.t("methodUpload")),r.a.createElement("label",{htmlFor:"import-mailchimp-method"},r.a.createElement("input",{type:"radio",name:"select_method","data-automation-id":"import-mailchimp-method",id:"import-mailchimp-method",checked:"mailchimp-method"===t,onChange:function(){return a("mailchimp-method")}}),G.a.I18n.t("methodMailChimp"))),r.a.createElement("a",{className:i,href:"https://kb.mailpoet.com/article/242-video-guide-importing-subscribers-using-a-csv-file","data-beacon-article":"5a8e8f0204286305fbc9be9a",target:"_blank",rel:"noopener noreferrer"},r.a.createElement("span",{className:"dashicons dashicons-format-video"}),G.a.I18n.t("seeVideo")))}_i.propTypes={activeMethod:u.a.string,onMethodChange:u.a.func.isRequired},_i.defaultProps={activeMethod:void 0};var bi=_i,vi=function(e){var t=e.hidePrevious,a=e.canGoNext,n=e.onPreviousAction,i=e.onNextAction,o=Y()("button-primary","wysija",{"button-disabled":!a});return r.a.createElement("div",{className:"mailpoet_import_step_buttons"},!t&&r.a.createElement(r.a.Fragment,null,r.a.createElement("button",{className:"button-primary wysija button",type:"button",onClick:n},G.a.I18n.t("previousStep")),"  "),r.a.createElement("button",{type:"button","data-automation-id":"import-next-step",className:o,onClick:function(){a&&i()}},G.a.I18n.t("nextStep")))};vi.propTypes={canGoNext:u.a.bool,hidePrevious:u.a.bool,onPreviousAction:u.a.func,onNextAction:u.a.func},vi.defaultProps={hidePrevious:!1,canGoNext:!0,onPreviousAction:function(){},onNextAction:function(){}};var yi=vi,wi=function(e){var t=e.onValueChange,a=e.canFinish,n=e.onFinish,i=e.data;return r.a.createElement(r.a.Fragment,null,r.a.createElement("label",{htmlFor:"paste_input",className:"mailpoet_import_method_paste"},r.a.createElement("div",{className:"mailpoet_import_paste_texts"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("pasteLabel")),r.a.createElement("p",{className:"description"},Dt()(G.a.I18n.t("pasteDescription"),/\[link\](.*?)\[\/link\]/,function(e){return r.a.createElement("a",{href:"".concat("https://kb.mailpoet.com/article/126-importing-subscribers-with-csv-files"),"data-beacon-article":"57ce079f903360649f6e56fc",key:"kb-link",target:"_blank",rel:"noopener noreferrer"},e)}))),r.a.createElement("textarea",{id:"paste_input",rows:"15",placeholder:"Email, First Name, Last Name\njohn@doe.com, John, Doe\nmary@smith.com, Mary, Smith\njohnny@walker.com, Johnny, Walker",className:"regular-text code",onChange:function(e){t(e.target.value)},defaultValue:i})),r.a.createElement(yi,{canGoNext:a,hidePrevious:!0,onNextAction:n}))};wi.propTypes={onFinish:u.a.func,canFinish:u.a.bool.isRequired,onValueChange:u.a.func.isRequired,data:u.a.string},wi.defaultProps={onFinish:function(){},data:""};var Ei=wi,ki=function(e){var t=e.onValueChange,a=e.canFinish,n=e.onFinish;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",null,r.a.createElement("label",{htmlFor:"paste_input",className:"mailpoet_import_method_paste"},r.a.createElement("div",{className:"mailpoet_import_paste_texts"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("methodUpload")),r.a.createElement("p",{className:"description"},Dt()(G.a.I18n.t("pasteDescription"),/\[link\](.*?)\[\/link\]/,function(e){return r.a.createElement("a",{href:"".concat("https://kb.mailpoet.com/article/126-importing-subscribers-with-csv-files"),"data-beacon-article":"57ce079f903360649f6e56fc",key:"kb-link",target:"_blank",rel:"noopener noreferrer"},e)}))),r.a.createElement("input",{type:"file",id:"file_local",accept:".csv","data-automation-id":"import-file-upload-input",onChange:function(e){var a=e.target.value.match(/[^.]+$/);G.a.Notice.hide(),null===a||"csv"!==a[0].toLowerCase()?(G.a.Notice.error(G.a.I18n.t("wrongFileFormat")),t("")):t(e.target.files[0])}}))),r.a.createElement(yi,{canGoNext:a,hidePrevious:!0,onNextAction:n}))};ki.propTypes={canFinish:u.a.bool.isRequired,onFinish:u.a.func,onValueChange:u.a.func.isRequired},ki.defaultProps={onFinish:function(){}};var Ii=ki,Si=function(e){var t=e.onFinish,a=Object(n.useState)(""),i=St()(a,2),o=i[0],s=i[1],l=Object(n.useState)(void 0),c=St()(l,2),u=c[0],p=c[1],d=Object(n.useState)([]),m=St()(d,2),h=m[0],f=m[1],g=Y()("mailpoet_mailchimp-key-status",{"mailpoet_mailchimp-ok":Br()(u)});return r.a.createElement("div",{className:"mailpoet_import_mailchimp"},r.a.createElement("div",{className:"mailpoet_mailchimp_key"},r.a.createElement("label",{htmlFor:"mailpoet_mailchimp_key_input",className:"mailpoet_mailchimp_key_input"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("methodMailChimpLabel")),r.a.createElement("input",{id:"mailpoet_mailchimp_key_input",type:"text",onChange:function(e){var t;s(e.target.value),""===fi()(t=e.target.value).call(t)&&p(void 0)}})),r.a.createElement("button",{className:"button",type:"button",onClick:function(){G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpLists",data:{api_key:o}}).always(function(){G.a.Modal.loading(!1)}).done(function(e){return p(e.data)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},G.a.I18n.t("methodMailChimpVerify")),r.a.createElement("span",{className:g},Br()(u)&&0===u.length?G.a.I18n.t("noMailChimpLists"):null)),u?r.a.createElement("div",{className:"mailpoet_mailchimp_lists"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("methodMailChimpSelectList")),r.a.createElement(ee.a,{field:{id:"segments",name:"list-selection",multiple:!0,placeholder:G.a.I18n.t("methodMailChimpSelectPlaceholder"),forceSelect2:!0,values:u},onValueChange:function(e){return f(e.target.value)}})):null,r.a.createElement(yi,{canGoNext:Br()(h)&&h.length>0,hidePrevious:!0,onNextAction:function(){G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpSubscribers",data:{api_key:o,lists:h}}).always(function(){G.a.Modal.loading(!1)}).done(function(e){return t(e.data)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}}))};Si.propTypes={onFinish:u.a.func},Si.defaultProps={onFinish:function(){}};var Ni=Si,xi=a(516),Ci=a.n(xi),Ti=a(43),Pi=a.n(Ti),Ri=a(330),Ai=a.n(Ri),ji=a(139),Oi=a.n(ji),Li=function(e){var t;return Oi()(t=window.roleBasedEmails).call(t,function(t){return Ai()(e).call(e,"".concat(t,"@"))})>=0},Di=function(e){var t,a,n,r=K()("<div />").html(e).text();(r=r.toLowerCase().replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g,"").replace(/\s+|%\d+|,+/g,""),t=/<(.*?)>/.exec(r))&&(r=fi()(a=t[1]).call(a));(t=/mailto:(?:\s+)?(.*)/.exec(r))&&(r=fi()(n=t[1]).call(n));return!!window.mailpoet_email_regex.test(r)&&(!Li(r)&&r)};var qi=function(e){var t,a,n,r,i,o=[],s=[],l=[],c=[],u=[],p=null,d=null,m=!1;return C()(t=$e()(e)).call(t,function(t){var h,f;r=me()(h=e[t]).call(h,function(e){return fi()(e).call(e)}),i=r.length,null===d&&(d=i),i===d&&(null===p?(C()(f=$e()(r)).call(f,function(e){n=Di(r[e]),null===p&&window.mailpoet_email_regex.test(n)&&(p=e,s[n]=!0,r[e]=n,o[n]=r)}),null===p&&0===qe()(t,10)&&(m=!0,o[0]=r)):""!==r[p]&&(a=Di(r[p]),Ne.a.has(s,a)?l.push(a):Li(r[p])?u.push(r[p]):window.mailpoet_email_regex.test(a)?(s[a]=!0,r[p]=a,o[a]=r):c.push(r[p])))}),(o=Pi()(Ne.a).call(Ne.a,o))&&(m&&o.length>=2||!m&&o.length>=1)?{header:window.mailpoet_email_regex.test(o[0][p])?null:o.shift(),subscribers:o,subscribersCount:o.length,duplicate:Ne.a.uniq(l),invalid:Ne.a.uniq(c),role:Ne.a.uniq(u)}:null};var Mi=function(e,t){var a=encodeURI(e).split(/%..|./).length-1;G.a.Notice.hide(),a>window.maxPostSizeBytes?G.a.Notice.error(G.a.I18n.t("maxPostSizeNotice")):(G.a.Modal.loading(!0),Ci.a.parse(e,function(e){return{skipEmptyLines:!0,error:function(){G.a.Notice.hide(),G.a.Notice.error(G.a.I18n.t("dataProcessingError"))},complete:function(t){var a=qi(t.data);if(a)e(a);else{var n=G.a.I18n.t("noValidRecords");n=(n=n.replace("[link]",'<a href="https://kb.mailpoet.com/article/126-importing-subscribers-with-csv-files" data-beacon-article="57ce079f903360649f6e56fc">')).replace("[/link]","</a>"),G.a.Notice.error(n)}G.a.Modal.loading(!1)}}}(t)))},Fi=function(e,t,a){return void 0===e?"step_data_manipulation":void 0===e.subscribersCount?"step_data_manipulation":e.subscribersCount<t?"step_data_manipulation":"mailchimp-method"===a?"step_data_manipulation":"step_input_validation"};function Bi(e){var t=e.history,a=e.setStepMethodSelectionData,i=e.subscribersLimitForValidation,o=Object(n.useState)(void 0),s=St()(o,2),l=s[0],c=s[1],u=Object(n.useState)(""),p=St()(u,2),d=p[0],m=p[1],h=Object(n.useState)(void 0),f=St()(h,2),g=f[0],_=f[1],b=function(e){a(e),t.push(Fi(e,i,l))},v=function(){Mi("paste-method"===l?d:g,function(e){G.a.trackEvent("Subscribers import started",{source:"file-method"===l?"file upload":"pasted data","MailPoet Free version":window.mailpoet_version}),b(e)})};return r.a.createElement("div",{className:"mailpoet_method_selection_step"},r.a.createElement(bi,{activeMethod:l,onMethodChange:c}),"paste-method"===l&&r.a.createElement(Ei,{onValueChange:m,onFinish:v,canFinish:!!fi()(d).call(d),data:d}),"file-method"===l&&r.a.createElement(Ii,{onValueChange:_,onFinish:v,canFinish:!!g,data:g}),"mailchimp-method"===l&&r.a.createElement(Ni,{onFinish:function(e){G.a.trackEvent("Subscribers import started",{source:"MailChimp","MailPoet Free version":window.mailpoet_version}),b(e)}}))}Bi.propTypes={history:u.a.shape({push:u.a.func.isRequired}).isRequired,setStepMethodSelectionData:u.a.func.isRequired,subscribersLimitForValidation:u.a.number.isRequired};var $i=Object(Re.a)(Bi);function Vi(e){var t=e.onSubmit,a=e.history,i=Object(n.useState)(void 0),o=St()(i,2),s=o[0],l=o[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,G.a.I18n.t("validationStepHeading")),r.a.createElement("label",{htmlFor:"existing-list"},r.a.createElement("input",{"data-automation-id":"mailpoet_import_validation_step_option1",type:"radio",id:"existing-list",checked:"existing-list"===s,onChange:function(){return l("existing-list")}}),G.a.I18n.t("validationStepRadio1")),r.a.createElement("label",{htmlFor:"address-book"},r.a.createElement("input",{"data-automation-id":"mailpoet_import_validation_step_option2",type:"radio",id:"address-book",checked:"address-book"===s,onChange:function(){return l("address-book")}}),G.a.I18n.t("validationStepRadio2")),r.a.createElement(yi,{canGoNext:void 0!==s,onPreviousAction:function(){return a.push("step_method_selection")},onNextAction:function(){return t(s)}}))}Vi.propTypes={history:u.a.shape({push:u.a.func.isRequired}).isRequired,onSubmit:u.a.func.isRequired};var Hi=Vi;var Wi=function(){return r.a.createElement("div",{className:"mailpoet_import_block","data-automation-id":"import_wrong_source_block"},r.a.createElement("p",null,G.a.I18n.t("validationStepBlock1")),r.a.createElement("p",null,G.a.I18n.t("validationStepBlock2")),r.a.createElement("a",{href:"https://kb.mailpoet.com/article/269-reconfirm-subscribers-to-your-list",target:"_blank",rel:"noopener noreferrer",className:"button button-primary"},G.a.I18n.t("validationStepBlockButton")))};var zi=function(){return r.a.createElement("div",{className:"mailpoet_import_block","data-automation-id":"import_old_list_block"},r.a.createElement("p",null,G.a.I18n.t("validationStepBlock1")),r.a.createElement("p",null,G.a.I18n.t("validationStepBlock3")),r.a.createElement("p",null,G.a.I18n.t("validationStepBlock4")),r.a.createElement("a",{href:"https://kb.mailpoet.com/article/269-reconfirm-subscribers-to-your-list",target:"_blank",rel:"noopener noreferrer",className:"button button-primary"},G.a.I18n.t("validationStepBlockButton")))};function Ui(e){var t=e.onSubmit,a=Object(n.useState)("over2years"),i=St()(a,2),o=i[0],s=i[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,G.a.I18n.t("validationStepLastSentHeading")),r.a.createElement("select",{value:o,onChange:function(e){s(e.target.value)},className:"mailpoet_last_sent","data-automation-id":"last_sent_to_list"},r.a.createElement("option",{value:"over2years"},G.a.I18n.t("validationStepLastSentOption1")),r.a.createElement("option",{value:"1to2years"},G.a.I18n.t("validationStepLastSentOption2")),r.a.createElement("option",{value:"less1year"},G.a.I18n.t("validationStepLastSentOption3")),r.a.createElement("option",{value:"less3months"},G.a.I18n.t("validationStepLastSentOption4"))),r.a.createElement("button",{type:"button",className:"button button-primary","data-automation-id":"last_sent_to_list_next",onClick:function(){t("over2years"===o||"1to2years"===o?"notRecently":"recently")}},G.a.I18n.t("validationStepLastSentNext")))}Ui.propTypes={onSubmit:u.a.func.isRequired};var Ki=Ui;function Gi(e){var t=e.stepMethodSelectionData,a=e.history,i=Object(n.useState)(void 0),o=St()(i,2),s=o[0],l=o[1],c=Object(n.useState)(void 0),u=St()(c,2),p=u[0],d=u[1];return Object(n.useEffect)(function(){void 0===t&&a.replace("step_method_selection")},[t,a]),r.a.createElement("div",{className:"mailpoet_import_validation_step","data-automation-id":"mailpoet_import_validation_step"},void 0===s&&r.a.createElement(Hi,{onSubmit:l,history:a}),"address-book"===s&&r.a.createElement(Wi,null),"existing-list"===s&&void 0===p&&r.a.createElement(Ki,{onSubmit:function(e){d(e),"recently"===e&&a.push("step_data_manipulation")}}),"existing-list"===s&&"notRecently"===p&&r.a.createElement(zi,null))}Gi.propTypes={history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,stepMethodSelectionData:u.a.shape({duplicate:u.a.arrayOf(u.a.string),header:u.a.arrayOf(u.a.string),invalid:u.a.arrayOf(u.a.string),role:u.a.arrayOf(u.a.string),subscribersCount:u.a.number,subscribers:u.a.arrayOf(u.a.arrayOf(u.a.string))})},Gi.defaultProps={stepMethodSelectionData:void 0};var Ji=Object(Re.a)(Gi),Yi=function(e){var t=e.translation,a=e.subscribers,n="";return a.length&&(n=Dt()(t.replace("%2$s",a.join(", ")),"%1$s",function(){return r.a.createElement("strong",{key:t},a.length.toLocaleString())}),n=r.a.createElement("p",null,n)),n};Yi.propTypes={translation:u.a.string.isRequired,subscribers:u.a.arrayOf(u.a.string).isRequired};var Qi=function(e){var t=e.stepMethodSelectionData,a=t.invalid,i=t.duplicate,o=t.role,s=Object(n.useState)(!1),l=St()(s,2),c=l[0],u=l[1],p=Y()("mailpoet_subscribers_data_parse_results_details",{mailpoet_hidden:!c}),d=r.a.createElement(Yi,{translation:G.a.I18n.t("importNoticeInvalid"),subscribers:a}),m=r.a.createElement(Yi,{translation:G.a.I18n.t("importNoticeDuplicate"),subscribers:i}),h="";if(o.length&&(h=Dt()(G.a.I18n.t("importNoticeRoleBased"),/(%1\$s|\[link\].*\[\/link\]|%2\$s)/,function(e){return"%1$s"===e?r.a.createElement("strong",{key:"role-length"},o.length.toLocaleString()):"%2$s"===e?o.join(", "):r.a.createElement("a",{href:"https://kb.mailpoet.com/article/270-role-based-email-addresses-are-not-allowed","data-beacon-article":"5d0a1da404286318cac46fe5",target:"_blank",rel:"noopener noreferrer",key:e},e.replace("[link]","").replace("[/link]",""))}),h=r.a.createElement("p",null,h)),a.length||i.length||o.length){var f=a.length+i.length+o.length;return r.a.createElement("div",{className:"error"},r.a.createElement("p",null,Dt()(G.a.I18n.t("importNoticeSkipped"),"%1$s",function(){return r.a.createElement("strong",{key:"lengths"},f.toLocaleString())})," ",r.a.createElement("a",{className:"mailpoet_subscribers_data_parse_results_details_show","data-automation-id":"show-more-details",onClick:function(){return u(!c)},role:"button",tabIndex:0,onKeyDown:function(e){var t,a;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(a=["Enter"," "]).call(a,e.key)&&(e.preventDefault(),u(!c))}},G.a.I18n.t("showMoreDetails"))),r.a.createElement("div",{className:p},r.a.createElement("hr",null),d,m,h))}return null};Qi.propTypes={stepMethodSelectionData:u.a.shape({duplicate:u.a.arrayOf(u.a.string),invalid:u.a.arrayOf(u.a.string),role:u.a.arrayOf(u.a.string)})},Qi.defaultProps={stepMethodSelectionData:{invalid:[],duplicate:[],role:[]}};var Xi=Qi,Zi=a(517),eo=a.n(Zi),to=a(518),ao=a.n(to),no=function(){K()("select.mailpoet_subscribers_column_data_match").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(e){return e.name},templateSelection:function(e){return e.name}}).on("select2:selecting",function(e){var t=e.currentTarget,a=e.params.args.data.id;"create"===a?(e.preventDefault(),K()(t).select2("close"),G.a.Modal.popup({title:G.a.I18n.t("addNewField"),template:K()("#form_template_field_form").html()}),K()("#form_field_new").parsley().on("form:submit",function(){var e=K()("#form_field_new").mailpoetSerializeObject();return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:e}).done(function(e){var a={id:e.data.id,name:e.data.name,type:e.data.type,params:e.data.params,custom:!0};2===window.mailpoetColumnsSelect2.length&&window.mailpoetColumnsSelect2.push({name:G.a.I18n.t("userColumns"),children:[]}),window.mailpoetColumnsSelect2[2].children.push(a),window.mailpoetColumns.push(a),K()("select.mailpoet_subscribers_column_data_match").each(function(){K()(t).html("").select2("destroy").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(e){return e.name},templateSelection:function(e){return e.name}})}),K()(t).data("column-id",a.id),K()(t).data("validation-rule",!1),G.a.Modal.close()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{positionAfter:"#field_name"})}),!1})):K()("select.mailpoet_subscribers_column_data_match").each(function(){var n,r=t,i=K()(r).val();i===a&&"ignore"!==i&&(confirm(P()(n="".concat(G.a.I18n.t("selectedValueAlreadyMatched")," ")).call(n,G.a.I18n.t("confirmCorrespondingColumn")))?K()(r).data("column-id","ignore"):(e.preventDefault(),K()(t).select2("close")))})}).on("select2:select",function(e){var t=e.currentTarget,a=e.params.data.id;K()(t).data("column-id",a)}),me()(K.a).call(K.a,K()(".mailpoet_subscribers_column_data_match"),function(e){var t=K()(e).data("column-id");K()(e).val(t).trigger("change")})},ro=function(e,t){var a,n,r,i,o,s=[],l=[];return C()(a=$e()(e[0])).call(a,function(a){if(n=e[0][a],r="ignore",n%1!=0&&window.mailpoet_email_regex.test(n))r="email";else if(t){var c,u;i=t[a],-1!==(o=He()(c=me()(u=window.mailpoetColumns).call(u,function(e){return e.name})).call(c,i))?r=window.mailpoetColumns[o].id:i&&(/first|first name|given name/i.test(i)?r="first_name":/last|last name/i.test(i)&&(r="last_name"))}r="ignore"!==r&&-1===He()(l).call(l,r)?r:"ignore",s[a]={column_id:r},l.push(r)}),s},io=10;function oo(e){var t=e.header,a=e.subscribers,n=ro(a,t);return r.a.createElement("tr",null,r.a.createElement("th",null,G.a.I18n.t("matchData")),me()(n).call(n,function(e,t){return r.a.createElement("th",{key:e.column_id+t},r.a.createElement("select",{className:"mailpoet_subscribers_column_data_match","data-column-id":e.column_id,"data-validation-rule":"false","data-column-index":t,id:"column_".concat(t)}))}))}function so(e){var t=e.header;return r.a.createElement("tr",{className:"mailpoet_header"},r.a.createElement("td",null),me()(t).call(t,function(e){return r.a.createElement("td",{key:e},e)}))}function lo(e){var t=e.subscriber,a=e.index;return r.a.createElement(r.a.Fragment,null,r.a.createElement("td",null,a),me()(t).call(t,function(e,t){var n,i;return r.a.createElement("td",{key:P()(n=P()(i="".concat(e,"-")).call(i,a,"-")).call(n,t)},e)}))}function co(e){var t,a,n=e.subscribers,i=e.subscribersCount,o=ao()(t=Array(n[0].length)).call(t,". . .");return r.a.createElement(r.a.Fragment,null,me()(a=eo()(n).call(n,0,io)).call(a,function(e,t){var a;return r.a.createElement("tr",{key:P()(a="".concat(e[0],"-")).call(a,t)},r.a.createElement(lo,{subscriber:e,index:t+1}))}),i>io+1?r.a.createElement("tr",{key:"filler"},r.a.createElement(lo,{subscriber:o,index:". . ."})):null,i>io?r.a.createElement("tr",{key:n[i-1][0]},r.a.createElement(lo,{subscriber:n[i-1],index:i})):null)}function uo(e){var t=e.subscribersCount,a=e.subscribers,i=e.header;return Object(n.useLayoutEffect)(function(){no()}),r.a.createElement("div",{className:"subscribers_data"},r.a.createElement("table",{className:"mailpoet_subscribers widefat fixed"},r.a.createElement("thead",null,r.a.createElement(oo,{header:i,subscribers:a})),r.a.createElement("tbody",null,i?r.a.createElement(so,{header:i}):null,r.a.createElement(co,{subscribers:a,subscribersCount:t}))))}oo.propTypes={subscribers:u.a.arrayOf(u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number]))).isRequired,header:u.a.arrayOf(u.a.string)},oo.defaultProps={header:[]},so.propTypes={header:u.a.arrayOf(u.a.string).isRequired},lo.propTypes={subscriber:u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number])).isRequired,index:u.a.node.isRequired},co.propTypes={subscribersCount:u.a.number.isRequired,subscribers:u.a.arrayOf(u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number]))).isRequired},uo.propTypes={subscribersCount:u.a.number,subscribers:u.a.arrayOf(u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number]))),header:u.a.arrayOf(u.a.string)},uo.defaultProps={subscribersCount:0,subscribers:[],header:[]};var po=uo;var mo=function(e){G.a.Modal.popup({title:G.a.I18n.t("addNewList"),template:K()("#new_segment_template").html()}),K()("#new_segment_name").keypress(function(e){13===e.which&&K()("#new_segment_process").click()}),K()("#new_segment_process").click(function(){var t,a,n=fi()(t=K()("#new_segment_name").val()).call(t),r=fi()(a=K()("#new_segment_description").val()).call(a);G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"addSegment",data:{name:n,description:r}}).done(function(t){e({id:t.data.id,name:t.data.name,subscriberCount:0}),G.a.Modal.close()}).fail(function(e){var t;e.errors.length>0&&(G.a.Notice.hide(),G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{positionAfter:"#new_segment_name"}))})}),K()("#new_segment_cancel").click(function(){G.a.Modal.close()})};function ho(e){var t=e.setSelectedSegments,a=Object(n.useContext)(gi).segments,i=Object(n.useState)(a),o=St()(i,2),s=o[0],l=o[1];Object(n.useLayoutEffect)(function(){var e,a,n;e=s,a=function(e){t(e)},(n=K()("select#mailpoet_segments_select")).data("select2")||(n.html(""),n.select2({data:e,width:"20em",templateResult:function(e){var t,a=e;return a.subscriberCount=qe()(a.subscriberCount,10),P()(t="".concat(a.name," (")).call(t,a.subscriberCount.toLocaleString(),")")},templateSelection:function(e){var t,a=e;return a.subscriberCount=qe()(a.subscriberCount,10),P()(t="".concat(a.name," (")).call(t,a.subscriberCount.toLocaleString(),")")}}).change(function(e){var t=K()('[data-id="notice_segmentSelection"]');e.currentTarget.value?K()('[data-id="notice_segmentSelection"]').remove():t.length||G.a.Notice.error(G.a.I18n.t("segmentSelectionRequired"),{static:!0,scroll:!0,id:"notice_segmentSelection",hideClose:!0});var r=Ne.a.pluck(n.select2("data"),"id");a(r)}))},[s,t]);var c=function(e){var a,n;(n=K()("select#mailpoet_segments_select")).data("select2")&&(n.select2("destroy"),wt()(n).call(n,"option").remove(),n.off("select2:unselecting").off("change").off("select2:opening")),t([]),l(P()(a=[]).call(a,pe()(s),[e]))};return r.a.createElement("div",{className:"mailpoet_import_select_segment"},r.a.createElement("label",{htmlFor:"mailpoet_segments_select"},r.a.createElement("div",{className:"mailpoet_label_description"},r.a.createElement("b",null,G.a.I18n.t("pickLists")),r.a.createElement("p",{className:"description"},G.a.I18n.t("pickListsDescription"))),r.a.createElement("select",{id:"mailpoet_segments_select","data-placeholder":G.a.I18n.t("select"),multiple:"multiple"},r.a.createElement("option",null))),r.a.createElement("a",{className:"mailpoet_create_segment",onClick:function(){return mo(c)},role:"button",tabIndex:0,onKeyDown:function(e){var t,a;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(a=["Enter"," "]).call(a,e.key)&&(e.preventDefault(),mo(c))}},G.a.I18n.t("createANewList")))}ho.propTypes={setSelectedSegments:u.a.func.isRequired};var fo=ho;function go(e){var t=e.updateExistingSubscribers,a=e.setUpdateExistingSubscribers;return r.a.createElement("div",{className:"mailpoet_update_existing_subscribers"},r.a.createElement("div",{className:"mailpoet_label_description"},G.a.I18n.t("updateExistingSubscribers")),r.a.createElement("label",{htmlFor:"update_existing_subscribers"},r.a.createElement("input",{id:"update_existing_subscribers",type:"radio",name:"update_existing_subscribers",checked:t,onChange:function(){return a(!0)}}),G.a.I18n.t("updateExistingSubscribersYes")),r.a.createElement("label",{htmlFor:"dont_update_existing_subscribers"},r.a.createElement("input",{id:"dont_update_existing_subscribers",type:"radio",name:"update_existing_subscribers",checked:!t,onChange:function(){return a(!1)}}),G.a.I18n.t("updateExistingSubscribersNo")))}go.propTypes={setUpdateExistingSubscribers:u.a.func.isRequired,updateExistingSubscribers:u.a.bool.isRequired};var _o=go,bo=a(331),vo=a.n(bo),yo=a(329),wo=a.n(yo),Eo=(a(658),function(e,t,a,n){var r={},i=new K.a.AsyncQueue,o=0,s=wo()()/1e3,l={created:0,updated:0,errors:[],segments:[]};G.a.Modal.loading(!0);var c,u,p=(c=e,u=2e3,vo()(c).call(c,function(e,t,a){return a%u==0&&e.push([]),e[e.length-1].push(t),e},[]));Ne.a.each(K()("select.mailpoet_subscribers_column_data_match"),function(e,t){var a=K()(e).data("column-id"),n=K()(e).data("validation-rule");"ignore"!==a&&(r[a]={index:t,validation_rule:n})}),Ne.a.each(p,function(){i.add(function(e){e.pause(),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processImport",data:rt()({columns:r,subscribers:p[o],timestamp:s,segments:t,updateSubscribers:a})}).done(function(t){var a=t.data.added_to_segment_with_welcome_notification;l.created+=t.data.created,l.updated+=t.data.updated,l.segments=t.data.segments,l.added_to_segment_with_welcome_notification=a,e.run()}).fail(function(e){var t;(G.a.Modal.loading(!1),e.errors.length>0)&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}),o+=1})}),i.run(),i.onComplete(function(){G.a.Modal.loading(!1),l.errors.length>0&&!l.updated&&!l.created?G.a.Notice.error(Ne.a.flatten(l.errors)):(l.segments=me()(Ne.a).call(Ne.a,ze()(Ne.a).call(Ne.a,l.segments,function(e){return Ce()(t).call(t,e.id)}),function(e){return e.name}),n(l))})});function ko(e){var t=e.history,a=e.stepMethodSelectionData,i=e.subscribersLimitForValidation,o=e.setStepDataManipulationData,s=Object(n.useState)([]),l=St()(s,2),c=l[0],u=l[1],p=Object(n.useState)(!0),d=St()(p,2),m=d[0],h=d[1];Object(n.useEffect)(function(){void 0===a&&t.replace("step_method_selection")},[a,t]);return void 0===a?null:r.a.createElement("div",{className:"mailpoet_data_manipulation_step","data-automation-id":"import_data_manipulation_step"},r.a.createElement(Xi,{stepMethodSelectionData:a}),r.a.createElement(po,{subscribersCount:a.subscribersCount,subscribers:a.subscribers,header:a.header}),r.a.createElement(fo,{setSelectedSegments:u}),r.a.createElement(_o,{setUpdateExistingSubscribers:h,updateExistingSubscribers:m}),r.a.createElement(yi,{canGoNext:c.length>0,onPreviousAction:function(){return t.push(function(e,t){return void 0===e?"step_method_selection":void 0===e.subscribersCount?"step_method_selection":e.subscribersCount<t?"step_method_selection":"step_input_validation"}(a,i))},onNextAction:function(){Eo(a.subscribers,c,m,function(e){o(e),t.push("step_results")})}}))}ko.propTypes={history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,stepMethodSelectionData:u.a.shape({duplicate:u.a.arrayOf(u.a.string),header:u.a.arrayOf(u.a.string),invalid:u.a.arrayOf(u.a.string),role:u.a.arrayOf(u.a.string),subscribersCount:u.a.number,subscribers:u.a.arrayOf(u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number])))}),subscribersLimitForValidation:u.a.number.isRequired,setStepDataManipulationData:u.a.func.isRequired},ko.defaultProps={stepMethodSelectionData:void 0};var Io=Object(Re.a)(ko);function So(e){var t=e.subscribersCount,a=e.segments,n=e.initialMessage;if(t){var i=Dt()(n,"%1$s",function(){return r.a.createElement("strong",{key:"%1$s"},t.toLocaleString())});return i=Dt()(i,"%2$s",function(){return'"'.concat(a.join('", "'),'"')}),r.a.createElement("p",null,i)}return null}function No(e){var t=e.createdSubscribers,a=e.updatedSubscribers;return t||a?null:r.a.createElement("p",null,G.a.I18n.t("importNoAction"))}function xo(e){return e.addedToSegmentWithWelcomeNotification?r.a.createElement("p",null,G.a.I18n.t("importNoWelcomeEmail")):null}function Co(e){var t=e.errors,a=e.createdSubscribers,i=e.updatedSubscribers,o=e.segments,s=e.addedToSegmentWithWelcomeNotification,l=e.history;return Object(n.useEffect)(function(){void 0===o&&0===t.length&&void 0===a&&void 0===i&&l.replace("step_method_selection")},[o,a,t.length,l,i]),t.length&&G.a.Notice.error(Ne.a.flatten(t)),r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"updated"},r.a.createElement(So,{subscribersCount:a,segments:o,initialMessage:G.a.I18n.t("subscribersCreated")}),r.a.createElement(So,{subscribersCount:i,segments:o,initialMessage:G.a.I18n.t("subscribersUpdated")}),r.a.createElement(No,{createdSubscribers:a,updatedSubscribers:i}),r.a.createElement(xo,{addedToSegmentWithWelcomeNotification:s})),r.a.createElement("button",{type:"button",className:"button-primary wysija",onClick:function(){return l.push("step_method_selection")}},G.a.I18n.t("importAgain")),"  ",r.a.createElement("button",{type:"button",className:"button-primary wysija",onClick:function(){window.location.href="admin.php?page=mailpoet-subscribers"}},G.a.I18n.t("viewSubscribers")))}So.propTypes={segments:u.a.arrayOf(u.a.string.isRequired),subscribersCount:u.a.number,initialMessage:u.a.string},So.defaultProps={segments:[],subscribersCount:0,initialMessage:""},No.propTypes={createdSubscribers:u.a.number,updatedSubscribers:u.a.number},No.defaultProps={createdSubscribers:0,updatedSubscribers:0},xo.propTypes={addedToSegmentWithWelcomeNotification:u.a.bool},xo.defaultProps={addedToSegmentWithWelcomeNotification:!1},Co.propTypes={history:u.a.shape({push:u.a.func.isRequired}).isRequired,errors:u.a.arrayOf(u.a.string.isRequired),segments:u.a.arrayOf(u.a.string.isRequired),createdSubscribers:u.a.number,updatedSubscribers:u.a.number,addedToSegmentWithWelcomeNotification:u.a.bool},Co.defaultProps={errors:[],segments:void 0,createdSubscribers:void 0,updatedSubscribers:void 0,addedToSegmentWithWelcomeNotification:void 0};var To=Object(Re.a)(Co),Po=document.getElementById("import_container");Po&&o.a.render(r.a.createElement(function(){var e=Object(n.useState)(void 0),t=St()(e,2),a=t[0],i=t[1],o=Object(n.useState)({}),s=St()(o,2),l=s[0],c=s[1];return r.a.createElement(E,null,r.a.createElement(mi,null,r.a.createElement(S,null,r.a.createElement(N,{path:"/step_method_selection",render:function(e){return r.a.createElement($i,Le()({},e,{setStepMethodSelectionData:i,subscribersLimitForValidation:200}))}}),r.a.createElement(N,{path:"/step_input_validation",render:function(e){return r.a.createElement(Ji,Le()({},e,{stepMethodSelectionData:a}))}}),r.a.createElement(N,{path:"/step_data_manipulation",render:function(e){return r.a.createElement(Io,Le()({},e,{stepMethodSelectionData:a,subscribersLimitForValidation:200,setStepDataManipulationData:c}))}}),r.a.createElement(N,{path:"/step_results",render:function(e){return r.a.createElement(To,Le()({},e,{errors:l.errors,createdSubscribers:l.created,updatedSubscribers:l.updated,segments:l.segments,addedToSegmentWithWelcomeNotification:l.added_to_segment_with_welcome_notification}))}}),r.a.createElement(N,{path:"*",render:function(){return r.a.createElement(Ee,{to:"/step_method_selection"})}}))))},null),Po);var Ro=a(23),Ao=a.n(Ro);K()(document).ready(function(){var e,t,a,n,r,i;function o(e){"on"===e?n.removeClass("button-disabled"):n.addClass("button-disabled")}K()("#mailpoet_subscribers_export").length&&window.exportData.segments&&(i=Ao.a.compile(K()("#mailpoet_subscribers_export_template").html()),K()("#mailpoet_subscribers_export > div.inside").html(i(window.exportData)),t=K()("#export_lists"),a=K()("#export_columns"),n=K()("a.mailpoet_export_process"),r=function(e,n){e.data("select2")&&e.html("").select2("destroy"),e.select2({data:n,width:"20em",templateResult:function(e){return e.subscriberCount>0?e.name+" ("+qe()(e.subscriberCount,10).toLocaleString()+")":e.name},templateSelection:function(e){return e.subscriberCount>0?e.name+" ("+qe()(e.subscriberCount,10).toLocaleString()+")":e.name}}).on("select2:selecting",function(t){var a,n=t.params.args.data.id,r=["select","deselect"];Ne.a.contains(r,n)&&(t.preventDefault(),"deselect"===n?K()(this).val("").trigger("change"):(a=[],Ne.a.each(wt()(e).call(e,"option"),function(e){Ne.a.contains(r,e.value)||a.push(e.value)}),K()(this).val(a).trigger("change")),K()(this).select2("close"))}).on("change",function(){window.exportData.segments&&t.select2("data").length&&a.select2("data").length||!window.exportData.segments&&a.select2("data").length?o("on"):o("off")})},C()(e=window.segments).call(e,function(e){t.append(K()("<option></option>").attr("value",e.id).text(e.name))}),r(t,window.segments),r(a,window.subscriberFieldsSelect2),a.val(["email","first_name","last_name","list_status","global_status"]).trigger("change"),n.click(function(){var e;K()(this).hasClass("button-disabled")||(G.a.Modal.loading(!0),e=K()(':radio[name="option_format"]:checked').val(),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processExport",data:rt()({export_format_option:e,segments:!!window.exportData.segments&&t.val(),subscriber_fields:a.val()})}).always(function(){G.a.Modal.loading(!1)}).done(function(t){var a=G.a.I18n.t("exportMessage").replace("%1$s","<strong>"+qe()(t.data.totalExported,10).toLocaleString()+"</strong>").replace("[link]",'<a href="'+t.data.exportFileURL+'" target="_blank" >').replace("[/link]","</a>");K()("#export_result_notice").html("<p>"+a+"</p>").show(),window.location.href=t.data.exportFileURL,G.a.trackEvent("Subscribers export completed",{"Total exported":t.data.totalExported,"File Format":e,"MailPoet Free version":window.mailpoet_version})}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}))}))});var jo=a(299),Oo=a.n(jo),Lo=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardLetsStartTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardSenderText")),r.a.createElement("form",{id:"mailpoet_sender_form",className:e.loading?"mailpoet_sender_form_loading":"",onSubmit:function(t){t.preventDefault(),K()("#mailpoet_sender_form").parsley().validate()&&e.submit_sender()}},r.a.createElement("label",{htmlFor:"senderName"},G.a.I18n.t("senderName"),":",r.a.createElement("input",{name:"senderName",type:"text",placeholder:"John Doe",value:e.sender?e.sender.name:"","data-parsley-required":!0,onChange:function(t){return e.update_sender({name:t.target.value})}})),r.a.createElement("label",{htmlFor:"senderAddress"},G.a.I18n.t("senderAddress"),":",r.a.createElement("input",{name:"senderAddress",type:"text",placeholder:"john@doe.com",value:e.sender?e.sender.address:"","data-parsley-required":!0,"data-parsley-type":"email",onChange:function(t){return e.update_sender({address:t.target.value})}})),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},r.a.createElement("input",{className:"button button-primary",type:"submit",value:G.a.I18n.t("next")})),r.a.createElement("a",{onClick:e.finish,href:"#finish",className:"sender_form_small"},G.a.I18n.t("noThanksSkip"))))};Lo.propTypes={finish:u.a.func.isRequired,loading:u.a.bool.isRequired,update_sender:u.a.func.isRequired,submit_sender:u.a.func.isRequired,sender:u.a.shape({name:u.a.string,address:u.a.string})},Lo.defaultProps={sender:null};var Do=Lo,qo=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardLetsStartTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardSenderMigratedUserText")),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},r.a.createElement("button",{type:"button",className:"button button-primary",onClick:e.next},G.a.I18n.t("next"))))};qo.propTypes={next:u.a.func.isRequired};var Mo=qo,Fo=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardEmailCourseTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardEmailCourseText")),r.a.createElement("iframe",{id:"mailpoet_form_iframe",width:"100%",scrolling:"no",frameBorder:"0",title:"Apply to course",src:"https://www.mailpoet.com?mailpoet_form_iframe=13",className:"mailpoet_form_iframe",marginWidth:"0",marginHeight:"0"}),r.a.createElement("button",{type:"button",className:"button button-primary",onClick:e.next},G.a.I18n.t("next")))};Fo.propTypes={next:u.a.func.isRequired};var Bo=Fo,$o=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardUsageTrackingStepTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardTrackingText")),r.a.createElement("h2",{className:"welcome_wizard_tracking_sub_title"},G.a.I18n.t("welcomeWizardUsageTrackingStepSubTitle")),r.a.createElement("ul",{className:"welcome_wizard_tracking_list"},r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList1")),r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList2")),r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList3")),r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList4")),r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList5"))),r.a.createElement("a",{href:" https://kb.mailpoet.com/article/130-sharing-your-data-with-us","data-beacon-article":"57ce0aaac6979108399a0454",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("welcomeWizardTrackingLink")),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n ".concat(e.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},r.a.createElement("button",{type:"button",className:"button",onClick:e.skip_action,disabled:e.loading},G.a.I18n.t("skip")),r.a.createElement("button",{type:"button",className:"button button-primary",onClick:e.allow_action,disabled:e.loading},e.allow_text)))};$o.propTypes={allow_action:u.a.func.isRequired,allow_text:u.a.string.isRequired,skip_action:u.a.func.isRequired,loading:u.a.bool.isRequired};var Vo=$o,Ho=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardWooCommerceStepTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardHelpingShopOwnersText")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardWooCommerceEmailsText")),r.a.createElement("img",{src:e.screenshot_src,className:"mailpoet_welcome_wizard_woo_screenshot",alt:"WooCommerce email"}),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n ".concat(e.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},r.a.createElement("button",{type:"button",className:"button button-primary",onClick:e.next,disabled:e.loading},G.a.I18n.t("gotIt"))))};Ho.propTypes={next:u.a.func.isRequired,screenshot_src:u.a.string.isRequired,loading:u.a.bool.isRequired};var Wo=Ho,zo=a(67),Uo=a.n(zo),Ko=function(e){var t,a;return e.step>e.steps_count?null:r.a.createElement("div",{className:"mailpoet_stepped_progress_bar"},me()(t=pe()(Uo()(a=Array(e.steps_count)).call(a))).call(t,function(t){var a;return r.a.createElement("div",{className:P()(a="\n mailpoet_stepped_progress_bar_step ".concat(t<e.step?"active":""," ")).call(a,t===e.step-1?"current":"","\n "),key:"step_".concat(t)})}))};Ko.propTypes={steps_count:u.a.number.isRequired,step:u.a.number.isRequired};var Go=Ko,Jo=function(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"mailpoet_welcome_wizard_header"},r.a.createElement("img",{src:window.mailpoet_logo_url,width:"200",height:"87",alt:"MailPoet logo"})),r.a.createElement("div",{className:"mailpoet_welcome_wizard_flex"},r.a.createElement("div",{className:"mailpoet_welcome_wizard_illustration"},r.a.createElement("img",{src:e.illustrationUrl,alt:""})),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step"},e.step<=e.stepsCount?r.a.createElement(Go,{steps_count:e.stepsCount,step:e.step}):null,e.children)))};Jo.propTypes={illustrationUrl:u.a.string.isRequired,step:u.a.number.isRequired,stepsCount:u.a.number.isRequired,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]).isRequired};var Yo=Jo,Qo=function(e){var t,a=e.name,n=e.address,r=n.split("@").pop().toLowerCase();return He()(t=window.mailpoet_free_domains).call(t,r)>-1?function(e){var t=e.name,a=e.address,n=window.location.hostname.replace("www.",""),r="wordpress@".concat(n);return{sender:{name:t,address:r},reply_to:{name:t,address:a},"signup_confirmation.from.address":r,"signup_confirmation.from.name":t,"signup_confirmation.reply_to.address":a,"signup_confirmation.reply_to.name":t}}({name:a,address:n}):function(e){var t=e.name,a=e.address;return{sender:{name:t,address:a},reply_to:{name:t,address:a},"signup_confirmation.from.address":a,"signup_confirmation.from.name":t,"signup_confirmation.reply_to.address":a,"signup_confirmation.reply_to.name":t}}({name:a,address:n})},Xo=function(e){var t=window.is_woocommerce_active?4:3,a=!window.is_mp2_migration_complete,i=qe()(e.match.params.step,10),o=Object(n.useState)(!1),s=St()(o,2),l=s[0],c=s[1],u=Object(n.useState)(window.sender_data),p=St()(u,2),d=p[0],m=p[1];function h(){c(!0),window.location=window.finish_wizard_url}function f(){4===t?e.history.push("/steps/4"):h()}function g(e){return c(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:e}).then(function(){return c(!1)}).fail(function(e){var t;(c(!1),e.errors.length>0)&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}return Object(n.useEffect)(function(){(i>t||i<1)&&e.history.push("/steps/1")},[i,t,e.history]),r.a.createElement("div",{className:"mailpoet_welcome_wizard_steps"},1===i&&a?r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_sender_illustration_url},r.a.createElement(Do,{update_sender:function(e){m(Oo()({},d,e))},submit_sender:function(){g(Qo(d)).then(function(){return e.history.push("/steps/2")})},finish:function(){c(!0),g(Qo({address:window.admin_email,name:""})).then(h)},loading:l,sender:d})):null,1!==i||a?null:r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_sender_illustration_url},r.a.createElement(Mo,{next:function(){return e.history.push("/steps/2")}})),2===i?r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_email_course_illustration_url},r.a.createElement(Bo,{next:function(){return e.history.push("/steps/3")}})):null,3===i?r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_tracking_illustration_url},r.a.createElement(Vo,{skip_action:f,allow_action:function(){g({analytics:{enabled:!0}}).then(function(){return f()})},allow_text:4===t?G.a.I18n.t("allowAndContinue"):G.a.I18n.t("allowAndFinish"),loading:l})):null,4===i?r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_woocommerce_illustration_url},r.a.createElement(Wo,{next:h,screenshot_src:window.wizard_woocommerce_box_url,loading:l})):null)};Xo.propTypes={match:u.a.shape({params:u.a.shape({step:u.a.string}).isRequired}).isRequired,history:u.a.shape({push:u.a.func.isRequired}).isRequired};var Zo=Xo,es=a(109),ts=a.n(es),as=function(e){function t(e){var a,n,r;return A()(this,t),(r=D()(this,M()(t).call(this,e))).state={importType:null},r.handleOptionChange=Ke()(a=r.handleOptionChange).call(a,B()(r)),r.submit=Ke()(n=r.submit).call(n,B()(r)),r}return V()(t,e),O()(t,[{key:"handleOptionChange",value:function(e){this.setState({importType:e.target.value})}},{key:"submit",value:function(e){return e.preventDefault(),!!this.state.importType&&(this.props.submitForm(this.state.importType),!1)}},{key:"render",value:function(){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},r.a.createElement("h1",null,G.a.I18n.t("wooCommerceListImportTitle")),r.a.createElement("p",null,G.a.I18n.t("wooCommerceListImportInfo1")),r.a.createElement("p",null,G.a.I18n.t("wooCommerceListImportInfo2")),r.a.createElement("p",null,r.a.createElement("b",null,G.a.I18n.t("wooCommerceListImportInfo3"))),r.a.createElement("form",{onSubmit:this.submit,className:"mailpoet_wizard_woocommerce_list"},r.a.createElement("label",{htmlFor:"import_type_subscribed"},r.a.createElement("input",{id:"import_type_subscribed",type:"radio",name:"import_type",checked:"subscribed"===this.state.importType,onChange:this.handleOptionChange,value:"subscribed","data-automation-id":"import_as_subscribed"}),ts()(G.a.I18n.t("wooCommerceListImportCheckboxSubscribed"))),r.a.createElement("label",{htmlFor:"import_type_unsubscribed"},r.a.createElement("input",{id:"import_type_unsubscribed",type:"radio",name:"import_type",checked:"unsubscribed"===this.state.importType,onChange:this.handleOptionChange,value:"unsubscribed","data-automation-id":"import_as_unsubscribed"}),ts()(G.a.I18n.t("wooCommerceListImportCheckboxUnsubscribed"))),r.a.createElement("p",null,G.a.I18n.t("wooCommerceListImportInfo4")),r.a.createElement("input",{className:"button button-primary",type:"submit",value:G.a.I18n.t("wooCommerceListImportSubmit"),disabled:!this.state.importType||this.props.loading,"data-automation-id":"submit_woo_commerce_list_import"})))}}]),t}(r.a.Component);as.propTypes={submitForm:u.a.func.isRequired,loading:u.a.bool.isRequired};var ns=as,rs=function(e){function t(e){var a,n,r,i,o;return A()(this,t),(o=D()(this,M()(t).call(this,e))).state={loading:!1},o.updateSettings=Ke()(a=o.updateSettings).call(a,B()(o)),o.scheduleImport=Ke()(n=o.scheduleImport).call(n,B()(o)),o.finishWizard=Ke()(r=o.finishWizard).call(r,B()(o)),o.submit=Ke()(i=o.submit).call(i,B()(o)),o}return V()(t,e),O()(t,[{key:"finishWizard",value:function(){this.setState({loading:!0}),window.location=window.finish_wizard_url}},{key:"updateSettings",value:function(e){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:e}).fail(this.handleApiError)}},{key:"scheduleImport",value:function(){var e=this;return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"setupWooCommerceInitialImport"}).then(function(){return e.setState({loading:!1})}).fail(this.handleApiError)}},{key:"handleApiError",value:function(e){this.setState({loading:!1}),G.a.Notice.showApiErrorNotice(e,{scroll:!0})}},{key:"submit",value:function(e){this.setState({loading:!0});var t={woocommerce_import_screen_displayed:1,"mailpoet_subscribe_old_woocommerce_customers.enabled":"subscribed"===e?1:0};this.updateSettings(t).then(this.scheduleImport).then(this.finishWizard)}},{key:"render",value:function(){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},r.a.createElement("div",{className:"mailpoet_welcome_wizard_header"},r.a.createElement("img",{src:window.mailpoet_logo_url,width:"200",height:"87",alt:"MailPoet logo"})),r.a.createElement(ns,{loading:this.state.loading,submitForm:this.submit}))}}]),t}(r.a.Component);rs.propTypes={};var is=rs;function os(e){var t=e.submitForm,a=e.loading,i=Object(n.useState)("true"),o=St()(i,2),s=o[0],l=o[1];return r.a.createElement("div",{className:" mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_step_revenue_tracking mailpoet_welcome_wizard_centered_column "},r.a.createElement("p",null,G.a.I18n.t("revenueTrackingInfo1")),r.a.createElement("p",null,G.a.I18n.t("revenueTrackingInfo2")),r.a.createElement("form",{onSubmit:function(e){return e.preventDefault(),void 0!==s&&(t("true"===s),!1)},className:"mailpoet_wizard_woocommerce_list"},r.a.createElement("label",{htmlFor:"tracking_allowed"},r.a.createElement("input",{id:"tracking_allowed",type:"radio",name:"import_type",checked:"true"===s,onChange:function(e){return l(e.target.value)},value:"true"}),G.a.I18n.t("revenueTrackingAllow")),r.a.createElement("label",{htmlFor:"tracking_not_allowed"},r.a.createElement("input",{id:"tracking_not_allowed",type:"radio",name:"import_type",checked:"false"===s,onChange:function(e){return l(e.target.value)},value:"false"}),G.a.I18n.t("revenueTrackingDontAllow")),r.a.createElement("input",{className:"button button-primary",type:"submit",value:G.a.I18n.t("revenueTrackingSubmit"),disabled:a})))}os.propTypes={submitForm:u.a.func.isRequired,loading:u.a.bool.isRequired};var ss=os;var ls=function(){var e=Object(n.useState)(!1),t=St()(e,2),a=t[0],i=t[1],o=function(e){i(!1),G.a.Notice.showApiErrorNotice(e,{scroll:!0})},s=function(){window.location=window.finish_wizard_url};return r.a.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},r.a.createElement("div",{className:"mailpoet_welcome_wizard_header"},r.a.createElement("img",{src:window.mailpoet_logo_url,width:"200",height:"87",alt:"MailPoet logo"})),r.a.createElement(ss,{loading:a,submitForm:function(e){var t;i(!0),(t={"woocommerce.accept_cookie_revenue_tracking.enabled":e?1:0,"woocommerce.accept_cookie_revenue_tracking.set":1},G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:t}).fail(o)).then(s)}}))},cs=document.getElementById("mailpoet_wizard_container");if(cs){var us,ps,ds="/steps/1";Ce()(us=window.location.search).call(us,"revenue-tracking-permission")?ds="/revenue-tracking-permission":Ce()(ps=window.location.search).call(ps,"woocommerce-list-import")&&(ds="/import"),o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{path:"/steps/:step",component:Zo}),r.a.createElement(N,{path:"/import",component:is}),r.a.createElement(N,{path:"/revenue-tracking-permission",component:ls}),r.a.createElement(N,{render:function(){return r.a.createElement(Ee,{to:ds})}}))),cs)}var ms=a(494),hs=a.n(ms),fs=document.getElementById("experimental_features_container");fs&&o.a.render(r.a.createElement(function(){var e,t=Object(n.useState)(null),a=St()(t,2),i=a[0],o=a[1];function s(e){var t=e.target.name,a=e.target.checked;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"featureFlags",action:"set",data:W()({},t,a?1:0)}).done(function(){var e,n=i[t];n.value=a,o(Oo()({},i,W()({},t,n))),G.a.Notice.success(P()(e="Feature '".concat(t,"' was ")).call(e,a?"enabled":"disabled","."))}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}return Object(n.useEffect)(function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"featureFlags",action:"getAll"}).done(function(e){var t,a=vo()(t=e.data).call(t,function(e,t){return Oo()({},e,W()({},t.name,t))},{});o(a)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})},[]),null===i?r.a.createElement("p",null,"Loading experimental features..."):0===hs()(i).length?r.a.createElement("p",null,"There are no experimental features at the moment."):me()(e=hs()(i)).call(e,function(e){var t="experimental-feature-".concat(e.name);return r.a.createElement("div",{key:e.name},r.a.createElement("label",{htmlFor:t},r.a.createElement("input",{id:t,type:"checkbox",name:e.name,defaultChecked:e.value,onChange:s})," ",e.name))})},{}),fs)}},[[705,0,1]]]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/dist/js/admin.fe09345e.chunk.js ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (window.mailpoetJsonp=window.mailpoetJsonp||[]).push([[2,3],{100:function(e,t,a){var n=a(602),r=a(603),i=a(611);e.exports=function(e){return n(e)||r(e)||i()}},23:function(e,t,a){
2
+ /**!
3
+
4
+ @license
5
+ handlebars v4.1.2
6
+
7
+ Copyright (C) 2011-2017 by Yehuda Katz
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in
17
+ all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
+ THE SOFTWARE.
26
+
27
+ */
28
+ var n;n=function(){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}return a.m=e,a.c=t,a.p="",a(0)}([function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=n(a(2)),i=n(a(35)),o=a(36),s=a(41),l=n(a(42)),c=n(a(39)),u=n(a(34)),p=r.default.create;function d(){var e=p();return e.compile=function(t,a){return s.compile(t,a,e)},e.precompile=function(t,a){return s.precompile(t,a,e)},e.AST=i.default,e.Compiler=s.Compiler,e.JavaScriptCompiler=l.default,e.Parser=o.parser,e.parse=o.parse,e}var m=d();m.create=d,u.default(m),m.Visitor=c.default,m.default=m,t.default=m,e.exports=t.default},function(e,t){"use strict";t.default=function(e){return e&&e.__esModule?e:{default:e}},t.__esModule=!0},function(e,t,a){"use strict";var n=a(3).default,r=a(1).default;t.__esModule=!0;var i=n(a(4)),o=r(a(21)),s=r(a(6)),l=n(a(5)),c=n(a(22)),u=r(a(34));function p(){var e=new i.HandlebarsEnvironment;return l.extend(e,i),e.SafeString=o.default,e.Exception=s.default,e.Utils=l,e.escapeExpression=l.escapeExpression,e.VM=c,e.template=function(t){return c.template(t,e)},e}var d=p();d.create=p,u.default(d),d.default=d,t.default=d,e.exports=t.default},function(e,t){"use strict";t.default=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t},t.__esModule=!0},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.HandlebarsEnvironment=c;var r=a(5),i=n(a(6)),o=a(10),s=a(18),l=n(a(20));t.VERSION="4.1.2";t.COMPILER_REVISION=7;t.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};function c(e,t,a){this.helpers=e||{},this.partials=t||{},this.decorators=a||{},o.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}c.prototype={constructor:c,logger:l.default,log:l.default.log,registerHelper:function(e,t){if("[object Object]"===r.toString.call(e)){if(t)throw new i.default("Arg not supported with multiple helpers");r.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if("[object Object]"===r.toString.call(e))r.extend(this.partials,e);else{if(void 0===t)throw new i.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if("[object Object]"===r.toString.call(e)){if(t)throw new i.default("Arg not supported with multiple decorators");r.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]}};var u=l.default.log;t.log=u,t.createFrame=r.createFrame,t.logger=l.default},function(e,t){"use strict";t.__esModule=!0,t.extend=o,t.indexOf=function(e,t){for(var a=0,n=e.length;a<n;a++)if(e[a]===t)return a;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}if(!r.test(e))return e;return e.replace(n,i)},t.isEmpty=function(e){return!e&&0!==e||!(!c(e)||0!==e.length)},t.createFrame=function(e){var t=o({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},n=/[&<>"'`=]/g,r=/[&<>"'`=]/;function i(e){return a[e]}function o(e){for(var t=1;t<arguments.length;t++)for(var a in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],a)&&(e[a]=arguments[t][a]);return e}var s=Object.prototype.toString;t.toString=s;var l=function(e){return"function"==typeof e};l(/x/)&&(t.isFunction=l=function(e){return"function"==typeof e&&"[object Function]"===s.call(e)}),t.isFunction=l;var c=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===s.call(e)};t.isArray=c},function(e,t,a){"use strict";var n=a(7).default;t.__esModule=!0;var r=["description","fileName","lineNumber","message","name","number","stack"];function i(e,t){var a=t&&t.loc,o=void 0,s=void 0;a&&(e+=" - "+(o=a.start.line)+":"+(s=a.start.column));for(var l=Error.prototype.constructor.call(this,e),c=0;c<r.length;c++)this[r[c]]=l[r[c]];Error.captureStackTrace&&Error.captureStackTrace(this,i);try{a&&(this.lineNumber=o,n?Object.defineProperty(this,"column",{value:s,enumerable:!0}):this.column=s)}catch(e){}}i.prototype=new Error,t.default=i,e.exports=t.default},function(e,t,a){e.exports={default:a(8),__esModule:!0}},function(e,t,a){var n=a(9);e.exports=function(e,t,a){return n.setDesc(e,t,a)}},function(e,t){var a=Object;e.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.registerDefaultHelpers=function(e){r.default(e),i.default(e),o.default(e),s.default(e),l.default(e),c.default(e),u.default(e)};var r=n(a(11)),i=n(a(12)),o=n(a(13)),s=n(a(14)),l=n(a(15)),c=n(a(16)),u=n(a(17))},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5);t.default=function(e){e.registerHelper("blockHelperMissing",function(t,a){var r=a.inverse,i=a.fn;if(!0===t)return i(this);if(!1===t||null==t)return r(this);if(n.isArray(t))return t.length>0?(a.ids&&(a.ids=[a.name]),e.helpers.each(t,a)):r(this);if(a.data&&a.ids){var o=n.createFrame(a.data);o.contextPath=n.appendContextPath(a.data.contextPath,a.name),a={data:o}}return i(t,a)})},e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=a(5),i=n(a(6));t.default=function(e){e.registerHelper("each",function(e,t){if(!t)throw new i.default("Must pass iterator to #each");var a=t.fn,n=t.inverse,o=0,s="",l=void 0,c=void 0;function u(t,n,i){l&&(l.key=t,l.index=n,l.first=0===n,l.last=!!i,c&&(l.contextPath=c+t)),s+=a(e[t],{data:l,blockParams:r.blockParams([e[t],t],[c+t,null])})}if(t.data&&t.ids&&(c=r.appendContextPath(t.data.contextPath,t.ids[0])+"."),r.isFunction(e)&&(e=e.call(this)),t.data&&(l=r.createFrame(t.data)),e&&"object"==typeof e)if(r.isArray(e))for(var p=e.length;o<p;o++)o in e&&u(o,o,o===e.length-1);else{var d=void 0;for(var m in e)e.hasOwnProperty(m)&&(void 0!==d&&u(d,o-1),d=m,o++);void 0!==d&&u(d,o-1,!0)}return 0===o&&(s=n(this)),s})},e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=n(a(6));t.default=function(e){e.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},e.exports=t.default},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5);t.default=function(e){e.registerHelper("if",function(e,t){return n.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||n.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,a){return e.helpers.if.call(this,t,{fn:a.inverse,inverse:a.fn,hash:a.hash})})},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],a=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var r=1;null!=a.hash.level?r=a.hash.level:a.data&&null!=a.data.level&&(r=a.data.level),t[0]=r,e.log.apply(e,t)})},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",function(e,t){return e?"constructor"!==t||e.propertyIsEnumerable(t)?e[t]:void 0:e})},e.exports=t.default},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5);t.default=function(e){e.registerHelper("with",function(e,t){n.isFunction(e)&&(e=e.call(this));var a=t.fn;if(n.isEmpty(e))return t.inverse(this);var r=t.data;return t.data&&t.ids&&((r=n.createFrame(t.data)).contextPath=n.appendContextPath(t.data.contextPath,t.ids[0])),a(e,{data:r,blockParams:n.blockParams([e],[r&&r.contextPath])})})},e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.registerDefaultDecorators=function(e){r.default(e)};var r=n(a(19))},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5);t.default=function(e){e.registerDecorator("inline",function(e,t,a,r){var i=e;return t.partials||(t.partials={},i=function(r,i){var o=a.partials;a.partials=n.extend({},o,t.partials);var s=e(r,i);return a.partials=o,s}),t.partials[r.args[0]]=r.fn,i})},e.exports=t.default},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if("string"==typeof e){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),"undefined"!=typeof console&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t="log");for(var a=arguments.length,n=Array(a>1?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];console[t].apply(console,n)}}};t.default=r,e.exports=t.default},function(e,t){"use strict";function a(e){this.string=e}t.__esModule=!0,a.prototype.toString=a.prototype.toHTML=function(){return""+this.string},t.default=a,e.exports=t.default},function(e,t,a){"use strict";var n=a(23).default,r=a(3).default,i=a(1).default;t.__esModule=!0,t.checkRevision=function(e){var t=e&&e[0]||1,a=l.COMPILER_REVISION;if(t!==a){if(t<a){var n=l.REVISION_CHANGES[a],r=l.REVISION_CHANGES[t];throw new s.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+r+").")}throw new s.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}},t.template=function(e,t){if(!t)throw new s.default("No environment passed to template");if(!e||!e.main)throw new s.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var a={strict:function(e,t){if(!(t in e))throw new s.default('"'+t+'" not defined in '+e);return e[t]},lookup:function(e,t){for(var a=e.length,n=0;n<a;n++)if(e[n]&&null!=e[n][t])return e[n][t]},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:o.escapeExpression,invokePartial:function(a,n,r){r.hash&&(n=o.extend({},n,r.hash),r.ids&&(r.ids[0]=!0));a=t.VM.resolvePartial.call(this,a,n,r);var i=t.VM.invokePartial.call(this,a,n,r);null==i&&t.compile&&(r.partials[r.name]=t.compile(a,e.compilerOptions,t),i=r.partials[r.name](n,r));if(null!=i){if(r.indent){for(var l=i.split("\n"),c=0,u=l.length;c<u&&(l[c]||c+1!==u);c++)l[c]=r.indent+l[c];i=l.join("\n")}return i}throw new s.default("The partial "+r.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var a=e[t];return a.decorator=e[t+"_d"],a},programs:[],program:function(e,t,a,n,r){var i=this.programs[e],o=this.fn(e);return t||r||n||a?i=c(this,e,o,t,a,n,r):i||(i=this.programs[e]=c(this,e,o)),i},data:function(e,t){for(;e&&t--;)e=e._parent;return e},merge:function(e,t){var a=e||t;return e&&t&&e!==t&&(a=o.extend({},t,e)),a},nullContext:n({}),noop:t.VM.noop,compilerInfo:e.compiler};function r(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=n.data;r._setup(n),!n.partial&&e.useData&&(i=function(e,t){t&&"root"in t||((t=t?l.createFrame(t):{}).root=e);return t}(t,i));var o=void 0,s=e.useBlockParams?[]:void 0;function c(t){return""+e.main(a,t,a.helpers,a.partials,i,s,o)}return e.useDepths&&(o=n.depths?t!=n.depths[0]?[t].concat(n.depths):n.depths:[t]),(c=p(e.main,c,a,n.depths||[],i,s))(t,n)}return r.isTop=!0,r._setup=function(n){n.partial?(a.helpers=n.helpers,a.partials=n.partials,a.decorators=n.decorators):(a.helpers=a.merge(n.helpers,t.helpers),e.usePartial&&(a.partials=a.merge(n.partials,t.partials)),(e.usePartial||e.useDecorators)&&(a.decorators=a.merge(n.decorators,t.decorators)))},r._child=function(t,n,r,i){if(e.useBlockParams&&!r)throw new s.default("must pass block params");if(e.useDepths&&!i)throw new s.default("must pass parent depths");return c(a,t,e[t],n,0,r,i)},r},t.wrapProgram=c,t.resolvePartial=function(e,t,a){e?e.call||a.name||(a.name=e,e=a.partials[e]):e="@partial-block"===a.name?a.data["partial-block"]:a.partials[a.name];return e},t.invokePartial=function(e,t,a){var n=a.data&&a.data["partial-block"];a.partial=!0,a.ids&&(a.data.contextPath=a.ids[0]||a.data.contextPath);var r=void 0;a.fn&&a.fn!==u&&function(){a.data=l.createFrame(a.data);var e=a.fn;r=a.data["partial-block"]=function(t){var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return a.data=l.createFrame(a.data),a.data["partial-block"]=n,e(t,a)},e.partials&&(a.partials=o.extend({},a.partials,e.partials))}();void 0===e&&r&&(e=r);if(void 0===e)throw new s.default("The partial "+a.name+" could not be found");if(e instanceof Function)return e(t,a)},t.noop=u;var o=r(a(5)),s=i(a(6)),l=a(4);function c(e,t,a,n,r,i,o){function s(t){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=o;return!o||t==o[0]||t===e.nullContext&&null===o[0]||(s=[t].concat(o)),a(e,t,e.helpers,e.partials,r.data||n,i&&[r.blockParams].concat(i),s)}return(s=p(a,s,e,o,n,i)).program=t,s.depth=o?o.length:0,s.blockParams=r||0,s}function u(){return""}function p(e,t,a,n,r,i){if(e.decorator){var s={};t=e.decorator(t,s,a,n&&n[0],r,i,n),o.extend(t,s)}return t}},function(e,t,a){e.exports={default:a(24),__esModule:!0}},function(e,t,a){a(25),e.exports=a(30).Object.seal},function(e,t,a){var n=a(26);a(27)("seal",function(e){return function(t){return e&&n(t)?e(t):t}})},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,a){var n=a(28),r=a(30),i=a(33);e.exports=function(e,t){var a=(r.Object||{})[e]||Object[e],o={};o[e]=t(a),n(n.S+n.F*i(function(){a(1)}),"Object",o)}},function(e,t,a){var n=a(29),r=a(30),i=a(31),o=function(e,t,a){var s,l,c,u=e&o.F,p=e&o.G,d=e&o.S,m=e&o.P,h=e&o.B,f=e&o.W,g=p?r:r[t]||(r[t]={}),_=p?n:d?n[t]:(n[t]||{}).prototype;for(s in p&&(a=t),a)(l=!u&&_&&s in _)&&s in g||(c=l?_[s]:a[s],g[s]=p&&"function"!=typeof _[s]?a[s]:h&&l?i(c,n):f&&_[s]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t.prototype=e.prototype,t}(c):m&&"function"==typeof c?i(Function.call,c):c,m&&((g.prototype||(g.prototype={}))[s]=c))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,e.exports=o},function(e,t){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},function(e,t){var a=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=a)},function(e,t,a){var n=a(32);e.exports=function(e,t,a){if(n(e),void 0===t)return e;switch(a){case 1:return function(a){return e.call(t,a)};case 2:return function(a,n){return e.call(t,a,n)};case 3:return function(a,n,r){return e.call(t,a,n,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){(function(a){"use strict";t.__esModule=!0,t.default=function(e){var t=void 0!==a?a:window,n=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=n),e}},e.exports=t.default}).call(t,function(){return this}())},function(e,t){"use strict";t.__esModule=!0;var a={helpers:{helperExpression:function(e){return"SubExpression"===e.type||("MustacheStatement"===e.type||"BlockStatement"===e.type)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return 1===e.parts.length&&!a.helpers.scopedId(e)&&!e.depth}}};t.default=a,e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default,r=a(3).default;t.__esModule=!0,t.parse=function(e,t){if("Program"===e.type)return e;return i.default.yy=c,c.locInfo=function(e){return new c.SourceLocation(t&&t.srcName,e)},new o.default(t).accept(i.default.parse(e))};var i=n(a(37)),o=n(a(38)),s=r(a(40)),l=a(5);t.parser=i.default;var c={};l.extend(c,s)},function(e,t){"use strict";t.__esModule=!0;var a=function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(e,t,a,n,r,i,o){var s=i.length-1;switch(r){case 1:return i[s-1];case 2:this.$=n.prepareProgram(i[s]);break;case 3:case 4:case 5:case 6:case 7:case 8:this.$=i[s];break;case 9:this.$={type:"CommentStatement",value:n.stripComment(i[s]),strip:n.stripFlags(i[s],i[s]),loc:n.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:i[s],value:i[s],loc:n.locInfo(this._$)};break;case 11:this.$=n.prepareRawBlock(i[s-2],i[s-1],i[s],this._$);break;case 12:this.$={path:i[s-3],params:i[s-2],hash:i[s-1]};break;case 13:this.$=n.prepareBlock(i[s-3],i[s-2],i[s-1],i[s],!1,this._$);break;case 14:this.$=n.prepareBlock(i[s-3],i[s-2],i[s-1],i[s],!0,this._$);break;case 15:this.$={open:i[s-5],path:i[s-4],params:i[s-3],hash:i[s-2],blockParams:i[s-1],strip:n.stripFlags(i[s-5],i[s])};break;case 16:case 17:this.$={path:i[s-4],params:i[s-3],hash:i[s-2],blockParams:i[s-1],strip:n.stripFlags(i[s-5],i[s])};break;case 18:this.$={strip:n.stripFlags(i[s-1],i[s-1]),program:i[s]};break;case 19:var l=n.prepareBlock(i[s-2],i[s-1],i[s],i[s],!1,this._$),c=n.prepareProgram([l],i[s-1].loc);c.chained=!0,this.$={strip:i[s-2].strip,program:c,chain:!0};break;case 20:this.$=i[s];break;case 21:this.$={path:i[s-1],strip:n.stripFlags(i[s-2],i[s])};break;case 22:case 23:this.$=n.prepareMustache(i[s-3],i[s-2],i[s-1],i[s-4],n.stripFlags(i[s-4],i[s]),this._$);break;case 24:this.$={type:"PartialStatement",name:i[s-3],params:i[s-2],hash:i[s-1],indent:"",strip:n.stripFlags(i[s-4],i[s]),loc:n.locInfo(this._$)};break;case 25:this.$=n.preparePartialBlock(i[s-2],i[s-1],i[s],this._$);break;case 26:this.$={path:i[s-3],params:i[s-2],hash:i[s-1],strip:n.stripFlags(i[s-4],i[s])};break;case 27:case 28:this.$=i[s];break;case 29:this.$={type:"SubExpression",path:i[s-3],params:i[s-2],hash:i[s-1],loc:n.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:i[s],loc:n.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:n.id(i[s-2]),value:i[s],loc:n.locInfo(this._$)};break;case 32:this.$=n.id(i[s-1]);break;case 33:case 34:this.$=i[s];break;case 35:this.$={type:"StringLiteral",value:i[s],original:i[s],loc:n.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(i[s]),original:Number(i[s]),loc:n.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===i[s],original:"true"===i[s],loc:n.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:n.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:n.locInfo(this._$)};break;case 40:case 41:this.$=i[s];break;case 42:this.$=n.preparePath(!0,i[s],this._$);break;case 43:this.$=n.preparePath(!1,i[s],this._$);break;case 44:i[s-2].push({part:n.id(i[s]),original:i[s],separator:i[s-1]}),this.$=i[s-2];break;case 45:this.$=[{part:n.id(i[s]),original:i[s]}];break;case 46:this.$=[];break;case 47:i[s-1].push(i[s]);break;case 48:this.$=[i[s]];break;case 49:i[s-1].push(i[s]);break;case 50:this.$=[];break;case 51:i[s-1].push(i[s]);break;case 58:this.$=[];break;case 59:i[s-1].push(i[s]);break;case 64:this.$=[];break;case 65:i[s-1].push(i[s]);break;case 70:this.$=[];break;case 71:i[s-1].push(i[s]);break;case 78:this.$=[];break;case 79:i[s-1].push(i[s]);break;case 82:this.$=[];break;case 83:i[s-1].push(i[s]);break;case 86:this.$=[];break;case 87:i[s-1].push(i[s]);break;case 90:this.$=[];break;case 91:i[s-1].push(i[s]);break;case 94:this.$=[];break;case 95:i[s-1].push(i[s]);break;case 98:this.$=[i[s]];break;case 99:i[s-1].push(i[s]);break;case 100:this.$=[i[s]];break;case 101:i[s-1].push(i[s])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,a=[0],n=[null],r=[],i=this.table,o="",s=0,l=0,c=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var u=this.lexer.yylloc;r.push(u);var p=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,m,h,f,g,_,b,v,y,w,E={};;){if(h=a[a.length-1],this.defaultActions[h]?f=this.defaultActions[h]:(null==d&&(w=void 0,"number"!=typeof(w=t.lexer.lex()||1)&&(w=t.symbols_[w]||w),d=w),f=i[h]&&i[h][d]),void 0===f||!f.length||!f[0]){var k="";if(!c){for(_ in y=[],i[h])this.terminals_[_]&&_>2&&y.push("'"+this.terminals_[_]+"'");k=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+y.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:u,expected:y})}}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+h+", token: "+d);switch(f[0]){case 1:a.push(d),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),a.push(f[1]),d=null,m?(d=m,m=null):(l=this.lexer.yyleng,o=this.lexer.yytext,s=this.lexer.yylineno,u=this.lexer.yylloc,c>0&&c--);break;case 2:if(b=this.productions_[f[1]][1],E.$=n[n.length-b],E._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},p&&(E._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),void 0!==(g=this.performAction.call(E,o,l,s,this.yy,f[1],n,r)))return g;b&&(a=a.slice(0,-1*b*2),n=n.slice(0,-1*b),r=r.slice(0,-1*b)),a.push(this.productions_[f[1]][0]),n.push(E.$),r.push(E._$),v=i[a[a.length-2]][a[a.length-1]],a.push(v);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,a=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,a,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length&&(!(a=this._input.match(this.rules[i[o]]))||t&&!(a[0].length>t[0].length)||(t=a,n=o,this.options.flex));o++);return t?((r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,a,n){function r(e,a){return t.yytext=t.yytext.substring(e,t.yyleng-a+e)}switch(a){case 0:if("\\\\"===t.yytext.slice(-2)?(r(0,1),this.begin("mu")):"\\"===t.yytext.slice(-1)?(r(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(r(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=r(1,2).replace(/\\"/g,'"'),80;case 32:return t.yytext=r(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return e}();function a(){this.yy={}}return e.lexer=t,a.prototype=e,e.Parser=a,new a}();t.default=a,e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=n(a(39));function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=e}function o(e,t,a){void 0===t&&(t=e.length);var n=e[t-1],r=e[t-2];return n?"ContentStatement"===n.type?(r||!a?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original):void 0:a}function s(e,t,a){void 0===t&&(t=-1);var n=e[t+1],r=e[t+2];return n?"ContentStatement"===n.type?(r||!a?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original):void 0:a}function l(e,t,a){var n=e[null==t?0:t+1];if(n&&"ContentStatement"===n.type&&(a||!n.rightStripped)){var r=n.value;n.value=n.value.replace(a?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==r}}function c(e,t,a){var n=e[null==t?e.length-1:t-1];if(n&&"ContentStatement"===n.type&&(a||!n.leftStripped)){var r=n.value;return n.value=n.value.replace(a?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==r,n.leftStripped}}i.prototype=new r.default,i.prototype.Program=function(e){var t=!this.options.ignoreStandalone,a=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,r=0,i=n.length;r<i;r++){var u=n[r],p=this.accept(u);if(p){var d=o(n,r,a),m=s(n,r,a),h=p.openStandalone&&d,f=p.closeStandalone&&m,g=p.inlineStandalone&&d&&m;p.close&&l(n,r,!0),p.open&&c(n,r,!0),t&&g&&(l(n,r),c(n,r)&&"PartialStatement"===u.type&&(u.indent=/([ \t]+$)/.exec(n[r-1].original)[1])),t&&h&&(l((u.program||u.inverse).body),c(n,r)),t&&f&&(l(n,r),c((u.inverse||u.program).body))}}return e},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,a=e.program&&e.inverse,n=a,r=a;if(a&&a.chained)for(n=a.body[0].program;r.chained;)r=r.body[r.body.length-1].program;var i={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:s(t.body),closeStandalone:o((n||t).body)};if(e.openStrip.close&&l(t.body,null,!0),a){var u=e.inverseStrip;u.open&&c(t.body,null,!0),u.close&&l(n.body,null,!0),e.closeStrip.open&&c(r.body,null,!0),!this.options.ignoreStandalone&&o(t.body)&&s(n.body)&&(c(t.body),l(n.body))}else e.closeStrip.open&&c(t.body,null,!0);return i},i.prototype.Decorator=i.prototype.MustacheStatement=function(e){return e.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}},t.default=i,e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=n(a(6));function i(){this.parents=[]}function o(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function s(e){o.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function l(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}i.prototype={constructor:i,mutating:!1,acceptKey:function(e,t){var a=this.accept(e[t]);if(this.mutating){if(a&&!i.prototype[a.type])throw new r.default('Unexpected node type "'+a.type+'" found when accepting '+t+" on "+e.type);e[t]=a}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new r.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,a=e.length;t<a;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,a--)},accept:function(e){if(e){if(!this[e.type])throw new r.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);return this.current=this.parents.shift(),!this.mutating||t?t:!1!==t?e:void 0}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:o,Decorator:o,BlockStatement:s,DecoratorBlock:s,PartialStatement:l,PartialBlockStatement:function(e){l.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:o,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}},t.default=i,e.exports=t.default},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.SourceLocation=function(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}},t.id=function(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e},t.stripFlags=function(e,t){return{open:"~"===e.charAt(2),close:"~"===t.charAt(t.length-3)}},t.stripComment=function(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")},t.preparePath=function(e,t,a){a=this.locInfo(a);for(var n=e?"@":"",i=[],o=0,s=0,l=t.length;s<l;s++){var c=t[s].part,u=t[s].original!==c;if(n+=(t[s].separator||"")+c,u||".."!==c&&"."!==c&&"this"!==c)i.push(c);else{if(i.length>0)throw new r.default("Invalid path: "+n,{loc:a});".."===c&&o++}}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:a}},t.prepareMustache=function(e,t,a,n,r,i){var o=n.charAt(3)||n.charAt(2),s="{"!==o&&"&"!==o;return{type:/\*/.test(n)?"Decorator":"MustacheStatement",path:e,params:t,hash:a,escaped:s,strip:r,loc:this.locInfo(i)}},t.prepareRawBlock=function(e,t,a,n){i(e,a),n=this.locInfo(n);var r={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}},t.prepareBlock=function(e,t,a,n,o,s){n&&n.path&&i(e,n);var l=/\*/.test(e.open);t.blockParams=e.blockParams;var c=void 0,u=void 0;if(a){if(l)throw new r.default("Unexpected inverse block on decorator",a);a.chain&&(a.program.body[0].closeStrip=n.strip),u=a.strip,c=a.program}o&&(o=c,c=t,t=o);return{type:l?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:c,openStrip:e.strip,inverseStrip:u,closeStrip:n&&n.strip,loc:this.locInfo(s)}},t.prepareProgram=function(e,t){if(!t&&e.length){var a=e[0].loc,n=e[e.length-1].loc;a&&n&&(t={source:a.source,start:{line:a.start.line,column:a.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:e,strip:{},loc:t}},t.preparePartialBlock=function(e,t,a,n){return i(e,a),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:a&&a.strip,loc:this.locInfo(n)}};var r=n(a(6));function i(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var a={loc:e.path.loc};throw new r.default(e.path.original+" doesn't match "+t,a)}}},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0,t.Compiler=l,t.precompile=function(e,t,a){if(null==e||"string"!=typeof e&&"Program"!==e.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);"data"in(t=t||{})||(t.data=!0);t.compat&&(t.useDepths=!0);var n=a.parse(e,t),i=(new a.Compiler).compile(n,t);return(new a.JavaScriptCompiler).compile(i,t)},t.compile=function(e,t,a){void 0===t&&(t={});if(null==e||"string"!=typeof e&&"Program"!==e.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);"data"in(t=i.extend({},t))||(t.data=!0);t.compat&&(t.useDepths=!0);var n=void 0;function o(){var n=a.parse(e,t),r=(new a.Compiler).compile(n,t),i=(new a.JavaScriptCompiler).compile(r,t,void 0,!0);return a.template(i)}function s(e,t){return n||(n=o()),n.call(this,e,t)}return s._setup=function(e){return n||(n=o()),n._setup(e)},s._child=function(e,t,a,r){return n||(n=o()),n._child(e,t,a,r)},s};var r=n(a(6)),i=a(5),o=n(a(35)),s=[].slice;function l(){}function c(e,t){if(e===t)return!0;if(i.isArray(e)&&i.isArray(t)&&e.length===t.length){for(var a=0;a<e.length;a++)if(!c(e[a],t[a]))return!1;return!0}}function u(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}l.prototype={compiler:l,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var a=0;a<t;a++){var n=this.opcodes[a],r=e.opcodes[a];if(n.opcode!==r.opcode||!c(n.args,r.args))return!1}t=this.children.length;for(a=0;a<t;a++)if(!this.children[a].equals(e.children[a]))return!1;return!0},guid:0,compile:function(e,t){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[];var a=t.knownHelpers;if(t.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},a)for(var n in a)this.options.knownHelpers[n]=a[n];return this.accept(e)},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),a=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[a]=t,this.useDepths=this.useDepths||t.useDepths,a},accept:function(e){if(!this[e.type])throw new r.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,a=t.length,n=0;n<a;n++)this.accept(t[n]);return this.options.blockParams.shift(),this.isSimple=1===a,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){u(e);var t=e.program,a=e.inverse;t=t&&this.compileProgram(t),a=a&&this.compileProgram(a);var n=this.classifySexpr(e);"helper"===n?this.helperSexpr(e,t,a):"simple"===n?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",a),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,a),this.opcode("pushProgram",t),this.opcode("pushProgram",a),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),a=this.setupFullMustacheParams(e,t,void 0),n=e.path;this.useDecorators=!0,this.opcode("registerDecorator",a.length,n.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var a=e.params;if(a.length>1)throw new r.default("Unsupported number of partial arguments: "+a.length,e);a.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):a.push({type:"PathExpression",parts:[],depth:0}));var n=e.name.original,i="SubExpression"===e.name.type;i&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",i,n,o),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){u(e);var t=this.classifySexpr(e);"simple"===t?this.simpleSexpr(e):"helper"===t?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,a){var n=e.path,r=n.parts[0],i=null!=t||null!=a;this.opcode("getContext",n.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",a),n.strict=!0,this.accept(n),this.opcode("invokeAmbiguous",r,i)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,a){var n=this.setupFullMustacheParams(e,t,a),i=e.path,s=i.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",n.length,s);else{if(this.options.knownHelpersOnly)throw new r.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",n.length,i.original,o.default.helpers.simpleId(i))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],a=o.default.helpers.scopedId(e),n=!e.depth&&!a&&this.blockParamIndex(t);n?this.opcode("lookupBlockParam",n,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,a):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,a=0,n=t.length;for(this.opcode("pushHash");a<n;a++)this.pushParam(t[a].value);for(;a--;)this.opcode("assignToHash",t[a].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:s.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=o.default.helpers.simpleId(e.path),a=t&&!!this.blockParamIndex(e.path.parts[0]),n=!a&&o.default.helpers.helperExpression(e),r=!a&&(n||t);if(r&&!n){var i=e.path.parts[0],s=this.options;s.knownHelpers[i]?n=!0:s.knownHelpersOnly&&(r=!1)}return n?"helper":r?"ambiguous":"simple"},pushParams:function(e){for(var t=0,a=e.length;t<a;t++)this.pushParam(e[t])},pushParam:function(e){var t=null!=e.value?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),"SubExpression"===e.type&&this.accept(e);else{if(this.trackIds){var a=void 0;if(!e.parts||o.default.helpers.scopedId(e)||e.depth||(a=this.blockParamIndex(e.parts[0])),a){var n=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",a,n)}else(t=e.original||t).replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,a,n){var r=e.params;return this.pushParams(r),this.opcode("pushProgram",t),this.opcode("pushProgram",a),e.hash?this.accept(e.hash):this.opcode("emptyHash",n),r},blockParamIndex:function(e){for(var t=0,a=this.options.blockParams.length;t<a;t++){var n=this.options.blockParams[t],r=n&&i.indexOf(n,e);if(n&&r>=0)return[t,r]}}}},function(e,t,a){"use strict";var n=a(1).default;t.__esModule=!0;var r=a(4),i=n(a(6)),o=a(5),s=n(a(43));function l(e){this.value=e}function c(){}c.prototype={nameLookup:function(e,t){return"constructor"===t?["(",e,".propertyIsEnumerable('constructor') ? ",e,".constructor : undefined",")"]:c.isValidJavaScriptVariableName(t)?[e,".",t]:[e,"[",JSON.stringify(t),"]"]},depthedLookup:function(e){return[this.aliasable("container.lookup"),'(depths, "',e,'")']},compilerInfo:function(){var e=r.COMPILER_REVISION;return[e,r.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,a){return o.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:a?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},compile:function(e,t,a,n){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!n,this.name=this.environment.name,this.isChild=!!a,this.context=a||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var r=e.opcodes,o=void 0,s=void 0,l=void 0,c=void 0;for(l=0,c=r.length;l<c;l++)o=r[l],this.source.currentLocation=o.loc,s=s||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=s,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new i.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),n?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(n);if(this.isChild)return u;var p={compiler:this.compilerInfo(),main:u};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var d=this.context,m=d.programs,h=d.decorators;for(l=0,c=m.length;l<c;l++)m[l]&&(p[l]=m[l],h[l]&&(p[l+"_d"]=h[l],p.useDecorators=!0));return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),n?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),t.srcName?(p=p.toStringWithSourceMap({file:t.destName})).map=p.map&&p.map.toString():p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new s.default(this.options.srcName),this.decorators=new s.default(this.options.srcName)},createFunctionContext:function(e){var t="",a=this.stackVars.concat(this.registers.list);a.length>0&&(t+=", "+a.join(", "));var n=0;for(var r in this.aliases){var i=this.aliases[r];this.aliases.hasOwnProperty(r)&&i.children&&i.referenceCount>1&&(t+=", alias"+ ++n+"="+r,i.children[0]="alias"+n)}var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var s=this.mergeSource(t);return e?(o.push(s),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),") {\n ",s,"}"])},mergeSource:function(e){var t=this.environment.isSimple,a=!this.forceBuffer,n=void 0,r=void 0,i=void 0,o=void 0;return this.source.each(function(e){e.appendToBuffer?(i?e.prepend(" + "):i=e,o=e):(i&&(r?i.prepend("buffer += "):n=!0,o.add(";"),i=o=void 0),r=!0,t||(a=!1))}),a?i?(i.prepend("return "),o.add(";")):r||this.source.push('return "";'):(e+=", buffer = "+(n?"":this.initializeBuffer()),i?(i.prepend("return buffer + "),o.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(n?"":";\n")),this.source.merge()},blockValue:function(e){var t=this.aliasable("helpers.blockHelperMissing"),a=[this.contextName(0)];this.setupHelperArgs(e,0,a);var n=this.popStack();a.splice(1,0,n),this.push(this.source.functionCall(t,"call",a))},ambiguousBlockValue:function(){var e=this.aliasable("helpers.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var a=this.topStack();t.splice(1,0,a),this.pushSource(["if (!",this.lastHelper,") { ",a," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(e){return[" != null ? ",e,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,a,n){var r=0;n||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(e[r++])),this.resolvePath("context",e,r,t,a)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,a){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,a)},resolvePath:function(e,t,a,n,r){var i=this;if(this.options.strict||this.options.assumeObjects)this.push(function(e,t,a,n){var r=t.popStack(),i=0,o=a.length;e&&o--;for(;i<o;i++)r=t.nameLookup(r,a[i],n);return e?[t.aliasable("container.strict"),"(",r,", ",t.quotedString(a[i]),")"]:r}(this.options.strict&&r,this,t,e));else for(var o=t.length;a<o;a++)this.replaceStack(function(r){var o=i.nameLookup(r,t[a],e);return n?[" && ",o]:[" != null ? ",o," : ",r]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),"SubExpression"!==t&&("string"==typeof e?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){null!=e?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,t){var a=this.nameLookup("decorators",t,"decorator"),n=this.setupHelperArgs(t,e);this.decorators.push(["fn = ",this.decorators.functionCall(a,"",["fn","props","container",n])," || fn;"])},invokeHelper:function(e,t,a){var n=this.popStack(),r=this.setupHelper(e,t),i=a?[r.name," || "]:"",o=["("].concat(i,n);this.options.strict||o.push(" || ",this.aliasable("helpers.helperMissing")),o.push(")"),this.push(this.source.functionCall(o,"call",r.callParams))},invokeKnownHelper:function(e,t){var a=this.setupHelper(e,t);this.push(this.source.functionCall(a.name,"call",a.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var a=this.popStack();this.emptyHash();var n=this.setupHelper(0,e,t),r=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",e,"helper")," || ",a,")"];this.options.strict||(r[0]="(helper = ",r.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",r,n.paramsInit?["),(",n.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",n.callParams)," : helper))"])},invokePartial:function(e,t,a){var n=[],r=this.setupParams(t,1,n);e&&(t=this.popStack(),delete r.name),a&&(r.indent=JSON.stringify(a)),r.helpers="helpers",r.partials="partials",r.decorators="container.decorators",e?n.unshift(t):n.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(r.depths="depths"),r=this.objectLiteral(r),n.push(r),this.push(this.source.functionCall("container.invokePartial","",n))},assignToHash:function(e){var t=this.popStack(),a=void 0,n=void 0,r=void 0;this.trackIds&&(r=this.popStack()),this.stringParams&&(n=this.popStack(),a=this.popStack());var i=this.hash;a&&(i.contexts[e]=a),n&&(i.types[e]=n),r&&(i.ids[e]=r),i.values[e]=t},pushId:function(e,t,a){"BlockParam"===e?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(a?" + "+JSON.stringify("."+a):"")):"PathExpression"===e?this.pushString(t):"SubExpression"===e?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:c,compileChildren:function(e,t){for(var a=e.children,n=void 0,r=void 0,i=0,o=a.length;i<o;i++){n=a[i],r=new this.compiler;var s=this.matchExistingProgram(n);if(null==s){this.context.programs.push("");var l=this.context.programs.length;n.index=l,n.name="program"+l,this.context.programs[l]=r.compile(n,t,this.context,!this.precompile),this.context.decorators[l]=r.decorators,this.context.environments[l]=n,this.useDepths=this.useDepths||r.useDepths,this.useBlockParams=this.useBlockParams||r.useBlockParams,n.useDepths=this.useDepths,n.useBlockParams=this.useBlockParams}else n.index=s.index,n.name="program"+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(e){for(var t=0,a=this.context.environments.length;t<a;t++){var n=this.context.environments[t];if(n&&n.equals(e))return n}},programExpression:function(e){var t=this.environment.children[e],a=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths"),"container.program("+a.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof l||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new l(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var t=["("],a=void 0,n=void 0,r=void 0;if(!this.isInline())throw new i.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof l)t=["(",a=[o.value]],r=!0;else{n=!0;var s=this.incrStack();t=["((",this.push(s)," = ",o,")"],a=this.topStack()}var c=e.call(this,a);r||this.popStack(),n&&this.stackSlot--,this.push(t.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,a=e.length;t<a;t++){var n=e[t];if(n instanceof l)this.compileStack.push(n);else{var r=this.incrStack();this.pushSource([r," = ",n,";"]),this.compileStack.push(r)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),a=(t?this.inlineStack:this.compileStack).pop();if(!e&&a instanceof l)return a.value;if(!t){if(!this.stackSlot)throw new i.default("Invalid stack pop");this.stackSlot--}return a},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof l?t.value:t},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):((t=this.aliases[e]=this.source.wrap(e)).aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,a){var n=[];return{params:n,paramsInit:this.setupHelperArgs(t,e,n,a),name:this.nameLookup("helpers",t,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(n)}},setupParams:function(e,t,a){var n={},r=[],i=[],o=[],s=!a,l=void 0;s&&(a=[]),n.name=this.quotedString(e),n.hash=this.popStack(),this.trackIds&&(n.hashIds=this.popStack()),this.stringParams&&(n.hashTypes=this.popStack(),n.hashContexts=this.popStack());var c=this.popStack(),u=this.popStack();(u||c)&&(n.fn=u||"container.noop",n.inverse=c||"container.noop");for(var p=t;p--;)l=this.popStack(),a[p]=l,this.trackIds&&(o[p]=this.popStack()),this.stringParams&&(i[p]=this.popStack(),r[p]=this.popStack());return s&&(n.args=this.source.generateArray(a)),this.trackIds&&(n.ids=this.source.generateArray(o)),this.stringParams&&(n.types=this.source.generateArray(i),n.contexts=this.source.generateArray(r)),this.options.data&&(n.data="data"),this.useBlockParams&&(n.blockParams="blockParams"),n},setupHelperArgs:function(e,t,a,n){var r=this.setupParams(e,t,a);return r=this.objectLiteral(r),n?(this.useRegister("options"),a.push("options"),["options=",r]):a?(a.push(r),""):r}},function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=c.RESERVED_WORDS={},a=0,n=e.length;a<n;a++)t[e[a]]=!0}(),c.isValidJavaScriptVariableName=function(e){return!c.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)},t.default=c,e.exports=t.default},function(e,t,a){"use strict";t.__esModule=!0;var n=a(5),r=void 0;try{}catch(e){}function i(e,t,a){if(n.isArray(e)){for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.wrap(e[i],a));return r}return"boolean"==typeof e||"number"==typeof e?e+"":e}function o(e){this.srcFile=e,this.source=[]}r||((r=function(e,t,a,n){this.src="",n&&this.add(n)}).prototype={add:function(e){n.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){n.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),o.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([" ",t,"\n"])}),e},each:function(e){for(var t=0,a=this.source.length;t<a;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new r(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return e instanceof r?e:(e=i(e,this,t),new r(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,a){return a=this.generateList(a),this.wrap([e,t?"."+t+"(":"(",a,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var t=[];for(var a in e)if(e.hasOwnProperty(a)){var n=i(e[a],this);"undefined"!==n&&t.push([this.quotedString(a),":",n])}var r=this.generateList(t);return r.prepend("{"),r.add("}"),r},generateList:function(e){for(var t=this.empty(),a=0,n=e.length;a<n;a++)a&&t.add(","),t.add(i(e[a],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}},t.default=o,e.exports=t.default}])},e.exports=n()},299:function(e,t,a){var n=a(659),r=a(661),i=a(665),o=a(667),s=a(669),l=a(672),c=a(7);e.exports=function(e){for(var t=1;t<arguments.length;t++){var a,u=null!=arguments[t]?arguments[t]:{},p=l(u);"function"==typeof s&&(p=o(p).call(p,i(a=s(u)).call(a,function(e){return r(u,e).enumerable}))),n(p).call(p,function(t){c(e,t,u[t])})}return e}},331:function(e,t,a){e.exports=a(653)},4:function(e,t){e.exports=jQuery},492:function(e,t,a){(function(t){t.MailPoetLib||(t.MailPoetLib={}),e.exports=t.MailPoetLib.Form=a(601)}).call(this,a(19))},493:function(e,t,a){(function(t){t.MailPoetLib||(t.MailPoetLib={}),e.exports=t.MailPoetLib.Form=a(638)}).call(this,a(19))},494:function(e,t,a){e.exports=a(677)},512:function(e,t,a){e.exports=a(612)},514:function(e,t,a){e.exports=a(634)},515:function(e,t,a){var n;n=function(){function e(e){this._targetElement=e,this._introItems=[],this._options={nextLabel:"Next &rarr;",prevLabel:"&larr; 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 t(e,t){var o=e.querySelectorAll("*[data-intro]"),l=[];if(this._options.steps)_(this._options.steps,function(e){var t=r(e);if(t.step=l.length+1,"string"==typeof t.element&&(t.element=document.querySelector(t.element)),void 0===t.element||null===t.element){var a=document.querySelector(".introjsFloatingElement");null===a&&((a=document.createElement("div")).className="introjsFloatingElement",document.body.appendChild(a)),t.element=a,t.position="floating"}t.scrollTo=t.scrollTo||this._options.scrollTo,void 0===t.disableInteraction&&(t.disableInteraction=this._options.disableInteraction),null!==t.element&&l.push(t)}.bind(this));else{var c;if(o.length<1)return!1;_(o,function(e){if((!t||e.getAttribute("data-intro-group")===t)&&"none"!==e.style.display){var a=parseInt(e.getAttribute("data-step"),10);c=void 0!==e.getAttribute("data-disable-interaction")?!!e.getAttribute("data-disable-interaction"):this._options.disableInteraction,a>0&&(l[a-1]={element:e,intro:e.getAttribute("data-intro"),step:parseInt(e.getAttribute("data-step"),10),tooltipClass:e.getAttribute("data-tooltipclass"),highlightClass:e.getAttribute("data-highlightclass"),position:e.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:e.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:c})}}.bind(this));var u=0;_(o,function(e){if((!t||e.getAttribute("data-intro-group")===t)&&null===e.getAttribute("data-step")){for(;void 0!==l[u];)u++;c=void 0!==e.getAttribute("data-disable-interaction")?!!e.getAttribute("data-disable-interaction"):this._options.disableInteraction,l[u]={element:e,intro:e.getAttribute("data-intro"),step:u+1,tooltipClass:e.getAttribute("data-tooltipclass"),highlightClass:e.getAttribute("data-highlightclass"),position:e.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:e.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:c}}}.bind(this))}for(var p=[],d=0;d<l.length;d++)l[d]&&p.push(l[d]);return(l=p).sort(function(e,t){return e.step-t.step}),this._introItems=l,function(e){var t=document.createElement("div"),a="",n=this;if(t.className="introjs-overlay",e.tagName&&"body"!==e.tagName.toLowerCase()){var r=L(e);r&&(a+="width: "+r.width+"px; height:"+r.height+"px; top:"+r.top+"px;left: "+r.left+"px;",t.style.cssText=a)}else a+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",t.style.cssText=a;return e.appendChild(t),t.onclick=function(){!0===n._options.exitOnOverlayClick&&s.call(n,e)},window.setTimeout(function(){a+="opacity: "+n._options.overlayOpacity.toString()+";",t.style.cssText=a},10),!0}.call(this,e)&&(i.call(this),this._options.keyboardNavigation&&y.on(window,"keydown",n,this,!0),y.on(window,"resize",a,this,!0)),!1}function a(){this.refresh.call(this)}function n(e){var t=null===e.code?e.which:e.code;if(null===t&&(t=null===e.charCode?e.keyCode:e.charCode),"Escape"!==t&&27!==t||!0!==this._options.exitOnEsc){if("ArrowLeft"===t||37===t)o.call(this);else if("ArrowRight"===t||39===t)i.call(this);else if("Enter"===t||13===t){var a=e.target||e.srcElement;a&&a.className.match("introjs-prevbutton")?o.call(this):a&&a.className.match("introjs-skipbutton")?(this._introItems.length-1===this._currentStep&&"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),s.call(this,this._targetElement)):a&&a.getAttribute("data-stepnumber")?a.click():i.call(this),e.preventDefault?e.preventDefault():e.returnValue=!1}}else s.call(this,this._targetElement)}function r(e){if(null===e||"object"!=typeof e||void 0!==e.nodeType)return e;var t={};for(var a in e)void 0!==window.jQuery&&e[a]instanceof window.jQuery?t[a]=e[a]:t[a]=r(e[a]);return t}function i(){this._direction="forward",void 0!==this._currentStepNumber&&_(this._introItems,function(e,t){e.step===this._currentStepNumber&&(this._currentStep=t-1,this._currentStepNumber=void 0)}.bind(this)),void 0===this._currentStep?this._currentStep=0:++this._currentStep;var e=this._introItems[this._currentStep],t=!0;return void 0!==this._introBeforeChangeCallback&&(t=this._introBeforeChangeCallback.call(this,e.element)),!1===t?(--this._currentStep,!1):this._introItems.length<=this._currentStep?("function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void s.call(this,this._targetElement)):void h.call(this,e)}function o(){if(this._direction="backward",0===this._currentStep)return!1;--this._currentStep;var e=this._introItems[this._currentStep],t=!0;if(void 0!==this._introBeforeChangeCallback&&(t=this._introBeforeChangeCallback.call(this,e.element)),!1===t)return++this._currentStep,!1;h.call(this,e)}function s(e,t){var r=!0;if(void 0!==this._introBeforeExitCallback&&(r=this._introBeforeExitCallback.call(this)),t||!1!==r){var i=e.querySelectorAll(".introjs-overlay");i&&i.length&&_(i,function(e){e.style.opacity=0,window.setTimeout(function(){this.parentNode&&this.parentNode.removeChild(this)}.bind(e),500)}.bind(this));var o=e.querySelector(".introjs-helperLayer");o&&o.parentNode.removeChild(o);var s=e.querySelector(".introjs-tooltipReferenceLayer");s&&s.parentNode.removeChild(s);var l=e.querySelector(".introjs-disableInteraction");l&&l.parentNode.removeChild(l);var c=document.querySelector(".introjsFloatingElement");c&&c.parentNode.removeChild(c),g(),_(document.querySelectorAll(".introjs-fixParent"),function(e){E(e,/introjs-fixParent/g)}),y.off(window,"keydown",n,this,!0),y.off(window,"resize",a,this,!0),void 0!==this._introExitCallback&&this._introExitCallback.call(this),this._currentStep=void 0}}function l(e,t,a,n,r){var i,o,s,l,d,m="";if(r=r||!1,t.style.top=null,t.style.right=null,t.style.bottom=null,t.style.left=null,t.style.marginLeft=null,t.style.marginTop=null,a.style.display="inherit",null!=n&&(n.style.top=null,n.style.left=null),this._introItems[this._currentStep])switch(m="string"==typeof(i=this._introItems[this._currentStep]).tooltipClass?i.tooltipClass:this._options.tooltipClass,t.className=("introjs-tooltip "+m).replace(/^\s+|\s+$/g,""),t.setAttribute("role","dialog"),"floating"!==(d=this._introItems[this._currentStep].position)&&(d=function(e,t,a){var n=this._options.positionPrecedence.slice(),r=S(),i=L(t).height+10,o=L(t).width+20,s=e.getBoundingClientRect(),l="floating";s.bottom+i+i>r.height&&p(n,"bottom");s.top-i<0&&p(n,"top");s.right+o>r.width&&p(n,"right");s.left-o<0&&p(n,"left");var c=(u=a||"",d=u.indexOf("-"),-1!==d?u.substr(d):"");var u,d;a&&(a=a.split("-")[0]);n.length&&(l="auto"!==a&&n.indexOf(a)>-1?a:n[0]);-1!==["top","bottom"].indexOf(l)&&(l+=function(e,t,a,n){var r=t/2,i=Math.min(a.width,window.screen.width),o=["-left-aligned","-middle-aligned","-right-aligned"],s="";i-e<t&&p(o,"-left-aligned");(e<r||i-e<r)&&p(o,"-middle-aligned");e<t&&p(o,"-right-aligned");s=o.length?-1!==o.indexOf(n)?n:o[0]:"-middle-aligned";return s}(s.left,o,r,c));return l}.call(this,e,t,d)),s=L(e),o=L(t),l=S(),w(t,"introjs-"+d),d){case"top-right-aligned":a.className="introjs-arrow bottom-right";var h=0;u(s,h,o,t),t.style.bottom=s.height+20+"px";break;case"top-middle-aligned":a.className="introjs-arrow bottom-middle";var f=s.width/2-o.width/2;r&&(f+=5),u(s,f,o,t)&&(t.style.right=null,c(s,f,o,l,t)),t.style.bottom=s.height+20+"px";break;case"top-left-aligned":case"top":a.className="introjs-arrow bottom",c(s,r?0:15,o,l,t),t.style.bottom=s.height+20+"px";break;case"right":t.style.left=s.width+20+"px",s.top+o.height>l.height?(a.className="introjs-arrow left-bottom",t.style.top="-"+(o.height-s.height-20)+"px"):a.className="introjs-arrow left";break;case"left":r||!0!==this._options.showStepNumbers||(t.style.top="15px"),s.top+o.height>l.height?(t.style.top="-"+(o.height-s.height-20)+"px",a.className="introjs-arrow right-bottom"):a.className="introjs-arrow right",t.style.right=s.width+20+"px";break;case"floating":a.style.display="none",t.style.left="50%",t.style.top="50%",t.style.marginLeft="-"+o.width/2+"px",t.style.marginTop="-"+o.height/2+"px",null!=n&&(n.style.left="-"+(o.width/2+18)+"px",n.style.top="-"+(o.height/2+18)+"px");break;case"bottom-right-aligned":a.className="introjs-arrow top-right",u(s,h=0,o,t),t.style.top=s.height+20+"px";break;case"bottom-middle-aligned":a.className="introjs-arrow top-middle",f=s.width/2-o.width/2,r&&(f+=5),u(s,f,o,t)&&(t.style.right=null,c(s,f,o,l,t)),t.style.top=s.height+20+"px";break;default:a.className="introjs-arrow top",c(s,0,o,l,t),t.style.top=s.height+20+"px"}}function c(e,t,a,n,r){return e.left+t+a.width>n.width?(r.style.left=n.width-a.width-e.left+"px",!1):(r.style.left=t+"px",!0)}function u(e,t,a,n){return e.left+e.width-t-a.width<0?(n.style.left=-e.left+"px",!1):(n.style.right=t+"px",!0)}function p(e,t){e.indexOf(t)>-1&&e.splice(e.indexOf(t),1)}function d(e){if(e){if(!this._introItems[this._currentStep])return;var t=this._introItems[this._currentStep],a=L(t.element),n=this._options.helperElementPadding;I(t.element)?w(e,"introjs-fixedTooltip"):E(e,"introjs-fixedTooltip"),"floating"===t.position&&(n=0),e.style.cssText="width: "+(a.width+n)+"px; height:"+(a.height+n)+"px; top:"+(a.top-n/2)+"px;left: "+(a.left-n/2)+"px;"}}function m(e){e.setAttribute("role","button"),e.tabIndex=0}function h(e){void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,e.element);var t,a,n,r,c=this,u=document.querySelector(".introjs-helperLayer"),p=document.querySelector(".introjs-tooltipReferenceLayer"),h="introjs-helperLayer";if("string"==typeof e.highlightClass&&(h+=" "+e.highlightClass),"string"==typeof this._options.highlightClass&&(h+=" "+this._options.highlightClass),null!==u){var b=p.querySelector(".introjs-helperNumberLayer"),v=p.querySelector(".introjs-tooltiptext"),y=p.querySelector(".introjs-arrow"),I=p.querySelector(".introjs-tooltip");if(n=p.querySelector(".introjs-skipbutton"),a=p.querySelector(".introjs-prevbutton"),t=p.querySelector(".introjs-nextbutton"),u.className=h,I.style.opacity=0,I.style.display="none",null!==b){var S=this._introItems[e.step-2>=0?e.step-2:0];(null!==S&&"forward"===this._direction&&"floating"===S.position||"backward"===this._direction&&"floating"===e.position)&&(b.style.opacity=0)}(r=D(e.element))!==document.body&&q(r,e.element),d.call(c,u),d.call(c,p),_(document.querySelectorAll(".introjs-fixParent"),function(e){E(e,/introjs-fixParent/g)}),g(),c._lastShowElementTimer&&window.clearTimeout(c._lastShowElementTimer),c._lastShowElementTimer=window.setTimeout(function(){null!==b&&(b.innerHTML=e.step),v.innerHTML=e.intro,I.style.display="block",l.call(c,e.element,I,y,b),c._options.showBullets&&(p.querySelector(".introjs-bullets li > a.active").className="",p.querySelector('.introjs-bullets li > a[data-stepnumber="'+e.step+'"]').className="active"),p.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+M.call(c)+"%;",p.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",M.call(c)),I.style.opacity=1,b&&(b.style.opacity=1),null!=n&&/introjs-donebutton/gi.test(n.className)?n.focus():null!=t&&t.focus(),f.call(c,e.scrollTo,e,v)},350)}else{var N=document.createElement("div"),x=document.createElement("div"),C=document.createElement("div"),T=document.createElement("div"),P=document.createElement("div"),R=document.createElement("div"),A=document.createElement("div"),j=document.createElement("div");N.className=h,x.className="introjs-tooltipReferenceLayer",(r=D(e.element))!==document.body&&q(r,e.element),d.call(c,N),d.call(c,x),this._targetElement.appendChild(N),this._targetElement.appendChild(x),C.className="introjs-arrow",P.className="introjs-tooltiptext",P.innerHTML=e.intro,R.className="introjs-bullets",!1===this._options.showBullets&&(R.style.display="none");var O=document.createElement("ul");O.setAttribute("role","tablist");var L=function(){c.goToStep(this.getAttribute("data-stepnumber"))};_(this._introItems,function(t,a){var n=document.createElement("li"),r=document.createElement("a");n.setAttribute("role","presentation"),r.setAttribute("role","tab"),r.onclick=L,a===e.step-1&&(r.className="active"),m(r),r.innerHTML="&nbsp;",r.setAttribute("data-stepnumber",t.step),n.appendChild(r),O.appendChild(n)}),R.appendChild(O),A.className="introjs-progress",!1===this._options.showProgress&&(A.style.display="none");var F=document.createElement("div");F.className="introjs-progressbar",F.setAttribute("role","progress"),F.setAttribute("aria-valuemin",0),F.setAttribute("aria-valuemax",100),F.setAttribute("aria-valuenow",M.call(this)),F.style.cssText="width:"+M.call(this)+"%;",A.appendChild(F),j.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(j.style.display="none"),T.className="introjs-tooltip",T.appendChild(P),T.appendChild(R),T.appendChild(A);var B=document.createElement("span");!0===this._options.showStepNumbers&&(B.className="introjs-helperNumberLayer",B.innerHTML=e.step,x.appendChild(B)),T.appendChild(C),x.appendChild(T),(t=document.createElement("a")).onclick=function(){c._introItems.length-1!==c._currentStep&&i.call(c)},m(t),t.innerHTML=this._options.nextLabel,(a=document.createElement("a")).onclick=function(){0!==c._currentStep&&o.call(c)},m(a),a.innerHTML=this._options.prevLabel,(n=document.createElement("a")).className=this._options.buttonClass+" introjs-skipbutton ",m(n),n.innerHTML=this._options.skipLabel,n.onclick=function(){c._introItems.length-1===c._currentStep&&"function"==typeof c._introCompleteCallback&&c._introCompleteCallback.call(c),c._introItems.length-1!==c._currentStep&&"function"==typeof c._introExitCallback&&c._introExitCallback.call(c),c._introSkipCallback.call(c),s.call(c,c._targetElement)},j.appendChild(n),this._introItems.length>1&&(j.appendChild(a),j.appendChild(t)),T.appendChild(j),l.call(c,e.element,T,C,B),f.call(this,e.scrollTo,e,T)}var $=c._targetElement.querySelector(".introjs-disableInteraction");$&&$.parentNode.removeChild($),e.disableInteraction&&function(){var e=document.querySelector(".introjs-disableInteraction");null===e&&((e=document.createElement("div")).className="introjs-disableInteraction",this._targetElement.appendChild(e)),d.call(this,e)}.call(c),0===this._currentStep&&this._introItems.length>1?(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=t&&(t.className=this._options.buttonClass+" introjs-nextbutton"),!0===this._options.hidePrev?(null!=a&&(a.className=this._options.buttonClass+" introjs-prevbutton introjs-hidden"),null!=t&&w(t,"introjs-fullbutton")):null!=a&&(a.className=this._options.buttonClass+" introjs-prevbutton introjs-disabled"),null!=n&&(n.innerHTML=this._options.skipLabel)):this._introItems.length-1===this._currentStep||1===this._introItems.length?(null!=n&&(n.innerHTML=this._options.doneLabel,w(n,"introjs-donebutton")),null!=a&&(a.className=this._options.buttonClass+" introjs-prevbutton"),!0===this._options.hideNext?(null!=t&&(t.className=this._options.buttonClass+" introjs-nextbutton introjs-hidden"),null!=a&&w(a,"introjs-fullbutton")):null!=t&&(t.className=this._options.buttonClass+" introjs-nextbutton introjs-disabled")):(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=a&&(a.className=this._options.buttonClass+" introjs-prevbutton"),null!=t&&(t.className=this._options.buttonClass+" introjs-nextbutton"),null!=n&&(n.innerHTML=this._options.skipLabel)),a.setAttribute("role","button"),t.setAttribute("role","button"),n.setAttribute("role","button"),null!=t&&t.focus(),function(e){var t;if(e.element instanceof SVGElement)for(t=e.element.parentNode;null!==e.element.parentNode&&t.tagName&&"body"!==t.tagName.toLowerCase();)"svg"===t.tagName.toLowerCase()&&w(t,"introjs-showElement introjs-relativePosition"),t=t.parentNode;w(e.element,"introjs-showElement");var a=k(e.element,"position");"absolute"!==a&&"relative"!==a&&"fixed"!==a&&w(e.element,"introjs-relativePosition");t=e.element.parentNode;for(;null!==t&&t.tagName&&"body"!==t.tagName.toLowerCase();){var n=k(t,"z-index"),r=parseFloat(k(t,"opacity")),i=k(t,"transform")||k(t,"-webkit-transform")||k(t,"-moz-transform")||k(t,"-ms-transform")||k(t,"-o-transform");(/[0-9]+/.test(n)||r<1||"none"!==i&&void 0!==i)&&w(t,"introjs-fixParent"),t=t.parentNode}}(e),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,e.element)}function f(e,t,a){var n;if("off"!==e&&(this._options.scrollToElement&&(n="tooltip"===e?a.getBoundingClientRect():t.element.getBoundingClientRect(),!function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom+80<=window.innerHeight&&t.right<=window.innerWidth}(t.element)))){var r=S().height;n.bottom-(n.bottom-n.top)<0||t.element.clientHeight>r?window.scrollBy(0,n.top-(r/2-n.height/2)-this._options.scrollPadding):window.scrollBy(0,n.top-(r/2-n.height/2)+this._options.scrollPadding)}}function g(){_(document.querySelectorAll(".introjs-showElement"),function(e){E(e,/introjs-[a-zA-Z]+/g)})}function _(e,t,a){if(e)for(var n=0,r=e.length;n<r;n++)t(e[n],n);"function"==typeof a&&a()}var b,v=(b={},function(e,t){return b[t=t||"introjs-stamp"]=b[t]||0,void 0===e[t]&&(e[t]=b[t]++),e[t]}),y=function(){return new function(){var e="introjs_event";this._id=function(e,t,a,n){return t+v(a)+(n?"_"+v(n):"")},this.on=function(t,a,n,r,i){var o=this._id.apply(this,arguments),s=function(e){return n.call(r||t,e||window.event)};"addEventListener"in t?t.addEventListener(a,s,i):"attachEvent"in t&&t.attachEvent("on"+a,s),t[e]=t[e]||{},t[e][o]=s},this.off=function(t,a,n,r,i){var o=this._id.apply(this,arguments),s=t[e]&&t[e][o];"removeEventListener"in t?t.removeEventListener(a,s,i):"detachEvent"in t&&t.detachEvent("on"+a,s),t[e][o]=null}}}();function w(e,t){if(e instanceof SVGElement){var a=e.getAttribute("class")||"";e.setAttribute("class",a+" "+t)}else{if(void 0!==e.classList)_(t.split(" "),function(t){e.classList.add(t)});else e.className.match(t)||(e.className+=" "+t)}}function E(e,t){if(e instanceof SVGElement){var a=e.getAttribute("class")||"";e.setAttribute("class",a.replace(t,"").replace(/^\s+|\s+$/g,""))}else e.className=e.className.replace(t,"").replace(/^\s+|\s+$/g,"")}function k(e,t){var a="";return e.currentStyle?a=e.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(a=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),a&&a.toLowerCase?a.toLowerCase():a}function I(e){var t=e.parentNode;return!(!t||"HTML"===t.nodeName)&&("fixed"===k(e,"position")||I(t))}function S(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function N(){var e=document.querySelector(".introjs-hintReference");if(e){var t=e.getAttribute("data-step");return e.parentNode.removeChild(e),t}}function x(e){if(this._introItems=[],this._options.hints)_(this._options.hints,function(e){var t=r(e);"string"==typeof t.element&&(t.element=document.querySelector(t.element)),t.hintPosition=t.hintPosition||this._options.hintPosition,t.hintAnimation=t.hintAnimation||this._options.hintAnimation,null!==t.element&&this._introItems.push(t)}.bind(this));else{var t=e.querySelectorAll("*[data-hint]");if(!t||!t.length)return!1;_(t,function(e){var t=e.getAttribute("data-hintanimation");t=t?"true"===t:this._options.hintAnimation,this._introItems.push({element:e,hint:e.getAttribute("data-hint"),hintPosition:e.getAttribute("data-hintposition")||this._options.hintPosition,hintAnimation:t,tooltipClass:e.getAttribute("data-tooltipclass"),position:e.getAttribute("data-position")||this._options.tooltipPosition})}.bind(this))}(function(){var e=this,t=document.querySelector(".introjs-hints");null===t&&((t=document.createElement("div")).className="introjs-hints");_(this._introItems,function(a,n){if(!document.querySelector('.introjs-hint[data-step="'+n+'"]')){var r=document.createElement("a");m(r),r.onclick=function(t){return function(a){var n=a||window.event;n.stopPropagation&&n.stopPropagation(),null!==n.cancelBubble&&(n.cancelBubble=!0),O.call(e,t)}}(n),r.className="introjs-hint",a.hintAnimation||w(r,"introjs-hint-no-anim"),I(a.element)&&w(r,"introjs-fixedhint");var i=document.createElement("div");i.className="introjs-hint-dot";var o=document.createElement("div");o.className="introjs-hint-pulse",r.appendChild(i),r.appendChild(o),r.setAttribute("data-step",n),a.targetElement=a.element,a.element=r,j.call(this,a.hintPosition,r,a.targetElement),t.appendChild(r)}}.bind(this)),document.body.appendChild(t),void 0!==this._hintsAddedCallback&&this._hintsAddedCallback.call(this)}).call(this),y.on(document,"click",N,this,!1),y.on(window,"resize",C,this,!0)}function C(){_(this._introItems,function(e){void 0!==e.targetElement&&j.call(this,e.hintPosition,e.element,e.targetElement)}.bind(this))}function T(e){var t=document.querySelector(".introjs-hints");return t?t.querySelectorAll(e):[]}function P(e){var t=T('.introjs-hint[data-step="'+e+'"]')[0];N.call(this),t&&w(t,"introjs-hidehint"),void 0!==this._hintCloseCallback&&this._hintCloseCallback.call(this,e)}function R(e){var t=T('.introjs-hint[data-step="'+e+'"]')[0];t&&E(t,/introjs-hidehint/g)}function A(e){var t=T('.introjs-hint[data-step="'+e+'"]')[0];t&&t.parentNode.removeChild(t)}function j(e,t,a){var n=L.call(this,a);switch(e){default:case"top-left":t.style.left=n.left+"px",t.style.top=n.top+"px";break;case"top-right":t.style.left=n.left+n.width-20+"px",t.style.top=n.top+"px";break;case"bottom-left":t.style.left=n.left+"px",t.style.top=n.top+n.height-20+"px";break;case"bottom-right":t.style.left=n.left+n.width-20+"px",t.style.top=n.top+n.height-20+"px";break;case"middle-left":t.style.left=n.left+"px",t.style.top=n.top+(n.height-20)/2+"px";break;case"middle-right":t.style.left=n.left+n.width-20+"px",t.style.top=n.top+(n.height-20)/2+"px";break;case"middle-middle":t.style.left=n.left+(n.width-20)/2+"px",t.style.top=n.top+(n.height-20)/2+"px";break;case"bottom-middle":t.style.left=n.left+(n.width-20)/2+"px",t.style.top=n.top+n.height-20+"px";break;case"top-middle":t.style.left=n.left+(n.width-20)/2+"px",t.style.top=n.top+"px"}}function O(e){var t=document.querySelector('.introjs-hint[data-step="'+e+'"]'),a=this._introItems[e];void 0!==this._hintClickCallback&&this._hintClickCallback.call(this,t,a,e);var n=N.call(this);if(parseInt(n,10)!==e){var r=document.createElement("div"),i=document.createElement("div"),o=document.createElement("div"),s=document.createElement("div");r.className="introjs-tooltip",r.onclick=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},i.className="introjs-tooltiptext";var c=document.createElement("p");c.innerHTML=a.hint;var u=document.createElement("a");u.className=this._options.buttonClass,u.setAttribute("role","button"),u.innerHTML=this._options.hintButtonLabel,u.onclick=P.bind(this,e),i.appendChild(c),i.appendChild(u),o.className="introjs-arrow",r.appendChild(o),r.appendChild(i),this._currentStep=t.getAttribute("data-step"),s.className="introjs-tooltipReferenceLayer introjs-hintReference",s.setAttribute("data-step",t.getAttribute("data-step")),d.call(this,s),s.appendChild(r),document.body.appendChild(s),l.call(this,t,r,o,null,!0)}}function L(e){var t=document.body,a=document.documentElement,n=window.pageYOffset||a.scrollTop||t.scrollTop,r=window.pageXOffset||a.scrollLeft||t.scrollLeft,i=e.getBoundingClientRect();return{top:i.top+n,width:i.width,height:i.height,left:i.left+r}}function D(e){var t=window.getComputedStyle(e),a="absolute"===t.position,n=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(var r=e;r=r.parentElement;)if(t=window.getComputedStyle(r),(!a||"static"!==t.position)&&n.test(t.overflow+t.overflowY+t.overflowX))return r;return document.body}function q(e,t){e.scrollTop=t.offsetTop-e.offsetTop}function M(){return parseInt(this._currentStep+1,10)/this._introItems.length*100}var F=function(t){var a;if("object"==typeof t)a=new e(t);else if("string"==typeof t){var n=document.querySelector(t);if(!n)throw new Error("There is no element with given selector.");a=new e(n)}else a=new e(document.body);return F.instances[v(a,"introjs-instance")]=a,a};return F.version="2.9.0",F.instances={},F.fn=e.prototype={clone:function(){return new e(this)},setOption:function(e,t){return this._options[e]=t,this},setOptions:function(e){return this._options=function(e,t){var a,n={};for(a in e)n[a]=e[a];for(a in t)n[a]=t[a];return n}(this._options,e),this},start:function(e){return t.call(this,this._targetElement,e),this},goToStep:function(e){return function(e){this._currentStep=e-2,void 0!==this._introItems&&i.call(this)}.call(this,e),this},addStep:function(e){return this._options.steps||(this._options.steps=[]),this._options.steps.push(e),this},addSteps:function(e){if(e.length){for(var t=0;t<e.length;t++)this.addStep(e[t]);return this}},goToStepNumber:function(e){return function(e){this._currentStepNumber=e,void 0!==this._introItems&&i.call(this)}.call(this,e),this},nextStep:function(){return i.call(this),this},previousStep:function(){return o.call(this),this},exit:function(e){return s.call(this,this._targetElement,e),this},refresh:function(){return function(){if(d.call(this,document.querySelector(".introjs-helperLayer")),d.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),d.call(this,document.querySelector(".introjs-disableInteraction")),void 0!==this._currentStep&&null!==this._currentStep){var e=document.querySelector(".introjs-helperNumberLayer"),t=document.querySelector(".introjs-arrow"),a=document.querySelector(".introjs-tooltip");l.call(this,this._introItems[this._currentStep].element,a,t,e)}return C.call(this),this}.call(this),this},onbeforechange:function(e){if("function"!=typeof e)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=e,this},onchange:function(e){if("function"!=typeof e)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=e,this},onafterchange:function(e){if("function"!=typeof e)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=e,this},oncomplete:function(e){if("function"!=typeof e)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=e,this},onhintsadded:function(e){if("function"!=typeof e)throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=e,this},onhintclick:function(e){if("function"!=typeof e)throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=e,this},onhintclose:function(e){if("function"!=typeof e)throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=e,this},onexit:function(e){if("function"!=typeof e)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=e,this},onskip:function(e){if("function"!=typeof e)throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=e,this},onbeforeexit:function(e){if("function"!=typeof e)throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=e,this},addHints:function(){return x.call(this,this._targetElement),this},hideHint:function(e){return P.call(this,e),this},hideHints:function(){return function(){_(T(".introjs-hint"),function(e){P.call(this,e.getAttribute("data-step"))}.bind(this))}.call(this),this},showHint:function(e){return R.call(this,e),this},showHints:function(){return function(){var e=T(".introjs-hint");e&&e.length?_(e,function(e){R.call(this,e.getAttribute("data-step"))}.bind(this)):x.call(this,this._targetElement)}.call(this),this},removeHints:function(){return function(){_(T(".introjs-hint"),function(e){A.call(this,e.getAttribute("data-step"))}.bind(this))}.call(this),this},removeHint:function(e){return A.call(this,e),this},showHintDialog:function(e){return O.call(this,e),this}},F},e.exports=n(),e.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),n().apply(this,arguments)}},516:function(e,t,a){
29
+ /*!
30
+ Papa Parse
31
+ v4.1.1
32
+ https://github.com/mholt/PapaParse
33
+ */
34
+ !function(t){"use strict";function a(e){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:{}},function(e){var t=p(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}.call(this,e),this.parseChunk=function(e){var a=this._partialLine+e;this._partialLine="";var n=this._handle.parse(a,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var r=n.meta.cursor;this._finished||(this._partialLine=a.substring(r-this._baseIndex),this._baseIndex=r),n&&n.data&&(this._rowCount+=n.data.length);var i=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(f)t.postMessage({results:n,workerId:v.WORKER_ID,finished:i});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),!i||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),i||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(e){m(this._config.error)?this._config.error(e):f&&this._config.error&&t.postMessage({workerId:v.WORKER_ID,error:e,finished:!1})}}function n(e){var t;(e=e||{}).chunkSize||(e.chunkSize=v.RemoteChunkSize),a.call(this,e),this._nextChunk=f?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,f||(t.onload=d(this._chunkLoaded,this),t.onerror=d(this._chunkError,this)),t.open("GET",this._input,!f),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+e),t.setRequestHeader("If-None-Match","webkit-no-cache")}try{t.send()}catch(e){this._chunkError(e.message)}f&&0==t.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){if(4==t.readyState){if(t.status<200||t.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>function(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)}},this._chunkError=function(e){var a=t.statusText||e;this._sendError(a)}}function r(e){(e=e||{}).chunkSize||(e.chunkSize=v.LocalChunkSize),a.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=d(this._chunkLoaded,this),t.onerror=d(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 a=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,a)}var i=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:i}})},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 i(e){var t;e=e||{},a.call(this,e),this.stream=function(e){return e,t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,a=e?t.substr(0,e):t;return t=e?t.substr(e):"",this._finished=!t,this.parseChunk(a)}}}function o(e){function t(){if(_&&l&&(r("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+v.DefaultDelimiter+"'"),l=!1),e.skipEmptyLines)for(var t=0;t<_.data.length;t++)1==_.data[t].length&&""==_.data[t][0]&&_.data.splice(t--,1);return a()&&function(){if(_){for(var e=0;a()&&e<_.data.length;e++)for(var t=0;t<_.data[e].length;t++)g.push(_.data[e][t]);_.data.splice(0,1)}}(),function(){if(!_||!e.header&&!e.dynamicTyping)return _;for(var t=0;t<_.data.length;t++){for(var a={},i=0;i<_.data[t].length;i++){if(e.dynamicTyping){var o=_.data[t][i];_.data[t][i]="true"==o||"TRUE"==o||"false"!=o&&"FALSE"!=o&&n(o)}e.header&&(i>=g.length?(a.__parsed_extra||(a.__parsed_extra=[]),a.__parsed_extra.push(_.data[t][i])):a[g[i]]=_.data[t][i])}e.header&&(_.data[t]=a,i>g.length?r("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+i,t):i<g.length&&r("FieldMismatch","TooFewFields","Too few fields: expected "+g.length+" fields but parsed "+i,t))}return e.header&&_.meta&&(_.meta.fields=g),_}()}function a(){return e.header&&0==g.length}function n(e){return c.test(e)?parseFloat(e):e}function r(e,t,a,n){_.errors.push({type:e,code:t,message:a,row:n})}var i,o,l,c=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,u=this,d=0,h=!1,f=!1,g=[],_={data:[],errors:[],meta:{}};if(m(e.step)){var b=e.step;e.step=function(n){if(_=n,a())t();else{if(t(),0==_.data.length)return;d+=n.data.length,e.preview&&d>e.preview?o.abort():b(_,u)}}}this.parse=function(a,n,r){if(e.newline||(e.newline=function(e){var t=(e=e.substr(0,1048576)).split("\r");if(1==t.length)return"\n";for(var a=0,n=0;n<t.length;n++)"\n"==t[n][0]&&a++;return a>=t.length/2?"\r\n":"\r"}(a)),l=!1,!e.delimiter){var c=function(t){for(var a,n,r,i=[",","\t","|",";",v.RECORD_SEP,v.UNIT_SEP],o=0;o<i.length;o++){var l=i[o],c=0,u=0;r=void 0;for(var p=new s({delimiter:l,preview:10}).parse(t),d=0;d<p.data.length;d++){var m=p.data[d].length;u+=m,void 0!==r?m>1&&(c+=Math.abs(m-r),r=m):r=m}u/=p.data.length,(void 0===n||n>c)&&u>1.99&&(n=c,a=l)}return e.delimiter=a,{successful:!!a,bestDelimiter:a}}(a);c.successful?e.delimiter=c.bestDelimiter:(l=!0,e.delimiter=v.DefaultDelimiter),_.meta.delimiter=e.delimiter}var u=p(e);return e.preview&&e.header&&u.preview++,i=a,o=new s(u),_=o.parse(i,n,r),t(),h?{meta:{paused:!0}}:_||{meta:{paused:!1}}},this.paused=function(){return h},this.pause=function(){h=!0,o.abort(),i=i.substr(o.getCharIndex())},this.resume=function(){h=!1,u.streamer.parseChunk(i)},this.aborted=function(){return f},this.abort=function(){f=!0,o.abort(),_.meta.aborted=!0,m(e.complete)&&e.complete(_),i=""}}function s(e){var t=(e=e||{}).delimiter,a=e.newline,n=e.comments,r=e.step,i=e.preview,o=e.fastMode;if(("string"!=typeof t||v.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";!0===n?n="#":("string"!=typeof n||v.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=a&&"\r"!=a&&"\r\n"!=a&&(a="\n");var s=0,l=!1;this.parse=function(e,c,u){function p(e){w.push(e),I=s}function d(t){return u?h():(t||(t=e.substr(s)),k.push(t),s=g,p(k),y&&f(),h())}function m(t){s=t,p(k),k=[],C=e.indexOf(a,s)}function h(e){return{data:w,errors:E,meta:{delimiter:t,linebreak:a,aborted:l,truncated:!!e,cursor:I+(c||0)}}}function f(){r(h()),w=[],E=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,_=t.length,b=a.length,v=n.length,y="function"==typeof r;s=0;var w=[],E=[],k=[],I=0;if(!e)return h();if(o||!1!==o&&-1===e.indexOf('"')){for(var S=e.split(a),N=0;N<S.length;N++){k=S[N];if(s+=k.length,N!==S.length-1)s+=a.length;else if(u)return h();if(!n||k.substr(0,v)!=n){if(y){if(w=[],p(k.split(t)),f(),l)return h()}else p(k.split(t));if(i&&N>=i)return w=w.slice(0,i),h(!0)}}return h()}for(var x=e.indexOf(t,s),C=e.indexOf(a,s);;)if('"'!=e[s])if(n&&0===k.length&&e.substr(s,v)===n){if(-1==C)return h();s=C+b,C=e.indexOf(a,s),x=e.indexOf(t,s)}else if(-1!==x&&(C>x||-1===C))k.push(e.substring(s,x)),s=x+_,x=e.indexOf(t,s);else{if(-1===C)break;if(k.push(e.substring(s,C)),m(C+b),y&&(f(),l))return h();if(i&&w.length>=i)return h(!0)}else{var T=s;for(s++;;){if(-1===(T=e.indexOf('"',T+1)))return u||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:s}),d();if(T===g-1)return d(e.substring(s,T).replace(/""/g,'"'));if('"'!=e[T+1]){if(e[T+1]==t){k.push(e.substring(s,T).replace(/""/g,'"')),s=T+1+_,x=e.indexOf(t,s),C=e.indexOf(a,s);break}if(e.substr(T+1,b)===a){if(k.push(e.substring(s,T).replace(/""/g,'"')),m(T+1+b),x=e.indexOf(t,s),y&&(f(),l))return h();if(i&&w.length>=i)return h(!0);break}}else T++}}return d()},this.abort=function(){l=!0},this.getCharIndex=function(){return s}}function l(e){var t=e.data,a=_[t.workerId],n=!1;if(t.error)a.userError(t.error,t.file);else if(t.results&&t.results.data){var r={abort:function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:u,resume:u};if(m(a.userStep)){for(var i=0;i<t.results.data.length&&(a.userStep({data:[t.results.data[i]],errors:t.results.errors,meta:t.results.meta},r),!n);i++);delete t.results}else m(a.userChunk)&&(a.userChunk(t.results,r,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var a=_[e];m(a.userComplete)&&a.userComplete(t),a.terminate(),delete _[e]}function u(){throw"Not implemented."}function p(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var a in e)t[a]=p(e[a]);return t}function d(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var h,f=!t.document&&!!t.postMessage,g=!1,_={},b=0,v={};if(v.parse=function(e,a){if((a=a||{}).worker&&v.WORKERS_SUPPORTED){var o=function(){if(!v.WORKERS_SUPPORTED)return!1;if(!g&&null===v.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 e=new t.Worker(v.SCRIPT_PATH||h);return e.onmessage=l,e.id=b++,_[e.id]=e,e}();return o.userStep=a.step,o.userChunk=a.chunk,o.userComplete=a.complete,o.userError=a.error,a.step=m(a.step),a.chunk=m(a.chunk),a.complete=m(a.complete),a.error=m(a.error),delete a.worker,void o.postMessage({input:e,config:a,workerId:o.id})}var s=null;return"string"==typeof e?s=a.download?new n(a):new i(a):(t.File&&e instanceof File||e instanceof Object)&&(s=new r(a)),s.stream(e)},v.unparse=function(e,t){function a(e){if("object"!=typeof e)return[];var t=[];for(var a in e)t.push(a);return t}function n(e,t){var a="";"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 l=0;l<e.length;l++)l>0&&(a+=o),a+=r(e[l],l);t.length>0&&(a+=s)}for(var c=0;c<t.length;c++){for(var u=n?e.length:t[c].length,p=0;u>p;p++){p>0&&(a+=o);var d=n&&i?e[p]:p;a+=r(t[c][d],p)}c<t.length-1&&(a+=s)}return a}function r(e,t){return null==e?"":(e=e.toString().replace(/"/g,'""'),"boolean"==typeof i&&i||i instanceof Array&&i[t]||function(e,t){for(var a=0;a<t.length;a++)if(e.indexOf(t[a])>-1)return!0;return!1}(e,v.BAD_DELIMITERS)||e.indexOf(o)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1)?'"'+e+'"':e)}var i=!1,o=",",s="\r\n";if("object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==v.BAD_DELIMITERS.indexOf(t.delimiter)&&(o=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(i=t.quotes),"string"==typeof t.newline&&(s=t.newline)),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return n(null,e);if("object"==typeof e[0])return n(a(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:a(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),n(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"},v.RECORD_SEP=String.fromCharCode(30),v.UNIT_SEP=String.fromCharCode(31),v.BYTE_ORDER_MARK="\ufeff",v.BAD_DELIMITERS=["\r","\n",'"',v.BYTE_ORDER_MARK],v.WORKERS_SUPPORTED=!!t.Worker,v.SCRIPT_PATH=null,v.LocalChunkSize=10485760,v.RemoteChunkSize=5242880,v.DefaultDelimiter=",",v.Parser=s,v.ParserHandle=o,v.NetworkStreamer=n,v.FileStreamer=r,v.StringStreamer=i,e.exports?e.exports=v:m(t.define)&&t.define.amd?t.define(function(){return v}):t.Papa=v,t.jQuery){var y=t.jQuery;y.fn.parse=function(e){function a(){if(0!=i.length){var t=i[0];if(m(e.before)){var a=e.before(t.file,t.inputElem);if("object"==typeof a){if("abort"==a.action)return void function(t,a,n,r){m(e.error)&&e.error({name:t},a,n,r)}("AbortError",t.file,t.inputElem,a.reason);if("skip"==a.action)return void n();"object"==typeof a.config&&(t.instanceConfig=y.extend(t.instanceConfig,a.config))}else if("skip"==a)return void n()}var r=t.instanceConfig.complete;t.instanceConfig.complete=function(e){m(r)&&r(e,t.file,t.inputElem),n()},v.parse(t.file,t.instanceConfig)}else m(e.complete)&&e.complete()}function n(){i.splice(0,1),a()}var r=e.config||{},i=[];return this.each(function(){if(!("INPUT"==y(this).prop("tagName").toUpperCase()&&"file"==y(this).attr("type").toLowerCase()&&t.FileReader)||!this.files||0==this.files.length)return!0;for(var e=0;e<this.files.length;e++)i.push({file:this.files[e],inputElem:this,instanceConfig:y.extend({},r)})}),a(),this}}f?t.onmessage=function(e){var a=e.data;if(void 0===v.WORKER_ID&&a&&(v.WORKER_ID=a.workerId),"string"==typeof a.input)t.postMessage({workerId:v.WORKER_ID,results:v.parse(a.input,a.config),finished:!0});else if(t.File&&a.input instanceof File||a.input instanceof Object){var n=v.parse(a.input,a.config);n&&t.postMessage({workerId:v.WORKER_ID,results:n,finished:!0})}}:v.WORKERS_SUPPORTED&&(h=function(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}(),document.body?document.addEventListener("DOMContentLoaded",function(){g=!0},!0):g=!0),n.prototype=Object.create(a.prototype),n.prototype.constructor=n,r.prototype=Object.create(a.prototype),r.prototype.constructor=r,i.prototype=Object.create(i.prototype),i.prototype.constructor=i}("undefined"!=typeof window?window:this)},517:function(e,t,a){e.exports=a(644)},518:function(e,t,a){e.exports=a(648)},601:function(e,t,a){"use strict";a.r(t);var n=a(11),r=a.n(n),i=a(10),o=a.n(i),s=a(12),l=a.n(s),c=a(13),u=a.n(c),p=a(14),d=a.n(p),m=a(43),h=a.n(m),f=a(30),g=a.n(f),_=a(15),b=a.n(_),v=a(22),y=a.n(v),w=a(8),E=a.n(w),k=a(73),I=a.n(k),S=a(0),N=a.n(S),x=a(302),C=a(1),T=a(2),P=a.n(T),R=a(126),A=a.n(R),j=a(37),O=a.n(j),L=[{name:"email",label:C.a.I18n.t("email"),type:"text",disabled:function(e){return Number(e.wp_user_id>0)||1===Number(e.is_woocommerce_user)}},{name:"first_name",label:C.a.I18n.t("firstname"),type:"text",disabled:function(e){return Number(e.wp_user_id>0)||1===Number(e.is_woocommerce_user)}},{name:"last_name",label:C.a.I18n.t("lastname"),type:"text",disabled:function(e){return Number(e.wp_user_id>0)||1===Number(e.is_woocommerce_user)}},{name:"status",label:C.a.I18n.t("status"),type:"select",automationId:"subscriber-status",values:{subscribed:C.a.I18n.t("subscribed"),unconfirmed:C.a.I18n.t("unconfirmed"),unsubscribed:C.a.I18n.t("unsubscribed"),inactive:C.a.I18n.t("inactive"),bounced:C.a.I18n.t("bounced")}},{name:"segments",label:C.a.I18n.t("lists"),type:"selection",placeholder:C.a.I18n.t("selectList"),tip:C.a.I18n.t("welcomeEmailTip"),api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,selected:function(e){var t,a;return!1===I()(e.subscriptions)?null:E()(t=y()(a=e.subscriptions).call(a,function(e){return"subscribed"===e.status})).call(t,function(e){return e.segment_id})},filter:function(e){return!e.deleted_at&&"default"===e.type},getLabel:function(e){var t;return b()(t="".concat(e.name," (")).call(t,e.subscribers,")")},getSearchLabel:function(e,t){var a,n="";void 0!==t.subscriptions&&g()(a=t.subscriptions).call(a,function(t){if(e.id===t.segment_id&&(n=e.name,"unsubscribed"===t.status)){var a=C.a.Date.format(t.updated_at);n+=" (%$1s)".replace("%$1s",C.a.I18n.t("unsubscribedOn").replace("%$1s",a))}});return n}}],D=window.mailpoet_custom_fields||[];g()(D).call(D,function(e){var t={name:"cf_".concat(e.id),label:e.name,type:e.type};switch(e.params&&(t.params=e.params),h()(e.params)&&(t.values=h()(e.params)),e.type){case"date":t.year_placeholder=C.a.I18n.t("year"),t.month_placeholder=C.a.I18n.t("month"),t.day_placeholder=C.a.I18n.t("day");break;case"select":t.placeholder="-";break;default:t.placeholder=""}L.push(t)});var q={onUpdate:function(){C.a.Notice.success(C.a.I18n.t("subscriberUpdated"))},onCreate:function(){C.a.Notice.success(C.a.I18n.t("subscriberAdded")),C.a.trackEvent("Subscribers > Add new",{"MailPoet Free version":window.mailpoet_version})}};function M(e){if(Number(e.wp_user_id)>0)return N.a.createElement("p",{className:"description"},O()(C.a.I18n.t("WPUserEditNotice"),/\[link\](.*?)\[\/link\]/g,function(t,a){return N.a.createElement("a",{key:a,href:"user-edit.php?user_id=".concat(e.wp_user_id)},t)}))}function F(){return N.a.createElement("p",{className:"description"},N.a.createElement("strong",null,C.a.I18n.t("tip"))," ",C.a.I18n.t("customFieldsTip"))}var B=function(e){function t(){return r()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),o()(t,[{key:"render",value:function(){return N.a.createElement("div",null,N.a.createElement("h1",{className:"title"},C.a.I18n.t("subscriber"),N.a.createElement(x.a,{className:"page-title-action",to:"/"},C.a.I18n.t("backToList"))),N.a.createElement(A.a,{automationId:"subscriber_edit_form",endpoint:"subscribers",fields:L,params:this.props.match.params,messages:q,beforeFormContent:M,afterFormContent:F}))}}]),t}(N.a.Component);B.propTypes={match:P.a.shape({params:P.a.shape({id:P.a.string}).isRequired}).isRequired},t.default=B},602:function(e,t,a){var n=a(503);e.exports=function(e){if(n(e)){for(var t=0,a=new Array(e.length);t<e.length;t++)a[t]=e[t];return a}}},603:function(e,t,a){var n=a(604),r=a(608);e.exports=function(e){if(r(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return n(e)}},604:function(e,t,a){e.exports=a(605)},605:function(e,t,a){e.exports=a(606)},606:function(e,t,a){a(92),a(607);var n=a(24);e.exports=n.Array.from},607:function(e,t,a){var n=a(17),r=a(309);n({target:"Array",stat:!0,forced:!a(506)(function(e){Array.from(e)})},{from:r})},608:function(e,t,a){e.exports=a(609)},609:function(e,t,a){a(87),a(92),e.exports=a(610)},610:function(e,t,a){var n=a(86),r=a(27),i=a(69),o=r("iterator");e.exports=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(n(t))}},611:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},612:function(e,t,a){e.exports=a(613)},613:function(e,t,a){var n=a(614),r=Array.prototype;e.exports=function(e){var t=e.sort;return e===r||e instanceof Array&&t===r.sort?n:t}},614:function(e,t,a){a(615);var n=a(40);e.exports=n("Array").sort},615:function(e,t,a){"use strict";var n=a(17),r=a(68),i=a(48),o=a(26),s=a(105),l=[].sort,c=[1,2,3],u=o(function(){c.sort(void 0)}),p=o(function(){c.sort(null)}),d=s("sort");n({target:"Array",proto:!0,forced:u||!p||d},{sort:function(e){return void 0===e?l.call(i(this)):l.call(i(this),r(e))}})},634:function(e,t,a){e.exports=a(635)},635:function(e,t,a){a(636);var n=a(24);e.exports=n.Number.isFinite},636:function(e,t,a){a(17)({target:"Number",stat:!0},{isFinite:a(637)})},637:function(e,t,a){var n=a(25).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&n(e)}},638:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(302),o=a(1),s=a(126),l=a.n(s),c=a(2),u=a.n(c),p=[{name:"name",label:o.a.I18n.t("name"),type:"text"},{name:"description",label:o.a.I18n.t("description"),type:"textarea",tip:o.a.I18n.t("segmentDescriptionTip")}],d={onUpdate:function(){o.a.Notice.success(o.a.I18n.t("segmentUpdated"))},onCreate:function(){o.a.Notice.success(o.a.I18n.t("segmentAdded")),o.a.trackEvent("Lists > Add new",{"MailPoet Free version":window.mailpoet_version})}},m=function(e){return r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},o.a.I18n.t("segment"),r.a.createElement(i.a,{className:"page-title-action",to:"/"},o.a.I18n.t("backToList"))),r.a.createElement(l.a,{endpoint:"segments",fields:p,params:e.match.params,messages:d}))};m.propTypes={match:u.a.shape({params:u.a.shape({id:u.a.string}).isRequired}).isRequired},t.default=m},644:function(e,t,a){e.exports=a(645)},645:function(e,t,a){var n=a(646),r=Array.prototype;e.exports=function(e){var t=e.slice;return e===r||e instanceof Array&&t===r.slice?n:t}},646:function(e,t,a){a(647);var n=a(40);e.exports=n("Array").slice},647:function(e,t,a){"use strict";var n=a(17),r=a(39),i=a(88),o=a(104),s=a(60),l=a(51),c=a(120),u=a(95),p=a(27)("species"),d=[].slice,m=Math.max;n({target:"Array",proto:!0,forced:!u("slice")},{slice:function(e,t){var a,n,u,h=l(this),f=s(h.length),g=o(e,f),_=o(void 0===t?f:t,f);if(i(h)&&("function"!=typeof(a=h.constructor)||a!==Array&&!i(a.prototype)?r(a)&&null===(a=a[p])&&(a=void 0):a=void 0,a===Array||void 0===a))return d.call(h,g,_);for(n=new(void 0===a?Array:a)(m(_-g,0)),u=0;g<_;g++,u++)g in h&&c(n,u,h[g]);return n.length=u,n}})},648:function(e,t,a){e.exports=a(649)},649:function(e,t,a){var n=a(650),r=Array.prototype;e.exports=function(e){var t=e.fill;return e===r||e instanceof Array&&t===r.fill?n:t}},650:function(e,t,a){a(651);var n=a(40);e.exports=n("Array").fill},651:function(e,t,a){var n=a(17),r=a(652),i=a(107);n({target:"Array",proto:!0},{fill:r}),i("fill")},652:function(e,t,a){"use strict";var n=a(48),r=a(104),i=a(60);e.exports=function(e){for(var t=n(this),a=i(t.length),o=arguments.length,s=r(o>1?arguments[1]:void 0,a),l=o>2?arguments[2]:void 0,c=void 0===l?a:r(l,a);c>s;)t[s++]=e;return t}},653:function(e,t,a){e.exports=a(654)},654:function(e,t,a){var n=a(655),r=Array.prototype;e.exports=function(e){var t=e.reduce;return e===r||e instanceof Array&&t===r.reduce?n:t}},655:function(e,t,a){a(656);var n=a(40);e.exports=n("Array").reduce},656:function(e,t,a){"use strict";var n=a(17),r=a(657).left;n({target:"Array",proto:!0,forced:a(105)("reduce")},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},657:function(e,t,a){var n=a(68),r=a(48),i=a(84),o=a(60),s=function(e){return function(t,a,s,l){n(a);var c=r(t),u=i(c),p=o(c.length),d=e?p-1:0,m=e?-1:1;if(s<2)for(;;){if(d in u){l=u[d],d+=m;break}if(d+=m,e?d<0:p<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:p>d;d+=m)d in u&&(l=a(l,u[d],d,c));return l}};e.exports={left:s(!1),right:s(!0)}},658:function(e,t){jQuery.AsyncQueue=function(){var e,t,a,n,r=this,o=[],s=!1;return n=function(){var e=o.shift();e?(e.apply(r,[r]),!1===s&&n()):t&&t.apply(r)},this.onFailure=function(t){e=t},this.onComplete=function(e){t=e},this.add=function(e){return o.push(e),this},this.storeData=function(e){return a=e,this},this.lastCallbackData=function(){return a},this.run=function(){s=!1,n()},this.pause=function(){return s=!0,this},this.failure=function(){if(s=!0,e){var t=[r];for(i=0;i<arguments.length;i++)t.push(arguments[i]);e.apply(r,t)}},this}},659:function(e,t,a){e.exports=a(660)},660:function(e,t,a){e.exports=a(318)},661:function(e,t,a){e.exports=a(662)},662:function(e,t,a){e.exports=a(663)},663:function(e,t,a){a(664);var n=a(24).Object,r=e.exports=function(e,t){return n.getOwnPropertyDescriptor(e,t)};n.getOwnPropertyDescriptor.sham&&(r.sham=!0)},664:function(e,t,a){var n=a(17),r=a(26),i=a(51),o=a(90).f,s=a(41),l=r(function(){o(1)});n({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return o(i(e),t)}})},665:function(e,t,a){e.exports=a(666)},666:function(e,t,a){e.exports=a(317)},667:function(e,t,a){e.exports=a(668)},668:function(e,t,a){e.exports=a(320)},669:function(e,t,a){e.exports=a(670)},670:function(e,t,a){e.exports=a(671)},671:function(e,t,a){a(306);var n=a(24);e.exports=n.Object.getOwnPropertySymbols},672:function(e,t,a){e.exports=a(673)},673:function(e,t,a){e.exports=a(307)},677:function(e,t,a){e.exports=a(678)},678:function(e,t,a){a(679);var n=a(24);e.exports=n.Object.values},679:function(e,t,a){var n=a(17),r=a(680).values;n({target:"Object",stat:!0},{values:function(e){return r(e)}})},680:function(e,t,a){var n=a(41),r=a(85),i=a(51),o=a(83).f,s=function(e){return function(t){for(var a,s=i(t),l=r(s),c=l.length,u=0,p=[];c>u;)a=l[u++],n&&!o.call(s,a)||p.push(e?[a,s[a]]:s[a]);return p}};e.exports={entries:s(!0),values:s(!1)}},705:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(35),o=a.n(i),s=a(323),l=a.n(s),c=a(2),u=a.n(c),p=a(124),d=a(53),m=a.n(d),h=a(56),f=a.n(h),g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e};function _(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var b=function(e){function t(){var a,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return a=n=_(this,e.call.apply(e,[this].concat(i))),n.state={match:n.computeMatch(n.props.history.location.pathname)},_(n,a)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getChildContext=function(){return{router:g({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},t.prototype.computeMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}},t.prototype.componentWillMount=function(){var e=this,t=this.props,a=t.children,n=t.history;f()(null==a||1===r.a.Children.count(a),"A <Router> may have only one child element"),this.unlisten=n.listen(function(){e.setState({match:e.computeMatch(n.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){m()(this.props.history===e.history,"You cannot change <Router history>")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?r.a.Children.only(e):null},t}(r.a.Component);b.propTypes={history:u.a.object.isRequired,children:u.a.node},b.contextTypes={router:u.a.object},b.childContextTypes={router:u.a.object.isRequired};var v=b;function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var w=function(e){function t(){var a,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return a=n=y(this,e.call.apply(e,[this].concat(i))),n.history=Object(p.createHashHistory)(n.props),y(n,a)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){l()(!this.props.history,"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return r.a.createElement(v,{history:this.history,children:this.props.children})},t}(r.a.Component);w.propTypes={basename:u.a.string,getUserConfirmation:u.a.func,hashType:u.a.oneOf(["hashbang","noslash","slash"]),children:u.a.node};var E=w,k=a(327);var I=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){f()(this.context.router,"You should not use <Switch> outside a <Router>")},t.prototype.componentWillReceiveProps=function(e){m()(!(e.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),m()(!(!e.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,a=this.props.location||e.location,n=void 0,i=void 0;return r.a.Children.forEach(t,function(t){if(null==n&&r.a.isValidElement(t)){var o=t.props,s=o.path,l=o.exact,c=o.strict,u=o.sensitive,p=o.from,d=s||p;i=t,n=Object(k.a)(a.pathname,{path:d,exact:l,strict:c,sensitive:u},e.match)}}),n?r.a.cloneElement(i,{location:a,computedMatch:n}):null},t}(r.a.Component);I.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},I.propTypes={children:u.a.node,location:u.a.object};var S=I,N=a(326).a,x=a(30),C=a.n(x),T=a(15),P=a.n(T),R=a(11),A=a.n(R),j=a(10),O=a.n(j),L=a(12),D=a.n(L),q=a(13),M=a.n(q),F=a(6),B=a.n(F),$=a(14),V=a.n($),H=a(7),W=a.n(H),z=a(302),U=a(4),K=a.n(U),G=a(1),J=a(18),Y=a.n(J),Q=a(61),X=a.n(Q),Z=a(111),ee=a.n(Z),te=[{name:"email",label:G.a.I18n.t("subscriber"),sortable:!0},{name:"status",label:G.a.I18n.t("status"),sortable:!0},{name:"segments",label:G.a.I18n.t("lists")},{name:"created_at",label:G.a.I18n.t("subscribedOn"),sortable:!0},{name:"updated_at",label:G.a.I18n.t("lastModifiedOn"),sortable:!0}],ae={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSubscriberTrashed"):G.a.I18n.t("multipleSubscribersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSubscriberDeleted"):G.a.I18n.t("multipleSubscribersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSubscriberRestored"):G.a.I18n.t("multipleSubscribersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onNoItemsFound:function(e){return"bounced"===e&&!window.mailpoet_premium_active&&!window.mss_active&&r.a.createElement("div",null,r.a.createElement("p",null,G.a.I18n.t("bouncedSubscribersHelp")),r.a.createElement("p",null,r.a.createElement("a",{href:"admin.php?page=mailpoet-premium",className:"button-primary"},G.a.I18n.t("bouncedSubscribersPremiumButtonText"))))}},ne=[{name:"moveToList",label:G.a.I18n.t("moveToList"),onSelect:function(){return r.a.createElement(ee.a,{field:{id:"move_to_segment",name:"move_to_segment",endpoint:"segments",filter:function(e){return!(e.deleted_at||"default"!==e.type)}}})},getData:function(){return{segment_id:Number(K()("#move_to_segment").val())}},onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleSubscribersMovedToList").replace("%$1d",Number(e.meta.count).toLocaleString()).replace("%$2s",e.meta.segment))}},{name:"addToList",label:G.a.I18n.t("addToList"),onSelect:function(){return r.a.createElement(ee.a,{field:{id:"add_to_segment",name:"add_to_segment",endpoint:"segments",filter:function(e){return!(e.deleted_at||"default"!==e.type)}}})},getData:function(){return{segment_id:Number(K()("#add_to_segment").val())}},onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleSubscribersAddedToList").replace("%$1d",Number(e.meta.count).toLocaleString()).replace("%$2s",e.meta.segment))}},{name:"removeFromList",label:G.a.I18n.t("removeFromList"),onSelect:function(){return r.a.createElement(ee.a,{field:{id:"remove_from_segment",name:"remove_from_segment",endpoint:"segments",filter:function(e){return!("default"!==e.type)}}})},getData:function(){return{segment_id:Number(K()("#remove_from_segment").val())}},onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleSubscribersRemovedFromList").replace("%$1d",Number(e.meta.count).toLocaleString()).replace("%$2s",e.meta.segment))}},{name:"removeFromAllLists",label:G.a.I18n.t("removeFromAllLists"),onSuccess:function(e){G.a.Notice.success(G.a.I18n.t("multipleSubscribersRemovedFromAllLists").replace("%$1d",Number(e.meta.count).toLocaleString()))}},{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:ae.onTrash}],re=[{name:"edit",label:G.a.I18n.t("edit"),link:function(e){return r.a.createElement(z.a,{to:"/edit/".concat(e.id)},G.a.I18n.t("edit"))}},{name:"sendConfirmationEmail",label:G.a.I18n.t("resendConfirmationEmail"),display:function(e){return"unconfirmed"===e.status&&e.count_confirmations<window.mailpoet_max_confirmation_emails},onClick:function(e){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"subscribers",action:"sendConfirmationEmail",data:{id:e.id}}).done(function(){return G.a.Notice.success(G.a.I18n.t("oneConfirmationEmailSent"))}).fail(function(e){return G.a.Notice.showApiErrorNotice(e)})}},{name:"trash",display:function(e){return 0===Number(e.wp_user_id)&&0===Number(e.is_woocommerce_user)}}],ie=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"getSegmentFromId",function(e){var t,a=!1;return C()(t=window.mailpoet_segments).call(t,function(t){t.id===e&&(a=t)}),a}),W()(B()(n),"renderItem",function(e,t){var a=Y()("manage-column","column-primary","has-row-actions","column-username"),i="";switch(e.status){case"subscribed":i=G.a.I18n.t("subscribed");break;case"unconfirmed":i=G.a.I18n.t("unconfirmed");break;case"unsubscribed":i=G.a.I18n.t("unsubscribed");break;case"inactive":i=G.a.I18n.t("inactive");break;case"bounced":i=G.a.I18n.t("bounced");break;default:i="Invalid"}var o=!1;if(e.subscriptions.length>0){var s,l=[];C()(s=e.subscriptions).call(s,function(e){var t=n.getSegmentFromId(e.segment_id);!1!==t&&"subscribed"===e.status&&l.push(t.name)}),o=r.a.createElement("span",null,l.join(", "))}return r.a.createElement("div",null,r.a.createElement("td",{className:a},r.a.createElement("strong",null,r.a.createElement(z.a,{className:"row-title",to:"/edit/".concat(e.id)},e.email)),r.a.createElement("p",{style:{margin:0}},e.first_name," ",e.last_name),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},i),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("lists")},o),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("subscribedOn")},r.a.createElement("abbr",null,G.a.Date.format(e.created_at))),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("lastModifiedOn")},r.a.createElement("abbr",null,G.a.Date.format(e.updated_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},G.a.I18n.t("pageTitle")," ",r.a.createElement(z.a,{className:"page-title-action",to:"/new"},G.a.I18n.t("new")),r.a.createElement("a",{className:"page-title-action",href:"?page=mailpoet-import","data-automation-id":"import-subscribers-button"},G.a.I18n.t("import")),r.a.createElement("a",{id:"mailpoet_export_button",className:"page-title-action",href:"?page=mailpoet-export"},G.a.I18n.t("export"))),r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"subscribers",onRenderItem:this.renderItem,columns:te,bulk_actions:ne,item_actions:re,messages:ae,sort_by:"created_at",sort_order:"desc"}))}}]),t}(r.a.Component);ie.propTypes={location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired};var oe=ie,se=a(492),le=a.n(se),ce=document.getElementById("subscribers_container");ce&&o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{path:"/new",component:le.a}),r.a.createElement(N,{path:"/edit/:id",component:le.a}),r.a.createElement(N,{path:"*",component:oe}))),ce);var ue=a(100),pe=a.n(ue),de=a(8),me=a.n(de),he=a(129),fe=a(136),ge=a.n(fe),_e={},be=0,ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===e?e:function(e){var t=e,a=_e[t]||(_e[t]={});if(a[e])return a[e];var n=ge.a.compile(e);return be<1e4&&(a[e]=n,be++),n}(e)(t,{pretty:!0})},ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e};var we=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},t.prototype.componentWillMount=function(){f()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(he.createLocation)(e.to),a=Object(he.createLocation)(this.props.to);Object(he.locationsAreEqual)(t,a)?m()(!1,"You tried to redirect to the same route you're currently on: \""+a.pathname+a.search+'"'):this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,a=e.to;return t?"string"==typeof a?ve(a,t.params):ye({},a,{pathname:ve(a.pathname,t.params)}):a},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,a=this.computeTo(this.props);t?e.push(a):e.replace(a)},t.prototype.render=function(){return null},t}(r.a.Component);we.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},we.defaultProps={push:!1},we.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired};var Ee=we,ke=a(33),Ie=a.n(ke),Se=a(3),Ne=a.n(Se),xe=a(38),Ce=a.n(xe),Te=a(62),Pe=a.n(Te),Re=a(714),Ae=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"setupNewsletter",function(e){void 0!==e&&(n.props.history.push("/new/".concat(e)),G.a.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":e}))}),W()(B()(n),"getAutomaticEmails",function(){return window.mailpoet_automatic_emails?me()(Ne.a).call(Ne.a,window.mailpoet_automatic_emails,function(e){var t=e,a=window.mailpoet_premium_active?Ne.a.partial(n.setupNewsletter,e.slug):void 0;return t.disabled=!window.mailpoet_premium_active,t.action=r.a.createElement("div",null,r.a.createElement("a",{className:"button button-primary",onClick:a,role:"button",tabIndex:0,disabled:!window.mailpoet_premium_active,onKeyDown:function(e){var t,a;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(a=["Enter"," "]).call(a,e.key)&&(e.preventDefault(),n.onClick())}},G.a.I18n.t("setUp"))),t}):[]}),W()(B()(n),"createNewsletter",function(e){G.a.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":e}),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:e,subject:G.a.I18n.t("draftNewsletterTitle")}}).done(function(e){n.props.history.push("/template/".concat(e.data.id))}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}),n}return V()(t,e),O()(t,[{key:"render",value:function(){var e,t=Ne.a.partial(this.createNewsletter,"standard"),a=Ne.a.partial(this.setupNewsletter,"notification"),n=Ne.a.partial(this.setupNewsletter,"welcome"),i=[{slug:"standard",title:G.a.I18n.t("regularNewsletterTypeTitle"),description:G.a.I18n.t("regularNewsletterTypeDescription"),action:r.a.createElement("a",{className:"button button-primary","data-automation-id":"create_standard",onClick:t,role:"button",tabIndex:0,onKeyDown:function(e){var a,n;Ce()(a=["keydown","keypress"]).call(a,e.type)&&Ce()(n=["Enter"," "]).call(n,e.key)&&(e.preventDefault(),t())}},G.a.I18n.t("create"))},{slug:"welcome",title:G.a.I18n.t("welcomeNewsletterTypeTitle"),description:G.a.I18n.t("welcomeNewsletterTypeDescription"),videoGuide:"https://kb.mailpoet.com/article/254-video-guide-to-welcome-emails",videoGuideBeacon:"5b05ebf20428635ba8b2aa53",action:r.a.createElement("a",{className:"button button-primary",onClick:n,"data-automation-id":"create_welcome",onKeyDown:function(e){var t,a;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(a=["Enter"," "]).call(a,e.key)&&(e.preventDefault(),n())},role:"button",tabIndex:0},G.a.I18n.t("setUp"))},{slug:"notification",title:G.a.I18n.t("postNotificationNewsletterTypeTitle"),description:G.a.I18n.t("postNotificationNewsletterTypeDescription"),videoGuide:"https://kb.mailpoet.com/article/210-video-guide-to-post-notifications",videoGuideBeacon:"59ba6fb3042863033a1cd5a5",action:r.a.createElement("a",{className:"button button-primary","data-automation-id":"create_notification",onClick:a,role:"button",tabIndex:0,onKeyDown:function(e){var t,n;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(n=["Enter"," "]).call(n,e.key)&&(e.preventDefault(),a())}},G.a.I18n.t("setUp"))}],o=Ie.a.applyFilters("mailpoet_newsletters_types",P()(e=[]).call(e,i,pe()(this.getAutomaticEmails())),this),s=!0===window.mailpoet_is_new_user?"mailpoet_badge mailpoet_badge_video":"mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey";return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("pickCampaignType")),r.a.createElement(Pe.a,{step:"type"}),r.a.createElement("ul",{className:"mailpoet_boxes mailpoet_boxes_types"},me()(o).call(o,function(e){return r.a.createElement("li",{key:e.slug,"data-type":e.slug,className:"mailpoet_newsletter_types"},r.a.createElement("div",{className:"mailpoet_thumbnail"},e.thumbnailImage?r.a.createElement("img",{src:e.thumbnailImage,alt:""}):null),r.a.createElement("div",{className:"mailpoet_boxes_content"},r.a.createElement("div",{className:"mailpoet_description"},r.a.createElement("h3",null,e.title," ",e.beta?"(".concat(G.a.I18n.t("beta"),")"):""),r.a.createElement("p",null,e.description),e.disabled&&r.a.createElement("p",{"data-automation-id":"".concat(e.slug,"_premium_feature_notice")},r.a.createElement("span",{style:{color:"red"}},G.a.I18n.t("premiumFeature"))," ",r.a.createElement("a",{href:"?page=mailpoet-premium"},G.a.I18n.t("learnMore"))),e.videoGuide&&r.a.createElement("a",{className:s,href:e.videoGuide,"data-beacon-article":e.videoGuideBeacon,target:"_blank",rel:"noopener noreferrer"},r.a.createElement("span",{className:"dashicons dashicons-format-video"}),G.a.I18n.t("seeVideoGuide"))),r.a.createElement("div",{className:"mailpoet_actions"},e.action)))},this)))}}]),t}(r.a.Component);W()(Ae,"propTypes",{history:u.a.shape({push:u.a.func.isRequired}).isRequired});var je=Object(Re.a)(Ae),Oe=a(44),Le=a.n(Oe),De=a(20),qe=a.n(De),Me=a(512),Fe=a.n(Me),Be=a(36),$e=a.n(Be),Ve=a(29),He=a.n(Ve),We=a(22),ze=a.n(We),Ue=a(9),Ke=a.n(Ue),Ge=function(e){function t(){return A()(this,t),D()(this,M()(t).apply(this,arguments))}return V()(t,e),O()(t,[{key:"componentWillMount",value:function(){G.a.Modal.loading(!0)}},{key:"componentWillUnmount",value:function(){G.a.Modal.loading(!1)}},{key:"render",value:function(){return null}}]),t}(r.a.Component),Je=function(e){var t=e.tabs,a=e.selected,n=e.select;return r.a.createElement("div",{className:"wp-filter hide-if-no-js"},r.a.createElement("ul",{className:"filter-links"},me()(t).call(t,function(e){var t=e.name,i=e.label;return r.a.createElement("li",{key:t},r.a.createElement("a",{href:"javascript:",className:a===t?"current":"",onClick:function(){return n(t)}}," ",i))})))};Je.propTypes={selected:u.a.string.isRequired,select:u.a.func.isRequired,tabs:u.a.arrayOf(u.a.shape({label:u.a.string.isRequired,name:u.a.string.isRequired}).isRequired).isRequired};var Ye=Je,Qe=a(296),Xe=a.n(Qe),Ze=function(e){return G.a.Modal.popup({title:e.title,template:Xe.a.renderToString(r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,e.message),r.a.createElement("button",{id:"mailpoet_alert_cancel",className:"button button-secondary",type:"button"},e.cancelLabel),r.a.createElement("button",{id:"mailpoet_alert_confirm",className:"button button-primary",type:"submit"},e.confirmLabel))),onInit:function(){document.getElementById("mailpoet_alert_confirm").addEventListener("click",function(){G.a.Modal.close(),e.onConfirm()}),document.getElementById("mailpoet_alert_cancel").addEventListener("click",function(){return G.a.Modal.close()})}}),null};function et(e){Xe.a.renderToString(r.a.createElement(Ze,e))}Ze.propTypes={title:u.a.string,message:u.a.string.isRequired,cancelLabel:u.a.string,confirmLabel:u.a.string,onConfirm:u.a.func.isRequired},Ze.defaultProps={title:G.a.I18n.t("confirmTitle"),cancelLabel:G.a.I18n.t("cancelLabel"),confirmLabel:G.a.I18n.t("confirmLabel")};var tt=function(e){function t(e){var a,n,r,i;return A()(this,t),(i=D()(this,M()(t).call(this,e))).onPreview=Ke()(a=i.onPreview).call(a,B()(i)),i.onDelete=Ke()(n=i.onDelete).call(n,B()(i)),i.onSelect=Ke()(r=i.onSelect).call(r,B()(i)),i}return V()(t,e),O()(t,[{key:"onDelete",value:function(){var e=this.props,t=e.id,a=e.name,n=e.beforeDelete,r=e.afterDelete;et({message:G.a.I18n.t("confirmTemplateDeletion").replace("%$1s",a),onConfirm:function(){n(),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"delete",data:{id:t}}).done(function(){r(!0,t)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0}),r(!1)})}})}},{key:"onPreview",value:function(){G.a.Modal.popup({title:this.props.name,template:'<img src="{{ thumbnail }}" />',data:this.props})}},{key:"onSelect",value:function(){var e=this.props,t=e.newsletterId,a=e.name,n=e.beforeSelect,r=e.afterSelect;n(),G.a.trackEvent("Emails > Template selected",{"MailPoet Free version":window.mailpoet_version,"Email name":a}),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:{id:t,template_id:this.props.id}}).done(function(e){r(!0,e.data.id)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0});r(!1)})}},{key:"render",value:function(){var e=this,t=this.props,a=t.index,n=t.name,i=t.thumbnail,o=t.readonly,s=r.a.createElement("button",{className:"mailpoet_delete button button-secondary",onClick:this.onDelete,type:"button"},G.a.I18n.t("delete")),l="";return"string"==typeof i&&i.length>0&&(l=r.a.createElement("a",{href:"javascript:;",onClick:this.onPreview},r.a.createElement("img",{src:i,alt:G.a.I18n.t("templatePreview")}),r.a.createElement("div",{className:"mailpoet_overlay"},r.a.createElement("p",{className:"mailpoet_more_details"},G.a.I18n.t("zoom"))))),r.a.createElement("li",{className:"mailpoet_template_boxes","data-automation-id":"select_template_box"},r.a.createElement("div",{className:"mailpoet_thumbnail"},l),r.a.createElement("div",{className:"mailpoet_template_content"},r.a.createElement("div",{className:"mailpoet_description"},r.a.createElement("h3",null,n)),r.a.createElement("div",{className:"mailpoet_actions"},"1"!==o&&s,r.a.createElement("a",{className:"button button-primary","data-automation-id":"select_template_".concat(a),onClick:this.onSelect,role:"button",tabIndex:0,onKeyDown:function(t){var a,n;Ce()(a=["keydown","keypress"]).call(a,t.type)&&Ce()(n=["Enter"," "]).call(n,t.key)&&(t.preventDefault(),e.onSelect())}}," ",G.a.I18n.t("select")," "))))}}]),t}(r.a.Component);tt.propTypes={index:u.a.number.isRequired,id:u.a.string.isRequired,newsletterId:u.a.string.isRequired,name:u.a.string.isRequired,thumbnail:u.a.string.isRequired,readonly:u.a.string.isRequired,beforeDelete:u.a.func.isRequired,afterDelete:u.a.func.isRequired,beforeSelect:u.a.func.isRequired,afterSelect:u.a.func.isRequired};var at=tt,nt=a(31),rt=a.n(nt),it=a(79),ot=a.n(it),st=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).fileRef=r.a.createRef(),n.handleSubmit=Ke()(a=n.handleSubmit).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"saveTemplate",value:function(e){var t,a,n,r,i=e,o=this.props,s=o.beforeImport,l=o.afterImport;Ne.a.isUndefined(i.body)||(i.body=rt()(i.body));try{i.categories=JSON.parse(i.categories)}catch(e){i.categories=[]}-1===He()(t=i.categories).call(t,"saved")&&i.categories.push("saved"),-1===He()(a=i.categories).call(a,"standard")&&-1===He()(n=i.categories).call(n,"welcome")&&-1===He()(r=i.categories).call(r,"notification")&&i.categories.push("standard"),i.categories=rt()(i.categories),s(),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:i}).done(function(e){l(!0,e.data)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0});l(!1)})}},{key:"handleSubmit",value:function(e){var t=this;if(e.preventDefault(),Ne.a.size(this.fileRef.current.files)<=0)return!1;var a=Ne.a.first(this.fileRef.current.files),n=new FileReader;return n.onload=function(e){try{t.saveTemplate(JSON.parse(e.target.result)),G.a.trackEvent("Emails > Template imported",{"MailPoet Free version":window.mailpoet_version})}catch(e){G.a.Notice.error(G.a.I18n.t("templateFileMalformedError"))}},n.readAsText(a),!0}},{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("importTemplateTitle"),r.a.createElement(ot.a,{tooltip:G.a.I18n.t("helpTooltipTemplateUpload"),place:"right",className:"tooltip-help-import-template"})),r.a.createElement("form",{onSubmit:this.handleSubmit},r.a.createElement("input",{type:"file",placeholder:G.a.I18n.t("selectJsonFileToUpload"),ref:this.fileRef}),r.a.createElement("p",{className:"submit"},r.a.createElement("input",{className:"button button-primary",type:"submit",value:G.a.I18n.t("upload")}))))}}]),t}(r.a.Component);st.propTypes={beforeImport:u.a.func.isRequired,afterImport:u.a.func.isRequired};var lt=st,ct=[{name:"standard",label:G.a.I18n.t("tabStandardTitle")},{name:"welcome",label:G.a.I18n.t("tabWelcomeTitle")},{name:"notification",label:G.a.I18n.t("tabNotificationTitle")}];window.mailpoet_woocommerce_active&&ct.push({name:"woocommerce",label:G.a.I18n.t("tabWoocommerceTitle")}),ct.push.apply(ct,[{name:"all",label:G.a.I18n.t("allTemplates")},{name:"recent",label:G.a.I18n.t("recentlySent")},{name:"saved",label:G.a.I18n.t("savedTemplates")}]);var ut=function(e){function t(e){var a,n,r,i,o;return A()(this,t),(o=D()(this,M()(t).call(this,e))).state={loading:!0,templates:{},emailType:null,selectedTab:""},o.templates={},o.addTemplate=Ke()(a=o.addTemplate).call(a,B()(o)),o.afterTemplateDelete=Ke()(n=o.afterTemplateDelete).call(n,B()(o)),o.afterTemplateSelect=Ke()(r=o.afterTemplateSelect).call(r,B()(o)),o.afterTemplateImport=Ke()(i=o.afterTemplateImport).call(i,B()(o)),o}return V()(t,e),O()(t,[{key:"componentWillMount",value:function(){var e=this;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"getAll"}).done(function(t){var a;0===t.data.length&&(t.data=[{name:G.a.I18n.t("mailpoetGuideTemplateTitle"),categories:'["welcome", "notification", "standard", "woocommerce"]',readonly:"1"}]),C()(a=t.data).call(a,e.addTemplate),e.sortTemplates()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}).always(function(){e.selectInitialTab()})}},{key:"addTemplate",value:function(e){var t,a=this,n=me()(ct).call(ct,function(e){return e.name});try{var r;t=ze()(r=JSON.parse(e.categories)).call(r,function(e){return-1!==He()(n).call(n,e)})}catch(e){t=[]}0===t.length&&t.push("saved"),C()(t).call(t,function(t){void 0===a.templates[t]&&(a.templates[t]=[]),a.templates[t].unshift(e)})}},{key:"sortTemplates",value:function(){var e,t=this;C()(e=$e()(this.templates)).call(e,function(e){var a;Fe()(a=t.templates[e]).call(a,function(e,t){return qe()(e.id,10)<qe()(t.id,10)?1:-1})})}},{key:"selectInitialTab",value:function(){var e,t=this,a="standard";G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:this.props.match.params.id}}).done(function(t){e=t.data.type,Ne.a.findWhere(ct,{name:t.data.type})?a=t.data.type:"automatic"===t.data.type&&Ne.a.findWhere(ct,{name:t.data.options.group})&&(a=t.data.options.group)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}).always(function(){t.setState({templates:t.templates,emailType:e,selectedTab:a,loading:!1})})}},{key:"afterTemplateDelete",value:function(e,t){var a,n=this;e&&C()(a=$e()(this.templates)).call(a,function(e){var a;n.templates[e]=ze()(a=n.templates[e]).call(a,function(e){return e.id!==t})});this.setState({templates:this.templates,loading:!1})}},{key:"afterTemplateSelect",value:function(e,t){e?window.location=function(e){return"admin.php?page=mailpoet-newsletter-editor&id=".concat(e)}(t):this.setState({loading:!1})}},{key:"afterTemplateImport",value:function(e,t){e&&this.addTemplate(t),this.setState({templates:this.templates,selectedTab:e?"saved":"import",loading:!1})}},{key:"render",value:function(){var e=this;if(this.state.loading)return r.a.createElement(Ge,null);var t=P()(ct).call(ct,{name:"import",label:G.a.I18n.t("tabImportTitle")}),a=null;if("import"===this.state.selectedTab)a=r.a.createElement(lt,{beforeImport:function(){return e.setState({loading:!0})},afterImport:this.afterTemplateImport});else{var n=this.state.templates[this.state.selectedTab]||[];n=0===n.length?this.state.loading?null:r.a.createElement("p",null,G.a.I18n.t("noTemplates")):me()(n).call(n,function(t,a){return r.a.createElement(at,Le()({key:t.id,index:a,newsletterId:e.props.match.params.id,beforeDelete:function(){return e.setState({loading:!0})},afterDelete:e.afterTemplateDelete,beforeSelect:function(){return e.setState({loading:!0})},afterSelect:e.afterTemplateSelect},t))}),a=r.a.createElement("ul",{className:"mailpoet_boxes clearfix"},n)}var i=Ie.a.applyFilters("mailpoet_newsletters_template_breadcrumb",r.a.createElement(Pe.a,{step:"template"}),this.state.emailType,"template");return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("selectTemplateTitle")),i,r.a.createElement(Ye,{tabs:t,selected:this.state.selectedTab,select:function(t){return e.setState({selectedTab:t})}}),a)}}]),t}(r.a.Component);ut.propTypes={match:u.a.shape({params:u.a.shape({id:u.a.string}).isRequired}).isRequired};var pt=ut,dt=a(89),mt=a.n(dt),ht=a(141),ft=a.n(ht),gt=a(126),_t=a.n(gt),bt=a(49),vt=a.n(bt),yt=a(28),wt=a.n(yt),Et=a(130),kt=a.n(Et),It=a(21),St=a.n(It),Nt={closeText:G.a.I18n.t("close"),currentText:G.a.I18n.t("today"),nextText:G.a.I18n.t("next"),prevText:G.a.I18n.t("previous"),monthNames:[G.a.I18n.t("january"),G.a.I18n.t("february"),G.a.I18n.t("march"),G.a.I18n.t("april"),G.a.I18n.t("may"),G.a.I18n.t("june"),G.a.I18n.t("july"),G.a.I18n.t("august"),G.a.I18n.t("september"),G.a.I18n.t("october"),G.a.I18n.t("november"),G.a.I18n.t("december")],monthNamesShort:[G.a.I18n.t("januaryShort"),G.a.I18n.t("februaryShort"),G.a.I18n.t("marchShort"),G.a.I18n.t("aprilShort"),G.a.I18n.t("mayShort"),G.a.I18n.t("juneShort"),G.a.I18n.t("julyShort"),G.a.I18n.t("augustShort"),G.a.I18n.t("septemberShort"),G.a.I18n.t("octoberShort"),G.a.I18n.t("novemberShort"),G.a.I18n.t("decemberShort")],dayNames:[G.a.I18n.t("sunday"),G.a.I18n.t("monday"),G.a.I18n.t("tuesday"),G.a.I18n.t("wednesday"),G.a.I18n.t("thursday"),G.a.I18n.t("friday"),G.a.I18n.t("saturday")],dayNamesShort:[G.a.I18n.t("sundayShort"),G.a.I18n.t("mondayShort"),G.a.I18n.t("tuesdayShort"),G.a.I18n.t("wednesdayShort"),G.a.I18n.t("thursdayShort"),G.a.I18n.t("fridayShort"),G.a.I18n.t("saturdayShort")],dayNamesMin:[G.a.I18n.t("sundayMin"),G.a.I18n.t("mondayMin"),G.a.I18n.t("tuesdayMin"),G.a.I18n.t("wednesdayMin"),G.a.I18n.t("thursdayMin"),G.a.I18n.t("fridayMin"),G.a.I18n.t("saturdayMin")]},xt=function(e){function t(e){var a;return A()(this,t),a=D()(this,M()(t).call(this,e)),W()(B()(a),"onChange",function(e){var t=e,n=t.target.value,r=a.getStorageDate(n);t.target.value=r,a.props.onChange(t)}),W()(B()(a),"getFieldName",function(){return a.props.name||"date"}),W()(B()(a),"getDisplayDate",function(e){var t={parseFormat:a.props.storageFormat,format:a.props.displayFormat};return G.a.Date.format(e,t)}),W()(B()(a),"getStorageDate",function(e){var t={parseFormat:a.props.displayFormat,format:a.props.storageFormat};return G.a.Date.format(e,t)}),a.dateInput=r.a.createRef(),a}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=K()(this.dateInput.current),t=this;e.datepicker&&(K.a.datepicker.parseDate=function(e,t){return G.a.Date.toDate(t,{parseFormat:this.props.displayFormat,format:e})},K.a.datepicker.formatDate=function(e,t){return G.a.Date.format(t,{format:e})},e.datepicker(Ne.a.extend({dateFormat:this.props.displayFormat,firstDay:window.mailpoet_start_of_week,isRTL:!1,onSelect:function(e){t.onChange({target:{name:t.getFieldName(),value:e}})}},Nt)),this.datepickerInitialized=!0)}},{key:"componentWillUnmount",value:function(){this.datepickerInitialized&&K()(this.dateInput.current).datepicker("destroy")}},{key:"render",value:function(){return r.a.createElement("input",Le()({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))}}]),t}(r.a.Component);xt.propTypes={displayFormat:u.a.string.isRequired,onChange:u.a.func.isRequired,name:u.a.string,storageFormat:u.a.string.isRequired,value:u.a.string.isRequired,disabled:u.a.bool.isRequired,validation:u.a.object.isRequired},xt.defaultProps={name:"date"};var Ct=xt,Tt=function(e){function t(){return A()(this,t),D()(this,M()(t).apply(this,arguments))}return V()(t,e),O()(t,[{key:"render",value:function(){var e,t=this,a=me()(e=$e()(this.props.timeOfDayItems)).call(e,function(e){return r.a.createElement("option",{key:"option-".concat(t.props.timeOfDayItems[e]),value:e},t.props.timeOfDayItems[e])});return r.a.createElement("select",Le()({name:this.props.name||"time",value:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange},this.props.validation),a)}}]),t}(r.a.Component);Tt.propTypes={timeOfDayItems:u.a.objectOf(u.a.string).isRequired,name:u.a.string,value:u.a.string.isRequired,disabled:u.a.bool,onChange:u.a.func.isRequired,validation:u.a.object},Tt.defaultProps={name:"time",disabled:!1,validation:{}};var Pt=Tt,Rt=function(e){function t(e){var a;return A()(this,t),a=D()(this,M()(t).call(this,e)),W()(B()(a),"DATE_TIME_SEPARATOR"," "),W()(B()(a),"getDateTime",function(){return[a.state.date,a.state.time].join(a.DATE_TIME_SEPARATOR)}),W()(B()(a),"buildStateFromProps",function(e){var t=(e.value||a.props.defaultDateTime).split(a.DATE_TIME_SEPARATOR),n=St()(t,2);return{date:n[0],time:n[1]}}),W()(B()(a),"handleChange",function(e){var t={};t[e.target.name]=e.target.value,a.setState(t,a.propagateChange)}),W()(B()(a),"propagateChange",function(){a.props.onChange&&a.props.onChange({target:{name:a.props.name||"",value:a.getDateTime()}})}),a.state=a.buildStateFromProps(e),a}return V()(t,e),O()(t,[{key:"componentDidUpdate",value:function(e){var t=this;this.props.value===e.value&&this.props.defaultDateTime===e.defaultDateTime||kt()(function(){t.setState(t.buildStateFromProps(t.props))})}},{key:"render",value:function(){return r.a.createElement("span",null,r.a.createElement(Ct,{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}),r.a.createElement(Pt,{name:"time",value:this.state.time,onChange:this.handleChange,disabled:this.props.disabled,validation:this.props.timeValidation,timeOfDayItems:this.props.timeOfDayItems}))}}]),t}(r.a.Component);Rt.propTypes={value:u.a.string,defaultDateTime:u.a.string.isRequired,dateDisplayFormat:u.a.string.isRequired,dateStorageFormat:u.a.string.isRequired,onChange:u.a.func,name:u.a.string,disabled:u.a.bool,dateValidation:u.a.object.isRequired,timeValidation:u.a.any,timeOfDayItems:u.a.objectOf(u.a.string).isRequired},Rt.defaultProps={onChange:void 0,name:"",disabled:!1,timeValidation:void 0,value:void 0};var At=Rt,jt=a(137),Ot=a.n(jt),Lt=a(37),Dt=a.n(Lt),qt=window.location.hostname.replace("www.",""),Mt="contact@".concat(qt),Ft=function(e){var t,a=e.emailAddress;if(e.mssActive)return null;var n=a.split("@").pop().toLowerCase();return He()(t=window.mailpoet_free_domains).call(t,n)>-1?r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"sender_email_address_warning","data-acceptance-id":"freemail-sender-warning-old-installation"},G.a.I18n.t("senderEmailAddressWarning1")),r.a.createElement("p",{className:"sender_email_address_warning"},Dt()(G.a.I18n.t("senderEmailAddressWarning2"),/(%suggested|%originalSender|<em>.*<\/em>)/,function(e){return"%suggested"===e?Mt:"%originalSender"===e?r.a.createElement("em",{key:"sender-email"},a):r.a.createElement("em",{key:"reply-to"},e.replace(/<\/?em>/g,""))})),r.a.createElement("p",{className:"sender_email_address_warning"},r.a.createElement("a",{href:"https://kb.mailpoet.com/article/259-your-from-address-cannot-be-yahoo-com-gmail-com-outlook-com","data-beacon-article":"5be5911104286304a71c176e",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("senderEmailAddressWarning3")))):null};Ft.propTypes={emailAddress:u.a.string.isRequired,mssActive:u.a.bool.isRequired};var Bt=Ft,$t=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).state={emailAddress:e.item.sender_address},n.onChange=Ke()(a=n.onChange).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"onChange",value:function(e){this.setState({emailAddress:e.target.value}),this.props.onValueChange(e)}},{key:"render",value:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Ot.a,Le()({},this.props,{onValueChange:this.onChange})),r.a.createElement("div",{className:"regular-text"},r.a.createElement(Bt,{emailAddress:this.state.emailAddress,mssActive:window.mailpoet_mss_active})))}}]),t}(r.a.Component);$t.propTypes={item:u.a.shape({sender_address:u.a.string.isRequired}).isRequired,onValueChange:u.a.func},$t.defaultProps={onValueChange:function(){}};var Vt=$t,Ht=window.mailpoet_current_time||"00:00",Wt="".concat(window.mailpoet_current_date," 00:00:00"),zt=window.mailpoet_schedule_time_of_day,Ut=window.mailpoet_date_display_format,Kt=window.mailpoet_date_storage_format,Gt=function(e){function t(){var e,a,n;A()(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,i))),W()(B()(n),"getCurrentValue",function(){var e={isScheduled:"0",scheduledAt:Wt};return Ne.a.defaults(n.props.item[n.props.field.name]||{},e)}),W()(B()(n),"getDateValidation",function(){return{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("noScheduledDateError"),"data-parsley-errors-container":"#mailpoet_scheduling"}}),W()(B()(n),"isScheduled",function(){return"1"===n.getCurrentValue().isScheduled}),W()(B()(n),"handleCheckboxChange",function(e){var t=e;return t.target.value=e.target.checked?"1":"0",n.handleValueChange(t)}),W()(B()(n),"handleValueChange",function(e){var t=n.getCurrentValue(),a={};return a[e.target.name]=e.target.value,n.props.onValueChange({target:{name:n.props.field.name,value:Ne.a.extend({},t,a)}})}),n}return V()(t,e),O()(t,[{key:"render",value:function(){var e;return this.isScheduled()&&(e=r.a.createElement("span",{id:"mailpoet_scheduling"},r.a.createElement(At,{name:"scheduledAt",value:this.getCurrentValue().scheduledAt,onChange:this.handleValueChange,disabled:this.props.field.disabled,dateValidation:this.getDateValidation(),defaultDateTime:Wt,timeOfDayItems:zt,dateDisplayFormat:Ut,dateStorageFormat:Kt})," ",r.a.createElement("span",null,G.a.I18n.t("websiteTimeIs")," ",r.a.createElement("code",null,Ht)))),r.a.createElement("div",null,r.a.createElement("input",{type:"checkbox",value:"1",checked:this.isScheduled(),disabled:this.props.field.disabled,name:"isScheduled",onChange:this.handleCheckboxChange}),e)}}]),t}(r.a.Component);Gt.propTypes={item:u.a.object,field:u.a.shape({name:u.a.string.isRequired,disabled:u.a.bool}).isRequired,onValueChange:u.a.func.isRequired},Gt.defaultProps={item:{}};var Jt=[{name:"subject",label:G.a.I18n.t("subjectLine"),tip:G.a.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("emptySubjectLineError")}},{name:"segments",label:G.a.I18n.t("segments"),tip:G.a.I18n.t("segmentsTip"),type:"selection",placeholder:G.a.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(e){return!e.deleted_at},getLabel:function(e){var t;return P()(t="".concat(e.name," (")).call(t,qe()(e.subscribers,10).toLocaleString(),")")},transformChangedValue:function(e){var t=this.getItems();return me()(Ne.a).call(Ne.a,e,function(e){return wt()(Ne.a).call(Ne.a,t,function(t){return t.id===e})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:G.a.I18n.t("sender"),tip:G.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:G.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"reactComponent",component:Vt,placeholder:G.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:G.a.I18n.t("replyTo"),tip:G.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:G.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:G.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]},{name:"options",label:G.a.I18n.t("scheduleIt"),type:"reactComponent",component:Gt}];Jt=Ie.a.applyFilters("mailpoet_newsletters_3rd_step_fields",Jt);var Yt={getFields:function(){return Jt},getSendButtonOptions:function(e){var t=e||{},a={value:"object"===vt()(t.options)&&"1"===t.options.isScheduled?G.a.I18n.t("schedule"):G.a.I18n.t("send")};return"sent"!==t.status&&"sending"!==t.status||(a.disabled="disabled"),a}},Qt=a(74),Xt=a(63),Zt={name:"intervalType",values:Xt.intervalValues},ea={name:"timeOfDay",values:Xt.timeOfDayValues},ta={name:"weekDay",values:Xt.weekDayValues},aa={name:"monthDay",values:Xt.monthDayValues},na={name:"nthWeekDay",values:Xt.nthWeekDayValues},ra=function(e){function t(){var e,a,n;A()(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,i))),W()(B()(n),"getCurrentValue",function(){return n.props.item[n.props.field.name]||{}}),W()(B()(n),"handleValueChanges",function(e){var t=n.getCurrentValue();return n.props.onValueChange({target:{name:n.props.field.name,value:Ne.a.extend({},t,e)}})}),W()(B()(n),"handleIntervalChange",function(e){var t=e.target.value,a={};a.intervalType=t,"monthly"===t&&(a.monthDay="1"),n.handleValueChanges(a)}),W()(B()(n),"handleTimeOfDayChange",function(e){return n.handleValueChanges({timeOfDay:e.target.value})}),W()(B()(n),"handleWeekDayChange",function(e){return n.handleValueChanges({weekDay:e.target.value})}),W()(B()(n),"handleMonthDayChange",function(e){return n.handleValueChanges({monthDay:e.target.value})}),W()(B()(n),"handleNthWeekDayChange",function(e){return n.handleValueChanges({nthWeekDay:e.target.value})}),n}return V()(t,e),O()(t,[{key:"render",value:function(){var e,t,a,n,i=this.getCurrentValue();return"immediately"!==i.intervalType&&(e=r.a.createElement(Qt.a,{field:ea,item:this.getCurrentValue(),onValueChange:this.handleTimeOfDayChange})),"weekly"!==i.intervalType&&"nthWeekDay"!==i.intervalType||(t=r.a.createElement(Qt.a,{field:ta,item:this.getCurrentValue(),onValueChange:this.handleWeekDayChange})),"monthly"===i.intervalType&&(a=r.a.createElement(Qt.a,{field:aa,item:this.getCurrentValue(),onValueChange:this.handleMonthDayChange})),"nthWeekDay"===i.intervalType&&(n=r.a.createElement(Qt.a,{field:na,item:this.getCurrentValue(),onValueChange:this.handleNthWeekDayChange})),r.a.createElement("div",null,r.a.createElement(Qt.a,{field:Zt,item:this.getCurrentValue(),onValueChange:this.handleIntervalChange,automationId:"newsletter_interval_type"}),n,a,t,e)}}]),t}(r.a.Component);ra.propTypes={item:u.a.object.isRequired,field:u.a.shape({name:u.a.string}).isRequired,onValueChange:u.a.func.isRequired};var ia=ra,oa=[{name:"subject",label:G.a.I18n.t("subjectLine"),tip:G.a.I18n.t("postNotificationSubjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("emptySubjectLineError")}},{name:"options",label:G.a.I18n.t("selectFrequency"),type:"reactComponent",component:ia},{name:"segments",label:G.a.I18n.t("segments"),tip:G.a.I18n.t("segmentsTip"),type:"selection",placeholder:G.a.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(e){return!e.deleted_at},getLabel:function(e){var t;return P()(t="".concat(e.name," (")).call(t,qe()(e.subscribers,10).toLocaleString(),")")},transformChangedValue:function(e){var t=this.getItems();return me()(Ne.a).call(Ne.a,e,function(e){return wt()(Ne.a).call(Ne.a,t,function(t){return t.id===e})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:G.a.I18n.t("sender"),tip:G.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:G.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"reactComponent",component:Vt,placeholder:G.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:G.a.I18n.t("replyTo"),tip:G.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:G.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:G.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];oa=Ie.a.applyFilters("mailpoet_newsletters_3rd_step_fields",oa);var sa={getFields:function(){return oa},getSendButtonOptions:function(){return{value:G.a.I18n.t("activate")}}},la=a(138),ca=[{name:"subject",label:G.a.I18n.t("subjectLine"),tip:G.a.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":G.a.I18n.t("emptySubjectLineError")}},{name:"options",label:G.a.I18n.t("sendWelcomeEmailWhen"),type:"reactComponent",component:la.default},{name:"sender",label:G.a.I18n.t("sender"),tip:G.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:G.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"reactComponent",component:Vt,placeholder:G.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:G.a.I18n.t("replyTo"),tip:G.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:G.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:G.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];ca=Ie.a.applyFilters("mailpoet_newsletters_3rd_step_fields",ca);var ua={getFields:function(){return ca},getSendButtonOptions:function(){return{value:G.a.I18n.t("activate")}}},pa=a(297),da=function(e){function t(e){var a;return A()(this,t),a=D()(this,M()(t).call(this,e)),W()(B()(a),"getFieldsByNewsletter",function(e){return a.getSubtype(e).getFields(e)}),W()(B()(a),"getSendButtonOptions",function(){return a.getSubtype(a.state.item).getSendButtonOptions(a.state.item)}),W()(B()(a),"getSubtype",function(e){switch(e.type){case"notification":return sa;case"welcome":return ua;default:return Ie.a.applyFilters("mailpoet_newsletters_send_newsletter_fields",Yt,e)}}),W()(B()(a),"getThumbnailPromise",function(e){return a.state.thumbnailPromise?a.state.thumbnailPromise:Object(pa.b)(e)}),W()(B()(a),"isValid",function(){return K()("#mailpoet_newsletter").parsley().isValid()}),W()(B()(a),"isValidFromAddress",ft()(mt.a.mark(function e(){var t,n;return mt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("MailPoet"===window.mailpoet_mta_method){e.next=2;break}return e.abrupt("return",!0);case 2:return e.next=4,a.loadAuthorizedEmailAddresses();case 4:return t=e.sent,n=a.state.item.sender_address,e.abrupt("return",-1!==He()(t).call(t,n));case 7:case"end":return e.stop()}},e)}))),W()(B()(a),"showInvalidFromAddressError",function(){var e=Dt()(G.a.I18n.t("newsletterInvalidFromAddress"),"%$1s",function(){return a.state.item.sender_address});e=Dt()(e,/\[link\](.*?)\[\/link\]/g,function(e){return'<a href="https://account.mailpoet.com/authorization" target="_blank" rel="noopener noreferrer">'.concat(e,"</a>")}),K()("#field_sender_address").parsley().addError("invalidFromAddress",{message:e.join(""),updateClass:!0})}),W()(B()(a),"removeInvalidFromAddressError",function(){K()("#field_sender_address").parsley().removeError("invalidFromAddress",{updateClass:!0})}),W()(B()(a),"loadItem",function(e){return a.setState({loading:!0}),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:e}}).done(function(e){var t="draft"===e.data.status?a.getThumbnailPromise(e.meta.preview_url):null;a.setState({item:e.data,fields:a.getFieldsByNewsletter(e.data),thumbnailPromise:t})}).fail(function(){a.setState({item:{}},function(){a.props.history.push("/new")})})}),W()(B()(a),"saveTemplate",function(e,t){a.getThumbnailPromise(e.meta.preview_url).then(function(n){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:{newsletter_id:e.data.id,name:e.data.subject,thumbnail:n,body:rt()(e.data.body),categories:'["recent"]'}}).fail(function(e){a.showError(e),a.setState({loading:!1}),G.a.Modal.loading(!1)}),t()}).catch(function(e){a.showError({errors:[e]})})}),W()(B()(a),"loadAuthorizedEmailAddresses",ft()(mt.a.mark(function e(){var t;return mt.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("MailPoet"===window.mailpoet_mta_method){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"mailer",action:"getAuthorizedEmailAddresses"});case 4:return t=e.sent,e.abrupt("return",t.data||[]);case 6:case"end":return e.stop()}},e)}))),W()(B()(a),"handleSend",function(e){return e.preventDefault(),a.removeInvalidFromAddressError(),a.isValid()?(G.a.Modal.loading(!0),a.isValidFromAddress().then(function(t){return t?a.saveNewsletter(e).done(function(){a.setState({loading:!0})}).done(function(e){switch(e.data.type){case"notification":case"welcome":return a.activateNewsletter(e);default:return a.sendNewsletter(e)}}).fail(function(e){a.showError(e),a.setState({loading:!1}),G.a.Modal.loading(!1)}):(a.showInvalidFromAddressError(),G.a.Modal.loading(!1))})):K()("#mailpoet_newsletter").parsley().validate()}),W()(B()(a),"sendNewsletter",function(e){return G.a.Ajax.post(Ie.a.applyFilters("mailpoet_newsletters_send_server_request_parameters",{api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"add",data:{newsletter_id:a.state.item.id}},a.state.item)).done(function(t){a.saveTemplate(e,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return G.a.Modal.loading(!1),void a.props.history.push("/send/congratulate/".concat(a.state.item.id));a.props.history.push(Ie.a.applyFilters("mailpoet_newsletters_send_server_request_response_redirect","/".concat(a.state.item.type||""),a.state.item));var e=Ie.a.applyFilters("mailpoet_newsletters_send_server_request_response",a.state.item,t);Ne.a.isFunction(e)?e():"scheduled"===t.data.status?(G.a.Notice.success(G.a.I18n.t("newsletterHasBeenScheduled")),G.a.trackEvent("Emails > Newsletter sent",{scheduled:!0,"MailPoet Free version":window.mailpoet_version})):(G.a.Notice.success(G.a.I18n.t("newsletterBeingSent"),{id:"mailpoet_notice_being_sent"}),G.a.trackEvent("Emails > Newsletter sent",{scheduled:!1,"MailPoet Free version":window.mailpoet_version})),G.a.Modal.loading(!1)})}).fail(function(e){a.showError(e),a.setState({loading:!1}),G.a.Modal.loading(!1)})}),W()(B()(a),"activateNewsletter",function(e){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:a.props.match.params.id,status:"active"}}).done(function(t){a.saveTemplate(e,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return G.a.Modal.loading(!1),void a.props.history.push("/send/congratulate/".concat(a.state.item.id));a.props.history.push("/".concat(a.state.item.type||""));var e,n=a.state.item.options;"welcome"===t.data.type?(G.a.Notice.success(G.a.I18n.t("welcomeEmailActivated")),G.a.trackEvent("Emails > Welcome email activated",{"MailPoet Free version":window.mailpoet_version,"List type":n.event,Delay:P()(e="".concat(n.afterTimeNumber," ")).call(e,n.afterTimeType)})):"notification"===t.data.type&&(G.a.Notice.success(G.a.I18n.t("postNotificationActivated")),G.a.trackEvent("Emails > Post notifications activated",{"MailPoet Free version":window.mailpoet_version,Frequency:n.intervalType}));G.a.Modal.loading(!1)})}).fail(function(e){a.showError(e),a.setState({loading:!1}),G.a.Modal.loading(!1)})}),W()(B()(a),"handleResume",function(e){return e.preventDefault(),a.isValid()?a.saveNewsletter(e).done(function(){a.setState({loading:!0})}).done(function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:a.state.item.id}}).done(function(){a.props.history.push("/".concat(a.state.item.type||"")),G.a.Notice.success(G.a.I18n.t("newsletterSendingHasBeenResumed"))}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}).fail(function(e){a.showError(e)}).always(function(){a.setState({loading:!1})}):K()("#mailpoet_newsletter").parsley().validate(),!1}),W()(B()(a),"handleSave",function(e){e.preventDefault(),a.saveNewsletter(e).done(function(){G.a.Notice.success(G.a.I18n.t("newsletterUpdated"))}).done(function(){var e="automatic"===a.state.item.type?a.state.item.options.group:a.state.item.type;a.props.history.push("/".concat(e||""))}).fail(function(e){a.showError(e)})}),W()(B()(a),"handleRedirectToDesign",function(e){e.preventDefault();var t=e.target.href;a.saveNewsletter(e).done(function(){G.a.Notice.success(G.a.I18n.t("newsletterUpdated"))}).done(function(){window.location=t}).fail(function(e){a.showError(e)})}),W()(B()(a),"saveNewsletter",function(){var e=a.state.item;e.queue=void 0,a.setState({loading:!0});var t=Ne.a.omit(e,["preheader","body","created_at","deleted_at","hash","status","updated_at","type"]);return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:t})}),W()(B()(a),"showError",function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}),W()(B()(a),"handleFormChange",function(e){var t=e.target.name,n=e.target.value;return a.setState(function(e){var a=e.item;return a[t]=n,{item:a}}),!0}),a.state={fields:[],item:{},loading:!0,thumbnailPromise:null},a}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=this;this.loadItem(this.props.match.params.id).always(function(){e.setState({loading:!1})}),K()("#mailpoet_newsletter").parsley()}},{key:"componentDidUpdate",value:function(e){var t=this;this.props.match.params.id!==e.match.params.id&&this.loadItem(this.props.match.params.id).always(function(){t.setState({loading:!1})})}},{key:"render",value:function(){var e,t="sending"===this.state.item.status&&this.state.item.queue&&"paused"===this.state.item.queue.status,a=me()(e=this.state.fields).call(e,function(e){var a=e;return"segments"!==e.name&&"options"!==e.name||(a.disabled=t),a}),n=this.getSendButtonOptions(),i=Ie.a.applyFilters("mailpoet_newsletters_send_breadcrumb",r.a.createElement(Pe.a,{step:"send"}),this.state.item.type,"send");return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("finalNewsletterStep")),i,r.a.createElement(_t.a,{id:"mailpoet_newsletter",fields:a,automationId:"newsletter_send_form",item:this.state.item,loading:this.state.loading,onChange:this.handleFormChange,onSubmit:this.handleSave},r.a.createElement("p",{className:"submit"},t?r.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleResume,value:G.a.I18n.t("resume")}):r.a.createElement("input",Le()({className:"button button-primary",type:"button",onClick:this.handleSend,value:G.a.I18n.t("send")},n))," ",r.a.createElement("input",{className:"button button-secondary",type:"submit",value:G.a.I18n.t("saveDraftAndClose")})," ",G.a.I18n.t("orSimply")," ",r.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(this.props.match.params.id),onClick:this.handleRedirectToDesign},G.a.I18n.t("goBackToDesign")),"."),!t&&n.disabled&&"disabled"===n.disabled&&r.a.createElement(ot.a,{tooltip:G.a.I18n.t("helpTooltipSendEmail"),tooltipId:"helpTooltipSendEmail"})))}}]),t}(r.a.Component);W()(da,"displayName","NewsletterSend"),W()(da,"propTypes",{match:u.a.shape({params:u.a.shape({id:u.a.string}).isRequired}).isRequired,history:u.a.shape({push:u.a.func.isRequired}).isRequired});var ma=Object(Re.a)(da),ha=a(52),fa=a.n(ha),ga=a(5),_a=a.n(ga);function ba(e){var t,a="standard"===e.newsletter.type&&"scheduled"!==e.newsletter.status;return a&&G.a.Poll.successDelivery.initTypeformScript(),r.a.createElement("div",{className:"mailpoet_congratulate_success"},r.a.createElement("h1",null,"welcome"===(t=e.newsletter).type?G.a.I18n.t("congratulationsWelcomeEmailSuccessHeader"):"notification"===t.type?G.a.I18n.t("congratulationsPostNotificationSuccessHeader"):"automatic"===t.type?G.a.I18n.t("congratulationsWooSuccessHeader"):"scheduled"===t.status?G.a.I18n.t("congratulationsScheduleSuccessHeader"):G.a.I18n.t("congratulationsSendSuccessHeader")),r.a.createElement("img",{src:e.illustrationImageUrl,alt:"",width:"750",height:"250"}),a&&r.a.createElement("div",{className:"typeform-widget","data-url":"https://mailpoet.typeform.com/to/ciWID6","data-transparency":"100","data-hide-headers":"true","data-hide-footer":"true"}),r.a.createElement("button",{type:"button",className:"button",onClick:e.successClicked},G.a.I18n.t("close")))}ba.propTypes={successClicked:u.a.func.isRequired,illustrationImageUrl:u.a.string.isRequired,newsletter:u.a.shape({status:u.a.string.isRequired,type:u.a.string.isRequired}).isRequired};var va=ba;function ya(e){return r.a.createElement("div",{className:"mailpoet_centered"},r.a.createElement("h1",null,G.a.I18n.t("congratulationsSendFailHeader")),r.a.createElement("p",null,Dt()(G.a.I18n.t("congratulationsSendFailExplain"),/\[link\](.*?)\[\/link\]/g,function(e,t){return r.a.createElement("a",{key:t,target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/231-sending-does-not-work","data-beacon-article":"5a0257ac2c7d3a272c0d7ad6"},e)})),r.a.createElement("button",{type:"button",className:"button",onClick:e.failClicked},G.a.I18n.t("close")))}ya.propTypes={failClicked:u.a.func.isRequired};var wa=ya;var Ea=function(){return r.a.createElement("div",{className:"mailpoet_loading"},r.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_1"}),r.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_2"}),r.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_3"}))};function ka(e){return r.a.createElement("div",{className:"mailpoet_newsletter_loading"},r.a.createElement(Ea,null),(t=e.showRichLoadingScreen,a=e.illustrationImageUrl,t?r.a.createElement("div",null,r.a.createElement("h1",{className:"mailpoet_newsletter_loading_header"},G.a.I18n.t("congratulationsLoadingHeader")),r.a.createElement("img",{src:a,alt:"",width:"800px",height:"266px"})):r.a.createElement("div",null)));var t,a}ka.propTypes={illustrationImageUrl:u.a.string.isRequired,showRichLoadingScreen:u.a.bool.isRequired};var Ia=ka;function Sa(){return G.a.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})}var Na=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).state={loading:!0,newsletter:null,testingPassed:!1,timeStart:_a()(),minimumLoadingTimePassed:!1},n.tick=Ke()(a=n.tick).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){this.loadNewsletter(this.props.match.params.id),this.tick()}},{key:"componentDidUpdate",value:function(e){e.match.params.id!==this.props.match.params.id&&this.loadNewsletter(this.props.match.params.id)}},{key:"tick",value:function(){_a()().subtract(20,"second").isAfter(this.state.timeStart)&&this.setState({error:!0,loading:!1}),this.state.loading&&this.loadNewsletter(this.props.match.params.id),_a()().subtract(6,"seconds").isAfter(this.state.timeStart)&&this.setState({minimumLoadingTimePassed:!0}),!this.state.loading&&this.state.minimumLoadingTimePassed||fa()(this.tick,2e3)}},{key:"loadNewsletter",value:function(e){var t=this;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:e}}).done(function(e){return t.newsletterLoaded(e.data)})}},{key:"newsletterLoaded",value:function(e){"standard"!==e.type||"scheduled"===e.status?this.setState({newsletter:e,loading:!1,minimumLoadingTimePassed:!0}):"sent"===e.status||"sending"===e.status?this.setState({newsletter:e,loading:!1,testingPassed:!0}):this.setState({newsletter:e})}},{key:"renderContent",value:function(){return this.state.loading||!this.state.minimumLoadingTimePassed?(e=!!this.state.newsletter,r.a.createElement(Ia,{illustrationImageUrl:window.mailpoet_congratulations_loading_image,successClicked:Sa,showRichLoadingScreen:e})):this.state.error?(G.a.trackEvent("Cron testing done",{"Cron is working":"false"}),r.a.createElement(wa,{failClicked:function(){window.location=window.mailpoet_main_page}})):(t=this.state.newsletter,this.state.testingPassed&&G.a.trackEvent("Cron testing done",{"Cron is working":"true"}),r.a.createElement(va,{illustrationImageUrl:window.mailpoet_congratulations_success_image,successClicked:Sa,newsletter:t}));var e,t}},{key:"render",value:function(){return r.a.createElement("div",{className:"newsletter_congratulate_page"},this.renderContent())}}]),t}(r.a.Component);Na.propTypes={match:u.a.shape({params:u.a.shape({id:u.a.string}).isRequired}).isRequired};var xa=Na,Ca=function(e){function t(){var e,a,n;A()(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,i))),W()(B()(n),"showTemplateSelection",function(e){n.props.history.push("/template/".concat(e))}),n}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=this;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:"standard"}}).done(function(t){e.showTemplateSelection(t.data.id)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("regularNewsletterTypeTitle")),r.a.createElement(Pe.a,{step:"type"}))}}]),t}(r.a.Component);W()(Ca,"propTypes",{history:u.a.shape({push:u.a.func.isRequired}).isRequired});var Ta=Object(Re.a)(Ca),Pa={name:"options",type:"reactComponent",component:ia},Ra=function(e){function t(){var e,a,n;A()(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,i))),W()(B()(n),"state",{options:{intervalType:"daily",timeOfDay:0,weekDay:1,monthDay:0,nthWeekDay:1}}),W()(B()(n),"handleValueChange",function(e){var t=n.state;t[e.target.name]=e.target.value,n.setState(t)}),W()(B()(n),"handleNext",function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:Ne.a.extend({},n.state,{type:"notification",subject:G.a.I18n.t("draftPostNotificationTitle")})}).done(function(e){n.showTemplateSelection(e.data.id)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}),W()(B()(n),"showTemplateSelection",function(e){n.props.history.push("/template/".concat(e))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("postNotificationNewsletterTypeTitle")),r.a.createElement(Pe.a,{step:"type"}),r.a.createElement("h3",null,G.a.I18n.t("selectFrequency")),r.a.createElement(ia,{item:this.state,field:Pa,onValueChange:this.handleValueChange}),r.a.createElement("p",{className:"submit"},r.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:G.a.I18n.t("next")})))}}]),t}(r.a.Component);W()(Ra,"propTypes",{history:u.a.shape({push:u.a.func.isRequired}).isRequired});var Aa=Object(Re.a)(Ra),ja={name:"options",label:"Event",type:"reactComponent",component:la.default},Oa=function(e){function t(e){var a,n,r;A()(this,t),r=D()(this,M()(t).call(this,e));var i=window.mailpoet_segments||[],o=1;return i=ze()(i).call(i,function(e){return"default"===e.type}),Ne.a.size(i)>0&&(o=Ne.a.first(i).id),r.state={options:{event:"segment",segment:o,role:"subscriber",afterTimeNumber:1,afterTimeType:"immediate"}},r.handleValueChange=Ke()(a=r.handleValueChange).call(a,B()(r)),r.handleNext=Ke()(n=r.handleNext).call(n,B()(r)),r}return V()(t,e),O()(t,[{key:"handleValueChange",value:function(e){var t=this.state;t[e.target.name]=e.target.value,this.setState(t)}},{key:"handleNext",value:function(){var e=this;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:Ne.a.extend({},this.state,{type:"welcome",subject:G.a.I18n.t("draftNewsletterTitle")})}).done(function(t){e.showTemplateSelection(t.data.id)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{key:"showTemplateSelection",value:function(e){this.props.history.push("/template/".concat(e))}},{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",null,G.a.I18n.t("welcomeNewsletterTypeTitle")),r.a.createElement(Pe.a,{step:"type"}),r.a.createElement("h3",null,G.a.I18n.t("selectEventToSendWelcomeEmail")),r.a.createElement(la.default,{item:this.state,field:ja,onValueChange:this.handleValueChange}),r.a.createElement("p",{className:"submit"},r.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:G.a.I18n.t("next")})))}}]),t}(r.a.Component);Oa.propTypes={history:u.a.shape({push:u.a.func.isRequired}).isRequired};var La=Oa,Da=a(490),qa=a.n(Da),Ma=a(97),Fa=a.n(Ma),Ba=a(98),$a=a.n(Ba),Va=a(99),Ha=a.n(Va),Wa=a(514),za=a.n(Wa),Ua=function(e){var t=r.a.useState(!1),a=St()(t,2),n=a[0],i=a[1],s=r.a.useRef(null),l=r.a.useRef(null);return r.a.useEffect(function(){return e.timeout&&(l.current=fa()(function(){return i(!0)},e.timeout)),function(){return l.current?clearTimeout(l.current):null}},[e.timeout]),r.a.useLayoutEffect(function(){e.scroll&&s.current&&s.current.scrollIntoView(!1)},[e.scroll]),n?null:o.a.createPortal(r.a.createElement("div",{ref:s,className:"mailpoet_base_notice mailpoet_".concat(e.type,"_notice")},e.children),document.getElementById("mailpoet_notices"))};Ua.propTypes={type:u.a.oneOf(["success","info","warning","error"]).isRequired,scroll:u.a.bool,timeout:u.a.oneOfType([u.a.number,u.a.oneOf([!1])]),children:u.a.oneOfType([u.a.string,u.a.element,u.a.arrayOf(u.a.element)]).isRequired},Ua.defaultProps={timeout:1e4,scroll:!1};var Ka=Ua,Ga=function(e){var t=e.errors;return t.length<1?null:r.a.createElement(Ka,{type:"error"},me()(t).call(t,function(e){return r.a.createElement("p",{key:e.message},e.message)}))};Ga.propTypes={errors:u.a.arrayOf(u.a.shape({message:u.a.string.isRequired})).isRequired};var Ja=Ga,Ya=u.a.shape({status:u.a.string,count_processed:u.a.string.isRequired,count_total:u.a.string.isRequired,scheduled_at:u.a.string}),Qa=u.a.shape({id:u.a.number.isRequired,queue:u.a.oneOfType([Ya,u.a.bool])}),Xa=function(e){var t=e.queue,a=Y()("mailpoet_progress",{mailpoet_progress_complete:"completed"===t.status}),n=Math.round(100*t.count_processed/t.count_total),i=0;return za()(n)?(i=n,n+="%"):n=G.a.I18n.t("noSubscribers"),r.a.createElement("div",{className:a},r.a.createElement("span",{className:"mailpoet_progress_bar",style:{width:"".concat(i,"%")}}),r.a.createElement("span",{className:"mailpoet_progress_label"},n))};Xa.propTypes={queue:Ya.isRequired};var Za=function(e){var t=e.newsletter;return r.a.createElement(z.a,{to:"/sending-status/".concat(t.id),"data-automation-id":"sending_status_".concat(t.id)},r.a.createElement("span",null,G.a.I18n.t("newsletterQueueCompleted").replace("%$1d",qe()(t.queue.count_processed,10).toLocaleString()).replace("%$2d",qe()(t.queue.count_total,10).toLocaleString())))};Za.propTypes={newsletter:Qa.isRequired};var en=function(e){var t=e.className,a=e.onClick,n=e.children;return r.a.createElement("a",{className:Y()("button",t),style:{display:"inline-block"},href:"javascript:;",onClick:a},n)};en.propTypes={className:u.a.string,onClick:u.a.func.isRequired,children:u.a.string.isRequired},en.defaultProps={className:""};var tn=function(e){var t=e.newsletter,a=r.a.useState("paused"===t.queue.status),n=St()(a,2),i=n[0],o=n[1],s=r.a.useState([]),l=St()(s,2),c=l[0],u=l[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement(Ja,{errors:c}),r.a.createElement("span",null,qe()(t.queue.count_processed,10).toLocaleString(),"/",qe()(t.queue.count_total,10).toLocaleString(),"  ",i&&r.a.createElement(en,{onClick:function(){u([]),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:t.id}}).done(function(){return o(!1)}).fail(function(e){return u(e.errors)})}},G.a.I18n.t("resume")),!i&&r.a.createElement(en,{className:"mailpoet_pause",onClick:function(){u([]),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"pause",data:{newsletter_id:t.id}}).done(function(){return o(!0)}).fail(function(e){return u(e.errors)})}},G.a.I18n.t("pause"))))};tn.propTypes={newsletter:Qa.isRequired};var an=function(e){var t=e.newsletter,a=e.mailerLog;return t.queue?"paused"===a.status&&"completed"!==t.queue.status?r.a.createElement("span",null,G.a.I18n.t("paused")):"scheduled"===t.queue.status?r.a.createElement("span",null,G.a.I18n.t("scheduledFor")," ",G.a.Date.format(t.queue.scheduled_at)):r.a.createElement("div",null,r.a.createElement(Xa,{queue:t.queue}),r.a.createElement("p",{style:{textAlign:"center"}},"completed"===t.queue.status&&r.a.createElement(Za,{newsletter:t}),"completed"!==t.queue.status&&r.a.createElement(tn,{newsletter:t}))):r.a.createElement("span",null,G.a.I18n.t("notSentYet"))};an.propTypes={newsletter:Qa.isRequired,mailerLog:u.a.shape({status:u.a.string}).isRequired};var nn=an,rn=a(127),on=a.n(rn),sn=a(47),ln=!!window.mailpoet_tracking_enabled,cn={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterTrashed"):G.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterDeleted"):G.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterRestored"):G.a.I18n.t("multipleNewslettersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},un=[{name:"subject",label:G.a.I18n.t("subject"),sortable:!0},{name:"status",label:G.a.I18n.t("status")},{name:"segments",label:G.a.I18n.t("lists")},{name:"statistics",label:G.a.I18n.t("statistics"),display:ln},{name:"sent_at",label:G.a.I18n.t("sentOn"),sortable:!0}],pn=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:cn.onTrash}],dn=function(e){var t=function(){window.location.href="?page=mailpoet-newsletter-editor&id=".concat(e.id)};e.queue&&"sending"===e.status&&null===e.queue.status?et({message:G.a.I18n.t("confirmEdit"),onConfirm:t}):t()},mn=[{name:"view",link:function(e){return r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("preview"))}},{name:"edit",label:G.a.I18n.t("edit"),onClick:dn},{name:"duplicate",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("newsletterDuplicated").replace("%$1s",e.data.subject)),t()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{name:"trash"}];mn=Object(sn.addStatsCTAAction)(mn);var hn=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"renderItem",function(e,t,a){var n,i=Y()("manage-column","column-primary","has-row-actions"),o=me()(n=e.segments).call(n,function(e){return e.name}).join(", ");return r.a.createElement("div",null,r.a.createElement("td",{className:i},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"javascript:;",onClick:function(){return dn(e)}},e.queue.newsletter_rendered_subject||e.subject)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},r.a.createElement(nn,{newsletter:e,mailerLog:a.mta_log})),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("lists")},o),!0===ln?r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("statistics")},r.a.createElement(on.a,{newsletter:e,currentTime:a.current_time})):null,r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("sentOn")},r.a.createElement("abbr",null,e.sent_at?G.a.Date.format(e.sent_at):G.a.I18n.t("notSentYet"))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement($a.a,null),r.a.createElement(Ha.a,{hasNews:window.mailpoet_feature_announcement_has_news}),r.a.createElement(Fa.a,{tab:"standard"}),r.a.createElement(X.a,{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:un,bulk_actions:pn,item_actions:mn,messages:cn,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}}))}}]),t}(r.a.Component);W()(hn,"displayName","NewsletterListStandard"),W()(hn,"propTypes",{location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired});var fn=hn,gn=window.mailpoet_roles||{},_n=window.mailpoet_segments||{},bn=!!window.mailpoet_tracking_enabled,vn={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterTrashed"):G.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterDeleted"):G.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterRestored"):G.a.I18n.t("multipleNewslettersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},yn=[{name:"subject",label:G.a.I18n.t("subject"),sortable:!0},{name:"status",label:G.a.I18n.t("status"),width:145},{name:"settings",label:G.a.I18n.t("settings")},{name:"statistics",label:G.a.I18n.t("statistics"),display:bn},{name:"updated_at",label:G.a.I18n.t("lastModifiedOn"),sortable:!0}],wn=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:vn.onTrash}],En=[{name:"view",link:function(e){return r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("preview"))}},{name:"duplicate",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("newsletterDuplicated").replace("%$1s",e.data.subject)),t()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{name:"edit",link:function(e){return r.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(e.id)},G.a.I18n.t("edit"))}},{name:"trash"}];En=Object(sn.addStatsCTAAction)(En);var kn=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"updateStatus",function(e){e.persist(),G.a.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(e){"active"===e.data.status&&G.a.Notice.success(G.a.I18n.t("welcomeEmailActivated")),n.forceUpdate()}).fail(function(t){G.a.Notice.error(G.a.I18n.t("welcomeEmailActivationFailed")),e.target.value=t.status})}),W()(B()(n),"renderStatus",function(e){var t=G.a.I18n.t("sentToXSubscribers").replace("%$1d",e.total_sent.toLocaleString()),a=G.a.I18n.t("scheduledToXSubscribers").replace("%$1d",e.total_scheduled.toLocaleString());return r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("select",{"data-id":e.id,defaultValue:e.status,onChange:n.updateStatus},r.a.createElement("option",{value:"active"},G.a.I18n.t("active")),r.a.createElement("option",{value:"draft"},G.a.I18n.t("inactive")))),r.a.createElement("p",null,r.a.createElement(z.a,{to:"/sending-status/".concat(e.id),"data-automation-id":"sending_status_".concat(e.id)},t)," ",r.a.createElement("br",null),a))}),W()(B()(n),"renderSettings",function(e){var t,a,n;switch(e.options.event){case"user":t="mailpoet_all"===e.options.role?G.a.I18n.t("welcomeEventWPUserAnyRole"):G.a.I18n.t("welcomeEventWPUserWithRole").replace("%$1s",gn[e.options.role]);break;default:if(void 0===(n=wt()(Ne.a).call(Ne.a,_n,function(t){return Number(t.id)===Number(e.options.segment)})))return r.a.createElement("span",{className:"mailpoet_error"},G.a.I18n.t("sendingToSegmentsNotSpecified"));t=G.a.I18n.t("welcomeEventSegment").replace("%$1s",n.name)}if(t&&"immediate"!==e.options.afterTimeType){switch(e.options.afterTimeType){case"minutes":a=G.a.I18n.t("sendingDelayMinutes").replace("%$1d",e.options.afterTimeNumber);break;case"hours":a=G.a.I18n.t("sendingDelayHours").replace("%$1d",e.options.afterTimeNumber);break;case"days":a=G.a.I18n.t("sendingDelayDays").replace("%$1d",e.options.afterTimeNumber);break;case"weeks":a=G.a.I18n.t("sendingDelayWeeks").replace("%$1d",e.options.afterTimeNumber);break;default:a=G.a.I18n.t("sendingDelayInvalid")}t+=" [".concat(a,"].")}return r.a.createElement("span",null,t)}),W()(B()(n),"renderItem",function(e,t){var a=Y()("manage-column","column-primary","has-row-actions");return r.a.createElement("div",null,r.a.createElement("td",{className:a},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id=".concat(e.id)},e.subject)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},n.renderStatus(e)),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("settings")},n.renderSettings(e)),!0===bn?r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("statistics")},r.a.createElement(on.a,{newsletter:e,isSent:e.total_sent>0&&!!e.statistics})):null,r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("lastModifiedOn")},r.a.createElement("abbr",null,G.a.Date.format(e.updated_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement($a.a,null),r.a.createElement(Ha.a,{hasNews:window.mailpoet_feature_announcement_has_news}),r.a.createElement(Fa.a,{tab:"welcome"}),r.a.createElement(X.a,{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:yn,bulk_actions:wn,item_actions:En,messages:vn,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}}))}}]),t}(r.a.Component);W()(kn,"displayName","NewsletterListWelcome"),W()(kn,"propTypes",{location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired});var In=kn,Sn={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterTrashed"):G.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterDeleted"):G.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterRestored"):G.a.I18n.t("multipleNewslettersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},Nn=[{name:"subject",label:G.a.I18n.t("subject"),sortable:!0},{name:"status",label:G.a.I18n.t("status"),width:100},{name:"settings",label:G.a.I18n.t("settings")},{name:"history",label:G.a.I18n.t("history"),width:100},{name:"updated_at",label:G.a.I18n.t("lastModifiedOn"),sortable:!0}],xn=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:Sn.onTrash}],Cn=[{name:"view",link:function(e){return r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("preview"))}},{name:"edit",link:function(e){return r.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(e.id)},G.a.I18n.t("edit"))}},{name:"duplicate",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("newsletterDuplicated").replace("%$1s",e.data.subject)),t()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{name:"trash"}],Tn=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"updateStatus",function(e){e.persist(),G.a.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(e){"active"===e.data.status&&G.a.Notice.success(G.a.I18n.t("postNotificationActivated")),n.forceUpdate()}).fail(function(t){G.a.Notice.error(G.a.I18n.t("postNotificationActivationFailed")),e.target.value=t.status})}),W()(B()(n),"renderStatus",function(e){return r.a.createElement("select",{"data-id":e.id,defaultValue:e.status,onChange:n.updateStatus},r.a.createElement("option",{value:"active"},G.a.I18n.t("active")),r.a.createElement("option",{value:"draft"},G.a.I18n.t("inactive")))}),W()(B()(n),"renderSettings",function(e){var t,a,n=me()(t=e.segments).call(t,function(e){return e.name}),i=G.a.I18n.t("ifNewContentToSegments").replace("%$1s",n.join(", "));if(0===n.length)return r.a.createElement("span",{className:"mailpoet_error"},G.a.I18n.t("sendingToSegmentsNotSpecified"));switch(e.options.intervalType){case"daily":a=G.a.I18n.t("sendDaily").replace("%$1s",Xt.timeOfDayValues[e.options.timeOfDay]);break;case"weekly":a=G.a.I18n.t("sendWeekly").replace("%$1s",Xt.weekDayValues[e.options.weekDay]).replace("%$2s",Xt.timeOfDayValues[e.options.timeOfDay]);break;case"monthly":a=G.a.I18n.t("sendMonthly").replace("%$1s",Xt.monthDayValues[e.options.monthDay]).replace("%$2s",Xt.timeOfDayValues[e.options.timeOfDay]);break;case"nthWeekDay":a=G.a.I18n.t("sendNthWeekDay").replace("%$1s",Xt.nthWeekDayValues[e.options.nthWeekDay]).replace("%$2s",Xt.weekDayValues[e.options.weekDay]).replace("%$3s",Xt.timeOfDayValues[e.options.timeOfDay]);break;case"immediately":a=G.a.I18n.t("sendImmediately");break;default:a="Invalid sending frequency"}return r.a.createElement("span",null,a," ",i)}),W()(B()(n),"renderHistoryLink",function(e){return 0===Number(e.children_count)?G.a.I18n.t("notSentYet"):r.a.createElement(z.a,{"data-automation-id":"history-".concat(e.id),to:"/notification/history/".concat(e.id)},G.a.I18n.t("viewHistory"))}),W()(B()(n),"renderItem",function(e,t){var a=Y()("manage-column","column-primary","has-row-actions");return r.a.createElement("div",null,r.a.createElement("td",{className:a},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id=".concat(e.id)},e.subject)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},n.renderStatus(e)),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("settings")},n.renderSettings(e)),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("history")},n.renderHistoryLink(e)),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("lastModifiedOn")},r.a.createElement("abbr",null,G.a.Date.format(e.updated_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement($a.a,null),r.a.createElement(Ha.a,{hasNews:window.mailpoet_feature_announcement_has_news}),r.a.createElement(Fa.a,{tab:"notification"}),r.a.createElement(X.a,{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:Nn,bulk_actions:xn,item_actions:Cn,messages:Sn,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}}))}}]),t}(r.a.Component);W()(Tn,"displayName","NewsletterListNotification"),W()(Tn,"propTypes",{location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired});var Pn=Tn,Rn=!!window.mailpoet_tracking_enabled,An=[{name:"subject",label:G.a.I18n.t("subject")},{name:"status",label:G.a.I18n.t("status")},{name:"segments",label:G.a.I18n.t("lists")},{name:"statistics",label:G.a.I18n.t("statistics"),display:Rn},{name:"sent_at",label:G.a.I18n.t("sentOn")}],jn={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterTrashed"):G.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterDeleted"):G.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneNewsletterRestored"):G.a.I18n.t("multipleNewslettersRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},On=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:jn.onTrash}],Ln=Object(sn.addStatsCTAAction)([{name:"view",link:function(e){return r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("preview"))}},{name:"trash"}]),Dn=function(e,t,a){var n,i=Y()("manage-column","column-primary","has-row-actions"),o=me()(n=e.segments).call(n,function(e){return e.name}).join(", ");return r.a.createElement(r.a.Fragment,null,r.a.createElement("td",{className:i},r.a.createElement("strong",null,r.a.createElement("a",{href:e.preview_url,target:"_blank",rel:"noopener noreferrer"},e.queue.newsletter_rendered_subject||e.subject)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("status")},r.a.createElement(nn,{newsletter:e,mailerLog:a.mta_log})),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("lists")},o),!0===Rn?r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("statistics")},r.a.createElement(on.a,{newsletter:e,currentTime:a.current_time})):null,r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("sentOn")},e.sent_at?G.a.Date.format(e.sent_at):G.a.I18n.t("notSentYet")))},qn=function(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement($a.a,null),r.a.createElement(Ha.a,{hasNews:window.mailpoet_feature_announcement_has_news}),r.a.createElement(Fa.a,{tab:"notification"}),r.a.createElement(z.a,{className:"page-title-action",to:"/notification"},G.a.I18n.t("backToPostNotifications")),r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:e.location,params:e.match.params,endpoint:"newsletters",type:"notification_history",base_url:"notification/history/:parent_id",onRenderItem:Dn,columns:An,messages:jn,item_actions:Ln,bulk_actions:On,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}}))};qn.propTypes={location:u.a.shape({pathname:u.a.string}).isRequired,match:u.a.shape({params:u.a.shape({id:u.a.string})}).isRequired};var Mn=qn,Fn=[{name:"subscriber_id",label:G.a.I18n.t("subscriber"),sortable:!0},{name:"status",label:G.a.I18n.t("sendingStatus")},{name:"failureReason",label:G.a.I18n.t("failureReason")}],Bn={onNoItemsFound:function(){return G.a.I18n.t("noSendingTaskFound")}},$n=function(e){var t=e.match.params.id,a=r.a.useState(""),n=St()(a,2),i=n[0],o=n[1];return r.a.useEffect(function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:t}}).done(function(e){return o(e.data.subject)}).fail(function(e){return G.a.Notice.showApiErrorNotice(e)})},[t]),r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,G.a.I18n.t("sendingStatusTitle")),r.a.createElement(Hn,{newsletterId:t,newsletterSubject:i}),r.a.createElement(Vn,{location:e.location,params:e.match.params}))};$n.propTypes={location:u.a.shape({pathname:u.a.string}).isRequired,match:u.a.shape({params:u.a.shape({id:u.a.string.isRequired}).isRequired}).isRequired};var Vn=r.a.memo(function(e){var t=e.location,a=e.params;return r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:t,params:a,endpoint:"sending_task_subscribers",base_url:"sending-status/:id",onRenderItem:function(e){return r.a.createElement("div",null,r.a.createElement(Wn,e))},getListingItemKey:function(e){var t;return P()(t="".concat(e.taskId,"-")).call(t,e.subscriberId)},columns:Fn,messages:Bn,auto_refresh:!0,sort_by:"failed",sort_order:"desc",afterGetItems:function(e){Object(sn.checkMailerStatus)(e),Object(sn.checkCronStatus)(e)}})},function(e,t){return e.location.pathname===t.location.pathname&&e.params.id===t.params.id});Vn.propTypes={location:u.a.shape({pathname:u.a.string}).isRequired,params:u.a.shape({id:u.a.string.isRequired}).isRequired};var Hn=function(e){var t=e.newsletterId,a=e.newsletterSubject;return t&&a?r.a.createElement("p",null,r.a.createElement(z.a,{to:"/stats/".concat(t)},a)):null};Hn.propTypes={newsletterId:u.a.string,newsletterSubject:u.a.string},Hn.defaultProps={newsletterId:null,newsletterSubject:null};var Wn=function(e){var t,a,n,i,o=e.error,s=e.failed,l=e.taskId,c=e.processed,u=e.email,p=e.subscriberId,d=e.lastName,m=e.firstName,h=Y()("manage-column","column-primary","has-row-actions"),f=G.a.I18n.t("unprocessed");return"1"===c&&(f="1"===s?r.a.createElement("span",null,G.a.I18n.t("failed"),r.a.createElement("br",null),r.a.createElement("a",{className:"button",href:"javascript:;",onClick:function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sending_task_subscribers",action:"resend",data:{taskId:l,subscriberId:p}}).done(function(){return window.mailpoet_listing.forceUpdate()}).fail(function(e){return G.a.Notice.showApiErrorNotice(e)})}},G.a.I18n.t("resend"))):G.a.I18n.t("sent")),r.a.createElement(r.a.Fragment,null,r.a.createElement("td",{"data-automation-id":P()(t="name_".concat(l,"_")).call(t,p),className:h},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-subscribers#/edit/".concat(p)},u)),r.a.createElement("p",{style:{margin:0}},P()(a="".concat(m," ")).call(a,d))),r.a.createElement("td",{className:"column","data-automation-id":P()(n="status_".concat(l,"_")).call(n,p),"data-colname":G.a.I18n.t("sendingStatus")},f),r.a.createElement("td",{className:"column","data-automation-id":P()(i="error_".concat(l,"_")).call(i,p),"data-colname":G.a.I18n.t("failureReason")},o))};Wn.propTypes={error:u.a.string,email:u.a.string.isRequired,failed:u.a.string.isRequired,taskId:u.a.string.isRequired,lastName:u.a.string.isRequired,firstName:u.a.string.isRequired,processed:u.a.string.isRequired,subscriberId:u.a.string.isRequired},Wn.defaultProps={error:""};var zn=$n,Un=a(112),Kn=a.n(Un),Gn=function(e){var t,a,n,i=e.newsletter,o=i.total_sent||0,s=0,l=0,c=0;o>0&&(s=100*i.statistics.clicked/o,l=100*i.statistics.opened/o,c=100*i.statistics.unsubscribed/o);var u,p=G.a.Num.toLocaleFixed(s,1),d=G.a.Num.toLocaleFixed(l,1),m=G.a.Num.toLocaleFixed(c,1),h=P()(t="".concat(d,"% ")).call(t,G.a.I18n.t("percentageOpened")),f=P()(a="".concat(p,"% ")).call(a,G.a.I18n.t("percentageClicked")),g=P()(n="".concat(m,"% ")).call(n,G.a.I18n.t("percentageUnsubscribed"));return u=o>=20&&i.statistics.opened>=5?r.a.createElement("div",{className:"mailpoet_stat_grey"},r.a.createElement("div",{className:"mailpoet_stat_big mailpoet_stat_spaced"},r.a.createElement(Kn.a,{stat:"opened",rate:l,headline:h})),r.a.createElement("div",{className:"mailpoet_stat_big mailpoet_stat_spaced"},r.a.createElement(Kn.a,{stat:"clicked",rate:s,headline:f})),Ie.a.applyFilters("mailpoet_newsletters_revenues_stats",null,i.statistics.revenue),r.a.createElement("div",null,r.a.createElement(Kn.a,{stat:"unsubscribed",rate:c,headline:g}))):r.a.createElement("div",{className:"mailpoet_stat_grey"},r.a.createElement("div",{className:"mailpoet_stat_big mailpoet_stat_spaced"},h),r.a.createElement("div",{className:"mailpoet_stat_big mailpoet_stat_spaced"},f),Ie.a.applyFilters("mailpoet_newsletters_revenues_stats",null,i.statistics.revenue),r.a.createElement("div",null,g)),r.a.createElement("div",null,r.a.createElement("p",{className:"mailpoet_stat_grey mailpoet_stat_big"},G.a.I18n.t("statsTotalSent")," ",qe()(o,10).toLocaleString()),u,i.ga_campaign&&r.a.createElement("p",null,G.a.I18n.t("googleAnalytics"),":",i.ga_campaign),r.a.createElement("p",null,r.a.createElement("a",{href:"https://kb.mailpoet.com/article/190-whats-a-good-email-open-rate",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("readMoreOnStats"))))};Gn.propTypes={newsletter:u.a.shape({ga_campaign:u.a.string,total_sent:u.a.number,statistics:u.a.shape({clicked:u.a.number,opened:u.a.number,unsubscribed:u.a.number,revenue:u.a.shape({currency:u.a.string.isRequired,value:u.a.number.isRequired,formatted:u.a.string.isRequired,count:u.a.number.isRequired})}).isRequired}).isRequired};var Jn=Gn;function Yn(e,t){var a,n="";e&&(n=t?P()(a="".concat(t," <")).call(a,e,">"):e);return n}function Qn(e){var t,a=e.newsletter,n=a.queue.scheduled_at||a.queue.created_at,i=Yn(a.sender_address||"",a.sender_name||""),o=Yn(a.reply_to_address||"",a.reply_to_name||""),s=me()(t=a.segments||[]).call(t,function(e){return e.name}).join(", ");return r.a.createElement("div",null,r.a.createElement("div",{className:"mailpoet_stat_spaced"},r.a.createElement("a",{href:a.preview_url,className:"button-secondary",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("statsPreviewNewsletter"))),r.a.createElement("p",null,G.a.I18n.t("statsDateSent"),":"," ",G.a.Date.format(n)),s&&r.a.createElement("p",null,G.a.I18n.t("statsToSegments"),":"," ",s),r.a.createElement("p",null,G.a.I18n.t("statsFromAddress"),":"," ",i),o&&r.a.createElement("p",null,G.a.I18n.t("statsReplyToAddress"),":"," ",o))}Qn.propTypes={newsletter:u.a.shape({queue:u.a.shape({scheduled_at:u.a.string,created_at:u.a.string}).isRequired,sender_address:u.a.string,sender_name:u.a.string,reply_to_address:u.a.string,reply_to_name:u.a.string,segments:u.a.array}).isRequired};var Xn=Qn,Zn=function(){if(window.mailpoet_premium_active)return null;var e=null;return e=window.mailpoet_subscribers_count<=window.mailpoet_free_premium_subscribers_limit?r.a.createElement("a",{className:"button",href:G.a.MailPoetComUrlFactory.getFreePlanUrl({utm_medium:"stats",utm_campaign:"signup"}),target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("premiumBannerCtaFree")):r.a.createElement("a",{className:"button",href:G.a.MailPoetComUrlFactory.getPricingPageUrl(window.mailpoet_subscribers_count),target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("premiumBannerCtaPremium")),r.a.createElement("div",{className:"mailpoet_stats_premium_banner"},r.a.createElement("h1",null,G.a.I18n.t("premiumBannerTitle")),r.a.createElement("p",null,e),r.a.createElement("a",{href:"admin.php?page=mailpoet-premium"},G.a.I18n.t("premiumBannerLink")))},er=function(e){function t(e){var a;return A()(this,t),(a=D()(this,M()(t).call(this,e))).state={item:{},loading:!0},a}return V()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=this.props.match;window.scrollTo(0,0),this.loadItem(e.params.id)}},{key:"componentDidUpdate",value:function(e){e.match.params.id!==this.props.match.params.id&&this.loadItem(this.props.match.params.id)}},{key:"loadItem",value:function(e){var t=this,a=this.props.history;this.setState({loading:!0}),G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:window.mailpoet_premium_active?"stats":"newsletters",action:window.mailpoet_premium_active?"get":"getWithStats",data:{id:e}}).always(function(){G.a.Modal.loading(!1)}).done(function(e){t.setState({loading:!1,item:e.data})}).fail(function(e){var n;G.a.Notice.error(me()(n=e.errors).call(n,function(e){return e.message}),{scroll:!0}),t.setState({loading:!1,item:{}},function(){a.push("/")})})}},{key:"render",value:function(){var e,t=this.state,a=t.item,n=t.loading,i=a,o=this.props,s=o.match,l=o.location;return n||!i.queue?r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},G.a.I18n.t("statsTitle"),r.a.createElement(z.a,{className:"page-title-action",to:"/"},G.a.I18n.t("backToList")))):r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},P()(e="".concat(G.a.I18n.t("statsTitle"),": ")).call(e,i.subject),r.a.createElement(z.a,{className:"page-title-action",to:"/"},G.a.I18n.t("backToList"))),r.a.createElement("div",{className:"mailpoet_stat_triple-spaced"},r.a.createElement("div",{className:"mailpoet_stat_info"},r.a.createElement(Xn,{newsletter:i})),r.a.createElement("div",{className:"mailpoet_stat_general"},r.a.createElement(Jn,{newsletter:i})),r.a.createElement("div",{style:{clear:"both"}})),r.a.createElement("h2",null,G.a.I18n.t("clickedLinks")),r.a.createElement("div",{className:"mailpoet_stat_triple-spaced"},Ie.a.applyFilters("mailpoet_newsletters_clicked_links_table",r.a.createElement(Zn,null),i.clicked_links)),r.a.createElement("div",{className:"mailpoet_stat_triple-spaced"},Ie.a.applyFilters("mailpoet_newsletters_purchased_products",null,i)),r.a.createElement("h2",null,G.a.I18n.t("subscriberEngagement")),Ie.a.applyFilters("mailpoet_newsletters_subscriber_engagement",r.a.createElement(Zn,null),l,s.params,i))}}]),t}(r.a.Component);er.propTypes={match:u.a.shape({params:u.a.object.isRequired}).isRequired,location:u.a.object.isRequired,history:u.a.shape({push:u.a.func.isRequired}).isRequired};var tr=Object(Re.a)(er);(function(e){function t(){return A()(this,t),D()(this,M()(t).apply(this,arguments))}return V()(t,e),O()(t,[{key:"render",value:function(){return this.props.children}}]),t}(r.a.Component)).propTypes={children:u.a.element.isRequired};var ar=document.getElementById("newsletters_container");if(ar){var nr,rr=[{path:"/standard/(.*)?",component:fn},{path:"/welcome/(.*)?",component:In},{path:"/notification/history/:parent_id/(.*)?",component:Mn},{path:"/notification/(.*)?",component:Pn},{path:"/new/standard",component:Ta},{path:"/new/notification",component:Aa},{path:"/new/welcome",component:La},{path:"/new",component:je},{name:"template",path:"/template/:id",component:pt},{path:"/send/congratulate/:id",component:xa},{path:"/send/:id",component:ma},{path:"/sending-status/:id/(.*)?",component:zn},{path:"/stats/:id/(.*)?",component:tr}];rr=Ie.a.applyFilters("mailpoet_newsletters_before_router",P()(nr=[]).call(nr,pe()(rr),pe()(window.mailpoet_automatic_emails?me()(Ne.a).call(Ne.a,window.mailpoet_automatic_emails,function(e){return{path:"new/".concat(e.slug),name:e.slug,component:qa.a,data:{email:e}}}):null))),window.mailpoet_listing=o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{exact:!0,path:"/",render:function(){return r.a.createElement(Ee,{to:"/standard"})}}),me()(rr).call(rr,function(e){return r.a.createElement(N,{key:e.path,path:e.path,component:e.component,name:e.name||null,data:e.data||null,render:e.render})}))),ar)}var ir=function(e){return"wp_users"===e.type},or=function(e){return"woocommerce_users"===e.type},sr=function(e){return ir(e)||or(e)},lr=[{name:"name",label:G.a.I18n.t("name"),sortable:!0},{name:"description",label:G.a.I18n.t("description")},{name:"subscribed",label:G.a.I18n.t("subscribed")},{name:"unconfirmed",label:G.a.I18n.t("unconfirmed")},{name:"unsubscribed",label:G.a.I18n.t("unsubscribed")},{name:"inactive",label:G.a.I18n.t("inactive")},{name:"bounced",label:G.a.I18n.t("bounced")},{name:"created_at",label:G.a.I18n.t("createdOn"),sortable:!0}],cr={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSegmentTrashed"):G.a.I18n.t("multipleSegmentsTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSegmentDeleted"):G.a.I18n.t("multipleSegmentsDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneSegmentRestored"):G.a.I18n.t("multipleSegmentsRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},ur=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:cr.onTrash}],pr=[{name:"edit",link:function(e){return r.a.createElement(z.a,{to:"/edit/".concat(e.id)},G.a.I18n.t("edit"))},display:function(e){return!sr(e)}},{name:"duplicate_segment",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("listDuplicated").replace("%$1s",e.data.name)),t()}).fail(function(e){var t;G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})},display:function(e){return!sr(e)}},{name:"read_more",link:function(){return r.a.createElement("a",{href:"https://kb.mailpoet.com/article/133-the-wordpress-users-list",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("readMore"))},display:function(e){return ir(e)}},{name:"synchronize_segment",label:G.a.I18n.t("forceSync"),onClick:function(e,t){G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"synchronize",data:{type:e.type}}).done(function(){G.a.Modal.loading(!1),G.a.Notice.success(G.a.I18n.t("listSynchronized").replace("%$1s",e.name)),t()}).fail(function(e){var t;(G.a.Modal.loading(!1),e.errors.length>0)&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})},display:function(e){return ir(e)||or(e)}},{name:"view_subscribers",link:function(e){return r.a.createElement("a",{href:e.subscribers_url,"data-automation-id":"view_subscribers_".concat(e.name)},G.a.I18n.t("viewSubscribers"))}},{name:"trash",display:function(e){return!sr(e)}}],dr=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"renderItem",function(e,t){var a,n=Y()("manage-column","column-primary","has-row-actions"),i=Number(e.subscribers_count.subscribed||0),o=Number(e.subscribers_count.unconfirmed||0),s=Number(e.subscribers_count.unsubscribed||0),l=Number(e.subscribers_count.inactive||0),c=Number(e.subscribers_count.bounced||0);return a=sr(e)?r.a.createElement("span",{className:"row-title"},e.name):r.a.createElement(z.a,{className:"row-title",to:"/edit/".concat(e.id)},e.name),r.a.createElement("div",null,r.a.createElement("td",{className:n,"data-automation-id":"segment_name_".concat(e.name)},r.a.createElement("strong",null,a),t),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("description")},r.a.createElement("abbr",null,e.description)),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("subscribed")},r.a.createElement("abbr",null,i.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("unconfirmed")},r.a.createElement("abbr",null,o.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("unsubscribed")},r.a.createElement("abbr",null,s.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("inactive")},r.a.createElement("abbr",null,l.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("bounced")},r.a.createElement("abbr",null,c.toLocaleString())),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("createdOn")},r.a.createElement("abbr",null,G.a.Date.format(e.created_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",{className:"mailpoet-segments-listing"},r.a.createElement("h1",{className:"title"},G.a.I18n.t("pageTitle")," ",r.a.createElement(z.a,{className:"page-title-action",to:"/new"},G.a.I18n.t("new"))),r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:cr,search:!1,endpoint:"segments",onRenderItem:this.renderItem,columns:lr,bulk_actions:ur,item_actions:pr,sort_by:"name",sort_order:"asc"}))}}]),t}(r.a.Component);dr.propTypes={location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired};var mr=dr,hr=a(493),fr=a.n(hr),gr=document.getElementById("segments_container");gr&&o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{path:"/new",component:fr.a}),r.a.createElement(N,{path:"/edit/:id",component:fr.a}),r.a.createElement(N,{path:"*",component:mr}))),gr);var _r=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).state={senderAddress:e.senderAddress,senderName:e.senderName,replyToName:e.replyToName,replyToAddress:e.replyToAddress},n.onChange=Ke()(a=n.onChange).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"onChange",value:function(e,t){var a={};a[e]=t.target.value,this.setState(a)}},{key:"render",value:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("label",{htmlFor:"settings[from_name]"},G.a.I18n.t("from")),r.a.createElement("input",{type:"text",id:"settings[from_name]","data-automation-id":"settings-page-from-name-field",name:"sender[name]",value:this.state.senderName,onChange:Object(Se.partial)(this.onChange,"senderName"),placeholder:G.a.I18n.t("yourName")}),r.a.createElement("input",{type:"email",id:"settings[from_email]",name:"sender[address]","data-automation-id":"settings-page-from-email-field",value:this.state.senderAddress,onChange:Object(Se.partial)(this.onChange,"senderAddress"),placeholder:"from@mydomain.com"})),r.a.createElement("div",{className:"regular-text"},r.a.createElement(Bt,{emailAddress:this.state.senderAddress,mssActive:this.props.mssActive})),r.a.createElement("p",null,r.a.createElement("label",{htmlFor:"settings[reply_name]"},G.a.I18n.t("replyTo")),r.a.createElement("input",{type:"text",id:"settings[reply_name]",name:"reply_to[name]",value:this.state.replyToName,onChange:Object(Se.partial)(this.onChange,"replyToName"),placeholder:G.a.I18n.t("yourName")}),r.a.createElement("input",{type:"email",id:"settings[reply_email]",name:"reply_to[address]",value:this.state.replyToAddress,onChange:Object(Se.partial)(this.onChange,"replyToAddress"),placeholder:"reply_to@mydomain.com"})))}}]),t}(r.a.Component);_r.propTypes={senderAddress:u.a.string.isRequired,senderName:u.a.string.isRequired,replyToAddress:u.a.string.isRequired,replyToName:u.a.string.isRequired,mssActive:u.a.bool.isRequired};var br=_r,vr=function(e){function t(e){var a,n;return A()(this,t),(n=D()(this,M()(t).call(this,e))).state={senderAddress:e.senderAddress,senderName:e.senderName},n.onChange=Ke()(a=n.onChange).call(a,B()(n)),n}return V()(t,e),O()(t,[{key:"onChange",value:function(e,t){var a={};a[e]=t.target.value,this.setState(a)}},{key:"render",value:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement("th",{scope:"row"},r.a.createElement("label",{htmlFor:"settings[signup_confirmation_from_name]"},G.a.I18n.t("from"))),r.a.createElement("td",null,r.a.createElement("p",null,r.a.createElement("input",{type:"text",id:"settings[signup_confirmation_from_name]",name:"signup_confirmation[from][name]","data-automation-id":"signup_confirmation_email_from_name",value:this.state.senderName,onChange:Object(Se.partial)(this.onChange,"senderName"),placeholder:G.a.I18n.t("yourName")}),r.a.createElement("input",{type:"email",id:"settings[signup_confirmation_from_email]",name:"signup_confirmation[from][address]","data-automation-id":"signup_confirmation_email_from_email",value:this.state.senderAddress,onChange:Object(Se.partial)(this.onChange,"senderAddress"),placeholder:"confirmation@mydomain.com",size:"28"})),r.a.createElement("div",{className:"regular-text"},r.a.createElement(Bt,{emailAddress:this.state.senderAddress,mssActive:this.props.mssActive}))))}}]),t}(r.a.Component);vr.propTypes={senderAddress:u.a.string.isRequired,senderName:u.a.string.isRequired,mssActive:u.a.bool.isRequired};var yr=vr,wr=document.getElementById("settings_sender_container");wr&&o.a.render(r.a.createElement(br,{senderAddress:window.mailpoet_settings_sender_adddress,senderName:window.mailpoet_settings_sender_name,replyToAddress:window.mailpoet_settings_reply_to_address,replyToName:window.mailpoet_settings_reply_to_name,mssActive:window.mailpoet_mss_active}),wr);var Er=document.getElementById("settings_signup_confirmation_sender_container");Er&&o.a.render(r.a.createElement(yr,{senderAddress:window.mailpoet_settings_signup_confirmation_address,senderName:window.mailpoet_settings_signup_confirmation_name,mssActive:window.mailpoet_mss_active}),Er);var kr=[{name:"name",label:G.a.I18n.t("formName"),sortable:!0},{name:"segments",label:G.a.I18n.t("segments")},{name:"signups",label:G.a.I18n.t("signups")},{name:"created_at",label:G.a.I18n.t("createdOn"),sortable:!0}],Ir={onTrash:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneFormTrashed"):G.a.I18n.t("multipleFormsTrashed").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onDelete:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneFormDeleted"):G.a.I18n.t("multipleFormsDeleted").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)},onRestore:function(e){var t=Number(e.meta.count),a=null;a=1===t?G.a.I18n.t("oneFormRestored"):G.a.I18n.t("multipleFormsRestored").replace("%$1d",t.toLocaleString()),G.a.Notice.success(a)}},Sr=[{name:"trash",label:G.a.I18n.t("moveToTrash"),onSuccess:Ir.onTrash}],Nr=[{name:"edit",label:G.a.I18n.t("edit"),link:function(e){return r.a.createElement("a",{href:"admin.php?page=mailpoet-form-editor&id=".concat(e.id)},G.a.I18n.t("edit"))}},{name:"duplicate",label:G.a.I18n.t("duplicate"),onClick:function(e,t){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"duplicate",data:{id:e.id}}).done(function(e){G.a.Notice.success(G.a.I18n.t("formDuplicated").replace("%$1s",e.data.name)),t()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},{name:"trash"}],xr=function(e){function t(){var e,a,n;A()(this,t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=D()(this,(e=M()(t)).call.apply(e,P()(a=[this]).call(a,o))),W()(B()(n),"createForm",function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"create"}).done(function(e){window.location=window.mailpoet_form_edit_url+e.data.id}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}),W()(B()(n),"renderItem",function(e,t){var a,n,i,o=Y()("manage-column","column-primary","has-row-actions"),s=me()(a=ze()(n=window.mailpoet_segments).call(n,function(t){return-1!==K.a.inArray(t.id,e.segments)})).call(a,function(e){return e.name}).join(", ");"user"===e.settings.segments_selected_by&&(s=P()(i="".concat(G.a.I18n.t("userChoice")," ")).call(i,s));return r.a.createElement("div",null,r.a.createElement("td",{className:o},r.a.createElement("strong",null,r.a.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-form-editor&id=".concat(e.id)},e.name)),t),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("segments")},s),r.a.createElement("td",{className:"column","data-colname":G.a.I18n.t("signups")},e.signups),r.a.createElement("td",{className:"column-date","data-colname":G.a.I18n.t("createdOn")},r.a.createElement("abbr",null,G.a.Date.format(e.created_at))))}),n}return V()(t,e),O()(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h1",{className:"title"},G.a.I18n.t("pageTitle")," ",r.a.createElement("button",{className:"page-title-action",href:"javascript:;",onClick:this.createForm,"data-automation-id":"create_new_form",type:"button"},G.a.I18n.t("new"))),r.a.createElement(X.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:Ir,search:!1,endpoint:"forms",onRenderItem:this.renderItem,columns:kr,bulk_actions:Sr,item_actions:Nr}))}}]),t}(r.a.Component);xr.propTypes={location:u.a.object.isRequired,match:u.a.shape({params:u.a.object}).isRequired};var Cr=xr,Tr=document.getElementById("forms_container");Tr&&o.a.render(r.a.createElement(E,null,r.a.createElement(N,{path:"*",component:Cr})),Tr);var Pr=a(55),Rr=a.n(Pr),Ar=G.a;K()("#mailpoet_settings").length>0&&(Ar.Router=new(Rr.a.Router.extend({routes:{"":"defaultRoute","mta(/:group)":"sendingMethodGroup","(:tab)":"tabs"},defaultRoute:function(){this.tabs("basics")},sendingMethodGroup:function(e){this.tabs("mta"),K()("#mailpoet_sending_method_setup, .mailpoet_sending_method").hide(),K()(".mailpoet_settings_submit").hide(),null===e?K()(".mailpoet_sending_methods, .mailpoet_sending_methods_help").fadeIn():(K()("#mailpoet_mta_spf")["mailpoet"===e?"hide":"show"](),K()(".mailpoet_sending_methods, .mailpoet_sending_methods_help").hide(),K()('.mailpoet_sending_method[data-group="'+e+'"]').show(),K()("#mailpoet_sending_method_setup").fadeIn())},tabs:function(e){K()(".nav-tab-wrapper a").removeClass("nav-tab-active"),K()(".mailpoet_tab_panel, .mailpoet_section").hide(),K()('a.nav-tab[href="#'+e+'"]').addClass("nav-tab-active").blur(),K()('.mailpoet_tab_panel[data-tab="'+e+'"]').length>0&&K()('.mailpoet_tab_panel[data-tab="'+e+'"]').show(),K()(".mailpoet_settings_submit").show(),Ar.trackEvent("User has clicked a tab in Settings",{"MailPoet Free version":window.mailpoet_version,"Tab ID":e})}})),K()(document).ready(function(){Rr.a.History.started||Rr.a.history.start()}));var jr=[{name:"knowledgeBase",label:G.a.I18n.t("tabKnowledgeBaseTitle"),link:"/knowledgeBase"},{name:"systemStatus",label:G.a.I18n.t("tabSystemStatusTitle"),link:"/systemStatus"},{name:"systemInfo",label:G.a.I18n.t("tabSystemInfoTitle"),link:"/systemInfo"},{name:"yourPrivacy",label:G.a.I18n.t("tabYourPrivacyTitle"),link:"/yourPrivacy"}];function Or(e){var t=me()(jr).call(jr,function(t){var a=Y()("nav-tab",{"nav-tab-active":e.tab===t.name});return r.a.createElement(z.a,{key:"tab-".concat(t.name),className:a,to:t.link},t.label)});return r.a.createElement("h2",{className:"nav-tab-wrapper"},t)}Or.propTypes={tab:u.a.string},Or.defaultProps={tab:"knowledgeBase"};var Lr=Or;var Dr=function(){return r.a.createElement("div",null,r.a.createElement(Lr,{tab:"knowledgeBase"}),r.a.createElement("p",null,G.a.I18n.t("knowledgeBaseIntro")),r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/116-common-problems"},"Common Problems")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/165-newsletters"},"Newsletters")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/156-migration-questions"},"Migration Questions")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/149-sending-methods"},"Sending Methods")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/139-subscription-forms"},"Subscription Forms")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/114-getting-started"},"Getting Started")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/123-newsletter-designer"},"Newsletter Designer")),r.a.createElement("li",null,r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/category/121-subscribers-and-lists"},"Subscribers and Lists"))),r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://kb.mailpoet.com/",className:"button button-primary"},G.a.I18n.t("knowledgeBaseButton")))};function qr(e){e.target.select()}var Mr=function(){var e=window.systemInfoData;return r.a.createElement("div",null,r.a.createElement(Lr,{tab:"systemInfo"}),r.a.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},r.a.createElement("p",null,G.a.I18n.t("systemInfoIntro"))),function(e){if(Ne.a.isObject(e)){var t,a=me()(t=$e()(e)).call(t,function(t){var a;return P()(a="".concat(t,": ")).call(a,e[t])});return r.a.createElement("textarea",{readOnly:!0,onFocus:qr,value:a.join("\n"),style:{width:"100%",height:"400px"}})}return r.a.createElement("p",null,G.a.I18n.t("systemInfoDataError"))}(e))},Fr=a(73),Br=a.n(Fr),$r=function(e){var t;return r.a.createElement("table",{className:"widefat fixed",style:{maxWidth:e.max_width}},r.a.createElement("tbody",null,me()(t=e.rows).call(t,function(e){return r.a.createElement("tr",{key:"row_".concat(e.key)},r.a.createElement("td",{className:"row-title"},e.key),r.a.createElement("td",null,e.value))})))};$r.propTypes={max_width:u.a.string,rows:u.a.arrayOf(u.a.shape({key:u.a.string.isRequired,value:u.a.oneOfType([u.a.string,u.a.number,u.a.element]).isRequired})).isRequired},$r.defaultProps={max_width:"auto"};var Vr=$r,Hr=function(e){return r.a.createElement("span",null,!0===e.children&&e.truthy||!1===e.children&&e.falsy||e.unknown)};Hr.propTypes={truthy:u.a.string,falsy:u.a.string,unknown:u.a.string,children:u.a.bool},Hr.defaultProps={truthy:G.a.I18n.t("yes"),falsy:G.a.I18n.t("no"),unknown:G.a.I18n.t("unknown"),children:null};var Wr=Hr,zr=function(e){var t,a=e.status_data,n={active:G.a.I18n.t("running"),inactive:G.a.I18n.t("cronWaiting")},i=Br()(a.last_error)?r.a.createElement(r.a.Fragment,null,me()(t=a.last_error).call(t,function(e){return r.a.createElement("div",{key:e.worker},e.worker,":"," ",r.a.createElement("i",null,e.message))})):a.last_error;return r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("systemStatusCronStatusTitle")),r.a.createElement(Vr,{max_width:"400px",rows:[{key:G.a.I18n.t("accessible"),value:r.a.createElement(Wr,null,a.accessible)},{key:G.a.I18n.t("status"),value:n[a.status]?n[a.status]:G.a.I18n.t("unknown")},{key:G.a.I18n.t("lastUpdated"),value:a.updated_at?G.a.Date.full(1e3*a.updated_at):G.a.I18n.t("unknown")},{key:G.a.I18n.t("lastRunStarted"),value:a.run_accessed_at?G.a.Date.full(1e3*a.run_started_at):G.a.I18n.t("unknown")},{key:G.a.I18n.t("lastRunCompleted"),value:a.run_completed_at?G.a.Date.full(1e3*a.run_completed_at):G.a.I18n.t("unknown")},{key:G.a.I18n.t("lastSeenError"),value:i||G.a.I18n.t("none")},{key:G.a.I18n.t("lastSeenErrorDate"),value:a.last_error_date?G.a.Date.full(1e3*a.last_error_date):G.a.I18n.t("unknown")}]}))};zr.propTypes={status_data:u.a.shape({accessible:u.a.bool,status:u.a.string,updated_at:u.a.number,run_accessed_at:u.a.number,run_completed_at:u.a.number}).isRequired};var Ur=zr,Kr=function(e){return r.a.createElement("tr",null,r.a.createElement("td",{className:"column column-primary"},e.task.id),r.a.createElement("td",{className:"column"},e.task.type),r.a.createElement("td",{className:"column"},e.task.newsletter?r.a.createElement("a",{href:e.task.newsletter.preview_url,"data-newsletter-id":e.task.newsletter.newsletter_id,"data-queue-id":e.task.newsletter.queue_id,target:"_blank",rel:"noopener noreferrer"},e.task.newsletter.subject||G.a.I18n.t("preview")):G.a.I18n.t("none")),r.a.createElement("td",{className:"column"},e.task.priority),e.show_scheduled_at?r.a.createElement("td",{className:"column-date"},r.a.createElement("abbr",null,G.a.Date.format(1e3*e.task.scheduled_at))):null,r.a.createElement("td",{className:"column-date"},r.a.createElement("abbr",null,G.a.Date.format(1e3*e.task.updated_at))))};Kr.propTypes={show_scheduled_at:u.a.bool,task:u.a.shape({id:u.a.number.isRequired,type:u.a.string.isRequired,priority:u.a.number.isRequired,updated_at:u.a.number.isRequired,scheduled_at:u.a.number,status:u.a.string,newsletter:u.a.shape({newsletter_id:u.a.number.isRequired,queue_id:u.a.number.isRequired,preview_url:u.a.string.isRequired,subject:u.a.string})}).isRequired},Kr.defaultProps={show_scheduled_at:!1};var Gr=Kr,Jr=function(e){return r.a.createElement("tr",null,r.a.createElement("th",{className:"row-title"},"Id"),r.a.createElement("th",{className:"row-title"},G.a.I18n.t("type")),r.a.createElement("th",{className:"row-title"},G.a.I18n.t("email")),r.a.createElement("th",{className:"row-title"},G.a.I18n.t("priority")),e.show_scheduled_at?r.a.createElement("th",{className:"row-title"},G.a.I18n.t("scheduledAt")):null,r.a.createElement("th",{className:"row-title"},G.a.I18n.t("updatedAt")))};Jr.propTypes={show_scheduled_at:u.a.bool},Jr.defaultProps={show_scheduled_at:!1};var Yr=Jr,Qr=function(e){var t,a=e.show_scheduled_at?6:5;return r.a.createElement("table",{className:"widefat fixed striped"},r.a.createElement("thead",null,r.a.createElement(Yr,{show_scheduled_at:e.show_scheduled_at})),r.a.createElement("tbody",null,e.tasks.length?me()(t=e.tasks).call(t,function(t){return r.a.createElement(Gr,{key:t.id,task:t,show_scheduled_at:e.show_scheduled_at})}):r.a.createElement("tr",{className:"no-items"},r.a.createElement("td",{colSpan:a},G.a.I18n.t("nothingToShow")))),r.a.createElement("tfoot",null,r.a.createElement(Yr,{show_scheduled_at:e.show_scheduled_at})))};Qr.propTypes={show_scheduled_at:u.a.bool,tasks:u.a.arrayOf(Gr.propTypes.task).isRequired},Qr.defaultProps={show_scheduled_at:!1};var Xr=Qr,Zr=function(e){var t,a,n,i=e.status_data;return r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("systemStatusQueueTitle")),r.a.createElement(Vr,{max_width:"400px",rows:[{key:G.a.I18n.t("status"),value:"paused"===i.status?G.a.I18n.t("paused"):G.a.I18n.t("running")},{key:G.a.I18n.t("startedAt"),value:i.started?G.a.Date.full(1e3*i.started):G.a.I18n.t("unknown")},{key:G.a.I18n.t("sentEmails"),value:i.sent||0},{key:G.a.I18n.t("retryAttempt"),value:i.retry_attempt||G.a.I18n.t("none")},{key:G.a.I18n.t("retryAt"),value:i.retry_at?G.a.Date.full(1e3*i.retry_at):G.a.I18n.t("none")},{key:G.a.I18n.t("error"),value:i.error?i.error.error_message:G.a.I18n.t("none")},{key:G.a.I18n.t("totalCompletedTasks"),value:i.tasksStatusCounts.completed},{key:G.a.I18n.t("totalRunningTasks"),value:i.tasksStatusCounts.running},{key:G.a.I18n.t("totalPausedTasks"),value:i.tasksStatusCounts.paused},{key:G.a.I18n.t("totalScheduledTasks"),value:i.tasksStatusCounts.scheduled}]}),r.a.createElement("h4",null,G.a.I18n.t("scheduledTasks")),r.a.createElement(Xr,{show_scheduled_at:!0,tasks:ze()(t=i.latestTasks).call(t,function(e){return"scheduled"===e.status})}),r.a.createElement("h4",null,G.a.I18n.t("runningTasks")),r.a.createElement(Xr,{tasks:ze()(a=i.latestTasks).call(a,function(e){return null===e.status})}),r.a.createElement("h4",null,G.a.I18n.t("completedTasks")),r.a.createElement(Xr,{tasks:ze()(n=i.latestTasks).call(n,function(e){return"completed"===e.status})}))};Zr.propTypes={status_data:u.a.shape({status:u.a.string,started:u.a.number,sent:u.a.number,retry_attempt:u.a.number,retry_at:u.a.number,error:u.a.shape({operation:u.a.string,error_message:u.a.string}),tasksStatusCounts:u.a.shape({completed:u.a.number.isRequired,running:u.a.number.isRequired,paused:u.a.number.isRequired,scheduled:u.a.number.isRequired}).isRequired,latestTasks:u.a.arrayOf(Gr.propTypes.task).isRequired}).isRequired};var ei=Zr;function ti(e,t,a,n,i){var o,s=e?"success":"error",l=e?G.a.I18n.t("systemStatusConnectionSuccessful"):P()(o="".concat(G.a.I18n.t("systemStatusConnectionUnsuccessful")," ")).call(o,t);return a&&(l=Dt()(l,/\[link\](.*?)\[\/link\]/g,function(e){return r.a.createElement("a",{href:a,"data-beacon-article":n,key:"kb-link"},e)})),r.a.createElement("div",{className:"mailpoet_notice notice inline notice-".concat(s),style:{marginTop:"1em"}},r.a.createElement("p",null,l),i?r.a.createElement("p",null,r.a.createElement("i",null,i)):null)}var ai=function(){var e,t,a,n,i,o=window.systemStatusData;return r.a.createElement("div",null,r.a.createElement(Lr,{tab:"systemStatus"}),r.a.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},r.a.createElement("p",null,o.mss.enabled?G.a.I18n.t("systemStatusIntroCronMSS"):G.a.I18n.t("systemStatusIntroCron"))),(t=(e=o).cron.isReachable,a=e.cron.url,n=G.a.I18n.t("systemStatusCronConnectionUnsuccessfulInfo"),i=t?null:e.cron.pingResponse,r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("systemStatusCronTitle")),r.a.createElement("p",null,r.a.createElement("a",{href:a,target:"_blank",rel:"noopener noreferrer"},a)),ti(t,n,"https://kb.mailpoet.com/article/231-sending-does-not-work","5a0257ac2c7d3a272c0d7ad6",i))),function(e){if(e.mss.enabled){var t=e.mss.enabled.isReachable;return r.a.createElement("div",null,r.a.createElement("h2",null,G.a.I18n.t("systemStatusMSSTitle")),ti(t,G.a.I18n.t("systemStatusMSSConnectionUnsuccessfulInfo"),!1))}}(o),r.a.createElement(Ur,{status_data:o.cronStatus}),r.a.createElement(ei,{status_data:o.queueStatus}))};var ni=function(){return r.a.createElement("div",null,r.a.createElement(Lr,{tab:"yourPrivacy"}),r.a.createElement("p",null,G.a.I18n.t("yourPrivacyContent1")),r.a.createElement("p",null,G.a.I18n.t("yourPrivacyContent2")),r.a.createElement("p",null,G.a.I18n.t("yourPrivacyContent3")),r.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://www.mailpoet.com/privacy-notice/",className:"button button-primary"},G.a.I18n.t("yourPrivacyButton")))},ri=document.getElementById("help_container");ri&&o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{exact:!0,path:"/",render:function(){return r.a.createElement(Ee,{to:"/knowledgeBase"})}}),r.a.createElement(N,{path:"/knowledgeBase",component:Dr}),r.a.createElement(N,{path:"/systemStatus",component:ai}),r.a.createElement(N,{path:"/systemInfo",component:Mr}),r.a.createElement(N,{path:"/yourPrivacy",component:ni}))),ri);var ii=a(515),oi=a.n(ii),si=[{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-segments]").parentNode,intro:G.a.I18n.t("introLists")},{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-forms]").parentNode,intro:G.a.I18n.t("introForms")},{element:".mailpoet-chat",intro:G.a.I18n.t("introChat")},{element:"#mailpoet-new-email",intro:G.a.I18n.t("introEmails")}],li=!1;G.a.showIntro=function(){if(!(li||window.innerWidth<=960)){var e=oi()();e.setOptions({steps:si,nextLabel:"".concat(G.a.I18n.t("introNext")," →"),prevLabel:"← ".concat(G.a.I18n.t("introBack")),skipLabel:G.a.I18n.t("introSkip"),doneLabel:G.a.I18n.t("introDone"),positionPrecedence:["right","left","bottom","top"],buttonClass:"button",hidePrev:!0,hideNext:!0,helperElementPadding:12,scrollToElement:!1,showStepNumbers:!1,tooltipPosition:"auto"}),e.onafterchange(function(e){if("fixed"===getComputedStyle(e).getPropertyValue("position")){var t=document.querySelector(".introjs-helperLayer"),a=document.querySelector(".introjs-tooltipReferenceLayer");a.style.top="".concat(qe()(a.style.top,10)-window.pageYOffset,"px"),t.style.top="".concat(qe()(t.style.top,10)-window.pageYOffset,"px")}}),e.onexit(function(){li=!1,document.body.classList.remove("mailpoet-intro-active")}),e.onskip(function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_intro:0}})}),e.start(),li=!0,document.body.classList.add("mailpoet-intro-active")}};var ci,ui=function(e){return"show_poll_success_delivery_".concat(e)},pi=function(){if(!document.getElementById("typef_orm")){var e=document.createElement("script");e.id="typef_orm",e.src="https://embed.typeform.com/embed.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}},di={successDelivery:{canShow:function(e,t){return"en"===window.mailpoet_locale&&"1"===window.mailpoet_polls_visibility[ui(e)]&&(t||"PHPMail"===window.mailpoet_polls_data.mta_method)},initTypeformScript:pi,setPollShown:function(e){var t={};t[ui(e)]="0",G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:t}),window.mailpoet_polls_visibility[ui(e)]="0"},showModal:function(e,t){G.a.Modal.popup({onInit:pi,template:'\n <div class="typeform-widget"\n data-url="https://mailpoet.typeform.com/to/'.concat(t,'"\n data-transparency="100"\n data-hide-headers="true"\n data-hide-footer="true"\n style="width: 500px; height: 500px; max-width: 100%; max-height: 100%;"\n ></div>\n ')})}}};G.a.Poll=di,(ci=document.getElementById("mailpoet_reinstall"))&&ci.addEventListener("click",function(){return confirm(G.a.I18n.t("reinstallConfirmation"))&&(G.a.trackEvent("User has reinstalled MailPoet via Settings",{"MailPoet Free version":window.mailpoet_version}),G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"setup",action:"reset"}).always(function(){G.a.Modal.loading(!1)}).done(function(){window.location="admin.php?page=mailpoet-newsletters"}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})),!1},!1);var mi=Object(Re.a)(function(e){var t=e.children,a=e.location.pathname;return Object(n.useEffect)(function(){window.scrollTo(0,0)},[a]),t||null}),hi=a(54),fi=a.n(hi),gi=r.a.createContext({isNewUser:window.mailpoet_is_new_user,segments:window.mailpoetSegments});function _i(e){var t=e.activeMethod,a=e.onMethodChange,n=r.a.useContext(gi).isNewUser,i=Y()("mailpoet_badge","mailpoet_badge_video",{mailpoet_badge_video_grey:!n});return r.a.createElement(r.a.Fragment,null,r.a.createElement("form",{className:"mailpoet_import_selection_form"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("methodSelectionHead")),r.a.createElement("label",{htmlFor:"import-paste-method"},r.a.createElement("input",{type:"radio",name:"select_method","data-automation-id":"import-paste-method",id:"import-paste-method",checked:"paste-method"===t,onChange:function(){return a("paste-method")}}),G.a.I18n.t("methodPaste")),r.a.createElement("label",{htmlFor:"import-csv-method"},r.a.createElement("input",{type:"radio",name:"select_method","data-automation-id":"import-csv-method",id:"import-csv-method",checked:"file-method"===t,onChange:function(){return a("file-method")}}),G.a.I18n.t("methodUpload")),r.a.createElement("label",{htmlFor:"import-mailchimp-method"},r.a.createElement("input",{type:"radio",name:"select_method","data-automation-id":"import-mailchimp-method",id:"import-mailchimp-method",checked:"mailchimp-method"===t,onChange:function(){return a("mailchimp-method")}}),G.a.I18n.t("methodMailChimp"))),r.a.createElement("a",{className:i,href:"https://kb.mailpoet.com/article/242-video-guide-importing-subscribers-using-a-csv-file","data-beacon-article":"5a8e8f0204286305fbc9be9a",target:"_blank",rel:"noopener noreferrer"},r.a.createElement("span",{className:"dashicons dashicons-format-video"}),G.a.I18n.t("seeVideo")))}_i.propTypes={activeMethod:u.a.string,onMethodChange:u.a.func.isRequired},_i.defaultProps={activeMethod:void 0};var bi=_i,vi=function(e){var t=e.hidePrevious,a=e.canGoNext,n=e.onPreviousAction,i=e.onNextAction,o=Y()("button-primary","wysija",{"button-disabled":!a});return r.a.createElement("div",{className:"mailpoet_import_step_buttons"},!t&&r.a.createElement(r.a.Fragment,null,r.a.createElement("button",{className:"button-primary wysija button",type:"button",onClick:n},G.a.I18n.t("previousStep")),"  "),r.a.createElement("button",{type:"button","data-automation-id":"import-next-step",className:o,onClick:function(){a&&i()}},G.a.I18n.t("nextStep")))};vi.propTypes={canGoNext:u.a.bool,hidePrevious:u.a.bool,onPreviousAction:u.a.func,onNextAction:u.a.func},vi.defaultProps={hidePrevious:!1,canGoNext:!0,onPreviousAction:function(){},onNextAction:function(){}};var yi=vi,wi=function(e){var t=e.onValueChange,a=e.canFinish,n=e.onFinish,i=e.data;return r.a.createElement(r.a.Fragment,null,r.a.createElement("label",{htmlFor:"paste_input",className:"mailpoet_import_method_paste"},r.a.createElement("div",{className:"mailpoet_import_paste_texts"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("pasteLabel")),r.a.createElement("p",{className:"description"},Dt()(G.a.I18n.t("pasteDescription"),/\[link\](.*?)\[\/link\]/,function(e){return r.a.createElement("a",{href:"".concat("https://kb.mailpoet.com/article/126-importing-subscribers-with-csv-files"),"data-beacon-article":"57ce079f903360649f6e56fc",key:"kb-link",target:"_blank",rel:"noopener noreferrer"},e)}))),r.a.createElement("textarea",{id:"paste_input",rows:"15",placeholder:"Email, First Name, Last Name\njohn@doe.com, John, Doe\nmary@smith.com, Mary, Smith\njohnny@walker.com, Johnny, Walker",className:"regular-text code",onChange:function(e){t(e.target.value)},defaultValue:i})),r.a.createElement(yi,{canGoNext:a,hidePrevious:!0,onNextAction:n}))};wi.propTypes={onFinish:u.a.func,canFinish:u.a.bool.isRequired,onValueChange:u.a.func.isRequired,data:u.a.string},wi.defaultProps={onFinish:function(){},data:""};var Ei=wi,ki=function(e){var t=e.onValueChange,a=e.canFinish,n=e.onFinish;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",null,r.a.createElement("label",{htmlFor:"paste_input",className:"mailpoet_import_method_paste"},r.a.createElement("div",{className:"mailpoet_import_paste_texts"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("methodUpload")),r.a.createElement("p",{className:"description"},Dt()(G.a.I18n.t("pasteDescription"),/\[link\](.*?)\[\/link\]/,function(e){return r.a.createElement("a",{href:"".concat("https://kb.mailpoet.com/article/126-importing-subscribers-with-csv-files"),"data-beacon-article":"57ce079f903360649f6e56fc",key:"kb-link",target:"_blank",rel:"noopener noreferrer"},e)}))),r.a.createElement("input",{type:"file",id:"file_local",accept:".csv","data-automation-id":"import-file-upload-input",onChange:function(e){var a=e.target.value.match(/[^.]+$/);G.a.Notice.hide(),null===a||"csv"!==a[0].toLowerCase()?(G.a.Notice.error(G.a.I18n.t("wrongFileFormat")),t("")):t(e.target.files[0])}}))),r.a.createElement(yi,{canGoNext:a,hidePrevious:!0,onNextAction:n}))};ki.propTypes={canFinish:u.a.bool.isRequired,onFinish:u.a.func,onValueChange:u.a.func.isRequired},ki.defaultProps={onFinish:function(){}};var Ii=ki,Si=function(e){var t=e.onFinish,a=Object(n.useState)(""),i=St()(a,2),o=i[0],s=i[1],l=Object(n.useState)(void 0),c=St()(l,2),u=c[0],p=c[1],d=Object(n.useState)([]),m=St()(d,2),h=m[0],f=m[1],g=Y()("mailpoet_mailchimp-key-status",{"mailpoet_mailchimp-ok":Br()(u)});return r.a.createElement("div",{className:"mailpoet_import_mailchimp"},r.a.createElement("div",{className:"mailpoet_mailchimp_key"},r.a.createElement("label",{htmlFor:"mailpoet_mailchimp_key_input",className:"mailpoet_mailchimp_key_input"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("methodMailChimpLabel")),r.a.createElement("input",{id:"mailpoet_mailchimp_key_input",type:"text",onChange:function(e){var t;s(e.target.value),""===fi()(t=e.target.value).call(t)&&p(void 0)}})),r.a.createElement("button",{className:"button",type:"button",onClick:function(){G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpLists",data:{api_key:o}}).always(function(){G.a.Modal.loading(!1)}).done(function(e){return p(e.data)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}},G.a.I18n.t("methodMailChimpVerify")),r.a.createElement("span",{className:g},Br()(u)&&0===u.length?G.a.I18n.t("noMailChimpLists"):null)),u?r.a.createElement("div",{className:"mailpoet_mailchimp_lists"},r.a.createElement("span",{className:"mailpoet_import_heading"},G.a.I18n.t("methodMailChimpSelectList")),r.a.createElement(ee.a,{field:{id:"segments",name:"list-selection",multiple:!0,placeholder:G.a.I18n.t("methodMailChimpSelectPlaceholder"),forceSelect2:!0,values:u},onValueChange:function(e){return f(e.target.value)}})):null,r.a.createElement(yi,{canGoNext:Br()(h)&&h.length>0,hidePrevious:!0,onNextAction:function(){G.a.Modal.loading(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpSubscribers",data:{api_key:o,lists:h}}).always(function(){G.a.Modal.loading(!1)}).done(function(e){return t(e.data)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}}))};Si.propTypes={onFinish:u.a.func},Si.defaultProps={onFinish:function(){}};var Ni=Si,xi=a(516),Ci=a.n(xi),Ti=a(43),Pi=a.n(Ti),Ri=a(330),Ai=a.n(Ri),ji=a(139),Oi=a.n(ji),Li=function(e){var t;return Oi()(t=window.roleBasedEmails).call(t,function(t){return Ai()(e).call(e,"".concat(t,"@"))})>=0},Di=function(e){var t,a,n,r=K()("<div />").html(e).text();(r=r.toLowerCase().replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g,"").replace(/\s+|%\d+|,+/g,""),t=/<(.*?)>/.exec(r))&&(r=fi()(a=t[1]).call(a));(t=/mailto:(?:\s+)?(.*)/.exec(r))&&(r=fi()(n=t[1]).call(n));return!!window.mailpoet_email_regex.test(r)&&(!Li(r)&&r)};var qi=function(e){var t,a,n,r,i,o=[],s=[],l=[],c=[],u=[],p=null,d=null,m=!1;return C()(t=$e()(e)).call(t,function(t){var h,f;r=me()(h=e[t]).call(h,function(e){return fi()(e).call(e)}),i=r.length,null===d&&(d=i),i===d&&(null===p?(C()(f=$e()(r)).call(f,function(e){n=Di(r[e]),null===p&&window.mailpoet_email_regex.test(n)&&(p=e,s[n]=!0,r[e]=n,o[n]=r)}),null===p&&0===qe()(t,10)&&(m=!0,o[0]=r)):""!==r[p]&&(a=Di(r[p]),Ne.a.has(s,a)?l.push(a):Li(r[p])?u.push(r[p]):window.mailpoet_email_regex.test(a)?(s[a]=!0,r[p]=a,o[a]=r):c.push(r[p])))}),(o=Pi()(Ne.a).call(Ne.a,o))&&(m&&o.length>=2||!m&&o.length>=1)?{header:window.mailpoet_email_regex.test(o[0][p])?null:o.shift(),subscribers:o,subscribersCount:o.length,duplicate:Ne.a.uniq(l),invalid:Ne.a.uniq(c),role:Ne.a.uniq(u)}:null};var Mi=function(e,t){var a=encodeURI(e).split(/%..|./).length-1;G.a.Notice.hide(),a>window.maxPostSizeBytes?G.a.Notice.error(G.a.I18n.t("maxPostSizeNotice")):(G.a.Modal.loading(!0),Ci.a.parse(e,function(e){return{skipEmptyLines:!0,error:function(){G.a.Notice.hide(),G.a.Notice.error(G.a.I18n.t("dataProcessingError"))},complete:function(t){var a=qi(t.data);if(a)e(a);else{var n=G.a.I18n.t("noValidRecords");n=(n=n.replace("[link]",'<a href="https://kb.mailpoet.com/article/126-importing-subscribers-with-csv-files" data-beacon-article="57ce079f903360649f6e56fc">')).replace("[/link]","</a>"),G.a.Notice.error(n)}G.a.Modal.loading(!1)}}}(t)))},Fi=function(e,t,a){return void 0===e?"step_data_manipulation":void 0===e.subscribersCount?"step_data_manipulation":e.subscribersCount<t?"step_data_manipulation":"mailchimp-method"===a?"step_data_manipulation":"step_input_validation"};function Bi(e){var t=e.history,a=e.setStepMethodSelectionData,i=e.subscribersLimitForValidation,o=Object(n.useState)(void 0),s=St()(o,2),l=s[0],c=s[1],u=Object(n.useState)(""),p=St()(u,2),d=p[0],m=p[1],h=Object(n.useState)(void 0),f=St()(h,2),g=f[0],_=f[1],b=function(e){a(e),t.push(Fi(e,i,l))},v=function(){Mi("paste-method"===l?d:g,function(e){G.a.trackEvent("Subscribers import started",{source:"file-method"===l?"file upload":"pasted data","MailPoet Free version":window.mailpoet_version}),b(e)})};return r.a.createElement("div",{className:"mailpoet_method_selection_step"},r.a.createElement(bi,{activeMethod:l,onMethodChange:c}),"paste-method"===l&&r.a.createElement(Ei,{onValueChange:m,onFinish:v,canFinish:!!fi()(d).call(d),data:d}),"file-method"===l&&r.a.createElement(Ii,{onValueChange:_,onFinish:v,canFinish:!!g,data:g}),"mailchimp-method"===l&&r.a.createElement(Ni,{onFinish:function(e){G.a.trackEvent("Subscribers import started",{source:"MailChimp","MailPoet Free version":window.mailpoet_version}),b(e)}}))}Bi.propTypes={history:u.a.shape({push:u.a.func.isRequired}).isRequired,setStepMethodSelectionData:u.a.func.isRequired,subscribersLimitForValidation:u.a.number.isRequired};var $i=Object(Re.a)(Bi);function Vi(e){var t=e.onSubmit,a=e.history,i=Object(n.useState)(void 0),o=St()(i,2),s=o[0],l=o[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,G.a.I18n.t("validationStepHeading")),r.a.createElement("label",{htmlFor:"existing-list"},r.a.createElement("input",{"data-automation-id":"mailpoet_import_validation_step_option1",type:"radio",id:"existing-list",checked:"existing-list"===s,onChange:function(){return l("existing-list")}}),G.a.I18n.t("validationStepRadio1")),r.a.createElement("label",{htmlFor:"address-book"},r.a.createElement("input",{"data-automation-id":"mailpoet_import_validation_step_option2",type:"radio",id:"address-book",checked:"address-book"===s,onChange:function(){return l("address-book")}}),G.a.I18n.t("validationStepRadio2")),r.a.createElement(yi,{canGoNext:void 0!==s,onPreviousAction:function(){return a.push("step_method_selection")},onNextAction:function(){return t(s)}}))}Vi.propTypes={history:u.a.shape({push:u.a.func.isRequired}).isRequired,onSubmit:u.a.func.isRequired};var Hi=Vi;var Wi=function(){return r.a.createElement("div",{className:"mailpoet_import_block","data-automation-id":"import_wrong_source_block"},r.a.createElement("p",null,G.a.I18n.t("validationStepBlock1")),r.a.createElement("p",null,G.a.I18n.t("validationStepBlock2")),r.a.createElement("a",{href:"https://kb.mailpoet.com/article/269-reconfirm-subscribers-to-your-list",target:"_blank",rel:"noopener noreferrer",className:"button button-primary"},G.a.I18n.t("validationStepBlockButton")))};var zi=function(){return r.a.createElement("div",{className:"mailpoet_import_block","data-automation-id":"import_old_list_block"},r.a.createElement("p",null,G.a.I18n.t("validationStepBlock1")),r.a.createElement("p",null,G.a.I18n.t("validationStepBlock3")),r.a.createElement("p",null,G.a.I18n.t("validationStepBlock4")),r.a.createElement("a",{href:"https://kb.mailpoet.com/article/269-reconfirm-subscribers-to-your-list",target:"_blank",rel:"noopener noreferrer",className:"button button-primary"},G.a.I18n.t("validationStepBlockButton")))};function Ui(e){var t=e.onSubmit,a=Object(n.useState)("over2years"),i=St()(a,2),o=i[0],s=i[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,G.a.I18n.t("validationStepLastSentHeading")),r.a.createElement("select",{value:o,onChange:function(e){s(e.target.value)},className:"mailpoet_last_sent","data-automation-id":"last_sent_to_list"},r.a.createElement("option",{value:"over2years"},G.a.I18n.t("validationStepLastSentOption1")),r.a.createElement("option",{value:"1to2years"},G.a.I18n.t("validationStepLastSentOption2")),r.a.createElement("option",{value:"less1year"},G.a.I18n.t("validationStepLastSentOption3")),r.a.createElement("option",{value:"less3months"},G.a.I18n.t("validationStepLastSentOption4"))),r.a.createElement("button",{type:"button",className:"button button-primary","data-automation-id":"last_sent_to_list_next",onClick:function(){t("over2years"===o||"1to2years"===o?"notRecently":"recently")}},G.a.I18n.t("validationStepLastSentNext")))}Ui.propTypes={onSubmit:u.a.func.isRequired};var Ki=Ui;function Gi(e){var t=e.stepMethodSelectionData,a=e.history,i=Object(n.useState)(void 0),o=St()(i,2),s=o[0],l=o[1],c=Object(n.useState)(void 0),u=St()(c,2),p=u[0],d=u[1];return Object(n.useEffect)(function(){void 0===t&&a.replace("step_method_selection")},[t,a]),r.a.createElement("div",{className:"mailpoet_import_validation_step","data-automation-id":"mailpoet_import_validation_step"},void 0===s&&r.a.createElement(Hi,{onSubmit:l,history:a}),"address-book"===s&&r.a.createElement(Wi,null),"existing-list"===s&&void 0===p&&r.a.createElement(Ki,{onSubmit:function(e){d(e),"recently"===e&&a.push("step_data_manipulation")}}),"existing-list"===s&&"notRecently"===p&&r.a.createElement(zi,null))}Gi.propTypes={history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,stepMethodSelectionData:u.a.shape({duplicate:u.a.arrayOf(u.a.string),header:u.a.arrayOf(u.a.string),invalid:u.a.arrayOf(u.a.string),role:u.a.arrayOf(u.a.string),subscribersCount:u.a.number,subscribers:u.a.arrayOf(u.a.arrayOf(u.a.string))})},Gi.defaultProps={stepMethodSelectionData:void 0};var Ji=Object(Re.a)(Gi),Yi=function(e){var t=e.translation,a=e.subscribers,n="";return a.length&&(n=Dt()(t.replace("%2$s",a.join(", ")),"%1$s",function(){return r.a.createElement("strong",{key:t},a.length.toLocaleString())}),n=r.a.createElement("p",null,n)),n};Yi.propTypes={translation:u.a.string.isRequired,subscribers:u.a.arrayOf(u.a.string).isRequired};var Qi=function(e){var t=e.stepMethodSelectionData,a=t.invalid,i=t.duplicate,o=t.role,s=Object(n.useState)(!1),l=St()(s,2),c=l[0],u=l[1],p=Y()("mailpoet_subscribers_data_parse_results_details",{mailpoet_hidden:!c}),d=r.a.createElement(Yi,{translation:G.a.I18n.t("importNoticeInvalid"),subscribers:a}),m=r.a.createElement(Yi,{translation:G.a.I18n.t("importNoticeDuplicate"),subscribers:i}),h="";if(o.length&&(h=Dt()(G.a.I18n.t("importNoticeRoleBased"),/(%1\$s|\[link\].*\[\/link\]|%2\$s)/,function(e){return"%1$s"===e?r.a.createElement("strong",{key:"role-length"},o.length.toLocaleString()):"%2$s"===e?o.join(", "):r.a.createElement("a",{href:"https://kb.mailpoet.com/article/270-role-based-email-addresses-are-not-allowed","data-beacon-article":"5d0a1da404286318cac46fe5",target:"_blank",rel:"noopener noreferrer",key:e},e.replace("[link]","").replace("[/link]",""))}),h=r.a.createElement("p",null,h)),a.length||i.length||o.length){var f=a.length+i.length+o.length;return r.a.createElement("div",{className:"error"},r.a.createElement("p",null,Dt()(G.a.I18n.t("importNoticeSkipped"),"%1$s",function(){return r.a.createElement("strong",{key:"lengths"},f.toLocaleString())})," ",r.a.createElement("a",{className:"mailpoet_subscribers_data_parse_results_details_show","data-automation-id":"show-more-details",onClick:function(){return u(!c)},role:"button",tabIndex:0,onKeyDown:function(e){var t,a;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(a=["Enter"," "]).call(a,e.key)&&(e.preventDefault(),u(!c))}},G.a.I18n.t("showMoreDetails"))),r.a.createElement("div",{className:p},r.a.createElement("hr",null),d,m,h))}return null};Qi.propTypes={stepMethodSelectionData:u.a.shape({duplicate:u.a.arrayOf(u.a.string),invalid:u.a.arrayOf(u.a.string),role:u.a.arrayOf(u.a.string)})},Qi.defaultProps={stepMethodSelectionData:{invalid:[],duplicate:[],role:[]}};var Xi=Qi,Zi=a(517),eo=a.n(Zi),to=a(518),ao=a.n(to),no=function(){K()("select.mailpoet_subscribers_column_data_match").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(e){return e.name},templateSelection:function(e){return e.name}}).on("select2:selecting",function(e){var t=e.currentTarget,a=e.params.args.data.id;"create"===a?(e.preventDefault(),K()(t).select2("close"),G.a.Modal.popup({title:G.a.I18n.t("addNewField"),template:K()("#form_template_field_form").html()}),K()("#form_field_new").parsley().on("form:submit",function(){var e=K()("#form_field_new").mailpoetSerializeObject();return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:e}).done(function(e){var a={id:e.data.id,name:e.data.name,type:e.data.type,params:e.data.params,custom:!0};2===window.mailpoetColumnsSelect2.length&&window.mailpoetColumnsSelect2.push({name:G.a.I18n.t("userColumns"),children:[]}),window.mailpoetColumnsSelect2[2].children.push(a),window.mailpoetColumns.push(a),K()("select.mailpoet_subscribers_column_data_match").each(function(){K()(t).html("").select2("destroy").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(e){return e.name},templateSelection:function(e){return e.name}})}),K()(t).data("column-id",a.id),K()(t).data("validation-rule",!1),G.a.Modal.close()}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{positionAfter:"#field_name"})}),!1})):K()("select.mailpoet_subscribers_column_data_match").each(function(){var n,r=t,i=K()(r).val();i===a&&"ignore"!==i&&(confirm(P()(n="".concat(G.a.I18n.t("selectedValueAlreadyMatched")," ")).call(n,G.a.I18n.t("confirmCorrespondingColumn")))?K()(r).data("column-id","ignore"):(e.preventDefault(),K()(t).select2("close")))})}).on("select2:select",function(e){var t=e.currentTarget,a=e.params.data.id;K()(t).data("column-id",a)}),me()(K.a).call(K.a,K()(".mailpoet_subscribers_column_data_match"),function(e){var t=K()(e).data("column-id");K()(e).val(t).trigger("change")})},ro=function(e,t){var a,n,r,i,o,s=[],l=[];return C()(a=$e()(e[0])).call(a,function(a){if(n=e[0][a],r="ignore",n%1!=0&&window.mailpoet_email_regex.test(n))r="email";else if(t){var c,u;i=t[a],-1!==(o=He()(c=me()(u=window.mailpoetColumns).call(u,function(e){return e.name})).call(c,i))?r=window.mailpoetColumns[o].id:i&&(/first|first name|given name/i.test(i)?r="first_name":/last|last name/i.test(i)&&(r="last_name"))}r="ignore"!==r&&-1===He()(l).call(l,r)?r:"ignore",s[a]={column_id:r},l.push(r)}),s},io=10;function oo(e){var t=e.header,a=e.subscribers,n=ro(a,t);return r.a.createElement("tr",null,r.a.createElement("th",null,G.a.I18n.t("matchData")),me()(n).call(n,function(e,t){return r.a.createElement("th",{key:e.column_id+t},r.a.createElement("select",{className:"mailpoet_subscribers_column_data_match","data-column-id":e.column_id,"data-validation-rule":"false","data-column-index":t,id:"column_".concat(t)}))}))}function so(e){var t=e.header;return r.a.createElement("tr",{className:"mailpoet_header"},r.a.createElement("td",null),me()(t).call(t,function(e){return r.a.createElement("td",{key:e},e)}))}function lo(e){var t=e.subscriber,a=e.index;return r.a.createElement(r.a.Fragment,null,r.a.createElement("td",null,a),me()(t).call(t,function(e,t){var n,i;return r.a.createElement("td",{key:P()(n=P()(i="".concat(e,"-")).call(i,a,"-")).call(n,t)},e)}))}function co(e){var t,a,n=e.subscribers,i=e.subscribersCount,o=ao()(t=Array(n[0].length)).call(t,". . .");return r.a.createElement(r.a.Fragment,null,me()(a=eo()(n).call(n,0,io)).call(a,function(e,t){var a;return r.a.createElement("tr",{key:P()(a="".concat(e[0],"-")).call(a,t)},r.a.createElement(lo,{subscriber:e,index:t+1}))}),i>io+1?r.a.createElement("tr",{key:"filler"},r.a.createElement(lo,{subscriber:o,index:". . ."})):null,i>io?r.a.createElement("tr",{key:n[i-1][0]},r.a.createElement(lo,{subscriber:n[i-1],index:i})):null)}function uo(e){var t=e.subscribersCount,a=e.subscribers,i=e.header;return Object(n.useLayoutEffect)(function(){no()}),r.a.createElement("div",{className:"subscribers_data"},r.a.createElement("table",{className:"mailpoet_subscribers widefat fixed"},r.a.createElement("thead",null,r.a.createElement(oo,{header:i,subscribers:a})),r.a.createElement("tbody",null,i?r.a.createElement(so,{header:i}):null,r.a.createElement(co,{subscribers:a,subscribersCount:t}))))}oo.propTypes={subscribers:u.a.arrayOf(u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number]))).isRequired,header:u.a.arrayOf(u.a.string)},oo.defaultProps={header:[]},so.propTypes={header:u.a.arrayOf(u.a.string).isRequired},lo.propTypes={subscriber:u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number])).isRequired,index:u.a.node.isRequired},co.propTypes={subscribersCount:u.a.number.isRequired,subscribers:u.a.arrayOf(u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number]))).isRequired},uo.propTypes={subscribersCount:u.a.number,subscribers:u.a.arrayOf(u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number]))),header:u.a.arrayOf(u.a.string)},uo.defaultProps={subscribersCount:0,subscribers:[],header:[]};var po=uo;var mo=function(e){G.a.Modal.popup({title:G.a.I18n.t("addNewList"),template:K()("#new_segment_template").html()}),K()("#new_segment_name").keypress(function(e){13===e.which&&K()("#new_segment_process").click()}),K()("#new_segment_process").click(function(){var t,a,n=fi()(t=K()("#new_segment_name").val()).call(t),r=fi()(a=K()("#new_segment_description").val()).call(a);G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"addSegment",data:{name:n,description:r}}).done(function(t){e({id:t.data.id,name:t.data.name,subscriberCount:0}),G.a.Modal.close()}).fail(function(e){var t;e.errors.length>0&&(G.a.Notice.hide(),G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{positionAfter:"#new_segment_name"}))})}),K()("#new_segment_cancel").click(function(){G.a.Modal.close()})};function ho(e){var t=e.setSelectedSegments,a=Object(n.useContext)(gi).segments,i=Object(n.useState)(a),o=St()(i,2),s=o[0],l=o[1];Object(n.useLayoutEffect)(function(){var e,a,n;e=s,a=function(e){t(e)},(n=K()("select#mailpoet_segments_select")).data("select2")||(n.html(""),n.select2({data:e,width:"20em",templateResult:function(e){var t,a=e;return a.subscriberCount=qe()(a.subscriberCount,10),P()(t="".concat(a.name," (")).call(t,a.subscriberCount.toLocaleString(),")")},templateSelection:function(e){var t,a=e;return a.subscriberCount=qe()(a.subscriberCount,10),P()(t="".concat(a.name," (")).call(t,a.subscriberCount.toLocaleString(),")")}}).change(function(e){var t=K()('[data-id="notice_segmentSelection"]');e.currentTarget.value?K()('[data-id="notice_segmentSelection"]').remove():t.length||G.a.Notice.error(G.a.I18n.t("segmentSelectionRequired"),{static:!0,scroll:!0,id:"notice_segmentSelection",hideClose:!0});var r=Ne.a.pluck(n.select2("data"),"id");a(r)}))},[s,t]);var c=function(e){var a,n;(n=K()("select#mailpoet_segments_select")).data("select2")&&(n.select2("destroy"),wt()(n).call(n,"option").remove(),n.off("select2:unselecting").off("change").off("select2:opening")),t([]),l(P()(a=[]).call(a,pe()(s),[e]))};return r.a.createElement("div",{className:"mailpoet_import_select_segment"},r.a.createElement("label",{htmlFor:"mailpoet_segments_select"},r.a.createElement("div",{className:"mailpoet_label_description"},r.a.createElement("b",null,G.a.I18n.t("pickLists")),r.a.createElement("p",{className:"description"},G.a.I18n.t("pickListsDescription"))),r.a.createElement("select",{id:"mailpoet_segments_select","data-placeholder":G.a.I18n.t("select"),multiple:"multiple"},r.a.createElement("option",null))),r.a.createElement("a",{className:"mailpoet_create_segment",onClick:function(){return mo(c)},role:"button",tabIndex:0,onKeyDown:function(e){var t,a;Ce()(t=["keydown","keypress"]).call(t,e.type)&&Ce()(a=["Enter"," "]).call(a,e.key)&&(e.preventDefault(),mo(c))}},G.a.I18n.t("createANewList")))}ho.propTypes={setSelectedSegments:u.a.func.isRequired};var fo=ho;function go(e){var t=e.updateExistingSubscribers,a=e.setUpdateExistingSubscribers;return r.a.createElement("div",{className:"mailpoet_update_existing_subscribers"},r.a.createElement("div",{className:"mailpoet_label_description"},G.a.I18n.t("updateExistingSubscribers")),r.a.createElement("label",{htmlFor:"update_existing_subscribers"},r.a.createElement("input",{id:"update_existing_subscribers",type:"radio",name:"update_existing_subscribers",checked:t,onChange:function(){return a(!0)}}),G.a.I18n.t("updateExistingSubscribersYes")),r.a.createElement("label",{htmlFor:"dont_update_existing_subscribers"},r.a.createElement("input",{id:"dont_update_existing_subscribers",type:"radio",name:"update_existing_subscribers",checked:!t,onChange:function(){return a(!1)}}),G.a.I18n.t("updateExistingSubscribersNo")))}go.propTypes={setUpdateExistingSubscribers:u.a.func.isRequired,updateExistingSubscribers:u.a.bool.isRequired};var _o=go,bo=a(331),vo=a.n(bo),yo=a(329),wo=a.n(yo),Eo=(a(658),function(e,t,a,n){var r={},i=new K.a.AsyncQueue,o=0,s=wo()()/1e3,l={created:0,updated:0,errors:[],segments:[]};G.a.Modal.loading(!0);var c,u,p=(c=e,u=2e3,vo()(c).call(c,function(e,t,a){return a%u==0&&e.push([]),e[e.length-1].push(t),e},[]));Ne.a.each(K()("select.mailpoet_subscribers_column_data_match"),function(e,t){var a=K()(e).data("column-id"),n=K()(e).data("validation-rule");"ignore"!==a&&(r[a]={index:t,validation_rule:n})}),Ne.a.each(p,function(){i.add(function(e){e.pause(),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processImport",data:rt()({columns:r,subscribers:p[o],timestamp:s,segments:t,updateSubscribers:a})}).done(function(t){var a=t.data.added_to_segment_with_welcome_notification;l.created+=t.data.created,l.updated+=t.data.updated,l.segments=t.data.segments,l.added_to_segment_with_welcome_notification=a,e.run()}).fail(function(e){var t;(G.a.Modal.loading(!1),e.errors.length>0)&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}),o+=1})}),i.run(),i.onComplete(function(){G.a.Modal.loading(!1),l.errors.length>0&&!l.updated&&!l.created?G.a.Notice.error(Ne.a.flatten(l.errors)):(l.segments=me()(Ne.a).call(Ne.a,ze()(Ne.a).call(Ne.a,l.segments,function(e){return Ce()(t).call(t,e.id)}),function(e){return e.name}),n(l))})});function ko(e){var t=e.history,a=e.stepMethodSelectionData,i=e.subscribersLimitForValidation,o=e.setStepDataManipulationData,s=Object(n.useState)([]),l=St()(s,2),c=l[0],u=l[1],p=Object(n.useState)(!0),d=St()(p,2),m=d[0],h=d[1];Object(n.useEffect)(function(){void 0===a&&t.replace("step_method_selection")},[a,t]);return void 0===a?null:r.a.createElement("div",{className:"mailpoet_data_manipulation_step","data-automation-id":"import_data_manipulation_step"},r.a.createElement(Xi,{stepMethodSelectionData:a}),r.a.createElement(po,{subscribersCount:a.subscribersCount,subscribers:a.subscribers,header:a.header}),r.a.createElement(fo,{setSelectedSegments:u}),r.a.createElement(_o,{setUpdateExistingSubscribers:h,updateExistingSubscribers:m}),r.a.createElement(yi,{canGoNext:c.length>0,onPreviousAction:function(){return t.push(function(e,t){return void 0===e?"step_method_selection":void 0===e.subscribersCount?"step_method_selection":e.subscribersCount<t?"step_method_selection":"step_input_validation"}(a,i))},onNextAction:function(){Eo(a.subscribers,c,m,function(e){o(e),t.push("step_results")})}}))}ko.propTypes={history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,stepMethodSelectionData:u.a.shape({duplicate:u.a.arrayOf(u.a.string),header:u.a.arrayOf(u.a.string),invalid:u.a.arrayOf(u.a.string),role:u.a.arrayOf(u.a.string),subscribersCount:u.a.number,subscribers:u.a.arrayOf(u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.number])))}),subscribersLimitForValidation:u.a.number.isRequired,setStepDataManipulationData:u.a.func.isRequired},ko.defaultProps={stepMethodSelectionData:void 0};var Io=Object(Re.a)(ko);function So(e){var t=e.subscribersCount,a=e.segments,n=e.initialMessage;if(t){var i=Dt()(n,"%1$s",function(){return r.a.createElement("strong",{key:"%1$s"},t.toLocaleString())});return i=Dt()(i,"%2$s",function(){return'"'.concat(a.join('", "'),'"')}),r.a.createElement("p",null,i)}return null}function No(e){var t=e.createdSubscribers,a=e.updatedSubscribers;return t||a?null:r.a.createElement("p",null,G.a.I18n.t("importNoAction"))}function xo(e){return e.addedToSegmentWithWelcomeNotification?r.a.createElement("p",null,G.a.I18n.t("importNoWelcomeEmail")):null}function Co(e){var t=e.errors,a=e.createdSubscribers,i=e.updatedSubscribers,o=e.segments,s=e.addedToSegmentWithWelcomeNotification,l=e.history;return Object(n.useEffect)(function(){void 0===o&&0===t.length&&void 0===a&&void 0===i&&l.replace("step_method_selection")},[o,a,t.length,l,i]),t.length&&G.a.Notice.error(Ne.a.flatten(t)),r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"updated"},r.a.createElement(So,{subscribersCount:a,segments:o,initialMessage:G.a.I18n.t("subscribersCreated")}),r.a.createElement(So,{subscribersCount:i,segments:o,initialMessage:G.a.I18n.t("subscribersUpdated")}),r.a.createElement(No,{createdSubscribers:a,updatedSubscribers:i}),r.a.createElement(xo,{addedToSegmentWithWelcomeNotification:s})),r.a.createElement("button",{type:"button",className:"button-primary wysija",onClick:function(){return l.push("step_method_selection")}},G.a.I18n.t("importAgain")),"  ",r.a.createElement("button",{type:"button",className:"button-primary wysija",onClick:function(){window.location.href="admin.php?page=mailpoet-subscribers"}},G.a.I18n.t("viewSubscribers")))}So.propTypes={segments:u.a.arrayOf(u.a.string.isRequired),subscribersCount:u.a.number,initialMessage:u.a.string},So.defaultProps={segments:[],subscribersCount:0,initialMessage:""},No.propTypes={createdSubscribers:u.a.number,updatedSubscribers:u.a.number},No.defaultProps={createdSubscribers:0,updatedSubscribers:0},xo.propTypes={addedToSegmentWithWelcomeNotification:u.a.bool},xo.defaultProps={addedToSegmentWithWelcomeNotification:!1},Co.propTypes={history:u.a.shape({push:u.a.func.isRequired}).isRequired,errors:u.a.arrayOf(u.a.string.isRequired),segments:u.a.arrayOf(u.a.string.isRequired),createdSubscribers:u.a.number,updatedSubscribers:u.a.number,addedToSegmentWithWelcomeNotification:u.a.bool},Co.defaultProps={errors:[],segments:void 0,createdSubscribers:void 0,updatedSubscribers:void 0,addedToSegmentWithWelcomeNotification:void 0};var To=Object(Re.a)(Co),Po=document.getElementById("import_container");Po&&o.a.render(r.a.createElement(function(){var e=Object(n.useState)(void 0),t=St()(e,2),a=t[0],i=t[1],o=Object(n.useState)({}),s=St()(o,2),l=s[0],c=s[1];return r.a.createElement(E,null,r.a.createElement(mi,null,r.a.createElement(S,null,r.a.createElement(N,{path:"/step_method_selection",render:function(e){return r.a.createElement($i,Le()({},e,{setStepMethodSelectionData:i,subscribersLimitForValidation:200}))}}),r.a.createElement(N,{path:"/step_input_validation",render:function(e){return r.a.createElement(Ji,Le()({},e,{stepMethodSelectionData:a}))}}),r.a.createElement(N,{path:"/step_data_manipulation",render:function(e){return r.a.createElement(Io,Le()({},e,{stepMethodSelectionData:a,subscribersLimitForValidation:200,setStepDataManipulationData:c}))}}),r.a.createElement(N,{path:"/step_results",render:function(e){return r.a.createElement(To,Le()({},e,{errors:l.errors,createdSubscribers:l.created,updatedSubscribers:l.updated,segments:l.segments,addedToSegmentWithWelcomeNotification:l.added_to_segment_with_welcome_notification}))}}),r.a.createElement(N,{path:"*",render:function(){return r.a.createElement(Ee,{to:"/step_method_selection"})}}))))},null),Po);var Ro=a(23),Ao=a.n(Ro);K()(document).ready(function(){var e,t,a,n,r,i;function o(e){"on"===e?n.removeClass("button-disabled"):n.addClass("button-disabled")}K()("#mailpoet_subscribers_export").length&&window.exportData.segments&&(i=Ao.a.compile(K()("#mailpoet_subscribers_export_template").html()),K()("#mailpoet_subscribers_export > div.inside").html(i(window.exportData)),t=K()("#export_lists"),a=K()("#export_columns"),n=K()("a.mailpoet_export_process"),r=function(e,n){e.data("select2")&&e.html("").select2("destroy"),e.select2({data:n,width:"20em",templateResult:function(e){return e.subscriberCount>0?e.name+" ("+qe()(e.subscriberCount,10).toLocaleString()+")":e.name},templateSelection:function(e){return e.subscriberCount>0?e.name+" ("+qe()(e.subscriberCount,10).toLocaleString()+")":e.name}}).on("select2:selecting",function(t){var a,n=t.params.args.data.id,r=["select","deselect"];Ne.a.contains(r,n)&&(t.preventDefault(),"deselect"===n?K()(this).val("").trigger("change"):(a=[],Ne.a.each(wt()(e).call(e,"option"),function(e){Ne.a.contains(r,e.value)||a.push(e.value)}),K()(this).val(a).trigger("change")),K()(this).select2("close"))}).on("change",function(){window.exportData.segments&&t.select2("data").length&&a.select2("data").length||!window.exportData.segments&&a.select2("data").length?o("on"):o("off")})},C()(e=window.segments).call(e,function(e){t.append(K()("<option></option>").attr("value",e.id).text(e.name))}),r(t,window.segments),r(a,window.subscriberFieldsSelect2),a.val(["email","first_name","last_name","list_status","global_status"]).trigger("change"),n.click(function(){var e;K()(this).hasClass("button-disabled")||(G.a.Modal.loading(!0),e=K()(':radio[name="option_format"]:checked').val(),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processExport",data:rt()({export_format_option:e,segments:!!window.exportData.segments&&t.val(),subscriber_fields:a.val()})}).always(function(){G.a.Modal.loading(!1)}).done(function(t){var a=G.a.I18n.t("exportMessage").replace("%1$s","<strong>"+qe()(t.data.totalExported,10).toLocaleString()+"</strong>").replace("[link]",'<a href="'+t.data.exportFileURL+'" target="_blank" >').replace("[/link]","</a>");K()("#export_result_notice").html("<p>"+a+"</p>").show(),window.location.href=t.data.exportFileURL,G.a.trackEvent("Subscribers export completed",{"Total exported":t.data.totalExported,"File Format":e,"MailPoet Free version":window.mailpoet_version})}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})}))}))});var jo=a(299),Oo=a.n(jo),Lo=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardLetsStartTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardSenderText")),r.a.createElement("form",{id:"mailpoet_sender_form",className:e.loading?"mailpoet_sender_form_loading":"",onSubmit:function(t){t.preventDefault(),K()("#mailpoet_sender_form").parsley().validate()&&e.submit_sender()}},r.a.createElement("label",{htmlFor:"senderName"},G.a.I18n.t("senderName"),":",r.a.createElement("input",{name:"senderName",type:"text",placeholder:"John Doe",value:e.sender?e.sender.name:"","data-parsley-required":!0,onChange:function(t){return e.update_sender({name:t.target.value})}})),r.a.createElement("label",{htmlFor:"senderAddress"},G.a.I18n.t("senderAddress"),":",r.a.createElement("input",{name:"senderAddress",type:"text",placeholder:"john@doe.com",value:e.sender?e.sender.address:"","data-parsley-required":!0,"data-parsley-type":"email",onChange:function(t){return e.update_sender({address:t.target.value})}})),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},r.a.createElement("input",{className:"button button-primary",type:"submit",value:G.a.I18n.t("next")})),r.a.createElement("a",{onClick:e.finish,href:"#finish",className:"sender_form_small"},G.a.I18n.t("noThanksSkip"))))};Lo.propTypes={finish:u.a.func.isRequired,loading:u.a.bool.isRequired,update_sender:u.a.func.isRequired,submit_sender:u.a.func.isRequired,sender:u.a.shape({name:u.a.string,address:u.a.string})},Lo.defaultProps={sender:null};var Do=Lo,qo=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardLetsStartTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardSenderMigratedUserText")),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},r.a.createElement("button",{type:"button",className:"button button-primary",onClick:e.next},G.a.I18n.t("next"))))};qo.propTypes={next:u.a.func.isRequired};var Mo=qo,Fo=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardEmailCourseTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardEmailCourseText")),r.a.createElement("iframe",{id:"mailpoet_form_iframe",width:"100%",scrolling:"no",frameBorder:"0",title:"Apply to course",src:"https://www.mailpoet.com?mailpoet_form_iframe=13",className:"mailpoet_form_iframe",marginWidth:"0",marginHeight:"0"}),r.a.createElement("button",{type:"button",className:"button button-primary",onClick:e.next},G.a.I18n.t("next")))};Fo.propTypes={next:u.a.func.isRequired};var Bo=Fo,$o=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardUsageTrackingStepTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardTrackingText")),r.a.createElement("h2",{className:"welcome_wizard_tracking_sub_title"},G.a.I18n.t("welcomeWizardUsageTrackingStepSubTitle")),r.a.createElement("ul",{className:"welcome_wizard_tracking_list"},r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList1")),r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList2")),r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList3")),r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList4")),r.a.createElement("li",null,G.a.I18n.t("welcomeWizardTrackingList5"))),r.a.createElement("a",{href:" https://kb.mailpoet.com/article/130-sharing-your-data-with-us","data-beacon-article":"57ce0aaac6979108399a0454",target:"_blank",rel:"noopener noreferrer"},G.a.I18n.t("welcomeWizardTrackingLink")),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n ".concat(e.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},r.a.createElement("button",{type:"button",className:"button",onClick:e.skip_action,disabled:e.loading},G.a.I18n.t("skip")),r.a.createElement("button",{type:"button",className:"button button-primary",onClick:e.allow_action,disabled:e.loading},e.allow_text)))};$o.propTypes={allow_action:u.a.func.isRequired,allow_text:u.a.string.isRequired,skip_action:u.a.func.isRequired,loading:u.a.bool.isRequired};var Vo=$o,Ho=function(e){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content"},r.a.createElement("h1",null,G.a.I18n.t("welcomeWizardWooCommerceStepTitle")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardHelpingShopOwnersText")),r.a.createElement("p",null,G.a.I18n.t("welcomeWizardWooCommerceEmailsText")),r.a.createElement("img",{src:e.screenshot_src,className:"mailpoet_welcome_wizard_woo_screenshot",alt:"WooCommerce email"}),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n ".concat(e.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},r.a.createElement("button",{type:"button",className:"button button-primary",onClick:e.next,disabled:e.loading},G.a.I18n.t("gotIt"))))};Ho.propTypes={next:u.a.func.isRequired,screenshot_src:u.a.string.isRequired,loading:u.a.bool.isRequired};var Wo=Ho,zo=a(67),Uo=a.n(zo),Ko=function(e){var t,a;return e.step>e.steps_count?null:r.a.createElement("div",{className:"mailpoet_stepped_progress_bar"},me()(t=pe()(Uo()(a=Array(e.steps_count)).call(a))).call(t,function(t){var a;return r.a.createElement("div",{className:P()(a="\n mailpoet_stepped_progress_bar_step ".concat(t<e.step?"active":""," ")).call(a,t===e.step-1?"current":"","\n "),key:"step_".concat(t)})}))};Ko.propTypes={steps_count:u.a.number.isRequired,step:u.a.number.isRequired};var Go=Ko,Jo=function(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"mailpoet_welcome_wizard_header"},r.a.createElement("img",{src:window.mailpoet_logo_url,width:"200",height:"87",alt:"MailPoet logo"})),r.a.createElement("div",{className:"mailpoet_welcome_wizard_flex"},r.a.createElement("div",{className:"mailpoet_welcome_wizard_illustration"},r.a.createElement("img",{src:e.illustrationUrl,alt:""})),r.a.createElement("div",{className:"mailpoet_welcome_wizard_step"},e.step<=e.stepsCount?r.a.createElement(Go,{steps_count:e.stepsCount,step:e.step}):null,e.children)))};Jo.propTypes={illustrationUrl:u.a.string.isRequired,step:u.a.number.isRequired,stepsCount:u.a.number.isRequired,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]).isRequired};var Yo=Jo,Qo=function(e){var t,a=e.name,n=e.address,r=n.split("@").pop().toLowerCase();return He()(t=window.mailpoet_free_domains).call(t,r)>-1?function(e){var t=e.name,a=e.address,n=window.location.hostname.replace("www.",""),r="wordpress@".concat(n);return{sender:{name:t,address:r},reply_to:{name:t,address:a},"signup_confirmation.from.address":r,"signup_confirmation.from.name":t,"signup_confirmation.reply_to.address":a,"signup_confirmation.reply_to.name":t}}({name:a,address:n}):function(e){var t=e.name,a=e.address;return{sender:{name:t,address:a},reply_to:{name:t,address:a},"signup_confirmation.from.address":a,"signup_confirmation.from.name":t,"signup_confirmation.reply_to.address":a,"signup_confirmation.reply_to.name":t}}({name:a,address:n})},Xo=function(e){var t=window.is_woocommerce_active?4:3,a=!window.is_mp2_migration_complete,i=qe()(e.match.params.step,10),o=Object(n.useState)(!1),s=St()(o,2),l=s[0],c=s[1],u=Object(n.useState)(window.sender_data),p=St()(u,2),d=p[0],m=p[1];function h(){c(!0),window.location=window.finish_wizard_url}function f(){4===t?e.history.push("/steps/4"):h()}function g(e){return c(!0),G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:e}).then(function(){return c(!1)}).fail(function(e){var t;(c(!1),e.errors.length>0)&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}return Object(n.useEffect)(function(){(i>t||i<1)&&e.history.push("/steps/1")},[i,t,e.history]),r.a.createElement("div",{className:"mailpoet_welcome_wizard_steps"},1===i&&a?r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_sender_illustration_url},r.a.createElement(Do,{update_sender:function(e){m(Oo()({},d,e))},submit_sender:function(){g(Qo(d)).then(function(){return e.history.push("/steps/2")})},finish:function(){c(!0),g(Qo({address:window.admin_email,name:""})).then(h)},loading:l,sender:d})):null,1!==i||a?null:r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_sender_illustration_url},r.a.createElement(Mo,{next:function(){return e.history.push("/steps/2")}})),2===i?r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_email_course_illustration_url},r.a.createElement(Bo,{next:function(){return e.history.push("/steps/3")}})):null,3===i?r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_tracking_illustration_url},r.a.createElement(Vo,{skip_action:f,allow_action:function(){g({analytics:{enabled:!0}}).then(function(){return f()})},allow_text:4===t?G.a.I18n.t("allowAndContinue"):G.a.I18n.t("allowAndFinish"),loading:l})):null,4===i?r.a.createElement(Yo,{step:i,stepsCount:t,illustrationUrl:window.wizard_woocommerce_illustration_url},r.a.createElement(Wo,{next:h,screenshot_src:window.wizard_woocommerce_box_url,loading:l})):null)};Xo.propTypes={match:u.a.shape({params:u.a.shape({step:u.a.string}).isRequired}).isRequired,history:u.a.shape({push:u.a.func.isRequired}).isRequired};var Zo=Xo,es=a(109),ts=a.n(es),as=function(e){function t(e){var a,n,r;return A()(this,t),(r=D()(this,M()(t).call(this,e))).state={importType:null},r.handleOptionChange=Ke()(a=r.handleOptionChange).call(a,B()(r)),r.submit=Ke()(n=r.submit).call(n,B()(r)),r}return V()(t,e),O()(t,[{key:"handleOptionChange",value:function(e){this.setState({importType:e.target.value})}},{key:"submit",value:function(e){return e.preventDefault(),!!this.state.importType&&(this.props.submitForm(this.state.importType),!1)}},{key:"render",value:function(){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},r.a.createElement("h1",null,G.a.I18n.t("wooCommerceListImportTitle")),r.a.createElement("p",null,G.a.I18n.t("wooCommerceListImportInfo1")),r.a.createElement("p",null,G.a.I18n.t("wooCommerceListImportInfo2")),r.a.createElement("p",null,r.a.createElement("b",null,G.a.I18n.t("wooCommerceListImportInfo3"))),r.a.createElement("form",{onSubmit:this.submit,className:"mailpoet_wizard_woocommerce_list"},r.a.createElement("label",{htmlFor:"import_type_subscribed"},r.a.createElement("input",{id:"import_type_subscribed",type:"radio",name:"import_type",checked:"subscribed"===this.state.importType,onChange:this.handleOptionChange,value:"subscribed","data-automation-id":"import_as_subscribed"}),ts()(G.a.I18n.t("wooCommerceListImportCheckboxSubscribed"))),r.a.createElement("label",{htmlFor:"import_type_unsubscribed"},r.a.createElement("input",{id:"import_type_unsubscribed",type:"radio",name:"import_type",checked:"unsubscribed"===this.state.importType,onChange:this.handleOptionChange,value:"unsubscribed","data-automation-id":"import_as_unsubscribed"}),ts()(G.a.I18n.t("wooCommerceListImportCheckboxUnsubscribed"))),r.a.createElement("p",null,G.a.I18n.t("wooCommerceListImportInfo4")),r.a.createElement("input",{className:"button button-primary",type:"submit",value:G.a.I18n.t("wooCommerceListImportSubmit"),disabled:!this.state.importType||this.props.loading,"data-automation-id":"submit_woo_commerce_list_import"})))}}]),t}(r.a.Component);as.propTypes={submitForm:u.a.func.isRequired,loading:u.a.bool.isRequired};var ns=as,rs=function(e){function t(e){var a,n,r,i,o;return A()(this,t),(o=D()(this,M()(t).call(this,e))).state={loading:!1},o.updateSettings=Ke()(a=o.updateSettings).call(a,B()(o)),o.scheduleImport=Ke()(n=o.scheduleImport).call(n,B()(o)),o.finishWizard=Ke()(r=o.finishWizard).call(r,B()(o)),o.submit=Ke()(i=o.submit).call(i,B()(o)),o}return V()(t,e),O()(t,[{key:"finishWizard",value:function(){this.setState({loading:!0}),window.location=window.finish_wizard_url}},{key:"updateSettings",value:function(e){return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:e}).fail(this.handleApiError)}},{key:"scheduleImport",value:function(){var e=this;return G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"setupWooCommerceInitialImport"}).then(function(){return e.setState({loading:!1})}).fail(this.handleApiError)}},{key:"handleApiError",value:function(e){this.setState({loading:!1}),G.a.Notice.showApiErrorNotice(e,{scroll:!0})}},{key:"submit",value:function(e){this.setState({loading:!0});var t={woocommerce_import_screen_displayed:1,"mailpoet_subscribe_old_woocommerce_customers.enabled":"subscribed"===e?1:0};this.updateSettings(t).then(this.scheduleImport).then(this.finishWizard)}},{key:"render",value:function(){return r.a.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},r.a.createElement("div",{className:"mailpoet_welcome_wizard_header"},r.a.createElement("img",{src:window.mailpoet_logo_url,width:"200",height:"87",alt:"MailPoet logo"})),r.a.createElement(ns,{loading:this.state.loading,submitForm:this.submit}))}}]),t}(r.a.Component);rs.propTypes={};var is=rs;function os(e){var t=e.submitForm,a=e.loading,i=Object(n.useState)("true"),o=St()(i,2),s=o[0],l=o[1];return r.a.createElement("div",{className:" mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_step_revenue_tracking mailpoet_welcome_wizard_centered_column "},r.a.createElement("p",null,G.a.I18n.t("revenueTrackingInfo1")),r.a.createElement("p",null,G.a.I18n.t("revenueTrackingInfo2")),r.a.createElement("form",{onSubmit:function(e){return e.preventDefault(),void 0!==s&&(t("true"===s),!1)},className:"mailpoet_wizard_woocommerce_list"},r.a.createElement("label",{htmlFor:"tracking_allowed"},r.a.createElement("input",{id:"tracking_allowed",type:"radio",name:"import_type",checked:"true"===s,onChange:function(e){return l(e.target.value)},value:"true"}),G.a.I18n.t("revenueTrackingAllow")),r.a.createElement("label",{htmlFor:"tracking_not_allowed"},r.a.createElement("input",{id:"tracking_not_allowed",type:"radio",name:"import_type",checked:"false"===s,onChange:function(e){return l(e.target.value)},value:"false"}),G.a.I18n.t("revenueTrackingDontAllow")),r.a.createElement("input",{className:"button button-primary",type:"submit",value:G.a.I18n.t("revenueTrackingSubmit"),disabled:a})))}os.propTypes={submitForm:u.a.func.isRequired,loading:u.a.bool.isRequired};var ss=os;var ls=function(){var e=Object(n.useState)(!1),t=St()(e,2),a=t[0],i=t[1],o=function(e){i(!1),G.a.Notice.showApiErrorNotice(e,{scroll:!0})},s=function(){window.location=window.finish_wizard_url};return r.a.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},r.a.createElement("div",{className:"mailpoet_welcome_wizard_header"},r.a.createElement("img",{src:window.mailpoet_logo_url,width:"200",height:"87",alt:"MailPoet logo"})),r.a.createElement(ss,{loading:a,submitForm:function(e){var t;i(!0),(t={"woocommerce.accept_cookie_revenue_tracking.enabled":e?1:0,"woocommerce.accept_cookie_revenue_tracking.set":1},G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:t}).fail(o)).then(s)}}))},cs=document.getElementById("mailpoet_wizard_container");if(cs){var us,ps,ds="/steps/1";Ce()(us=window.location.search).call(us,"revenue-tracking-permission")?ds="/revenue-tracking-permission":Ce()(ps=window.location.search).call(ps,"woocommerce-list-import")&&(ds="/import"),o.a.render(r.a.createElement(E,null,r.a.createElement(S,null,r.a.createElement(N,{path:"/steps/:step",component:Zo}),r.a.createElement(N,{path:"/import",component:is}),r.a.createElement(N,{path:"/revenue-tracking-permission",component:ls}),r.a.createElement(N,{render:function(){return r.a.createElement(Ee,{to:ds})}}))),cs)}var ms=a(494),hs=a.n(ms),fs=document.getElementById("experimental_features_container");fs&&o.a.render(r.a.createElement(function(){var e,t=Object(n.useState)(null),a=St()(t,2),i=a[0],o=a[1];function s(e){var t=e.target.name,a=e.target.checked;G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"featureFlags",action:"set",data:W()({},t,a?1:0)}).done(function(){var e,n=i[t];n.value=a,o(Oo()({},i,W()({},t,n))),G.a.Notice.success(P()(e="Feature '".concat(t,"' was ")).call(e,a?"enabled":"disabled","."))}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})}return Object(n.useEffect)(function(){G.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"featureFlags",action:"getAll"}).done(function(e){var t,a=vo()(t=e.data).call(t,function(e,t){return Oo()({},e,W()({},t.name,t))},{});o(a)}).fail(function(e){var t;e.errors.length>0&&G.a.Notice.error(me()(t=e.errors).call(t,function(e){return e.message}),{scroll:!0})})},[]),null===i?r.a.createElement("p",null,"Loading experimental features..."):0===hs()(i).length?r.a.createElement("p",null,"There are no experimental features at the moment."):me()(e=hs()(i)).call(e,function(e){var t="experimental-feature-".concat(e.name);return r.a.createElement("div",{key:e.name},r.a.createElement("label",{htmlFor:t},r.a.createElement("input",{id:t,type:"checkbox",name:e.name,defaultChecked:e.value,onChange:s})," ",e.name))})},{}),fs)}},[[705,0,1]]]);
assets/dist/js/{admin_vendor.84dfeb1a.chunk.js → admin_vendor.fe09345e.chunk.js} RENAMED
File without changes
assets/dist/js/{admin_vendor_chunk.84dfeb1a.chunk.js → admin_vendor_chunk.fe09345e.chunk.js} RENAMED
File without changes
assets/dist/js/{form_editor.84dfeb1a.chunk.js → form_editor.fe09345e.chunk.js} RENAMED
File without changes
assets/dist/js/{mailpoet.84dfeb1a.chunk.js → mailpoet.fe09345e.chunk.js} RENAMED
File without changes
assets/dist/js/manifest.json CHANGED
@@ -1,13 +1,13 @@
1
  {
2
  "public.js": "public.071bc811.js",
3
  "mp2migrator.js": "mp2migrator.b83a2053.js",
4
- "vendor.js": "vendor.84dfeb1a.js",
5
- "admin_vendor_chunk.js": "admin_vendor_chunk.84dfeb1a.chunk.js",
6
- "admin.js": "admin.84dfeb1a.chunk.js",
7
- "admin_vendor.js": "admin_vendor.84dfeb1a.chunk.js",
8
- "form_editor.js": "form_editor.84dfeb1a.chunk.js",
9
- "mailpoet.js": "mailpoet.84dfeb1a.chunk.js",
10
- "newsletter_editor.js": "newsletter_editor.84dfeb1a.chunk.js",
11
  "skins/ui/oxide/content.css": "skins/ui/oxide/content.css",
12
  "skins/ui/oxide/content.inline.css": "skins/ui/oxide/content.inline.css",
13
  "skins/ui/oxide/content.inline.min.css": "skins/ui/oxide/content.inline.min.css",
1
  {
2
  "public.js": "public.071bc811.js",
3
  "mp2migrator.js": "mp2migrator.b83a2053.js",
4
+ "vendor.js": "vendor.fe09345e.js",
5
+ "admin_vendor_chunk.js": "admin_vendor_chunk.fe09345e.chunk.js",
6
+ "admin.js": "admin.fe09345e.chunk.js",
7
+ "admin_vendor.js": "admin_vendor.fe09345e.chunk.js",
8
+ "form_editor.js": "form_editor.fe09345e.chunk.js",
9
+ "mailpoet.js": "mailpoet.fe09345e.chunk.js",
10
+ "newsletter_editor.js": "newsletter_editor.fe09345e.chunk.js",
11
  "skins/ui/oxide/content.css": "skins/ui/oxide/content.css",
12
  "skins/ui/oxide/content.inline.css": "skins/ui/oxide/content.inline.css",
13
  "skins/ui/oxide/content.inline.min.css": "skins/ui/oxide/content.inline.min.css",
assets/dist/js/{newsletter_editor.84dfeb1a.chunk.js → newsletter_editor.fe09345e.chunk.js} RENAMED
File without changes
assets/dist/js/{vendor.84dfeb1a.js → vendor.fe09345e.js} RENAMED
File without changes
generated/FreeCachedContainer.php CHANGED
@@ -304,7 +304,6 @@ class FreeCachedContainer extends Container
304
  'MailPoet\\Services\\AuthorizedEmailsController' => true,
305
  'MailPoet\\Services\\Bridge' => true,
306
  'MailPoet\\Settings\\UserFlagsController' => true,
307
- 'MailPoet\\Settings\\UserFlagsRepository' => true,
308
  'MailPoet\\Statistics\\Track\\Clicks' => true,
309
  'MailPoet\\Statistics\\Track\\Opens' => true,
310
  'MailPoet\\Statistics\\Track\\WooCommercePurchases' => true,
@@ -350,7 +349,6 @@ class FreeCachedContainer extends Container
350
  'MailPoet\\Services\\AuthorizedEmailsController' => true,
351
  'MailPoet\\Services\\Bridge' => true,
352
  'MailPoet\\Settings\\UserFlagsController' => true,
353
- 'MailPoet\\Settings\\UserFlagsRepository' => true,
354
  'MailPoet\\Statistics\\Track\\Clicks' => true,
355
  'MailPoet\\Statistics\\Track\\Opens' => true,
356
  'MailPoet\\Statistics\\Track\\WooCommercePurchases' => true,
@@ -577,7 +575,7 @@ class FreeCachedContainer extends Container
577
  */
578
  protected function getSubscribersService()
579
  {
580
- return $this->services['MailPoet\\API\\JSON\\v1\\Subscribers'] = new \MailPoet\API\JSON\v1\Subscribers(${($_ = isset($this->services['MailPoet\\Listing\\BulkActionController']) ? $this->services['MailPoet\\Listing\\BulkActionController'] : $this->getBulkActionControllerService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Segments\\SubscribersListings']) ? $this->services['MailPoet\\Segments\\SubscribersListings'] : $this->getSubscribersListingsService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\SubscriberActions']) ? $this->services['MailPoet\\Subscribers\\SubscriberActions'] : $this->getSubscriberActionsService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\RequiredCustomFieldValidator']) ? $this->services['MailPoet\\Subscribers\\RequiredCustomFieldValidator'] : ($this->services['MailPoet\\Subscribers\\RequiredCustomFieldValidator'] = new \MailPoet\Subscribers\RequiredCustomFieldValidator())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Listing\\Handler']) ? $this->services['MailPoet\\Listing\\Handler'] : ($this->services['MailPoet\\Listing\\Handler'] = new \MailPoet\Listing\Handler())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscription\\Captcha']) ? $this->services['MailPoet\\Subscription\\Captcha'] : $this->getCaptchaService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\WP\\Functions']) ? $this->services['MailPoet\\WP\\Functions'] : ($this->services['MailPoet\\WP\\Functions'] = new \MailPoet\WP\Functions())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Settings\\SettingsController']) ? $this->services['MailPoet\\Settings\\SettingsController'] : ($this->services['MailPoet\\Settings\\SettingsController'] = new \MailPoet\Settings\SettingsController())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscription\\CaptchaSession']) ? $this->services['MailPoet\\Subscription\\CaptchaSession'] : $this->getCaptchaSessionService()) && false ?: '_'});
581
  }
582
 
583
  /**
@@ -1093,6 +1091,16 @@ class FreeCachedContainer extends Container
1093
  return $this->services['MailPoet\\Settings\\SettingsController'] = new \MailPoet\Settings\SettingsController();
1094
  }
1095
 
 
 
 
 
 
 
 
 
 
 
1096
  /**
1097
  * Gets the public 'MailPoet\Subscribers\ConfirmationEmailMailer' shared autowired service.
1098
  *
@@ -1130,7 +1138,7 @@ class FreeCachedContainer extends Container
1130
  */
1131
  protected function getSubscriberActionsService()
1132
  {
1133
- return $this->services['MailPoet\\Subscribers\\SubscriberActions'] = new \MailPoet\Subscribers\SubscriberActions(${($_ = isset($this->services['MailPoet\\Settings\\SettingsController']) ? $this->services['MailPoet\\Settings\\SettingsController'] : ($this->services['MailPoet\\Settings\\SettingsController'] = new \MailPoet\Settings\SettingsController())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\NewSubscriberNotificationMailer']) ? $this->services['MailPoet\\Subscribers\\NewSubscriberNotificationMailer'] : ($this->services['MailPoet\\Subscribers\\NewSubscriberNotificationMailer'] = new \MailPoet\Subscribers\NewSubscriberNotificationMailer())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\ConfirmationEmailMailer']) ? $this->services['MailPoet\\Subscribers\\ConfirmationEmailMailer'] : $this->getConfirmationEmailMailerService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Listing\\BulkActionFactory']) ? $this->services['MailPoet\\Listing\\BulkActionFactory'] : ($this->services['MailPoet\\Listing\\BulkActionFactory'] = new \MailPoet\Listing\BulkActionFactory())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Newsletter\\Scheduler\\WelcomeScheduler']) ? $this->services['MailPoet\\Newsletter\\Scheduler\\WelcomeScheduler'] : ($this->services['MailPoet\\Newsletter\\Scheduler\\WelcomeScheduler'] = new \MailPoet\Newsletter\Scheduler\WelcomeScheduler())) && false ?: '_'});
1134
  }
1135
 
1136
  /**
@@ -1505,16 +1513,6 @@ class FreeCachedContainer extends Container
1505
  return $this->services['MailPoet\\Settings\\UserFlagsController'] = new \MailPoet\Settings\UserFlagsController(${($_ = isset($this->services['MailPoet\\Settings\\UserFlagsRepository']) ? $this->services['MailPoet\\Settings\\UserFlagsRepository'] : $this->getUserFlagsRepositoryService()) && false ?: '_'});
1506
  }
1507
 
1508
- /**
1509
- * Gets the private 'MailPoet\Settings\UserFlagsRepository' shared autowired service.
1510
- *
1511
- * @return \MailPoet\Settings\UserFlagsRepository
1512
- */
1513
- protected function getUserFlagsRepositoryService()
1514
- {
1515
- return $this->services['MailPoet\\Settings\\UserFlagsRepository'] = new \MailPoet\Settings\UserFlagsRepository(${($_ = isset($this->services['MailPoetVendor\\Doctrine\\ORM\\EntityManager']) ? $this->services['MailPoetVendor\\Doctrine\\ORM\\EntityManager'] : $this->getEntityManagerService()) && false ?: '_'});
1516
- }
1517
-
1518
  /**
1519
  * Gets the private 'MailPoet\Statistics\Track\Clicks' shared autowired service.
1520
  *
304
  'MailPoet\\Services\\AuthorizedEmailsController' => true,
305
  'MailPoet\\Services\\Bridge' => true,
306
  'MailPoet\\Settings\\UserFlagsController' => true,
 
307
  'MailPoet\\Statistics\\Track\\Clicks' => true,
308
  'MailPoet\\Statistics\\Track\\Opens' => true,
309
  'MailPoet\\Statistics\\Track\\WooCommercePurchases' => true,
349
  'MailPoet\\Services\\AuthorizedEmailsController' => true,
350
  'MailPoet\\Services\\Bridge' => true,
351
  'MailPoet\\Settings\\UserFlagsController' => true,
 
352
  'MailPoet\\Statistics\\Track\\Clicks' => true,
353
  'MailPoet\\Statistics\\Track\\Opens' => true,
354
  'MailPoet\\Statistics\\Track\\WooCommercePurchases' => true,
575
  */
576
  protected function getSubscribersService()
577
  {
578
+ return $this->services['MailPoet\\API\\JSON\\v1\\Subscribers'] = new \MailPoet\API\JSON\v1\Subscribers(${($_ = isset($this->services['MailPoet\\Listing\\BulkActionController']) ? $this->services['MailPoet\\Listing\\BulkActionController'] : $this->getBulkActionControllerService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Segments\\SubscribersListings']) ? $this->services['MailPoet\\Segments\\SubscribersListings'] : $this->getSubscribersListingsService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\SubscriberActions']) ? $this->services['MailPoet\\Subscribers\\SubscriberActions'] : $this->getSubscriberActionsService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\RequiredCustomFieldValidator']) ? $this->services['MailPoet\\Subscribers\\RequiredCustomFieldValidator'] : ($this->services['MailPoet\\Subscribers\\RequiredCustomFieldValidator'] = new \MailPoet\Subscribers\RequiredCustomFieldValidator())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Listing\\Handler']) ? $this->services['MailPoet\\Listing\\Handler'] : ($this->services['MailPoet\\Listing\\Handler'] = new \MailPoet\Listing\Handler())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscription\\Captcha']) ? $this->services['MailPoet\\Subscription\\Captcha'] : $this->getCaptchaService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\WP\\Functions']) ? $this->services['MailPoet\\WP\\Functions'] : ($this->services['MailPoet\\WP\\Functions'] = new \MailPoet\WP\Functions())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Settings\\SettingsController']) ? $this->services['MailPoet\\Settings\\SettingsController'] : ($this->services['MailPoet\\Settings\\SettingsController'] = new \MailPoet\Settings\SettingsController())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscription\\CaptchaSession']) ? $this->services['MailPoet\\Subscription\\CaptchaSession'] : $this->getCaptchaSessionService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\ConfirmationEmailMailer']) ? $this->services['MailPoet\\Subscribers\\ConfirmationEmailMailer'] : $this->getConfirmationEmailMailerService()) && false ?: '_'});
579
  }
580
 
581
  /**
1091
  return $this->services['MailPoet\\Settings\\SettingsController'] = new \MailPoet\Settings\SettingsController();
1092
  }
1093
 
1094
+ /**
1095
+ * Gets the public 'MailPoet\Settings\UserFlagsRepository' shared autowired service.
1096
+ *
1097
+ * @return \MailPoet\Settings\UserFlagsRepository
1098
+ */
1099
+ protected function getUserFlagsRepositoryService()
1100
+ {
1101
+ return $this->services['MailPoet\\Settings\\UserFlagsRepository'] = new \MailPoet\Settings\UserFlagsRepository(${($_ = isset($this->services['MailPoetVendor\\Doctrine\\ORM\\EntityManager']) ? $this->services['MailPoetVendor\\Doctrine\\ORM\\EntityManager'] : $this->getEntityManagerService()) && false ?: '_'});
1102
+ }
1103
+
1104
  /**
1105
  * Gets the public 'MailPoet\Subscribers\ConfirmationEmailMailer' shared autowired service.
1106
  *
1138
  */
1139
  protected function getSubscriberActionsService()
1140
  {
1141
+ return $this->services['MailPoet\\Subscribers\\SubscriberActions'] = new \MailPoet\Subscribers\SubscriberActions(${($_ = isset($this->services['MailPoet\\Settings\\SettingsController']) ? $this->services['MailPoet\\Settings\\SettingsController'] : ($this->services['MailPoet\\Settings\\SettingsController'] = new \MailPoet\Settings\SettingsController())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\NewSubscriberNotificationMailer']) ? $this->services['MailPoet\\Subscribers\\NewSubscriberNotificationMailer'] : ($this->services['MailPoet\\Subscribers\\NewSubscriberNotificationMailer'] = new \MailPoet\Subscribers\NewSubscriberNotificationMailer())) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Subscribers\\ConfirmationEmailMailer']) ? $this->services['MailPoet\\Subscribers\\ConfirmationEmailMailer'] : $this->getConfirmationEmailMailerService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Newsletter\\Scheduler\\WelcomeScheduler']) ? $this->services['MailPoet\\Newsletter\\Scheduler\\WelcomeScheduler'] : ($this->services['MailPoet\\Newsletter\\Scheduler\\WelcomeScheduler'] = new \MailPoet\Newsletter\Scheduler\WelcomeScheduler())) && false ?: '_'});
1142
  }
1143
 
1144
  /**
1513
  return $this->services['MailPoet\\Settings\\UserFlagsController'] = new \MailPoet\Settings\UserFlagsController(${($_ = isset($this->services['MailPoet\\Settings\\UserFlagsRepository']) ? $this->services['MailPoet\\Settings\\UserFlagsRepository'] : $this->getUserFlagsRepositoryService()) && false ?: '_'});
1514
  }
1515
 
 
 
 
 
 
 
 
 
 
 
1516
  /**
1517
  * Gets the private 'MailPoet\Statistics\Track\Clicks' shared autowired service.
1518
  *
generated/doctrine-metadata/3c040156894ce311867edd71cf2273e1 CHANGED
Binary file
lang/mailpoet-ar.mo CHANGED
Binary file
lang/mailpoet-bg_BG.mo CHANGED
Binary file
lang/mailpoet-ca.mo CHANGED
Binary file
lang/mailpoet-cs_CZ.mo CHANGED
Binary file
lang/mailpoet-da_DK.mo CHANGED
Binary file
lang/mailpoet-de_DE.mo CHANGED
Binary file
lang/mailpoet-el.mo CHANGED
Binary file
lang/mailpoet-en_GB.mo CHANGED
Binary file
lang/mailpoet-es_ES.mo CHANGED
Binary file
lang/mailpoet-es_MX.mo CHANGED
Binary file
lang/mailpoet-fa_IR.mo CHANGED
Binary file
lang/mailpoet-fr_CA.mo CHANGED
Binary file
lang/mailpoet-fr_FR.mo CHANGED
Binary file
lang/mailpoet-he_IL.mo CHANGED
Binary file
lang/mailpoet-hu_HU.mo CHANGED
Binary file
lang/mailpoet-it_IT.mo CHANGED
Binary file
lang/mailpoet-ja.mo CHANGED
Binary file
lang/mailpoet-nb_NO.mo CHANGED
Binary file
lang/mailpoet-nl_NL.mo CHANGED
Binary file
lang/mailpoet-pl_PL.mo CHANGED
Binary file
lang/mailpoet-pt_BR.mo CHANGED
Binary file
lang/mailpoet-pt_PT.mo CHANGED
Binary file
lang/mailpoet-ro_RO.mo CHANGED
Binary file
lang/mailpoet-ru_RU.mo CHANGED
Binary file
lang/mailpoet-sq.mo CHANGED
Binary file
lang/mailpoet-sr_RS.mo CHANGED
Binary file
lang/mailpoet-sv_SE.mo CHANGED
Binary file
lang/mailpoet-tr_TR.mo CHANGED
Binary file
lang/mailpoet-vi.mo CHANGED
Binary file
lang/mailpoet-zh_CN.mo CHANGED
Binary file
lang/mailpoet.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
- "POT-Creation-Date: 2019-09-04 11:27:13+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -30,25 +30,25 @@ msgstr ""
30
  msgid "Invalid API version."
31
  msgstr ""
32
 
33
- #: lib/API/JSON/API.php:92
34
  msgid ""
35
  "Sorry, but we couldn't connect to the MailPoet server. Please refresh the "
36
  "web page and try again."
37
  msgstr ""
38
 
39
- #: lib/API/JSON/API.php:119
40
  msgid "Invalid API request."
41
  msgstr ""
42
 
43
- #: lib/API/JSON/API.php:162
44
  msgid "Invalid API endpoint."
45
  msgstr ""
46
 
47
- #: lib/API/JSON/API.php:167
48
  msgid "Invalid API endpoint method."
49
  msgstr ""
50
 
51
- #: lib/API/JSON/API.php:177 lib/Router/Router.php:55
52
  msgid "You do not have the required permissions."
53
  msgstr ""
54
 
@@ -219,42 +219,46 @@ msgstr ""
219
  msgid "You have not specified any settings to be saved."
220
  msgstr ""
221
 
222
- #: lib/API/JSON/v1/Subscribers.php:92 lib/API/JSON/v1/Subscribers.php:379
223
- #: lib/API/JSON/v1/Subscribers.php:397 lib/API/JSON/v1/Subscribers.php:410
224
- #: lib/API/MP/v1/API.php:129 lib/API/MP/v1/API.php:204
225
- #: lib/API/MP/v1/API.php:359
226
  msgid "This subscriber does not exist."
227
  msgstr ""
228
 
229
- #: lib/API/JSON/v1/Subscribers.php:159
230
  msgid "Please specify a valid form ID."
231
  msgstr ""
232
 
233
- #: lib/API/JSON/v1/Subscribers.php:164
234
  msgid "Please leave the first field empty."
235
  msgstr ""
236
 
237
- #: lib/API/JSON/v1/Subscribers.php:201 views/form/editor.html:63
238
  msgid "Please select a list."
239
  msgstr ""
240
 
241
- #: lib/API/JSON/v1/Subscribers.php:222
242
  msgid "You need to wait %s before subscribing again."
243
  msgstr ""
244
 
245
- #: lib/API/JSON/v1/Subscribers.php:279 lib/API/JSON/v1/Subscribers.php:286
 
 
 
 
246
  msgid "Please check the CAPTCHA."
247
  msgstr ""
248
 
249
- #: lib/API/JSON/v1/Subscribers.php:300 lib/API/JSON/v1/Subscribers.php:306
250
  msgid "Error while validating the CAPTCHA."
251
  msgstr ""
252
 
253
- #: lib/API/JSON/v1/Subscribers.php:313
254
  msgid "Please regenerate the CAPTCHA."
255
  msgstr ""
256
 
257
- #: lib/API/JSON/v1/Subscribers.php:320
258
  msgid "The characters entered do not match with the previous CAPTCHA."
259
  msgstr ""
260
 
@@ -265,14 +269,14 @@ msgstr ""
265
  #: lib/API/MP/v1/API.php:62
266
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:47
267
  #: lib/Subscription/Pages.php:342 views/form/editor.html:234
268
- #: views/form/editor.html:237 views/subscribers/subscribers.html:53
269
  msgid "First name"
270
  msgstr ""
271
 
272
  #: lib/API/MP/v1/API.php:70
273
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:48
274
  #: lib/Subscription/Pages.php:351 views/form/editor.html:243
275
- #: views/form/editor.html:246 views/subscribers/subscribers.html:54
276
  msgid "Last name"
277
  msgstr ""
278
 
@@ -515,26 +519,26 @@ msgid "Form Editor"
515
  msgstr ""
516
 
517
  #: lib/Config/Menu.php:197 lib/Config/Menu.php:198
518
- #: views/subscribers/subscribers.html:19
519
  msgid "Subscribers"
520
  msgstr ""
521
 
522
  #: lib/Config/Menu.php:222 lib/Config/Menu.php:223
523
  #: views/subscribers/importExport/import.html:6
524
- #: views/subscribers/subscribers.html:97
525
  msgid "Import"
526
  msgstr ""
527
 
528
  #: lib/Config/Menu.php:235 lib/Config/Menu.php:236
529
  #: views/subscribers/importExport/export.html:6
530
  #: views/subscribers/importExport/export.html:87
531
- #: views/subscribers/subscribers.html:98
532
  msgid "Export"
533
  msgstr ""
534
 
535
  #: lib/Config/Menu.php:248 lib/Config/Menu.php:249 views/forms.html:58
536
  #: views/newsletters.html:99 views/newsletters.html:206 views/segments.html:13
537
- #: views/subscribers/subscribers.html:69
538
  msgid "Lists"
539
  msgstr ""
540
 
@@ -1491,7 +1495,7 @@ msgstr ""
1491
 
1492
  #: lib/Form/Block/Date.php:76 lib/Form/Block/Date.php:198
1493
  #: views/form/templates/blocks/date_days.hbs:3
1494
- #: views/subscribers/subscribers.html:95
1495
  msgid "Day"
1496
  msgstr ""
1497
 
@@ -1501,7 +1505,7 @@ msgstr ""
1501
 
1502
  #: lib/Form/Block/Date.php:85 lib/Form/Block/Date.php:142
1503
  #: views/form/templates/blocks/date_months.hbs:3
1504
- #: views/subscribers/subscribers.html:94
1505
  msgid "Month"
1506
  msgstr ""
1507
 
@@ -1513,7 +1517,7 @@ msgstr ""
1513
  #: lib/Form/Block/Date.php:172
1514
  #: lib/Newsletter/Shortcodes/ShortcodesHelper.php:76
1515
  #: views/form/templates/blocks/date_years.hbs:5
1516
- #: views/subscribers/subscribers.html:93
1517
  msgid "Year"
1518
  msgstr ""
1519
 
@@ -1743,15 +1747,15 @@ msgid "Please specify a type."
1743
  msgstr ""
1744
 
1745
  #: lib/Models/Form.php:106 lib/Models/Newsletter.php:835
1746
- #: lib/Models/ScheduledTaskSubscriber.php:97 lib/Models/Segment.php:195
1747
  #: lib/Models/Subscriber.php:239
1748
  msgid "All"
1749
  msgstr ""
1750
 
1751
  #: lib/Models/Form.php:111 lib/Models/Newsletter.php:933
1752
- #: lib/Models/Segment.php:200 lib/Models/Subscriber.php:269 views/forms.html:71
1753
  #: views/newsletters.html:112 views/segments.html:51
1754
- #: views/subscribers/subscribers.html:38
1755
  msgid "Trash"
1756
  msgstr ""
1757
 
@@ -1763,7 +1767,7 @@ msgstr ""
1763
  msgid "You’ve been successfully subscribed to our newsletter!"
1764
  msgstr ""
1765
 
1766
- #: lib/Models/Model.php:220
1767
  #: views/subscribers/importExport/import/step_data_manipulation.html:14
1768
  msgid "Another record already exists. Please specify a different \"%1$s\"."
1769
  msgstr ""
@@ -1811,7 +1815,7 @@ msgstr ""
1811
  msgid "The template body cannot be empty."
1812
  msgstr ""
1813
 
1814
- #: lib/Models/Segment.php:131 views/subscribers/subscribers.html:89
1815
  msgid "WordPress Users"
1816
  msgstr ""
1817
 
@@ -1827,7 +1831,7 @@ msgstr ""
1827
  msgid "This list contains all of your WooCommerce customers."
1828
  msgstr ""
1829
 
1830
- #: lib/Models/Segment.php:263
1831
  msgid "Not in a List"
1832
  msgstr ""
1833
 
@@ -1848,27 +1852,27 @@ msgid "Subscribers without a list (%s)"
1848
  msgstr ""
1849
 
1850
  #: lib/Models/Subscriber.php:244 lib/Subscription/Pages.php:365
1851
- #: views/segments.html:30 views/subscribers/subscribers.html:57
1852
  msgid "Subscribed"
1853
  msgstr ""
1854
 
1855
  #: lib/Models/Subscriber.php:249 views/segments.html:31
1856
- #: views/subscribers/subscribers.html:56
1857
  msgid "Unconfirmed"
1858
  msgstr ""
1859
 
1860
  #: lib/Models/Subscriber.php:254 lib/Subscription/Pages.php:373
1861
- #: views/segments.html:32 views/subscribers/subscribers.html:58
1862
  msgid "Unsubscribed"
1863
  msgstr ""
1864
 
1865
  #: lib/Models/Subscriber.php:259 lib/Subscription/Pages.php:393
1866
- #: views/segments.html:33 views/subscribers/subscribers.html:59
1867
  msgid "Inactive"
1868
  msgstr ""
1869
 
1870
  #: lib/Models/Subscriber.php:264 lib/Subscription/Pages.php:381
1871
- #: views/segments.html:34 views/subscribers/subscribers.html:60
1872
  msgid "Bounced"
1873
  msgstr ""
1874
 
@@ -1879,7 +1883,7 @@ msgstr ""
1879
  #: lib/Newsletter/Shortcodes/ShortcodesHelper.php:12
1880
  #: lib/Newsletter/Shortcodes/ShortcodesHelper.php:109
1881
  #: lib/Newsletter/Shortcodes/ShortcodesHelper.php:110
1882
- #: views/newsletters.html:359 views/subscribers/subscribers.html:67
1883
  msgid "Subscriber"
1884
  msgstr ""
1885
 
@@ -2192,7 +2196,7 @@ msgstr ""
2192
 
2193
  #: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:44
2194
  #: lib/Subscription/Pages.php:361 views/help.html:50 views/newsletters.html:96
2195
- #: views/subscribers/subscribers.html:55 views/subscribers/subscribers.html:68
2196
  msgid "Status"
2197
  msgstr ""
2198
 
@@ -2245,17 +2249,23 @@ msgid "Confirm you’re not a robot"
2245
  msgstr ""
2246
 
2247
  #: lib/Subscription/CaptchaRenderer.php:36
2248
- msgid "Type in the input the characters you see in the picture above:"
2249
  msgstr ""
2250
 
2251
  #: lib/Subscription/CaptchaRenderer.php:50
2252
  msgid "Subscribe"
2253
  msgstr ""
2254
 
2255
- #: lib/Subscription/CaptchaRenderer.php:81
2256
  msgid "Click to refresh the captcha"
2257
  msgstr ""
2258
 
 
 
 
 
 
 
2259
  #: lib/Subscription/Comment.php:39 lib/Subscription/Registration.php:26
2260
  msgid "Yes, please add me to your mailing list."
2261
  msgstr ""
@@ -2300,7 +2310,7 @@ msgstr ""
2300
 
2301
  #: lib/Subscription/Pages.php:423 views/form/editor.html:35
2302
  #: views/form/editor.html:391 views/newsletter/templates/components/save.hbs:4
2303
- #: views/segments.html:57 views/subscribers/subscribers.html:99
2304
  msgid "Save"
2305
  msgstr ""
2306
 
@@ -2508,7 +2518,7 @@ msgid "Form"
2508
  msgstr ""
2509
 
2510
  #: views/form/editor.html:6 views/newsletters.html:370 views/segments.html:69
2511
- #: views/subscribers/subscribers.html:100
2512
  msgid "Back"
2513
  msgstr ""
2514
 
@@ -2828,7 +2838,7 @@ msgid "See video guide"
2828
  msgstr ""
2829
 
2830
  #: views/forms.html:31 views/newsletters.html:61 views/segments.html:14
2831
- #: views/subscribers/subscribers.html:20
2832
  msgid "Search"
2833
  msgstr ""
2834
 
@@ -2853,7 +2863,7 @@ msgid "Select all forms on all pages"
2853
  msgstr ""
2854
 
2855
  #: views/forms.html:37 views/newsletters.html:67 views/segments.html:20
2856
- #: views/subscribers/subscribers.html:28
2857
  msgid "Clear selection"
2858
  msgstr ""
2859
 
@@ -2862,81 +2872,81 @@ msgid "%d forms permanently deleted."
2862
  msgstr ""
2863
 
2864
  #: views/forms.html:39 views/newsletters.html:69 views/segments.html:22
2865
- #: views/subscribers/subscribers.html:30
2866
  msgid "Select bulk action"
2867
  msgstr ""
2868
 
2869
  #: views/forms.html:40 views/newsletters.html:70 views/segments.html:23
2870
- #: views/subscribers/subscribers.html:31
2871
  msgid "Bulk Actions"
2872
  msgstr ""
2873
 
2874
  #: views/forms.html:41 views/newsletters.html:71 views/segments.html:24
2875
- #: views/subscribers/subscribers.html:32
2876
  msgid "Apply"
2877
  msgstr ""
2878
 
2879
  #: views/forms.html:42 views/newsletters.html:72
2880
- #: views/subscribers/subscribers.html:33
2881
  msgid "Filter"
2882
  msgstr ""
2883
 
2884
  #: views/forms.html:43 views/newsletters.html:73 views/segments.html:53
2885
- #: views/subscribers/subscribers.html:34
2886
  msgid "Empty Trash"
2887
  msgstr ""
2888
 
2889
  #: views/forms.html:44 views/newsletters.html:74 views/segments.html:54
2890
- #: views/subscribers/subscribers.html:35
2891
  msgid "Select All"
2892
  msgstr ""
2893
 
2894
  #: views/forms.html:45 views/newsletters.html:75 views/segments.html:55
2895
- #: views/subscribers/subscribers.html:37
2896
  msgid "Restore"
2897
  msgstr ""
2898
 
2899
  #: views/forms.html:46 views/newsletters.html:76
2900
- #: views/subscribers/subscribers.html:40
2901
  msgid "Delete Permanently"
2902
  msgstr ""
2903
 
2904
  #: views/forms.html:48 views/newsletters.html:79 views/segments.html:59
2905
- #: views/subscribers/subscribers.html:43
2906
  msgid "Previous page"
2907
  msgstr ""
2908
 
2909
  #: views/forms.html:49 views/newsletters.html:80 views/segments.html:60
2910
- #: views/subscribers/subscribers.html:44
2911
  msgid "First page"
2912
  msgstr ""
2913
 
2914
  #: views/forms.html:50 views/newsletters.html:81 views/segments.html:61
2915
- #: views/subscribers/subscribers.html:45
2916
  msgid "Next page"
2917
  msgstr ""
2918
 
2919
  #: views/forms.html:51 views/newsletters.html:82 views/segments.html:62
2920
- #: views/subscribers/subscribers.html:46
2921
  msgid "Last page"
2922
  msgstr ""
2923
 
2924
- #: views/forms.html:52 views/subscribers/subscribers.html:47
2925
  msgid "Current Page"
2926
  msgstr ""
2927
 
2928
  #: views/forms.html:53 views/newsletters.html:84 views/segments.html:64
2929
- #: views/subscribers/subscribers.html:48
2930
  msgid "of"
2931
  msgstr ""
2932
 
2933
  #: views/forms.html:54 views/newsletters.html:85 views/segments.html:65
2934
- #: views/subscribers/subscribers.html:49
2935
  msgid "1 item"
2936
  msgstr ""
2937
 
2938
  #: views/forms.html:55 views/newsletters.html:86 views/segments.html:66
2939
- #: views/subscribers/subscribers.html:50
2940
  msgid "%$1d items"
2941
  msgstr ""
2942
 
@@ -2982,7 +2992,7 @@ msgid "%$1d forms have been restored from the trash."
2982
  msgstr ""
2983
 
2984
  #: views/forms.html:68 views/newsletters.html:114 views/segments.html:50
2985
- #: views/subscribers/subscribers.html:36
2986
  msgid "Edit"
2987
  msgstr ""
2988
 
@@ -2997,12 +3007,12 @@ msgid "Form \"%$1s\" has been duplicated."
2997
  msgstr ""
2998
 
2999
  #: views/forms.html:72 views/newsletters.html:113 views/segments.html:52
3000
- #: views/subscribers/subscribers.html:39
3001
  msgid "Move to trash"
3002
  msgstr ""
3003
 
3004
  #: views/forms.html:73 views/newsletters.html:128 views/segments.html:49
3005
- #: views/subscribers/subscribers.html:96
3006
  msgid "Add New"
3007
  msgstr ""
3008
 
@@ -4310,7 +4320,7 @@ msgstr ""
4310
 
4311
  #: views/newsletters.html:77 views/subscribers/importExport/import.html:45
4312
  #: views/subscribers/importExport/import.html:116
4313
- #: views/subscribers/subscribers.html:41
4314
  msgid "Show more details"
4315
  msgstr ""
4316
 
@@ -4342,7 +4352,7 @@ msgstr ""
4342
  msgid "Created on"
4343
  msgstr ""
4344
 
4345
- #: views/newsletters.html:104 views/subscribers/subscribers.html:71
4346
  msgid "Last modified on"
4347
  msgstr ""
4348
 
@@ -4685,7 +4695,7 @@ msgstr ""
4685
  msgid "This subscriber segment will be used for this email."
4686
  msgstr ""
4687
 
4688
- #: views/newsletters.html:208 views/subscribers/subscribers.html:61
4689
  msgid "Select a list"
4690
  msgstr ""
4691
 
@@ -6484,15 +6494,15 @@ msgstr ""
6484
  msgid "How would you like to import subscribers?"
6485
  msgstr ""
6486
 
6487
- #: views/subscribers/subscribers.html:21
6488
  msgid "Loading subscribers..."
6489
  msgstr ""
6490
 
6491
- #: views/subscribers/subscribers.html:22
6492
  msgid "No subscribers were found."
6493
  msgstr ""
6494
 
6495
- #: views/subscribers/subscribers.html:23
6496
  msgid ""
6497
  "Email addresses that are invalid or don't exist anymore are called "
6498
  "\"bounced addresses\". It's a good practice not to send emails to bounced "
@@ -6501,131 +6511,131 @@ msgid ""
6501
  "addresses without any setup."
6502
  msgstr ""
6503
 
6504
- #: views/subscribers/subscribers.html:24
6505
  msgid "Get premium version!"
6506
  msgstr ""
6507
 
6508
- #: views/subscribers/subscribers.html:25
6509
  msgid "All subscribers on this page are selected."
6510
  msgstr ""
6511
 
6512
- #: views/subscribers/subscribers.html:26
6513
  msgid "All %d subscribers are selected."
6514
  msgstr ""
6515
 
6516
- #: views/subscribers/subscribers.html:27
6517
  msgid "Select all subscribers on all pages."
6518
  msgstr ""
6519
 
6520
- #: views/subscribers/subscribers.html:29
6521
  msgid "%d subscribers were permanently deleted."
6522
  msgstr ""
6523
 
6524
- #: views/subscribers/subscribers.html:52
6525
  msgid "E-mail"
6526
  msgstr ""
6527
 
6528
- #: views/subscribers/subscribers.html:62
6529
  msgid "Unsubscribed on %$1s"
6530
  msgstr ""
6531
 
6532
- #: views/subscribers/subscribers.html:63
6533
  msgid "Subscriber was updated successfully!"
6534
  msgstr ""
6535
 
6536
- #: views/subscribers/subscribers.html:64
6537
  msgid "Subscriber was added successfully!"
6538
  msgstr ""
6539
 
6540
- #: views/subscribers/subscribers.html:65
6541
  msgid ""
6542
  "This subscriber will receive Welcome Emails if any are active for your "
6543
  "lists."
6544
  msgstr ""
6545
 
6546
- #: views/subscribers/subscribers.html:70
6547
  msgid "Subscribed on"
6548
  msgstr ""
6549
 
6550
- #: views/subscribers/subscribers.html:72
6551
  msgid "1 subscriber was moved to the trash."
6552
  msgstr ""
6553
 
6554
- #: views/subscribers/subscribers.html:73
6555
  msgid "%$1d subscribers were moved to the trash."
6556
  msgstr ""
6557
 
6558
- #: views/subscribers/subscribers.html:74
6559
  msgid "1 subscriber was permanently deleted."
6560
  msgstr ""
6561
 
6562
- #: views/subscribers/subscribers.html:75
6563
  msgid "%$1d subscribers were permanently deleted."
6564
  msgstr ""
6565
 
6566
- #: views/subscribers/subscribers.html:76
6567
  msgid "1 subscriber has been restored from the trash."
6568
  msgstr ""
6569
 
6570
- #: views/subscribers/subscribers.html:77
6571
  msgid "%$1d subscribers have been restored from the trash."
6572
  msgstr ""
6573
 
6574
- #: views/subscribers/subscribers.html:78
6575
  msgid "Move to list..."
6576
  msgstr ""
6577
 
6578
- #: views/subscribers/subscribers.html:79
6579
  msgid "%$1d subscribers were moved to list <strong>%$2s</strong>"
6580
  msgstr ""
6581
 
6582
- #: views/subscribers/subscribers.html:80
6583
  msgid "Add to list..."
6584
  msgstr ""
6585
 
6586
- #: views/subscribers/subscribers.html:81
6587
  msgid "%$1d subscribers were added to list <strong>%$2s</strong>."
6588
  msgstr ""
6589
 
6590
- #: views/subscribers/subscribers.html:82
6591
  msgid "Remove from list..."
6592
  msgstr ""
6593
 
6594
- #: views/subscribers/subscribers.html:83
6595
  msgid "%$1d subscribers were removed from list <strong>%$2s</strong>"
6596
  msgstr ""
6597
 
6598
- #: views/subscribers/subscribers.html:84
6599
  msgid "Remove from all lists"
6600
  msgstr ""
6601
 
6602
- #: views/subscribers/subscribers.html:85
6603
  msgid "%$1d subscribers were removed from all lists."
6604
  msgstr ""
6605
 
6606
- #: views/subscribers/subscribers.html:86
6607
  msgid "Resend confirmation email"
6608
  msgstr ""
6609
 
6610
- #: views/subscribers/subscribers.html:87
6611
- msgid "%$1d confirmation emails have been sent."
6612
  msgstr ""
6613
 
6614
- #: views/subscribers/subscribers.html:88
6615
  msgid "Lists to which the subscriber was subscribed."
6616
  msgstr ""
6617
 
6618
- #: views/subscribers/subscribers.html:90
6619
  msgid ""
6620
  "This subscriber is a registered WordPress user. [link]Edit his/her "
6621
  "profile[/link] to change his/her email."
6622
  msgstr ""
6623
 
6624
- #: views/subscribers/subscribers.html:91
6625
  msgid "Tip:"
6626
  msgstr ""
6627
 
6628
- #: views/subscribers/subscribers.html:92
6629
  msgid ""
6630
  "Need to add new fields, like a telephone number or street address? You can "
6631
  "add custom fields by editing the subscription form on the Forms page."
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2019-09-10 09:05:05+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
30
  msgid "Invalid API version."
31
  msgstr ""
32
 
33
+ #: lib/API/JSON/API.php:93
34
  msgid ""
35
  "Sorry, but we couldn't connect to the MailPoet server. Please refresh the "
36
  "web page and try again."
37
  msgstr ""
38
 
39
+ #: lib/API/JSON/API.php:120
40
  msgid "Invalid API request."
41
  msgstr ""
42
 
43
+ #: lib/API/JSON/API.php:163
44
  msgid "Invalid API endpoint."
45
  msgstr ""
46
 
47
+ #: lib/API/JSON/API.php:168
48
  msgid "Invalid API endpoint method."
49
  msgstr ""
50
 
51
+ #: lib/API/JSON/API.php:179 lib/Router/Router.php:55
52
  msgid "You do not have the required permissions."
53
  msgstr ""
54
 
219
  msgid "You have not specified any settings to be saved."
220
  msgstr ""
221
 
222
+ #: lib/API/JSON/v1/Subscribers.php:98 lib/API/JSON/v1/Subscribers.php:385
223
+ #: lib/API/JSON/v1/Subscribers.php:403 lib/API/JSON/v1/Subscribers.php:416
224
+ #: lib/API/JSON/v1/Subscribers.php:431 lib/API/MP/v1/API.php:129
225
+ #: lib/API/MP/v1/API.php:204 lib/API/MP/v1/API.php:359
226
  msgid "This subscriber does not exist."
227
  msgstr ""
228
 
229
+ #: lib/API/JSON/v1/Subscribers.php:165
230
  msgid "Please specify a valid form ID."
231
  msgstr ""
232
 
233
+ #: lib/API/JSON/v1/Subscribers.php:170
234
  msgid "Please leave the first field empty."
235
  msgstr ""
236
 
237
+ #: lib/API/JSON/v1/Subscribers.php:207 views/form/editor.html:63
238
  msgid "Please select a list."
239
  msgstr ""
240
 
241
+ #: lib/API/JSON/v1/Subscribers.php:228
242
  msgid "You need to wait %s before subscribing again."
243
  msgstr ""
244
 
245
+ #: lib/API/JSON/v1/Subscribers.php:285
246
+ msgid "Please fill in the CAPTCHA."
247
+ msgstr ""
248
+
249
+ #: lib/API/JSON/v1/Subscribers.php:292
250
  msgid "Please check the CAPTCHA."
251
  msgstr ""
252
 
253
+ #: lib/API/JSON/v1/Subscribers.php:306 lib/API/JSON/v1/Subscribers.php:312
254
  msgid "Error while validating the CAPTCHA."
255
  msgstr ""
256
 
257
+ #: lib/API/JSON/v1/Subscribers.php:319
258
  msgid "Please regenerate the CAPTCHA."
259
  msgstr ""
260
 
261
+ #: lib/API/JSON/v1/Subscribers.php:326
262
  msgid "The characters entered do not match with the previous CAPTCHA."
263
  msgstr ""
264
 
269
  #: lib/API/MP/v1/API.php:62
270
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:47
271
  #: lib/Subscription/Pages.php:342 views/form/editor.html:234
272
+ #: views/form/editor.html:237 views/subscribers/subscribers.html:54
273
  msgid "First name"
274
  msgstr ""
275
 
276
  #: lib/API/MP/v1/API.php:70
277
  #: lib/Subscribers/ImportExport/ImportExportFactory.php:48
278
  #: lib/Subscription/Pages.php:351 views/form/editor.html:243
279
+ #: views/form/editor.html:246 views/subscribers/subscribers.html:55
280
  msgid "Last name"
281
  msgstr ""
282
 
519
  msgstr ""
520
 
521
  #: lib/Config/Menu.php:197 lib/Config/Menu.php:198
522
+ #: views/subscribers/subscribers.html:20
523
  msgid "Subscribers"
524
  msgstr ""
525
 
526
  #: lib/Config/Menu.php:222 lib/Config/Menu.php:223
527
  #: views/subscribers/importExport/import.html:6
528
+ #: views/subscribers/subscribers.html:98
529
  msgid "Import"
530
  msgstr ""
531
 
532
  #: lib/Config/Menu.php:235 lib/Config/Menu.php:236
533
  #: views/subscribers/importExport/export.html:6
534
  #: views/subscribers/importExport/export.html:87
535
+ #: views/subscribers/subscribers.html:99
536
  msgid "Export"
537
  msgstr ""
538
 
539
  #: lib/Config/Menu.php:248 lib/Config/Menu.php:249 views/forms.html:58
540
  #: views/newsletters.html:99 views/newsletters.html:206 views/segments.html:13
541
+ #: views/subscribers/subscribers.html:70
542
  msgid "Lists"
543
  msgstr ""
544
 
1495
 
1496
  #: lib/Form/Block/Date.php:76 lib/Form/Block/Date.php:198
1497
  #: views/form/templates/blocks/date_days.hbs:3
1498
+ #: views/subscribers/subscribers.html:96
1499
  msgid "Day"
1500
  msgstr ""
1501
 
1505
 
1506
  #: lib/Form/Block/Date.php:85 lib/Form/Block/Date.php:142
1507
  #: views/form/templates/blocks/date_months.hbs:3
1508
+ #: views/subscribers/subscribers.html:95
1509
  msgid "Month"
1510
  msgstr ""
1511
 
1517
  #: lib/Form/Block/Date.php:172
1518
  #: lib/Newsletter/Shortcodes/ShortcodesHelper.php:76
1519
  #: views/form/templates/blocks/date_years.hbs:5
1520
+ #: views/subscribers/subscribers.html:94
1521
  msgid "Year"
1522
  msgstr ""
1523
 
1747
  msgstr ""
1748
 
1749
  #: lib/Models/Form.php:106 lib/Models/Newsletter.php:835
1750
+ #: lib/Models/ScheduledTaskSubscriber.php:97 lib/Models/Segment.php:199
1751
  #: lib/Models/Subscriber.php:239
1752
  msgid "All"
1753
  msgstr ""
1754
 
1755
  #: lib/Models/Form.php:111 lib/Models/Newsletter.php:933
1756
+ #: lib/Models/Segment.php:204 lib/Models/Subscriber.php:269 views/forms.html:71
1757
  #: views/newsletters.html:112 views/segments.html:51
1758
+ #: views/subscribers/subscribers.html:39
1759
  msgid "Trash"
1760
  msgstr ""
1761
 
1767
  msgid "You’ve been successfully subscribed to our newsletter!"
1768
  msgstr ""
1769
 
1770
+ #: lib/Models/Model.php:223
1771
  #: views/subscribers/importExport/import/step_data_manipulation.html:14
1772
  msgid "Another record already exists. Please specify a different \"%1$s\"."
1773
  msgstr ""
1815
  msgid "The template body cannot be empty."
1816
  msgstr ""
1817
 
1818
+ #: lib/Models/Segment.php:131 views/subscribers/subscribers.html:90
1819
  msgid "WordPress Users"
1820
  msgstr ""
1821
 
1831
  msgid "This list contains all of your WooCommerce customers."
1832
  msgstr ""
1833
 
1834
+ #: lib/Models/Segment.php:267
1835
  msgid "Not in a List"
1836
  msgstr ""
1837
 
1852
  msgstr ""
1853
 
1854
  #: lib/Models/Subscriber.php:244 lib/Subscription/Pages.php:365
1855
+ #: views/segments.html:30 views/subscribers/subscribers.html:58
1856
  msgid "Subscribed"
1857
  msgstr ""
1858
 
1859
  #: lib/Models/Subscriber.php:249 views/segments.html:31
1860
+ #: views/subscribers/subscribers.html:57
1861
  msgid "Unconfirmed"
1862
  msgstr ""
1863
 
1864
  #: lib/Models/Subscriber.php:254 lib/Subscription/Pages.php:373
1865
+ #: views/segments.html:32 views/subscribers/subscribers.html:59
1866
  msgid "Unsubscribed"
1867
  msgstr ""
1868
 
1869
  #: lib/Models/Subscriber.php:259 lib/Subscription/Pages.php:393
1870
+ #: views/segments.html:33 views/subscribers/subscribers.html:60
1871
  msgid "Inactive"
1872
  msgstr ""
1873
 
1874
  #: lib/Models/Subscriber.php:264 lib/Subscription/Pages.php:381
1875
+ #: views/segments.html:34 views/subscribers/subscribers.html:61
1876
  msgid "Bounced"
1877
  msgstr ""
1878
 
1883
  #: lib/Newsletter/Shortcodes/ShortcodesHelper.php:12
1884
  #: lib/Newsletter/Shortcodes/ShortcodesHelper.php:109
1885
  #: lib/Newsletter/Shortcodes/ShortcodesHelper.php:110
1886
+ #: views/newsletters.html:359 views/subscribers/subscribers.html:68
1887
  msgid "Subscriber"
1888
  msgstr ""
1889
 
2196
 
2197
  #: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:44
2198
  #: lib/Subscription/Pages.php:361 views/help.html:50 views/newsletters.html:96
2199
+ #: views/subscribers/subscribers.html:56 views/subscribers/subscribers.html:69
2200
  msgid "Status"
2201
  msgstr ""
2202
 
2249
  msgstr ""
2250
 
2251
  #: lib/Subscription/CaptchaRenderer.php:36
2252
+ msgid "Type in the characters you see in the picture above:"
2253
  msgstr ""
2254
 
2255
  #: lib/Subscription/CaptchaRenderer.php:50
2256
  msgid "Subscribe"
2257
  msgstr ""
2258
 
2259
+ #: lib/Subscription/CaptchaRenderer.php:98
2260
  msgid "Click to refresh the captcha"
2261
  msgstr ""
2262
 
2263
+ #: lib/Subscription/CaptchaRenderer.php:116
2264
+ msgid ""
2265
+ "The characters you entered did not match the CAPTCHA image. Please try "
2266
+ "again with this new image."
2267
+ msgstr ""
2268
+
2269
  #: lib/Subscription/Comment.php:39 lib/Subscription/Registration.php:26
2270
  msgid "Yes, please add me to your mailing list."
2271
  msgstr ""
2310
 
2311
  #: lib/Subscription/Pages.php:423 views/form/editor.html:35
2312
  #: views/form/editor.html:391 views/newsletter/templates/components/save.hbs:4
2313
+ #: views/segments.html:57 views/subscribers/subscribers.html:100
2314
  msgid "Save"
2315
  msgstr ""
2316
 
2518
  msgstr ""
2519
 
2520
  #: views/form/editor.html:6 views/newsletters.html:370 views/segments.html:69
2521
+ #: views/subscribers/subscribers.html:101
2522
  msgid "Back"
2523
  msgstr ""
2524
 
2838
  msgstr ""
2839
 
2840
  #: views/forms.html:31 views/newsletters.html:61 views/segments.html:14
2841
+ #: views/subscribers/subscribers.html:21
2842
  msgid "Search"
2843
  msgstr ""
2844
 
2863
  msgstr ""
2864
 
2865
  #: views/forms.html:37 views/newsletters.html:67 views/segments.html:20
2866
+ #: views/subscribers/subscribers.html:29
2867
  msgid "Clear selection"
2868
  msgstr ""
2869
 
2872
  msgstr ""
2873
 
2874
  #: views/forms.html:39 views/newsletters.html:69 views/segments.html:22
2875
+ #: views/subscribers/subscribers.html:31
2876
  msgid "Select bulk action"
2877
  msgstr ""
2878
 
2879
  #: views/forms.html:40 views/newsletters.html:70 views/segments.html:23
2880
+ #: views/subscribers/subscribers.html:32
2881
  msgid "Bulk Actions"
2882
  msgstr ""
2883
 
2884
  #: views/forms.html:41 views/newsletters.html:71 views/segments.html:24
2885
+ #: views/subscribers/subscribers.html:33
2886
  msgid "Apply"
2887
  msgstr ""
2888
 
2889
  #: views/forms.html:42 views/newsletters.html:72
2890
+ #: views/subscribers/subscribers.html:34
2891
  msgid "Filter"
2892
  msgstr ""
2893
 
2894
  #: views/forms.html:43 views/newsletters.html:73 views/segments.html:53
2895
+ #: views/subscribers/subscribers.html:35
2896
  msgid "Empty Trash"
2897
  msgstr ""
2898
 
2899
  #: views/forms.html:44 views/newsletters.html:74 views/segments.html:54
2900
+ #: views/subscribers/subscribers.html:36
2901
  msgid "Select All"
2902
  msgstr ""
2903
 
2904
  #: views/forms.html:45 views/newsletters.html:75 views/segments.html:55
2905
+ #: views/subscribers/subscribers.html:38
2906
  msgid "Restore"
2907
  msgstr ""
2908
 
2909
  #: views/forms.html:46 views/newsletters.html:76
2910
+ #: views/subscribers/subscribers.html:41
2911
  msgid "Delete Permanently"
2912
  msgstr ""
2913
 
2914
  #: views/forms.html:48 views/newsletters.html:79 views/segments.html:59
2915
+ #: views/subscribers/subscribers.html:44
2916
  msgid "Previous page"
2917
  msgstr ""
2918
 
2919
  #: views/forms.html:49 views/newsletters.html:80 views/segments.html:60
2920
+ #: views/subscribers/subscribers.html:45
2921
  msgid "First page"
2922
  msgstr ""
2923
 
2924
  #: views/forms.html:50 views/newsletters.html:81 views/segments.html:61
2925
+ #: views/subscribers/subscribers.html:46
2926
  msgid "Next page"
2927
  msgstr ""
2928
 
2929
  #: views/forms.html:51 views/newsletters.html:82 views/segments.html:62
2930
+ #: views/subscribers/subscribers.html:47
2931
  msgid "Last page"
2932
  msgstr ""
2933
 
2934
+ #: views/forms.html:52 views/subscribers/subscribers.html:48
2935
  msgid "Current Page"
2936
  msgstr ""
2937
 
2938
  #: views/forms.html:53 views/newsletters.html:84 views/segments.html:64
2939
+ #: views/subscribers/subscribers.html:49
2940
  msgid "of"
2941
  msgstr ""
2942
 
2943
  #: views/forms.html:54 views/newsletters.html:85 views/segments.html:65
2944
+ #: views/subscribers/subscribers.html:50
2945
  msgid "1 item"
2946
  msgstr ""
2947
 
2948
  #: views/forms.html:55 views/newsletters.html:86 views/segments.html:66
2949
+ #: views/subscribers/subscribers.html:51
2950
  msgid "%$1d items"
2951
  msgstr ""
2952
 
2992
  msgstr ""
2993
 
2994
  #: views/forms.html:68 views/newsletters.html:114 views/segments.html:50
2995
+ #: views/subscribers/subscribers.html:37
2996
  msgid "Edit"
2997
  msgstr ""
2998
 
3007
  msgstr ""
3008
 
3009
  #: views/forms.html:72 views/newsletters.html:113 views/segments.html:52
3010
+ #: views/subscribers/subscribers.html:40
3011
  msgid "Move to trash"
3012
  msgstr ""
3013
 
3014
  #: views/forms.html:73 views/newsletters.html:128 views/segments.html:49
3015
+ #: views/subscribers/subscribers.html:97
3016
  msgid "Add New"
3017
  msgstr ""
3018
 
4320
 
4321
  #: views/newsletters.html:77 views/subscribers/importExport/import.html:45
4322
  #: views/subscribers/importExport/import.html:116
4323
+ #: views/subscribers/subscribers.html:42
4324
  msgid "Show more details"
4325
  msgstr ""
4326
 
4352
  msgid "Created on"
4353
  msgstr ""
4354
 
4355
+ #: views/newsletters.html:104 views/subscribers/subscribers.html:72
4356
  msgid "Last modified on"
4357
  msgstr ""
4358
 
4695
  msgid "This subscriber segment will be used for this email."
4696
  msgstr ""
4697
 
4698
+ #: views/newsletters.html:208 views/subscribers/subscribers.html:62
4699
  msgid "Select a list"
4700
  msgstr ""
4701
 
6494
  msgid "How would you like to import subscribers?"
6495
  msgstr ""
6496
 
6497
+ #: views/subscribers/subscribers.html:22
6498
  msgid "Loading subscribers..."
6499
  msgstr ""
6500
 
6501
+ #: views/subscribers/subscribers.html:23
6502
  msgid "No subscribers were found."
6503
  msgstr ""
6504
 
6505
+ #: views/subscribers/subscribers.html:24
6506
  msgid ""
6507
  "Email addresses that are invalid or don't exist anymore are called "
6508
  "\"bounced addresses\". It's a good practice not to send emails to bounced "
6511
  "addresses without any setup."
6512
  msgstr ""
6513
 
6514
+ #: views/subscribers/subscribers.html:25
6515
  msgid "Get premium version!"
6516
  msgstr ""
6517
 
6518
+ #: views/subscribers/subscribers.html:26
6519
  msgid "All subscribers on this page are selected."
6520
  msgstr ""
6521
 
6522
+ #: views/subscribers/subscribers.html:27
6523
  msgid "All %d subscribers are selected."
6524
  msgstr ""
6525
 
6526
+ #: views/subscribers/subscribers.html:28
6527
  msgid "Select all subscribers on all pages."
6528
  msgstr ""
6529
 
6530
+ #: views/subscribers/subscribers.html:30
6531
  msgid "%d subscribers were permanently deleted."
6532
  msgstr ""
6533
 
6534
+ #: views/subscribers/subscribers.html:53
6535
  msgid "E-mail"
6536
  msgstr ""
6537
 
6538
+ #: views/subscribers/subscribers.html:63
6539
  msgid "Unsubscribed on %$1s"
6540
  msgstr ""
6541
 
6542
+ #: views/subscribers/subscribers.html:64
6543
  msgid "Subscriber was updated successfully!"
6544
  msgstr ""
6545
 
6546
+ #: views/subscribers/subscribers.html:65
6547
  msgid "Subscriber was added successfully!"
6548
  msgstr ""
6549
 
6550
+ #: views/subscribers/subscribers.html:66
6551
  msgid ""
6552
  "This subscriber will receive Welcome Emails if any are active for your "
6553
  "lists."
6554
  msgstr ""
6555
 
6556
+ #: views/subscribers/subscribers.html:71
6557
  msgid "Subscribed on"
6558
  msgstr ""
6559
 
6560
+ #: views/subscribers/subscribers.html:73
6561
  msgid "1 subscriber was moved to the trash."
6562
  msgstr ""
6563
 
6564
+ #: views/subscribers/subscribers.html:74
6565
  msgid "%$1d subscribers were moved to the trash."
6566
  msgstr ""
6567
 
6568
+ #: views/subscribers/subscribers.html:75
6569
  msgid "1 subscriber was permanently deleted."
6570
  msgstr ""
6571
 
6572
+ #: views/subscribers/subscribers.html:76
6573
  msgid "%$1d subscribers were permanently deleted."
6574
  msgstr ""
6575
 
6576
+ #: views/subscribers/subscribers.html:77
6577
  msgid "1 subscriber has been restored from the trash."
6578
  msgstr ""
6579
 
6580
+ #: views/subscribers/subscribers.html:78
6581
  msgid "%$1d subscribers have been restored from the trash."
6582
  msgstr ""
6583
 
6584
+ #: views/subscribers/subscribers.html:79
6585
  msgid "Move to list..."
6586
  msgstr ""
6587
 
6588
+ #: views/subscribers/subscribers.html:80
6589
  msgid "%$1d subscribers were moved to list <strong>%$2s</strong>"
6590
  msgstr ""
6591
 
6592
+ #: views/subscribers/subscribers.html:81
6593
  msgid "Add to list..."
6594
  msgstr ""
6595
 
6596
+ #: views/subscribers/subscribers.html:82
6597
  msgid "%$1d subscribers were added to list <strong>%$2s</strong>."
6598
  msgstr ""
6599
 
6600
+ #: views/subscribers/subscribers.html:83
6601
  msgid "Remove from list..."
6602
  msgstr ""
6603
 
6604
+ #: views/subscribers/subscribers.html:84
6605
  msgid "%$1d subscribers were removed from list <strong>%$2s</strong>"
6606
  msgstr ""
6607
 
6608
+ #: views/subscribers/subscribers.html:85
6609
  msgid "Remove from all lists"
6610
  msgstr ""
6611
 
6612
+ #: views/subscribers/subscribers.html:86
6613
  msgid "%$1d subscribers were removed from all lists."
6614
  msgstr ""
6615
 
6616
+ #: views/subscribers/subscribers.html:87
6617
  msgid "Resend confirmation email"
6618
  msgstr ""
6619
 
6620
+ #: views/subscribers/subscribers.html:88
6621
+ msgid "1 confirmation email has been sent."
6622
  msgstr ""
6623
 
6624
+ #: views/subscribers/subscribers.html:89
6625
  msgid "Lists to which the subscriber was subscribed."
6626
  msgstr ""
6627
 
6628
+ #: views/subscribers/subscribers.html:91
6629
  msgid ""
6630
  "This subscriber is a registered WordPress user. [link]Edit his/her "
6631
  "profile[/link] to change his/her email."
6632
  msgstr ""
6633
 
6634
+ #: views/subscribers/subscribers.html:92
6635
  msgid "Tip:"
6636
  msgstr ""
6637
 
6638
+ #: views/subscribers/subscribers.html:93
6639
  msgid ""
6640
  "Need to add new fields, like a telephone number or street address? You can "
6641
  "add custom fields by editing the subscription form on the Forms page."
lib/API/JSON/API.php CHANGED
@@ -5,6 +5,7 @@ use MailPoet\Config\AccessControl;
5
  use MailPoet\Settings\SettingsController;
6
  use MailPoet\Subscription\Captcha;
7
  use MailPoet\Tracy\ApiPanel\ApiPanel;
 
8
  use MailPoetVendor\Psr\Container\ContainerInterface;
9
  use MailPoet\Util\Helpers;
10
  use MailPoet\Util\Security;
@@ -169,6 +170,7 @@ class API {
169
 
170
  if (class_exists(Debugger::class)) {
171
  ApiPanel::init($endpoint, $this->_request_method, $this->_request_data);
 
172
  }
173
 
174
  // check the accessibility of the requested endpoint's action
5
  use MailPoet\Settings\SettingsController;
6
  use MailPoet\Subscription\Captcha;
7
  use MailPoet\Tracy\ApiPanel\ApiPanel;
8
+ use MailPoet\Tracy\DIPanel\DIPanel;
9
  use MailPoetVendor\Psr\Container\ContainerInterface;
10
  use MailPoet\Util\Helpers;
11
  use MailPoet\Util\Security;
170
 
171
  if (class_exists(Debugger::class)) {
172
  ApiPanel::init($endpoint, $this->_request_method, $this->_request_data);
173
+ DIPanel::init();
174
  }
175
 
176
  // check the accessibility of the requested endpoint's action
lib/API/JSON/v1/Subscribers.php CHANGED
@@ -16,6 +16,7 @@ use MailPoet\Newsletter\Scheduler\WelcomeScheduler;
16
  use MailPoet\Segments\BulkAction;
17
  use MailPoet\Segments\SubscribersListings;
18
  use MailPoet\Settings\SettingsController;
 
19
  use MailPoet\Subscribers\RequiredCustomFieldValidator;
20
  use MailPoet\Subscribers\Source;
21
  use MailPoet\Subscribers\SubscriberActions;
@@ -62,6 +63,9 @@ class Subscribers extends APIEndpoint {
62
  /** @var CaptchaSession */
63
  private $captcha_session;
64
 
 
 
 
65
  public function __construct(
66
  Listing\BulkActionController $bulk_action_controller,
67
  SubscribersListings $subscribers_listings,
@@ -71,7 +75,8 @@ class Subscribers extends APIEndpoint {
71
  Captcha $subscription_captcha,
72
  WPFunctions $wp,
73
  SettingsController $settings,
74
- CaptchaSession $captcha_session
 
75
  ) {
76
  $this->bulk_action_controller = $bulk_action_controller;
77
  $this->subscribers_listings = $subscribers_listings;
@@ -82,6 +87,7 @@ class Subscribers extends APIEndpoint {
82
  $this->wp = $wp;
83
  $this->settings = $settings;
84
  $this->captcha_session = $captcha_session;
 
85
  }
86
 
87
  function get($data = []) {
@@ -276,7 +282,7 @@ class Subscribers extends APIEndpoint {
276
  $meta = [];
277
  $meta['redirect_url'] = SubscriptionUrl::getCaptchaUrl();
278
  return $this->badRequest([
279
- APIError::BAD_REQUEST => WPFunctions::get()->__('Please check the CAPTCHA.', 'mailpoet'),
280
  ], $meta);
281
  }
282
  }
@@ -412,6 +418,21 @@ class Subscribers extends APIEndpoint {
412
  }
413
  }
414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  function bulkAction($data = []) {
416
  try {
417
  if (!isset($data['listing']['filter']['segment'])) {
16
  use MailPoet\Segments\BulkAction;
17
  use MailPoet\Segments\SubscribersListings;
18
  use MailPoet\Settings\SettingsController;
19
+ use MailPoet\Subscribers\ConfirmationEmailMailer;
20
  use MailPoet\Subscribers\RequiredCustomFieldValidator;
21
  use MailPoet\Subscribers\Source;
22
  use MailPoet\Subscribers\SubscriberActions;
63
  /** @var CaptchaSession */
64
  private $captcha_session;
65
 
66
+ /** @var ConfirmationEmailMailer; */
67
+ private $confirmation_email_mailer;
68
+
69
  public function __construct(
70
  Listing\BulkActionController $bulk_action_controller,
71
  SubscribersListings $subscribers_listings,
75
  Captcha $subscription_captcha,
76
  WPFunctions $wp,
77
  SettingsController $settings,
78
+ CaptchaSession $captcha_session,
79
+ ConfirmationEmailMailer $confirmation_email_mailer
80
  ) {
81
  $this->bulk_action_controller = $bulk_action_controller;
82
  $this->subscribers_listings = $subscribers_listings;
87
  $this->wp = $wp;
88
  $this->settings = $settings;
89
  $this->captcha_session = $captcha_session;
90
+ $this->confirmation_email_mailer = $confirmation_email_mailer;
91
  }
92
 
93
  function get($data = []) {
282
  $meta = [];
283
  $meta['redirect_url'] = SubscriptionUrl::getCaptchaUrl();
284
  return $this->badRequest([
285
+ APIError::BAD_REQUEST => WPFunctions::get()->__('Please fill in the CAPTCHA.', 'mailpoet'),
286
  ], $meta);
287
  }
288
  }
418
  }
419
  }
420
 
421
+ function sendConfirmationEmail($data = []) {
422
+ $id = (isset($data['id']) ? (int)$data['id'] : false);
423
+ $subscriber = Subscriber::findOne($id);
424
+ if ($subscriber instanceof Subscriber) {
425
+ if ($this->confirmation_email_mailer->sendConfirmationEmail($subscriber)) {
426
+ return $this->successResponse();
427
+ }
428
+ return $this->errorResponse();
429
+ } else {
430
+ return $this->errorResponse([
431
+ APIError::NOT_FOUND => WPFunctions::get()->__('This subscriber does not exist.', 'mailpoet'),
432
+ ]);
433
+ }
434
+ }
435
+
436
  function bulkAction($data = []) {
437
  try {
438
  if (!isset($data['listing']['filter']['segment'])) {
lib/AdminPages/PageRenderer.php CHANGED
@@ -6,7 +6,9 @@ use MailPoet\Config\Renderer;
6
  use MailPoet\Features\FeaturesController;
7
  use MailPoet\Referrals\ReferralDetector;
8
  use MailPoet\Settings\SettingsController;
 
9
  use MailPoet\WP\Notice as WPNotice;
 
10
 
11
  if (!defined('ABSPATH')) exit;
12
 
@@ -41,6 +43,9 @@ class PageRenderer {
41
  'referral_id' => $this->settings->get(ReferralDetector::REFERRAL_SETTING_NAME),
42
  ];
43
  try {
 
 
 
44
  echo $this->renderer->render($template, $data + $defaults);
45
  } catch (\Exception $e) {
46
  $notice = new WPNotice(WPNotice::TYPE_ERROR, $e->getMessage());
6
  use MailPoet\Features\FeaturesController;
7
  use MailPoet\Referrals\ReferralDetector;
8
  use MailPoet\Settings\SettingsController;
9
+ use MailPoet\Tracy\DIPanel\DIPanel;
10
  use MailPoet\WP\Notice as WPNotice;
11
+ use Tracy\Debugger;
12
 
13
  if (!defined('ABSPATH')) exit;
14
 
43
  'referral_id' => $this->settings->get(ReferralDetector::REFERRAL_SETTING_NAME),
44
  ];
45
  try {
46
+ if (class_exists(Debugger::class)) {
47
+ DIPanel::init();
48
+ }
49
  echo $this->renderer->render($template, $data + $defaults);
50
  } catch (\Exception $e) {
51
  $notice = new WPNotice(WPNotice::TYPE_ERROR, $e->getMessage());
lib/AdminPages/Pages/Subscribers.php CHANGED
@@ -8,6 +8,7 @@ use MailPoet\Listing\PageLimit;
8
  use MailPoet\Models\CustomField;
9
  use MailPoet\Models\Segment;
10
  use MailPoet\Services\Bridge;
 
11
  use MailPoet\Util\License\License;
12
  use MailPoet\WP\Functions as WPFunctions;
13
 
@@ -60,6 +61,8 @@ class Subscribers {
60
  $data['premium_plugin_active'] = License::getLicense();
61
  $data['mss_active'] = Bridge::isMPSendingServiceEnabled();
62
 
 
 
63
  $this->page_renderer->displayPage('subscribers/subscribers.html', $data);
64
  }
65
  }
8
  use MailPoet\Models\CustomField;
9
  use MailPoet\Models\Segment;
10
  use MailPoet\Services\Bridge;
11
+ use MailPoet\Subscribers\ConfirmationEmailMailer;
12
  use MailPoet\Util\License\License;
13
  use MailPoet\WP\Functions as WPFunctions;
14
 
61
  $data['premium_plugin_active'] = License::getLicense();
62
  $data['mss_active'] = Bridge::isMPSendingServiceEnabled();
63
 
64
+ $data['max_confirmation_emails'] = ConfirmationEmailMailer::MAX_CONFIRMATION_EMAILS;
65
+
66
  $this->page_renderer->displayPage('subscribers/subscribers.html', $data);
67
  }
68
  }
lib/DI/ContainerConfigurator.php CHANGED
@@ -169,7 +169,7 @@ class ContainerConfigurator implements IContainerConfigurator {
169
  $container->autowire(\MailPoet\Settings\SettingsController::class)->setPublic(true);
170
  // User Flags
171
  $container->autowire(\MailPoet\Settings\UserFlagsController::class);
172
- $container->autowire(\MailPoet\Settings\UserFlagsRepository::class);
173
  // Subscription
174
  $container->autowire(\MailPoet\Subscription\Captcha::class)->setPublic(true);
175
  $container->autowire(\MailPoet\Subscription\CaptchaRenderer::class)->setPublic(true);
169
  $container->autowire(\MailPoet\Settings\SettingsController::class)->setPublic(true);
170
  // User Flags
171
  $container->autowire(\MailPoet\Settings\UserFlagsController::class);
172
+ $container->autowire(\MailPoet\Settings\UserFlagsRepository::class)->setPublic(true);
173
  // Subscription
174
  $container->autowire(\MailPoet\Subscription\Captcha::class)->setPublic(true);
175
  $container->autowire(\MailPoet\Subscription\CaptchaRenderer::class)->setPublic(true);
lib/Entities/FeatureFlagEntity.php CHANGED
@@ -8,7 +8,7 @@ use MailPoet\Doctrine\EntityTraits\UpdatedAtTrait;
8
 
9
  /**
10
  * @Entity()
11
- * @Table(name="feature_flags")
12
  */
13
  class FeatureFlagEntity {
14
  use AutoincrementedIdTrait;
8
 
9
  /**
10
  * @Entity()
11
+ * @Table(name="feature_flags", uniqueConstraints={@UniqueConstraint(name="name",columns={"name"})})
12
  */
13
  class FeatureFlagEntity {
14
  use AutoincrementedIdTrait;
lib/Models/Model.php CHANGED
@@ -130,6 +130,9 @@ class Model extends \Sudzy\ValidModel {
130
  parent::__construct($validator);
131
  }
132
 
 
 
 
133
  static function create() {
134
  return parent::create();
135
  }
130
  parent::__construct($validator);
131
  }
132
 
133
+ /**
134
+ * @return bool|static
135
+ */
136
  static function create() {
137
  return parent::create();
138
  }
lib/Models/Newsletter.php CHANGED
@@ -1109,7 +1109,8 @@ class Newsletter extends Model {
1109
  ->where('tasks.status', SendingQueue::STATUS_COMPLETED)
1110
  ->whereNull('newsletters.deleted_at')
1111
  ->select('tasks.processed_at')
1112
- ->orderByDesc('tasks.processed_at');
 
1113
 
1114
  if (!empty($segment_ids)) {
1115
  $orm->join(
1109
  ->where('tasks.status', SendingQueue::STATUS_COMPLETED)
1110
  ->whereNull('newsletters.deleted_at')
1111
  ->select('tasks.processed_at')
1112
+ ->orderByDesc('tasks.processed_at')
1113
+ ->orderByAsc('tasks.id');
1114
 
1115
  if (!empty($segment_ids)) {
1116
  $orm->join(
lib/Models/NewsletterOption.php CHANGED
@@ -3,6 +3,12 @@ namespace MailPoet\Models;
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
 
 
 
 
 
 
6
  class NewsletterOption extends Model {
7
  public static $_table = MP_NEWSLETTER_OPTION_TABLE;
8
 
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
6
+ /**
7
+ * @property int $newsletter_id
8
+ * @property int $option_field_id
9
+ * @property string $value
10
+ * @property string $updated_at
11
+ */
12
  class NewsletterOption extends Model {
13
  public static $_table = MP_NEWSLETTER_OPTION_TABLE;
14
 
lib/Models/NewsletterPost.php CHANGED
@@ -3,6 +3,11 @@ namespace MailPoet\Models;
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
 
 
 
 
 
6
  class NewsletterPost extends Model {
7
  public static $_table = MP_NEWSLETTER_POSTS_TABLE;
8
 
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
6
+ /**
7
+ * @property int $newsletter_id
8
+ * @property int $post_id
9
+ * @property string $updated_at
10
+ */
11
  class NewsletterPost extends Model {
12
  public static $_table = MP_NEWSLETTER_POSTS_TABLE;
13
 
lib/Models/NewsletterSegment.php CHANGED
@@ -3,6 +3,11 @@ namespace MailPoet\Models;
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
 
 
 
 
 
6
  class NewsletterSegment extends Model {
7
  public static $_table = MP_NEWSLETTER_SEGMENT_TABLE;
8
  }
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
6
+ /**
7
+ * @property int $newsletter_id
8
+ * @property int $segment_id
9
+ * @property string $updated_at
10
+ */
11
  class NewsletterSegment extends Model {
12
  public static $_table = MP_NEWSLETTER_SEGMENT_TABLE;
13
  }
lib/Models/Segment.php CHANGED
@@ -189,11 +189,15 @@ class Segment extends Model {
189
  }
190
 
191
  static function groups() {
 
 
 
 
192
  return [
193
  [
194
  'name' => 'all',
195
  'label' => WPFunctions::get()->__('All', 'mailpoet'),
196
- 'count' => Segment::getPublished()->count(),
197
  ],
198
  [
199
  'name' => 'trash',
189
  }
190
 
191
  static function groups() {
192
+ $all_query = Segment::getPublished();
193
+ if (!Segment::shouldShowWooCommerceSegment()) {
194
+ $all_query->whereNotEqual('type', self::TYPE_WC_USERS);
195
+ }
196
  return [
197
  [
198
  'name' => 'all',
199
  'label' => WPFunctions::get()->__('All', 'mailpoet'),
200
+ 'count' => $all_query->count(),
201
  ],
202
  [
203
  'name' => 'trash',
lib/Models/StatisticsOpens.php CHANGED
@@ -3,6 +3,11 @@ namespace MailPoet\Models;
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
 
 
 
 
 
6
  class StatisticsOpens extends Model {
7
  public static $_table = MP_STATISTICS_OPENS_TABLE;
8
 
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
6
+ /**
7
+ * @property int $newsletter_id
8
+ * @property int $subscriber_id
9
+ * @property int $queue_id
10
+ */
11
  class StatisticsOpens extends Model {
12
  public static $_table = MP_STATISTICS_OPENS_TABLE;
13
 
lib/Models/StatisticsUnsubscribes.php CHANGED
@@ -3,6 +3,11 @@ namespace MailPoet\Models;
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
 
 
 
 
 
6
  class StatisticsUnsubscribes extends Model {
7
  public static $_table = MP_STATISTICS_UNSUBSCRIBES_TABLE;
8
 
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
6
+ /**
7
+ * @property int $newsletter_id
8
+ * @property int $subscriber_id
9
+ * @property int $queue_id
10
+ */
11
  class StatisticsUnsubscribes extends Model {
12
  public static $_table = MP_STATISTICS_UNSUBSCRIBES_TABLE;
13
 
lib/Models/StatsNotification.php CHANGED
@@ -2,6 +2,11 @@
2
 
3
  namespace MailPoet\Models;
4
 
 
 
 
 
 
5
  class StatsNotification extends Model {
6
  public static $_table = MP_STATS_NOTIFICATIONS_TABLE;
7
 
2
 
3
  namespace MailPoet\Models;
4
 
5
+ /**
6
+ * @property int $newsletter_id
7
+ * @property int $task_id
8
+ * @property string $updated_at
9
+ */
10
  class StatsNotification extends Model {
11
  public static $_table = MP_STATS_NOTIFICATIONS_TABLE;
12
 
lib/Models/Subscriber.php CHANGED
@@ -830,13 +830,4 @@ class Subscriber extends Model {
830
  $service = ContainerWrapper::getInstance()->get(\MailPoet\Subscribers\SubscriberActions::class);
831
  return $service->subscribe($subscriber_data, $segment_ids);
832
  }
833
-
834
- /**
835
- * @deprecated
836
- */
837
- static function bulkSendConfirmationEmail($orm) {
838
- trigger_error('Calling Subscriber::bulkSendConfirmationEmail() is deprecated and will be removed. Use MailPoet\API\MP\v1\API instead. ', E_USER_DEPRECATED);
839
- $service = ContainerWrapper::getInstance()->get(\MailPoet\Subscribers\SubscriberActions::class);
840
- return $service->bulkSendConfirmationEmail($orm);
841
- }
842
  }
830
  $service = ContainerWrapper::getInstance()->get(\MailPoet\Subscribers\SubscriberActions::class);
831
  return $service->subscribe($subscriber_data, $segment_ids);
832
  }
 
 
 
 
 
 
 
 
 
833
  }
lib/Models/SubscriberIP.php CHANGED
@@ -3,6 +3,9 @@ namespace MailPoet\Models;
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
 
 
 
6
  class SubscriberIP extends Model {
7
  public static $_table = MP_SUBSCRIBER_IPS_TABLE;
8
  }
3
 
4
  if (!defined('ABSPATH')) exit;
5
 
6
+ /**
7
+ * @property string $ip
8
+ */
9
  class SubscriberIP extends Model {
10
  public static $_table = MP_SUBSCRIBER_IPS_TABLE;
11
  }
lib/Subscribers/ImportExport/Export/Export.php CHANGED
@@ -65,7 +65,7 @@ class Export {
65
  if (is_writable($this->export_path) === false) {
66
  throw new \Exception(__('The export file could not be saved on the server.', 'mailpoet'));
67
  }
68
- if (!extension_loaded('zip')) {
69
  throw new \Exception(__('Export requires a ZIP extension to be installed on the host.', 'mailpoet'));
70
  }
71
  $callback = [
65
  if (is_writable($this->export_path) === false) {
66
  throw new \Exception(__('The export file could not be saved on the server.', 'mailpoet'));
67
  }
68
+ if (!extension_loaded('zip') && ($this->export_format_option === 'xlsx')) {
69
  throw new \Exception(__('Export requires a ZIP extension to be installed on the host.', 'mailpoet'));
70
  }
71
  $callback = [
lib/Subscribers/SubscriberActions.php CHANGED
@@ -2,7 +2,6 @@
2
 
3
  namespace MailPoet\Subscribers;
4
 
5
- use MailPoet\Listing\BulkActionFactory;
6
  use MailPoet\Models\Segment;
7
  use MailPoet\Models\Subscriber;
8
  use MailPoet\Models\SubscriberSegment;
@@ -22,9 +21,6 @@ class SubscriberActions {
22
  /** @var ConfirmationEmailMailer */
23
  private $confirmation_email_mailer;
24
 
25
- /** @var BulkActionFactory */
26
- private $bulk_action_factory;
27
-
28
  /** @var WelcomeScheduler */
29
  private $welcome_scheduler;
30
 
@@ -32,14 +28,11 @@ class SubscriberActions {
32
  SettingsController $settings,
33
  NewSubscriberNotificationMailer $new_subscriber_notification_mailer,
34
  ConfirmationEmailMailer $confirmation_email_mailer,
35
- BulkActionFactory $bulk_action_factory,
36
  WelcomeScheduler $welcome_scheduler
37
  ) {
38
  $this->settings = $settings;
39
  $this->new_subscriber_notification_mailer = $new_subscriber_notification_mailer;
40
  $this->confirmation_email_mailer = $confirmation_email_mailer;
41
- $this->bulk_action_factory = $bulk_action_factory;
42
- $this->bulk_action_factory->registerAction('\MailPoet\Models\Subscriber', 'bulkSendConfirmationEmail', $this);
43
  $this->welcome_scheduler = $welcome_scheduler;
44
  }
45
 
@@ -107,23 +100,4 @@ class SubscriberActions {
107
  return $subscriber;
108
  }
109
 
110
- function bulkSendConfirmationEmail($orm) {
111
- $subscribers = $orm
112
- ->where('status', Subscriber::STATUS_UNCONFIRMED)
113
- ->findMany();
114
-
115
- $emails_sent = 0;
116
- if (!empty($subscribers)) {
117
- foreach ($subscribers as $subscriber) {
118
- if ($this->confirmation_email_mailer->sendConfirmationEmail($subscriber)) {
119
- $emails_sent++;
120
- }
121
- }
122
- }
123
-
124
- return [
125
- 'count' => $emails_sent,
126
- ];
127
- }
128
-
129
  }
2
 
3
  namespace MailPoet\Subscribers;
4
 
 
5
  use MailPoet\Models\Segment;
6
  use MailPoet\Models\Subscriber;
7
  use MailPoet\Models\SubscriberSegment;
21
  /** @var ConfirmationEmailMailer */
22
  private $confirmation_email_mailer;
23
 
 
 
 
24
  /** @var WelcomeScheduler */
25
  private $welcome_scheduler;
26
 
28
  SettingsController $settings,
29
  NewSubscriberNotificationMailer $new_subscriber_notification_mailer,
30
  ConfirmationEmailMailer $confirmation_email_mailer,
 
31
  WelcomeScheduler $welcome_scheduler
32
  ) {
33
  $this->settings = $settings;
34
  $this->new_subscriber_notification_mailer = $new_subscriber_notification_mailer;
35
  $this->confirmation_email_mailer = $confirmation_email_mailer;
 
 
36
  $this->welcome_scheduler = $welcome_scheduler;
37
  }
38
 
100
  return $subscriber;
101
  }
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  }
lib/Subscription/CaptchaRenderer.php CHANGED
@@ -33,7 +33,7 @@ class CaptchaRenderer {
33
  'id' => 'captcha',
34
  'type' => 'text',
35
  'params' => [
36
- 'label' => $this->wp->__('Type in the input the characters you see in the picture above:', 'mailpoet'),
37
  'value' => '',
38
  'obfuscate' => false,
39
  ],
@@ -54,13 +54,30 @@ class CaptchaRenderer {
54
  );
55
 
56
  $captcha_session_form = $this->captcha_session->getFormData();
57
- $form_id = isset($captcha_session_form['form_id']) ? (int)$captcha_session_form['form_id'] : 0;
 
 
 
 
 
 
 
 
 
 
 
 
58
  $form_model = FormModel::findOne($form_id);
59
  if (!$form_model instanceof FormModel) {
60
  return false;
61
  }
62
  $form_model = $form_model->asArray();
63
 
 
 
 
 
 
64
  $form_html = '<form method="POST" ' .
65
  'action="' . admin_url('admin-post.php?action=mailpoet_subscription_form') . '" ' .
66
  'class="mailpoet_form mailpoet_captcha_form" ' .
@@ -84,11 +101,20 @@ class CaptchaRenderer {
84
  // subscription form
85
  $form_html .= FormRenderer::renderBlocks($form, $honeypot = false);
86
  $form_html .= '</div>';
87
- $form_html .= '<div class="mailpoet_message">';
88
- $form_html .= '<p class="mailpoet_validate_success" style="display:none;">' . $form_model['settings']['success_message'] . '</p>';
89
- $form_html .= '<p class="mailpoet_validate_error" style="display:none;"></p>';
90
- $form_html .= '</div>';
91
  $form_html .= '</form>';
92
  return $form_html;
93
  }
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
33
  'id' => 'captcha',
34
  'type' => 'text',
35
  'params' => [
36
+ 'label' => $this->wp->__('Type in the characters you see in the picture above:', 'mailpoet'),
37
  'value' => '',
38
  'obfuscate' => false,
39
  ],
54
  );
55
 
56
  $captcha_session_form = $this->captcha_session->getFormData();
57
+ $form_id = 0;
58
+
59
+ $show_success_message = !empty($_GET['mailpoet_success']);
60
+ $show_error_message = !empty($_GET['mailpoet_error']);
61
+
62
+ if (isset($captcha_session_form['form_id'])) {
63
+ $form_id = (int)$captcha_session_form['form_id'];
64
+ } elseif ($show_success_message) {
65
+ $form_id = (int)$_GET['mailpoet_success'];
66
+ } elseif ($show_error_message) {
67
+ $form_id = (int)$_GET['mailpoet_error'];
68
+ }
69
+
70
  $form_model = FormModel::findOne($form_id);
71
  if (!$form_model instanceof FormModel) {
72
  return false;
73
  }
74
  $form_model = $form_model->asArray();
75
 
76
+ if ($show_success_message) {
77
+ // Display a success message in a no-JS flow
78
+ return $this->renderFormMessages($form_model, $show_success_message);
79
+ }
80
+
81
  $form_html = '<form method="POST" ' .
82
  'action="' . admin_url('admin-post.php?action=mailpoet_subscription_form') . '" ' .
83
  'class="mailpoet_form mailpoet_captcha_form" ' .
101
  // subscription form
102
  $form_html .= FormRenderer::renderBlocks($form, $honeypot = false);
103
  $form_html .= '</div>';
104
+ $form_html .= $this->renderFormMessages($form_model, $show_success_message, $show_error_message);
 
 
 
105
  $form_html .= '</form>';
106
  return $form_html;
107
  }
108
+
109
+ private function renderFormMessages(
110
+ array $form_model,
111
+ $show_success_message = false,
112
+ $show_error_message = false
113
+ ) {
114
+ $form_html = '<div class="mailpoet_message">';
115
+ $form_html .= '<p class="mailpoet_validate_success" ' . ($show_success_message ? '' : ' style="display:none;"') . '>' . $form_model['settings']['success_message'] . '</p>';
116
+ $form_html .= '<p class="mailpoet_validate_error" ' . ($show_error_message ? '' : ' style="display:none;"') . '>' . $this->wp->__('The characters you entered did not match the CAPTCHA image. Please try again with this new image.', 'mailpoet') . '</p>';
117
+ $form_html .= '</div>';
118
+ return $form_html;
119
+ }
120
  }
lib/WP/Functions.php CHANGED
@@ -554,17 +554,41 @@ class Functions {
554
  return $wpdb->parse_db_host($host);
555
  } else {
556
  // Backward compatibility for WP 4.7 and 4.8
557
- $port = 3306;
558
  $socket = null;
559
- // Peel off the port parameter
560
- if (preg_match('/(?=:\d+$)/', $host)) {
561
- list($host, $port) = explode(':', $host);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
  }
563
- // Peel off the socket parameter
564
- if (preg_match('/:\//', $host)) {
565
- list($host, $socket) = explode(':', $host);
 
 
 
 
 
 
 
 
 
 
566
  }
567
- return [$host, $port, $socket, false];
568
  }
569
  }
570
 
554
  return $wpdb->parse_db_host($host);
555
  } else {
556
  // Backward compatibility for WP 4.7 and 4.8
557
+ $port = null;
558
  $socket = null;
559
+ $is_ipv6 = false;
560
+
561
+ // First peel off the socket parameter from the right, if it exists.
562
+ $socket_pos = strpos( $host, ':/' );
563
+ if ($socket_pos !== false) {
564
+ $socket = substr($host, $socket_pos + 1);
565
+ $host = substr($host, 0, $socket_pos);
566
+ }
567
+
568
+ // We need to check for an IPv6 address first.
569
+ // An IPv6 address will always contain at least two colons.
570
+ if (substr_count( $host, ':' ) > 1) {
571
+ $pattern = '#^(?:\[)?(?P<host>[0-9a-fA-F:]+)(?:\]:(?P<port>[\d]+))?#';
572
+ $is_ipv6 = true;
573
+ } else {
574
+ // We seem to be dealing with an IPv4 address.
575
+ $pattern = '#^(?P<host>[^:/]*)(?::(?P<port>[\d]+))?#';
576
  }
577
+
578
+ $matches = [];
579
+ $result = preg_match($pattern, $host, $matches);
580
+ if (1 !== $result) {
581
+ // Couldn't parse the address, bail.
582
+ return false;
583
+ }
584
+
585
+ $host = '';
586
+ foreach (['host', 'port'] as $component) {
587
+ if (!empty($matches[$component])) {
588
+ $$component = $matches[$component];
589
+ }
590
  }
591
+ return [$host, $port, $socket, $is_ipv6];
592
  }
593
  }
594
 
lib/WooCommerce/Subscription.php CHANGED
@@ -86,6 +86,7 @@ class Subscription {
86
  $subscriber,
87
  [$wc_segment->id]
88
  );
 
89
  return false;
90
  }
91
 
@@ -105,4 +106,12 @@ class Subscription {
105
 
106
  return true;
107
  }
 
 
 
 
 
 
 
 
108
  }
86
  $subscriber,
87
  [$wc_segment->id]
88
  );
89
+ $this->updateSubscriberStatus($subscriber);
90
  return false;
91
  }
92
 
106
 
107
  return true;
108
  }
109
+
110
+ private function updateSubscriberStatus(Subscriber $subscriber) {
111
+ $segmentsCount = $subscriber->segments()->count();
112
+ if (!$segmentsCount) {
113
+ $subscriber->status = Subscriber::STATUS_UNSUBSCRIBED;
114
+ $subscriber->save();
115
+ }
116
+ }
117
  }
mailpoet.php CHANGED
@@ -4,7 +4,7 @@ if (!defined('ABSPATH')) exit;
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (New)
7
- * Version: 3.35.3
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
10
  * Author: MailPoet
@@ -18,7 +18,7 @@ if (!defined('ABSPATH')) exit;
18
  */
19
 
20
  $mailpoet_plugin = array(
21
- 'version' => '3.35.3',
22
  'filename' => __FILE__,
23
  'path' => dirname(__FILE__),
24
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (New)
7
+ * Version: 3.35.4
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
10
  * Author: MailPoet
18
  */
19
 
20
  $mailpoet_plugin = array(
21
+ 'version' => '3.35.4',
22
  'filename' => __FILE__,
23
  'path' => dirname(__FILE__),
24
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
mailpoet_initializer.php CHANGED
@@ -12,8 +12,21 @@ $tracy_path = __DIR__ . '/tools/tracy.phar';
12
  if (WP_DEBUG && PHP_VERSION_ID >= 70100 && file_exists($tracy_path)) {
13
  require_once $tracy_path;
14
 
15
- if (getenv('MAILPOET_TEST_TRACY_MODE')) {
16
- Debugger::enable(Debugger::PRODUCTION, __DIR__ . '/tests/_output/exceptions');
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  Debugger::$logSeverity = E_ALL & ~E_USER_NOTICE;
18
  } else {
19
  function render_tracy() {
12
  if (WP_DEBUG && PHP_VERSION_ID >= 70100 && file_exists($tracy_path)) {
13
  require_once $tracy_path;
14
 
15
+ if (getenv('MAILPOET_TRACY_PRODUCTION_MODE')) {
16
+ $log_dir = getenv('MAILPOET_TRACY_LOG_DIR');
17
+ if (!$log_dir) {
18
+ throw new RuntimeException("Environment variable 'MAILPOET_TRACY_LOG_DIR' was not set.");
19
+ }
20
+
21
+ if (!is_dir($log_dir)) {
22
+ @mkdir($log_dir, 0777, true);
23
+ }
24
+
25
+ if (!is_writable($log_dir)) {
26
+ throw new RuntimeException("Logging directory '$log_dir' is not writable.'");
27
+ }
28
+
29
+ Debugger::enable(Debugger::PRODUCTION, $log_dir);
30
  Debugger::$logSeverity = E_ALL & ~E_USER_NOTICE;
31
  } else {
32
  function render_tracy() {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mailpoet, wysija
3
  Tags: email marketing, newsletter, newsletter subscribers, email, welcome email, post notification, WooCommerce emails, newsletter builder, email automation
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
- Stable tag: 3.35.3
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -147,6 +147,13 @@ Stop by our [support site](https://www.mailpoet.com/support).
147
 
148
  == Changelog ==
149
 
 
 
 
 
 
 
 
150
  = 3.35.3 - 2019-09-04 =
151
  * Improved: sent Post Notification UI now allows deleting sent Post Notifications;
152
  * Improved: translation logic;
3
  Tags: email marketing, newsletter, newsletter subscribers, email, welcome email, post notification, WooCommerce emails, newsletter builder, email automation
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
+ Stable tag: 3.35.4
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
147
 
148
  == Changelog ==
149
 
150
+ = 3.35.4 - 2019-09-10 =
151
+ * Improved: resend confirmation emails is now on a subscriber by subscriber basis;
152
+ * Fixed: CSV export no longers require the ZIP extension;
153
+ * Fixed: WooCommerce list counted in List Listings bulk action UI when list is hidden;
154
+ * Fixed: captcha success not being displayed;
155
+ * Fixed: global subscription status for WooCommerce users.
156
+
157
  = 3.35.3 - 2019-09-04 =
158
  * Improved: sent Post Notification UI now allows deleting sent Post Notifications;
159
  * Improved: translation logic;
vendor-prefixed/autoload.php CHANGED
@@ -4,4 +4,4 @@ namespace MailPoetVendor;
4
 
5
  // autoload.php @generated by Composer
6
  require_once __DIR__ . '/composer/autoload_real.php';
7
- return \MailPoetVendor\ComposerAutoloaderInit01f4dda4de338aaa2edbf43aed628bb2::getLoader();
4
 
5
  // autoload.php @generated by Composer
6
  require_once __DIR__ . '/composer/autoload_real.php';
7
+ return \MailPoetVendor\ComposerAutoloaderInit23a14e887f1af79472aff5c3e9cbf02e::getLoader();
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/CacheLoggerChain.php CHANGED
@@ -31,7 +31,7 @@ use MailPoetVendor\Doctrine\ORM\Cache\QueryCacheKey;
31
  class CacheLoggerChain implements \MailPoetVendor\Doctrine\ORM\Cache\Logging\CacheLogger
32
  {
33
  /**
34
- * @var array<\Doctrine\ORM\Cache\Logging\CacheLogger>
35
  */
36
  private $loggers = array();
37
  /**
31
  class CacheLoggerChain implements \MailPoetVendor\Doctrine\ORM\Cache\Logging\CacheLogger
32
  {
33
  /**
34
+ * @var array<\MailPoetVendor\Doctrine\ORM\Cache\Logging\CacheLogger>
35
  */
36
  private $loggers = array();
37
  /**
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverride.php CHANGED
@@ -39,7 +39,7 @@ final class AssociationOverride implements \MailPoetVendor\Doctrine\ORM\Mapping\
39
  /**
40
  * The join column that is being mapped to the persistent attribute.
41
  *
42
- * @var array<\Doctrine\ORM\Mapping\JoinColumn>
43
  */
44
  public $joinColumns;
45
  /**
39
  /**
40
  * The join column that is being mapped to the persistent attribute.
41
  *
42
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\JoinColumn>
43
  */
44
  public $joinColumns;
45
  /**
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverrides.php CHANGED
@@ -33,7 +33,7 @@ final class AssociationOverrides implements \MailPoetVendor\Doctrine\ORM\Mapping
33
  /**
34
  * Mapping overrides of relationship properties.
35
  *
36
- * @var array<\Doctrine\ORM\Mapping\AssociationOverride>
37
  */
38
  public $value;
39
  }
33
  /**
34
  * Mapping overrides of relationship properties.
35
  *
36
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\AssociationOverride>
37
  */
38
  public $value;
39
  }
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/AttributeOverrides.php CHANGED
@@ -33,7 +33,7 @@ final class AttributeOverrides implements \MailPoetVendor\Doctrine\ORM\Mapping\A
33
  /**
34
  * One or more field or property mapping overrides.
35
  *
36
- * @var array<\Doctrine\ORM\Mapping\AttributeOverride>
37
  */
38
  public $value;
39
  }
33
  /**
34
  * One or more field or property mapping overrides.
35
  *
36
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\AttributeOverride>
37
  */
38
  public $value;
39
  }
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityResult.php CHANGED
@@ -42,7 +42,7 @@ final class EntityResult implements \MailPoetVendor\Doctrine\ORM\Mapping\Annotat
42
  /**
43
  * Maps the columns specified in the SELECT list of the query to the properties or fields of the entity class.
44
  *
45
- * @var array<\Doctrine\ORM\Mapping\FieldResult>
46
  */
47
  public $fields = array();
48
  /**
42
  /**
43
  * Maps the columns specified in the SELECT list of the query to the properties or fields of the entity class.
44
  *
45
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\FieldResult>
46
  */
47
  public $fields = array();
48
  /**
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinColumns.php CHANGED
@@ -26,7 +26,7 @@ namespace MailPoetVendor\Doctrine\ORM\Mapping;
26
  final class JoinColumns implements \MailPoetVendor\Doctrine\ORM\Mapping\Annotation
27
  {
28
  /**
29
- * @var array<\Doctrine\ORM\Mapping\JoinColumn>
30
  */
31
  public $value;
32
  }
26
  final class JoinColumns implements \MailPoetVendor\Doctrine\ORM\Mapping\Annotation
27
  {
28
  /**
29
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\JoinColumn>
30
  */
31
  public $value;
32
  }
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinTable.php CHANGED
@@ -34,11 +34,11 @@ final class JoinTable implements \MailPoetVendor\Doctrine\ORM\Mapping\Annotation
34
  */
35
  public $schema;
36
  /**
37
- * @var array<\Doctrine\ORM\Mapping\JoinColumn>
38
  */
39
  public $joinColumns = array();
40
  /**
41
- * @var array<\Doctrine\ORM\Mapping\JoinColumn>
42
  */
43
  public $inverseJoinColumns = array();
44
  }
34
  */
35
  public $schema;
36
  /**
37
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\JoinColumn>
38
  */
39
  public $joinColumns = array();
40
  /**
41
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\JoinColumn>
42
  */
43
  public $inverseJoinColumns = array();
44
  }
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedNativeQueries.php CHANGED
@@ -34,7 +34,7 @@ final class NamedNativeQueries implements \MailPoetVendor\Doctrine\ORM\Mapping\A
34
  /**
35
  * One or more NamedNativeQuery annotations.
36
  *
37
- * @var array<\Doctrine\ORM\Mapping\NamedNativeQuery>
38
  */
39
  public $value = array();
40
  }
34
  /**
35
  * One or more NamedNativeQuery annotations.
36
  *
37
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\NamedNativeQuery>
38
  */
39
  public $value = array();
40
  }
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedQueries.php CHANGED
@@ -26,7 +26,7 @@ namespace MailPoetVendor\Doctrine\ORM\Mapping;
26
  final class NamedQueries implements \MailPoetVendor\Doctrine\ORM\Mapping\Annotation
27
  {
28
  /**
29
- * @var array<\Doctrine\ORM\Mapping\NamedQuery>
30
  */
31
  public $value;
32
  }
26
  final class NamedQueries implements \MailPoetVendor\Doctrine\ORM\Mapping\Annotation
27
  {
28
  /**
29
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\NamedQuery>
30
  */
31
  public $value;
32
  }
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMapping.php CHANGED
@@ -40,13 +40,13 @@ final class SqlResultSetMapping implements \MailPoetVendor\Doctrine\ORM\Mapping\
40
  /**
41
  * Specifies the result set mapping to entities.
42
  *
43
- * @var array<\Doctrine\ORM\Mapping\EntityResult>
44
  */
45
  public $entities = array();
46
  /**
47
  * Specifies the result set mapping to scalar values.
48
  *
49
- * @var array<\Doctrine\ORM\Mapping\ColumnResult>
50
  */
51
  public $columns = array();
52
  }
40
  /**
41
  * Specifies the result set mapping to entities.
42
  *
43
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\EntityResult>
44
  */
45
  public $entities = array();
46
  /**
47
  * Specifies the result set mapping to scalar values.
48
  *
49
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\ColumnResult>
50
  */
51
  public $columns = array();
52
  }
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMappings.php CHANGED
@@ -34,7 +34,7 @@ final class SqlResultSetMappings implements \MailPoetVendor\Doctrine\ORM\Mapping
34
  /**
35
  * One or more SqlResultSetMapping annotations.
36
  *
37
- * @var array<\Doctrine\ORM\Mapping\SqlResultSetMapping>
38
  */
39
  public $value = array();
40
  }
34
  /**
35
  * One or more SqlResultSetMapping annotations.
36
  *
37
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\SqlResultSetMapping>
38
  */
39
  public $value = array();
40
  }
vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/Table.php CHANGED
@@ -34,11 +34,11 @@ final class Table implements \MailPoetVendor\Doctrine\ORM\Mapping\Annotation
34
  */
35
  public $schema;
36
  /**
37
- * @var array<\Doctrine\ORM\Mapping\Index>
38
  */
39
  public $indexes;
40
  /**
41
- * @var array<\Doctrine\ORM\Mapping\UniqueConstraint>
42
  */
43
  public $uniqueConstraints;
44
  /**
34
  */
35
  public $schema;
36
  /**
37
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\Index>
38
  */
39
  public $indexes;
40
  /**
41
+ * @var array<\MailPoetVendor\Doctrine\ORM\Mapping\UniqueConstraint>
42
  */
43
  public $uniqueConstraints;
44
  /**
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit9ad2897ee173a62a7affa0e9ae3b2927::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit5e59ea9135ab6179daabb65460d0aa2c::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit9ad2897ee173a62a7affa0e9ae3b2927
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit9ad2897ee173a62a7affa0e9ae3b2927
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit9ad2897ee173a62a7affa0e9ae3b2927', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit9ad2897ee173a62a7affa0e9ae3b2927', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit9ad2897ee173a62a7affa0e9ae3b2927::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit9ad2897ee173a62a7affa0e9ae3b2927
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit9ad2897ee173a62a7affa0e9ae3b2927::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire9ad2897ee173a62a7affa0e9ae3b2927($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire9ad2897ee173a62a7affa0e9ae3b2927($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit5e59ea9135ab6179daabb65460d0aa2c
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit5e59ea9135ab6179daabb65460d0aa2c', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit5e59ea9135ab6179daabb65460d0aa2c', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit5e59ea9135ab6179daabb65460d0aa2c::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit5e59ea9135ab6179daabb65460d0aa2c::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire5e59ea9135ab6179daabb65460d0aa2c($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire5e59ea9135ab6179daabb65460d0aa2c($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit9ad2897ee173a62a7affa0e9ae3b2927
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@@ -1314,10 +1314,10 @@ class ComposerStaticInit9ad2897ee173a62a7affa0e9ae3b2927
1314
  public static function getInitializer(ClassLoader $loader)
1315
  {
1316
  return \Closure::bind(function () use ($loader) {
1317
- $loader->prefixLengthsPsr4 = ComposerStaticInit9ad2897ee173a62a7affa0e9ae3b2927::$prefixLengthsPsr4;
1318
- $loader->prefixDirsPsr4 = ComposerStaticInit9ad2897ee173a62a7affa0e9ae3b2927::$prefixDirsPsr4;
1319
- $loader->fallbackDirsPsr4 = ComposerStaticInit9ad2897ee173a62a7affa0e9ae3b2927::$fallbackDirsPsr4;
1320
- $loader->classMap = ComposerStaticInit9ad2897ee173a62a7affa0e9ae3b2927::$classMap;
1321
 
1322
  }, null, ClassLoader::class);
1323
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit5e59ea9135ab6179daabb65460d0aa2c
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
1314
  public static function getInitializer(ClassLoader $loader)
1315
  {
1316
  return \Closure::bind(function () use ($loader) {
1317
+ $loader->prefixLengthsPsr4 = ComposerStaticInit5e59ea9135ab6179daabb65460d0aa2c::$prefixLengthsPsr4;
1318
+ $loader->prefixDirsPsr4 = ComposerStaticInit5e59ea9135ab6179daabb65460d0aa2c::$prefixDirsPsr4;
1319
+ $loader->fallbackDirsPsr4 = ComposerStaticInit5e59ea9135ab6179daabb65460d0aa2c::$fallbackDirsPsr4;
1320
+ $loader->classMap = ComposerStaticInit5e59ea9135ab6179daabb65460d0aa2c::$classMap;
1321
 
1322
  }, null, ClassLoader::class);
1323
  }
views/newsletters.html CHANGED
@@ -395,10 +395,18 @@
395
  <% block after_javascript %>
396
  <% if settings.show_intro %>
397
  <script>
398
- HS.beacon.ready(function () {
399
- document.querySelector('#hs-beacon iframe').classList.add('mailpoet-chat');
400
- MailPoet.showIntro();
401
- });
 
 
 
 
 
 
 
 
402
  </script>
403
  <% endif %>
404
  <% endblock %>
395
  <% block after_javascript %>
396
  <% if settings.show_intro %>
397
  <script>
398
+ const initIntro = () => {
399
+ const beacon = document.querySelector('#beacon-container iframe');
400
+ if (beacon) {
401
+ beacon.classList.add('mailpoet-chat');
402
+ MailPoet.showIntro();
403
+ } else {
404
+ setTimeout(initIntro, 200);
405
+ }
406
+ };
407
+ document.addEventListener('DOMContentLoaded', function(){
408
+ initIntro();
409
+ }, false);
410
  </script>
411
  <% endif %>
412
  <% endblock %>
views/subscribers/importExport/export.html CHANGED
@@ -69,7 +69,7 @@
69
  value="csv"
70
  checked><%= __('CSV file') %>
71
  </label>
72
- &nbsp;
73
  <label>
74
  <input type="radio" name="option_format"
75
  value="xlsx" <%if not zipExtensionLoaded %> disabled="disabled" <%endif%>><%= __('Excel file') %>
69
  value="csv"
70
  checked><%= __('CSV file') %>
71
  </label>
72
+ &nbsp;<br>
73
  <label>
74
  <input type="radio" name="option_format"
75
  value="xlsx" <%if not zipExtensionLoaded %> disabled="disabled" <%endif%>><%= __('Excel file') %>
views/subscribers/subscribers.html CHANGED
@@ -10,6 +10,7 @@
10
  var mailpoet_month_names = <%= json_encode(month_names) %>;
11
  var mailpoet_date_formats = <%= json_encode(date_formats) %>;
12
  var mailpoet_premium_active = <%= json_encode(premium_plugin_active) %>;
 
13
  var mss_active = <%= json_encode(mss_active) %>;
14
  </script>
15
  <% endblock %>
@@ -84,7 +85,7 @@
84
  'removeFromAllLists': __('Remove from all lists'),
85
  'multipleSubscribersRemovedFromAllLists': __('%$1d subscribers were removed from all lists.'),
86
  'resendConfirmationEmail': __('Resend confirmation email'),
87
- 'multipleConfirmationEmailsSent': __('%$1d confirmation emails have been sent.'),
88
  'listsToWhichSubscriberWasSubscribed': __('Lists to which the subscriber was subscribed.'),
89
  'WPUsersSegment': __('WordPress Users'),
90
  'WPUserEditNotice': __('This subscriber is a registered WordPress user. [link]Edit his/her profile[/link] to change his/her email.'),
10
  var mailpoet_month_names = <%= json_encode(month_names) %>;
11
  var mailpoet_date_formats = <%= json_encode(date_formats) %>;
12
  var mailpoet_premium_active = <%= json_encode(premium_plugin_active) %>;
13
+ var mailpoet_max_confirmation_emails = <%= max_confirmation_emails %>;
14
  var mss_active = <%= json_encode(mss_active) %>;
15
  </script>
16
  <% endblock %>
85
  'removeFromAllLists': __('Remove from all lists'),
86
  'multipleSubscribersRemovedFromAllLists': __('%$1d subscribers were removed from all lists.'),
87
  'resendConfirmationEmail': __('Resend confirmation email'),
88
+ 'oneConfirmationEmailSent': __('1 confirmation email has been sent.'),
89
  'listsToWhichSubscriberWasSubscribed': __('Lists to which the subscriber was subscribed.'),
90
  'WPUsersSegment': __('WordPress Users'),
91
  'WPUserEditNotice': __('This subscriber is a registered WordPress user. [link]Edit his/her profile[/link] to change his/her email.'),