diff --git a/public/grapejs/dist/js/grapesjs-mjml-custom.min.js b/public/grapejs/dist/js/grapesjs-mjml-custom.min.js
index 5d338f14..b535b789 100644
--- a/public/grapejs/dist/js/grapesjs-mjml-custom.min.js
+++ b/public/grapejs/dist/js/grapesjs-mjml-custom.min.js
@@ -31,4 +31,4 @@ t.extract=function extract(e){for(var t=0,r=[],n="",i=0,a=e.length;i"']/g,J=RegExp($.source),Q=RegExp(Y.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,vt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bt=/[\\^$.*+?()[\]{}|]/g,nr=RegExp(Bt.source),en=/^\s+|\s+$/g,tn=/^\s+/,rn=/\s+$/,nn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,on=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,un=/\\(\\)?/g,cn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ln=/\w*$/,fn=/^[-+]0x[0-9a-f]+$/i,dn=/^0b[01]+$/i,pn=/^\[object .+?Constructor\]$/,hn=/^0o[0-7]+$/i,gn=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_n=/($^)/,mn=/['\n\r\u2028\u2029\\]/g,yn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",vn="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+yn,wn=RegExp("['’]","g"),xn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Sn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+yn,"g"),kn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",vn].join("|"),"g"),jn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Dn={};Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=!0,Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object Boolean]"]=Dn["[object DataView]"]=Dn["[object Date]"]=Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object WeakMap]"]=!1;var Bn={};Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object DataView]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object Symbol]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=!0,Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object WeakMap]"]=!1;var Pn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},In=parseFloat,Ln=parseInt,zn="object"==typeof w&&w&&w.Object===Object&&w,Wn="object"==typeof self&&self&&self.Object===Object&&self,Hn=zn||Wn||Function("return this")(),Vn=E&&!E.nodeType&&E,Kn=Vn&&"object"==typeof T&&T&&!T.nodeType&&T,Gn=Kn&&Kn.exports===Vn,$n=Gn&&zn.process,Yn=function(){try{var e=Kn&&Kn.f&&Kn.f("util").types;return e||$n&&$n.binding&&$n.binding("util")}catch(e){}}(),Jn=Yn&&Yn.isArrayBuffer,Xn=Yn&&Yn.isDate,ei=Yn&&Yn.isMap,ti=Yn&&Yn.isRegExp,ri=Yn&&Yn.isSet,ni=Yn&&Yn.isTypedArray,ii=b("length"),ai=x({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),oi=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),si=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ui=function x(T){function An(e){if(yu(e)&&!co(e)&&!(e instanceof Un)){if(e instanceof On)return e;if(li.call(e,"__wrapped__"))return Fe(e)}return new On(e)}function En(){}function On(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=N}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function _t(e,t,n,i,a,o){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=a?n(e,i,a,o):n(e)),s!==N)return s;if(!du(e))return e;if(i=co(e)){if(s=function me(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&li.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Ur(e,s)}else{var f=ya(e),d="[object Function]"==f||"[object GeneratorFunction]"==f;if(fo(e))return Ir(e,u);if("[object Object]"==f||"[object Arguments]"==f||d&&!a){if(s=c||d?{}:Ae(e),!u)return c?function Mr(e,t){return Cr(e,ma(e),t)}(e,function lt(e,t){return e&&Cr(t,Bu(t),e)}(s,e)):function Dr(e,t){return Cr(e,_a(e),t)}(e,at(s,e))}else{if(!Bn[f])return a?e:{};s=function Ee(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Rr(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return t=r?Rr(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return zr(e,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return(t=new e.constructor(e.source,ln.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return new n;case"[object Symbol]":return aa?zn(aa.call(e)):{}}}(e,f,u)}}if(o||(o=new Zn),a=o.get(e))return a;o.set(e,s),bo(e)?e.forEach((function(r){s.add(_t(r,t,n,r,e,o))})):ho(e)&&e.forEach((function(r,i){s.set(i,_t(r,t,n,i,e,o))}));c=l?c?ve:_e:c?Bu:Wu;var p=i?N:c(e);return r(p||e,(function(r,i){p&&(r=e[i=r]),ot(s,i,_t(r,t,n,i,e,o))})),s}function gt(e,t,r){var n=r.length;if(null==e)return!n;for(e=zn(e);n--;){var i=r[n],a=t[i],o=e[i];if(o===N&&!(i in e)||!a(o))return!1}return!0}function dt(e,t,r){if("function"!=typeof e)throw new Kn("Expected a function");return xa((function(){e.apply(N,r)}),t)}function yt(e,t,r,n){var i=-1,a=o,s=!0,u=e.length,l=[],d=t.length;if(!u)return l;r&&(t=c(t,k(r))),n?(a=f,s=!1):200<=t.length&&(a=O,s=!1,t=new Nn(t));e:for(;++it}function Rt(e,t){return null!=e&&li.call(e,t)}function zt(e,t){return null!=e&&t in zn(e)}function Wt(e,t,r){for(var n=r?f:o,i=e[0].length,a=e.length,s=a,u=P(a),l=1/0,d=[];s--;){var p=e[s];s&&t&&(p=c(p,k(t))),l=Fi(p.length,l),u[s]=!r&&(t||120<=i&&120<=p.length)?new Nn(s&&p):N}p=e[0];var h=-1,g=u[0];e:for(;++h(t=Sr(t,e)).length?e:kt(e,hr(t,0,-1)))?e:e[Me(Ve(t))])?N:n(t,e,r)}function Ut(e){return yu(e)&&"[object Arguments]"==Ot(e)}function Mt(e,t,r,n,i){if(e===t)t=!0;else if(null==e||null==t||!yu(e)&&!yu(t))t=e!=e&&t!=t;else e:{var a,o,s=co(e),u=co(t),c="[object Object]"==(a="[object Arguments]"==(a=s?"[object Array]":ya(e))?"[object Object]":a);u="[object Object]"==(o="[object Arguments]"==(o=u?"[object Array]":ya(t))?"[object Object]":o);if((o=a==o)&&fo(e)){if(!fo(t)){t=!1;break e}s=!0,c=!1}if(o&&!c)i||(i=new Zn),t=s||_o(e)?se(e,t,r,n,Mt,i):function he(e,t,r,n,i,a,o){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new yi(e),new yi(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return lu(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=W;case"[object Set]":if(s||(s=U),e.size!=t.size&&!(1&n))break;return(r=o.get(e))?r==t:(n|=2,o.set(e,t),t=se(s(e),s(t),n,i,a,o),o.delete(e),t);case"[object Symbol]":if(aa)return aa.call(e)==aa.call(t)}return!1}(e,t,a,r,n,Mt,i);else{if(!(1&r)&&(s=c&&li.call(e,"__wrapped__"),a=u&&li.call(t,"__wrapped__"),s||a)){e=s?e.value():e,t=a?t.value():t,i||(i=new Zn),t=Mt(e,t,r,n,i);break e}if(o)t:if(i||(i=new Zn),s=1&r,a=_e(e),u=a.length,o=_e(t).length,u==o||s){for(c=u;c--;){var l=a[c];if(!(s?l in t:li.call(t,l))){t=!1;break t}}if((o=i.get(e))&&i.get(t))t=o==t;else{o=!0,i.set(e,t),i.set(t,e);for(var f=s;++ct?r:0,r)?e[t]:N}function Xt(e,t,r){var n=-1;return t=c(t.length?t:[$u],k(ye())),function w(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].c;return e}(e=Gt(e,(function(e){return{a:c(t,(function(t){return t(e)})),b:++n,c:e}})),(function(e,t){var n;e:{n=-1;for(var i=e.a,a=t.a,o=i.length,s=r.length;++n=s?u:u*("desc"==r[n]?-1:1);break e}}n=e.b-t.b}return n}))}function tr(e,t,r){for(var n=-1,i=t.length,a={};++nt||9007199254740991t&&(t=-t>i?0:i+t),0>(r=r>i?i:r)&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0,r=P(i);++n=i){for(;n>>1,o=e[a];null!==o&&!wu(o)&&(r?o<=t:o(t=Sr(t,e)).length?e:kt(e,hr(t,0,-1)))||delete e[Me(Ve(t))]}function jr(e,t,r,n){for(var i=e.length,a=n?i:-1;(n?a--:++an)return n?br(e[0]):[];for(var i=-1,a=P(n);++i=n?e:hr(e,t,r)}function Ir(e,t){if(t)return e.slice();var r=e.length;r=vi?vi(r):new e.constructor(r);return e.copy(r),r}function Rr(e){var t=new e.constructor(e.byteLength);return new yi(t).set(new yi(e)),t}function zr(e,t){return new e.constructor(t?Rr(e.buffer):e.buffer,e.byteOffset,e.length)}function Wr(e,t){if(e!==t){var r=e!==N,n=null===e,i=e==e,a=wu(e),o=t!==N,s=null===t,u=t==t,c=wu(t);if(!s&&!c&&!a&&e>t||a&&o&&u&&!s&&!c||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!c&&ei?N:a,i=1),t=zn(t);++na&&o[0]!==c&&o[a-1]!==c?[]:L(o,c)).length)r?r?or(t,e):t:(r=or(t,Ri(e/D(t))),jn.test(t)?Or(M(r),0,e).join(""):r.slice(0,e))}function te(e,t,r,a){var o=1&t,s=Vr(e);return function i(){for(var t=-1,u=arguments.length,c=-1,l=a.length,f=P(l+u),d=this&&this!==Hn&&this instanceof i?s:e;++ct||n)&&(1&e&&(a[2]=d[2],t|=1&r?0:4),(r=d[3])&&(n=a[3],a[3]=n?Br(n,r,d[4]):r,a[4]=n?L(a[3],"__lodash_placeholder__"):d[4]),(r=d[5])&&(n=a[5],a[5]=n?Lr(n,r,d[6]):r,a[6]=n?L(a[5],"__lodash_placeholder__"):d[6]),(r=d[7])&&(a[7]=r),128&e&&(a[8]=null==a[8]?d[8]:Fi(a[8],d[8])),null==a[9]&&(a[9]=d[9]),a[0]=d[0],a[1]=t),e=a[0],t=a[1],r=a[2],n=a[3],i=a[4],!(s=a[9]=a[9]===N?u?0:e.length:qi(a[9]-c,0))&&24&t&&(t&=-25),Ue((d?da:wa)(t&&1!=t?8==t||16==t?Kr(e,t,s):32!=t&&33!=t||i.length?Jr.apply(N,a):te(e,t,r,n):function Pr(t,r,n){var i=1&r,a=Vr(t);return function e(){return(this&&this!==Hn&&this instanceof e?a:t).apply(i?n:this,arguments)}}(e,t,r),a),e,t)}function ce(e,t,r,n){return e===N||lu(e,Yn[r])&&!li.call(n,r)?t:e}function ae(e,t,r,n,i,a){return du(e)&&du(t)&&(a.set(t,e),Yt(e,t,N,ae,a),a.delete(t)),e}function le(e){return xu(e)?N:e}function se(e,t,r,n,i,a){var o=1&r,s=e.length;if(s!=(u=t.length)&&!(o&&u>s))return!1;if((u=a.get(e))&&a.get(t))return u==t;var u=-1,c=!0,l=2&r?new Nn:N;for(a.set(e,t),a.set(t,e);++u(r=null==r?0:Eu(r))&&(r=qi(n+r,0)),_(e,ye(t,3),r)):-1}function Pe(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==N&&(i=Eu(r),i=0>r?qi(n+i,0):Fi(i,n-1)),_(e,ye(t,3),i,!0)}function Ze(e){return null!=e&&e.length?wt(e,1):[]}function qe(e){return e&&e.length?e[0]:N}function Ve(e){var t=null==e?0:e.length;return t?e[t-1]:N}function Ke(e,t){return e&&e.length&&t&&t.length?er(e,t):e}function Ge(e){return null==e?e:Hi.call(e)}function He(e){if(!e||!e.length)return[];var t=0;return e=i(e,(function(e){if(hu(e))return t=qi(e.length,t),!0})),A(t,(function(t){return c(e,b(t))}))}function Je(e,t){if(!e||!e.length)return[];var r=He(e);return null==t?r:c(r,(function(e){return n(t,N,e)}))}function Ye(e){return(e=An(e)).__chain__=!0,e}function Qe(e,t){return t(e)}function nu(e,t){return(co(e)?r:ua)(e,ye(t,3))}function tu(t,r){return(co(t)?e:ca)(t,ye(r,3))}function ru(e,t){return(co(e)?c:Gt)(e,ye(t,3))}function eu(e,t,r){return t=r?N:t,t=e&&null==t?e.length:t,fe(e,128,N,N,N,N,t)}function uu(e,t){var r;if("function"!=typeof t)throw new Kn("Expected a function");return e=Eu(e),function(){return 0<--e&&(r=t.apply(this,arguments)),1>=e&&(t=N),r}}function fu(t,r,n){function e(e){var r=a,n=s;return a=s=N,h=e,l=t.apply(n,r)}function u(e){var t=e-p;return e-=h,p===N||t>=r||0>t||b&&e>=c}function i(){var e=Qa();if(u(e))return o(e);var t,n=xa;t=e-h,e=r-(e-p),t=b?Fi(e,c-t):e,d=n(i,t)}function o(t){return d=N,_&&a?e(t):(a=s=N,l)}function f(){var t=Qa(),n=u(t);if(a=arguments,s=this,p=t,n){if(d===N)return h=t=p,d=xa(i,r),g?e(t):l;if(b)return ha(d),d=xa(i,r),e(p)}return d===N&&(d=xa(i,r)),l}var a,s,c,l,d,p,h=0,g=!1,b=!1,_=!0;if("function"!=typeof t)throw new Kn("Expected a function");return r=Su(r)||0,du(n)&&(g=!!n.leading,c=(b="maxWait"in n)?qi(Su(n.maxWait)||0,r):c,_="trailing"in n?!!n.trailing:_),f.cancel=function(){d!==N&&ha(d),h=0,a=p=s=d=N},f.flush=function(){return d===N?l:o(Qa())},f}function cu(e,t){function r(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;return a.has(i)?a.get(i):(n=e.apply(this,n),r.cache=a.set(i,n)||a,n)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Kn("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(e){if("function"!=typeof e)throw new Kn("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function lu(e,t){return e===t||e!=e&&t!=t}function su(e){return null!=e&&gu(e.length)&&!_u(e)}function hu(e){return yu(e)&&su(e)}function pu(e){if(!yu(e))return!1;var t=Ot(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!xu(e)}function _u(e){return!!du(e)&&("[object Function]"==(e=Ot(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function vu(e){return"number"==typeof e&&e==Eu(e)}function gu(e){return"number"==typeof e&&-1=e}function du(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function yu(e){return null!=e&&"object"==typeof e}function bu(e){return"number"==typeof e||yu(e)&&"[object Number]"==Ot(e)}function xu(e){return!(!yu(e)||"[object Object]"!=Ot(e))&&(null===(e=wi(e))||"function"==typeof(e=li.call(e,"constructor")&&e.constructor)&&e instanceof e&&ci.call(e)==hi)}function ju(e){return"string"==typeof e||!co(e)&&yu(e)&&"[object String]"==Ot(e)}function wu(e){return"symbol"==typeof e||yu(e)&&"[object Symbol]"==Ot(e)}function mu(e){if(!e)return[];if(su(e))return ju(e)?M(e):Ur(e);if(Ei&&e[Ei]){e=e[Ei]();for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}return("[object Map]"==(t=ya(e))?W:"[object Set]"==t?U:Uu)(e)}function Au(e){return e?(e=Su(e))===q||e===-q?17976931348623157e292*(0>e?-1:1):e==e?e:0:0===e?e:0}function Eu(e){var t=(e=Au(e))%1;return e==e?t?e-t:e:0}function ku(e){return e?pt(Eu(e),0,4294967295):0}function Su(e){if("number"==typeof e)return e;if(wu(e))return F;if(du(e)&&(e=du(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(en,"");var t=dn.test(e);return t||hn.test(e)?Ln(e.slice(2),t?2:8):fn.test(e)?F:+e}function Ou(e){return Cr(e,Bu(e))}function Iu(e){return null==e?"":yr(e)}function Ru(e,t,r){return(e=null==e?N:kt(e,t))===N?r:e}function zu(e,t){return null!=e&&we(e,t,zt)}function Wu(e){return su(e)?qn(e):Vt(e)}function Bu(e){if(su(e))e=qn(e,!0);else if(du(e)){var t,r=ze(e),n=[];for(t in e)("constructor"!=t||!r&&li.call(e,t))&&n.push(t);e=n}else{if(t=[],null!=e)for(r in zn(e))t.push(r);e=t}return e}function Lu(e,t){if(null==e)return{};var r=c(ve(e),(function(e){return[e]}));return t=ye(t),tr(e,r,(function(e,r){return t(e,r[0])}))}function Uu(e){return null==e?[]:S(e,Wu(e))}function Cu(e){return Wo(Iu(e).toLowerCase())}function Du(e){return(e=Iu(e))&&e.replace(bn,ai).replace(xn,"")}function Mu(e,t,r){return e=Iu(e),(t=r?N:t)===N?Cn.test(e)?e.match(kn)||[]:e.match(sn)||[]:e.match(t)||[]}function Tu(e){return function(){return e}}function $u(e){return e}function Fu(e){return qt("function"==typeof e?e:_t(e,1))}function Nu(e,t,n){var i=Wu(t),o=Et(t,i);null!=n||du(t)&&(o.length||!i.length)||(n=t,t=e,e=this,o=Et(t,Wu(t)));var s=!(du(n)&&"chain"in n&&!n.chain),u=_u(e);return r(o,(function(r){var n=t[r];e[r]=n,u&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,a([this.value()],arguments))})})),e}function Pu(){}function Zu(e){return Ie(e)?b(Me(e)):function rr(e){return function(t){return kt(t,e)}}(e)}function qu(){return[]}function Vu(){return!1}var P=(T=null==T?Hn:ui.defaults(Hn.Object(),T,ui.pick(Hn,Rn))).Array,yn=T.Date,vn=T.Error,Sn=T.Function,Pn=T.Math,zn=T.Object,Wn=T.RegExp,Vn=T.String,Kn=T.TypeError,$n=P.prototype,Yn=zn.prototype,ii=T["__core-js_shared__"],ci=Sn.prototype.toString,li=Yn.hasOwnProperty,fi=0,di=function(){var e=/[^.]+$/.exec(ii&&ii.keys&&ii.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pi=Yn.toString,hi=ci.call(zn),gi=Hn._,bi=Wn("^"+ci.call(li).replace(Bt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_i=Gn?T.Buffer:N,mi=T.Symbol,yi=T.Uint8Array,vi=_i?_i.g:N,wi=B(zn.getPrototypeOf,zn),xi=zn.create,Si=Yn.propertyIsEnumerable,Ai=$n.splice,ki=mi?mi.isConcatSpreadable:N,Ei=mi?mi.iterator:N,ji=mi?mi.toStringTag:N,Oi=function(){try{var e=je(zn,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ci=T.clearTimeout!==Hn.clearTimeout&&T.clearTimeout,Mi=yn&&yn.now!==Hn.Date.now&&yn.now,Ti=T.setTimeout!==Hn.setTimeout&&T.setTimeout,Ri=Pn.ceil,Di=Pn.floor,Bi=zn.getOwnPropertySymbols,Pi=_i?_i.isBuffer:N,Ii=T.isFinite,Li=$n.join,Ni=B(zn.keys,zn),qi=Pn.max,Fi=Pn.min,Ui=yn.now,zi=T.parseInt,Wi=Pn.random,Hi=$n.reverse,Vi=je(T,"DataView"),Ki=je(T,"Map"),Gi=je(T,"Promise"),$i=je(T,"Set"),Yi=je(T,"WeakMap"),Ji=je(zn,"create"),Qi=Yi&&new Yi,Zi={},Xi=Te(Vi),ea=Te(Ki),ta=Te(Gi),ra=Te($i),na=Te(Yi),ia=mi?mi.prototype:N,aa=ia?ia.valueOf:N,oa=ia?ia.toString:N,sa=function(){function n(){}return function(e){return du(e)?xi?xi(e):(n.prototype=e,e=new n,n.prototype=N,e):{}}}();An.templateSettings={escape:Z,evaluate:X,interpolate:tt,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=sa(En.prototype),On.prototype.constructor=On,Un.prototype=sa(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Ji?Ji(null):{},this.size=0},Mn.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Mn.prototype.get=function(e){var t=this.__data__;return Ji?"__lodash_hash_undefined__"===(e=t[e])?N:e:li.call(t,e)?t[e]:N},Mn.prototype.has=function(e){var t=this.__data__;return Ji?t[e]!==N:li.call(t,e)},Mn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ji&&t===N?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(e){var t=this.__data__;return!(0>(e=ft(t,e))||(e==t.length-1?t.pop():Ai.call(t,e,1),--this.size,0))},Tn.prototype.get=function(e){var t=this.__data__;return 0>(e=ft(t,e))?N:t[e][1]},Tn.prototype.has=function(e){return-1n?(++this.size,r.push([e,t])):r[n][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ki||Tn),string:new Mn}},Fn.prototype.delete=function(e){return e=be(this,e).delete(e),this.size-=e?1:0,e},Fn.prototype.get=function(e){return be(this,e).get(e)},Fn.prototype.has=function(e){return be(this,e).has(e)},Fn.prototype.set=function(e,t){var r=be(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Nn.prototype.add=Nn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Tn){var n=r.__data__;if(!Ki||199>n.length)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Fn(n)}return r.set(e,t),this.size=r.size,this};var ua=Fr(mt),ca=Fr(At,!0),la=Nr(),fa=Nr(!0),da=Qi?function(e,t){return Qi.set(e,t),e}:$u,pa=Oi?function(e,t){return Oi(e,"toString",{configurable:!0,enumerable:!1,value:Tu(t),writable:!0})}:$u,ha=Ci||function(e){return Hn.clearTimeout(e)},ga=$i&&1/U(new $i([,-0]))[1]==q?function(e){return new $i(e)}:Pu,ba=Qi?function(e){return Qi.get(e)}:Pu,_a=Bi?function(e){return null==e?[]:(e=zn(e),i(Bi(e),(function(t){return Si.call(e,t)})))}:qu,ma=Bi?function(e){for(var t=[];e;)a(t,_a(e)),e=wi(e);return t}:qu,ya=Ot;(Vi&&"[object DataView]"!=ya(new Vi(new ArrayBuffer(1)))||Ki&&"[object Map]"!=ya(new Ki)||Gi&&"[object Promise]"!=ya(Gi.resolve())||$i&&"[object Set]"!=ya(new $i)||Yi&&"[object WeakMap]"!=ya(new Yi))&&(ya=function(e){var t=Ot(e);if(e=(e="[object Object]"==t?e.constructor:N)?Te(e):"")switch(e){case Xi:return"[object DataView]";case ea:return"[object Map]";case ta:return"[object Promise]";case ra:return"[object Set]";case na:return"[object WeakMap]"}return t});var va=ii?_u:Vu,wa=Ce(da),xa=Ti||function(e,t){return Hn.setTimeout(e,t)},Sa=Ce(pa),Aa=function(e){var t=(e=cu(e,(function(e){return 500===t.size&&t.clear(),e}))).cache;return e}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(vt,(function(e,r,n,i){t.push(n?i.replace(un,"$1"):r||e)})),t})),ka=fr((function(e,t){return hu(e)?yt(e,wt(t,1,hu,!0)):[]})),Ea=fr((function(e,t){var r=Ve(t);return hu(r)&&(r=N),hu(e)?yt(e,wt(t,1,hu,!0),ye(r,2)):[]})),ja=fr((function(e,t){var r=Ve(t);return hu(r)&&(r=N),hu(e)?yt(e,wt(t,1,hu,!0),N,r):[]})),Oa=fr((function(e){var t=c(e,Er);return t.length&&t[0]===e[0]?Wt(t):[]})),Ca=fr((function(e){var t=Ve(e),r=c(e,Er);return t===Ve(r)?t=N:r.pop(),r.length&&r[0]===e[0]?Wt(r,ye(t,2)):[]})),Ma=fr((function(e){var t=Ve(e),r=c(e,Er);return(t="function"==typeof t?t:N)&&r.pop(),r.length&&r[0]===e[0]?Wt(r,N,t):[]})),Ta=fr(Ke),Ra=pe((function(e,t){var r=null==e?0:e.length,n=ht(e,t);return ur(e,c(t,(function(e){return Se(e,r)?+e:e})).sort(Wr)),n})),Da=fr((function(e){return br(wt(e,1,hu,!0))})),Ba=fr((function(e){var t=Ve(e);return hu(t)&&(t=N),br(wt(e,1,hu,!0),ye(t,2))})),Pa=fr((function(e){var t="function"==typeof(t=Ve(e))?t:N;return br(wt(e,1,hu,!0),N,t)})),Ia=fr((function(e,t){return hu(e)?yt(e,t):[]})),La=fr((function(e){return mr(i(e,hu))})),Na=fr((function(e){var t=Ve(e);return hu(t)&&(t=N),mr(i(e,hu),ye(t,2))})),qa=fr((function(e){var t="function"==typeof(t=Ve(e))?t:N;return mr(i(e,hu),N,t)})),Fa=fr(He),Ua=fr((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:N)?(e.pop(),t):N;return Je(e,t)})),za=pe((function(e){function t(t){return ht(t,e)}var r=e.length,n=r?e[0]:0,i=this.__wrapped__;return!(1=t})),uo=Ut(function(){return arguments}())?Ut:function(e){return yu(e)&&li.call(e,"callee")&&!Si.call(e,"callee")},co=P.isArray,lo=Jn?k(Jn):function Ct(e){return yu(e)&&"[object ArrayBuffer]"==Ot(e)},fo=Pi||Vu,po=Xn?k(Xn):function Dt(e){return yu(e)&&"[object Date]"==Ot(e)},ho=ei?k(ei):function Tt(e){return yu(e)&&"[object Map]"==ya(e)},go=ti?k(ti):function Nt(e){return yu(e)&&"[object RegExp]"==Ot(e)},bo=ri?k(ri):function Pt(e){return yu(e)&&"[object Set]"==ya(e)},_o=ni?k(ni):function Zt(e){return yu(e)&&gu(e.length)&&!!Dn[Ot(e)]},mo=ee(Kt),yo=ee((function(e,t){return e<=t})),vo=$r((function(e,t){if(ze(t)||su(t))Cr(t,Wu(t),e);else for(var r in t)li.call(t,r)&&ot(e,r,t[r])})),wo=$r((function(e,t){Cr(t,Bu(t),e)})),xo=$r((function(e,t,r,n){Cr(t,Bu(t),e,n)})),So=$r((function(e,t,r,n){Cr(t,Wu(t),e,n)})),Ao=pe(ht),ko=fr((function(e,t){e=zn(e);var r=-1,n=t.length;for((i=2--e)return t.apply(this,arguments)}},An.ary=eu,An.assign=vo,An.assignIn=wo,An.assignInWith=xo,An.assignWith=So,An.at=Ao,An.before=uu,An.bind=Za,An.bindAll=Vo,An.bindKey=Xa,An.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return co(e)?e:[e]},An.chain=Ye,An.chunk=function(e,t,r){if(t=(r?Oe(e,t,r):t===N)?1:qi(Eu(t),0),!(r=null==e?0:e.length)||1>t)return[];for(var n=0,i=0,a=P(Ri(r/t));n(t=r||t===N?1:Eu(t))?0:t,n):[]},An.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?hr(e,0,0>(t=n-(t=r||t===N?1:Eu(t)))?0:t):[]},An.dropRightWhile=function(e,t){return e&&e.length?jr(e,ye(t,3),!0,!0):[]},An.dropWhile=function(e,t){return e&&e.length?jr(e,ye(t,3),!0):[]},An.fill=function(e,t,r,n){var i=null==e?0:e.length;if(!i)return[];for(r&&"number"!=typeof r&&Oe(e,t,r)&&(r=0,n=i),i=e.length,0>(r=Eu(r))&&(r=-r>i?0:i+r),0>(n=n===N||n>i?i:Eu(n))&&(n+=i),n=r>n?0:ku(n);r>>0)?(e=Iu(e))&&("string"==typeof t||null!=t&&!go(t))&&(!(t=yr(t))&&jn.test(e))?Or(M(e),0,r):e.split(t,r):[]},An.spread=function(e,t){if("function"!=typeof e)throw new Kn("Expected a function");return t=null==t?0:qi(Eu(t),0),fr((function(r){var i=r[t];return r=Or(r,0,t),i&&a(r,i),n(e,this,r)}))},An.tail=function(e){var t=null==e?0:e.length;return t?hr(e,1,t):[]},An.take=function(e,t,r){return e&&e.length?hr(e,0,0>(t=r||t===N?1:Eu(t))?0:t):[]},An.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?hr(e,0>(t=n-(t=r||t===N?1:Eu(t)))?0:t,n):[]},An.takeRightWhile=function(e,t){return e&&e.length?jr(e,ye(t,3),!1,!0):[]},An.takeWhile=function(e,t){return e&&e.length?jr(e,ye(t,3)):[]},An.tap=function(e,t){return t(e),e},An.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Kn("Expected a function");return du(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),fu(e,t,{leading:n,maxWait:t,trailing:i})},An.thru=Qe,An.toArray=mu,An.toPairs=Bo,An.toPairsIn=Po,An.toPath=function(e){return co(e)?c(e,Me):wu(e)?[e]:Ur(Aa(Iu(e)))},An.toPlainObject=Ou,An.transform=function(e,t,n){var i=co(e),a=i||fo(e)||_o(e);if(t=ye(t,4),null==n){var o=e&&e.constructor;n=a?i?new o:[]:du(e)&&_u(o)?sa(wi(e)):{}}return(a?r:mt)(e,(function(e,r,i){return t(n,e,r,i)})),n},An.unary=function(e){return eu(e,1)},An.union=Da,An.unionBy=Ba,An.unionWith=Pa,An.uniq=function(e){return e&&e.length?br(e):[]},An.uniqBy=function(e,t){return e&&e.length?br(e,ye(t,2)):[]},An.uniqWith=function(e,t){return t="function"==typeof t?t:N,e&&e.length?br(e,N,t):[]},An.unset=function(e,t){return null==e||xr(e,t)},An.unzip=He,An.unzipWith=Je,An.update=function(e,t,r){return null==e?e:lr(e,t,kr(r)(kt(e,t)),void 0)},An.updateWith=function(e,t,r,n){return n="function"==typeof n?n:N,null!=e&&(e=lr(e,t,kr(r)(kt(e,t)),n)),e},An.values=Uu,An.valuesIn=function(e){return null==e?[]:S(e,Bu(e))},An.without=Ia,An.words=Mu,An.wrap=function(e,t){return no(kr(t),e)},An.xor=La,An.xorBy=Na,An.xorWith=qa,An.zip=Fa,An.zipObject=function(e,t){return Ar(e||[],t||[],ot)},An.zipObjectDeep=function(e,t){return Ar(e||[],t||[],lr)},An.zipWith=Ua,An.entries=Bo,An.entriesIn=Po,An.extend=wo,An.extendWith=xo,Nu(An,An),An.add=ts,An.attempt=Ho,An.camelCase=Io,An.capitalize=Cu,An.ceil=rs,An.clamp=function(e,t,r){return r===N&&(r=t,t=N),r!==N&&(r=(r=Su(r))==r?r:0),t!==N&&(t=(t=Su(t))==t?t:0),pt(Su(e),t,r)},An.clone=function(e){return _t(e,4)},An.cloneDeep=function(e){return _t(e,5)},An.cloneDeepWith=function(e,t){return _t(e,5,t="function"==typeof t?t:N)},An.cloneWith=function(e,t){return _t(e,4,t="function"==typeof t?t:N)},An.conformsTo=function(e,t){return null==t||gt(e,t,Wu(t))},An.deburr=Du,An.defaultTo=function(e,t){return null==e||e!=e?t:e},An.divide=ns,An.endsWith=function(e,t,r){e=Iu(e),t=yr(t);var n=e.length;n=r=r===N?n:pt(Eu(r),0,n);return 0<=(r-=t.length)&&e.slice(r,n)==t},An.eq=lu,An.escape=function(e){return(e=Iu(e))&&Q.test(e)?e.replace(Y,oi):e},An.escapeRegExp=function(e){return(e=Iu(e))&&nr.test(e)?e.replace(Bt,"\\$&"):e},An.every=function(e,t,r){var n=co(e)?u:bt;return r&&Oe(e,t,r)&&(t=N),n(e,ye(t,3))},An.find=Ha,An.findIndex=Ne,An.findKey=function(e,t){return p(e,ye(t,3),mt)},An.findLast=Va,An.findLastIndex=Pe,An.findLastKey=function(e,t){return p(e,ye(t,3),At)},An.floor=is,An.forEach=nu,An.forEachRight=tu,An.forIn=function(e,t){return null==e?e:la(e,ye(t,3),Bu)},An.forInRight=function(e,t){return null==e?e:fa(e,ye(t,3),Bu)},An.forOwn=function(e,t){return e&&mt(e,ye(t,3))},An.forOwnRight=function(e,t){return e&&At(e,ye(t,3))},An.get=Ru,An.gt=oo,An.gte=so,An.has=function(e,t){return null!=e&&we(e,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(e,t,r,n){return e=su(e)?e:Uu(e),r=r&&!n?Eu(r):0,n=e.length,0>r&&(r=qi(n+r,0)),ju(e)?r<=n&&-1(r=null==r?0:Eu(r))&&(r=qi(n+r,0)),v(e,t,r)):-1},An.inRange=function(e,t,r){return t=Au(t),r===N?(r=t,t=0):r=Au(r),(e=Su(e))>=Fi(t,r)&&e=e},An.isSet=bo,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_o,An.isUndefined=function(e){return e===N},An.isWeakMap=function(e){return yu(e)&&"[object WeakMap]"==ya(e)},An.isWeakSet=function(e){return yu(e)&&"[object WeakSet]"==Ot(e)},An.join=function(e,t){return null==e?"":Li.call(e,t)},An.kebabCase=Lo,An.last=Ve,An.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;if(r!==N&&(i=0>(i=Eu(r))?qi(n+i,0):Fi(i,n-1)),t==t){for(r=i+1;r--&&e[r]!==t;);e=r}else e=_(e,d,i,!0);return e},An.lowerCase=No,An.lowerFirst=qo,An.lt=mo,An.lte=yo,An.max=function(e){return e&&e.length?xt(e,$u,It):N},An.maxBy=function(e,t){return e&&e.length?xt(e,ye(t,2),It):N},An.mean=function(e){return y(e,$u)},An.meanBy=function(e,t){return y(e,ye(t,2))},An.min=function(e){return e&&e.length?xt(e,$u,Kt):N},An.minBy=function(e,t){return e&&e.length?xt(e,ye(t,2),Kt):N},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){return""},An.stubTrue=function(){return!0},An.multiply=as,An.nth=function(e,t){return e&&e.length?Qt(e,Eu(t)):N},An.noConflict=function(){return Hn._===this&&(Hn._=gi),this},An.noop=Pu,An.now=Qa,An.pad=function(e,t,r){e=Iu(e);var n=(t=Eu(t))?D(e):0;return!t||n>=t?e:ne(Di(t=(t-n)/2),r)+e+ne(Ri(t),r)},An.padEnd=function(e,t,r){e=Iu(e);var n=(t=Eu(t))?D(e):0;return t&&nt){var n=e;e=t,t=n}return r||e%1||t%1?(r=Wi(),Fi(e+r*(t-e+In("1e-"+((r+"").length-1))),t)):ir(e,t)},An.reduce=function(e,t,r){var n=co(e)?l:j,i=3>arguments.length;return n(e,ye(t,4),r,i,ua)},An.reduceRight=function(e,t,r){var n=co(e)?s:j,i=3>arguments.length;return n(e,ye(t,4),r,i,ca)},An.repeat=function(e,t,r){return t=(r?Oe(e,t,r):t===N)?1:Eu(t),or(Iu(e),t)},An.replace=function(){var e=arguments,t=Iu(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},An.result=function(e,t,r){var n=-1,i=(t=Sr(t,e)).length;for(i||(i=1,e=N);++n(e=Eu(e))||9007199254740991=a)return e;if(1>(a=r-D(n)))return n;if(r=o?Or(o,0,a).join(""):e.slice(0,a),i===N)return r+n;if(o&&(a+=r.length-a),go(i)){if(e.slice(a).search(i)){var s=r;for(i.global||(i=Wn(i.source,Iu(ln.exec(i))+"g")),i.lastIndex=0;o=i.exec(s);)var u=o.index;r=r.slice(0,u===N?a:u)}}else e.indexOf(yr(i),a)!=a&&(-1<(i=r.lastIndexOf(i))&&(r=r.slice(0,i)));return r+n},An.unescape=function(e){return(e=Iu(e))&&J.test(e)?e.replace($,si):e},An.uniqueId=function(e){var t=++fi;return Iu(e)+t},An.upperCase=zo,An.upperFirst=Wo,An.each=nu,An.eachRight=tu,An.first=qe,Nu(An,function(){var e={};return mt(An,(function(t,r){li.call(An.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),An.VERSION="4.17.15",r("bind bindKey curry curryRight partial partialRight".split(" "),(function(e){An[e].placeholder=An})),r(["drop","take"],(function(e,t){Un.prototype[e]=function(r){r=r===N?1:qi(Eu(r),0);var n=this.__filtered__&&!t?new Un(this):this.clone();return n.__filtered__?n.__takeCount__=Fi(r,n.__takeCount__):n.__views__.push({size:Fi(r,4294967295),type:e+(0>n.__dir__?"Right":"")}),n},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),r(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ye(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),r(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Un.prototype[e]=function(){return this[r](1).value()[0]}})),r(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[r](1)}})),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=fr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(r){return Lt(r,e,t)}))})),Un.prototype.reject=function(e){return this.filter(au(ye(e)))},Un.prototype.slice=function(e,t){e=Eu(e);var r=this;return r.__filtered__&&(0t)?new Un(r):(0>e?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==N&&(r=0>(t=Eu(t))?r.dropRight(-t):r.take(t-e)),r)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,(function(e,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),i=/^(?:head|last)$/.test(r),o=An[i?"take"+("last"==r?"Right":""):r],s=i||/^find/.test(r);o&&(An.prototype[r]=function(){function t(e){return e=o.apply(An,a([e],u)),i&&d?e[0]:e}var r=this.__wrapped__,u=i?[1]:arguments,c=r instanceof Un,l=u[0],f=c||co(r);f&&n&&"function"==typeof l&&1!=l.length&&(c=f=!1);var d=this.__chain__,p=!!this.__actions__.length;l=s&&!d,c=c&&!p;return!s&&f?(r=c?r:new Un(this),(r=e.apply(r,u)).__actions__.push({func:Qe,args:[t],thisArg:N}),new On(r,d)):l&&c?e.apply(this,u):(r=this.thru(t),l?i?r.value()[0]:r.value():r)})})),r("pop push shift sort splice unshift".split(" "),(function(e){var t=$n[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);An.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(co(i)?i:[],e)}return this[r]((function(r){return t.apply(co(r)?r:[],e)}))}})),mt(Un.prototype,(function(e,t){var r=An[t];if(r){var n=r.name+"";li.call(Zi,n)||(Zi[n]=[]),Zi[n].push({name:t,func:r})}})),Zi[Jr(N,2).name]=[{name:"wrapper",func:N}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ur(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ur(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ur(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e,t=this.__wrapped__.value(),r=this.__dir__,n=co(t),i=0>r,a=n?t.length:0;e=a;for(var o=this.__views__,s=0,u=-1,c=o.length;++u=this.__values__.length;return{done:e,value:e?N:this.__values__[this.__index__++]}},An.prototype.plant=function(e){for(var t,r=this;r instanceof En;){var n=Fe(r);n.__index__=0,n.__values__=N,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},An.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof Un?(this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:Qe,args:[Ge],thisArg:N}),new On(e,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,Ei&&(An.prototype[Ei]=function Xe(){return this}),An}();Hn._=ui,void 0===(P=function(){return ui}.call(E,C,E,T))||(T.exports=P)}).call(this)}).call(this,C(8),C(18)(w))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4)),l=r(7),f=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var d=(i=n=function(e){function MjButton(){return(0,o.default)(this,MjButton),(0,u.default)(this,(MjButton.__proto__||(0,a.default)(MjButton)).apply(this,arguments))}return(0,c.default)(MjButton,e),(0,s.default)(MjButton,[{key:"getStyles",value:function getStyles(){return{table:{"border-collapse":"separate",width:this.getAttribute("width"),"line-height":"100%"},td:{border:this.getAttribute("border"),"border-bottom":this.getAttribute("border-bottom"),"border-left":this.getAttribute("border-left"),"border-radius":this.getAttribute("border-radius"),"border-right":this.getAttribute("border-right"),"border-top":this.getAttribute("border-top"),cursor:"auto","font-style":this.getAttribute("font-style"),height:this.getAttribute("height"),"mso-padding-alt":this.getAttribute("inner-padding"),"text-align":this.getAttribute("text-align"),background:this.getAttribute("background-color")},content:{display:"inline-block",width:this.calculateAWidth(this.getAttribute("width")),background:this.getAttribute("background-color"),color:this.getAttribute("color"),"font-family":this.getAttribute("font-family"),"font-size":this.getAttribute("font-size"),"font-style":this.getAttribute("font-style"),"font-weight":this.getAttribute("font-weight"),"line-height":this.getAttribute("line-height"),margin:"0","text-decoration":this.getAttribute("text-decoration"),"text-transform":this.getAttribute("text-transform"),padding:this.getAttribute("inner-padding"),"mso-padding-alt":"0px","border-radius":this.getAttribute("border-radius")}}}},{key:"calculateAWidth",value:function calculateAWidth(e){if(!e)return null;var t=(0,f.default)(e),r=t.parsedWidth;if("px"!==t.unit)return null;var n=this.getBoxWidths().borders;return r-(this.getShorthandAttrValue("inner-padding","left")+this.getShorthandAttrValue("inner-padding","right"))-n+"px"}},{key:"render",value:function render(){var e=this.getAttribute("href")?"a":"p";return"\n \n \n \n <"+e+"\n "+this.htmlAttributes({href:this.getAttribute("href"),rel:this.getAttribute("rel"),name:this.getAttribute("name"),style:"content",target:"a"===e?this.getAttribute("target"):void 0})+"\n >\n "+this.getContent()+"\n "+e+">\n | \n
\n
\n "}}]),MjButton}(l.BodyComponent),n.endingTag=!0,n.allowedAttributes={align:"enum(left,center,right)","background-color":"color","border-bottom":"string","border-left":"string","border-radius":"string","border-right":"string","border-top":"string",border:"string",color:"color","container-background-color":"color","font-family":"string","font-size":"unit(px)","font-style":"string","font-weight":"string",height:"unit(px,%)",href:"string",name:"string","inner-padding":"unit(px,%){1,4}","line-height":"unit(px,%,)","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}",rel:"string",target:"string","text-decoration":"string","text-transform":"string","vertical-align":"enum(top,bottom,middle)","text-align":"enum(left,right,center)",width:"unit(px,%)"},n.defaultAttributes={align:"center","background-color":"#414141",border:"none","border-radius":"3px",color:"#ffffff","font-family":"Ubuntu, Helvetica, Arial, sans-serif","font-size":"13px","font-weight":"normal","inner-padding":"10px 25px","line-height":"120%",padding:"10px 25px",target:"_blank","text-decoration":"none","text-transform":"none","vertical-align":"middle"},i);t.default=d,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(15)),o=_interopRequireDefault(r(2)),s=_interopRequireDefault(r(1)),u=_interopRequireDefault(r(6)),c=_interopRequireDefault(r(3)),l=_interopRequireDefault(r(4)),f=r(7),d=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=(i=n=function(e){function MjColumn(){return(0,s.default)(this,MjColumn),(0,c.default)(this,(MjColumn.__proto__||(0,o.default)(MjColumn)).apply(this,arguments))}return(0,l.default)(MjColumn,e),(0,u.default)(MjColumn,[{key:"getChildContext",value:function getChildContext(){var e=this.context.containerWidth,t=this.props.nonRawSiblings,r=this.getBoxWidths(),n=r.borders,i=r.paddings+n,o=this.getAttribute("width")||parseFloat(e)/t+"px",s=(0,d.default)(o,{parseFloatToInt:!1}),u=s.unit,c=s.parsedWidth;return o="%"===u?parseFloat(e)*c/100-i+"px":c-i+"px",(0,a.default)({},this.context,{containerWidth:o})}},{key:"getStyles",value:function getStyles(){var e={"background-color":this.getAttribute("background-color"),border:this.getAttribute("border"),"border-bottom":this.getAttribute("border-bottom"),"border-left":this.getAttribute("border-left"),"border-radius":this.getAttribute("border-radius"),"border-right":this.getAttribute("border-right"),"border-top":this.getAttribute("border-top"),"vertical-align":this.getAttribute("vertical-align")};return{div:{"font-size":"0px","text-align":"left",direction:this.getAttribute("direction"),display:"inline-block","vertical-align":this.getAttribute("vertical-align"),width:this.getMobileWidth()},table:(0,a.default)({},this.hasGutter()?{}:e),tdOutlook:{"vertical-align":this.getAttribute("vertical-align"),width:this.getWidthAsPixel()},gutter:(0,a.default)({},e,{padding:this.getAttribute("padding"),"padding-top":this.getAttribute("padding-top"),"padding-right":this.getAttribute("padding-right"),"padding-bottom":this.getAttribute("padding-bottom"),"padding-left":this.getAttribute("padding-left")})}}},{key:"getMobileWidth",value:function getMobileWidth(){var e=this.context.containerWidth,t=this.props.nonRawSiblings,r=this.getAttribute("width");if("mobileWidth"!==this.getAttribute("mobileWidth"))return"100%";if(void 0===r)return parseInt(100/t,10)+"%";var n=(0,d.default)(r,{parseFloatToInt:!1}),i=n.unit,a=n.parsedWidth;switch(i){case"%":return r;case"px":default:return a/parseInt(e,10)+"%"}}},{key:"getWidthAsPixel",value:function getWidthAsPixel(){var e=this.context.containerWidth,t=(0,d.default)(this.getParsedWidth(!0),{parseFloatToInt:!1}),r=t.unit,n=t.parsedWidth;return"%"===r?parseFloat(e)*n/100+"px":n+"px"}},{key:"getParsedWidth",value:function getParsedWidth(e){var t=this.props.nonRawSiblings,r=this.getAttribute("width")||100/t+"%",n=(0,d.default)(r,{parseFloatToInt:!1}),i=n.unit,a=n.parsedWidth;return e?""+a+i:{unit:i,parsedWidth:a}}},{key:"getColumnClass",value:function getColumnClass(){var e=this.context.addMediaQuery,t="",r=this.getParsedWidth(),n=r.parsedWidth,i=r.unit,a=n.toString().replace(".","-");switch(i){case"%":t="mj-column-per-"+a;break;case"px":default:t="mj-column-px-"+a}return e(t,{parsedWidth:n,unit:i}),t}},{key:"hasGutter",value:function hasGutter(){var e=this;return["padding","padding-bottom","padding-left","padding-right","padding-top"].some((function(t){return null!=e.getAttribute(t)}))}},{key:"renderGutter",value:function renderGutter(){return"\n \n \n \n \n "+this.renderColumn()+"\n | \n
\n \n
\n "}},{key:"renderColumn",value:function renderColumn(){var e=this.props.children;return"\n \n "+this.renderChildren(e,{renderer:function renderer(e){return e.constructor.isRawElement()?e.render():"\n \n \n "+e.render()+"\n | \n
\n "}})+"\n
\n "}},{key:"render",value:function render(){var e=this.getColumnClass()+" mj-outlook-group-fix";return this.getAttribute("css-class")&&(e+=" "+this.getAttribute("css-class")),"\n \n "+(this.hasGutter()?this.renderGutter():this.renderColumn())+"\n
\n "}}]),MjColumn}(f.BodyComponent),n.allowedAttributes={"background-color":"color",border:"string","border-bottom":"string","border-left":"string","border-radius":"unit(px,%){1,4}","border-right":"string","border-top":"string",direction:"enum(ltr,rtl)","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}","vertical-align":"enum(top,bottom,middle)",width:"unit(px,%)"},n.defaultAttributes={direction:"ltr","vertical-align":"top"},i);t.default=p,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(15)),o=_interopRequireDefault(r(2)),s=_interopRequireDefault(r(1)),u=_interopRequireDefault(r(6)),c=_interopRequireDefault(r(3)),l=_interopRequireDefault(r(4)),f=r(7),d=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=(i=n=function(e){function MjDivider(){return(0,s.default)(this,MjDivider),(0,c.default)(this,(MjDivider.__proto__||(0,o.default)(MjDivider)).apply(this,arguments))}return(0,l.default)(MjDivider,e),(0,u.default)(MjDivider,[{key:"getStyles",value:function getStyles(){var e=this,t={"border-top":["style","width","color"].map((function(t){return e.getAttribute("border-"+t)})).join(" "),"font-size":1,margin:"0px auto",width:this.getAttribute("width")};return{p:t,outlook:(0,a.default)({},t,{width:this.getOutlookWidth()})}}},{key:"getOutlookWidth",value:function getOutlookWidth(){var e=this.context.containerWidth,t=this.getShorthandAttrValue("padding","left")+this.getShorthandAttrValue("padding","right"),r=this.getAttribute("width"),n=(0,d.default)(r),i=n.parsedWidth;switch(n.unit){case"%":return parseInt(e,10)*parseInt(i,10)/100-t+"px";case"px":return r;default:return parseInt(e,10)-t+"px"}}},{key:"renderAfter",value:function renderAfter(){return"\n \x3c!--[if mso | IE]>\n \n \n
\n "+this.renderAfter()+"\n "}}]),MjDivider}(f.BodyComponent),n.tagOmission=!0,n.allowedAttributes={"border-color":"color","border-style":"string","border-width":"unit(px)","container-background-color":"color",padding:"unit(px,%){1,4}","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",width:"unit(px,%)"},n.defaultAttributes={"border-color":"#000000","border-style":"solid","border-width":"4px",padding:"10px 25px",width:"100%"},i);t.default=p,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(15)),o=_interopRequireDefault(r(2)),s=_interopRequireDefault(r(1)),u=_interopRequireDefault(r(6)),c=_interopRequireDefault(r(3)),l=_interopRequireDefault(r(4)),f=r(7),d=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=(i=n=function(e){function MjGroup(){return(0,s.default)(this,MjGroup),(0,c.default)(this,(MjGroup.__proto__||(0,o.default)(MjGroup)).apply(this,arguments))}return(0,l.default)(MjGroup,e),(0,u.default)(MjGroup,[{key:"getChildContext",value:function getChildContext(){var e=this.context.containerWidth,t=this.props,r=t.nonRawSiblings,n=t.children,i=this.getShorthandAttrValue("padding","left")+this.getShorthandAttrValue("padding","right"),o=this.getAttribute("width")||parseFloat(e)/r+"px",s=(0,d.default)(o,{parseFloatToInt:!1}),u=s.unit,c=s.parsedWidth;return o="%"===u?parseFloat(e)*c/100-i+"px":c-i+"px",(0,a.default)({},this.context,{containerWidth:o,nonRawSiblings:n.length})}},{key:"getStyles",value:function getStyles(){return{div:{"font-size":"0","line-height":"0","text-align":"left",display:"inline-block",width:"100%",direction:this.getAttribute("direction"),"vertical-align":this.getAttribute("vertical-align"),"background-color":this.getAttribute("background-color")},tdOutlook:{"vertical-align":this.getAttribute("vertical-align"),width:this.getWidthAsPixel()}}}},{key:"getParsedWidth",value:function getParsedWidth(e){var t=this.props.nonRawSiblings,r=this.getAttribute("width")||100/t+"%",n=(0,d.default)(r,{parseFloatToInt:!1}),i=n.unit,a=n.parsedWidth;return e?""+a+i:{unit:i,parsedWidth:a}}},{key:"getWidthAsPixel",value:function getWidthAsPixel(){var e=this.context.containerWidth,t=(0,d.default)(this.getParsedWidth(!0),{parseFloatToInt:!1}),r=t.unit,n=t.parsedWidth;return"%"===r?parseFloat(e)*n/100+"px":n+"px"}},{key:"getColumnClass",value:function getColumnClass(){var e=this.context.addMediaQuery,t="",r=this.getParsedWidth(),n=r.parsedWidth,i=r.unit;switch(i){case"%":t="mj-column-per-"+parseInt(n,10);break;case"px":default:t="mj-column-px-"+parseInt(n,10)}return e(t,{parsedWidth:n,unit:i}),t}},{key:"render",value:function render(){var e=this.props,t=e.children,r=e.nonRawSiblings,n=this.getChildContext().containerWidth,i=this.context.containerWidth,a=function getElementWidth(e){if(!e)return parseInt(i,10)/parseInt(r,10)+"px";var t=(0,d.default)(e,{parseFloatToInt:!1}),a=t.unit,o=t.parsedWidth;return"%"===a?100*o/n+"px":""+o+a},o=this.getColumnClass()+" mj-outlook-group-fix";return this.getAttribute("css-class")&&(o+=" "+this.getAttribute("css-class")),"\n \n \x3c!--[if mso | IE]>\n
\n \n "}}]),MjGroup}(f.BodyComponent),n.allowedAttributes={"background-color":"color",direction:"enum(ltr,rtl)","vertical-align":"enum(top,bottom,middle)",width:"unit(px,%)"},n.defaultAttributes={direction:"ltr"},i);t.default=p,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4)),l=_interopRequireDefault(r(350)),f=r(7),d=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=(i=n=function(e){function MjImage(){var e,t,r,n;(0,o.default)(this,MjImage);for(var i=arguments.length,s=Array(i),c=0;c
\n ";return this.getAttribute("href")?"\n
\n "+t+"\n \n ":t}},{key:"render",value:function render(){return"\n
\n \n \n \n "+this.renderImage()+"\n | \n
\n \n
\n "}}]),MjImage}(f.BodyComponent),n.tagOmission=!0,n.allowedAttributes={alt:"string",href:"string",name:"string",src:"string",srcset:"string",title:"string",rel:"string",align:"enum(left,center,right)",border:"string","border-bottom":"string","border-left":"string","border-right":"string","border-top":"string","border-radius":"unit(px,%){1,4}","container-background-color":"color","fluid-on-mobile":"boolean",padding:"unit(px,%){1,4}","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",target:"string",width:"unit(px)",height:"unit(px,auto)","max-height":"unit(px,%)","font-size":"unit(px)"},n.defaultAttributes={align:"center",border:"0",height:"auto",padding:"10px 25px",target:"_blank","font-size":"13px"},i);t.default=p,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=(i=n=function(e){function MjRaw(){return(0,o.default)(this,MjRaw),(0,u.default)(this,(MjRaw.__proto__||(0,a.default)(MjRaw)).apply(this,arguments))}return(0,c.default)(MjRaw,e),(0,s.default)(MjRaw,[{key:"render",value:function render(){return this.getContent()}}]),MjRaw}(r(7).BodyComponent),n.endingTag=!0,n.rawElement=!0,i);t.default=l,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4)),l=r(7),f=_interopRequireDefault(r(48));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var d=(i=n=function(e){function MjSpacer(){return(0,o.default)(this,MjSpacer),(0,u.default)(this,(MjSpacer.__proto__||(0,a.default)(MjSpacer)).apply(this,arguments))}return(0,c.default)(MjSpacer,e),(0,s.default)(MjSpacer,[{key:"getStyles",value:function getStyles(){return{div:{height:this.getAttribute("height")}}}},{key:"render",value:function render(){var e=this.getAttribute("height");return"\n "+(0,f.default)('\n
\n ')+"\n \n \n \n "+(0,f.default)("\n |
\n ")+"\n "}}]),MjSpacer}(l.BodyComponent),n.allowedAttributes={border:"string","border-bottom":"string","border-left":"string","border-right":"string","border-top":"string","container-background-color":"color","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}","vertical-align":"enum(top,bottom,middle)",width:"unit(px,%)",height:"unit(px,%)"},n.defaultAttributes={height:"20px"},i);t.default=d,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4)),l=r(7),f=_interopRequireDefault(r(48));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var d=(i=n=function(e){function MjText(){return(0,o.default)(this,MjText),(0,u.default)(this,(MjText.__proto__||(0,a.default)(MjText)).apply(this,arguments))}return(0,c.default)(MjText,e),(0,s.default)(MjText,[{key:"getStyles",value:function getStyles(){return{text:{"font-family":this.getAttribute("font-family"),"font-size":this.getAttribute("font-size"),"font-style":this.getAttribute("font-style"),"font-weight":this.getAttribute("font-weight"),"letter-spacing":this.getAttribute("letter-spacing"),"line-height":this.getAttribute("line-height"),"text-align":this.getAttribute("align"),"text-decoration":this.getAttribute("text-decoration"),"text-transform":this.getAttribute("text-transform"),color:this.getAttribute("color"),height:this.getAttribute("height")}}}},{key:"renderContent",value:function renderContent(){return"\n
"+this.getContent()+"
\n "}},{key:"render",value:function render(){var e=this.getAttribute("height");return e?"\n "+(0,f.default)('\n
\n ')+"\n "+this.renderContent()+"\n "+(0,f.default)("\n |
\n ")+"\n ":this.renderContent()}}]),MjText}(l.BodyComponent),n.endingTag=!0,n.allowedAttributes={align:"enum(left,right,center,justify)","background-color":"color",color:"color","container-background-color":"color","font-family":"string","font-size":"unit(px)","font-style":"string","font-weight":"string",height:"unit(px,%)","letter-spacing":"unitWithNegative(px,%)","line-height":"unit(px,%,)","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}","text-decoration":"string","text-transform":"string","vertical-align":"enum(top,bottom,middle)"},n.defaultAttributes={align:"left",color:"#000000","font-family":"Ubuntu, Helvetica, Arial, sans-serif","font-size":"13px","line-height":"1",padding:"10px 25px"},i);t.default=d,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(65)),o=_interopRequireDefault(r(15)),s=_interopRequireDefault(r(2)),u=_interopRequireDefault(r(1)),c=_interopRequireDefault(r(6)),l=_interopRequireDefault(r(3)),f=_interopRequireDefault(r(4)),d=_interopRequireDefault(r(49)),p=r(7),h=r(16);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var g=(i=n=function(e){function MjTable(){return(0,u.default)(this,MjTable),(0,l.default)(this,(MjTable.__proto__||(0,s.default)(MjTable)).apply(this,arguments))}return(0,f.default)(MjTable,e),(0,c.default)(MjTable,[{key:"getStyles",value:function getStyles(){return{table:{color:this.getAttribute("color"),"font-family":this.getAttribute("font-family"),"font-size":this.getAttribute("font-size"),"line-height":this.getAttribute("line-height"),"table-layout":this.getAttribute("table-layout"),width:this.getAttribute("width"),border:this.getAttribute("border")}}}},{key:"getWidth",value:function getWidth(){var e=this.getAttribute("width"),t=(0,d.default)(e),r=t.parsedWidth;return"%"===t.unit?e:r}},{key:"render",value:function render(){var e=this,t=(0,h.reduce)(["cellpadding","cellspacing"],(function(t,r){return(0,o.default)({},t,(0,a.default)({},r,e.getAttribute(r)))}),{});return"\n
\n "+this.getContent()+"\n
\n "}}]),MjTable}(p.BodyComponent),n.endingTag=!0,n.allowedAttributes={align:"enum(left,right,center)",border:"string",cellpadding:"integer",cellspacing:"integer","container-background-color":"color",color:"color","font-family":"string","font-size":"unit(px)","font-weight":"string","line-height":"unit(px,%,)","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}","table-layout":"enum(auto,fixed,initial,inherit)","vertical-align":"enum(top,bottom,middle)",width:"unit(px,%)"},n.defaultAttributes={align:"left",border:"none",cellpadding:"0",cellspacing:"0",color:"#000000","font-family":"Ubuntu, Helvetica, Arial, sans-serif","font-size":"13px","line-height":"22px",padding:"10px 25px","table-layout":"auto",width:"100%"},i);t.default=g,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_interopRequireDefault(r(2)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(6)),o=_interopRequireDefault(r(3)),s=_interopRequireDefault(r(4)),u=_interopRequireDefault(r(354)),c=r(7);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function MjWrapper(){return(0,i.default)(this,MjWrapper),(0,o.default)(this,(MjWrapper.__proto__||(0,n.default)(MjWrapper)).apply(this,arguments))}return(0,s.default)(MjWrapper,e),(0,a.default)(MjWrapper,[{key:"renderWrappedChildren",value:function renderWrappedChildren(){var e=this.props.children,t=this.context.containerWidth;return"\n "+this.renderChildren(e,{renderer:function renderer(e){return e.constructor.isRawElement()?e.render():"\n \x3c!--[if mso | IE]>\n
\n \n \n | \n
\n 1&&void 0!==arguments[1]?arguments[1]:{},r=e.BlockManager,n={category:t.categoryLabel||"MJML"},i={category:"Head Elements"};t.resetBlocks&&r.getAll().reset(),r.add("mj-1-column",_objectSpread({label:"1 Column",content:"
\n Content 1\n ",attributes:{class:"gjs-fonts gjs-f-b1"}},n)),r.add("mj-2-columns",_objectSpread({label:"2 Columns",content:"
\n Content 1\n Content 2\n ",attributes:{class:"gjs-fonts gjs-f-b2"}},n)),r.add("mj-3-columns",_objectSpread({label:"3 Columns",content:"
\n Content 1\n Content 2\n Content 3\n ",attributes:{class:"gjs-fonts gjs-f-b3"}},n)),r.add("mj-column",_objectSpread({label:"Column",content:"
Content 1",attributes:{class:"gjs-fonts gjs-f-b1"}},n)),r.add("mj-group",_objectSpread({label:"Group",content:"
\n Content 1\n Content 2\n ",attributes:{class:"gjs-fonts gjs-f-b2"}},n)),r.add("mj-text",_objectSpread({label:"Text",content:"
Insert text here",attributes:{class:"gjs-fonts gjs-f-text"}},n)),r.add("mj-image",_objectSpread({label:"Image",content:'
',attributes:{class:"fa fa-image"}},n)),r.add("mj-button",_objectSpread({label:"Button",content:"
Button",attributes:{class:"gjs-fonts gjs-f-button"}},n)),r.add("mj-spacer",_objectSpread({label:"Spacer",content:"
",attributes:{class:"fa fa-arrows-v"}},n)),r.add("mj-divider",_objectSpread({label:"Divider",content:"
",attributes:{class:"gjs-fonts gjs-f-divider"}},n)),r.add("mj-social-group",_objectSpread({label:"Group Social",content:'
\n \n \n \n ',attributes:{class:"fa fa-share-alt"}},n)),r.add("mj-social-element",_objectSpread({label:"Social Element",content:'
',attributes:{class:"fa fa-share-alt"}},n)),r.add("mj-navbar",_objectSpread({label:"NavBar",content:"
\n Getting started\n Try it live\n Templates\n Components\n ",attributes:{class:"fa fa-bars"}},n)),r.add("mj-navbar-link",_objectSpread({label:"NavBar Link",content:"
Link 1",attributes:{class:"gjs-fonts gjs-f-button"}},n)),r.add("mj-wrapper",_objectSpread({label:"Wrapper",content:"
\n \n Content inside wrapper\n \n ",attributes:{class:"gjs-fonts gjs-f-b1"}},n)),r.add("mj-hero",_objectSpread({label:"Hero",content:'
\n Hero\n Button\n ',attributes:{class:"gjs-fonts gjs-f-b1"}},n)),r.add("mj-raw",_objectSpread({label:"Raw",content:"
\x3c!-- raw element --\x3e",attributes:{class:"fa fa-code"}},n)),r.add("mj-title",_objectSpread({label:"Title",content:"
Hello GrapesJS MJML",attributes:{class:"gjs-fonts gjs-f-text"}},i)),r.add("mj-preview",_objectSpread({label:"Preview",content:"
Preview text here!",attributes:{class:"fa fa-eye"}},i)),r.add("mj-class",_objectSpread({label:"Class",content:'
',attributes:{class:"fa fa-paint-brush"}},i)),r.add("mj-font",_objectSpread({label:"Font",content:'
',attributes:{class:"fa fa-font"}},i)),r.add("mj-breakpoint",_objectSpread({label:"Breakpoint",content:'
',attributes:{class:"fa fa-arrows-h"}},i)),r.add("mj-all",_objectSpread({label:"All",content:"
",attributes:{class:"fa fa-at"}},i))},i=r(29),a=r.n(i);function Mjml_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mjml_objectSpread(e){for(var t=1;t
"},getChildrenSelector:function getChildrenSelector(){return"div"},renderStyle:function renderStyle(){var e=a.editorBackgroundColor?"background: ".concat(a.editorBackgroundColor,";"):"",t=this.attributes.isMobile?"display: none;":"display: table-row;";this.el.classList.add("gjs-one-bg"),this.el.style=this.attributes.style+e+t}})})};function Title_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Title_objectSpread(e){for(var t=1;t Title '+this.model.get("content")+""},getChildrenSelector:function getChildrenSelector(){return"div > span"},renderChildren:function renderChildren(){a.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all",this.el.style=this.attributes.style+"max-width: 500px; white-space: initial; line-height: 1.9em;"},disableEditing:function disableEditing(){var e=this.getChildrenContainer();this.el.style=this.attributes.style+"max-width: 300px; white-space: nowrap;",this.rteEnabled=1,e.innerHTML=e.innerText.replace(/\n+/g," "),this.syncContent(),this.rteEnabled=0,e.style.pointerEvents="none"}})})};function Preview_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Preview_objectSpread(e){for(var t=1;tPreview '+this.model.get("content")+""},getChildrenSelector:function getChildrenSelector(){return"div > span"},renderChildren:function renderChildren(){a.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all",this.el.style=this.attributes.style+"max-width: 500px; white-space: initial; line-height: 1.9em;"},disableEditing:function disableEditing(){var e=this.getChildrenContainer();this.el.style=this.attributes.style+"max-width: 300px; white-space: nowrap;",this.rteEnabled=1,e.innerHTML=e.innerText.replace(/\n+/g," "),this.syncContent(),this.rteEnabled=0,e.style.pointerEvents="none"}})})};function Font_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Font_objectSpread(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1?arguments[1]:void 0,n=e.StyleManager,i=n.getProperty("typography","font-family"),a=i.get("list"),o=a.length-1;o>-1;o--){var s=a[o];s.fcid===this.cid&&a.splice(o,1)}if(t){var u=r||this.get("attributes"),c=this.displayName(u.name);a.push({value:u.name,name:c,fcid:this.cid})}a.sort((function(e,t){return e.name.localeCompare(t.name)})),n.render()},updateHeadElements:function updateHeadElements(t){var r=this.getAttributes(),n=t||e.Canvas.getDocument().head.getElementsByClassName(this.className());if(n&&n.length&&"string"==typeof r.href){var i=!0,a=!1,o=void 0;try{for(var s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;switch(c.tagName){case"LINK":c.href=r.href;break;case"STYLE":c.textContent="@import url(".concat(r.href,");")}}}catch(e){a=!0,o=e}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}}},mounted:function mounted(t){if(t===this){var r=this.modelOpt.firstMount,n=this.previousAttributes().attributes||{},i=this.changed.attributes||{},a="string"==typeof i.name&&i.name!==n.name,o="string"==typeof i.href&&i.href!==n.href,s=a||o;this.modelOpt.headElementsCreated||this.createElements(),(r||s)&&this.updateFontList(),o&&this.updateHeadElements(),this.modelOpt.firstMount=!1}t===e&&(this.createElements(),this.updateFontList(),this.modelOpt.firstMount=!1)},removed:function removed(){for(var t=e.Canvas.getDocument().head.getElementsByClassName(this.className()),r=t.length-1;r>-1;r--){var n=t[r];n&&n.parentNode.removeChild(n)}this.updateFontList(0),this.modelOpt.headElementsCreated=!1,this.modelOpt.firstMount=!0}}),view:Font_objectSpread({},a,{tagName:"span",attributes:{style:"pointer-events: all; display: inline-block; color:#FFF; padding: 8px 15px;"},getChildrenSelector:function getChildrenSelector(){return"div span"},getTemplateFromMjml:function getTemplateFromMjml(){var e=this.model.displayName();return' A ').concat(e,"
")},renderChildren:function renderChildren(){}})})};function Breakpoint_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Breakpoint_objectSpread(e){for(var t=1;t<-> ').concat(e,"")},renderChildren:function renderChildren(){}})})};function Attributes_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Attributes_objectSpread(e){for(var t=1;tAttributes'},getChildrenSelector:function getChildrenSelector(){return"div > div"},renderStyle:function renderStyle(){if(a.showAttributesSidebar){var e=this.attributes.dashed&&!this.attributes.isMobile?"-1px":"-145px",t=a.editorBackgroundColor?"background-color: ".concat(a.editorBackgroundColor,";"):"";this.el.classList.add("gjs-one-bg"),this.el.style=this.attributes.style+t+"left: ".concat(e)}else this.el.style="display:none;"}})}))};function Class_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Class_objectSpread(e){for(var t=1;t.".concat(e,"")},renderStyle:function renderStyle(){var e=this.el.getAttribute("style")||"";e=e.split(";").filter((function(e){return!e.match(/.*(width|height|padding|margin|font-size|letter).*/g)})).join(";"),this.el.style=e+this.attributes.style},render:function render(){return this.renderAttributes(),this.el.innerHTML=this.getTemplateFromMjml(),this.renderStyle(),this},rerender:function rerender(){var t=this.el.getAttribute("name");this.el.innerHTML=this.getTemplateFromMjml(),this.renderStyle(),t&&e.getWrapper().find("[mj-class=".concat(t,"]")).forEach((function(e){return e.view.render()}))}})})};function All_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function All_objectSpread(e){for(var t=1;t</ All >'},renderStyle:function renderStyle(){var e=this.el.getAttribute("style");e=e?e.split(";").filter((function(e){return!e.match(/.*(width|height|padding|margin|font-size|letter).*/g)})).join(";"):"",this.el.style=e+this.attributes.style},render:function render(){return this.renderAttributes(),this.el.innerHTML=this.getTemplateFromMjml(),this.renderStyle(),this},rerender:function rerender(){this.el.innerHTML=this.getTemplateFromMjml(),this.renderStyle(),e.getWrapper().findType("mj-body")[0].view.render()},getChildrenSelector:function getChildrenSelector(){return"div > span"},renderChildren:function renderChildren(){}})})};function Style_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Style_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("style").innerHTML},renderStyle:function renderStyle(){},getTemplateFromMjml:function getTemplateFromMjml(){var e=this.getMjmlTemplate(),t=this.getInnerMjmlTemplate(),r=a()("".concat(e.start,"\n ").concat(t.start).concat(t.end).concat(e.end)).html,n=r.indexOf("")+6,i=r.indexOf("");return r=r.substring(n,i).trim(),o.innerHTML=r,this.getTemplateFromEl(o)}})})};function Body_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Body_objectSpread(e){for(var t=1;t"),end:"".concat(e.end)}},getTemplateFromMjml:function getTemplateFromMjml(){return""},renderStyle:function renderStyle(){var e=this.el.getAttribute("style")||"";this.el.style=e+this.attributes.style},renderContent:function renderContent(){this.getChildrenContainer().innerHTML=this.model.get("content")},rerender:function rerender(){i.rerender.call(this),this.model.components().models.forEach((function(e){"mj-section"!=e.attributes.type&&"mj-wrapper"!=e.attributes.type&&"mj-hero"!=e.attributes.type||e.view.rerender()}))}})})};function Section_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Section_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:""}},getChildrenSelector:function getChildrenSelector(){return this.attributes.fullwidth?"td > div > table > tbody > tr > td":"table > tbody > tr > td"},renderContent:function renderContent(){this.attributes.fullwidth="full-width"===this.model.get("style")["full-width"],i.renderContent.call(this)},renderStyle:function renderStyle(){var e=this.model.parent(),t=this.attributes.fullwidth?"100%":e.get("attributes").width||"600px";this.el.style=this.attributes.style+"margin:0px auto; max-width:".concat(t,";")},init:function init(){var t=this;i.init.call(this),this.listenTo(this.model.get("components"),"add remove",this.render),this.listenTo(e.getModel(),"run:sw-visibility stop:sw-visibility",(function(){t.attributes.dashed=e.Canvas.getBody().classList.contains("gjs-dashed"),t.render()}))}})})};function Wrapper_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wrapper_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:""}},renderContent:function renderContent(){var e=this;this.attributes.fullwidth="full-width"===this.model.get("style")["full-width"],this.model.findType("mj-section").forEach((function(t){var r=t.get("stylable"),n=r.indexOf("full-width");e.attributes.fullwidth?n>-1&&r.splice(n,1):-1===n&&r.push("full-width")})),i.renderContent.call(this)},renderStyle:function renderStyle(){var e=this.model.parent(),t=this.attributes.fullwidth?"100%":e.get("attributes").width||"600px";this.el.style=this.attributes.style+"margin:0px auto; max-width:".concat(t,";")},getChildrenSelector:function getChildrenSelector(){return this.attributes.fullwidth?"td > div > table > tbody > tr > td":"table > tbody > tr > td"}})})};function Column_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Column_objectSpread(e){for(var t=1;t/,""),o=i.indexOf("")+6,u=i.indexOf("");s.innerHTML=i.substring(o,u).trim();for(var c,l=this.getTemplateFromEl(s),f={},d=l.attributes,p=0,h=d.length;p".concat(t.style,"")),this.getChildrenContainer().innerHTML=this.model.get("content"),this.renderChildren(),this.renderStyle(),this},renderStyle:function renderStyle(){var e=this.model.parent().view,t=!e||!e.attributes||!e.attributes.dashed,r=u&&!t?"padding: ".concat(u,";"):"";this.el.style=this.el.getAttribute("style")+this.attributes.style+r},getMjmlTemplate:function getMjmlTemplate(){var e=this.model.collection.length-1;e=e||0;var t=Array(e).fill("").join(""),r=this.model.parent().is("mj-group");return{start:"".concat(r?"":""),end:"".concat(t).concat(r?"":"","")}},getTemplateFromEl:function getTemplateFromEl(e){var t="div > table > tbody > tr > td > div";return this.model.parent().is("mj-group")&&(t+=" > div"),e.firstChild.querySelector(t)},getChildrenSelector:function getChildrenSelector(){return"table"}})})};function Group_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Group_objectSpread(e){for(var t=1;t").concat(e.get("tagName"),">")})).join("");return{start:"\x3c!--group start--\x3e",end:"\x3c!--group end--\x3e".concat(t,"")}},getTemplateFromEl:function getTemplateFromEl(e){var t=e.firstChild.querySelector("div > table > tbody > tr > td > div"),r={},n=!0,i=!1,a=void 0;try{for(var o,s=t.attributes[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;r[u.name]=u.value}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return this.$el.attr(r),""},getChildrenSelector:function getChildrenSelector(){return"span"}})})};function Text_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Text_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"td > div"},renderChildren:function renderChildren(){i.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all"},disableEditing:function disableEditing(){this.getChildrenContainer().style.pointerEvents="none"}})})};function Button_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Button_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"a,p"},renderChildren:function renderChildren(){i.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all"},disableEditing:function disableEditing(){this.getChildrenContainer().style.pointerEvents="none"}})})};function Image_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Image_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"img"}})})};function Raw_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Raw_objectSpread(e){for(var t=1;t".concat(this.get("content"),"")}}),view:Raw_objectSpread({},a,{events:{dblclick:"onActive"},attributes:{style:"pointer-events: all;",dashed:!0},init:function init(){var t=this;this.model.parent().is("mj-head")||this.listenTo(e.getModel(),"run:sw-visibility stop:sw-visibility",(function(){t.attributes.dashed=e.Canvas.getBody().classList.contains("gjs-dashed"),t.render()}))},render:function render(){if(this.renderAttributes(),this.model.parent().is("mj-head"))this.el.innerHTML='</> Raw
';else{var e=this.attributes.dashed?"min-width:200px; padding:".concat(o):"";this.el.innerHTML='').concat(this.model.get("content"),"
")}return this.renderStyle(),this},renderStyle:function renderStyle(){this.model.parent().is("mj-head")?this.el.style=this.attributes.style+"display: inline-block; color:#FFF; padding:8px 15px;":this.el.style=this.attributes.style},rerender:function rerender(){this.renderStyle()},renderContent:function renderContent(){},renderChildren:function renderChildren(){},onActive:function onActive(t){t&&t.stopPropagation(),e.runCommand("mjml-editor",{sender:this.model,target:this.model,title:"",help:"Edit raw component",onSave:function onSave(e){console.log("on save called "+e)},onFail:function onFail(e){console.warning(e)}})}})})};function Hero_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hero_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.firstChild.innerHTML},getChildrenSelector:function getChildrenSelector(){return".mj-hero-content table tbody"},init:function init(){i.init.call(this),this.listenTo(this.model.get("components"),"add remove",this.render)}})})};function Social_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Social_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"td"},rerender:function rerender(){i.rerender.call(this),this.model.components().models.forEach((function(e){"mj-social-element"==e.attributes.type&&e.view.rerender()}))},init:function init(){i.init.call(this),this.listenTo(this.model.get("components"),"add remove",this.render)}})})};function SocialElement_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function SocialElement_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:" td > table").innerHTML},getChildrenSelector:function getChildrenSelector(){return"img"}})})};function Divider_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Divider_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"p"}})})};function Spacer_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Spacer_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"td"},renderChildren:function renderChildren(){i.renderChildren.call(this)}})})};function NavBar_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function NavBar_objectSpread(e){for(var t=1;t/,""),s=i.indexOf("")+6,u=i.indexOf("");o.innerHTML=i.substring(s,u).trim();for(var c,l=this.getTemplateFromEl(o),f={},d=l.attributes,p=0,h=d.length;p".concat(t.style,"")),this.getChildrenContainer().innerHTML=this.model.get("content"),this.renderChildren(),this.renderStyle(),this},getMjmlTemplate:function getMjmlTemplate(){return{start:"",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.firstChild.querySelector("tr")},getChildrenSelector:function getChildrenSelector(){return"div.mj-inline-links"},rerender:function rerender(){i.rerender.call(this),this.model.components().models.forEach((function(e){"mj-navbar-link"==e.attributes.type&&e.view.rerender()}))}})})};function NavBarLink_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function NavBarLink_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("div").innerHTML},getChildrenSelector:function getChildrenSelector(){return"a,p"},renderChildren:function renderChildren(){i.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all"},disableEditing:function disableEditing(){this.getChildrenContainer().style.pointerEvents="none"}})})};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function components_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function components_objectSpread(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=e.DomComponents,n=r.getType("default"),i=r.getType("text"),R=r.getType("image"),D=r.getType("link"),B=n.model,P=n.view,I=i.model,L=i.view,N=R.model,q=R.view,F=D.model,U=D.view,z=r,W=r.ComponentsView,H=document.createElement("div"),V={init:function init(){var e=components_objectSpread({},this.get("attributes")),t=components_objectSpread({},this.get("style"));for(var r in t)r in e||(e[r]=t[r]);var n=e["mj-class"];n&&this.addClass(n.split(" ")).forEach((function(e){return e.attributes.active=!1})),this.set("attributes",e),this.set("style",e),this.listenTo(this,"change:style",this.handleStyleChange),this.listenTo(this.get("classes"),"add remove change",this.handleClassesChange)},handleStyleChange:function handleStyleChange(){var e=components_objectSpread({},this.get("attributes")),t=components_objectSpread({},this.get("style"));for(var r in delete t.display,e)r in t||delete e[r];this.set("attributes",components_objectSpread({},e,{},t))},handleClassesChange:function handleClassesChange(e){var t=this.parent().get("type");"mj-head"!==t&&"mj-attributes"!==t&&((e.changed.active||e.get("active"))&&setTimeout((function(){return e.set({active:!1})}),100),this.addStyle({"mj-class":this.get("classes").pluck("name").join(" ")}))},addClass:function addClass(t){var r=e.SelectorManager.addClass(t);return r.forEach((function(e){return e.attributes.active=!1})),this.get("classes").add(r)},getMjmlAttributes:function getMjmlAttributes(){var e=this.get("attributes")||{};delete e.style;var t=this.get("src");return t&&(e.src=t),e},getAttrToHTML:function getAttrToHTML(){var e=components_objectSpread({},this.get("attributes")),t=components_objectSpread({},this.get("style-default"));for(var r in delete e.style,e){var n=e[r];n&&n===t[r]&&delete e[r]}return e},toHTML:function toHTML(){var e="",t=this.get("tagName"),r=this.get("void"),n="",i=this.getAttrToHTML();for(var a in delete i.id,delete i.display,i){var o=i[a];n+=void 0!==_typeof(o)&&""!==o?" "+a+'="'+o+'"':""}return e+="<".concat(t).concat(n).concat(r?"/":"",">")+this.get("content"),this.get("components").each((function(t){e+=t.toHTML()})),r||(e+="".concat(t,">")),e}},K={init:function init(){this.stopListening(this.model,"change:style"),this.listenTo(this.model,"change:attributes change:src",this.rerender)},renderSimilar:function renderSimilar(){if("mj-attributes"===this.model.parent().get("type")){var t=this.model.get("type");t&&e.getWrapper().find("[data-gjs-type='mj-body'] [data-gjs-type='".concat(t,"']")).forEach((function(e){e.view.render()}))}},rerender:function rerender(){this.render(null,null,{},1),this.renderSimilar()},getMjmlTemplate:function getMjmlTemplate(){return{start:"",end:""}},getInnerMjmlTemplate:function getInnerMjmlTemplate(){var e=this.model,t=e.get("tagName"),r=e.getMjmlAttributes(),n="";for(var i in r){var a=r[i];n+=void 0!==_typeof(a)&&""!==a?" "+i+'="'+a+'"':""}return{start:"<".concat(t).concat(n,">"),end:"".concat(t,">")}},getTemplateFromEl:function getTemplateFromEl(e){return e.firstChild.innerHTML},getTemplateFromMjml:function getTemplateFromMjml(){var t=this.getMjmlTemplate(),r=this.getInnerMjmlTemplate(),n=e.getWrapper().findType("mj-head")[0];if(n){var i=n.toHTML().replace(//m,"");t.start=t.start.replace("","".concat(i))}var o=a()("".concat(t.start,"\n ").concat(r.start).concat(r.end).concat(t.end)),s=document.createElement("html");if(s.innerHTML=o.html,this.model.is("mj-column")||this.model.is("mj-group")){var u=Array.from(s.querySelectorAll("style")).filter((function(e){return e.innerHTML.indexOf("mj-column")>-1})).map((function(e){return e.innerHTML})).join(" ");u.length&&e.addComponents(""))}return H.innerHTML=s.getElementsByTagName("body")[0].innerHTML.trim(),this.getTemplateFromEl(H)},renderChildren:function renderChildren(e){var t=this.getChildrenContainer();e?this.componentsView.parentEl=t:(this.componentsView=new W({collection:this.model.get("components"),config:this.config,defaultTypes:this.opts.defaultTypes,componentTypes:this.opts.componentTypes}),this.childNodes=this.componentsView.render(t).el.childNodes);for(var r=Array.prototype.slice.call(this.childNodes),n=0,i=r.length;n1&&void 0!==arguments[1]?arguments[1]:{},r=e.getConfig(),n=e.CodeManager.getViewer("CodeMirror").clone(),i=document.createElement("button"),a=document.createElement("div"),o=r.stylePrefix||"";return i.innerHTML=t.modalBtnImport,i.className="".concat(o,"btn-prim ").concat(o,"btn-import"),i.onclick=function(){var r=n.editor.getValue();e.DomComponents.getWrapper().set("content",""),e.setComponents(r.trim()),t.cleanMjml&&e.Commands.run("clean-mjml"),e.Modal.close()},n.set({codeName:"htmlmixed",theme:t.codeViewerTheme,readOnly:0}),{run:function run(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=e.Modal,u=n.editor;if(s.setTitle(t.modalTitleImport),!u){var c=document.createElement("textarea"),l=t.modalLabelImport;if(l){var f=document.createElement("div");f.className=o+"import-label",f.innerHTML=l,a.appendChild(f)}a.appendChild(c),a.appendChild(i),n.init(c),u=n.editor}s.setContent(""),s.setContent(a),n.setContent(t.importPlaceholder),s.open(),u.refresh(),r.set&&r.set("active",0)}}},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getConfig(),n=e.CodeManager.getViewer("CodeMirror").clone(),i=document.createElement("div"),o=e.Commands;i.style="display: flex; justify-content: space-between;",n.set({codeName:"htmlmixed",theme:t.codeViewerTheme});var s,u,c=function getMjml(){var r=t.preMjml+e.getHtml()+t.postMjml;return a()(r)};return o.add("mjml-get-code",{run:function run(){return c()}}),{buildEditor:function buildEditor(n){var i=e.CodeManager,a=i.getViewer("CodeMirror").clone(),o=document.createElement("textarea"),s=document.createElement("div");s.style="flex:1 0 auto; padding:5px; max-width:50%; box-sizing:border-box;";var u=a.set({label:n,codeName:"htmlmixed",theme:t.codeViewerTheme,input:o}),c=new i.EditorView({model:u,config:r}).render().el;return s.appendChild(c),u.init(o),{codeEditor:u,el:s}},run:function run(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.Modal;if(n.setTitle(t.modalTitleExport),n.setContent(""),n.setContent(i),!s){var a=this.buildEditor("MJML");s=a.codeEditor,i.appendChild(a.el)}if(!u){var o=this.buildEditor("HTML");u=o.codeEditor,i.appendChild(o.el)}if(n.open(),s&&(s.setContent(t.preMjml+e.getHtml()+t.postMjml),s.editor.refresh()),u){var l=c();l.errors.length&&l.errors.forEach((function(e){console.warn(e.formattedMessage)})),u.setContent(l.html),u.editor.refresh()}r.set&&r.set("active",0)}}},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getConfig(),n=e.CodeManager.getViewer("CodeMirror").clone(),i=document.createElement("div"),a=document.createElement("div"),o=document.createElement("button"),s=r.stylePrefix||"";return o.className="".concat(s,"btn-prim ").concat(s,"edit-btn-save"),n.set({codeName:"htmlmixed",theme:t.codeViewerTheme,readOnly:0}),{run:function run(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,u=r.target;if(o.onclick=function(){var t=n.editor.getValue().replace(/<([a-zA-Z-]+)\s([^>]*)\/>/g,"<$1 $2>$1>").trim();u.replaceWith(t),e.Modal.close(),r.onSave&&r.onSave(t)},u&&u.toHTML){var c=e.Modal,l=n.editor;o.innerHTML=r.btnLabel||' Save',r.help?(a.className=s+"edit-help",a.innerHTML=r.help):(a.className="",a.innerHTML="");var f=r.title||u.get("name")+" Component Edit";if(c.setTitle(f),!l){var d=document.createElement("textarea");i.className="".concat(s,"editor ").concat(s,"edit-container"),i.appendChild(a),i.appendChild(d),i.appendChild(o),n.init(d),l=n.editor}c.setContent(""),c.setContent(i),n.setContent(u.toHTML()),c.open(),l.refresh(),t.set&&t.set("active",0)}else{var p=new Error("No mjml component provided as target.");r.onFail?r.onFail(p):e.getModel().logWarning(p.description)}}}},N=function(e){var t=e.getConfig().stylePrefix||"",r=[{name:"desktop",width:1070,el:document.createElement("button")},{name:"tablet",width:770,el:document.createElement("button")},{name:"mobile",width:320,el:document.createElement("button")}],n=document.createElement("div"),i=document.createElement("div");i.className="gjs-edit-help";var a=document.createElement("iframe");return a.width="100%",a.height="100%",a.frameBorder=0,a.style.cssText="height: 80vh; background: #FFF; border-radius: 3px;",n.appendChild(i),n.appendChild(a),{resizeModal:function resizeModal(e){var t=document.getElementsByClassName("gjs-mdl-dialog")[0];t.style.transition="0.3s",t.style.maxWidth="".concat(e,"px")},run:function run(e){var o=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.forEach((function(e){var r=e.el;r.className="".concat(t,"pn-btn fa fa-").concat(e.name),r.style.cssText="margin: 4px 5px; color: #FFF;",r.onclick=function(){return o.resizeModal(e.width)},n.appendChild(r)}));var u=e.getWrapper(),c=u.findType("mj-title")[0],l=u.findType("mj-preview")[0],f=c?"« ".concat(c.toHTML()," » Preview"):"Preview";l?(i.style.cssText="display:inline-block; font-size: 0.75rem; padding-bottom: 15px;",i.innerHTML=l.toHTML()):i.style.cssText="display:none;";var d=e.Modal;d.setTitle(f),d.setContent("");var p=e.Commands.run("mjml-get-code");p.errors.length&&p.errors.forEach((function(e){console.warn(e.formattedMessage)})),a.src="data:text/html;charset=utf-8,"+escape(p.html),e.Modal.onceClose((function(){return o.resizeModal(1060)})),d.setContent(n),d.open(),s.set&&s.set("active",0)}}},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getWrapper();return{run:function run(e){var n=r.get("components");if(n.length){var i="",a=function getInitialContent(){return n.models.map((function(e){return e.toHTML()})).join("")};switch(n.first().get("type")){case"mjml":break;case"mj-body":case"mj-head":i=a(),e.DomComponents.clear(),r.append("".concat(i,""));break;default:i=a(),e.DomComponents.clear(),r.append("".concat(i,""))}}else n.add(t.defaultTemplate||'Welcome to GrapesJS MJML')}}},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.Commands,n=t.overwriteExport?"export-template":"mjml-export";r.add("mjml-import",P(e,t)),r.add(n,I(e,t)),r.add("mjml-editor",L(e,t)),r.add("preview",N(e)),r.add("clean-mjml",q(e,t)),r.add(t.cmdTglImages,B()),r.add("undo",{run:function run(e,t){t.set("active",0),e.UndoManager.undo(1)}}),r.add("redo",{run:function run(e,t){t.set("active",0),e.UndoManager.redo(1)}}),r.add("set-device-desktop",{run:function run(e){e.setDevice("Desktop")}}),r.add("set-device-tablet",{run:function run(e){e.setDevice("Tablet")}}),r.add("set-device-mobile",{run:function run(e){e.setDevice("Mobile portrait")}})};function buttons_defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="title",n="data-tooltip-pos",i=e.Panels,a=i.getPanel("options"),o=i.getPanel("options"),s=e.Commands,u=e.DomComponents,c=function updateTooltip(e){e.each((function(e){var t=e.get("attributes");t[n]="bottom",e.set("attributes",t)}))};i.addButton("options",{id:"mjml-edit-head",className:"fa fa-header",attributes:buttons_defineProperty({},r,t.cmdBtnEditHeadLabel),command:function command(e,r){var n=u.getWrapper(),i=n.findType("mjml")[0]||n,a={sender:r,target:i.findType("mj-head")[0]||i.append("".concat(t.editHeadPlaceholder,""),{at:0})[0],title:t.modalTitleEditHead,help:t.modalLabelEditHead,btnLabel:t.modalBtnEditHead,onSave:function onSave(){try{u.render()}catch(e){this.onFail("Cannot render the components, an error occured.")}},onFail:function onFail(t){e.getModel().logWarning(t)}};if(s.has("mjml-editor"))return s.run("mjml-editor",a)}}),i.addButton("options",{id:"mjml-import",className:"fa fa-download",attributes:buttons_defineProperty({},r,t.cmdBtnImportMjmlLabel),command:"mjml-import"});var l=i.removeButton("options","fullscreen");if(a){var f=a.get("buttons");f.each((function(e){var t=e.get("attributes");t[n]="bottom",e.set("attributes",t)}))}if(o){var d=o.get("buttons");d.add([{id:"undo",className:"fa fa-undo",command:"undo",attributes:buttons_defineProperty({},r,t.cmdBtnUndoLabel)},{id:"redo",className:"fa fa-repeat",command:"redo",attributes:buttons_defineProperty({},r,t.cmdBtnRedoLabel)}]),c(d)}e.getConfig().showDevices=0;var p=i.addPanel({id:"devices-c"}),h=p.get("buttons");p.get("buttons").add([l,{id:"deviceDesktop",command:"set-device-desktop",className:"fa fa-desktop",attributes:{title:"Desktop"}},{id:"deviceTablet",command:"set-device-tablet",className:"fa fa-tablet",attributes:{title:"Tablet"}},{id:"deviceMobile",command:"set-device-mobile",className:"fa fa-mobile",attributes:{title:"Mobile"}}]),c(h)},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.StyleManager.getConfig().clearProperties=1,t.resetStyleManager){var r=e.StyleManager.getSectors();e.on("load",(function(){r.reset(),r.add([{name:"Dimension",open:!0,buildProps:["width","height","max-width","min-height","margin","padding"],properties:[{name:"Width",property:"full-width",type:"radio",defaults:"Normal",list:[{value:" ",name:"Normal"},{value:"full-width",name:"Full Width"}]},{property:"margin",properties:[{name:"Top",property:"margin-top"},{name:"Right",property:"margin-right"},{name:"Bottom",property:"margin-bottom"},{name:"Left",property:"margin-left"}]},{property:"padding",detached:!0,properties:[{name:"Top",property:"padding-top"},{name:"Right",property:"padding-right"},{name:"Bottom",property:"padding-bottom"},{name:"Left",property:"padding-left"}]},{property:"icon-size",type:"integer",defaults:"20px",units:["px","%"]},{property:"icon-padding",type:"integer",defaults:"0px",units:["px"]},{name:"Spacing",property:"inner-padding",defaults:"0 4px"}]},{name:"Typography",open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","vertical-align","align","text-decoration"],properties:[{name:"Font",property:"font-family"},{name:"Weight",property:"font-weight"},{name:"Font color",property:"color"},{property:"text-align",type:"radio",defaults:"left",list:[{value:"left",name:"Left",className:"fa fa-align-left"},{value:"center",name:"Center",className:"fa fa-align-center"},{value:"right",name:"Right",className:"fa fa-align-right"},{value:"justify",name:"Justify",className:"fa fa-align-justify"}]},{property:"vertical-align",type:"radio",defaults:"top",list:[{value:"top",name:"Top"},{value:"middle",name:"Middle"},{value:"bottom",name:"Bottom"}]},{property:"align",type:"radio",defaults:"left",list:[{value:"left",name:"Left",className:"fa fa-align-left"},{value:"center",name:"Center",className:"fa fa-align-center"},{value:"right",name:"Right",className:"fa fa-align-right"},{value:"justify",name:"Justify",className:"fa fa-align-justify"}]},{property:"text-decoration",type:"radio",defaults:"none",list:[{value:"none",name:"None",className:"fa fa-times"},{value:"underline",name:"underline",className:"fa fa-underline"},{value:"line-through",name:"Line-through",className:"fa fa-strikethrough"}]}]},{name:"Decorations",open:!1,buildProps:["background-color","container-background-color","background-url","background-repeat","background-size","border-radius","border"],properties:[{name:"Container Background color",property:"container-background-color",type:"color"},{property:"background-url",type:"file"},{property:"background-width",type:"integer",defaults:"0px",units:["px"]},{property:"background-height",type:"integer",defaults:"0px",units:["px"]},{property:"background-position",defaults:"center center"},{property:"icons-border-radius",name:"Icons Border radius",type:"composite",detached:!0,properties:[{name:"Border Radius",type:"integer",property:"border-radius",defaults:"0px",min:0,units:["px"]}]},{property:"border-radius",properties:[{name:"Top",property:"border-top-left-radius"},{name:"Right",property:"border-top-right-radius"},{name:"Bottom",property:"border-bottom-left-radius"},{name:"Left",property:"border-bottom-right-radius"}]},{property:"border-detached",name:"Border detached",type:"composite",detached:!0,properties:[{name:"Width",property:"border-width",units:["px"],type:"integer"},{name:"Style",property:"border-style",type:"select",list:[{value:"none"},{value:"solid"},{value:"dotted"},{value:"dashed"},{value:"double"},{value:"groove"},{value:"ridge"},{value:"inset"},{value:"outset"}]},{name:"Color",property:"border-color",type:"color"}]}]}])}))}};function src_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function src_objectSpread(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=e.getConfig(),i=e.SelectorManager.getConfig(),a=src_objectSpread({editor:e,cmdBtnMoveLabel:"Move",cmdBtnUndoLabel:"Undo",cmdBtnRedoLabel:"Redo",cmdBtnDesktopLabel:"Desktop",cmdBtnTabletLabel:"Tablet",cmdBtnMobileLabel:"Mobile",cmdBtnImportMjmlLabel:"Import MJML",cmdBtnEditHeadLabel:"Edit Head",expTplBtnTitle:"View Code",fullScrBtnTitle:"FullScreen",swichtVwBtnTitle:"View Components",defaultTemplate:"",categoryLabel:"",codeViewerTheme:"hopscotch",editorBackgroundColor:"#202835",canvasBackgroundStyle:"bluish",canvasLabelsColor:"#4b5666",importPlaceholder:"",modalTitleImport:"Import MJML",modalBtnImport:' Import',modalLabelImport:"",editHeadPlaceholder:"",modalTitleEditHead:"Edit Head",modalBtnEditHead:' Save',modalLabelEditHead:"Edit the mjml document head.",modalTitleExport:"Export MJML",modalLabelExport:"",overwriteExport:1,preMjml:"",postMjml:"",exportOnly:"",resetBlocks:1,resetStyleManager:1,showAttributesSidebar:1,cleanMjml:1,groupsPadding:"10px 0",columnsPadding:"10px 0",rawPadding:"10px 0"},t);r.devicePreviewMode=1,r.forceClass=0,r.devicePreviewMode=1,i.states=[],i.statesLabel="",[n,D,F,U,z].forEach((function(t){return t(e,a)}));var o=e.getWrapper();if(o.set({"custom-name":"Document",highlightable:!1,hoverable:!1,stylable:[]}),e.once("load",(function(){var t=document.querySelector(".gjs-one-bg");if(t&&getComputedStyle){var r=getComputedStyle(t).backgroundColor;e.addComponents(""))}var n=e.Panels.getButton("views","open-blocks");n&&n.set("active",!0),a.cleanMjml&&e.Commands.run("clean-mjml")})),e.on("component:selected",(function(t){var r;e.Panels.getButton("views","open-layers").get("active")||(r=["mj-font","mj-social-element"].some((function(e){return t.is(e)}))?e.Panels.getButton("views","open-tm"):t.is("mj-title")||t.is("mj-preview")?e.Panels.getButton("views","open-layers"):e.Panels.getButton("views","open-sm"))&&r.set("active",!0)})),"string"==typeof a.canvasBackgroundStyle){var s=a.canvasBackgroundStyle.trim();switch(s){case"light":s="#777 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAEdJREFUOBFjvHHjxn8GIsCHDx+IUMXAwESUKhIUjRpIQmDhUDoahjgChgRhFmJzgICAAFHGjkYKUcGEV9FoGOINHqIkqR6GAJ33CYE3jHXLAAAAAElFTkSuQmCC) repeat";break;case"dark":s="#333 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAEdJREFUOBFjlJdX/M9ABGBn5yBCFQMDE1GqSFA0aiAJgYVD6WgY4ggYEoRZiM0BP3/+IMrY0UghKpjwKhoNQ7zBQ5Qk1cMQALltBJ5hJt7LAAAAAElFTkSuQmCC) repeat";break;case"bluish":s="#202835 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAEdJREFUOBFjVFLS/s9ABGBhYSZCFQMDE1GqSFA0aiAJgYVD6WgY4ggYEoRZiM0Bf/78JcrY0UghKpjwKhoNQ7zBQ5Qk1cMQANkCBKPxiitEAAAAAElFTkSuQmCC) repeat";break;default:s=a.canvasBackgroundStyle}e.getWrapper().addStyle({background:s})}if("string"==typeof a.editorBackgroundColor){var u=a.editorBackgroundColor,c=document.createElement("style");c.textContent=".gjs-one-bg {background:".concat(u," !important;}"),document.body.appendChild(c)}if(a.resetDevices){var l=e.DeviceManager;l.getAll().reset(),l.add("Desktop",""),l.add("Mobile","320px"),l.add("Tablet","820px")}}}]).default}));
\ No newline at end of file
+ */(function(){function n(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function t(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i"']/g,J=RegExp($.source),Q=RegExp(Y.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,vt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bt=/[\\^$.*+?()[\]{}|]/g,nr=RegExp(Bt.source),en=/^\s+|\s+$/g,tn=/^\s+/,rn=/\s+$/,nn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,on=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,un=/\\(\\)?/g,cn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ln=/\w*$/,fn=/^[-+]0x[0-9a-f]+$/i,dn=/^0b[01]+$/i,pn=/^\[object .+?Constructor\]$/,hn=/^0o[0-7]+$/i,gn=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_n=/($^)/,mn=/['\n\r\u2028\u2029\\]/g,yn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",vn="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+yn,wn=RegExp("['’]","g"),xn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Sn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+yn,"g"),kn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",vn].join("|"),"g"),jn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Dn={};Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=!0,Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object Boolean]"]=Dn["[object DataView]"]=Dn["[object Date]"]=Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object WeakMap]"]=!1;var Bn={};Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object DataView]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object Symbol]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=!0,Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object WeakMap]"]=!1;var Pn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},In=parseFloat,Ln=parseInt,zn="object"==typeof w&&w&&w.Object===Object&&w,Wn="object"==typeof self&&self&&self.Object===Object&&self,Hn=zn||Wn||Function("return this")(),Vn=E&&!E.nodeType&&E,Kn=Vn&&"object"==typeof T&&T&&!T.nodeType&&T,Gn=Kn&&Kn.exports===Vn,$n=Gn&&zn.process,Yn=function(){try{var e=Kn&&Kn.f&&Kn.f("util").types;return e||$n&&$n.binding&&$n.binding("util")}catch(e){}}(),Jn=Yn&&Yn.isArrayBuffer,Xn=Yn&&Yn.isDate,ei=Yn&&Yn.isMap,ti=Yn&&Yn.isRegExp,ri=Yn&&Yn.isSet,ni=Yn&&Yn.isTypedArray,ii=b("length"),ai=x({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),oi=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),si=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ui=function x(T){function An(e){if(yu(e)&&!co(e)&&!(e instanceof Un)){if(e instanceof On)return e;if(li.call(e,"__wrapped__"))return Fe(e)}return new On(e)}function En(){}function On(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=N}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function _t(e,t,n,i,a,o){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=a?n(e,i,a,o):n(e)),s!==N)return s;if(!du(e))return e;if(i=co(e)){if(s=function me(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&li.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Ur(e,s)}else{var f=ya(e),d="[object Function]"==f||"[object GeneratorFunction]"==f;if(fo(e))return Ir(e,u);if("[object Object]"==f||"[object Arguments]"==f||d&&!a){if(s=c||d?{}:Ae(e),!u)return c?function Mr(e,t){return Cr(e,ma(e),t)}(e,function lt(e,t){return e&&Cr(t,Bu(t),e)}(s,e)):function Dr(e,t){return Cr(e,_a(e),t)}(e,at(s,e))}else{if(!Bn[f])return a?e:{};s=function Ee(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Rr(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return t=r?Rr(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return zr(e,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return(t=new e.constructor(e.source,ln.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return new n;case"[object Symbol]":return aa?zn(aa.call(e)):{}}}(e,f,u)}}if(o||(o=new Zn),a=o.get(e))return a;o.set(e,s),bo(e)?e.forEach((function(r){s.add(_t(r,t,n,r,e,o))})):ho(e)&&e.forEach((function(r,i){s.set(i,_t(r,t,n,i,e,o))}));c=l?c?ve:_e:c?Bu:Wu;var p=i?N:c(e);return r(p||e,(function(r,i){p&&(r=e[i=r]),ot(s,i,_t(r,t,n,i,e,o))})),s}function gt(e,t,r){var n=r.length;if(null==e)return!n;for(e=zn(e);n--;){var i=r[n],a=t[i],o=e[i];if(o===N&&!(i in e)||!a(o))return!1}return!0}function dt(e,t,r){if("function"!=typeof e)throw new Kn("Expected a function");return xa((function(){e.apply(N,r)}),t)}function yt(e,t,r,n){var i=-1,a=o,s=!0,u=e.length,l=[],d=t.length;if(!u)return l;r&&(t=c(t,k(r))),n?(a=f,s=!1):200<=t.length&&(a=O,s=!1,t=new Nn(t));e:for(;++it}function Rt(e,t){return null!=e&&li.call(e,t)}function zt(e,t){return null!=e&&t in zn(e)}function Wt(e,t,r){for(var n=r?f:o,i=e[0].length,a=e.length,s=a,u=P(a),l=1/0,d=[];s--;){var p=e[s];s&&t&&(p=c(p,k(t))),l=Fi(p.length,l),u[s]=!r&&(t||120<=i&&120<=p.length)?new Nn(s&&p):N}p=e[0];var h=-1,g=u[0];e:for(;++h(t=Sr(t,e)).length?e:kt(e,hr(t,0,-1)))?e:e[Me(Ve(t))])?N:n(t,e,r)}function Ut(e){return yu(e)&&"[object Arguments]"==Ot(e)}function Mt(e,t,r,n,i){if(e===t)t=!0;else if(null==e||null==t||!yu(e)&&!yu(t))t=e!=e&&t!=t;else e:{var a,o,s=co(e),u=co(t),c="[object Object]"==(a="[object Arguments]"==(a=s?"[object Array]":ya(e))?"[object Object]":a);u="[object Object]"==(o="[object Arguments]"==(o=u?"[object Array]":ya(t))?"[object Object]":o);if((o=a==o)&&fo(e)){if(!fo(t)){t=!1;break e}s=!0,c=!1}if(o&&!c)i||(i=new Zn),t=s||_o(e)?se(e,t,r,n,Mt,i):function he(e,t,r,n,i,a,o){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!a(new yi(e),new yi(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return lu(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=W;case"[object Set]":if(s||(s=U),e.size!=t.size&&!(1&n))break;return(r=o.get(e))?r==t:(n|=2,o.set(e,t),t=se(s(e),s(t),n,i,a,o),o.delete(e),t);case"[object Symbol]":if(aa)return aa.call(e)==aa.call(t)}return!1}(e,t,a,r,n,Mt,i);else{if(!(1&r)&&(s=c&&li.call(e,"__wrapped__"),a=u&&li.call(t,"__wrapped__"),s||a)){e=s?e.value():e,t=a?t.value():t,i||(i=new Zn),t=Mt(e,t,r,n,i);break e}if(o)t:if(i||(i=new Zn),s=1&r,a=_e(e),u=a.length,o=_e(t).length,u==o||s){for(c=u;c--;){var l=a[c];if(!(s?l in t:li.call(t,l))){t=!1;break t}}if((o=i.get(e))&&i.get(t))t=o==t;else{o=!0,i.set(e,t),i.set(t,e);for(var f=s;++ct?r:0,r)?e[t]:N}function Xt(e,t,r){var n=-1;return t=c(t.length?t:[$u],k(ye())),function w(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].c;return e}(e=Gt(e,(function(e){return{a:c(t,(function(t){return t(e)})),b:++n,c:e}})),(function(e,t){var n;e:{n=-1;for(var i=e.a,a=t.a,o=i.length,s=r.length;++n=s?u:u*("desc"==r[n]?-1:1);break e}}n=e.b-t.b}return n}))}function tr(e,t,r){for(var n=-1,i=t.length,a={};++nt||9007199254740991t&&(t=-t>i?0:i+t),0>(r=r>i?i:r)&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0,r=P(i);++n=i){for(;n>>1,o=e[a];null!==o&&!wu(o)&&(r?o<=t:o(t=Sr(t,e)).length?e:kt(e,hr(t,0,-1)))||delete e[Me(Ve(t))]}function jr(e,t,r,n){for(var i=e.length,a=n?i:-1;(n?a--:++an)return n?br(e[0]):[];for(var i=-1,a=P(n);++i=n?e:hr(e,t,r)}function Ir(e,t){if(t)return e.slice();var r=e.length;r=vi?vi(r):new e.constructor(r);return e.copy(r),r}function Rr(e){var t=new e.constructor(e.byteLength);return new yi(t).set(new yi(e)),t}function zr(e,t){return new e.constructor(t?Rr(e.buffer):e.buffer,e.byteOffset,e.length)}function Wr(e,t){if(e!==t){var r=e!==N,n=null===e,i=e==e,a=wu(e),o=t!==N,s=null===t,u=t==t,c=wu(t);if(!s&&!c&&!a&&e>t||a&&o&&u&&!s&&!c||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!c&&ei?N:a,i=1),t=zn(t);++na&&o[0]!==c&&o[a-1]!==c?[]:L(o,c)).length)r?r?or(t,e):t:(r=or(t,Ri(e/D(t))),jn.test(t)?Or(M(r),0,e).join(""):r.slice(0,e))}function te(e,t,r,a){var o=1&t,s=Vr(e);return function i(){for(var t=-1,u=arguments.length,c=-1,l=a.length,f=P(l+u),d=this&&this!==Hn&&this instanceof i?s:e;++ct||n)&&(1&e&&(a[2]=d[2],t|=1&r?0:4),(r=d[3])&&(n=a[3],a[3]=n?Br(n,r,d[4]):r,a[4]=n?L(a[3],"__lodash_placeholder__"):d[4]),(r=d[5])&&(n=a[5],a[5]=n?Lr(n,r,d[6]):r,a[6]=n?L(a[5],"__lodash_placeholder__"):d[6]),(r=d[7])&&(a[7]=r),128&e&&(a[8]=null==a[8]?d[8]:Fi(a[8],d[8])),null==a[9]&&(a[9]=d[9]),a[0]=d[0],a[1]=t),e=a[0],t=a[1],r=a[2],n=a[3],i=a[4],!(s=a[9]=a[9]===N?u?0:e.length:qi(a[9]-c,0))&&24&t&&(t&=-25),Ue((d?da:wa)(t&&1!=t?8==t||16==t?Kr(e,t,s):32!=t&&33!=t||i.length?Jr.apply(N,a):te(e,t,r,n):function Pr(t,r,n){var i=1&r,a=Vr(t);return function e(){return(this&&this!==Hn&&this instanceof e?a:t).apply(i?n:this,arguments)}}(e,t,r),a),e,t)}function ce(e,t,r,n){return e===N||lu(e,Yn[r])&&!li.call(n,r)?t:e}function ae(e,t,r,n,i,a){return du(e)&&du(t)&&(a.set(t,e),Yt(e,t,N,ae,a),a.delete(t)),e}function le(e){return xu(e)?N:e}function se(e,t,r,n,i,a){var o=1&r,s=e.length;if(s!=(u=t.length)&&!(o&&u>s))return!1;if((u=a.get(e))&&a.get(t))return u==t;var u=-1,c=!0,l=2&r?new Nn:N;for(a.set(e,t),a.set(t,e);++u(r=null==r?0:Eu(r))&&(r=qi(n+r,0)),_(e,ye(t,3),r)):-1}function Pe(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==N&&(i=Eu(r),i=0>r?qi(n+i,0):Fi(i,n-1)),_(e,ye(t,3),i,!0)}function Ze(e){return null!=e&&e.length?wt(e,1):[]}function qe(e){return e&&e.length?e[0]:N}function Ve(e){var t=null==e?0:e.length;return t?e[t-1]:N}function Ke(e,t){return e&&e.length&&t&&t.length?er(e,t):e}function Ge(e){return null==e?e:Hi.call(e)}function He(e){if(!e||!e.length)return[];var t=0;return e=i(e,(function(e){if(hu(e))return t=qi(e.length,t),!0})),A(t,(function(t){return c(e,b(t))}))}function Je(e,t){if(!e||!e.length)return[];var r=He(e);return null==t?r:c(r,(function(e){return n(t,N,e)}))}function Ye(e){return(e=An(e)).__chain__=!0,e}function Qe(e,t){return t(e)}function nu(e,t){return(co(e)?r:ua)(e,ye(t,3))}function tu(t,r){return(co(t)?e:ca)(t,ye(r,3))}function ru(e,t){return(co(e)?c:Gt)(e,ye(t,3))}function eu(e,t,r){return t=r?N:t,t=e&&null==t?e.length:t,fe(e,128,N,N,N,N,t)}function uu(e,t){var r;if("function"!=typeof t)throw new Kn("Expected a function");return e=Eu(e),function(){return 0<--e&&(r=t.apply(this,arguments)),1>=e&&(t=N),r}}function fu(t,r,n){function e(e){var r=a,n=s;return a=s=N,h=e,l=t.apply(n,r)}function u(e){var t=e-p;return e-=h,p===N||t>=r||0>t||b&&e>=c}function i(){var e=Qa();if(u(e))return o(e);var t,n=xa;t=e-h,e=r-(e-p),t=b?Fi(e,c-t):e,d=n(i,t)}function o(t){return d=N,_&&a?e(t):(a=s=N,l)}function f(){var t=Qa(),n=u(t);if(a=arguments,s=this,p=t,n){if(d===N)return h=t=p,d=xa(i,r),g?e(t):l;if(b)return ha(d),d=xa(i,r),e(p)}return d===N&&(d=xa(i,r)),l}var a,s,c,l,d,p,h=0,g=!1,b=!1,_=!0;if("function"!=typeof t)throw new Kn("Expected a function");return r=Su(r)||0,du(n)&&(g=!!n.leading,c=(b="maxWait"in n)?qi(Su(n.maxWait)||0,r):c,_="trailing"in n?!!n.trailing:_),f.cancel=function(){d!==N&&ha(d),h=0,a=p=s=d=N},f.flush=function(){return d===N?l:o(Qa())},f}function cu(e,t){function r(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;return a.has(i)?a.get(i):(n=e.apply(this,n),r.cache=a.set(i,n)||a,n)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Kn("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(e){if("function"!=typeof e)throw new Kn("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function lu(e,t){return e===t||e!=e&&t!=t}function su(e){return null!=e&&gu(e.length)&&!_u(e)}function hu(e){return yu(e)&&su(e)}function pu(e){if(!yu(e))return!1;var t=Ot(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!xu(e)}function _u(e){return!!du(e)&&("[object Function]"==(e=Ot(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function vu(e){return"number"==typeof e&&e==Eu(e)}function gu(e){return"number"==typeof e&&-1=e}function du(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function yu(e){return null!=e&&"object"==typeof e}function bu(e){return"number"==typeof e||yu(e)&&"[object Number]"==Ot(e)}function xu(e){return!(!yu(e)||"[object Object]"!=Ot(e))&&(null===(e=wi(e))||"function"==typeof(e=li.call(e,"constructor")&&e.constructor)&&e instanceof e&&ci.call(e)==hi)}function ju(e){return"string"==typeof e||!co(e)&&yu(e)&&"[object String]"==Ot(e)}function wu(e){return"symbol"==typeof e||yu(e)&&"[object Symbol]"==Ot(e)}function mu(e){if(!e)return[];if(su(e))return ju(e)?M(e):Ur(e);if(Ei&&e[Ei]){e=e[Ei]();for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}return("[object Map]"==(t=ya(e))?W:"[object Set]"==t?U:Uu)(e)}function Au(e){return e?(e=Su(e))===q||e===-q?17976931348623157e292*(0>e?-1:1):e==e?e:0:0===e?e:0}function Eu(e){var t=(e=Au(e))%1;return e==e?t?e-t:e:0}function ku(e){return e?pt(Eu(e),0,4294967295):0}function Su(e){if("number"==typeof e)return e;if(wu(e))return F;if(du(e)&&(e=du(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(en,"");var t=dn.test(e);return t||hn.test(e)?Ln(e.slice(2),t?2:8):fn.test(e)?F:+e}function Ou(e){return Cr(e,Bu(e))}function Iu(e){return null==e?"":yr(e)}function Ru(e,t,r){return(e=null==e?N:kt(e,t))===N?r:e}function zu(e,t){return null!=e&&we(e,t,zt)}function Wu(e){return su(e)?qn(e):Vt(e)}function Bu(e){if(su(e))e=qn(e,!0);else if(du(e)){var t,r=ze(e),n=[];for(t in e)("constructor"!=t||!r&&li.call(e,t))&&n.push(t);e=n}else{if(t=[],null!=e)for(r in zn(e))t.push(r);e=t}return e}function Lu(e,t){if(null==e)return{};var r=c(ve(e),(function(e){return[e]}));return t=ye(t),tr(e,r,(function(e,r){return t(e,r[0])}))}function Uu(e){return null==e?[]:S(e,Wu(e))}function Cu(e){return Wo(Iu(e).toLowerCase())}function Du(e){return(e=Iu(e))&&e.replace(bn,ai).replace(xn,"")}function Mu(e,t,r){return e=Iu(e),(t=r?N:t)===N?Cn.test(e)?e.match(kn)||[]:e.match(sn)||[]:e.match(t)||[]}function Tu(e){return function(){return e}}function $u(e){return e}function Fu(e){return qt("function"==typeof e?e:_t(e,1))}function Nu(e,t,n){var i=Wu(t),o=Et(t,i);null!=n||du(t)&&(o.length||!i.length)||(n=t,t=e,e=this,o=Et(t,Wu(t)));var s=!(du(n)&&"chain"in n&&!n.chain),u=_u(e);return r(o,(function(r){var n=t[r];e[r]=n,u&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,a([this.value()],arguments))})})),e}function Pu(){}function Zu(e){return Ie(e)?b(Me(e)):function rr(e){return function(t){return kt(t,e)}}(e)}function qu(){return[]}function Vu(){return!1}var P=(T=null==T?Hn:ui.defaults(Hn.Object(),T,ui.pick(Hn,Rn))).Array,yn=T.Date,vn=T.Error,Sn=T.Function,Pn=T.Math,zn=T.Object,Wn=T.RegExp,Vn=T.String,Kn=T.TypeError,$n=P.prototype,Yn=zn.prototype,ii=T["__core-js_shared__"],ci=Sn.prototype.toString,li=Yn.hasOwnProperty,fi=0,di=function(){var e=/[^.]+$/.exec(ii&&ii.keys&&ii.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pi=Yn.toString,hi=ci.call(zn),gi=Hn._,bi=Wn("^"+ci.call(li).replace(Bt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_i=Gn?T.Buffer:N,mi=T.Symbol,yi=T.Uint8Array,vi=_i?_i.g:N,wi=B(zn.getPrototypeOf,zn),xi=zn.create,Si=Yn.propertyIsEnumerable,Ai=$n.splice,ki=mi?mi.isConcatSpreadable:N,Ei=mi?mi.iterator:N,ji=mi?mi.toStringTag:N,Oi=function(){try{var e=je(zn,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ci=T.clearTimeout!==Hn.clearTimeout&&T.clearTimeout,Mi=yn&&yn.now!==Hn.Date.now&&yn.now,Ti=T.setTimeout!==Hn.setTimeout&&T.setTimeout,Ri=Pn.ceil,Di=Pn.floor,Bi=zn.getOwnPropertySymbols,Pi=_i?_i.isBuffer:N,Ii=T.isFinite,Li=$n.join,Ni=B(zn.keys,zn),qi=Pn.max,Fi=Pn.min,Ui=yn.now,zi=T.parseInt,Wi=Pn.random,Hi=$n.reverse,Vi=je(T,"DataView"),Ki=je(T,"Map"),Gi=je(T,"Promise"),$i=je(T,"Set"),Yi=je(T,"WeakMap"),Ji=je(zn,"create"),Qi=Yi&&new Yi,Zi={},Xi=Te(Vi),ea=Te(Ki),ta=Te(Gi),ra=Te($i),na=Te(Yi),ia=mi?mi.prototype:N,aa=ia?ia.valueOf:N,oa=ia?ia.toString:N,sa=function(){function n(){}return function(e){return du(e)?xi?xi(e):(n.prototype=e,e=new n,n.prototype=N,e):{}}}();An.templateSettings={escape:Z,evaluate:X,interpolate:tt,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=sa(En.prototype),On.prototype.constructor=On,Un.prototype=sa(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Ji?Ji(null):{},this.size=0},Mn.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Mn.prototype.get=function(e){var t=this.__data__;return Ji?"__lodash_hash_undefined__"===(e=t[e])?N:e:li.call(t,e)?t[e]:N},Mn.prototype.has=function(e){var t=this.__data__;return Ji?t[e]!==N:li.call(t,e)},Mn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ji&&t===N?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(e){var t=this.__data__;return!(0>(e=ft(t,e))||(e==t.length-1?t.pop():Ai.call(t,e,1),--this.size,0))},Tn.prototype.get=function(e){var t=this.__data__;return 0>(e=ft(t,e))?N:t[e][1]},Tn.prototype.has=function(e){return-1n?(++this.size,r.push([e,t])):r[n][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ki||Tn),string:new Mn}},Fn.prototype.delete=function(e){return e=be(this,e).delete(e),this.size-=e?1:0,e},Fn.prototype.get=function(e){return be(this,e).get(e)},Fn.prototype.has=function(e){return be(this,e).has(e)},Fn.prototype.set=function(e,t){var r=be(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Nn.prototype.add=Nn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Tn){var n=r.__data__;if(!Ki||199>n.length)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Fn(n)}return r.set(e,t),this.size=r.size,this};var ua=Fr(mt),ca=Fr(At,!0),la=Nr(),fa=Nr(!0),da=Qi?function(e,t){return Qi.set(e,t),e}:$u,pa=Oi?function(e,t){return Oi(e,"toString",{configurable:!0,enumerable:!1,value:Tu(t),writable:!0})}:$u,ha=Ci||function(e){return Hn.clearTimeout(e)},ga=$i&&1/U(new $i([,-0]))[1]==q?function(e){return new $i(e)}:Pu,ba=Qi?function(e){return Qi.get(e)}:Pu,_a=Bi?function(e){return null==e?[]:(e=zn(e),i(Bi(e),(function(t){return Si.call(e,t)})))}:qu,ma=Bi?function(e){for(var t=[];e;)a(t,_a(e)),e=wi(e);return t}:qu,ya=Ot;(Vi&&"[object DataView]"!=ya(new Vi(new ArrayBuffer(1)))||Ki&&"[object Map]"!=ya(new Ki)||Gi&&"[object Promise]"!=ya(Gi.resolve())||$i&&"[object Set]"!=ya(new $i)||Yi&&"[object WeakMap]"!=ya(new Yi))&&(ya=function(e){var t=Ot(e);if(e=(e="[object Object]"==t?e.constructor:N)?Te(e):"")switch(e){case Xi:return"[object DataView]";case ea:return"[object Map]";case ta:return"[object Promise]";case ra:return"[object Set]";case na:return"[object WeakMap]"}return t});var va=ii?_u:Vu,wa=Ce(da),xa=Ti||function(e,t){return Hn.setTimeout(e,t)},Sa=Ce(pa),Aa=function(e){var t=(e=cu(e,(function(e){return 500===t.size&&t.clear(),e}))).cache;return e}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(vt,(function(e,r,n,i){t.push(n?i.replace(un,"$1"):r||e)})),t})),ka=fr((function(e,t){return hu(e)?yt(e,wt(t,1,hu,!0)):[]})),Ea=fr((function(e,t){var r=Ve(t);return hu(r)&&(r=N),hu(e)?yt(e,wt(t,1,hu,!0),ye(r,2)):[]})),ja=fr((function(e,t){var r=Ve(t);return hu(r)&&(r=N),hu(e)?yt(e,wt(t,1,hu,!0),N,r):[]})),Oa=fr((function(e){var t=c(e,Er);return t.length&&t[0]===e[0]?Wt(t):[]})),Ca=fr((function(e){var t=Ve(e),r=c(e,Er);return t===Ve(r)?t=N:r.pop(),r.length&&r[0]===e[0]?Wt(r,ye(t,2)):[]})),Ma=fr((function(e){var t=Ve(e),r=c(e,Er);return(t="function"==typeof t?t:N)&&r.pop(),r.length&&r[0]===e[0]?Wt(r,N,t):[]})),Ta=fr(Ke),Ra=pe((function(e,t){var r=null==e?0:e.length,n=ht(e,t);return ur(e,c(t,(function(e){return Se(e,r)?+e:e})).sort(Wr)),n})),Da=fr((function(e){return br(wt(e,1,hu,!0))})),Ba=fr((function(e){var t=Ve(e);return hu(t)&&(t=N),br(wt(e,1,hu,!0),ye(t,2))})),Pa=fr((function(e){var t="function"==typeof(t=Ve(e))?t:N;return br(wt(e,1,hu,!0),N,t)})),Ia=fr((function(e,t){return hu(e)?yt(e,t):[]})),La=fr((function(e){return mr(i(e,hu))})),Na=fr((function(e){var t=Ve(e);return hu(t)&&(t=N),mr(i(e,hu),ye(t,2))})),qa=fr((function(e){var t="function"==typeof(t=Ve(e))?t:N;return mr(i(e,hu),N,t)})),Fa=fr(He),Ua=fr((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:N)?(e.pop(),t):N;return Je(e,t)})),za=pe((function(e){function t(t){return ht(t,e)}var r=e.length,n=r?e[0]:0,i=this.__wrapped__;return!(1=t})),uo=Ut(function(){return arguments}())?Ut:function(e){return yu(e)&&li.call(e,"callee")&&!Si.call(e,"callee")},co=P.isArray,lo=Jn?k(Jn):function Ct(e){return yu(e)&&"[object ArrayBuffer]"==Ot(e)},fo=Pi||Vu,po=Xn?k(Xn):function Dt(e){return yu(e)&&"[object Date]"==Ot(e)},ho=ei?k(ei):function Tt(e){return yu(e)&&"[object Map]"==ya(e)},go=ti?k(ti):function Nt(e){return yu(e)&&"[object RegExp]"==Ot(e)},bo=ri?k(ri):function Pt(e){return yu(e)&&"[object Set]"==ya(e)},_o=ni?k(ni):function Zt(e){return yu(e)&&gu(e.length)&&!!Dn[Ot(e)]},mo=ee(Kt),yo=ee((function(e,t){return e<=t})),vo=$r((function(e,t){if(ze(t)||su(t))Cr(t,Wu(t),e);else for(var r in t)li.call(t,r)&&ot(e,r,t[r])})),wo=$r((function(e,t){Cr(t,Bu(t),e)})),xo=$r((function(e,t,r,n){Cr(t,Bu(t),e,n)})),So=$r((function(e,t,r,n){Cr(t,Wu(t),e,n)})),Ao=pe(ht),ko=fr((function(e,t){e=zn(e);var r=-1,n=t.length;for((i=2--e)return t.apply(this,arguments)}},An.ary=eu,An.assign=vo,An.assignIn=wo,An.assignInWith=xo,An.assignWith=So,An.at=Ao,An.before=uu,An.bind=Za,An.bindAll=Vo,An.bindKey=Xa,An.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return co(e)?e:[e]},An.chain=Ye,An.chunk=function(e,t,r){if(t=(r?Oe(e,t,r):t===N)?1:qi(Eu(t),0),!(r=null==e?0:e.length)||1>t)return[];for(var n=0,i=0,a=P(Ri(r/t));n(t=r||t===N?1:Eu(t))?0:t,n):[]},An.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?hr(e,0,0>(t=n-(t=r||t===N?1:Eu(t)))?0:t):[]},An.dropRightWhile=function(e,t){return e&&e.length?jr(e,ye(t,3),!0,!0):[]},An.dropWhile=function(e,t){return e&&e.length?jr(e,ye(t,3),!0):[]},An.fill=function(e,t,r,n){var i=null==e?0:e.length;if(!i)return[];for(r&&"number"!=typeof r&&Oe(e,t,r)&&(r=0,n=i),i=e.length,0>(r=Eu(r))&&(r=-r>i?0:i+r),0>(n=n===N||n>i?i:Eu(n))&&(n+=i),n=r>n?0:ku(n);r>>0)?(e=Iu(e))&&("string"==typeof t||null!=t&&!go(t))&&(!(t=yr(t))&&jn.test(e))?Or(M(e),0,r):e.split(t,r):[]},An.spread=function(e,t){if("function"!=typeof e)throw new Kn("Expected a function");return t=null==t?0:qi(Eu(t),0),fr((function(r){var i=r[t];return r=Or(r,0,t),i&&a(r,i),n(e,this,r)}))},An.tail=function(e){var t=null==e?0:e.length;return t?hr(e,1,t):[]},An.take=function(e,t,r){return e&&e.length?hr(e,0,0>(t=r||t===N?1:Eu(t))?0:t):[]},An.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?hr(e,0>(t=n-(t=r||t===N?1:Eu(t)))?0:t,n):[]},An.takeRightWhile=function(e,t){return e&&e.length?jr(e,ye(t,3),!1,!0):[]},An.takeWhile=function(e,t){return e&&e.length?jr(e,ye(t,3)):[]},An.tap=function(e,t){return t(e),e},An.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Kn("Expected a function");return du(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),fu(e,t,{leading:n,maxWait:t,trailing:i})},An.thru=Qe,An.toArray=mu,An.toPairs=Bo,An.toPairsIn=Po,An.toPath=function(e){return co(e)?c(e,Me):wu(e)?[e]:Ur(Aa(Iu(e)))},An.toPlainObject=Ou,An.transform=function(e,t,n){var i=co(e),a=i||fo(e)||_o(e);if(t=ye(t,4),null==n){var o=e&&e.constructor;n=a?i?new o:[]:du(e)&&_u(o)?sa(wi(e)):{}}return(a?r:mt)(e,(function(e,r,i){return t(n,e,r,i)})),n},An.unary=function(e){return eu(e,1)},An.union=Da,An.unionBy=Ba,An.unionWith=Pa,An.uniq=function(e){return e&&e.length?br(e):[]},An.uniqBy=function(e,t){return e&&e.length?br(e,ye(t,2)):[]},An.uniqWith=function(e,t){return t="function"==typeof t?t:N,e&&e.length?br(e,N,t):[]},An.unset=function(e,t){return null==e||xr(e,t)},An.unzip=He,An.unzipWith=Je,An.update=function(e,t,r){return null==e?e:lr(e,t,kr(r)(kt(e,t)),void 0)},An.updateWith=function(e,t,r,n){return n="function"==typeof n?n:N,null!=e&&(e=lr(e,t,kr(r)(kt(e,t)),n)),e},An.values=Uu,An.valuesIn=function(e){return null==e?[]:S(e,Bu(e))},An.without=Ia,An.words=Mu,An.wrap=function(e,t){return no(kr(t),e)},An.xor=La,An.xorBy=Na,An.xorWith=qa,An.zip=Fa,An.zipObject=function(e,t){return Ar(e||[],t||[],ot)},An.zipObjectDeep=function(e,t){return Ar(e||[],t||[],lr)},An.zipWith=Ua,An.entries=Bo,An.entriesIn=Po,An.extend=wo,An.extendWith=xo,Nu(An,An),An.add=ts,An.attempt=Ho,An.camelCase=Io,An.capitalize=Cu,An.ceil=rs,An.clamp=function(e,t,r){return r===N&&(r=t,t=N),r!==N&&(r=(r=Su(r))==r?r:0),t!==N&&(t=(t=Su(t))==t?t:0),pt(Su(e),t,r)},An.clone=function(e){return _t(e,4)},An.cloneDeep=function(e){return _t(e,5)},An.cloneDeepWith=function(e,t){return _t(e,5,t="function"==typeof t?t:N)},An.cloneWith=function(e,t){return _t(e,4,t="function"==typeof t?t:N)},An.conformsTo=function(e,t){return null==t||gt(e,t,Wu(t))},An.deburr=Du,An.defaultTo=function(e,t){return null==e||e!=e?t:e},An.divide=ns,An.endsWith=function(e,t,r){e=Iu(e),t=yr(t);var n=e.length;n=r=r===N?n:pt(Eu(r),0,n);return 0<=(r-=t.length)&&e.slice(r,n)==t},An.eq=lu,An.escape=function(e){return(e=Iu(e))&&Q.test(e)?e.replace(Y,oi):e},An.escapeRegExp=function(e){return(e=Iu(e))&&nr.test(e)?e.replace(Bt,"\\$&"):e},An.every=function(e,t,r){var n=co(e)?u:bt;return r&&Oe(e,t,r)&&(t=N),n(e,ye(t,3))},An.find=Ha,An.findIndex=Ne,An.findKey=function(e,t){return p(e,ye(t,3),mt)},An.findLast=Va,An.findLastIndex=Pe,An.findLastKey=function(e,t){return p(e,ye(t,3),At)},An.floor=is,An.forEach=nu,An.forEachRight=tu,An.forIn=function(e,t){return null==e?e:la(e,ye(t,3),Bu)},An.forInRight=function(e,t){return null==e?e:fa(e,ye(t,3),Bu)},An.forOwn=function(e,t){return e&&mt(e,ye(t,3))},An.forOwnRight=function(e,t){return e&&At(e,ye(t,3))},An.get=Ru,An.gt=oo,An.gte=so,An.has=function(e,t){return null!=e&&we(e,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(e,t,r,n){return e=su(e)?e:Uu(e),r=r&&!n?Eu(r):0,n=e.length,0>r&&(r=qi(n+r,0)),ju(e)?r<=n&&-1(r=null==r?0:Eu(r))&&(r=qi(n+r,0)),v(e,t,r)):-1},An.inRange=function(e,t,r){return t=Au(t),r===N?(r=t,t=0):r=Au(r),(e=Su(e))>=Fi(t,r)&&e=e},An.isSet=bo,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_o,An.isUndefined=function(e){return e===N},An.isWeakMap=function(e){return yu(e)&&"[object WeakMap]"==ya(e)},An.isWeakSet=function(e){return yu(e)&&"[object WeakSet]"==Ot(e)},An.join=function(e,t){return null==e?"":Li.call(e,t)},An.kebabCase=Lo,An.last=Ve,An.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;if(r!==N&&(i=0>(i=Eu(r))?qi(n+i,0):Fi(i,n-1)),t==t){for(r=i+1;r--&&e[r]!==t;);e=r}else e=_(e,d,i,!0);return e},An.lowerCase=No,An.lowerFirst=qo,An.lt=mo,An.lte=yo,An.max=function(e){return e&&e.length?xt(e,$u,It):N},An.maxBy=function(e,t){return e&&e.length?xt(e,ye(t,2),It):N},An.mean=function(e){return y(e,$u)},An.meanBy=function(e,t){return y(e,ye(t,2))},An.min=function(e){return e&&e.length?xt(e,$u,Kt):N},An.minBy=function(e,t){return e&&e.length?xt(e,ye(t,2),Kt):N},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){return""},An.stubTrue=function(){return!0},An.multiply=as,An.nth=function(e,t){return e&&e.length?Qt(e,Eu(t)):N},An.noConflict=function(){return Hn._===this&&(Hn._=gi),this},An.noop=Pu,An.now=Qa,An.pad=function(e,t,r){e=Iu(e);var n=(t=Eu(t))?D(e):0;return!t||n>=t?e:ne(Di(t=(t-n)/2),r)+e+ne(Ri(t),r)},An.padEnd=function(e,t,r){e=Iu(e);var n=(t=Eu(t))?D(e):0;return t&&nt){var n=e;e=t,t=n}return r||e%1||t%1?(r=Wi(),Fi(e+r*(t-e+In("1e-"+((r+"").length-1))),t)):ir(e,t)},An.reduce=function(e,t,r){var n=co(e)?l:j,i=3>arguments.length;return n(e,ye(t,4),r,i,ua)},An.reduceRight=function(e,t,r){var n=co(e)?s:j,i=3>arguments.length;return n(e,ye(t,4),r,i,ca)},An.repeat=function(e,t,r){return t=(r?Oe(e,t,r):t===N)?1:Eu(t),or(Iu(e),t)},An.replace=function(){var e=arguments,t=Iu(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},An.result=function(e,t,r){var n=-1,i=(t=Sr(t,e)).length;for(i||(i=1,e=N);++n(e=Eu(e))||9007199254740991=a)return e;if(1>(a=r-D(n)))return n;if(r=o?Or(o,0,a).join(""):e.slice(0,a),i===N)return r+n;if(o&&(a+=r.length-a),go(i)){if(e.slice(a).search(i)){var s=r;for(i.global||(i=Wn(i.source,Iu(ln.exec(i))+"g")),i.lastIndex=0;o=i.exec(s);)var u=o.index;r=r.slice(0,u===N?a:u)}}else e.indexOf(yr(i),a)!=a&&(-1<(i=r.lastIndexOf(i))&&(r=r.slice(0,i)));return r+n},An.unescape=function(e){return(e=Iu(e))&&J.test(e)?e.replace($,si):e},An.uniqueId=function(e){var t=++fi;return Iu(e)+t},An.upperCase=zo,An.upperFirst=Wo,An.each=nu,An.eachRight=tu,An.first=qe,Nu(An,function(){var e={};return mt(An,(function(t,r){li.call(An.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),An.VERSION="4.17.15",r("bind bindKey curry curryRight partial partialRight".split(" "),(function(e){An[e].placeholder=An})),r(["drop","take"],(function(e,t){Un.prototype[e]=function(r){r=r===N?1:qi(Eu(r),0);var n=this.__filtered__&&!t?new Un(this):this.clone();return n.__filtered__?n.__takeCount__=Fi(r,n.__takeCount__):n.__views__.push({size:Fi(r,4294967295),type:e+(0>n.__dir__?"Right":"")}),n},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),r(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ye(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),r(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Un.prototype[e]=function(){return this[r](1).value()[0]}})),r(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[r](1)}})),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=fr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(r){return Lt(r,e,t)}))})),Un.prototype.reject=function(e){return this.filter(au(ye(e)))},Un.prototype.slice=function(e,t){e=Eu(e);var r=this;return r.__filtered__&&(0t)?new Un(r):(0>e?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==N&&(r=0>(t=Eu(t))?r.dropRight(-t):r.take(t-e)),r)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,(function(e,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),i=/^(?:head|last)$/.test(r),o=An[i?"take"+("last"==r?"Right":""):r],s=i||/^find/.test(r);o&&(An.prototype[r]=function(){function t(e){return e=o.apply(An,a([e],u)),i&&d?e[0]:e}var r=this.__wrapped__,u=i?[1]:arguments,c=r instanceof Un,l=u[0],f=c||co(r);f&&n&&"function"==typeof l&&1!=l.length&&(c=f=!1);var d=this.__chain__,p=!!this.__actions__.length;l=s&&!d,c=c&&!p;return!s&&f?(r=c?r:new Un(this),(r=e.apply(r,u)).__actions__.push({func:Qe,args:[t],thisArg:N}),new On(r,d)):l&&c?e.apply(this,u):(r=this.thru(t),l?i?r.value()[0]:r.value():r)})})),r("pop push shift sort splice unshift".split(" "),(function(e){var t=$n[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);An.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(co(i)?i:[],e)}return this[r]((function(r){return t.apply(co(r)?r:[],e)}))}})),mt(Un.prototype,(function(e,t){var r=An[t];if(r){var n=r.name+"";li.call(Zi,n)||(Zi[n]=[]),Zi[n].push({name:t,func:r})}})),Zi[Jr(N,2).name]=[{name:"wrapper",func:N}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ur(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ur(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ur(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e,t=this.__wrapped__.value(),r=this.__dir__,n=co(t),i=0>r,a=n?t.length:0;e=a;for(var o=this.__views__,s=0,u=-1,c=o.length;++u=this.__values__.length;return{done:e,value:e?N:this.__values__[this.__index__++]}},An.prototype.plant=function(e){for(var t,r=this;r instanceof En;){var n=Fe(r);n.__index__=0,n.__values__=N,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},An.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof Un?(this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:Qe,args:[Ge],thisArg:N}),new On(e,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,Ei&&(An.prototype[Ei]=function Xe(){return this}),An}();Hn._=ui,void 0===(P=function(){return ui}.call(E,C,E,T))||(T.exports=P)}).call(this)}).call(this,C(8),C(18)(w))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4)),l=r(7),f=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var d=(i=n=function(e){function MjButton(){return(0,o.default)(this,MjButton),(0,u.default)(this,(MjButton.__proto__||(0,a.default)(MjButton)).apply(this,arguments))}return(0,c.default)(MjButton,e),(0,s.default)(MjButton,[{key:"getStyles",value:function getStyles(){return{table:{"border-collapse":"separate",width:this.getAttribute("width"),"line-height":"100%"},td:{border:this.getAttribute("border"),"border-bottom":this.getAttribute("border-bottom"),"border-left":this.getAttribute("border-left"),"border-radius":this.getAttribute("border-radius"),"border-right":this.getAttribute("border-right"),"border-top":this.getAttribute("border-top"),cursor:"auto","font-style":this.getAttribute("font-style"),height:this.getAttribute("height"),"mso-padding-alt":this.getAttribute("inner-padding"),"text-align":this.getAttribute("text-align"),background:this.getAttribute("background-color")},content:{display:"inline-block",width:this.calculateAWidth(this.getAttribute("width")),background:this.getAttribute("background-color"),color:this.getAttribute("color"),"font-family":this.getAttribute("font-family"),"font-size":this.getAttribute("font-size"),"font-style":this.getAttribute("font-style"),"font-weight":this.getAttribute("font-weight"),"line-height":this.getAttribute("line-height"),margin:"0","text-decoration":this.getAttribute("text-decoration"),"text-transform":this.getAttribute("text-transform"),padding:this.getAttribute("inner-padding"),"mso-padding-alt":"0px","border-radius":this.getAttribute("border-radius")}}}},{key:"calculateAWidth",value:function calculateAWidth(e){if(!e)return null;var t=(0,f.default)(e),r=t.parsedWidth;if("px"!==t.unit)return null;var n=this.getBoxWidths().borders;return r-(this.getShorthandAttrValue("inner-padding","left")+this.getShorthandAttrValue("inner-padding","right"))-n+"px"}},{key:"render",value:function render(){var e=this.getAttribute("href")?"a":"p";return"\n \n \n \n <"+e+"\n "+this.htmlAttributes({href:this.getAttribute("href"),rel:this.getAttribute("rel"),name:this.getAttribute("name"),style:"content",target:"a"===e?this.getAttribute("target"):void 0})+"\n >\n "+this.getContent()+"\n "+e+">\n | \n
\n
\n "}}]),MjButton}(l.BodyComponent),n.endingTag=!0,n.allowedAttributes={align:"enum(left,center,right)","background-color":"color","border-bottom":"string","border-left":"string","border-radius":"string","border-right":"string","border-top":"string",border:"string",color:"color","container-background-color":"color","font-family":"string","font-size":"unit(px)","font-style":"string","font-weight":"string",height:"unit(px,%)",href:"string",name:"string","inner-padding":"unit(px,%){1,4}","line-height":"unit(px,%,)","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}",rel:"string",target:"string","text-decoration":"string","text-transform":"string","vertical-align":"enum(top,bottom,middle)","text-align":"enum(left,right,center)",width:"unit(px,%)"},n.defaultAttributes={align:"center","background-color":"#414141",border:"none","border-radius":"3px",color:"#ffffff","font-family":"Ubuntu, Helvetica, Arial, sans-serif","font-size":"13px","font-weight":"normal","inner-padding":"10px 25px","line-height":"120%",padding:"10px 25px",target:"_blank","text-decoration":"none","text-transform":"none","vertical-align":"middle"},i);t.default=d,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(15)),o=_interopRequireDefault(r(2)),s=_interopRequireDefault(r(1)),u=_interopRequireDefault(r(6)),c=_interopRequireDefault(r(3)),l=_interopRequireDefault(r(4)),f=r(7),d=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=(i=n=function(e){function MjColumn(){return(0,s.default)(this,MjColumn),(0,c.default)(this,(MjColumn.__proto__||(0,o.default)(MjColumn)).apply(this,arguments))}return(0,l.default)(MjColumn,e),(0,u.default)(MjColumn,[{key:"getChildContext",value:function getChildContext(){var e=this.context.containerWidth,t=this.props.nonRawSiblings,r=this.getBoxWidths(),n=r.borders,i=r.paddings+n,o=this.getAttribute("width")||parseFloat(e)/t+"px",s=(0,d.default)(o,{parseFloatToInt:!1}),u=s.unit,c=s.parsedWidth;return o="%"===u?parseFloat(e)*c/100-i+"px":c-i+"px",(0,a.default)({},this.context,{containerWidth:o})}},{key:"getStyles",value:function getStyles(){var e={"background-color":this.getAttribute("background-color"),border:this.getAttribute("border"),"border-bottom":this.getAttribute("border-bottom"),"border-left":this.getAttribute("border-left"),"border-radius":this.getAttribute("border-radius"),"border-right":this.getAttribute("border-right"),"border-top":this.getAttribute("border-top"),"vertical-align":this.getAttribute("vertical-align")};return{div:{"font-size":"0px","text-align":"left",direction:this.getAttribute("direction"),display:"inline-block","vertical-align":this.getAttribute("vertical-align"),width:this.getMobileWidth()},table:(0,a.default)({},this.hasGutter()?{}:e),tdOutlook:{"vertical-align":this.getAttribute("vertical-align"),width:this.getWidthAsPixel()},gutter:(0,a.default)({},e,{padding:this.getAttribute("padding"),"padding-top":this.getAttribute("padding-top"),"padding-right":this.getAttribute("padding-right"),"padding-bottom":this.getAttribute("padding-bottom"),"padding-left":this.getAttribute("padding-left")})}}},{key:"getMobileWidth",value:function getMobileWidth(){var e=this.context.containerWidth,t=this.props.nonRawSiblings,r=this.getAttribute("width");if("mobileWidth"!==this.getAttribute("mobileWidth"))return"100%";if(void 0===r)return parseInt(100/t,10)+"%";var n=(0,d.default)(r,{parseFloatToInt:!1}),i=n.unit,a=n.parsedWidth;switch(i){case"%":return r;case"px":default:return a/parseInt(e,10)+"%"}}},{key:"getWidthAsPixel",value:function getWidthAsPixel(){var e=this.context.containerWidth,t=(0,d.default)(this.getParsedWidth(!0),{parseFloatToInt:!1}),r=t.unit,n=t.parsedWidth;return"%"===r?parseFloat(e)*n/100+"px":n+"px"}},{key:"getParsedWidth",value:function getParsedWidth(e){var t=this.props.nonRawSiblings,r=this.getAttribute("width")||100/t+"%",n=(0,d.default)(r,{parseFloatToInt:!1}),i=n.unit,a=n.parsedWidth;return e?""+a+i:{unit:i,parsedWidth:a}}},{key:"getColumnClass",value:function getColumnClass(){var e=this.context.addMediaQuery,t="",r=this.getParsedWidth(),n=r.parsedWidth,i=r.unit,a=n.toString().replace(".","-");switch(i){case"%":t="mj-column-per-"+a;break;case"px":default:t="mj-column-px-"+a}return e(t,{parsedWidth:n,unit:i}),t}},{key:"hasGutter",value:function hasGutter(){var e=this;return["padding","padding-bottom","padding-left","padding-right","padding-top"].some((function(t){return null!=e.getAttribute(t)}))}},{key:"renderGutter",value:function renderGutter(){return"\n \n \n \n \n "+this.renderColumn()+"\n | \n
\n \n
\n "}},{key:"renderColumn",value:function renderColumn(){var e=this.props.children;return"\n \n "+this.renderChildren(e,{renderer:function renderer(e){return e.constructor.isRawElement()?e.render():"\n \n \n "+e.render()+"\n | \n
\n "}})+"\n
\n "}},{key:"render",value:function render(){var e=this.getColumnClass()+" mj-outlook-group-fix";return this.getAttribute("css-class")&&(e+=" "+this.getAttribute("css-class")),"\n \n "+(this.hasGutter()?this.renderGutter():this.renderColumn())+"\n
\n "}}]),MjColumn}(f.BodyComponent),n.allowedAttributes={"background-color":"color",border:"string","border-bottom":"string","border-left":"string","border-radius":"unit(px,%){1,4}","border-right":"string","border-top":"string",direction:"enum(ltr,rtl)","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}","vertical-align":"enum(top,bottom,middle)",width:"unit(px,%)"},n.defaultAttributes={direction:"ltr","vertical-align":"top"},i);t.default=p,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(15)),o=_interopRequireDefault(r(2)),s=_interopRequireDefault(r(1)),u=_interopRequireDefault(r(6)),c=_interopRequireDefault(r(3)),l=_interopRequireDefault(r(4)),f=r(7),d=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=(i=n=function(e){function MjDivider(){return(0,s.default)(this,MjDivider),(0,c.default)(this,(MjDivider.__proto__||(0,o.default)(MjDivider)).apply(this,arguments))}return(0,l.default)(MjDivider,e),(0,u.default)(MjDivider,[{key:"getStyles",value:function getStyles(){var e=this,t={"border-top":["style","width","color"].map((function(t){return e.getAttribute("border-"+t)})).join(" "),"font-size":1,margin:"0px auto",width:this.getAttribute("width")};return{p:t,outlook:(0,a.default)({},t,{width:this.getOutlookWidth()})}}},{key:"getOutlookWidth",value:function getOutlookWidth(){var e=this.context.containerWidth,t=this.getShorthandAttrValue("padding","left")+this.getShorthandAttrValue("padding","right"),r=this.getAttribute("width"),n=(0,d.default)(r),i=n.parsedWidth;switch(n.unit){case"%":return parseInt(e,10)*parseInt(i,10)/100-t+"px";case"px":return r;default:return parseInt(e,10)-t+"px"}}},{key:"renderAfter",value:function renderAfter(){return"\n \x3c!--[if mso | IE]>\n \n \n \n "+this.renderAfter()+"\n "}}]),MjDivider}(f.BodyComponent),n.tagOmission=!0,n.allowedAttributes={"border-color":"color","border-style":"string","border-width":"unit(px)","container-background-color":"color",padding:"unit(px,%){1,4}","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",width:"unit(px,%)"},n.defaultAttributes={"border-color":"#000000","border-style":"solid","border-width":"4px",padding:"10px 25px",width:"100%"},i);t.default=p,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(15)),o=_interopRequireDefault(r(2)),s=_interopRequireDefault(r(1)),u=_interopRequireDefault(r(6)),c=_interopRequireDefault(r(3)),l=_interopRequireDefault(r(4)),f=r(7),d=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=(i=n=function(e){function MjGroup(){return(0,s.default)(this,MjGroup),(0,c.default)(this,(MjGroup.__proto__||(0,o.default)(MjGroup)).apply(this,arguments))}return(0,l.default)(MjGroup,e),(0,u.default)(MjGroup,[{key:"getChildContext",value:function getChildContext(){var e=this.context.containerWidth,t=this.props,r=t.nonRawSiblings,n=t.children,i=this.getShorthandAttrValue("padding","left")+this.getShorthandAttrValue("padding","right"),o=this.getAttribute("width")||parseFloat(e)/r+"px",s=(0,d.default)(o,{parseFloatToInt:!1}),u=s.unit,c=s.parsedWidth;return o="%"===u?parseFloat(e)*c/100-i+"px":c-i+"px",(0,a.default)({},this.context,{containerWidth:o,nonRawSiblings:n.length})}},{key:"getStyles",value:function getStyles(){return{div:{"font-size":"0","line-height":"0","text-align":"left",display:"inline-block",width:"100%",direction:this.getAttribute("direction"),"vertical-align":this.getAttribute("vertical-align"),"background-color":this.getAttribute("background-color")},tdOutlook:{"vertical-align":this.getAttribute("vertical-align"),width:this.getWidthAsPixel()}}}},{key:"getParsedWidth",value:function getParsedWidth(e){var t=this.props.nonRawSiblings,r=this.getAttribute("width")||100/t+"%",n=(0,d.default)(r,{parseFloatToInt:!1}),i=n.unit,a=n.parsedWidth;return e?""+a+i:{unit:i,parsedWidth:a}}},{key:"getWidthAsPixel",value:function getWidthAsPixel(){var e=this.context.containerWidth,t=(0,d.default)(this.getParsedWidth(!0),{parseFloatToInt:!1}),r=t.unit,n=t.parsedWidth;return"%"===r?parseFloat(e)*n/100+"px":n+"px"}},{key:"getColumnClass",value:function getColumnClass(){var e=this.context.addMediaQuery,t="",r=this.getParsedWidth(),n=r.parsedWidth,i=r.unit;switch(i){case"%":t="mj-column-per-"+parseInt(n,10);break;case"px":default:t="mj-column-px-"+parseInt(n,10)}return e(t,{parsedWidth:n,unit:i}),t}},{key:"render",value:function render(){var e=this.props,t=e.children,r=e.nonRawSiblings,n=this.getChildContext().containerWidth,i=this.context.containerWidth,a=function getElementWidth(e){if(!e)return parseInt(i,10)/parseInt(r,10)+"px";var t=(0,d.default)(e,{parseFloatToInt:!1}),a=t.unit,o=t.parsedWidth;return"%"===a?100*o/n+"px":""+o+a},o=this.getColumnClass()+" mj-outlook-group-fix";return this.getAttribute("css-class")&&(o+=" "+this.getAttribute("css-class")),"\n \n \x3c!--[if mso | IE]>\n
\n \n "}}]),MjGroup}(f.BodyComponent),n.allowedAttributes={"background-color":"color",direction:"enum(ltr,rtl)","vertical-align":"enum(top,bottom,middle)",width:"unit(px,%)"},n.defaultAttributes={direction:"ltr"},i);t.default=p,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4)),l=_interopRequireDefault(r(350)),f=r(7),d=_interopRequireDefault(r(49));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var p=(i=n=function(e){function MjImage(){var e,t,r,n;(0,o.default)(this,MjImage);for(var i=arguments.length,s=Array(i),c=0;c
\n ";return this.getAttribute("href")?"\n
\n "+t+"\n \n ":t}},{key:"render",value:function render(){return"\n
\n \n \n \n "+this.renderImage()+"\n | \n
\n \n
\n "}}]),MjImage}(f.BodyComponent),n.tagOmission=!0,n.allowedAttributes={alt:"string",href:"string",name:"string",src:"string",srcset:"string",title:"string",rel:"string",align:"enum(left,center,right)",border:"string","border-bottom":"string","border-left":"string","border-right":"string","border-top":"string","border-radius":"unit(px,%){1,4}","container-background-color":"color","fluid-on-mobile":"boolean",padding:"unit(px,%){1,4}","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",target:"string",width:"unit(px)",height:"unit(px,auto)","max-height":"unit(px,%)","font-size":"unit(px)"},n.defaultAttributes={align:"center",border:"0",height:"auto",padding:"10px 25px",target:"_blank","font-size":"13px"},i);t.default=p,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=(i=n=function(e){function MjRaw(){return(0,o.default)(this,MjRaw),(0,u.default)(this,(MjRaw.__proto__||(0,a.default)(MjRaw)).apply(this,arguments))}return(0,c.default)(MjRaw,e),(0,s.default)(MjRaw,[{key:"render",value:function render(){return this.getContent()}}]),MjRaw}(r(7).BodyComponent),n.endingTag=!0,n.rawElement=!0,i);t.default=l,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4)),l=r(7),f=_interopRequireDefault(r(48));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var d=(i=n=function(e){function MjSpacer(){return(0,o.default)(this,MjSpacer),(0,u.default)(this,(MjSpacer.__proto__||(0,a.default)(MjSpacer)).apply(this,arguments))}return(0,c.default)(MjSpacer,e),(0,s.default)(MjSpacer,[{key:"getStyles",value:function getStyles(){return{div:{height:this.getAttribute("height")}}}},{key:"render",value:function render(){var e=this.getAttribute("height");return"\n "+(0,f.default)('\n
\n ')+"\n \n \n \n "+(0,f.default)("\n |
\n ")+"\n "}}]),MjSpacer}(l.BodyComponent),n.allowedAttributes={border:"string","border-bottom":"string","border-left":"string","border-right":"string","border-top":"string","container-background-color":"color","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}","vertical-align":"enum(top,bottom,middle)",width:"unit(px,%)",height:"unit(px,%)"},n.defaultAttributes={height:"20px"},i);t.default=d,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(2)),o=_interopRequireDefault(r(1)),s=_interopRequireDefault(r(6)),u=_interopRequireDefault(r(3)),c=_interopRequireDefault(r(4)),l=r(7),f=_interopRequireDefault(r(48));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var d=(i=n=function(e){function MjText(){return(0,o.default)(this,MjText),(0,u.default)(this,(MjText.__proto__||(0,a.default)(MjText)).apply(this,arguments))}return(0,c.default)(MjText,e),(0,s.default)(MjText,[{key:"getStyles",value:function getStyles(){return{text:{"font-family":this.getAttribute("font-family"),"font-size":this.getAttribute("font-size"),"font-style":this.getAttribute("font-style"),"font-weight":this.getAttribute("font-weight"),"letter-spacing":this.getAttribute("letter-spacing"),"line-height":this.getAttribute("line-height"),"text-align":this.getAttribute("align"),"text-decoration":this.getAttribute("text-decoration"),"text-transform":this.getAttribute("text-transform"),color:this.getAttribute("color"),height:this.getAttribute("height")}}}},{key:"renderContent",value:function renderContent(){return"\n
"+this.getContent()+"
\n "}},{key:"render",value:function render(){var e=this.getAttribute("height");return e?"\n "+(0,f.default)('\n
\n ')+"\n "+this.renderContent()+"\n "+(0,f.default)("\n |
\n ")+"\n ":this.renderContent()}}]),MjText}(l.BodyComponent),n.endingTag=!0,n.allowedAttributes={align:"enum(left,right,center,justify)","background-color":"color",color:"color","container-background-color":"color","font-family":"string","font-size":"unit(px)","font-style":"string","font-weight":"string",height:"unit(px,%)","letter-spacing":"unitWithNegative(px,%)","line-height":"unit(px,%,)","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}","text-decoration":"string","text-transform":"string","vertical-align":"enum(top,bottom,middle)"},n.defaultAttributes={align:"left",color:"#000000","font-family":"Ubuntu, Helvetica, Arial, sans-serif","font-size":"13px","line-height":"1",padding:"10px 25px"},i);t.default=d,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,a=_interopRequireDefault(r(65)),o=_interopRequireDefault(r(15)),s=_interopRequireDefault(r(2)),u=_interopRequireDefault(r(1)),c=_interopRequireDefault(r(6)),l=_interopRequireDefault(r(3)),f=_interopRequireDefault(r(4)),d=_interopRequireDefault(r(49)),p=r(7),h=r(16);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var g=(i=n=function(e){function MjTable(){return(0,u.default)(this,MjTable),(0,l.default)(this,(MjTable.__proto__||(0,s.default)(MjTable)).apply(this,arguments))}return(0,f.default)(MjTable,e),(0,c.default)(MjTable,[{key:"getStyles",value:function getStyles(){return{table:{color:this.getAttribute("color"),"font-family":this.getAttribute("font-family"),"font-size":this.getAttribute("font-size"),"line-height":this.getAttribute("line-height"),"table-layout":this.getAttribute("table-layout"),width:this.getAttribute("width"),border:this.getAttribute("border")}}}},{key:"getWidth",value:function getWidth(){var e=this.getAttribute("width"),t=(0,d.default)(e),r=t.parsedWidth;return"%"===t.unit?e:r}},{key:"render",value:function render(){var e=this,t=(0,h.reduce)(["cellpadding","cellspacing"],(function(t,r){return(0,o.default)({},t,(0,a.default)({},r,e.getAttribute(r)))}),{});return"\n
\n "+this.getContent()+"\n
\n "}}]),MjTable}(p.BodyComponent),n.endingTag=!0,n.allowedAttributes={align:"enum(left,right,center)",border:"string",cellpadding:"integer",cellspacing:"integer","container-background-color":"color",color:"color","font-family":"string","font-size":"unit(px)","font-weight":"string","line-height":"unit(px,%,)","padding-bottom":"unit(px,%)","padding-left":"unit(px,%)","padding-right":"unit(px,%)","padding-top":"unit(px,%)",padding:"unit(px,%){1,4}","table-layout":"enum(auto,fixed,initial,inherit)","vertical-align":"enum(top,bottom,middle)",width:"unit(px,%)"},n.defaultAttributes={align:"left",border:"none",cellpadding:"0",cellspacing:"0",color:"#000000","font-family":"Ubuntu, Helvetica, Arial, sans-serif","font-size":"13px","line-height":"22px",padding:"10px 25px","table-layout":"auto",width:"100%"},i);t.default=g,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_interopRequireDefault(r(2)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(6)),o=_interopRequireDefault(r(3)),s=_interopRequireDefault(r(4)),u=_interopRequireDefault(r(354)),c=r(7);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function MjWrapper(){return(0,i.default)(this,MjWrapper),(0,o.default)(this,(MjWrapper.__proto__||(0,n.default)(MjWrapper)).apply(this,arguments))}return(0,s.default)(MjWrapper,e),(0,a.default)(MjWrapper,[{key:"renderWrappedChildren",value:function renderWrappedChildren(){var e=this.props.children,t=this.context.containerWidth;return"\n "+this.renderChildren(e,{renderer:function renderer(e){return e.constructor.isRawElement()?e.render():"\n \x3c!--[if mso | IE]>\n
\n \n \n | \n
\n 1&&void 0!==arguments[1]?arguments[1]:{},r=e.BlockManager,n={category:t.categoryLabel||"MJML"},i={category:"Head Elements"};t.resetBlocks&&r.getAll().reset(),r.add("mj-1-column",_objectSpread({label:"1 Column",content:"
\n Content 1\n ",attributes:{class:"gjs-fonts gjs-f-b1"}},n)),r.add("mj-2-columns",_objectSpread({label:"2 Columns",content:"
\n Content 1\n Content 2\n ",attributes:{class:"gjs-fonts gjs-f-b2"}},n)),r.add("mj-3-columns",_objectSpread({label:"3 Columns",content:"
\n Content 1\n Content 2\n Content 3\n ",attributes:{class:"gjs-fonts gjs-f-b3"}},n)),r.add("mj-column",_objectSpread({label:"Column",content:"
Content 1",attributes:{class:"gjs-fonts gjs-f-b1"}},n)),r.add("mj-group",_objectSpread({label:"Group",content:"
\n Content 1\n Content 2\n ",attributes:{class:"gjs-fonts gjs-f-b2"}},n)),r.add("mj-text",_objectSpread({label:"Text",content:"
Insert text here",attributes:{class:"gjs-fonts gjs-f-text"}},n)),r.add("mj-image",_objectSpread({label:"Image",content:'
',attributes:{class:"fa fa-image"}},n)),r.add("mj-button",_objectSpread({label:"Button",content:"
Button",attributes:{class:"gjs-fonts gjs-f-button"}},n)),r.add("mj-spacer",_objectSpread({label:"Spacer",content:"
",attributes:{class:"fa fa-arrows-v"}},n)),r.add("mj-divider",_objectSpread({label:"Divider",content:"
",attributes:{class:"gjs-fonts gjs-f-divider"}},n)),r.add("mj-social-group",_objectSpread({label:"Group Social",content:'
\n \n \n \n ',attributes:{class:"fa fa-share-alt"}},n)),r.add("mj-social-element",_objectSpread({label:"Social Element",content:'
',attributes:{class:"fa fa-share-alt"}},n)),r.add("mj-navbar",_objectSpread({label:"NavBar",content:"
\n Getting started\n Try it live\n Templates\n Components\n ",attributes:{class:"fa fa-bars"}},n)),r.add("mj-navbar-link",_objectSpread({label:"NavBar Link",content:"
Link 1",attributes:{class:"gjs-fonts gjs-f-button"}},n)),r.add("mj-wrapper",_objectSpread({label:"Wrapper",content:"
\n \n Content inside wrapper\n \n ",attributes:{class:"gjs-fonts gjs-f-b1"}},n)),r.add("mj-hero",_objectSpread({label:"Hero",content:'
\n Hero\n Button\n ',attributes:{class:"gjs-fonts gjs-f-b1"}},n)),r.add("mj-raw",_objectSpread({label:"Raw",content:"
\x3c!-- raw element --\x3e",attributes:{class:"fa fa-code"}},n)),r.add("mj-title",_objectSpread({label:"Title",content:"
Hello GrapesJS MJML",attributes:{class:"gjs-fonts gjs-f-text"}},i)),r.add("mj-preview",_objectSpread({label:"Preview",content:"
Preview text here!",attributes:{class:"fa fa-eye"}},i)),r.add("mj-class",_objectSpread({label:"Class",content:'
',attributes:{class:"fa fa-paint-brush"}},i)),r.add("mj-font",_objectSpread({label:"Font",content:'
',attributes:{class:"fa fa-font"}},i)),r.add("mj-breakpoint",_objectSpread({label:"Breakpoint",content:'
',attributes:{class:"fa fa-arrows-h"}},i)),r.add("mj-all",_objectSpread({label:"All",content:"
",attributes:{class:"fa fa-at"}},i))},i=r(29),a=r.n(i);function Mjml_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mjml_objectSpread(e){for(var t=1;t
"},getChildrenSelector:function getChildrenSelector(){return"div"},renderStyle:function renderStyle(){var e=a.editorBackgroundColor?"background: ".concat(a.editorBackgroundColor,";"):"",t=this.attributes.isMobile?"display: none;":"display: table-row;";this.el.classList.add("gjs-one-bg"),this.el.style=this.attributes.style+e+t}})})};function Title_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Title_objectSpread(e){for(var t=1;t Title '+this.model.get("content")+""},getChildrenSelector:function getChildrenSelector(){return"div > span"},renderChildren:function renderChildren(){a.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all",this.el.style=this.attributes.style+"max-width: 500px; white-space: initial; line-height: 1.9em;"},disableEditing:function disableEditing(){var e=this.getChildrenContainer();this.el.style=this.attributes.style+"max-width: 300px; white-space: nowrap;",this.rteEnabled=1,e.innerHTML=e.innerText.replace(/\n+/g," "),this.syncContent(),this.rteEnabled=0,e.style.pointerEvents="none"}})})};function Preview_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Preview_objectSpread(e){for(var t=1;tPreview '+this.model.get("content")+""},getChildrenSelector:function getChildrenSelector(){return"div > span"},renderChildren:function renderChildren(){a.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all",this.el.style=this.attributes.style+"max-width: 500px; white-space: initial; line-height: 1.9em;"},disableEditing:function disableEditing(){var e=this.getChildrenContainer();this.el.style=this.attributes.style+"max-width: 300px; white-space: nowrap;",this.rteEnabled=1,e.innerHTML=e.innerText.replace(/\n+/g," "),this.syncContent(),this.rteEnabled=0,e.style.pointerEvents="none"}})})};function Font_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Font_objectSpread(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1?arguments[1]:void 0,n=e.StyleManager,i=n.getProperty("typography","font-family"),a=i.get("list"),o=a.length-1;o>-1;o--){var s=a[o];s.fcid===this.cid&&a.splice(o,1)}if(t){var u=r||this.get("attributes"),c=this.displayName(u.name);a.push({value:u.name,name:c,fcid:this.cid})}a.sort((function(e,t){return e.name.localeCompare(t.name)})),n.render()},updateHeadElements:function updateHeadElements(t){var r=this.getAttributes(),n=t||e.Canvas.getDocument().head.getElementsByClassName(this.className());if(n&&n.length&&"string"==typeof r.href){var i=!0,a=!1,o=void 0;try{for(var s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;switch(c.tagName){case"LINK":c.href=r.href;break;case"STYLE":c.textContent="@import url(".concat(r.href,");")}}}catch(e){a=!0,o=e}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}}},mounted:function mounted(t){if(t===this){var r=this.modelOpt.firstMount,n=this.previousAttributes().attributes||{},i=this.changed.attributes||{},a="string"==typeof i.name&&i.name!==n.name,o="string"==typeof i.href&&i.href!==n.href,s=a||o;this.modelOpt.headElementsCreated||this.createElements(),(r||s)&&this.updateFontList(),o&&this.updateHeadElements(),this.modelOpt.firstMount=!1}t===e&&(this.createElements(),this.updateFontList(),this.modelOpt.firstMount=!1)},removed:function removed(){for(var t=e.Canvas.getDocument().head.getElementsByClassName(this.className()),r=t.length-1;r>-1;r--){var n=t[r];n&&n.parentNode.removeChild(n)}this.updateFontList(0),this.modelOpt.headElementsCreated=!1,this.modelOpt.firstMount=!0}}),view:Font_objectSpread({},a,{tagName:"span",attributes:{style:"pointer-events: all; display: inline-block; color:#FFF; padding: 8px 15px;"},getChildrenSelector:function getChildrenSelector(){return"div span"},getTemplateFromMjml:function getTemplateFromMjml(){var e=this.model.displayName();return' A ').concat(e,"
")},renderChildren:function renderChildren(){}})})};function Breakpoint_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Breakpoint_objectSpread(e){for(var t=1;t<-> ').concat(e,"")},renderChildren:function renderChildren(){}})})};function Attributes_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Attributes_objectSpread(e){for(var t=1;tAttributes'},getChildrenSelector:function getChildrenSelector(){return"div > div"},renderStyle:function renderStyle(){if(a.showAttributesSidebar){var e=this.attributes.dashed&&!this.attributes.isMobile?"-1px":"-145px",t=a.editorBackgroundColor?"background-color: ".concat(a.editorBackgroundColor,";"):"";this.el.classList.add("gjs-one-bg"),this.el.style=this.attributes.style+t+"left: ".concat(e)}else this.el.style="display:none;"}})}))};function Class_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Class_objectSpread(e){for(var t=1;t.".concat(e,"")},renderStyle:function renderStyle(){var e=this.el.getAttribute("style")||"";e=e.split(";").filter((function(e){return!e.match(/.*(width|height|padding|margin|font-size|letter).*/g)})).join(";"),this.el.style=e+this.attributes.style},render:function render(){return this.renderAttributes(),this.el.innerHTML=this.getTemplateFromMjml(),this.renderStyle(),this},rerender:function rerender(){var t=this.el.getAttribute("name");this.el.innerHTML=this.getTemplateFromMjml(),this.renderStyle(),t&&e.getWrapper().find("[mj-class=".concat(t,"]")).forEach((function(e){return e.view.render()}))}})})};function All_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function All_objectSpread(e){for(var t=1;t</ All >'},renderStyle:function renderStyle(){var e=this.el.getAttribute("style");e=e?e.split(";").filter((function(e){return!e.match(/.*(width|height|padding|margin|font-size|letter).*/g)})).join(";"):"",this.el.style=e+this.attributes.style},render:function render(){return this.renderAttributes(),this.el.innerHTML=this.getTemplateFromMjml(),this.renderStyle(),this},rerender:function rerender(){this.el.innerHTML=this.getTemplateFromMjml(),this.renderStyle(),e.getWrapper().findType("mj-body")[0].view.render()},getChildrenSelector:function getChildrenSelector(){return"div > span"},renderChildren:function renderChildren(){}})})};function Style_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Style_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("style").innerHTML},renderStyle:function renderStyle(){},getTemplateFromMjml:function getTemplateFromMjml(){var e=this.getMjmlTemplate(),t=this.getInnerMjmlTemplate(),r=a()("".concat(e.start,"\n ").concat(t.start).concat(t.end).concat(e.end)).html,n=r.indexOf("")+6,i=r.indexOf("");return r=r.substring(n,i).trim(),o.innerHTML=r,this.getTemplateFromEl(o)}})})};function Body_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Body_objectSpread(e){for(var t=1;t"),end:"".concat(e.end)}},getTemplateFromMjml:function getTemplateFromMjml(){return""},renderStyle:function renderStyle(){var e=this.el.getAttribute("style")||"";this.el.style=e+this.attributes.style},renderContent:function renderContent(){this.getChildrenContainer().innerHTML=this.model.get("content")},rerender:function rerender(){i.rerender.call(this),this.model.components().models.forEach((function(e){"mj-section"!=e.attributes.type&&"mj-wrapper"!=e.attributes.type&&"mj-hero"!=e.attributes.type||e.view.rerender()}))}})})};function Section_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Section_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:""}},getChildrenSelector:function getChildrenSelector(){return this.attributes.fullwidth?"td > div > table > tbody > tr > td":"table > tbody > tr > td"},renderContent:function renderContent(){this.attributes.fullwidth="full-width"===this.model.get("style")["full-width"],i.renderContent.call(this)},renderStyle:function renderStyle(){var e=this.model.parent(),t=this.attributes.fullwidth?"100%":e.get("attributes").width||"600px";this.el.style=this.attributes.style+"margin:0px auto; max-width:".concat(t,";")},init:function init(){var t=this;i.init.call(this),this.listenTo(this.model.get("components"),"add remove",this.render),this.listenTo(e.getModel(),"run:sw-visibility stop:sw-visibility",(function(){t.attributes.dashed=e.Canvas.getBody().classList.contains("gjs-dashed"),t.render()}))}})})};function Wrapper_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wrapper_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:""}},renderContent:function renderContent(){var e=this;this.attributes.fullwidth="full-width"===this.model.get("style")["full-width"],this.model.findType("mj-section").forEach((function(t){var r=t.get("stylable"),n=r.indexOf("full-width");e.attributes.fullwidth?n>-1&&r.splice(n,1):-1===n&&r.push("full-width")})),i.renderContent.call(this)},renderStyle:function renderStyle(){var e=this.model.parent(),t=this.attributes.fullwidth?"100%":e.get("attributes").width||"600px";this.el.style=this.attributes.style+"margin:0px auto; max-width:".concat(t,";")},getChildrenSelector:function getChildrenSelector(){return this.attributes.fullwidth?"td > div > table > tbody > tr > td":"table > tbody > tr > td"}})})};function Column_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Column_objectSpread(e){for(var t=1;t/,""),o=i.indexOf("")+6,u=i.indexOf("");s.innerHTML=i.substring(o,u).trim();for(var c,l=this.getTemplateFromEl(s),f={},d=l.attributes,p=0,h=d.length;p".concat(t.style,"")),this.getChildrenContainer().innerHTML=this.model.get("content"),this.renderChildren(),this.renderStyle(),this},renderStyle:function renderStyle(){var e=this.model.parent().view,t=!e||!e.attributes||!e.attributes.dashed,r=u&&!t?"padding: ".concat(u,";"):"";this.el.style=this.el.getAttribute("style")+this.attributes.style+r},getMjmlTemplate:function getMjmlTemplate(){var e=this.model.collection.length-1;e=e||0;var t=Array(e).fill("").join(""),r=this.model.parent().is("mj-group");return{start:"".concat(r?"":""),end:"".concat(t).concat(r?"":"","")}},getTemplateFromEl:function getTemplateFromEl(e){var t="div > table > tbody > tr > td > div";return this.model.parent().is("mj-group")&&(t+=" > div"),e.firstChild.querySelector(t)},getChildrenSelector:function getChildrenSelector(){return"table"}})})};function Group_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Group_objectSpread(e){for(var t=1;t").concat(e.get("tagName"),">")})).join("");return{start:"\x3c!--group start--\x3e",end:"\x3c!--group end--\x3e".concat(t,"")}},getTemplateFromEl:function getTemplateFromEl(e){var t=e.firstChild.querySelector("div > table > tbody > tr > td > div"),r={},n=!0,i=!1,a=void 0;try{for(var o,s=t.attributes[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;r[u.name]=u.value}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return this.$el.attr(r),""},getChildrenSelector:function getChildrenSelector(){return"span"}})})};function Text_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Text_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"td > div"},renderChildren:function renderChildren(){i.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all"},disableEditing:function disableEditing(){this.getChildrenContainer().style.pointerEvents="none"}})})};function Button_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Button_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"a,p"},renderChildren:function renderChildren(){i.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all"},disableEditing:function disableEditing(){this.getChildrenContainer().style.pointerEvents="none"}})})};function Image_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Image_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"img"}})})};function Raw_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Raw_objectSpread(e){for(var t=1;t".concat(this.get("content"),"")}}),view:Raw_objectSpread({},a,{events:{dblclick:"onActive"},attributes:{style:"pointer-events: all;",dashed:!0},init:function init(){var t=this;this.model.parent().is("mj-head")||this.listenTo(e.getModel(),"run:sw-visibility stop:sw-visibility",(function(){t.attributes.dashed=e.Canvas.getBody().classList.contains("gjs-dashed"),t.render()}))},render:function render(){if(this.renderAttributes(),this.model.parent().is("mj-head"))this.el.innerHTML='</> Raw
';else{var e=this.attributes.dashed?"min-width:200px; padding:".concat(o):"";this.el.innerHTML='').concat(this.model.get("content"),"
")}return this.renderStyle(),this},renderStyle:function renderStyle(){this.model.parent().is("mj-head")?this.el.style=this.attributes.style+"display: inline-block; color:#FFF; padding:8px 15px;":this.el.style=this.attributes.style},rerender:function rerender(){this.renderStyle()},renderContent:function renderContent(){},renderChildren:function renderChildren(){},onActive:function onActive(t){t&&t.stopPropagation(),e.runCommand("mjml-editor",{sender:this.model,target:this.model,title:"",help:"Edit raw component",onSave:function onSave(e){console.log("on save called "+e)},onFail:function onFail(e){console.warning(e)}})}})})};function Hero_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hero_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.firstChild.innerHTML},getChildrenSelector:function getChildrenSelector(){return".mj-hero-content table tbody"},init:function init(){i.init.call(this),this.listenTo(this.model.get("components"),"add remove",this.render)}})})};function Social_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Social_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"td"},rerender:function rerender(){i.rerender.call(this),this.model.components().models.forEach((function(e){"mj-social-element"==e.attributes.type&&e.view.rerender()}))},init:function init(){i.init.call(this),this.listenTo(this.model.get("components"),"add remove",this.render)}})})};function SocialElement_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function SocialElement_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:" td > table").innerHTML},getChildrenSelector:function getChildrenSelector(){return"img"}})})};function Divider_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Divider_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"p"}})})};function Spacer_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Spacer_objectSpread(e){for(var t=1;t",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("tr").innerHTML},getChildrenSelector:function getChildrenSelector(){return"td"},renderChildren:function renderChildren(){i.renderChildren.call(this)}})})};function NavBar_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function NavBar_objectSpread(e){for(var t=1;t/,""),s=i.indexOf("")+6,u=i.indexOf("");o.innerHTML=i.substring(s,u).trim();for(var c,l=this.getTemplateFromEl(o),f={},d=l.attributes,p=0,h=d.length;p".concat(t.style,"")),this.getChildrenContainer().innerHTML=this.model.get("content"),this.renderChildren(),this.renderStyle(),this},getMjmlTemplate:function getMjmlTemplate(){return{start:"",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.firstChild.querySelector("tr")},getChildrenSelector:function getChildrenSelector(){return"div.mj-inline-links"},rerender:function rerender(){i.rerender.call(this),this.model.components().models.forEach((function(e){"mj-navbar-link"==e.attributes.type&&e.view.rerender()}))}})})};function NavBarLink_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function NavBarLink_objectSpread(e){for(var t=1;t".concat(t.start),end:"".concat(t.end,"")}}return{start:"",end:""}},getTemplateFromEl:function getTemplateFromEl(e){return e.querySelector("div").innerHTML},getChildrenSelector:function getChildrenSelector(){return"a,p"},renderChildren:function renderChildren(){i.renderChildren.call(this)},onActive:function onActive(){this.getChildrenContainer().style.pointerEvents="all"},disableEditing:function disableEditing(){this.getChildrenContainer().style.pointerEvents="none"}})})};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function components_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function components_objectSpread(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=e.DomComponents,n=r.getType("default"),i=r.getType("text"),R=r.getType("image"),D=r.getType("link"),B=n.model,P=n.view,I=i.model,L=i.view,N=R.model,q=R.view,F=D.model,U=D.view,z=r,W=r.ComponentsView,H=document.createElement("div"),V={init:function init(){var e=components_objectSpread({},this.get("attributes")),t=components_objectSpread({},this.get("style"));for(var r in t)r in e||(e[r]=t[r]);var n=e["mj-class"];n&&this.addClass(n.split(" ")).forEach((function(e){return e.attributes.active=!1})),this.set("attributes",e),this.set("style",e),this.listenTo(this,"change:style",this.handleStyleChange),this.listenTo(this.get("classes"),"add remove change",this.handleClassesChange)},handleStyleChange:function handleStyleChange(){var e=components_objectSpread({},this.get("attributes")),t=components_objectSpread({},this.get("style"));for(var r in delete t.display,e)r in t||delete e[r];this.set("attributes",components_objectSpread({},e,{},t))},handleClassesChange:function handleClassesChange(e){var t=this.parent().get("type");"mj-head"!==t&&"mj-attributes"!==t&&((e.changed.active||e.get("active"))&&setTimeout((function(){return e.set({active:!1})}),100),this.addStyle({"mj-class":this.get("classes").pluck("name").join(" ")}))},addClass:function addClass(t){var r=e.SelectorManager.addClass(t);return r.forEach((function(e){return e.attributes.active=!1})),this.get("classes").add(r)},getMjmlAttributes:function getMjmlAttributes(){var e=this.get("attributes")||{};delete e.style;var t=this.get("src");return t&&(e.src=t),e},getAttrToHTML:function getAttrToHTML(){var e=components_objectSpread({},this.get("attributes")),t=components_objectSpread({},this.get("style-default"));for(var r in delete e.style,e){var n=e[r];n&&n===t[r]&&delete e[r]}return e},toHTML:function toHTML(){var e="",t=this.get("tagName"),r=this.get("void"),n="",i=this.getAttrToHTML();for(var a in delete i.id,delete i.display,i){var o=i[a];n+=void 0!==_typeof(o)&&""!==o?" "+a+'="'+o+'"':""}return e+="<".concat(t).concat(n).concat(r?"/":"",">")+this.get("content"),this.get("components").each((function(t){e+=t.toHTML()})),r||(e+="".concat(t,">")),e}},K={init:function init(){this.stopListening(this.model,"change:style"),this.listenTo(this.model,"change:attributes change:src",this.rerender)},renderSimilar:function renderSimilar(){if("mj-attributes"===this.model.parent().get("type")){var t=this.model.get("type");t&&e.getWrapper().find("[data-gjs-type='mj-body'] [data-gjs-type='".concat(t,"']")).forEach((function(e){e.view.render()}))}},rerender:function rerender(){this.render(null,null,{},1),this.renderSimilar()},getMjmlTemplate:function getMjmlTemplate(){return{start:"",end:""}},getInnerMjmlTemplate:function getInnerMjmlTemplate(){var e=this.model,t=e.get("tagName"),r=e.getMjmlAttributes(),n="";for(var i in r){var a=r[i];n+=void 0!==_typeof(a)&&""!==a?" "+i+'="'+a+'"':""}return{start:"<".concat(t).concat(n,">"),end:"".concat(t,">")}},getTemplateFromEl:function getTemplateFromEl(e){return e.firstChild.innerHTML},getTemplateFromMjml:function getTemplateFromMjml(){var t=this.getMjmlTemplate(),r=this.getInnerMjmlTemplate(),n=e.getWrapper().findType("mj-head")[0];if(n){var i=n.toHTML().replace(//m,"");t.start=t.start.replace("","".concat(i))}var o=a()("".concat(t.start,"\n ").concat(r.start).concat(r.end).concat(t.end)),s=document.createElement("html");if(s.innerHTML=o.html,this.model.is("mj-column")||this.model.is("mj-group")){var u=Array.from(s.querySelectorAll("style")).filter((function(e){return e.innerHTML.indexOf("mj-column")>-1})).map((function(e){return e.innerHTML})).join(" ");u.length&&e.addComponents(""))}return H.innerHTML=s.getElementsByTagName("body")[0].innerHTML.trim(),this.getTemplateFromEl(H)},renderChildren:function renderChildren(e){var t=this.getChildrenContainer();e?this.componentsView.parentEl=t:(this.componentsView=new W({collection:this.model.get("components"),config:this.config,defaultTypes:this.opts.defaultTypes,componentTypes:this.opts.componentTypes}),this.childNodes=this.componentsView.render(t).el.childNodes);for(var r=Array.prototype.slice.call(this.childNodes),n=0,i=r.length;n1&&void 0!==arguments[1]?arguments[1]:{},r=e.getConfig(),n=e.CodeManager.getViewer("CodeMirror").clone(),i=document.createElement("button"),a=document.createElement("div"),o=r.stylePrefix||"";return i.innerHTML=t.modalBtnImport,i.className="".concat(o,"btn-prim ").concat(o,"btn-import"),i.onclick=function(){var r=n.editor.getValue();e.DomComponents.getWrapper().set("content",""),e.setComponents(r.trim()),t.cleanMjml&&e.Commands.run("clean-mjml"),e.Modal.close()},n.set({codeName:"htmlmixed",theme:t.codeViewerTheme,readOnly:0}),{run:function run(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=e.Modal,u=n.editor;if(s.setTitle(t.modalTitleImport),!u){var c=document.createElement("textarea"),l=t.modalLabelImport;if(l){var f=document.createElement("div");f.className=o+"import-label",f.innerHTML=l,a.appendChild(f)}a.appendChild(c),a.appendChild(i),n.init(c),u=n.editor}s.setContent(""),s.setContent(a),n.setContent(t.importPlaceholder),s.open(),u.refresh(),r.set&&r.set("active",0)}}},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getConfig(),n=e.CodeManager.getViewer("CodeMirror").clone(),i=document.createElement("div"),o=e.Commands;i.style="display: flex; justify-content: space-between;",n.set({codeName:"htmlmixed",theme:t.codeViewerTheme});var s,u,c=function getMjml(){var r=t.preMjml+e.getHtml()+t.postMjml;return a()(r)};return o.add("mjml-get-code",{run:function run(){return c()}}),{buildEditor:function buildEditor(n){var i=e.CodeManager,a=i.getViewer("CodeMirror").clone(),o=document.createElement("textarea"),s=document.createElement("div");s.style="flex:1 0 auto; padding:5px; max-width:50%; box-sizing:border-box;";var u=a.set({label:n,codeName:"htmlmixed",theme:t.codeViewerTheme,input:o}),c=new i.EditorView({model:u,config:r}).render().el;return s.appendChild(c),u.init(o),{codeEditor:u,el:s}},run:function run(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.Modal;if(n.setTitle(t.modalTitleExport),n.setContent(""),n.setContent(i),!s){var a=this.buildEditor("MJML");s=a.codeEditor,i.appendChild(a.el)}if(!u){var o=this.buildEditor("HTML");u=o.codeEditor,i.appendChild(o.el)}if(n.open(),s&&(s.setContent(t.preMjml+e.getHtml()+t.postMjml),s.editor.refresh()),u){var l=c();l.errors.length&&l.errors.forEach((function(e){console.warn(e.formattedMessage)})),u.setContent(l.html),u.editor.refresh()}r.set&&r.set("active",0)}}},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getConfig(),n=e.CodeManager.getViewer("CodeMirror").clone(),i=document.createElement("div"),a=document.createElement("div"),o=document.createElement("button"),s=r.stylePrefix||"";return o.className="".concat(s,"btn-prim ").concat(s,"edit-btn-save"),n.set({codeName:"htmlmixed",theme:t.codeViewerTheme,readOnly:0}),{run:function run(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,u=r.target;if(o.onclick=function(){var t=n.editor.getValue().replace(/<([a-zA-Z-]+)\s([^>]*)\/>/g,"<$1 $2>$1>").trim();u.replaceWith(t),e.Modal.close(),r.onSave&&r.onSave(t)},u&&u.toHTML){var c=e.Modal,l=n.editor;o.innerHTML=r.btnLabel||' Save',r.help?(a.className=s+"edit-help",a.innerHTML=r.help):(a.className="",a.innerHTML="");var f=r.title||u.get("name")+" Component Edit";if(c.setTitle(f),!l){var d=document.createElement("textarea");i.className="".concat(s,"editor ").concat(s,"edit-container"),i.appendChild(a),i.appendChild(d),i.appendChild(o),n.init(d),l=n.editor}c.setContent(""),c.setContent(i),n.setContent(u.toHTML()),c.open(),l.refresh(),t.set&&t.set("active",0)}else{var p=new Error("No mjml component provided as target.");r.onFail?r.onFail(p):e.getModel().logWarning(p.description)}}}},N=function(e){var t=e.getConfig().stylePrefix||"",r=[{name:"desktop",width:1070,el:document.createElement("button")},{name:"tablet",width:770,el:document.createElement("button")},{name:"mobile",width:320,el:document.createElement("button")}],n=document.createElement("div"),i=document.createElement("div");i.className="gjs-edit-help";var a=document.createElement("iframe");return a.width="100%",a.height="100%",a.frameBorder=0,a.style.cssText="height: 80vh; background: #FFF; border-radius: 3px;",n.appendChild(i),n.appendChild(a),{resizeModal:function resizeModal(e){var t=document.getElementsByClassName("gjs-mdl-dialog")[0];t.style.transition="0.3s",t.style.maxWidth="".concat(e,"px")},run:function run(e){var o=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.forEach((function(e){var r=e.el;r.className="".concat(t,"pn-btn fa fa-").concat(e.name),r.style.cssText="margin: 4px 5px; color: #FFF;",r.onclick=function(){return o.resizeModal(e.width)},n.appendChild(r)}));var u=e.getWrapper(),c=u.findType("mj-title")[0],l=u.findType("mj-preview")[0],f=c?"« ".concat(c.toHTML()," » Preview"):"Preview";l?(i.style.cssText="display:inline-block; font-size: 0.75rem; padding-bottom: 15px;",i.innerHTML=l.toHTML()):i.style.cssText="display:none;";var d=e.Modal;d.setTitle(f),d.setContent("");var p=e.Commands.run("mjml-get-code");p.errors.length&&p.errors.forEach((function(e){console.warn(e.formattedMessage)})),a.src="data:text/html;charset=utf-8,"+escape(p.html),e.Modal.onceClose((function(){return o.resizeModal(1060)})),d.setContent(n),d.open(),s.set&&s.set("active",0)}}},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getWrapper();return{run:function run(e){var n=r.get("components");if(n.length){var i="",a=function getInitialContent(){return n.models.map((function(e){return e.toHTML()})).join("")};switch(n.first().get("type")){case"mjml":break;case"mj-body":case"mj-head":i=a(),e.DomComponents.clear(),r.append("".concat(i,""));break;default:i=a(),e.DomComponents.clear(),r.append("".concat(i,""))}}else n.add(t.defaultTemplate||'Welcome to GrapesJS MJML')}}},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.Commands,n=t.overwriteExport?"export-template":"mjml-export";r.add("mjml-import",P(e,t)),r.add(n,I(e,t)),r.add("mjml-editor",L(e,t)),r.add("preview",N(e)),r.add("clean-mjml",q(e,t)),r.add(t.cmdTglImages,B()),r.add("undo",{run:function run(e,t){t.set("active",0),e.UndoManager.undo(1)}}),r.add("redo",{run:function run(e,t){t.set("active",0),e.UndoManager.redo(1)}}),r.add("set-device-desktop",{run:function run(e){e.setDevice("Desktop")}}),r.add("set-device-tablet",{run:function run(e){e.setDevice("Tablet")}}),r.add("set-device-mobile",{run:function run(e){e.setDevice("Mobile portrait")}})};function buttons_defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="title",n="data-tooltip-pos",i=e.Panels,a=i.getPanel("options"),o=i.getPanel("options"),s=e.Commands,u=e.DomComponents,c=function updateTooltip(e){e.each((function(e){var t=e.get("attributes");t[n]="bottom",e.set("attributes",t)}))};i.addButton("options",{id:"mjml-edit-head",className:"fa fa-header",attributes:buttons_defineProperty({},r,t.cmdBtnEditHeadLabel),command:function command(e,r){var n=u.getWrapper(),i=n.findType("mjml")[0]||n,a={sender:r,target:i.findType("mj-head")[0]||i.append("".concat(t.editHeadPlaceholder,""),{at:0})[0],title:t.modalTitleEditHead,help:t.modalLabelEditHead,btnLabel:t.modalBtnEditHead,onSave:function onSave(){try{u.render()}catch(e){this.onFail("Cannot render the components, an error occured.")}},onFail:function onFail(t){e.getModel().logWarning(t)}};if(s.has("mjml-editor"))return s.run("mjml-editor",a)}}),i.addButton("options",{id:"mjml-import",className:"fa fa-download",attributes:buttons_defineProperty({},r,t.cmdBtnImportMjmlLabel),command:"mjml-import"});var l=i.removeButton("options","fullscreen");if(a){var f=a.get("buttons");f.each((function(e){var t=e.get("attributes");t[n]="bottom",e.set("attributes",t)}))}if(o){var d=o.get("buttons");d.add([{id:"undo",className:"fa fa-undo",command:"undo",attributes:buttons_defineProperty({},r,t.cmdBtnUndoLabel)},{id:"redo",className:"fa fa-repeat",command:"redo",attributes:buttons_defineProperty({},r,t.cmdBtnRedoLabel)}]),c(d)}e.getConfig().showDevices=0;var p=i.addPanel({id:"devices-c"}),h=p.get("buttons");p.get("buttons").add([l,{id:"deviceDesktop",command:"set-device-desktop",className:"fa fa-desktop",attributes:{title:"Desktop"}},{id:"deviceTablet",command:"set-device-tablet",className:"fa fa-tablet",attributes:{title:"Tablet"}},{id:"deviceMobile",command:"set-device-mobile",className:"fa fa-mobile",attributes:{title:"Mobile"}}]),c(h)},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.StyleManager.getConfig().clearProperties=1,t.resetStyleManager){var r=e.StyleManager.getSectors();e.on("load",(function(){r.reset(),r.add([{name:"Dimension",open:!0,buildProps:["width","height","max-width","min-height","margin","padding"],properties:[{name:"Width",property:"full-width",type:"radio",defaults:"Normal",list:[{value:" ",name:"Normal"},{value:"full-width",name:"Full Width"}]},{property:"margin",properties:[{name:"Top",property:"margin-top"},{name:"Right",property:"margin-right"},{name:"Bottom",property:"margin-bottom"},{name:"Left",property:"margin-left"}]},{property:"padding",detached:!0,properties:[{name:"Top",property:"padding-top"},{name:"Right",property:"padding-right"},{name:"Bottom",property:"padding-bottom"},{name:"Left",property:"padding-left"}]},{property:"icon-size",type:"integer",defaults:"20px",units:["px","%"]},{property:"icon-padding",type:"integer",defaults:"0px",units:["px"]},{name:"Spacing",property:"inner-padding",defaults:"0 4px"}]},{name:"Typography",open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","vertical-align","align","text-decoration"],properties:[{name:"Font",property:"font-family"},{name:"Weight",property:"font-weight"},{name:"Font color",property:"color"},{property:"text-align",type:"radio",defaults:"left",list:[{value:"left",name:"Left",className:"fa fa-align-left"},{value:"center",name:"Center",className:"fa fa-align-center"},{value:"right",name:"Right",className:"fa fa-align-right"},{value:"justify",name:"Justify",className:"fa fa-align-justify"}]},{property:"vertical-align",type:"radio",defaults:"top",list:[{value:"top",name:"Top"},{value:"middle",name:"Middle"},{value:"bottom",name:"Bottom"}]},{property:"align",type:"radio",defaults:"left",list:[{value:"left",name:"Left",className:"fa fa-align-left"},{value:"center",name:"Center",className:"fa fa-align-center"},{value:"right",name:"Right",className:"fa fa-align-right"},{value:"justify",name:"Justify",className:"fa fa-align-justify"}]},{property:"text-decoration",type:"radio",defaults:"none",list:[{value:"none",name:"None",className:"fa fa-times"},{value:"underline",name:"underline",className:"fa fa-underline"},{value:"line-through",name:"Line-through",className:"fa fa-strikethrough"}]}]},{name:"Decorations",open:!1,buildProps:["background-color","container-background-color","background-url","background-repeat","background-size","border-radius","border"],properties:[{name:"Container Background color",property:"container-background-color",type:"color"},{property:"background-url",type:"file"},{property:"background-width",type:"integer",defaults:"0px",units:["px"]},{property:"background-height",type:"integer",defaults:"0px",units:["px"]},{property:"background-position",defaults:"center center"},{property:"icons-border-radius",name:"Icons Border radius",type:"composite",detached:!0,properties:[{name:"Border Radius",type:"integer",property:"border-radius",defaults:"0px",min:0,units:["px"]}]},{property:"border-radius",properties:[{name:"Top",property:"border-top-left-radius"},{name:"Right",property:"border-top-right-radius"},{name:"Bottom",property:"border-bottom-left-radius"},{name:"Left",property:"border-bottom-right-radius"}]},{property:"border-detached",name:"Border detached",type:"composite",detached:!0,properties:[{name:"Width",property:"border-width",units:["px"],type:"integer"},{name:"Style",property:"border-style",type:"select",list:[{value:"none"},{value:"solid"},{value:"dotted"},{value:"dashed"},{value:"double"},{value:"groove"},{value:"ridge"},{value:"inset"},{value:"outset"}]},{name:"Color",property:"border-color",type:"color"}]}]}])}))}};function src_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function src_objectSpread(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=e.getConfig(),i=e.SelectorManager.getConfig(),a=src_objectSpread({editor:e,cmdBtnMoveLabel:"Move",cmdBtnUndoLabel:"Undo",cmdBtnRedoLabel:"Redo",cmdBtnDesktopLabel:"Desktop",cmdBtnTabletLabel:"Tablet",cmdBtnMobileLabel:"Mobile",cmdBtnImportMjmlLabel:"Import MJML",cmdBtnEditHeadLabel:"Edit Head",expTplBtnTitle:"View Code",fullScrBtnTitle:"FullScreen",swichtVwBtnTitle:"View Components",defaultTemplate:"",categoryLabel:"",codeViewerTheme:"hopscotch",editorBackgroundColor:"#202835",canvasBackgroundStyle:"bluish",canvasLabelsColor:"#4b5666",importPlaceholder:"",modalTitleImport:"Import MJML",modalBtnImport:' Import',modalLabelImport:"",editHeadPlaceholder:"",modalTitleEditHead:"Edit Head",modalBtnEditHead:' Save',modalLabelEditHead:"Edit the mjml document head.",modalTitleExport:"Export MJML",modalLabelExport:"",overwriteExport:1,preMjml:"",postMjml:"",exportOnly:"",resetBlocks:1,resetStyleManager:1,showAttributesSidebar:1,fallbackImagePath:"https://www.placehold.it/{width}x{height}/7f83b4/a9b3bd",cleanMjml:1,groupsPadding:"10px 0",columnsPadding:"10px 0",rawPadding:"10px 0"},t);r.devicePreviewMode=1,r.forceClass=0,r.devicePreviewMode=1,i.states=[],i.statesLabel="",[n,D,F,U,z].forEach((function(t){return t(e,a)}));var o=e.getWrapper();if(o.set({"custom-name":"Document",highlightable:!1,hoverable:!1,stylable:[]}),e.once("load",(function(){var t=document.querySelector(".gjs-one-bg");if(t&&getComputedStyle){var r=getComputedStyle(t).backgroundColor;e.addComponents(""))}var n=e.Panels.getButton("views","open-blocks");n&&n.set("active",!0),a.cleanMjml&&e.Commands.run("clean-mjml")})),e.on("component:selected",(function(t){var r;e.Panels.getButton("views","open-layers").get("active")||t.is("link")||(r=["mj-font","mj-social-element"].some((function(e){return t.is(e)}))?e.Panels.getButton("views","open-tm"):t.is("mj-title")||t.is("mj-preview")?e.Panels.getButton("views","open-layers"):e.Panels.getButton("views","open-sm"))&&r.set("active",!0)})),"string"==typeof a.canvasBackgroundStyle){var s=a.canvasBackgroundStyle.trim();switch(s){case"light":s="#777 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAEdJREFUOBFjvHHjxn8GIsCHDx+IUMXAwESUKhIUjRpIQmDhUDoahjgChgRhFmJzgICAAFHGjkYKUcGEV9FoGOINHqIkqR6GAJ33CYE3jHXLAAAAAElFTkSuQmCC) repeat";break;case"dark":s="#333 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAEdJREFUOBFjlJdX/M9ABGBn5yBCFQMDE1GqSFA0aiAJgYVD6WgY4ggYEoRZiM0BP3/+IMrY0UghKpjwKhoNQ7zBQ5Qk1cMQALltBJ5hJt7LAAAAAElFTkSuQmCC) repeat";break;case"bluish":s="#202835 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAEdJREFUOBFjVFLS/s9ABGBhYSZCFQMDE1GqSFA0aiAJgYVD6WgY4ggYEoRZiM0Bf/78JcrY0UghKpjwKhoNQ7zBQ5Qk1cMQANkCBKPxiitEAAAAAElFTkSuQmCC) repeat";break;default:s=a.canvasBackgroundStyle}e.getWrapper().addStyle({background:s})}if("string"==typeof a.editorBackgroundColor){var u=a.editorBackgroundColor,c=document.createElement("style");c.textContent=".gjs-one-bg {background:".concat(u," !important;}"),document.body.appendChild(c)}if(a.resetDevices){var l=e.DeviceManager;l.getAll().reset(),l.add("Desktop",""),l.add("Mobile","320px"),l.add("Tablet","820px")}}}]).default}));
\ No newline at end of file
diff --git a/routes/editorapi.js b/routes/editorapi.js
index 58cbdf30..d0b40067 100644
--- a/routes/editorapi.js
+++ b/routes/editorapi.js
@@ -107,6 +107,12 @@ const placeholderImage = (width, height, callback) => {
const resizedImage = (src, method, width, height, callback) => {
const pathname = path.join('/', url.parse(src).pathname);
const filePath = path.join(__dirname, '..', 'public', pathname);
+ const ext = path.extname(filePath).toLowerCase();
+
+ if (!fs.existsSync(filePath) && !['.jpg', '.jpeg', '.gif', '.png', '.webp', '.bpm', '.tiff'].includes(ext)) {
+ return callback(new Error('No valid image to process'));
+ }
+
const magick = gm(filePath);
magick.format((err, format) => {
@@ -172,11 +178,15 @@ const getProcessedImage = (dynamicUrl, callback) => {
return val;
};
+
if (method === 'placeholder') {
width = sanitizeSize(width, 1, 2048, 600, false);
height = sanitizeSize(height, 1, 2048, 300, false);
placeholderImage(width, height, callback);
} else {
+ if (src === '') {
+ return callback(new Error('Empty image source'));
+ }
width = sanitizeSize(width, 1, 2048, 600, false);
height = sanitizeSize(height, 1, 2048, 300, true);
resizedImage(src, method, width, height, callback);
diff --git a/views/grapejs/editor.hbs b/views/grapejs/editor.hbs
index 64c2ce0b..6958d2a7 100644
--- a/views/grapejs/editor.hbs
+++ b/views/grapejs/editor.hbs
@@ -179,6 +179,7 @@
editorBackgroundColor: "{{{editor.config.mjml.editorBackgroundColor}}}",
canvasBackgroundStyle: "{{{editor.config.mjml.canvasBackgroundStyle}}}",
canvasLabelsColor: "{{{editor.config.mjml.canvasLabelsColor}}}",
+ fallbackImagePath: "/editorapi/img?src=&method=placeholder¶ms={width}%2C{height}"
};
c.pluginsOpts['gjs-preset-mjml'] = {
@@ -257,18 +258,44 @@
frame.onload = function() {
var imgs = frameDoc.querySelectorAll('img');
+ var stats = {
+ processed: 0,
+ empties: 0,
+ failed: 0
+ }
+ var counter = 0;
+
+ var imagesProcedeed = function () {
+ //console.dir('total', imgs.length,'empty:', stats.empties, 'failed:', stats.failed, 'processed:', stats.processed, 'counter', counter);
+ if (stats.processed < (imgs.length - stats.empties) && counter < 10) {
+ counter++;
+ setTimeout(imagesProcedeed, 200);
+ } else {
+ var toastrOptions = { timeOut: 10000 };
+ if (stats.empties) { toastr.warning('Found ' + stats.empties + ' empty images found while processing the final document.', 'Empty images found (' + stats.empties + ')', toastrOptions); }
+ if (stats.failed) { toastr.error(stats.failed + ' errors occured while processing the images in the final document.', 'Image processing errors (' + stats.failed + ')', toastrOptions); }
+
+ html = '' + frameDoc.documentElement.outerHTML;
+ document.body.removeChild(frame);
+ callback(html);
+ }
+ }
+
for (var i = 0; i < imgs.length; i++) {
var img = imgs[i];
var m = img.src.match(/\/editorapi\/img\?src=([^&]*)/);
var encodedSrc = m && m[1] || encodeURIComponent(img.src);
+ if ((m && m[1] === '') || img.src.trim() === '' || img.src === window.location.href) { stats.empties++; continue; }
+
if (isLocalImage(decodeURIComponent(encodedSrc))) {
+ img.onerror = function() { stats.failed++; };
+ img.onloadend = function() { stats.processed++; };
img.src = '/editorapi/img?src=' + encodedSrc + '&method=resize¶ms=' + img.clientWidth + '%2C' + img.clientHeight;
+ } else {
+ stats.processed++;
}
}
-
- html = '' + frameDoc.documentElement.outerHTML;
- document.body.removeChild(frame);
- callback(html);
+ setTimeout(imagesProcedeed, 100);
};
frameDoc.open();