UNPKG

@sohailalam2/markdown-extractor

Version:

Your one solution to extract markdown metadata and content

2 lines 619 kB
/*! For license information please see bundle.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.MarkdownExtractor=e():t.MarkdownExtractor=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=153)}([function(t,e,n){"use strict";var r=n(32),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=function(t,e){var n,o;if(e=e||{},Object.keys(e).forEach((function(e){if(-1===i.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,o={},null!==n&&Object.keys(n).forEach((function(t){n[t].forEach((function(e){o[String(e)]=t}))})),o),-1===s.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(113),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();t.exports=s},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){"use strict";var r=e.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};e.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},e.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var i=e.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",MENUITEM:"menuitem",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"},s=e.SPECIAL_ELEMENTS=Object.create(null);s[r.HTML]=Object.create(null),s[r.HTML][i.ADDRESS]=!0,s[r.HTML][i.APPLET]=!0,s[r.HTML][i.AREA]=!0,s[r.HTML][i.ARTICLE]=!0,s[r.HTML][i.ASIDE]=!0,s[r.HTML][i.BASE]=!0,s[r.HTML][i.BASEFONT]=!0,s[r.HTML][i.BGSOUND]=!0,s[r.HTML][i.BLOCKQUOTE]=!0,s[r.HTML][i.BODY]=!0,s[r.HTML][i.BR]=!0,s[r.HTML][i.BUTTON]=!0,s[r.HTML][i.CAPTION]=!0,s[r.HTML][i.CENTER]=!0,s[r.HTML][i.COL]=!0,s[r.HTML][i.COLGROUP]=!0,s[r.HTML][i.DD]=!0,s[r.HTML][i.DETAILS]=!0,s[r.HTML][i.DIR]=!0,s[r.HTML][i.DIV]=!0,s[r.HTML][i.DL]=!0,s[r.HTML][i.DT]=!0,s[r.HTML][i.EMBED]=!0,s[r.HTML][i.FIELDSET]=!0,s[r.HTML][i.FIGCAPTION]=!0,s[r.HTML][i.FIGURE]=!0,s[r.HTML][i.FOOTER]=!0,s[r.HTML][i.FORM]=!0,s[r.HTML][i.FRAME]=!0,s[r.HTML][i.FRAMESET]=!0,s[r.HTML][i.H1]=!0,s[r.HTML][i.H2]=!0,s[r.HTML][i.H3]=!0,s[r.HTML][i.H4]=!0,s[r.HTML][i.H5]=!0,s[r.HTML][i.H6]=!0,s[r.HTML][i.HEAD]=!0,s[r.HTML][i.HEADER]=!0,s[r.HTML][i.HGROUP]=!0,s[r.HTML][i.HR]=!0,s[r.HTML][i.HTML]=!0,s[r.HTML][i.IFRAME]=!0,s[r.HTML][i.IMG]=!0,s[r.HTML][i.INPUT]=!0,s[r.HTML][i.LI]=!0,s[r.HTML][i.LINK]=!0,s[r.HTML][i.LISTING]=!0,s[r.HTML][i.MAIN]=!0,s[r.HTML][i.MARQUEE]=!0,s[r.HTML][i.MENU]=!0,s[r.HTML][i.META]=!0,s[r.HTML][i.NAV]=!0,s[r.HTML][i.NOEMBED]=!0,s[r.HTML][i.NOFRAMES]=!0,s[r.HTML][i.NOSCRIPT]=!0,s[r.HTML][i.OBJECT]=!0,s[r.HTML][i.OL]=!0,s[r.HTML][i.P]=!0,s[r.HTML][i.PARAM]=!0,s[r.HTML][i.PLAINTEXT]=!0,s[r.HTML][i.PRE]=!0,s[r.HTML][i.SCRIPT]=!0,s[r.HTML][i.SECTION]=!0,s[r.HTML][i.SELECT]=!0,s[r.HTML][i.SOURCE]=!0,s[r.HTML][i.STYLE]=!0,s[r.HTML][i.SUMMARY]=!0,s[r.HTML][i.TABLE]=!0,s[r.HTML][i.TBODY]=!0,s[r.HTML][i.TD]=!0,s[r.HTML][i.TEMPLATE]=!0,s[r.HTML][i.TEXTAREA]=!0,s[r.HTML][i.TFOOT]=!0,s[r.HTML][i.TH]=!0,s[r.HTML][i.THEAD]=!0,s[r.HTML][i.TITLE]=!0,s[r.HTML][i.TR]=!0,s[r.HTML][i.TRACK]=!0,s[r.HTML][i.UL]=!0,s[r.HTML][i.WBR]=!0,s[r.HTML][i.XMP]=!0,s[r.MATHML]=Object.create(null),s[r.MATHML][i.MI]=!0,s[r.MATHML][i.MO]=!0,s[r.MATHML][i.MN]=!0,s[r.MATHML][i.MS]=!0,s[r.MATHML][i.MTEXT]=!0,s[r.MATHML][i.ANNOTATION_XML]=!0,s[r.SVG]=Object.create(null),s[r.SVG][i.TITLE]=!0,s[r.SVG][i.FOREIGN_OBJECT]=!0,s[r.SVG][i.DESC]=!0},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!T(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(a(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,s=r.length,o=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=s)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),u=r[n];n<s;u=r[++n])m(u)||!A(u)?o+=" "+u:o+=" "+a(u);return o},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var s,o={};function a(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&e._extend(r,n),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=a.styles[e];return n?"["+a.colors[n][0]+"m"+t+"["+a.colors[n][1]+"m":t}function c(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return T(i)||(i=l(t,i,r)),i}var s=function(t,e){if(_(e))return t.stylize("undefined","undefined");if(T(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(E(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,n);if(s)return s;var o=Object.keys(n),a=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),y(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(n);if(0===o.length){if(x(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(g(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(v(n))return t.stylize(Date.prototype.toString.call(n),"date");if(y(n))return h(n)}var c,A="",S=!1,D=["{","}"];(f(n)&&(S=!0,D=["[","]"]),x(n))&&(A=" [Function"+(n.name?": "+n.name:"")+"]");return g(n)&&(A=" "+RegExp.prototype.toString.call(n)),v(n)&&(A=" "+Date.prototype.toUTCString.call(n)),y(n)&&(A=" "+h(n)),0!==o.length||S&&0!=n.length?r<0?g(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=S?function(t,e,n,r,i){for(var s=[],o=0,a=e.length;o<a;++o)N(e,String(o))?s.push(p(t,e,n,r,String(o),!0)):s.push("");return i.forEach((function(i){i.match(/^\d+$/)||s.push(p(t,e,n,r,i,!0))})),s}(t,n,r,a,o):o.map((function(e){return p(t,n,r,a,e,S)})),t.seen.pop(),function(t,e,n){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,A,D)):D[0]+A+D[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,i,s){var o,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),N(r,i)||(o="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=m(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),_(o)){if(s&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function f(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function m(t){return null===t}function E(t){return"number"==typeof t}function T(t){return"string"==typeof t}function _(t){return void 0===t}function g(t){return A(t)&&"[object RegExp]"===S(t)}function A(t){return"object"==typeof t&&null!==t}function v(t){return A(t)&&"[object Date]"===S(t)}function y(t){return A(t)&&("[object Error]"===S(t)||t instanceof Error)}function x(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function D(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(_(s)&&(s=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(s)){var r=t.pid;o[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else o[n]=function(){};return o[n]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=d,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=E,e.isString=T,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=_,e.isRegExp=g,e.isObject=A,e.isDate=v,e.isError=y,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(180);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function b(){var t=new Date,e=[D(t.getHours()),D(t.getMinutes()),D(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function N(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",b(),e.format.apply(e,arguments))},e.inherits=n(181),e._extend=function(t,e){if(!e||!A(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(k&&t[k]){var e;if("function"!=typeof(e=t[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),k&&Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=k,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var s=this,o=function(){return i.apply(s,arguments)};e.apply(this,n).then((function(e){t.nextTick(o,null,e)}),(function(e){t.nextTick(O,e,o)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(22))},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=t.exports;[n(161),n(165),n(166),n(167),n(168),n(169)].forEach((function(t){Object.keys(t).forEach((function(e){r[e]=t[e].bind(r)}))}))},function(t,e,n){"use strict";var r=n(39),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=h;var s=Object.create(n(23));s.inherits=n(4);var o=n(107),a=n(64);s.inherits(h,o);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];h.prototype[l]||(h.prototype[l]=a.prototype[l])}function h(t){if(!(this instanceof h))return new h(t);o.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||r.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){var r=n(200),i=n(205);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(67),i=n(74);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,n){"use strict";var r=n(175),i=n(21),s=n(176),o=i.CODE_POINTS,a=i.CODE_POINT_SEQUENCES,u={0:65533,13:13,128:8364,129:129,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,141:141,142:381,143:143,144:144,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,157:157,158:382,159:376},c="DATA_STATE";function l(t){return t===o.SPACE||t===o.LINE_FEED||t===o.TABULATION||t===o.FORM_FEED}function h(t){return t>=o.DIGIT_0&&t<=o.DIGIT_9}function p(t){return t>=o.LATIN_CAPITAL_A&&t<=o.LATIN_CAPITAL_Z}function f(t){return t>=o.LATIN_SMALL_A&&t<=o.LATIN_SMALL_Z}function d(t){return f(t)||p(t)}function m(t,e){return h(t)||e&&(t>=o.LATIN_CAPITAL_A&&t<=o.LATIN_CAPITAL_F||t>=o.LATIN_SMALL_A&&t<=o.LATIN_SMALL_F)}function E(t){return t+32}function T(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(t>>>10&1023|55296)+String.fromCharCode(56320|1023&t))}function _(t){return String.fromCharCode(E(t))}function g(t,e){for(var n=s[++t],r=++t,i=r+n-1;r<=i;){var o=r+i>>>1,a=s[o];if(a<e)r=o+1;else{if(!(a>e))return s[o+n];i=o-1}}return-1}var A=t.exports=function(){this.preprocessor=new r,this.tokenQueue=[],this.allowCDATA=!1,this.state=c,this.returnState="",this.tempBuff=[],this.additionalAllowedCp=void 0,this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null};A.CHARACTER_TOKEN="CHARACTER_TOKEN",A.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",A.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",A.START_TAG_TOKEN="START_TAG_TOKEN",A.END_TAG_TOKEN="END_TAG_TOKEN",A.COMMENT_TOKEN="COMMENT_TOKEN",A.DOCTYPE_TOKEN="DOCTYPE_TOKEN",A.EOF_TOKEN="EOF_TOKEN",A.HIBERNATION_TOKEN="HIBERNATION_TOKEN",A.MODE={DATA:c,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},A.getTokenAttr=function(t,e){for(var n=t.attrs.length-1;n>=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null},A.prototype.getNextToken=function(){for(;!this.tokenQueue.length&&this.active;){this._hibernationSnapshot();var t=this._consume();this._ensureHibernation()||this[this.state](t)}return this.tokenQueue.shift()},A.prototype.write=function(t,e){this.active=!0,this.preprocessor.write(t,e)},A.prototype.insertHtmlAtCurrentPos=function(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t)},A.prototype._hibernationSnapshot=function(){this.consumedAfterSnapshot=0},A.prototype._ensureHibernation=function(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:A.HIBERNATION_TOKEN}),!0}return!1},A.prototype._consume=function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()},A.prototype._unconsume=function(){this.consumedAfterSnapshot--,this.preprocessor.retreat()},A.prototype._unconsumeSeveral=function(t){for(;t--;)this._unconsume()},A.prototype._reconsumeInState=function(t){this.state=t,this._unconsume()},A.prototype._consumeSubsequentIfMatch=function(t,e,n){for(var r=0,i=!0,s=t.length,a=0,u=e,c=void 0;a<s;a++){if(a>0&&(u=this._consume(),r++),u===o.EOF){i=!1;break}if(u!==(c=t[a])&&(n||u!==E(c))){i=!1;break}}return i||this._unconsumeSeveral(r),i},A.prototype._lookahead=function(){var t=this._consume();return this._unconsume(),t},A.prototype.isTempBufferEqualToScriptString=function(){if(this.tempBuff.length!==a.SCRIPT_STRING.length)return!1;for(var t=0;t<this.tempBuff.length;t++)if(this.tempBuff[t]!==a.SCRIPT_STRING[t])return!1;return!0},A.prototype._createStartTagToken=function(){this.currentToken={type:A.START_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}},A.prototype._createEndTagToken=function(){this.currentToken={type:A.END_TAG_TOKEN,tagName:"",attrs:[]}},A.prototype._createCommentToken=function(){this.currentToken={type:A.COMMENT_TOKEN,data:""}},A.prototype._createDoctypeToken=function(t){this.currentToken={type:A.DOCTYPE_TOKEN,name:t,forceQuirks:!1,publicId:null,systemId:null}},A.prototype._createCharacterToken=function(t,e){this.currentCharacterToken={type:t,chars:e}},A.prototype._createAttr=function(t){this.currentAttr={name:t,value:""}},A.prototype._isDuplicateAttr=function(){return null!==A.getTokenAttr(this.currentToken,this.currentAttr.name)},A.prototype._leaveAttrName=function(t){this.state=t,this._isDuplicateAttr()||this.currentToken.attrs.push(this.currentAttr)},A.prototype._leaveAttrValue=function(t){this.state=t},A.prototype._isAppropriateEndTagToken=function(){return this.lastStartTagName===this.currentToken.tagName},A.prototype._emitCurrentToken=function(){this._emitCurrentCharacterToken(),this.currentToken.type===A.START_TAG_TOKEN&&(this.lastStartTagName=this.currentToken.tagName),this.tokenQueue.push(this.currentToken),this.currentToken=null},A.prototype._emitCurrentCharacterToken=function(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)},A.prototype._emitEOFToken=function(){this._emitCurrentCharacterToken(),this.tokenQueue.push({type:A.EOF_TOKEN})},A.prototype._appendCharToCurrentCharacterToken=function(t,e){this.currentCharacterToken&&this.currentCharacterToken.type!==t&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=e:this._createCharacterToken(t,e)},A.prototype._emitCodePoint=function(t){var e=A.CHARACTER_TOKEN;l(t)?e=A.WHITESPACE_CHARACTER_TOKEN:t===o.NULL&&(e=A.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(e,T(t))},A.prototype._emitSeveralCodePoints=function(t){for(var e=0;e<t.length;e++)this._emitCodePoint(t[e])},A.prototype._emitChar=function(t){this._appendCharToCurrentCharacterToken(A.CHARACTER_TOKEN,t)},A.prototype._consumeNumericEntity=function(t){var e="",n=void 0;do{e+=T(this._consume()),n=this._lookahead()}while(n!==o.EOF&&m(n,t));this._lookahead()===o.SEMICOLON&&this._consume();var r,i=parseInt(e,t?16:10),s=u[i];return s||((r=i)>=55296&&r<=57343||r>1114111?o.REPLACEMENT_CHARACTER:i)},A.prototype._consumeNamedEntity=function(t){for(var e=null,n=0,r=null,i=0,a=!1,u=0;u>-1;){var c=s[u],l=c<7;if(l&&1&c&&(e=2&c?[s[++u],s[++u]]:[s[++u]],n=i,r===o.SEMICOLON)){a=!0;break}if(i++,(r=this._consume())===o.EOF)break;u=l?4&c?g(u,r):-1:r===c?++u:-1}if(e){if(!a&&(this._unconsumeSeveral(i-n),t)){var p=this._lookahead();if(p===o.EQUALS_SIGN||function(t){return d(t)||h(t)}(p))return this._unconsumeSeveral(n),null}return e}return this._unconsumeSeveral(i),null},A.prototype._consumeCharacterReference=function(t,e){if(l(t)||t===o.GREATER_THAN_SIGN||t===o.AMPERSAND||t===this.additionalAllowedCp||t===o.EOF)return this._unconsume(),null;if(t===o.NUMBER_SIGN){var n=!1,r=this._lookahead();return r!==o.LATIN_SMALL_X&&r!==o.LATIN_CAPITAL_X||(this._consume(),n=!0),(r=this._lookahead())!==o.EOF&&m(r,n)?[this._consumeNumericEntity(n)]:(this._unconsumeSeveral(n?2:1),null)}return this._unconsume(),this._consumeNamedEntity(e)};var v=A.prototype;v[c]=function(t){this.preprocessor.dropParsedChunk(),t===o.AMPERSAND?this.state="CHARACTER_REFERENCE_IN_DATA_STATE":t===o.LESS_THAN_SIGN?this.state="TAG_OPEN_STATE":t===o.NULL?this._emitCodePoint(t):t===o.EOF?this._emitEOFToken():this._emitCodePoint(t)},v.CHARACTER_REFERENCE_IN_DATA_STATE=function(t){this.additionalAllowedCp=void 0;var e=this._consumeCharacterReference(t,!1);this._ensureHibernation()||(e?this._emitSeveralCodePoints(e):this._emitChar("&"),this.state=c)},v.RCDATA_STATE=function(t){this.preprocessor.dropParsedChunk(),t===o.AMPERSAND?this.state="CHARACTER_REFERENCE_IN_RCDATA_STATE":t===o.LESS_THAN_SIGN?this.state="RCDATA_LESS_THAN_SIGN_STATE":t===o.NULL?this._emitChar(i.REPLACEMENT_CHARACTER):t===o.EOF?this._emitEOFToken():this._emitCodePoint(t)},v.CHARACTER_REFERENCE_IN_RCDATA_STATE=function(t){this.additionalAllowedCp=void 0;var e=this._consumeCharacterReference(t,!1);this._ensureHibernation()||(e?this._emitSeveralCodePoints(e):this._emitChar("&"),this.state="RCDATA_STATE")},v.RAWTEXT_STATE=function(t){this.preprocessor.dropParsedChunk(),t===o.LESS_THAN_SIGN?this.state="RAWTEXT_LESS_THAN_SIGN_STATE":t===o.NULL?this._emitChar(i.REPLACEMENT_CHARACTER):t===o.EOF?this._emitEOFToken():this._emitCodePoint(t)},v.SCRIPT_DATA_STATE=function(t){this.preprocessor.dropParsedChunk(),t===o.LESS_THAN_SIGN?this.state="SCRIPT_DATA_LESS_THAN_SIGN_STATE":t===o.NULL?this._emitChar(i.REPLACEMENT_CHARACTER):t===o.EOF?this._emitEOFToken():this._emitCodePoint(t)},v.PLAINTEXT_STATE=function(t){this.preprocessor.dropParsedChunk(),t===o.NULL?this._emitChar(i.REPLACEMENT_CHARACTER):t===o.EOF?this._emitEOFToken():this._emitCodePoint(t)},v.TAG_OPEN_STATE=function(t){t===o.EXCLAMATION_MARK?this.state="MARKUP_DECLARATION_OPEN_STATE":t===o.SOLIDUS?this.state="END_TAG_OPEN_STATE":d(t)?(this._createStartTagToken(),this._reconsumeInState("TAG_NAME_STATE")):t===o.QUESTION_MARK?this._reconsumeInState("BOGUS_COMMENT_STATE"):(this._emitChar("<"),this._reconsumeInState(c))},v.END_TAG_OPEN_STATE=function(t){d(t)?(this._createEndTagToken(),this._reconsumeInState("TAG_NAME_STATE")):t===o.GREATER_THAN_SIGN?this.state=c:t===o.EOF?(this._reconsumeInState(c),this._emitChar("<"),this._emitChar("/")):this._reconsumeInState("BOGUS_COMMENT_STATE")},v.TAG_NAME_STATE=function(t){l(t)?this.state="BEFORE_ATTRIBUTE_NAME_STATE":t===o.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":t===o.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):p(t)?this.currentToken.tagName+=_(t):t===o.NULL?this.currentToken.tagName+=i.REPLACEMENT_CHARACTER:t===o.EOF?this._reconsumeInState(c):this.currentToken.tagName+=T(t)},v.RCDATA_LESS_THAN_SIGN_STATE=function(t){t===o.SOLIDUS?(this.tempBuff=[],this.state="RCDATA_END_TAG_OPEN_STATE"):(this._emitChar("<"),this._reconsumeInState("RCDATA_STATE"))},v.RCDATA_END_TAG_OPEN_STATE=function(t){d(t)?(this._createEndTagToken(),this._reconsumeInState("RCDATA_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("RCDATA_STATE"))},v.RCDATA_END_TAG_NAME_STATE=function(t){if(p(t))this.currentToken.tagName+=_(t),this.tempBuff.push(t);else if(f(t))this.currentToken.tagName+=T(t),this.tempBuff.push(t);else{if(this._isAppropriateEndTagToken()){if(l(t))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(t===o.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(t===o.GREATER_THAN_SIGN)return this.state=c,void this._emitCurrentToken()}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RCDATA_STATE")}},v.RAWTEXT_LESS_THAN_SIGN_STATE=function(t){t===o.SOLIDUS?(this.tempBuff=[],this.state="RAWTEXT_END_TAG_OPEN_STATE"):(this._emitChar("<"),this._reconsumeInState("RAWTEXT_STATE"))},v.RAWTEXT_END_TAG_OPEN_STATE=function(t){d(t)?(this._createEndTagToken(),this._reconsumeInState("RAWTEXT_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("RAWTEXT_STATE"))},v.RAWTEXT_END_TAG_NAME_STATE=function(t){if(p(t))this.currentToken.tagName+=_(t),this.tempBuff.push(t);else if(f(t))this.currentToken.tagName+=T(t),this.tempBuff.push(t);else{if(this._isAppropriateEndTagToken()){if(l(t))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(t===o.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(t===o.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=c)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RAWTEXT_STATE")}},v.SCRIPT_DATA_LESS_THAN_SIGN_STATE=function(t){t===o.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_END_TAG_OPEN_STATE"):t===o.EXCLAMATION_MARK?(this.state="SCRIPT_DATA_ESCAPE_START_STATE",this._emitChar("<"),this._emitChar("!")):(this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_STATE"))},v.SCRIPT_DATA_END_TAG_OPEN_STATE=function(t){d(t)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("SCRIPT_DATA_STATE"))},v.SCRIPT_DATA_END_TAG_NAME_STATE=function(t){if(p(t))this.currentToken.tagName+=_(t),this.tempBuff.push(t);else if(f(t))this.currentToken.tagName+=T(t),this.tempBuff.push(t);else{if(this._isAppropriateEndTagToken()){if(l(t))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(t===o.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(t===o.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=c)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_STATE")}},v.SCRIPT_DATA_ESCAPE_START_STATE=function(t){t===o.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPE_START_DASH_STATE",this._emitChar("-")):this._reconsumeInState("SCRIPT_DATA_STATE")},v.SCRIPT_DATA_ESCAPE_START_DASH_STATE=function(t){t===o.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):this._reconsumeInState("SCRIPT_DATA_STATE")},v.SCRIPT_DATA_ESCAPED_STATE=function(t){t===o.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_STATE",this._emitChar("-")):t===o.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":t===o.NULL?this._emitChar(i.REPLACEMENT_CHARACTER):t===o.EOF?this._reconsumeInState(c):this._emitCodePoint(t)},v.SCRIPT_DATA_ESCAPED_DASH_STATE=function(t){t===o.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):t===o.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":t===o.NULL?(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChar(i.REPLACEMENT_CHARACTER)):t===o.EOF?this._reconsumeInState(c):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(t))},v.SCRIPT_DATA_ESCAPED_DASH_DASH_STATE=function(t){t===o.HYPHEN_MINUS?this._emitChar("-"):t===o.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":t===o.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChar(">")):t===o.NULL?(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChar(i.REPLACEMENT_CHARACTER)):t===o.EOF?this._reconsumeInState(c):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(t))},v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE=function(t){t===o.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):d(t)?(this.tempBuff=[],this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))},v.SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE=function(t){d(t)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))},v.SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE=function(t){if(p(t))this.currentToken.tagName+=_(t),this.tempBuff.push(t);else if(f(t))this.currentToken.tagName+=T(t),this.tempBuff.push(t);else{if(this._isAppropriateEndTagToken()){if(l(t))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(t===o.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(t===o.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=c)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")}},v.SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE=function(t){l(t)||t===o.SOLIDUS||t===o.GREATER_THAN_SIGN?(this.state=this.isTempBufferEqualToScriptString()?"SCRIPT_DATA_DOUBLE_ESCAPED_STATE":"SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(t)):p(t)?(this.tempBuff.push(E(t)),this._emitCodePoint(t)):f(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")},v.SCRIPT_DATA_DOUBLE_ESCAPED_STATE=function(t){t===o.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",this._emitChar("-")):t===o.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):t===o.NULL?this._emitChar(i.REPLACEMENT_CHARACTER):t===o.EOF?this._reconsumeInState(c):this._emitCodePoint(t)},v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE=function(t){t===o.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):t===o.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):t===o.NULL?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChar(i.REPLACEMENT_CHARACTER)):t===o.EOF?this._reconsumeInState(c):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(t))},v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE=function(t){t===o.HYPHEN_MINUS?this._emitChar("-"):t===o.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):t===o.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChar(">")):t===o.NULL?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChar(i.REPLACEMENT_CHARACTER)):t===o.EOF?this._reconsumeInState(c):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(t))},v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE=function(t){t===o.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChar("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")},v.SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE=function(t){l(t)||t===o.SOLIDUS||t===o.GREATER_THAN_SIGN?(this.state=this.isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(t)):p(t)?(this.tempBuff.push(E(t)),this._emitCodePoint(t)):f(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")},v.BEFORE_ATTRIBUTE_NAME_STATE=function(t){l(t)||(t===o.SOLIDUS||t===o.GREATER_THAN_SIGN||t===o.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):t===o.EQUALS_SIGN?(this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))},v.ATTRIBUTE_NAME_STATE=function(t){l(t)||t===o.SOLIDUS||t===o.GREATER_THAN_SIGN||t===o.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):t===o.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):p(t)?this.currentAttr.name+=_(t):t===o.QUOTATION_MARK||t===o.APOSTROPHE||t===o.LESS_THAN_SIGN?this.currentAttr.name+=T(t):t===o.NULL?this.currentAttr.name+=i.REPLACEMENT_CHARACTER:this.currentAttr.name+=T(t)},v.AFTER_ATTRIBUTE_NAME_STATE=function(t){l(t)||(t===o.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":t===o.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":t===o.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):t===o.EOF?this._reconsumeInState(c):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))},v.BEFORE_ATTRIBUTE_VALUE_STATE=function(t){l(t)||(t===o.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":t===o.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))},v.ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE=function(t){t===o.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":t===o.AMPERSAND?(this.additionalAllowedCp=o.QUOTATION_MARK,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):t===o.NULL?this.currentAttr.value+=i.REPLACEMENT_CHARACTER:t===o.EOF?this._reconsumeInState(c):this.currentAttr.value+=T(t)},v.ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE=function(t){t===o.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":t===o.AMPERSAND?(this.additionalAllowedCp=o.APOSTROPHE,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):t===o.NULL?this.currentAttr.value+=i.REPLACEMENT_CHARACTER:t===o.EOF?this._reconsumeInState(c):this.currentAttr.value+=T(t)},v.ATTRIBUTE_VALUE_UNQUOTED_STATE=function(t){l(t)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):t===o.AMPERSAND?(this.additionalAllowedCp=o.GREATER_THAN_SIGN,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):t===o.GREATER_THAN_SIGN?(this._leaveAttrValue(c),this._emitCurrentToken()):t===o.NULL?this.currentAttr.value+=i.REPLACEMENT_CHARACTER:t===o.QUOTATION_MARK||t===o.APOSTROPHE||t===o.LESS_THAN_SIGN||t===o.EQUALS_SIGN||t===o.GRAVE_ACCENT?this.currentAttr.value+=T(t):t===o.EOF?this._reconsumeInState(c):this.currentAttr.value+=T(t)},v.CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE=function(t){var e=this._consumeCharacterReference(t,!0);if(!this._ensureHibernation()){if(e)for(var n=0;n<e.length;n++)this.currentAttr.value+=T(e[n]);else this.currentAttr.value+="&";this.state=this.returnState}},v.AFTER_ATTRIBUTE_VALUE_QUOTED_STATE=function(t){l(t)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):t===o.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):t===o.GREATER_THAN_SIGN?(this._leaveAttrValue(c),this._emitCurrentToken()):t===o.EOF?this._reconsumeInState(c):this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE")},v.SELF_CLOSING_START_TAG_STATE=function(t){t===o.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=c,this._emitCurrentToken()):t===o.EOF?this._reconsumeInState(c):this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE")},v.BOGUS_COMMENT_STATE=function(){this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE_CONTINUATION")},v.BOGUS_COMMENT_STATE_CONTINUATION=function(t){for(;;){if(t===o.GREATER_THAN_SIGN){this.state=c;break}if(t===o.EOF){this._reconsumeInState(c);break}if(this.currentToken.data+=t===o.NULL?i.REPLACEMENT_CHARACTER:T(t),this._hibernationSnapshot(),t=this._consume(),this._ensureHibernation())return}this._emitCurrentToken()},v.MARKUP_DECLARATION_OPEN_STATE=function(t){var e=this._consumeSubsequentIfMatch(a.DASH_DASH_STRING,t,!0),n=!e&&this._consumeSubsequentIfMatch(a.DOCTYPE_STRING,t,!1),r=!e&&!n&&this.allowCDATA&&this._consumeSubsequentIfMatch(a.CDATA_START_STRING,t,!0);this._ensureHibernation()||(e?(this._createCommentToken(),this.state="COMMENT_START_STATE"):n?this.state="DOCTYPE_STATE":r?this.state="CDATA_SECTION_STATE":this._reconsumeInState("BOGUS_COMMENT_STATE"))},v.COMMENT_START_STATE=function(t){t===o.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":t===o.NULL?(this.currentToken.data+=i.REPLACEMENT_CHARACTER,this.state="COMMENT_STATE"):t===o.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):t===o.EOF?(this._emitCurrentToken(),this._reconsumeInState(c)):(this.currentToken.data+=T(t),this.state="COMMENT_STATE")},v.COMMENT_START_DASH_STATE=function(t){t===o.HYPHEN_MINUS?this.state="COMMENT_END_STATE":t===o.NULL?(this.currentToken.data+="-",this.currentToken.data+=i.REPLACEMENT_CHARACTER,this.state="COMMENT_STATE"):t===o.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):t===o.EOF?(this._emitCurrentToken(),this._reconsumeInState(c)):(this.currentToken.data+="-",this.currentToken.data+=T(t),this.state="COMMENT_STATE")},v.COMMENT_STATE=function(t){t===o.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":t===o.NULL?this.currentToken.data+=i.REPLACEMENT_CHARACTER:t===o.EOF?(this._emitCurrentToken(),this._reconsumeInState(c)):this.currentToken.data+=T(t)},v.COMMENT_END_DASH_STATE=function(t){t===o.HYPHEN_MINUS?this.state="COMMENT_END_STATE":t===o.NULL?(this.currentToken.data+="-",this.currentToken.data+=i.REPLACEMENT_CHARACTER,this.state="COMMENT_STATE"):t===o.EOF?(this._emitCurrentToken(),this._reconsumeInState(c)):(this.currentToken.data+="-",this.currentToken.data+=T(t),this.state="COMMENT_STATE")},v.COMMENT_END_STATE=function(t){t===o.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):t===o.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":t===o.HYPHEN_MINUS?this.currentToken.data+="-":t===o.NULL?(this.currentToken.data+="--",this.currentToken.data+=i.REPLACEMENT_CHARACTER,this.state="COMMENT_STATE"):t===o.EOF?(this._reconsumeInState(c),this._emitCurrentToken()):(this.currentToken.data+="--",this.currentToken.data+=T(t),this.state="COMMENT_STATE")},v.COMMENT_END_BANG_STATE=function(t){t===o.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):t===o.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):t===o.NULL?(this.currentToken.data+="--!",this.currentToken.data+=i.REPLACEMENT_CHARACTER,this.state="COMMENT_STATE"):t===o.EOF?(this._emitCurrentToken(),this._reconsumeInState(c)):(this.currentToken.data+="--!",this.currentToken.data+=T(t),this.state="COMMENT_STATE")},v.DOCTYPE_STATE=function(t){l(t)||(t===o.GREATER_THAN_SIGN?(this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):t===o.EOF?(this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._reconsumeInState(c)):(this._createDoctypeToken(""),this._reconsumeInState("DOCTYPE_NAME_STATE")))},v.DOCTYPE_NAME_STATE=function(t){l(t)||t===o.GREATER_THAN_SIGN||t===o.EOF?this._reconsumeInState("AFTER_DOCTYPE_NAME_STATE"):p(t)?this.currentToken.name+=_(t):t===o.NULL?this.currentToken.name+=i.REPLACEMENT_CHARACTER:this.currentToken.name+=T(t)},v.AFTER_DOCTYPE_NAME_STATE=function(t){if(!l(t))if(t===o.GREATER_THAN_SIGN)this.state=c,this._emitCurrentToken();else{var e=this._consumeSubsequentIfMatch(a.PUBLIC_STRING,t,!1),n=!e&&this._consumeSubsequentIfMatch(a.SYSTEM_STRING,t,!1);this._ensureHibernation()||(e?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":n?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":(this.currentToken.forceQuirks=!0,this.state="BOGUS_DOCTYPE_STATE"))}},v.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE=function(t){l(t)||(t===o.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):t===o.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):(this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))},v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE=function(t){t===o.QUOTATION_MARK?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":t===o.NULL?this.currentToken.publicId+=i.REPLACEMENT_CHARACTER:t===o.GREATER_THAN_SIGN?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):t===o.EOF?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._reconsumeInState(c)):this.currentToken.publicId+=T(t)},v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE=function(t){t===o.APOSTROPHE?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":t===o.NULL?this.currentToken.publicId+=i.REPLACEMENT_CHARACTER:t===o.GREATER_THAN_SIGN?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):t===o.EOF?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._reconsumeInState(c)):this.currentToken.publicId+=T(t)},v.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE=function(t){l(t)||(t===o.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):t===o.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):t===o.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):(this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))},v.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE=function(t){l(t)||(t===o.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):t===o.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):(this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))},v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE=function(t){t===o.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":t===o.GREATER_THAN_SIGN?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):t===o.NULL?this.currentToken.systemId+=i.REPLACEMENT_CHARACTER:t===o.EOF?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._reconsumeInState(c)):this.currentToken.systemId+=T(t)},v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE=function(t){t===o.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":t===o.GREATER_THAN_SIGN?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):t===o.NULL?this.currentToken.systemId+=i.REPLACEMENT_CHARACTER:t===o.EOF?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._reconsumeInState(c)):this.currentToken.systemId+=T(t)},v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE=function(t){l(t)||(t===o.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):t===o.EOF?(this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._reconsumeInState(c)):this.state="BOGUS_DOCTYPE_STATE")},v.BOGUS_DOCTYPE_STATE=function(t){t===o.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):t===o.EOF&&(this._emitCurrentToken(),this._reconsumeInState(c))},v.CDATA_SECTION_STATE=function(t){for(;;){if(t===o.EOF){this._reconsumeInState(c);break}var e=this._consumeSubsequentIfMatch(a.CDATA_END_STRING,t,!0);if(this._ensureHibernation())break;if(e){this.state=c;break}if(this._emitCodePoint(t),this._hibernationSnapshot(),t=this._consume(),this._ensureHibernation())break}}},function(t,e,n){var r=n(24),i=n(201),s=n(202),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):s(t)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){"use strict";function r(t){return null==t}t.exports.isNothing=r,t.exports.isObject=function(t){return"object"==typeof t&&null!==t},t.exports.toArray=function(t){return Array.isArray(t)?t:r(t)?[]:[t]},t.exports.repeat=function(t,e){var n,r="";for(n=0;n<e;n+=1)r+=t;return r},t.exports.isNegativeZero=function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},t.exports.extend=function(t,e){var n,r,i,s;if(e)for(n=0,r=(s=Object.keys(e)).length;n<r;n+=1)t[i=s[n]]=e[i];return t}},function(t,e,n){"use strict";var r=n(17),i=n(32),s=n(0);function o(t,e,n){var r=[];return t.include.forEach((function(t){n=o(t,e,n)})),t[e].forEach((function(t){n.forEach((function(e,n){e.tag===t.tag&&e.kind===t.kind&&r.push(n)})),n.push(t)})),n.filter((function(t,e){return-1===r.indexOf(e)}))}function a(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach((function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new i("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=o(this,"implicit",[]),this.compiledExplicit=o(this,"explicit",[]),this.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(t){n[t.kind][t.tag]=n.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(r);return n}(this.compiledImplicit,this.compiledExplicit)}a.DEFAULT=null,a.create=function(){var t,e;switch(arguments.length){case 1:t=a.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new i("Wrong number of arguments for Schema.create function")}if(t=r.toArray(t),e=r.toArray(e),!t.every((function(t){return t instanceof a})))throw new i("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every((function(t){return t instanceof s})))throw new i("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:t,explicit:e})},t.exports=a},function(t,e,n){"use strict";(function(t){var r=n(156),i=n(157),s=n(93);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(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){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,n)}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");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=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|f(e.length);return 0===(t=a(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||(r=e.length)!=r?a(t,0):p(t,e);if("Buffer"===e.type&&s(e.data))return p(t,e.data)}var r;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 h(t,e){if(l(e),t=a(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|f(e.length);t=a(t,n);for(var r=0;r<n;r+