grapesjs-mjml
Version:
MJML Componenets integration in GrapesJS
2 lines • 1.15 MB
JavaScript
/*! grapesjs-mjml - 1.0.7 */
!function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports["grapesjs-mjml"]=e():t["grapesjs-mjml"]=e()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{var t={480:t=>{var e;window,e=function(){return e=[function(t,e,n){"use strict";var r;function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)),r}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){!function(t,e,n){e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);return function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}(this,e?(n=l(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments))}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t}n.d(e,"f",(function(){return g})),n.d(e,"a",(function(){return _})),n.d(e,"e",(function(){return b})),n.d(e,"b",(function(){return E})),n.d(e,"d",(function(){return A})),n.d(e,"m",(function(){return T})),n.d(e,"i",(function(){return w})),n.d(e,"n",(function(){return x})),n.d(e,"j",(function(){return O})),n.d(e,"k",(function(){return k})),n.d(e,"l",(function(){return C})),n.d(e,"h",(function(){return S})),n.d(e,"g",(function(){return R})),n.d(e,"c",(function(){return P})),(e=r=r||{}).Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype",r.Root,r.Text,r.Directive,r.Comment,r.Script,r.Style,r.Tag,r.CDATA,r.Doctype;var h=function(){function t(){p(this,t),this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return d(t,[{key:"parentNode",get:function(){return this.parent},set:function(t){this.parent=t}},{key:"previousSibling",get:function(){return this.prev},set:function(t){this.prev=t}},{key:"nextSibling",get:function(){return this.next},set:function(t){this.next=t}},{key:"cloneNode",value:function(){return R(this,0<arguments.length&&void 0!==arguments[0]&&arguments[0])}}]),t}(),m=function(){s(e,h);var t=c(e);function e(n){var r;return p(this,e),(r=t.call(this)).data=n,r}return d(e,[{key:"nodeValue",get:function(){return this.data},set:function(t){this.data=t}}]),e}(),g=function(){s(e,m);var t=c(e);function e(){var n;return p(this,e),(n=t.apply(this,arguments)).type=r.Text,n}return d(e,[{key:"nodeType",get:function(){return 3}}]),e}(),_=function(){s(e,m);var t=c(e);function e(){var n;return p(this,e),(n=t.apply(this,arguments)).type=r.Comment,n}return d(e,[{key:"nodeType",get:function(){return 8}}]),e}(),b=function(){s(e,m);var t=c(e);function e(n,i){return p(this,e),(i=t.call(this,i)).name=n,i.type=r.Directive,i}return d(e,[{key:"nodeType",get:function(){return 1}}]),e}(),y=function(){s(e,h);var t=c(e);function e(n){var r;return p(this,e),(r=t.call(this)).children=n,r}return d(e,[{key:"firstChild",get:function(){var t;return null!==(t=this.children[0])&&void 0!==t?t:null}},{key:"lastChild",get:function(){return 0<this.children.length?this.children[this.children.length-1]:null}},{key:"childNodes",get:function(){return this.children},set:function(t){this.children=t}}]),e}(),v=function(){s(e,y);var t=c(e);function e(){var n;return p(this,e),(n=t.apply(this,arguments)).type=r.CDATA,n}return d(e,[{key:"nodeType",get:function(){return 4}}]),e}(),E=function(){s(e,y);var t=c(e);function e(){var n;return p(this,e),(n=t.apply(this,arguments)).type=r.Root,n}return d(e,[{key:"nodeType",get:function(){return 9}}]),e}(),A=function(){s(e,y);var t=c(e);function e(n,i){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"script"===n?r.Script:"style"===n?r.Style:r.Tag;return p(this,e),(o=t.call(this,o)).name=n,o.attribs=i,o.type=a,o}return d(e,[{key:"nodeType",get:function(){return 1}},{key:"tagName",get:function(){return this.name},set:function(t){this.name=t}},{key:"attributes",get:function(){var t=this;return Object.keys(this.attribs).map((function(e){var n;return{name:e,value:t.attribs[e],namespace:null===(n=t["x-attribsNamespace"])||void 0===n?void 0:n[e],prefix:null===(n=t["x-attribsPrefix"])||void 0===n?void 0:n[e]}}))}}]),e}();function T(t){return function(t){return t.type===r.Tag||t.type===r.Script||t.type===r.Style}(t)}function w(t){return t.type===r.CDATA}function x(t){return t.type===r.Text}function O(t){return t.type===r.Comment}function k(t){return t.type===r.Directive}function C(t){return t.type===r.Root}function S(t){return Object.prototype.hasOwnProperty.call(t,"children")}function R(t){var e,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(x(t))e=new g(t.data);else if(O(t))e=new _(t.data);else if(T(t)){var r=n?N(t.children):[],i=new A(t.name,a({},t.attribs),r);r.forEach((function(t){return t.parent=i})),null!=t.namespace&&(i.namespace=t.namespace),t["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},t["x-attribsPrefix"])),e=i}else if(w(t)){r=n?N(t.children):[];var o=new v(r);r.forEach((function(t){return t.parent=o})),e=o}else if(C(t)){var s=n?N(t.children):[],u=new E(s);s.forEach((function(t){return t.parent=u})),t["x-mode"]&&(u["x-mode"]=t["x-mode"]),e=u}else{if(!k(t))throw new Error("Not implemented yet: ".concat(t.type));s=new b(t.name,t.data),null!=t["x-name"]&&(s["x-name"]=t["x-name"],s["x-publicId"]=t["x-publicId"],s["x-systemId"]=t["x-systemId"]),e=s}return e.startIndex=t.startIndex,e.endIndex=t.endIndex,null!=t.sourceCodeLocation&&(e.sourceCodeLocation=t.sourceCodeLocation),e}function N(t){for(var e=t.map((function(t){return R(t,!0)})),n=1;n<e.length;n++)e[n].prev=e[n-1],e[n-1].next=e[n];return e}function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var L={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},P=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.dom=[],this.root=new E(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof n&&(r=n,n=L),"object"===I(e)&&(n=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=n?n:L,this.elementCB=null!=r?r:null}return function(t,e,n){e&&D(t.prototype,e),n&&D(t,n)}(t,[{key:"onparserinit",value:function(t){this.parser=t}},{key:"onreset",value:function(){this.dom=[],this.root=new E(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}},{key:"onend",value:function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}},{key:"onerror",value:function(t){this.handleCallback(t)}},{key:"onclosetag",value:function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}},{key:"onopentag",value:function(t,e){var n=this.options.xmlMode?r.Tag:void 0;n=new A(t,e,void 0,n),this.addNode(n),this.tagStack.push(n)}},{key:"ontext",value:function(t){var e=this.lastNode;e&&e.type===r.Text?(e.data+=t,this.options.withEndIndices&&(e.endIndex=this.parser.endIndex)):(t=new g(t),this.addNode(t),this.lastNode=t)}},{key:"oncomment",value:function(t){this.lastNode&&this.lastNode.type===r.Comment?this.lastNode.data+=t:(t=new _(t),this.addNode(t),this.lastNode=t)}},{key:"oncommentend",value:function(){this.lastNode=null}},{key:"oncdatastart",value:function(){var t=new g(""),e=new v([t]);this.addNode(e),t.parent=e,this.lastNode=t}},{key:"oncdataend",value:function(){this.lastNode=null}},{key:"onprocessinginstruction",value:function(t,e){e=new b(t,e),this.addNode(e)}},{key:"handleCallback",value:function(t){if("function"==typeof this.callback)this.callback(t,this.dom);else if(t)throw t}},{key:"addNode",value:function(t){var e=this.tagStack[this.tagStack.length-1],n=e.children[e.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),e.children.push(t),n&&((t.prev=n).next=t),t.parent=e,this.lastNode=null}}]),t}()},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(93);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(146),i=n(147),o=n(235);t.exports=function(t){var e=i();return function(){var n,i=r(t);return i=e?(n=r(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),o(this,i)}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.r(e),n.d(e,"getOuterHTML",(function(){return a})),n.d(e,"getInnerHTML",(function(){return s})),n.d(e,"getText",(function(){return u})),n.d(e,"textContent",(function(){return c})),n.d(e,"innerText",(function(){return l})),n.d(e,"getChildren",(function(){return p})),n.d(e,"getParent",(function(){return f})),n.d(e,"getSiblings",(function(){return d})),n.d(e,"getAttributeValue",(function(){return h})),n.d(e,"hasAttrib",(function(){return m})),n.d(e,"getName",(function(){return g})),n.d(e,"nextElementSibling",(function(){return _})),n.d(e,"prevElementSibling",(function(){return b})),n.d(e,"removeElement",(function(){return y})),n.d(e,"replaceElement",(function(){return v})),n.d(e,"appendChild",(function(){return E})),n.d(e,"append",(function(){return A})),n.d(e,"prependChild",(function(){return T})),n.d(e,"prepend",(function(){return w})),n.d(e,"filter",(function(){return C})),n.d(e,"find",(function(){return S})),n.d(e,"findOneChild",(function(){return R})),n.d(e,"findOne",(function(){return N})),n.d(e,"existsOne",(function(){return I})),n.d(e,"findAll",(function(){return D})),n.d(e,"testElement",(function(){return U})),n.d(e,"getElements",(function(){return F})),n.d(e,"getElementById",(function(){return H})),n.d(e,"getElementsByTagName",(function(){return q})),n.d(e,"getElementsByTagType",(function(){return V})),n.d(e,"removeSubsets",(function(){return G})),n.d(e,"DocumentPosition",(function(){return L})),n.d(e,"compareDocumentPosition",(function(){return z})),n.d(e,"uniqueSort",(function(){return W})),n.d(e,"getFeed",(function(){return Q})),n.d(e,"isTag",(function(){return i.m})),n.d(e,"isCDATA",(function(){return i.i})),n.d(e,"isText",(function(){return i.n})),n.d(e,"isComment",(function(){return i.j})),n.d(e,"isDocument",(function(){return i.l})),n.d(e,"hasChildren",(function(){return i.h}));var r,i=n(0),o=n(92);function a(t,e){return Object(o.a)(t,e)}function s(t,e){return Object(i.h)(t)?t.children.map((function(t){return a(t,e)})).join(""):""}function u(t){return Array.isArray(t)?t.map(u).join(""):Object(i.m)(t)?"br"===t.name?"\n":u(t.children):Object(i.i)(t)?u(t.children):Object(i.n)(t)?t.data:""}function c(t){return Array.isArray(t)?t.map(c).join(""):Object(i.h)(t)&&!Object(i.j)(t)?c(t.children):Object(i.n)(t)?t.data:""}function l(t){return Array.isArray(t)?t.map(l).join(""):Object(i.h)(t)&&(t.type===r.Tag||Object(i.i)(t))?l(t.children):Object(i.n)(t)?t.data:""}function p(t){return Object(i.h)(t)?t.children:[]}function f(t){return t.parent||null}function d(t){var e=f(t);if(null!=e)return p(e);for(var n=[t],r=t.prev,i=t.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=i;)n.push(i),i=i.next;return n}function h(t,e){return null===(t=t.attribs)||void 0===t?void 0:t[e]}function m(t,e){return null!=t.attribs&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&null!=t.attribs[e]}function g(t){return t.name}function _(t){for(var e=t.next;null!==e&&!Object(i.m)(e);)e=e.next;return e}function b(t){for(var e=t.prev;null!==e&&!Object(i.m)(e);)e=e.prev;return e}function y(t){var e;t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent&&(e=t.parent.children).splice(e.lastIndexOf(t),1)}function v(t,e){var n=e.prev=t.prev;n&&(n.next=e),(n=e.next=t.next)&&(n.prev=e),(n=e.parent=t.parent)&&((n=n.children)[n.lastIndexOf(t)]=e,t.parent=null)}function E(t,e){y(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null}function A(t,e){y(e);var n=t.parent,r=t.next;e.next=r,((e.prev=t).next=e).parent=n,r?(r.prev=e,n&&(t=n.children).splice(t.lastIndexOf(r),0,e)):n&&n.children.push(e)}function T(t,e){y(e),e.parent=t,e.prev=null,1!==t.children.unshift(e)?((t=t.children[1]).prev=e).next=t:e.next=null}function w(t,e){y(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e}function x(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function C(t,e){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1/0;return S(t,e=Array.isArray(e)?e:[e],n,r)}function S(t,e,n,r){var o,a=[],s=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return{s:e=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}(e);try{for(s.s();!(o=s.n()).done;){var u=o.value;if(t(u)&&(a.push(u),--r<=0))break;if(n&&Object(i.h)(u)&&0<u.children.length){var c=S(t,u.children,n,r);if(a.push.apply(a,x(c)),(r-=c.length)<=0)break}}}catch(t){s.e(t)}finally{s.f()}return a}function R(t,e){return e.find(t)}function N(t,e){for(var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],r=null,o=0;o<e.length&&!r;o++){var a=e[o];Object(i.m)(a)&&(t(a)?r=a:n&&0<a.children.length&&(r=N(t,a.children,!0)))}return r}function I(t,e){return e.some((function(e){return Object(i.m)(e)&&(t(e)||0<e.children.length&&I(t,e.children))}))}function D(t,e){for(var n,r=[],o=e.filter(i.m);n=o.shift();){var a=null===(a=n.children)||void 0===a?void 0:a.filter(i.m);a&&0<a.length&&o.unshift.apply(o,x(a)),t(n)&&r.push(n)}return r}(n=r=r||{}).Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype",r.Root,r.Text,r.Directive,r.Comment,r.Script,r.Style,r.Tag,r.CDATA,r.Doctype;var L,P={tag_name:function(t){return"function"==typeof t?function(e){return Object(i.m)(e)&&t(e.name)}:"*"===t?i.m:function(e){return Object(i.m)(e)&&e.name===t}},tag_type:function(t){return"function"==typeof t?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return"function"==typeof t?function(e){return Object(i.n)(e)&&t(e.data)}:function(e){return Object(i.n)(e)&&e.data===t}}};function j(t,e){return"function"==typeof e?function(n){return Object(i.m)(n)&&e(n.attribs[t])}:function(n){return Object(i.m)(n)&&n.attribs[t]===e}}function M(t,e){return function(n){return t(n)||e(n)}}function B(t){var e=Object.keys(t).map((function(e){var n=t[e];return Object.prototype.hasOwnProperty.call(P,e)?P[e](n):j(e,n)}));return 0===e.length?null:e.reduce(M)}function U(t,e){return!(t=B(t))||t(e)}function F(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1/0;return(t=B(t))?C(t,e,n,r):[]}function H(t,e){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];return Array.isArray(e)||(e=[e]),N(j("id",t),e,n)}function q(t,e){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1/0;return C(P.tag_name(t),e,n,r)}function V(t,e){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1/0;return C(P.tag_type(t),e,n,r)}function G(t){for(var e=t.length;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(var r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t}function z(t,e){var n=[],r=[];if(t===e)return 0;for(var o=Object(i.h)(t)?t:t.parent;o;)n.unshift(o),o=o.parent;for(o=Object(i.h)(e)?e:e.parent;o;)r.unshift(o),o=o.parent;for(var a=Math.min(n.length,r.length),s=0;s<a&&n[s]===r[s];)s++;if(0===s)return L.DISCONNECTED;var u=n[s-1],c=u.children,l=n[s],p=r[s];return c.indexOf(l)>c.indexOf(p)?u===e?L.FOLLOWING|L.CONTAINED_BY:L.FOLLOWING:u===t?L.PRECEDING|L.CONTAINS:L.PRECEDING}function W(t){return(t=t.filter((function(t,e,n){return!n.includes(t,e+1)}))).sort((function(t,e){return(e=z(t,e))&L.PRECEDING?-1:e&L.FOLLOWING?1:0})),t}function Y(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return K(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return{s:e=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Q(t){return(t=J(nt,t))?("feed"===t.name?function(t){var e=t.children,n={type:"atom",items:q("entry",e).map((function(t){var e=t.children,n={media:Z(e)};return et(n,"id","id",e),et(n,"title","title",e),(t=null===(t=J("link",e))||void 0===t?void 0:t.attribs.href)&&(n.link=t),(t=tt("summary",e)||tt("content",e))&&(n.description=t),(e=tt("updated",e))&&(n.pubDate=new Date(e)),n}))};return et(n,"id","id",e),et(n,"title","title",e),(t=null===(t=J("link",e))||void 0===t?void 0:t.attribs.href)&&(n.link=t),et(n,"description","subtitle",e),(t=tt("updated",e))&&(n.updated=new Date(t)),et(n,"author","email",e,!0),n}:function(t){var e=null!==(n=null===(e=J("channel",t.children))||void 0===e?void 0:e.children)&&void 0!==n?n:[],n={type:t.name.substr(0,3),id:"",items:q("item",t.children).map((function(t){var e=t.children;return et(t={media:Z(e)},"id","guid",e),et(t,"title","title",e),et(t,"link","link",e),et(t,"description","description",e),(e=tt("pubDate",e))&&(t.pubDate=new Date(e)),t}))};return et(n,"title","title",e),et(n,"link","link",e),et(n,"description","description",e),(t=tt("lastBuildDate",e))&&(n.updated=new Date(t)),et(n,"author","managingEditor",e,!0),n})(t):null}(n=L=L||{})[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY";var X=["url","type","lang"],$=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Z(t){return q("media:content",t).map((function(t){var e,n=t.attribs,r={medium:n.medium,isDefault:!!n.isDefault},i=Y(X);try{for(i.s();!(e=i.n()).done;){var o=e.value;n[o]&&(r[o]=n[o])}}catch(t){i.e(t)}finally{i.f()}var a,s=Y($);try{for(s.s();!(a=s.n()).done;){var u=a.value;n[u]&&(r[u]=parseInt(n[u],10))}}catch(t){s.e(t)}finally{s.f()}return n.expression&&(r.expression=n.expression),r}))}function J(t,e){return q(t,e,!0,1)[0]}function tt(t,e,n){return c(q(t,e,2<arguments.length&&void 0!==n&&n,1)).trim()}function et(t,e,n,r,i){(i=tt(n,r,4<arguments.length&&void 0!==i&&i))&&(t[e]=i)}function nt(t){return"rss"===t||"feed"===t||"rdf:RDF"===t}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";(function(t){function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)),r}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){!function(t,e,n){e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var u=n(36).default,c=n(1).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a="",u=[];H&&"string"==typeof o.skeleton&&(o.skeleton=n(535)("."===o.skeleton.charAt(0)?w.default.resolve(t.cwd(),o.skeleton):o.skeleton));var c={},l={},p={},f=[],d=null,L=null;(H&&o.useMjmlConfigOptions||o.mjmlConfigPath)&&(c=(K=(W=(0,F.readMjmlConfig)(o.mjmlConfigPath)).mjmlConfig).packages,l=K.options,f=K.preprocessors,L=W.componentRootPath,d=W.error,o.useMjmlConfigOptions&&(p=l)),H&&!d&&o.mjmlConfigPath&&(0,F.handleMjmlConfigComponents)(c,L,D.registerComponent);var P,V=void 0!==(Y=(X=s(s(s({},p),o),{},{preprocessors:o.preprocessors?[].concat(r(f),r(o.preprocessors)):f})).beautify)&&Y,G=void 0===(Q=X.fonts)?{"Open Sans":"https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700","Droid Sans":"https://fonts.googleapis.com/css?family=Droid+Sans:300,400,500,700",Lato:"https://fonts.googleapis.com/css?family=Lato:300,400,500,700",Roboto:"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700",Ubuntu:"https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700"}:Q,z=X.keepComments,W=void 0!==(K=X.minify)&&K,Y=(d=void 0===(l=X.minifyOptions)?{}:l,L=void 0!==(c=X.ignoreIncludes)&&c,o=void 0===(p=X.juiceOptions)?{}:p,void 0===(f=X.juicePreserveTags)?null:f),K=void 0===(Q=X.skeleton)?B.default:Q,Q=(c=void 0===(l=X.validationLevel)?"soft":l,f=void 0===(p=X.filePath)?".":p,l=void 0===(Q=X.actualPath)?".":Q,void 0!==(p=X.noMigrateWarn)&&p),X=(p=X.preprocessors,void 0===(X=X.presets)?[]:X),$=s({},D.default),Z=(0,R.assignDependencies)({},R.dependencies),J=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return{s:e=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(X);try{for(J.s();!(P=J.n()).done;){var tt=P.value;(0,D.assignComponents)($,tt.components),(0,R.assignDependencies)(Z,tt.dependencies)}}catch(e){J.e(e)}finally{J.f()}"string"==typeof e&&(e=(0,S.default)(e,{keepComments:z,components:$,filePath:f,actualPath:l,preprocessors:p,ignoreIncludes:L})),e=(0,N.handleMjml3)(e,{noMigrateWarn:Q});var et,nt,rt={backgroundColor:"",beforeDoctype:"",breakpoint:"480px",classes:{},classesDefault:{},defaultAttributes:{},htmlAttributes:{},fonts:G,inlineStyle:[],headStyle:{},componentsHeadStyle:[],headRaw:[],mediaQueries:{},preview:"",style:[],title:"",forceOWADesktop:"desktop"===(0,E.default)(e,"attributes.owa","mobile"),lang:(0,E.default)(e,"attributes.lang"),dir:(0,E.default)(e,"attributes.dir")},it={components:$,dependencies:Z,initializeType:U.initializeType};switch(c){case"skip":break;case"strict":if(0<(u=(0,R.default)(e,it)).length)throw new q("ValidationError: \n ".concat(u.map((function(t){return t.formattedMessage})).join("\n")),u);break;default:u=(0,R.default)(e,it)}function ot(t,e,n){if(n=2<arguments.length&&void 0!==n?n:v.default,t)return null!==(e=(0,I.initComponent)({name:t.tagName,initialDatas:s(s({},n(t)),{},{context:e})}))?"handler"in e?e.handler():"render"in e?e.render():void 0:void 0}function at(t){return function t(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",r=e.attributes,i=e.tagName,o=e.children,a=(0,E.default)(e.attributes,"mj-class","").split(" "),u=(0,_.default)(a,(function(t,e){var n=rt.classes[e];return e={},t["css-class"]&&(0,E.default)(n,"css-class")&&(e={"css-class":"".concat(t["css-class"]," ").concat(n["css-class"])}),s(s(s({},t),n),e)}),{}),c=(a=(0,_.default)(n.split(" "),(function(t,e){return s(s({},t),(0,E.default)(rt.classesDefault,"".concat(e,".").concat(i)))}),{}),(0,E.default)(r,"mj-class",n));return s(s({},e),{},{attributes:s(s(s(s({},rt.defaultAttributes[i]),u),a),(0,b.default)(r,["mj-class"])),globalAttributes:s({},rt.defaultAttributes["mj-all"]),children:(0,y.default)(o,(function(e){return t(e,c)}))})}(t)}if(p=(0,T.default)(e.children,{tagName:"mj-body"}),L=(0,T.default)(e.children,{tagName:"mj-head"}),Q=(0,A.default)(e.children,{tagName:"mj-raw"}),G={components:$,globalData:rt,addMediaQuery:function(t,e){var n=e.parsedWidth;e=e.unit,rt.mediaQueries[t]="{ width:".concat(n).concat(e," !important; max-width: ").concat(n).concat(e,"; }")},addHeadStyle:function(t,e){rt.headStyle[t]=e},addComponentHeadSyle:function(t){rt.componentsHeadStyle.push(t)},setBackgroundColor:function(t){rt.backgroundColor=t},processing:function(t,e){return ot(t,e,at)}},c={components:$,globalData:rt,add:function(t){for(var e,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(Array.isArray(rt[t]))(e=rt[t]).push.apply(e,r);else{if(!Object.prototype.hasOwnProperty.call(rt,t))throw Error("An mj-head element add an unkown head attribute : ".concat(t," with params ").concat(Array.isArray(r)?r.join(""):r));1<r.length?(0,g.default)(rt[t][r[0]])?rt[t][r[0]]=s(s({},rt[t][r[0]]),r[1]):rt[t][r[0]]=r[1]:rt[t]=r[0]}}},rt.headRaw=ot(L,c),!(a=ot(p,G,at)))throw new Error("Malformed MJML. Check that your structure is correct and enclosed in <mjml> tags.");return a=(0,M.default)(a),Q.length&&(et=Q.filter((function(t){return t.attributes.position&&"file-start"===t.attributes.position}))).length&&(rt.beforeDoctype=et.map((function(t){return t.content})).join("\n")),(0,h.default)(rt.htmlAttributes)||(nt=(0,C.load)(a,{xmlMode:!0,decodeEntities:!1}),(0,m.default)(rt.htmlAttributes,(function(t,e){(0,m.default)(t,(function(t,n){nt(e).each((function(){nt(this).attr(n,t||"")}))}))})),a=nt.root().html()),a=K(s({content:a},rt)),0<rt.inlineStyle.length&&(Y&&(0,m.default)(Y,(function(t,e){x.default.codeBlocks[e]=t})),a=(0,x.default)(a,s({applyStyleTags:!1,extraCss:rt.inlineStyle.join(""),insertPreservedExtraCss:!1,removeStyleTags:!1},o))),a=(0,j.default)(a),V&&(console.warn('"beautify" option is deprecated in mjml-core and only available in mjml cli.'),a=(0,O.html)(a,{indent_size:2,wrap_attributes_indent_size:2,max_preserve_newline:0,preserve_newlines:!1})),W&&(console.warn('"minify" option is deprecated in mjml-core and only available in mjml cli.'),a=(0,k.minify)(a,s({collapseWhitespace:!0,minifyCSS:!1,caseSensitive:!0,removeEmptyAttributes:!0},d))),{html:a,json:e,errors:u}},Object.defineProperty(e,"initComponent",{enumerable:!0,get:function(){return I.initComponent}}),Object.defineProperty(e,"BodyComponent",{enumerable:!0,get:function(){return I.BodyComponent}}),Object.defineProperty(e,"HeadComponent",{enumerable:!0,get:function(){return I.HeadComponent}}),Object.defineProperty(e,"components",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,"registerComponent",{enumerable:!0,get:function(){return D.registerComponent}}),Object.defineProperty(e,"assignComponents",{enumerable:!0,get:function(){return D.assignComponents}}),Object.defineProperty(e,"makeLowerBreakpoint",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"suffixCssClasses",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"initializeType",{enumerable:!0,get:function(){return U.initializeType}}),Object.defineProperty(e,"handleMjmlConfig",{enumerable:!0,get:function(){return F.default}});var l=c(n(3)),p=c(n(4)),f=c(n(5)),d=c(n(236)),h=c(n(148)),m=c(n(153)),g=c(n(18)),_=c(n(41)),b=c(n(168)),y=c(n(46)),v=c(n(24)),E=c(n(42)),A=c(n(114)),T=c(n(47)),w=c(n(21)),x=c(n(337)),O=n(179),k=n(352),C=n(232),S=c(n(132)),R=u(n(141)),N=n(497),I=n(499),D=u(n(224)),L=c(n(525)),P=c(n(526)),j=c(n(527)),M=c(n(528)),B=c(n(529)),U=n(27),F=u(n(533)),H=n(534),q=function(t){(0,p.default)(n,t);var e=(0,f.default)(n);function n(t,r){return(0,l.default)(this,n),(t=e.call(this,t)).errors=r,t}return n}((0,d.default)(Error));H&&(0,F.default)(t.cwd(),D.registerComponent)}).call(this,n(14))},function(t,e){t.exports={AT_RULE:"at-rule",AT_RULE_BLOCK:"at-rule-block",AT_RULE_BLOCK_SCOPE:"at-rule-block-scope",COMMENT:"comment",NESTED_BLOCK:"nested-block",NESTED_BLOCK_SCOPE:"nested-block-scope",PROPERTY:"property",PROPERTY_BLOCK:"property-block",PROPERTY_NAME:"property-name",PROPERTY_VALUE:"property-value",RAW:"raw",RULE:"rule",RULE_SCOPE:"rule-scope"}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTML=e.determineBranch=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var i=r(n(341));e.htmlDecodeTree=i.default;var o=r(n(342));e.xmlDecodeTree=o.default;var a=r(n(177));e.decodeCodePoint=a.default;var s,u,c=n(177);function l(t){return function(e,n){for(var r="",i=0,o=0;0<=(o=e.indexOf("&",o));)if(r+=e.slice(i,o),i=o,e.charCodeAt(o+=1)!==s.NUM){for(var c=0,l=1,f=0,d=t[f];o<e.length&&!((f=p(t,d,f+1,e.charCodeAt(o)))<0);o++,l++){var h,m=(d=t[f])&u.VALUE_LENGTH;if(m){if(n&&e.charCodeAt(o)!==s.SEMI||(c=f,l=0),0==(h=(m>>14)-1))break;f+=h}}0!==c&&(r+=1==(h=(t[c]&u.VALUE_LENGTH)>>14)?String.fromCharCode(t[c]&~u.VALUE_LENGTH):2===h?String.fromCharCode(t[c+1]):String.fromCharCode(t[c+1],t[c+2]),i=o-l+1)}else{var g,_=o+1,b=10;for(((g=e.charCodeAt(_))|s.To_LOWER_BIT)===s.LOWER_X&&(b=16,o+=1,_+=1);(g=e.charCodeAt(++o))>=s.ZERO&&g<=s.NINE||16===b&&(g|s.To_LOWER_BIT)>=s.LOWER_A&&(g|s.To_LOWER_BIT)<=s.LOWER_F;);if(_!==o){if(_=e.substring(_,o),_=parseInt(_,b),e.charCodeAt(o)===s.SEMI)o+=1;else if(n)continue;r+=(0,a.default)(_),i=o}}return r+e.slice(i)}}function p(t,e,n,r){var i=(e&u.BRANCH_LENGTH)>>7;if(e&=u.JUMP_TABLE,0==i)return 0!=e&&r===e?n:-1;if(e)return(e=r-e)<0||i<=e?-1:t[n+e]-1;for(var o=n,a=o+i-1;o<=a;){var s=o+a>>>1,c=t[s];if(c<r)o=1+s;else{if(!(r<c))return t[s+i];a=s-1}}return-1}Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return c.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return c.fromCodePoint}}),(n=s=s||{})[n.NUM=35]="NUM",n[n.SEMI=59]="SEMI",n[n.ZERO=48]="ZERO",n[n.NINE=57]="NINE",n[n.LOWER_A=97]="LOWER_A",n[n.LOWER_F=102]="LOWER_F",n[n.LOWER_X=120]="LOWER_X",n[n.To_LOWER_BIT=32]="To_LOWER_BIT",(n=u=e.BinTrieFlags||(e.BinTrieFlags={}))[n.VALUE_LENGTH=49152]="VALUE_LENGTH",n[n.BRANCH_LENGTH=16256]="BRANCH_LENGTH",n[n.JUMP_TABLE=127]="JUMP_TABLE",e.determineBranch=p;var f=l(i.default),d=l(o.default);e.decodeHTML=function(t){return f(t,!1)},e.decodeHTMLStrict=function(t){return f(t,!0)},e.decodeXML=function(t){return d(t,!0)}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(124);function i(t,e){t.output.push("string"==typeof e?e:e[1])}function o(){return{output:[],store:i}}t.exports={all:function(t){var e=o();return r.all(e,t),e.output.join("")},body:function(t){var e=o();return r.body(e,t),e.output.join("")},property:function(t,e){var n=o();return r.property(n,t,e,!0),n.output.join("")},rules:function(t){var e=o();return r.rules(e,t),e.output.join("")},value:function(t){var e=o();return r.value(e,t),e.output.join("")}}},function(t,e){var n,r;function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}t=t.exports={},function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,u=[],c=!1,l=-1;function p(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&f())}function f(){if(!c){var t=a(p);c=!0;for(var e=u.length;e;){for(s=u,u=[];++l<e;)s&&s[l].run();l=-1,e=u.length}s=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function h(){}t.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||c||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(t){return[]},t.binding=function(t){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(t){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},function(t,e){t.exports={ASTERISK:"*",AT:"@",BACK_SLASH:"\\",CARRIAGE_RETURN:"\r",CLOSE_CURLY_BRACKET:"}",CLOSE_ROUND_BRACKET:")",CLOSE_SQUARE_BRACKET:"]",COLON:":",COMMA:",",DOUBLE_QUOTE:'"',EXCLAMATION:"!",FORWARD_SLASH:"/",INTERNAL:"-clean-css-",NEW_LINE_NIX:"\n",OPEN_CURLY_BRACKET:"{",OPEN_ROUND_BRACKET:"(",OPEN_SQUARE_BRACKET:"[",SEMICOLON:";",SINGLE_QUOTE:"'",SPACE:" ",TAB:"\t",UNDERSCORE:"_"}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(150);n="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,n=i||n||Function("return this")(),t.exports=n},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}t.exports=r},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(t);return null!=t&&("object"==e||"function"==e)}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!=t&&"object"==n(t)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(257),o=n(291),a=n(24),s=n(12),u=n(298);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==r(t)?s(t)?o(t[0],t[1]):i(t):u(t)}},function(t,e){function n(){return console.warn("fs should not be used in browser build"),null}t.exports={parse:n,resolve:n,join:n,dirname:n,isAbsolute:n}},function(t,e,n){"use strict";(function(t){var r=n(339),i=n(340),o=n(176);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(t=null===t?new u(e):t).length=e,t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"!=typeof t)return c(this,t,e,n);if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return p(this,t)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e),t}(t,e,n,r):"string"==typeof e?function(t,e,n){if(!u.isEncoding(n="string"!=typeof n||""===n?"utf8":n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(e,n);return(n=(t=s(t,r)).write(e,n))!==r?t.slice(0,n):t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|d(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?s(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function p(t,e){if(l(e),t=s(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|d(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function h(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;var n=(t="string"!=typeof t?""+t:t).length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return S(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return R(t).length;default:if(r)return S(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,(n=(n=isNaN(n)?i?0:t.length-1:n)<0?t.length+n:n)>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:_(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,n):_(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,n,r,i){var o=1,a=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a/=o=2,s/=2,n/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i)for(var c=-1,l=n;l<a;l++)if(u(t,l)===u(e,-1===c?0:l-c)){if(l-(c=-1===c?l:c)+1===s)return c*o}else-1!==c&&(l-=l-c),c=-1;else for(l=n=a<n+s?a-s:n;0<=l;l--){for(var p=!0,f=0;f<s;f++)if(u(t,l+f)!==u(e,f)){p=!1;break}if(p)return l}return-1}function b(t,e,n,r){return N(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function y(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,c=t[i],l=null,p=239<c?4:223<c?3:191<c?2:1;if(i+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&127<(u=(31&c)<<6|63&o)&&(l=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&2047<(u=(15&c)<<12|(63&o)<<6|63&a)&&(u<55296||57343<u)&&(l=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&65535<(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)&&u<1114112&&(l=u)}null===l?(l=65533,p=1):65535<l&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=p}return function(t){var e=t.length;if(e<=v)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=v));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){return u.alloc(+(t=+t!=t?0:t))},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0||void 0===n?s(t,e):"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n)}(null,t,e,n)},u.allocUnsafe=function(t){return p(null,t)},u.allocUnsafeSlow=function(t){return p(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);if(void 0===e)for(i=e=0;i<t.length;++i)e+=t[i].length;for(var n=u.allocUnsafe(e),r=0,i=0;i<t.length;++i){var a=t[i];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},u.byteLength=h,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0==t?"":0===arguments.length?y(this,0,t):function(t,e,n){var i=!1;if((e=void 0===e||e<0?0:e)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return function(t,e,n){var r=t.length;(!n||n<0||r<n)&&(n=r);for(var i="",o=e=!e||e<0?0:e;o<n;++o)i+=function(t){return t<16?"0"+t.toString(16):t.toString(16)}(t[o]);return i}(this,e,n);case"utf8":case"utf-8":return y(this,e,n);case"ascii":return function(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}(this,e,n);case"latin1":case"binary":return function(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}(this,e,n);case"base64":return function(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return 0<this.length&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),(e=void 0===e?0:e)<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=e)return 0;if(i<=r)return-1;if(n<=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=t.slice(e,n),p=0;p<s;++p)if(c[p]!==l[p]){o=c[p],a=l[p];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},u.pr