From c4a2ee7e4cc8ff88ec2ea63081ff5646e687eb4e Mon Sep 17 00:00:00 2001 From: "jhuix@sohu.com" Date: Fri, 2 Aug 2024 16:25:12 +0800 Subject: [PATCH] Fix repeated loading script in dyncLoadScript and add abc audio control. --- docs/dist/showdowns.min.css | 4 +- docs/dist/showdowns.min.js | 4 +- docs/dist/showdowns.min.js.map | 2 +- docs/showdowns-features.md | 5 +- public/showdowns-features.md | 5 +- src/extensions/cdn.js | 88 +++++++++++--- src/extensions/date-format.js | 13 +- src/extensions/log.js | 14 +++ src/extensions/showdown-abc.js | 174 ++++++++++++++++++++++++--- src/extensions/showdown-echarts.js | 22 +++- src/extensions/showdown-flowchart.js | 67 +++++++++-- src/extensions/showdown-katex.js | 35 ++++-- src/extensions/showdown-mermaid.js | 21 +++- src/extensions/showdown-plantuml.js | 5 +- src/extensions/showdown-railroad.js | 19 ++- src/extensions/showdown-sequence.js | 86 ++++++++++--- src/extensions/showdown-toc.js | 4 +- src/extensions/showdown-vega.js | 29 ++++- src/extensions/showdown-viz.js | 19 ++- src/extensions/showdown-wavedrom.js | 20 ++- src/extensions/utils.js | 20 ++- src/showdowns.js | 22 ++-- 22 files changed, 563 insertions(+), 115 deletions(-) create mode 100644 src/extensions/log.js diff --git a/docs/dist/showdowns.min.css b/docs/dist/showdowns.min.css index b422bae..35c21d3 100644 --- a/docs/dist/showdowns.min.css +++ b/docs/dist/showdowns.min.css @@ -1,11 +1,11 @@ /*! - * css of showdowns v0.6.0 + * css of showdowns v0.6.1 * Copyright (c) 2019-present, Jhuix (Hui Jin) * Released under the MIT License. */.showdowns blockquote,.showdowns dd,.showdowns div,.showdowns dl,.showdowns dt,.showdowns form,.showdowns h1,.showdowns h2,.showdowns h3,.showdowns h4,.showdowns h5,.showdowns h6,.showdowns li,.showdowns ol,.showdowns p,.showdowns pre,.showdowns td,.showdowns th,.showdowns ul{margin:0;padding:0}.showdowns div.paragraph.align-right,.showdowns h1.align-right,.showdowns h2.align-right,.showdowns h3.align-right,.showdowns h4.align-right,.showdowns h5.align-right,.showdowns h6.align-right,.showdowns li.align-right,.showdowns p.align-right{text-align:right}.showdowns div.paragraph.align-center,.showdowns h1.align-center,.showdowns h2.align-center,.showdowns h3.align-center,.showdowns h4.align-center,.showdowns h5.align-center,.showdowns h6.align-center,.showdowns li.align-center,.showdowns p.align-center{text-align:center}.showdowns a{color:#0366d6;line-height:inherit;text-decoration:none}.showdowns a img{border:none}.showdowns a:hover{cursor:pointer;text-decoration:underline}.showdowns img{-ms-interpolation-mode:bicubic;display:inherit;height:auto;margin:0 auto;max-width:100%}.showdowns p{font-family:inherit;font-size:1em;font-weight:400;line-height:1.5;margin-bottom:1.25em;text-rendering:optimizeLegibility}.showdowns p.lead{font-size:1.21875em;line-height:1.5}.showdowns p aside{font-size:.875em;font-style:italic;line-height:1.5}.showdowns h1,.showdowns h2,.showdowns h3,.showdowns h4,.showdowns h5,.showdowns h6{font-style:normal;font-weight:600;line-height:1.25;margin-bottom:1rem;margin-top:1.5rem;text-rendering:optimizeLegibility}.showdowns h1 small,.showdowns h2 small,.showdowns h3 small,.showdowns h4 small,.showdowns h5 small,.showdowns h6 small{font-size:60%;line-height:0}.showdowns h1,.showdowns h2{border-bottom:1px solid #d6d6d6;padding-bottom:.3em}.showdowns h1{font-size:2em}.showdowns h2{font-size:1.5em}.showdowns h3{font-size:1.25em}.showdowns h4{font-size:1em}.showdowns h5{font-size:.875em}.showdowns h6{color:#6a737d;font-size:.85em}.showdowns .subheader{color:#6f6f6f;font-weight:400;line-height:1.4;margin-bottom:.5em;margin-top:.2em}.showdowns hr{border:solid #ddd;border-width:1px 0 0;clear:both;height:0;margin:1.25em 0 1.1875em}.showdowns em,.showdowns i{font-style:italic;line-height:inherit}.showdowns b,.showdowns strong{font-weight:600;line-height:inherit}.showdowns small{font-size:60%;line-height:inherit}.showdowns code{border-style:solid;border-width:1px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-weight:400;padding:.125em .3125em .0625em}.showdowns dl,.showdowns ol,.showdowns ul{font-family:inherit;font-size:1em;line-height:1.5;list-style-position:outside;margin-bottom:1.25em}.showdowns ul{margin-left:1.1em}.showdowns ul.no-bullet{margin-left:0}.showdowns ul.no-bullet li ol,.showdowns ul.no-bullet li ul{list-style:none;margin-bottom:0;margin-left:1.25em}.showdowns ul li ol,.showdowns ul li ul{margin-bottom:0;margin-left:1.25em}.showdowns ul.circle li ul,.showdowns ul.disc li ul,.showdowns ul.square li ul{list-style:inherit}.showdowns ul.square{list-style-type:square;margin-left:1.1em}.showdowns ul.circle{list-style-type:circle;margin-left:1.1em}.showdowns ul.disc{list-style-type:disc;margin-left:1.1em}.showdowns ul.no-bullet{list-style:none}.showdowns ol{margin-left:1.4em}.showdowns ol li ol,.showdowns ol li ul{margin-bottom:0;margin-left:1.25em}.showdowns dl dt{font-weight:600;margin-bottom:.3em}.showdowns dl dd{margin-bottom:.75em}.showdowns abbr,.showdowns acronym{color:#222;cursor:help;font-size:90%;text-transform:uppercase}.showdowns abbr{text-transform:none}.showdowns abbr[title]{border-bottom:1px dotted #5c5c5c}.showdowns blockquote{border-left:4px solid #d6d6d6;color:#5c5c5c;line-height:1.5;margin:0 0 16px;padding:0 15px}.showdowns blockquote cite{color:#555;display:block;font-size:.8125em}.showdowns blockquote cite:before{content:"\2014 \0020"}.showdowns blockquote cite a,.showdowns blockquote cite a:visited{color:#555}.showdowns pre{word-wrap:break-word;border:1px solid #dfdfdf;margin-bottom:1.5em;margin-top:1.5em;padding:.125em .3125em .0625em;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap}.showdowns pre code{background-color:transparent;border:0;padding:0}.showdowns table{background:#fff;border-collapse:collapse;border-spacing:0;margin-bottom:1.25em;overflow:auto;table-layout:auto}.showdowns table caption{background:transparent;color:#222;font-weight:600}.showdowns table thead{background:#f5f5f5}.showdowns table thead tr td,.showdowns table thead tr th{border:1px solid #d6d6d6;color:#222;font-weight:600;line-height:1.125em;padding:.5em .625em .625em}.showdowns table tfoot{background:#f5f5f5}.showdowns table tfoot tr td,.showdowns table tfoot tr th{border:1px solid #d6d6d6;color:#222;font-weight:600;line-height:1.125em;padding:.5em .625em .625em}.showdowns table tr td,.showdowns table tr th{border:1px solid #d6d6d6;color:#222;line-height:1.125em;padding:.5625em .625em}.showdowns table tr.alt,.showdowns table tr.even,.showdowns table tr:nth-of-type(2n){background:#f9f9f9}.showdowns table tbody tr td,.showdowns table tbody tr th{border:1px solid #d6d6d6;line-height:1.125em}.showdowns .flow,.showdowns .flowchart,.showdowns .mermaid,.showdowns .plantuml,.showdowns .sequence,.showdowns .wavedrom{background-color:#f9f9f9}.showdowns .diagram-center:not(.asciimath):not(.latex):not(.mermaid){display:table;margin:auto}.showdowns .diagram-right:not(.asciimath):not(.latex):not(.mermaid){display:table;margin:auto 0 auto auto}.showdowns .diagram-center.mermaid{text-align:center}.showdowns .diagram-right.mermaid{text-align:right}.showdowns .asciimath:not(.diagram-center):not(.diagram-right) .katex,.showdowns .asciimath:not(.diagram-center):not(.diagram-right) .katex-display,.showdowns .latex:not(.diagram-center):not(.diagram-right) .katex,.showdowns .latex:not(.diagram-center):not(.diagram-right) .katex-display{text-align:unset}.showdowns .asciimath.diagram-center .katex,.showdowns .asciimath.diagram-center .katex-display,.showdowns .latex.diagram-center .katex,.showdowns .latex.diagram-center .katex-display{text-align:center}.showdowns .asciimath.diagram-right .katex,.showdowns .asciimath.diagram-right .katex-display,.showdowns .latex.diagram-right .katex,.showdowns .latex.diagram-right .katex-display{text-align:right} /*! - * css of showdowns v0.6.0 + * css of showdowns v0.6.1 * Copyright (c) 2019-present, Jhuix (Hui Jin) * Released under the MIT License. */.showdowns .showdown-container{border:1px solid #eee;border-radius:.25rem;margin-bottom:1rem;padding:.75rem 1.25rem;position:relative}.showdowns .showdown-container.container{border-left-width:.25rem;border-right-width:.25rem}.showdowns .showdown-container.container.tip{border-left-color:#5bc0de;border-right-color:#5bc0de}.showdowns .showdown-container.container.info{border-left-color:#cce5ff;border-right-color:#cce5ff}.showdowns .showdown-container.container.warning{border-left-color:#f0ad4e;border-right-color:#f0ad4e}.showdowns .showdown-container.container.error{border-left-color:#d9534f;border-right-color:#d9534f}.showdowns .showdown-container.container.success{border-left-color:#67c23a;border-right-color:#67c23a}.showdowns .showdown-container.alert{border:1px solid transparent;transition:opacity .2s}.showdowns .showdown-container.alert.alert-tip{background-color:#5bc0de}.showdowns .showdown-container.alert.alert-info{background-color:#cce5ff}.showdowns .showdown-container.alert.alert-warning{background-color:#f0ad4e}.showdowns .showdown-container.alert.alert-error{background-color:#d9534f}.showdowns .showdown-container.alert.alert-success{background-color:#67c23a}.showdowns .showdown-container .container-title{font-size:1.25rem;font-weight:700;line-height:1.2} \ No newline at end of file diff --git a/docs/dist/showdowns.min.js b/docs/dist/showdowns.min.js index 9d2678a..7860604 100644 --- a/docs/dist/showdowns.min.js +++ b/docs/dist/showdowns.min.js @@ -1,7 +1,7 @@ /*! - * showdowns.min.js v0.6.0 + * showdowns.min.js v0.6.1 * Copyright (c) 2019-present, Jhuix (Hui Jin) * Released under the MIT License. */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).showdowns=t()}(this,(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var r=1;arguments.length>r;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?n(Object(a),!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function a(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(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(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l={exports:{}};!function(e){(function(){function t(e){var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r].defaultValue);return n}var n={},r={},a={},i=t(!0),o="vanilla",s={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:function(){var e=t(!0),n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=!0);return n}()};function l(e,t){var r=t?"Error in "+t+" extension->":"Error in unnamed extension",a={valid:!0,error:""};n.helper.isArray(e)||(e=[e]);for(var i=0;e.length>i;++i){var o=r+" sub-extension "+i+": ",s=e[i];if("object"!=typeof s)return a.valid=!1,a.error=o+"must be an object, but "+typeof s+" given",a;if(!n.helper.isString(s.type))return a.valid=!1,a.error=o+'property "type" must be a string, but '+typeof s.type+" given",a;var l=s.type=s.type.toLowerCase();if("language"===l&&(l=s.type="lang"),"html"===l&&(l=s.type="output"),"lang"!==l&&"output"!==l&&"listener"!==l)return a.valid=!1,a.error=o+"type "+l+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',a;if("listener"===l){if(n.helper.isUndefined(s.listeners))return a.valid=!1,a.error=o+'. Extensions of type "listener" must have a property called "listeners"',a}else if(n.helper.isUndefined(s.filter)&&n.helper.isUndefined(s.regex))return a.valid=!1,a.error=o+l+' extensions must define either a "regex" property or a "filter" method',a;if(s.listeners){if("object"!=typeof s.listeners)return a.valid=!1,a.error=o+'"listeners" property must be an object but '+typeof s.listeners+" given",a;for(var u in s.listeners)if(s.listeners.hasOwnProperty(u)&&"function"!=typeof s.listeners[u])return a.valid=!1,a.error=o+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+u+" must be a function but "+typeof s.listeners[u]+" given",a}if(s.filter){if("function"!=typeof s.filter)return a.valid=!1,a.error=o+'"filter" must be a function, but '+typeof s.filter+" given",a}else if(s.regex){if(n.helper.isString(s.regex)&&(s.regex=RegExp(s.regex,"g")),!(s.regex instanceof RegExp))return a.valid=!1,a.error=o+'"regex" property must either be a string or a RegExp object, but '+typeof s.regex+" given",a;if(n.helper.isUndefined(s.replace))return a.valid=!1,a.error=o+'"regex" extensions must implement a replace string or function',a}}return a}function u(e,t){return"¨E"+t.charCodeAt(0)+"E"}n.helper={},n.extensions={},n.setOption=function(e,t){return i[e]=t,this},n.getOption=function(e){return i[e]},n.getOptions=function(){return i},n.resetOptions=function(){i=t(!0)},n.setFlavor=function(e){if(!s.hasOwnProperty(e))throw Error(e+" flavor was not found");n.resetOptions();var t=s[e];for(var r in o=e,t)t.hasOwnProperty(r)&&(i[r]=t[r])},n.getFlavor=function(){return o},n.getFlavorOptions=function(e){if(s.hasOwnProperty(e))return s[e]},n.getDefaultOptions=function(e){return t(e)},n.subParser=function(e,t){if(n.helper.isString(e)){if(void 0===t){if(r.hasOwnProperty(e))return r[e];throw Error("SubParser named "+e+" not registered!")}r[e]=t}},n.extension=function(e,t){if(!n.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=n.helper.stdExtName(e),n.helper.isUndefined(t)){if(!a.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return a[e]}"function"==typeof t&&(t=t()),n.helper.isArray(t)||(t=[t]);var r=l(t,e);if(!r.valid)throw Error(r.error);a[e]=t},n.getAllExtensions=function(){return a},n.removeExtension=function(e){delete a[e]},n.resetExtensions=function(){a={}},n.validateExtension=function(e){var t=l(e,null);return!!t.valid||(console.warn(t.error),!1)},n.hasOwnProperty("helper")||(n.helper={}),n.helper.isString=function(e){return"string"==typeof e||e instanceof String},n.helper.isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)},n.helper.isArray=function(e){return Array.isArray(e)},n.helper.isUndefined=function(e){return void 0===e},n.helper.forEach=function(e,t){if(n.helper.isUndefined(e))throw Error("obj param is required");if(n.helper.isUndefined(t))throw Error("callback param is required");if(!n.helper.isFunction(t))throw Error("callback param must be a function/closure");if("function"==typeof e.forEach)e.forEach(t);else if(n.helper.isArray(e))for(var r=0;e.length>r;r++)t(e[r],r,e);else{if("object"!=typeof e)throw Error("obj does not seem to be an array or an iterable object");for(var a in e)e.hasOwnProperty(a)&&t(e[a],a,e)}},n.helper.stdExtName=function(e){return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},n.helper.escapeCharactersCallback=u,n.helper.escapeCharacters=function(e,t,n){var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var a=RegExp(r,"g");return e=e.replace(a,u)},n.helper.unescapeHTMLEntities=function(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")};var c=function(e,t,n,r){var a,i,o,s,l,u=r||"",c=u.indexOf("g")>-1,d=RegExp(t+"|"+n,"g"+u.replace(/g/g,"")),h=RegExp(t,u.replace(/g/g,"")),f=[];do{for(a=0;o=d.exec(e);)if(h.test(o[0]))a++||(s=(i=d.lastIndex)-o[0].length);else if(a){if(! --a)if(f.push({left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:l=o.index+o[0].length},wholeMatch:{start:s,end:l}}),!c)return f}}while(a&&(d.lastIndex=i));return f};n.helper.matchRecursiveRegExp=function(e,t,n,r){for(var a=c(e,t,n,r),i=[],o=0;a.length>o;++o)i.push([e.slice(a[o].wholeMatch.start,a[o].wholeMatch.end),e.slice(a[o].match.start,a[o].match.end),e.slice(a[o].left.start,a[o].left.end),e.slice(a[o].right.start,a[o].right.end)]);return i},n.helper.replaceRecursiveRegExp=function(e,t,r,a,i){if(!n.helper.isFunction(t)){var o=t;t=function(){return o}}var s=c(e,r,a,i),l=e,u=s.length;if(u>0){var d=[];0!==s[0].wholeMatch.start&&d.push(e.slice(0,s[0].wholeMatch.start));for(var h=0;u>h;++h)d.push(t(e.slice(s[h].wholeMatch.start,s[h].wholeMatch.end),e.slice(s[h].match.start,s[h].match.end),e.slice(s[h].left.start,s[h].left.end),e.slice(s[h].right.start,s[h].right.end))),u-1>h&&d.push(e.slice(s[h].wholeMatch.end,s[h+1].wholeMatch.start));e.length>s[u-1].wholeMatch.end&&d.push(e.slice(s[u-1].wholeMatch.end)),l=d.join("")}return l},n.helper.regexIndexOf=function(e,t,r){if(!n.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(t instanceof RegExp==!1)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var a=e.substring(r||0).search(t);return 0>a?a:a+(r||0)},n.helper.splitAtIndex=function(e,t){if(!n.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},n.helper.encodeEmailAddress=function(e){var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,(function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var n=Math.random();e=n>.9?t[2](e):n>.45?t[1](e):t[0](e)}return e}))},n.helper.padEnd=function(e,t,n){return n=(n||" ")+"",e.length>(t|=0)?e+"":((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),e+""+n.slice(0,t))},void 0===console&&(console={warn:function(e){alert(e)},log:function(e){alert(e)},error:function(e){throw e}}),n.helper.regexes={asteriskDashAndColon:/([*_:~])/g},n.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:"S"},n.Converter=function(e){var t={},r=[],u=[],c={},d=o,h={parsed:{},raw:"",format:""};function f(e,t){if(t=t||null,n.helper.isString(e)){if(t=e=n.helper.stdExtName(e),n.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new n.Converter));n.helper.isArray(e)||(e=[e]);var a=l(e,t);if(!a.valid)throw Error(a.error);for(var i=0;e.length>i;++i)switch(e[i].type){case"lang":r.push(e[i]);break;case"output":u.push(e[i]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}(n.extensions[e],e);if(n.helper.isUndefined(a[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=a[e]}"function"==typeof e&&(e=e()),n.helper.isArray(e)||(e=[e]);var i=l(e,t);if(!i.valid)throw Error(i.error);for(var o=0;e.length>o;++o){switch(e[o].type){case"lang":r.push(e[o]);break;case"output":u.push(e[o])}if(e[o].hasOwnProperty("listeners"))for(var s in e[o].listeners)e[o].listeners.hasOwnProperty(s)&&p(s,e[o].listeners[s])}}function p(e,t){if(!n.helper.isString(e))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof e+" given");if("function"!=typeof t)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof t+" given");c.hasOwnProperty(e)||(c[e]=[]),c[e].push(t)}!function(){for(var r in e=e||{},i)i.hasOwnProperty(r)&&(t[r]=i[r]);if("object"!=typeof e)throw Error("Converter expects the passed parameter to be an object, but "+typeof e+" was passed instead.");for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);t.extensions&&n.helper.forEach(t.extensions,f)}(),this._dispatch=function(e,t,n,r){if(c.hasOwnProperty(e))for(var a=0;c[e].length>a;++a){var i=c[e][a](e,t,this,n,r);i&&void 0!==i&&(t=i)}return t},this.listen=function(e,t){return p(e,t),this},this.makeHtml=function(e){if(!e)return e;var a={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:r,outputModifiers:u,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return e=(e=(e=(e=(e=e.replace(/¨/g,"¨T")).replace(/\$/g,"¨D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g," "),t.smartIndentationFix&&(e=function(e){var t=e.match(/^\s*/)[0].length,n=RegExp("^\\s{0,"+t+"}","gm");return e.replace(n,"")}(e)),e="\n\n"+e+"\n\n",e=(e=n.subParser("detab")(e,t,a)).replace(/^[ \t]+$/gm,""),n.helper.forEach(r,(function(r){e=n.subParser("runExtension")(r,e,t,a)})),e=n.subParser("metadata")(e,t,a),e=n.subParser("hashPreCodeTags")(e,t,a),e=n.subParser("githubCodeBlocks")(e,t,a),e=n.subParser("hashHTMLBlocks")(e,t,a),e=n.subParser("hashCodeTags")(e,t,a),e=n.subParser("stripLinkDefinitions")(e,t,a),e=n.subParser("blockGamut")(e,t,a),e=n.subParser("unhashHTMLSpans")(e,t,a),e=(e=(e=n.subParser("unescapeSpecialChars")(e,t,a)).replace(/¨D/g,"$$")).replace(/¨T/g,"¨"),e=n.subParser("completeHTMLDocument")(e,t,a),n.helper.forEach(u,(function(r){e=n.subParser("runExtension")(r,e,t,a)})),h=a.metadata,e},this.makeMarkdown=this.makeMd=function(e,t){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+¨NBSP;<"),!t){if(!window||!window.document)throw Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var a={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],a=0;t.length>a;++a)if(1===t[a].childElementCount&&"code"===t[a].firstChild.tagName.toLowerCase()){var i=t[a].firstChild.innerHTML.trim(),o=t[a].firstChild.getAttribute("data-language")||"";if(""===o)for(var s=t[a].firstChild.className.split(" "),l=0;s.length>l;++l){var u=s[l].match(/^language-(.+)$/);if(null!==u){o=u[1];break}}i=n.helper.unescapeHTMLEntities(i),r.push(i),t[a].outerHTML=''}else r.push(t[a].innerHTML),t[a].innerHTML="",t[a].setAttribute("prenum",""+a);return r}(r)};!function e(t){for(var n=0;t.childNodes.length>n;++n){var r=t.childNodes[n];3===r.nodeType?/\S/.test(r.nodeValue)||/^[ ]+$/.test(r.nodeValue)?(r.nodeValue=r.nodeValue.split("\n").join(" "),r.nodeValue=r.nodeValue.replace(/(\s)+/g,"$1")):(t.removeChild(r),--n):1===r.nodeType&&e(r)}}(r);for(var i=r.childNodes,o="",s=0;i.length>s;s++)o+=n.subParser("makeMarkdown.node")(i[s],a);return o},this.setOption=function(e,n){t[e]=n},this.getOption=function(e){return t[e]},this.getOptions=function(){return t},this.addExtension=function(e,t){f(e,t=t||null)},this.useExtension=function(e){f(e)},this.setFlavor=function(e){if(!s.hasOwnProperty(e))throw Error(e+" flavor was not found");var n=s[e];for(var r in d=e,n)n.hasOwnProperty(r)&&(t[r]=n[r])},this.getFlavor=function(){return d},this.removeExtension=function(e){n.helper.isArray(e)||(e=[e]);for(var t=0;e.length>t;++t){for(var a=e[t],i=0;r.length>i;++i)r[i]===a&&r.splice(i,1);for(var o=0;u.length>o;++o)u[o]===a&&u.splice(o,1)}},this.getAllExtensions=function(){return{language:r,output:u}},this.getMetadata=function(e){return e?h.raw:h.parsed},this.getMetadataFormat=function(){return h.format},this._setMetadataPair=function(e,t){h.parsed[e]=t},this._setMetadataFormat=function(e){h.format=e},this._setMetadataRaw=function(e){h.raw=e}},n.subParser("anchors",(function(e,t,r){var a=function(e,a,i,o,s,l,u){if(n.helper.isUndefined(u)&&(u=""),i=i.toLowerCase(),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)o="";else if(!o){if(i||(i=a.toLowerCase().replace(/ ?\n/g," ")),o="#"+i,n.helper.isUndefined(r.gUrls[i]))return e;o=r.gUrls[i],n.helper.isUndefined(r.gTitles[i])||(u=r.gTitles[i])}var c='"};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,a)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,a)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,a)).replace(/\[([^\[\]]+)]()()()()()/g,a),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(e,r,a,i,o){if("\\"===a)return r+i;if(!n.helper.isString(t.ghMentionsLink))throw Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,o),l="";return t.openLinksInNewWindow&&(l=' rel="noopener noreferrer" target="¨E95Eblank"'),r+'"+i+""}))),e=r.converter._dispatch("anchors.after",e,t,r)}));var d=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,f=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,p=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,g=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,m=function(e){return function(t,r,a,i,o,s,l){var u=a=a.replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback),c="",d="",h=r||"",f=l||"";return/^www\./i.test(a)&&(a=a.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(c=s),e.openLinksInNewWindow&&(d=' rel="noopener noreferrer" target="¨E95Eblank"'),h+'"+u+""+c+f}},_=function(e,t){return function(r,a,i){var o="mailto:";return a=a||"",i=n.subParser("unescapeSpecialChars")(i,e,t),e.encodeEmails?(o=n.helper.encodeEmailAddress(o+i),i=n.helper.encodeEmailAddress(i)):o+=i,a+''+i+""}};n.subParser("autoLinks",(function(e,t,n){return e=(e=(e=n.converter._dispatch("autoLinks.before",e,t,n)).replace(f,m(t))).replace(g,_(t,n)),e=n.converter._dispatch("autoLinks.after",e,t,n)})),n.subParser("simplifiedAutoLinks",(function(e,t,n){return t.simplifiedAutoLink?(e=(e=(e=n.converter._dispatch("simplifiedAutoLinks.before",e,t,n)).replace(t.excludeTrailingPunctuationFromURLs?h:d,m(t))).replace(p,_(t,n)),e=n.converter._dispatch("simplifiedAutoLinks.after",e,t,n)):e})),n.subParser("blockGamut",(function(e,t,r){return e=r.converter._dispatch("blockGamut.before",e,t,r),e=n.subParser("blockQuotes")(e,t,r),e=n.subParser("headers")(e,t,r),e=n.subParser("horizontalRule")(e,t,r),e=n.subParser("lists")(e,t,r),e=n.subParser("codeBlocks")(e,t,r),e=n.subParser("tables")(e,t,r),e=n.subParser("hashHTMLBlocks")(e,t,r),e=n.subParser("paragraphs")(e,t,r),e=r.converter._dispatch("blockGamut.after",e,t,r)})),n.subParser("blockQuotes",(function(e,t,r){e=r.converter._dispatch("blockQuotes.before",e,t,r);var a=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(a=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=(e+="\n\n").replace(a,(function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=n.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=n.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*
[^\r]+?<\/pre>)/gm,(function(e,t){var n=t;return n=(n=n.replace(/^  /gm,"¨0")).replace(/¨0/g,"")})),n.subParser("hashBlock")("
\n"+e+"\n
",t,r)})),e=r.converter._dispatch("blockQuotes.after",e,t,r)})),n.subParser("codeBlocks",(function(e,t,r){e=r.converter._dispatch("codeBlocks.before",e,t,r);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,a,i){var o=a,s=i,l="\n";return o=n.subParser("outdent")(o,t,r),o=n.subParser("encodeCode")(o,t,r),o=(o=(o=n.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(l=""),o="
"+o+l+"
",n.subParser("hashBlock")(o,t,r)+s}))).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)})),n.subParser("codeSpans",(function(e,t,r){return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,a,i,o){var s=o;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=a+""+(s=n.subParser("encodeCode")(s,t,r))+"",s=n.subParser("hashHTMLSpans")(s,t,r)})),e=r.converter._dispatch("codeSpans.after",e,t,r)})),n.subParser("completeHTMLDocument",(function(e,t,n){if(!t.completeHTMLDocument)return e;e=n.converter._dispatch("completeHTMLDocument.before",e,t,n);var r="html",a="\n",i="",o='\n',s="",l="";for(var u in void 0!==n.metadata.parsed.doctype&&(a="\n","html"!==(r=(""+n.metadata.parsed.doctype).toLowerCase())&&"html5"!==r||(o='')),n.metadata.parsed)if(n.metadata.parsed.hasOwnProperty(u))switch(u.toLowerCase()){case"doctype":break;case"title":i=""+n.metadata.parsed.title+"\n";break;case"charset":o="html"===r||"html5"===r?'\n':'\n';break;case"language":case"lang":s=' lang="'+n.metadata.parsed[u]+'"',l+='\n';break;default:l+='\n'}return e=a+"\n\n"+i+o+l+"\n\n"+e.trim()+"\n\n",e=n.converter._dispatch("completeHTMLDocument.after",e,t,n)})),n.subParser("detab",(function(e,t,n){return e=(e=(e=(e=(e=(e=n.converter._dispatch("detab.before",e,t,n)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,(function(e,t){for(var n=t,r=4-n.length%4,a=0;r>a;a++)n+=" ";return n}))).replace(/¨A/g," ")).replace(/¨B/g,""),e=n.converter._dispatch("detab.after",e,t,n)})),n.subParser("ellipsis",(function(e,t,n){return t.ellipsis?(e=(e=n.converter._dispatch("ellipsis.before",e,t,n)).replace(/\.\.\./g,"…"),e=n.converter._dispatch("ellipsis.after",e,t,n)):e})),n.subParser("emoji",(function(e,t,r){if(!t.emoji)return e;return e=(e=r.converter._dispatch("emoji.before",e,t,r)).replace(/:([\S]+?):/g,(function(e,t){return n.helper.emojis.hasOwnProperty(t)?n.helper.emojis[t]:e})),e=r.converter._dispatch("emoji.after",e,t,r)})),n.subParser("encodeAmpsAndAngles",(function(e,t,n){return e=(e=(e=(e=(e=n.converter._dispatch("encodeAmpsAndAngles.before",e,t,n)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&")).replace(/<(?![a-z\/?$!])/gi,"<")).replace(//g,">"),e=n.converter._dispatch("encodeAmpsAndAngles.after",e,t,n)})),n.subParser("encodeBackslashEscapes",(function(e,t,r){return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,n.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)})),n.subParser("encodeCode",(function(e,t,r){return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)})),n.subParser("escapeSpecialCharsWithinTagAttributes",(function(e,t,r){return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,n.helper.escapeCharactersCallback)}))).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(e){return e.replace(/([\\`*_~=|])/g,n.helper.escapeCharactersCallback)})),e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)})),n.subParser("githubCodeBlocks",(function(e,t,r){return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,a,i,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=n.subParser("encodeCode")(o,t,r),o="
"+(o=(o=(o=n.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
",o=n.subParser("hashBlock")(o,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"}))).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e})),n.subParser("hashBlock",(function(e,t,n){return e=(e=n.converter._dispatch("hashBlock.before",e,t,n)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n",e=n.converter._dispatch("hashBlock.after",e,t,n)})),n.subParser("hashCodeTags",(function(e,t,r){e=r.converter._dispatch("hashCodeTags.before",e,t,r);return e=n.helper.replaceRecursiveRegExp(e,(function(e,a,i,o){var s=i+n.subParser("encodeCode")(a,t,r)+o;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"}),"]*>","","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)})),n.subParser("hashElement",(function(e,t,n){return function(e,t){var r=t;return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),r="\n\n¨K"+(n.gHtmlBlocks.push(r)-1)+"K\n\n"}})),n.subParser("hashHTMLBlocks",(function(e,t,r){e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var a=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],i=function(e,t,n,a){var i=e;return-1!==n.search(/\bmarkdown\b/)&&(i=n+r.converter.makeHtml(t)+a),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"<"+t+">"})));for(var o=0;34>o;++o)for(var s,l=RegExp("^ {0,3}(<"+a[o]+"\\b[^>]*>)","im"),u="<"+a[o]+"\\b[^>]*>",c="";-1!==(s=n.helper.regexIndexOf(e,l));){var d=n.helper.splitAtIndex(e,s),h=n.helper.replaceRecursiveRegExp(d[1],i,u,c,"im");if(h===d[1])break;e=d[0].concat(h)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,t,r)),e=(e=n.helper.replaceRecursiveRegExp(e,(function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)})),n.subParser("hashHTMLSpans",(function(e,t,n){function r(e){return"¨C"+(n.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=n.converter._dispatch("hashHTMLSpans.before",e,t,n)).replace(/<[^>]+?\/>/gi,(function(e){return r(e)}))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<[^>]+?>/gi,(function(e){return r(e)})),e=n.converter._dispatch("hashHTMLSpans.after",e,t,n)})),n.subParser("unhashHTMLSpans",(function(e,t,n){e=n.converter._dispatch("unhashHTMLSpans.before",e,t,n);for(var r=0;n.gHtmlSpans.length>r;++r){for(var a=n.gHtmlSpans[r],i=0;/¨C(\d+)C/.test(a);){var o=RegExp.$1;if(a=a.replace("¨C"+o+"C",n.gHtmlSpans[o]),10===i){console.error("maximum nesting of 10 spans reached!!!");break}++i}e=e.replace("¨C"+r+"C",a)}return e=n.converter._dispatch("unhashHTMLSpans.after",e,t,n)})),n.subParser("hashPreCodeTags",(function(e,t,r){e=r.converter._dispatch("hashPreCodeTags.before",e,t,r);return e=n.helper.replaceRecursiveRegExp(e,(function(e,a,i,o){var s=i+n.subParser("encodeCode")(a,t,r)+o;return"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:s})-1)+"G\n\n"}),"^ {0,3}]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)})),n.subParser("headers",(function(e,t,r){e=r.converter._dispatch("headers.before",e,t,r);var a=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),i=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;function o(e){var a,i;if(t.customizedHeaderId){var o=e.match(/\{([^{]+?)}\s*$/);o&&o[1]&&(e=o[1])}return a=e,i=n.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(a=i+a),a=t.ghCompatibleHeaderId?a.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?a.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():a.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(a=i+a),r.hashLinkCounts[a]?a=a+"-"+r.hashLinkCounts[a]++:r.hashLinkCounts[a]=1,a}return e=(e=(e=e.replace(t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,(function(e,i){var s=n.subParser("spanGamut")(i,t,r),l=t.noHeaderId?"":' id="'+o(i)+'"',u=""+s+"";return n.subParser("hashBlock")(u,t,r)}))).replace(i,(function(e,i){var s=n.subParser("spanGamut")(i,t,r),l=t.noHeaderId?"":' id="'+o(i)+'"',u=a+1,c=""+s+"";return n.subParser("hashBlock")(c,t,r)}))).replace(t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm,(function(e,i,s){var l=s;t.customizedHeaderId&&(l=s.replace(/\s?\{([^{]+?)}\s*$/,""));var u=n.subParser("spanGamut")(l,t,r),c=t.noHeaderId?"":' id="'+o(s)+'"',d=a-1+i.length,h=""+u+"";return n.subParser("hashBlock")(h,t,r)})),e=r.converter._dispatch("headers.after",e,t,r)})),n.subParser("horizontalRule",(function(e,t,r){e=r.converter._dispatch("horizontalRule.before",e,t,r);var a=n.subParser("hashBlock")("
",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,a),e=r.converter._dispatch("horizontalRule.after",e,t,r)})),n.subParser("images",(function(e,t,r){function a(e,t,a,i,o,s,l,u){var c=r.gUrls,d=r.gTitles,h=r.gDimensions;if(a=a.toLowerCase(),u||(u=""),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)i="";else if(""===i||null===i){if(""!==a&&null!==a||(a=t.toLowerCase().replace(/ ?\n/g," ")),i="#"+a,n.helper.isUndefined(c[a]))return e;i=c[a],n.helper.isUndefined(d[a])||(u=d[a]),n.helper.isUndefined(h[a])||(o=h[a].width,s=h[a].height)}t=t.replace(/"/g,""").replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback);var f=''+t+'"}return e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,a)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,n,r,i,o,s,l){return a(e,t,n,r=r.replace(/\s/g,""),i,o,s,l)})),e=(e=(e=e.replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,a)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,a)).replace(/!\[([^\[\]]+)]()()()()()/g,a),e=r.converter._dispatch("images.after",e,t,r)})),n.subParser("italicsAndBold",(function(e,t,n){function r(e,t,n){return t+e+n}return e=n.converter._dispatch("italicsAndBold.before",e,t,n),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return r(t,"","")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return r(t,"","")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return r(t,"","")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e})),e=n.converter._dispatch("italicsAndBold.after",e,t,n)})),n.subParser("lists",(function(e,t,r){function a(e,a){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var i=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(i=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=e.replace(i,(function(e,a,i,s,l,u,c){c=c&&""!==c.trim();var d=n.subParser("outdent")(l,t,r),h="";return u&&t.tasklists&&(h=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='-1?(d=n.subParser("githubCodeBlocks")(d,t,r),d=n.subParser("blockGamut")(d,t,r)):(d=(d=n.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=n.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=o?n.subParser("paragraphs")(d,t,r):n.subParser("spanGamut")(d,t,r)),d=""+(d=d.replace("¨A",""))+"\n"})),e=e.replace(/¨0/g,""),r.gListLevel--,a&&(e=e.replace(/\s+$/,"")),e}function i(e,t){if("ol"===t){var n=e.match(/^ *(\d+)\./);if(n&&"1"!==n[1])return' start="'+n[1]+'"'}return""}function o(e,n,r){var o=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===n?o:s,u="";if(-1!==e.search(l))!function t(c){var d=c.search(l),h=i(e,n);-1!==d?(u+="\n\n<"+n+h+">\n"+a(c.slice(0,d),!!r)+"\n",l="ul"===(n="ul"===n?"ol":"ul")?o:s,t(c.slice(d))):u+="\n\n<"+n+h+">\n"+a(c,!!r)+"\n"}(e);else{var c=i(e,n);u="\n\n<"+n+c+">\n"+a(e,!!r)+"\n"}return u}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n){return o(t,n.search(/[*+-]/g)>-1?"ul":"ol",!0)})):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n,r){return o(n,r.search(/[*+-]/g)>-1?"ul":"ol",!1)}))).replace(/¨0/,""),e=r.converter._dispatch("lists.after",e,t,r)})),n.subParser("metadata",(function(e,t,n){if(!t.metadata)return e;function r(e){n.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(e,t,r){return n.metadata.parsed[t]=r,""}))}return e=(e=(e=n.converter._dispatch("metadata.before",e,t,n)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,(function(e,t,n){return r(n),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(e,t,a){return t&&(n.metadata.format=t),r(a),"¨M"})),e=e.replace(/¨M/g,""),e=n.converter._dispatch("metadata.after",e,t,n)})),n.subParser("outdent",(function(e,t,n){return e=(e=(e=n.converter._dispatch("outdent.before",e,t,n)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),e=n.converter._dispatch("outdent.after",e,t,n)})),n.subParser("paragraphs",(function(e,t,r){for(var a=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),i=[],o=a.length,s=0;o>s;s++){var l=a[s];0>l.search(/¨(K|G)(\d+)\1/g)?0>l.search(/\S/)||(l=(l=n.subParser("spanGamut")(l,t,r)).replace(/^([ \t]*)/g,"

"),i.push(l+="

")):i.push(l)}for(o=i.length,s=0;o>s;s++){for(var u="",c=i[s],d=!1;/¨(K|G)(\d+)\1/.test(c);){var h=RegExp.$2;u=(u="K"===RegExp.$1?r.gHtmlBlocks[h]:d?n.subParser("encodeCode")(r.ghCodeBlocks[h].text,t,r):r.ghCodeBlocks[h].codeblock).replace(/\$/g,"$$$$"),c=c.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,u),/^]*>\s*]*>/.test(c)&&(d=!0)}i[s]=c}return e=(e=(e=i.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)})),n.subParser("runExtension",(function(e,t,n,r){if(e.filter)t=e.filter(t,r.converter,n);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=RegExp(a,"g")),t=t.replace(a,e.replace)}return t})),n.subParser("spanGamut",(function(e,t,r){return e=r.converter._dispatch("spanGamut.before",e,t,r),e=n.subParser("codeSpans")(e,t,r),e=n.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=n.subParser("encodeBackslashEscapes")(e,t,r),e=n.subParser("images")(e,t,r),e=n.subParser("anchors")(e,t,r),e=n.subParser("autoLinks")(e,t,r),e=n.subParser("simplifiedAutoLinks")(e,t,r),e=n.subParser("emoji")(e,t,r),e=n.subParser("underline")(e,t,r),e=n.subParser("italicsAndBold")(e,t,r),e=n.subParser("strikethrough")(e,t,r),e=n.subParser("ellipsis")(e,t,r),e=n.subParser("hashHTMLSpans")(e,t,r),e=n.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)})),n.subParser("strikethrough",(function(e,t,r){return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,a){return function(e){return t.simplifiedAutoLink&&(e=n.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(a)})),e=r.converter._dispatch("strikethrough.after",e,t,r)),e})),n.subParser("stripLinkDefinitions",(function(e,t,r){var a=function(a,i,o,s,l,u,c){return i=i.toLowerCase(),2>e.toLowerCase().split(i).length-1?a:(r.gUrls[i]=o.match(/^data:.+?\/.+?;base64,/)?o.replace(/\s/g,""):n.subParser("encodeAmpsAndAngles")(o,t,r),u?u+c:(c&&(r.gTitles[i]=c.replace(/"|'/g,""")),t.parseImgDimensions&&s&&l&&(r.gDimensions[i]={width:s,height:l}),""))};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,a)).replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,a)).replace(/¨0/,"")})),n.subParser("tables",(function(e,t,r){if(!t.tables)return e;function a(e,a){return""+n.subParser("spanGamut")(e,t,r)+"\n"}function i(e){var i,o=e.split("\n");for(i=0;o.length>i;++i)/^ {0,3}\|/.test(o[i])&&(o[i]=o[i].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(o[i])&&(o[i]=o[i].replace(/\|[ \t]*$/,"")),o[i]=n.subParser("codeSpans")(o[i],t,r);var s,l,u,c,d=o[0].split("|").map((function(e){return e.trim()})),h=o[1].split("|").map((function(e){return e.trim()})),f=[],p=[],g=[],m=[];for(o.shift(),o.shift(),i=0;o.length>i;++i)""!==o[i].trim()&&f.push(o[i].split("|").map((function(e){return e.trim()})));if(h.length>d.length)return e;for(i=0;h.length>i;++i)g.push(/^:[ \t]*--*$/.test(s=h[i])?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(s)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(s)?' style="text-align:center;"':"");for(i=0;d.length>i;++i)n.helper.isUndefined(g[i])&&(g[i]=""),p.push((u=g[i],c=void 0,c="",l=(l=d[i]).trim(),(t.tablesHeaderId||t.tableHeaderId)&&(c=' id="'+l.replace(/ /g,"_").toLowerCase()+'"'),""+(l=n.subParser("spanGamut")(l,t,r))+"\n"));for(i=0;f.length>i;++i){for(var _=[],w=0;p.length>w;++w)n.helper.isUndefined(f[i][w]),_.push(a(f[i][w],g[w]));m.push(_)}return function(e,t){for(var n="\n\n\n",r=e.length,a=0;r>a;++a)n+=e[a];for(n+="\n\n\n",a=0;t.length>a;++a){n+="\n";for(var i=0;r>i;++i)n+=t[a][i];n+="\n"}return n+"\n
\n"}(p,m)}return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,n.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,i)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,i),e=r.converter._dispatch("tables.after",e,t,r)})),n.subParser("underline",(function(e,t,r){return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return""+t+""}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return""+t+""})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?""+t+"":e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?""+t+"":e}))).replace(/(_)/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e})),n.subParser("unescapeSpecialChars",(function(e,t,n){return e=(e=n.converter._dispatch("unescapeSpecialChars.before",e,t,n)).replace(/¨E(\d+)E/g,(function(e,t){return String.fromCharCode(parseInt(t))})),e=n.converter._dispatch("unescapeSpecialChars.after",e,t,n)})),n.subParser("makeMarkdown.blockquote",(function(e,t){var r="";if(e.hasChildNodes())for(var a=e.childNodes,i=a.length,o=0;i>o;++o){var s=n.subParser("makeMarkdown.node")(a[o],t);""!==s&&(r+=s)}return r="> "+(r=r.trim()).split("\n").join("\n> ")})),n.subParser("makeMarkdown.codeBlock",(function(e,t){var n=e.getAttribute("language"),r=e.getAttribute("precodenum");return"```"+n+"\n"+t.preList[r]+"\n```"})),n.subParser("makeMarkdown.codeSpan",(function(e){return"`"+e.innerHTML+"`"})),n.subParser("makeMarkdown.emphasis",(function(e,t){var r="";if(e.hasChildNodes()){r+="*";for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);r+="*"}return r})),n.subParser("makeMarkdown.header",(function(e,t,r){var a=Array(r+1).join("#"),i="";if(e.hasChildNodes()){i=a+" ";for(var o=e.childNodes,s=o.length,l=0;s>l;++l)i+=n.subParser("makeMarkdown.node")(o[l],t)}return i})),n.subParser("makeMarkdown.hr",(function(){return"---"})),n.subParser("makeMarkdown.image",(function(e){var t="";return e.hasAttribute("src")&&(t+="!["+e.getAttribute("alt")+"](",t+="<"+e.getAttribute("src")+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t})),n.subParser("makeMarkdown.links",(function(e,t){var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var a=e.childNodes,i=a.length;r="[";for(var o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);r+="](",r+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r})),n.subParser("makeMarkdown.list",(function(e,t,r){var a="";if(!e.hasChildNodes())return"";for(var i=e.childNodes,o=i.length,s=e.getAttribute("start")||1,l=0;o>l;++l)if(void 0!==i[l].tagName&&"li"===i[l].tagName.toLowerCase()){a+=("ol"===r?s+". ":"- ")+n.subParser("makeMarkdown.listItem")(i[l],t),++s}return(a+="\n\x3c!-- --\x3e\n").trim()})),n.subParser("makeMarkdown.listItem",(function(e,t){for(var r="",a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);return/\n$/.test(r)?r=r.split("\n").join("\n ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):r+="\n",r})),n.subParser("makeMarkdown.node",(function(e,t,r){r=r||!1;var a="";if(3===e.nodeType)return n.subParser("makeMarkdown.txt")(e,t);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":r||(a=n.subParser("makeMarkdown.header")(e,t,1)+"\n\n");break;case"h2":r||(a=n.subParser("makeMarkdown.header")(e,t,2)+"\n\n");break;case"h3":r||(a=n.subParser("makeMarkdown.header")(e,t,3)+"\n\n");break;case"h4":r||(a=n.subParser("makeMarkdown.header")(e,t,4)+"\n\n");break;case"h5":r||(a=n.subParser("makeMarkdown.header")(e,t,5)+"\n\n");break;case"h6":r||(a=n.subParser("makeMarkdown.header")(e,t,6)+"\n\n");break;case"p":r||(a=n.subParser("makeMarkdown.paragraph")(e,t)+"\n\n");break;case"blockquote":r||(a=n.subParser("makeMarkdown.blockquote")(e,t)+"\n\n");break;case"hr":r||(a=n.subParser("makeMarkdown.hr")(e,t)+"\n\n");break;case"ol":r||(a=n.subParser("makeMarkdown.list")(e,t,"ol")+"\n\n");break;case"ul":r||(a=n.subParser("makeMarkdown.list")(e,t,"ul")+"\n\n");break;case"precode":r||(a=n.subParser("makeMarkdown.codeBlock")(e,t)+"\n\n");break;case"pre":r||(a=n.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":r||(a=n.subParser("makeMarkdown.table")(e,t)+"\n\n");break;case"code":a=n.subParser("makeMarkdown.codeSpan")(e,t);break;case"em":case"i":a=n.subParser("makeMarkdown.emphasis")(e,t);break;case"strong":case"b":a=n.subParser("makeMarkdown.strong")(e,t);break;case"del":a=n.subParser("makeMarkdown.strikethrough")(e,t);break;case"a":a=n.subParser("makeMarkdown.links")(e,t);break;case"img":a=n.subParser("makeMarkdown.image")(e,t);break;default:a=e.outerHTML+"\n\n"}return a})),n.subParser("makeMarkdown.paragraph",(function(e,t){var r="";if(e.hasChildNodes())for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);return r=r.trim()})),n.subParser("makeMarkdown.pre",(function(e,t){var n=e.getAttribute("prenum");return"
"+t.preList[n]+"
"})),n.subParser("makeMarkdown.strikethrough",(function(e,t){var r="";if(e.hasChildNodes()){r+="~~";for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);r+="~~"}return r})),n.subParser("makeMarkdown.strong",(function(e,t){var r="";if(e.hasChildNodes()){r+="**";for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);r+="**"}return r})),n.subParser("makeMarkdown.table",(function(e,t){var r,a,i="",o=[[],[]],s=e.querySelectorAll("thead>tr>th"),l=e.querySelectorAll("tbody>tr");for(r=0;s.length>r;++r){var u=n.subParser("makeMarkdown.tableCell")(s[r],t),c="---";if(s[r].hasAttribute("style"))switch(s[r].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":c=":---";break;case"text-align:right;":c="---:";break;case"text-align:center;":c=":---:"}o[0][r]=u.trim(),o[1][r]=c}for(r=0;l.length>r;++r){var d=o.push([])-1,h=l[r].getElementsByTagName("td");for(a=0;s.length>a;++a){var f=" ";void 0!==h[a]&&(f=n.subParser("makeMarkdown.tableCell")(h[a],t)),o[d].push(f)}}var p=3;for(r=0;o.length>r;++r)for(a=0;o[r].length>a;++a){var g=o[r][a].length;g>p&&(p=g)}for(r=0;o.length>r;++r){for(a=0;o[r].length>a;++a)o[r][a]=1===r?":"===o[r][a].slice(-1)?n.helper.padEnd(o[r][a].slice(-1),p-1,"-")+":":n.helper.padEnd(o[r][a],p,"-"):n.helper.padEnd(o[r][a],p);i+="| "+o[r].join(" | ")+" |\n"}return i.trim()})),n.subParser("makeMarkdown.tableCell",(function(e,t){var r="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t,!0);return r.trim()})),n.subParser("makeMarkdown.txt",(function(e){var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/¨NBSP;/g," "),t=(t=(t=(t=(t=(t=(t=(t=(t=n.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}));e.exports?e.exports=n:this.showdown=n}).call(o)}(l);var u=s(l.exports);u.ConverterExtObj=function(e,t){var n=[],r=e;function a(e,t){if(t=t||null,u.helper.isString(e)&&(t=u.helper.stdExtName(e),e=u.asyncExtension(t),u.helper.isUndefined(e)))throw Error('Extension "'+t+'" could not be loaded. It was either not found or is not a valid aync extension.');if("function"==typeof e&&(e=e()),u.helper.isArray(e)||(e=[e]),u.validateExtension(e))for(var r=0;e.length>r;++r)if("output"===e[r].type)n.push(e[r])}t&&u.helper.forEach(t,a),this.addAsyncExtension=function(e,t){a(e,t=t||null)},this.removeAsyncExtension=function(e){u.helper.isArray(e)||(e=[e]);for(var t=0;e.length>t;++t)for(var r=e[t],a=0;n.length>a;++a)n[a]===r&&n.splice(a,1)},this.getAsyncExtensions=function(){return n},this.getCurrFlavor=function(){return r},this.setCurrFlavor=function(e){r=e}},u.Converter.prototype.initConvertExtObj=function(e,t){return this.extObj=new u.ConverterExtObj(e,t),this.resetOptions=function(e){e=e||{};var t=u.getOptions(),n=this.getOptions();for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);if("object"===i(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a])},this.setFlavor=function(e){var t=u.getFlavorOptions(e);if(!u.helper.isUndefined(t)){this.extObj.setCurrFlavor(e);var n=u.getDefaultOptions(!0);for(var r in n)n.hasOwnProperty(r)&&(this.getOptions()[r]=n[r]);for(var r in t)t.hasOwnProperty(r)&&(this.getOptions()[r]=t[r])}},this.getFlavor=function(){return this.extObj.getCurrFlavor()},this.addAsyncExtension=function(e,t){this.extObj.addAsyncExtension(e,t)},this.removeAsyncExtension=function(e){this.extObj.removeAsyncExtension(e)},this.removeExtension=function(e){u.helper.isArray(e)||(e=[e]);for(var t=this.getAllExtensions(),n=t.language,r=t.output,a=0;e.length>a;++a){for(var i=e[a],o=0;n.length>o;++o)n[o]===i&&n.splice(o,1);for(var s=0;r.length>s;++s)r[s]===i&&r.splice(s,1)}},this.asyncMakeHtml=function(e,t){var n=this.makeHtml(e),r=this.extObj.getAsyncExtensions();if(!r.length)return Promise.resolve({html:n});var a={outputs:r,converter:this},i=(new DOMParser).parseFromString(n,"text/html"),o=void 0!==i.body?i.body:i,s=this.getOptions(),l=Promise.resolve({wrapper:o,options:s,globals:a,scripts:[]});return r.forEach((function(e){l=l.then((function(t){var n=e.filter(t);return n||t}))})),l.then((function(e){if("function"==typeof t&&t){var n=t(e);if(n instanceof Promise)return n.then((function(e){return{html:e.wrapper.innerHTML,scripts:e.scripts}}))}return{html:e.wrapper.innerHTML,scripts:e.scripts}}))},this},u.subParser("githubCodeBlocks",(function(e,t,n){return t.ghCodeBlocks?(e=n.converter._dispatch("githubCodeBlocks.before",e,t,n),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*?)(?:[ \t]*?)((?:\{[\S\t ]*\}|\[[\S\t ]*\])?)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,r,a,i,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=u.subParser("encodeCode")(o,t,n),o=(o=(o=u.subParser("detab")(o,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""),o="
"+o+s+"
",o=u.subParser("hashBlock")(o,t,n),"\n\n¨G"+(n.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"}))).replace(/¨0/,""),n.converter._dispatch("githubCodeBlocks.after",e,t,n)):e})),u.subParser("tables",(function(e,t,n){if(!t.tables)return e;function r(e){return/^:[ \t]*--*$/.test(e)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(e)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(e)?' style="text-align:center;"':""}function a(e,r,a,i,o){if(t.tablesMerge){var s=function(e,n,r,a){if(a){if(!t.tablesRowspan||"^^"!==a||!n)return;for(var i=n-1;i>=0;--i)if(e[i][r]){if("^^"!==e[i][r])return e[i][r]=e[i][r].replace(/rowspan="[0-9]*"/g,"").replace(/^(\n\r]*?)(>.*<\/td>\n)/,(function(e,t,r){return t+' rowspan="'+(n-i+1)+'"'+r})),a;if(0===i)return e[i][r]='\n',a}else for(var o=r-1;o>=0;-o){if(e[i+1][o]&&"^^"!==e[i+1][o])return;if(e[i][o]){if(!e[i+1][o])return;return e[i][o]=e[i][o].replace(/rowspan="[0-9]*"/g,"").replace(/^(\n\r]*?)(>.*<\/td>\n)/,(function(e,t,r){return t+' rowspan="'+(n-i+1)+'"'+r})),a}}}else if(r)for(o=r-1;o>=0;--o)if(e[n][o]){if("^^"!==e[n][o])return e[n][o]=e[n][o].replace(/colspan="[0-9]*"/g,"").replace(/^(\n\r]*?)(>.*<\/td>\n)/,(function(e,t,n){return t+' colspan="'+(r-o+1)+'"'+n})),a;for(i=n-1;i>=0;--i){if(e[i][o+1])return;if("^^"!==e[i][o])return e[i][o]=e[i][o].replace(/colspan="[0-9]*"/g,"").replace(/^(\n\r]*?)(>.*<\/td>\n)/,(function(e,t,n){return t+' colspan="'+(r-o+1)+'"'+n})),a}}else if(0===o)return e[n][o]='\n',a}(e,r,a,i);if(!u.helper.isUndefined(s))return s}return i=i.trim(),""+u.subParser("spanGamut")(i,t,n)+"\n"}function i(e,i){var o,s=e.split("\n");for(o=0;s.length>o;++o)/^ {0,3}\|/.test(s[o])&&(s[o]=s[o].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(s[o])&&(s[o]=s[o].replace(/\|[ \t]*$/,"")),s[o]=u.subParser("codeSpans")(s[o],t,n);var l,c,d,h=[],f=[],p=[],g=[],m=[];if(i)for(h=s[0].split("|").map((function(e){return e.trim()})),s.shift(),o=0;h.length>o;++o)g.push(r(h[o]));else{var _=s[0].split("|").map((function(e){return e.trim()}));if(h=s[1].split("|").map((function(e){return e.trim()})),s.shift(),s.shift(),h.length>_.length)return e;for(o=0;h.length>o;++o)g.push(r(h[o]));for(o=0;_.length>o;++o)u.helper.isUndefined(g[o])&&(g[o]=""),p.push((c=g[o],d=void 0,d="",l=(l=_[o]).trim(),(t.tablesHeaderId||t.tableHeaderId)&&(d=' id="'+l.replace(/ /g,"_").toLowerCase()+'"'),""+(l=u.subParser("spanGamut")(l,t,n))+"\n"))}for(o=0;s.length>o;++o)""!==s[o].trim()&&f.push(s[o].split("|").map((function(e){var t=e.trim();return""===t&&e.length>0?e:t})));for(o=0;f.length>o;++o){var w=[];m.push(w);for(var b=0;g.length>b;++b)u.helper.isUndefined(f[o][b])&&(f[o][b]=""),w.push(a(m,o,b,f[o][b],g[b]))}return function(e,n,r){var a="\n",i=n.length;if(e.length){a+="\n\n";for(var o=0;e.length>o;++o)a+=e[o];a+="\n\n"}for(a+="\n",o=0;r.length>o;++o){a+="\n";for(var s=0;i>s;++s)t.tablesMerge&&"^^"===r[o][s]||(a+=r[o][s]);a+="\n"}return a+"\n
\n"}(p,g,m)}function o(e){return i(e,!1)}function s(e){return i(e,!0)}return e=(e=(e=(e=n.converter._dispatch("tables.before",e,t,n)).replace(/\\(\|)/g,u.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,o)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,o),t.tablesHeaderless&&(e=(e=e.replace(/^ {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,s)).replace(/^ {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,s)),e=n.converter._dispatch("tables.after",e,t,n)}));var c="vanilla",d={github:{ghCompatibleHeaderId:!1,underline:!0,rawHeaderId:!0,tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},ghost:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},allOn:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0}},h={};u.asyncExtension=function(e,t){if(!u.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=u.helper.stdExtName(e),u.helper.isUndefined(t)){if(!h.hasOwnProperty(e))throw Error("Async Extension named "+e+" is not registered!");return h[e]}"function"==typeof t&&(t=t()),u.helper.isArray(t)||(t=[t]),u.validateExtension(t)&&(h[e]=t)},u.removeAsyncExtension=function(e){e=u.helper.stdExtName(e),delete h[e]},u.resetAsyncExtensions=function(){h={}},u.removeExtension=function(e){e=u.helper.stdExtName(e),delete u.getAllExtensions[e]};var f=u.setFlavor,p=u.getFlavorOptions;u.setFlavor=function(e){try{if(f(e),c=e,!d.hasOwnProperty(e))return}catch(t){if(!d.hasOwnProperty(e))return;u.resetOptions(),c=e}var t=d[e];for(var n in t)t.hasOwnProperty(n)&&(u.getOptions()[n]=t[n])},u.getFlavor=function(){return c},u.setFlavorOptions=function(e,t){t&&(d[e]=Object.assign(d[e]||{},t))},u.getFlavorOptions=function(e){var t=p(e);return u.helper.isUndefined(t)?d.hasOwnProperty(e)?d[e]:void 0:d.hasOwnProperty(e)?Object.assign(t,d[e]):t};var g="jsdelivr",m="file:"===document.location.protocol?"https://":document.location.protocol+"//",_="",w="",b={local:{ABCJS:"../node_modules/abcjs/dist/abcjs-basic.js",ABCJSCSS:"../node_modules/abcjs/abcjs-audio.css",echarts:"../node_modules/echarts/dist/echarts.js",Viz:"../node_modules/@viz-js/viz/lib/viz-standalone.js",Raphael:"../node_modules/raphael/raphael.min.js",flowchart:"../dist/diagrams/flowchart/flowchart.min.js",mermaid:"../node_modules/mermaid/dist/mermaid.js",katex:"../node_modules/katex/dist/katex.min.js",katexCSS:"../node_modules/katex/dist/katex.min.css",renderMathInElement:"../node_modules/katex/dist/contrib/auto-render.js",railroad:"../node_modules/railroad-diagrams/railroad-diagrams.js",railroadCSS:"../node_modules/railroad-diagrams/railroad-diagrams.css",Snap:"../node_modules/snapsvg/dist/snap.svg-min.js",WebFont:"../node_modules/webfontloader/webfontloader.js",underscore:"../node_modules/underscore/underscore-min.js",sequence:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js",sequenceCSS:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.css",WaveDrom:"../node_modules/wavedrom/wavedrom.min.js",WaveDromSkin:{default:"../node_modules/wavedrom/skins/default.js",lowkey:"../node_modules/wavedrom/skins/lowkey.js",narrow:"../node_modules/wavedrom/skins/narrow.js"},vega:"../node_modules/vega/build/vega.js",vegaLite:"../node_modules/vega-lite/build/vega-lite.js",vegaEmbed:"../node_modules/vega-embed/build/vega-embed.js"},cdnjs:{ABCJS:m+"cdnjs.cloudflare.com/ajax/libs/abcjs/6.4.1/abcjs-basic-min.js",ABCJSCSS:m+"cdnjs.cloudflare.com/ajax/libs/abcjs/abcjs-audio.css",echarts:m+"cdnjs.cloudflare.com/ajax/libs/echarts/5.5.0/echarts.min.js",Viz:m+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:m+"cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js",flowchart:m+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:m+"cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js",katex:m+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.js",katexCSS:m+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.css",renderMathInElement:m+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/contrib/auto-render.js",railroad:m+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.js",railroadCSS:m+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.css",Snap:m+"cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js",WebFont:m+"cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js",underscore:m+"cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js",sequence:m+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:m+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:m+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/wavedrom.min.js",WaveDromSkin:{default:m+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/default.js",lowkey:m+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/lowkey.js",narrow:m+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/narrow.js"},vega:m+"cdnjs.cloudflare.com/ajax/libs/vega/5.30.0/vega.min.js",vegaLite:m+"cdnjs.cloudflare.com/ajax/libs/vega-lite/5.19.0/vega-lite.min.js",vegaEmbed:m+"cdnjs.cloudflare.com/ajax/libs/vega-embed/6.26.0/vega-embed.min.js"},jsdelivr:{ABCJS:m+"cdn.jsdelivr.net/npm/abcjs@6/dist/abcjs-basic-min.js",ABCJSCSS:m+"cdn.jsdelivr.net/npm/abcjs@6/abcjs-audio.css",echarts:m+"cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js",Viz:m+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:m+"cdn.jsdelivr.net/npm/raphael@2/raphael.min.js",flowchart:m+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:m+"cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js",katex:m+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.js",katexCSS:m+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css",renderMathInElement:m+"cdn.jsdelivr.net/npm/katex@0/dist/contrib/auto-render.js",railroad:m+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.js",railroadCSS:m+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.css",Snap:m+"cdn.jsdelivr.net/npm/snapsvg@0/dist/snap.svg-min.js",WebFont:m+"cdn.jsdelivr.net/npm/webfontloader@1/webfontloader.js",underscore:m+"cdn.jsdelivr.net/npm/underscore@1/underscore-min.js",sequence:m+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:m+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:m+"cdn.jsdelivr.net/npm/wavedrom@3/wavedrom.min.js",WaveDromSkin:{default:m+"cdn.jsdelivr.net/npm/wavedrom@3/skins/default.js",lowkey:m+"cdn.jsdelivr.net/npm/wavedrom@3/skins/lowkey.js",narrow:m+"cdn.jsdelivr.net/npm/wavedrom@3/skins/narrow.js"},vega:m+"cdn.jsdelivr.net/npm/vega@5/build/vega.js",vegaLite:m+"cdn.jsdelivr.net/npm/vega-lite@5/build/vega-lite.js",vegaEmbed:m+"cdn.jsdelivr.net/npm/vega-embed@6/build/vega-embed.js"}};function v(e,t){if(b.hasOwnProperty(g)){var n=b[g],r="";if("object"===i(e)){var a=Object.keys(e)[0],o=e[a];n[a]&&"string"==typeof o&&o&&n[a][o]&&(r=n[a][o])}else n[e]&&(r=n[e]);r&&(t=r.substring(0,m.length)===m?r:"../dist/"===r.substring(0,8)?w+r:_+r)}return t}var y={setCDN:function(e,t,n){e in b&&(g=e),"string"==typeof t&&t&&(_=t),"string"==typeof n&&n&&(w=n)},getCDN:function(){return g},getSrc:v,loadScript:function(e,t){return new Promise((function(n,r){e&&"undefined"!=typeof document||r("Args is invaild!"),void 0===t&&(t=e),e=v(t,e);var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("script");i.src=e,i.onload=function(){n(t)},a.appendChild(i)}))},loadStyleSheet:function(e,t){if(!e||"undefined"==typeof document)return"";void 0===t&&(t=e),e=v(t,e);var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("link");return r.rel="stylesheet",r.href=e,n.appendChild(r),"local"===g?"":e}};Date.prototype.Format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in e||(e="yyyy-MM-dd hh:mm:ss.S"),/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[n]:("00"+t[n]).substr((""+t[n]).length)));return e};var k={interopDefault:function(e){return e&&"object"===i(e)&&"default"in e?e.default:e},loadScript:function(e,t){return new Promise((function(n,r){t&&"undefined"!=typeof document||r("Args is invaild!");var a=document.body,i=document.getElementById(e);i?a.removeChild(i):(i=document.createElement("script")).id=e,i.type="text/javascript",i.text=t,a.appendChild(i),n(!0)}))},renderCacheElement:function(e,t,n,r){"undefined"!=typeof window&&window.document&&(e=window.document);var a=e.createElement("div");if(a.id=t,a.className=n,a.style.display="none",e.body.appendChild(a),"function"==typeof r&&r){var i=r(a);if(i instanceof Promise)return i.then((function(t){e.body.removeChild(t),t.style.display=""})),a.outerHTML}return e.body.removeChild(a),a.style.display="",a.outerHTML},renderElement:function(e,t,n){"undefined"!=typeof window&&window.document&&(e=window.document);var r=e.createElement("div");return r.id=t,r.className=n,e.body.appendChild(r),r},createElementMeta:function(e,t,n){var r=t.dataset.lang,a=r?JSON.parse(r):null,i="";if(a){if("boolean"==typeof a.codeblock&&a.codeblock||"string"==typeof a.codeblock&&"true"===a.codeblock.toLowerCase())return!1;a.align&&("center"===a.align?i="diagram-center":"right"===a.align&&(i="diagram-right"))}var o=t.textContent.trim();n&&"function"==typeof n&&(o=n(o));var s=(t.classList.length>0?t.classList[0]:"")+(t.className&&i?" ":"")+i,l=e+"-"+Date.now()+"-"+Math.floor(1e4*Math.random());return t.id=l,{id:l,className:s,data:o,element:t}}},x="abc",E="ABCJSCSS";if("undefined"==typeof window)throw Error("The showdown abcjs extension can only be used in browser environment!");if(void 0===S)var S=window.ABCJS||void 0;function j(){return!!S}var A=!1;function L(e,t){if(j()){var n=t.id,r=t.className,a=t.data,i=t.cssLink,o=t.element.ownerDocument;t.element.parentNode.outerHTML=i?'
'):'
');var s=o.getElementById(n);return S.renderAbc(s,a),e(!0)}setTimeout((function(){L(e,t)}),20)}function P(e){return new Promise((function(t){var n=k.createElementMeta(x,e);if(!n)return t(!1);n.cssLink=y.getSrc(E),L(t,n)}))}function C(e){var t;return t=j(),"undefined"!=typeof window&&(t||A||(A=!0,y.loadStyleSheet(E),y.loadScript("ABCJS").then((function(e){S=k.interopDefault(window[e])})))),new Promise((function(t){var n=[];e.forEach((function(e){n.push(P(e))})),Promise.all(n).then((function(){t(!0)}))}))}function z(){return[{type:"output",filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.".concat(x,".language-").concat(x));return!!n.length&&(this.config={cssLink:y.getSrc(E)},console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render ").concat(x," elements.")),C(n).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render ").concat(x," elements.")),e})))}}]}function M(e,t,n,r){try{r&&(n=n.appendChild(e.ownerDocument.createElement("ul")));var a=n.appendChild(e.ownerDocument.createElement("li")).appendChild(e.ownerDocument.createElement("a"));t&&(a.appendChild(e.ownerDocument.createTextNode(t.textContent)),a.href="#"+t.id)}catch(t){console.log("append child error:"+e)}return n}function O(e,t,n,r){if(n.headingLevel>=r){for(var a=null;n&&n.headingLevel>=r;)n=(a=n).parentNode,a.parentNode=null,a.toc=null,a.headingLevel=null,a.preLevel=null;return n&&O(e,t,n,r),n}if(r>n.preLevel){for(n.preLevel++;r>n.preLevel;)n.toc=M(e,null,n.toc,!0),n.preLevel++;n.toc=M(e,t,n.toc,!0)}else{for(;n.preLevel>r;)n.toc=n.toc.parentNode,n.preLevel--;M(e,t,n.toc,!1)}return n.parentNode&&O(e,t,n.parentNode,r),n}function T(){var e=new DOMParser;return[{type:"output",filter:function(t){var n=e.parseFromString(t,"text/html"),r=void 0!==n.body?n.body:n;return function(e){for(var t=null,n=0,r=null,a=!1,i=e.querySelectorAll("p,h1,h2,h3,h4,h5,h6"),o=0;i.length>o;o++)if("[toc]"==(t=i[o]).textContent.trim().toLowerCase()){var s=e.ownerDocument.createElement("ul");s.className="showdown-toc",t.parentNode.replaceChild(s,t);var l={parentNode:null,toc:s,headingLevel:n,preLevel:0};if(r)if(n>r.headingLevel)l.parentNode=r;else{for(var u=r;u.headingLevel>n;)u=u.parentNode;u&&(l.parentNode=n===u.headingLevel?u.parentNode:u)}r=l,a=!0}else if(t.tagName)switch(t.tagName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":n=parseInt(t.tagName.substr(1)),r&&(r.preLevel||(r.preLevel=n),r=O(e,t,r,n))}for(;r;){var c=r;r=c.parentNode,c.parentNode=null,c.toc=null,c.headingLevel=null,c.preLevel=null}return a}(r)?r.innerHTML:t}}]}if("undefined"==typeof window)throw Error("The showdown viz extension can only be used in browser environment!");if(void 0===R)var R=window.Viz||void 0;var D=["circo","dot","neato","osage","twopi"];function N(){return!(void 0===R||!R||void 0===R.instance)}var B=!1;function I(e,t){if(N()){var n=t.id,r=t.className,a=t.data,i=t.element,o=t.element.dataset.lang,s="dot";if(o){var l=JSON.parse(o);l&&l.engine&&-1!=D.indexOf(l.engine)&&(s=l.engine)}R.instance().then((function(t){var o=t.renderString(a,{format:"svg",engine:s});i.parentNode.outerHTML='
').concat(o,"
"),e(!0)}))}else setTimeout((function(){I(e,t)}),10)}function H(e){return new Promise((function(t){var n=k.createElementMeta("viz",e);if(!n)return t(!1);I(t,n)}))}function F(e){var t;return t=N(),"undefined"!=typeof window&&(t||B||(B=!0,y.loadScript("Viz").then((function(e){R=k.interopDefault(window[e])})))),new Promise((function(t){var n=[];e.forEach((function(e){n.push(H(e))})),Promise.all(n).then((function(){t(!0)}))}))}function q(){return[{type:"output",filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.dot.language-dot");return!!n.length&&(console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render dot elements.")),F(n).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render dot elements.")),e})))}}]}var U="vega";if("undefined"==typeof window)throw Error("The showdown vega extension can only be used in browser environment!");if(void 0===Z)var Z=window.vegaEmbed||void 0;function $(){return!(void 0===Z||!Z)}var W=!1;function V(e,t,n,r){var a=k.createElementMeta(U,e);if(!a)return Promise.resolve(!1);var i=JSON.stringify(t),o=JSON.stringify(JSON.parse(a.data)),s=a.id,l={id:s,code:"(function() {\n let el = document.getElementById('".concat(s,"');\n if (el){\n vegaEmbed(el, JSON.parse('").concat(o,"'), JSON.parse('").concat(i,"'));\n }\n })();")};return n.push(l),new Promise((function(e){G(e,a)}))}function Y(e,t,n,r){var a;return a=$(),"undefined"!=typeof window&&(a||W||(W=!0,y.loadScript(U).then((function(){return y.loadScript("vegaLite")})).then((function(){return y.loadScript("vegaEmbed")})).then((function(e){Z=k.interopDefault(window[e])})))),new Promise((function(a){var i=[];e.forEach((function(e){i.push(V(e,r,n))})),t.forEach((function(e){i.push(V(e,r,n))})),Promise.all(i).then((function(){a(!0)}))}))}function G(e,t){if($()){var n=t.className;return t.element.parentNode.outerHTML='
'),e(!0)}setTimeout((function(){G(e,t)}),10)}function J(e){var t=function(){return r({actions:{editor:!1},theme:"vox",tooltip:!1,renderer:"svg"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.vega.language-vega"),r=t.querySelectorAll("code.vega-lite.language-vega-lite");if(!n.length&&!r.length)return!1;var a=e.scripts;return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render vega elements.")),Y(n,r,a,this.config).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render vega elements.")),e}))}}]}function K(){var e=new DOMParser;return[{type:"output",filter:function(t){var n=e.parseFromString(t,"text/html"),r=void 0!==n.body?n.body:n;return function(e){for(var t=null,n=null,r=!1,a=e.querySelectorAll("p, li, h1, h2, h3, h4, h5, h6, div.paragraph"),i=0;a.length>i;i++)for(n=(t=a[i]).firstChild;n;){if(3===n.nodeType){var o=n.nodeValue.match(/^([\s\S]*?)([:-]-:)(?:[\s]?)([\s\S]*)$/);o&&(":-:"===o[2]?(n.nodeValue=o[3],t.className?t.className+=" align-center":t.className="align-center",r=!0):"--:"===o[2]&&(n.nodeValue=o[3],t.className?t.className+=" align-right":t.className="align-right",r=!0));break}n=n.nextSibling}return r}(r)?r.innerHTML:t}}]}var X={decimalsign:"."},Q=0,ee=1,te=2,ne=3,re=4,ae=5,ie=6,oe=7,se=8,le=9,ue=10,ce={input:'"',tag:"mtext",output:"mbox",tex:null,ttype:ue},de=[{input:"alpha",tag:"mi",output:"α",tex:null,ttype:Q},{input:"beta",tag:"mi",output:"β",tex:null,ttype:Q},{input:"chi",tag:"mi",output:"χ",tex:null,ttype:Q},{input:"delta",tag:"mi",output:"δ",tex:null,ttype:Q},{input:"Delta",tag:"mo",output:"Δ",tex:null,ttype:Q},{input:"epsi",tag:"mi",output:"ε",tex:"epsilon",ttype:Q},{input:"varepsilon",tag:"mi",output:"ɛ",tex:null,ttype:Q},{input:"eta",tag:"mi",output:"η",tex:null,ttype:Q},{input:"gamma",tag:"mi",output:"γ",tex:null,ttype:Q},{input:"Gamma",tag:"mo",output:"Γ",tex:null,ttype:Q},{input:"iota",tag:"mi",output:"ι",tex:null,ttype:Q},{input:"kappa",tag:"mi",output:"κ",tex:null,ttype:Q},{input:"lambda",tag:"mi",output:"λ",tex:null,ttype:Q},{input:"Lambda",tag:"mo",output:"Λ",tex:null,ttype:Q},{input:"lamda",tag:"mi",output:"lambda",tex:null,ttype:se},{input:"Lamda",tag:"mi",output:"Lambda",tex:null,ttype:se},{input:"mu",tag:"mi",output:"μ",tex:null,ttype:Q},{input:"nu",tag:"mi",output:"ν",tex:null,ttype:Q},{input:"omega",tag:"mi",output:"ω",tex:null,ttype:Q},{input:"Omega",tag:"mo",output:"Ω",tex:null,ttype:Q},{input:"phi",tag:"mi",output:"φ",tex:null,ttype:Q},{input:"varphi",tag:"mi",output:"ϕ",tex:null,ttype:Q},{input:"Phi",tag:"mo",output:"Φ",tex:null,ttype:Q},{input:"pi",tag:"mi",output:"π",tex:null,ttype:Q},{input:"Pi",tag:"mo",output:"Π",tex:null,ttype:Q},{input:"psi",tag:"mi",output:"ψ",tex:null,ttype:Q},{input:"Psi",tag:"mi",output:"Ψ",tex:null,ttype:Q},{input:"rho",tag:"mi",output:"ρ",tex:null,ttype:Q},{input:"sigma",tag:"mi",output:"σ",tex:null,ttype:Q},{input:"Sigma",tag:"mo",output:"Σ",tex:null,ttype:Q},{input:"tau",tag:"mi",output:"τ",tex:null,ttype:Q},{input:"theta",tag:"mi",output:"θ",tex:null,ttype:Q},{input:"vartheta",tag:"mi",output:"ϑ",tex:null,ttype:Q},{input:"Theta",tag:"mo",output:"Θ",tex:null,ttype:Q},{input:"upsilon",tag:"mi",output:"υ",tex:null,ttype:Q},{input:"xi",tag:"mi",output:"ξ",tex:null,ttype:Q},{input:"Xi",tag:"mo",output:"Ξ",tex:null,ttype:Q},{input:"zeta",tag:"mi",output:"ζ",tex:null,ttype:Q},{input:"*",tag:"mo",output:"⋅",tex:"cdot",ttype:Q},{input:"**",tag:"mo",output:"∗",tex:"ast",ttype:Q},{input:"***",tag:"mo",output:"⋆",tex:"star",ttype:Q},{input:"//",tag:"mo",output:"/",tex:"/",ttype:Q,val:!0,notexcopy:!0},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:Q},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:Q},{input:"xx",tag:"mo",output:"×",tex:"times",ttype:Q},{input:"|><",tag:"mo",output:"⋉",tex:"ltimes",ttype:Q},{input:"><|",tag:"mo",output:"⋊",tex:"rtimes",ttype:Q},{input:"|><|",tag:"mo",output:"⋈",tex:"bowtie",ttype:Q},{input:"-:",tag:"mo",output:"÷",tex:"div",ttype:Q},{input:"divide",tag:"mo",output:"-:",tex:null,ttype:se},{input:"@",tag:"mo",output:"∘",tex:"circ",ttype:Q},{input:"o+",tag:"mo",output:"⊕",tex:"oplus",ttype:Q},{input:"ox",tag:"mo",output:"⊗",tex:"otimes",ttype:Q},{input:"o.",tag:"mo",output:"⊙",tex:"odot",ttype:Q},{input:"sum",tag:"mo",output:"∑",tex:null,ttype:oe},{input:"prod",tag:"mo",output:"∏",tex:null,ttype:oe},{input:"^^",tag:"mo",output:"∧",tex:"wedge",ttype:Q},{input:"^^^",tag:"mo",output:"⋀",tex:"bigwedge",ttype:oe},{input:"vv",tag:"mo",output:"∨",tex:"vee",ttype:Q},{input:"vvv",tag:"mo",output:"⋁",tex:"bigvee",ttype:oe},{input:"nn",tag:"mo",output:"∩",tex:"cap",ttype:Q},{input:"nnn",tag:"mo",output:"⋂",tex:"bigcap",ttype:oe},{input:"uu",tag:"mo",output:"∪",tex:"cup",ttype:Q},{input:"uuu",tag:"mo",output:"⋃",tex:"bigcup",ttype:oe},{input:"overset",tag:"mover",output:"stackrel",tex:null,ttype:te},{input:"underset",tag:"munder",output:"stackrel",tex:null,ttype:te},{input:"!=",tag:"mo",output:"≠",tex:"ne",ttype:Q},{input:":=",tag:"mo",output:":=",tex:null,ttype:Q},{input:"lt",tag:"mo",output:"<",tex:null,ttype:Q},{input:"gt",tag:"mo",output:">",tex:null,ttype:Q},{input:"<=",tag:"mo",output:"≤",tex:"le",ttype:Q},{input:"lt=",tag:"mo",output:"≤",tex:"leq",ttype:Q},{input:"gt=",tag:"mo",output:"≥",tex:"geq",ttype:Q},{input:">=",tag:"mo",output:"≥",tex:"ge",ttype:Q},{input:"-<",tag:"mo",output:"≺",tex:"prec",ttype:Q},{input:"-lt",tag:"mo",output:"≺",tex:null,ttype:Q},{input:">-",tag:"mo",output:"≻",tex:"succ",ttype:Q},{input:"-<=",tag:"mo",output:"⪯",tex:"preceq",ttype:Q},{input:">-=",tag:"mo",output:"⪰",tex:"succeq",ttype:Q},{input:"in",tag:"mo",output:"∈",tex:null,ttype:Q},{input:"!in",tag:"mo",output:"∉",tex:"notin",ttype:Q},{input:"sub",tag:"mo",output:"⊂",tex:"subset",ttype:Q},{input:"sup",tag:"mo",output:"⊃",tex:"supset",ttype:Q},{input:"sube",tag:"mo",output:"⊆",tex:"subseteq",ttype:Q},{input:"supe",tag:"mo",output:"⊇",tex:"supseteq",ttype:Q},{input:"-=",tag:"mo",output:"≡",tex:"equiv",ttype:Q},{input:"~=",tag:"mo",output:"≅",tex:"stackrel{\\sim}{=}",notexcopy:!0,ttype:Q},{input:"cong",tag:"mo",output:"~=",tex:null,ttype:se},{input:"~~",tag:"mo",output:"≈",tex:"approx",ttype:Q},{input:"prop",tag:"mo",output:"∝",tex:"propto",ttype:Q},{input:"and",tag:"mtext",output:"and",tex:null,ttype:ie},{input:"or",tag:"mtext",output:"or",tex:null,ttype:ie},{input:"not",tag:"mo",output:"¬",tex:"neg",ttype:Q},{input:"=>",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:Q},{input:"implies",tag:"mo",output:"=>",tex:null,ttype:se},{input:"if",tag:"mo",output:"if",tex:null,ttype:ie},{input:"<=>",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:Q},{input:"iff",tag:"mo",output:"<=>",tex:null,ttype:se},{input:"AA",tag:"mo",output:"∀",tex:"forall",ttype:Q},{input:"EE",tag:"mo",output:"∃",tex:"exists",ttype:Q},{input:"_|_",tag:"mo",output:"⊥",tex:"bot",ttype:Q},{input:"TT",tag:"mo",output:"⊤",tex:"top",ttype:Q},{input:"|--",tag:"mo",output:"⊢",tex:"vdash",ttype:Q},{input:"|==",tag:"mo",output:"⊨",tex:"models",ttype:Q},{input:"(",tag:"mo",output:"(",tex:null,ttype:re,val:!0},{input:")",tag:"mo",output:")",tex:null,ttype:ae,val:!0},{input:"[",tag:"mo",output:"[",tex:null,ttype:re,val:!0},{input:"]",tag:"mo",output:"]",tex:null,ttype:ae,val:!0},{input:"left(",tag:"mo",output:"(",tex:"(",notexcopy:!0,ttype:re,val:!0},{input:"right)",tag:"mo",output:")",tex:")",notexcopy:!0,ttype:ae,val:!0},{input:"left[",tag:"mo",output:"[",tex:"[",notexcopy:!0,ttype:re,val:!0},{input:"right]",tag:"mo",output:"]",tex:"]",notexcopy:!0,ttype:ae,val:!0},{input:"{",tag:"mo",output:"{",tex:"lbrace",ttype:re},{input:"}",tag:"mo",output:"}",tex:"rbrace",ttype:ae},{input:"|",tag:"mo",output:"|",tex:null,ttype:le,val:!0},{input:"|:",tag:"mo",output:"|",tex:"|",ttype:re,notexcopy:!0,val:!0},{input:":|",tag:"mo",output:"|",tex:"|",ttype:ae,notexcopy:!0,val:!0},{input:":|:",tag:"mo",output:"|",tex:"|",ttype:Q,notexcopy:!0,val:!0},{input:"(:",tag:"mo",output:"〈",tex:"langle",ttype:re},{input:":)",tag:"mo",output:"〉",tex:"rangle",ttype:ae},{input:"<<",tag:"mo",output:"〈",tex:"langle",ttype:re},{input:">>",tag:"mo",output:"〉",tex:"rangle",ttype:ae},{input:"{:",tag:"mo",output:"{:",tex:null,ttype:re,invisible:!0},{input:":}",tag:"mo",output:":}",tex:null,ttype:ae,invisible:!0},{input:"int",tag:"mo",output:"∫",tex:null,ttype:Q},{input:"dx",tag:"mi",output:"{:d x:}",tex:null,ttype:se},{input:"dy",tag:"mi",output:"{:d y:}",tex:null,ttype:se},{input:"dz",tag:"mi",output:"{:d z:}",tex:null,ttype:se},{input:"dt",tag:"mi",output:"{:d t:}",tex:null,ttype:se},{input:"oint",tag:"mo",output:"∮",tex:null,ttype:Q},{input:"del",tag:"mo",output:"∂",tex:"partial",ttype:Q},{input:"grad",tag:"mo",output:"∇",tex:"nabla",ttype:Q},{input:"+-",tag:"mo",output:"±",tex:"pm",ttype:Q},{input:"O/",tag:"mo",output:"∅",tex:"emptyset",ttype:Q},{input:"oo",tag:"mo",output:"∞",tex:"infty",ttype:Q},{input:"aleph",tag:"mo",output:"ℵ",tex:null,ttype:Q},{input:"...",tag:"mo",output:"...",tex:"ldots",ttype:Q},{input:":.",tag:"mo",output:"∴",tex:"therefore",ttype:Q},{input:":'",tag:"mo",output:"∵",tex:"because",ttype:Q},{input:"/_",tag:"mo",output:"∠",tex:"angle",ttype:Q},{input:"/_\\",tag:"mo",output:"△",tex:"triangle",ttype:Q},{input:"\\ ",tag:"mo",output:" ",tex:null,ttype:Q,val:!0},{input:"frown",tag:"mo",output:"⌢",tex:null,ttype:Q},{input:"%",tag:"mo",output:"%",tex:"%",ttype:Q,notexcopy:!0},{input:"quad",tag:"mo",output:"  ",tex:null,ttype:Q},{input:"qquad",tag:"mo",output:"    ",tex:null,ttype:Q},{input:"cdots",tag:"mo",output:"⋯",tex:null,ttype:Q},{input:"vdots",tag:"mo",output:"⋮",tex:null,ttype:Q},{input:"ddots",tag:"mo",output:"⋱",tex:null,ttype:Q},{input:"diamond",tag:"mo",output:"⋄",tex:null,ttype:Q},{input:"square",tag:"mo",output:"□",tex:"boxempty",ttype:Q},{input:"|__",tag:"mo",output:"⌊",tex:"lfloor",ttype:Q},{input:"__|",tag:"mo",output:"⌋",tex:"rfloor",ttype:Q},{input:"|~",tag:"mo",output:"⌈",tex:"lceil",ttype:Q},{input:"lceiling",tag:"mo",output:"|~",tex:null,ttype:se},{input:"~|",tag:"mo",output:"⌉",tex:"rceil",ttype:Q},{input:"rceiling",tag:"mo",output:"~|",tex:null,ttype:se},{input:"CC",tag:"mo",output:"ℂ",tex:"mathbb{C}",ttype:Q,notexcopy:!0},{input:"NN",tag:"mo",output:"ℕ",tex:"mathbb{N}",ttype:Q,notexcopy:!0},{input:"QQ",tag:"mo",output:"ℚ",tex:"mathbb{Q}",ttype:Q,notexcopy:!0},{input:"RR",tag:"mo",output:"ℝ",tex:"mathbb{R}",ttype:Q,notexcopy:!0},{input:"ZZ",tag:"mo",output:"ℤ",tex:"mathbb{Z}",ttype:Q,notexcopy:!0},{input:"f",tag:"mi",output:"f",tex:null,ttype:ee,func:!0,val:!0},{input:"g",tag:"mi",output:"g",tex:null,ttype:ee,func:!0,val:!0},{input:"''",tag:"mo",output:"''",tex:null,val:!0},{input:"'''",tag:"mo",output:"'''",tex:null,val:!0},{input:"''''",tag:"mo",output:"''''",tex:null,val:!0},{input:"lim",tag:"mo",output:"lim",tex:null,ttype:oe},{input:"Lim",tag:"mo",output:"Lim",tex:null,ttype:oe},{input:"sin",tag:"mo",output:"sin",tex:null,ttype:ee,func:!0},{input:"cos",tag:"mo",output:"cos",tex:null,ttype:ee,func:!0},{input:"tan",tag:"mo",output:"tan",tex:null,ttype:ee,func:!0},{input:"arcsin",tag:"mo",output:"arcsin",tex:null,ttype:ee,func:!0},{input:"arccos",tag:"mo",output:"arccos",tex:null,ttype:ee,func:!0},{input:"arctan",tag:"mo",output:"arctan",tex:null,ttype:ee,func:!0},{input:"sinh",tag:"mo",output:"sinh",tex:null,ttype:ee,func:!0},{input:"cosh",tag:"mo",output:"cosh",tex:null,ttype:ee,func:!0},{input:"tanh",tag:"mo",output:"tanh",tex:null,ttype:ee,func:!0},{input:"cot",tag:"mo",output:"cot",tex:null,ttype:ee,func:!0},{input:"coth",tag:"mo",output:"coth",tex:null,ttype:ee,func:!0},{input:"sech",tag:"mo",output:"sech",tex:null,ttype:ee,func:!0},{input:"csch",tag:"mo",output:"csch",tex:null,ttype:ee,func:!0},{input:"sec",tag:"mo",output:"sec",tex:null,ttype:ee,func:!0},{input:"csc",tag:"mo",output:"csc",tex:null,ttype:ee,func:!0},{input:"log",tag:"mo",output:"log",tex:null,ttype:ee,func:!0},{input:"ln",tag:"mo",output:"ln",tex:null,ttype:ee,func:!0},{input:"abs",tag:"mo",output:"abs",tex:null,ttype:ee,notexcopy:!0,rewriteleftright:["|","|"]},{input:"norm",tag:"mo",output:"norm",tex:null,ttype:ee,notexcopy:!0,rewriteleftright:["\\|","\\|"]},{input:"floor",tag:"mo",output:"floor",tex:null,ttype:ee,notexcopy:!0,rewriteleftright:["\\lfloor","\\rfloor"]},{input:"ceil",tag:"mo",output:"ceil",tex:null,ttype:ee,notexcopy:!0,rewriteleftright:["\\lceil","\\rceil"]},{input:"Sin",tag:"mo",output:"Sin",tex:null,ttype:ee,func:!0},{input:"Cos",tag:"mo",output:"Cos",tex:null,ttype:ee,func:!0},{input:"Tan",tag:"mo",output:"Tan",tex:null,ttype:ee,func:!0},{input:"Arcsin",tag:"mo",output:"Arcsin",tex:null,ttype:ee,func:!0},{input:"Arccos",tag:"mo",output:"Arccos",tex:null,ttype:ee,func:!0},{input:"Arctan",tag:"mo",output:"Arctan",tex:null,ttype:ee,func:!0},{input:"Sinh",tag:"mo",output:"Sinh",tex:null,ttype:ee,func:!0},{input:"Cosh",tag:"mo",output:"Cosh",tex:null,ttype:ee,func:!0},{input:"Tanh",tag:"mo",output:"Tanh",tex:null,ttype:ee,func:!0},{input:"Cot",tag:"mo",output:"Cot",tex:null,ttype:ee,func:!0},{input:"Sec",tag:"mo",output:"Sec",tex:null,ttype:ee,func:!0},{input:"Csc",tag:"mo",output:"Csc",tex:null,ttype:ee,func:!0},{input:"Log",tag:"mo",output:"Log",tex:null,ttype:ee,func:!0},{input:"Ln",tag:"mo",output:"Ln",tex:null,ttype:ee,func:!0},{input:"Abs",tag:"mo",output:"abs",tex:null,ttype:ee,notexcopy:!0,rewriteleftright:["|","|"]},{input:"det",tag:"mo",output:"det",tex:null,ttype:ee,func:!0},{input:"exp",tag:"mo",output:"exp",tex:null,ttype:ee,func:!0},{input:"dim",tag:"mo",output:"dim",tex:null,ttype:Q},{input:"mod",tag:"mo",output:"mod",tex:"text{mod}",ttype:Q,notexcopy:!0},{input:"gcd",tag:"mo",output:"gcd",tex:null,ttype:ee,func:!0},{input:"lcm",tag:"mo",output:"lcm",tex:"text{lcm}",ttype:ee,func:!0,notexcopy:!0},{input:"lub",tag:"mo",output:"lub",tex:null,ttype:Q},{input:"glb",tag:"mo",output:"glb",tex:null,ttype:Q},{input:"min",tag:"mo",output:"min",tex:null,ttype:oe},{input:"max",tag:"mo",output:"max",tex:null,ttype:oe},{input:"uarr",tag:"mo",output:"↑",tex:"uparrow",ttype:Q},{input:"darr",tag:"mo",output:"↓",tex:"downarrow",ttype:Q},{input:"rarr",tag:"mo",output:"→",tex:"rightarrow",ttype:Q},{input:"->",tag:"mo",output:"→",tex:"to",ttype:Q},{input:">->",tag:"mo",output:"↣",tex:"rightarrowtail",ttype:Q},{input:"->>",tag:"mo",output:"↠",tex:"twoheadrightarrow",ttype:Q},{input:">->>",tag:"mo",output:"⤖",tex:"twoheadrightarrowtail",ttype:Q},{input:"|->",tag:"mo",output:"↦",tex:"mapsto",ttype:Q},{input:"larr",tag:"mo",output:"←",tex:"leftarrow",ttype:Q},{input:"harr",tag:"mo",output:"↔",tex:"leftrightarrow",ttype:Q},{input:"rArr",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:Q},{input:"lArr",tag:"mo",output:"⇐",tex:"Leftarrow",ttype:Q},{input:"hArr",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:Q},{input:"sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:ee},{input:"root",tag:"mroot",output:"root",tex:null,ttype:te},{input:"frac",tag:"mfrac",output:"/",tex:null,ttype:te},{input:"/",tag:"mfrac",output:"/",tex:null,ttype:ne},{input:"stackrel",tag:"mover",output:"stackrel",tex:null,ttype:te},{input:"_",tag:"msub",output:"_",tex:null,ttype:ne},{input:"^",tag:"msup",output:"^",tex:null,ttype:ne},{input:"cancel",tag:"menclose",output:"cancel",tex:null,ttype:ee},{input:"Sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:ee},{input:"hat",tag:"mover",output:"^",tex:null,ttype:ee,acc:!0},{input:"bar",tag:"mover",output:"¯",tex:"overline",ttype:ee,acc:!0},{input:"vec",tag:"mover",output:"→",tex:null,ttype:ee,acc:!0},{input:"tilde",tag:"mover",output:"~",tex:null,ttype:ee,acc:!0},{input:"dot",tag:"mover",output:".",tex:null,ttype:ee,acc:!0},{input:"ddot",tag:"mover",output:"..",tex:null,ttype:ee,acc:!0},{input:"overarc",tag:"mover",output:"⏜",tex:"stackrel{\\frown}",notexcopy:!0,ttype:ee,acc:!0},{input:"overparen",tag:"mover",output:"⏜",tex:"stackrel{\\frown}",notexcopy:!0,ttype:ee,acc:!0},{input:"ul",tag:"munder",output:"̲",tex:"underline",ttype:ee,acc:!0},{input:"ubrace",tag:"munder",output:"⏟",tex:"underbrace",ttype:ee,acc:!0},{input:"obrace",tag:"mover",output:"⏞",tex:"overbrace",ttype:ee,acc:!0},{input:"text",tag:"mtext",output:"text",tex:null,ttype:ue},{input:"mbox",tag:"mtext",output:"mbox",tex:null,ttype:ue},ce,{input:"color",tag:"mstyle",ttype:te},{input:"bb",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"bb",tex:"mathbf",ttype:ee,notexcopy:!0},{input:"mathbf",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"mathbf",tex:null,ttype:ee},{input:"sf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"sf",tex:"mathsf",ttype:ee,notexcopy:!0},{input:"mathsf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"mathsf",tex:null,ttype:ee},{input:"bbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"bbb",tex:"mathbb",ttype:ee,notexcopy:!0},{input:"mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"mathbb",tex:null,ttype:ee},{input:"cc",tag:"mstyle",atname:"mathvariant",atval:"script",output:"cc",tex:"mathcal",ttype:ee,notexcopy:!0},{input:"mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",output:"mathcal",tex:null,ttype:ee},{input:"tt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"tt",tex:"mathtt",ttype:ee,notexcopy:!0},{input:"mathtt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"mathtt",tex:null,ttype:ee},{input:"fr",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"fr",tex:"mathfrak",ttype:ee,notexcopy:!0},{input:"mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"mathfrak",tex:null,ttype:ee}];function he(e,t){return e.input>t.input?1:-1}var fe,pe,ge,me=[];function _e(e,t){var n;n="\\"==e.charAt(t)&&"\\"!=e.charAt(t+1)&&" "!=e.charAt(t+1)?e.slice(t+1):e.slice(t);for(var r=0;n.length>r&&32>=n.charCodeAt(r);r+=1);return n.slice(r)}function we(e,t,n){if(0==n){var r,a;for(n=-1,r=e.length;r>n+1;)t>e[a=n+r>>1]?n=a:r=a;return r}for(var i=n;e.length>i&&t>e[i];i++);return i}function be(e){for(var t,n,r,a=0,i="",o=!0,s=1;e.length>=s&&o;s++)n=e.slice(0,s),a=we(me,n,a),me.length>a&&e.slice(0,me[a].length)==me[a]&&(t=a,s=(i=me[a]).length),o=me.length>a&&e.slice(0,me[a].length)>=me[a];if(pe=ge,""!=i)return ge=de[t].ttype,de[t];ge=Q,a=1,n=e.slice(0,1);for(var l=!0;n>="0"&&"9">=n&&e.length>=a;)n=e.slice(a,a+1),a++;if(n==X.decimalsign&&(n=e.slice(a,a+1))>="0"&&"9">=n)for(l=!1,a++;n>="0"&&"9">=n&&e.length>=a;)n=e.slice(a,a+1),a++;return l&&a>1||a>2?(n=e.slice(0,a-1),r="mn"):(a=2,r=("A">(n=e.slice(0,1))||n>"Z")&&("a">n||n>"z")?"mo":"mi"),"-"==n&&pe==ne?(ge=ne,{input:n,tag:r,output:n,ttype:ee,func:!0,val:!0}):{input:n,tag:r,output:n,ttype:Q,val:!0}}function ve(e){var t;if("{"==e.charAt(0)&&"}"==e.charAt(e.length-1)){var n=0;"\\left"==(t=e.substr(1,5))?"("==(t=e.charAt(6))||"["==t||"{"==t?n=7:"\\lbrace"==(t=e.substr(6,7))&&(n=13):"("!=(t=e.charAt(1))&&"["!=t||(n=2),n>0&&("\\right)}"==(t=e.substr(e.length-8))||"\\right]}"==t||"\\right.}"==t?e=(e="{"+e.substr(n)).substr(0,e.length-8)+"}":"\\rbrace}"==t&&(e=(e="{"+e.substr(n)).substr(0,e.length-14)+"}"))}return e}function ye(e){var t;return t="boolean"==typeof e.val&&e.val?"":"\\",null==e.tex?t+e.input:t+e.tex}function ke(e){var t,n,r,a,i="";if(null==(t=be(e=_e(e,0)))||t.ttype==ae&&fe>0)return[null,e];switch(t.ttype==se&&(t=be(e=t.output+_e(e,t.input.length))),t.ttype){case oe:case Q:e=_e(e,t.input.length);var o=ye(t);return"\\"==o.charAt(0)||"mo"==t.tag?[o,e]:["{"+o+"}",e];case re:fe++,r=Ee(e=_e(e,t.input.length),!0),fe--;var s=0;return"\\right"==r[0].substr(0,6)&&(")"==(u=r[0].charAt(6))||"]"==u||"}"==u?s=6:"."==u?s=7:"\\rbrace"==(u=r[0].substr(6,7))&&(s=13)),s>0?(r[0]=r[0].substr(s),n="boolean"==typeof t.invisible&&t.invisible?"{"+r[0]+"}":"{"+ye(t)+r[0]+"}"):n="boolean"==typeof t.invisible&&t.invisible?"{\\left."+r[0]+"}":"{\\left"+ye(t)+r[0]+"}",[n,r[1]];case ue:return t!=ce&&(e=_e(e,t.input.length)),-1==(a="{"==e.charAt(0)?e.indexOf("}"):"("==e.charAt(0)?e.indexOf(")"):"["==e.charAt(0)?e.indexOf("]"):t==ce?e.slice(1).indexOf('"')+1:0)&&(a=e.length)," "==(u=e.slice(1,a)).charAt(0)&&(i="\\ "),i+="\\text{"+u+"}"," "==u.charAt(u.length-1)&&(i+="\\ "),[i,e=_e(e,a+1)];case ee:return null==(r=ke(e=_e(e,t.input.length)))[0]?["{"+ye(t)+"}",e]:"boolean"==typeof t.func&&t.func?"^"==(u=e.charAt(0))||"_"==u||"/"==u||"|"==u||","==u||1==t.input.length&&t.input.match(/\w/)&&"("!=u?["{"+ye(t)+"}",e]:[n="{"+ye(t)+"{"+r[0]+"}}",r[1]]:(r[0]=ve(r[0]),"sqrt"==t.input?["\\sqrt{"+r[0]+"}",r[1]]:"cancel"==t.input?["\\cancel{"+r[0]+"}",r[1]]:void 0!==t.rewriteleftright?["{\\left"+t.rewriteleftright[0]+r[0]+"\\right"+t.rewriteleftright[1]+"}",r[1]]:"boolean"==typeof t.acc&&t.acc?[ye(t)+"{"+r[0]+"}",r[1]]:["{"+ye(t)+"{"+r[0]+"}}",r[1]]);case te:if(null==(r=ke(e=_e(e,t.input.length)))[0])return["{"+ye(t)+"}",e];r[0]=ve(r[0]);var l=ke(r[1]);return null==l[0]?["{"+ye(t)+"}",e]:(l[0]=ve(l[0]),[i="color"==t.input?"{\\color{"+r[0].replace(/[\{\}]/g,"")+"}"+l[0]+"}":"root"==t.input?"{\\sqrt["+r[0]+"]{"+l[0]+"}}":"{"+ye(t)+"{"+r[0]+"}{"+l[0]+"}}",l[1]]);case ne:return e=_e(e,t.input.length),[t.output,e];case ie:return e=_e(e,t.input.length),["{\\quad\\text{"+t.input+"}\\quad}",e];case le:fe++,r=Ee(e=_e(e,t.input.length),!1),fe--;var u="";return"|"==(u=r[0].charAt(r[0].length-1))&&","!==e.charAt(0)?[n="{\\left|"+r[0]+"}",r[1]]:[n="{\\mid}",e];default:return e=_e(e,t.input.length),["{"+ye(t)+"}",e]}}function xe(e){var t,n,r,a,i;if(n=be(e=_e(e,0)),a=(i=ke(e))[0],(t=be(e=i[1])).ttype==ne&&"/"!=t.input){if((i=ke(e=_e(e,t.input.length)))[0]=null==i[0]?"{}":ve(i[0]),e=i[1],"_"==t.input)if("^"==(r=be(e)).input){var o=ke(e=_e(e,r.input.length));o[0]=ve(o[0]),e=o[1],a="{"+a,a+="_{"+i[0]+"}",a+="^{"+o[0]+"}",a+="}"}else a+="_{"+i[0]+"}";else a=a+"^{"+i[0]+"}";void 0!==n.func&&n.func&&((r=be(e)).ttype==ne||r.ttype==ae||1>=n.input.length&&r.ttype!=re||(a="{"+a+(i=xe(e))[0]+"}",e=i[1]))}return[a,e]}function Ee(e,t){var n,r,a,i,o="",s=!1;do{r=(a=xe(e=_e(e,0)))[0],(n=be(e=a[1])).ttype==ne&&"/"==n.input?((a=xe(e=_e(e,n.input.length)))[0]=null==a[0]?"{}":ve(a[0]),e=a[1],r="\\frac{"+(r=ve(r))+"}",o+=r+="{"+a[0]+"}",n=be(e)):null!=r&&(o+=r)}while((n.ttype!=ae&&(n.ttype!=le||t)||0==fe)&&null!=n&&""!=n.output);if(n.ttype==ae||n.ttype==le){var l=o.length;if(l>2&&"{"==o.charAt(0)&&o.indexOf(",")>0){var u=o.charAt(l-2);if(")"==u||"]"==u){var c=o.charAt(6);if("("==c&&")"==u&&"}"!=n.output||"["==c&&"]"==u){var d="",h=[];h.push(0);var f=!0,p=0,g=[];g[0]=[0];var m=0,_=0,w="";for(i=1;l-1>i;i++)o.charAt(i)==c&&p++,o.charAt(i)==u&&0==--p&&","==o.charAt(i+2)&&"{"==o.charAt(i+3)&&(h.push(i+2),g[m=i+2]=[i+2]),"["!=o.charAt(i)&&"("!=o.charAt(i)&&"{"!=o.charAt(i)||_++,"]"!=o.charAt(i)&&")"!=o.charAt(i)&&"}"!=o.charAt(i)||_--,","==o.charAt(i)&&1==_&&g[m].push(i),0>_&&(m==i+1?i++:f=!1);h.push(l);var b=-1;if(0==p&&h.length>0&&f)for(i=0;h.length-1>i;i++){if(i>0&&(d+="\\\\"),0==i)if(1==g[h[i]].length)var v=[o.substr(h[i]+7,h[i+1]-h[i]-15)];else{v=[o.substring(h[i]+7,g[h[i]][1])];for(var y=2;g[h[i]].length>y;y++)v.push(o.substring(g[h[i]][y-1]+1,g[h[i]][y]));v.push(o.substring(g[h[i]][g[h[i]].length-1]+1,h[i+1]-8))}else if(1==g[h[i]].length)v=[o.substr(h[i]+8,h[i+1]-h[i]-16)];else{for(v=[o.substring(h[i]+8,g[h[i]][1])],y=2;g[h[i]].length>y;y++)v.push(o.substring(g[h[i]][y-1]+1,g[h[i]][y]));v.push(o.substring(g[h[i]][g[h[i]].length-1]+1,h[i+1]-8))}for(y=v.length-1;y>=0;y--)"{\\mid}"==v[y]?(0==i&&(w="|"+w),v.splice(y,1)):0==i&&(w="c"+w);b>0&&v.length!=b?f=!1:-1==b&&(b=v.length),d+=v.join("&")}d="\\begin{array}{"+w+"} "+d+"\\end{array}",f&&(o=d)}}}e=_e(e,n.input.length),"boolean"==typeof n.invisible&&n.invisible?(o+="\\right.",s=!0):(o+=r="\\right"+ye(n),s=!0)}return fe>0&&!s&&(o+="\\right."),[o,e]}function Se(e){return fe=0,null==(e=(e=(e=e.replace(/( |\u00a0| )/g,"")).replace(/>/g,">")).replace(/</g,"<")).match(/\S/)?"":Ee(e.replace(/^\s+/g,""),!1)[0]}if(function(){var e,t=de.length;for(e=0;t>e;e++)!de[e].tex||"boolean"==typeof de[e].notexcopy&&de[e].notexcopy||de.push({input:de[e].tex,tag:de[e].tag,output:de[e].output,ttype:de[e].ttype,acc:de[e].acc||!1});!function(){var e;for(de.sort(he),e=0;de.length>e;e++)me[e]=de[e].input}()}(),"undefined"==typeof window)throw Error("The showdown katex extension can only be used in browser environment!");if(void 0===je)var je=window.katex||void 0;if("undefined"==typeof renderMathInElement)var Ae=window.renderMathInElement||void 0;var Le=0;function Pe(){return!(void 0===Ae||!Ae||void 0===je||!je)}var Ce=!1,ze="katexCSS";function Me(e){var t=Pe();return"undefined"==typeof window||t||Ce?("function"==typeof e&&e&&e(Ae),t):(Ce=!0,y.loadStyleSheet(ze),y.loadScript("katex").then((function(e){return je=k.interopDefault(window[e]),y.loadScript("renderMathInElement")})).then((function(t){Ae=k.interopDefault(window[t]),"function"==typeof e&&e&&e(Ae)})),t)}function Oe(e,t){if(Pe()){var n=t.className,r=t.input,a=t.data,i=t.cssLink,o=t.options,s=t.element.ownerDocument,l="";if(a instanceof Array)a.forEach((function(e){if(""===e)l+="
";else{var t=je.renderToString(e,o);l+=i?'
').concat(t,"
"):'
').concat(t,"
")}}));else{var u=je.renderToString(a,o);l=i?'
').concat(u,"
"):'
').concat(u,"
")}t.element.parentNode.outerHTML=l,--Le||Ae(s.body,o),e(!0)}else setTimeout((function(){Oe(e,t)}),50)}function Te(e,t,n){return new Promise((function(r){var a,i=k.createElementMeta("katex",e,(function(e){var t;a=e;var r=e.split(/\n[ \f\r\t\v]*\n/);return r.length>1?(t=[],r.forEach((function(e){""!==(e=e.trim())&&(e=n?Se(e):e),t.push(e)}))):t=n?Se(a):a,t}));if(!i)return r(!1);i.cssLink=y.getSrc(ze),i.input=a,i.options=t,Oe(r,i)}))}function Re(e){return e.replace(/[-[\]/{}()*+?.\\$^|]/g,"\\$&")}var De=function(){var e=r({displayMode:!0,throwOnError:!1,errorColor:"#ff0000",delimiters:null},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});function t(e,t){return!(!e||"object"!==i(e)||!e.hasOwnProperty(t))}function n(e,n,r){return!!(t(e,n)&&t(e[n],r)&&(a=e[n][r],Array.isArray(a)&&a.length))&&(e[n][r].forEach((function(e){e.display="inline"!==r,"asciimath"===n&&(e.asciimath=!0)})),e[n][r]);var a}return Array.isArray(e.delimiters)?e.delimiters.length||(e.delimiters=[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"@@",right:"@@",display:!0,asciimath:!0},{left:"@ ",right:" @",display:!1,asciimath:!0},{left:"\\~",right:"\\~",display:!1,asciimath:!0}]):e.delimiters=[].concat(n(e.delimiters,"texmath","display")||[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0}]).concat(n(e.delimiters,"texmath","inline")||[{left:"\\(",right:"\\)",display:!1}]).concat(n(e.delimiters,"asciimath","display")||[{left:"@@",right:"@@",display:!0,asciimath:!0}]).concat(n(e.delimiters,"asciimath","inline")||[{left:"@ ",right:" @",display:!1,asciimath:!0},{left:"\\~",right:"\\~",display:!1,asciimath:!0}]),e};function Ne(e){var t=0,n=De(e),r=n.delimiters.map((function(e){var n=e.right,r=e.display,a=e.asciimath;return{test:RegExp("".concat(Re(e.left),"(.+?)").concat(Re(n)),"g"),replacer:function(e,n){return++t,a&&(n=Se(n)),r?"\\[".concat(n,"\\]"):"\\(".concat(n,"\\)")}}}));return[{type:"output",config:n,filter:function(e){var i=e.wrapper;if(!i)return!1;r.length&&i.querySelectorAll(":not(code):not(pre)").forEach((function(e){a(e.childNodes).filter((function(e){return"#text"===e.nodeName&&e.nodeValue.trim()})).forEach((function(e){var t=r.reduce((function(e,t){return e.replace(t.test,t.replacer)}),e.nodeValue);e.nodeValue=t}))}));var o=i.querySelectorAll("code.latex.language-latex"),s=i.querySelectorAll("code.asciimath.language-asciimath");if(!o.length&&!s.length){if(t>0){var l=function e(t,n){Pe()?(n(i.ownerDocument.body,u.config),t(!0)):setTimeout((function(){e(t,n)}),50)};this.config.cssLink=y.getSrc(ze);var u=this;return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render inline katex elements.")),new Promise((function(e){Me((function(t){l(e,t)}))})).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render inline katex elements.")),e}))}return!1}return n.cssLink=y.getSrc(ze),console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render katex elements.")),function(e,t,n){return Le=e.length+t.length,Me(),new Promise((function(r){var a=[];e.forEach((function(e){a.push(Te(e,n,!1))})),t.forEach((function(e){a.push(Te(e,n,!0))})),Promise.all(a).then((function(){r(!0)}))}))}(o,s,this.config).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render katex elements.")),e}))}}]}var Be="echarts";if("undefined"==typeof window)throw Error("The showdown ".concat(Be," extension can only be used in browser environment!"));if(void 0===Ie)var Ie=window.echarts||void 0;function He(){return!!Ie}var Fe=!1;function qe(e,t){if(He()){var n=t.className;return t.element.parentNode.outerHTML='
'),e(!0)}setTimeout((function(){qe(e,t)}),20)}function Ue(e,t,n){var a=k.createElementMeta(Be,e);if(!a)return Promise.resolve(!1);n=JSON.stringify(r(r({},n),{},{ssr:!1}));var i=JSON.stringify(JSON.parse(a.data)),o={id:a.id,code:"(function() {\n let el = document.getElementById('".concat(a.id,"');\n if (el){\n let config = JSON.parse('").concat(n,"');\n let chart = echarts.init(el, null, config);\n let option = JSON.parse('").concat(i,"');\n chart.setOption(option);\n }\n })();")};return t.push(o),new Promise((function(e){qe(e,a)}))}function Ze(e,t,n){var r;return r=He(),"undefined"!=typeof window&&(r||Fe||(Fe=!0,y.loadScript(Be).then((function(e){Ie=k.interopDefault(window[e])})))),new Promise((function(r){var a=[];e.forEach((function(e){a.push(Ue(e,t,n))})),Promise.all(a).then((function(){r(!0)}))}))}function $e(e){var t=function(){return r({renderer:"svg",ssr:!1,width:400,height:300,tooltip:{show:!0},animation:!0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.".concat(Be,".language-").concat(Be));if(!n.length)return!1;var r=e.scripts;return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render ").concat(Be," elements.")),Ze(n,r,this.config).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render ").concat(Be," elements.")),e}))}}]}var We="mermaid";if("undefined"==typeof window)throw Error("The showdown mermaid extension can only be used in browser environment!");if(void 0===Ve)var Ve=window.mermaid||void 0;function Ye(){return!(void 0===Ve||!Ve)}var Ge=!1;function Je(e,t){if(Ye()){var n=t.className,r=t.element.parentNode;Ve.render(t.id,t.data).then((function(t){r.outerHTML='
').concat(t.svg,"
"),e(!0)}))}else setTimeout((function(){Je(e,t)}),10)}function Ke(e){return new Promise((function(t){var n=k.createElementMeta(We,e);if(!n)return t(!1);Je(t,n)}))}function Xe(e,t){return function(e){var t=Ye();"undefined"==typeof window||t||Ge?Ve.initialize(e):(Ge=!0,y.loadScript(We).then((function(t){(Ve=k.interopDefault(window[t])).initialize(e)})))}(t),new Promise((function(t){var n=[];e.forEach((function(e){n.push(Ke(e))})),Promise.all(n).then((function(){t(!0)}))}))}function Qe(e){var t=function(){return r({theme:"forest",logLevel:4,startOnLoad:!1,arrowMarkerAbsolute:!1,flowchart:{curve:"basis"},gantt:{axisFormat:"%m/%d/%Y"},sequence:{actorMargin:50}},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.mermaid.language-mermaid");return!!n.length&&(console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render mermaid elements.")),Xe(n,this.config).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render mermaid elements.")),e})))}}]}var et="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},tt=[],nt=[],rt="undefined"!=typeof Uint8Array?Uint8Array:Array,at=!1;function it(){at=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;64>t;++t)tt[t]=e[t],nt[e.charCodeAt(t)]=t;nt[45]=62,nt[95]=63}function ot(e,t,n){for(var r,a=[],i=t;n>i;i+=3)a.push(tt[(r=(e[i]<<16)+(e[i+1]<<8)+e[i+2])>>18&63]+tt[r>>12&63]+tt[r>>6&63]+tt[63&r]);return a.join("")}function st(e){var t;at||it();for(var n=e.length,r=n%3,a="",i=[],o=16383,s=0,l=n-r;l>s;s+=o)i.push(ot(e,s,s+o>l?l:s+o));return 1===r?(a+=tt[(t=e[n-1])>>2],a+=tt[t<<4&63],a+="=="):2===r&&(a+=tt[(t=(e[n-2]<<8)+e[n-1])>>10],a+=tt[t>>4&63],a+=tt[t<<2&63],a+="="),i.push(a),i.join("")}function lt(e,t,n,r,a){var i,o,s=8*a-r-1,l=(1<>1,c=-7,d=n?a-1:0,h=n?-1:1,f=e[t+d];for(d+=h,i=f&(1<<-c)-1,f>>=-c,c+=s;c>0;i=256*i+e[t+d],d+=h,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=r;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===i)i=1-u;else{if(i===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),i-=u}return(f?-1:1)*o*Math.pow(2,i-r)}function ut(e,t,n,r,a,i){var o,s,l,u=8*i-a-1,c=(1<>1,h=23===a?5.960464477539062e-8:0,f=r?0:i-1,p=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,o=c):(1>t*(l=Math.pow(2,-(o=Math.floor(Math.log(t)/Math.LN2))))&&(o--,l*=2),2>(t+=1>o+d?h*Math.pow(2,1-d):h/l)*l||(o++,l/=2),c>o+d?1>o+d?(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0):(s=(t*l-1)*Math.pow(2,a),o+=d):(s=0,o=c));a>=8;e[n+f]=255&s,f+=p,s/=256,a-=8);for(o=o<0;e[n+f]=255&o,f+=p,o/=256,u-=8);e[n+f-p]|=128*g}var ct={}.toString,dt=Array.isArray||function(e){return"[object Array]"==ct.call(e)};function ht(){return pt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ft(e,t){if(ht()n||n>t.byteLength)throw new RangeError("'offset' is out of bounds");if(n+(r||0)>t.byteLength)throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);pt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=pt.prototype:e=wt(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!pt.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|yt(t,n);e=ft(e,r);var a=e.write(t,n);a!==r&&(e=e.slice(0,a));return e}(e,t,n):function(e,t){if(vt(t)){var n=0|bt(t.length);return 0===(e=ft(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?ft(e,0):wt(e,t);if("Buffer"===t.type&&dt(t.data))return wt(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function mt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(0>e)throw new RangeError('"size" argument must not be negative')}function _t(e,t){if(mt(t),e=ft(e,0>t?0:0|bt(t)),!pt.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;++n)e[n]=0;return e}function wt(e,t){var n=0>t.length?0:0|bt(t.length);e=ft(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function bt(e){if(e>=ht())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ht().toString(16)+" bytes");return 0|e}function vt(e){return!(null==e||!e._isBuffer)}function yt(e,t){if(vt(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Yt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Gt(e).length;default:if(r)return Yt(e).length;t=(""+t).toLowerCase(),r=!0}}function kt(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if((t>>>=0)>=(n>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Nt(this,t,n);case"utf8":case"utf-8":return Ot(this,t,n);case"ascii":return Rt(this,t,n);case"latin1":case"binary":return Dt(this,t,n);case"base64":return Mt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function xt(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Et(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),isNaN(n=+n)&&(n=a?0:e.length-1),0>n&&(n=e.length+n),e.length>n){if(0>n){if(!a)return-1;n=0}}else{if(a)return-1;n=e.length-1}if("string"==typeof t&&(t=pt.from(t,r)),vt(t))return 0===t.length?-1:St(e,t,n,r,a);if("number"==typeof t)return t&=255,pt.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):St(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function St(e,t,n,r,a){var i,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=(r+"").toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(2>e.length||2>t.length)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var c=-1;for(i=n;s>i;i++)if(u(e,i)===u(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===l)return c*o}else-1!==c&&(i-=i-c),c=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var d=!0,h=0;l>h;h++)if(u(e,i+h)!==u(t,h)){d=!1;break}if(d)return i}return-1}function jt(e,t,n,r){var a=e.length-(n=Number(n)||0);r?(r=Number(r))>a&&(r=a):r=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var o=0;r>o;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function At(e,t,n,r){return Jt(Yt(t,e.length-n),e,n,r)}function Lt(e,t,n,r){return Jt(function(e){for(var t=[],n=0;e.length>n;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function Pt(e,t,n,r){return Lt(e,t,n,r)}function Ct(e,t,n,r){return Jt(Gt(t),e,n,r)}function zt(e,t,n,r){return Jt(function(e,t){for(var n,r,a=[],i=0;e.length>i&&0<=(t-=2);++i)r=(n=e.charCodeAt(i))>>8,a.push(n%256),a.push(r);return a}(t,e.length-n),e,n,r)}function Mt(e,t,n){return st(0===t&&n===e.length?e:e.slice(t,n))}function Ot(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;n>a;){var i,o,s,l,u=e[a],c=null,d=u>239?4:u>223?3:u>191?2:1;if(n>=a+d)switch(d){case 1:128>u&&(c=u);break;case 2:128==(192&(i=e[a+1]))&&(l=(31&u)<<6|63&i)>127&&(c=l);break;case 3:o=e[a+2],128==(192&(i=e[a+1]))&&128==(192&o)&&(l=(15&u)<<12|(63&i)<<6|63&o)>2047&&(55296>l||l>57343)&&(c=l);break;case 4:o=e[a+2],s=e[a+3],128==(192&(i=e[a+1]))&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&1114112>l&&(c=l)}null===c?(c=65533,d=1):c>65535&&(r.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),r.push(c),a+=d}return function(e){var t=e.length;if(Tt>=t)return String.fromCharCode.apply(String,e);var n="",r=0;for(;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Tt));return n}(r)}pt.TYPED_ARRAY_SUPPORT=void 0===et.TYPED_ARRAY_SUPPORT||et.TYPED_ARRAY_SUPPORT,ht(),pt.poolSize=8192,pt._augment=function(e){return e.__proto__=pt.prototype,e},pt.from=function(e,t,n){return gt(null,e,t,n)},pt.TYPED_ARRAY_SUPPORT&&(pt.prototype.__proto__=Uint8Array.prototype,pt.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Symbol),pt.alloc=function(e,t,n){return function(e,t,n,r){return mt(t),t>0&&void 0!==n?"string"==typeof r?ft(e,t).fill(n,r):ft(e,t).fill(n):ft(e,t)}(null,e,t,n)},pt.allocUnsafe=function(e){return _t(null,e)},pt.allocUnsafeSlow=function(e){return _t(null,e)},pt.isBuffer=Kt,pt.compare=function(e,t){if(!vt(e)||!vt(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,a=0,i=Math.min(n,r);i>a;++a)if(e[a]!==t[a]){n=e[a],r=t[a];break}return r>n?-1:n>r?1:0},pt.isEncoding=function(e){switch((e+"").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}},pt.concat=function(e,t){if(!dt(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return pt.alloc(0);var n;if(void 0===t)for(t=0,n=0;e.length>n;++n)t+=e[n].length;var r=pt.allocUnsafe(t),a=0;for(n=0;e.length>n;++n){var i=e[n];if(!vt(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,a),a+=i.length}return r},pt.byteLength=yt,pt.prototype._isBuffer=!0,pt.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;e>t;t+=2)xt(this,t,t+1);return this},pt.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)xt(this,t,t+3),xt(this,t+1,t+2);return this},pt.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;e>t;t+=8)xt(this,t,t+7),xt(this,t+1,t+6),xt(this,t+2,t+5),xt(this,t+3,t+4);return this},pt.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Ot(this,0,e):kt.apply(this,arguments)},pt.prototype.equals=function(e){if(!vt(e))throw new TypeError("Argument must be a Buffer");return this===e||0===pt.compare(this,e)},pt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},pt.prototype.compare=function(e,t,n,r,a){if(!vt(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),0>t||n>e.length||0>r||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(i,o),l=this.slice(r,a),u=e.slice(t,n),c=0;s>c;++c)if(l[c]!==u[c]){i=l[c],o=u[c];break}return o>i?-1:i>o?1:0},pt.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},pt.prototype.indexOf=function(e,t,n){return Et(this,e,t,n,!0)},pt.prototype.lastIndexOf=function(e,t,n){return Et(this,e,t,n,!1)},pt.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return jt(this,e,t,n);case"utf8":case"utf-8":return At(this,e,t,n);case"ascii":return Lt(this,e,t,n);case"latin1":case"binary":return Pt(this,e,t,n);case"base64":return Ct(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},pt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Tt=4096;function Rt(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;n>a;++a)r+=String.fromCharCode(127&e[a]);return r}function Dt(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;n>a;++a)r+=String.fromCharCode(e[a]);return r}function Nt(e,t,n){var r=e.length;t&&t>=0||(t=0),(!n||0>n||n>r)&&(n=r);for(var a="",i=t;n>i;++i)a+=Vt(e[i]);return a}function Bt(e,t,n){for(var r=e.slice(t,n),a="",i=0;r.length>i;i+=2)a+=String.fromCharCode(r[i]+256*r[i+1]);return a}function It(e,t,n){if(e%1!=0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Ht(e,t,n,r,a,i){if(!vt(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||i>t)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Ft(e,t,n,r){0>t&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-n,2);i>a;++a)e[n+a]=(t&255<<8*(r?a:1-a))>>>8*(r?a:1-a)}function qt(e,t,n,r){0>t&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-n,4);i>a;++a)e[n+a]=t>>>8*(r?a:3-a)&255}function Ut(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function Zt(e,t,n,r,a){return a||Ut(e,0,n,4),ut(e,t,n,r,23,4),n+4}function $t(e,t,n,r,a){return a||Ut(e,0,n,8),ut(e,t,n,r,52,8),n+8}pt.prototype.slice=function(e,t){var n,r=this.length;if(0>(e=~~e)?0>(e+=r)&&(e=0):e>r&&(e=r),0>(t=void 0===t?r:~~t)?0>(t+=r)&&(t=0):t>r&&(t=r),e>t&&(t=e),pt.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=pt.prototype;else{var a=t-e;n=new pt(a,void 0);for(var i=0;a>i;++i)n[i]=this[i+e]}return n},pt.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||It(e,t,this.length);for(var r=this[e],a=1,i=0;++i0&&(a*=256);)r+=this[e+--t]*a;return r},pt.prototype.readUInt8=function(e,t){return t||It(e,1,this.length),this[e]},pt.prototype.readUInt16LE=function(e,t){return t||It(e,2,this.length),this[e]|this[e+1]<<8},pt.prototype.readUInt16BE=function(e,t){return t||It(e,2,this.length),this[e]<<8|this[e+1]},pt.prototype.readUInt32LE=function(e,t){return t||It(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},pt.prototype.readUInt32BE=function(e,t){return t||It(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},pt.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||It(e,t,this.length);for(var r=this[e],a=1,i=0;++ir||(r-=Math.pow(2,8*t)),r},pt.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||It(e,t,this.length);for(var r=t,a=1,i=this[e+--r];r>0&&(a*=256);)i+=this[e+--r]*a;return(a*=128)>i||(i-=Math.pow(2,8*t)),i},pt.prototype.readInt8=function(e,t){return t||It(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},pt.prototype.readInt16LE=function(e,t){t||It(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},pt.prototype.readInt16BE=function(e,t){t||It(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},pt.prototype.readInt32LE=function(e,t){return t||It(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},pt.prototype.readInt32BE=function(e,t){return t||It(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},pt.prototype.readFloatLE=function(e,t){return t||It(e,4,this.length),lt(this,e,!0,23,4)},pt.prototype.readFloatBE=function(e,t){return t||It(e,4,this.length),lt(this,e,!1,23,4)},pt.prototype.readDoubleLE=function(e,t){return t||It(e,8,this.length),lt(this,e,!0,52,8)},pt.prototype.readDoubleBE=function(e,t){return t||It(e,8,this.length),lt(this,e,!1,52,8)},pt.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Ht(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+a]=e/i&255;return t+n},pt.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,1,255,0),pt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},pt.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,2,65535,0),pt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ft(this,e,t,!0),t+2},pt.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,2,65535,0),pt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ft(this,e,t,!1),t+2},pt.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,4,4294967295,0),pt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):qt(this,e,t,!0),t+4},pt.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,4,4294967295,0),pt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):qt(this,e,t,!1),t+4},pt.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);Ht(this,e,t,n,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++ie&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},pt.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);Ht(this,e,t,n,a-1,-a)}var i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)0>e&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},pt.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,1,127,-128),pt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},pt.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,2,32767,-32768),pt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ft(this,e,t,!0),t+2},pt.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,2,32767,-32768),pt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ft(this,e,t,!1),t+2},pt.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,4,2147483647,-2147483648),pt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):qt(this,e,t,!0),t+4},pt.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Ht(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),pt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):qt(this,e,t,!1),t+4},pt.prototype.writeFloatLE=function(e,t,n){return Zt(this,e,t,!0,n)},pt.prototype.writeFloatBE=function(e,t,n){return Zt(this,e,t,!1,n)},pt.prototype.writeDoubleLE=function(e,t,n){return $t(this,e,t,!0,n)},pt.prototype.writeDoubleBE=function(e,t,n){return $t(this,e,t,!1,n)},pt.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),e.length>t||(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),r-n>e.length-t&&(r=e.length-t+n);var a,i=r-n;if(this===e&&t>n&&r>t)for(a=i-1;a>=0;--a)e[a+t]=this[a+n];else if(1e3>i||!pt.TYPED_ARRAY_SUPPORT)for(a=0;i>a;++a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},pt.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var a=e.charCodeAt(0);256>a&&(e=a)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!pt.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(0>t||t>this.length||n>this.length)throw new RangeError("Out of range index");if(t>=n)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;n>i;++i)this[i]=e;else{var o=vt(e)?e:Yt(""+new pt(e,r)),s=o.length;for(i=0;n-t>i;++i)this[i+t]=o[i%s]}return this};var Wt=/[^+\/0-9A-Za-z-_]/g;function Vt(e){return 16>e?"0"+e.toString(16):e.toString(16)}function Yt(e,t){var n;t=t||1/0;for(var r=e.length,a=null,i=[],o=0;r>o;++o){if((n=e.charCodeAt(o))>55295&&57344>n){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,128>n){if(0>(t-=1))break;i.push(n)}else if(2048>n){if(0>(t-=2))break;i.push(n>>6|192,63&n|128)}else if(65536>n){if(0>(t-=3))break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(n>=1114112)throw Error("Invalid code point");if(0>(t-=4))break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Gt(e){return function(e){var t,n,r,a,i,o;at||it();var s=e.length;if(s%4>0)throw Error("Invalid string. Length must be a multiple of 4");o=new rt(3*s/4-(i="="===e[s-2]?2:"="===e[s-1]?1:0)),r=i>0?s-4:s;var l=0;for(t=0,n=0;r>t;t+=4,n+=3)a=nt[e.charCodeAt(t)]<<18|nt[e.charCodeAt(t+1)]<<12|nt[e.charCodeAt(t+2)]<<6|nt[e.charCodeAt(t+3)],o[l++]=a>>16&255,o[l++]=a>>8&255,o[l++]=255&a;return 2===i?(a=nt[e.charCodeAt(t)]<<2|nt[e.charCodeAt(t+1)]>>4,o[l++]=255&a):1===i&&(a=nt[e.charCodeAt(t)]<<10|nt[e.charCodeAt(t+1)]<<4|nt[e.charCodeAt(t+2)]>>2,o[l++]=a>>8&255,o[l++]=255&a),o}(function(e){if(2>(e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Wt,"")).length)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Jt(e,t,n,r){for(var a=0;r>a&&(a+n1)for(var n=1;arguments.length>n;n++)t[n-1]=arguments[n];on.push(new hn(e,t)),1!==on.length||sn||rn(cn)}function hn(e,t){this.fun=e,this.array=t}hn.prototype.run=function(){this.fun.apply(null,this.array)};function fn(){}var pn=fn,gn=fn,mn=fn,_n=fn,wn=fn,bn=fn,vn=fn;var yn=et.performance||{},kn=yn.now||yn.mozNow||yn.msNow||yn.oNow||yn.webkitNow||function(){return(new Date).getTime()};var xn=new Date;var En={nextTick:dn,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:pn,addListener:gn,once:mn,off:_n,removeListener:wn,removeAllListeners:bn,emit:vn,binding:function(e){throw Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*kn.call(yn),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],0>(r-=e[1])&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-xn)/1e3}};function Sn(){}function jn(){jn.init.call(this)}function An(e){return void 0===e._maxListeners?jn.defaultMaxListeners:e._maxListeners}function Ln(e,t,n,r){var a,i,o,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),o=i[t]):(i=e._events=new Sn,e._eventsCount=0),o){if("function"==typeof o?o=i[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),!o.warned&&(a=An(e))&&a>0&&o.length>a){o.warned=!0;var l=Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,"function"==typeof console.warn?console.warn(s):console.log(s)}}else o=i[t]=n,++e._eventsCount;return e}function Pn(e,t,n){var r=!1;function a(){e.removeListener(t,a),r||(r=!0,n.apply(e,arguments))}return a.listener=n,a}function Cn(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function zn(e,t){for(var n=Array(t);t--;)n[t]=e[t];return n}Sn.prototype=Object.create(null),jn.EventEmitter=jn,jn.usingDomains=!1,jn.prototype.domain=void 0,jn.prototype._events=void 0,jn.prototype._maxListeners=void 0,jn.defaultMaxListeners=10,jn.init=function(){this.domain=null,jn.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Sn,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},jn.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},jn.prototype.getMaxListeners=function(){return An(this)},jn.prototype.emit=function(e){var t,n,r,a,i,o,s,l="error"===e;if(o=this._events)l=l&&null==o.error;else if(!l)return!1;if(s=this.domain,l){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=o[e]))return!1;var c="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,a=zn(e,r),i=0;r>i;++i)a[i].call(n)}(n,c,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var a=e.length,i=zn(e,a),o=0;a>o;++o)i[o].call(n,r)}(n,c,this,arguments[1]);break;case 3:!function(e,t,n,r,a){if(t)e.call(n,r,a);else for(var i=e.length,o=zn(e,i),s=0;i>s;++s)o[s].call(n,r,a)}(n,c,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,a,i){if(t)e.call(n,r,a,i);else for(var o=e.length,s=zn(e,o),l=0;o>l;++l)s[l].call(n,r,a,i)}(n,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=Array(r-1),i=1;r>i;i++)a[i-1]=arguments[i];!function(e,t,n,r){if(t)e.apply(n,r);else for(var a=e.length,i=zn(e,a),o=0;a>o;++o)i[o].apply(n,r)}(n,c,this,a)}return!0},jn.prototype.on=jn.prototype.addListener=function(e,t){return Ln(this,e,t,!1)},jn.prototype.prependListener=function(e,t){return Ln(this,e,t,!0)},jn.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Pn(this,e,t)),this},jn.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Pn(this,e,t)),this},jn.prototype.removeListener=function(e,t){var n,r,a,i,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new Sn:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,i=n.length;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){o=n[i].listener,a=i;break}if(0>a)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new Sn,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,a=e.length;a>r;n+=1,r+=1)e[n]=e[r];e.pop()}(n,a);r.removeListener&&this.emit("removeListener",e,o||t)}return this},jn.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new Sn,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new Sn:delete n[e]),this;if(0===arguments.length){for(var r,a=Object.keys(n),i=0;a.length>i;++i)"removeListener"!==(r=a[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Sn,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},jn.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=Array(e.length),n=0;t.length>n;++n)t[n]=e[n].listener||e[n];return t}(t):[]},jn.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Cn.call(e,t)},jn.prototype.listenerCount=Cn,jn.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Mn="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},On=/%[sdj%]/g;function Tn(e){if(!Wn(e)){for(var t=[],n=0;arguments.length>n;n++)t.push(Bn(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,a=r.length,i=(e+"").replace(On,(function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return r[n++]+"";case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),o=r[n];a>n;o=r[++n])$n(o)||!Gn(o)?i+=" "+o:i+=" "+Bn(o);return i}function Rn(e,t){if(Vn(et.process))return function(){return Rn(e,t).apply(this,arguments)};if(!0===En.noDeprecation)return e;var n=!1;return function(){if(!n){if(En.throwDeprecation)throw Error(t);En.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var Dn,Nn={};function Bn(e,t){var n={seen:[],stylize:Hn};return 3>arguments.length||(n.depth=arguments[2]),4>arguments.length||(n.colors=arguments[3]),Zn(t)?n.showHidden=t:t&&function(e,t){if(!t||!Gn(t))return e;var n=Object.keys(t),r=n.length;for(;r--;)e[n[r]]=t[n[r]]}(n,t),Vn(n.showHidden)&&(n.showHidden=!1),Vn(n.depth)&&(n.depth=2),Vn(n.colors)&&(n.colors=!1),Vn(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=In),Fn(n,e,n.depth)}function In(e,t){var n=Bn.styles[t];return n?"["+Bn.colors[n][0]+"m"+e+"["+Bn.colors[n][1]+"m":e}function Hn(e,t){return e}function Fn(e,t,n){if(e.customInspect&&t&&Xn(t.inspect)&&t.inspect!==Bn&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return Wn(r)||(r=Fn(e,r,n)),r}var a=function(e,t){if(Vn(t))return e.stylize("undefined","undefined");if(Wn(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(r=t,"number"==typeof r)return e.stylize(""+t,"number");var r;if(Zn(t))return e.stylize(""+t,"boolean");if($n(t))return e.stylize("null","null")}(e,t);if(a)return a;var i=Object.keys(t),o=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),Kn(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return qn(t);if(0===i.length){if(Xn(t))return e.stylize("[Function"+(t.name?": "+t.name:"")+"]","special");if(Yn(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Jn(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Kn(t))return qn(t)}var s,l="",u=!1,c=["{","}"];(Array.isArray(t)&&(u=!0,c=["[","]"]),Xn(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]");return Yn(t)&&(l=" "+RegExp.prototype.toString.call(t)),Jn(t)&&(l=" "+Date.prototype.toUTCString.call(t)),Kn(t)&&(l=" "+qn(t)),0!==i.length||u&&0!=t.length?0>n?Yn(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),s=u?function(e,t,n,r,a){for(var i=[],o=0,s=t.length;s>o;++o)er(t,o+"")?i.push(Un(e,t,n,r,o+"",!0)):i.push("");return a.forEach((function(a){a.match(/^\d+$/)||i.push(Un(e,t,n,r,a,!0))})),i}(e,t,n,o,i):i.map((function(r){return Un(e,t,n,o,r,u)})),e.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(s,l,c)):c[0]+l+c[1]}function qn(e){return"["+Error.prototype.toString.call(e)+"]"}function Un(e,t,n,r,a,i){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?s=e.stylize(l.set?"[Getter/Setter]":"[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),er(r,a)||(o="["+a+"]"),s||(0>e.seen.indexOf(l.value)?(s=$n(n)?Fn(e,l.value,null):Fn(e,l.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),Vn(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function Zn(e){return"boolean"==typeof e}function $n(e){return null===e}function Wn(e){return"string"==typeof e}function Vn(e){return void 0===e}function Yn(e){return Gn(e)&&"[object RegExp]"===Qn(e)}function Gn(e){return"object"==typeof e&&null!==e}function Jn(e){return Gn(e)&&"[object Date]"===Qn(e)}function Kn(e){return Gn(e)&&("[object Error]"===Qn(e)||e instanceof Error)}function Xn(e){return"function"==typeof e}function Qn(e){return Object.prototype.toString.call(e)}function er(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tr(){this.head=null,this.tail=null,this.length=0}Bn.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]},Bn.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},tr.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},tr.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},tr.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,e}},tr.prototype.clear=function(){this.head=this.tail=null,this.length=0},tr.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},tr.prototype.concat=function(e){if(0===this.length)return pt.alloc(0);if(1===this.length)return this.head.data;for(var t=pt.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var nr=pt.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function rr(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!nr(e))throw Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=ir;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=or;break;default:return void(this.write=ar)}this.charBuffer=new pt(6),this.charReceived=0,this.charLength=0}function ar(e){return e.toString(this.encoding)}function ir(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function or(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}rr.prototype.write=function(e){for(var t="";this.charLength;){var n=this.charLength-this.charReceived>e.length?e.length:this.charLength-this.charReceived;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charLength>this.charReceived)return"";if(e=e.slice(n,e.length),55296>(r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))||r>56319){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,a=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,a),a-=this.charReceived),(r=(t+=e.toString(this.encoding,0,a)).charCodeAt(a=t.length-1))>=55296&&56319>=r){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),t.substring(0,a)}return t},rr.prototype.detectIncompleteChar=function(e){for(var t=3>e.length?e.length:3;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(2>=t&&n>>4==14){this.charLength=3;break}if(3>=t&&n>>3==30){this.charLength=4;break}}this.charReceived=t},rr.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.encoding;t+=this.charBuffer.slice(0,this.charReceived).toString(n)}return t},ur.ReadableState=lr;var sr=function(e){if(Vn(Dn)&&(Dn=En.env.NODE_DEBUG||""),e=e.toUpperCase(),!Nn[e])if(RegExp("\\b"+e+"\\b","i").test(Dn)){Nn[e]=function(){var t=Tn.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else Nn[e]=function(){};return Nn[e]}("stream");function lr(e,t){this.objectMode=!!(e=e||{}).objectMode,t instanceof Nr&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark;this.highWaterMark=n||0===n?n:this.objectMode?16:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=new tr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new rr(e.encoding),this.encoding=e.encoding)}function ur(e){if(!(this instanceof ur))return new ur(e);this._readableState=new lr(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),jn.call(this)}function cr(e,t,n,r,a){var i=function(e,t){var n=null;Kt(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(i)e.emit("error",i);else if(null===n)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,fr(e)}(e,t);else if(t.objectMode||n&&n.length>0){if(t.ended&&!a)e.emit("error",Error("stream.push() after EOF"));else if(t.endEmitted&&a){e.emit("error",Error("stream.unshift() after end event"))}else{var o;!t.decoder||a||r||(n=t.decoder.write(n),o=!t.objectMode&&0===n.length),a||(t.reading=!1),o||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,a?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&fr(e))),function(e,t){t.readingMore||(t.readingMore=!0,dn(gr,e,t))}(e,t)}}else a||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.highWaterMark>e.length||0===e.length)}(t)}Mn(ur,jn),ur.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=pt.from(e,t),t=""),cr(this,n,e,t,!1)},ur.prototype.unshift=function(e){return cr(this,this._readableState,e,"",!0)},ur.prototype.isPaused=function(){return!1===this._readableState.flowing},ur.prototype.setEncoding=function(e){return this._readableState.decoder=new rr(e),this._readableState.encoding=e,this};var dr=8388608;function hr(e,t){return 0>=e||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return dr>e?(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++):e=dr,e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function fr(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(sr("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?dn(pr,e):pr(e))}function pr(e){sr("emit readable"),e.emit("readable"),wr(e)}function gr(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.highWaterMark>t.length&&(sr("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function mr(e){sr("readable nexttick read 0"),e.read(0)}function _r(e,t){t.reading||(sr("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),wr(e),t.flowing&&!t.reading&&e.read(0)}function wr(e){var t=e._readableState;for(sr("flow",t.flowing);t.flowing&&null!==e.read(););}function br(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():e&&t.length>e?n=function(e,t,n){var r;t.head.data.length>e?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,a=n.data;e-=a.length;for(;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(a+=o===i.length?i:i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.head=n.next?n.next:t.tail=null):(t.head=n,n.data=i.slice(o));break}++r}return t.length-=r,a}(e,t):function(e,t){var n=pt.allocUnsafe(e),r=t.head,a=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,o),0===(e-=o)){o===i.length?(++a,t.head=r.next?r.next:t.tail=null):(t.head=r,r.data=i.slice(o));break}++a}return t.length-=a,n}(e,t);return r}(e,t.buffer,t.decoder):(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()),n);var n}function vr(e){var t=e._readableState;if(t.length>0)throw Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,dn(yr,t,e))}function yr(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function kr(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function xr(){}function Er(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function Sr(e,t){Object.defineProperty(this,"buffer",{get:Rn((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),this.objectMode=!!(e=e||{}).objectMode,t instanceof Nr&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark;this.highWaterMark=n||0===n?n:this.objectMode?16:16384,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.decodeStrings=!(!1===e.decodeStrings),this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,a=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,a){--t.pendingcb,n?dn(a,r):a(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,a);else{var i=Cr(n);i||n.corked||n.bufferProcessing||!n.bufferedRequest||Pr(e,n),r?dn(Lr,e,n,i,a):Lr(e,n,i,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Or(this)}function jr(e){if(!(this instanceof jr||this instanceof Nr))return new jr(e);this._writableState=new Sr(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),jn.call(this)}function Ar(e,t,n,r,a,i,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(a,t.onwrite):e._write(a,i,t.onwrite),t.sync=!1}function Lr(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Mr(e,t)}function Pr(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=Array(t.bufferedRequestCount),a=t.corkedRequestsFree;a.entry=n;for(var i=0;n;)r[i]=n,n=n.next,i+=1;Ar(e,t,!0,t.length,r,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Or(t)}else{for(;n;){var o=n.chunk;if(Ar(e,t,!1,t.objectMode?1:o.length,o,n.encoding,n.callback),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function Cr(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function zr(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Mr(e,t){var n=Cr(t);return n&&(0===t.pendingcb?(zr(e,t),t.finished=!0,e.emit("finish")):zr(e,t)),n}function Or(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var a=r.callback;e.pendingcb--,a(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}ur.prototype.read=function(e){sr("read",e);var t=this._readableState,n=e=parseInt(e,10);if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return sr("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?vr(this):fr(this),null;if(0===(e=hr(e,t))&&t.ended)return 0===t.length&&vr(this),null;var r,a=t.needReadable;return sr("need readable",a),(0===t.length||t.highWaterMark>t.length-e)&&sr("length less than watermark",a=!0),t.ended||t.reading?sr("reading or ended",a=!1):a&&(sr("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=hr(n,t))),null===(r=e>0?br(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&vr(this)),null!==r&&this.emit("data",r),r},ur.prototype._read=function(e){this.emit("error",Error("not implemented"))},ur.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,sr("pipe count=%d opts=%j",r.pipesCount,t);var a=!t||!1!==t.end?o:u;function i(e){sr("onunpipe"),e===n&&u()}function o(){sr("onend"),e.end()}r.endEmitted?dn(a):n.once("end",a),e.on("unpipe",i);var s=function(e){return function(){var t=e._readableState;sr("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,wr(e))}}(n);e.on("drain",s);var l=!1;function u(){sr("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",h),e.removeListener("unpipe",i),n.removeListener("end",o),n.removeListener("end",u),n.removeListener("data",d),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var c=!1;function d(t){sr("ondata"),c=!1,!1!==e.write(t)||c||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==kr(r.pipes,e))&&!l&&(sr("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,c=!0),n.pause())}function h(t){sr("onerror",t),g(),e.removeListener("error",h),0===e.listeners("error").length&&e.emit("error",t)}function f(){e.removeListener("finish",p),g()}function p(){sr("onfinish"),e.removeListener("close",f),g()}function g(){sr("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",f),e.once("finish",p),e.emit("pipe",n),r.flowing||(sr("pipe resume"),n.resume()),e},ur.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;r>a;a++)n[a].emit("unpipe",this);return this}var i=kr(t.pipes,e);return-1===i||(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},ur.prototype.addListener=ur.prototype.on=function(e,t){var n=jn.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&fr(this):dn(mr,this))}return n},ur.prototype.resume=function(){var e=this._readableState;return e.flowing||(sr("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,dn(_r,e,t))}(this,e)),this},ur.prototype.pause=function(){return sr("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(sr("pause"),this._readableState.flowing=!1,this.emit("pause")),this},ur.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var a in e.on("end",(function(){if(sr("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(a){(sr("wrapped data"),t.decoder&&(a=t.decoder.write(a)),t.objectMode&&null==a)||(t.objectMode||a&&a.length)&&(r.push(a)||(n=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));return function(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){sr("wrapped _read",t),n&&(n=!1,e.resume())},r},ur._fromList=br,jr.WritableState=Sr,Mn(jr,jn),Sr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},jr.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))},jr.prototype.write=function(e,t,n){var r=this._writableState,a=!1;return"function"==typeof t&&(n=t,t=null),pt.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=xr),r.ended?function(e,t){var n=Error("write after end");e.emit("error",n),dn(t,n)}(this,n):function(e,t,n,r){var a=!0,i=!1;return null===n?i=new TypeError("May not write null values to stream"):pt.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i&&(e.emit("error",i),dn(r,i),a=!1),a}(this,r,e,n)&&(r.pendingcb++,a=function(e,t,n,r,a){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=pt.from(t,n));return t}(t,n,r),pt.isBuffer(n)&&(r="buffer");var i=t.objectMode?1:n.length;t.length+=i;var o=t.highWaterMark>t.length;o||(t.needDrain=!0);if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new Er(n,r,a),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Ar(e,t,!1,i,n,r,a);return o}(this,r,e,t,n)),a},jr.prototype.cork=function(){this._writableState.corked++},jr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Pr(this,e))},jr.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())<=-1)throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},jr.prototype._write=function(e,t,n){n(Error("not implemented"))},jr.prototype._writev=null,jr.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,Mr(e,t),n&&(t.finished?dn(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Mn(Nr,ur);for(var Tr=Object.keys(jr.prototype),Rr=0;Tr.length>Rr;Rr++){var Dr=Tr[Rr];Nr.prototype[Dr]||(Nr.prototype[Dr]=jr.prototype[Dr])}function Nr(e){if(!(this instanceof Nr))return new Nr(e);ur.call(this,e),jr.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Br)}function Br(){this.allowHalfOpen||this._writableState.ended||dn(Ir,this)}function Ir(e){e.end()}function Hr(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var a=r.writecb;if(!a)return e.emit("error",Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n);a(t);var i=e._readableState;i.reading=!1,(i.needReadable||i.highWaterMark>i.length)&&e._read(i.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Fr(e){if(!(this instanceof Fr))return new Fr(e);Nr.call(this,e),this._transformState=new Hr(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){qr(t,e)})):qr(t)}))}function qr(e,t){if(t)return e.emit("error",t);var n=e._transformState;if(e._writableState.length)throw Error("Calling transform done when ws.length != 0");if(n.transforming)throw Error("Calling transform done when still transforming");return e.push(null)}function Ur(e){if(!(this instanceof Ur))return new Ur(e);Fr.call(this,e)}function Zr(){jn.call(this)}Mn(Fr,Nr),Fr.prototype.push=function(e,t){return this._transformState.needTransform=!1,Nr.prototype.push.call(this,e,t)},Fr.prototype._transform=function(e,t,n){throw Error("Not implemented")},Fr.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var a=this._readableState;(r.needTransform||a.needReadable||a.highWaterMark>a.length)&&this._read(a.highWaterMark)}},Fr.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Mn(Ur,Fr),Ur.prototype._transform=function(e,t,n){n(null,e)},Mn(Zr,jn),Zr.Readable=ur,Zr.Writable=jr,Zr.Duplex=Nr,Zr.Transform=Fr,Zr.PassThrough=Ur,Zr.Stream=Zr,Zr.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",o),n.on("close",s));var i=!1;function o(){i||(i=!0,e.end())}function s(){i||(i=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(u(),0===jn.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",l),e.on("error",l),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e};var $r={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Wr(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function Vr(e,t,n,r,a){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),a);else for(var i=0;r>i;i++)e[a+i]=t[n+i]}var Yr=Uint8Array,Gr=Uint16Array,Jr=Int32Array,Kr=4,Xr=0,Qr=1,ea=2;function ta(e){for(var t=e.length;--t>=0;)e[t]=0}var na=0,ra=1,aa=2,ia=29,oa=256,sa=oa+1+ia,la=30,ua=19,ca=2*sa+1,da=15,ha=16,fa=7,pa=256,ga=16,ma=17,_a=18,wa=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ba=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],va=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ya=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ka=Array(2*(sa+2));ta(ka);var xa=Array(2*la);ta(xa);var Ea=Array(512);ta(Ea);var Sa=Array(256);ta(Sa);var ja=Array(ia);ta(ja);var Aa,La,Pa,Ca=Array(la);function za(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}function Ma(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Oa(e){return 256>e?Ea[e]:Ea[256+(e>>>7)]}function Ta(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Ra(e,t,n){e.bi_valid>ha-n?(e.bi_buf|=t<>ha-e.bi_valid,e.bi_valid+=n-ha):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function Ba(e,t,n){var r,a,i=Array(da+1),o=0;for(r=1;da>=r;r++)i[r]=o=o+n[r-1]<<1;for(a=0;t>=a;a++){var s=e[2*a+1];0!==s&&(e[2*a]=Na(i[s]++,s))}}function Ia(e){var t;for(t=0;sa>t;t++)e.dyn_ltree[2*t]=0;for(t=0;la>t;t++)e.dyn_dtree[2*t]=0;for(t=0;ua>t;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*pa]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ha(e){e.bi_valid>8?Ta(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Fa(e,t,n,r){var a=2*t,i=2*n;return e[i]>e[a]||e[a]===e[i]&&r[n]>=r[t]}function qa(e,t,n){for(var r=e.heap[n],a=n<<1;e.heap_len>=a&&(e.heap_len>a&&Fa(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!Fa(t,r,e.heap[a],e.depth));)e.heap[n]=e.heap[a],n=a,a<<=1;e.heap[n]=r}function Ua(e,t,n){var r,a,i,o,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],a=e.pending_buf[e.l_buf+s],s++,0===r?Da(e,a,t):(Da(e,(i=Sa[a])+oa+1,t),0!==(o=wa[i])&&Ra(e,a-=ja[i],o),Da(e,i=Oa(--r),n),0!==(o=ba[i])&&Ra(e,r-=Ca[i],o))}while(e.last_lit>s);Da(e,pa,t)}function Za(e,t){var n,r,a,i=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=ca,n=0;l>n;n++)0!==i[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):i[2*n+1]=0;for(;2>e.heap_len;)i[2*(a=e.heap[++e.heap_len]=2>u?++u:0)]=1,e.depth[a]=0,e.opt_len--,s&&(e.static_len-=o[2*a+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)qa(e,i,n);a=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],qa(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*a]=i[2*n]+i[2*r],e.depth[a]=(e.depth[r]>e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*n+1]=i[2*r+1]=a,e.heap[1]=a++,qa(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,a,i,o,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,g=0;for(i=0;da>=i;i++)e.bl_count[i]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;ca>n;n++)(i=l[2*l[2*(r=e.heap[n])+1]+1]+1)>p&&(i=p,g++),l[2*r+1]=i,r>u||(e.bl_count[i]++,o=0,f>r||(o=h[r-f]),e.opt_len+=(s=l[2*r])*(i+o),d&&(e.static_len+=s*(c[2*r+1]+o)));if(0!==g){do{for(i=p-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[p]--,g-=2}while(g>0);for(i=p;0!==i;i--)for(r=e.bl_count[i];0!==r;)u<(a=e.heap[--n])||(l[2*a+1]!==i&&(e.opt_len+=(i-l[2*a+1])*l[2*a],l[2*a+1]=i),r--)}}(e,t),Ba(i,u,e.bl_count)}function $a(e,t,n){var r,a,i=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;n>=r;r++)a=o,o=t[2*(r+1)+1],++ss?e.bl_tree[2*a]+=s:0!==a?(a!==i&&e.bl_tree[2*a]++,e.bl_tree[2*ga]++):s>10?e.bl_tree[2*_a]++:e.bl_tree[2*ma]++,s=0,i=a,0===o?(l=138,u=3):a===o?(l=6,u=3):(l=7,u=4))}function Wa(e,t,n){var r,a,i=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),r=0;n>=r;r++)if(a=o,o=t[2*(r+1)+1],++s>=l||a!==o){if(u>s)do{Da(e,a,e.bl_tree)}while(0!=--s);else 0!==a?(a!==i&&(Da(e,a,e.bl_tree),s--),Da(e,ga,e.bl_tree),Ra(e,s-3,2)):s>10?(Da(e,_a,e.bl_tree),Ra(e,s-11,7)):(Da(e,ma,e.bl_tree),Ra(e,s-3,3));s=0,i=a,0===o?(l=138,u=3):a===o?(l=6,u=3):(l=7,u=4)}}ta(Ca);var Va=!1;function Ya(e){Va||(!function(){var e,t,n,r,a,i=Array(da+1);for(n=0,r=0;ia-1>r;r++)for(ja[r]=n,e=0;1<e;e++)Sa[n++]=r;for(Sa[n-1]=r,a=0,r=0;16>r;r++)for(Ca[r]=a,e=0;1<e;e++)Ea[a++]=r;for(a>>=7;la>r;r++)for(Ca[r]=a<<7,e=0;1<e;e++)Ea[256+a++]=r;for(t=0;da>=t;t++)i[t]=0;for(e=0;143>=e;)ka[2*e+1]=8,e++,i[8]++;for(;255>=e;)ka[2*e+1]=9,e++,i[9]++;for(;279>=e;)ka[2*e+1]=7,e++,i[7]++;for(;287>=e;)ka[2*e+1]=8,e++,i[8]++;for(Ba(ka,sa+1,i),e=0;la>e;e++)xa[2*e+1]=5,xa[2*e]=Na(e,5);Aa=new za(ka,wa,oa+1,sa,da),La=new za(xa,ba,0,la,da),Pa=new za([],va,0,ua,fa)}(),Va=!0),e.l_desc=new Ma(e.dyn_ltree,Aa),e.d_desc=new Ma(e.dyn_dtree,La),e.bl_desc=new Ma(e.bl_tree,Pa),e.bi_buf=0,e.bi_valid=0,Ia(e)}function Ga(e,t,n,r){Ra(e,(na<<1)+(r?1:0),3),function(e,t,n){Ha(e),Ta(e,n),Ta(e,~n),Vr(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}function Ja(e){Ra(e,ra<<1,3),Da(e,pa,ka),function(e){16===e.bi_valid?(Ta(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8>e.bi_valid||(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}function Ka(e,t,n,r){var a,i,o=0;e.level>0?(e.strm.data_type===ea&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;31>=t;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return Xr;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Qr;for(t=32;oa>t;t++)if(0!==e.dyn_ltree[2*t])return Qr;return Xr}(e)),Za(e,e.l_desc),Za(e,e.d_desc),o=function(e){var t;for($a(e,e.dyn_ltree,e.l_desc.max_code),$a(e,e.dyn_dtree,e.d_desc.max_code),Za(e,e.bl_desc),t=ua-1;t>=3&&0===e.bl_tree[2*ya[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),(i=e.static_len+3+7>>>3)>(a=e.opt_len+3+7>>>3)||(a=i)):a=i=n+5,n+4>a||-1===t?e.strategy===Kr||i===a?(Ra(e,(ra<<1)+(r?1:0),3),Ua(e,ka,xa)):(Ra(e,(aa<<1)+(r?1:0),3),function(e,t,n,r){var a;for(Ra(e,t-257,5),Ra(e,n-1,5),Ra(e,r-4,4),a=0;r>a;a++)Ra(e,e.bl_tree[2*ya[a]+1],3);Wa(e,e.dyn_ltree,t-1),Wa(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Ua(e,e.dyn_ltree,e.dyn_dtree)):Ga(e,t,n,r),Ia(e),r&&Ha(e)}function Xa(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Sa[n]+oa+1)]++,e.dyn_dtree[2*Oa(t)]++),e.last_lit===e.lit_bufsize-1}function Qa(e,t,n,r){for(var a=65535&e,i=e>>>16&65535,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{i=i+(a=a+t[r++]|0)|0}while(--o);a%=65521,i%=65521}return a|i<<16}var ei=function(){for(var e,t=[],n=0;256>n;n++){e=n;for(var r=0;8>r;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function ti(e,t,n,r){var a=ei,i=r+n;e^=-1;for(var o=r;i>o;o++)e=e>>>8^a[255&(e^t[o])];return~e}var ni,ri=0,ai=4,ii=0,oi=-2,si=2,li=8,ui=286,ci=30,di=19,hi=2*ui+1,fi=15,pi=3,gi=258,mi=gi+pi+1,_i=42,wi=103,bi=113,vi=666,yi=1,ki=2,xi=3,Ei=4;function Si(e,t){return e.msg=$r[t],t}function ji(e){return(e<<1)-(e>4?9:0)}function Ai(e){for(var t=e.length;--t>=0;)e[t]=0}function Li(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Vr(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function Pi(e,t){Ka(e,0>e.block_start?-1:e.block_start,e.strstart-e.block_start,t),e.block_start=e.strstart,Li(e.strm)}function Ci(e,t){e.pending_buf[e.pending++]=t}function zi(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Mi(e,t){var n,r,a=e.max_chain_length,i=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-mi?e.strstart-(e.w_size-mi):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+gi,f=u[i+o-1],p=u[i+o];e.good_match>e.prev_length||(a>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+o]===p&&u[n+o-1]===f&&u[n]===u[i]&&u[++n]===u[i+1]){i+=2,n++;do{}while(u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&h>i);if(r=gi-(h-i),i=h-gi,r>o){if(e.match_start=t,o=r,r>=s)break;f=u[i+o-1],p=u[i+o]}}}while((t=d[t&c])>l&&0!=--a);return o>e.lookahead?e.lookahead:o}function Oi(e){var t,n,r,a,i,o,s,l,u,c,d=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-mi)){Vr(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=d>r?0:r-d}while(--n);t=n=d;do{r=e.prev[--t],e.prev[t]=d>r?0:r-d}while(--n);a+=d}if(0===e.strm.avail_in)break;if(s=e.window,l=e.strstart+e.lookahead,c=void 0,(c=(o=e.strm).avail_in)>(u=a)&&(c=u),n=0===c?0:(o.avail_in-=c,Vr(s,o.input,o.next_in,c,l),1===o.state.wrap?o.adler=Qa(o.adler,s,c,l):2===o.state.wrap&&(o.adler=ti(o.adler,s,c,l)),o.next_in+=c,o.total_in+=c,c),e.lookahead+=n,e.lookahead+e.insert>=pi)for(e.ins_h=e.window[i=e.strstart-e.insert],e.ins_h=(e.ins_h<=pi););}while(mi>e.lookahead&&0!==e.strm.avail_in)}function Ti(e,t){for(var n,r;;){if(mi>e.lookahead){if(Oi(e),mi>e.lookahead&&t===ri)return yi;if(0===e.lookahead)break}if(n=0,pi>e.lookahead||(e.ins_h=(e.ins_h<e.w_size-mi||(e.match_length=Mi(e,n)),pi>e.match_length)r=Xa(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;else if(r=Xa(e,e.strstart-e.match_start,e.match_length-pi),e.lookahead-=e.match_length,e.match_length>e.max_lazy_match||pi>e.lookahead)e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<e.strstart?e.strstart:pi-1,t===ai?(Pi(e,!0),0===e.strm.avail_out?xi:Ei):e.last_lit&&(Pi(e,!1),0===e.strm.avail_out)?yi:ki}function Ri(e,t){for(var n,r,a;;){if(mi>e.lookahead){if(Oi(e),mi>e.lookahead&&t===ri)return yi;if(0===e.lookahead)break}if(n=0,pi>e.lookahead||(e.ins_h=(e.ins_h<e.prev_length&&e.w_size-mi>=e.strstart-n&&(e.match_length=Mi(e,n),5>=e.match_length&&(1===e.strategy||e.match_length===pi&&e.strstart-e.match_start>4096)&&(e.match_length=pi-1)),pi>e.prev_length||e.match_length>e.prev_length)if(e.match_available){if((r=Xa(e,0,e.window[e.strstart-1]))&&Pi(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return yi}else e.match_available=1,e.strstart++,e.lookahead--;else{a=e.strstart+e.lookahead-pi,r=Xa(e,e.strstart-1-e.prev_match,e.prev_length-pi),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart>a||(e.ins_h=(e.ins_h<e.strstart?e.strstart:pi-1,t===ai?(Pi(e,!0),0===e.strm.avail_out?xi:Ei):e.last_lit&&(Pi(e,!1),0===e.strm.avail_out)?yi:ki}function Di(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}function Ni(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=li,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Gr(2*hi),this.dyn_dtree=new Gr(2*(2*ci+1)),this.bl_tree=new Gr(2*(2*di+1)),Ai(this.dyn_ltree),Ai(this.dyn_dtree),Ai(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Gr(fi+1),this.heap=new Gr(2*ui+1),Ai(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Gr(2*ui+1),Ai(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Bi(e){var t,n=function(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=si,(t=e.state).pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?_i:bi,e.adler=2===t.wrap?0:1,t.last_flush=ri,Ya(t),ii):Si(e,oi)}(e);return n===ii&&((t=e.state).window_size=2*t.w_size,Ai(t.head),t.max_lazy_match=ni[t.level].max_lazy,t.good_match=ni[t.level].good_length,t.nice_match=ni[t.level].nice_length,t.max_chain_length=ni[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=pi-1,t.match_available=0,t.ins_h=0),n}function Ii(e,t){var n,r,a,i;if(!e||!e.state||t>5||0>t)return e?Si(e,oi):oi;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===vi&&t!==ai)return Si(e,0===e.avail_out?-5:oi);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===_i)if(2===r.wrap)e.adler=0,Ci(r,31),Ci(r,139),Ci(r,8),r.gzhead?(Ci(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Ci(r,255&r.gzhead.time),Ci(r,r.gzhead.time>>8&255),Ci(r,r.gzhead.time>>16&255),Ci(r,r.gzhead.time>>24&255),Ci(r,9===r.level?2:r.strategy>=2||2>r.level?4:0),Ci(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Ci(r,255&r.gzhead.extra.length),Ci(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=ti(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Ci(r,0),Ci(r,0),Ci(r,0),Ci(r,0),Ci(r,0),Ci(r,9===r.level?2:r.strategy>=2||2>r.level?4:0),Ci(r,3),r.status=bi);else{var o=li+(r.w_bits-8<<4)<<8;o|=(r.strategy>=2||2>r.level?0:6>r.level?1:6===r.level?2:3)<<6,0!==r.strstart&&(o|=32),o+=31-o%31,r.status=bi,zi(r,o),0!==r.strstart&&(zi(r,e.adler>>>16),zi(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;(65535&r.gzhead.extra.length)>r.gzindex&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=ti(e.adler,r.pending_buf,r.pending-a,a)),Li(e),a=r.pending,r.pending!==r.pending_buf_size));)Ci(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=ti(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=ti(e.adler,r.pending_buf,r.pending-a,a)),Li(e),a=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzhead.name.length>r.gzindex?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Ci(r,i)}while(0!==i);r.gzhead.hcrc&&r.pending>a&&(e.adler=ti(e.adler,r.pending_buf,r.pending-a,a)),0===i&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=ti(e.adler,r.pending_buf,r.pending-a,a)),Li(e),a=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzhead.comment.length>r.gzindex?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Ci(r,i)}while(0!==i);r.gzhead.hcrc&&r.pending>a&&(e.adler=ti(e.adler,r.pending_buf,r.pending-a,a)),0===i&&(r.status=wi)}else r.status=wi;if(r.status===wi&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Li(e),r.pending+2>r.pending_buf_size||(Ci(r,255&e.adler),Ci(r,e.adler>>8&255),e.adler=0,r.status=bi)):r.status=bi),0!==r.pending){if(Li(e),0===e.avail_out)return r.last_flush=-1,ii}else if(0===e.avail_in&&ji(t)<=ji(n)&&t!==ai)return Si(e,-5);if(r.status===vi&&0!==e.avail_in)return Si(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==ri&&r.status!==vi){var s=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Oi(e),0===e.lookahead)){if(t===ri)return yi;break}if(e.match_length=0,n=Xa(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Pi(e,!1),0===e.strm.avail_out))return yi}return e.insert=0,t===ai?(Pi(e,!0),0===e.strm.avail_out?xi:Ei):e.last_lit&&(Pi(e,!1),0===e.strm.avail_out)?yi:ki}(r,t):3===r.strategy?function(e,t){for(var n,r,a,i,o=e.window;;){if(gi>=e.lookahead){if(Oi(e),gi>=e.lookahead&&t===ri)return yi;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=pi&&e.strstart>0&&(r=o[a=e.strstart-1])===o[++a]&&r===o[++a]&&r===o[++a]){i=e.strstart+gi;do{}while(r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&i>a);e.match_length=gi-(i-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(pi>e.match_length?(n=Xa(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++):(n=Xa(e,1,e.match_length-pi),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0),n&&(Pi(e,!1),0===e.strm.avail_out))return yi}return e.insert=0,t===ai?(Pi(e,!0),0===e.strm.avail_out?xi:Ei):e.last_lit&&(Pi(e,!1),0===e.strm.avail_out)?yi:ki}(r,t):ni[r.level].func(r,t);if(s!==xi&&s!==Ei||(r.status=vi),s===yi||s===xi)return 0===e.avail_out&&(r.last_flush=-1),ii;if(s===ki&&(1===t?Ja(r):5!==t&&(Ga(r,0,0,!1),3===t&&(Ai(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Li(e),0===e.avail_out))return r.last_flush=-1,ii}return t!==ai?ii:r.wrap>0?(2===r.wrap?(Ci(r,255&e.adler),Ci(r,e.adler>>8&255),Ci(r,e.adler>>16&255),Ci(r,e.adler>>24&255),Ci(r,255&e.total_in),Ci(r,e.total_in>>8&255),Ci(r,e.total_in>>16&255),Ci(r,e.total_in>>24&255)):(zi(r,e.adler>>>16),zi(r,65535&e.adler)),Li(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?ii:1):1}ni=[new Di(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(1>=e.lookahead){if(Oi(e),0===e.lookahead&&t===ri)return yi;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Pi(e,!1),0===e.strm.avail_out))return yi;if(e.strstart-e.block_start>=e.w_size-mi&&(Pi(e,!1),0===e.strm.avail_out))return yi}return e.insert=0,t===ai?(Pi(e,!0),0===e.strm.avail_out?xi:Ei):(e.strstart>e.block_start&&Pi(e,!1),yi)})),new Di(4,4,8,4,Ti),new Di(4,5,16,8,Ti),new Di(4,6,32,32,Ti),new Di(4,4,16,16,Ri),new Di(8,16,32,32,Ri),new Di(8,16,128,128,Ri),new Di(8,32,128,256,Ri),new Di(32,128,258,1024,Ri),new Di(32,258,258,4096,Ri)];var Hi=30,Fi=12;function qi(e,t){var n,r,a,i,o,s,l,u,c,d,h,f,p,g,m,_,w,b,v,y,k,x,E,S,j;S=e.input,a=(r=e.next_in)+(e.avail_in-5),j=e.output,o=(i=e.next_out)-(t-e.avail_out),s=i+(e.avail_out-257),l=(n=e.state).dmax,u=n.wsize,c=n.whave,d=n.wnext,h=n.window,f=n.hold,p=n.bits,g=n.lencode,m=n.distcode,_=(1<p&&(f+=S[r++]<>>=v=b>>>24,p-=v,0===(v=b>>>16&255))j[i++]=65535&b;else{if(!(16&v)){if(64&v){if(32&v){n.mode=Fi;break e}e.msg="invalid literal/length code",n.mode=Hi;break e}b=g[(65535&b)+(f&(1<p&&(f+=S[r++]<>>=v,p-=v),15>p&&(f+=S[r++]<>>=v=b>>>24,p-=v,16&(v=b>>>16&255)){if(k=65535&b,(v&=15)>p&&(f+=S[r++]<(p+=8)&&(f+=S[r++]<l){e.msg="invalid distance too far back",n.mode=Hi;break e}if(f>>>=v,p-=v,k>(v=i-o)){if((v=k-v)>c&&n.sane){e.msg="invalid distance too far back",n.mode=Hi;break e}if(x=0,E=h,0===d){if(x+=u-v,y>v){y-=v;do{j[i++]=h[x++]}while(--v);x=i-k,E=j}}else if(v>d){if(x+=u+d-v,y>(v-=d)){y-=v;do{j[i++]=h[x++]}while(--v);if(x=0,y>d){y-=v=d;do{j[i++]=h[x++]}while(--v);x=i-k,E=j}}}else if(x+=d-v,y>v){y-=v;do{j[i++]=h[x++]}while(--v);x=i-k,E=j}for(;y>2;)j[i++]=E[x++],j[i++]=E[x++],j[i++]=E[x++],y-=3;y&&(j[i++]=E[x++],y>1&&(j[i++]=E[x++]))}else{x=i-k;do{j[i++]=j[x++],j[i++]=j[x++],j[i++]=j[x++],y-=3}while(y>2);y&&(j[i++]=j[x++],y>1&&(j[i++]=j[x++]))}break}if(64&v){e.msg="invalid distance code",n.mode=Hi;break e}b=m[(65535&b)+(f&(1<r&&s>i);f&=(1<<(p-=(y=p>>3)<<3))-1,e.next_in=r-=y,e.next_out=i,e.avail_in=a>r?a-r+5:5-(r-a),e.avail_out=s>i?s-i+257:257-(i-s),n.hold=f,n.bits=p}var Ui=15,Zi=852,$i=592,Wi=0,Vi=1,Yi=2,Gi=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ji=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Ki=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Xi=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function Qi(e,t,n,r,a,i,o,s){var l,u,c,d,h,f,p,g,m,_=s.bits,w=0,b=0,v=0,y=0,k=0,x=0,E=0,S=0,j=0,A=0,L=null,P=0,C=new Gr(Ui+1),z=new Gr(Ui+1),M=null,O=0;for(w=0;Ui>=w;w++)C[w]=0;for(b=0;r>b;b++)C[t[n+b]]++;for(k=_,y=Ui;y>=1&&0===C[y];y--);if(k>y&&(k=y),0===y)return a[i++]=20971520,a[i++]=20971520,s.bits=1,0;for(v=1;y>v&&0===C[v];v++);for(v>k&&(k=v),S=1,w=1;Ui>=w;w++)if(S<<=1,0>(S-=C[w]))return-1;if(S>0&&(e===Wi||1!==y))return-1;for(z[1]=0,w=1;Ui>w;w++)z[w+1]=z[w]+C[w];for(b=0;r>b;b++)0!==t[n+b]&&(o[z[t[n+b]]++]=b);if(e===Wi?(L=M=o,f=19):e===Vi?(L=Gi,P-=257,M=Ji,O-=257,f=256):(L=Ki,M=Xi,f=-1),A=0,b=0,w=v,h=i,x=k,E=0,c=-1,d=(j=1<Zi||e===Yi&&j>$i)return 1;for(;;){p=w-E,f>o[b]?(g=0,m=o[b]):o[b]>f?(g=M[O+o[b]],m=L[P+o[b]]):(g=96,m=0),l=1<>E)+(u-=l)]=p<<24|g<<16|m}while(0!==u);for(l=1<>=1;if(0!==l?(A&=l-1,A+=l):A=0,b++,0==--C[w]){if(w===y)break;w=t[n+o[b]]}if(w>k&&(A&d)!==c){for(0===E&&(E=k),h+=v,S=1<<(x=w-E);y>x+E&&(S-=C[x+E])>0;)x++,S<<=1;if(j+=1<Zi||e===Yi&&j>$i)return 1;a[c=A&d]=k<<24|x<<16|h-i}}return 0!==A&&(a[h+A]=w-E<<24|64<<16),s.bits=k,0}var eo=1,to=2,no=0,ro=-2,ao=1,io=12,oo=30,so=852,lo=592;function uo(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function co(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Gr(320),this.work=new Gr(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ho(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,function(e){var t;return e&&e.state?(e.total_in=e.total_out=(t=e.state).total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=ao,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Jr(so),t.distcode=t.distdyn=new Jr(lo),t.sane=1,t.back=-1,no):ro}(e)):ro}function fo(e,t){var n,r;return e?(r=new co,e.state=r,r.window=null,n=function(e,t){var n,r;return e&&e.state?(0>t?(n=0,t=-t):(n=1+(t>>4),48>t&&(t&=15)),t&&(8>t||t>15)?ro:(null!==(r=e.state).window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,ho(e))):ro}(e,t),n!==no&&(e.state=null),n):ro}var po,go,mo=!0;function _o(e){if(mo){var t;for(po=new Jr(512),go=new Jr(32),t=0;144>t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(Qi(eo,e.lens,0,288,po,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;Qi(to,e.lens,0,32,go,0,e.work,{bits:5}),mo=!1}e.lencode=po,e.lenbits=9,e.distcode=go,e.distbits=5}function wo(e,t){var n,r,a,i,o,s,l,u,c,d,h,f,p,g,m,_,w,b,v,y,k,x,E,S,j=0,A=new Yr(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return ro;(n=e.state).mode===io&&(n.mode=13),o=e.next_out,a=e.output,i=e.next_in,r=e.input,u=n.hold,c=n.bits,d=s=e.avail_in,h=l=e.avail_out,x=no;e:for(;;)switch(n.mode){case ao:if(0===n.wrap){n.mode=13;break}for(;16>c;){if(0===s)break e;s--,u+=r[i++]<>>8&255,n.check=ti(n.check,A,2,0),u=0,c=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=oo;break}if(8!=(15&u)){e.msg="unknown compression method",n.mode=oo;break}if(c-=4,k=8+(15&(u>>>=4)),0===n.wbits)n.wbits=k;else if(k>n.wbits){e.msg="invalid window size",n.mode=oo;break}n.dmax=1<c;){if(0===s)break e;s--,u+=r[i++]<>8&1),512&n.flags&&(A[0]=255&u,A[1]=u>>>8&255,n.check=ti(n.check,A,2,0)),u=0,c=0,n.mode=3;case 3:for(;32>c;){if(0===s)break e;s--,u+=r[i++]<>>8&255,A[2]=u>>>16&255,A[3]=u>>>24&255,n.check=ti(n.check,A,4,0)),u=0,c=0,n.mode=4;case 4:for(;16>c;){if(0===s)break e;s--,u+=r[i++]<>8),512&n.flags&&(A[0]=255&u,A[1]=u>>>8&255,n.check=ti(n.check,A,2,0)),u=0,c=0,n.mode=5;case 5:if(1024&n.flags){for(;16>c;){if(0===s)break e;s--,u+=r[i++]<>>8&255,n.check=ti(n.check,A,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((f=n.length)>s&&(f=s),f&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),Vr(n.head.extra,r,i,f,k)),512&n.flags&&(n.check=ti(n.check,r,f,i)),s-=f,i+=f,n.length-=f),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;f=0;do{k=r[i+f++],n.head&&k&&65536>n.length&&(n.head.name+=String.fromCharCode(k))}while(k&&s>f);if(512&n.flags&&(n.check=ti(n.check,r,f,i)),s-=f,i+=f,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;f=0;do{k=r[i+f++],n.head&&k&&65536>n.length&&(n.head.comment+=String.fromCharCode(k))}while(k&&s>f);if(512&n.flags&&(n.check=ti(n.check,r,f,i)),s-=f,i+=f,k)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;16>c;){if(0===s)break e;s--,u+=r[i++]<>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=io;break;case 10:for(;32>c;){if(0===s)break e;s--,u+=r[i++]<>>=7&c,c-=7&c,n.mode=27;break}for(;3>c;){if(0===s)break e;s--,u+=r[i++]<>>=1)){case 0:n.mode=14;break;case 1:if(_o(n),n.mode=20,6===t){u>>>=2,c-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=oo}u>>>=2,c-=2;break;case 14:for(u>>>=7&c,c-=7&c;32>c;){if(0===s)break e;s--,u+=r[i++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=oo;break}if(n.length=65535&u,u=0,c=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(f=n.length){if(f>s&&(f=s),f>l&&(f=l),0===f)break e;Vr(a,r,i,f,o),s-=f,i+=f,l-=f,o+=f,n.length-=f;break}n.mode=io;break;case 17:for(;14>c;){if(0===s)break e;s--,u+=r[i++]<>>=5)),c-=5,n.ncode=4+(15&(u>>>=5)),u>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=oo;break}n.have=0,n.mode=18;case 18:for(;n.ncode>n.have;){for(;3>c;){if(0===s)break e;s--,u+=r[i++]<>>=3,c-=3}for(;19>n.have;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,x=Qi(0,n.lens,0,19,n.lencode,0,n.work,E={bits:n.lenbits}),n.lenbits=E.bits,x){e.msg="invalid code lengths set",n.mode=oo;break}n.have=0,n.mode=19;case 19:for(;n.nlen+n.ndist>n.have;){for(;_=(j=n.lencode[u&(1<>>16&255,w=65535&j,c<(m=j>>>24);){if(0===s)break e;s--,u+=r[i++]<w)u>>>=m,c-=m,n.lens[n.have++]=w;else{if(16===w){for(S=m+2;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=m,c-=m,0===n.have){e.msg="invalid bit length repeat",n.mode=oo;break}k=n.lens[n.have-1],f=3+(3&u),u>>>=2,c-=2}else if(17===w){for(S=m+3;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=m)),u>>>=3,c-=3}else{for(S=m+7;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=m)),u>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=oo;break}for(;f--;)n.lens[n.have++]=k}}if(n.mode===oo)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=oo;break}if(n.lenbits=9,x=Qi(eo,n.lens,0,n.nlen,n.lencode,0,n.work,E={bits:n.lenbits}),n.lenbits=E.bits,x){e.msg="invalid literal/lengths set",n.mode=oo;break}if(n.distbits=6,n.distcode=n.distdyn,x=Qi(to,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E={bits:n.distbits}),n.distbits=E.bits,x){e.msg="invalid distances set",n.mode=oo;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=s,n.hold=u,n.bits=c,qi(e,h),o=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,r=e.input,s=e.avail_in,u=n.hold,c=n.bits,n.mode===io&&(n.back=-1);break}for(n.back=0;_=(j=n.lencode[u&(1<>>16&255,w=65535&j,c<(m=j>>>24);){if(0===s)break e;s--,u+=r[i++]<>b)])>>>16&255,w=65535&j,c>>24);){if(0===s)break e;s--,u+=r[i++]<>>=b,c-=b,n.back+=b}if(u>>>=m,c-=m,n.back+=m,n.length=w,0===_){n.mode=26;break}if(32&_){n.back=-1,n.mode=io;break}if(64&_){e.msg="invalid literal/length code",n.mode=oo;break}n.extra=15&_,n.mode=22;case 22:if(n.extra){for(S=n.extra;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;_=(j=n.distcode[u&(1<>>16&255,w=65535&j,c<(m=j>>>24);){if(0===s)break e;s--,u+=r[i++]<>b)])>>>16&255,w=65535&j,c>>24);){if(0===s)break e;s--,u+=r[i++]<>>=b,c-=b,n.back+=b}if(u>>>=m,c-=m,n.back+=m,64&_){e.msg="invalid distance code",n.mode=oo;break}n.offset=w,n.extra=15&_,n.mode=24;case 24:if(n.extra){for(S=n.extra;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=oo;break}n.mode=25;case 25:if(0===l)break e;if(n.offset>(f=h-l)){if((f=n.offset-f)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=oo;break}p=f>n.wnext?n.wsize-(f-=n.wnext):n.wnext-f,f>n.length&&(f=n.length),g=n.window}else g=a,p=o-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do{a[o++]=g[p++]}while(--f);0===n.length&&(n.mode=21);break;case 26:if(0===l)break e;a[o++]=n.length,l--,n.mode=21;break;case 27:if(n.wrap){for(;32>c;){if(0===s)break e;s--,u|=r[i++]<c;){if(0===s)break e;s--,u+=r[i++]<n.mode&&(27>n.mode||4!==t))&&function(e,t,n,r){var a,i=e.state;null===i.window&&(i.wsize=1<r?((a=i.wsize-i.wnext)>r&&(a=r),Vr(i.window,t,n-r,a,i.wnext),(r-=a)?(Vr(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.wsize>i.whave&&(i.whave+=a))):(Vr(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize)}(e,e.output,e.next_out,h-e.avail_out),h-=e.avail_out,e.total_in+=d-=e.avail_in,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?ti(n.check,a,h,e.next_out-h):Qa(n.check,a,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===io?128:0)+(20===n.mode||15===n.mode?256:0),(0===d&&0===h||4===t)&&x===no&&(x=-5),x}var bo;function vo(e){if(1>e||e>7)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function yo(e,t){for(var n=0;e.length>n;n++)this[t+n]=e[n]}vo.prototype.init=function(e,t,n,r,a){var i;switch(this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=r,3!==this.mode&&4!==this.mode||(this.windowBits+=16),7===this.mode&&(this.windowBits+=32),5!==this.mode&&6!==this.mode||(this.windowBits=-this.windowBits),this.strm=new Wr,this.mode){case 1:case 3:case 5:i=function(e,t,n,r,a,i){if(!e)return oi;var o=1;if(-1===t&&(t=6),0>r?(o=0,r=-r):r>15&&(o=2,r-=16),1>a||a>9||n!==li||8>r||r>15||0>t||t>9||0>i||i>4)return Si(e,oi);8===r&&(r=9);var s=new Ni;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<e.chunkSize||e.chunkSize>xo.Z_MAX_CHUNK))throw Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(xo.Z_MIN_WINDOWBITS>e.windowBits||e.windowBits>xo.Z_MAX_WINDOWBITS))throw Error("Invalid windowBits: "+e.windowBits);if(e.level&&(xo.Z_MIN_LEVEL>e.level||e.level>xo.Z_MAX_LEVEL))throw Error("Invalid compression level: "+e.level);if(e.memLevel&&(xo.Z_MIN_MEMLEVEL>e.memLevel||e.memLevel>xo.Z_MAX_MEMLEVEL))throw Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=xo.Z_FILTERED&&e.strategy!=xo.Z_HUFFMAN_ONLY&&e.strategy!=xo.Z_RLE&&e.strategy!=xo.Z_FIXED&&e.strategy!=xo.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Kt(e.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance");this._binding=new xo.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(e,t){n._binding=null,n._hadError=!0;var r=Error(e);r.errno=t,r.code=xo.codes[t],n.emit("error",r)};var r=xo.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(r=e.level);var a=xo.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(a=e.strategy),this._binding.init(e.windowBits||xo.Z_DEFAULT_WINDOWBITS,r,e.memLevel||xo.Z_DEFAULT_MEMLEVEL,a,e.dictionary),this._buffer=new pt(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=a,this.once("end",this.close)}Object.keys(Eo).forEach((function(e){Eo[Eo[e]]=e})),Mn(To,Fr),To.prototype.params=function(e,t,n){if(xo.Z_MIN_LEVEL>e||e>xo.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=xo.Z_FILTERED&&t!=xo.Z_HUFFMAN_ONLY&&t!=xo.Z_RLE&&t!=xo.Z_FIXED&&t!=xo.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var r=this;this.flush(xo.Z_SYNC_FLUSH,(function(){r._binding.params(e,t),r._hadError||(r._level=e,r._strategy=t,n&&n())}))}else dn(n)},To.prototype.reset=function(){return this._binding.reset()},To.prototype._flush=function(e){this._transform(new pt(0),"",e)},To.prototype.flush=function(e,t){var n=this._writableState;if(("function"==typeof e||void 0===e&&!t)&&(t=e,e=xo.Z_FULL_FLUSH),n.ended)t&&dn(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var r=this;this.once("drain",(function(){r.flush(t)}))}else this._flushFlag=e,this.write(new pt(0),"",t)},To.prototype.close=function(e){if(e&&dn(e),!this._closed){this._closed=!0,this._binding.close();var t=this;dn((function(){t.emit("close")}))}},To.prototype._transform=function(e,t,n){var r,a=this._writableState,i=(a.ending||a.ended)&&(!e||a.length===e.length);if(null===!e&&!Kt(e))return n(Error("invalid input"));i?r=xo.Z_FINISH:(r=this._flushFlag,a.length>e.length||(this._flushFlag=this._opts.flush||xo.Z_NO_FLUSH)),this._processChunk(e,r,n)},To.prototype._processChunk=function(e,t,n){var r=e&&e.length,a=this._chunkSize-this._offset,i=0,o=this,s="function"==typeof n;if(!s){var l,u=[],c=0;this.on("error",(function(e){l=e}));do{var d=this._binding.writeSync(t,e,i,r,this._buffer,this._offset,a)}while(!this._hadError&&p(d[0],d[1]));if(this._hadError)throw l;var h=pt.concat(u,c);return this.close(),h}var f=this._binding.write(t,e,i,r,this._buffer,this._offset,a);function p(l,d){if(!o._hadError){var h=a-d;if(function(e,t){if(!e)throw Error(t)}(h>=0,"have should not go down"),h>0){var f=o._buffer.slice(o._offset,o._offset+h);o._offset+=h,s?o.push(f):(u.push(f),c+=f.length)}if(0!==d&&o._chunkSize>o._offset||(a=o._chunkSize,o._offset=0,o._buffer=new pt(o._chunkSize)),0===d){if(i+=r-l,r=l,!s)return!0;var g=o._binding.write(t,e,i,r,o._buffer,o._offset,o._chunkSize);return g.callback=p,void(g.buffer=e)}if(!s)return!1;n()}}f.buffer=e,f.callback=p},Mn(Ao,To),Mn(Lo,To),Mn(Po,To),Mn(Co,To),Mn(zo,To),Mn(Mo,To),Mn(Oo,To);var Ro={codes:Eo,createDeflate:function(e){return new Ao(e)},createInflate:function(e){return new Lo(e)},createDeflateRaw:function(e){return new zo(e)},createInflateRaw:function(e){return new Mo(e)},createGzip:function(e){return new Po(e)},createGunzip:function(e){return new Co(e)},createUnzip:function(e){return new Oo(e)},deflate:function(e,t,n){return"function"==typeof t&&(n=t,t={}),So(new Ao(t),e,n)},deflateSync:function(e,t){return jo(new Ao(t),e)},gzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),So(new Po(t),e,n)},gzipSync:function(e,t){return jo(new Po(t),e)},deflateRaw:function(e,t,n){return"function"==typeof t&&(n=t,t={}),So(new zo(t),e,n)},deflateRawSync:function(e,t){return jo(new zo(t),e)},unzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),So(new Oo(t),e,n)},unzipSync:function(e,t){return jo(new Oo(t),e)},inflate:function(e,t,n){return"function"==typeof t&&(n=t,t={}),So(new Lo(t),e,n)},inflateSync:function(e,t){return jo(new Lo(t),e)},gunzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),So(new Co(t),e,n)},gunzipSync:function(e,t){return jo(new Co(t),e)},inflateRaw:function(e,t,n){return"function"==typeof t&&(n=t,t={}),So(new Mo(t),e,n)},inflateRawSync:function(e,t){return jo(new Mo(t),e)},Deflate:Ao,Inflate:Lo,Gzip:Po,Gunzip:Co,DeflateRaw:zo,InflateRaw:Mo,Unzip:Oo,Zlib:To};function Do(e,t,n){var r=(3&e)<<4|t>>4,a=(15&t)<<2|n>>6,i=63&n,o="";return o+=No(63&e>>2),o+=No(63&r),o+=No(63&a),o+=No(63&i)}function No(e){return 10>e?String.fromCharCode(48+e):26>(e-=10)?String.fromCharCode(65+e):26>(e-=26)?String.fromCharCode(97+e):0==(e-=26)?"-":1==e?"_":"?"}function Bo(e){var t=e.charCodeAt(0);return"_"===e?63:"-"===e?62:97>t?65>t?48>t?"?":t-48:t-55:t-61}function Io(e){var t=Bo(e[0]),n=Bo(e[1]),r=Bo(e[2]);return[t<<2|n>>4&63,n<<4&240|r>>2&15,r<<6&192|63&Bo(e[3])]}function Ho(e){return function(e){for(var t="",n=0;e.length>n;n+=3)t+=n+2==e.length?Do(e.charCodeAt(n),e.charCodeAt(n+1),0):n+1==e.length?Do(e.charCodeAt(n),0,0):Do(e.charCodeAt(n),e.charCodeAt(n+1),e.charCodeAt(n+2));return t}(Ro.deflateRawSync(e,{level:9}).toString("binary"))}function Fo(e){return""+Ro.inflateRawSync(pt.from(function(e){var t="",n=0;for(n=0;e.length>n;n+=4){var r=Io(e.substring(n,n+4));t+=String.fromCharCode(r[0]),t+=String.fromCharCode(r[1]),t+=String.fromCharCode(r[2])}return t}(e),"binary"))}var qo={encodeuml:function(e){var t="@startuml",n="@enduml";return Ho("".concat(t).concat((e.split(t)[1]+"").split(n)[0]||"").concat(n))},decodeuml:function(e){return Fo(e)}},Uo="img",Zo=0;function $o(e,t){return Zo=e.length,new Promise((function(n){var r=[];e.forEach((function(e){r.push(function(e,t){return new Promise((function(n){var r=e.dataset.lang,a=r?JSON.parse(r):null,i="";if(a){if("boolean"==typeof a.codeblock&&a.codeblock||"string"==typeof a.codeblock&&"true"===a.codeblock.toLowerCase())return n(!1);a.align&&("center"===a.align?i="diagram-center":"right"===a.align&&(i="diagram-right"))}var o=e.textContent.trim(),s=(e.classList.length>0?e.classList[0]:"")+(e.className&&i?" ":"")+i,l=t.imageFormat;if("svg"!==l){var u=window&&window.location.protocol,c=("http:"===u||"https:"===u?"//":"https://")+t.umlWebSite,d=l!==Uo?".".concat(l):"",h=qo.encodeuml(o),f="".concat(c,"/").concat(l,"/").concat(h).concat(d);return e.parentNode.outerHTML='
"),n(!0)}var p="plantuml-"+Date.now()+"-"+Math.floor(1e4*Math.random());if("function"==typeof t.svgRender&&t.svgRender)t.svgRender(p,s,o,Zo).then((function(t){e.parentNode.outerHTML='
').concat(t,"
"),n(!0)}));else if("undefined"!=typeof window&&window.fetch&&window.dispatchEvent){var g=window&&window.location.protocol,m=("http:"===g||"https:"===g?"//":"https://")+t.umlWebSite,_=l!==Uo?".".concat(l):"",w=qo.encodeuml(o),b="".concat(m,"/").concat(l,"/").concat(w).concat(_);window.fetch(b).then((function(e){if(e.ok)return e.text()})).then((function(t){e.parentNode.outerHTML='
').concat(t,"
"),n(!0)}))}}))}(e,t))})),Promise.all(r).then((function(){n(!0)}))}))}function Wo(e){var t=function(){return r({umlWebSite:"www.plantuml.com/plantuml",imageFormat:Uo,svgRender:null},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.plantuml.language-plantuml");return!!n.length&&(console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render plantuml elements.")),$o(n,this.config).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render plantuml elements.")),e})))}}]}var Vo="railroad",Yo="railroadCSS";if("undefined"==typeof window)throw Error("The showdown railroad extension can only be used in browser environment!");var Go=!1;function Jo(){return Go}var Ko,Xo=!1;function Qo(e,t){if(Jo()){var n=t.id,r=t.className,a=t.cssLink,i=window.eval(t.data).format(),o=t.element.ownerDocument;return t.element.parentNode.outerHTML=a?'
'):'
'),i.addTo(o.getElementById(n)),e(!0)}setTimeout((function(){Qo(e,t)}),10)}function es(e){return new Promise((function(t){var n=k.createElementMeta(Vo,e);if(!n)return t(!1);n.cssLink=y.getSrc(Yo),Qo(t,n)}))}function ts(e){var t;return t=Jo(),"undefined"!=typeof window&&(t||Xo||(Xo=!0,y.loadStyleSheet(Yo),y.loadScript(Vo).then((function(){Go=!0})))),new Promise((function(t){var n=[];e.forEach((function(e){n.push(es(e))})),Promise.all(n).then((function(){t(!0)}))}))}function ns(){return[{type:"output",filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.railroad.language-railroad");return!!n.length&&(this.config={cssLink:y.getSrc(Yo)},console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render railroad elements.")),ts(n).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render railroad elements.")),e})))}}]}if("undefined"==typeof window)throw Error("The showdown sequence extension can only be used in browser environment!");if("undefined"!=typeof window&&window.Diagram&&(Ko=window.Diagram,window.Diagram.Signal))var rs=window.Diagram;var as=["simple","hand"];if(void 0===rs&&"undefined"!=typeof window)rs=window.SequenceJS;function is(){return!!rs}var os=!1,ss="sequenceCSS";function ls(e){var t=e.dataset.lang,n=t?JSON.parse(t):null,r="";if(n){if("boolean"==typeof n.codeblock&&n.codeblock||"string"==typeof n.codeblock&&"true"===n.codeblock.toLowerCase())return;n.align&&("center"===n.align?r="diagram-center":"right"===n.align&&(r="diagram-right"))}var a=function(){var e=is();return"undefined"!=typeof window&&(e||os||(os=!0,y.loadStyleSheet(ss),y.loadScript("WebFont").then((function(){return y.loadScript("Snap")})).then((function(){return y.loadScript("underscore")})).then((function(){return!Ko&&window.Diagram&&(Ko=window.Diagram),y.loadScript("sequence")})).then((function(){rs=window.Diagram,window.SequenceJS=rs,Ko&&(window.Diagram=Ko)})))),e}(),i=y.getSrc(ss),o=e.textContent.trim(),s="js-sequence"+(r?" ":"")+r,l="sequence-"+Date.now()+"-"+Math.floor(1e4*Math.random());e.id=l,i&&(e.className=e.className+(e.className?" ":"")+"css-sequence",e.dataset.css=i),!a&&"undefined"!=typeof window&&window.dispatchEvent?Promise.resolve(l).then((function(e){window.dispatchEvent(new CustomEvent("sequence",{detail:{id:e,className:s,data:o,langattr:t,cssLink:i}}))})):"undefined"!=typeof window&&window.dispatchEvent&&window.dispatchEvent(new CustomEvent("sequence",{detail:{id:l,className:s,data:o,langattr:t,cssLink:i}}))}function us(e){if(is()){var t=e.id,n=e.className,r=e.data,a=e.cssLink,i="hand",o=e.langattr;if(o){var s=JSON.parse(o);s&&s.theme&&-1!=as.indexOf(s.theme)&&(i=s.theme)}var l=window.document.getElementById(t);if(l)return l.parentNode.outerHTML=a?'
'):'
'),l=window.document.getElementById(t),void rs.parse(r).drawSVG(l||t,{theme:i})}setTimeout((function(){us(e)}),50)}function cs(){var e=new DOMParser;return"undefined"!=typeof window&&window.dispatchEvent&&window.addEventListener("sequence",(function(e){e.detail&&us(e.detail)})),[{type:"output",filter:function(t){var n=e.parseFromString(t,"text/html"),r=void 0!==n.body?n.body:n,a=r.querySelectorAll("code.sequence.language-sequence");return a.length&&(this.config={cssLink:y.getSrc(ss)}),function(e){return!!e.length&&(e.forEach((function(e){ls(e)})),!0)}(a)?r.innerHTML:t}}]}if("undefined"==typeof window)throw Error("The showdown wavedrom extension can only be used in browser environment!");if(void 0===ds)var ds=window.WaveDrom||void 0;var hs=0,fs=0;function ps(){return!!ds}var gs=!1;function ms(e,t){if(ps()){var n=t.index,r=t.id,a=t.data,i=t.element;return i.parentNode.outerHTML=k.renderCacheElement(i.ownerDocument,r+n,t.className,(function(e){var t=window.eval("(".concat(a,")"));ds.RenderWaveForm(n,t,r);var i=document.getElementById("WaveDrom_Display_"+n);if(e!=i)for(;i.childNodes.length;)e.appendChild(i.removeChild(i.childNodes[0]))})),e(!0)}setTimeout((function(){ms(e,t)}),10)}function _s(e){return new Promise((function(t){var n=e.dataset.lang,r=n?JSON.parse(n):null,a="";if(r){if("boolean"==typeof r.codeblock&&r.codeblock||"string"==typeof r.codeblock&&"true"===r.codeblock.toLowerCase())return;r.align&&("center"===r.align?a="diagram-center":"right"===r.align&&(a="diagram-right"))}var i=e.textContent.trim(),o=(e.classList.length>0?e.classList[0]:"")+(e.className&&a?" ":"")+a,s=fs;++fs,--hs||(fs=0);var l="WaveDrom_Display_";e.id=l+s,ms(t,{element:e,index:s,id:l,className:o,data:i})}))}function ws(e,t){return function(e){var t=ps();t||gs||(gs=!0,"undefined"!=typeof window&&y.loadScript({WaveDromSkin:e}).then((function(){return y.loadScript("WaveDrom")})).then((function(e){ds=k.interopDefault(window[e])})))}(t),new Promise((function(t){var n=[];hs=e.length,e.forEach((function(e){n.push(_s(e))})),Promise.all(n).then((function(){t(!0)}))}))}function bs(e){var t=function(){return r({skin:"default"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.wavedrom.language-wavedrom");return!!n.length&&(console.log("".concat((new Date).Format("yyyy-MM-dd hh:mm:ss.S")," Begin render wavedrom elements.")),ws(n,this.config.skin).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd hh:mm:ss.S")," End render wavedrom elements.")),e})))}}]}function vs(){return[{type:"lang",filter:function(e,t){return e.replace(/^\[\^([\d\w]+)\]:\s*((\n+(\s{2,4}|\t).+)+)$/gm,(function(e,n,r,a,i){var o=t.makeHtml(r.replace(RegExp("^".concat(i),"gm"),""));return'
[').concat(n,"]:").concat(o,"
")}))}},{type:"lang",filter:function(e){return e.replace(/^\[\^([\d\w]+)\]:( |\n)((.+\n)*.+)$/gm,(function(e,t,n,r){return'[').concat(t,"]: ").concat(r,"")}))}},{type:"lang",filter:function(e){return e.replace(/\[\^([\d\w]+)\]/m,(function(e,t){return'[').concat(t,"]")}))}}]}function ys(){return[{type:"lang",filter:function(e,t){return e.replace(/(?:^|\n)(?: {0,3})(:::+)(?: *)([\S]+)(?:[ \t]*)([^\s][\S\t ]*)?\n([\s\S]*?)\n(?: {0,3})\1(?:[ \t]*)\n/g,(function(e,n,r,a,i){if(r){var o=r.split("-");o.length>1?o.forEach((function(e,t,n){t>0&&(n[t]=n[t-1]+"-"+e)})):o.unshift("container"),r=o.join(" ")}return i&&(i=t.makeHtml(i)),a=a?'

'.concat(a,"

"):"",'
').concat(a).concat(i,"
")}))}}]}if("undefined"==typeof window)throw Error("The showdown flowchart extension can only be used in browser environment!");if(void 0===ks)var ks=window.Raphael||void 0;if(void 0===xs)var xs=window.flowchart||void 0;function Es(){return!(void 0===ks||!ks||void 0===xs||!xs)}var Ss=!1;function js(e,t){if(Es()){var n=t.data,r=t.options;return t.element.parentNode.outerHTML=k.renderCacheElement(t.element.ownerDocument,t.id,t.className,(function(e){xs.parse(n).drawSVG(e,r)})),void e(!0)}setTimeout((function(){js(e,t)}),10)}function As(e,t){return new Promise((function(n){var r=k.createElementMeta("flowchart",e);if(!r)return n(!1);r.options=t,js(n,r)}))}function Ls(e,t,n){var r;return r=Es(),"undefined"!=typeof window&&(r||Ss||(Ss=!0,y.loadScript("Raphael").then((function(e){return ks=k.interopDefault(window[e]),y.loadScript("flowchart")})).then((function(e){xs=k.interopDefault(window[e])})))),new Promise((function(r){var a=[];e.forEach((function(e){a.push(As(e,n))})),t.forEach((function(e){a.push(As(e,n))})),Promise.all(a).then((function(){r(!0)}))}))}function Ps(e){var t=function(){return r({"line-width":3,maxWidth:3,"line-length":50,"text-margin":10,"font-size":14,font:"normal","font-family":"Helvetica","font-weight":"normal","font-color":"black","line-color":"black","element-color":"black",fill:"white","yes-text":"yes","no-text":"no","arrow-end":"block",scale:1,symbols:{start:{"font-color":"red","element-color":"green",fill:"yellow"},end:{class:"end-element"}},flowstate:{past:{fill:"#CCCCCC","font-size":12},current:{fill:"yellow","font-color":"red","font-weight":"bold"},future:{fill:"#FFFF99"},request:{fill:"blue"},invalid:{fill:"#444444"},approved:{fill:"#58C4A3","font-size":12,"yes-text":"APPROVED","no-text":"n/a"},rejected:{fill:"#C45879","font-size":12,"yes-text":"n/a","no-text":"REJECTED"}}},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.flowchart.language-flowchart"),r=t.querySelectorAll("code.flow.language-flow");return!(!n.length&&!r.length)&&(console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," Begin render flowchart elements.")),Ls(n,r,this.config).then((function(){return console.log("".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," End render flowchart elements.")),e})))}}]}var Cs=function(){return r({flavor:"github"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},zs=function(e,t){if(!t||"undefined"==typeof document)return!1;var n=document.body,r=document.getElementById(e);if(r){var a="script-".concat(e),i=document.querySelector("#parent > #".concat(a));i?n.removeChild(i):(i=document.createElement("script")).id=a,i.type="text/javascript",i.text=t,r.appendChild(i)}return!0},Ms=["github","ghost","vanilla","original","allon"],Os=["default","forest","dark","neutral"],Ts=["excel","ggplot2","quartz","vox","dark"],Rs=["canvas","svg"],Ds=["svg","png","jpg"],Ns={showdown:u,converter:null,defaultOptions:{showdown:Cs(),plantuml:{imageFormat:"svg"},mermaid:{theme:"default"},katex:{},vega:{theme:"vox"}},defaultExtensions:{},defaultAsyncExtensions:{},markdownDecodeFilter:function(e){return""},initDefaultOptions:function(){this.defaultOptions||(this.defaultOptions={showdown:{},plantuml:{},mermaid:{},katex:{},vega:{}})},setFlavor:function(e){this.showdown.setFlavor(e),this.converter&&this.converter.setFlavor(e)},addOptions:function(e){for(var t in e)"flavor"!==t&&(this.showdown.setOption(t,e[t]),this.converter&&this.converter.setOption(t,e[t]))},addExtension:function(e,t){if(this.removeExtension(e),"string"==typeof e)try{u.extension(e,t),this.converter&&this.converter.addExtension(e)}catch(e){console.log(e)}},removeExtension:function(e){if("string"==typeof e){if(this.converter){var t=null;try{t=u.extension(e)}catch(e){console.log(e)}if(!t)return;this.converter.removeExtension(t)}u.removeExtension(e)}},addAsyncExtension:function(e,t){if(this.removeAsyncExtension(e),"string"==typeof e)try{u.asyncExtension(e,t),this.converter&&this.converter.addAsyncExtension(e)}catch(e){console.log(e)}},removeAsyncExtension:function(e){if("string"==typeof e){if(this.converter){var t=null;try{t=u.asyncExtension(e)}catch(e){console.log(e)}if(!t)return;this.converter.removeAsyncExtension(t)}u.removeAsyncExtension(e)}},setCDN:function(e,t,n){"string"==typeof e&&e&&y.setCDN(e,t,n)},setShowdownFlavor:function(e){this.initDefaultOptions(),e&&(-1===Ms.indexOf(e)&&(e="github"),this.defaultOptions.showdown.flavor=e,this.setFlavor(e))},setShowdownOptions:function(e){return this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.showdown=Object.assign(this.defaultOptions.showdown||{},e),this.setShowdownFlavor(this.defaultOptions.showdown.flavor),this.addOptions(this.defaultOptions.showdown),this.defaultOptions.showdown},setPlantumlOptions:function(e){this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.plantuml=Object.assign(this.defaultOptions.plantuml||{},e);var t=this.defaultOptions.plantuml.imageFormat;return t&&-1===Ds.indexOf(t)&&(this.defaultOptions.plantuml.imageFormat="png"),this.converter&&this.addAsyncExtension("showdown-plantuml",Wo(this.defaultOptions.plantuml)),this.defaultOptions.plantuml},setMermaidOptions:function(e){this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.mermaid=Object.assign(this.defaultOptions.mermaid||{},e);var t=this.defaultOptions.mermaid.theme;return t&&-1===Os.indexOf(t)&&(this.defaultOptions.mermaid.theme="default"),this.converter&&this.addAsyncExtension("showdown-mermaid",Qe(this.defaultOptions.mermaid)),this.defaultOptions.mermaid},setKatexOptions:function(e){return this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.katex=Object.assign(this.defaultOptions.katex||{},e),this.converter&&this.addAsyncExtension("showdown-katex",Ne(this.defaultOptions.katex)),this.defaultOptions.katex},setVegaOptions:function(e){this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.vega=Object.assign(this.defaultOptions.vega||{},e);var t=this.defaultOptions.vega.theme;t&&-1===Ts.indexOf(t)&&(this.defaultOptions.vega.theme="vox");var n=this.defaultOptions.vega.renderer;return n&&-1===Rs.indexOf(n)&&(this.defaultOptions.vega.renderer="canvas"),this.converter&&this.addAsyncExtension("showdown-vega",J(this.defaultOptions.vega)),this.defaultOptions.vega},init:function(e){if(this.converter){var t={};if("object"===i(t="boolean"==typeof e&&e?{option:!0,extension:!0}:e)){if(t.hasOwnProperty("option")&&t.option){var n=Cs(this.defaultOptions&&this.defaultOptions.showdown||{});this.addOptions(n)}t.hasOwnProperty("extension")&&t.extension&&(this.addAsyncExtension("showdown-plantuml",Wo(this.defaultOptions.plantuml)),this.addAsyncExtension("showdown-mermaid",Qe(this.defaultOptions.mermaid)),this.addAsyncExtension("showdown-vega",J(this.defaultOptions.vega)))}}else{var a=Cs(this.defaultOptions&&this.defaultOptions.showdown||{}),o=function(e){var t=r({"showdown-toc":T,"showdown-align":K,"showdown-footnotes":vs,"showdown-container":ys,"showdown-sequence":cs},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),n=[];for(var a in t)t.hasOwnProperty(a)&&(u.extension(a,t[a]),n.push(a));return n}(this.defaultOptions,this.defaultExtensions),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e&&e.mermaid||{},a=e&&e.katex||{},i=e&&e.vega||{},o=r({"showdown-plantuml":Wo(e&&e.plantuml||{}),"showdown-mermaid":Qe(n),"showdown-katex":Ne(a),"showdown-flowchart":Ps,"showdown-viz":q,"showdown-vega":J(i),"showdown-wavedrom":bs,"showdown-railroad":ns,"showdown-abc":z,"showdown-echarts":$e},t),s=[];for(var l in o)o.hasOwnProperty(l)&&(u.asyncExtension(l,o[l]),s.push(l));return s}(this.defaultOptions,this.defaultAsyncExtensions);this.setFlavor(a.flavor),this.converter=new u.Converter({extensions:o}).initConvertExtObj(a.flavor,s),this.addOptions(a)}return this},makeHtml:function(e,t){var n="";if("object"===i(e)){if("string"==typeof e.content)if("string"==typeof e.type)if("zip"===e.type)n=this.zDecode(e.content);else n=this.markdownDecodeFilter(e)||e.content;else n=e.content}else n=e;if(this.converter&&n){var r=function(e,t,n){var r=e.querySelector(t),a="";if(r)a=r.dataset.css;else{var o;try{o=u.extension(n)}catch(e){}if(!o)try{o=u.asyncExtension(n)}catch(e){}if(o)if(Array.isArray(o)){for(var s=0;o.length>s;++s)if(o[s].hasOwnProperty("config")&&o[s].config.hasOwnProperty("cssLink")){a=o[s].config.cssLink;break}}else"object"===i(o)&&o.hasOwnProperty("config")&&o.config.hasOwnProperty("cssLink")&&(a=o.config.cssLink)}return a};return this.converter.asyncMakeHtml(n,(function(e){var n=e.wrapper;return!!n&&new Promise((function(a){var i=r(n,".css-katex","showdown-katex"),o=r(n,".css-sequence","showdown-sequence"),s=r(n,".css-railroad","showdown-railroad");return e.cssTypes={hasKatex:!!i,hasSequence:!!o,hasRailroad:!!s,css:{katex:i,sequence:o,railroad:s}},"function"==typeof t&&t&&t(e.cssTypes),a(e)}))})).then((function(e){return{html:n="
".concat(e.html,"
"),scripts:e.scripts}}))}return Promise.reject(n?"Converter is invaild.":"Content is empty.")},completedHtml:function(e){return u.helper.isArray(e)||(e=[e]),new Promise((function(t,n){for(var r=0;e.length>r;++r){var a=e[r];if(!zs(a.id,a.code))return n("Args is invaild!")}t(!0)}))},zDecode:function(e){return""+Ro.inflateRawSync(pt.from(e,"base64"))},zEncode:function(e){return Ro.deflateRawSync(e,{level:9}).toString("base64")}};return Ns})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).showdowns=t()}(this,(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var r=1;arguments.length>r;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?n(Object(a),!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function a(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(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(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l={exports:{}};!function(e){(function(){function t(e){var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r].defaultValue);return n}var n={},r={},a={},i=t(!0),o="vanilla",s={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:function(){var e=t(!0),n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=!0);return n}()};function l(e,t){var r=t?"Error in "+t+" extension->":"Error in unnamed extension",a={valid:!0,error:""};n.helper.isArray(e)||(e=[e]);for(var i=0;e.length>i;++i){var o=r+" sub-extension "+i+": ",s=e[i];if("object"!=typeof s)return a.valid=!1,a.error=o+"must be an object, but "+typeof s+" given",a;if(!n.helper.isString(s.type))return a.valid=!1,a.error=o+'property "type" must be a string, but '+typeof s.type+" given",a;var l=s.type=s.type.toLowerCase();if("language"===l&&(l=s.type="lang"),"html"===l&&(l=s.type="output"),"lang"!==l&&"output"!==l&&"listener"!==l)return a.valid=!1,a.error=o+"type "+l+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',a;if("listener"===l){if(n.helper.isUndefined(s.listeners))return a.valid=!1,a.error=o+'. Extensions of type "listener" must have a property called "listeners"',a}else if(n.helper.isUndefined(s.filter)&&n.helper.isUndefined(s.regex))return a.valid=!1,a.error=o+l+' extensions must define either a "regex" property or a "filter" method',a;if(s.listeners){if("object"!=typeof s.listeners)return a.valid=!1,a.error=o+'"listeners" property must be an object but '+typeof s.listeners+" given",a;for(var u in s.listeners)if(s.listeners.hasOwnProperty(u)&&"function"!=typeof s.listeners[u])return a.valid=!1,a.error=o+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+u+" must be a function but "+typeof s.listeners[u]+" given",a}if(s.filter){if("function"!=typeof s.filter)return a.valid=!1,a.error=o+'"filter" must be a function, but '+typeof s.filter+" given",a}else if(s.regex){if(n.helper.isString(s.regex)&&(s.regex=RegExp(s.regex,"g")),!(s.regex instanceof RegExp))return a.valid=!1,a.error=o+'"regex" property must either be a string or a RegExp object, but '+typeof s.regex+" given",a;if(n.helper.isUndefined(s.replace))return a.valid=!1,a.error=o+'"regex" extensions must implement a replace string or function',a}}return a}function u(e,t){return"¨E"+t.charCodeAt(0)+"E"}n.helper={},n.extensions={},n.setOption=function(e,t){return i[e]=t,this},n.getOption=function(e){return i[e]},n.getOptions=function(){return i},n.resetOptions=function(){i=t(!0)},n.setFlavor=function(e){if(!s.hasOwnProperty(e))throw Error(e+" flavor was not found");n.resetOptions();var t=s[e];for(var r in o=e,t)t.hasOwnProperty(r)&&(i[r]=t[r])},n.getFlavor=function(){return o},n.getFlavorOptions=function(e){if(s.hasOwnProperty(e))return s[e]},n.getDefaultOptions=function(e){return t(e)},n.subParser=function(e,t){if(n.helper.isString(e)){if(void 0===t){if(r.hasOwnProperty(e))return r[e];throw Error("SubParser named "+e+" not registered!")}r[e]=t}},n.extension=function(e,t){if(!n.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=n.helper.stdExtName(e),n.helper.isUndefined(t)){if(!a.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return a[e]}"function"==typeof t&&(t=t()),n.helper.isArray(t)||(t=[t]);var r=l(t,e);if(!r.valid)throw Error(r.error);a[e]=t},n.getAllExtensions=function(){return a},n.removeExtension=function(e){delete a[e]},n.resetExtensions=function(){a={}},n.validateExtension=function(e){var t=l(e,null);return!!t.valid||(console.warn(t.error),!1)},n.hasOwnProperty("helper")||(n.helper={}),n.helper.isString=function(e){return"string"==typeof e||e instanceof String},n.helper.isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)},n.helper.isArray=function(e){return Array.isArray(e)},n.helper.isUndefined=function(e){return void 0===e},n.helper.forEach=function(e,t){if(n.helper.isUndefined(e))throw Error("obj param is required");if(n.helper.isUndefined(t))throw Error("callback param is required");if(!n.helper.isFunction(t))throw Error("callback param must be a function/closure");if("function"==typeof e.forEach)e.forEach(t);else if(n.helper.isArray(e))for(var r=0;e.length>r;r++)t(e[r],r,e);else{if("object"!=typeof e)throw Error("obj does not seem to be an array or an iterable object");for(var a in e)e.hasOwnProperty(a)&&t(e[a],a,e)}},n.helper.stdExtName=function(e){return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},n.helper.escapeCharactersCallback=u,n.helper.escapeCharacters=function(e,t,n){var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var a=RegExp(r,"g");return e=e.replace(a,u)},n.helper.unescapeHTMLEntities=function(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")};var c=function(e,t,n,r){var a,i,o,s,l,u=r||"",c=u.indexOf("g")>-1,d=RegExp(t+"|"+n,"g"+u.replace(/g/g,"")),h=RegExp(t,u.replace(/g/g,"")),f=[];do{for(a=0;o=d.exec(e);)if(h.test(o[0]))a++||(s=(i=d.lastIndex)-o[0].length);else if(a){if(! --a)if(f.push({left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:l=o.index+o[0].length},wholeMatch:{start:s,end:l}}),!c)return f}}while(a&&(d.lastIndex=i));return f};n.helper.matchRecursiveRegExp=function(e,t,n,r){for(var a=c(e,t,n,r),i=[],o=0;a.length>o;++o)i.push([e.slice(a[o].wholeMatch.start,a[o].wholeMatch.end),e.slice(a[o].match.start,a[o].match.end),e.slice(a[o].left.start,a[o].left.end),e.slice(a[o].right.start,a[o].right.end)]);return i},n.helper.replaceRecursiveRegExp=function(e,t,r,a,i){if(!n.helper.isFunction(t)){var o=t;t=function(){return o}}var s=c(e,r,a,i),l=e,u=s.length;if(u>0){var d=[];0!==s[0].wholeMatch.start&&d.push(e.slice(0,s[0].wholeMatch.start));for(var h=0;u>h;++h)d.push(t(e.slice(s[h].wholeMatch.start,s[h].wholeMatch.end),e.slice(s[h].match.start,s[h].match.end),e.slice(s[h].left.start,s[h].left.end),e.slice(s[h].right.start,s[h].right.end))),u-1>h&&d.push(e.slice(s[h].wholeMatch.end,s[h+1].wholeMatch.start));e.length>s[u-1].wholeMatch.end&&d.push(e.slice(s[u-1].wholeMatch.end)),l=d.join("")}return l},n.helper.regexIndexOf=function(e,t,r){if(!n.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(t instanceof RegExp==!1)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var a=e.substring(r||0).search(t);return 0>a?a:a+(r||0)},n.helper.splitAtIndex=function(e,t){if(!n.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},n.helper.encodeEmailAddress=function(e){var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,(function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var n=Math.random();e=n>.9?t[2](e):n>.45?t[1](e):t[0](e)}return e}))},n.helper.padEnd=function(e,t,n){return n=(n||" ")+"",e.length>(t|=0)?e+"":((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),e+""+n.slice(0,t))},void 0===console&&(console={warn:function(e){alert(e)},log:function(e){alert(e)},error:function(e){throw e}}),n.helper.regexes={asteriskDashAndColon:/([*_:~])/g},n.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:"S"},n.Converter=function(e){var t={},r=[],u=[],c={},d=o,h={parsed:{},raw:"",format:""};function f(e,t){if(t=t||null,n.helper.isString(e)){if(t=e=n.helper.stdExtName(e),n.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new n.Converter));n.helper.isArray(e)||(e=[e]);var a=l(e,t);if(!a.valid)throw Error(a.error);for(var i=0;e.length>i;++i)switch(e[i].type){case"lang":r.push(e[i]);break;case"output":u.push(e[i]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}(n.extensions[e],e);if(n.helper.isUndefined(a[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=a[e]}"function"==typeof e&&(e=e()),n.helper.isArray(e)||(e=[e]);var i=l(e,t);if(!i.valid)throw Error(i.error);for(var o=0;e.length>o;++o){switch(e[o].type){case"lang":r.push(e[o]);break;case"output":u.push(e[o])}if(e[o].hasOwnProperty("listeners"))for(var s in e[o].listeners)e[o].listeners.hasOwnProperty(s)&&p(s,e[o].listeners[s])}}function p(e,t){if(!n.helper.isString(e))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof e+" given");if("function"!=typeof t)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof t+" given");c.hasOwnProperty(e)||(c[e]=[]),c[e].push(t)}!function(){for(var r in e=e||{},i)i.hasOwnProperty(r)&&(t[r]=i[r]);if("object"!=typeof e)throw Error("Converter expects the passed parameter to be an object, but "+typeof e+" was passed instead.");for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);t.extensions&&n.helper.forEach(t.extensions,f)}(),this._dispatch=function(e,t,n,r){if(c.hasOwnProperty(e))for(var a=0;c[e].length>a;++a){var i=c[e][a](e,t,this,n,r);i&&void 0!==i&&(t=i)}return t},this.listen=function(e,t){return p(e,t),this},this.makeHtml=function(e){if(!e)return e;var a={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:r,outputModifiers:u,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return e=(e=(e=(e=(e=e.replace(/¨/g,"¨T")).replace(/\$/g,"¨D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g," "),t.smartIndentationFix&&(e=function(e){var t=e.match(/^\s*/)[0].length,n=RegExp("^\\s{0,"+t+"}","gm");return e.replace(n,"")}(e)),e="\n\n"+e+"\n\n",e=(e=n.subParser("detab")(e,t,a)).replace(/^[ \t]+$/gm,""),n.helper.forEach(r,(function(r){e=n.subParser("runExtension")(r,e,t,a)})),e=n.subParser("metadata")(e,t,a),e=n.subParser("hashPreCodeTags")(e,t,a),e=n.subParser("githubCodeBlocks")(e,t,a),e=n.subParser("hashHTMLBlocks")(e,t,a),e=n.subParser("hashCodeTags")(e,t,a),e=n.subParser("stripLinkDefinitions")(e,t,a),e=n.subParser("blockGamut")(e,t,a),e=n.subParser("unhashHTMLSpans")(e,t,a),e=(e=(e=n.subParser("unescapeSpecialChars")(e,t,a)).replace(/¨D/g,"$$")).replace(/¨T/g,"¨"),e=n.subParser("completeHTMLDocument")(e,t,a),n.helper.forEach(u,(function(r){e=n.subParser("runExtension")(r,e,t,a)})),h=a.metadata,e},this.makeMarkdown=this.makeMd=function(e,t){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+¨NBSP;<"),!t){if(!window||!window.document)throw Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var a={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],a=0;t.length>a;++a)if(1===t[a].childElementCount&&"code"===t[a].firstChild.tagName.toLowerCase()){var i=t[a].firstChild.innerHTML.trim(),o=t[a].firstChild.getAttribute("data-language")||"";if(""===o)for(var s=t[a].firstChild.className.split(" "),l=0;s.length>l;++l){var u=s[l].match(/^language-(.+)$/);if(null!==u){o=u[1];break}}i=n.helper.unescapeHTMLEntities(i),r.push(i),t[a].outerHTML=''}else r.push(t[a].innerHTML),t[a].innerHTML="",t[a].setAttribute("prenum",""+a);return r}(r)};!function e(t){for(var n=0;t.childNodes.length>n;++n){var r=t.childNodes[n];3===r.nodeType?/\S/.test(r.nodeValue)||/^[ ]+$/.test(r.nodeValue)?(r.nodeValue=r.nodeValue.split("\n").join(" "),r.nodeValue=r.nodeValue.replace(/(\s)+/g,"$1")):(t.removeChild(r),--n):1===r.nodeType&&e(r)}}(r);for(var i=r.childNodes,o="",s=0;i.length>s;s++)o+=n.subParser("makeMarkdown.node")(i[s],a);return o},this.setOption=function(e,n){t[e]=n},this.getOption=function(e){return t[e]},this.getOptions=function(){return t},this.addExtension=function(e,t){f(e,t=t||null)},this.useExtension=function(e){f(e)},this.setFlavor=function(e){if(!s.hasOwnProperty(e))throw Error(e+" flavor was not found");var n=s[e];for(var r in d=e,n)n.hasOwnProperty(r)&&(t[r]=n[r])},this.getFlavor=function(){return d},this.removeExtension=function(e){n.helper.isArray(e)||(e=[e]);for(var t=0;e.length>t;++t){for(var a=e[t],i=0;r.length>i;++i)r[i]===a&&r.splice(i,1);for(var o=0;u.length>o;++o)u[o]===a&&u.splice(o,1)}},this.getAllExtensions=function(){return{language:r,output:u}},this.getMetadata=function(e){return e?h.raw:h.parsed},this.getMetadataFormat=function(){return h.format},this._setMetadataPair=function(e,t){h.parsed[e]=t},this._setMetadataFormat=function(e){h.format=e},this._setMetadataRaw=function(e){h.raw=e}},n.subParser("anchors",(function(e,t,r){var a=function(e,a,i,o,s,l,u){if(n.helper.isUndefined(u)&&(u=""),i=i.toLowerCase(),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)o="";else if(!o){if(i||(i=a.toLowerCase().replace(/ ?\n/g," ")),o="#"+i,n.helper.isUndefined(r.gUrls[i]))return e;o=r.gUrls[i],n.helper.isUndefined(r.gTitles[i])||(u=r.gTitles[i])}var c='"};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,a)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,a)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,a)).replace(/\[([^\[\]]+)]()()()()()/g,a),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(e,r,a,i,o){if("\\"===a)return r+i;if(!n.helper.isString(t.ghMentionsLink))throw Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,o),l="";return t.openLinksInNewWindow&&(l=' rel="noopener noreferrer" target="¨E95Eblank"'),r+'"+i+""}))),e=r.converter._dispatch("anchors.after",e,t,r)}));var d=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,f=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,p=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,g=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,m=function(e){return function(t,r,a,i,o,s,l){var u=a=a.replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback),c="",d="",h=r||"",f=l||"";return/^www\./i.test(a)&&(a=a.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(c=s),e.openLinksInNewWindow&&(d=' rel="noopener noreferrer" target="¨E95Eblank"'),h+'"+u+""+c+f}},_=function(e,t){return function(r,a,i){var o="mailto:";return a=a||"",i=n.subParser("unescapeSpecialChars")(i,e,t),e.encodeEmails?(o=n.helper.encodeEmailAddress(o+i),i=n.helper.encodeEmailAddress(i)):o+=i,a+''+i+""}};n.subParser("autoLinks",(function(e,t,n){return e=(e=(e=n.converter._dispatch("autoLinks.before",e,t,n)).replace(f,m(t))).replace(g,_(t,n)),e=n.converter._dispatch("autoLinks.after",e,t,n)})),n.subParser("simplifiedAutoLinks",(function(e,t,n){return t.simplifiedAutoLink?(e=(e=(e=n.converter._dispatch("simplifiedAutoLinks.before",e,t,n)).replace(t.excludeTrailingPunctuationFromURLs?h:d,m(t))).replace(p,_(t,n)),e=n.converter._dispatch("simplifiedAutoLinks.after",e,t,n)):e})),n.subParser("blockGamut",(function(e,t,r){return e=r.converter._dispatch("blockGamut.before",e,t,r),e=n.subParser("blockQuotes")(e,t,r),e=n.subParser("headers")(e,t,r),e=n.subParser("horizontalRule")(e,t,r),e=n.subParser("lists")(e,t,r),e=n.subParser("codeBlocks")(e,t,r),e=n.subParser("tables")(e,t,r),e=n.subParser("hashHTMLBlocks")(e,t,r),e=n.subParser("paragraphs")(e,t,r),e=r.converter._dispatch("blockGamut.after",e,t,r)})),n.subParser("blockQuotes",(function(e,t,r){e=r.converter._dispatch("blockQuotes.before",e,t,r);var a=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(a=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=(e+="\n\n").replace(a,(function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=n.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=n.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*
[^\r]+?<\/pre>)/gm,(function(e,t){var n=t;return n=(n=n.replace(/^  /gm,"¨0")).replace(/¨0/g,"")})),n.subParser("hashBlock")("
\n"+e+"\n
",t,r)})),e=r.converter._dispatch("blockQuotes.after",e,t,r)})),n.subParser("codeBlocks",(function(e,t,r){e=r.converter._dispatch("codeBlocks.before",e,t,r);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,a,i){var o=a,s=i,l="\n";return o=n.subParser("outdent")(o,t,r),o=n.subParser("encodeCode")(o,t,r),o=(o=(o=n.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(l=""),o="
"+o+l+"
",n.subParser("hashBlock")(o,t,r)+s}))).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)})),n.subParser("codeSpans",(function(e,t,r){return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,a,i,o){var s=o;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=a+""+(s=n.subParser("encodeCode")(s,t,r))+"",s=n.subParser("hashHTMLSpans")(s,t,r)})),e=r.converter._dispatch("codeSpans.after",e,t,r)})),n.subParser("completeHTMLDocument",(function(e,t,n){if(!t.completeHTMLDocument)return e;e=n.converter._dispatch("completeHTMLDocument.before",e,t,n);var r="html",a="\n",i="",o='\n',s="",l="";for(var u in void 0!==n.metadata.parsed.doctype&&(a="\n","html"!==(r=(""+n.metadata.parsed.doctype).toLowerCase())&&"html5"!==r||(o='')),n.metadata.parsed)if(n.metadata.parsed.hasOwnProperty(u))switch(u.toLowerCase()){case"doctype":break;case"title":i=""+n.metadata.parsed.title+"\n";break;case"charset":o="html"===r||"html5"===r?'\n':'\n';break;case"language":case"lang":s=' lang="'+n.metadata.parsed[u]+'"',l+='\n';break;default:l+='\n'}return e=a+"\n\n"+i+o+l+"\n\n"+e.trim()+"\n\n",e=n.converter._dispatch("completeHTMLDocument.after",e,t,n)})),n.subParser("detab",(function(e,t,n){return e=(e=(e=(e=(e=(e=n.converter._dispatch("detab.before",e,t,n)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,(function(e,t){for(var n=t,r=4-n.length%4,a=0;r>a;a++)n+=" ";return n}))).replace(/¨A/g," ")).replace(/¨B/g,""),e=n.converter._dispatch("detab.after",e,t,n)})),n.subParser("ellipsis",(function(e,t,n){return t.ellipsis?(e=(e=n.converter._dispatch("ellipsis.before",e,t,n)).replace(/\.\.\./g,"…"),e=n.converter._dispatch("ellipsis.after",e,t,n)):e})),n.subParser("emoji",(function(e,t,r){if(!t.emoji)return e;return e=(e=r.converter._dispatch("emoji.before",e,t,r)).replace(/:([\S]+?):/g,(function(e,t){return n.helper.emojis.hasOwnProperty(t)?n.helper.emojis[t]:e})),e=r.converter._dispatch("emoji.after",e,t,r)})),n.subParser("encodeAmpsAndAngles",(function(e,t,n){return e=(e=(e=(e=(e=n.converter._dispatch("encodeAmpsAndAngles.before",e,t,n)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&")).replace(/<(?![a-z\/?$!])/gi,"<")).replace(//g,">"),e=n.converter._dispatch("encodeAmpsAndAngles.after",e,t,n)})),n.subParser("encodeBackslashEscapes",(function(e,t,r){return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,n.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)})),n.subParser("encodeCode",(function(e,t,r){return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)})),n.subParser("escapeSpecialCharsWithinTagAttributes",(function(e,t,r){return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,n.helper.escapeCharactersCallback)}))).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(e){return e.replace(/([\\`*_~=|])/g,n.helper.escapeCharactersCallback)})),e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)})),n.subParser("githubCodeBlocks",(function(e,t,r){return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,a,i,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=n.subParser("encodeCode")(o,t,r),o="
"+(o=(o=(o=n.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
",o=n.subParser("hashBlock")(o,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"}))).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e})),n.subParser("hashBlock",(function(e,t,n){return e=(e=n.converter._dispatch("hashBlock.before",e,t,n)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n",e=n.converter._dispatch("hashBlock.after",e,t,n)})),n.subParser("hashCodeTags",(function(e,t,r){e=r.converter._dispatch("hashCodeTags.before",e,t,r);return e=n.helper.replaceRecursiveRegExp(e,(function(e,a,i,o){var s=i+n.subParser("encodeCode")(a,t,r)+o;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"}),"]*>","","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)})),n.subParser("hashElement",(function(e,t,n){return function(e,t){var r=t;return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),r="\n\n¨K"+(n.gHtmlBlocks.push(r)-1)+"K\n\n"}})),n.subParser("hashHTMLBlocks",(function(e,t,r){e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var a=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],i=function(e,t,n,a){var i=e;return-1!==n.search(/\bmarkdown\b/)&&(i=n+r.converter.makeHtml(t)+a),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"<"+t+">"})));for(var o=0;34>o;++o)for(var s,l=RegExp("^ {0,3}(<"+a[o]+"\\b[^>]*>)","im"),u="<"+a[o]+"\\b[^>]*>",c="";-1!==(s=n.helper.regexIndexOf(e,l));){var d=n.helper.splitAtIndex(e,s),h=n.helper.replaceRecursiveRegExp(d[1],i,u,c,"im");if(h===d[1])break;e=d[0].concat(h)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,t,r)),e=(e=n.helper.replaceRecursiveRegExp(e,(function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)})),n.subParser("hashHTMLSpans",(function(e,t,n){function r(e){return"¨C"+(n.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=n.converter._dispatch("hashHTMLSpans.before",e,t,n)).replace(/<[^>]+?\/>/gi,(function(e){return r(e)}))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<[^>]+?>/gi,(function(e){return r(e)})),e=n.converter._dispatch("hashHTMLSpans.after",e,t,n)})),n.subParser("unhashHTMLSpans",(function(e,t,n){e=n.converter._dispatch("unhashHTMLSpans.before",e,t,n);for(var r=0;n.gHtmlSpans.length>r;++r){for(var a=n.gHtmlSpans[r],i=0;/¨C(\d+)C/.test(a);){var o=RegExp.$1;if(a=a.replace("¨C"+o+"C",n.gHtmlSpans[o]),10===i){console.error("maximum nesting of 10 spans reached!!!");break}++i}e=e.replace("¨C"+r+"C",a)}return e=n.converter._dispatch("unhashHTMLSpans.after",e,t,n)})),n.subParser("hashPreCodeTags",(function(e,t,r){e=r.converter._dispatch("hashPreCodeTags.before",e,t,r);return e=n.helper.replaceRecursiveRegExp(e,(function(e,a,i,o){var s=i+n.subParser("encodeCode")(a,t,r)+o;return"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:s})-1)+"G\n\n"}),"^ {0,3}]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)})),n.subParser("headers",(function(e,t,r){e=r.converter._dispatch("headers.before",e,t,r);var a=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),i=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;function o(e){var a,i;if(t.customizedHeaderId){var o=e.match(/\{([^{]+?)}\s*$/);o&&o[1]&&(e=o[1])}return a=e,i=n.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(a=i+a),a=t.ghCompatibleHeaderId?a.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?a.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():a.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(a=i+a),r.hashLinkCounts[a]?a=a+"-"+r.hashLinkCounts[a]++:r.hashLinkCounts[a]=1,a}return e=(e=(e=e.replace(t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,(function(e,i){var s=n.subParser("spanGamut")(i,t,r),l=t.noHeaderId?"":' id="'+o(i)+'"',u=""+s+"";return n.subParser("hashBlock")(u,t,r)}))).replace(i,(function(e,i){var s=n.subParser("spanGamut")(i,t,r),l=t.noHeaderId?"":' id="'+o(i)+'"',u=a+1,c=""+s+"";return n.subParser("hashBlock")(c,t,r)}))).replace(t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm,(function(e,i,s){var l=s;t.customizedHeaderId&&(l=s.replace(/\s?\{([^{]+?)}\s*$/,""));var u=n.subParser("spanGamut")(l,t,r),c=t.noHeaderId?"":' id="'+o(s)+'"',d=a-1+i.length,h=""+u+"";return n.subParser("hashBlock")(h,t,r)})),e=r.converter._dispatch("headers.after",e,t,r)})),n.subParser("horizontalRule",(function(e,t,r){e=r.converter._dispatch("horizontalRule.before",e,t,r);var a=n.subParser("hashBlock")("
",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,a),e=r.converter._dispatch("horizontalRule.after",e,t,r)})),n.subParser("images",(function(e,t,r){function a(e,t,a,i,o,s,l,u){var c=r.gUrls,d=r.gTitles,h=r.gDimensions;if(a=a.toLowerCase(),u||(u=""),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)i="";else if(""===i||null===i){if(""!==a&&null!==a||(a=t.toLowerCase().replace(/ ?\n/g," ")),i="#"+a,n.helper.isUndefined(c[a]))return e;i=c[a],n.helper.isUndefined(d[a])||(u=d[a]),n.helper.isUndefined(h[a])||(o=h[a].width,s=h[a].height)}t=t.replace(/"/g,""").replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback);var f=''+t+'"}return e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,a)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,n,r,i,o,s,l){return a(e,t,n,r=r.replace(/\s/g,""),i,o,s,l)})),e=(e=(e=e.replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,a)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,a)).replace(/!\[([^\[\]]+)]()()()()()/g,a),e=r.converter._dispatch("images.after",e,t,r)})),n.subParser("italicsAndBold",(function(e,t,n){function r(e,t,n){return t+e+n}return e=n.converter._dispatch("italicsAndBold.before",e,t,n),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return r(t,"","")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return r(t,"","")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return r(t,"","")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e})),e=n.converter._dispatch("italicsAndBold.after",e,t,n)})),n.subParser("lists",(function(e,t,r){function a(e,a){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var i=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(i=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=e.replace(i,(function(e,a,i,s,l,u,c){c=c&&""!==c.trim();var d=n.subParser("outdent")(l,t,r),h="";return u&&t.tasklists&&(h=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='-1?(d=n.subParser("githubCodeBlocks")(d,t,r),d=n.subParser("blockGamut")(d,t,r)):(d=(d=n.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=n.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=o?n.subParser("paragraphs")(d,t,r):n.subParser("spanGamut")(d,t,r)),d=""+(d=d.replace("¨A",""))+"\n"})),e=e.replace(/¨0/g,""),r.gListLevel--,a&&(e=e.replace(/\s+$/,"")),e}function i(e,t){if("ol"===t){var n=e.match(/^ *(\d+)\./);if(n&&"1"!==n[1])return' start="'+n[1]+'"'}return""}function o(e,n,r){var o=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===n?o:s,u="";if(-1!==e.search(l))!function t(c){var d=c.search(l),h=i(e,n);-1!==d?(u+="\n\n<"+n+h+">\n"+a(c.slice(0,d),!!r)+"\n",l="ul"===(n="ul"===n?"ol":"ul")?o:s,t(c.slice(d))):u+="\n\n<"+n+h+">\n"+a(c,!!r)+"\n"}(e);else{var c=i(e,n);u="\n\n<"+n+c+">\n"+a(e,!!r)+"\n"}return u}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n){return o(t,n.search(/[*+-]/g)>-1?"ul":"ol",!0)})):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n,r){return o(n,r.search(/[*+-]/g)>-1?"ul":"ol",!1)}))).replace(/¨0/,""),e=r.converter._dispatch("lists.after",e,t,r)})),n.subParser("metadata",(function(e,t,n){if(!t.metadata)return e;function r(e){n.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(e,t,r){return n.metadata.parsed[t]=r,""}))}return e=(e=(e=n.converter._dispatch("metadata.before",e,t,n)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,(function(e,t,n){return r(n),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(e,t,a){return t&&(n.metadata.format=t),r(a),"¨M"})),e=e.replace(/¨M/g,""),e=n.converter._dispatch("metadata.after",e,t,n)})),n.subParser("outdent",(function(e,t,n){return e=(e=(e=n.converter._dispatch("outdent.before",e,t,n)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),e=n.converter._dispatch("outdent.after",e,t,n)})),n.subParser("paragraphs",(function(e,t,r){for(var a=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),i=[],o=a.length,s=0;o>s;s++){var l=a[s];0>l.search(/¨(K|G)(\d+)\1/g)?0>l.search(/\S/)||(l=(l=n.subParser("spanGamut")(l,t,r)).replace(/^([ \t]*)/g,"

"),i.push(l+="

")):i.push(l)}for(o=i.length,s=0;o>s;s++){for(var u="",c=i[s],d=!1;/¨(K|G)(\d+)\1/.test(c);){var h=RegExp.$2;u=(u="K"===RegExp.$1?r.gHtmlBlocks[h]:d?n.subParser("encodeCode")(r.ghCodeBlocks[h].text,t,r):r.ghCodeBlocks[h].codeblock).replace(/\$/g,"$$$$"),c=c.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,u),/^]*>\s*]*>/.test(c)&&(d=!0)}i[s]=c}return e=(e=(e=i.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)})),n.subParser("runExtension",(function(e,t,n,r){if(e.filter)t=e.filter(t,r.converter,n);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=RegExp(a,"g")),t=t.replace(a,e.replace)}return t})),n.subParser("spanGamut",(function(e,t,r){return e=r.converter._dispatch("spanGamut.before",e,t,r),e=n.subParser("codeSpans")(e,t,r),e=n.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=n.subParser("encodeBackslashEscapes")(e,t,r),e=n.subParser("images")(e,t,r),e=n.subParser("anchors")(e,t,r),e=n.subParser("autoLinks")(e,t,r),e=n.subParser("simplifiedAutoLinks")(e,t,r),e=n.subParser("emoji")(e,t,r),e=n.subParser("underline")(e,t,r),e=n.subParser("italicsAndBold")(e,t,r),e=n.subParser("strikethrough")(e,t,r),e=n.subParser("ellipsis")(e,t,r),e=n.subParser("hashHTMLSpans")(e,t,r),e=n.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)})),n.subParser("strikethrough",(function(e,t,r){return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,a){return function(e){return t.simplifiedAutoLink&&(e=n.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(a)})),e=r.converter._dispatch("strikethrough.after",e,t,r)),e})),n.subParser("stripLinkDefinitions",(function(e,t,r){var a=function(a,i,o,s,l,u,c){return i=i.toLowerCase(),2>e.toLowerCase().split(i).length-1?a:(r.gUrls[i]=o.match(/^data:.+?\/.+?;base64,/)?o.replace(/\s/g,""):n.subParser("encodeAmpsAndAngles")(o,t,r),u?u+c:(c&&(r.gTitles[i]=c.replace(/"|'/g,""")),t.parseImgDimensions&&s&&l&&(r.gDimensions[i]={width:s,height:l}),""))};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,a)).replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,a)).replace(/¨0/,"")})),n.subParser("tables",(function(e,t,r){if(!t.tables)return e;function a(e,a){return""+n.subParser("spanGamut")(e,t,r)+"\n"}function i(e){var i,o=e.split("\n");for(i=0;o.length>i;++i)/^ {0,3}\|/.test(o[i])&&(o[i]=o[i].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(o[i])&&(o[i]=o[i].replace(/\|[ \t]*$/,"")),o[i]=n.subParser("codeSpans")(o[i],t,r);var s,l,u,c,d=o[0].split("|").map((function(e){return e.trim()})),h=o[1].split("|").map((function(e){return e.trim()})),f=[],p=[],g=[],m=[];for(o.shift(),o.shift(),i=0;o.length>i;++i)""!==o[i].trim()&&f.push(o[i].split("|").map((function(e){return e.trim()})));if(h.length>d.length)return e;for(i=0;h.length>i;++i)g.push(/^:[ \t]*--*$/.test(s=h[i])?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(s)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(s)?' style="text-align:center;"':"");for(i=0;d.length>i;++i)n.helper.isUndefined(g[i])&&(g[i]=""),p.push((u=g[i],c=void 0,c="",l=(l=d[i]).trim(),(t.tablesHeaderId||t.tableHeaderId)&&(c=' id="'+l.replace(/ /g,"_").toLowerCase()+'"'),""+(l=n.subParser("spanGamut")(l,t,r))+"\n"));for(i=0;f.length>i;++i){for(var _=[],w=0;p.length>w;++w)n.helper.isUndefined(f[i][w]),_.push(a(f[i][w],g[w]));m.push(_)}return function(e,t){for(var n="\n\n\n",r=e.length,a=0;r>a;++a)n+=e[a];for(n+="\n\n\n",a=0;t.length>a;++a){n+="\n";for(var i=0;r>i;++i)n+=t[a][i];n+="\n"}return n+"\n
\n"}(p,m)}return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,n.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,i)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,i),e=r.converter._dispatch("tables.after",e,t,r)})),n.subParser("underline",(function(e,t,r){return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return""+t+""}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return""+t+""})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?""+t+"":e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?""+t+"":e}))).replace(/(_)/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e})),n.subParser("unescapeSpecialChars",(function(e,t,n){return e=(e=n.converter._dispatch("unescapeSpecialChars.before",e,t,n)).replace(/¨E(\d+)E/g,(function(e,t){return String.fromCharCode(parseInt(t))})),e=n.converter._dispatch("unescapeSpecialChars.after",e,t,n)})),n.subParser("makeMarkdown.blockquote",(function(e,t){var r="";if(e.hasChildNodes())for(var a=e.childNodes,i=a.length,o=0;i>o;++o){var s=n.subParser("makeMarkdown.node")(a[o],t);""!==s&&(r+=s)}return r="> "+(r=r.trim()).split("\n").join("\n> ")})),n.subParser("makeMarkdown.codeBlock",(function(e,t){var n=e.getAttribute("language"),r=e.getAttribute("precodenum");return"```"+n+"\n"+t.preList[r]+"\n```"})),n.subParser("makeMarkdown.codeSpan",(function(e){return"`"+e.innerHTML+"`"})),n.subParser("makeMarkdown.emphasis",(function(e,t){var r="";if(e.hasChildNodes()){r+="*";for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);r+="*"}return r})),n.subParser("makeMarkdown.header",(function(e,t,r){var a=Array(r+1).join("#"),i="";if(e.hasChildNodes()){i=a+" ";for(var o=e.childNodes,s=o.length,l=0;s>l;++l)i+=n.subParser("makeMarkdown.node")(o[l],t)}return i})),n.subParser("makeMarkdown.hr",(function(){return"---"})),n.subParser("makeMarkdown.image",(function(e){var t="";return e.hasAttribute("src")&&(t+="!["+e.getAttribute("alt")+"](",t+="<"+e.getAttribute("src")+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t})),n.subParser("makeMarkdown.links",(function(e,t){var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var a=e.childNodes,i=a.length;r="[";for(var o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);r+="](",r+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r})),n.subParser("makeMarkdown.list",(function(e,t,r){var a="";if(!e.hasChildNodes())return"";for(var i=e.childNodes,o=i.length,s=e.getAttribute("start")||1,l=0;o>l;++l)if(void 0!==i[l].tagName&&"li"===i[l].tagName.toLowerCase()){a+=("ol"===r?s+". ":"- ")+n.subParser("makeMarkdown.listItem")(i[l],t),++s}return(a+="\n\x3c!-- --\x3e\n").trim()})),n.subParser("makeMarkdown.listItem",(function(e,t){for(var r="",a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);return/\n$/.test(r)?r=r.split("\n").join("\n ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):r+="\n",r})),n.subParser("makeMarkdown.node",(function(e,t,r){r=r||!1;var a="";if(3===e.nodeType)return n.subParser("makeMarkdown.txt")(e,t);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":r||(a=n.subParser("makeMarkdown.header")(e,t,1)+"\n\n");break;case"h2":r||(a=n.subParser("makeMarkdown.header")(e,t,2)+"\n\n");break;case"h3":r||(a=n.subParser("makeMarkdown.header")(e,t,3)+"\n\n");break;case"h4":r||(a=n.subParser("makeMarkdown.header")(e,t,4)+"\n\n");break;case"h5":r||(a=n.subParser("makeMarkdown.header")(e,t,5)+"\n\n");break;case"h6":r||(a=n.subParser("makeMarkdown.header")(e,t,6)+"\n\n");break;case"p":r||(a=n.subParser("makeMarkdown.paragraph")(e,t)+"\n\n");break;case"blockquote":r||(a=n.subParser("makeMarkdown.blockquote")(e,t)+"\n\n");break;case"hr":r||(a=n.subParser("makeMarkdown.hr")(e,t)+"\n\n");break;case"ol":r||(a=n.subParser("makeMarkdown.list")(e,t,"ol")+"\n\n");break;case"ul":r||(a=n.subParser("makeMarkdown.list")(e,t,"ul")+"\n\n");break;case"precode":r||(a=n.subParser("makeMarkdown.codeBlock")(e,t)+"\n\n");break;case"pre":r||(a=n.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":r||(a=n.subParser("makeMarkdown.table")(e,t)+"\n\n");break;case"code":a=n.subParser("makeMarkdown.codeSpan")(e,t);break;case"em":case"i":a=n.subParser("makeMarkdown.emphasis")(e,t);break;case"strong":case"b":a=n.subParser("makeMarkdown.strong")(e,t);break;case"del":a=n.subParser("makeMarkdown.strikethrough")(e,t);break;case"a":a=n.subParser("makeMarkdown.links")(e,t);break;case"img":a=n.subParser("makeMarkdown.image")(e,t);break;default:a=e.outerHTML+"\n\n"}return a})),n.subParser("makeMarkdown.paragraph",(function(e,t){var r="";if(e.hasChildNodes())for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);return r=r.trim()})),n.subParser("makeMarkdown.pre",(function(e,t){var n=e.getAttribute("prenum");return"
"+t.preList[n]+"
"})),n.subParser("makeMarkdown.strikethrough",(function(e,t){var r="";if(e.hasChildNodes()){r+="~~";for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);r+="~~"}return r})),n.subParser("makeMarkdown.strong",(function(e,t){var r="";if(e.hasChildNodes()){r+="**";for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t);r+="**"}return r})),n.subParser("makeMarkdown.table",(function(e,t){var r,a,i="",o=[[],[]],s=e.querySelectorAll("thead>tr>th"),l=e.querySelectorAll("tbody>tr");for(r=0;s.length>r;++r){var u=n.subParser("makeMarkdown.tableCell")(s[r],t),c="---";if(s[r].hasAttribute("style"))switch(s[r].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":c=":---";break;case"text-align:right;":c="---:";break;case"text-align:center;":c=":---:"}o[0][r]=u.trim(),o[1][r]=c}for(r=0;l.length>r;++r){var d=o.push([])-1,h=l[r].getElementsByTagName("td");for(a=0;s.length>a;++a){var f=" ";void 0!==h[a]&&(f=n.subParser("makeMarkdown.tableCell")(h[a],t)),o[d].push(f)}}var p=3;for(r=0;o.length>r;++r)for(a=0;o[r].length>a;++a){var g=o[r][a].length;g>p&&(p=g)}for(r=0;o.length>r;++r){for(a=0;o[r].length>a;++a)o[r][a]=1===r?":"===o[r][a].slice(-1)?n.helper.padEnd(o[r][a].slice(-1),p-1,"-")+":":n.helper.padEnd(o[r][a],p,"-"):n.helper.padEnd(o[r][a],p);i+="| "+o[r].join(" | ")+" |\n"}return i.trim()})),n.subParser("makeMarkdown.tableCell",(function(e,t){var r="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,i=a.length,o=0;i>o;++o)r+=n.subParser("makeMarkdown.node")(a[o],t,!0);return r.trim()})),n.subParser("makeMarkdown.txt",(function(e){var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/¨NBSP;/g," "),t=(t=(t=(t=(t=(t=(t=(t=(t=n.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}));e.exports?e.exports=n:this.showdown=n}).call(o)}(l);var u=s(l.exports);u.ConverterExtObj=function(e,t){var n=[],r=e;function a(e,t){if(t=t||null,u.helper.isString(e)&&(t=u.helper.stdExtName(e),e=u.asyncExtension(t),u.helper.isUndefined(e)))throw Error('Extension "'+t+'" could not be loaded. It was either not found or is not a valid aync extension.');if("function"==typeof e&&(e=e()),u.helper.isArray(e)||(e=[e]),u.validateExtension(e))for(var r=0;e.length>r;++r)if("output"===e[r].type)n.push(e[r])}t&&u.helper.forEach(t,a),this.addAsyncExtension=function(e,t){a(e,t=t||null)},this.removeAsyncExtension=function(e){u.helper.isArray(e)||(e=[e]);for(var t=0;e.length>t;++t)for(var r=e[t],a=0;n.length>a;++a)n[a]===r&&n.splice(a,1)},this.getAsyncExtensions=function(){return n},this.getCurrFlavor=function(){return r},this.setCurrFlavor=function(e){r=e}},u.Converter.prototype.initConvertExtObj=function(e,t){return this.extObj=new u.ConverterExtObj(e,t),this.resetOptions=function(e){e=e||{};var t=u.getOptions(),n=this.getOptions();for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);if("object"===i(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a])},this.setFlavor=function(e){var t=u.getFlavorOptions(e);if(!u.helper.isUndefined(t)){this.extObj.setCurrFlavor(e);var n=u.getDefaultOptions(!0);for(var r in n)n.hasOwnProperty(r)&&(this.getOptions()[r]=n[r]);for(var r in t)t.hasOwnProperty(r)&&(this.getOptions()[r]=t[r])}},this.getFlavor=function(){return this.extObj.getCurrFlavor()},this.addAsyncExtension=function(e,t){this.extObj.addAsyncExtension(e,t)},this.removeAsyncExtension=function(e){this.extObj.removeAsyncExtension(e)},this.removeExtension=function(e){u.helper.isArray(e)||(e=[e]);for(var t=this.getAllExtensions(),n=t.language,r=t.output,a=0;e.length>a;++a){for(var i=e[a],o=0;n.length>o;++o)n[o]===i&&n.splice(o,1);for(var s=0;r.length>s;++s)r[s]===i&&r.splice(s,1)}},this.asyncMakeHtml=function(e,t){var n=this.makeHtml(e),r=this.extObj.getAsyncExtensions();if(!r.length)return Promise.resolve({html:n});var a={outputs:r,converter:this},i=(new DOMParser).parseFromString(n,"text/html"),o=void 0!==i.body?i.body:i,s=this.getOptions(),l=Promise.resolve({wrapper:o,options:s,globals:a,scripts:[]});return r.forEach((function(e){l=l.then((function(t){var n=e.filter(t);return n||t}))})),l.then((function(e){if("function"==typeof t&&t){var n=t(e);if(n instanceof Promise)return n.then((function(e){return{html:e.wrapper.innerHTML,scripts:e.scripts}}))}return{html:e.wrapper.innerHTML,scripts:e.scripts}}))},this},u.subParser("githubCodeBlocks",(function(e,t,n){return t.ghCodeBlocks?(e=n.converter._dispatch("githubCodeBlocks.before",e,t,n),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*?)(?:[ \t]*?)((?:\{[\S\t ]*\}|\[[\S\t ]*\])?)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,r,a,i,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=u.subParser("encodeCode")(o,t,n),o=(o=(o=u.subParser("detab")(o,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""),o="
"+o+s+"
",o=u.subParser("hashBlock")(o,t,n),"\n\n¨G"+(n.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"}))).replace(/¨0/,""),n.converter._dispatch("githubCodeBlocks.after",e,t,n)):e})),u.subParser("tables",(function(e,t,n){if(!t.tables)return e;function r(e){return/^:[ \t]*--*$/.test(e)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(e)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(e)?' style="text-align:center;"':""}function a(e,r,a,i,o){if(t.tablesMerge){var s=function(e,n,r,a){if(a){if(!t.tablesRowspan||"^^"!==a||!n)return;for(var i=n-1;i>=0;--i)if(e[i][r]){if("^^"!==e[i][r])return e[i][r]=e[i][r].replace(/rowspan="[0-9]*"/g,"").replace(/^(\n\r]*?)(>.*<\/td>\n)/,(function(e,t,r){return t+' rowspan="'+(n-i+1)+'"'+r})),a;if(0===i)return e[i][r]='\n',a}else for(var o=r-1;o>=0;-o){if(e[i+1][o]&&"^^"!==e[i+1][o])return;if(e[i][o]){if(!e[i+1][o])return;return e[i][o]=e[i][o].replace(/rowspan="[0-9]*"/g,"").replace(/^(\n\r]*?)(>.*<\/td>\n)/,(function(e,t,r){return t+' rowspan="'+(n-i+1)+'"'+r})),a}}}else if(r)for(o=r-1;o>=0;--o)if(e[n][o]){if("^^"!==e[n][o])return e[n][o]=e[n][o].replace(/colspan="[0-9]*"/g,"").replace(/^(\n\r]*?)(>.*<\/td>\n)/,(function(e,t,n){return t+' colspan="'+(r-o+1)+'"'+n})),a;for(i=n-1;i>=0;--i){if(e[i][o+1])return;if("^^"!==e[i][o])return e[i][o]=e[i][o].replace(/colspan="[0-9]*"/g,"").replace(/^(\n\r]*?)(>.*<\/td>\n)/,(function(e,t,n){return t+' colspan="'+(r-o+1)+'"'+n})),a}}else if(0===o)return e[n][o]='\n',a}(e,r,a,i);if(!u.helper.isUndefined(s))return s}return i=i.trim(),""+u.subParser("spanGamut")(i,t,n)+"\n"}function i(e,i){var o,s=e.split("\n");for(o=0;s.length>o;++o)/^ {0,3}\|/.test(s[o])&&(s[o]=s[o].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(s[o])&&(s[o]=s[o].replace(/\|[ \t]*$/,"")),s[o]=u.subParser("codeSpans")(s[o],t,n);var l,c,d,h=[],f=[],p=[],g=[],m=[];if(i)for(h=s[0].split("|").map((function(e){return e.trim()})),s.shift(),o=0;h.length>o;++o)g.push(r(h[o]));else{var _=s[0].split("|").map((function(e){return e.trim()}));if(h=s[1].split("|").map((function(e){return e.trim()})),s.shift(),s.shift(),h.length>_.length)return e;for(o=0;h.length>o;++o)g.push(r(h[o]));for(o=0;_.length>o;++o)u.helper.isUndefined(g[o])&&(g[o]=""),p.push((c=g[o],d=void 0,d="",l=(l=_[o]).trim(),(t.tablesHeaderId||t.tableHeaderId)&&(d=' id="'+l.replace(/ /g,"_").toLowerCase()+'"'),""+(l=u.subParser("spanGamut")(l,t,n))+"\n"))}for(o=0;s.length>o;++o)""!==s[o].trim()&&f.push(s[o].split("|").map((function(e){var t=e.trim();return""===t&&e.length>0?e:t})));for(o=0;f.length>o;++o){var w=[];m.push(w);for(var b=0;g.length>b;++b)u.helper.isUndefined(f[o][b])&&(f[o][b]=""),w.push(a(m,o,b,f[o][b],g[b]))}return function(e,n,r){var a="\n",i=n.length;if(e.length){a+="\n\n";for(var o=0;e.length>o;++o)a+=e[o];a+="\n\n"}for(a+="\n",o=0;r.length>o;++o){a+="\n";for(var s=0;i>s;++s)t.tablesMerge&&"^^"===r[o][s]||(a+=r[o][s]);a+="\n"}return a+"\n
\n"}(p,g,m)}function o(e){return i(e,!1)}function s(e){return i(e,!0)}return e=(e=(e=(e=n.converter._dispatch("tables.before",e,t,n)).replace(/\\(\|)/g,u.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,o)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,o),t.tablesHeaderless&&(e=(e=e.replace(/^ {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,s)).replace(/^ {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,s)),e=n.converter._dispatch("tables.after",e,t,n)}));var c="vanilla",d={github:{ghCompatibleHeaderId:!1,underline:!0,rawHeaderId:!0,tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},ghost:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},allOn:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0}},h={};u.asyncExtension=function(e,t){if(!u.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=u.helper.stdExtName(e),u.helper.isUndefined(t)){if(!h.hasOwnProperty(e))throw Error("Async Extension named "+e+" is not registered!");return h[e]}"function"==typeof t&&(t=t()),u.helper.isArray(t)||(t=[t]),u.validateExtension(t)&&(h[e]=t)},u.removeAsyncExtension=function(e){e=u.helper.stdExtName(e),delete h[e]},u.resetAsyncExtensions=function(){h={}},u.removeExtension=function(e){e=u.helper.stdExtName(e),delete u.getAllExtensions[e]};var f=u.setFlavor,p=u.getFlavorOptions;function g(e){return"".concat((new Date).Format("yyyy-MM-dd HH:mm:ss.S")," ").concat(e)}u.setFlavor=function(e){try{if(f(e),c=e,!d.hasOwnProperty(e))return}catch(t){if(!d.hasOwnProperty(e))return;u.resetOptions(),c=e}var t=d[e];for(var n in t)t.hasOwnProperty(n)&&(u.getOptions()[n]=t[n])},u.getFlavor=function(){return c},u.setFlavorOptions=function(e,t){t&&(d[e]=Object.assign(d[e]||{},t))},u.getFlavorOptions=function(e){var t=p(e);return u.helper.isUndefined(t)?d.hasOwnProperty(e)?d[e]:void 0:d.hasOwnProperty(e)?Object.assign(t,d[e]):t},Date.prototype.Format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};e||(e="yyyy-MM-dd hh:mm:ss.S");var n=/(y+)/.exec(e);for(var r in n&&(e=e.replace(n[1],(this.getFullYear()+"").substring(4-n[1].length))),t){var a=RegExp("("+r+")").exec(e);if(a){var i=t[r];1==a[1].length?i=("000"+t[r]).substring((""+t[r]).length):2==a[1].length&&(i=("00"+t[r]).substring((""+t[r]).length)),e=e.replace(a[1],i)}}return e};var m="jsdelivr",_="file:"===document.location.protocol?"https://":document.location.protocol+"//",w="",b="",v={local:{ABCJS:"../node_modules/abcjs/dist/abcjs-basic.js",ABCJSCSS:"../node_modules/abcjs/abcjs-audio.css",echarts:"../node_modules/echarts/dist/echarts.js",Viz:"../node_modules/@viz-js/viz/lib/viz-standalone.js",Raphael:"../node_modules/raphael/raphael.min.js",flowchart:"../dist/diagrams/flowchart/flowchart.min.js",mermaid:"../node_modules/mermaid/dist/mermaid.js",katex:"../node_modules/katex/dist/katex.min.js",katexCSS:"../node_modules/katex/dist/katex.min.css",renderMathInElement:"../node_modules/katex/dist/contrib/auto-render.js",railroad:"../node_modules/railroad-diagrams/railroad-diagrams.js",railroadCSS:"../node_modules/railroad-diagrams/railroad-diagrams.css",Snap:"../node_modules/snapsvg/dist/snap.svg-min.js",WebFont:"../node_modules/webfontloader/webfontloader.js",underscore:"../node_modules/underscore/underscore-min.js",sequence:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js",sequenceCSS:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.css",WaveDrom:"../node_modules/wavedrom/wavedrom.min.js",WaveDromSkin:{default:"../node_modules/wavedrom/skins/default.js",lowkey:"../node_modules/wavedrom/skins/lowkey.js",narrow:"../node_modules/wavedrom/skins/narrow.js"},vega:"../node_modules/vega/build/vega.js",vegaLite:"../node_modules/vega-lite/build/vega-lite.js",vegaEmbed:"../node_modules/vega-embed/build/vega-embed.js"},cdnjs:{ABCJS:_+"cdnjs.cloudflare.com/ajax/libs/abcjs/6.4.1/abcjs-basic-min.js",ABCJSCSS:_+"cdnjs.cloudflare.com/ajax/libs/abcjs/abcjs-audio.css",echarts:_+"cdnjs.cloudflare.com/ajax/libs/echarts/5.5.0/echarts.min.js",Viz:_+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:_+"cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js",flowchart:_+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:_+"cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js",katex:_+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.js",katexCSS:_+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.css",renderMathInElement:_+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/contrib/auto-render.js",railroad:_+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.js",railroadCSS:_+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.css",Snap:_+"cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js",WebFont:_+"cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js",underscore:_+"cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js",sequence:_+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:_+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:_+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/wavedrom.min.js",WaveDromSkin:{default:_+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/default.js",lowkey:_+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/lowkey.js",narrow:_+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/narrow.js"},vega:_+"cdnjs.cloudflare.com/ajax/libs/vega/5.30.0/vega.min.js",vegaLite:_+"cdnjs.cloudflare.com/ajax/libs/vega-lite/5.19.0/vega-lite.min.js",vegaEmbed:_+"cdnjs.cloudflare.com/ajax/libs/vega-embed/6.26.0/vega-embed.min.js"},jsdelivr:{ABCJS:_+"cdn.jsdelivr.net/npm/abcjs@6/dist/abcjs-basic-min.js",ABCJSCSS:_+"cdn.jsdelivr.net/npm/abcjs@6/abcjs-audio.css",echarts:_+"cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js",Viz:_+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:_+"cdn.jsdelivr.net/npm/raphael@2/raphael.min.js",flowchart:_+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:_+"cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js",katex:_+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.js",katexCSS:_+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css",renderMathInElement:_+"cdn.jsdelivr.net/npm/katex@0/dist/contrib/auto-render.js",railroad:_+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.js",railroadCSS:_+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.css",Snap:_+"cdn.jsdelivr.net/npm/snapsvg@0/dist/snap.svg-min.js",WebFont:_+"cdn.jsdelivr.net/npm/webfontloader@1/webfontloader.js",underscore:_+"cdn.jsdelivr.net/npm/underscore@1/underscore-min.js",sequence:_+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:_+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:_+"cdn.jsdelivr.net/npm/wavedrom@3/wavedrom.min.js",WaveDromSkin:{default:_+"cdn.jsdelivr.net/npm/wavedrom@3/skins/default.js",lowkey:_+"cdn.jsdelivr.net/npm/wavedrom@3/skins/lowkey.js",narrow:_+"cdn.jsdelivr.net/npm/wavedrom@3/skins/narrow.js"},vega:_+"cdn.jsdelivr.net/npm/vega@5/build/vega.js",vegaLite:_+"cdn.jsdelivr.net/npm/vega-lite@5/build/vega-lite.js",vegaEmbed:_+"cdn.jsdelivr.net/npm/vega-embed@6/build/vega-embed.js"}};function y(e){if("object"===i(e)){var t=Object.keys(e)[0],n=e[t];if("string"==typeof n)return t+"-"+n}return e}function k(e,t){if(v.hasOwnProperty(m)){var n=v[m],r="";if("object"===i(e)){var a=Object.keys(e)[0],o=e[a];n[a]&&"string"==typeof o&&o&&n[a][o]&&(r=n[a][o])}else n[e]&&(r=n[e]);r&&(t=r.substring(0,_.length)===_?r:"../dist/"===r.substring(0,8)?b+r:w+r)}return t}var x={setCDN:function(e,t,n){e in v&&(m=e),"string"==typeof t&&t&&(w=t),"string"==typeof n&&n&&(b=n)},getCDN:function(){return m},getSrc:k,loadScript:function(e,t){return new Promise((function(n,r){e&&"undefined"!=typeof document||r("Args is invaild!"),void 0===t&&(t=""),(t=k(e,t))||r(e+" script source invaild!");var a="script-"+y(e).toLowerCase(),i=document.getElementById(a);if(i)return n(e);var o=document.head||document.getElementsByTagName("head")[0];(i=document.createElement("script")).src=t,i.id=a,i.onload=function(){n(e)},o.appendChild(i)}))},unloadScript:function(e){e=y(e);var t=document.getElementById("script-"+e.toLowerCase());t&&(document.head||document.getElementsByTagName("head")[0]).removeChild(t)},loadStyleSheet:function(e,t){if(!e||"undefined"==typeof document)return"";if(void 0===t&&(t=""),!(t=k(e,t)))return"";var n="css-"+y(e).toLowerCase();if(!document.getElementById(n)){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("link");a.rel="stylesheet",a.href=t,a.id=n,r.appendChild(a)}return"local"===m?"":t},unloadStyleSheet:function(e){e=y(e);var t=document.getElementById("css-"+e.toLowerCase());t&&(document.head||document.getElementsByTagName("head")[0]).removeChild(t)}};var E={interopDefault:function(e){return e&&"object"===i(e)&&"default"in e?e.default:e},loadStyle:function(e,t){if(!e||!t||"undefined"==typeof document)return!1;var n="css-"+e.toLowerCase();if(!document.getElementById(n)){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.id=n,a.innerText=t,r.appendChild(a)}return!0},loadScript:function(e,t){return new Promise((function(n,r){t&&"undefined"!=typeof document||r("Args is invaild!");var a=document.body,i=document.getElementById(e);i?a.removeChild(i):(i=document.createElement("script")).id=e,i.type="text/javascript",i.text=t,a.appendChild(i),n(!0)}))},renderCacheElement:function(e,t,n,r){"undefined"!=typeof window&&window.document&&(e=window.document);var a=e.createElement("div");if(a.id=t,a.className=n,a.style.display="none",e.body.appendChild(a),"function"==typeof r&&r){var i=r(a);if(i instanceof Promise)return i.then((function(t){e.body.removeChild(t),t.style.display=""})),a.outerHTML}return e.body.removeChild(a),a.style.display="",a.outerHTML},renderElement:function(e,t,n){"undefined"!=typeof window&&window.document&&(e=window.document);var r=e.createElement("div");return r.id=t,r.className=n,e.body.appendChild(r),r},createElementMeta:function(e,t,n){var r=t.dataset.lang,a=r?JSON.parse(r):null,i="";if(a){if("boolean"==typeof a.codeblock&&a.codeblock||"string"==typeof a.codeblock&&"true"===a.codeblock.toLowerCase())return!1;a.align&&("center"===a.align?i="diagram-center":"right"===a.align&&(i="diagram-right"))}var o=t.textContent.trim();n&&"function"==typeof n&&(o=n(o));var s=(t.classList.length>0?t.classList[0]:"")+(t.className&&i?" ":"")+i,l=e+"-"+Date.now()+"-"+Math.floor(1e4*Math.random());return t.id=l,{id:l,className:s,data:o,element:t}}},S="abc",j="ABCJSCSS";if("undefined"==typeof window)throw Error("The showdown abcjs extension can only be used in browser environment!");if(void 0===A)var A=window.ABCJS||void 0;function L(){return!!A}var P=!1;var C,z={add_classes:!0,responsive:"resize"};function M(e){var t=this;t.onReady=function(){},t.onStart=function(){var t=document.querySelector("#".concat(e," svg")),n=document.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("class","abcjs-cursor"),n.setAttributeNS(null,"x1",0),n.setAttributeNS(null,"y1",0),n.setAttributeNS(null,"x2",0),n.setAttributeNS(null,"y2",0),t.appendChild(n)},t.beatSubdivisions=2,t.onBeat=function(e,t,n){},t.onEvent=function(t){if(!t.measureStart||null!==t.left){for(var n=document.querySelectorAll("#".concat(e," svg .highlight")),r=0;n.length>r;r++)n[r].classList.remove("highlight");for(var a=0;t.elements.length>a;a++)for(var i=t.elements[a],o=0;i.length>o;o++)i[o].classList.add("highlight");var s=document.querySelector("#".concat(e," svg .abcjs-cursor"));s&&(s.setAttribute("x1",t.left-2),s.setAttribute("x2",t.left-2),s.setAttribute("y1",t.top),s.setAttribute("y2",t.top+t.height))}},t.onFinished=function(){for(var t=document.querySelectorAll("#".concat(e," svg .highlight")),n=0;t.length>n;n++)t[n].classList.remove("highlight");var r=document.querySelector("#".concat(e," svg .abcjs-cursor"));r&&(r.setAttribute("x1",0),r.setAttribute("x2",0),r.setAttribute("y1",0),r.setAttribute("y2",0))}}function O(e,t,n){A.synth.supportsAudio()?(C=new A.synth.SynthController).load("#".concat(e),new M(t),{displayLoop:!0,displayRestart:!0,displayPlay:!0,displayProgress:!0,displayWarp:!0}):document.querySelector("#".concat(e)).innerHTML="
Audio is not supported in this browser.
",function(e,t,n){C.disable(!0);var r=A.renderAbc("".concat(e),n,z)[0];(new A.synth.CreateSynth).init({visualObj:r}).then((function(e){C&&C.setTune(r,t).then((function(e){console.log(g("Audio successfully loaded."))})).catch((function(e){console.warn("Audio problem:",e)}))})).catch((function(e){console.warn("Audio problem:",e)}))}(t,!1,n)}function T(e,t,n){if(L()){var r=n.id,a=n.className,i=btoa(n.data),o=n.cssLink,s=r+"-audio",l=o?'
'):'
');n.element.parentNode.outerHTML=l+='
');var u={id:r,code:"(function() {\n if (typeof window !== 'undefined' && window.dispatchEvent) {\n window.dispatchEvent(new CustomEvent('abcjs',{\n detail: {\n audio: '".concat(s,"',\n render: '").concat(r,"',\n data: '").concat(i,"'\n }\n }));\n }\n })();")};return t.push(u),e(!0)}setTimeout((function(){T(e,t,n)}),10)}function R(e,t){return new Promise((function(n){var r=E.createElementMeta(S,e);if(!r)return n(!1);r.cssLink=x.getSrc(j),T(n,t,r)}))}function N(e,t){return function(){var e=L();if("undefined"!=typeof window){if(P)return e;e||(P=!0,x.loadStyleSheet(j),E.loadStyle("abc-audio",".highlight{fill: #0a9ecc;} .abcjs-cursor{stroke: red;} .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed{border: none;} .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed svg path{fill: #6eaa49;}"),x.loadScript("ABCJS").then((function(e){A=E.interopDefault(window[e])})))}}(),new Promise((function(n){var r=[];e.forEach((function(e){r.push(R(e,t))})),Promise.all(r).then((function(){n(!0)}))}))}function B(){var e=!1;return[{type:"output",filter:function(t){var n=t.wrapper;if(!n)return!1;var r=n.querySelectorAll("code.".concat(S,".language-").concat(S));return!!r.length&&(e||"undefined"!=typeof window&&window.dispatchEvent&&(e=!0,window.addEventListener("abcjs",(function(e){e.detail&&O(e.detail.audio,e.detail.render,atob(e.detail.data))}))),this.config={cssLink:x.getSrc(j)},console.log(g("Begin render ".concat(S," elements."))),N(r,t.scripts).then((function(){return console.log(g("End render ".concat(S," elements."))),t})))}}]}function I(e,t,n,r){try{r&&(n=n.appendChild(e.ownerDocument.createElement("ul")));var a=n.appendChild(e.ownerDocument.createElement("li")).appendChild(e.ownerDocument.createElement("a"));t&&(a.appendChild(e.ownerDocument.createTextNode(t.textContent)),a.href="#"+t.id)}catch(t){console.warn(g("append child error:"),e)}return n}function D(e,t,n,r){if(n.headingLevel>=r){for(var a=null;n&&n.headingLevel>=r;)n=(a=n).parentNode,a.parentNode=null,a.toc=null,a.headingLevel=null,a.preLevel=null;return n&&D(e,t,n,r),n}if(r>n.preLevel){for(n.preLevel++;r>n.preLevel;)n.toc=I(e,null,n.toc,!0),n.preLevel++;n.toc=I(e,t,n.toc,!0)}else{for(;n.preLevel>r;)n.toc=n.toc.parentNode,n.preLevel--;I(e,t,n.toc,!1)}return n.parentNode&&D(e,t,n.parentNode,r),n}function q(){var e=new DOMParser;return[{type:"output",filter:function(t){var n=e.parseFromString(t,"text/html"),r=void 0!==n.body?n.body:n;return function(e){for(var t=null,n=0,r=null,a=!1,i=e.querySelectorAll("p,h1,h2,h3,h4,h5,h6"),o=0;i.length>o;o++)if("[toc]"==(t=i[o]).textContent.trim().toLowerCase()){var s=e.ownerDocument.createElement("ul");s.className="showdown-toc",t.parentNode.replaceChild(s,t);var l={parentNode:null,toc:s,headingLevel:n,preLevel:0};if(r)if(n>r.headingLevel)l.parentNode=r;else{for(var u=r;u.headingLevel>n;)u=u.parentNode;u&&(l.parentNode=n===u.headingLevel?u.parentNode:u)}r=l,a=!0}else if(t.tagName)switch(t.tagName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":n=parseInt(t.tagName.substr(1)),r&&(r.preLevel||(r.preLevel=n),r=D(e,t,r,n))}for(;r;){var c=r;r=c.parentNode,c.parentNode=null,c.toc=null,c.headingLevel=null,c.preLevel=null}return a}(r)?r.innerHTML:t}}]}if("undefined"==typeof window)throw Error("The showdown viz extension can only be used in browser environment!");if(void 0===H)var H=window.Viz||void 0;var U=["circo","dot","neato","osage","twopi"];function F(){return!(void 0===H||!H||void 0===H.instance)}var Z=!1;function $(e,t){if(F()){var n=t.id,r=t.className,a=t.data,i=t.element,o=t.element.dataset.lang,s="dot";if(o){var l=JSON.parse(o);l&&l.engine&&-1!=U.indexOf(l.engine)&&(s=l.engine)}H.instance().then((function(t){var o=t.renderString(a,{format:"svg",engine:s});i.parentNode.outerHTML='
').concat(o,"
"),e(!0)}))}else setTimeout((function(){$(e,t)}),10)}function W(e){return new Promise((function(t){var n=E.createElementMeta("viz",e);if(!n)return t(!1);$(t,n)}))}function V(e){return function(){var e=F();if("undefined"!=typeof window){if(Z)return e;e||(Z=!0,x.loadScript("Viz").then((function(e){H=E.interopDefault(window[e])})))}}(),new Promise((function(t){var n=[];e.forEach((function(e){n.push(W(e))})),Promise.all(n).then((function(){t(!0)}))}))}function Y(){return[{type:"output",filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.dot.language-dot");return!!n.length&&(console.log(g("Begin render dot elements.")),V(n).then((function(){return console.log(g("End render dot elements.")),e})))}}]}var G="vega";if("undefined"==typeof window)throw Error("The showdown vega extension can only be used in browser environment!");if(void 0===J)var J=window.vegaEmbed||void 0;function K(){return!(void 0===J||!J)}var X=!1;function Q(e,t,n,r){var a=E.createElementMeta(G,e);if(!a)return Promise.resolve(!1);var i=JSON.stringify(t),o=JSON.stringify(JSON.parse(a.data)),s=a.id,l={id:s,code:"(function() {\n let el = document.getElementById('".concat(s,"');\n if (el){\n vegaEmbed(el, JSON.parse('").concat(o,"'), JSON.parse('").concat(i,"'));\n }\n })();")};return n.push(l),new Promise((function(e){te(e,a)}))}function ee(e,t,n,r){return function(){var e=K();if("undefined"!=typeof window){if(X)return e;e||(X=!0,x.loadScript(G).then((function(){return x.loadScript("vegaLite")})).then((function(){return x.loadScript("vegaEmbed")})).then((function(e){J=E.interopDefault(window[e])})))}}(),new Promise((function(a){var i=[];e.forEach((function(e){i.push(Q(e,r,n))})),t.forEach((function(e){i.push(Q(e,r,n))})),Promise.all(i).then((function(){a(!0)}))}))}function te(e,t){if(K()){var n=t.className;return t.element.parentNode.outerHTML='
'),e(!0)}setTimeout((function(){te(e,t)}),10)}function ne(e){var t=function(){return r({actions:{editor:!1},theme:"vox",tooltip:!1,renderer:"svg"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.vega.language-vega"),r=t.querySelectorAll("code.vega-lite.language-vega-lite");return!(!n.length&&!r.length)&&(console.log(g("Begin render vega elements.")),ee(n,r,e.scripts,this.config).then((function(){return console.log(g("End render vega elements.")),e})))}}]}function re(){var e=new DOMParser;return[{type:"output",filter:function(t){var n=e.parseFromString(t,"text/html"),r=void 0!==n.body?n.body:n;return function(e){for(var t=null,n=null,r=!1,a=e.querySelectorAll("p, li, h1, h2, h3, h4, h5, h6, div.paragraph"),i=0;a.length>i;i++)for(n=(t=a[i]).firstChild;n;){if(3===n.nodeType){var o=n.nodeValue.match(/^([\s\S]*?)([:-]-:)(?:[\s]?)([\s\S]*)$/);o&&(":-:"===o[2]?(n.nodeValue=o[3],t.className?t.className+=" align-center":t.className="align-center",r=!0):"--:"===o[2]&&(n.nodeValue=o[3],t.className?t.className+=" align-right":t.className="align-right",r=!0));break}n=n.nextSibling}return r}(r)?r.innerHTML:t}}]}var ae={decimalsign:"."},ie=0,oe=1,se=2,le=3,ue=4,ce=5,de=6,he=7,fe=8,pe=9,ge=10,me={input:'"',tag:"mtext",output:"mbox",tex:null,ttype:ge},_e=[{input:"alpha",tag:"mi",output:"α",tex:null,ttype:ie},{input:"beta",tag:"mi",output:"β",tex:null,ttype:ie},{input:"chi",tag:"mi",output:"χ",tex:null,ttype:ie},{input:"delta",tag:"mi",output:"δ",tex:null,ttype:ie},{input:"Delta",tag:"mo",output:"Δ",tex:null,ttype:ie},{input:"epsi",tag:"mi",output:"ε",tex:"epsilon",ttype:ie},{input:"varepsilon",tag:"mi",output:"ɛ",tex:null,ttype:ie},{input:"eta",tag:"mi",output:"η",tex:null,ttype:ie},{input:"gamma",tag:"mi",output:"γ",tex:null,ttype:ie},{input:"Gamma",tag:"mo",output:"Γ",tex:null,ttype:ie},{input:"iota",tag:"mi",output:"ι",tex:null,ttype:ie},{input:"kappa",tag:"mi",output:"κ",tex:null,ttype:ie},{input:"lambda",tag:"mi",output:"λ",tex:null,ttype:ie},{input:"Lambda",tag:"mo",output:"Λ",tex:null,ttype:ie},{input:"lamda",tag:"mi",output:"lambda",tex:null,ttype:fe},{input:"Lamda",tag:"mi",output:"Lambda",tex:null,ttype:fe},{input:"mu",tag:"mi",output:"μ",tex:null,ttype:ie},{input:"nu",tag:"mi",output:"ν",tex:null,ttype:ie},{input:"omega",tag:"mi",output:"ω",tex:null,ttype:ie},{input:"Omega",tag:"mo",output:"Ω",tex:null,ttype:ie},{input:"phi",tag:"mi",output:"φ",tex:null,ttype:ie},{input:"varphi",tag:"mi",output:"ϕ",tex:null,ttype:ie},{input:"Phi",tag:"mo",output:"Φ",tex:null,ttype:ie},{input:"pi",tag:"mi",output:"π",tex:null,ttype:ie},{input:"Pi",tag:"mo",output:"Π",tex:null,ttype:ie},{input:"psi",tag:"mi",output:"ψ",tex:null,ttype:ie},{input:"Psi",tag:"mi",output:"Ψ",tex:null,ttype:ie},{input:"rho",tag:"mi",output:"ρ",tex:null,ttype:ie},{input:"sigma",tag:"mi",output:"σ",tex:null,ttype:ie},{input:"Sigma",tag:"mo",output:"Σ",tex:null,ttype:ie},{input:"tau",tag:"mi",output:"τ",tex:null,ttype:ie},{input:"theta",tag:"mi",output:"θ",tex:null,ttype:ie},{input:"vartheta",tag:"mi",output:"ϑ",tex:null,ttype:ie},{input:"Theta",tag:"mo",output:"Θ",tex:null,ttype:ie},{input:"upsilon",tag:"mi",output:"υ",tex:null,ttype:ie},{input:"xi",tag:"mi",output:"ξ",tex:null,ttype:ie},{input:"Xi",tag:"mo",output:"Ξ",tex:null,ttype:ie},{input:"zeta",tag:"mi",output:"ζ",tex:null,ttype:ie},{input:"*",tag:"mo",output:"⋅",tex:"cdot",ttype:ie},{input:"**",tag:"mo",output:"∗",tex:"ast",ttype:ie},{input:"***",tag:"mo",output:"⋆",tex:"star",ttype:ie},{input:"//",tag:"mo",output:"/",tex:"/",ttype:ie,val:!0,notexcopy:!0},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:ie},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:ie},{input:"xx",tag:"mo",output:"×",tex:"times",ttype:ie},{input:"|><",tag:"mo",output:"⋉",tex:"ltimes",ttype:ie},{input:"><|",tag:"mo",output:"⋊",tex:"rtimes",ttype:ie},{input:"|><|",tag:"mo",output:"⋈",tex:"bowtie",ttype:ie},{input:"-:",tag:"mo",output:"÷",tex:"div",ttype:ie},{input:"divide",tag:"mo",output:"-:",tex:null,ttype:fe},{input:"@",tag:"mo",output:"∘",tex:"circ",ttype:ie},{input:"o+",tag:"mo",output:"⊕",tex:"oplus",ttype:ie},{input:"ox",tag:"mo",output:"⊗",tex:"otimes",ttype:ie},{input:"o.",tag:"mo",output:"⊙",tex:"odot",ttype:ie},{input:"sum",tag:"mo",output:"∑",tex:null,ttype:he},{input:"prod",tag:"mo",output:"∏",tex:null,ttype:he},{input:"^^",tag:"mo",output:"∧",tex:"wedge",ttype:ie},{input:"^^^",tag:"mo",output:"⋀",tex:"bigwedge",ttype:he},{input:"vv",tag:"mo",output:"∨",tex:"vee",ttype:ie},{input:"vvv",tag:"mo",output:"⋁",tex:"bigvee",ttype:he},{input:"nn",tag:"mo",output:"∩",tex:"cap",ttype:ie},{input:"nnn",tag:"mo",output:"⋂",tex:"bigcap",ttype:he},{input:"uu",tag:"mo",output:"∪",tex:"cup",ttype:ie},{input:"uuu",tag:"mo",output:"⋃",tex:"bigcup",ttype:he},{input:"overset",tag:"mover",output:"stackrel",tex:null,ttype:se},{input:"underset",tag:"munder",output:"stackrel",tex:null,ttype:se},{input:"!=",tag:"mo",output:"≠",tex:"ne",ttype:ie},{input:":=",tag:"mo",output:":=",tex:null,ttype:ie},{input:"lt",tag:"mo",output:"<",tex:null,ttype:ie},{input:"gt",tag:"mo",output:">",tex:null,ttype:ie},{input:"<=",tag:"mo",output:"≤",tex:"le",ttype:ie},{input:"lt=",tag:"mo",output:"≤",tex:"leq",ttype:ie},{input:"gt=",tag:"mo",output:"≥",tex:"geq",ttype:ie},{input:">=",tag:"mo",output:"≥",tex:"ge",ttype:ie},{input:"-<",tag:"mo",output:"≺",tex:"prec",ttype:ie},{input:"-lt",tag:"mo",output:"≺",tex:null,ttype:ie},{input:">-",tag:"mo",output:"≻",tex:"succ",ttype:ie},{input:"-<=",tag:"mo",output:"⪯",tex:"preceq",ttype:ie},{input:">-=",tag:"mo",output:"⪰",tex:"succeq",ttype:ie},{input:"in",tag:"mo",output:"∈",tex:null,ttype:ie},{input:"!in",tag:"mo",output:"∉",tex:"notin",ttype:ie},{input:"sub",tag:"mo",output:"⊂",tex:"subset",ttype:ie},{input:"sup",tag:"mo",output:"⊃",tex:"supset",ttype:ie},{input:"sube",tag:"mo",output:"⊆",tex:"subseteq",ttype:ie},{input:"supe",tag:"mo",output:"⊇",tex:"supseteq",ttype:ie},{input:"-=",tag:"mo",output:"≡",tex:"equiv",ttype:ie},{input:"~=",tag:"mo",output:"≅",tex:"stackrel{\\sim}{=}",notexcopy:!0,ttype:ie},{input:"cong",tag:"mo",output:"~=",tex:null,ttype:fe},{input:"~~",tag:"mo",output:"≈",tex:"approx",ttype:ie},{input:"prop",tag:"mo",output:"∝",tex:"propto",ttype:ie},{input:"and",tag:"mtext",output:"and",tex:null,ttype:de},{input:"or",tag:"mtext",output:"or",tex:null,ttype:de},{input:"not",tag:"mo",output:"¬",tex:"neg",ttype:ie},{input:"=>",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:ie},{input:"implies",tag:"mo",output:"=>",tex:null,ttype:fe},{input:"if",tag:"mo",output:"if",tex:null,ttype:de},{input:"<=>",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:ie},{input:"iff",tag:"mo",output:"<=>",tex:null,ttype:fe},{input:"AA",tag:"mo",output:"∀",tex:"forall",ttype:ie},{input:"EE",tag:"mo",output:"∃",tex:"exists",ttype:ie},{input:"_|_",tag:"mo",output:"⊥",tex:"bot",ttype:ie},{input:"TT",tag:"mo",output:"⊤",tex:"top",ttype:ie},{input:"|--",tag:"mo",output:"⊢",tex:"vdash",ttype:ie},{input:"|==",tag:"mo",output:"⊨",tex:"models",ttype:ie},{input:"(",tag:"mo",output:"(",tex:null,ttype:ue,val:!0},{input:")",tag:"mo",output:")",tex:null,ttype:ce,val:!0},{input:"[",tag:"mo",output:"[",tex:null,ttype:ue,val:!0},{input:"]",tag:"mo",output:"]",tex:null,ttype:ce,val:!0},{input:"left(",tag:"mo",output:"(",tex:"(",notexcopy:!0,ttype:ue,val:!0},{input:"right)",tag:"mo",output:")",tex:")",notexcopy:!0,ttype:ce,val:!0},{input:"left[",tag:"mo",output:"[",tex:"[",notexcopy:!0,ttype:ue,val:!0},{input:"right]",tag:"mo",output:"]",tex:"]",notexcopy:!0,ttype:ce,val:!0},{input:"{",tag:"mo",output:"{",tex:"lbrace",ttype:ue},{input:"}",tag:"mo",output:"}",tex:"rbrace",ttype:ce},{input:"|",tag:"mo",output:"|",tex:null,ttype:pe,val:!0},{input:"|:",tag:"mo",output:"|",tex:"|",ttype:ue,notexcopy:!0,val:!0},{input:":|",tag:"mo",output:"|",tex:"|",ttype:ce,notexcopy:!0,val:!0},{input:":|:",tag:"mo",output:"|",tex:"|",ttype:ie,notexcopy:!0,val:!0},{input:"(:",tag:"mo",output:"〈",tex:"langle",ttype:ue},{input:":)",tag:"mo",output:"〉",tex:"rangle",ttype:ce},{input:"<<",tag:"mo",output:"〈",tex:"langle",ttype:ue},{input:">>",tag:"mo",output:"〉",tex:"rangle",ttype:ce},{input:"{:",tag:"mo",output:"{:",tex:null,ttype:ue,invisible:!0},{input:":}",tag:"mo",output:":}",tex:null,ttype:ce,invisible:!0},{input:"int",tag:"mo",output:"∫",tex:null,ttype:ie},{input:"dx",tag:"mi",output:"{:d x:}",tex:null,ttype:fe},{input:"dy",tag:"mi",output:"{:d y:}",tex:null,ttype:fe},{input:"dz",tag:"mi",output:"{:d z:}",tex:null,ttype:fe},{input:"dt",tag:"mi",output:"{:d t:}",tex:null,ttype:fe},{input:"oint",tag:"mo",output:"∮",tex:null,ttype:ie},{input:"del",tag:"mo",output:"∂",tex:"partial",ttype:ie},{input:"grad",tag:"mo",output:"∇",tex:"nabla",ttype:ie},{input:"+-",tag:"mo",output:"±",tex:"pm",ttype:ie},{input:"O/",tag:"mo",output:"∅",tex:"emptyset",ttype:ie},{input:"oo",tag:"mo",output:"∞",tex:"infty",ttype:ie},{input:"aleph",tag:"mo",output:"ℵ",tex:null,ttype:ie},{input:"...",tag:"mo",output:"...",tex:"ldots",ttype:ie},{input:":.",tag:"mo",output:"∴",tex:"therefore",ttype:ie},{input:":'",tag:"mo",output:"∵",tex:"because",ttype:ie},{input:"/_",tag:"mo",output:"∠",tex:"angle",ttype:ie},{input:"/_\\",tag:"mo",output:"△",tex:"triangle",ttype:ie},{input:"\\ ",tag:"mo",output:" ",tex:null,ttype:ie,val:!0},{input:"frown",tag:"mo",output:"⌢",tex:null,ttype:ie},{input:"%",tag:"mo",output:"%",tex:"%",ttype:ie,notexcopy:!0},{input:"quad",tag:"mo",output:"  ",tex:null,ttype:ie},{input:"qquad",tag:"mo",output:"    ",tex:null,ttype:ie},{input:"cdots",tag:"mo",output:"⋯",tex:null,ttype:ie},{input:"vdots",tag:"mo",output:"⋮",tex:null,ttype:ie},{input:"ddots",tag:"mo",output:"⋱",tex:null,ttype:ie},{input:"diamond",tag:"mo",output:"⋄",tex:null,ttype:ie},{input:"square",tag:"mo",output:"□",tex:"boxempty",ttype:ie},{input:"|__",tag:"mo",output:"⌊",tex:"lfloor",ttype:ie},{input:"__|",tag:"mo",output:"⌋",tex:"rfloor",ttype:ie},{input:"|~",tag:"mo",output:"⌈",tex:"lceil",ttype:ie},{input:"lceiling",tag:"mo",output:"|~",tex:null,ttype:fe},{input:"~|",tag:"mo",output:"⌉",tex:"rceil",ttype:ie},{input:"rceiling",tag:"mo",output:"~|",tex:null,ttype:fe},{input:"CC",tag:"mo",output:"ℂ",tex:"mathbb{C}",ttype:ie,notexcopy:!0},{input:"NN",tag:"mo",output:"ℕ",tex:"mathbb{N}",ttype:ie,notexcopy:!0},{input:"QQ",tag:"mo",output:"ℚ",tex:"mathbb{Q}",ttype:ie,notexcopy:!0},{input:"RR",tag:"mo",output:"ℝ",tex:"mathbb{R}",ttype:ie,notexcopy:!0},{input:"ZZ",tag:"mo",output:"ℤ",tex:"mathbb{Z}",ttype:ie,notexcopy:!0},{input:"f",tag:"mi",output:"f",tex:null,ttype:oe,func:!0,val:!0},{input:"g",tag:"mi",output:"g",tex:null,ttype:oe,func:!0,val:!0},{input:"''",tag:"mo",output:"''",tex:null,val:!0},{input:"'''",tag:"mo",output:"'''",tex:null,val:!0},{input:"''''",tag:"mo",output:"''''",tex:null,val:!0},{input:"lim",tag:"mo",output:"lim",tex:null,ttype:he},{input:"Lim",tag:"mo",output:"Lim",tex:null,ttype:he},{input:"sin",tag:"mo",output:"sin",tex:null,ttype:oe,func:!0},{input:"cos",tag:"mo",output:"cos",tex:null,ttype:oe,func:!0},{input:"tan",tag:"mo",output:"tan",tex:null,ttype:oe,func:!0},{input:"arcsin",tag:"mo",output:"arcsin",tex:null,ttype:oe,func:!0},{input:"arccos",tag:"mo",output:"arccos",tex:null,ttype:oe,func:!0},{input:"arctan",tag:"mo",output:"arctan",tex:null,ttype:oe,func:!0},{input:"sinh",tag:"mo",output:"sinh",tex:null,ttype:oe,func:!0},{input:"cosh",tag:"mo",output:"cosh",tex:null,ttype:oe,func:!0},{input:"tanh",tag:"mo",output:"tanh",tex:null,ttype:oe,func:!0},{input:"cot",tag:"mo",output:"cot",tex:null,ttype:oe,func:!0},{input:"coth",tag:"mo",output:"coth",tex:null,ttype:oe,func:!0},{input:"sech",tag:"mo",output:"sech",tex:null,ttype:oe,func:!0},{input:"csch",tag:"mo",output:"csch",tex:null,ttype:oe,func:!0},{input:"sec",tag:"mo",output:"sec",tex:null,ttype:oe,func:!0},{input:"csc",tag:"mo",output:"csc",tex:null,ttype:oe,func:!0},{input:"log",tag:"mo",output:"log",tex:null,ttype:oe,func:!0},{input:"ln",tag:"mo",output:"ln",tex:null,ttype:oe,func:!0},{input:"abs",tag:"mo",output:"abs",tex:null,ttype:oe,notexcopy:!0,rewriteleftright:["|","|"]},{input:"norm",tag:"mo",output:"norm",tex:null,ttype:oe,notexcopy:!0,rewriteleftright:["\\|","\\|"]},{input:"floor",tag:"mo",output:"floor",tex:null,ttype:oe,notexcopy:!0,rewriteleftright:["\\lfloor","\\rfloor"]},{input:"ceil",tag:"mo",output:"ceil",tex:null,ttype:oe,notexcopy:!0,rewriteleftright:["\\lceil","\\rceil"]},{input:"Sin",tag:"mo",output:"Sin",tex:null,ttype:oe,func:!0},{input:"Cos",tag:"mo",output:"Cos",tex:null,ttype:oe,func:!0},{input:"Tan",tag:"mo",output:"Tan",tex:null,ttype:oe,func:!0},{input:"Arcsin",tag:"mo",output:"Arcsin",tex:null,ttype:oe,func:!0},{input:"Arccos",tag:"mo",output:"Arccos",tex:null,ttype:oe,func:!0},{input:"Arctan",tag:"mo",output:"Arctan",tex:null,ttype:oe,func:!0},{input:"Sinh",tag:"mo",output:"Sinh",tex:null,ttype:oe,func:!0},{input:"Cosh",tag:"mo",output:"Cosh",tex:null,ttype:oe,func:!0},{input:"Tanh",tag:"mo",output:"Tanh",tex:null,ttype:oe,func:!0},{input:"Cot",tag:"mo",output:"Cot",tex:null,ttype:oe,func:!0},{input:"Sec",tag:"mo",output:"Sec",tex:null,ttype:oe,func:!0},{input:"Csc",tag:"mo",output:"Csc",tex:null,ttype:oe,func:!0},{input:"Log",tag:"mo",output:"Log",tex:null,ttype:oe,func:!0},{input:"Ln",tag:"mo",output:"Ln",tex:null,ttype:oe,func:!0},{input:"Abs",tag:"mo",output:"abs",tex:null,ttype:oe,notexcopy:!0,rewriteleftright:["|","|"]},{input:"det",tag:"mo",output:"det",tex:null,ttype:oe,func:!0},{input:"exp",tag:"mo",output:"exp",tex:null,ttype:oe,func:!0},{input:"dim",tag:"mo",output:"dim",tex:null,ttype:ie},{input:"mod",tag:"mo",output:"mod",tex:"text{mod}",ttype:ie,notexcopy:!0},{input:"gcd",tag:"mo",output:"gcd",tex:null,ttype:oe,func:!0},{input:"lcm",tag:"mo",output:"lcm",tex:"text{lcm}",ttype:oe,func:!0,notexcopy:!0},{input:"lub",tag:"mo",output:"lub",tex:null,ttype:ie},{input:"glb",tag:"mo",output:"glb",tex:null,ttype:ie},{input:"min",tag:"mo",output:"min",tex:null,ttype:he},{input:"max",tag:"mo",output:"max",tex:null,ttype:he},{input:"uarr",tag:"mo",output:"↑",tex:"uparrow",ttype:ie},{input:"darr",tag:"mo",output:"↓",tex:"downarrow",ttype:ie},{input:"rarr",tag:"mo",output:"→",tex:"rightarrow",ttype:ie},{input:"->",tag:"mo",output:"→",tex:"to",ttype:ie},{input:">->",tag:"mo",output:"↣",tex:"rightarrowtail",ttype:ie},{input:"->>",tag:"mo",output:"↠",tex:"twoheadrightarrow",ttype:ie},{input:">->>",tag:"mo",output:"⤖",tex:"twoheadrightarrowtail",ttype:ie},{input:"|->",tag:"mo",output:"↦",tex:"mapsto",ttype:ie},{input:"larr",tag:"mo",output:"←",tex:"leftarrow",ttype:ie},{input:"harr",tag:"mo",output:"↔",tex:"leftrightarrow",ttype:ie},{input:"rArr",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:ie},{input:"lArr",tag:"mo",output:"⇐",tex:"Leftarrow",ttype:ie},{input:"hArr",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:ie},{input:"sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:oe},{input:"root",tag:"mroot",output:"root",tex:null,ttype:se},{input:"frac",tag:"mfrac",output:"/",tex:null,ttype:se},{input:"/",tag:"mfrac",output:"/",tex:null,ttype:le},{input:"stackrel",tag:"mover",output:"stackrel",tex:null,ttype:se},{input:"_",tag:"msub",output:"_",tex:null,ttype:le},{input:"^",tag:"msup",output:"^",tex:null,ttype:le},{input:"cancel",tag:"menclose",output:"cancel",tex:null,ttype:oe},{input:"Sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:oe},{input:"hat",tag:"mover",output:"^",tex:null,ttype:oe,acc:!0},{input:"bar",tag:"mover",output:"¯",tex:"overline",ttype:oe,acc:!0},{input:"vec",tag:"mover",output:"→",tex:null,ttype:oe,acc:!0},{input:"tilde",tag:"mover",output:"~",tex:null,ttype:oe,acc:!0},{input:"dot",tag:"mover",output:".",tex:null,ttype:oe,acc:!0},{input:"ddot",tag:"mover",output:"..",tex:null,ttype:oe,acc:!0},{input:"overarc",tag:"mover",output:"⏜",tex:"stackrel{\\frown}",notexcopy:!0,ttype:oe,acc:!0},{input:"overparen",tag:"mover",output:"⏜",tex:"stackrel{\\frown}",notexcopy:!0,ttype:oe,acc:!0},{input:"ul",tag:"munder",output:"̲",tex:"underline",ttype:oe,acc:!0},{input:"ubrace",tag:"munder",output:"⏟",tex:"underbrace",ttype:oe,acc:!0},{input:"obrace",tag:"mover",output:"⏞",tex:"overbrace",ttype:oe,acc:!0},{input:"text",tag:"mtext",output:"text",tex:null,ttype:ge},{input:"mbox",tag:"mtext",output:"mbox",tex:null,ttype:ge},me,{input:"color",tag:"mstyle",ttype:se},{input:"bb",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"bb",tex:"mathbf",ttype:oe,notexcopy:!0},{input:"mathbf",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"mathbf",tex:null,ttype:oe},{input:"sf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"sf",tex:"mathsf",ttype:oe,notexcopy:!0},{input:"mathsf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"mathsf",tex:null,ttype:oe},{input:"bbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"bbb",tex:"mathbb",ttype:oe,notexcopy:!0},{input:"mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"mathbb",tex:null,ttype:oe},{input:"cc",tag:"mstyle",atname:"mathvariant",atval:"script",output:"cc",tex:"mathcal",ttype:oe,notexcopy:!0},{input:"mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",output:"mathcal",tex:null,ttype:oe},{input:"tt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"tt",tex:"mathtt",ttype:oe,notexcopy:!0},{input:"mathtt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"mathtt",tex:null,ttype:oe},{input:"fr",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"fr",tex:"mathfrak",ttype:oe,notexcopy:!0},{input:"mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"mathfrak",tex:null,ttype:oe}];function we(e,t){return e.input>t.input?1:-1}var be,ve,ye,ke=[];function xe(e,t){var n;n="\\"==e.charAt(t)&&"\\"!=e.charAt(t+1)&&" "!=e.charAt(t+1)?e.slice(t+1):e.slice(t);for(var r=0;n.length>r&&32>=n.charCodeAt(r);r+=1);return n.slice(r)}function Ee(e,t,n){if(0==n){var r,a;for(n=-1,r=e.length;r>n+1;)t>e[a=n+r>>1]?n=a:r=a;return r}for(var i=n;e.length>i&&t>e[i];i++);return i}function Se(e){for(var t,n,r,a=0,i="",o=!0,s=1;e.length>=s&&o;s++)n=e.slice(0,s),a=Ee(ke,n,a),ke.length>a&&e.slice(0,ke[a].length)==ke[a]&&(t=a,s=(i=ke[a]).length),o=ke.length>a&&e.slice(0,ke[a].length)>=ke[a];if(ve=ye,""!=i)return ye=_e[t].ttype,_e[t];ye=ie,a=1,n=e.slice(0,1);for(var l=!0;n>="0"&&"9">=n&&e.length>=a;)n=e.slice(a,a+1),a++;if(n==ae.decimalsign&&(n=e.slice(a,a+1))>="0"&&"9">=n)for(l=!1,a++;n>="0"&&"9">=n&&e.length>=a;)n=e.slice(a,a+1),a++;return l&&a>1||a>2?(n=e.slice(0,a-1),r="mn"):(a=2,r=("A">(n=e.slice(0,1))||n>"Z")&&("a">n||n>"z")?"mo":"mi"),"-"==n&&ve==le?(ye=le,{input:n,tag:r,output:n,ttype:oe,func:!0,val:!0}):{input:n,tag:r,output:n,ttype:ie,val:!0}}function je(e){var t;if("{"==e.charAt(0)&&"}"==e.charAt(e.length-1)){var n=0;"\\left"==(t=e.substr(1,5))?"("==(t=e.charAt(6))||"["==t||"{"==t?n=7:"\\lbrace"==(t=e.substr(6,7))&&(n=13):"("!=(t=e.charAt(1))&&"["!=t||(n=2),n>0&&("\\right)}"==(t=e.substr(e.length-8))||"\\right]}"==t||"\\right.}"==t?e=(e="{"+e.substr(n)).substr(0,e.length-8)+"}":"\\rbrace}"==t&&(e=(e="{"+e.substr(n)).substr(0,e.length-14)+"}"))}return e}function Ae(e){var t;return t="boolean"==typeof e.val&&e.val?"":"\\",null==e.tex?t+e.input:t+e.tex}function Le(e){var t,n,r,a,i="";if(null==(t=Se(e=xe(e,0)))||t.ttype==ce&&be>0)return[null,e];switch(t.ttype==fe&&(t=Se(e=t.output+xe(e,t.input.length))),t.ttype){case he:case ie:e=xe(e,t.input.length);var o=Ae(t);return"\\"==o.charAt(0)||"mo"==t.tag?[o,e]:["{"+o+"}",e];case ue:be++,r=Ce(e=xe(e,t.input.length),!0),be--;var s=0;return"\\right"==r[0].substr(0,6)&&(")"==(u=r[0].charAt(6))||"]"==u||"}"==u?s=6:"."==u?s=7:"\\rbrace"==(u=r[0].substr(6,7))&&(s=13)),s>0?(r[0]=r[0].substr(s),n="boolean"==typeof t.invisible&&t.invisible?"{"+r[0]+"}":"{"+Ae(t)+r[0]+"}"):n="boolean"==typeof t.invisible&&t.invisible?"{\\left."+r[0]+"}":"{\\left"+Ae(t)+r[0]+"}",[n,r[1]];case ge:return t!=me&&(e=xe(e,t.input.length)),-1==(a="{"==e.charAt(0)?e.indexOf("}"):"("==e.charAt(0)?e.indexOf(")"):"["==e.charAt(0)?e.indexOf("]"):t==me?e.slice(1).indexOf('"')+1:0)&&(a=e.length)," "==(u=e.slice(1,a)).charAt(0)&&(i="\\ "),i+="\\text{"+u+"}"," "==u.charAt(u.length-1)&&(i+="\\ "),[i,e=xe(e,a+1)];case oe:return null==(r=Le(e=xe(e,t.input.length)))[0]?["{"+Ae(t)+"}",e]:"boolean"==typeof t.func&&t.func?"^"==(u=e.charAt(0))||"_"==u||"/"==u||"|"==u||","==u||1==t.input.length&&t.input.match(/\w/)&&"("!=u?["{"+Ae(t)+"}",e]:[n="{"+Ae(t)+"{"+r[0]+"}}",r[1]]:(r[0]=je(r[0]),"sqrt"==t.input?["\\sqrt{"+r[0]+"}",r[1]]:"cancel"==t.input?["\\cancel{"+r[0]+"}",r[1]]:void 0!==t.rewriteleftright?["{\\left"+t.rewriteleftright[0]+r[0]+"\\right"+t.rewriteleftright[1]+"}",r[1]]:"boolean"==typeof t.acc&&t.acc?[Ae(t)+"{"+r[0]+"}",r[1]]:["{"+Ae(t)+"{"+r[0]+"}}",r[1]]);case se:if(null==(r=Le(e=xe(e,t.input.length)))[0])return["{"+Ae(t)+"}",e];r[0]=je(r[0]);var l=Le(r[1]);return null==l[0]?["{"+Ae(t)+"}",e]:(l[0]=je(l[0]),[i="color"==t.input?"{\\color{"+r[0].replace(/[\{\}]/g,"")+"}"+l[0]+"}":"root"==t.input?"{\\sqrt["+r[0]+"]{"+l[0]+"}}":"{"+Ae(t)+"{"+r[0]+"}{"+l[0]+"}}",l[1]]);case le:return e=xe(e,t.input.length),[t.output,e];case de:return e=xe(e,t.input.length),["{\\quad\\text{"+t.input+"}\\quad}",e];case pe:be++,r=Ce(e=xe(e,t.input.length),!1),be--;var u="";return"|"==(u=r[0].charAt(r[0].length-1))&&","!==e.charAt(0)?[n="{\\left|"+r[0]+"}",r[1]]:[n="{\\mid}",e];default:return e=xe(e,t.input.length),["{"+Ae(t)+"}",e]}}function Pe(e){var t,n,r,a,i;if(n=Se(e=xe(e,0)),a=(i=Le(e))[0],(t=Se(e=i[1])).ttype==le&&"/"!=t.input){if((i=Le(e=xe(e,t.input.length)))[0]=null==i[0]?"{}":je(i[0]),e=i[1],"_"==t.input)if("^"==(r=Se(e)).input){var o=Le(e=xe(e,r.input.length));o[0]=je(o[0]),e=o[1],a="{"+a,a+="_{"+i[0]+"}",a+="^{"+o[0]+"}",a+="}"}else a+="_{"+i[0]+"}";else a=a+"^{"+i[0]+"}";void 0!==n.func&&n.func&&((r=Se(e)).ttype==le||r.ttype==ce||1>=n.input.length&&r.ttype!=ue||(a="{"+a+(i=Pe(e))[0]+"}",e=i[1]))}return[a,e]}function Ce(e,t){var n,r,a,i,o="",s=!1;do{r=(a=Pe(e=xe(e,0)))[0],(n=Se(e=a[1])).ttype==le&&"/"==n.input?((a=Pe(e=xe(e,n.input.length)))[0]=null==a[0]?"{}":je(a[0]),e=a[1],r="\\frac{"+(r=je(r))+"}",o+=r+="{"+a[0]+"}",n=Se(e)):null!=r&&(o+=r)}while((n.ttype!=ce&&(n.ttype!=pe||t)||0==be)&&null!=n&&""!=n.output);if(n.ttype==ce||n.ttype==pe){var l=o.length;if(l>2&&"{"==o.charAt(0)&&o.indexOf(",")>0){var u=o.charAt(l-2);if(")"==u||"]"==u){var c=o.charAt(6);if("("==c&&")"==u&&"}"!=n.output||"["==c&&"]"==u){var d="",h=[];h.push(0);var f=!0,p=0,g=[];g[0]=[0];var m=0,_=0,w="";for(i=1;l-1>i;i++)o.charAt(i)==c&&p++,o.charAt(i)==u&&0==--p&&","==o.charAt(i+2)&&"{"==o.charAt(i+3)&&(h.push(i+2),g[m=i+2]=[i+2]),"["!=o.charAt(i)&&"("!=o.charAt(i)&&"{"!=o.charAt(i)||_++,"]"!=o.charAt(i)&&")"!=o.charAt(i)&&"}"!=o.charAt(i)||_--,","==o.charAt(i)&&1==_&&g[m].push(i),0>_&&(m==i+1?i++:f=!1);h.push(l);var b=-1;if(0==p&&h.length>0&&f)for(i=0;h.length-1>i;i++){if(i>0&&(d+="\\\\"),0==i)if(1==g[h[i]].length)var v=[o.substr(h[i]+7,h[i+1]-h[i]-15)];else{v=[o.substring(h[i]+7,g[h[i]][1])];for(var y=2;g[h[i]].length>y;y++)v.push(o.substring(g[h[i]][y-1]+1,g[h[i]][y]));v.push(o.substring(g[h[i]][g[h[i]].length-1]+1,h[i+1]-8))}else if(1==g[h[i]].length)v=[o.substr(h[i]+8,h[i+1]-h[i]-16)];else{for(v=[o.substring(h[i]+8,g[h[i]][1])],y=2;g[h[i]].length>y;y++)v.push(o.substring(g[h[i]][y-1]+1,g[h[i]][y]));v.push(o.substring(g[h[i]][g[h[i]].length-1]+1,h[i+1]-8))}for(y=v.length-1;y>=0;y--)"{\\mid}"==v[y]?(0==i&&(w="|"+w),v.splice(y,1)):0==i&&(w="c"+w);b>0&&v.length!=b?f=!1:-1==b&&(b=v.length),d+=v.join("&")}d="\\begin{array}{"+w+"} "+d+"\\end{array}",f&&(o=d)}}}e=xe(e,n.input.length),"boolean"==typeof n.invisible&&n.invisible?(o+="\\right.",s=!0):(o+=r="\\right"+Ae(n),s=!0)}return be>0&&!s&&(o+="\\right."),[o,e]}function ze(e){return be=0,null==(e=(e=(e=e.replace(/( |\u00a0| )/g,"")).replace(/>/g,">")).replace(/</g,"<")).match(/\S/)?"":Ce(e.replace(/^\s+/g,""),!1)[0]}if(function(){var e,t=_e.length;for(e=0;t>e;e++)!_e[e].tex||"boolean"==typeof _e[e].notexcopy&&_e[e].notexcopy||_e.push({input:_e[e].tex,tag:_e[e].tag,output:_e[e].output,ttype:_e[e].ttype,acc:_e[e].acc||!1});!function(){var e;for(_e.sort(we),e=0;_e.length>e;e++)ke[e]=_e[e].input}()}(),"undefined"==typeof window)throw Error("The showdown katex extension can only be used in browser environment!");if(void 0===Me)var Me=window.katex||void 0;if("undefined"==typeof renderMathInElement)var Oe=window.renderMathInElement||void 0;var Te=0;function Re(){return!(void 0===Oe||!Oe||void 0===Me||!Me)}var Ne=!1,Be="katexCSS";function Ie(e){var t=Re();if("undefined"!=typeof window){if(Ne)return t;if(!t)return Ne=!0,x.loadStyleSheet(Be),x.loadScript("katex").then((function(e){return Me=E.interopDefault(window[e]),x.loadScript("renderMathInElement")})).then((function(t){Oe=E.interopDefault(window[t]),"function"==typeof e&&e&&e(Oe)})).catch((function(e){console.log("load script error: "+e)})),t}return"function"==typeof e&&e&&e(Oe),t}function De(e,t){if(Re()){var n=t.className,r=t.input,a=t.data,i=t.cssLink,o=t.options,s=t.element.ownerDocument,l="";if(a instanceof Array)a.forEach((function(e){if(""===e)l+="
";else{var t=Me.renderToString(e,o);l+=i?'
').concat(t,"
"):'
').concat(t,"
")}}));else{var u=Me.renderToString(a,o);l=i?'
').concat(u,"
"):'
').concat(u,"
")}t.element.parentNode.outerHTML=l,--Te||Oe(s.body,o),e(!0)}else setTimeout((function(){De(e,t)}),10)}function qe(e,t,n){return new Promise((function(r){var a,i=E.createElementMeta("katex",e,(function(e){var t;a=e;var r=e.split(/\n[ \f\r\t\v]*\n/);return r.length>1?(t=[],r.forEach((function(e){""!==(e=e.trim())&&(e=n?ze(e):e),t.push(e)}))):t=n?ze(a):a,t}));if(!i)return r(!1);i.cssLink=x.getSrc(Be),i.input=a,i.options=t,De(r,i)}))}function He(e){return e.replace(/[-[\]/{}()*+?.\\$^|]/g,"\\$&")}var Ue=function(){var e=r({displayMode:!0,throwOnError:!1,errorColor:"#ff0000",delimiters:null},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});function t(e,t){return!(!e||"object"!==i(e)||!e.hasOwnProperty(t))}function n(e,n,r){return!!(t(e,n)&&t(e[n],r)&&(a=e[n][r],Array.isArray(a)&&a.length))&&(e[n][r].forEach((function(e){e.display="inline"!==r,"asciimath"===n&&(e.asciimath=!0)})),e[n][r]);var a}return Array.isArray(e.delimiters)?e.delimiters.length||(e.delimiters=[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"@@",right:"@@",display:!0,asciimath:!0},{left:"@ ",right:" @",display:!1,asciimath:!0},{left:"\\~",right:"\\~",display:!1,asciimath:!0}]):e.delimiters=[].concat(n(e.delimiters,"texmath","display")||[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0}]).concat(n(e.delimiters,"texmath","inline")||[{left:"\\(",right:"\\)",display:!1}]).concat(n(e.delimiters,"asciimath","display")||[{left:"@@",right:"@@",display:!0,asciimath:!0}]).concat(n(e.delimiters,"asciimath","inline")||[{left:"@ ",right:" @",display:!1,asciimath:!0},{left:"\\~",right:"\\~",display:!1,asciimath:!0}]),e};function Fe(e){var t=0,n=Ue(e),r=n.delimiters.map((function(e){var n=e.right,r=e.display,a=e.asciimath;return{test:RegExp("".concat(He(e.left),"(.+?)").concat(He(n)),"g"),replacer:function(e,n){return++t,a&&(n=ze(n)),r?"\\[".concat(n,"\\]"):"\\(".concat(n,"\\)")}}}));return[{type:"output",config:n,filter:function(e){t=0;var i=e.wrapper;if(!i)return!1;r.length&&i.querySelectorAll(":not(code):not(pre)").forEach((function(e){a(e.childNodes).filter((function(e){return"#text"===e.nodeName&&e.nodeValue.trim()})).forEach((function(e){var t=r.reduce((function(e,t){return e.replace(t.test,t.replacer)}),e.nodeValue);e.nodeValue=t}))}));var o=i.querySelectorAll("code.latex.language-latex"),s=i.querySelectorAll("code.asciimath.language-asciimath");if(!o.length&&!s.length){if(t>0){var l=function e(t,n){Re()?(n(i.ownerDocument.body,u.config),t(!0)):setTimeout((function(){e(t,n)}),10)};this.config.cssLink=x.getSrc(Be);var u=this;return console.log(g("Begin render inline katex elements.")),new Promise((function(e){Ie((function(t){l(e,t)}))})).then((function(){return console.log(g("End render inline katex elements.")),e}))}return!1}return n.cssLink=x.getSrc(Be),console.log(g("Begin render katex elements.")),function(e,t,n){return Te=e.length+t.length,Ie(),new Promise((function(r){var a=[];e.forEach((function(e){a.push(qe(e,n,!1))})),t.forEach((function(e){a.push(qe(e,n,!0))})),Promise.all(a).then((function(){r(!0)}))}))}(o,s,this.config).then((function(){return console.log(g("End render katex elements.")),e}))}}]}var Ze="echarts";if("undefined"==typeof window)throw Error("The showdown ".concat(Ze," extension can only be used in browser environment!"));if(void 0===$e)var $e=window.echarts||void 0;function We(){return!!$e}var Ve=!1;function Ye(e,t){if(We()){var n=t.className;return t.element.parentNode.outerHTML='
'),e(!0)}setTimeout((function(){Ye(e,t)}),20)}function Ge(e,t,n){var a=E.createElementMeta(Ze,e);if(!a)return Promise.resolve(!1);n=JSON.stringify(r(r({},n),{},{ssr:!1}));var i=JSON.stringify(JSON.parse(a.data)),o={id:a.id,code:"(function() {\n let el = document.getElementById('".concat(a.id,"');\n if (el){\n let config = JSON.parse('").concat(n,"');\n let chart = echarts.init(el, null, config);\n let option = JSON.parse('").concat(i,"');\n chart.setOption(option);\n }\n })();")};return t.push(o),new Promise((function(e){Ye(e,a)}))}function Je(e,t,n){return function(){var e=We();if("undefined"!=typeof window){if(Ve)return e;e||(Ve=!0,x.loadScript(Ze).then((function(e){$e=E.interopDefault(window[e])})))}}(),new Promise((function(r){var a=[];e.forEach((function(e){a.push(Ge(e,t,n))})),Promise.all(a).then((function(){r(!0)}))}))}function Ke(e){var t=function(){return r({renderer:"svg",ssr:!1,width:400,height:300,tooltip:{show:!0},animation:!0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.".concat(Ze,".language-").concat(Ze));return!!n.length&&(console.log(g("Begin render ".concat(Ze," elements."))),Je(n,e.scripts,this.config).then((function(){return console.log(g("End render ".concat(Ze," elements."))),e})))}}]}var Xe="mermaid";if("undefined"==typeof window)throw Error("The showdown mermaid extension can only be used in browser environment!");if(void 0===Qe)var Qe=window.mermaid||void 0;function et(){return!(void 0===Qe||!Qe)}var tt=!1;function nt(e,t){if(et()){var n=t.className,r=t.element.parentNode;Qe.render(t.id,t.data).then((function(t){r.outerHTML='
').concat(t.svg,"
"),e(!0)}))}else setTimeout((function(){nt(e,t)}),10)}function rt(e){return new Promise((function(t){var n=E.createElementMeta(Xe,e);if(!n)return t(!1);nt(t,n)}))}function at(e,t){return function(e){var t=et();if("undefined"!=typeof window){if(tt)return t;if(!t)return tt=!0,x.loadScript(Xe).then((function(t){(Qe=E.interopDefault(window[t])).initialize(e)})),t}Qe.initialize(e)}(t),new Promise((function(t){var n=[];e.forEach((function(e){n.push(rt(e))})),Promise.all(n).then((function(){t(!0)}))}))}function it(e){var t=function(){return r({theme:"forest",logLevel:4,startOnLoad:!1,arrowMarkerAbsolute:!1,flowchart:{curve:"basis"},gantt:{axisFormat:"%m/%d/%Y"},sequence:{actorMargin:50}},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.mermaid.language-mermaid");return!!n.length&&(console.log(g("Begin render mermaid elements.")),at(n,this.config).then((function(){return console.log(g("End render mermaid elements.")),e})))}}]}var ot="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},st=[],lt=[],ut="undefined"!=typeof Uint8Array?Uint8Array:Array,ct=!1;function dt(){ct=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;64>t;++t)st[t]=e[t],lt[e.charCodeAt(t)]=t;lt[45]=62,lt[95]=63}function ht(e,t,n){for(var r,a=[],i=t;n>i;i+=3)a.push(st[(r=(e[i]<<16)+(e[i+1]<<8)+e[i+2])>>18&63]+st[r>>12&63]+st[r>>6&63]+st[63&r]);return a.join("")}function ft(e){var t;ct||dt();for(var n=e.length,r=n%3,a="",i=[],o=16383,s=0,l=n-r;l>s;s+=o)i.push(ht(e,s,s+o>l?l:s+o));return 1===r?(a+=st[(t=e[n-1])>>2],a+=st[t<<4&63],a+="=="):2===r&&(a+=st[(t=(e[n-2]<<8)+e[n-1])>>10],a+=st[t>>4&63],a+=st[t<<2&63],a+="="),i.push(a),i.join("")}function pt(e,t,n,r,a){var i,o,s=8*a-r-1,l=(1<>1,c=-7,d=n?a-1:0,h=n?-1:1,f=e[t+d];for(d+=h,i=f&(1<<-c)-1,f>>=-c,c+=s;c>0;i=256*i+e[t+d],d+=h,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=r;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===i)i=1-u;else{if(i===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),i-=u}return(f?-1:1)*o*Math.pow(2,i-r)}function gt(e,t,n,r,a,i){var o,s,l,u=8*i-a-1,c=(1<>1,h=23===a?5.960464477539062e-8:0,f=r?0:i-1,p=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,o=c):(1>t*(l=Math.pow(2,-(o=Math.floor(Math.log(t)/Math.LN2))))&&(o--,l*=2),2>(t+=1>o+d?h*Math.pow(2,1-d):h/l)*l||(o++,l/=2),c>o+d?1>o+d?(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0):(s=(t*l-1)*Math.pow(2,a),o+=d):(s=0,o=c));a>=8;e[n+f]=255&s,f+=p,s/=256,a-=8);for(o=o<0;e[n+f]=255&o,f+=p,o/=256,u-=8);e[n+f-p]|=128*g}var mt={}.toString,_t=Array.isArray||function(e){return"[object Array]"==mt.call(e)};function wt(){return vt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function bt(e,t){if(wt()n||n>t.byteLength)throw new RangeError("'offset' is out of bounds");if(n+(r||0)>t.byteLength)throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);vt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=vt.prototype:e=Et(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!vt.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|At(t,n);e=bt(e,r);var a=e.write(t,n);a!==r&&(e=e.slice(0,a));return e}(e,t,n):function(e,t){if(jt(t)){var n=0|St(t.length);return 0===(e=bt(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?bt(e,0):Et(e,t);if("Buffer"===t.type&&_t(t.data))return Et(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function kt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(0>e)throw new RangeError('"size" argument must not be negative')}function xt(e,t){if(kt(t),e=bt(e,0>t?0:0|St(t)),!vt.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;++n)e[n]=0;return e}function Et(e,t){var n=0>t.length?0:0|St(t.length);e=bt(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function St(e){if(e>=wt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+wt().toString(16)+" bytes");return 0|e}function jt(e){return!(null==e||!e._isBuffer)}function At(e,t){if(jt(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return en(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return tn(e).length;default:if(r)return en(e).length;t=(""+t).toLowerCase(),r=!0}}function Lt(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if((t>>>=0)>=(n>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ft(this,t,n);case"utf8":case"utf-8":return Dt(this,t,n);case"ascii":return Ht(this,t,n);case"latin1":case"binary":return Ut(this,t,n);case"base64":return It(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Pt(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Ct(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),isNaN(n=+n)&&(n=a?0:e.length-1),0>n&&(n=e.length+n),e.length>n){if(0>n){if(!a)return-1;n=0}}else{if(a)return-1;n=e.length-1}if("string"==typeof t&&(t=vt.from(t,r)),jt(t))return 0===t.length?-1:zt(e,t,n,r,a);if("number"==typeof t)return t&=255,vt.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):zt(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function zt(e,t,n,r,a){var i,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=(r+"").toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(2>e.length||2>t.length)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var c=-1;for(i=n;s>i;i++)if(u(e,i)===u(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===l)return c*o}else-1!==c&&(i-=i-c),c=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var d=!0,h=0;l>h;h++)if(u(e,i+h)!==u(t,h)){d=!1;break}if(d)return i}return-1}function Mt(e,t,n,r){var a=e.length-(n=Number(n)||0);r?(r=Number(r))>a&&(r=a):r=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var o=0;r>o;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function Ot(e,t,n,r){return nn(en(t,e.length-n),e,n,r)}function Tt(e,t,n,r){return nn(function(e){for(var t=[],n=0;e.length>n;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function Rt(e,t,n,r){return Tt(e,t,n,r)}function Nt(e,t,n,r){return nn(tn(t),e,n,r)}function Bt(e,t,n,r){return nn(function(e,t){for(var n,r,a=[],i=0;e.length>i&&0<=(t-=2);++i)r=(n=e.charCodeAt(i))>>8,a.push(n%256),a.push(r);return a}(t,e.length-n),e,n,r)}function It(e,t,n){return ft(0===t&&n===e.length?e:e.slice(t,n))}function Dt(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;n>a;){var i,o,s,l,u=e[a],c=null,d=u>239?4:u>223?3:u>191?2:1;if(n>=a+d)switch(d){case 1:128>u&&(c=u);break;case 2:128==(192&(i=e[a+1]))&&(l=(31&u)<<6|63&i)>127&&(c=l);break;case 3:o=e[a+2],128==(192&(i=e[a+1]))&&128==(192&o)&&(l=(15&u)<<12|(63&i)<<6|63&o)>2047&&(55296>l||l>57343)&&(c=l);break;case 4:o=e[a+2],s=e[a+3],128==(192&(i=e[a+1]))&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&1114112>l&&(c=l)}null===c?(c=65533,d=1):c>65535&&(r.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),r.push(c),a+=d}return function(e){var t=e.length;if(qt>=t)return String.fromCharCode.apply(String,e);var n="",r=0;for(;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=qt));return n}(r)}vt.TYPED_ARRAY_SUPPORT=void 0===ot.TYPED_ARRAY_SUPPORT||ot.TYPED_ARRAY_SUPPORT,wt(),vt.poolSize=8192,vt._augment=function(e){return e.__proto__=vt.prototype,e},vt.from=function(e,t,n){return yt(null,e,t,n)},vt.TYPED_ARRAY_SUPPORT&&(vt.prototype.__proto__=Uint8Array.prototype,vt.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Symbol),vt.alloc=function(e,t,n){return function(e,t,n,r){return kt(t),t>0&&void 0!==n?"string"==typeof r?bt(e,t).fill(n,r):bt(e,t).fill(n):bt(e,t)}(null,e,t,n)},vt.allocUnsafe=function(e){return xt(null,e)},vt.allocUnsafeSlow=function(e){return xt(null,e)},vt.isBuffer=rn,vt.compare=function(e,t){if(!jt(e)||!jt(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,a=0,i=Math.min(n,r);i>a;++a)if(e[a]!==t[a]){n=e[a],r=t[a];break}return r>n?-1:n>r?1:0},vt.isEncoding=function(e){switch((e+"").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}},vt.concat=function(e,t){if(!_t(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return vt.alloc(0);var n;if(void 0===t)for(t=0,n=0;e.length>n;++n)t+=e[n].length;var r=vt.allocUnsafe(t),a=0;for(n=0;e.length>n;++n){var i=e[n];if(!jt(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,a),a+=i.length}return r},vt.byteLength=At,vt.prototype._isBuffer=!0,vt.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;e>t;t+=2)Pt(this,t,t+1);return this},vt.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)Pt(this,t,t+3),Pt(this,t+1,t+2);return this},vt.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;e>t;t+=8)Pt(this,t,t+7),Pt(this,t+1,t+6),Pt(this,t+2,t+5),Pt(this,t+3,t+4);return this},vt.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Dt(this,0,e):Lt.apply(this,arguments)},vt.prototype.equals=function(e){if(!jt(e))throw new TypeError("Argument must be a Buffer");return this===e||0===vt.compare(this,e)},vt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},vt.prototype.compare=function(e,t,n,r,a){if(!jt(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),0>t||n>e.length||0>r||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(i,o),l=this.slice(r,a),u=e.slice(t,n),c=0;s>c;++c)if(l[c]!==u[c]){i=l[c],o=u[c];break}return o>i?-1:i>o?1:0},vt.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},vt.prototype.indexOf=function(e,t,n){return Ct(this,e,t,n,!0)},vt.prototype.lastIndexOf=function(e,t,n){return Ct(this,e,t,n,!1)},vt.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return Mt(this,e,t,n);case"utf8":case"utf-8":return Ot(this,e,t,n);case"ascii":return Tt(this,e,t,n);case"latin1":case"binary":return Rt(this,e,t,n);case"base64":return Nt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},vt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var qt=4096;function Ht(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;n>a;++a)r+=String.fromCharCode(127&e[a]);return r}function Ut(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;n>a;++a)r+=String.fromCharCode(e[a]);return r}function Ft(e,t,n){var r=e.length;t&&t>=0||(t=0),(!n||0>n||n>r)&&(n=r);for(var a="",i=t;n>i;++i)a+=Qt(e[i]);return a}function Zt(e,t,n){for(var r=e.slice(t,n),a="",i=0;r.length>i;i+=2)a+=String.fromCharCode(r[i]+256*r[i+1]);return a}function $t(e,t,n){if(e%1!=0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Wt(e,t,n,r,a,i){if(!jt(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||i>t)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Vt(e,t,n,r){0>t&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-n,2);i>a;++a)e[n+a]=(t&255<<8*(r?a:1-a))>>>8*(r?a:1-a)}function Yt(e,t,n,r){0>t&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-n,4);i>a;++a)e[n+a]=t>>>8*(r?a:3-a)&255}function Gt(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function Jt(e,t,n,r,a){return a||Gt(e,0,n,4),gt(e,t,n,r,23,4),n+4}function Kt(e,t,n,r,a){return a||Gt(e,0,n,8),gt(e,t,n,r,52,8),n+8}vt.prototype.slice=function(e,t){var n,r=this.length;if(0>(e=~~e)?0>(e+=r)&&(e=0):e>r&&(e=r),0>(t=void 0===t?r:~~t)?0>(t+=r)&&(t=0):t>r&&(t=r),e>t&&(t=e),vt.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=vt.prototype;else{var a=t-e;n=new vt(a,void 0);for(var i=0;a>i;++i)n[i]=this[i+e]}return n},vt.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||$t(e,t,this.length);for(var r=this[e],a=1,i=0;++i0&&(a*=256);)r+=this[e+--t]*a;return r},vt.prototype.readUInt8=function(e,t){return t||$t(e,1,this.length),this[e]},vt.prototype.readUInt16LE=function(e,t){return t||$t(e,2,this.length),this[e]|this[e+1]<<8},vt.prototype.readUInt16BE=function(e,t){return t||$t(e,2,this.length),this[e]<<8|this[e+1]},vt.prototype.readUInt32LE=function(e,t){return t||$t(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},vt.prototype.readUInt32BE=function(e,t){return t||$t(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},vt.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||$t(e,t,this.length);for(var r=this[e],a=1,i=0;++ir||(r-=Math.pow(2,8*t)),r},vt.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||$t(e,t,this.length);for(var r=t,a=1,i=this[e+--r];r>0&&(a*=256);)i+=this[e+--r]*a;return(a*=128)>i||(i-=Math.pow(2,8*t)),i},vt.prototype.readInt8=function(e,t){return t||$t(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},vt.prototype.readInt16LE=function(e,t){t||$t(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},vt.prototype.readInt16BE=function(e,t){t||$t(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},vt.prototype.readInt32LE=function(e,t){return t||$t(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},vt.prototype.readInt32BE=function(e,t){return t||$t(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},vt.prototype.readFloatLE=function(e,t){return t||$t(e,4,this.length),pt(this,e,!0,23,4)},vt.prototype.readFloatBE=function(e,t){return t||$t(e,4,this.length),pt(this,e,!1,23,4)},vt.prototype.readDoubleLE=function(e,t){return t||$t(e,8,this.length),pt(this,e,!0,52,8)},vt.prototype.readDoubleBE=function(e,t){return t||$t(e,8,this.length),pt(this,e,!1,52,8)},vt.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Wt(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+a]=e/i&255;return t+n},vt.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,1,255,0),vt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},vt.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Vt(this,e,t,!0),t+2},vt.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,2,65535,0),vt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Vt(this,e,t,!1),t+2},vt.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Yt(this,e,t,!0),t+4},vt.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,4,4294967295,0),vt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Yt(this,e,t,!1),t+4},vt.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);Wt(this,e,t,n,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++ie&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},vt.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);Wt(this,e,t,n,a-1,-a)}var i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)0>e&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},vt.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,1,127,-128),vt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},vt.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Vt(this,e,t,!0),t+2},vt.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,2,32767,-32768),vt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Vt(this,e,t,!1),t+2},vt.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,4,2147483647,-2147483648),vt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Yt(this,e,t,!0),t+4},vt.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Wt(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),vt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Yt(this,e,t,!1),t+4},vt.prototype.writeFloatLE=function(e,t,n){return Jt(this,e,t,!0,n)},vt.prototype.writeFloatBE=function(e,t,n){return Jt(this,e,t,!1,n)},vt.prototype.writeDoubleLE=function(e,t,n){return Kt(this,e,t,!0,n)},vt.prototype.writeDoubleBE=function(e,t,n){return Kt(this,e,t,!1,n)},vt.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),e.length>t||(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),r-n>e.length-t&&(r=e.length-t+n);var a,i=r-n;if(this===e&&t>n&&r>t)for(a=i-1;a>=0;--a)e[a+t]=this[a+n];else if(1e3>i||!vt.TYPED_ARRAY_SUPPORT)for(a=0;i>a;++a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},vt.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var a=e.charCodeAt(0);256>a&&(e=a)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!vt.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(0>t||t>this.length||n>this.length)throw new RangeError("Out of range index");if(t>=n)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;n>i;++i)this[i]=e;else{var o=jt(e)?e:en(""+new vt(e,r)),s=o.length;for(i=0;n-t>i;++i)this[i+t]=o[i%s]}return this};var Xt=/[^+\/0-9A-Za-z-_]/g;function Qt(e){return 16>e?"0"+e.toString(16):e.toString(16)}function en(e,t){var n;t=t||1/0;for(var r=e.length,a=null,i=[],o=0;r>o;++o){if((n=e.charCodeAt(o))>55295&&57344>n){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,128>n){if(0>(t-=1))break;i.push(n)}else if(2048>n){if(0>(t-=2))break;i.push(n>>6|192,63&n|128)}else if(65536>n){if(0>(t-=3))break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(n>=1114112)throw Error("Invalid code point");if(0>(t-=4))break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function tn(e){return function(e){var t,n,r,a,i,o;ct||dt();var s=e.length;if(s%4>0)throw Error("Invalid string. Length must be a multiple of 4");o=new ut(3*s/4-(i="="===e[s-2]?2:"="===e[s-1]?1:0)),r=i>0?s-4:s;var l=0;for(t=0,n=0;r>t;t+=4,n+=3)a=lt[e.charCodeAt(t)]<<18|lt[e.charCodeAt(t+1)]<<12|lt[e.charCodeAt(t+2)]<<6|lt[e.charCodeAt(t+3)],o[l++]=a>>16&255,o[l++]=a>>8&255,o[l++]=255&a;return 2===i?(a=lt[e.charCodeAt(t)]<<2|lt[e.charCodeAt(t+1)]>>4,o[l++]=255&a):1===i&&(a=lt[e.charCodeAt(t)]<<10|lt[e.charCodeAt(t+1)]<<4|lt[e.charCodeAt(t+2)]>>2,o[l++]=a>>8&255,o[l++]=255&a),o}(function(e){if(2>(e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Xt,"")).length)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function nn(e,t,n,r){for(var a=0;r>a&&(a+n1)for(var n=1;arguments.length>n;n++)t[n-1]=arguments[n];hn.push(new wn(e,t)),1!==hn.length||fn||cn(mn)}function wn(e,t){this.fun=e,this.array=t}wn.prototype.run=function(){this.fun.apply(null,this.array)};function bn(){}var vn=bn,yn=bn,kn=bn,xn=bn,En=bn,Sn=bn,jn=bn;var An=ot.performance||{},Ln=An.now||An.mozNow||An.msNow||An.oNow||An.webkitNow||function(){return(new Date).getTime()};var Pn=new Date;var Cn={nextTick:_n,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:vn,addListener:yn,once:kn,off:xn,removeListener:En,removeAllListeners:Sn,emit:jn,binding:function(e){throw Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Ln.call(An),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],0>(r-=e[1])&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Pn)/1e3}};function zn(){}function Mn(){Mn.init.call(this)}function On(e){return void 0===e._maxListeners?Mn.defaultMaxListeners:e._maxListeners}function Tn(e,t,n,r){var a,i,o,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),o=i[t]):(i=e._events=new zn,e._eventsCount=0),o){if("function"==typeof o?o=i[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),!o.warned&&(a=On(e))&&a>0&&o.length>a){o.warned=!0;var l=Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,"function"==typeof console.warn?console.warn(s):console.log(s)}}else o=i[t]=n,++e._eventsCount;return e}function Rn(e,t,n){var r=!1;function a(){e.removeListener(t,a),r||(r=!0,n.apply(e,arguments))}return a.listener=n,a}function Nn(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function Bn(e,t){for(var n=Array(t);t--;)n[t]=e[t];return n}zn.prototype=Object.create(null),Mn.EventEmitter=Mn,Mn.usingDomains=!1,Mn.prototype.domain=void 0,Mn.prototype._events=void 0,Mn.prototype._maxListeners=void 0,Mn.defaultMaxListeners=10,Mn.init=function(){this.domain=null,Mn.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new zn,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Mn.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Mn.prototype.getMaxListeners=function(){return On(this)},Mn.prototype.emit=function(e){var t,n,r,a,i,o,s,l="error"===e;if(o=this._events)l=l&&null==o.error;else if(!l)return!1;if(s=this.domain,l){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=o[e]))return!1;var c="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,a=Bn(e,r),i=0;r>i;++i)a[i].call(n)}(n,c,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var a=e.length,i=Bn(e,a),o=0;a>o;++o)i[o].call(n,r)}(n,c,this,arguments[1]);break;case 3:!function(e,t,n,r,a){if(t)e.call(n,r,a);else for(var i=e.length,o=Bn(e,i),s=0;i>s;++s)o[s].call(n,r,a)}(n,c,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,a,i){if(t)e.call(n,r,a,i);else for(var o=e.length,s=Bn(e,o),l=0;o>l;++l)s[l].call(n,r,a,i)}(n,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=Array(r-1),i=1;r>i;i++)a[i-1]=arguments[i];!function(e,t,n,r){if(t)e.apply(n,r);else for(var a=e.length,i=Bn(e,a),o=0;a>o;++o)i[o].apply(n,r)}(n,c,this,a)}return!0},Mn.prototype.on=Mn.prototype.addListener=function(e,t){return Tn(this,e,t,!1)},Mn.prototype.prependListener=function(e,t){return Tn(this,e,t,!0)},Mn.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Rn(this,e,t)),this},Mn.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Rn(this,e,t)),this},Mn.prototype.removeListener=function(e,t){var n,r,a,i,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new zn:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,i=n.length;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){o=n[i].listener,a=i;break}if(0>a)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new zn,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,a=e.length;a>r;n+=1,r+=1)e[n]=e[r];e.pop()}(n,a);r.removeListener&&this.emit("removeListener",e,o||t)}return this},Mn.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new zn,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new zn:delete n[e]),this;if(0===arguments.length){for(var r,a=Object.keys(n),i=0;a.length>i;++i)"removeListener"!==(r=a[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new zn,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},Mn.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=Array(e.length),n=0;t.length>n;++n)t[n]=e[n].listener||e[n];return t}(t):[]},Mn.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Nn.call(e,t)},Mn.prototype.listenerCount=Nn,Mn.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var In="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},Dn=/%[sdj%]/g;function qn(e){if(!Xn(e)){for(var t=[],n=0;arguments.length>n;n++)t.push(Zn(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,a=r.length,i=(e+"").replace(Dn,(function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return r[n++]+"";case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),o=r[n];a>n;o=r[++n])Kn(o)||!tr(o)?i+=" "+o:i+=" "+Zn(o);return i}function Hn(e,t){if(Qn(ot.process))return function(){return Hn(e,t).apply(this,arguments)};if(!0===Cn.noDeprecation)return e;var n=!1;return function(){if(!n){if(Cn.throwDeprecation)throw Error(t);Cn.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var Un,Fn={};function Zn(e,t){var n={seen:[],stylize:Wn};return 3>arguments.length||(n.depth=arguments[2]),4>arguments.length||(n.colors=arguments[3]),Jn(t)?n.showHidden=t:t&&function(e,t){if(!t||!tr(t))return e;var n=Object.keys(t),r=n.length;for(;r--;)e[n[r]]=t[n[r]]}(n,t),Qn(n.showHidden)&&(n.showHidden=!1),Qn(n.depth)&&(n.depth=2),Qn(n.colors)&&(n.colors=!1),Qn(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=$n),Vn(n,e,n.depth)}function $n(e,t){var n=Zn.styles[t];return n?"["+Zn.colors[n][0]+"m"+e+"["+Zn.colors[n][1]+"m":e}function Wn(e,t){return e}function Vn(e,t,n){if(e.customInspect&&t&&ar(t.inspect)&&t.inspect!==Zn&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return Xn(r)||(r=Vn(e,r,n)),r}var a=function(e,t){if(Qn(t))return e.stylize("undefined","undefined");if(Xn(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(r=t,"number"==typeof r)return e.stylize(""+t,"number");var r;if(Jn(t))return e.stylize(""+t,"boolean");if(Kn(t))return e.stylize("null","null")}(e,t);if(a)return a;var i=Object.keys(t),o=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),rr(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Yn(t);if(0===i.length){if(ar(t))return e.stylize("[Function"+(t.name?": "+t.name:"")+"]","special");if(er(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(nr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(rr(t))return Yn(t)}var s,l="",u=!1,c=["{","}"];(Array.isArray(t)&&(u=!0,c=["[","]"]),ar(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]");return er(t)&&(l=" "+RegExp.prototype.toString.call(t)),nr(t)&&(l=" "+Date.prototype.toUTCString.call(t)),rr(t)&&(l=" "+Yn(t)),0!==i.length||u&&0!=t.length?0>n?er(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),s=u?function(e,t,n,r,a){for(var i=[],o=0,s=t.length;s>o;++o)or(t,o+"")?i.push(Gn(e,t,n,r,o+"",!0)):i.push("");return a.forEach((function(a){a.match(/^\d+$/)||i.push(Gn(e,t,n,r,a,!0))})),i}(e,t,n,o,i):i.map((function(r){return Gn(e,t,n,o,r,u)})),e.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(s,l,c)):c[0]+l+c[1]}function Yn(e){return"["+Error.prototype.toString.call(e)+"]"}function Gn(e,t,n,r,a,i){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?s=e.stylize(l.set?"[Getter/Setter]":"[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),or(r,a)||(o="["+a+"]"),s||(0>e.seen.indexOf(l.value)?(s=Kn(n)?Vn(e,l.value,null):Vn(e,l.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),Qn(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function Jn(e){return"boolean"==typeof e}function Kn(e){return null===e}function Xn(e){return"string"==typeof e}function Qn(e){return void 0===e}function er(e){return tr(e)&&"[object RegExp]"===ir(e)}function tr(e){return"object"==typeof e&&null!==e}function nr(e){return tr(e)&&"[object Date]"===ir(e)}function rr(e){return tr(e)&&("[object Error]"===ir(e)||e instanceof Error)}function ar(e){return"function"==typeof e}function ir(e){return Object.prototype.toString.call(e)}function or(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function sr(){this.head=null,this.tail=null,this.length=0}Zn.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]},Zn.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},sr.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},sr.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},sr.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,e}},sr.prototype.clear=function(){this.head=this.tail=null,this.length=0},sr.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},sr.prototype.concat=function(e){if(0===this.length)return vt.alloc(0);if(1===this.length)return this.head.data;for(var t=vt.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var lr=vt.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ur(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!lr(e))throw Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=dr;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=hr;break;default:return void(this.write=cr)}this.charBuffer=new vt(6),this.charReceived=0,this.charLength=0}function cr(e){return e.toString(this.encoding)}function dr(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function hr(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}ur.prototype.write=function(e){for(var t="";this.charLength;){var n=this.charLength-this.charReceived>e.length?e.length:this.charLength-this.charReceived;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charLength>this.charReceived)return"";if(e=e.slice(n,e.length),55296>(r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))||r>56319){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,a=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,a),a-=this.charReceived),(r=(t+=e.toString(this.encoding,0,a)).charCodeAt(a=t.length-1))>=55296&&56319>=r){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),t.substring(0,a)}return t},ur.prototype.detectIncompleteChar=function(e){for(var t=3>e.length?e.length:3;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(2>=t&&n>>4==14){this.charLength=3;break}if(3>=t&&n>>3==30){this.charLength=4;break}}this.charReceived=t},ur.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.encoding;t+=this.charBuffer.slice(0,this.charReceived).toString(n)}return t},gr.ReadableState=pr;var fr=function(e){if(Qn(Un)&&(Un=Cn.env.NODE_DEBUG||""),e=e.toUpperCase(),!Fn[e])if(RegExp("\\b"+e+"\\b","i").test(Un)){Fn[e]=function(){var t=qn.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else Fn[e]=function(){};return Fn[e]}("stream");function pr(e,t){this.objectMode=!!(e=e||{}).objectMode,t instanceof Fr&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark;this.highWaterMark=n||0===n?n:this.objectMode?16:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=new sr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new ur(e.encoding),this.encoding=e.encoding)}function gr(e){if(!(this instanceof gr))return new gr(e);this._readableState=new pr(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),Mn.call(this)}function mr(e,t,n,r,a){var i=function(e,t){var n=null;rn(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(i)e.emit("error",i);else if(null===n)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,br(e)}(e,t);else if(t.objectMode||n&&n.length>0){if(t.ended&&!a)e.emit("error",Error("stream.push() after EOF"));else if(t.endEmitted&&a){e.emit("error",Error("stream.unshift() after end event"))}else{var o;!t.decoder||a||r||(n=t.decoder.write(n),o=!t.objectMode&&0===n.length),a||(t.reading=!1),o||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,a?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&br(e))),function(e,t){t.readingMore||(t.readingMore=!0,_n(yr,e,t))}(e,t)}}else a||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.highWaterMark>e.length||0===e.length)}(t)}In(gr,Mn),gr.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=vt.from(e,t),t=""),mr(this,n,e,t,!1)},gr.prototype.unshift=function(e){return mr(this,this._readableState,e,"",!0)},gr.prototype.isPaused=function(){return!1===this._readableState.flowing},gr.prototype.setEncoding=function(e){return this._readableState.decoder=new ur(e),this._readableState.encoding=e,this};var _r=8388608;function wr(e,t){return 0>=e||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return _r>e?(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++):e=_r,e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function br(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(fr("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?_n(vr,e):vr(e))}function vr(e){fr("emit readable"),e.emit("readable"),Er(e)}function yr(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.highWaterMark>t.length&&(fr("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function kr(e){fr("readable nexttick read 0"),e.read(0)}function xr(e,t){t.reading||(fr("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Er(e),t.flowing&&!t.reading&&e.read(0)}function Er(e){var t=e._readableState;for(fr("flow",t.flowing);t.flowing&&null!==e.read(););}function Sr(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():e&&t.length>e?n=function(e,t,n){var r;t.head.data.length>e?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,a=n.data;e-=a.length;for(;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(a+=o===i.length?i:i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.head=n.next?n.next:t.tail=null):(t.head=n,n.data=i.slice(o));break}++r}return t.length-=r,a}(e,t):function(e,t){var n=vt.allocUnsafe(e),r=t.head,a=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,o),0===(e-=o)){o===i.length?(++a,t.head=r.next?r.next:t.tail=null):(t.head=r,r.data=i.slice(o));break}++a}return t.length-=a,n}(e,t);return r}(e,t.buffer,t.decoder):(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()),n);var n}function jr(e){var t=e._readableState;if(t.length>0)throw Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,_n(Ar,t,e))}function Ar(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Lr(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function Pr(){}function Cr(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function zr(e,t){Object.defineProperty(this,"buffer",{get:Hn((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),this.objectMode=!!(e=e||{}).objectMode,t instanceof Fr&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark;this.highWaterMark=n||0===n?n:this.objectMode?16:16384,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.decodeStrings=!(!1===e.decodeStrings),this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,a=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,a){--t.pendingcb,n?_n(a,r):a(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,a);else{var i=Nr(n);i||n.corked||n.bufferProcessing||!n.bufferedRequest||Rr(e,n),r?_n(Tr,e,n,i,a):Tr(e,n,i,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Dr(this)}function Mr(e){if(!(this instanceof Mr||this instanceof Fr))return new Mr(e);this._writableState=new zr(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),Mn.call(this)}function Or(e,t,n,r,a,i,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(a,t.onwrite):e._write(a,i,t.onwrite),t.sync=!1}function Tr(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Ir(e,t)}function Rr(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=Array(t.bufferedRequestCount),a=t.corkedRequestsFree;a.entry=n;for(var i=0;n;)r[i]=n,n=n.next,i+=1;Or(e,t,!0,t.length,r,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Dr(t)}else{for(;n;){var o=n.chunk;if(Or(e,t,!1,t.objectMode?1:o.length,o,n.encoding,n.callback),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function Nr(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Br(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Ir(e,t){var n=Nr(t);return n&&(0===t.pendingcb?(Br(e,t),t.finished=!0,e.emit("finish")):Br(e,t)),n}function Dr(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var a=r.callback;e.pendingcb--,a(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}gr.prototype.read=function(e){fr("read",e);var t=this._readableState,n=e=parseInt(e,10);if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return fr("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?jr(this):br(this),null;if(0===(e=wr(e,t))&&t.ended)return 0===t.length&&jr(this),null;var r,a=t.needReadable;return fr("need readable",a),(0===t.length||t.highWaterMark>t.length-e)&&fr("length less than watermark",a=!0),t.ended||t.reading?fr("reading or ended",a=!1):a&&(fr("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=wr(n,t))),null===(r=e>0?Sr(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&jr(this)),null!==r&&this.emit("data",r),r},gr.prototype._read=function(e){this.emit("error",Error("not implemented"))},gr.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,fr("pipe count=%d opts=%j",r.pipesCount,t);var a=!t||!1!==t.end?o:u;function i(e){fr("onunpipe"),e===n&&u()}function o(){fr("onend"),e.end()}r.endEmitted?_n(a):n.once("end",a),e.on("unpipe",i);var s=function(e){return function(){var t=e._readableState;fr("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Er(e))}}(n);e.on("drain",s);var l=!1;function u(){fr("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",h),e.removeListener("unpipe",i),n.removeListener("end",o),n.removeListener("end",u),n.removeListener("data",d),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var c=!1;function d(t){fr("ondata"),c=!1,!1!==e.write(t)||c||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==Lr(r.pipes,e))&&!l&&(fr("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,c=!0),n.pause())}function h(t){fr("onerror",t),g(),e.removeListener("error",h),0===e.listeners("error").length&&e.emit("error",t)}function f(){e.removeListener("finish",p),g()}function p(){fr("onfinish"),e.removeListener("close",f),g()}function g(){fr("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",f),e.once("finish",p),e.emit("pipe",n),r.flowing||(fr("pipe resume"),n.resume()),e},gr.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;r>a;a++)n[a].emit("unpipe",this);return this}var i=Lr(t.pipes,e);return-1===i||(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},gr.prototype.addListener=gr.prototype.on=function(e,t){var n=Mn.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&br(this):_n(kr,this))}return n},gr.prototype.resume=function(){var e=this._readableState;return e.flowing||(fr("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,_n(xr,e,t))}(this,e)),this},gr.prototype.pause=function(){return fr("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(fr("pause"),this._readableState.flowing=!1,this.emit("pause")),this},gr.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var a in e.on("end",(function(){if(fr("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(a){(fr("wrapped data"),t.decoder&&(a=t.decoder.write(a)),t.objectMode&&null==a)||(t.objectMode||a&&a.length)&&(r.push(a)||(n=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));return function(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){fr("wrapped _read",t),n&&(n=!1,e.resume())},r},gr._fromList=Sr,Mr.WritableState=zr,In(Mr,Mn),zr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},Mr.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))},Mr.prototype.write=function(e,t,n){var r=this._writableState,a=!1;return"function"==typeof t&&(n=t,t=null),vt.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=Pr),r.ended?function(e,t){var n=Error("write after end");e.emit("error",n),_n(t,n)}(this,n):function(e,t,n,r){var a=!0,i=!1;return null===n?i=new TypeError("May not write null values to stream"):vt.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i&&(e.emit("error",i),_n(r,i),a=!1),a}(this,r,e,n)&&(r.pendingcb++,a=function(e,t,n,r,a){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=vt.from(t,n));return t}(t,n,r),vt.isBuffer(n)&&(r="buffer");var i=t.objectMode?1:n.length;t.length+=i;var o=t.highWaterMark>t.length;o||(t.needDrain=!0);if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new Cr(n,r,a),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Or(e,t,!1,i,n,r,a);return o}(this,r,e,t,n)),a},Mr.prototype.cork=function(){this._writableState.corked++},Mr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Rr(this,e))},Mr.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())<=-1)throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Mr.prototype._write=function(e,t,n){n(Error("not implemented"))},Mr.prototype._writev=null,Mr.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,Ir(e,t),n&&(t.finished?_n(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},In(Fr,gr);for(var qr=Object.keys(Mr.prototype),Hr=0;qr.length>Hr;Hr++){var Ur=qr[Hr];Fr.prototype[Ur]||(Fr.prototype[Ur]=Mr.prototype[Ur])}function Fr(e){if(!(this instanceof Fr))return new Fr(e);gr.call(this,e),Mr.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Zr)}function Zr(){this.allowHalfOpen||this._writableState.ended||_n($r,this)}function $r(e){e.end()}function Wr(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var a=r.writecb;if(!a)return e.emit("error",Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n);a(t);var i=e._readableState;i.reading=!1,(i.needReadable||i.highWaterMark>i.length)&&e._read(i.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Vr(e){if(!(this instanceof Vr))return new Vr(e);Fr.call(this,e),this._transformState=new Wr(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Yr(t,e)})):Yr(t)}))}function Yr(e,t){if(t)return e.emit("error",t);var n=e._transformState;if(e._writableState.length)throw Error("Calling transform done when ws.length != 0");if(n.transforming)throw Error("Calling transform done when still transforming");return e.push(null)}function Gr(e){if(!(this instanceof Gr))return new Gr(e);Vr.call(this,e)}function Jr(){Mn.call(this)}In(Vr,Fr),Vr.prototype.push=function(e,t){return this._transformState.needTransform=!1,Fr.prototype.push.call(this,e,t)},Vr.prototype._transform=function(e,t,n){throw Error("Not implemented")},Vr.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var a=this._readableState;(r.needTransform||a.needReadable||a.highWaterMark>a.length)&&this._read(a.highWaterMark)}},Vr.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},In(Gr,Vr),Gr.prototype._transform=function(e,t,n){n(null,e)},In(Jr,Mn),Jr.Readable=gr,Jr.Writable=Mr,Jr.Duplex=Fr,Jr.Transform=Vr,Jr.PassThrough=Gr,Jr.Stream=Jr,Jr.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",o),n.on("close",s));var i=!1;function o(){i||(i=!0,e.end())}function s(){i||(i=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(u(),0===Mn.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",l),e.on("error",l),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e};var Kr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Xr(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function Qr(e,t,n,r,a){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),a);else for(var i=0;r>i;i++)e[a+i]=t[n+i]}var ea=Uint8Array,ta=Uint16Array,na=Int32Array,ra=4,aa=0,ia=1,oa=2;function sa(e){for(var t=e.length;--t>=0;)e[t]=0}var la=0,ua=1,ca=2,da=29,ha=256,fa=ha+1+da,pa=30,ga=19,ma=2*fa+1,_a=15,wa=16,ba=7,va=256,ya=16,ka=17,xa=18,Ea=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Sa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ja=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Aa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],La=Array(2*(fa+2));sa(La);var Pa=Array(2*pa);sa(Pa);var Ca=Array(512);sa(Ca);var za=Array(256);sa(za);var Ma=Array(da);sa(Ma);var Oa,Ta,Ra,Na=Array(pa);function Ba(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}function Ia(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Da(e){return 256>e?Ca[e]:Ca[256+(e>>>7)]}function qa(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Ha(e,t,n){e.bi_valid>wa-n?(e.bi_buf|=t<>wa-e.bi_valid,e.bi_valid+=n-wa):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function Za(e,t,n){var r,a,i=Array(_a+1),o=0;for(r=1;_a>=r;r++)i[r]=o=o+n[r-1]<<1;for(a=0;t>=a;a++){var s=e[2*a+1];0!==s&&(e[2*a]=Fa(i[s]++,s))}}function $a(e){var t;for(t=0;fa>t;t++)e.dyn_ltree[2*t]=0;for(t=0;pa>t;t++)e.dyn_dtree[2*t]=0;for(t=0;ga>t;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*va]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Wa(e){e.bi_valid>8?qa(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Va(e,t,n,r){var a=2*t,i=2*n;return e[i]>e[a]||e[a]===e[i]&&r[n]>=r[t]}function Ya(e,t,n){for(var r=e.heap[n],a=n<<1;e.heap_len>=a&&(e.heap_len>a&&Va(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!Va(t,r,e.heap[a],e.depth));)e.heap[n]=e.heap[a],n=a,a<<=1;e.heap[n]=r}function Ga(e,t,n){var r,a,i,o,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],a=e.pending_buf[e.l_buf+s],s++,0===r?Ua(e,a,t):(Ua(e,(i=za[a])+ha+1,t),0!==(o=Ea[i])&&Ha(e,a-=Ma[i],o),Ua(e,i=Da(--r),n),0!==(o=Sa[i])&&Ha(e,r-=Na[i],o))}while(e.last_lit>s);Ua(e,va,t)}function Ja(e,t){var n,r,a,i=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=ma,n=0;l>n;n++)0!==i[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):i[2*n+1]=0;for(;2>e.heap_len;)i[2*(a=e.heap[++e.heap_len]=2>u?++u:0)]=1,e.depth[a]=0,e.opt_len--,s&&(e.static_len-=o[2*a+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)Ya(e,i,n);a=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ya(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*a]=i[2*n]+i[2*r],e.depth[a]=(e.depth[r]>e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*n+1]=i[2*r+1]=a,e.heap[1]=a++,Ya(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,a,i,o,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,g=0;for(i=0;_a>=i;i++)e.bl_count[i]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;ma>n;n++)(i=l[2*l[2*(r=e.heap[n])+1]+1]+1)>p&&(i=p,g++),l[2*r+1]=i,r>u||(e.bl_count[i]++,o=0,f>r||(o=h[r-f]),e.opt_len+=(s=l[2*r])*(i+o),d&&(e.static_len+=s*(c[2*r+1]+o)));if(0!==g){do{for(i=p-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[p]--,g-=2}while(g>0);for(i=p;0!==i;i--)for(r=e.bl_count[i];0!==r;)u<(a=e.heap[--n])||(l[2*a+1]!==i&&(e.opt_len+=(i-l[2*a+1])*l[2*a],l[2*a+1]=i),r--)}}(e,t),Za(i,u,e.bl_count)}function Ka(e,t,n){var r,a,i=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;n>=r;r++)a=o,o=t[2*(r+1)+1],++ss?e.bl_tree[2*a]+=s:0!==a?(a!==i&&e.bl_tree[2*a]++,e.bl_tree[2*ya]++):s>10?e.bl_tree[2*xa]++:e.bl_tree[2*ka]++,s=0,i=a,0===o?(l=138,u=3):a===o?(l=6,u=3):(l=7,u=4))}function Xa(e,t,n){var r,a,i=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),r=0;n>=r;r++)if(a=o,o=t[2*(r+1)+1],++s>=l||a!==o){if(u>s)do{Ua(e,a,e.bl_tree)}while(0!=--s);else 0!==a?(a!==i&&(Ua(e,a,e.bl_tree),s--),Ua(e,ya,e.bl_tree),Ha(e,s-3,2)):s>10?(Ua(e,xa,e.bl_tree),Ha(e,s-11,7)):(Ua(e,ka,e.bl_tree),Ha(e,s-3,3));s=0,i=a,0===o?(l=138,u=3):a===o?(l=6,u=3):(l=7,u=4)}}sa(Na);var Qa=!1;function ei(e){Qa||(!function(){var e,t,n,r,a,i=Array(_a+1);for(n=0,r=0;da-1>r;r++)for(Ma[r]=n,e=0;1<e;e++)za[n++]=r;for(za[n-1]=r,a=0,r=0;16>r;r++)for(Na[r]=a,e=0;1<e;e++)Ca[a++]=r;for(a>>=7;pa>r;r++)for(Na[r]=a<<7,e=0;1<e;e++)Ca[256+a++]=r;for(t=0;_a>=t;t++)i[t]=0;for(e=0;143>=e;)La[2*e+1]=8,e++,i[8]++;for(;255>=e;)La[2*e+1]=9,e++,i[9]++;for(;279>=e;)La[2*e+1]=7,e++,i[7]++;for(;287>=e;)La[2*e+1]=8,e++,i[8]++;for(Za(La,fa+1,i),e=0;pa>e;e++)Pa[2*e+1]=5,Pa[2*e]=Fa(e,5);Oa=new Ba(La,Ea,ha+1,fa,_a),Ta=new Ba(Pa,Sa,0,pa,_a),Ra=new Ba([],ja,0,ga,ba)}(),Qa=!0),e.l_desc=new Ia(e.dyn_ltree,Oa),e.d_desc=new Ia(e.dyn_dtree,Ta),e.bl_desc=new Ia(e.bl_tree,Ra),e.bi_buf=0,e.bi_valid=0,$a(e)}function ti(e,t,n,r){Ha(e,(la<<1)+(r?1:0),3),function(e,t,n){Wa(e),qa(e,n),qa(e,~n),Qr(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}function ni(e){Ha(e,ua<<1,3),Ua(e,va,La),function(e){16===e.bi_valid?(qa(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8>e.bi_valid||(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}function ri(e,t,n,r){var a,i,o=0;e.level>0?(e.strm.data_type===oa&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;31>=t;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return aa;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return ia;for(t=32;ha>t;t++)if(0!==e.dyn_ltree[2*t])return ia;return aa}(e)),Ja(e,e.l_desc),Ja(e,e.d_desc),o=function(e){var t;for(Ka(e,e.dyn_ltree,e.l_desc.max_code),Ka(e,e.dyn_dtree,e.d_desc.max_code),Ja(e,e.bl_desc),t=ga-1;t>=3&&0===e.bl_tree[2*Aa[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),(i=e.static_len+3+7>>>3)>(a=e.opt_len+3+7>>>3)||(a=i)):a=i=n+5,n+4>a||-1===t?e.strategy===ra||i===a?(Ha(e,(ua<<1)+(r?1:0),3),Ga(e,La,Pa)):(Ha(e,(ca<<1)+(r?1:0),3),function(e,t,n,r){var a;for(Ha(e,t-257,5),Ha(e,n-1,5),Ha(e,r-4,4),a=0;r>a;a++)Ha(e,e.bl_tree[2*Aa[a]+1],3);Xa(e,e.dyn_ltree,t-1),Xa(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Ga(e,e.dyn_ltree,e.dyn_dtree)):ti(e,t,n,r),$a(e),r&&Wa(e)}function ai(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(za[n]+ha+1)]++,e.dyn_dtree[2*Da(t)]++),e.last_lit===e.lit_bufsize-1}function ii(e,t,n,r){for(var a=65535&e,i=e>>>16&65535,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{i=i+(a=a+t[r++]|0)|0}while(--o);a%=65521,i%=65521}return a|i<<16}var oi=function(){for(var e,t=[],n=0;256>n;n++){e=n;for(var r=0;8>r;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function si(e,t,n,r){var a=oi,i=r+n;e^=-1;for(var o=r;i>o;o++)e=e>>>8^a[255&(e^t[o])];return~e}var li,ui=0,ci=4,di=0,hi=-2,fi=2,pi=8,gi=286,mi=30,_i=19,wi=2*gi+1,bi=15,vi=3,yi=258,ki=yi+vi+1,xi=42,Ei=103,Si=113,ji=666,Ai=1,Li=2,Pi=3,Ci=4;function zi(e,t){return e.msg=Kr[t],t}function Mi(e){return(e<<1)-(e>4?9:0)}function Oi(e){for(var t=e.length;--t>=0;)e[t]=0}function Ti(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Qr(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function Ri(e,t){ri(e,0>e.block_start?-1:e.block_start,e.strstart-e.block_start,t),e.block_start=e.strstart,Ti(e.strm)}function Ni(e,t){e.pending_buf[e.pending++]=t}function Bi(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Ii(e,t){var n,r,a=e.max_chain_length,i=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-ki?e.strstart-(e.w_size-ki):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+yi,f=u[i+o-1],p=u[i+o];e.good_match>e.prev_length||(a>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+o]===p&&u[n+o-1]===f&&u[n]===u[i]&&u[++n]===u[i+1]){i+=2,n++;do{}while(u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&h>i);if(r=yi-(h-i),i=h-yi,r>o){if(e.match_start=t,o=r,r>=s)break;f=u[i+o-1],p=u[i+o]}}}while((t=d[t&c])>l&&0!=--a);return o>e.lookahead?e.lookahead:o}function Di(e){var t,n,r,a,i,o,s,l,u,c,d=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-ki)){Qr(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=d>r?0:r-d}while(--n);t=n=d;do{r=e.prev[--t],e.prev[t]=d>r?0:r-d}while(--n);a+=d}if(0===e.strm.avail_in)break;if(s=e.window,l=e.strstart+e.lookahead,c=void 0,(c=(o=e.strm).avail_in)>(u=a)&&(c=u),n=0===c?0:(o.avail_in-=c,Qr(s,o.input,o.next_in,c,l),1===o.state.wrap?o.adler=ii(o.adler,s,c,l):2===o.state.wrap&&(o.adler=si(o.adler,s,c,l)),o.next_in+=c,o.total_in+=c,c),e.lookahead+=n,e.lookahead+e.insert>=vi)for(e.ins_h=e.window[i=e.strstart-e.insert],e.ins_h=(e.ins_h<=vi););}while(ki>e.lookahead&&0!==e.strm.avail_in)}function qi(e,t){for(var n,r;;){if(ki>e.lookahead){if(Di(e),ki>e.lookahead&&t===ui)return Ai;if(0===e.lookahead)break}if(n=0,vi>e.lookahead||(e.ins_h=(e.ins_h<e.w_size-ki||(e.match_length=Ii(e,n)),vi>e.match_length)r=ai(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;else if(r=ai(e,e.strstart-e.match_start,e.match_length-vi),e.lookahead-=e.match_length,e.match_length>e.max_lazy_match||vi>e.lookahead)e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<e.strstart?e.strstart:vi-1,t===ci?(Ri(e,!0),0===e.strm.avail_out?Pi:Ci):e.last_lit&&(Ri(e,!1),0===e.strm.avail_out)?Ai:Li}function Hi(e,t){for(var n,r,a;;){if(ki>e.lookahead){if(Di(e),ki>e.lookahead&&t===ui)return Ai;if(0===e.lookahead)break}if(n=0,vi>e.lookahead||(e.ins_h=(e.ins_h<e.prev_length&&e.w_size-ki>=e.strstart-n&&(e.match_length=Ii(e,n),5>=e.match_length&&(1===e.strategy||e.match_length===vi&&e.strstart-e.match_start>4096)&&(e.match_length=vi-1)),vi>e.prev_length||e.match_length>e.prev_length)if(e.match_available){if((r=ai(e,0,e.window[e.strstart-1]))&&Ri(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return Ai}else e.match_available=1,e.strstart++,e.lookahead--;else{a=e.strstart+e.lookahead-vi,r=ai(e,e.strstart-1-e.prev_match,e.prev_length-vi),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart>a||(e.ins_h=(e.ins_h<e.strstart?e.strstart:vi-1,t===ci?(Ri(e,!0),0===e.strm.avail_out?Pi:Ci):e.last_lit&&(Ri(e,!1),0===e.strm.avail_out)?Ai:Li}function Ui(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}function Fi(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=pi,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ta(2*wi),this.dyn_dtree=new ta(2*(2*mi+1)),this.bl_tree=new ta(2*(2*_i+1)),Oi(this.dyn_ltree),Oi(this.dyn_dtree),Oi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ta(bi+1),this.heap=new ta(2*gi+1),Oi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ta(2*gi+1),Oi(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Zi(e){var t,n=function(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=fi,(t=e.state).pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?xi:Si,e.adler=2===t.wrap?0:1,t.last_flush=ui,ei(t),di):zi(e,hi)}(e);return n===di&&((t=e.state).window_size=2*t.w_size,Oi(t.head),t.max_lazy_match=li[t.level].max_lazy,t.good_match=li[t.level].good_length,t.nice_match=li[t.level].nice_length,t.max_chain_length=li[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=vi-1,t.match_available=0,t.ins_h=0),n}function $i(e,t){var n,r,a,i;if(!e||!e.state||t>5||0>t)return e?zi(e,hi):hi;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===ji&&t!==ci)return zi(e,0===e.avail_out?-5:hi);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===xi)if(2===r.wrap)e.adler=0,Ni(r,31),Ni(r,139),Ni(r,8),r.gzhead?(Ni(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Ni(r,255&r.gzhead.time),Ni(r,r.gzhead.time>>8&255),Ni(r,r.gzhead.time>>16&255),Ni(r,r.gzhead.time>>24&255),Ni(r,9===r.level?2:r.strategy>=2||2>r.level?4:0),Ni(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Ni(r,255&r.gzhead.extra.length),Ni(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=si(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Ni(r,0),Ni(r,0),Ni(r,0),Ni(r,0),Ni(r,0),Ni(r,9===r.level?2:r.strategy>=2||2>r.level?4:0),Ni(r,3),r.status=Si);else{var o=pi+(r.w_bits-8<<4)<<8;o|=(r.strategy>=2||2>r.level?0:6>r.level?1:6===r.level?2:3)<<6,0!==r.strstart&&(o|=32),o+=31-o%31,r.status=Si,Bi(r,o),0!==r.strstart&&(Bi(r,e.adler>>>16),Bi(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;(65535&r.gzhead.extra.length)>r.gzindex&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=si(e.adler,r.pending_buf,r.pending-a,a)),Ti(e),a=r.pending,r.pending!==r.pending_buf_size));)Ni(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=si(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=si(e.adler,r.pending_buf,r.pending-a,a)),Ti(e),a=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzhead.name.length>r.gzindex?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Ni(r,i)}while(0!==i);r.gzhead.hcrc&&r.pending>a&&(e.adler=si(e.adler,r.pending_buf,r.pending-a,a)),0===i&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=si(e.adler,r.pending_buf,r.pending-a,a)),Ti(e),a=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzhead.comment.length>r.gzindex?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Ni(r,i)}while(0!==i);r.gzhead.hcrc&&r.pending>a&&(e.adler=si(e.adler,r.pending_buf,r.pending-a,a)),0===i&&(r.status=Ei)}else r.status=Ei;if(r.status===Ei&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Ti(e),r.pending+2>r.pending_buf_size||(Ni(r,255&e.adler),Ni(r,e.adler>>8&255),e.adler=0,r.status=Si)):r.status=Si),0!==r.pending){if(Ti(e),0===e.avail_out)return r.last_flush=-1,di}else if(0===e.avail_in&&Mi(t)<=Mi(n)&&t!==ci)return zi(e,-5);if(r.status===ji&&0!==e.avail_in)return zi(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==ui&&r.status!==ji){var s=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Di(e),0===e.lookahead)){if(t===ui)return Ai;break}if(e.match_length=0,n=ai(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ri(e,!1),0===e.strm.avail_out))return Ai}return e.insert=0,t===ci?(Ri(e,!0),0===e.strm.avail_out?Pi:Ci):e.last_lit&&(Ri(e,!1),0===e.strm.avail_out)?Ai:Li}(r,t):3===r.strategy?function(e,t){for(var n,r,a,i,o=e.window;;){if(yi>=e.lookahead){if(Di(e),yi>=e.lookahead&&t===ui)return Ai;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=vi&&e.strstart>0&&(r=o[a=e.strstart-1])===o[++a]&&r===o[++a]&&r===o[++a]){i=e.strstart+yi;do{}while(r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&i>a);e.match_length=yi-(i-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(vi>e.match_length?(n=ai(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++):(n=ai(e,1,e.match_length-vi),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0),n&&(Ri(e,!1),0===e.strm.avail_out))return Ai}return e.insert=0,t===ci?(Ri(e,!0),0===e.strm.avail_out?Pi:Ci):e.last_lit&&(Ri(e,!1),0===e.strm.avail_out)?Ai:Li}(r,t):li[r.level].func(r,t);if(s!==Pi&&s!==Ci||(r.status=ji),s===Ai||s===Pi)return 0===e.avail_out&&(r.last_flush=-1),di;if(s===Li&&(1===t?ni(r):5!==t&&(ti(r,0,0,!1),3===t&&(Oi(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Ti(e),0===e.avail_out))return r.last_flush=-1,di}return t!==ci?di:r.wrap>0?(2===r.wrap?(Ni(r,255&e.adler),Ni(r,e.adler>>8&255),Ni(r,e.adler>>16&255),Ni(r,e.adler>>24&255),Ni(r,255&e.total_in),Ni(r,e.total_in>>8&255),Ni(r,e.total_in>>16&255),Ni(r,e.total_in>>24&255)):(Bi(r,e.adler>>>16),Bi(r,65535&e.adler)),Ti(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?di:1):1}li=[new Ui(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(1>=e.lookahead){if(Di(e),0===e.lookahead&&t===ui)return Ai;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Ri(e,!1),0===e.strm.avail_out))return Ai;if(e.strstart-e.block_start>=e.w_size-ki&&(Ri(e,!1),0===e.strm.avail_out))return Ai}return e.insert=0,t===ci?(Ri(e,!0),0===e.strm.avail_out?Pi:Ci):(e.strstart>e.block_start&&Ri(e,!1),Ai)})),new Ui(4,4,8,4,qi),new Ui(4,5,16,8,qi),new Ui(4,6,32,32,qi),new Ui(4,4,16,16,Hi),new Ui(8,16,32,32,Hi),new Ui(8,16,128,128,Hi),new Ui(8,32,128,256,Hi),new Ui(32,128,258,1024,Hi),new Ui(32,258,258,4096,Hi)];var Wi=30,Vi=12;function Yi(e,t){var n,r,a,i,o,s,l,u,c,d,h,f,p,g,m,_,w,b,v,y,k,x,E,S,j;S=e.input,a=(r=e.next_in)+(e.avail_in-5),j=e.output,o=(i=e.next_out)-(t-e.avail_out),s=i+(e.avail_out-257),l=(n=e.state).dmax,u=n.wsize,c=n.whave,d=n.wnext,h=n.window,f=n.hold,p=n.bits,g=n.lencode,m=n.distcode,_=(1<p&&(f+=S[r++]<>>=v=b>>>24,p-=v,0===(v=b>>>16&255))j[i++]=65535&b;else{if(!(16&v)){if(64&v){if(32&v){n.mode=Vi;break e}e.msg="invalid literal/length code",n.mode=Wi;break e}b=g[(65535&b)+(f&(1<p&&(f+=S[r++]<>>=v,p-=v),15>p&&(f+=S[r++]<>>=v=b>>>24,p-=v,16&(v=b>>>16&255)){if(k=65535&b,(v&=15)>p&&(f+=S[r++]<(p+=8)&&(f+=S[r++]<l){e.msg="invalid distance too far back",n.mode=Wi;break e}if(f>>>=v,p-=v,k>(v=i-o)){if((v=k-v)>c&&n.sane){e.msg="invalid distance too far back",n.mode=Wi;break e}if(x=0,E=h,0===d){if(x+=u-v,y>v){y-=v;do{j[i++]=h[x++]}while(--v);x=i-k,E=j}}else if(v>d){if(x+=u+d-v,y>(v-=d)){y-=v;do{j[i++]=h[x++]}while(--v);if(x=0,y>d){y-=v=d;do{j[i++]=h[x++]}while(--v);x=i-k,E=j}}}else if(x+=d-v,y>v){y-=v;do{j[i++]=h[x++]}while(--v);x=i-k,E=j}for(;y>2;)j[i++]=E[x++],j[i++]=E[x++],j[i++]=E[x++],y-=3;y&&(j[i++]=E[x++],y>1&&(j[i++]=E[x++]))}else{x=i-k;do{j[i++]=j[x++],j[i++]=j[x++],j[i++]=j[x++],y-=3}while(y>2);y&&(j[i++]=j[x++],y>1&&(j[i++]=j[x++]))}break}if(64&v){e.msg="invalid distance code",n.mode=Wi;break e}b=m[(65535&b)+(f&(1<r&&s>i);f&=(1<<(p-=(y=p>>3)<<3))-1,e.next_in=r-=y,e.next_out=i,e.avail_in=a>r?a-r+5:5-(r-a),e.avail_out=s>i?s-i+257:257-(i-s),n.hold=f,n.bits=p}var Gi=15,Ji=852,Ki=592,Xi=0,Qi=1,eo=2,to=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],no=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ro=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],ao=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function io(e,t,n,r,a,i,o,s){var l,u,c,d,h,f,p,g,m,_=s.bits,w=0,b=0,v=0,y=0,k=0,x=0,E=0,S=0,j=0,A=0,L=null,P=0,C=new ta(Gi+1),z=new ta(Gi+1),M=null,O=0;for(w=0;Gi>=w;w++)C[w]=0;for(b=0;r>b;b++)C[t[n+b]]++;for(k=_,y=Gi;y>=1&&0===C[y];y--);if(k>y&&(k=y),0===y)return a[i++]=20971520,a[i++]=20971520,s.bits=1,0;for(v=1;y>v&&0===C[v];v++);for(v>k&&(k=v),S=1,w=1;Gi>=w;w++)if(S<<=1,0>(S-=C[w]))return-1;if(S>0&&(e===Xi||1!==y))return-1;for(z[1]=0,w=1;Gi>w;w++)z[w+1]=z[w]+C[w];for(b=0;r>b;b++)0!==t[n+b]&&(o[z[t[n+b]]++]=b);if(e===Xi?(L=M=o,f=19):e===Qi?(L=to,P-=257,M=no,O-=257,f=256):(L=ro,M=ao,f=-1),A=0,b=0,w=v,h=i,x=k,E=0,c=-1,d=(j=1<Ji||e===eo&&j>Ki)return 1;for(;;){p=w-E,f>o[b]?(g=0,m=o[b]):o[b]>f?(g=M[O+o[b]],m=L[P+o[b]]):(g=96,m=0),l=1<>E)+(u-=l)]=p<<24|g<<16|m}while(0!==u);for(l=1<>=1;if(0!==l?(A&=l-1,A+=l):A=0,b++,0==--C[w]){if(w===y)break;w=t[n+o[b]]}if(w>k&&(A&d)!==c){for(0===E&&(E=k),h+=v,S=1<<(x=w-E);y>x+E&&(S-=C[x+E])>0;)x++,S<<=1;if(j+=1<Ji||e===eo&&j>Ki)return 1;a[c=A&d]=k<<24|x<<16|h-i}}return 0!==A&&(a[h+A]=w-E<<24|64<<16),s.bits=k,0}var oo=1,so=2,lo=0,uo=-2,co=1,ho=12,fo=30,po=852,go=592;function mo(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function _o(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new ta(320),this.work=new ta(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function wo(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,function(e){var t;return e&&e.state?(e.total_in=e.total_out=(t=e.state).total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=co,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new na(po),t.distcode=t.distdyn=new na(go),t.sane=1,t.back=-1,lo):uo}(e)):uo}function bo(e,t){var n,r;return e?(r=new _o,e.state=r,r.window=null,n=function(e,t){var n,r;return e&&e.state?(0>t?(n=0,t=-t):(n=1+(t>>4),48>t&&(t&=15)),t&&(8>t||t>15)?uo:(null!==(r=e.state).window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,wo(e))):uo}(e,t),n!==lo&&(e.state=null),n):uo}var vo,yo,ko=!0;function xo(e){if(ko){var t;for(vo=new na(512),yo=new na(32),t=0;144>t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(io(oo,e.lens,0,288,vo,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;io(so,e.lens,0,32,yo,0,e.work,{bits:5}),ko=!1}e.lencode=vo,e.lenbits=9,e.distcode=yo,e.distbits=5}function Eo(e,t){var n,r,a,i,o,s,l,u,c,d,h,f,p,g,m,_,w,b,v,y,k,x,E,S,j=0,A=new ea(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return uo;(n=e.state).mode===ho&&(n.mode=13),o=e.next_out,a=e.output,i=e.next_in,r=e.input,u=n.hold,c=n.bits,d=s=e.avail_in,h=l=e.avail_out,x=lo;e:for(;;)switch(n.mode){case co:if(0===n.wrap){n.mode=13;break}for(;16>c;){if(0===s)break e;s--,u+=r[i++]<>>8&255,n.check=si(n.check,A,2,0),u=0,c=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=fo;break}if(8!=(15&u)){e.msg="unknown compression method",n.mode=fo;break}if(c-=4,k=8+(15&(u>>>=4)),0===n.wbits)n.wbits=k;else if(k>n.wbits){e.msg="invalid window size",n.mode=fo;break}n.dmax=1<c;){if(0===s)break e;s--,u+=r[i++]<>8&1),512&n.flags&&(A[0]=255&u,A[1]=u>>>8&255,n.check=si(n.check,A,2,0)),u=0,c=0,n.mode=3;case 3:for(;32>c;){if(0===s)break e;s--,u+=r[i++]<>>8&255,A[2]=u>>>16&255,A[3]=u>>>24&255,n.check=si(n.check,A,4,0)),u=0,c=0,n.mode=4;case 4:for(;16>c;){if(0===s)break e;s--,u+=r[i++]<>8),512&n.flags&&(A[0]=255&u,A[1]=u>>>8&255,n.check=si(n.check,A,2,0)),u=0,c=0,n.mode=5;case 5:if(1024&n.flags){for(;16>c;){if(0===s)break e;s--,u+=r[i++]<>>8&255,n.check=si(n.check,A,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((f=n.length)>s&&(f=s),f&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),Qr(n.head.extra,r,i,f,k)),512&n.flags&&(n.check=si(n.check,r,f,i)),s-=f,i+=f,n.length-=f),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;f=0;do{k=r[i+f++],n.head&&k&&65536>n.length&&(n.head.name+=String.fromCharCode(k))}while(k&&s>f);if(512&n.flags&&(n.check=si(n.check,r,f,i)),s-=f,i+=f,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;f=0;do{k=r[i+f++],n.head&&k&&65536>n.length&&(n.head.comment+=String.fromCharCode(k))}while(k&&s>f);if(512&n.flags&&(n.check=si(n.check,r,f,i)),s-=f,i+=f,k)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;16>c;){if(0===s)break e;s--,u+=r[i++]<>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ho;break;case 10:for(;32>c;){if(0===s)break e;s--,u+=r[i++]<>>=7&c,c-=7&c,n.mode=27;break}for(;3>c;){if(0===s)break e;s--,u+=r[i++]<>>=1)){case 0:n.mode=14;break;case 1:if(xo(n),n.mode=20,6===t){u>>>=2,c-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=fo}u>>>=2,c-=2;break;case 14:for(u>>>=7&c,c-=7&c;32>c;){if(0===s)break e;s--,u+=r[i++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=fo;break}if(n.length=65535&u,u=0,c=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(f=n.length){if(f>s&&(f=s),f>l&&(f=l),0===f)break e;Qr(a,r,i,f,o),s-=f,i+=f,l-=f,o+=f,n.length-=f;break}n.mode=ho;break;case 17:for(;14>c;){if(0===s)break e;s--,u+=r[i++]<>>=5)),c-=5,n.ncode=4+(15&(u>>>=5)),u>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=fo;break}n.have=0,n.mode=18;case 18:for(;n.ncode>n.have;){for(;3>c;){if(0===s)break e;s--,u+=r[i++]<>>=3,c-=3}for(;19>n.have;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,x=io(0,n.lens,0,19,n.lencode,0,n.work,E={bits:n.lenbits}),n.lenbits=E.bits,x){e.msg="invalid code lengths set",n.mode=fo;break}n.have=0,n.mode=19;case 19:for(;n.nlen+n.ndist>n.have;){for(;_=(j=n.lencode[u&(1<>>16&255,w=65535&j,c<(m=j>>>24);){if(0===s)break e;s--,u+=r[i++]<w)u>>>=m,c-=m,n.lens[n.have++]=w;else{if(16===w){for(S=m+2;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=m,c-=m,0===n.have){e.msg="invalid bit length repeat",n.mode=fo;break}k=n.lens[n.have-1],f=3+(3&u),u>>>=2,c-=2}else if(17===w){for(S=m+3;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=m)),u>>>=3,c-=3}else{for(S=m+7;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=m)),u>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=fo;break}for(;f--;)n.lens[n.have++]=k}}if(n.mode===fo)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=fo;break}if(n.lenbits=9,x=io(oo,n.lens,0,n.nlen,n.lencode,0,n.work,E={bits:n.lenbits}),n.lenbits=E.bits,x){e.msg="invalid literal/lengths set",n.mode=fo;break}if(n.distbits=6,n.distcode=n.distdyn,x=io(so,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E={bits:n.distbits}),n.distbits=E.bits,x){e.msg="invalid distances set",n.mode=fo;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=s,n.hold=u,n.bits=c,Yi(e,h),o=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,r=e.input,s=e.avail_in,u=n.hold,c=n.bits,n.mode===ho&&(n.back=-1);break}for(n.back=0;_=(j=n.lencode[u&(1<>>16&255,w=65535&j,c<(m=j>>>24);){if(0===s)break e;s--,u+=r[i++]<>b)])>>>16&255,w=65535&j,c>>24);){if(0===s)break e;s--,u+=r[i++]<>>=b,c-=b,n.back+=b}if(u>>>=m,c-=m,n.back+=m,n.length=w,0===_){n.mode=26;break}if(32&_){n.back=-1,n.mode=ho;break}if(64&_){e.msg="invalid literal/length code",n.mode=fo;break}n.extra=15&_,n.mode=22;case 22:if(n.extra){for(S=n.extra;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;_=(j=n.distcode[u&(1<>>16&255,w=65535&j,c<(m=j>>>24);){if(0===s)break e;s--,u+=r[i++]<>b)])>>>16&255,w=65535&j,c>>24);){if(0===s)break e;s--,u+=r[i++]<>>=b,c-=b,n.back+=b}if(u>>>=m,c-=m,n.back+=m,64&_){e.msg="invalid distance code",n.mode=fo;break}n.offset=w,n.extra=15&_,n.mode=24;case 24:if(n.extra){for(S=n.extra;S>c;){if(0===s)break e;s--,u+=r[i++]<>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=fo;break}n.mode=25;case 25:if(0===l)break e;if(n.offset>(f=h-l)){if((f=n.offset-f)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=fo;break}p=f>n.wnext?n.wsize-(f-=n.wnext):n.wnext-f,f>n.length&&(f=n.length),g=n.window}else g=a,p=o-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do{a[o++]=g[p++]}while(--f);0===n.length&&(n.mode=21);break;case 26:if(0===l)break e;a[o++]=n.length,l--,n.mode=21;break;case 27:if(n.wrap){for(;32>c;){if(0===s)break e;s--,u|=r[i++]<c;){if(0===s)break e;s--,u+=r[i++]<n.mode&&(27>n.mode||4!==t))&&function(e,t,n,r){var a,i=e.state;null===i.window&&(i.wsize=1<r?((a=i.wsize-i.wnext)>r&&(a=r),Qr(i.window,t,n-r,a,i.wnext),(r-=a)?(Qr(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.wsize>i.whave&&(i.whave+=a))):(Qr(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize)}(e,e.output,e.next_out,h-e.avail_out),h-=e.avail_out,e.total_in+=d-=e.avail_in,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?si(n.check,a,h,e.next_out-h):ii(n.check,a,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ho?128:0)+(20===n.mode||15===n.mode?256:0),(0===d&&0===h||4===t)&&x===lo&&(x=-5),x}var So;function jo(e){if(1>e||e>7)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function Ao(e,t){for(var n=0;e.length>n;n++)this[t+n]=e[n]}jo.prototype.init=function(e,t,n,r,a){var i;switch(this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=r,3!==this.mode&&4!==this.mode||(this.windowBits+=16),7===this.mode&&(this.windowBits+=32),5!==this.mode&&6!==this.mode||(this.windowBits=-this.windowBits),this.strm=new Xr,this.mode){case 1:case 3:case 5:i=function(e,t,n,r,a,i){if(!e)return hi;var o=1;if(-1===t&&(t=6),0>r?(o=0,r=-r):r>15&&(o=2,r-=16),1>a||a>9||n!==pi||8>r||r>15||0>t||t>9||0>i||i>4)return zi(e,hi);8===r&&(r=9);var s=new Fi;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<e.chunkSize||e.chunkSize>Po.Z_MAX_CHUNK))throw Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(Po.Z_MIN_WINDOWBITS>e.windowBits||e.windowBits>Po.Z_MAX_WINDOWBITS))throw Error("Invalid windowBits: "+e.windowBits);if(e.level&&(Po.Z_MIN_LEVEL>e.level||e.level>Po.Z_MAX_LEVEL))throw Error("Invalid compression level: "+e.level);if(e.memLevel&&(Po.Z_MIN_MEMLEVEL>e.memLevel||e.memLevel>Po.Z_MAX_MEMLEVEL))throw Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=Po.Z_FILTERED&&e.strategy!=Po.Z_HUFFMAN_ONLY&&e.strategy!=Po.Z_RLE&&e.strategy!=Po.Z_FIXED&&e.strategy!=Po.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!rn(e.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance");this._binding=new Po.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(e,t){n._binding=null,n._hadError=!0;var r=Error(e);r.errno=t,r.code=Po.codes[t],n.emit("error",r)};var r=Po.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(r=e.level);var a=Po.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(a=e.strategy),this._binding.init(e.windowBits||Po.Z_DEFAULT_WINDOWBITS,r,e.memLevel||Po.Z_DEFAULT_MEMLEVEL,a,e.dictionary),this._buffer=new vt(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=a,this.once("end",this.close)}Object.keys(Co).forEach((function(e){Co[Co[e]]=e})),In(qo,Vr),qo.prototype.params=function(e,t,n){if(Po.Z_MIN_LEVEL>e||e>Po.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=Po.Z_FILTERED&&t!=Po.Z_HUFFMAN_ONLY&&t!=Po.Z_RLE&&t!=Po.Z_FIXED&&t!=Po.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var r=this;this.flush(Po.Z_SYNC_FLUSH,(function(){r._binding.params(e,t),r._hadError||(r._level=e,r._strategy=t,n&&n())}))}else _n(n)},qo.prototype.reset=function(){return this._binding.reset()},qo.prototype._flush=function(e){this._transform(new vt(0),"",e)},qo.prototype.flush=function(e,t){var n=this._writableState;if(("function"==typeof e||void 0===e&&!t)&&(t=e,e=Po.Z_FULL_FLUSH),n.ended)t&&_n(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var r=this;this.once("drain",(function(){r.flush(t)}))}else this._flushFlag=e,this.write(new vt(0),"",t)},qo.prototype.close=function(e){if(e&&_n(e),!this._closed){this._closed=!0,this._binding.close();var t=this;_n((function(){t.emit("close")}))}},qo.prototype._transform=function(e,t,n){var r,a=this._writableState,i=(a.ending||a.ended)&&(!e||a.length===e.length);if(null===!e&&!rn(e))return n(Error("invalid input"));i?r=Po.Z_FINISH:(r=this._flushFlag,a.length>e.length||(this._flushFlag=this._opts.flush||Po.Z_NO_FLUSH)),this._processChunk(e,r,n)},qo.prototype._processChunk=function(e,t,n){var r=e&&e.length,a=this._chunkSize-this._offset,i=0,o=this,s="function"==typeof n;if(!s){var l,u=[],c=0;this.on("error",(function(e){l=e}));do{var d=this._binding.writeSync(t,e,i,r,this._buffer,this._offset,a)}while(!this._hadError&&p(d[0],d[1]));if(this._hadError)throw l;var h=vt.concat(u,c);return this.close(),h}var f=this._binding.write(t,e,i,r,this._buffer,this._offset,a);function p(l,d){if(!o._hadError){var h=a-d;if(function(e,t){if(!e)throw Error(t)}(h>=0,"have should not go down"),h>0){var f=o._buffer.slice(o._offset,o._offset+h);o._offset+=h,s?o.push(f):(u.push(f),c+=f.length)}if(0!==d&&o._chunkSize>o._offset||(a=o._chunkSize,o._offset=0,o._buffer=new vt(o._chunkSize)),0===d){if(i+=r-l,r=l,!s)return!0;var g=o._binding.write(t,e,i,r,o._buffer,o._offset,o._chunkSize);return g.callback=p,void(g.buffer=e)}if(!s)return!1;n()}}f.buffer=e,f.callback=p},In(Oo,qo),In(To,qo),In(Ro,qo),In(No,qo),In(Bo,qo),In(Io,qo),In(Do,qo);var Ho={codes:Co,createDeflate:function(e){return new Oo(e)},createInflate:function(e){return new To(e)},createDeflateRaw:function(e){return new Bo(e)},createInflateRaw:function(e){return new Io(e)},createGzip:function(e){return new Ro(e)},createGunzip:function(e){return new No(e)},createUnzip:function(e){return new Do(e)},deflate:function(e,t,n){return"function"==typeof t&&(n=t,t={}),zo(new Oo(t),e,n)},deflateSync:function(e,t){return Mo(new Oo(t),e)},gzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),zo(new Ro(t),e,n)},gzipSync:function(e,t){return Mo(new Ro(t),e)},deflateRaw:function(e,t,n){return"function"==typeof t&&(n=t,t={}),zo(new Bo(t),e,n)},deflateRawSync:function(e,t){return Mo(new Bo(t),e)},unzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),zo(new Do(t),e,n)},unzipSync:function(e,t){return Mo(new Do(t),e)},inflate:function(e,t,n){return"function"==typeof t&&(n=t,t={}),zo(new To(t),e,n)},inflateSync:function(e,t){return Mo(new To(t),e)},gunzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),zo(new No(t),e,n)},gunzipSync:function(e,t){return Mo(new No(t),e)},inflateRaw:function(e,t,n){return"function"==typeof t&&(n=t,t={}),zo(new Io(t),e,n)},inflateRawSync:function(e,t){return Mo(new Io(t),e)},Deflate:Oo,Inflate:To,Gzip:Ro,Gunzip:No,DeflateRaw:Bo,InflateRaw:Io,Unzip:Do,Zlib:qo};function Uo(e,t,n){var r=(3&e)<<4|t>>4,a=(15&t)<<2|n>>6,i=63&n,o="";return o+=Fo(63&e>>2),o+=Fo(63&r),o+=Fo(63&a),o+=Fo(63&i)}function Fo(e){return 10>e?String.fromCharCode(48+e):26>(e-=10)?String.fromCharCode(65+e):26>(e-=26)?String.fromCharCode(97+e):0==(e-=26)?"-":1==e?"_":"?"}function Zo(e){var t=e.charCodeAt(0);return"_"===e?63:"-"===e?62:97>t?65>t?48>t?"?":t-48:t-55:t-61}function $o(e){var t=Zo(e[0]),n=Zo(e[1]),r=Zo(e[2]);return[t<<2|n>>4&63,n<<4&240|r>>2&15,r<<6&192|63&Zo(e[3])]}function Wo(e){return function(e){for(var t="",n=0;e.length>n;n+=3)t+=n+2==e.length?Uo(e.charCodeAt(n),e.charCodeAt(n+1),0):n+1==e.length?Uo(e.charCodeAt(n),0,0):Uo(e.charCodeAt(n),e.charCodeAt(n+1),e.charCodeAt(n+2));return t}(Ho.deflateRawSync(e,{level:9}).toString("binary"))}function Vo(e){return""+Ho.inflateRawSync(vt.from(function(e){var t="",n=0;for(n=0;e.length>n;n+=4){var r=$o(e.substring(n,n+4));t+=String.fromCharCode(r[0]),t+=String.fromCharCode(r[1]),t+=String.fromCharCode(r[2])}return t}(e),"binary"))}var Yo={encodeuml:function(e){var t="@startuml",n="@enduml";return Wo("".concat(t).concat((e.split(t)[1]+"").split(n)[0]||"").concat(n))},decodeuml:function(e){return Vo(e)}},Go="img",Jo=0;function Ko(e,t){return Jo=e.length,new Promise((function(n){var r=[];e.forEach((function(e){r.push(function(e,t){return new Promise((function(n){var r=e.dataset.lang,a=r?JSON.parse(r):null,i="";if(a){if("boolean"==typeof a.codeblock&&a.codeblock||"string"==typeof a.codeblock&&"true"===a.codeblock.toLowerCase())return n(!1);a.align&&("center"===a.align?i="diagram-center":"right"===a.align&&(i="diagram-right"))}var o=e.textContent.trim(),s=(e.classList.length>0?e.classList[0]:"")+(e.className&&i?" ":"")+i,l=t.imageFormat;if("svg"!==l){var u=window&&window.location.protocol,c=("http:"===u||"https:"===u?"//":"https://")+t.umlWebSite,d=l!==Go?".".concat(l):"",h=Yo.encodeuml(o),f="".concat(c,"/").concat(l,"/").concat(h).concat(d);return e.parentNode.outerHTML='
"),n(!0)}var p="plantuml-"+Date.now()+"-"+Math.floor(1e4*Math.random());if("function"==typeof t.svgRender&&t.svgRender)t.svgRender(p,s,o,Jo).then((function(t){e.parentNode.outerHTML='
').concat(t,"
"),n(!0)}));else if("undefined"!=typeof window&&window.fetch&&window.dispatchEvent){var g=window&&window.location.protocol,m=("http:"===g||"https:"===g?"//":"https://")+t.umlWebSite,_=l!==Go?".".concat(l):"",w=Yo.encodeuml(o),b="".concat(m,"/").concat(l,"/").concat(w).concat(_);window.fetch(b).then((function(e){if(e.ok)return e.text()})).then((function(t){e.parentNode.outerHTML='
').concat(t,"
"),n(!0)}))}}))}(e,t))})),Promise.all(r).then((function(){n(!0)}))}))}function Xo(e){var t=function(){return r({umlWebSite:"www.plantuml.com/plantuml",imageFormat:Go,svgRender:null},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.plantuml.language-plantuml");return!!n.length&&(console.log(g("Begin render plantuml elements.")),Ko(n,this.config).then((function(){return console.log(g("End render plantuml elements.")),e})))}}]}var Qo="railroad",es="railroadCSS";if("undefined"==typeof window)throw Error("The showdown railroad extension can only be used in browser environment!");var ts=!1;function ns(){return ts}var rs,as=!1;function is(e,t){if(ns()){var n=t.id,r=t.className,a=t.cssLink,i=window.eval(t.data).format(),o=t.element.ownerDocument;return t.element.parentNode.outerHTML=a?'
'):'
'),i.addTo(o.getElementById(n)),e(!0)}setTimeout((function(){is(e,t)}),10)}function os(e){return new Promise((function(t){var n=E.createElementMeta(Qo,e);if(!n)return t(!1);n.cssLink=x.getSrc(es),is(t,n)}))}function ss(e){return function(){var e=ns();if("undefined"!=typeof window){if(as)return e;e||(as=!0,x.loadStyleSheet(es),x.loadScript(Qo).then((function(){ts=!0})))}}(),new Promise((function(t){var n=[];e.forEach((function(e){n.push(os(e))})),Promise.all(n).then((function(){t(!0)}))}))}function ls(){return[{type:"output",filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.railroad.language-railroad");return!!n.length&&(this.config={cssLink:x.getSrc(es)},console.log(g("Begin render railroad elements.")),ss(n).then((function(){return console.log(g("End render railroad elements.")),e})))}}]}if("undefined"==typeof window)throw Error("The showdown sequence extension can only be used in browser environment!");if(void 0===us)var us=window.Raphael||void 0;if("undefined"!=typeof window&&window.Diagram&&(rs=window.Diagram,window.Diagram.Signal))var cs=window.Diagram;var ds=["simple","hand"];if(void 0===cs&&"undefined"!=typeof window)cs=window.SequenceJS;function hs(){return!!us}function fs(){return hs()&&!!cs}var ps=!1,gs="sequenceCSS";function ms(e){var t=e.dataset.lang,n=t?JSON.parse(t):null,r="";if(n){if("boolean"==typeof n.codeblock&&n.codeblock||"string"==typeof n.codeblock&&"true"===n.codeblock.toLowerCase())return;n.align&&("center"===n.align?r="diagram-center":"right"===n.align&&(r="diagram-right"))}var a=function(){var e=fs();if("undefined"!=typeof window){if(ps)return e;e||(ps=!0,x.loadStyleSheet(gs),x.loadScript("WebFont").then((function(){return hs()?"Raphael":x.loadScript("Raphael")})).then((function(e){return us=E.interopDefault(window[e]),x.loadScript("Snap")})).then((function(){return x.loadScript("underscore")})).then((function(){return!rs&&window.Diagram&&(rs=window.Diagram),x.loadScript("sequence")})).then((function(){cs=window.Diagram,window.SequenceJS=cs,rs&&(window.Diagram=rs)})))}return e}(),i=x.getSrc(gs),o=e.textContent.trim(),s="js-sequence"+(r?" ":"")+r,l="sequence-"+Date.now()+"-"+Math.floor(1e4*Math.random());e.id=l,i&&(e.className=e.className+(e.className?" ":"")+"css-sequence",e.dataset.css=i),!a&&"undefined"!=typeof window&&window.dispatchEvent?Promise.resolve(l).then((function(e){window.dispatchEvent(new CustomEvent("sequence",{detail:{id:e,className:s,data:o,langattr:t,cssLink:i}}))})):"undefined"!=typeof window&&window.dispatchEvent&&window.dispatchEvent(new CustomEvent("sequence",{detail:{id:l,className:s,data:o,langattr:t,cssLink:i}}))}function _s(e){if(fs()){var t=e.id,n=e.className,r=e.data,a=e.cssLink,i="hand",o=e.langattr;if(o){var s=JSON.parse(o);s&&s.theme&&-1!=ds.indexOf(s.theme)&&(i=s.theme)}var l=window.document.getElementById(t);if(l)return l.parentNode.outerHTML=a?'
'):'
'),l=window.document.getElementById(t),void cs.parse(r).drawSVG(l||t,{theme:i})}setTimeout((function(){_s(e)}),10)}function ws(){var e=!1,t=new DOMParser;return[{type:"output",filter:function(n){var r=t.parseFromString(n,"text/html"),a=void 0!==r.body?r.body:r,i=a.querySelectorAll("code.sequence.language-sequence");return i.length&&(e||"undefined"!=typeof window&&window.dispatchEvent&&(e=!0,window.addEventListener("sequence",(function(e){e.detail&&_s(e.detail)}))),this.config={cssLink:x.getSrc(gs)}),function(e){return!!e.length&&(e.forEach((function(e){ms(e)})),!0)}(i)?a.innerHTML:n}}]}if("undefined"==typeof window)throw Error("The showdown wavedrom extension can only be used in browser environment!");if(void 0===bs)var bs=window.WaveDrom||void 0;var vs=0,ys=0;function ks(){return!!bs}var xs=!1;function Es(e,t){if(ks()){var n=t.index,r=t.id,a=t.data,i=t.element;return i.parentNode.outerHTML=E.renderCacheElement(i.ownerDocument,r+n,t.className,(function(e){var t=window.eval("(".concat(a,")"));bs.RenderWaveForm(n,t,r);var i=document.getElementById("WaveDrom_Display_"+n);if(e!=i)for(;i.childNodes.length;)e.appendChild(i.removeChild(i.childNodes[0]))})),e(!0)}setTimeout((function(){Es(e,t)}),10)}function Ss(e){return new Promise((function(t){var n=e.dataset.lang,r=n?JSON.parse(n):null,a="";if(r){if("boolean"==typeof r.codeblock&&r.codeblock||"string"==typeof r.codeblock&&"true"===r.codeblock.toLowerCase())return;r.align&&("center"===r.align?a="diagram-center":"right"===r.align&&(a="diagram-right"))}var i=e.textContent.trim(),o=(e.classList.length>0?e.classList[0]:"")+(e.className&&a?" ":"")+a,s=ys;++ys,--vs||(ys=0);var l="WaveDrom_Display_";e.id=l+s,Es(t,{element:e,index:s,id:l,className:o,data:i})}))}function js(e,t){return function(e){var t=ks();xs||t||(xs=!0,"undefined"!=typeof window&&x.loadScript({WaveDromSkin:e}).then((function(){return x.loadScript("WaveDrom")})).then((function(e){bs=E.interopDefault(window[e])})))}(t),new Promise((function(t){var n=[];vs=e.length,e.forEach((function(e){n.push(Ss(e))})),Promise.all(n).then((function(){t(!0)}))}))}function As(e){var t=function(){return r({skin:"default"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.wavedrom.language-wavedrom");return!!n.length&&(g("Begin render wavedrom elements."),js(n,this.config.skin).then((function(){return g("End render wavedrom elements."),e})))}}]}function Ls(){return[{type:"lang",filter:function(e,t){return e.replace(/^\[\^([\d\w]+)\]:\s*((\n+(\s{2,4}|\t).+)+)$/gm,(function(e,n,r,a,i){var o=t.makeHtml(r.replace(RegExp("^".concat(i),"gm"),""));return'
[').concat(n,"]:").concat(o,"
")}))}},{type:"lang",filter:function(e){return e.replace(/^\[\^([\d\w]+)\]:( |\n)((.+\n)*.+)$/gm,(function(e,t,n,r){return'[').concat(t,"]: ").concat(r,"")}))}},{type:"lang",filter:function(e){return e.replace(/\[\^([\d\w]+)\]/m,(function(e,t){return'[').concat(t,"]")}))}}]}function Ps(){return[{type:"lang",filter:function(e,t){return e.replace(/(?:^|\n)(?: {0,3})(:::+)(?: *)([\S]+)(?:[ \t]*)([^\s][\S\t ]*)?\n([\s\S]*?)\n(?: {0,3})\1(?:[ \t]*)\n/g,(function(e,n,r,a,i){if(r){var o=r.split("-");o.length>1?o.forEach((function(e,t,n){t>0&&(n[t]=n[t-1]+"-"+e)})):o.unshift("container"),r=o.join(" ")}return i&&(i=t.makeHtml(i)),a=a?'

'.concat(a,"

"):"",'
').concat(a).concat(i,"
")}))}}]}if("undefined"==typeof window)throw Error("The showdown flowchart extension can only be used in browser environment!");if(void 0===Cs)var Cs=window.Raphael||void 0;if(void 0===zs)var zs=window.flowchart||void 0;function Ms(){return!(void 0===Cs||!Cs||void 0===zs||!zs)}var Os=!1;function Ts(){var e=Ms();if("undefined"!=typeof window){if(Os)return e;if(!e){if(Os=!0,!Cs)return x.loadScript("Raphael").then((function(e){return Cs=E.interopDefault(window[e]),x.loadScript("flowchart")})).then((function(e){zs=E.interopDefault(window[e])})),e;x.loadScript("flowchart").then((function(e){zs=E.interopDefault(window[e])}))}}return e}function Rs(e,t){if(Ms()){var n=t.data,r=t.options;return t.element.parentNode.outerHTML=E.renderCacheElement(t.element.ownerDocument,t.id,t.className,(function(e){zs.parse(n).drawSVG(e,r)})),void e(!0)}setTimeout((function(){Rs(e,t)}),10)}function Ns(e,t){return new Promise((function(n){var r=E.createElementMeta("flowchart",e);if(!r)return n(!1);r.options=t,Rs(n,r)}))}function Bs(e){var t=function(){return r({"line-width":3,maxWidth:3,"line-length":50,"text-margin":10,"font-size":14,font:"normal","font-family":"Helvetica","font-weight":"normal","font-color":"black","line-color":"black","element-color":"black",fill:"white","yes-text":"yes","no-text":"no","arrow-end":"block",scale:1,symbols:{start:{"font-color":"red","element-color":"green",fill:"yellow"},end:{class:"end-element"}},flowstate:{past:{fill:"#CCCCCC","font-size":12},current:{fill:"yellow","font-color":"red","font-weight":"bold"},future:{fill:"#FFFF99"},request:{fill:"blue"},invalid:{fill:"#444444"},approved:{fill:"#58C4A3","font-size":12,"yes-text":"APPROVED","no-text":"n/a"},rejected:{fill:"#C45879","font-size":12,"yes-text":"n/a","no-text":"REJECTED"}}},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(e);return[{type:"output",config:t,filter:function(e){var t=e.wrapper;if(!t)return!1;var n=t.querySelectorAll("code.flowchart.language-flowchart"),r=t.querySelectorAll("code.flow.language-flow");return!(!n.length&&!r.length)&&(console.log(g("Begin render flowchart elements.")),function(e,t,n){return Ts(),new Promise((function(r){var a=[];e.forEach((function(e){a.push(Ns(e,n))})),t.forEach((function(e){a.push(Ns(e,n))})),Promise.all(a).then((function(){r(!0)}))}))}(n,r,this.config).then((function(){return console.log(g("End render flowchart elements.")),e})))}}]}var Is=function(){return r({flavor:"github"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},Ds=function(e,t,n){if(!t||"undefined"==typeof document)return!1;if(n||(n=document.getElementById(e)),n){var r=n.id,a="script-".concat(e),i=document.querySelector("#".concat(r," > #").concat(a));i?document.body.removeChild(i):(i=document.createElement("script")).id=a,i.type="text/javascript",i.text=t,n.appendChild(i)}return!0},qs=["github","ghost","vanilla","original","allon"],Hs=["default","forest","dark","neutral"],Us=["excel","ggplot2","quartz","vox","dark"],Fs=["canvas","svg"],Zs=["svg","png","jpg"],$s={showdown:u,converter:null,defaultOptions:{showdown:Is(),plantuml:{imageFormat:"svg"},mermaid:{theme:"default"},katex:{},vega:{theme:"vox"}},defaultExtensions:{},defaultAsyncExtensions:{},markdownDecodeFilter:function(e){return""},initDefaultOptions:function(){this.defaultOptions||(this.defaultOptions={showdown:{},plantuml:{},mermaid:{},katex:{},vega:{}})},setFlavor:function(e){this.showdown.setFlavor(e),this.converter&&this.converter.setFlavor(e)},addOptions:function(e){for(var t in e)"flavor"!==t&&(this.showdown.setOption(t,e[t]),this.converter&&this.converter.setOption(t,e[t]))},addExtension:function(e,t){if(this.removeExtension(e),"string"==typeof e)try{u.extension(e,t),this.converter&&this.converter.addExtension(e)}catch(e){console.log(e)}},removeExtension:function(e){if("string"==typeof e){if(this.converter){var t=null;try{t=u.extension(e)}catch(e){console.log(e)}if(!t)return;this.converter.removeExtension(t)}u.removeExtension(e)}},addAsyncExtension:function(e,t){if(this.removeAsyncExtension(e),"string"==typeof e)try{u.asyncExtension(e,t),this.converter&&this.converter.addAsyncExtension(e)}catch(e){console.log(e)}},removeAsyncExtension:function(e){if("string"==typeof e){if(this.converter){var t=null;try{t=u.asyncExtension(e)}catch(e){console.log(e)}if(!t)return;this.converter.removeAsyncExtension(t)}u.removeAsyncExtension(e)}},setCDN:function(e,t,n){"string"==typeof e&&e&&x.setCDN(e,t,n)},setShowdownFlavor:function(e){this.initDefaultOptions(),e&&(-1===qs.indexOf(e)&&(e="github"),this.defaultOptions.showdown.flavor=e,this.setFlavor(e))},setShowdownOptions:function(e){return this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.showdown=Object.assign(this.defaultOptions.showdown||{},e),this.setShowdownFlavor(this.defaultOptions.showdown.flavor),this.addOptions(this.defaultOptions.showdown),this.defaultOptions.showdown},setPlantumlOptions:function(e){this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.plantuml=Object.assign(this.defaultOptions.plantuml||{},e);var t=this.defaultOptions.plantuml.imageFormat;return t&&-1===Zs.indexOf(t)&&(this.defaultOptions.plantuml.imageFormat="png"),this.converter&&this.addAsyncExtension("showdown-plantuml",Xo(this.defaultOptions.plantuml)),this.defaultOptions.plantuml},setMermaidOptions:function(e){this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.mermaid=Object.assign(this.defaultOptions.mermaid||{},e);var t=this.defaultOptions.mermaid.theme;return t&&-1===Hs.indexOf(t)&&(this.defaultOptions.mermaid.theme="default"),this.converter&&this.addAsyncExtension("showdown-mermaid",it(this.defaultOptions.mermaid)),this.defaultOptions.mermaid},setKatexOptions:function(e){return this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.katex=Object.assign(this.defaultOptions.katex||{},e),this.converter&&this.addAsyncExtension("showdown-katex",Fe(this.defaultOptions.katex)),this.defaultOptions.katex},setVegaOptions:function(e){this.initDefaultOptions(),"object"===i(e)&&e||(e={}),this.defaultOptions.vega=Object.assign(this.defaultOptions.vega||{},e);var t=this.defaultOptions.vega.theme;t&&-1===Us.indexOf(t)&&(this.defaultOptions.vega.theme="vox");var n=this.defaultOptions.vega.renderer;return n&&-1===Fs.indexOf(n)&&(this.defaultOptions.vega.renderer="canvas"),this.converter&&this.addAsyncExtension("showdown-vega",ne(this.defaultOptions.vega)),this.defaultOptions.vega},init:function(e){if(this.converter){var t={};if("object"===i(t="boolean"==typeof e&&e?{option:!0,extension:!0}:e)){if(t.hasOwnProperty("option")&&t.option){var n=Is(this.defaultOptions&&this.defaultOptions.showdown||{});this.addOptions(n)}t.hasOwnProperty("extension")&&t.extension&&(this.addAsyncExtension("showdown-plantuml",Xo(this.defaultOptions.plantuml)),this.addAsyncExtension("showdown-mermaid",it(this.defaultOptions.mermaid)),this.addAsyncExtension("showdown-vega",ne(this.defaultOptions.vega)))}}else{var a=Is(this.defaultOptions&&this.defaultOptions.showdown||{}),o=function(e){var t=r({"showdown-toc":q,"showdown-align":re,"showdown-footnotes":Ls,"showdown-container":Ps,"showdown-sequence":ws},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),n=[];for(var a in t)t.hasOwnProperty(a)&&(u.extension(a,t[a]),n.push(a));return n}(this.defaultOptions,this.defaultExtensions),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e&&e.mermaid||{},a=e&&e.katex||{},i=e&&e.vega||{},o=r({"showdown-plantuml":Xo(e&&e.plantuml||{}),"showdown-mermaid":it(n),"showdown-katex":Fe(a),"showdown-flowchart":Bs,"showdown-viz":Y,"showdown-vega":ne(i),"showdown-wavedrom":As,"showdown-railroad":ls,"showdown-abc":B,"showdown-echarts":Ke},t),s=[];for(var l in o)o.hasOwnProperty(l)&&(u.asyncExtension(l,o[l]),s.push(l));return s}(this.defaultOptions,this.defaultAsyncExtensions);this.setFlavor(a.flavor),this.converter=new u.Converter({extensions:o}).initConvertExtObj(a.flavor,s),this.addOptions(a)}return this},makeHtml:function(e,t){var n="";if("object"===i(e)){if("string"==typeof e.content)if("string"==typeof e.type)if("zip"===e.type)n=this.zDecode(e.content);else n=this.markdownDecodeFilter(e)||e.content;else n=e.content}else n=e;if(this.converter&&n){var r=function(e,t,n){var r=e.querySelector(t),a="";if(r)a=r.dataset.css;else{var o;try{o=u.extension(n)}catch(e){}if(!o)try{o=u.asyncExtension(n)}catch(e){}if(o)if(Array.isArray(o)){for(var s=0;o.length>s;++s)if(o[s].hasOwnProperty("config")&&o[s].config.hasOwnProperty("cssLink")){a=o[s].config.cssLink;break}}else"object"===i(o)&&o.hasOwnProperty("config")&&o.config.hasOwnProperty("cssLink")&&(a=o.config.cssLink)}return a};return this.converter.asyncMakeHtml(n,(function(e){var n=e.wrapper;return!!n&&new Promise((function(a){var i=r(n,".css-katex","showdown-katex"),o=r(n,".css-sequence","showdown-sequence"),s=r(n,".css-railroad","showdown-railroad");return e.cssTypes={hasKatex:!!i,hasSequence:!!o,hasRailroad:!!s,css:{katex:i,sequence:o,railroad:s}},"function"==typeof t&&t&&t(e.cssTypes),a(e)}))})).then((function(e){return{html:n="
".concat(e.html,"
"),scripts:e.scripts}}))}return Promise.reject(n?"Converter is invaild.":"Content is empty.")},completedHtml:function(e,t){return u.helper.isArray(e)||(e=[e]),new Promise((function(n,r){for(var a=0;e.length>a;++a){var i=e[a];if(!Ds(i.id,i.code,t))return r("Args is invaild!")}n(!0)}))},zDecode:function(e){return""+Ho.inflateRawSync(vt.from(e,"base64"))},zEncode:function(e){return Ho.deflateRawSync(e,{level:9}).toString("base64")}};return $s})); //# sourceMappingURL=showdowns.min.js.map diff --git a/docs/dist/showdowns.min.js.map b/docs/dist/showdowns.min.js.map index cc2a84b..9fe3ab3 100644 --- a/docs/dist/showdowns.min.js.map +++ b/docs/dist/showdowns.min.js.map @@ -1 +1 @@ -{"version":3,"file":"showdowns.min.js","sources":["../../node_modules/showdown/dist/showdown.js","../../src/parser/converter.js","../../src/parser/githubCodeBlocks.js","../../src/parser/tables.js","../../src/parser/showdown.js","../../src/extensions/cdn.js","../../src/extensions/date-format.js","../../src/extensions/utils.js","../../src/extensions/showdown-abc.js","../../src/extensions/showdown-toc.js","../../src/extensions/showdown-viz.js","../../src/extensions/showdown-vega.js","../../src/extensions/showdown-align.js","../../src/extensions/asciimath2tex.js","../../src/extensions/showdown-katex.js","../../src/extensions/showdown-echarts.js","../../src/extensions/showdown-mermaid.js","../../node_modules/rollup-plugin-node-globals/src/global.js","../../node_modules/buffer-es6/base64.js","../../node_modules/buffer-es6/ieee754.js","../../node_modules/buffer-es6/isArray.js","../../node_modules/buffer-es6/index.js","../../node_modules/process-es6/browser.js","../../node_modules/rollup-plugin-node-builtins/src/es6/events.js","../../node_modules/rollup-plugin-node-builtins/src/es6/inherits.js","../../node_modules/rollup-plugin-node-builtins/src/es6/util.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/buffer-list.js","../../node_modules/rollup-plugin-node-builtins/src/es6/string-decoder.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/readable.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/writable.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/duplex.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/transform.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/passthrough.js","../../node_modules/rollup-plugin-node-builtins/src/es6/stream.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/messages.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/zstream.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/utils.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/trees.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/adler32.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/crc32.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/deflate.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/inffast.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/inftrees.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/inflate.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/binding.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib.js","../../src/utils/zlib-codec.js","../../src/utils/plantuml-codec.js","../../src/extensions/showdown-plantuml.js","../../src/extensions/showdown-railroad.js","../../src/extensions/showdown-sequence.js","../../src/extensions/showdown-wavedrom.js","../../src/extensions/showdown-footnotes.js","../../src/extensions/showdown-container.js","../../src/extensions/showdown-flowchart.js","../../src/showdowns.js"],"sourcesContent":[";/*! showdown v 2.1.0 - 21-04-2022 */\r\n(function(){\r\n/**\n * Created by Tivie on 13-07-2015.\n */\n\nfunction getDefaultOpts (simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n describe: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n describe: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n describe: 'Parses simple line breaks as
(GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n describe: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n describe: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n describe: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n describe: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n describe: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n describe: 'Support for HTML Tag escaping. ex: \\
foo\\
',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n describe: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n describe: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``',\n type: 'boolean'\n },\n ellipsis: {\n defaultValue: true,\n describe: 'Replaces three dots with the ellipsis unicode character',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n describe: 'Outputs a complete html document, including ``, `` and `` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n describe: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n describe: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}\n\nfunction allOptionsOn () {\n 'use strict';\n var options = getDefaultOpts(true),\n ret = {};\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n ret[opt] = true;\n }\n }\n return ret;\n}\n\r\n/**\n * Created by Tivie on 06-01-2015.\n */\n\n// Private properties\nvar showdown = {},\n parsers = {},\n extensions = {},\n globalOptions = getDefaultOpts(true),\n setFlavor = 'vanilla',\n flavor = {\n github: {\n omitExtraWLInCodeBlocks: true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores: true,\n strikethrough: true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks: true,\n tasklists: true,\n disableForced4SpacesIndentedSublists: true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText: true,\n ghCompatibleHeaderId: true,\n ghMentions: true,\n backslashEscapesHTMLTags: true,\n emoji: true,\n splitAdjacentBlockquotes: true\n },\n original: {\n noHeaderId: true,\n ghCodeBlocks: false\n },\n ghost: {\n omitExtraWLInCodeBlocks: true,\n parseImgDimensions: true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores: true,\n strikethrough: true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks: true,\n tasklists: true,\n smoothLivePreview: true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText: true,\n ghMentions: false,\n encodeEmails: true\n },\n vanilla: getDefaultOpts(true),\n allOn: allOptionsOn()\n };\n\n/**\n * helper namespace\n * @type {{}}\n */\nshowdown.helper = {};\n\n/**\n * TODO LEGACY SUPPORT CODE\n * @type {{}}\n */\nshowdown.extensions = {};\n\n/**\n * Set a global option\n * @static\n * @param {string} key\n * @param {*} value\n * @returns {showdown}\n */\nshowdown.setOption = function (key, value) {\n 'use strict';\n globalOptions[key] = value;\n return this;\n};\n\n/**\n * Get a global option\n * @static\n * @param {string} key\n * @returns {*}\n */\nshowdown.getOption = function (key) {\n 'use strict';\n return globalOptions[key];\n};\n\n/**\n * Get the global options\n * @static\n * @returns {{}}\n */\nshowdown.getOptions = function () {\n 'use strict';\n return globalOptions;\n};\n\n/**\n * Reset global options to the default values\n * @static\n */\nshowdown.resetOptions = function () {\n 'use strict';\n globalOptions = getDefaultOpts(true);\n};\n\n/**\n * Set the flavor showdown should use as default\n * @param {string} name\n */\nshowdown.setFlavor = function (name) {\n 'use strict';\n if (!flavor.hasOwnProperty(name)) {\n throw Error(name + ' flavor was not found');\n }\n showdown.resetOptions();\n var preset = flavor[name];\n setFlavor = name;\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n globalOptions[option] = preset[option];\n }\n }\n};\n\n/**\n * Get the currently set flavor\n * @returns {string}\n */\nshowdown.getFlavor = function () {\n 'use strict';\n return setFlavor;\n};\n\n/**\n * Get the options of a specified flavor. Returns undefined if the flavor was not found\n * @param {string} name Name of the flavor\n * @returns {{}|undefined}\n */\nshowdown.getFlavorOptions = function (name) {\n 'use strict';\n if (flavor.hasOwnProperty(name)) {\n return flavor[name];\n }\n};\n\n/**\n * Get the default options\n * @static\n * @param {boolean} [simple=true]\n * @returns {{}}\n */\nshowdown.getDefaultOptions = function (simple) {\n 'use strict';\n return getDefaultOpts(simple);\n};\n\n/**\n * Get or set a subParser\n *\n * subParser(name) - Get a registered subParser\n * subParser(name, func) - Register a subParser\n * @static\n * @param {string} name\n * @param {function} [func]\n * @returns {*}\n */\nshowdown.subParser = function (name, func) {\n 'use strict';\n if (showdown.helper.isString(name)) {\n if (typeof func !== 'undefined') {\n parsers[name] = func;\n } else {\n if (parsers.hasOwnProperty(name)) {\n return parsers[name];\n } else {\n throw Error('SubParser named ' + name + ' not registered!');\n }\n }\n }\n};\n\n/**\n * Gets or registers an extension\n * @static\n * @param {string} name\n * @param {object|object[]|function=} ext\n * @returns {*}\n */\nshowdown.extension = function (name, ext) {\n 'use strict';\n\n if (!showdown.helper.isString(name)) {\n throw Error('Extension \\'name\\' must be a string');\n }\n\n name = showdown.helper.stdExtName(name);\n\n // Getter\n if (showdown.helper.isUndefined(ext)) {\n if (!extensions.hasOwnProperty(name)) {\n throw Error('Extension named ' + name + ' is not registered!');\n }\n return extensions[name];\n\n // Setter\n } else {\n // Expand extension if it's wrapped in a function\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n // Ensure extension is an array\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n var validExtension = validate(ext, name);\n\n if (validExtension.valid) {\n extensions[name] = ext;\n } else {\n throw Error(validExtension.error);\n }\n }\n};\n\n/**\n * Gets all extensions registered\n * @returns {{}}\n */\nshowdown.getAllExtensions = function () {\n 'use strict';\n return extensions;\n};\n\n/**\n * Remove an extension\n * @param {string} name\n */\nshowdown.removeExtension = function (name) {\n 'use strict';\n delete extensions[name];\n};\n\n/**\n * Removes all extensions\n */\nshowdown.resetExtensions = function () {\n 'use strict';\n extensions = {};\n};\n\n/**\n * Validate extension\n * @param {array} extension\n * @param {string} name\n * @returns {{valid: boolean, error: string}}\n */\nfunction validate (extension, name) {\n 'use strict';\n\n var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',\n ret = {\n valid: true,\n error: ''\n };\n\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n\n for (var i = 0; i < extension.length; ++i) {\n var baseMsg = errMsg + ' sub-extension ' + i + ': ',\n ext = extension[i];\n if (typeof ext !== 'object') {\n ret.valid = false;\n ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';\n return ret;\n }\n\n if (!showdown.helper.isString(ext.type)) {\n ret.valid = false;\n ret.error = baseMsg + 'property \"type\" must be a string, but ' + typeof ext.type + ' given';\n return ret;\n }\n\n var type = ext.type = ext.type.toLowerCase();\n\n // normalize extension type\n if (type === 'language') {\n type = ext.type = 'lang';\n }\n\n if (type === 'html') {\n type = ext.type = 'output';\n }\n\n if (type !== 'lang' && type !== 'output' && type !== 'listener') {\n ret.valid = false;\n ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: \"lang/language\", \"output/html\" or \"listener\"';\n return ret;\n }\n\n if (type === 'listener') {\n if (showdown.helper.isUndefined(ext.listeners)) {\n ret.valid = false;\n ret.error = baseMsg + '. Extensions of type \"listener\" must have a property called \"listeners\"';\n return ret;\n }\n } else {\n if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {\n ret.valid = false;\n ret.error = baseMsg + type + ' extensions must define either a \"regex\" property or a \"filter\" method';\n return ret;\n }\n }\n\n if (ext.listeners) {\n if (typeof ext.listeners !== 'object') {\n ret.valid = false;\n ret.error = baseMsg + '\"listeners\" property must be an object but ' + typeof ext.listeners + ' given';\n return ret;\n }\n for (var ln in ext.listeners) {\n if (ext.listeners.hasOwnProperty(ln)) {\n if (typeof ext.listeners[ln] !== 'function') {\n ret.valid = false;\n ret.error = baseMsg + '\"listeners\" property must be an hash of [event name]: [callback]. listeners.' + ln +\n ' must be a function but ' + typeof ext.listeners[ln] + ' given';\n return ret;\n }\n }\n }\n }\n\n if (ext.filter) {\n if (typeof ext.filter !== 'function') {\n ret.valid = false;\n ret.error = baseMsg + '\"filter\" must be a function, but ' + typeof ext.filter + ' given';\n return ret;\n }\n } else if (ext.regex) {\n if (showdown.helper.isString(ext.regex)) {\n ext.regex = new RegExp(ext.regex, 'g');\n }\n if (!(ext.regex instanceof RegExp)) {\n ret.valid = false;\n ret.error = baseMsg + '\"regex\" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given';\n return ret;\n }\n if (showdown.helper.isUndefined(ext.replace)) {\n ret.valid = false;\n ret.error = baseMsg + '\"regex\" extensions must implement a replace string or function';\n return ret;\n }\n }\n }\n return ret;\n}\n\n/**\n * Validate extension\n * @param {object} ext\n * @returns {boolean}\n */\nshowdown.validateExtension = function (ext) {\n 'use strict';\n\n var validateExtension = validate(ext, null);\n if (!validateExtension.valid) {\n console.warn(validateExtension.error);\n return false;\n }\n return true;\n};\n\r\n/**\n * showdownjs helper functions\n */\n\nif (!showdown.hasOwnProperty('helper')) {\n showdown.helper = {};\n}\n\n/**\n * Check if var is string\n * @static\n * @param {string} a\n * @returns {boolean}\n */\nshowdown.helper.isString = function (a) {\n 'use strict';\n return (typeof a === 'string' || a instanceof String);\n};\n\n/**\n * Check if var is a function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isFunction = function (a) {\n 'use strict';\n var getType = {};\n return a && getType.toString.call(a) === '[object Function]';\n};\n\n/**\n * isArray helper function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isArray = function (a) {\n 'use strict';\n return Array.isArray(a);\n};\n\n/**\n * Check if value is undefined\n * @static\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n */\nshowdown.helper.isUndefined = function (value) {\n 'use strict';\n return typeof value === 'undefined';\n};\n\n/**\n * ForEach helper function\n * Iterates over Arrays and Objects (own properties only)\n * @static\n * @param {*} obj\n * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object\n */\nshowdown.helper.forEach = function (obj, callback) {\n 'use strict';\n // check if obj is defined\n if (showdown.helper.isUndefined(obj)) {\n throw new Error('obj param is required');\n }\n\n if (showdown.helper.isUndefined(callback)) {\n throw new Error('callback param is required');\n }\n\n if (!showdown.helper.isFunction(callback)) {\n throw new Error('callback param must be a function/closure');\n }\n\n if (typeof obj.forEach === 'function') {\n obj.forEach(callback);\n } else if (showdown.helper.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n callback(obj[i], i, obj);\n }\n } else if (typeof (obj) === 'object') {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n callback(obj[prop], prop, obj);\n }\n }\n } else {\n throw new Error('obj does not seem to be an array or an iterable object');\n }\n};\n\n/**\n * Standardidize extension name\n * @static\n * @param {string} s extension name\n * @returns {string}\n */\nshowdown.helper.stdExtName = function (s) {\n 'use strict';\n return s.replace(/[_?*+\\/\\\\.^-]/g, '').replace(/\\s/g, '').toLowerCase();\n};\n\nfunction escapeCharactersCallback (wholeMatch, m1) {\n 'use strict';\n var charCodeToEscape = m1.charCodeAt(0);\n return '¨E' + charCodeToEscape + 'E';\n}\n\n/**\n * Callback used to escape characters when passing through String.replace\n * @static\n * @param {string} wholeMatch\n * @param {string} m1\n * @returns {string}\n */\nshowdown.helper.escapeCharactersCallback = escapeCharactersCallback;\n\n/**\n * Escape characters in a string\n * @static\n * @param {string} text\n * @param {string} charsToEscape\n * @param {boolean} afterBackslash\n * @returns {XML|string|void|*}\n */\nshowdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) {\n 'use strict';\n // First we have to escape the escape characters so that\n // we can build a character class out of them\n var regexString = '([' + charsToEscape.replace(/([\\[\\]\\\\])/g, '\\\\$1') + '])';\n\n if (afterBackslash) {\n regexString = '\\\\\\\\' + regexString;\n }\n\n var regex = new RegExp(regexString, 'g');\n text = text.replace(regex, escapeCharactersCallback);\n\n return text;\n};\n\n/**\n * Unescape HTML entities\n * @param txt\n * @returns {string}\n */\nshowdown.helper.unescapeHTMLEntities = function (txt) {\n 'use strict';\n\n return txt\n .replace(/"/g, '\"')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/&/g, '&');\n};\n\nvar rgxFindMatchPos = function (str, left, right, flags) {\n 'use strict';\n var f = flags || '',\n g = f.indexOf('g') > -1,\n x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),\n l = new RegExp(left, f.replace(/g/g, '')),\n pos = [],\n t, s, m, start, end;\n\n do {\n t = 0;\n while ((m = x.exec(str))) {\n if (l.test(m[0])) {\n if (!(t++)) {\n s = x.lastIndex;\n start = s - m[0].length;\n }\n } else if (t) {\n if (!--t) {\n end = m.index + m[0].length;\n var obj = {\n left: {start: start, end: s},\n match: {start: s, end: m.index},\n right: {start: m.index, end: end},\n wholeMatch: {start: start, end: end}\n };\n pos.push(obj);\n if (!g) {\n return pos;\n }\n }\n }\n }\n } while (t && (x.lastIndex = s));\n\n return pos;\n};\n\n/**\n * matchRecursiveRegExp\n *\n * (c) 2007 Steven Levithan \n * MIT License\n *\n * Accepts a string to search, a left and right format delimiter\n * as regex patterns, and optional regex flags. Returns an array\n * of matches, allowing nested instances of left/right delimiters.\n * Use the \"g\" flag to return all matches, otherwise only the\n * first is returned. Be careful to ensure that the left and\n * right format delimiters produce mutually exclusive matches.\n * Backreferences are not supported within the right delimiter\n * due to how it is internally combined with the left delimiter.\n * When matching strings whose format delimiters are unbalanced\n * to the left or right, the output is intentionally as a\n * conventional regex library with recursion support would\n * produce, e.g. \"<\" and \">\" both produce [\"x\"] when using\n * \"<\" and \">\" as the delimiters (both strings contain a single,\n * balanced instance of \"\").\n *\n * examples:\n * matchRecursiveRegExp(\"test\", \"\\\\(\", \"\\\\)\")\n * returns: []\n * matchRecursiveRegExp(\">>t<>\", \"<\", \">\", \"g\")\n * returns: [\"t<>\", \"\"]\n * matchRecursiveRegExp(\"
test
\", \"]*>\", \"\", \"gi\")\n * returns: [\"test\"]\n */\nshowdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {\n 'use strict';\n\n var matchPos = rgxFindMatchPos (str, left, right, flags),\n results = [];\n\n for (var i = 0; i < matchPos.length; ++i) {\n results.push([\n str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n str.slice(matchPos[i].match.start, matchPos[i].match.end),\n str.slice(matchPos[i].left.start, matchPos[i].left.end),\n str.slice(matchPos[i].right.start, matchPos[i].right.end)\n ]);\n }\n return results;\n};\n\n/**\n *\n * @param {string} str\n * @param {string|function} replacement\n * @param {string} left\n * @param {string} right\n * @param {string} flags\n * @returns {string}\n */\nshowdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {\n 'use strict';\n\n if (!showdown.helper.isFunction(replacement)) {\n var repStr = replacement;\n replacement = function () {\n return repStr;\n };\n }\n\n var matchPos = rgxFindMatchPos(str, left, right, flags),\n finalStr = str,\n lng = matchPos.length;\n\n if (lng > 0) {\n var bits = [];\n if (matchPos[0].wholeMatch.start !== 0) {\n bits.push(str.slice(0, matchPos[0].wholeMatch.start));\n }\n for (var i = 0; i < lng; ++i) {\n bits.push(\n replacement(\n str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n str.slice(matchPos[i].match.start, matchPos[i].match.end),\n str.slice(matchPos[i].left.start, matchPos[i].left.end),\n str.slice(matchPos[i].right.start, matchPos[i].right.end)\n )\n );\n if (i < lng - 1) {\n bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));\n }\n }\n if (matchPos[lng - 1].wholeMatch.end < str.length) {\n bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));\n }\n finalStr = bits.join('');\n }\n return finalStr;\n};\n\n/**\n * Returns the index within the passed String object of the first occurrence of the specified regex,\n * starting the search at fromIndex. Returns -1 if the value is not found.\n *\n * @param {string} str string to search\n * @param {RegExp} regex Regular expression to search\n * @param {int} [fromIndex = 0] Index to start the search\n * @returns {Number}\n * @throws InvalidArgumentError\n */\nshowdown.helper.regexIndexOf = function (str, regex, fromIndex) {\n 'use strict';\n if (!showdown.helper.isString(str)) {\n throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n }\n if (regex instanceof RegExp === false) {\n throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp';\n }\n var indexOf = str.substring(fromIndex || 0).search(regex);\n return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf;\n};\n\n/**\n * Splits the passed string object at the defined index, and returns an array composed of the two substrings\n * @param {string} str string to split\n * @param {int} index index to split string at\n * @returns {[string,string]}\n * @throws InvalidArgumentError\n */\nshowdown.helper.splitAtIndex = function (str, index) {\n 'use strict';\n if (!showdown.helper.isString(str)) {\n throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n }\n return [str.substring(0, index), str.substring(index)];\n};\n\n/**\n * Obfuscate an e-mail address through the use of Character Entities,\n * transforming ASCII characters into their equivalent decimal or hex entities.\n *\n * Since it has a random component, subsequent calls to this function produce different results\n *\n * @param {string} mail\n * @returns {string}\n */\nshowdown.helper.encodeEmailAddress = function (mail) {\n 'use strict';\n var encode = [\n function (ch) {\n return '&#' + ch.charCodeAt(0) + ';';\n },\n function (ch) {\n return '&#x' + ch.charCodeAt(0).toString(16) + ';';\n },\n function (ch) {\n return ch;\n }\n ];\n\n mail = mail.replace(/./g, function (ch) {\n if (ch === '@') {\n // this *must* be encoded. I insist.\n ch = encode[Math.floor(Math.random() * 2)](ch);\n } else {\n var r = Math.random();\n // roughly 10% raw, 45% hex, 45% dec\n ch = (\n r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch)\n );\n }\n return ch;\n });\n\n return mail;\n};\n\n/**\n *\n * @param str\n * @param targetLength\n * @param padString\n * @returns {string}\n */\nshowdown.helper.padEnd = function padEnd (str, targetLength, padString) {\n 'use strict';\n /*jshint bitwise: false*/\n // eslint-disable-next-line space-infix-ops\n targetLength = targetLength>>0; //floor if number or convert non-number to 0;\n /*jshint bitwise: true*/\n padString = String(padString || ' ');\n if (str.length > targetLength) {\n return String(str);\n } else {\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed\n }\n return String(str) + padString.slice(0,targetLength);\n }\n};\n\n/**\n * POLYFILLS\n */\n// use this instead of builtin is undefined for IE8 compatibility\nif (typeof (console) === 'undefined') {\n console = {\n warn: function (msg) {\n 'use strict';\n alert(msg);\n },\n log: function (msg) {\n 'use strict';\n alert(msg);\n },\n error: function (msg) {\n 'use strict';\n throw msg;\n }\n };\n}\n\n/**\n * Common regexes.\n * We declare some common regexes to improve performance\n */\nshowdown.helper.regexes = {\n asteriskDashAndColon: /([*_:~])/g\n};\n\n/**\n * EMOJIS LIST\n */\nshowdown.helper.emojis = {\n '+1':'\\ud83d\\udc4d',\n '-1':'\\ud83d\\udc4e',\n '100':'\\ud83d\\udcaf',\n '1234':'\\ud83d\\udd22',\n '1st_place_medal':'\\ud83e\\udd47',\n '2nd_place_medal':'\\ud83e\\udd48',\n '3rd_place_medal':'\\ud83e\\udd49',\n '8ball':'\\ud83c\\udfb1',\n 'a':'\\ud83c\\udd70\\ufe0f',\n 'ab':'\\ud83c\\udd8e',\n 'abc':'\\ud83d\\udd24',\n 'abcd':'\\ud83d\\udd21',\n 'accept':'\\ud83c\\ude51',\n 'aerial_tramway':'\\ud83d\\udea1',\n 'airplane':'\\u2708\\ufe0f',\n 'alarm_clock':'\\u23f0',\n 'alembic':'\\u2697\\ufe0f',\n 'alien':'\\ud83d\\udc7d',\n 'ambulance':'\\ud83d\\ude91',\n 'amphora':'\\ud83c\\udffa',\n 'anchor':'\\u2693\\ufe0f',\n 'angel':'\\ud83d\\udc7c',\n 'anger':'\\ud83d\\udca2',\n 'angry':'\\ud83d\\ude20',\n 'anguished':'\\ud83d\\ude27',\n 'ant':'\\ud83d\\udc1c',\n 'apple':'\\ud83c\\udf4e',\n 'aquarius':'\\u2652\\ufe0f',\n 'aries':'\\u2648\\ufe0f',\n 'arrow_backward':'\\u25c0\\ufe0f',\n 'arrow_double_down':'\\u23ec',\n 'arrow_double_up':'\\u23eb',\n 'arrow_down':'\\u2b07\\ufe0f',\n 'arrow_down_small':'\\ud83d\\udd3d',\n 'arrow_forward':'\\u25b6\\ufe0f',\n 'arrow_heading_down':'\\u2935\\ufe0f',\n 'arrow_heading_up':'\\u2934\\ufe0f',\n 'arrow_left':'\\u2b05\\ufe0f',\n 'arrow_lower_left':'\\u2199\\ufe0f',\n 'arrow_lower_right':'\\u2198\\ufe0f',\n 'arrow_right':'\\u27a1\\ufe0f',\n 'arrow_right_hook':'\\u21aa\\ufe0f',\n 'arrow_up':'\\u2b06\\ufe0f',\n 'arrow_up_down':'\\u2195\\ufe0f',\n 'arrow_up_small':'\\ud83d\\udd3c',\n 'arrow_upper_left':'\\u2196\\ufe0f',\n 'arrow_upper_right':'\\u2197\\ufe0f',\n 'arrows_clockwise':'\\ud83d\\udd03',\n 'arrows_counterclockwise':'\\ud83d\\udd04',\n 'art':'\\ud83c\\udfa8',\n 'articulated_lorry':'\\ud83d\\ude9b',\n 'artificial_satellite':'\\ud83d\\udef0',\n 'astonished':'\\ud83d\\ude32',\n 'athletic_shoe':'\\ud83d\\udc5f',\n 'atm':'\\ud83c\\udfe7',\n 'atom_symbol':'\\u269b\\ufe0f',\n 'avocado':'\\ud83e\\udd51',\n 'b':'\\ud83c\\udd71\\ufe0f',\n 'baby':'\\ud83d\\udc76',\n 'baby_bottle':'\\ud83c\\udf7c',\n 'baby_chick':'\\ud83d\\udc24',\n 'baby_symbol':'\\ud83d\\udebc',\n 'back':'\\ud83d\\udd19',\n 'bacon':'\\ud83e\\udd53',\n 'badminton':'\\ud83c\\udff8',\n 'baggage_claim':'\\ud83d\\udec4',\n 'baguette_bread':'\\ud83e\\udd56',\n 'balance_scale':'\\u2696\\ufe0f',\n 'balloon':'\\ud83c\\udf88',\n 'ballot_box':'\\ud83d\\uddf3',\n 'ballot_box_with_check':'\\u2611\\ufe0f',\n 'bamboo':'\\ud83c\\udf8d',\n 'banana':'\\ud83c\\udf4c',\n 'bangbang':'\\u203c\\ufe0f',\n 'bank':'\\ud83c\\udfe6',\n 'bar_chart':'\\ud83d\\udcca',\n 'barber':'\\ud83d\\udc88',\n 'baseball':'\\u26be\\ufe0f',\n 'basketball':'\\ud83c\\udfc0',\n 'basketball_man':'\\u26f9\\ufe0f',\n 'basketball_woman':'\\u26f9\\ufe0f‍\\u2640\\ufe0f',\n 'bat':'\\ud83e\\udd87',\n 'bath':'\\ud83d\\udec0',\n 'bathtub':'\\ud83d\\udec1',\n 'battery':'\\ud83d\\udd0b',\n 'beach_umbrella':'\\ud83c\\udfd6',\n 'bear':'\\ud83d\\udc3b',\n 'bed':'\\ud83d\\udecf',\n 'bee':'\\ud83d\\udc1d',\n 'beer':'\\ud83c\\udf7a',\n 'beers':'\\ud83c\\udf7b',\n 'beetle':'\\ud83d\\udc1e',\n 'beginner':'\\ud83d\\udd30',\n 'bell':'\\ud83d\\udd14',\n 'bellhop_bell':'\\ud83d\\udece',\n 'bento':'\\ud83c\\udf71',\n 'biking_man':'\\ud83d\\udeb4',\n 'bike':'\\ud83d\\udeb2',\n 'biking_woman':'\\ud83d\\udeb4‍\\u2640\\ufe0f',\n 'bikini':'\\ud83d\\udc59',\n 'biohazard':'\\u2623\\ufe0f',\n 'bird':'\\ud83d\\udc26',\n 'birthday':'\\ud83c\\udf82',\n 'black_circle':'\\u26ab\\ufe0f',\n 'black_flag':'\\ud83c\\udff4',\n 'black_heart':'\\ud83d\\udda4',\n 'black_joker':'\\ud83c\\udccf',\n 'black_large_square':'\\u2b1b\\ufe0f',\n 'black_medium_small_square':'\\u25fe\\ufe0f',\n 'black_medium_square':'\\u25fc\\ufe0f',\n 'black_nib':'\\u2712\\ufe0f',\n 'black_small_square':'\\u25aa\\ufe0f',\n 'black_square_button':'\\ud83d\\udd32',\n 'blonde_man':'\\ud83d\\udc71',\n 'blonde_woman':'\\ud83d\\udc71‍\\u2640\\ufe0f',\n 'blossom':'\\ud83c\\udf3c',\n 'blowfish':'\\ud83d\\udc21',\n 'blue_book':'\\ud83d\\udcd8',\n 'blue_car':'\\ud83d\\ude99',\n 'blue_heart':'\\ud83d\\udc99',\n 'blush':'\\ud83d\\ude0a',\n 'boar':'\\ud83d\\udc17',\n 'boat':'\\u26f5\\ufe0f',\n 'bomb':'\\ud83d\\udca3',\n 'book':'\\ud83d\\udcd6',\n 'bookmark':'\\ud83d\\udd16',\n 'bookmark_tabs':'\\ud83d\\udcd1',\n 'books':'\\ud83d\\udcda',\n 'boom':'\\ud83d\\udca5',\n 'boot':'\\ud83d\\udc62',\n 'bouquet':'\\ud83d\\udc90',\n 'bowing_man':'\\ud83d\\ude47',\n 'bow_and_arrow':'\\ud83c\\udff9',\n 'bowing_woman':'\\ud83d\\ude47‍\\u2640\\ufe0f',\n 'bowling':'\\ud83c\\udfb3',\n 'boxing_glove':'\\ud83e\\udd4a',\n 'boy':'\\ud83d\\udc66',\n 'bread':'\\ud83c\\udf5e',\n 'bride_with_veil':'\\ud83d\\udc70',\n 'bridge_at_night':'\\ud83c\\udf09',\n 'briefcase':'\\ud83d\\udcbc',\n 'broken_heart':'\\ud83d\\udc94',\n 'bug':'\\ud83d\\udc1b',\n 'building_construction':'\\ud83c\\udfd7',\n 'bulb':'\\ud83d\\udca1',\n 'bullettrain_front':'\\ud83d\\ude85',\n 'bullettrain_side':'\\ud83d\\ude84',\n 'burrito':'\\ud83c\\udf2f',\n 'bus':'\\ud83d\\ude8c',\n 'business_suit_levitating':'\\ud83d\\udd74',\n 'busstop':'\\ud83d\\ude8f',\n 'bust_in_silhouette':'\\ud83d\\udc64',\n 'busts_in_silhouette':'\\ud83d\\udc65',\n 'butterfly':'\\ud83e\\udd8b',\n 'cactus':'\\ud83c\\udf35',\n 'cake':'\\ud83c\\udf70',\n 'calendar':'\\ud83d\\udcc6',\n 'call_me_hand':'\\ud83e\\udd19',\n 'calling':'\\ud83d\\udcf2',\n 'camel':'\\ud83d\\udc2b',\n 'camera':'\\ud83d\\udcf7',\n 'camera_flash':'\\ud83d\\udcf8',\n 'camping':'\\ud83c\\udfd5',\n 'cancer':'\\u264b\\ufe0f',\n 'candle':'\\ud83d\\udd6f',\n 'candy':'\\ud83c\\udf6c',\n 'canoe':'\\ud83d\\udef6',\n 'capital_abcd':'\\ud83d\\udd20',\n 'capricorn':'\\u2651\\ufe0f',\n 'car':'\\ud83d\\ude97',\n 'card_file_box':'\\ud83d\\uddc3',\n 'card_index':'\\ud83d\\udcc7',\n 'card_index_dividers':'\\ud83d\\uddc2',\n 'carousel_horse':'\\ud83c\\udfa0',\n 'carrot':'\\ud83e\\udd55',\n 'cat':'\\ud83d\\udc31',\n 'cat2':'\\ud83d\\udc08',\n 'cd':'\\ud83d\\udcbf',\n 'chains':'\\u26d3',\n 'champagne':'\\ud83c\\udf7e',\n 'chart':'\\ud83d\\udcb9',\n 'chart_with_downwards_trend':'\\ud83d\\udcc9',\n 'chart_with_upwards_trend':'\\ud83d\\udcc8',\n 'checkered_flag':'\\ud83c\\udfc1',\n 'cheese':'\\ud83e\\uddc0',\n 'cherries':'\\ud83c\\udf52',\n 'cherry_blossom':'\\ud83c\\udf38',\n 'chestnut':'\\ud83c\\udf30',\n 'chicken':'\\ud83d\\udc14',\n 'children_crossing':'\\ud83d\\udeb8',\n 'chipmunk':'\\ud83d\\udc3f',\n 'chocolate_bar':'\\ud83c\\udf6b',\n 'christmas_tree':'\\ud83c\\udf84',\n 'church':'\\u26ea\\ufe0f',\n 'cinema':'\\ud83c\\udfa6',\n 'circus_tent':'\\ud83c\\udfaa',\n 'city_sunrise':'\\ud83c\\udf07',\n 'city_sunset':'\\ud83c\\udf06',\n 'cityscape':'\\ud83c\\udfd9',\n 'cl':'\\ud83c\\udd91',\n 'clamp':'\\ud83d\\udddc',\n 'clap':'\\ud83d\\udc4f',\n 'clapper':'\\ud83c\\udfac',\n 'classical_building':'\\ud83c\\udfdb',\n 'clinking_glasses':'\\ud83e\\udd42',\n 'clipboard':'\\ud83d\\udccb',\n 'clock1':'\\ud83d\\udd50',\n 'clock10':'\\ud83d\\udd59',\n 'clock1030':'\\ud83d\\udd65',\n 'clock11':'\\ud83d\\udd5a',\n 'clock1130':'\\ud83d\\udd66',\n 'clock12':'\\ud83d\\udd5b',\n 'clock1230':'\\ud83d\\udd67',\n 'clock130':'\\ud83d\\udd5c',\n 'clock2':'\\ud83d\\udd51',\n 'clock230':'\\ud83d\\udd5d',\n 'clock3':'\\ud83d\\udd52',\n 'clock330':'\\ud83d\\udd5e',\n 'clock4':'\\ud83d\\udd53',\n 'clock430':'\\ud83d\\udd5f',\n 'clock5':'\\ud83d\\udd54',\n 'clock530':'\\ud83d\\udd60',\n 'clock6':'\\ud83d\\udd55',\n 'clock630':'\\ud83d\\udd61',\n 'clock7':'\\ud83d\\udd56',\n 'clock730':'\\ud83d\\udd62',\n 'clock8':'\\ud83d\\udd57',\n 'clock830':'\\ud83d\\udd63',\n 'clock9':'\\ud83d\\udd58',\n 'clock930':'\\ud83d\\udd64',\n 'closed_book':'\\ud83d\\udcd5',\n 'closed_lock_with_key':'\\ud83d\\udd10',\n 'closed_umbrella':'\\ud83c\\udf02',\n 'cloud':'\\u2601\\ufe0f',\n 'cloud_with_lightning':'\\ud83c\\udf29',\n 'cloud_with_lightning_and_rain':'\\u26c8',\n 'cloud_with_rain':'\\ud83c\\udf27',\n 'cloud_with_snow':'\\ud83c\\udf28',\n 'clown_face':'\\ud83e\\udd21',\n 'clubs':'\\u2663\\ufe0f',\n 'cocktail':'\\ud83c\\udf78',\n 'coffee':'\\u2615\\ufe0f',\n 'coffin':'\\u26b0\\ufe0f',\n 'cold_sweat':'\\ud83d\\ude30',\n 'comet':'\\u2604\\ufe0f',\n 'computer':'\\ud83d\\udcbb',\n 'computer_mouse':'\\ud83d\\uddb1',\n 'confetti_ball':'\\ud83c\\udf8a',\n 'confounded':'\\ud83d\\ude16',\n 'confused':'\\ud83d\\ude15',\n 'congratulations':'\\u3297\\ufe0f',\n 'construction':'\\ud83d\\udea7',\n 'construction_worker_man':'\\ud83d\\udc77',\n 'construction_worker_woman':'\\ud83d\\udc77‍\\u2640\\ufe0f',\n 'control_knobs':'\\ud83c\\udf9b',\n 'convenience_store':'\\ud83c\\udfea',\n 'cookie':'\\ud83c\\udf6a',\n 'cool':'\\ud83c\\udd92',\n 'policeman':'\\ud83d\\udc6e',\n 'copyright':'\\u00a9\\ufe0f',\n 'corn':'\\ud83c\\udf3d',\n 'couch_and_lamp':'\\ud83d\\udecb',\n 'couple':'\\ud83d\\udc6b',\n 'couple_with_heart_woman_man':'\\ud83d\\udc91',\n 'couple_with_heart_man_man':'\\ud83d\\udc68‍\\u2764\\ufe0f‍\\ud83d\\udc68',\n 'couple_with_heart_woman_woman':'\\ud83d\\udc69‍\\u2764\\ufe0f‍\\ud83d\\udc69',\n 'couplekiss_man_man':'\\ud83d\\udc68‍\\u2764\\ufe0f‍\\ud83d\\udc8b‍\\ud83d\\udc68',\n 'couplekiss_man_woman':'\\ud83d\\udc8f',\n 'couplekiss_woman_woman':'\\ud83d\\udc69‍\\u2764\\ufe0f‍\\ud83d\\udc8b‍\\ud83d\\udc69',\n 'cow':'\\ud83d\\udc2e',\n 'cow2':'\\ud83d\\udc04',\n 'cowboy_hat_face':'\\ud83e\\udd20',\n 'crab':'\\ud83e\\udd80',\n 'crayon':'\\ud83d\\udd8d',\n 'credit_card':'\\ud83d\\udcb3',\n 'crescent_moon':'\\ud83c\\udf19',\n 'cricket':'\\ud83c\\udfcf',\n 'crocodile':'\\ud83d\\udc0a',\n 'croissant':'\\ud83e\\udd50',\n 'crossed_fingers':'\\ud83e\\udd1e',\n 'crossed_flags':'\\ud83c\\udf8c',\n 'crossed_swords':'\\u2694\\ufe0f',\n 'crown':'\\ud83d\\udc51',\n 'cry':'\\ud83d\\ude22',\n 'crying_cat_face':'\\ud83d\\ude3f',\n 'crystal_ball':'\\ud83d\\udd2e',\n 'cucumber':'\\ud83e\\udd52',\n 'cupid':'\\ud83d\\udc98',\n 'curly_loop':'\\u27b0',\n 'currency_exchange':'\\ud83d\\udcb1',\n 'curry':'\\ud83c\\udf5b',\n 'custard':'\\ud83c\\udf6e',\n 'customs':'\\ud83d\\udec3',\n 'cyclone':'\\ud83c\\udf00',\n 'dagger':'\\ud83d\\udde1',\n 'dancer':'\\ud83d\\udc83',\n 'dancing_women':'\\ud83d\\udc6f',\n 'dancing_men':'\\ud83d\\udc6f‍\\u2642\\ufe0f',\n 'dango':'\\ud83c\\udf61',\n 'dark_sunglasses':'\\ud83d\\udd76',\n 'dart':'\\ud83c\\udfaf',\n 'dash':'\\ud83d\\udca8',\n 'date':'\\ud83d\\udcc5',\n 'deciduous_tree':'\\ud83c\\udf33',\n 'deer':'\\ud83e\\udd8c',\n 'department_store':'\\ud83c\\udfec',\n 'derelict_house':'\\ud83c\\udfda',\n 'desert':'\\ud83c\\udfdc',\n 'desert_island':'\\ud83c\\udfdd',\n 'desktop_computer':'\\ud83d\\udda5',\n 'male_detective':'\\ud83d\\udd75\\ufe0f',\n 'diamond_shape_with_a_dot_inside':'\\ud83d\\udca0',\n 'diamonds':'\\u2666\\ufe0f',\n 'disappointed':'\\ud83d\\ude1e',\n 'disappointed_relieved':'\\ud83d\\ude25',\n 'dizzy':'\\ud83d\\udcab',\n 'dizzy_face':'\\ud83d\\ude35',\n 'do_not_litter':'\\ud83d\\udeaf',\n 'dog':'\\ud83d\\udc36',\n 'dog2':'\\ud83d\\udc15',\n 'dollar':'\\ud83d\\udcb5',\n 'dolls':'\\ud83c\\udf8e',\n 'dolphin':'\\ud83d\\udc2c',\n 'door':'\\ud83d\\udeaa',\n 'doughnut':'\\ud83c\\udf69',\n 'dove':'\\ud83d\\udd4a',\n 'dragon':'\\ud83d\\udc09',\n 'dragon_face':'\\ud83d\\udc32',\n 'dress':'\\ud83d\\udc57',\n 'dromedary_camel':'\\ud83d\\udc2a',\n 'drooling_face':'\\ud83e\\udd24',\n 'droplet':'\\ud83d\\udca7',\n 'drum':'\\ud83e\\udd41',\n 'duck':'\\ud83e\\udd86',\n 'dvd':'\\ud83d\\udcc0',\n 'e-mail':'\\ud83d\\udce7',\n 'eagle':'\\ud83e\\udd85',\n 'ear':'\\ud83d\\udc42',\n 'ear_of_rice':'\\ud83c\\udf3e',\n 'earth_africa':'\\ud83c\\udf0d',\n 'earth_americas':'\\ud83c\\udf0e',\n 'earth_asia':'\\ud83c\\udf0f',\n 'egg':'\\ud83e\\udd5a',\n 'eggplant':'\\ud83c\\udf46',\n 'eight_pointed_black_star':'\\u2734\\ufe0f',\n 'eight_spoked_asterisk':'\\u2733\\ufe0f',\n 'electric_plug':'\\ud83d\\udd0c',\n 'elephant':'\\ud83d\\udc18',\n 'email':'\\u2709\\ufe0f',\n 'end':'\\ud83d\\udd1a',\n 'envelope_with_arrow':'\\ud83d\\udce9',\n 'euro':'\\ud83d\\udcb6',\n 'european_castle':'\\ud83c\\udff0',\n 'european_post_office':'\\ud83c\\udfe4',\n 'evergreen_tree':'\\ud83c\\udf32',\n 'exclamation':'\\u2757\\ufe0f',\n 'expressionless':'\\ud83d\\ude11',\n 'eye':'\\ud83d\\udc41',\n 'eye_speech_bubble':'\\ud83d\\udc41‍\\ud83d\\udde8',\n 'eyeglasses':'\\ud83d\\udc53',\n 'eyes':'\\ud83d\\udc40',\n 'face_with_head_bandage':'\\ud83e\\udd15',\n 'face_with_thermometer':'\\ud83e\\udd12',\n 'fist_oncoming':'\\ud83d\\udc4a',\n 'factory':'\\ud83c\\udfed',\n 'fallen_leaf':'\\ud83c\\udf42',\n 'family_man_woman_boy':'\\ud83d\\udc6a',\n 'family_man_boy':'\\ud83d\\udc68‍\\ud83d\\udc66',\n 'family_man_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_girl':'\\ud83d\\udc68‍\\ud83d\\udc67',\n 'family_man_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_man_man_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc66',\n 'family_man_man_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_man_girl':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67',\n 'family_man_man_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_man_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_man_woman_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_woman_girl':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_man_woman_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_woman_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_woman_boy':'\\ud83d\\udc69‍\\ud83d\\udc66',\n 'family_woman_boy_boy':'\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_woman_girl':'\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_woman_girl_boy':'\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_woman_girl_girl':'\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_woman_woman_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc66',\n 'family_woman_woman_boy_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_woman_woman_girl':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_woman_woman_girl_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_woman_woman_girl_girl':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'fast_forward':'\\u23e9',\n 'fax':'\\ud83d\\udce0',\n 'fearful':'\\ud83d\\ude28',\n 'feet':'\\ud83d\\udc3e',\n 'female_detective':'\\ud83d\\udd75\\ufe0f‍\\u2640\\ufe0f',\n 'ferris_wheel':'\\ud83c\\udfa1',\n 'ferry':'\\u26f4',\n 'field_hockey':'\\ud83c\\udfd1',\n 'file_cabinet':'\\ud83d\\uddc4',\n 'file_folder':'\\ud83d\\udcc1',\n 'film_projector':'\\ud83d\\udcfd',\n 'film_strip':'\\ud83c\\udf9e',\n 'fire':'\\ud83d\\udd25',\n 'fire_engine':'\\ud83d\\ude92',\n 'fireworks':'\\ud83c\\udf86',\n 'first_quarter_moon':'\\ud83c\\udf13',\n 'first_quarter_moon_with_face':'\\ud83c\\udf1b',\n 'fish':'\\ud83d\\udc1f',\n 'fish_cake':'\\ud83c\\udf65',\n 'fishing_pole_and_fish':'\\ud83c\\udfa3',\n 'fist_raised':'\\u270a',\n 'fist_left':'\\ud83e\\udd1b',\n 'fist_right':'\\ud83e\\udd1c',\n 'flags':'\\ud83c\\udf8f',\n 'flashlight':'\\ud83d\\udd26',\n 'fleur_de_lis':'\\u269c\\ufe0f',\n 'flight_arrival':'\\ud83d\\udeec',\n 'flight_departure':'\\ud83d\\udeeb',\n 'floppy_disk':'\\ud83d\\udcbe',\n 'flower_playing_cards':'\\ud83c\\udfb4',\n 'flushed':'\\ud83d\\ude33',\n 'fog':'\\ud83c\\udf2b',\n 'foggy':'\\ud83c\\udf01',\n 'football':'\\ud83c\\udfc8',\n 'footprints':'\\ud83d\\udc63',\n 'fork_and_knife':'\\ud83c\\udf74',\n 'fountain':'\\u26f2\\ufe0f',\n 'fountain_pen':'\\ud83d\\udd8b',\n 'four_leaf_clover':'\\ud83c\\udf40',\n 'fox_face':'\\ud83e\\udd8a',\n 'framed_picture':'\\ud83d\\uddbc',\n 'free':'\\ud83c\\udd93',\n 'fried_egg':'\\ud83c\\udf73',\n 'fried_shrimp':'\\ud83c\\udf64',\n 'fries':'\\ud83c\\udf5f',\n 'frog':'\\ud83d\\udc38',\n 'frowning':'\\ud83d\\ude26',\n 'frowning_face':'\\u2639\\ufe0f',\n 'frowning_man':'\\ud83d\\ude4d‍\\u2642\\ufe0f',\n 'frowning_woman':'\\ud83d\\ude4d',\n 'middle_finger':'\\ud83d\\udd95',\n 'fuelpump':'\\u26fd\\ufe0f',\n 'full_moon':'\\ud83c\\udf15',\n 'full_moon_with_face':'\\ud83c\\udf1d',\n 'funeral_urn':'\\u26b1\\ufe0f',\n 'game_die':'\\ud83c\\udfb2',\n 'gear':'\\u2699\\ufe0f',\n 'gem':'\\ud83d\\udc8e',\n 'gemini':'\\u264a\\ufe0f',\n 'ghost':'\\ud83d\\udc7b',\n 'gift':'\\ud83c\\udf81',\n 'gift_heart':'\\ud83d\\udc9d',\n 'girl':'\\ud83d\\udc67',\n 'globe_with_meridians':'\\ud83c\\udf10',\n 'goal_net':'\\ud83e\\udd45',\n 'goat':'\\ud83d\\udc10',\n 'golf':'\\u26f3\\ufe0f',\n 'golfing_man':'\\ud83c\\udfcc\\ufe0f',\n 'golfing_woman':'\\ud83c\\udfcc\\ufe0f‍\\u2640\\ufe0f',\n 'gorilla':'\\ud83e\\udd8d',\n 'grapes':'\\ud83c\\udf47',\n 'green_apple':'\\ud83c\\udf4f',\n 'green_book':'\\ud83d\\udcd7',\n 'green_heart':'\\ud83d\\udc9a',\n 'green_salad':'\\ud83e\\udd57',\n 'grey_exclamation':'\\u2755',\n 'grey_question':'\\u2754',\n 'grimacing':'\\ud83d\\ude2c',\n 'grin':'\\ud83d\\ude01',\n 'grinning':'\\ud83d\\ude00',\n 'guardsman':'\\ud83d\\udc82',\n 'guardswoman':'\\ud83d\\udc82‍\\u2640\\ufe0f',\n 'guitar':'\\ud83c\\udfb8',\n 'gun':'\\ud83d\\udd2b',\n 'haircut_woman':'\\ud83d\\udc87',\n 'haircut_man':'\\ud83d\\udc87‍\\u2642\\ufe0f',\n 'hamburger':'\\ud83c\\udf54',\n 'hammer':'\\ud83d\\udd28',\n 'hammer_and_pick':'\\u2692',\n 'hammer_and_wrench':'\\ud83d\\udee0',\n 'hamster':'\\ud83d\\udc39',\n 'hand':'\\u270b',\n 'handbag':'\\ud83d\\udc5c',\n 'handshake':'\\ud83e\\udd1d',\n 'hankey':'\\ud83d\\udca9',\n 'hatched_chick':'\\ud83d\\udc25',\n 'hatching_chick':'\\ud83d\\udc23',\n 'headphones':'\\ud83c\\udfa7',\n 'hear_no_evil':'\\ud83d\\ude49',\n 'heart':'\\u2764\\ufe0f',\n 'heart_decoration':'\\ud83d\\udc9f',\n 'heart_eyes':'\\ud83d\\ude0d',\n 'heart_eyes_cat':'\\ud83d\\ude3b',\n 'heartbeat':'\\ud83d\\udc93',\n 'heartpulse':'\\ud83d\\udc97',\n 'hearts':'\\u2665\\ufe0f',\n 'heavy_check_mark':'\\u2714\\ufe0f',\n 'heavy_division_sign':'\\u2797',\n 'heavy_dollar_sign':'\\ud83d\\udcb2',\n 'heavy_heart_exclamation':'\\u2763\\ufe0f',\n 'heavy_minus_sign':'\\u2796',\n 'heavy_multiplication_x':'\\u2716\\ufe0f',\n 'heavy_plus_sign':'\\u2795',\n 'helicopter':'\\ud83d\\ude81',\n 'herb':'\\ud83c\\udf3f',\n 'hibiscus':'\\ud83c\\udf3a',\n 'high_brightness':'\\ud83d\\udd06',\n 'high_heel':'\\ud83d\\udc60',\n 'hocho':'\\ud83d\\udd2a',\n 'hole':'\\ud83d\\udd73',\n 'honey_pot':'\\ud83c\\udf6f',\n 'horse':'\\ud83d\\udc34',\n 'horse_racing':'\\ud83c\\udfc7',\n 'hospital':'\\ud83c\\udfe5',\n 'hot_pepper':'\\ud83c\\udf36',\n 'hotdog':'\\ud83c\\udf2d',\n 'hotel':'\\ud83c\\udfe8',\n 'hotsprings':'\\u2668\\ufe0f',\n 'hourglass':'\\u231b\\ufe0f',\n 'hourglass_flowing_sand':'\\u23f3',\n 'house':'\\ud83c\\udfe0',\n 'house_with_garden':'\\ud83c\\udfe1',\n 'houses':'\\ud83c\\udfd8',\n 'hugs':'\\ud83e\\udd17',\n 'hushed':'\\ud83d\\ude2f',\n 'ice_cream':'\\ud83c\\udf68',\n 'ice_hockey':'\\ud83c\\udfd2',\n 'ice_skate':'\\u26f8',\n 'icecream':'\\ud83c\\udf66',\n 'id':'\\ud83c\\udd94',\n 'ideograph_advantage':'\\ud83c\\ude50',\n 'imp':'\\ud83d\\udc7f',\n 'inbox_tray':'\\ud83d\\udce5',\n 'incoming_envelope':'\\ud83d\\udce8',\n 'tipping_hand_woman':'\\ud83d\\udc81',\n 'information_source':'\\u2139\\ufe0f',\n 'innocent':'\\ud83d\\ude07',\n 'interrobang':'\\u2049\\ufe0f',\n 'iphone':'\\ud83d\\udcf1',\n 'izakaya_lantern':'\\ud83c\\udfee',\n 'jack_o_lantern':'\\ud83c\\udf83',\n 'japan':'\\ud83d\\uddfe',\n 'japanese_castle':'\\ud83c\\udfef',\n 'japanese_goblin':'\\ud83d\\udc7a',\n 'japanese_ogre':'\\ud83d\\udc79',\n 'jeans':'\\ud83d\\udc56',\n 'joy':'\\ud83d\\ude02',\n 'joy_cat':'\\ud83d\\ude39',\n 'joystick':'\\ud83d\\udd79',\n 'kaaba':'\\ud83d\\udd4b',\n 'key':'\\ud83d\\udd11',\n 'keyboard':'\\u2328\\ufe0f',\n 'keycap_ten':'\\ud83d\\udd1f',\n 'kick_scooter':'\\ud83d\\udef4',\n 'kimono':'\\ud83d\\udc58',\n 'kiss':'\\ud83d\\udc8b',\n 'kissing':'\\ud83d\\ude17',\n 'kissing_cat':'\\ud83d\\ude3d',\n 'kissing_closed_eyes':'\\ud83d\\ude1a',\n 'kissing_heart':'\\ud83d\\ude18',\n 'kissing_smiling_eyes':'\\ud83d\\ude19',\n 'kiwi_fruit':'\\ud83e\\udd5d',\n 'koala':'\\ud83d\\udc28',\n 'koko':'\\ud83c\\ude01',\n 'label':'\\ud83c\\udff7',\n 'large_blue_circle':'\\ud83d\\udd35',\n 'large_blue_diamond':'\\ud83d\\udd37',\n 'large_orange_diamond':'\\ud83d\\udd36',\n 'last_quarter_moon':'\\ud83c\\udf17',\n 'last_quarter_moon_with_face':'\\ud83c\\udf1c',\n 'latin_cross':'\\u271d\\ufe0f',\n 'laughing':'\\ud83d\\ude06',\n 'leaves':'\\ud83c\\udf43',\n 'ledger':'\\ud83d\\udcd2',\n 'left_luggage':'\\ud83d\\udec5',\n 'left_right_arrow':'\\u2194\\ufe0f',\n 'leftwards_arrow_with_hook':'\\u21a9\\ufe0f',\n 'lemon':'\\ud83c\\udf4b',\n 'leo':'\\u264c\\ufe0f',\n 'leopard':'\\ud83d\\udc06',\n 'level_slider':'\\ud83c\\udf9a',\n 'libra':'\\u264e\\ufe0f',\n 'light_rail':'\\ud83d\\ude88',\n 'link':'\\ud83d\\udd17',\n 'lion':'\\ud83e\\udd81',\n 'lips':'\\ud83d\\udc44',\n 'lipstick':'\\ud83d\\udc84',\n 'lizard':'\\ud83e\\udd8e',\n 'lock':'\\ud83d\\udd12',\n 'lock_with_ink_pen':'\\ud83d\\udd0f',\n 'lollipop':'\\ud83c\\udf6d',\n 'loop':'\\u27bf',\n 'loud_sound':'\\ud83d\\udd0a',\n 'loudspeaker':'\\ud83d\\udce2',\n 'love_hotel':'\\ud83c\\udfe9',\n 'love_letter':'\\ud83d\\udc8c',\n 'low_brightness':'\\ud83d\\udd05',\n 'lying_face':'\\ud83e\\udd25',\n 'm':'\\u24c2\\ufe0f',\n 'mag':'\\ud83d\\udd0d',\n 'mag_right':'\\ud83d\\udd0e',\n 'mahjong':'\\ud83c\\udc04\\ufe0f',\n 'mailbox':'\\ud83d\\udceb',\n 'mailbox_closed':'\\ud83d\\udcea',\n 'mailbox_with_mail':'\\ud83d\\udcec',\n 'mailbox_with_no_mail':'\\ud83d\\udced',\n 'man':'\\ud83d\\udc68',\n 'man_artist':'\\ud83d\\udc68‍\\ud83c\\udfa8',\n 'man_astronaut':'\\ud83d\\udc68‍\\ud83d\\ude80',\n 'man_cartwheeling':'\\ud83e\\udd38‍\\u2642\\ufe0f',\n 'man_cook':'\\ud83d\\udc68‍\\ud83c\\udf73',\n 'man_dancing':'\\ud83d\\udd7a',\n 'man_facepalming':'\\ud83e\\udd26‍\\u2642\\ufe0f',\n 'man_factory_worker':'\\ud83d\\udc68‍\\ud83c\\udfed',\n 'man_farmer':'\\ud83d\\udc68‍\\ud83c\\udf3e',\n 'man_firefighter':'\\ud83d\\udc68‍\\ud83d\\ude92',\n 'man_health_worker':'\\ud83d\\udc68‍\\u2695\\ufe0f',\n 'man_in_tuxedo':'\\ud83e\\udd35',\n 'man_judge':'\\ud83d\\udc68‍\\u2696\\ufe0f',\n 'man_juggling':'\\ud83e\\udd39‍\\u2642\\ufe0f',\n 'man_mechanic':'\\ud83d\\udc68‍\\ud83d\\udd27',\n 'man_office_worker':'\\ud83d\\udc68‍\\ud83d\\udcbc',\n 'man_pilot':'\\ud83d\\udc68‍\\u2708\\ufe0f',\n 'man_playing_handball':'\\ud83e\\udd3e‍\\u2642\\ufe0f',\n 'man_playing_water_polo':'\\ud83e\\udd3d‍\\u2642\\ufe0f',\n 'man_scientist':'\\ud83d\\udc68‍\\ud83d\\udd2c',\n 'man_shrugging':'\\ud83e\\udd37‍\\u2642\\ufe0f',\n 'man_singer':'\\ud83d\\udc68‍\\ud83c\\udfa4',\n 'man_student':'\\ud83d\\udc68‍\\ud83c\\udf93',\n 'man_teacher':'\\ud83d\\udc68‍\\ud83c\\udfeb',\n 'man_technologist':'\\ud83d\\udc68‍\\ud83d\\udcbb',\n 'man_with_gua_pi_mao':'\\ud83d\\udc72',\n 'man_with_turban':'\\ud83d\\udc73',\n 'tangerine':'\\ud83c\\udf4a',\n 'mans_shoe':'\\ud83d\\udc5e',\n 'mantelpiece_clock':'\\ud83d\\udd70',\n 'maple_leaf':'\\ud83c\\udf41',\n 'martial_arts_uniform':'\\ud83e\\udd4b',\n 'mask':'\\ud83d\\ude37',\n 'massage_woman':'\\ud83d\\udc86',\n 'massage_man':'\\ud83d\\udc86‍\\u2642\\ufe0f',\n 'meat_on_bone':'\\ud83c\\udf56',\n 'medal_military':'\\ud83c\\udf96',\n 'medal_sports':'\\ud83c\\udfc5',\n 'mega':'\\ud83d\\udce3',\n 'melon':'\\ud83c\\udf48',\n 'memo':'\\ud83d\\udcdd',\n 'men_wrestling':'\\ud83e\\udd3c‍\\u2642\\ufe0f',\n 'menorah':'\\ud83d\\udd4e',\n 'mens':'\\ud83d\\udeb9',\n 'metal':'\\ud83e\\udd18',\n 'metro':'\\ud83d\\ude87',\n 'microphone':'\\ud83c\\udfa4',\n 'microscope':'\\ud83d\\udd2c',\n 'milk_glass':'\\ud83e\\udd5b',\n 'milky_way':'\\ud83c\\udf0c',\n 'minibus':'\\ud83d\\ude90',\n 'minidisc':'\\ud83d\\udcbd',\n 'mobile_phone_off':'\\ud83d\\udcf4',\n 'money_mouth_face':'\\ud83e\\udd11',\n 'money_with_wings':'\\ud83d\\udcb8',\n 'moneybag':'\\ud83d\\udcb0',\n 'monkey':'\\ud83d\\udc12',\n 'monkey_face':'\\ud83d\\udc35',\n 'monorail':'\\ud83d\\ude9d',\n 'moon':'\\ud83c\\udf14',\n 'mortar_board':'\\ud83c\\udf93',\n 'mosque':'\\ud83d\\udd4c',\n 'motor_boat':'\\ud83d\\udee5',\n 'motor_scooter':'\\ud83d\\udef5',\n 'motorcycle':'\\ud83c\\udfcd',\n 'motorway':'\\ud83d\\udee3',\n 'mount_fuji':'\\ud83d\\uddfb',\n 'mountain':'\\u26f0',\n 'mountain_biking_man':'\\ud83d\\udeb5',\n 'mountain_biking_woman':'\\ud83d\\udeb5‍\\u2640\\ufe0f',\n 'mountain_cableway':'\\ud83d\\udea0',\n 'mountain_railway':'\\ud83d\\ude9e',\n 'mountain_snow':'\\ud83c\\udfd4',\n 'mouse':'\\ud83d\\udc2d',\n 'mouse2':'\\ud83d\\udc01',\n 'movie_camera':'\\ud83c\\udfa5',\n 'moyai':'\\ud83d\\uddff',\n 'mrs_claus':'\\ud83e\\udd36',\n 'muscle':'\\ud83d\\udcaa',\n 'mushroom':'\\ud83c\\udf44',\n 'musical_keyboard':'\\ud83c\\udfb9',\n 'musical_note':'\\ud83c\\udfb5',\n 'musical_score':'\\ud83c\\udfbc',\n 'mute':'\\ud83d\\udd07',\n 'nail_care':'\\ud83d\\udc85',\n 'name_badge':'\\ud83d\\udcdb',\n 'national_park':'\\ud83c\\udfde',\n 'nauseated_face':'\\ud83e\\udd22',\n 'necktie':'\\ud83d\\udc54',\n 'negative_squared_cross_mark':'\\u274e',\n 'nerd_face':'\\ud83e\\udd13',\n 'neutral_face':'\\ud83d\\ude10',\n 'new':'\\ud83c\\udd95',\n 'new_moon':'\\ud83c\\udf11',\n 'new_moon_with_face':'\\ud83c\\udf1a',\n 'newspaper':'\\ud83d\\udcf0',\n 'newspaper_roll':'\\ud83d\\uddde',\n 'next_track_button':'\\u23ed',\n 'ng':'\\ud83c\\udd96',\n 'no_good_man':'\\ud83d\\ude45‍\\u2642\\ufe0f',\n 'no_good_woman':'\\ud83d\\ude45',\n 'night_with_stars':'\\ud83c\\udf03',\n 'no_bell':'\\ud83d\\udd15',\n 'no_bicycles':'\\ud83d\\udeb3',\n 'no_entry':'\\u26d4\\ufe0f',\n 'no_entry_sign':'\\ud83d\\udeab',\n 'no_mobile_phones':'\\ud83d\\udcf5',\n 'no_mouth':'\\ud83d\\ude36',\n 'no_pedestrians':'\\ud83d\\udeb7',\n 'no_smoking':'\\ud83d\\udead',\n 'non-potable_water':'\\ud83d\\udeb1',\n 'nose':'\\ud83d\\udc43',\n 'notebook':'\\ud83d\\udcd3',\n 'notebook_with_decorative_cover':'\\ud83d\\udcd4',\n 'notes':'\\ud83c\\udfb6',\n 'nut_and_bolt':'\\ud83d\\udd29',\n 'o':'\\u2b55\\ufe0f',\n 'o2':'\\ud83c\\udd7e\\ufe0f',\n 'ocean':'\\ud83c\\udf0a',\n 'octopus':'\\ud83d\\udc19',\n 'oden':'\\ud83c\\udf62',\n 'office':'\\ud83c\\udfe2',\n 'oil_drum':'\\ud83d\\udee2',\n 'ok':'\\ud83c\\udd97',\n 'ok_hand':'\\ud83d\\udc4c',\n 'ok_man':'\\ud83d\\ude46‍\\u2642\\ufe0f',\n 'ok_woman':'\\ud83d\\ude46',\n 'old_key':'\\ud83d\\udddd',\n 'older_man':'\\ud83d\\udc74',\n 'older_woman':'\\ud83d\\udc75',\n 'om':'\\ud83d\\udd49',\n 'on':'\\ud83d\\udd1b',\n 'oncoming_automobile':'\\ud83d\\ude98',\n 'oncoming_bus':'\\ud83d\\ude8d',\n 'oncoming_police_car':'\\ud83d\\ude94',\n 'oncoming_taxi':'\\ud83d\\ude96',\n 'open_file_folder':'\\ud83d\\udcc2',\n 'open_hands':'\\ud83d\\udc50',\n 'open_mouth':'\\ud83d\\ude2e',\n 'open_umbrella':'\\u2602\\ufe0f',\n 'ophiuchus':'\\u26ce',\n 'orange_book':'\\ud83d\\udcd9',\n 'orthodox_cross':'\\u2626\\ufe0f',\n 'outbox_tray':'\\ud83d\\udce4',\n 'owl':'\\ud83e\\udd89',\n 'ox':'\\ud83d\\udc02',\n 'package':'\\ud83d\\udce6',\n 'page_facing_up':'\\ud83d\\udcc4',\n 'page_with_curl':'\\ud83d\\udcc3',\n 'pager':'\\ud83d\\udcdf',\n 'paintbrush':'\\ud83d\\udd8c',\n 'palm_tree':'\\ud83c\\udf34',\n 'pancakes':'\\ud83e\\udd5e',\n 'panda_face':'\\ud83d\\udc3c',\n 'paperclip':'\\ud83d\\udcce',\n 'paperclips':'\\ud83d\\udd87',\n 'parasol_on_ground':'\\u26f1',\n 'parking':'\\ud83c\\udd7f\\ufe0f',\n 'part_alternation_mark':'\\u303d\\ufe0f',\n 'partly_sunny':'\\u26c5\\ufe0f',\n 'passenger_ship':'\\ud83d\\udef3',\n 'passport_control':'\\ud83d\\udec2',\n 'pause_button':'\\u23f8',\n 'peace_symbol':'\\u262e\\ufe0f',\n 'peach':'\\ud83c\\udf51',\n 'peanuts':'\\ud83e\\udd5c',\n 'pear':'\\ud83c\\udf50',\n 'pen':'\\ud83d\\udd8a',\n 'pencil2':'\\u270f\\ufe0f',\n 'penguin':'\\ud83d\\udc27',\n 'pensive':'\\ud83d\\ude14',\n 'performing_arts':'\\ud83c\\udfad',\n 'persevere':'\\ud83d\\ude23',\n 'person_fencing':'\\ud83e\\udd3a',\n 'pouting_woman':'\\ud83d\\ude4e',\n 'phone':'\\u260e\\ufe0f',\n 'pick':'\\u26cf',\n 'pig':'\\ud83d\\udc37',\n 'pig2':'\\ud83d\\udc16',\n 'pig_nose':'\\ud83d\\udc3d',\n 'pill':'\\ud83d\\udc8a',\n 'pineapple':'\\ud83c\\udf4d',\n 'ping_pong':'\\ud83c\\udfd3',\n 'pisces':'\\u2653\\ufe0f',\n 'pizza':'\\ud83c\\udf55',\n 'place_of_worship':'\\ud83d\\uded0',\n 'plate_with_cutlery':'\\ud83c\\udf7d',\n 'play_or_pause_button':'\\u23ef',\n 'point_down':'\\ud83d\\udc47',\n 'point_left':'\\ud83d\\udc48',\n 'point_right':'\\ud83d\\udc49',\n 'point_up':'\\u261d\\ufe0f',\n 'point_up_2':'\\ud83d\\udc46',\n 'police_car':'\\ud83d\\ude93',\n 'policewoman':'\\ud83d\\udc6e‍\\u2640\\ufe0f',\n 'poodle':'\\ud83d\\udc29',\n 'popcorn':'\\ud83c\\udf7f',\n 'post_office':'\\ud83c\\udfe3',\n 'postal_horn':'\\ud83d\\udcef',\n 'postbox':'\\ud83d\\udcee',\n 'potable_water':'\\ud83d\\udeb0',\n 'potato':'\\ud83e\\udd54',\n 'pouch':'\\ud83d\\udc5d',\n 'poultry_leg':'\\ud83c\\udf57',\n 'pound':'\\ud83d\\udcb7',\n 'rage':'\\ud83d\\ude21',\n 'pouting_cat':'\\ud83d\\ude3e',\n 'pouting_man':'\\ud83d\\ude4e‍\\u2642\\ufe0f',\n 'pray':'\\ud83d\\ude4f',\n 'prayer_beads':'\\ud83d\\udcff',\n 'pregnant_woman':'\\ud83e\\udd30',\n 'previous_track_button':'\\u23ee',\n 'prince':'\\ud83e\\udd34',\n 'princess':'\\ud83d\\udc78',\n 'printer':'\\ud83d\\udda8',\n 'purple_heart':'\\ud83d\\udc9c',\n 'purse':'\\ud83d\\udc5b',\n 'pushpin':'\\ud83d\\udccc',\n 'put_litter_in_its_place':'\\ud83d\\udeae',\n 'question':'\\u2753',\n 'rabbit':'\\ud83d\\udc30',\n 'rabbit2':'\\ud83d\\udc07',\n 'racehorse':'\\ud83d\\udc0e',\n 'racing_car':'\\ud83c\\udfce',\n 'radio':'\\ud83d\\udcfb',\n 'radio_button':'\\ud83d\\udd18',\n 'radioactive':'\\u2622\\ufe0f',\n 'railway_car':'\\ud83d\\ude83',\n 'railway_track':'\\ud83d\\udee4',\n 'rainbow':'\\ud83c\\udf08',\n 'rainbow_flag':'\\ud83c\\udff3\\ufe0f‍\\ud83c\\udf08',\n 'raised_back_of_hand':'\\ud83e\\udd1a',\n 'raised_hand_with_fingers_splayed':'\\ud83d\\udd90',\n 'raised_hands':'\\ud83d\\ude4c',\n 'raising_hand_woman':'\\ud83d\\ude4b',\n 'raising_hand_man':'\\ud83d\\ude4b‍\\u2642\\ufe0f',\n 'ram':'\\ud83d\\udc0f',\n 'ramen':'\\ud83c\\udf5c',\n 'rat':'\\ud83d\\udc00',\n 'record_button':'\\u23fa',\n 'recycle':'\\u267b\\ufe0f',\n 'red_circle':'\\ud83d\\udd34',\n 'registered':'\\u00ae\\ufe0f',\n 'relaxed':'\\u263a\\ufe0f',\n 'relieved':'\\ud83d\\ude0c',\n 'reminder_ribbon':'\\ud83c\\udf97',\n 'repeat':'\\ud83d\\udd01',\n 'repeat_one':'\\ud83d\\udd02',\n 'rescue_worker_helmet':'\\u26d1',\n 'restroom':'\\ud83d\\udebb',\n 'revolving_hearts':'\\ud83d\\udc9e',\n 'rewind':'\\u23ea',\n 'rhinoceros':'\\ud83e\\udd8f',\n 'ribbon':'\\ud83c\\udf80',\n 'rice':'\\ud83c\\udf5a',\n 'rice_ball':'\\ud83c\\udf59',\n 'rice_cracker':'\\ud83c\\udf58',\n 'rice_scene':'\\ud83c\\udf91',\n 'right_anger_bubble':'\\ud83d\\uddef',\n 'ring':'\\ud83d\\udc8d',\n 'robot':'\\ud83e\\udd16',\n 'rocket':'\\ud83d\\ude80',\n 'rofl':'\\ud83e\\udd23',\n 'roll_eyes':'\\ud83d\\ude44',\n 'roller_coaster':'\\ud83c\\udfa2',\n 'rooster':'\\ud83d\\udc13',\n 'rose':'\\ud83c\\udf39',\n 'rosette':'\\ud83c\\udff5',\n 'rotating_light':'\\ud83d\\udea8',\n 'round_pushpin':'\\ud83d\\udccd',\n 'rowing_man':'\\ud83d\\udea3',\n 'rowing_woman':'\\ud83d\\udea3‍\\u2640\\ufe0f',\n 'rugby_football':'\\ud83c\\udfc9',\n 'running_man':'\\ud83c\\udfc3',\n 'running_shirt_with_sash':'\\ud83c\\udfbd',\n 'running_woman':'\\ud83c\\udfc3‍\\u2640\\ufe0f',\n 'sa':'\\ud83c\\ude02\\ufe0f',\n 'sagittarius':'\\u2650\\ufe0f',\n 'sake':'\\ud83c\\udf76',\n 'sandal':'\\ud83d\\udc61',\n 'santa':'\\ud83c\\udf85',\n 'satellite':'\\ud83d\\udce1',\n 'saxophone':'\\ud83c\\udfb7',\n 'school':'\\ud83c\\udfeb',\n 'school_satchel':'\\ud83c\\udf92',\n 'scissors':'\\u2702\\ufe0f',\n 'scorpion':'\\ud83e\\udd82',\n 'scorpius':'\\u264f\\ufe0f',\n 'scream':'\\ud83d\\ude31',\n 'scream_cat':'\\ud83d\\ude40',\n 'scroll':'\\ud83d\\udcdc',\n 'seat':'\\ud83d\\udcba',\n 'secret':'\\u3299\\ufe0f',\n 'see_no_evil':'\\ud83d\\ude48',\n 'seedling':'\\ud83c\\udf31',\n 'selfie':'\\ud83e\\udd33',\n 'shallow_pan_of_food':'\\ud83e\\udd58',\n 'shamrock':'\\u2618\\ufe0f',\n 'shark':'\\ud83e\\udd88',\n 'shaved_ice':'\\ud83c\\udf67',\n 'sheep':'\\ud83d\\udc11',\n 'shell':'\\ud83d\\udc1a',\n 'shield':'\\ud83d\\udee1',\n 'shinto_shrine':'\\u26e9',\n 'ship':'\\ud83d\\udea2',\n 'shirt':'\\ud83d\\udc55',\n 'shopping':'\\ud83d\\udecd',\n 'shopping_cart':'\\ud83d\\uded2',\n 'shower':'\\ud83d\\udebf',\n 'shrimp':'\\ud83e\\udd90',\n 'signal_strength':'\\ud83d\\udcf6',\n 'six_pointed_star':'\\ud83d\\udd2f',\n 'ski':'\\ud83c\\udfbf',\n 'skier':'\\u26f7',\n 'skull':'\\ud83d\\udc80',\n 'skull_and_crossbones':'\\u2620\\ufe0f',\n 'sleeping':'\\ud83d\\ude34',\n 'sleeping_bed':'\\ud83d\\udecc',\n 'sleepy':'\\ud83d\\ude2a',\n 'slightly_frowning_face':'\\ud83d\\ude41',\n 'slightly_smiling_face':'\\ud83d\\ude42',\n 'slot_machine':'\\ud83c\\udfb0',\n 'small_airplane':'\\ud83d\\udee9',\n 'small_blue_diamond':'\\ud83d\\udd39',\n 'small_orange_diamond':'\\ud83d\\udd38',\n 'small_red_triangle':'\\ud83d\\udd3a',\n 'small_red_triangle_down':'\\ud83d\\udd3b',\n 'smile':'\\ud83d\\ude04',\n 'smile_cat':'\\ud83d\\ude38',\n 'smiley':'\\ud83d\\ude03',\n 'smiley_cat':'\\ud83d\\ude3a',\n 'smiling_imp':'\\ud83d\\ude08',\n 'smirk':'\\ud83d\\ude0f',\n 'smirk_cat':'\\ud83d\\ude3c',\n 'smoking':'\\ud83d\\udeac',\n 'snail':'\\ud83d\\udc0c',\n 'snake':'\\ud83d\\udc0d',\n 'sneezing_face':'\\ud83e\\udd27',\n 'snowboarder':'\\ud83c\\udfc2',\n 'snowflake':'\\u2744\\ufe0f',\n 'snowman':'\\u26c4\\ufe0f',\n 'snowman_with_snow':'\\u2603\\ufe0f',\n 'sob':'\\ud83d\\ude2d',\n 'soccer':'\\u26bd\\ufe0f',\n 'soon':'\\ud83d\\udd1c',\n 'sos':'\\ud83c\\udd98',\n 'sound':'\\ud83d\\udd09',\n 'space_invader':'\\ud83d\\udc7e',\n 'spades':'\\u2660\\ufe0f',\n 'spaghetti':'\\ud83c\\udf5d',\n 'sparkle':'\\u2747\\ufe0f',\n 'sparkler':'\\ud83c\\udf87',\n 'sparkles':'\\u2728',\n 'sparkling_heart':'\\ud83d\\udc96',\n 'speak_no_evil':'\\ud83d\\ude4a',\n 'speaker':'\\ud83d\\udd08',\n 'speaking_head':'\\ud83d\\udde3',\n 'speech_balloon':'\\ud83d\\udcac',\n 'speedboat':'\\ud83d\\udea4',\n 'spider':'\\ud83d\\udd77',\n 'spider_web':'\\ud83d\\udd78',\n 'spiral_calendar':'\\ud83d\\uddd3',\n 'spiral_notepad':'\\ud83d\\uddd2',\n 'spoon':'\\ud83e\\udd44',\n 'squid':'\\ud83e\\udd91',\n 'stadium':'\\ud83c\\udfdf',\n 'star':'\\u2b50\\ufe0f',\n 'star2':'\\ud83c\\udf1f',\n 'star_and_crescent':'\\u262a\\ufe0f',\n 'star_of_david':'\\u2721\\ufe0f',\n 'stars':'\\ud83c\\udf20',\n 'station':'\\ud83d\\ude89',\n 'statue_of_liberty':'\\ud83d\\uddfd',\n 'steam_locomotive':'\\ud83d\\ude82',\n 'stew':'\\ud83c\\udf72',\n 'stop_button':'\\u23f9',\n 'stop_sign':'\\ud83d\\uded1',\n 'stopwatch':'\\u23f1',\n 'straight_ruler':'\\ud83d\\udccf',\n 'strawberry':'\\ud83c\\udf53',\n 'stuck_out_tongue':'\\ud83d\\ude1b',\n 'stuck_out_tongue_closed_eyes':'\\ud83d\\ude1d',\n 'stuck_out_tongue_winking_eye':'\\ud83d\\ude1c',\n 'studio_microphone':'\\ud83c\\udf99',\n 'stuffed_flatbread':'\\ud83e\\udd59',\n 'sun_behind_large_cloud':'\\ud83c\\udf25',\n 'sun_behind_rain_cloud':'\\ud83c\\udf26',\n 'sun_behind_small_cloud':'\\ud83c\\udf24',\n 'sun_with_face':'\\ud83c\\udf1e',\n 'sunflower':'\\ud83c\\udf3b',\n 'sunglasses':'\\ud83d\\ude0e',\n 'sunny':'\\u2600\\ufe0f',\n 'sunrise':'\\ud83c\\udf05',\n 'sunrise_over_mountains':'\\ud83c\\udf04',\n 'surfing_man':'\\ud83c\\udfc4',\n 'surfing_woman':'\\ud83c\\udfc4‍\\u2640\\ufe0f',\n 'sushi':'\\ud83c\\udf63',\n 'suspension_railway':'\\ud83d\\ude9f',\n 'sweat':'\\ud83d\\ude13',\n 'sweat_drops':'\\ud83d\\udca6',\n 'sweat_smile':'\\ud83d\\ude05',\n 'sweet_potato':'\\ud83c\\udf60',\n 'swimming_man':'\\ud83c\\udfca',\n 'swimming_woman':'\\ud83c\\udfca‍\\u2640\\ufe0f',\n 'symbols':'\\ud83d\\udd23',\n 'synagogue':'\\ud83d\\udd4d',\n 'syringe':'\\ud83d\\udc89',\n 'taco':'\\ud83c\\udf2e',\n 'tada':'\\ud83c\\udf89',\n 'tanabata_tree':'\\ud83c\\udf8b',\n 'taurus':'\\u2649\\ufe0f',\n 'taxi':'\\ud83d\\ude95',\n 'tea':'\\ud83c\\udf75',\n 'telephone_receiver':'\\ud83d\\udcde',\n 'telescope':'\\ud83d\\udd2d',\n 'tennis':'\\ud83c\\udfbe',\n 'tent':'\\u26fa\\ufe0f',\n 'thermometer':'\\ud83c\\udf21',\n 'thinking':'\\ud83e\\udd14',\n 'thought_balloon':'\\ud83d\\udcad',\n 'ticket':'\\ud83c\\udfab',\n 'tickets':'\\ud83c\\udf9f',\n 'tiger':'\\ud83d\\udc2f',\n 'tiger2':'\\ud83d\\udc05',\n 'timer_clock':'\\u23f2',\n 'tipping_hand_man':'\\ud83d\\udc81‍\\u2642\\ufe0f',\n 'tired_face':'\\ud83d\\ude2b',\n 'tm':'\\u2122\\ufe0f',\n 'toilet':'\\ud83d\\udebd',\n 'tokyo_tower':'\\ud83d\\uddfc',\n 'tomato':'\\ud83c\\udf45',\n 'tongue':'\\ud83d\\udc45',\n 'top':'\\ud83d\\udd1d',\n 'tophat':'\\ud83c\\udfa9',\n 'tornado':'\\ud83c\\udf2a',\n 'trackball':'\\ud83d\\uddb2',\n 'tractor':'\\ud83d\\ude9c',\n 'traffic_light':'\\ud83d\\udea5',\n 'train':'\\ud83d\\ude8b',\n 'train2':'\\ud83d\\ude86',\n 'tram':'\\ud83d\\ude8a',\n 'triangular_flag_on_post':'\\ud83d\\udea9',\n 'triangular_ruler':'\\ud83d\\udcd0',\n 'trident':'\\ud83d\\udd31',\n 'triumph':'\\ud83d\\ude24',\n 'trolleybus':'\\ud83d\\ude8e',\n 'trophy':'\\ud83c\\udfc6',\n 'tropical_drink':'\\ud83c\\udf79',\n 'tropical_fish':'\\ud83d\\udc20',\n 'truck':'\\ud83d\\ude9a',\n 'trumpet':'\\ud83c\\udfba',\n 'tulip':'\\ud83c\\udf37',\n 'tumbler_glass':'\\ud83e\\udd43',\n 'turkey':'\\ud83e\\udd83',\n 'turtle':'\\ud83d\\udc22',\n 'tv':'\\ud83d\\udcfa',\n 'twisted_rightwards_arrows':'\\ud83d\\udd00',\n 'two_hearts':'\\ud83d\\udc95',\n 'two_men_holding_hands':'\\ud83d\\udc6c',\n 'two_women_holding_hands':'\\ud83d\\udc6d',\n 'u5272':'\\ud83c\\ude39',\n 'u5408':'\\ud83c\\ude34',\n 'u55b6':'\\ud83c\\ude3a',\n 'u6307':'\\ud83c\\ude2f\\ufe0f',\n 'u6708':'\\ud83c\\ude37\\ufe0f',\n 'u6709':'\\ud83c\\ude36',\n 'u6e80':'\\ud83c\\ude35',\n 'u7121':'\\ud83c\\ude1a\\ufe0f',\n 'u7533':'\\ud83c\\ude38',\n 'u7981':'\\ud83c\\ude32',\n 'u7a7a':'\\ud83c\\ude33',\n 'umbrella':'\\u2614\\ufe0f',\n 'unamused':'\\ud83d\\ude12',\n 'underage':'\\ud83d\\udd1e',\n 'unicorn':'\\ud83e\\udd84',\n 'unlock':'\\ud83d\\udd13',\n 'up':'\\ud83c\\udd99',\n 'upside_down_face':'\\ud83d\\ude43',\n 'v':'\\u270c\\ufe0f',\n 'vertical_traffic_light':'\\ud83d\\udea6',\n 'vhs':'\\ud83d\\udcfc',\n 'vibration_mode':'\\ud83d\\udcf3',\n 'video_camera':'\\ud83d\\udcf9',\n 'video_game':'\\ud83c\\udfae',\n 'violin':'\\ud83c\\udfbb',\n 'virgo':'\\u264d\\ufe0f',\n 'volcano':'\\ud83c\\udf0b',\n 'volleyball':'\\ud83c\\udfd0',\n 'vs':'\\ud83c\\udd9a',\n 'vulcan_salute':'\\ud83d\\udd96',\n 'walking_man':'\\ud83d\\udeb6',\n 'walking_woman':'\\ud83d\\udeb6‍\\u2640\\ufe0f',\n 'waning_crescent_moon':'\\ud83c\\udf18',\n 'waning_gibbous_moon':'\\ud83c\\udf16',\n 'warning':'\\u26a0\\ufe0f',\n 'wastebasket':'\\ud83d\\uddd1',\n 'watch':'\\u231a\\ufe0f',\n 'water_buffalo':'\\ud83d\\udc03',\n 'watermelon':'\\ud83c\\udf49',\n 'wave':'\\ud83d\\udc4b',\n 'wavy_dash':'\\u3030\\ufe0f',\n 'waxing_crescent_moon':'\\ud83c\\udf12',\n 'wc':'\\ud83d\\udebe',\n 'weary':'\\ud83d\\ude29',\n 'wedding':'\\ud83d\\udc92',\n 'weight_lifting_man':'\\ud83c\\udfcb\\ufe0f',\n 'weight_lifting_woman':'\\ud83c\\udfcb\\ufe0f‍\\u2640\\ufe0f',\n 'whale':'\\ud83d\\udc33',\n 'whale2':'\\ud83d\\udc0b',\n 'wheel_of_dharma':'\\u2638\\ufe0f',\n 'wheelchair':'\\u267f\\ufe0f',\n 'white_check_mark':'\\u2705',\n 'white_circle':'\\u26aa\\ufe0f',\n 'white_flag':'\\ud83c\\udff3\\ufe0f',\n 'white_flower':'\\ud83d\\udcae',\n 'white_large_square':'\\u2b1c\\ufe0f',\n 'white_medium_small_square':'\\u25fd\\ufe0f',\n 'white_medium_square':'\\u25fb\\ufe0f',\n 'white_small_square':'\\u25ab\\ufe0f',\n 'white_square_button':'\\ud83d\\udd33',\n 'wilted_flower':'\\ud83e\\udd40',\n 'wind_chime':'\\ud83c\\udf90',\n 'wind_face':'\\ud83c\\udf2c',\n 'wine_glass':'\\ud83c\\udf77',\n 'wink':'\\ud83d\\ude09',\n 'wolf':'\\ud83d\\udc3a',\n 'woman':'\\ud83d\\udc69',\n 'woman_artist':'\\ud83d\\udc69‍\\ud83c\\udfa8',\n 'woman_astronaut':'\\ud83d\\udc69‍\\ud83d\\ude80',\n 'woman_cartwheeling':'\\ud83e\\udd38‍\\u2640\\ufe0f',\n 'woman_cook':'\\ud83d\\udc69‍\\ud83c\\udf73',\n 'woman_facepalming':'\\ud83e\\udd26‍\\u2640\\ufe0f',\n 'woman_factory_worker':'\\ud83d\\udc69‍\\ud83c\\udfed',\n 'woman_farmer':'\\ud83d\\udc69‍\\ud83c\\udf3e',\n 'woman_firefighter':'\\ud83d\\udc69‍\\ud83d\\ude92',\n 'woman_health_worker':'\\ud83d\\udc69‍\\u2695\\ufe0f',\n 'woman_judge':'\\ud83d\\udc69‍\\u2696\\ufe0f',\n 'woman_juggling':'\\ud83e\\udd39‍\\u2640\\ufe0f',\n 'woman_mechanic':'\\ud83d\\udc69‍\\ud83d\\udd27',\n 'woman_office_worker':'\\ud83d\\udc69‍\\ud83d\\udcbc',\n 'woman_pilot':'\\ud83d\\udc69‍\\u2708\\ufe0f',\n 'woman_playing_handball':'\\ud83e\\udd3e‍\\u2640\\ufe0f',\n 'woman_playing_water_polo':'\\ud83e\\udd3d‍\\u2640\\ufe0f',\n 'woman_scientist':'\\ud83d\\udc69‍\\ud83d\\udd2c',\n 'woman_shrugging':'\\ud83e\\udd37‍\\u2640\\ufe0f',\n 'woman_singer':'\\ud83d\\udc69‍\\ud83c\\udfa4',\n 'woman_student':'\\ud83d\\udc69‍\\ud83c\\udf93',\n 'woman_teacher':'\\ud83d\\udc69‍\\ud83c\\udfeb',\n 'woman_technologist':'\\ud83d\\udc69‍\\ud83d\\udcbb',\n 'woman_with_turban':'\\ud83d\\udc73‍\\u2640\\ufe0f',\n 'womans_clothes':'\\ud83d\\udc5a',\n 'womans_hat':'\\ud83d\\udc52',\n 'women_wrestling':'\\ud83e\\udd3c‍\\u2640\\ufe0f',\n 'womens':'\\ud83d\\udeba',\n 'world_map':'\\ud83d\\uddfa',\n 'worried':'\\ud83d\\ude1f',\n 'wrench':'\\ud83d\\udd27',\n 'writing_hand':'\\u270d\\ufe0f',\n 'x':'\\u274c',\n 'yellow_heart':'\\ud83d\\udc9b',\n 'yen':'\\ud83d\\udcb4',\n 'yin_yang':'\\u262f\\ufe0f',\n 'yum':'\\ud83d\\ude0b',\n 'zap':'\\u26a1\\ufe0f',\n 'zipper_mouth_face':'\\ud83e\\udd10',\n 'zzz':'\\ud83d\\udca4',\n\n /* special emojis :P */\n 'octocat': '\":octocat:\"',\n 'showdown': 'S'\n};\n\r\n/**\n * Created by Estevao on 31-05-2015.\n */\n\n/**\n * Showdown Converter class\n * @class\n * @param {object} [converterOptions]\n * @returns {Converter}\n */\nshowdown.Converter = function (converterOptions) {\n 'use strict';\n\n var\n /**\n * Options used by this converter\n * @private\n * @type {{}}\n */\n options = {},\n\n /**\n * Language extensions used by this converter\n * @private\n * @type {Array}\n */\n langExtensions = [],\n\n /**\n * Output modifiers extensions used by this converter\n * @private\n * @type {Array}\n */\n outputModifiers = [],\n\n /**\n * Event listeners\n * @private\n * @type {{}}\n */\n listeners = {},\n\n /**\n * The flavor set in this converter\n */\n setConvFlavor = setFlavor,\n\n /**\n * Metadata of the document\n * @type {{parsed: {}, raw: string, format: string}}\n */\n metadata = {\n parsed: {},\n raw: '',\n format: ''\n };\n\n _constructor();\n\n /**\n * Converter constructor\n * @private\n */\n function _constructor () {\n converterOptions = converterOptions || {};\n\n for (var gOpt in globalOptions) {\n if (globalOptions.hasOwnProperty(gOpt)) {\n options[gOpt] = globalOptions[gOpt];\n }\n }\n\n // Merge options\n if (typeof converterOptions === 'object') {\n for (var opt in converterOptions) {\n if (converterOptions.hasOwnProperty(opt)) {\n options[opt] = converterOptions[opt];\n }\n }\n } else {\n throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +\n ' was passed instead.');\n }\n\n if (options.extensions) {\n showdown.helper.forEach(options.extensions, _parseExtension);\n }\n }\n\n /**\n * Parse extension\n * @param {*} ext\n * @param {string} [name='']\n * @private\n */\n function _parseExtension (ext, name) {\n\n name = name || null;\n // If it's a string, the extension was previously loaded\n if (showdown.helper.isString(ext)) {\n ext = showdown.helper.stdExtName(ext);\n name = ext;\n\n // LEGACY_SUPPORT CODE\n if (showdown.extensions[ext]) {\n console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +\n 'Please inform the developer that the extension should be updated!');\n legacyExtensionLoading(showdown.extensions[ext], ext);\n return;\n // END LEGACY SUPPORT CODE\n\n } else if (!showdown.helper.isUndefined(extensions[ext])) {\n ext = extensions[ext];\n\n } else {\n throw Error('Extension \"' + ext + '\" could not be loaded. It was either not found or is not a valid extension.');\n }\n }\n\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n var validExt = validate(ext, name);\n if (!validExt.valid) {\n throw Error(validExt.error);\n }\n\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n\n case 'lang':\n langExtensions.push(ext[i]);\n break;\n\n case 'output':\n outputModifiers.push(ext[i]);\n break;\n }\n if (ext[i].hasOwnProperty('listeners')) {\n for (var ln in ext[i].listeners) {\n if (ext[i].listeners.hasOwnProperty(ln)) {\n listen(ln, ext[i].listeners[ln]);\n }\n }\n }\n }\n\n }\n\n /**\n * LEGACY_SUPPORT\n * @param {*} ext\n * @param {string} name\n */\n function legacyExtensionLoading (ext, name) {\n if (typeof ext === 'function') {\n ext = ext(new showdown.Converter());\n }\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n var valid = validate(ext, name);\n\n if (!valid.valid) {\n throw Error(valid.error);\n }\n\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n case 'lang':\n langExtensions.push(ext[i]);\n break;\n case 'output':\n outputModifiers.push(ext[i]);\n break;\n default:// should never reach here\n throw Error('Extension loader error: Type unrecognized!!!');\n }\n }\n }\n\n /**\n * Listen to an event\n * @param {string} name\n * @param {function} callback\n */\n function listen (name, callback) {\n if (!showdown.helper.isString(name)) {\n throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');\n }\n\n if (typeof callback !== 'function') {\n throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');\n }\n\n if (!listeners.hasOwnProperty(name)) {\n listeners[name] = [];\n }\n listeners[name].push(callback);\n }\n\n function rTrimInputText (text) {\n var rsp = text.match(/^\\s*/)[0].length,\n rgx = new RegExp('^\\\\s{0,' + rsp + '}', 'gm');\n return text.replace(rgx, '');\n }\n\n /**\n * Dispatch an event\n * @private\n * @param {string} evtName Event name\n * @param {string} text Text\n * @param {{}} options Converter Options\n * @param {{}} globals\n * @returns {string}\n */\n this._dispatch = function dispatch (evtName, text, options, globals) {\n if (listeners.hasOwnProperty(evtName)) {\n for (var ei = 0; ei < listeners[evtName].length; ++ei) {\n var nText = listeners[evtName][ei](evtName, text, this, options, globals);\n if (nText && typeof nText !== 'undefined') {\n text = nText;\n }\n }\n }\n return text;\n };\n\n /**\n * Listen to an event\n * @param {string} name\n * @param {function} callback\n * @returns {showdown.Converter}\n */\n this.listen = function (name, callback) {\n listen(name, callback);\n return this;\n };\n\n /**\n * Converts a markdown string into HTML\n * @param {string} text\n * @returns {*}\n */\n this.makeHtml = function (text) {\n //check if text is not falsy\n if (!text) {\n return text;\n }\n\n var globals = {\n gHtmlBlocks: [],\n gHtmlMdBlocks: [],\n gHtmlSpans: [],\n gUrls: {},\n gTitles: {},\n gDimensions: {},\n gListLevel: 0,\n hashLinkCounts: {},\n langExtensions: langExtensions,\n outputModifiers: outputModifiers,\n converter: this,\n ghCodeBlocks: [],\n metadata: {\n parsed: {},\n raw: '',\n format: ''\n }\n };\n\n // This lets us use ¨ trema as an escape char to avoid md5 hashes\n // The choice of character is arbitrary; anything that isn't\n // magic in Markdown will work.\n text = text.replace(/¨/g, '¨T');\n\n // Replace $ with ¨D\n // RegExp interprets $ as a special character\n // when it's in a replacement string\n text = text.replace(/\\$/g, '¨D');\n\n // Standardize line endings\n text = text.replace(/\\r\\n/g, '\\n'); // DOS to Unix\n text = text.replace(/\\r/g, '\\n'); // Mac to Unix\n\n // Stardardize line spaces\n text = text.replace(/\\u00A0/g, ' ');\n\n if (options.smartIndentationFix) {\n text = rTrimInputText(text);\n }\n\n // Make sure text begins and ends with a couple of newlines:\n text = '\\n\\n' + text + '\\n\\n';\n\n // detab\n text = showdown.subParser('detab')(text, options, globals);\n\n /**\n * Strip any lines consisting only of spaces and tabs.\n * This makes subsequent regexs easier to write, because we can\n * match consecutive blank lines with /\\n+/ instead of something\n * contorted like /[ \\t]*\\n+/\n */\n text = text.replace(/^[ \\t]+$/mg, '');\n\n //run languageExtensions\n showdown.helper.forEach(langExtensions, function (ext) {\n text = showdown.subParser('runExtension')(ext, text, options, globals);\n });\n\n // run the sub parsers\n text = showdown.subParser('metadata')(text, options, globals);\n text = showdown.subParser('hashPreCodeTags')(text, options, globals);\n text = showdown.subParser('githubCodeBlocks')(text, options, globals);\n text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n text = showdown.subParser('hashCodeTags')(text, options, globals);\n text = showdown.subParser('stripLinkDefinitions')(text, options, globals);\n text = showdown.subParser('blockGamut')(text, options, globals);\n text = showdown.subParser('unhashHTMLSpans')(text, options, globals);\n text = showdown.subParser('unescapeSpecialChars')(text, options, globals);\n\n // attacklab: Restore dollar signs\n text = text.replace(/¨D/g, '$$');\n\n // attacklab: Restore tremas\n text = text.replace(/¨T/g, '¨');\n\n // render a complete html document instead of a partial if the option is enabled\n text = showdown.subParser('completeHTMLDocument')(text, options, globals);\n\n // Run output modifiers\n showdown.helper.forEach(outputModifiers, function (ext) {\n text = showdown.subParser('runExtension')(ext, text, options, globals);\n });\n\n // update metadata\n metadata = globals.metadata;\n return text;\n };\n\n /**\n * Converts an HTML string into a markdown string\n * @param src\n * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used.\n * @returns {string}\n */\n this.makeMarkdown = this.makeMd = function (src, HTMLParser) {\n\n // replace \\r\\n with \\n\n src = src.replace(/\\r\\n/g, '\\n');\n src = src.replace(/\\r/g, '\\n'); // old macs\n\n // due to an edge case, we need to find this: > <\n // to prevent removing of non silent white spaces\n // ex: this is sparta\n src = src.replace(/>[ \\t]+¨NBSP;<');\n\n if (!HTMLParser) {\n if (window && window.document) {\n HTMLParser = window.document;\n } else {\n throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM');\n }\n }\n\n var doc = HTMLParser.createElement('div');\n doc.innerHTML = src;\n\n var globals = {\n preList: substitutePreCodeTags(doc)\n };\n\n // remove all newlines and collapse spaces\n clean(doc);\n\n // some stuff, like accidental reference links must now be escaped\n // TODO\n // doc.innerHTML = doc.innerHTML.replace(/\\[[\\S\\t ]]/);\n\n var nodes = doc.childNodes,\n mdDoc = '';\n\n for (var i = 0; i < nodes.length; i++) {\n mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals);\n }\n\n function clean (node) {\n for (var n = 0; n < node.childNodes.length; ++n) {\n var child = node.childNodes[n];\n if (child.nodeType === 3) {\n if (!/\\S/.test(child.nodeValue) && !/^[ ]+$/.test(child.nodeValue)) {\n node.removeChild(child);\n --n;\n } else {\n child.nodeValue = child.nodeValue.split('\\n').join(' ');\n child.nodeValue = child.nodeValue.replace(/(\\s)+/g, '$1');\n }\n } else if (child.nodeType === 1) {\n clean(child);\n }\n }\n }\n\n // find all pre tags and replace contents with placeholder\n // we need this so that we can remove all indentation from html\n // to ease up parsing\n function substitutePreCodeTags (doc) {\n\n var pres = doc.querySelectorAll('pre'),\n presPH = [];\n\n for (var i = 0; i < pres.length; ++i) {\n\n if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') {\n var content = pres[i].firstChild.innerHTML.trim(),\n language = pres[i].firstChild.getAttribute('data-language') || '';\n\n // if data-language attribute is not defined, then we look for class language-*\n if (language === '') {\n var classes = pres[i].firstChild.className.split(' ');\n for (var c = 0; c < classes.length; ++c) {\n var matches = classes[c].match(/^language-(.+)$/);\n if (matches !== null) {\n language = matches[1];\n break;\n }\n }\n }\n\n // unescape html entities in content\n content = showdown.helper.unescapeHTMLEntities(content);\n\n presPH.push(content);\n pres[i].outerHTML = '';\n } else {\n presPH.push(pres[i].innerHTML);\n pres[i].innerHTML = '';\n pres[i].setAttribute('prenum', i.toString());\n }\n }\n return presPH;\n }\n\n return mdDoc;\n };\n\n /**\n * Set an option of this Converter instance\n * @param {string} key\n * @param {*} value\n */\n this.setOption = function (key, value) {\n options[key] = value;\n };\n\n /**\n * Get the option of this Converter instance\n * @param {string} key\n * @returns {*}\n */\n this.getOption = function (key) {\n return options[key];\n };\n\n /**\n * Get the options of this Converter instance\n * @returns {{}}\n */\n this.getOptions = function () {\n return options;\n };\n\n /**\n * Add extension to THIS converter\n * @param {{}} extension\n * @param {string} [name=null]\n */\n this.addExtension = function (extension, name) {\n name = name || null;\n _parseExtension(extension, name);\n };\n\n /**\n * Use a global registered extension with THIS converter\n * @param {string} extensionName Name of the previously registered extension\n */\n this.useExtension = function (extensionName) {\n _parseExtension(extensionName);\n };\n\n /**\n * Set the flavor THIS converter should use\n * @param {string} name\n */\n this.setFlavor = function (name) {\n if (!flavor.hasOwnProperty(name)) {\n throw Error(name + ' flavor was not found');\n }\n var preset = flavor[name];\n setConvFlavor = name;\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n options[option] = preset[option];\n }\n }\n };\n\n /**\n * Get the currently set flavor of this converter\n * @returns {string}\n */\n this.getFlavor = function () {\n return setConvFlavor;\n };\n\n /**\n * Remove an extension from THIS converter.\n * Note: This is a costly operation. It's better to initialize a new converter\n * and specify the extensions you wish to use\n * @param {Array} extension\n */\n this.removeExtension = function (extension) {\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n for (var a = 0; a < extension.length; ++a) {\n var ext = extension[a];\n for (var i = 0; i < langExtensions.length; ++i) {\n if (langExtensions[i] === ext) {\n langExtensions.splice(i, 1);\n }\n }\n for (var ii = 0; ii < outputModifiers.length; ++ii) {\n if (outputModifiers[ii] === ext) {\n outputModifiers.splice(ii, 1);\n }\n }\n }\n };\n\n /**\n * Get all extension of THIS converter\n * @returns {{language: Array, output: Array}}\n */\n this.getAllExtensions = function () {\n return {\n language: langExtensions,\n output: outputModifiers\n };\n };\n\n /**\n * Get the metadata of the previously parsed document\n * @param raw\n * @returns {string|{}}\n */\n this.getMetadata = function (raw) {\n if (raw) {\n return metadata.raw;\n } else {\n return metadata.parsed;\n }\n };\n\n /**\n * Get the metadata format of the previously parsed document\n * @returns {string}\n */\n this.getMetadataFormat = function () {\n return metadata.format;\n };\n\n /**\n * Private: set a single key, value metadata pair\n * @param {string} key\n * @param {string} value\n */\n this._setMetadataPair = function (key, value) {\n metadata.parsed[key] = value;\n };\n\n /**\n * Private: set metadata format\n * @param {string} format\n */\n this._setMetadataFormat = function (format) {\n metadata.format = format;\n };\n\n /**\n * Private: set metadata raw text\n * @param {string} raw\n */\n this._setMetadataRaw = function (raw) {\n metadata.raw = raw;\n };\n};\n\r\n/**\n * Turn Markdown link shortcuts into XHTML tags.\n */\nshowdown.subParser('anchors', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('anchors.before', text, options, globals);\n\n var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) {\n if (showdown.helper.isUndefined(title)) {\n title = '';\n }\n linkId = linkId.toLowerCase();\n\n // Special case for explicit empty url\n if (wholeMatch.search(/\\(? ?(['\"].*['\"])?\\)$/m) > -1) {\n url = '';\n } else if (!url) {\n if (!linkId) {\n // lower-case and turn embedded newlines into spaces\n linkId = linkText.toLowerCase().replace(/ ?\\n/g, ' ');\n }\n url = '#' + linkId;\n\n if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {\n url = globals.gUrls[linkId];\n if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {\n title = globals.gTitles[linkId];\n }\n } else {\n return wholeMatch;\n }\n }\n\n //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance\n url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n\n var result = '';\n\n return result;\n };\n\n // First, handle reference-style links: [link text] [id]\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)] ?(?:\\n *)?\\[(.*?)]()()()()/g, writeAnchorTag);\n\n // Next, inline-style links: [link text](url \"optional title\")\n // cases with crazy urls like ./image/cat1).png\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]?<([^>]*)>(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag);\n\n // normal cases\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]??(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag);\n\n // handle reference-style shortcuts: [link text]\n // These must come last in case you've also got [link test][1]\n // or [link test](/foo)\n text = text.replace(/\\[([^\\[\\]]+)]()()()()()/g, writeAnchorTag);\n\n // Lastly handle GithubMentions if option is enabled\n if (options.ghMentions) {\n text = text.replace(/(^|\\s)(\\\\)?(@([a-z\\d]+(?:[a-z\\d.-]+?[a-z\\d]+)*))/gmi, function (wm, st, escape, mentions, username) {\n if (escape === '\\\\') {\n return st + mentions;\n }\n\n //check if options.ghMentionsLink is a string\n if (!showdown.helper.isString(options.ghMentionsLink)) {\n throw new Error('ghMentionsLink option must be a string');\n }\n var lnk = options.ghMentionsLink.replace(/\\{u}/g, username),\n target = '';\n if (options.openLinksInNewWindow) {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return st + '' + mentions + '';\n });\n }\n\n text = globals.converter._dispatch('anchors.after', text, options, globals);\n return text;\n});\n\r\n// url allowed chars [a-z\\d_.~:/?#[]@!$&'()*+,;=-]\n\nvar simpleURLRegex = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+?\\.[^'\">\\s]+?)()(\\1)?(?=\\s|$)(?![\"<>])/gi,\n simpleURLRegex2 = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+\\.[^'\">\\s]+?)([.!?,()\\[\\]])?(\\1)?(?=\\s|$)(?![\"<>])/gi,\n delimUrlRegex = /()<(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+)()>()/gi,\n simpleMailRegex = /(^|\\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)(?=$|\\s)/gmi,\n delimMailRegex = /<()(?:mailto:)?([-.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)>/gi,\n\n replaceLink = function (options) {\n 'use strict';\n return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {\n link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n var lnkTxt = link,\n append = '',\n target = '',\n lmc = leadingMagicChars || '',\n tmc = trailingMagicChars || '';\n if (/^www\\./i.test(link)) {\n link = link.replace(/^www\\./i, 'http://www.');\n }\n if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {\n append = trailingPunctuation;\n }\n if (options.openLinksInNewWindow) {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return lmc + '' + lnkTxt + '' + append + tmc;\n };\n },\n\n replaceMail = function (options, globals) {\n 'use strict';\n return function (wholeMatch, b, mail) {\n var href = 'mailto:';\n b = b || '';\n mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);\n if (options.encodeEmails) {\n href = showdown.helper.encodeEmailAddress(href + mail);\n mail = showdown.helper.encodeEmailAddress(mail);\n } else {\n href = href + mail;\n }\n return b + '' + mail + '';\n };\n };\n\nshowdown.subParser('autoLinks', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('autoLinks.before', text, options, globals);\n\n text = text.replace(delimUrlRegex, replaceLink(options));\n text = text.replace(delimMailRegex, replaceMail(options, globals));\n\n text = globals.converter._dispatch('autoLinks.after', text, options, globals);\n\n return text;\n});\n\nshowdown.subParser('simplifiedAutoLinks', function (text, options, globals) {\n 'use strict';\n\n if (!options.simplifiedAutoLink) {\n return text;\n }\n\n text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals);\n\n if (options.excludeTrailingPunctuationFromURLs) {\n text = text.replace(simpleURLRegex2, replaceLink(options));\n } else {\n text = text.replace(simpleURLRegex, replaceLink(options));\n }\n text = text.replace(simpleMailRegex, replaceMail(options, globals));\n\n text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * These are all the transformations that form block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('blockGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('blockGamut.before', text, options, globals);\n\n // we parse blockquotes first so that we can have headings and hrs\n // inside blockquotes\n text = showdown.subParser('blockQuotes')(text, options, globals);\n text = showdown.subParser('headers')(text, options, globals);\n\n // Do Horizontal Rules:\n text = showdown.subParser('horizontalRule')(text, options, globals);\n\n text = showdown.subParser('lists')(text, options, globals);\n text = showdown.subParser('codeBlocks')(text, options, globals);\n text = showdown.subParser('tables')(text, options, globals);\n\n // We already ran _HashHTMLBlocks() before, in Markdown(), but that\n // was to escape raw HTML in the original Markdown source. This time,\n // we're escaping the markup we've just created, so that we don't wrap\n //

tags around block-level tags.\n text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n text = showdown.subParser('paragraphs')(text, options, globals);\n\n text = globals.converter._dispatch('blockGamut.after', text, options, globals);\n\n return text;\n});\n\r\nshowdown.subParser('blockQuotes', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('blockQuotes.before', text, options, globals);\n\n // add a couple extra lines after the text and endtext mark\n text = text + '\\n\\n';\n\n var rgx = /(^ {0,3}>[ \\t]?.+\\n(.+\\n)*\\n*)+/gm;\n\n if (options.splitAdjacentBlockquotes) {\n rgx = /^ {0,3}>[\\s\\S]*?(?:\\n\\n)/gm;\n }\n\n text = text.replace(rgx, function (bq) {\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n bq = bq.replace(/^[ \\t]*>[ \\t]?/gm, ''); // trim one level of quoting\n\n // attacklab: clean up hack\n bq = bq.replace(/¨0/g, '');\n\n bq = bq.replace(/^[ \\t]+$/gm, ''); // trim whitespace-only lines\n bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);\n bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse\n\n bq = bq.replace(/(^|\\n)/g, '$1 ');\n // These leading spaces screw with

 content, so we need to fix that:\n    bq = bq.replace(/(\\s*
[^\\r]+?<\\/pre>)/gm, function (wholeMatch, m1) {\n      var pre = m1;\n      // attacklab: hack around Konqueror 3.5.4 bug:\n      pre = pre.replace(/^  /mg, '¨0');\n      pre = pre.replace(/¨0/g, '');\n      return pre;\n    });\n\n    return showdown.subParser('hashBlock')('
\\n' + bq + '\\n
', options, globals);\n });\n\n text = globals.converter._dispatch('blockQuotes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Process Markdown `
` blocks.\n */\nshowdown.subParser('codeBlocks', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);\n\n  // sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n  text += '¨0';\n\n  var pattern = /(?:\\n\\n|^)((?:(?:[ ]{4}|\\t).*\\n+)+)(\\n*[ ]{0,3}[^ \\t\\n]|(?=¨0))/g;\n  text = text.replace(pattern, function (wholeMatch, m1, m2) {\n    var codeblock = m1,\n        nextChar = m2,\n        end = '\\n';\n\n    codeblock = showdown.subParser('outdent')(codeblock, options, globals);\n    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n    codeblock = showdown.subParser('detab')(codeblock, options, globals);\n    codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n    codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing newlines\n\n    if (options.omitExtraWLInCodeBlocks) {\n      end = '';\n    }\n\n    codeblock = '
' + codeblock + end + '
';\n\n return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;\n });\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n\n text = globals.converter._dispatch('codeBlocks.after', text, options, globals);\n return text;\n});\n\r\n/**\n *\n * * Backtick quotes are used for spans.\n *\n * * You can use multiple backticks as the delimiters if you want to\n * include literal backticks in the code span. So, this input:\n *\n * Just type ``foo `bar` baz`` at the prompt.\n *\n * Will translate to:\n *\n *

Just type foo `bar` baz at the prompt.

\n *\n * There's no arbitrary limit to the number of backticks you\n * can use as delimters. If you need three consecutive backticks\n * in your code, use four for delimiters, etc.\n *\n * * You can use spaces to get literal backticks at the edges:\n *\n * ... type `` `bar` `` ...\n *\n * Turns to:\n *\n * ... type `bar` ...\n */\nshowdown.subParser('codeSpans', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('codeSpans.before', text, options, globals);\n\n if (typeof (text) === 'undefined') {\n text = '';\n }\n text = text.replace(/(^|[^\\\\])(`+)([^\\r]*?[^`])\\2(?!`)/gm,\n function (wholeMatch, m1, m2, m3) {\n var c = m3;\n c = c.replace(/^([ \\t]*)/g, '');\t// leading whitespace\n c = c.replace(/[ \\t]*$/g, '');\t// trailing whitespace\n c = showdown.subParser('encodeCode')(c, options, globals);\n c = m1 + '' + c + '';\n c = showdown.subParser('hashHTMLSpans')(c, options, globals);\n return c;\n }\n );\n\n text = globals.converter._dispatch('codeSpans.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Create a full HTML document from the processed markdown\n */\nshowdown.subParser('completeHTMLDocument', function (text, options, globals) {\n 'use strict';\n\n if (!options.completeHTMLDocument) {\n return text;\n }\n\n text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals);\n\n var doctype = 'html',\n doctypeParsed = '\\n',\n title = '',\n charset = '\\n',\n lang = '',\n metadata = '';\n\n if (typeof globals.metadata.parsed.doctype !== 'undefined') {\n doctypeParsed = '\\n';\n doctype = globals.metadata.parsed.doctype.toString().toLowerCase();\n if (doctype === 'html' || doctype === 'html5') {\n charset = '';\n }\n }\n\n for (var meta in globals.metadata.parsed) {\n if (globals.metadata.parsed.hasOwnProperty(meta)) {\n switch (meta.toLowerCase()) {\n case 'doctype':\n break;\n\n case 'title':\n title = '' + globals.metadata.parsed.title + '\\n';\n break;\n\n case 'charset':\n if (doctype === 'html' || doctype === 'html5') {\n charset = '\\n';\n } else {\n charset = '\\n';\n }\n break;\n\n case 'language':\n case 'lang':\n lang = ' lang=\"' + globals.metadata.parsed[meta] + '\"';\n metadata += '\\n';\n break;\n\n default:\n metadata += '\\n';\n }\n }\n }\n\n text = doctypeParsed + '\\n\\n' + title + charset + metadata + '\\n\\n' + text.trim() + '\\n\\n';\n\n text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Convert all tabs to spaces\n */\nshowdown.subParser('detab', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('detab.before', text, options, globals);\n\n // expand first n-1 tabs\n text = text.replace(/\\t(?=\\t)/g, ' '); // g_tab_width\n\n // replace the nth with two sentinels\n text = text.replace(/\\t/g, '¨A¨B');\n\n // use the sentinel to anchor our regex so it doesn't explode\n text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {\n var leadingText = m1,\n numSpaces = 4 - leadingText.length % 4; // g_tab_width\n\n // there *must* be a better way to do this:\n for (var i = 0; i < numSpaces; i++) {\n leadingText += ' ';\n }\n\n return leadingText;\n });\n\n // clean up sentinels\n text = text.replace(/¨A/g, ' '); // g_tab_width\n text = text.replace(/¨B/g, '');\n\n text = globals.converter._dispatch('detab.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('ellipsis', function (text, options, globals) {\n 'use strict';\n\n if (!options.ellipsis) {\n return text;\n }\n\n text = globals.converter._dispatch('ellipsis.before', text, options, globals);\n\n text = text.replace(/\\.\\.\\./g, '…');\n\n text = globals.converter._dispatch('ellipsis.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Turn emoji codes into emojis\n *\n * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis\n */\nshowdown.subParser('emoji', function (text, options, globals) {\n 'use strict';\n\n if (!options.emoji) {\n return text;\n }\n\n text = globals.converter._dispatch('emoji.before', text, options, globals);\n\n var emojiRgx = /:([\\S]+?):/g;\n\n text = text.replace(emojiRgx, function (wm, emojiCode) {\n if (showdown.helper.emojis.hasOwnProperty(emojiCode)) {\n return showdown.helper.emojis[emojiCode];\n }\n return wm;\n });\n\n text = globals.converter._dispatch('emoji.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Smart processing for ampersands and angle brackets that need to be encoded.\n */\nshowdown.subParser('encodeAmpsAndAngles', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals);\n\n // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:\n // http://bumppo.net/projects/amputator/\n text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\\w+);)/g, '&');\n\n // Encode naked <'s\n text = text.replace(/<(?![a-z\\/?$!])/gi, '<');\n\n // Encode <\n text = text.replace(/\n text = text.replace(/>/g, '>');\n\n text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Returns the string, with after processing the following backslash escape sequences.\n *\n * attacklab: The polite way to do this is with the new escapeCharacters() function:\n *\n * text = escapeCharacters(text,\"\\\\\",true);\n * text = escapeCharacters(text,\"`*_{}[]()>#+-.!\",true);\n *\n * ...but we're sidestepping its use of the (slow) RegExp constructor\n * as an optimization for Firefox. This function gets called a LOT.\n */\nshowdown.subParser('encodeBackslashEscapes', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);\n\n text = text.replace(/\\\\(\\\\)/g, showdown.helper.escapeCharactersCallback);\n text = text.replace(/\\\\([`*_{}\\[\\]()>#+.!~=|:-])/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Encode/escape certain characters inside Markdown code runs.\n * The point is that in code, these characters are literals,\n * and lose their special Markdown meanings.\n */\nshowdown.subParser('encodeCode', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('encodeCode.before', text, options, globals);\n\n // Encode all ampersands; HTML entities are not\n // entities within a Markdown code span.\n text = text\n .replace(/&/g, '&')\n // Do the angle bracket song and dance:\n .replace(//g, '>')\n // Now, escape characters that are magic in Markdown:\n .replace(/([*_{}\\[\\]\\\\=~-])/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('encodeCode.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Within tags -- meaning between < and > -- encode [\\ ` * _ ~ =] so they\n * don't conflict with their use in Markdown for code, italics and strong.\n */\nshowdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals);\n\n // Build a regex to find HTML tags.\n var tags = /<\\/?[a-z\\d_:-]+(?:[\\s]+[\\s\\S]+?)?>/gi,\n comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;\n\n text = text.replace(tags, function (wholeMatch) {\n return wholeMatch\n .replace(/(.)<\\/?code>(?=.)/g, '$1`')\n .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n });\n\n text = text.replace(comments, function (wholeMatch) {\n return wholeMatch\n .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n });\n\n text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Handle github codeblocks prior to running HashHTML so that\n * HTML contained within the codeblock gets escaped properly\n * Example:\n * ```ruby\n * def hello_world(x)\n * puts \"Hello, #{x}\"\n * end\n * ```\n */\nshowdown.subParser('githubCodeBlocks', function (text, options, globals) {\n 'use strict';\n\n // early exit if option is not enabled\n if (!options.ghCodeBlocks) {\n return text;\n }\n\n text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);\n\n text += '¨0';\n\n text = text.replace(/(?:^|\\n)(?: {0,3})(```+|~~~+)(?: *)([^\\s`~]*)\\n([\\s\\S]*?)\\n(?: {0,3})\\1/g, function (wholeMatch, delim, language, codeblock) {\n var end = (options.omitExtraWLInCodeBlocks) ? '' : '\\n';\n\n // First parse the github code block\n codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n codeblock = showdown.subParser('detab')(codeblock, options, globals);\n codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing whitespace\n\n codeblock = '
' + codeblock + end + '
';\n\n codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);\n\n // Since GHCodeblocks can be false positives, we need to\n // store the primitive text and the parsed text in a global var,\n // and then return a token\n return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n });\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);\n});\n\r\nshowdown.subParser('hashBlock', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashBlock.before', text, options, globals);\n text = text.replace(/(^\\n+|\\n+$)/g, '');\n text = '\\n\\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\\n\\n';\n text = globals.converter._dispatch('hashBlock.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash and escape elements that should not be parsed as markdown\n */\nshowdown.subParser('hashCodeTags', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashCodeTags.before', text, options, globals);\n\n var repFunc = function (wholeMatch, match, left, right) {\n var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C';\n };\n\n // Hash naked \n text = showdown.helper.replaceRecursiveRegExp(text, repFunc, ']*>', '', 'gim');\n\n text = globals.converter._dispatch('hashCodeTags.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('hashElement', function (text, options, globals) {\n 'use strict';\n\n return function (wholeMatch, m1) {\n var blockText = m1;\n\n // Undo double lines\n blockText = blockText.replace(/\\n\\n/g, '\\n');\n blockText = blockText.replace(/^\\n/, '');\n\n // strip trailing blank lines\n blockText = blockText.replace(/\\n+$/g, '');\n\n // Replace the element text with a marker (\"¨KxK\" where x is its key)\n blockText = '\\n\\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\\n\\n';\n\n return blockText;\n };\n});\n\r\nshowdown.subParser('hashHTMLBlocks', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals);\n\n var blockTags = [\n 'pre',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'blockquote',\n 'table',\n 'dl',\n 'ol',\n 'ul',\n 'script',\n 'noscript',\n 'form',\n 'fieldset',\n 'iframe',\n 'math',\n 'style',\n 'section',\n 'header',\n 'footer',\n 'nav',\n 'article',\n 'aside',\n 'address',\n 'audio',\n 'canvas',\n 'figure',\n 'hgroup',\n 'output',\n 'video',\n 'p'\n ],\n repFunc = function (wholeMatch, match, left, right) {\n var txt = wholeMatch;\n // check if this html element is marked as markdown\n // if so, it's contents should be parsed as markdown\n if (left.search(/\\bmarkdown\\b/) !== -1) {\n txt = left + globals.converter.makeHtml(match) + right;\n }\n return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n };\n\n if (options.backslashEscapesHTMLTags) {\n // encode backslash escaped HTML tags\n text = text.replace(/\\\\<(\\/?[^>]+?)>/g, function (wm, inside) {\n return '<' + inside + '>';\n });\n }\n\n // hash HTML Blocks\n for (var i = 0; i < blockTags.length; ++i) {\n\n var opTagPos,\n rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\\\b[^>]*>)', 'im'),\n patLeft = '<' + blockTags[i] + '\\\\b[^>]*>',\n patRight = '';\n // 1. Look for the first position of the first opening HTML tag in the text\n while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) {\n\n // if the HTML tag is \\ escaped, we need to escape it and break\n\n\n //2. Split the text in that position\n var subTexts = showdown.helper.splitAtIndex(text, opTagPos),\n //3. Match recursively\n newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');\n\n // prevent an infinite loop\n if (newSubText1 === subTexts[1]) {\n break;\n }\n text = subTexts[0].concat(newSubText1);\n }\n }\n // HR SPECIAL CASE\n text = text.replace(/(\\n {0,3}(<(hr)\\b([^<>])*?\\/?>)[ \\t]*(?=\\n{2,}))/g,\n showdown.subParser('hashElement')(text, options, globals));\n\n // Special case for standalone HTML comments\n text = showdown.helper.replaceRecursiveRegExp(text, function (txt) {\n return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n }, '^ {0,3}', 'gm');\n\n // PHP and ASP-style processor instructions ( and <%...%>)\n text = text.replace(/(?:\\n\\n)( {0,3}(?:<([?%])[^\\r]*?\\2>)[ \\t]*(?=\\n{2,}))/g,\n showdown.subParser('hashElement')(text, options, globals));\n\n text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash span elements that should not be parsed as markdown\n */\nshowdown.subParser('hashHTMLSpans', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals);\n\n function hashHTMLSpan (html) {\n return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';\n }\n\n // Hash Self Closing tags\n text = text.replace(/<[^>]+?\\/>/gi, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash tags without properties\n text = text.replace(/<([^>]+?)>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash tags with properties\n text = text.replace(/<([^>]+?)\\s[^>]+?>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash self closing tags without />\n text = text.replace(/<[^>]+?>/gi, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n /*showdown.helper.matchRecursiveRegExp(text, ']*>', '', 'gi');*/\n\n text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals);\n return text;\n});\n\n/**\n * Unhash HTML spans\n */\nshowdown.subParser('unhashHTMLSpans', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals);\n\n for (var i = 0; i < globals.gHtmlSpans.length; ++i) {\n var repText = globals.gHtmlSpans[i],\n // limiter to prevent infinite loop (assume 10 as limit for recurse)\n limit = 0;\n\n while (/¨C(\\d+)C/.test(repText)) {\n var num = RegExp.$1;\n repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]);\n if (limit === 10) {\n console.error('maximum nesting of 10 spans reached!!!');\n break;\n }\n ++limit;\n }\n text = text.replace('¨C' + i + 'C', repText);\n }\n\n text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash and escape
 elements that should not be parsed as markdown\n */\nshowdown.subParser('hashPreCodeTags', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);\n\n  var repFunc = function (wholeMatch, match, left, right) {\n    // encode html entities\n    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n    return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n  };\n\n  // Hash 
\n  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}]*>\\\\s*]*>', '^ {0,3}\\\\s*
', 'gim');\n\n text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('headers', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('headers.before', text, options, globals);\n\n var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),\n\n // Set text-style headers:\n //\tHeader 1\n //\t========\n //\n //\tHeader 2\n //\t--------\n //\n setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n={2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n=+[ \\t]*\\n+/gm,\n setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n-{2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n-+[ \\t]*\\n+/gm;\n\n text = text.replace(setextRegexH1, function (wholeMatch, m1) {\n\n var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n hLevel = headerLevelStart,\n hashBlock = '' + spanGamut + '';\n return showdown.subParser('hashBlock')(hashBlock, options, globals);\n });\n\n text = text.replace(setextRegexH2, function (matchFound, m1) {\n var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n hLevel = headerLevelStart + 1,\n hashBlock = '' + spanGamut + '';\n return showdown.subParser('hashBlock')(hashBlock, options, globals);\n });\n\n // atx-style headers:\n // # Header 1\n // ## Header 2\n // ## Header 2 with closing hashes ##\n // ...\n // ###### Header 6\n //\n var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \\t]+(.+?)[ \\t]*#*\\n+/gm : /^(#{1,6})[ \\t]*(.+?)[ \\t]*#*\\n+/gm;\n\n text = text.replace(atxStyle, function (wholeMatch, m1, m2) {\n var hText = m2;\n if (options.customizedHeaderId) {\n hText = m2.replace(/\\s?\\{([^{]+?)}\\s*$/, '');\n }\n\n var span = showdown.subParser('spanGamut')(hText, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m2) + '\"',\n hLevel = headerLevelStart - 1 + m1.length,\n header = '' + span + '';\n\n return showdown.subParser('hashBlock')(header, options, globals);\n });\n\n function headerId (m) {\n var title,\n prefix;\n\n // It is separate from other options to allow combining prefix and customized\n if (options.customizedHeaderId) {\n var match = m.match(/\\{([^{]+?)}\\s*$/);\n if (match && match[1]) {\n m = match[1];\n }\n }\n\n title = m;\n\n // Prefix id to prevent causing inadvertent pre-existing style matches.\n if (showdown.helper.isString(options.prefixHeaderId)) {\n prefix = options.prefixHeaderId;\n } else if (options.prefixHeaderId === true) {\n prefix = 'section-';\n } else {\n prefix = '';\n }\n\n if (!options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n\n if (options.ghCompatibleHeaderId) {\n title = title\n .replace(/ /g, '-')\n // replace previously escaped chars (&, ¨ and $)\n .replace(/&/g, '')\n .replace(/¨T/g, '')\n .replace(/¨D/g, '')\n // replace rest of the chars (&~$ are repeated as they might have been escaped)\n // borrowed from github's redcarpet (some they should produce similar results)\n .replace(/[&+$,\\/:;=?@\"#{}|^¨~\\[\\]`\\\\*)(%.!'<>]/g, '')\n .toLowerCase();\n } else if (options.rawHeaderId) {\n title = title\n .replace(/ /g, '-')\n // replace previously escaped chars (&, ¨ and $)\n .replace(/&/g, '&')\n .replace(/¨T/g, '¨')\n .replace(/¨D/g, '$')\n // replace \" and '\n .replace(/[\"']/g, '-')\n .toLowerCase();\n } else {\n title = title\n .replace(/[^\\w]/g, '')\n .toLowerCase();\n }\n\n if (options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n\n if (globals.hashLinkCounts[title]) {\n title = title + '-' + (globals.hashLinkCounts[title]++);\n } else {\n globals.hashLinkCounts[title] = 1;\n }\n return title;\n }\n\n text = globals.converter._dispatch('headers.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Turn Markdown link shortcuts into XHTML tags.\n */\nshowdown.subParser('horizontalRule', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('horizontalRule.before', text, options, globals);\n\n var key = showdown.subParser('hashBlock')('
', options, globals);\n text = text.replace(/^ {0,2}( ?-){3,}[ \\t]*$/gm, key);\n text = text.replace(/^ {0,2}( ?\\*){3,}[ \\t]*$/gm, key);\n text = text.replace(/^ {0,2}( ?_){3,}[ \\t]*$/gm, key);\n\n text = globals.converter._dispatch('horizontalRule.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Turn Markdown image shortcuts into tags.\n */\nshowdown.subParser('images', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('images.before', text, options, globals);\n\n var inlineRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]??(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n crazyRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]?<([^>]*)>(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:(?:([\"'])([^\"]*?)\\6))?[ \\t]?\\)/g,\n base64RegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]??(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n referenceRegExp = /!\\[([^\\]]*?)] ?(?:\\n *)?\\[([\\s\\S]*?)]()()()()()/g,\n refShortcutRegExp = /!\\[([^\\[\\]]+)]()()()()()/g;\n\n function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) {\n url = url.replace(/\\s/g, '');\n return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title);\n }\n\n function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {\n\n var gUrls = globals.gUrls,\n gTitles = globals.gTitles,\n gDims = globals.gDimensions;\n\n linkId = linkId.toLowerCase();\n\n if (!title) {\n title = '';\n }\n // Special case for explicit empty url\n if (wholeMatch.search(/\\(? ?(['\"].*['\"])?\\)$/m) > -1) {\n url = '';\n\n } else if (url === '' || url === null) {\n if (linkId === '' || linkId === null) {\n // lower-case and turn embedded newlines into spaces\n linkId = altText.toLowerCase().replace(/ ?\\n/g, ' ');\n }\n url = '#' + linkId;\n\n if (!showdown.helper.isUndefined(gUrls[linkId])) {\n url = gUrls[linkId];\n if (!showdown.helper.isUndefined(gTitles[linkId])) {\n title = gTitles[linkId];\n }\n if (!showdown.helper.isUndefined(gDims[linkId])) {\n width = gDims[linkId].width;\n height = gDims[linkId].height;\n }\n } else {\n return wholeMatch;\n }\n }\n\n altText = altText\n .replace(/\"/g, '"')\n //altText = showdown.helper.escapeCharacters(altText, '*_', false);\n .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n //url = showdown.helper.escapeCharacters(url, '*_', false);\n url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n var result = '\"'x \"optional title\")\n\n // base64 encoded images\n text = text.replace(base64RegExp, writeImageTagBase64);\n\n // cases with crazy urls like ./image/cat1).png\n text = text.replace(crazyRegExp, writeImageTag);\n\n // normal cases\n text = text.replace(inlineRegExp, writeImageTag);\n\n // handle reference-style shortcuts: ![img text]\n text = text.replace(refShortcutRegExp, writeImageTag);\n\n text = globals.converter._dispatch('images.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('italicsAndBold', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);\n\n // it's faster to have 3 separate regexes for each case than have just one\n // because of backtracing, in some cases, it could lead to an exponential effect\n // called \"catastrophic backtrace\". Ominous!\n\n function parseInside (txt, left, right) {\n /*\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n */\n return left + txt + right;\n }\n\n // Parse underscores\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n text = text.replace(/\\b_(\\S[\\s\\S]*?)_\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/_([^\\s_][\\s\\S]*?)_/g, function (wm, m) {\n // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it)\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n }\n\n // Now parse asterisks\n if (options.literalMidWordAsterisks) {\n text = text.replace(/([^*]|^)\\B\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n text = text.replace(/([^*]|^)\\B\\*\\*(\\S[\\s\\S]*?)\\*\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n text = text.replace(/([^*]|^)\\B\\*(\\S[\\s\\S]*?)\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n } else {\n text = text.replace(/\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/\\*\\*(\\S[\\s\\S]*?)\\*\\*/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/\\*([^\\s*][\\s\\S]*?)\\*/g, function (wm, m) {\n // !/^\\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it)\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n }\n\n\n text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Form HTML ordered (numbered) and unordered (bulleted) lists.\n */\nshowdown.subParser('lists', function (text, options, globals) {\n 'use strict';\n\n /**\n * Process the contents of a single ordered or unordered list, splitting it\n * into individual list items.\n * @param {string} listStr\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function processListItems (listStr, trimTrailing) {\n // The $g_list_level global keeps track of when we're inside a list.\n // Each time we enter a list, we increment it; when we leave a list,\n // we decrement. If it's zero, we're not in a list anymore.\n //\n // We do this because when we're not inside a list, we want to treat\n // something like this:\n //\n // I recommend upgrading to version\n // 8. Oops, now this line is treated\n // as a sub-list.\n //\n // As a single paragraph, despite the fact that the second line starts\n // with a digit-period-space sequence.\n //\n // Whereas when we're inside a list (or sub-list), that line will be\n // treated as the start of a sub-list. What a kludge, huh? This is\n // an aspect of Markdown's syntax that's hard to parse perfectly\n // without resorting to mind-reading. Perhaps the solution is to\n // change the syntax rules such that sub-lists must start with a\n // starting cardinal number; e.g. \"1.\" or \"a.\".\n globals.gListLevel++;\n\n // trim trailing blank lines:\n listStr = listStr.replace(/\\n{2,}$/, '\\n');\n\n // attacklab: add sentinel to emulate \\z\n listStr += '¨0';\n\n var rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0| {0,3}([*+-]|\\d+[.])[ \\t]+))/gm,\n isParagraphed = (/\\n[ \\t]*\\n(?!¨0)/.test(listStr));\n\n // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation,\n // which is a syntax breaking change\n // activating this option reverts to old behavior\n if (options.disableForced4SpacesIndentedSublists) {\n rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0|\\2([*+-]|\\d+[.])[ \\t]+))/gm;\n }\n\n listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {\n checked = (checked && checked.trim() !== '');\n\n var item = showdown.subParser('outdent')(m4, options, globals),\n bulletStyle = '';\n\n // Support for github tasklists\n if (taskbtn && options.tasklists) {\n bulletStyle = ' class=\"task-list-item\" style=\"list-style-type: none;\"';\n item = item.replace(/^[ \\t]*\\[(x|X| )?]/m, function () {\n var otp = '
  • a
  • \n // instead of:\n //
    • - - a
    \n // So, to prevent it, we will put a marker (¨A)in the beginning of the line\n // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser\n item = item.replace(/^([-*+]|\\d\\.)[ \\t]+[\\S\\n ]*/g, function (wm2) {\n return '¨A' + wm2;\n });\n\n // m1 - Leading line or\n // Has a double return (multi paragraph) or\n // Has sublist\n if (m1 || (item.search(/\\n{2,}/) > -1)) {\n item = showdown.subParser('githubCodeBlocks')(item, options, globals);\n item = showdown.subParser('blockGamut')(item, options, globals);\n } else {\n // Recursion for sub-lists:\n item = showdown.subParser('lists')(item, options, globals);\n item = item.replace(/\\n$/, ''); // chomp(item)\n item = showdown.subParser('hashHTMLBlocks')(item, options, globals);\n\n // Colapse double linebreaks\n item = item.replace(/\\n\\n+/g, '\\n\\n');\n if (isParagraphed) {\n item = showdown.subParser('paragraphs')(item, options, globals);\n } else {\n item = showdown.subParser('spanGamut')(item, options, globals);\n }\n }\n\n // now we need to remove the marker (¨A)\n item = item.replace('¨A', '');\n // we can finally wrap the line in list item tags\n item = '' + item + '\\n';\n\n return item;\n });\n\n // attacklab: strip sentinel\n listStr = listStr.replace(/¨0/g, '');\n\n globals.gListLevel--;\n\n if (trimTrailing) {\n listStr = listStr.replace(/\\s+$/, '');\n }\n\n return listStr;\n }\n\n function styleStartNumber (list, listType) {\n // check if ol and starts by a number different than 1\n if (listType === 'ol') {\n var res = list.match(/^ *(\\d+)\\./);\n if (res && res[1] !== '1') {\n return ' start=\"' + res[1] + '\"';\n }\n }\n return '';\n }\n\n /**\n * Check and parse consecutive lists (better fix for issue #142)\n * @param {string} list\n * @param {string} listType\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function parseConsecutiveLists (list, listType, trimTrailing) {\n // check if we caught 2 or more consecutive lists by mistake\n // we use the counterRgx, meaning if listType is UL we look for OL and vice versa\n var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\\d+\\.[ \\t]/gm : /^ {0,3}\\d+\\.[ \\t]/gm,\n ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \\t]/gm : /^ {0,3}[*+-][ \\t]/gm,\n counterRxg = (listType === 'ul') ? olRgx : ulRgx,\n result = '';\n\n if (list.search(counterRxg) !== -1) {\n (function parseCL (txt) {\n var pos = txt.search(counterRxg),\n style = styleStartNumber(list, listType);\n if (pos !== -1) {\n // slice\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '\\n';\n\n // invert counterType and listType\n listType = (listType === 'ul') ? 'ol' : 'ul';\n counterRxg = (listType === 'ul') ? olRgx : ulRgx;\n\n //recurse\n parseCL(txt.slice(pos));\n } else {\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt, !!trimTrailing) + '\\n';\n }\n })(list);\n } else {\n var style = styleStartNumber(list, listType);\n result = '\\n\\n<' + listType + style + '>\\n' + processListItems(list, !!trimTrailing) + '\\n';\n }\n\n return result;\n }\n\n /** Start of list parsing **/\n text = globals.converter._dispatch('lists.before', text, options, globals);\n // add sentinel to hack around khtml/safari bug:\n // http://bugs.webkit.org/show_bug.cgi?id=11231\n text += '¨0';\n\n if (globals.gListLevel) {\n text = text.replace(/^(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, list, m2) {\n var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, true);\n }\n );\n } else {\n text = text.replace(/(\\n\\n|^\\n?)(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, m1, list, m3) {\n var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, false);\n }\n );\n }\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n text = globals.converter._dispatch('lists.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Parse metadata at the top of the document\n */\nshowdown.subParser('metadata', function (text, options, globals) {\n 'use strict';\n\n if (!options.metadata) {\n return text;\n }\n\n text = globals.converter._dispatch('metadata.before', text, options, globals);\n\n function parseMetadataContents (content) {\n // raw is raw so it's not changed in any way\n globals.metadata.raw = content;\n\n // escape chars forbidden in html attributes\n // double quotes\n content = content\n // ampersand first\n .replace(/&/g, '&')\n // double quotes\n .replace(/\"/g, '"');\n\n content = content.replace(/\\n {4}/g, ' ');\n content.replace(/^([\\S ]+): +([\\s\\S]+?)$/gm, function (wm, key, value) {\n globals.metadata.parsed[key] = value;\n return '';\n });\n }\n\n text = text.replace(/^\\s*«««+(\\S*?)\\n([\\s\\S]+?)\\n»»»+\\n/, function (wholematch, format, content) {\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/^\\s*---+(\\S*?)\\n([\\s\\S]+?)\\n---+\\n/, function (wholematch, format, content) {\n if (format) {\n globals.metadata.format = format;\n }\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/¨M/g, '');\n\n text = globals.converter._dispatch('metadata.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Remove one level of line-leading tabs or spaces\n */\nshowdown.subParser('outdent', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('outdent.before', text, options, globals);\n\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n text = text.replace(/^(\\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width\n\n // attacklab: clean up hack\n text = text.replace(/¨0/g, '');\n\n text = globals.converter._dispatch('outdent.after', text, options, globals);\n return text;\n});\n\r\n/**\n *\n */\nshowdown.subParser('paragraphs', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('paragraphs.before', text, options, globals);\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n\n var grafs = text.split(/\\n{2,}/g),\n grafsOut = [],\n end = grafs.length; // Wrap

    tags\n\n for (var i = 0; i < end; i++) {\n var str = grafs[i];\n // if this is an HTML marker, copy it\n if (str.search(/¨(K|G)(\\d+)\\1/g) >= 0) {\n grafsOut.push(str);\n\n // test for presence of characters to prevent empty lines being parsed\n // as paragraphs (resulting in undesired extra empty paragraphs)\n } else if (str.search(/\\S/) >= 0) {\n str = showdown.subParser('spanGamut')(str, options, globals);\n str = str.replace(/^([ \\t]*)/g, '

    ');\n str += '

    ';\n grafsOut.push(str);\n }\n }\n\n /** Unhashify HTML blocks */\n end = grafsOut.length;\n for (i = 0; i < end; i++) {\n var blockText = '',\n grafsOutIt = grafsOut[i],\n codeFlag = false;\n // if this is a marker for an html block...\n // use RegExp.test instead of string.search because of QML bug\n while (/¨(K|G)(\\d+)\\1/.test(grafsOutIt)) {\n var delim = RegExp.$1,\n num = RegExp.$2;\n\n if (delim === 'K') {\n blockText = globals.gHtmlBlocks[num];\n } else {\n // we need to check if ghBlock is a false positive\n if (codeFlag) {\n // use encoded version of all text\n blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);\n } else {\n blockText = globals.ghCodeBlocks[num].codeblock;\n }\n }\n blockText = blockText.replace(/\\$/g, '$$$$'); // Escape any dollar signs\n\n grafsOutIt = grafsOutIt.replace(/(\\n\\n)?¨(K|G)\\d+\\2(\\n\\n)?/, blockText);\n // Check if grafsOutIt is a pre->code\n if (/^]*>\\s*]*>/.test(grafsOutIt)) {\n codeFlag = true;\n }\n }\n grafsOut[i] = grafsOutIt;\n }\n text = grafsOut.join('\\n');\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n return globals.converter._dispatch('paragraphs.after', text, options, globals);\n});\n\r\n/**\n * Run extension\n */\nshowdown.subParser('runExtension', function (ext, text, options, globals) {\n 'use strict';\n\n if (ext.filter) {\n text = ext.filter(text, globals.converter, options);\n\n } else if (ext.regex) {\n // TODO remove this when old extension loading mechanism is deprecated\n var re = ext.regex;\n if (!(re instanceof RegExp)) {\n re = new RegExp(re, 'g');\n }\n text = text.replace(re, ext.replace);\n }\n\n return text;\n});\n\r\n/**\n * These are all the transformations that occur *within* block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('spanGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('spanGamut.before', text, options, globals);\n text = showdown.subParser('codeSpans')(text, options, globals);\n text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);\n text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);\n\n // Process anchor and image tags. Images must come first,\n // because ![foo][f] looks like an anchor.\n text = showdown.subParser('images')(text, options, globals);\n text = showdown.subParser('anchors')(text, options, globals);\n\n // Make links out of things like ``\n // Must come after anchors, because you can use < and >\n // delimiters in inline links like [this]().\n text = showdown.subParser('autoLinks')(text, options, globals);\n text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);\n text = showdown.subParser('emoji')(text, options, globals);\n text = showdown.subParser('underline')(text, options, globals);\n text = showdown.subParser('italicsAndBold')(text, options, globals);\n text = showdown.subParser('strikethrough')(text, options, globals);\n text = showdown.subParser('ellipsis')(text, options, globals);\n\n // we need to hash HTML tags inside spans\n text = showdown.subParser('hashHTMLSpans')(text, options, globals);\n\n // now we encode amps and angles\n text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);\n\n // Do hard breaks\n if (options.simpleLineBreaks) {\n // GFM style hard breaks\n // only add line breaks if the text does not contain a block (special case for lists)\n if (!/\\n\\n¨K/.test(text)) {\n text = text.replace(/\\n+/g, '
    \\n');\n }\n } else {\n // Vanilla hard breaks\n text = text.replace(/ +\\n/g, '
    \\n');\n }\n\n text = globals.converter._dispatch('spanGamut.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('strikethrough', function (text, options, globals) {\n 'use strict';\n\n function parseInside (txt) {\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n return '' + txt + '';\n }\n\n if (options.strikethrough) {\n text = globals.converter._dispatch('strikethrough.before', text, options, globals);\n text = text.replace(/(?:~){2}([\\s\\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });\n text = globals.converter._dispatch('strikethrough.after', text, options, globals);\n }\n\n return text;\n});\n\r\n/**\n * Strips link definitions from text, stores the URLs and titles in\n * hash references.\n * Link defs are in the form: ^[id]: url \"optional title\"\n */\nshowdown.subParser('stripLinkDefinitions', function (text, options, globals) {\n 'use strict';\n\n var regex = /^ {0,3}\\[([^\\]]+)]:[ \\t]*\\n?[ \\t]*\\s]+)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n+|(?=¨0))/gm,\n base64Regex = /^ {0,3}\\[([^\\]]+)]:[ \\t]*\\n?[ \\t]*?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n\\n|(?=¨0)|(?=\\n\\[))/gm;\n\n // attacklab: sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n text += '¨0';\n\n var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {\n\n // if there aren't two instances of linkId it must not be a reference link so back out\n linkId = linkId.toLowerCase();\n if (text.toLowerCase().split(linkId).length - 1 < 2) {\n return wholeMatch;\n }\n if (url.match(/^data:.+?\\/.+?;base64,/)) {\n // remove newlines\n globals.gUrls[linkId] = url.replace(/\\s/g, '');\n } else {\n globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive\n }\n\n if (blankLines) {\n // Oops, found blank lines, so it's not a title.\n // Put back the parenthetical statement we stole.\n return blankLines + title;\n\n } else {\n if (title) {\n globals.gTitles[linkId] = title.replace(/\"|'/g, '"');\n }\n if (options.parseImgDimensions && width && height) {\n globals.gDimensions[linkId] = {\n width: width,\n height: height\n };\n }\n }\n // Completely remove the definition from the text\n return '';\n };\n\n // first we try to find base64 link references\n text = text.replace(base64Regex, replaceFunc);\n\n text = text.replace(regex, replaceFunc);\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return text;\n});\n\r\nshowdown.subParser('tables', function (text, options, globals) {\n 'use strict';\n\n if (!options.tables) {\n return text;\n }\n\n var tableRgx = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n //singeColTblRgx = /^ {0,3}\\|.+\\|\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n(?: {0,3}\\|.+\\|\\n)+(?:\\n\\n|¨0)/gm;\n singeColTblRgx = /^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm;\n\n function parseStyles (sLine) {\n if (/^:[ \\t]*--*$/.test(sLine)) {\n return ' style=\"text-align:left;\"';\n } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine)) {\n return ' style=\"text-align:right;\"';\n } else if (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n return ' style=\"text-align:center;\"';\n } else {\n return '';\n }\n }\n\n function parseHeaders (header, style) {\n var id = '';\n header = header.trim();\n // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility\n if (options.tablesHeaderId || options.tableHeaderId) {\n id = ' id=\"' + header.replace(/ /g, '_').toLowerCase() + '\"';\n }\n header = showdown.subParser('spanGamut')(header, options, globals);\n\n return '' + header + '\\n';\n }\n\n function parseCells (cell, style) {\n var subText = showdown.subParser('spanGamut')(cell, options, globals);\n return '' + subText + '\\n';\n }\n\n function buildTable (headers, cells) {\n var tb = '\\n\\n\\n',\n tblLgn = headers.length;\n\n for (var i = 0; i < tblLgn; ++i) {\n tb += headers[i];\n }\n tb += '\\n\\n\\n';\n\n for (i = 0; i < cells.length; ++i) {\n tb += '\\n';\n for (var ii = 0; ii < tblLgn; ++ii) {\n tb += cells[i][ii];\n }\n tb += '\\n';\n }\n tb += '\\n
    \\n';\n return tb;\n }\n\n function parseTable (rawTable) {\n var i, tableLines = rawTable.split('\\n');\n\n for (i = 0; i < tableLines.length; ++i) {\n // strip wrong first and last column if wrapped tables are used\n if (/^ {0,3}\\|/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/^ {0,3}\\|/, '');\n }\n if (/\\|[ \\t]*$/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/\\|[ \\t]*$/, '');\n }\n // parse code spans first, but we only support one line code spans\n tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);\n }\n\n var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),\n rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),\n rawCells = [],\n headers = [],\n styles = [],\n cells = [];\n\n tableLines.shift();\n tableLines.shift();\n\n for (i = 0; i < tableLines.length; ++i) {\n if (tableLines[i].trim() === '') {\n continue;\n }\n rawCells.push(\n tableLines[i]\n .split('|')\n .map(function (s) {\n return s.trim();\n })\n );\n }\n\n if (rawHeaders.length < rawStyles.length) {\n return rawTable;\n }\n\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n\n for (i = 0; i < rawHeaders.length; ++i) {\n if (showdown.helper.isUndefined(styles[i])) {\n styles[i] = '';\n }\n headers.push(parseHeaders(rawHeaders[i], styles[i]));\n }\n\n for (i = 0; i < rawCells.length; ++i) {\n var row = [];\n for (var ii = 0; ii < headers.length; ++ii) {\n if (showdown.helper.isUndefined(rawCells[i][ii])) {\n\n }\n row.push(parseCells(rawCells[i][ii], styles[ii]));\n }\n cells.push(row);\n }\n\n return buildTable(headers, cells);\n }\n\n text = globals.converter._dispatch('tables.before', text, options, globals);\n\n // find escaped pipe characters\n text = text.replace(/\\\\(\\|)/g, showdown.helper.escapeCharactersCallback);\n\n // parse multi column tables\n text = text.replace(tableRgx, parseTable);\n\n // parse one column tables\n text = text.replace(singeColTblRgx, parseTable);\n\n text = globals.converter._dispatch('tables.after', text, options, globals);\n\n return text;\n});\n\r\nshowdown.subParser('underline', function (text, options, globals) {\n 'use strict';\n\n if (!options.underline) {\n return text;\n }\n\n text = globals.converter._dispatch('underline.before', text, options, globals);\n\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n }\n\n // escape remaining underscores to prevent them being parsed by italic and bold\n text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('underline.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Swap back in all the special characters we've hidden.\n */\nshowdown.subParser('unescapeSpecialChars', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);\n\n text = text.replace(/¨E(\\d+)E/g, function (wholeMatch, m1) {\n var charCodeToReplace = parseInt(m1);\n return String.fromCharCode(charCodeToReplace);\n });\n\n text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('makeMarkdown.blockquote', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals);\n\n if (innerTxt === '') {\n continue;\n }\n txt += innerTxt;\n }\n }\n // cleanup\n txt = txt.trim();\n txt = '> ' + txt.split('\\n').join('\\n> ');\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.codeBlock', function (node, globals) {\n 'use strict';\n\n var lang = node.getAttribute('language'),\n num = node.getAttribute('precodenum');\n return '```' + lang + '\\n' + globals.preList[num] + '\\n```';\n});\n\r\nshowdown.subParser('makeMarkdown.codeSpan', function (node) {\n 'use strict';\n\n return '`' + node.innerHTML + '`';\n});\n\r\nshowdown.subParser('makeMarkdown.emphasis', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '*';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '*';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) {\n 'use strict';\n\n var headerMark = new Array(headerLevel + 1).join('#'),\n txt = '';\n\n if (node.hasChildNodes()) {\n txt = headerMark + ' ';\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.hr', function () {\n 'use strict';\n\n return '---';\n});\n\r\nshowdown.subParser('makeMarkdown.image', function (node) {\n 'use strict';\n\n var txt = '';\n if (node.hasAttribute('src')) {\n txt += '![' + node.getAttribute('alt') + '](';\n txt += '<' + node.getAttribute('src') + '>';\n if (node.hasAttribute('width') && node.hasAttribute('height')) {\n txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height');\n }\n\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.links', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes() && node.hasAttribute('href')) {\n var children = node.childNodes,\n childrenLength = children.length;\n txt = '[';\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '](';\n txt += '<' + node.getAttribute('href') + '>';\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.list', function (node, globals, type) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var listItems = node.childNodes,\n listItemsLenght = listItems.length,\n listNum = node.getAttribute('start') || 1;\n\n for (var i = 0; i < listItemsLenght; ++i) {\n if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') {\n continue;\n }\n\n // define the bullet to use in list\n var bullet = '';\n if (type === 'ol') {\n bullet = listNum.toString() + '. ';\n } else {\n bullet = '- ';\n }\n\n // parse list item\n txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals);\n ++listNum;\n }\n\n // add comment at the end to prevent consecutive lists to be parsed as one\n txt += '\\n\\n';\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.listItem', function (node, globals) {\n 'use strict';\n\n var listItemTxt = '';\n\n var children = node.childNodes,\n childrenLenght = children.length;\n\n for (var i = 0; i < childrenLenght; ++i) {\n listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n // if it's only one liner, we need to add a newline at the end\n if (!/\\n$/.test(listItemTxt)) {\n listItemTxt += '\\n';\n } else {\n // it's multiparagraph, so we need to indent\n listItemTxt = listItemTxt\n .split('\\n')\n .join('\\n ')\n .replace(/^ {4}$/gm, '')\n .replace(/\\n\\n+/g, '\\n\\n');\n }\n\n return listItemTxt;\n});\n\r\n\n\nshowdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) {\n 'use strict';\n\n spansOnly = spansOnly || false;\n\n var txt = '';\n\n // edge case of text without wrapper paragraph\n if (node.nodeType === 3) {\n return showdown.subParser('makeMarkdown.txt')(node, globals);\n }\n\n // HTML comment\n if (node.nodeType === 8) {\n return '\\n\\n';\n }\n\n // process only node elements\n if (node.nodeType !== 1) {\n return '';\n }\n\n var tagName = node.tagName.toLowerCase();\n\n switch (tagName) {\n\n //\n // BLOCKS\n //\n case 'h1':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\\n\\n'; }\n break;\n case 'h2':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\\n\\n'; }\n break;\n case 'h3':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\\n\\n'; }\n break;\n case 'h4':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\\n\\n'; }\n break;\n case 'h5':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\\n\\n'; }\n break;\n case 'h6':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\\n\\n'; }\n break;\n\n case 'p':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\\n\\n'; }\n break;\n\n case 'blockquote':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\\n\\n'; }\n break;\n\n case 'hr':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\\n\\n'; }\n break;\n\n case 'ol':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\\n\\n'; }\n break;\n\n case 'ul':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\\n\\n'; }\n break;\n\n case 'precode':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\\n\\n'; }\n break;\n\n case 'pre':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\\n\\n'; }\n break;\n\n case 'table':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\\n\\n'; }\n break;\n\n //\n // SPANS\n //\n case 'code':\n txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals);\n break;\n\n case 'em':\n case 'i':\n txt = showdown.subParser('makeMarkdown.emphasis')(node, globals);\n break;\n\n case 'strong':\n case 'b':\n txt = showdown.subParser('makeMarkdown.strong')(node, globals);\n break;\n\n case 'del':\n txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals);\n break;\n\n case 'a':\n txt = showdown.subParser('makeMarkdown.links')(node, globals);\n break;\n\n case 'img':\n txt = showdown.subParser('makeMarkdown.image')(node, globals);\n break;\n\n default:\n txt = node.outerHTML + '\\n\\n';\n }\n\n // common normalization\n // TODO eventually\n\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.paragraph', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n\n // some text normalization\n txt = txt.trim();\n\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.pre', function (node, globals) {\n 'use strict';\n\n var num = node.getAttribute('prenum');\n return '
    ' + globals.preList[num] + '
    ';\n});\n\r\nshowdown.subParser('makeMarkdown.strikethrough', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '~~';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '~~';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.strong', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '**';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '**';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.table', function (node, globals) {\n 'use strict';\n\n var txt = '',\n tableArray = [[], []],\n headings = node.querySelectorAll('thead>tr>th'),\n rows = node.querySelectorAll('tbody>tr'),\n i, ii;\n for (i = 0; i < headings.length; ++i) {\n var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals),\n allign = '---';\n\n if (headings[i].hasAttribute('style')) {\n var style = headings[i].getAttribute('style').toLowerCase().replace(/\\s/g, '');\n switch (style) {\n case 'text-align:left;':\n allign = ':---';\n break;\n case 'text-align:right;':\n allign = '---:';\n break;\n case 'text-align:center;':\n allign = ':---:';\n break;\n }\n }\n tableArray[0][i] = headContent.trim();\n tableArray[1][i] = allign;\n }\n\n for (i = 0; i < rows.length; ++i) {\n var r = tableArray.push([]) - 1,\n cols = rows[i].getElementsByTagName('td');\n\n for (ii = 0; ii < headings.length; ++ii) {\n var cellContent = ' ';\n if (typeof cols[ii] !== 'undefined') {\n cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals);\n }\n tableArray[r].push(cellContent);\n }\n }\n\n var cellSpacesCount = 3;\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n var strLen = tableArray[i][ii].length;\n if (strLen > cellSpacesCount) {\n cellSpacesCount = strLen;\n }\n }\n }\n\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n if (i === 1) {\n if (tableArray[i][ii].slice(-1) === ':') {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':';\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-');\n }\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount);\n }\n }\n txt += '| ' + tableArray[i].join(' | ') + ' |\\n';\n }\n\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.tableCell', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true);\n }\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.txt', function (node) {\n 'use strict';\n\n var txt = node.nodeValue;\n\n // multiple spaces are collapsed\n txt = txt.replace(/ +/g, ' ');\n\n // replace the custom ¨NBSP; with a space\n txt = txt.replace(/¨NBSP;/g, ' ');\n\n // \", <, > and & should replace escaped html entities\n txt = showdown.helper.unescapeHTMLEntities(txt);\n\n // escape markdown magic characters\n // emphasis, strong and strikethrough - can appear everywhere\n // we also escape pipe (|) because of tables\n // and escape ` because of code blocks and spans\n txt = txt.replace(/([*_~|`])/g, '\\\\$1');\n\n // escape > because of blockquotes\n txt = txt.replace(/^(\\s*)>/g, '\\\\$1>');\n\n // hash character, only troublesome at the beginning of a line because of headers\n txt = txt.replace(/^#/gm, '\\\\#');\n\n // horizontal rules\n txt = txt.replace(/^(\\s*)([-=]{3,})(\\s*)$/, '$1\\\\$2$3');\n\n // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer\n txt = txt.replace(/^( {0,3}\\d+)\\./gm, '$1\\\\.');\n\n // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped)\n txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\\\$2');\n\n // images and links, ] followed by ( is problematic, so we escape it\n txt = txt.replace(/]([\\s]*)\\(/g, '\\\\]$1\\\\(');\n\n // reference URIs must also be escaped\n txt = txt.replace(/^ {0,3}\\[([\\S \\t]*?)]:/gm, '\\\\[$1]:');\n\n return txt;\n});\n\r\nvar root = this;\n\n// AMD Loader\nif (typeof define === 'function' && define.amd) {\n define(function () {\n 'use strict';\n return showdown;\n });\n\n// CommonJS/nodeJS Loader\n} else if (typeof module !== 'undefined' && module.exports) {\n module.exports = showdown;\n\n// Regular Browser loader\n} else {\n root.showdown = showdown;\n}\n}).call(this);\r\n\n//# sourceMappingURL=showdown.js.map\r\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport showdown from 'showdown';\n\nshowdown.ConverterExtObj = function(flavor, asyncExtensions) {\n 'use strict';\n\n let outputAsyncModifiers = [],\n /**\n * The flavor set in this converter\n */\n currConvFlavor = flavor;\n\n _constructor();\n\n /**\n * Converter constructor\n * @private\n */\n function _constructor() {\n if (asyncExtensions) {\n showdown.helper.forEach(asyncExtensions, _parseAsyncExtension);\n }\n }\n\n /**\n * Parse async extension\n * @param {*} ext\n * @param {string} [name='']\n * @private\n */\n function _parseAsyncExtension(ext, name) {\n name = name || null;\n // If it's a string, the extension was previously loaded\n if (showdown.helper.isString(ext)) {\n name = showdown.helper.stdExtName(ext);\n ext = showdown.asyncExtension(name);\n if (showdown.helper.isUndefined(ext)) {\n throw Error(\n 'Extension \"' + name + '\" could not be loaded. It was either not found or is not a valid aync extension.'\n );\n }\n }\n\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n if (showdown.validateExtension(ext)) {\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n case 'output':\n outputAsyncModifiers.push(ext[i]);\n break;\n }\n }\n }\n }\n\n this.addAsyncExtension = function(extension, name) {\n name = name || null;\n _parseAsyncExtension(extension, name);\n };\n\n this.removeAsyncExtension = function(extension) {\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n for (var a = 0; a < extension.length; ++a) {\n const ext = extension[a];\n for (var j = 0; j < outputAsyncModifiers.length; ++j) {\n if (outputAsyncModifiers[j] === ext) {\n outputAsyncModifiers.splice(j, 1);\n }\n }\n }\n };\n\n this.getAsyncExtensions = function() {\n return outputAsyncModifiers;\n };\n\n /**\n * Get the currently flavor name of this converter\n * @returns {string}\n */\n this.getCurrFlavor = function() {\n return currConvFlavor;\n };\n\n /**\n * Set the currently flavor name of this converter\n * @param {string} flavor name\n */\n this.setCurrFlavor = function(name) {\n currConvFlavor = name;\n };\n};\n\nshowdown.Converter.prototype.initConvertExtObj = function(flavor, asyncExtensions) {\n this.extObj = new showdown.ConverterExtObj(flavor, asyncExtensions);\n\n this.resetOptions = function(converterOptions) {\n converterOptions = converterOptions || {};\n\n const globalOptions = showdown.getOptions();\n let options = this.getOptions();\n for (var gOpt in globalOptions) {\n if (globalOptions.hasOwnProperty(gOpt)) {\n options[gOpt] = globalOptions[gOpt];\n }\n }\n\n // Merge options\n if (typeof converterOptions === 'object') {\n for (var opt in converterOptions) {\n if (converterOptions.hasOwnProperty(opt)) {\n options[opt] = converterOptions[opt];\n }\n }\n }\n };\n\n /**\n * Set the flavor THIS converter should use\n * @param {string} name\n */\n this.setFlavor = function(name) {\n let preset = showdown.getFlavorOptions(name);\n if (showdown.helper.isUndefined(preset)) return;\n this.extObj.setCurrFlavor(name);\n let defaultOptions = showdown.getDefaultOptions(true);\n for (var option in defaultOptions) {\n if (defaultOptions.hasOwnProperty(option)) {\n this.getOptions()[option] = defaultOptions[option];\n }\n }\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n this.getOptions()[option] = preset[option];\n }\n }\n };\n\n /**\n * Get the currently set flavor of this converter\n * @returns {string}\n */\n this.getFlavor = function() {\n return this.extObj.getCurrFlavor();\n };\n\n this.addAsyncExtension = function(extension, name) {\n this.extObj.addAsyncExtension(extension, name);\n };\n\n this.removeAsyncExtension = function(extension) {\n this.extObj.removeAsyncExtension(extension);\n };\n\n // Because removeExtension function of converter has bug in showdown.js,\n // it needs to be overrode.\n this.removeExtension = function(extension) {\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n const exts = this.getAllExtensions();\n let langExtensions = exts.language;\n let outputModifiers = exts.output;\n for (var a = 0; a < extension.length; ++a) {\n const ext = extension[a];\n for (var i = 0; i < langExtensions.length; ++i) {\n if (langExtensions[i] === ext) {\n langExtensions.splice(i, 1);\n }\n }\n for (var j = 0; j < outputModifiers.length; ++j) {\n if (outputModifiers[j] === ext) {\n outputModifiers.splice(j, 1);\n }\n }\n }\n };\n\n /**\n * Async converts a markdown string into HTML\n * @param {string} text\n * @returns {*}\n */\n this.asyncMakeHtml = function(text, callback) {\n const content = this.makeHtml(text);\n const outputs = this.extObj.getAsyncExtensions();\n if (!outputs.length) {\n return Promise.resolve({html: content});\n }\n\n var globals = {\n outputs: outputs,\n converter: this\n };\n const parser = new DOMParser();\n const doc = parser.parseFromString(content, 'text/html');\n const wrapper = typeof doc.body !== 'undefined' ? doc.body : doc;\n const options = this.getOptions();\n let scripts = [];\n let result = Promise.resolve({ wrapper, options, globals, scripts });\n //forEach写法\n outputs.forEach(function(ext) {\n result = result.then(obj => {\n const filter = ext.filter(obj);\n return filter ? filter : obj;\n });\n });\n return result.then(obj => {\n if (typeof callback === 'function' && callback) {\n const promise = callback(obj);\n if (promise instanceof Promise) {\n return promise.then(obj => {\n return { html: obj.wrapper.innerHTML, scripts: obj.scripts };\n });\n }\n }\n return { html: obj.wrapper.innerHTML, scripts: obj.scripts };\n });\n };\n\n return this;\n};\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Override githubCodeBlocks parser;\n * Support language attribute, see the following format:\n * ```lang {\"theme\": \"github\", \"align\": \"center\"}\n * code block\n * ```\n * OR\n * ```lang [\"theme\": \"vox\", \"align\": \"right\"]\n * code block\n * ```\n */\n'use strict';\n\nimport showdown from 'showdown';\n\nshowdown.subParser('githubCodeBlocks', function(text, options, globals) {\n 'use strict';\n\n // early exit if option is not enabled\n if (!options.ghCodeBlocks) {\n return text;\n }\n\n text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);\n\n text += '¨0';\n\n text = text.replace(\n /(?:^|\\n)(?: {0,3})(```+|~~~+)(?: *)([^\\s`~]*?)(?:[ \\t]*?)((?:\\{[\\S\\t ]*\\}|\\[[\\S\\t ]*\\])?)\\n([\\s\\S]*?)\\n(?: {0,3})\\1/g,\n function(wholeMatch, delim, language, langattr, codeblock) {\n var end = options.omitExtraWLInCodeBlocks ? '' : '\\n';\n\n // First parse the github code block\n codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n codeblock = showdown.subParser('detab')(codeblock, options, globals);\n codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing whitespace\n\n codeblock =\n '
    ';\n\n codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);\n\n // Since GHCodeblocks can be false positives, we need to\n // store the primitive text and the parsed text in a global var,\n // and then return a token\n return (\n '\\n\\n¨G' +\n (globals.ghCodeBlocks.push({\n text: wholeMatch,\n codeblock: codeblock\n }) -\n 1) +\n 'G\\n\\n'\n );\n }\n );\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);\n});\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport showdown from 'showdown';\n\n// Override tables parser;\nshowdown.subParser('tables', function (text, options, globals) {\n 'use strict';\n\n if (!options.tables) {\n return text;\n }\n\n var tableRgx = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n singeColTblRgx = /^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm,\n headerlessTableRgx = /^ {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n headerlessSingeColTblRgx = /^ {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm;\n\n function parseStyles(sLine) {\n if (/^:[ \\t]*--*$/.test(sLine)) {\n return ' style=\"text-align:left;\"';\n } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine)) {\n return ' style=\"text-align:right;\"';\n } else if (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n return ' style=\"text-align:center;\"';\n } else {\n return '';\n }\n }\n\n function parseHeaders(header, style) {\n var id = '';\n header = header.trim();\n // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility\n if (options.tablesHeaderId || options.tableHeaderId) {\n id = ' id=\"' + header.replace(/ /g, '_').toLowerCase() + '\"';\n }\n header = showdown.subParser('spanGamut')(header, options, globals);\n\n return '' + header + '\\n';\n }\n\n function mergeCells(cells, row, col, cell) {\n if (cell) {\n if (!options.tablesRowspan || cell !== '^^' || !row) {\n return;\n }\n\n // up merge except for first row cells\n for (var i = row - 1; i >= 0; --i) {\n if (!cells[i][col]) {\n for (var ii = col - 1; ii >= 0; -ii) {\n if (cells[i + 1][ii] && cells[i + 1][ii] !== '^^') {\n return;\n }\n\n if (cells[i][ii]) {\n if (!cells[i + 1][ii]) {\n return;\n }\n\n cells[i][ii] = cells[i][ii]\n .replace(/rowspan=\"[0-9]*\"/g, '')\n .replace(/^(\\n\\r]*?)(>.*<\\/td>\\n)/, function (str, left, right) {\n return left + ' rowspan=\"' + (row - i + 1) + '\"' + right;\n });\n return cell;\n }\n }\n } else if (cells[i][col] !== '^^') {\n cells[i][col] = cells[i][col]\n .replace(/rowspan=\"[0-9]*\"/g, '')\n .replace(/^(\\n\\r]*?)(>.*<\\/td>\\n)/, function (str, left, right) {\n return left + ' rowspan=\"' + (row - i + 1) + '\"' + right;\n });\n return cell;\n } else if (i === 0) {\n cells[i][col] = '\\n';\n return cell;\n }\n }\n\n return;\n }\n\n // left merge except for first column cells\n if (!col) {\n return;\n }\n\n for (var ii = col - 1; ii >= 0; --ii) {\n if (cells[row][ii]) {\n if (cells[row][ii] === '^^') {\n for (var i = row - 1; i >= 0; --i) {\n if (cells[i][ii + 1]) {\n return;\n }\n\n if (cells[i][ii] !== '^^') {\n cells[i][ii] = cells[i][ii]\n .replace(/colspan=\"[0-9]*\"/g, '')\n .replace(/^(\\n\\r]*?)(>.*<\\/td>\\n)/, function (str, left, right) {\n return left + ' colspan=\"' + (col - ii + 1) + '\"' + right;\n });\n return cell;\n }\n }\n } else {\n cells[row][ii] = cells[row][ii]\n .replace(/colspan=\"[0-9]*\"/g, '')\n .replace(/^(\\n\\r]*?)(>.*<\\/td>\\n)/, function (str, left, right) {\n return left + ' colspan=\"' + (col - ii + 1) + '\"' + right;\n });\n return cell;\n }\n } else if (ii === 0) {\n cells[row][ii] = '\\n';\n return cell;\n }\n }\n\n return;\n }\n\n function parseCells(cells, row, col, cell, style) {\n if (options.tablesMerge) {\n var direct = mergeCells(cells, row, col, cell);\n if (!showdown.helper.isUndefined(direct)) {\n return direct;\n }\n }\n\n cell = cell.trim();\n var subText = showdown.subParser('spanGamut')(cell, options, globals);\n return '' + subText + '\\n';\n }\n\n function buildTable(headers, styles, cells) {\n var tb = '\\n',\n tblLgn = styles.length;\n\n if (headers.length) {\n tb += '\\n\\n';\n for (var i = 0; i < headers.length; ++i) {\n tb += headers[i];\n }\n tb += '\\n\\n';\n }\n tb += '\\n'\n\n for (i = 0; i < cells.length; ++i) {\n tb += '\\n';\n for (var ii = 0; ii < tblLgn; ++ii) {\n if (!options.tablesMerge || cells[i][ii] !== '^^') {\n tb += cells[i][ii];\n }\n }\n tb += '\\n';\n }\n tb += '\\n
    \\n';\n return tb;\n }\n\n function parseTableContent(rawTable, headerless) {\n var i,\n tableLines = rawTable.split('\\n');\n\n for (i = 0; i < tableLines.length; ++i) {\n // strip wrong first and last column if wrapped tables are used\n if (/^ {0,3}\\|/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/^ {0,3}\\|/, '');\n }\n if (/\\|[ \\t]*$/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/\\|[ \\t]*$/, '');\n }\n // parse code spans first, but we only support one line code spans\n tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);\n }\n\n var rawStyles = [],\n rawCells = [],\n headers = [],\n styles = [],\n cells = [];\n\n if (headerless) {\n rawStyles = tableLines[0].split('|').map(function (s) {\n return s.trim();\n });\n tableLines.shift();\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n } else {\n var rawHeaders = tableLines[0].split('|').map(function (s) {\n return s.trim();\n });\n rawStyles = tableLines[1].split('|').map(function (s) {\n return s.trim();\n });\n\n tableLines.shift();\n tableLines.shift();\n\n if (rawHeaders.length < rawStyles.length) {\n return rawTable;\n }\n\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n\n for (i = 0; i < rawHeaders.length; ++i) {\n if (showdown.helper.isUndefined(styles[i])) {\n styles[i] = '';\n }\n headers.push(parseHeaders(rawHeaders[i], styles[i]));\n }\n }\n\n for (i = 0; i < tableLines.length; ++i) {\n if (tableLines[i].trim() === '') {\n continue;\n }\n rawCells.push(\n tableLines[i].split('|').map(function (s) {\n var cell = s.trim();\n if (cell === '' && s.length > 0) return s;\n return cell;\n })\n );\n }\n\n for (i = 0; i < rawCells.length; ++i) {\n var row = [];\n cells.push(row);\n for (var ii = 0; ii < styles.length; ++ii) {\n if (showdown.helper.isUndefined(rawCells[i][ii])) {\n rawCells[i][ii] = '';\n }\n row.push(parseCells(cells, i, ii, rawCells[i][ii], styles[ii]));\n }\n }\n\n return buildTable(headers, styles, cells);\n }\n\n function parseTable(rawTable) {\n return parseTableContent(rawTable, false);\n }\n\n function parseHeaderlessTable(rawTable) {\n return parseTableContent(rawTable, true);\n }\n\n text = globals.converter._dispatch('tables.before', text, options, globals);\n\n // find escaped pipe characters\n text = text.replace(/\\\\(\\|)/g, showdown.helper.escapeCharactersCallback);\n\n // parse multi column tables\n text = text.replace(tableRgx, parseTable);\n\n // parse one column tables\n text = text.replace(singeColTblRgx, parseTable);\n\n if (options.tablesHeaderless) {\n // parse multi column headerless tables\n text = text.replace(headerlessTableRgx, parseHeaderlessTable);\n\n // parse one column headerless tables\n text = text.replace(headerlessSingeColTblRgx, parseHeaderlessTable);\n }\n\n text = globals.converter._dispatch('tables.after', text, options, globals);\n\n return text;\n});\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport showdown from 'showdown';\nimport './converter.js';\nimport './githubCodeBlocks.js';\nimport './tables.js';\n\nlet currFlavor = 'vanilla',\n flavors = {\n github: {\n ghCompatibleHeaderId: false,\n underline: true,\n rawHeaderId: true,\n tablesHeaderless: true,\n tablesMerge: true,\n tablesRowspan: true\n },\n ghost: {\n tablesHeaderless: true,\n tablesMerge: true,\n tablesRowspan: true\n },\n allOn: {\n tablesHeaderless: true,\n tablesMerge: true,\n tablesRowspan: true\n }\n },\n _asyncExtensions = {};\n\n/**\n * Gets or registers an async extension\n * @static\n * @param {string} name\n * @param {object|function=} ext\n * @returns {*}\n */\nshowdown.asyncExtension = function(name, ext) {\n 'use strict';\n\n if (!showdown.helper.isString(name)) {\n throw Error(\"Extension 'name' must be a string\");\n }\n\n name = showdown.helper.stdExtName(name);\n\n // Getter\n if (showdown.helper.isUndefined(ext)) {\n if (!_asyncExtensions.hasOwnProperty(name)) {\n throw Error('Async Extension named ' + name + ' is not registered!');\n }\n return _asyncExtensions[name];\n\n // Setter\n } else {\n // Expand extension if it's wrapped in a function\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n // Ensure extension is an array\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n if (showdown.validateExtension(ext)) {\n _asyncExtensions[name] = ext;\n }\n }\n};\n\n/**\n * Remove an async extension\n * @param {string} name\n */\nshowdown.removeAsyncExtension = function(name) {\n 'use strict';\n name = showdown.helper.stdExtName(name);\n delete _asyncExtensions[name];\n};\n\n/**\n * Removes all async extensions\n */\nshowdown.resetAsyncExtensions = function() {\n 'use strict';\n _asyncExtensions = {};\n};\n\n/**\n * Remove an extension\n * @param {string} name\n */\nshowdown.removeExtension = function(name) {\n 'use strict';\n name = showdown.helper.stdExtName(name);\n delete showdown.getAllExtensions[name];\n};\n\nconst orgSetFlavor = showdown.setFlavor;\nconst orgGetFlavorOptions = showdown.getFlavorOptions;\n\n/**\n * Set the flavor showdown should use as default\n * @param {string} name\n */\nshowdown.setFlavor = function(name) {\n 'use strict';\n\n try {\n orgSetFlavor(name);\n currFlavor = name;\n if (!flavors.hasOwnProperty(name)) return;\n } catch {\n if (!flavors.hasOwnProperty(name)) return;\n showdown.resetOptions();\n currFlavor = name;\n }\n var preset = flavors[name];\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n showdown.getOptions()[option] = preset[option];\n }\n }\n};\n\n/**\n * Get the currently set flavor\n * @returns {string}\n */\nshowdown.getFlavor = function() {\n 'use strict';\n return currFlavor;\n};\n\nshowdown.setFlavorOptions = function(name, options) {\n if (options) {\n flavors[name] = Object.assign(flavors[name] || {}, options);\n }\n};\n\n/**\n * Get the options of a specified flavor. Returns undefined if the flavor was not found\n * @param {string} name Name of the flavor\n * @returns {{}|undefined}\n */\nshowdown.getFlavorOptions = function(name) {\n 'use strict';\n const flavor = orgGetFlavorOptions(name);\n if (!showdown.helper.isUndefined(flavor)) {\n if (!flavors.hasOwnProperty(name)) {\n return flavor;\n }\n return Object.assign(flavor, flavors[name]);\n }\n\n if (flavors.hasOwnProperty(name)) {\n return flavors[name];\n }\n};\n\nexport default showdown;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: dynamic loading js libs for local or cdnjs or jsdelivr\n */\n'use strict';\n\nlet cdnName = 'jsdelivr';\nlet scheme = document.location.protocol === 'file:' ? 'https://' : document.location.protocol + '//';\nlet defScheme = '';\nlet distScheme = '';\n\nconst cdnSrc = {\n local: {\n ABCJS: '../node_modules/abcjs/dist/abcjs-basic.js',\n ABCJSCSS: '../node_modules/abcjs/abcjs-audio.css',\n echarts: '../node_modules/echarts/dist/echarts.js',\n Viz: '../node_modules/@viz-js/viz/lib/viz-standalone.js',\n Raphael: '../node_modules/raphael/raphael.min.js',\n flowchart: '../dist/diagrams/flowchart/flowchart.min.js',\n mermaid: '../node_modules/mermaid/dist/mermaid.js',\n katex: '../node_modules/katex/dist/katex.min.js',\n katexCSS: '../node_modules/katex/dist/katex.min.css',\n renderMathInElement: '../node_modules/katex/dist/contrib/auto-render.js',\n railroad: '../node_modules/railroad-diagrams/railroad-diagrams.js',\n railroadCSS: '../node_modules/railroad-diagrams/railroad-diagrams.css',\n Snap: '../node_modules/snapsvg/dist/snap.svg-min.js',\n WebFont: '../node_modules/webfontloader/webfontloader.js',\n underscore: '../node_modules/underscore/underscore-min.js',\n sequence: '../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js',\n sequenceCSS: '../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.css',\n WaveDrom: '../node_modules/wavedrom/wavedrom.min.js',\n WaveDromSkin: {\n default: '../node_modules/wavedrom/skins/default.js',\n lowkey: '../node_modules/wavedrom/skins/lowkey.js',\n narrow: '../node_modules/wavedrom/skins/narrow.js'\n },\n vega: '../node_modules/vega/build/vega.js',\n vegaLite: '../node_modules/vega-lite/build/vega-lite.js',\n vegaEmbed: '../node_modules/vega-embed/build/vega-embed.js'\n },\n cdnjs: {\n ABCJS: scheme + 'cdnjs.cloudflare.com/ajax/libs/abcjs/6.4.1/abcjs-basic-min.js',\n ABCJSCSS: scheme + 'cdnjs.cloudflare.com/ajax/libs/abcjs/abcjs-audio.css',\n echarts: scheme + 'cdnjs.cloudflare.com/ajax/libs/echarts/5.5.0/echarts.min.js',\n Viz: scheme + 'cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js',\n Raphael: scheme + 'cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js',\n flowchart: scheme + 'cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js',\n mermaid: scheme + 'cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js',\n katex: scheme + 'cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.js',\n katexCSS: scheme + 'cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.css',\n renderMathInElement: scheme + 'cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/contrib/auto-render.js',\n railroad: scheme + 'cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.js',\n railroadCSS: scheme + 'cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.css',\n Snap: scheme + 'cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js',\n WebFont: scheme + 'cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js',\n underscore: scheme + 'cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js',\n sequence: scheme + 'cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js',\n sequenceCSS: scheme + 'cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css',\n WaveDrom: scheme + 'cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/wavedrom.min.js',\n WaveDromSkin: {\n default: scheme + 'cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/default.js',\n lowkey: scheme + 'cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/lowkey.js',\n narrow: scheme + 'cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/narrow.js'\n },\n vega: scheme + 'cdnjs.cloudflare.com/ajax/libs/vega/5.30.0/vega.min.js',\n vegaLite: scheme + 'cdnjs.cloudflare.com/ajax/libs/vega-lite/5.19.0/vega-lite.min.js',\n vegaEmbed: scheme + 'cdnjs.cloudflare.com/ajax/libs/vega-embed/6.26.0/vega-embed.min.js'\n },\n jsdelivr: {\n ABCJS: scheme + 'cdn.jsdelivr.net/npm/abcjs@6/dist/abcjs-basic-min.js',\n ABCJSCSS: scheme + 'cdn.jsdelivr.net/npm/abcjs@6/abcjs-audio.css',\n echarts: scheme + 'cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js',\n Viz: scheme + 'cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js',\n Raphael: scheme + 'cdn.jsdelivr.net/npm/raphael@2/raphael.min.js',\n flowchart: scheme + 'cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js',\n mermaid: scheme + 'cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js',\n katex: scheme + 'cdn.jsdelivr.net/npm/katex@0/dist/katex.min.js',\n katexCSS: scheme + 'cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css',\n renderMathInElement: scheme + 'cdn.jsdelivr.net/npm/katex@0/dist/contrib/auto-render.js',\n railroad: scheme + 'cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.js',\n railroadCSS: scheme + 'cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.css',\n Snap: scheme + 'cdn.jsdelivr.net/npm/snapsvg@0/dist/snap.svg-min.js',\n WebFont: scheme + 'cdn.jsdelivr.net/npm/webfontloader@1/webfontloader.js',\n underscore: scheme + 'cdn.jsdelivr.net/npm/underscore@1/underscore-min.js',\n sequence: scheme + 'cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js',\n sequenceCSS: scheme + 'cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css',\n WaveDrom: scheme + 'cdn.jsdelivr.net/npm/wavedrom@3/wavedrom.min.js',\n WaveDromSkin: {\n default: scheme + 'cdn.jsdelivr.net/npm/wavedrom@3/skins/default.js',\n lowkey: scheme + 'cdn.jsdelivr.net/npm/wavedrom@3/skins/lowkey.js',\n narrow: scheme + 'cdn.jsdelivr.net/npm/wavedrom@3/skins/narrow.js'\n },\n vega: scheme + 'cdn.jsdelivr.net/npm/vega@5/build/vega.js',\n vegaLite: scheme + 'cdn.jsdelivr.net/npm/vega-lite@5/build/vega-lite.js',\n vegaEmbed: scheme + 'cdn.jsdelivr.net/npm/vega-embed@6/build/vega-embed.js'\n }\n};\n\nfunction setCDN(name, scheme_default, scheme_dist) {\n if (name in cdnSrc) {\n cdnName = name;\n }\n\n if (typeof scheme_default === 'string' && scheme_default) {\n defScheme = scheme_default;\n }\n\n if (typeof scheme_dist === 'string' && scheme_dist) {\n distScheme = scheme_dist;\n }\n}\n\nfunction getCDN() {\n return cdnName;\n}\n\nfunction getSrc(name, def) {\n if (cdnSrc.hasOwnProperty(cdnName)) {\n const cdn = cdnSrc[cdnName];\n let url = '';\n if (typeof name === 'object') {\n const key = Object.keys(name)[0];\n const val = name[key];\n if (cdn[key] && typeof val === 'string' && val && cdn[key][val]) {\n url = cdn[key][val];\n }\n } else if (cdn[name]) {\n url = cdn[name];\n }\n\n if (url) {\n if (url.substring(0, scheme.length) === scheme) {\n def = url;\n } else if (url.substring(0, 8) === '../dist/') {\n def = distScheme + url;\n } else {\n def = defScheme + url;\n }\n }\n }\n return def;\n}\n\nfunction loadScript(src, name) {\n return new Promise((res, rej) => {\n if (!src || typeof document === 'undefined') {\n rej('Args is invaild!');\n }\n\n if (typeof name === 'undefined') {\n name = src;\n }\n\n src = getSrc(name, src);\n const head = document.head || document.getElementsByTagName('head')[0];\n const script = document.createElement('script');\n script.src = src;\n script.onload = () => {\n res(name);\n };\n head.appendChild(script);\n });\n}\n\nfunction loadStyleSheet(css, name) {\n if (!css || typeof document === 'undefined') {\n return '';\n }\n\n if (typeof name === 'undefined') {\n name = css;\n }\n\n css = getSrc(name, css);\n var head = document.head || document.getElementsByTagName('head')[0];\n var link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = css;\n head.appendChild(link);\n return cdnName === 'local' ? '' : css;\n}\n\nconst cdnjs = {\n setCDN,\n getCDN,\n getSrc,\n loadScript,\n loadStyleSheet\n};\n\nexport default cdnjs;\n","/*\r\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\r\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\r\n * Description: Date format extension\r\n */\r\n'use strict';\r\n// 对Date的扩展,将 Date 转化为指定格式的String\r\n// 月(M)、日(d)、小时(h/H)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,\r\n// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)\r\n// 例子:\r\n// (new Date()).Format(\"yyyy-MM-dd hh:mm:ss.S\") ==> 1970-01-01 08:09:04.423\r\n// (new Date()).Format(\"yyyy-M-d h:m:s.S\") ==> 1970-1-1 8:9:4.18\r\nDate.prototype.Format = function(fmt) {\r\n var o = {\r\n 'M+': this.getMonth() + 1, //月份\r\n 'd+': this.getDate(), //日\r\n 'h+': this.getHours(), //小时\r\n 'H+': this.getHours(), //小时\r\n 'm+': this.getMinutes(), //分\r\n 's+': this.getSeconds(), //秒\r\n 'q+': Math.floor((this.getMonth() + 3) / 3), //季度\r\n S: this.getMilliseconds() //毫秒\r\n };\r\n if (!fmt) fmt = 'yyyy-MM-dd hh:mm:ss.S';\r\n if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));\r\n for (var k in o) {\r\n if (new RegExp('(' + k + ')').test(fmt)) {\r\n fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));\r\n }\r\n }\r\n return fmt;\r\n};\r\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport './date-format.js';\n\nfunction loadScript(id, code) {\n return new Promise((res, rej) => {\n if (!code || typeof document === 'undefined') {\n rej('Args is invaild!');\n }\n\n const body = document.body;\n let script = document.getElementById(id);\n if (script) {\n body.removeChild(script);\n } else {\n script = document.createElement('script');\n script.id = id;\n }\n script.type = \"text/javascript\";\n script.text = code;\n body.appendChild(script);\n res(true);\n });\n}\n\nfunction interopDefault(ex) {\n return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;\n}\n\nfunction renderCacheElement(doc, id, name, callback) {\n if (typeof window !== 'undefined' && window.document) {\n doc = window.document;\n }\n const el = doc.createElement('div');\n el.id = id;\n el.className = name;\n el.style.display = 'none';\n doc.body.appendChild(el);\n if (typeof callback === 'function' && callback) {\n const result = callback(el);\n if (result instanceof Promise) {\n result.then(el => {\n doc.body.removeChild(el);\n el.style.display = '';\n });\n return el.outerHTML;\n }\n }\n doc.body.removeChild(el);\n el.style.display = '';\n return el.outerHTML;\n}\n\nfunction renderElement(doc, id, name) {\n if (typeof window !== 'undefined' && window.document) {\n doc = window.document;\n }\n const el = doc.createElement('div');\n el.id = id;\n el.className = name;\n doc.body.appendChild(el);\n return el\n}\n\nfunction createElementMeta(name, element, callback) {\n const langattr = element.dataset.lang;\n const langobj = langattr ? JSON.parse(langattr) : null;\n let diagramClass = '';\n if (langobj) {\n if (\n (typeof langobj.codeblock === 'boolean' && langobj.codeblock) ||\n (typeof langobj.codeblock === 'string' && langobj.codeblock.toLowerCase() === 'true')\n ) {\n return false;\n }\n\n if (langobj.align) {\n //default left\n if (langobj.align === 'center') {\n diagramClass = 'diagram-center';\n } else if (langobj.align === 'right') {\n diagramClass = 'diagram-right';\n }\n }\n }\n\n let code = element.textContent.trim();\n if (callback && typeof callback === 'function') {\n code = callback(code);\n }\n const className =\n (element.classList.length > 0 ? element.classList[0] : '') +\n (!element.className || !diagramClass ? '' : ' ') +\n diagramClass;\n const id = name + '-' + Date.now() + '-' + Math.floor(Math.random() * 10000);\n element.id = id;\n return {\n id: id,\n className: className,\n data: code,\n element: element, \n };\n}\n\nconst utils = {\n interopDefault,\n loadScript,\n renderCacheElement,\n renderElement,\n createElementMeta\n};\n\nexport default utils;\n","/*\n * Copyright (c) 2024-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown abc extension for markdown\n */\n'use strict';\n\nconst extName = 'abc';\nconst cssCdnName = 'ABCJSCSS';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown abcjs extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof ABCJS === 'undefined') {\n var ABCJS = window.ABCJS || undefined;\n} \n\nfunction hasAbc() {\n return !!ABCJS;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasAbc();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs.loadStyleSheet(cssCdnName);\n cdnjs.loadScript('ABCJS').then(name => {\n ABCJS = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction onRenderAbc(resolve, res) {\n if (hasAbc()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const cssLink = res.cssLink;\n const doc = res.element.ownerDocument;\n res.element.parentNode.outerHTML = cssLink\n ? `
    `\n : `
    `;\n const element = doc.getElementById(id);\n ABCJS.renderAbc(element, data);\n return resolve(true);\n }\n\n setTimeout(() => {\n onRenderAbc(resolve, res);\n }, 20);\n}\n\n/**\n * render abc graphs\n */\nfunction renderAbc(element) {\n return new Promise(resolve => {\n let meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return resolve(false);\n }\n\n meta.cssLink = cdnjs.getSrc(cssCdnName);\n onRenderAbc(resolve, meta);\n });\n}\n\n//
    \nfunction renderAbcElements(elements) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderAbc(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n\nfunction showdownAbc() {\n return [\n {\n type: 'output',\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the abc in code blocks\n const elements = wrapper.querySelectorAll(`code.${extName}.language-${extName}`);\n if (!elements.length) {\n return false;\n }\n\n this.config = {\n cssLink: cdnjs.getSrc(cssCdnName)\n };\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render ${extName} elements.`);\n return renderAbcElements(elements).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render ${extName} elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownAbc;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown toc extension for markdown\n */\n'use strict';\n\nfunction createHeadingElement(wrapper, element, toc, nexthead) {\n try {\n if (nexthead) {\n toc = toc.appendChild(wrapper.ownerDocument.createElement('ul'));\n }\n const child = toc\n .appendChild(wrapper.ownerDocument.createElement('li'))\n .appendChild(wrapper.ownerDocument.createElement('a'));\n if (element) {\n child.appendChild(wrapper.ownerDocument.createTextNode(element.textContent));\n child.href = '#' + element.id;\n }\n } catch {\n console.log(\"append child error:\" + wrapper);\n }\n return toc;\n}\n\nfunction appendTocElement(wrapper, element, currTocNode, headingLevel) {\n // If the current heading level is not greater than the heading level of current toc node,\n // return the toc node whose heading level is less than the current heading level in the toc node list.\n // At the same time, clearing the invalid toc node.\n if (headingLevel <= currTocNode.headingLevel) {\n let tempTocNode = null;\n while (currTocNode) {\n if (headingLevel > currTocNode.headingLevel) break;\n tempTocNode = currTocNode;\n currTocNode = tempTocNode.parentNode;\n // Remove toc node from node list and clean it.\n tempTocNode.parentNode = null;\n tempTocNode.toc = null;\n tempTocNode.headingLevel = null;\n tempTocNode.preLevel = null;\n }\n if (currTocNode) appendTocElement(wrapper, element, currTocNode, headingLevel);\n return currTocNode;\n }\n\n // If the current heading level is greater than the heading level of\n // the latest heading of the current toc node,\n // you need to create a new level heading with out list.\n // Otherwise add a heading of the same heading level.\n if (headingLevel > currTocNode.preLevel) {\n currTocNode.preLevel ++;\n while (headingLevel > currTocNode.preLevel) {\n currTocNode.toc = createHeadingElement(wrapper, null, currTocNode.toc, true);\n currTocNode.preLevel ++;\n }\n currTocNode.toc = createHeadingElement(wrapper, element, currTocNode.toc, true);\n } else {\n while (headingLevel < currTocNode.preLevel) {\n currTocNode.toc = currTocNode.toc.parentNode;\n currTocNode.preLevel--;\n }\n createHeadingElement(wrapper, element, currTocNode.toc, false);\n }\n\n if (currTocNode.parentNode) appendTocElement(wrapper, element, currTocNode.parentNode, headingLevel);\n return currTocNode;\n}\n\nfunction renderTocElements(wrapper) {\n let element = null;\n let headingLevel = 0;\n let currTocNode = null;\n let result = false;\n const elements = wrapper.querySelectorAll('p,h1,h2,h3,h4,h5,h6');\n for (let i = 0; i < elements.length; i++) {\n element = elements[i];\n\n // Match the element text is [toc].\n // And replace this element with out list that classname is 'showdown-toc'.\n if (element.textContent.trim().toLowerCase() == '[toc]') {\n // New table of contents container.\n let toc = wrapper.ownerDocument.createElement('ul');\n toc.className = 'showdown-toc';\n element.parentNode.replaceChild(toc, element);\n let tocNode = {\n parentNode: null,\n toc: toc,\n headingLevel: headingLevel,\n preLevel: 0\n };\n if (currTocNode) {\n // If the heading level of the TOC node is higher than\n // that of the previous TOC node,\n // the TOC node is a child of the previous TOC node.\n // Otherwise, look up the TOC node in the node list\n // whose heading level is not greater than the TOC node.\n if (headingLevel > currTocNode.headingLevel) {\n tocNode.parentNode = currTocNode;\n } else {\n // The code will never be executed, just to prevent logic loss.\n // Because invalid nodes have been cleared in appendTocElement method.\n let prev = currTocNode;\n while (headingLevel < prev.headingLevel) {\n prev = prev.parentNode;\n }\n if (prev) {\n if (headingLevel === prev.headingLevel) {\n tocNode.parentNode = prev.parentNode;\n } else {\n tocNode.parentNode = prev;\n }\n }\n }\n }\n currTocNode = tocNode;\n result = true;\n }\n // That's going to be what we use as contents entries\n // for this table of contents.\n else if (element['tagName']) {\n switch (element['tagName']) {\n case 'H1':\n case 'H2':\n case 'H3':\n case 'H4':\n case 'H5':\n case 'H6':\n headingLevel = parseInt(element['tagName'].substr(1));\n if (currTocNode) {\n if (!currTocNode.preLevel) {\n currTocNode.preLevel = headingLevel;\n }\n\n currTocNode = appendTocElement(wrapper, element, currTocNode, headingLevel);\n }\n break;\n }\n }\n }\n\n // Final, clear all toc node in node list.\n while (currTocNode) {\n let tempTocNode = currTocNode;\n currTocNode = tempTocNode.parentNode;\n // Clean toc node.\n tempTocNode.parentNode = null;\n tempTocNode.toc = null;\n tempTocNode.headingLevel = null;\n tempTocNode.preLevel = null;\n }\n return result;\n}\n\nfunction showdownToc() {\n const parser = new DOMParser();\n return [\n {\n type: 'output',\n filter: function(html) {\n // parse html\n const doc = parser.parseFromString(html, 'text/html');\n const wrapper = typeof doc.body !== 'undefined' ? doc.body : doc;\n if (!renderTocElements(wrapper)) {\n return html;\n }\n // return html text content\n return wrapper.innerHTML;\n }\n }\n ];\n}\n\nexport default showdownToc;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown viz extension for markdown\n */\n'use strict';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown viz extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof Viz === 'undefined') {\n var Viz = window.Viz || undefined;\n}\n\nconst engines = ['circo', 'dot', 'neato', 'osage', 'twopi'];\n\nfunction hasViz() {\n return typeof Viz !== 'undefined' && Viz && typeof Viz.instance !== 'undefined'\n ? true\n : false;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasViz();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs.loadScript('Viz').then(name => {\n Viz = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction onRenderViz(resolve, res) {\n if (hasViz()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const el = res.element;\n const langattr = res.element.dataset.lang;\n let engine = 'dot';\n if (langattr) {\n const obj = JSON.parse(langattr);\n if (obj && obj.engine && engines.indexOf(obj.engine) != -1) {\n engine = obj.engine;\n }\n }\n Viz.instance().then(viz => {\n const svg = viz.renderString(data, { format: 'svg', engine: engine });\n el.parentNode.outerHTML = `
    ${svg}
    `;\n resolve(true)\n });\n return;\n }\n\n setTimeout(() => {\n onRenderViz(resolve, res);\n }, 10);\n}\n\n/**\n * render Viz graphs\n */\nfunction renderViz(element) {\n return new Promise(resolve => {\n const meta = utils.createElementMeta(\"viz\", element);\n if (!meta) {\n return resolve(false);\n }\n \n onRenderViz(resolve, meta);\n });\n}\n\n//
    \nfunction renderVizElements(elements) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderViz(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\nfunction showdownViz() {\n return [\n {\n type: 'output',\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the Viz in code blocks\n const elements = wrapper.querySelectorAll('code.dot.language-dot');\n if (!elements.length) {\n return false;\n }\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render dot elements.`);\n return renderVizElements(elements).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render dot elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownViz;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown vega extension for markdown\n */\n'use strict';\n\nconst extName = \"vega\";\n\nif (typeof window === 'undefined') {\n throw Error('The showdown vega extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof vegaEmbed === 'undefined') {\n var vegaEmbed = window.vegaEmbed || undefined;\n}\n\nfunction hasVegaEmbed() {\n return typeof vegaEmbed !== 'undefined' && vegaEmbed ? true : false;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasVegaEmbed();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs\n .loadScript(extName)\n .then(() => {\n return cdnjs.loadScript('vegaLite');\n })\n .then(() => {\n return cdnjs.loadScript('vegaEmbed');\n })\n .then(name => {\n vegaEmbed = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\n/**\n * render VegaEmbed graphs\n */\nfunction renderVega(element, options, scripts, isVegaLite) {\n const meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return Promise.resolve(false);\n }\n\n const config = JSON.stringify(options); \n const data = JSON.stringify(JSON.parse(meta.data));\n const id = meta.id;\n const script = {\n id: id,\n code: `(function() {\n let el = document.getElementById('${id}');\n if (el){\n vegaEmbed(el, JSON.parse('${data}'), JSON.parse('${config}'));\n }\n })();`\n }\n scripts.push(script);\n return new Promise(resolve => {\n onRenderVega(resolve, meta);\n });\n}\n\n//
    \nfunction renderVegaElements(vegaElements, vegaLiteElements, scripts, options) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n vegaElements.forEach(element => {\n promiseArray.push(renderVega(element, options, scripts, false));\n });\n vegaLiteElements.forEach(element => {\n promiseArray.push(renderVega(element, options, scripts, true));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// theme: 'excel' | 'ggplot2' | 'quartz' | 'vox' | 'dark'\nconst getOptions = (userOptions = {}) => ({\n actions: { editor: false },\n theme: 'vox',\n tooltip: false,\n renderer: 'svg',\n ...userOptions\n});\n\nfunction onRenderVega(resolve, res) {\n if (hasVegaEmbed()) {\n const id = res.id;\n const name = res.className;\n const node = res.element.parentNode;\n node.outerHTML = `
    `;\n return resolve(true);\n }\n \n setTimeout(() => {\n onRenderVega(resolve, res);\n }, 10);\n}\n\nfunction showdownVega(userOptions) {\n const options = getOptions(userOptions);\n\n return [\n {\n type: 'output',\n config: options,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n\n // find the VegaEmbed in code blocks\n const vegaElements = wrapper.querySelectorAll('code.vega.language-vega');\n const vegaLiteElements = wrapper.querySelectorAll('code.vega-lite.language-vega-lite');\n if (!vegaElements.length && !vegaLiteElements.length) {\n return false;\n }\n\n const scripts = obj.scripts; \n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render vega elements.`);\n return renderVegaElements(vegaElements, vegaLiteElements, scripts, this.config).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render vega elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownVega;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown align extension for markdown\n */\n'use strict';\n\nfunction renderAlignElements(wrapper) {\n let element = null;\n let childNode = null;\n let result = false;\n const elements = wrapper.querySelectorAll('p, li, h1, h2, h3, h4, h5, h6, div.paragraph');\n for (let i = 0; i < elements.length; i++) {\n element = elements[i];\n childNode = element.firstChild;\n while (childNode) {\n // Text node type is 3.\n if (childNode.nodeType === 3) {\n // Does the element consist of ':-:' or '--:'\n let results = childNode.nodeValue.match(/^([\\s\\S]*?)([:-]-:)(?:[\\s]?)([\\s\\S]*)$/);\n if (results) {\n if (results[2] === ':-:') {\n // align-center\n childNode.nodeValue = results[3];\n if (element.className) {\n element.className += ` align-center`;\n } else {\n element.className = `align-center`;\n }\n result = true;\n } else if (results[2] === '--:') {\n //align-right\n childNode.nodeValue = results[3];\n if (element.className) {\n element.className += ` align-right`;\n } else {\n element.className = `align-right`;\n }\n result = true;\n }\n //default algin-left\n }\n break;\n }\n childNode = childNode.nextSibling;\n }\n }\n return result;\n}\n\nfunction showdownAlign() {\n const parser = new DOMParser();\n return [\n {\n type: 'output',\n filter: function(html) {\n // parse html\n const doc = parser.parseFromString(html, 'text/html');\n const wrapper = typeof doc.body !== 'undefined' ? doc.body : doc;\n if (!renderAlignElements(wrapper)) {\n return html;\n }\n // return html text content\n return wrapper.innerHTML;\n }\n }\n ];\n}\n\nexport default showdownAlign;\n","/*\nBased on ASCIIMathTeXImg.js but now part of https://github.com/jhuix/showdowns.git\n\nBased on ASCIIMathML, Version 1.4.7 Aug 30, 2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen\nModified with TeX conversion for IMG rendering Sept 6, 2006 (c) David Lippman http://www.pierce.ctc.edu/dlippman\n Updated to match ver 2.2 Mar 3, 2014\n Latest at https://github.com/mathjax/asciimathml\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\nvar config = {\n decimalsign: \".\" // change to \",\" if you like, beware of `(1,2)`!\n};\n\nvar CONST = 0,\n UNARY = 1,\n BINARY = 2,\n INFIX = 3,\n LEFTBRACKET = 4,\n RIGHTBRACKET = 5,\n SPACE = 6,\n UNDEROVER = 7,\n DEFINITION = 8,\n LEFTRIGHT = 9,\n TEXT = 10; // token types\n\nvar AMsqrt = { input: 'sqrt', tag: 'msqrt', output: 'sqrt', tex: null, ttype: UNARY },\n AMroot = { input: 'root', tag: 'mroot', output: 'root', tex: null, ttype: BINARY },\n AMfrac = { input: 'frac', tag: 'mfrac', output: '/', tex: null, ttype: BINARY },\n AMdiv = { input: '/', tag: 'mfrac', output: '/', tex: null, ttype: INFIX },\n AMover = { input: 'stackrel', tag: 'mover', output: 'stackrel', tex: null, ttype: BINARY },\n AMsub = { input: '_', tag: 'msub', output: '_', tex: null, ttype: INFIX },\n AMsup = { input: '^', tag: 'msup', output: '^', tex: null, ttype: INFIX },\n AMtext = { input: 'text', tag: 'mtext', output: 'text', tex: null, ttype: TEXT },\n AMmbox = { input: 'mbox', tag: 'mtext', output: 'mbox', tex: null, ttype: TEXT },\n AMquote = { input: '\"', tag: 'mtext', output: 'mbox', tex: null, ttype: TEXT };\n\nvar AMsymbols = [\n //some greek symbols\n { input: 'alpha', tag: 'mi', output: '\\u03B1', tex: null, ttype: CONST },\n { input: 'beta', tag: 'mi', output: '\\u03B2', tex: null, ttype: CONST },\n { input: 'chi', tag: 'mi', output: '\\u03C7', tex: null, ttype: CONST },\n { input: 'delta', tag: 'mi', output: '\\u03B4', tex: null, ttype: CONST },\n { input: 'Delta', tag: 'mo', output: '\\u0394', tex: null, ttype: CONST },\n { input: 'epsi', tag: 'mi', output: '\\u03B5', tex: 'epsilon', ttype: CONST },\n { input: 'varepsilon', tag: 'mi', output: '\\u025B', tex: null, ttype: CONST },\n { input: 'eta', tag: 'mi', output: '\\u03B7', tex: null, ttype: CONST },\n { input: 'gamma', tag: 'mi', output: '\\u03B3', tex: null, ttype: CONST },\n { input: 'Gamma', tag: 'mo', output: '\\u0393', tex: null, ttype: CONST },\n { input: 'iota', tag: 'mi', output: '\\u03B9', tex: null, ttype: CONST },\n { input: 'kappa', tag: 'mi', output: '\\u03BA', tex: null, ttype: CONST },\n { input: 'lambda', tag: 'mi', output: '\\u03BB', tex: null, ttype: CONST },\n { input: 'Lambda', tag: 'mo', output: '\\u039B', tex: null, ttype: CONST },\n { input: 'lamda', tag: 'mi', output: 'lambda', tex: null, ttype: DEFINITION },\n { input: 'Lamda', tag: 'mi', output: 'Lambda', tex: null, ttype: DEFINITION },\n { input: 'mu', tag: 'mi', output: '\\u03BC', tex: null, ttype: CONST },\n { input: 'nu', tag: 'mi', output: '\\u03BD', tex: null, ttype: CONST },\n { input: 'omega', tag: 'mi', output: '\\u03C9', tex: null, ttype: CONST },\n { input: 'Omega', tag: 'mo', output: '\\u03A9', tex: null, ttype: CONST },\n { input: 'phi', tag: 'mi', output: '\\u03C6', tex: null, ttype: CONST },\n { input: 'varphi', tag: 'mi', output: '\\u03D5', tex: null, ttype: CONST },\n { input: 'Phi', tag: 'mo', output: '\\u03A6', tex: null, ttype: CONST },\n { input: 'pi', tag: 'mi', output: '\\u03C0', tex: null, ttype: CONST },\n { input: 'Pi', tag: 'mo', output: '\\u03A0', tex: null, ttype: CONST },\n { input: 'psi', tag: 'mi', output: '\\u03C8', tex: null, ttype: CONST },\n { input: 'Psi', tag: 'mi', output: '\\u03A8', tex: null, ttype: CONST },\n { input: 'rho', tag: 'mi', output: '\\u03C1', tex: null, ttype: CONST },\n { input: 'sigma', tag: 'mi', output: '\\u03C3', tex: null, ttype: CONST },\n { input: 'Sigma', tag: 'mo', output: '\\u03A3', tex: null, ttype: CONST },\n { input: 'tau', tag: 'mi', output: '\\u03C4', tex: null, ttype: CONST },\n { input: 'theta', tag: 'mi', output: '\\u03B8', tex: null, ttype: CONST },\n { input: 'vartheta', tag: 'mi', output: '\\u03D1', tex: null, ttype: CONST },\n { input: 'Theta', tag: 'mo', output: '\\u0398', tex: null, ttype: CONST },\n { input: 'upsilon', tag: 'mi', output: '\\u03C5', tex: null, ttype: CONST },\n { input: 'xi', tag: 'mi', output: '\\u03BE', tex: null, ttype: CONST },\n { input: 'Xi', tag: 'mo', output: '\\u039E', tex: null, ttype: CONST },\n { input: 'zeta', tag: 'mi', output: '\\u03B6', tex: null, ttype: CONST },\n\n //binary operation symbols\n { input: '*', tag: 'mo', output: '\\u22C5', tex: 'cdot', ttype: CONST },\n { input: '**', tag: 'mo', output: '\\u2217', tex: 'ast', ttype: CONST },\n { input: '***', tag: 'mo', output: '\\u22C6', tex: 'star', ttype: CONST },\n { input: '//', tag: 'mo', output: '/', tex: '/', ttype: CONST, val: true, notexcopy: true },\n { input: '\\\\\\\\', tag: 'mo', output: '\\\\', tex: 'backslash', ttype: CONST },\n { input: 'setminus', tag: 'mo', output: '\\\\', tex: null, ttype: CONST },\n { input: 'xx', tag: 'mo', output: '\\u00D7', tex: 'times', ttype: CONST },\n { input: '|><', tag: 'mo', output: '\\u22C9', tex: 'ltimes', ttype: CONST },\n { input: '><|', tag: 'mo', output: '\\u22CA', tex: 'rtimes', ttype: CONST },\n { input: '|><|', tag: 'mo', output: '\\u22C8', tex: 'bowtie', ttype: CONST },\n { input: '-:', tag: 'mo', output: '\\u00F7', tex: 'div', ttype: CONST },\n { input: 'divide', tag: 'mo', output: '-:', tex: null, ttype: DEFINITION },\n { input: '@', tag: 'mo', output: '\\u2218', tex: 'circ', ttype: CONST },\n { input: 'o+', tag: 'mo', output: '\\u2295', tex: 'oplus', ttype: CONST },\n { input: 'ox', tag: 'mo', output: '\\u2297', tex: 'otimes', ttype: CONST },\n { input: 'o.', tag: 'mo', output: '\\u2299', tex: 'odot', ttype: CONST },\n { input: 'sum', tag: 'mo', output: '\\u2211', tex: null, ttype: UNDEROVER },\n { input: 'prod', tag: 'mo', output: '\\u220F', tex: null, ttype: UNDEROVER },\n { input: '^^', tag: 'mo', output: '\\u2227', tex: 'wedge', ttype: CONST },\n { input: '^^^', tag: 'mo', output: '\\u22C0', tex: 'bigwedge', ttype: UNDEROVER },\n { input: 'vv', tag: 'mo', output: '\\u2228', tex: 'vee', ttype: CONST },\n { input: 'vvv', tag: 'mo', output: '\\u22C1', tex: 'bigvee', ttype: UNDEROVER },\n { input: 'nn', tag: 'mo', output: '\\u2229', tex: 'cap', ttype: CONST },\n { input: 'nnn', tag: 'mo', output: '\\u22C2', tex: 'bigcap', ttype: UNDEROVER },\n { input: 'uu', tag: 'mo', output: '\\u222A', tex: 'cup', ttype: CONST },\n { input: 'uuu', tag: 'mo', output: '\\u22C3', tex: 'bigcup', ttype: UNDEROVER },\n { input: 'overset', tag: 'mover', output: 'stackrel', tex: null, ttype: BINARY },\n { input: 'underset', tag: 'munder', output: 'stackrel', tex: null, ttype: BINARY },\n\n //binary relation symbols\n { input: '!=', tag: 'mo', output: '\\u2260', tex: 'ne', ttype: CONST },\n { input: ':=', tag: 'mo', output: ':=', tex: null, ttype: CONST },\n { input: 'lt', tag: 'mo', output: '<', tex: null, ttype: CONST },\n { input: 'gt', tag: 'mo', output: '>', tex: null, ttype: CONST },\n { input: '<=', tag: 'mo', output: '\\u2264', tex: 'le', ttype: CONST },\n { input: 'lt=', tag: 'mo', output: '\\u2264', tex: 'leq', ttype: CONST },\n { input: 'gt=', tag: 'mo', output: '\\u2265', tex: 'geq', ttype: CONST },\n { input: '>=', tag: 'mo', output: '\\u2265', tex: 'ge', ttype: CONST },\n { input: '-<', tag: 'mo', output: '\\u227A', tex: 'prec', ttype: CONST },\n { input: '-lt', tag: 'mo', output: '\\u227A', tex: null, ttype: CONST },\n { input: '>-', tag: 'mo', output: '\\u227B', tex: 'succ', ttype: CONST },\n { input: '-<=', tag: 'mo', output: '\\u2AAF', tex: 'preceq', ttype: CONST },\n { input: '>-=', tag: 'mo', output: '\\u2AB0', tex: 'succeq', ttype: CONST },\n { input: 'in', tag: 'mo', output: '\\u2208', tex: null, ttype: CONST },\n { input: '!in', tag: 'mo', output: '\\u2209', tex: 'notin', ttype: CONST },\n { input: 'sub', tag: 'mo', output: '\\u2282', tex: 'subset', ttype: CONST },\n { input: 'sup', tag: 'mo', output: '\\u2283', tex: 'supset', ttype: CONST },\n { input: 'sube', tag: 'mo', output: '\\u2286', tex: 'subseteq', ttype: CONST },\n { input: 'supe', tag: 'mo', output: '\\u2287', tex: 'supseteq', ttype: CONST },\n { input: '-=', tag: 'mo', output: '\\u2261', tex: 'equiv', ttype: CONST },\n { input: '~=', tag: 'mo', output: '\\u2245', tex: 'stackrel{\\\\sim}{=}', notexcopy: true, ttype: CONST }, //back hack b/c mimetex doesn't support /cong\n { input: 'cong', tag: 'mo', output: '~=', tex: null, ttype: DEFINITION },\n { input: '~~', tag: 'mo', output: '\\u2248', tex: 'approx', ttype: CONST },\n { input: 'prop', tag: 'mo', output: '\\u221D', tex: 'propto', ttype: CONST },\n\n //logical symbols\n { input: 'and', tag: 'mtext', output: 'and', tex: null, ttype: SPACE },\n { input: 'or', tag: 'mtext', output: 'or', tex: null, ttype: SPACE },\n { input: 'not', tag: 'mo', output: '\\u00AC', tex: 'neg', ttype: CONST },\n { input: '=>', tag: 'mo', output: '\\u21D2', tex: 'Rightarrow', ttype: CONST },\n { input: 'implies', tag: 'mo', output: '=>', tex: null, ttype: DEFINITION },\n { input: 'if', tag: 'mo', output: 'if', tex: null, ttype: SPACE },\n { input: '<=>', tag: 'mo', output: '\\u21D4', tex: 'Leftrightarrow', ttype: CONST },\n { input: 'iff', tag: 'mo', output: '<=>', tex: null, ttype: DEFINITION },\n { input: 'AA', tag: 'mo', output: '\\u2200', tex: 'forall', ttype: CONST },\n { input: 'EE', tag: 'mo', output: '\\u2203', tex: 'exists', ttype: CONST },\n { input: '_|_', tag: 'mo', output: '\\u22A5', tex: 'bot', ttype: CONST },\n { input: 'TT', tag: 'mo', output: '\\u22A4', tex: 'top', ttype: CONST },\n { input: '|--', tag: 'mo', output: '\\u22A2', tex: 'vdash', ttype: CONST },\n { input: '|==', tag: 'mo', output: '\\u22A8', tex: 'models', ttype: CONST }, //mimetex doesn't support\n\n //grouping brackets\n { input: '(', tag: 'mo', output: '(', tex: null, ttype: LEFTBRACKET, val: true },\n { input: ')', tag: 'mo', output: ')', tex: null, ttype: RIGHTBRACKET, val: true },\n { input: '[', tag: 'mo', output: '[', tex: null, ttype: LEFTBRACKET, val: true },\n { input: ']', tag: 'mo', output: ']', tex: null, ttype: RIGHTBRACKET, val: true },\n { input: 'left(', tag: 'mo', output: '(', tex: '(', notexcopy: true, ttype: LEFTBRACKET, val: true },\n { input: 'right)', tag: 'mo', output: ')', tex: ')', notexcopy: true, ttype: RIGHTBRACKET, val: true },\n { input: 'left[', tag: 'mo', output: '[', tex: '[', notexcopy: true, ttype: LEFTBRACKET, val: true },\n { input: 'right]', tag: 'mo', output: ']', tex: ']', notexcopy: true, ttype: RIGHTBRACKET, val: true },\n { input: '{', tag: 'mo', output: '{', tex: 'lbrace', ttype: LEFTBRACKET },\n { input: '}', tag: 'mo', output: '}', tex: 'rbrace', ttype: RIGHTBRACKET },\n { input: '|', tag: 'mo', output: '|', tex: null, ttype: LEFTRIGHT, val: true },\n { input: '|:', tag: 'mo', output: '|', tex: '|', ttype: LEFTBRACKET, notexcopy: true, val: true },\n { input: ':|', tag: 'mo', output: '|', tex: '|', ttype: RIGHTBRACKET, notexcopy: true, val: true },\n { input: ':|:', tag: 'mo', output: '|', tex: '|', ttype: CONST, notexcopy: true, val: true },\n //{input:\"||\", tag:\"mo\", output:\"||\", tex:null, ttype:LEFTRIGHT},\n { input: '(:', tag: 'mo', output: '\\u2329', tex: 'langle', ttype: LEFTBRACKET },\n { input: ':)', tag: 'mo', output: '\\u232A', tex: 'rangle', ttype: RIGHTBRACKET },\n { input: '<<', tag: 'mo', output: '\\u2329', tex: 'langle', ttype: LEFTBRACKET },\n { input: '>>', tag: 'mo', output: '\\u232A', tex: 'rangle', ttype: RIGHTBRACKET },\n { input: '{:', tag: 'mo', output: '{:', tex: null, ttype: LEFTBRACKET, invisible: true },\n { input: ':}', tag: 'mo', output: ':}', tex: null, ttype: RIGHTBRACKET, invisible: true },\n\n //miscellaneous symbols\n { input: 'int', tag: 'mo', output: '\\u222B', tex: null, ttype: CONST },\n { input: 'dx', tag: 'mi', output: '{:d x:}', tex: null, ttype: DEFINITION },\n { input: 'dy', tag: 'mi', output: '{:d y:}', tex: null, ttype: DEFINITION },\n { input: 'dz', tag: 'mi', output: '{:d z:}', tex: null, ttype: DEFINITION },\n { input: 'dt', tag: 'mi', output: '{:d t:}', tex: null, ttype: DEFINITION },\n { input: 'oint', tag: 'mo', output: '\\u222E', tex: null, ttype: CONST },\n { input: 'del', tag: 'mo', output: '\\u2202', tex: 'partial', ttype: CONST },\n { input: 'grad', tag: 'mo', output: '\\u2207', tex: 'nabla', ttype: CONST },\n { input: '+-', tag: 'mo', output: '\\u00B1', tex: 'pm', ttype: CONST },\n { input: 'O/', tag: 'mo', output: '\\u2205', tex: 'emptyset', ttype: CONST },\n { input: 'oo', tag: 'mo', output: '\\u221E', tex: 'infty', ttype: CONST },\n { input: 'aleph', tag: 'mo', output: '\\u2135', tex: null, ttype: CONST },\n { input: '...', tag: 'mo', output: '...', tex: 'ldots', ttype: CONST },\n { input: ':.', tag: 'mo', output: '\\u2234', tex: 'therefore', ttype: CONST },\n { input: \":'\", tag: 'mo', output: '\\u2235', tex: 'because', ttype: CONST },\n { input: '/_', tag: 'mo', output: '\\u2220', tex: 'angle', ttype: CONST },\n { input: '/_\\\\', tag: 'mo', output: '\\u25B3', tex: 'triangle', ttype: CONST },\n { input: '\\\\ ', tag: 'mo', output: '\\u00A0', tex: null, ttype: CONST, val: true },\n { input: 'frown', tag: 'mo', output: '\\u2322', tex: null, ttype: CONST },\n { input: '%', tag: 'mo', output: '%', tex: '%', ttype: CONST, notexcopy: true },\n { input: 'quad', tag: 'mo', output: '\\u00A0\\u00A0', tex: null, ttype: CONST },\n { input: 'qquad', tag: 'mo', output: '\\u00A0\\u00A0\\u00A0\\u00A0', tex: null, ttype: CONST },\n { input: 'cdots', tag: 'mo', output: '\\u22EF', tex: null, ttype: CONST },\n { input: 'vdots', tag: 'mo', output: '\\u22EE', tex: null, ttype: CONST },\n { input: 'ddots', tag: 'mo', output: '\\u22F1', tex: null, ttype: CONST },\n { input: 'diamond', tag: 'mo', output: '\\u22C4', tex: null, ttype: CONST },\n { input: 'square', tag: 'mo', output: '\\u25A1', tex: 'boxempty', ttype: CONST },\n { input: '|__', tag: 'mo', output: '\\u230A', tex: 'lfloor', ttype: CONST },\n { input: '__|', tag: 'mo', output: '\\u230B', tex: 'rfloor', ttype: CONST },\n { input: '|~', tag: 'mo', output: '\\u2308', tex: 'lceil', ttype: CONST },\n { input: 'lceiling', tag: 'mo', output: '|~', tex: null, ttype: DEFINITION },\n { input: '~|', tag: 'mo', output: '\\u2309', tex: 'rceil', ttype: CONST },\n { input: 'rceiling', tag: 'mo', output: '~|', tex: null, ttype: DEFINITION },\n { input: 'CC', tag: 'mo', output: '\\u2102', tex: 'mathbb{C}', ttype: CONST, notexcopy: true },\n { input: 'NN', tag: 'mo', output: '\\u2115', tex: 'mathbb{N}', ttype: CONST, notexcopy: true },\n { input: 'QQ', tag: 'mo', output: '\\u211A', tex: 'mathbb{Q}', ttype: CONST, notexcopy: true },\n { input: 'RR', tag: 'mo', output: '\\u211D', tex: 'mathbb{R}', ttype: CONST, notexcopy: true },\n { input: 'ZZ', tag: 'mo', output: '\\u2124', tex: 'mathbb{Z}', ttype: CONST, notexcopy: true },\n { input: 'f', tag: 'mi', output: 'f', tex: null, ttype: UNARY, func: true, val: true },\n { input: 'g', tag: 'mi', output: 'g', tex: null, ttype: UNARY, func: true, val: true },\n { input: \"''\", tag: 'mo', output: \"''\", tex: null, val: true },\n { input: \"'''\", tag: 'mo', output: \"'''\", tex: null, val: true },\n { input: \"''''\", tag: 'mo', output: \"''''\", tex: null, val: true },\n\n //standard functions\n { input: 'lim', tag: 'mo', output: 'lim', tex: null, ttype: UNDEROVER },\n { input: 'Lim', tag: 'mo', output: 'Lim', tex: null, ttype: UNDEROVER },\n { input: 'sin', tag: 'mo', output: 'sin', tex: null, ttype: UNARY, func: true },\n { input: 'cos', tag: 'mo', output: 'cos', tex: null, ttype: UNARY, func: true },\n { input: 'tan', tag: 'mo', output: 'tan', tex: null, ttype: UNARY, func: true },\n { input: 'arcsin', tag: 'mo', output: 'arcsin', tex: null, ttype: UNARY, func: true },\n { input: 'arccos', tag: 'mo', output: 'arccos', tex: null, ttype: UNARY, func: true },\n { input: 'arctan', tag: 'mo', output: 'arctan', tex: null, ttype: UNARY, func: true },\n { input: 'sinh', tag: 'mo', output: 'sinh', tex: null, ttype: UNARY, func: true },\n { input: 'cosh', tag: 'mo', output: 'cosh', tex: null, ttype: UNARY, func: true },\n { input: 'tanh', tag: 'mo', output: 'tanh', tex: null, ttype: UNARY, func: true },\n { input: 'cot', tag: 'mo', output: 'cot', tex: null, ttype: UNARY, func: true },\n { input: 'coth', tag: 'mo', output: 'coth', tex: null, ttype: UNARY, func: true },\n { input: 'sech', tag: 'mo', output: 'sech', tex: null, ttype: UNARY, func: true },\n { input: 'csch', tag: 'mo', output: 'csch', tex: null, ttype: UNARY, func: true },\n { input: 'sec', tag: 'mo', output: 'sec', tex: null, ttype: UNARY, func: true },\n { input: 'csc', tag: 'mo', output: 'csc', tex: null, ttype: UNARY, func: true },\n { input: 'log', tag: 'mo', output: 'log', tex: null, ttype: UNARY, func: true },\n { input: 'ln', tag: 'mo', output: 'ln', tex: null, ttype: UNARY, func: true },\n { input: 'abs', tag: 'mo', output: 'abs', tex: null, ttype: UNARY, notexcopy: true, rewriteleftright: ['|', '|'] },\n {\n input: 'norm',\n tag: 'mo',\n output: 'norm',\n tex: null,\n ttype: UNARY,\n notexcopy: true,\n rewriteleftright: ['\\\\|', '\\\\|']\n },\n {\n input: 'floor',\n tag: 'mo',\n output: 'floor',\n tex: null,\n ttype: UNARY,\n notexcopy: true,\n rewriteleftright: ['\\\\lfloor', '\\\\rfloor']\n },\n {\n input: 'ceil',\n tag: 'mo',\n output: 'ceil',\n tex: null,\n ttype: UNARY,\n notexcopy: true,\n rewriteleftright: ['\\\\lceil', '\\\\rceil']\n },\n { input: 'Sin', tag: 'mo', output: 'Sin', tex: null, ttype: UNARY, func: true },\n { input: 'Cos', tag: 'mo', output: 'Cos', tex: null, ttype: UNARY, func: true },\n { input: 'Tan', tag: 'mo', output: 'Tan', tex: null, ttype: UNARY, func: true },\n { input: 'Arcsin', tag: 'mo', output: 'Arcsin', tex: null, ttype: UNARY, func: true },\n { input: 'Arccos', tag: 'mo', output: 'Arccos', tex: null, ttype: UNARY, func: true },\n { input: 'Arctan', tag: 'mo', output: 'Arctan', tex: null, ttype: UNARY, func: true },\n { input: 'Sinh', tag: 'mo', output: 'Sinh', tex: null, ttype: UNARY, func: true },\n { input: 'Cosh', tag: 'mo', output: 'Cosh', tex: null, ttype: UNARY, func: true },\n { input: 'Tanh', tag: 'mo', output: 'Tanh', tex: null, ttype: UNARY, func: true },\n { input: 'Cot', tag: 'mo', output: 'Cot', tex: null, ttype: UNARY, func: true },\n { input: 'Sec', tag: 'mo', output: 'Sec', tex: null, ttype: UNARY, func: true },\n { input: 'Csc', tag: 'mo', output: 'Csc', tex: null, ttype: UNARY, func: true },\n { input: 'Log', tag: 'mo', output: 'Log', tex: null, ttype: UNARY, func: true },\n { input: 'Ln', tag: 'mo', output: 'Ln', tex: null, ttype: UNARY, func: true },\n { input: 'Abs', tag: 'mo', output: 'abs', tex: null, ttype: UNARY, notexcopy: true, rewriteleftright: ['|', '|'] },\n\n { input: 'det', tag: 'mo', output: 'det', tex: null, ttype: UNARY, func: true },\n { input: 'exp', tag: 'mo', output: 'exp', tex: null, ttype: UNARY, func: true },\n { input: 'dim', tag: 'mo', output: 'dim', tex: null, ttype: CONST },\n { input: 'mod', tag: 'mo', output: 'mod', tex: 'text{mod}', ttype: CONST, notexcopy: true },\n { input: 'gcd', tag: 'mo', output: 'gcd', tex: null, ttype: UNARY, func: true },\n { input: 'lcm', tag: 'mo', output: 'lcm', tex: 'text{lcm}', ttype: UNARY, func: true, notexcopy: true },\n { input: 'lub', tag: 'mo', output: 'lub', tex: null, ttype: CONST },\n { input: 'glb', tag: 'mo', output: 'glb', tex: null, ttype: CONST },\n { input: 'min', tag: 'mo', output: 'min', tex: null, ttype: UNDEROVER },\n { input: 'max', tag: 'mo', output: 'max', tex: null, ttype: UNDEROVER },\n\n //arrows\n { input: 'uarr', tag: 'mo', output: '\\u2191', tex: 'uparrow', ttype: CONST },\n { input: 'darr', tag: 'mo', output: '\\u2193', tex: 'downarrow', ttype: CONST },\n { input: 'rarr', tag: 'mo', output: '\\u2192', tex: 'rightarrow', ttype: CONST },\n { input: '->', tag: 'mo', output: '\\u2192', tex: 'to', ttype: CONST },\n { input: '>->', tag: 'mo', output: '\\u21A3', tex: 'rightarrowtail', ttype: CONST },\n { input: '->>', tag: 'mo', output: '\\u21A0', tex: 'twoheadrightarrow', ttype: CONST },\n { input: '>->>', tag: 'mo', output: '\\u2916', tex: 'twoheadrightarrowtail', ttype: CONST },\n { input: '|->', tag: 'mo', output: '\\u21A6', tex: 'mapsto', ttype: CONST },\n { input: 'larr', tag: 'mo', output: '\\u2190', tex: 'leftarrow', ttype: CONST },\n { input: 'harr', tag: 'mo', output: '\\u2194', tex: 'leftrightarrow', ttype: CONST },\n { input: 'rArr', tag: 'mo', output: '\\u21D2', tex: 'Rightarrow', ttype: CONST },\n { input: 'lArr', tag: 'mo', output: '\\u21D0', tex: 'Leftarrow', ttype: CONST },\n { input: 'hArr', tag: 'mo', output: '\\u21D4', tex: 'Leftrightarrow', ttype: CONST },\n\n //commands with argument\n AMsqrt,\n AMroot,\n AMfrac,\n AMdiv,\n AMover,\n AMsub,\n AMsup,\n { input: 'cancel', tag: 'menclose', output: 'cancel', tex: null, ttype: UNARY },\n { input: 'Sqrt', tag: 'msqrt', output: 'sqrt', tex: null, ttype: UNARY },\n { input: 'hat', tag: 'mover', output: '\\u005E', tex: null, ttype: UNARY, acc: true },\n { input: 'bar', tag: 'mover', output: '\\u00AF', tex: 'overline', ttype: UNARY, acc: true },\n { input: 'vec', tag: 'mover', output: '\\u2192', tex: null, ttype: UNARY, acc: true },\n { input: 'tilde', tag: 'mover', output: '~', tex: null, ttype: UNARY, acc: true },\n { input: 'dot', tag: 'mover', output: '.', tex: null, ttype: UNARY, acc: true },\n { input: 'ddot', tag: 'mover', output: '..', tex: null, ttype: UNARY, acc: true },\n {\n input: 'overarc',\n tag: 'mover',\n output: '\\u23DC',\n tex: 'stackrel{\\\\frown}',\n notexcopy: true,\n ttype: UNARY,\n acc: true\n },\n {\n input: 'overparen',\n tag: 'mover',\n output: '\\u23DC',\n tex: 'stackrel{\\\\frown}',\n notexcopy: true,\n ttype: UNARY,\n acc: true\n },\n { input: 'ul', tag: 'munder', output: '\\u0332', tex: 'underline', ttype: UNARY, acc: true },\n { input: 'ubrace', tag: 'munder', output: '\\u23DF', tex: 'underbrace', ttype: UNARY, acc: true },\n { input: 'obrace', tag: 'mover', output: '\\u23DE', tex: 'overbrace', ttype: UNARY, acc: true },\n AMtext,\n AMmbox,\n AMquote,\n //{input:\"var\", tag:\"mstyle\", atname:\"fontstyle\", atval:\"italic\", output:\"var\", tex:null, ttype:UNARY},\n { input: 'color', tag: 'mstyle', ttype: BINARY },\n {\n input: 'bb',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'bold',\n output: 'bb',\n tex: 'mathbf',\n ttype: UNARY,\n notexcopy: true\n },\n { input: 'mathbf', tag: 'mstyle', atname: 'mathvariant', atval: 'bold', output: 'mathbf', tex: null, ttype: UNARY },\n {\n input: 'sf',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'sans-serif',\n output: 'sf',\n tex: 'mathsf',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathsf',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'sans-serif',\n output: 'mathsf',\n tex: null,\n ttype: UNARY\n },\n {\n input: 'bbb',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'double-struck',\n output: 'bbb',\n tex: 'mathbb',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathbb',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'double-struck',\n output: 'mathbb',\n tex: null,\n ttype: UNARY\n },\n {\n input: 'cc',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'script',\n output: 'cc',\n tex: 'mathcal',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathcal',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'script',\n output: 'mathcal',\n tex: null,\n ttype: UNARY\n },\n {\n input: 'tt',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'monospace',\n output: 'tt',\n tex: 'mathtt',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathtt',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'monospace',\n output: 'mathtt',\n tex: null,\n ttype: UNARY\n },\n {\n input: 'fr',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'fraktur',\n output: 'fr',\n tex: 'mathfrak',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathfrak',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'fraktur',\n output: 'mathfrak',\n tex: null,\n ttype: UNARY\n }\n];\n\nfunction compareNames(s1, s2) {\n if (s1.input > s2.input) return 1;\n else return -1;\n}\n\nvar AMnames = []; //list of input symbols\n\nfunction AMinitSymbols() {\n var i;\n var symlen = AMsymbols.length;\n for (i = 0; i < symlen; i++) {\n if (AMsymbols[i].tex && !(typeof AMsymbols[i].notexcopy == 'boolean' && AMsymbols[i].notexcopy)) {\n AMsymbols.push({\n input: AMsymbols[i].tex,\n tag: AMsymbols[i].tag,\n output: AMsymbols[i].output,\n ttype: AMsymbols[i].ttype,\n acc: AMsymbols[i].acc || false\n });\n }\n }\n refreshSymbols();\n}\n\nfunction refreshSymbols() {\n var i;\n AMsymbols.sort(compareNames);\n for (i = 0; i < AMsymbols.length; i++) AMnames[i] = AMsymbols[i].input;\n}\n\nfunction AMremoveCharsAndBlanks(str, n) {\n //remove n characters and any following blanks\n var st;\n if (str.charAt(n) == '\\\\' && str.charAt(n + 1) != '\\\\' && str.charAt(n + 1) != ' ') st = str.slice(n + 1);\n else st = str.slice(n);\n for (var i = 0; i < st.length && st.charCodeAt(i) <= 32; i = i + 1);\n return st.slice(i);\n}\n\nfunction AMposition(arr, str, n) {\n // return position >=n where str appears or would be inserted\n // assumes arr is sorted\n if (n == 0) {\n var h, m;\n n = -1;\n h = arr.length;\n while (n + 1 < h) {\n m = (n + h) >> 1;\n if (arr[m] < str) n = m;\n else h = m;\n }\n return h;\n } else for (var i = n; i < arr.length && arr[i] < str; i++);\n return i; // i=arr.length || arr[i]>=str\n}\n\nfunction AMgetSymbol(str) {\n //return maximal initial substring of str that appears in names\n //return null if there is none\n var k = 0; //new pos\n var j = 0; //old pos\n var mk; //match pos\n var st;\n var tagst;\n var match = '';\n var more = true;\n for (var i = 1; i <= str.length && more; i++) {\n st = str.slice(0, i); //initial substring of length i\n j = k;\n k = AMposition(AMnames, st, j);\n if (k < AMnames.length && str.slice(0, AMnames[k].length) == AMnames[k]) {\n match = AMnames[k];\n mk = k;\n i = match.length;\n }\n more = k < AMnames.length && str.slice(0, AMnames[k].length) >= AMnames[k];\n }\n AMpreviousSymbol = AMcurrentSymbol;\n if (match != '') {\n AMcurrentSymbol = AMsymbols[mk].ttype;\n return AMsymbols[mk];\n }\n // if str[0] is a digit or - return maxsubstring of digits.digits\n AMcurrentSymbol = CONST;\n k = 1;\n st = str.slice(0, 1);\n var integ = true;\n\n while ('0' <= st && st <= '9' && k <= str.length) {\n st = str.slice(k, k + 1);\n k++;\n }\n if (st == config.decimalsign) {\n st = str.slice(k, k + 1);\n if ('0' <= st && st <= '9') {\n integ = false;\n k++;\n while ('0' <= st && st <= '9' && k <= str.length) {\n st = str.slice(k, k + 1);\n k++;\n }\n }\n }\n if ((integ && k > 1) || k > 2) {\n st = str.slice(0, k - 1);\n tagst = 'mn';\n } else {\n k = 2;\n st = str.slice(0, 1); //take 1 character\n tagst = ('A' > st || st > 'Z') && ('a' > st || st > 'z') ? 'mo' : 'mi';\n }\n if (st == '-' && AMpreviousSymbol == INFIX) {\n AMcurrentSymbol = INFIX;\n return { input: st, tag: tagst, output: st, ttype: UNARY, func: true, val: true };\n }\n return { input: st, tag: tagst, output: st, ttype: CONST, val: true }; //added val bit\n}\n\nfunction AMTremoveBrackets(node) {\n var st;\n if (node.charAt(0) == '{' && node.charAt(node.length - 1) == '}') {\n var leftchop = 0;\n\n st = node.substr(1, 5);\n if (st == '\\\\left') {\n st = node.charAt(6);\n if (st == '(' || st == '[' || st == '{') {\n leftchop = 7;\n } else {\n st = node.substr(6, 7);\n if (st == '\\\\lbrace') {\n leftchop = 13;\n }\n }\n } else {\n st = node.charAt(1);\n if (st == '(' || st == '[') {\n leftchop = 2;\n }\n }\n if (leftchop > 0) {\n //st = node.charAt(node.length-7);\n st = node.substr(node.length - 8);\n if (st == '\\\\right)}' || st == '\\\\right]}' || st == '\\\\right.}') {\n node = '{' + node.substr(leftchop);\n node = node.substr(0, node.length - 8) + '}';\n } else if (st == '\\\\rbrace}') {\n node = '{' + node.substr(leftchop);\n node = node.substr(0, node.length - 14) + '}';\n }\n }\n }\n return node;\n}\n\n/*Parsing ASCII math expressions with the following grammar\nv ::= [A-Za-z] | greek letters | numbers | other constant symbols\nu ::= sqrt | text | bb | other unary symbols for font commands\nb ::= frac | root | stackrel binary symbols\nl ::= ( | [ | { | (: | {: left brackets\nr ::= ) | ] | } | :) | :} right brackets\nS ::= v | lEr | uS | bSS Simple expression\nI ::= S_S | S^S | S_S^S | S Intermediate expression\nE ::= IE | I/I Expression\nEach terminal symbol is translated into a corresponding mathml node.*/\n\nvar AMnestingDepth, AMpreviousSymbol, AMcurrentSymbol;\n\nfunction AMTgetTeXsymbol(symb) {\n var pre;\n if (typeof symb.val == 'boolean' && symb.val) {\n pre = '';\n } else {\n pre = '\\\\';\n }\n if (symb.tex == null) {\n //can't remember why this was here. Breaks /delta /Delta to removed\n //return (pre+(pre==''?symb.input:symb.input.toLowerCase()));\n return pre + symb.input;\n } else {\n return pre + symb.tex;\n }\n}\n\nfunction AMTparseSexpr(str) {\n //parses str and returns [node,tailstr]\n var symbol,\n node,\n result,\n i,\n st, // rightvert = false,\n newFrag = '';\n str = AMremoveCharsAndBlanks(str, 0);\n symbol = AMgetSymbol(str); //either a token or a bracket or empty\n if (symbol == null || (symbol.ttype == RIGHTBRACKET && AMnestingDepth > 0)) {\n return [null, str];\n }\n if (symbol.ttype == DEFINITION) {\n str = symbol.output + AMremoveCharsAndBlanks(str, symbol.input.length);\n symbol = AMgetSymbol(str);\n }\n switch (symbol.ttype) {\n case UNDEROVER:\n case CONST:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n var texsymbol = AMTgetTeXsymbol(symbol);\n if (texsymbol.charAt(0) == '\\\\' || symbol.tag == 'mo') return [texsymbol, str];\n else return ['{' + texsymbol + '}', str];\n\n case LEFTBRACKET: //read (expr+)\n AMnestingDepth++;\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n\n result = AMTparseExpr(str, true);\n AMnestingDepth--;\n var leftchop = 0;\n if (result[0].substr(0, 6) == '\\\\right') {\n st = result[0].charAt(6);\n if (st == ')' || st == ']' || st == '}') {\n leftchop = 6;\n } else if (st == '.') {\n leftchop = 7;\n } else {\n st = result[0].substr(6, 7);\n if (st == '\\\\rbrace') {\n leftchop = 13;\n }\n }\n }\n if (leftchop > 0) {\n result[0] = result[0].substr(leftchop);\n if (typeof symbol.invisible == 'boolean' && symbol.invisible) node = '{' + result[0] + '}';\n else {\n node = '{' + AMTgetTeXsymbol(symbol) + result[0] + '}';\n }\n } else {\n if (typeof symbol.invisible == 'boolean' && symbol.invisible) node = '{\\\\left.' + result[0] + '}';\n else {\n node = '{\\\\left' + AMTgetTeXsymbol(symbol) + result[0] + '}';\n }\n }\n return [node, result[1]];\n case TEXT:\n if (symbol != AMquote) str = AMremoveCharsAndBlanks(str, symbol.input.length);\n if (str.charAt(0) == '{') i = str.indexOf('}');\n else if (str.charAt(0) == '(') i = str.indexOf(')');\n else if (str.charAt(0) == '[') i = str.indexOf(']');\n else if (symbol == AMquote) i = str.slice(1).indexOf('\"') + 1;\n else i = 0;\n if (i == -1) i = str.length;\n st = str.slice(1, i);\n if (st.charAt(0) == ' ') {\n newFrag = '\\\\ ';\n }\n newFrag += '\\\\text{' + st + '}';\n if (st.charAt(st.length - 1) == ' ') {\n newFrag += '\\\\ ';\n }\n str = AMremoveCharsAndBlanks(str, i + 1);\n return [newFrag, str];\n case UNARY:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n result = AMTparseSexpr(str);\n if (result[0] == null) return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n if (typeof symbol.func == 'boolean' && symbol.func) {\n // functions hack\n st = str.charAt(0);\n if (\n st == '^' ||\n st == '_' ||\n st == '/' ||\n st == '|' ||\n st == ',' ||\n (symbol.input.length == 1 && symbol.input.match(/\\w/) && st != '(')\n ) {\n return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n } else {\n node = '{' + AMTgetTeXsymbol(symbol) + '{' + result[0] + '}}';\n return [node, result[1]];\n }\n }\n result[0] = AMTremoveBrackets(result[0]);\n if (symbol.input == 'sqrt') {\n // sqrt\n return ['\\\\sqrt{' + result[0] + '}', result[1]];\n } else if (symbol.input == 'cancel') {\n // cancel\n return ['\\\\cancel{' + result[0] + '}', result[1]];\n } else if (typeof symbol.rewriteleftright != 'undefined') {\n // abs, floor, ceil\n return [\n '{\\\\left' + symbol.rewriteleftright[0] + result[0] + '\\\\right' + symbol.rewriteleftright[1] + '}',\n result[1]\n ];\n } else if (typeof symbol.acc == 'boolean' && symbol.acc) {\n // accent\n //return ['{'+AMTgetTeXsymbol(symbol)+'{'+result[0]+'}}',result[1]];\n return [AMTgetTeXsymbol(symbol) + '{' + result[0] + '}', result[1]];\n } else {\n // font change command\n return ['{' + AMTgetTeXsymbol(symbol) + '{' + result[0] + '}}', result[1]];\n }\n case BINARY:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n result = AMTparseSexpr(str);\n if (result[0] == null) return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n result[0] = AMTremoveBrackets(result[0]);\n var result2 = AMTparseSexpr(result[1]);\n if (result2[0] == null) return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n result2[0] = AMTremoveBrackets(result2[0]);\n if (symbol.input == 'color') {\n newFrag = '{\\\\color{' + result[0].replace(/[\\{\\}]/g, '') + '}' + result2[0] + '}';\n } else if (symbol.input == 'root') {\n newFrag = '{\\\\sqrt[' + result[0] + ']{' + result2[0] + '}}';\n } else {\n newFrag = '{' + AMTgetTeXsymbol(symbol) + '{' + result[0] + '}{' + result2[0] + '}}';\n }\n return [newFrag, result2[1]];\n case INFIX:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n return [symbol.output, str];\n case SPACE:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n return ['{\\\\quad\\\\text{' + symbol.input + '}\\\\quad}', str];\n case LEFTRIGHT:\n // if (rightvert) return [null,str]; else rightvert = true;\n AMnestingDepth++;\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n result = AMTparseExpr(str, false);\n AMnestingDepth--;\n var st = '';\n st = result[0].charAt(result[0].length - 1);\n //alert(result[0].lastChild+\"***\"+st);\n if (st == '|' && str.charAt(0) !== ',') {\n // its an absolute value subterm\n node = '{\\\\left|' + result[0] + '}';\n return [node, result[1]];\n } else {\n // the \"|\" is a \\mid\n node = '{\\\\mid}';\n return [node, str];\n }\n\n default:\n //alert(\"default\");\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n }\n}\n\nfunction AMTparseIexpr(str) {\n var symbol, sym1, sym2, node, result;\n str = AMremoveCharsAndBlanks(str, 0);\n sym1 = AMgetSymbol(str);\n result = AMTparseSexpr(str);\n node = result[0];\n str = result[1];\n symbol = AMgetSymbol(str);\n if (symbol.ttype == INFIX && symbol.input != '/') {\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n // if (symbol.input == \"/\") result = AMTparseIexpr(str); else\n result = AMTparseSexpr(str);\n if (result[0] == null)\n // show box in place of missing argument\n result[0] = '{}';\n else result[0] = AMTremoveBrackets(result[0]);\n str = result[1];\n // if (symbol.input == \"/\") AMTremoveBrackets(node);\n if (symbol.input == '_') {\n sym2 = AMgetSymbol(str);\n if (sym2.input == '^') {\n str = AMremoveCharsAndBlanks(str, sym2.input.length);\n var res2 = AMTparseSexpr(str);\n res2[0] = AMTremoveBrackets(res2[0]);\n str = res2[1];\n node = '{' + node;\n node += '_{' + result[0] + '}';\n node += '^{' + res2[0] + '}';\n node += '}';\n } else {\n node += '_{' + result[0] + '}';\n }\n } else {\n //must be ^\n //node = '{'+node+'}^{'+result[0]+'}';\n node = node + '^{' + result[0] + '}';\n }\n if (typeof sym1.func != 'undefined' && sym1.func) {\n sym2 = AMgetSymbol(str);\n if (sym2.ttype != INFIX && sym2.ttype != RIGHTBRACKET && (sym1.input.length > 1 || sym2.ttype == LEFTBRACKET)) {\n result = AMTparseIexpr(str);\n node = '{' + node + result[0] + '}';\n str = result[1];\n }\n }\n }\n\n return [node, str];\n}\n\nfunction AMTparseExpr(str, rightbracket) {\n var symbol,\n node,\n result,\n i,\n nodeList = [],\n newFrag = '';\n var addedright = false;\n do {\n str = AMremoveCharsAndBlanks(str, 0);\n result = AMTparseIexpr(str);\n node = result[0];\n str = result[1];\n symbol = AMgetSymbol(str);\n if (symbol.ttype == INFIX && symbol.input == '/') {\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n result = AMTparseIexpr(str);\n\n if (result[0] == null)\n // show box in place of missing argument\n result[0] = '{}';\n else result[0] = AMTremoveBrackets(result[0]);\n str = result[1];\n node = AMTremoveBrackets(node);\n node = '\\\\frac' + '{' + node + '}';\n node += '{' + result[0] + '}';\n newFrag += node;\n symbol = AMgetSymbol(str);\n } else if (node != undefined) newFrag += node;\n } while (\n ((symbol.ttype != RIGHTBRACKET && (symbol.ttype != LEFTRIGHT || rightbracket)) || AMnestingDepth == 0) &&\n symbol != null &&\n symbol.output != ''\n );\n if (symbol.ttype == RIGHTBRACKET || symbol.ttype == LEFTRIGHT) {\n // if (AMnestingDepth > 0) AMnestingDepth--;\n var len = newFrag.length;\n if (len > 2 && newFrag.charAt(0) == '{' && newFrag.indexOf(',') > 0) {\n //could be matrix (total rewrite from .js)\n var right = newFrag.charAt(len - 2);\n if (right == ')' || right == ']') {\n var left = newFrag.charAt(6);\n if ((left == '(' && right == ')' && symbol.output != '}') || (left == '[' && right == ']')) {\n var mxout = '';\n var pos = new Array(); //position of commas\n pos.push(0);\n var matrix = true;\n var mxnestingd = 0;\n var subpos = [];\n subpos[0] = [0];\n var lastsubposstart = 0;\n var mxanynestingd = 0;\n var columnaligns = '';\n for (i = 1; i < len - 1; i++) {\n if (newFrag.charAt(i) == left) mxnestingd++;\n if (newFrag.charAt(i) == right) {\n mxnestingd--;\n if (mxnestingd == 0 && newFrag.charAt(i + 2) == ',' && newFrag.charAt(i + 3) == '{') {\n pos.push(i + 2);\n lastsubposstart = i + 2;\n subpos[lastsubposstart] = [i + 2];\n }\n }\n if (newFrag.charAt(i) == '[' || newFrag.charAt(i) == '(' || newFrag.charAt(i) == '{') {\n mxanynestingd++;\n }\n if (newFrag.charAt(i) == ']' || newFrag.charAt(i) == ')' || newFrag.charAt(i) == '}') {\n mxanynestingd--;\n }\n if (newFrag.charAt(i) == ',' && mxanynestingd == 1) {\n subpos[lastsubposstart].push(i);\n }\n if (mxanynestingd < 0) {\n //happens at the end of the row\n if (lastsubposstart == i + 1) {\n //if at end of row, skip to next row\n i++;\n } else {\n //misformed something - abandon treating as a matrix\n matrix = false;\n }\n }\n }\n\n pos.push(len);\n var lastmxsubcnt = -1;\n if (mxnestingd == 0 && pos.length > 0 && matrix) {\n for (i = 0; i < pos.length - 1; i++) {\n if (i > 0) mxout += '\\\\\\\\';\n if (i == 0) {\n //var subarr = newFrag.substr(pos[i]+7,pos[i+1]-pos[i]-15).split(',');\n if (subpos[pos[i]].length == 1) {\n var subarr = [newFrag.substr(pos[i] + 7, pos[i + 1] - pos[i] - 15)];\n } else {\n var subarr = [newFrag.substring(pos[i] + 7, subpos[pos[i]][1])];\n for (var j = 2; j < subpos[pos[i]].length; j++) {\n subarr.push(newFrag.substring(subpos[pos[i]][j - 1] + 1, subpos[pos[i]][j]));\n }\n subarr.push(newFrag.substring(subpos[pos[i]][subpos[pos[i]].length - 1] + 1, pos[i + 1] - 8));\n }\n } else {\n //var subarr = newFrag.substr(pos[i]+8,pos[i+1]-pos[i]-16).split(',');\n if (subpos[pos[i]].length == 1) {\n var subarr = [newFrag.substr(pos[i] + 8, pos[i + 1] - pos[i] - 16)];\n } else {\n var subarr = [newFrag.substring(pos[i] + 8, subpos[pos[i]][1])];\n for (var j = 2; j < subpos[pos[i]].length; j++) {\n subarr.push(newFrag.substring(subpos[pos[i]][j - 1] + 1, subpos[pos[i]][j]));\n }\n subarr.push(newFrag.substring(subpos[pos[i]][subpos[pos[i]].length - 1] + 1, pos[i + 1] - 8));\n }\n }\n for (j = subarr.length - 1; j >= 0; j--) {\n if (subarr[j] == '{\\\\mid}') {\n if (i == 0) {\n columnaligns = '|' + columnaligns;\n }\n subarr.splice(j, 1);\n } else if (i == 0) {\n columnaligns = 'c' + columnaligns;\n }\n }\n if (lastmxsubcnt > 0 && subarr.length != lastmxsubcnt) {\n matrix = false;\n } else if (lastmxsubcnt == -1) {\n lastmxsubcnt = subarr.length;\n }\n mxout += subarr.join('&');\n }\n }\n mxout = '\\\\begin{array}{' + columnaligns + '} ' + mxout + '\\\\end{array}';\n\n if (matrix) {\n newFrag = mxout;\n }\n }\n }\n }\n\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n if (typeof symbol.invisible != 'boolean' || !symbol.invisible) {\n node = '\\\\right' + AMTgetTeXsymbol(symbol); //AMcreateMmlNode(\"mo\",document.createTextNode(symbol.output));\n newFrag += node;\n addedright = true;\n } else {\n newFrag += '\\\\right.';\n addedright = true;\n }\n }\n if (AMnestingDepth > 0 && !addedright) {\n newFrag += '\\\\right.'; //adjust for non-matching left brackets\n //todo: adjust for non-matching right brackets\n }\n\n return [newFrag, str];\n}\n\nexport default function AMTparseAMtoTeX(str) {\n AMnestingDepth = 0;\n str = str.replace(/( |\\u00a0| )/g, '');\n str = str.replace(/>/g, '>');\n str = str.replace(/</g, '<');\n if (str.match(/\\S/) == null) {\n return '';\n }\n return AMTparseExpr(str.replace(/^\\s+/g, ''), false)[0];\n}\n\nAMinitSymbols();\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown katex extension for markdown\n */\n\nif (typeof window === 'undefined') {\n throw Error('The showdown katex extension can only be used in browser environment!');\n}\n\nimport asciimathToTex from './asciimath2tex';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof katex === 'undefined') {\n var katex = window.katex || undefined;\n}\n\nif (typeof renderMathInElement === 'undefined') {\n var RenderMathInElement = window.renderMathInElement || undefined;\n}\n\nlet katexElementCount = 0;\nfunction hasKatex() {\n return typeof RenderMathInElement !== 'undefined' && RenderMathInElement && typeof katex !== 'undefined' && katex\n ? true\n : false;\n}\n\nlet dync = false;\nconst cssCdnName = 'katexCSS';\nfunction dyncLoadScript(callback) {\n const sync = hasKatex();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs.loadStyleSheet(cssCdnName);\n cdnjs\n .loadScript('katex')\n .then(name => {\n katex = utils.interopDefault(window[name]);\n return cdnjs.loadScript('renderMathInElement');\n })\n .then(name => {\n RenderMathInElement = utils.interopDefault(window[name]);\n if (typeof callback === 'function' && callback) {\n callback(RenderMathInElement);\n }\n });\n return sync;\n }\n }\n\n if (typeof callback === 'function' && callback) {\n callback(RenderMathInElement);\n }\n return sync;\n}\n\nfunction onRenderKatex(resolve, res) {\n if (hasKatex()) {\n const id = res.id;\n const name = res.className;\n const input = res.input;\n const data = res.data;\n const cssLink = res.cssLink;\n const config = res.options;\n const doc = res.element.ownerDocument;\n let html = '';\n if (data instanceof Array) {\n data.forEach(code => {\n if (code === '') {\n html += '
    ';\n } else {\n const math = katex.renderToString(code, config);\n html += cssLink\n ? `
    ${math}
    `\n : `
    ${math}
    `;\n }\n });\n } else {\n const math = katex.renderToString(data, config);\n html = cssLink\n ? `
    ${math}
    `\n : `
    ${math}
    `;\n }\n res.element.parentNode.outerHTML = html;\n --katexElementCount;\n if (!katexElementCount) {\n RenderMathInElement(doc.body, config);\n }\n resolve(true);\n } else {\n setTimeout(() => {\n onRenderKatex(resolve, res);\n }, 50);\n }\n}\n\nfunction renderKatex(element, config, isAsciimath) {\n return new Promise(resolve => {\n let latex;\n const meta = utils.createElementMeta('katex', element, code => {\n let data;\n latex = code;\n const codes = code.split(/\\n[ \\f\\r\\t\\v]*\\n/);\n if (codes.length > 1) {\n data = new Array();\n codes.forEach(code => {\n code = code.trim();\n if (code !== '') {\n code = isAsciimath ? asciimathToTex(code) : code;\n }\n data.push(code);\n });\n } else {\n data = isAsciimath ? asciimathToTex(latex) : latex;\n }\n return data;\n });\n if (!meta) {\n return resolve(false);\n }\n\n meta.cssLink = cdnjs.getSrc(cssCdnName);\n meta.input = latex;\n meta.options = config;\n onRenderKatex(resolve, meta);\n });\n}\n\nfunction renderBlockElements(latex, asciimath, config) {\n katexElementCount = latex.length + asciimath.length;\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n latex.forEach(element => {\n promiseArray.push(renderKatex(element, config, false));\n });\n asciimath.forEach(element => {\n promiseArray.push(renderKatex(element, config, true));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n/**\n * https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex\n * @param {string} str\n * @returns {string} regexp escaped string\n */\nfunction escapeRegExp(str) {\n return str.replace(/[-[\\]/{}()*+?.\\\\$^|]/g, '\\\\$&');\n}\n\n// katex config\nconst getConfig = (userConfig = {}) => {\n let config = {\n displayMode: true,\n throwOnError: false, // fail silently\n errorColor: '#ff0000',\n delimiters: null,\n ...userConfig\n };\n\n function _isEmptyArray(a) {\n if (!Array.isArray(a) || !a.length) {\n return false;\n }\n\n return true;\n }\n\n function _isObjectProperty(obj, prop) {\n if (!obj || typeof obj !== 'object' || !obj.hasOwnProperty(prop)) {\n return false;\n }\n return true;\n }\n\n function _getDelimiter(obj, style, type) {\n if (!_isObjectProperty(obj, style) || !_isObjectProperty(obj[style], type) || !_isEmptyArray(obj[style][type])) {\n return false;\n }\n\n obj[style][type].forEach(delimiter => {\n delimiter.display = type === 'inline' ? false : true;\n if (style === 'asciimath') {\n delimiter.asciimath = true;\n }\n });\n return obj[style][type];\n }\n\n if (!Array.isArray(config.delimiters)) {\n config.delimiters = []\n .concat(\n _getDelimiter(config.delimiters, 'texmath', 'display') || [\n { left: '$$', right: '$$', display: true },\n { left: '\\\\[', right: '\\\\]', display: true },\n { left: \"\\\\begin{equation}\", right: \"\\\\end{equation}\", display: true },\n { left: \"\\\\begin{align}\", right: \"\\\\end{align}\", display: true },\n { left: \"\\\\begin{alignat}\", right: \"\\\\end{alignat}\", display: true },\n { left: \"\\\\begin{gather}\", right: \"\\\\end{gather}\", display: true },\n { left: \"\\\\begin{CD}\", right: \"\\\\end{CD}\", display: true } \n ]\n )\n .concat(\n _getDelimiter(config.delimiters, 'texmath', 'inline') || [\n { left: '\\\\(', right: '\\\\)', display: false }\n ]\n )\n .concat(\n _getDelimiter(config.delimiters, 'asciimath', 'display') || [\n { left: '@@', right: '@@', display: true, asciimath: true }\n ]\n )\n .concat(\n _getDelimiter(config.delimiters, 'asciimath', 'inline') || [\n { left: '@ ', right: ' @', display: false, asciimath: true },\n { left: \"\\\\~\", right: \"\\\\~\", display: false, asciimath: true }\n ]\n );\n } else if (!config.delimiters.length) {\n config.delimiters = [\n { left: '$$', right: '$$', display: true },\n { left: '\\\\[', right: '\\\\]', display: true },\n { left: \"\\\\begin{equation}\", right: \"\\\\end{equation}\", display: true },\n { left: \"\\\\begin{align}\", right: \"\\\\end{align}\", display: true },\n { left: \"\\\\begin{alignat}\", right: \"\\\\end{alignat}\", display: true },\n { left: \"\\\\begin{gather}\", right: \"\\\\end{gather}\", display: true },\n { left: \"\\\\begin{CD}\", right: \"\\\\end{CD}\", display: true }, \n { left: '\\\\(', right: '\\\\)', display: false },\n { left: '@@', right: '@@', display: true, asciimath: true },\n { left: '@ ', right: ' @', display: false, asciimath: true },\n { left: \"\\\\~\", right: \"\\\\~\", display: false, asciimath: true }\n ];\n }\n return config;\n};\n\nfunction showdownKatex(userConfig) {\n let inlineMathCount = 0;\n const config = getConfig(userConfig);\n const mathDelimiters = config.delimiters.map(({ left, right, display, asciimath }) => {\n const test = new RegExp(`${escapeRegExp(left)}(.+?)${escapeRegExp(right)}`, 'g');\n const replacer = (match, math) => {\n ++inlineMathCount;\n if (asciimath) {\n math = asciimathToTex(math);\n }\n if (display) {\n return `\\\\[${math}\\\\]`;\n }\n return `\\\\(${math}\\\\)`;\n };\n return { test, replacer };\n });\n\n return [\n {\n type: 'output',\n config: config,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n\n if (mathDelimiters.length) {\n // convert inline math to inline latex\n // ignore anything in code and pre elements\n wrapper.querySelectorAll(':not(code):not(pre)').forEach(el => {\n /** @type Text[] */\n const textNodes = [...el.childNodes].filter(\n // skip \"empty\" text nodes\n node => node.nodeName === '#text' && node.nodeValue.trim()\n );\n\n textNodes.forEach(node => {\n const newText = mathDelimiters.reduce(\n (acc, { test, replacer }) => acc.replace(test, replacer),\n node.nodeValue\n );\n node.nodeValue = newText;\n });\n });\n }\n\n // find the math in code blocks\n const latex = wrapper.querySelectorAll('code.latex.language-latex');\n const asciimath = wrapper.querySelectorAll('code.asciimath.language-asciimath');\n\n if (!latex.length && !asciimath.length) {\n if (inlineMathCount > 0) {\n this.config.cssLink = cdnjs.getSrc(cssCdnName);\n const that = this;\n function asyncRenderKatex(resolve, render) {\n if (hasKatex()) {\n render(wrapper.ownerDocument.body, that.config);\n resolve(true);\n } else {\n setTimeout(() => {\n asyncRenderKatex(resolve, render);\n }, 50);\n }\n }\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render inline katex elements.`);\n return new Promise(resolve => {\n dyncLoadScript(render => {\n asyncRenderKatex(resolve, render);\n });\n }).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render inline katex elements.`);\n return obj;\n });\n }\n\n return false;\n }\n\n config.cssLink = cdnjs.getSrc(cssCdnName);\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render katex elements.`);\n return renderBlockElements(latex, asciimath, this.config).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render katex elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownKatex;\n","/*\n * Copyright (c) 2024-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown echarts extension for markdown\n */\n'use strict';\n\nconst extName = \"echarts\";\n\nif (typeof window === 'undefined') {\n throw Error(`The showdown ${extName} extension can only be used in browser environment!`);\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof echarts === 'undefined') {\n var echarts = window.echarts || undefined;\n}\n\nfunction hasEcharts() {\n return !!echarts;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasEcharts();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs.loadScript(extName).then(name => {\n echarts = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction onRenderEcharts(resolve, res) {\n if (hasEcharts()) {\n const id = res.id;\n const name = res.className;\n const node = res.element.parentNode;\n // // 在 SSR 模式下第一个参数不需要再传入 DOM 对象\n // let chart = echarts.init(null, null, {\n // renderer: 'svg', // 必须使用 SVG 模式\n // ssr: true,\n // width: res.config.width, // 需要指明高和宽\n // height: res.config.height\n // });\n // // 像正常使用一样 setOption\n // const option = JSON.parse(data);\n // chart.setOption(option);\n // // 输出字符串\n // const svg = chart.renderToSVGString();\n // // 如果不再需要图表,调用 dispose 以释放内存\n // chart.dispose();\n // chart = null;\n node.outerHTML = `
    `;\n return resolve(true);\n }\n\n setTimeout(() => {\n onRenderEcharts(resolve, res);\n }, 20);\n}\n\n\n/**\n * render echarts graphs\n */\nfunction renderEcharts(element, scripts, config) {\n const meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return Promise.resolve(false);\n }\n\n config = JSON.stringify({ ...config, ssr: false });\n const data = JSON.stringify(JSON.parse(meta.data));\n const script = {\n id: meta.id,\n code: `(function() {\n let el = document.getElementById('${meta.id}');\n if (el){\n let config = JSON.parse('${config}');\n let chart = echarts.init(el, null, config);\n let option = JSON.parse('${data}');\n chart.setOption(option);\n }\n })();`\n }\n scripts.push(script);\n return new Promise(resolve => {\n onRenderEcharts(resolve, meta);\n });\n}\n\n//
    \nfunction renderEchartsElements(elements, scripts, config) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderEcharts(element, scripts, config));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// echarts default config\nconst getConfig = (config = {}) => ({\n renderer: 'svg',\n ssr: false,\n width: 400,\n height: 300,\n tooltip: {\n show: true\n },\n animation: true,\n ...config\n});\n\nfunction showdownEcharts(userConfig) {\n const config = getConfig(userConfig);\n return [\n {\n type: 'output',\n config: config,\n filter: function (obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the echarts in code blocks\n const elements = wrapper.querySelectorAll(`code.${extName}.language-${extName}`);\n if (!elements.length) {\n return false;\n }\n\n const scripts = obj.scripts;\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render ${extName} elements.`);\n return renderEchartsElements(elements, scripts, this.config).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render ${extName} elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownEcharts;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown mermaid extension for markdown\n */\n'use strict';\n\nconst extName = \"mermaid\";\n\nif (typeof window === 'undefined') {\n throw Error('The showdown mermaid extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof mermaid === 'undefined') {\n var mermaid = window.mermaid || undefined;\n}\n\nfunction hasMermaid() {\n return typeof mermaid !== 'undefined' && mermaid ? true : false;\n}\n\nlet dync = false;\nfunction dyncLoadScript(config) {\n // When window object exists,\n // it means browser environment, otherwise node.js environment.\n // In browser environment, html need to be rendered asynchronously.\n const sync = hasMermaid();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs.loadScript(extName).then(name => {\n mermaid = utils.interopDefault(window[name]);\n mermaid.initialize(config);\n });\n return sync\n }\n }\n\n mermaid.initialize(config);\n return sync;\n}\n\nfunction onRenderMermaid(resolve, res) {\n if (hasMermaid()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const node = res.element.parentNode;\n mermaid.render(id, data).then(m =>{\n node.outerHTML = `
    ${m.svg}
    `;\n resolve(true);\n });\n return;\n }\n\n setTimeout(() => {\n onRenderMermaid(resolve, res);\n }, 10);\n}\n\n/**\n * render mermaid graphs\n */\nfunction renderMermaid(element) {\n return new Promise(resolve => {\n const meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return resolve(false);\n }\n\n onRenderMermaid(resolve, meta);\n });\n}\n\n//
    \nfunction renderMermaidElements(elements, config) {\n dyncLoadScript(config);\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderMermaid(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// mermaid default config\nconst getConfig = (config = {}) => ({\n theme: 'forest',\n logLevel: 4,\n startOnLoad: false,\n arrowMarkerAbsolute: false,\n flowchart: {\n curve: 'basis'\n },\n gantt: {\n axisFormat: '%m/%d/%Y'\n },\n sequence: {\n actorMargin: 50\n },\n ...config\n});\n\nfunction showdownMermaid(userConfig) {\n const config = getConfig(userConfig);\n return [\n {\n type: 'output',\n config: config,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the mermaid in code blocks\n const elements = wrapper.querySelectorAll('code.mermaid.language-mermaid');\n if (!elements.length) {\n return false;\n }\n\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render mermaid elements.`);\n return renderMermaidElements(elements, this.config).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render mermaid elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownMermaid;\n","export default (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n","\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\nvar inited = false;\nfunction init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n }\n\n revLookup['-'.charCodeAt(0)] = 62\n revLookup['_'.charCodeAt(0)] = 63\n}\n\nexport function toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nexport function fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n","\nexport function read (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexport function write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nexport default Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\nimport * as base64 from './base64'\nimport * as ieee754 from './ieee754'\nimport isArray from './isArray'\n\nexport var INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : true\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nvar _kMaxLength = kMaxLength()\nexport {_kMaxLength as kMaxLength};\nfunction typedArraySupport () {\n return true;\n // rollup issues\n // try {\n // var arr = new Uint8Array(1)\n // arr.__proto__ = {\n // __proto__: Uint8Array.prototype,\n // foo: function () { return 42 }\n // }\n // return arr.foo() === 42 && // typed array instances can be augmented\n // typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n // arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n // } catch (e) {\n // return false\n // }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nexport function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n // Object.defineProperty(Buffer, Symbol.species, {\n // value: null,\n // configurable: true\n // })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nexport function SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nexport function isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n","// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nexport function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nexport var title = 'browser';\nexport var platform = 'browser';\nexport var browser = true;\nexport var env = {};\nexport var argv = [];\nexport var version = ''; // empty string to avoid regexp issues\nexport var versions = {};\nexport var release = {};\nexport var config = {};\n\nfunction noop() {}\n\nexport var on = noop;\nexport var addListener = noop;\nexport var once = noop;\nexport var off = noop;\nexport var removeListener = noop;\nexport var removeAllListeners = noop;\nexport var emit = noop;\n\nexport function binding(name) {\n throw new Error('process.binding is not supported');\n}\n\nexport function cwd () { return '/' }\nexport function chdir (dir) {\n throw new Error('process.chdir is not supported');\n};\nexport function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {}\nvar performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function(){ return (new Date()).getTime() }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nexport function hrtime(previousTimestamp){\n var clocktime = performanceNow.call(performance)*1e-3\n var seconds = Math.floor(clocktime)\n var nanoseconds = Math.floor((clocktime%1)*1e9)\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0]\n nanoseconds = nanoseconds - previousTimestamp[1]\n if (nanoseconds<0) {\n seconds--\n nanoseconds += 1e9\n }\n }\n return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nexport function uptime() {\n var currentTime = new Date();\n var dif = currentTime - startTime;\n return dif / 1000;\n}\n\nexport default {\n nextTick: nextTick,\n title: title,\n browser: browser,\n env: env,\n argv: argv,\n version: version,\n versions: versions,\n on: on,\n addListener: addListener,\n once: once,\n off: off,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners,\n emit: emit,\n binding: binding,\n cwd: cwd,\n chdir: chdir,\n umask: umask,\n hrtime: hrtime,\n platform: platform,\n release: release,\n config: config,\n uptime: uptime\n};\n","'use strict';\n\nvar domain;\n\n// This constructor is used to store event handlers. Instantiating this is\n// faster than explicitly calling `Object.create(null)` to get a \"clean\" empty\n// object (tested with v8 v4.9).\nfunction EventHandlers() {}\nEventHandlers.prototype = Object.create(null);\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nexport default EventEmitter;\nexport {EventEmitter};\n\n// nodejs oddity\n// require('events') === require('events').EventEmitter\nEventEmitter.EventEmitter = EventEmitter\n\nEventEmitter.usingDomains = false;\n\nEventEmitter.prototype.domain = undefined;\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\nEventEmitter.init = function() {\n this.domain = null;\n if (EventEmitter.usingDomains) {\n // if there is an active domain, then attach to it.\n if (domain.active && !(this instanceof domain.Domain)) {\n this.domain = domain.active;\n }\n }\n\n if (!this._events || this._events === Object.getPrototypeOf(this)._events) {\n this._events = new EventHandlers();\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || isNaN(n))\n throw new TypeError('\"n\" argument must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nfunction $getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return $getMaxListeners(this);\n};\n\n// These standalone emit* functions are used to optimize calling of event\n// handlers for fast cases because emit() itself often has a variable number of\n// arguments and can be deoptimized because of that. These functions always have\n// the same number of arguments and thus do not get deoptimized, so the code\n// inside them can execute faster.\nfunction emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}\nfunction emitOne(handler, isFn, self, arg1) {\n if (isFn)\n handler.call(self, arg1);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1);\n }\n}\nfunction emitTwo(handler, isFn, self, arg1, arg2) {\n if (isFn)\n handler.call(self, arg1, arg2);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1, arg2);\n }\n}\nfunction emitThree(handler, isFn, self, arg1, arg2, arg3) {\n if (isFn)\n handler.call(self, arg1, arg2, arg3);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1, arg2, arg3);\n }\n}\n\nfunction emitMany(handler, isFn, self, args) {\n if (isFn)\n handler.apply(self, args);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].apply(self, args);\n }\n}\n\nEventEmitter.prototype.emit = function emit(type) {\n var er, handler, len, args, i, events, domain;\n var needDomainExit = false;\n var doError = (type === 'error');\n\n events = this._events;\n if (events)\n doError = (doError && events.error == null);\n else if (!doError)\n return false;\n\n domain = this.domain;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n er = arguments[1];\n if (domain) {\n if (!er)\n er = new Error('Uncaught, unspecified \"error\" event');\n er.domainEmitter = this;\n er.domain = domain;\n er.domainThrown = false;\n domain.emit('error', er);\n } else if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n return false;\n }\n\n handler = events[type];\n\n if (!handler)\n return false;\n\n var isFn = typeof handler === 'function';\n len = arguments.length;\n switch (len) {\n // fast cases\n case 1:\n emitNone(handler, isFn, this);\n break;\n case 2:\n emitOne(handler, isFn, this, arguments[1]);\n break;\n case 3:\n emitTwo(handler, isFn, this, arguments[1], arguments[2]);\n break;\n case 4:\n emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);\n break;\n // slower\n default:\n args = new Array(len - 1);\n for (i = 1; i < len; i++)\n args[i - 1] = arguments[i];\n emitMany(handler, isFn, this, args);\n }\n\n if (needDomainExit)\n domain.exit();\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n\n events = target._events;\n if (!events) {\n events = target._events = new EventHandlers();\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (!existing) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] = prepend ? [listener, existing] :\n [existing, listener];\n } else {\n // If we've already got an array, just append.\n if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n }\n\n // Check for listener leak\n if (!existing.warned) {\n m = $getMaxListeners(target);\n if (m && m > 0 && existing.length > m) {\n existing.warned = true;\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + type + ' listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n emitWarning(w);\n }\n }\n }\n\n return target;\n}\nfunction emitWarning(e) {\n typeof console.warn === 'function' ? console.warn(e) : console.log(e);\n}\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction _onceWrap(target, type, listener) {\n var fired = false;\n function g() {\n target.removeListener(type, g);\n if (!fired) {\n fired = true;\n listener.apply(target, arguments);\n }\n }\n g.listener = listener;\n return g;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n\n events = this._events;\n if (!events)\n return this;\n\n list = events[type];\n if (!list)\n return this;\n\n if (list === listener || (list.listener && list.listener === listener)) {\n if (--this._eventsCount === 0)\n this._events = new EventHandlers();\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list[0] = undefined;\n if (--this._eventsCount === 0) {\n this._events = new EventHandlers();\n return this;\n } else {\n delete events[type];\n }\n } else {\n spliceOne(list, position);\n }\n\n if (events.removeListener)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events;\n\n events = this._events;\n if (!events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!events.removeListener) {\n if (arguments.length === 0) {\n this._events = new EventHandlers();\n this._eventsCount = 0;\n } else if (events[type]) {\n if (--this._eventsCount === 0)\n this._events = new EventHandlers();\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n for (var i = 0, key; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = new EventHandlers();\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n do {\n this.removeListener(type, listeners[listeners.length - 1]);\n } while (listeners[0]);\n }\n\n return this;\n };\n\nEventEmitter.prototype.listeners = function listeners(type) {\n var evlistener;\n var ret;\n var events = this._events;\n\n if (!events)\n ret = [];\n else {\n evlistener = events[type];\n if (!evlistener)\n ret = [];\n else if (typeof evlistener === 'function')\n ret = [evlistener.listener || evlistener];\n else\n ret = unwrapListeners(evlistener);\n }\n\n return ret;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];\n};\n\n// About 1.5x faster than the two-arg version of Array#splice().\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n list[i] = list[k];\n list.pop();\n}\n\nfunction arrayClone(arr, i) {\n var copy = new Array(i);\n while (i--)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n","\nvar inherits;\nif (typeof Object.create === 'function'){\n inherits = function inherits(ctor, superCtor) {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n inherits = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\nexport default inherits;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\nimport process from 'process';\nvar formatRegExp = /%[sdj%]/g;\nexport function format(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexport function deprecate(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexport function debuglog(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = 0;\n debugs[set] = function() {\n var msg = format.apply(null, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nexport function inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n _extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexport function isArray(ar) {\n return Array.isArray(ar);\n}\n\nexport function isBoolean(arg) {\n return typeof arg === 'boolean';\n}\n\nexport function isNull(arg) {\n return arg === null;\n}\n\nexport function isNullOrUndefined(arg) {\n return arg == null;\n}\n\nexport function isNumber(arg) {\n return typeof arg === 'number';\n}\n\nexport function isString(arg) {\n return typeof arg === 'string';\n}\n\nexport function isSymbol(arg) {\n return typeof arg === 'symbol';\n}\n\nexport function isUndefined(arg) {\n return arg === void 0;\n}\n\nexport function isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\n\nexport function isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nexport function isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\n\nexport function isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\n\nexport function isFunction(arg) {\n return typeof arg === 'function';\n}\n\nexport function isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\n\nexport function isBuffer(maybeBuf) {\n return Buffer.isBuffer(maybeBuf);\n}\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexport function log() {\n console.log('%s - %s', timestamp(), format.apply(null, arguments));\n}\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nimport inherits from './inherits';\nexport {inherits}\n\nexport function _extend(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport default {\n inherits: inherits,\n _extend: _extend,\n log: log,\n isBuffer: isBuffer,\n isPrimitive: isPrimitive,\n isFunction: isFunction,\n isError: isError,\n isDate: isDate,\n isObject: isObject,\n isRegExp: isRegExp,\n isUndefined: isUndefined,\n isSymbol: isSymbol,\n isString: isString,\n isNumber: isNumber,\n isNullOrUndefined: isNullOrUndefined,\n isNull: isNull,\n isBoolean: isBoolean,\n isArray: isArray,\n inspect: inspect,\n deprecate: deprecate,\n format: format,\n debuglog: debuglog\n}\n","import {Buffer} from 'buffer';\n\nexport default BufferList;\n\nfunction BufferList() {\n this.head = null;\n this.tail = null;\n this.length = 0;\n}\n\nBufferList.prototype.push = function (v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n};\n\nBufferList.prototype.unshift = function (v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n};\n\nBufferList.prototype.shift = function () {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n};\n\nBufferList.prototype.clear = function () {\n this.head = this.tail = null;\n this.length = 0;\n};\n\nBufferList.prototype.join = function (s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n};\n\nBufferList.prototype.concat = function (n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n p.data.copy(ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport {Buffer} from 'buffer';\nvar isBufferEncoding = Buffer.isEncoding\n || function(encoding) {\n switch (encoding && encoding.toLowerCase()) {\n case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n default: return false;\n }\n }\n\n\nfunction assertEncoding(encoding) {\n if (encoding && !isBufferEncoding(encoding)) {\n throw new Error('Unknown encoding: ' + encoding);\n }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nexport function StringDecoder(encoding) {\n this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n assertEncoding(encoding);\n switch (this.encoding) {\n case 'utf8':\n // CESU-8 represents each of Surrogate Pair by 3-bytes\n this.surrogateSize = 3;\n break;\n case 'ucs2':\n case 'utf16le':\n // UTF-16 represents each of Surrogate Pair by 2-bytes\n this.surrogateSize = 2;\n this.detectIncompleteChar = utf16DetectIncompleteChar;\n break;\n case 'base64':\n // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n this.surrogateSize = 3;\n this.detectIncompleteChar = base64DetectIncompleteChar;\n break;\n default:\n this.write = passThroughWrite;\n return;\n }\n\n // Enough space to store all bytes of a single character. UTF-8 needs 4\n // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n this.charBuffer = new Buffer(6);\n // Number of bytes received for the current incomplete multi-byte character.\n this.charReceived = 0;\n // Number of bytes expected for the current incomplete multi-byte character.\n this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n var charStr = '';\n // if our last write ended with an incomplete multibyte character\n while (this.charLength) {\n // determine how many remaining bytes this buffer has to offer for this char\n var available = (buffer.length >= this.charLength - this.charReceived) ?\n this.charLength - this.charReceived :\n buffer.length;\n\n // add the new bytes to the char buffer\n buffer.copy(this.charBuffer, this.charReceived, 0, available);\n this.charReceived += available;\n\n if (this.charReceived < this.charLength) {\n // still not enough chars in this buffer? wait for more ...\n return '';\n }\n\n // remove bytes belonging to the current character from the buffer\n buffer = buffer.slice(available, buffer.length);\n\n // get the character that was split\n charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n var charCode = charStr.charCodeAt(charStr.length - 1);\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n this.charLength += this.surrogateSize;\n charStr = '';\n continue;\n }\n this.charReceived = this.charLength = 0;\n\n // if there are no more bytes in this buffer, just emit our char\n if (buffer.length === 0) {\n return charStr;\n }\n break;\n }\n\n // determine and set charLength / charReceived\n this.detectIncompleteChar(buffer);\n\n var end = buffer.length;\n if (this.charLength) {\n // buffer the incomplete character bytes we got\n buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n end -= this.charReceived;\n }\n\n charStr += buffer.toString(this.encoding, 0, end);\n\n var end = charStr.length - 1;\n var charCode = charStr.charCodeAt(end);\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n var size = this.surrogateSize;\n this.charLength += size;\n this.charReceived += size;\n this.charBuffer.copy(this.charBuffer, size, 0, size);\n buffer.copy(this.charBuffer, 0, 0, size);\n return charStr.substring(0, end);\n }\n\n // or just emit the charStr\n return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n // determine how many bytes we have to check at the end of this buffer\n var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n // Figure out if one of the last i bytes of our buffer announces an\n // incomplete char.\n for (; i > 0; i--) {\n var c = buffer[buffer.length - i];\n\n // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n // 110XXXXX\n if (i == 1 && c >> 5 == 0x06) {\n this.charLength = 2;\n break;\n }\n\n // 1110XXXX\n if (i <= 2 && c >> 4 == 0x0E) {\n this.charLength = 3;\n break;\n }\n\n // 11110XXX\n if (i <= 3 && c >> 3 == 0x1E) {\n this.charLength = 4;\n break;\n }\n }\n this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n var res = '';\n if (buffer && buffer.length)\n res = this.write(buffer);\n\n if (this.charReceived) {\n var cr = this.charReceived;\n var buf = this.charBuffer;\n var enc = this.encoding;\n res += buf.slice(0, cr).toString(enc);\n }\n\n return res;\n};\n\nfunction passThroughWrite(buffer) {\n return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 2;\n this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 3;\n this.charLength = this.charReceived ? 3 : 0;\n}\n","'use strict';\n\n\nReadable.ReadableState = ReadableState;\nimport EventEmitter from 'events';\nimport {inherits, debuglog} from 'util';\nimport BufferList from './buffer-list';\nimport {StringDecoder} from 'string_decoder';\nimport {Duplex} from './duplex';\nimport {nextTick} from 'process';\n\nvar debug = debuglog('stream');\ninherits(Readable, EventEmitter);\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') {\n return emitter.prependListener(event, fn);\n } else {\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event])\n emitter.on(event, fn);\n else if (Array.isArray(emitter._events[event]))\n emitter._events[event].unshift(fn);\n else\n emitter._events[event] = [fn, emitter._events[event]];\n }\n}\nfunction listenerCount (emitter, type) {\n return emitter.listeners(type).length;\n}\nfunction ReadableState(options, stream) {\n\n options = options || {};\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // when piping, we only care about 'readable' events that happen\n // after read()ing all the bytes and not getting any pushback.\n this.ranOut = false;\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nexport default Readable;\nexport function Readable(options) {\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options && typeof options.read === 'function') this._read = options.read;\n\n EventEmitter.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n\n if (!state.objectMode && typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n }\n\n return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n var state = this._readableState;\n return readableAddChunk(this, state, chunk, '', true);\n};\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n var er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (state.ended && !addToFront) {\n var e = new Error('stream.push() after EOF');\n stream.emit('error', e);\n } else if (state.endEmitted && addToFront) {\n var _e = new Error('stream.unshift() after end event');\n stream.emit('error', _e);\n } else {\n var skipAdd;\n if (state.decoder && !addToFront && !encoding) {\n chunk = state.decoder.write(chunk);\n skipAdd = !state.objectMode && chunk.length === 0;\n }\n\n if (!addToFront) state.reading = false;\n\n // Don't add to the buffer if we've decoded to an empty string chunk and\n // we're not in object mode\n if (!skipAdd) {\n // if we want the data now, just emit it.\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n }\n\n maybeReadMore(stream, state);\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n\n return needMoreData(state);\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n var er = null;\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false);\n\n var endFn = doEnd ? onend : cleanup;\n if (state.endEmitted) nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable) {\n debug('onunpipe');\n if (readable === src) {\n cleanup();\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', cleanup);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (listenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && src.listeners('data').length) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var _i = 0; _i < len; _i++) {\n dests[_i].emit('unpipe', this);\n }return this;\n }\n\n // try to find the right one.\n var i = indexOf(state.pipes, dest);\n if (i === -1) return this;\n\n state.pipes.splice(i, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = EventEmitter.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this, state);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var state = this._readableState;\n var paused = false;\n\n var self = this;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) self.push(chunk);\n }\n\n self.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = self.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n forEach(events, function (ev) {\n stream.on(ev, self.emit.bind(self, ev));\n });\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n self._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return self;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n","// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\nimport {inherits, deprecate} from 'util';\nimport {Buffer} from 'buffer';\nWritable.WritableState = WritableState;\nimport {EventEmitter} from 'events';\nimport {Duplex} from './duplex';\nimport {nextTick} from 'process';\ninherits(Writable, EventEmitter);\n\nfunction nop() {}\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\nfunction WritableState(options, stream) {\n Object.defineProperty(this, 'buffer', {\n get: deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n });\n options = options || {};\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function writableStateGetBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\nexport default Writable;\nexport function Writable(options) {\n\n // Writable ctor is applied to Duplexes, though they're not\n // instanceof Writable, they're instanceof Readable.\n if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n }\n\n EventEmitter.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n nextTick(cb, er);\n}\n\n// If we get something that is not a buffer, string, null, or undefined,\n// and we're not in objectMode, then that's an error.\n// Otherwise stream chunks are all considered to be of length=1, and the\n// watermarks determine how many objects to keep in the buffer, rather than\n// how many bytes or characters.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n // Always throw error if a null is written\n // if we are not in object mode then throw\n // if it is not a buffer, string, or undefined.\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, chunk, encoding, cb) {\n chunk = decodeChunk(state, chunk, encoding);\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) nextTick(cb, er);else cb(er);\n\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n nextTick(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished) {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n if (state.pendingcb === 0) {\n prefinish(stream, state);\n state.finished = true;\n stream.emit('finish');\n } else {\n prefinish(stream, state);\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function (err) {\n var entry = _this.entry;\n _this.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = _this;\n } else {\n state.corkedRequestsFree = _this;\n }\n };\n}\n","\nimport {inherits} from 'util';\nimport {nextTick} from 'process';\nimport {Readable} from './readable';\nimport {Writable} from './writable';\n\n\ninherits(Duplex, Readable);\n\nvar keys = Object.keys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\nexport default Duplex;\nexport function Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n","// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n\nimport {Duplex} from './duplex';\n\n\nimport {inherits} from 'util';\ninherits(Transform, Duplex);\n\nfunction TransformState(stream) {\n this.afterTransform = function (er, data) {\n return afterTransform(stream, er, data);\n };\n\n this.needTransform = false;\n this.transforming = false;\n this.writecb = null;\n this.writechunk = null;\n this.writeencoding = null;\n}\n\nfunction afterTransform(stream, er, data) {\n var ts = stream._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data !== null && data !== undefined) stream.push(data);\n\n cb(er);\n\n var rs = stream._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n stream._read(rs.highWaterMark);\n }\n}\nexport default Transform;\nexport function Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = new TransformState(this);\n\n // when the writable side finishes, then flush out anything remaining.\n var stream = this;\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n this.once('prefinish', function () {\n if (typeof this._flush === 'function') this._flush(function (er) {\n done(stream, er);\n });else done(stream);\n });\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('Not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nfunction done(stream, er) {\n if (er) return stream.emit('error', er);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n var ws = stream._writableState;\n var ts = stream._transformState;\n\n if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}\n","\nimport {Transform} from './transform';\n\nimport {inherits} from 'util';\ninherits(PassThrough, Transform);\nexport default PassThrough;\nexport function PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};\n","import EE from 'events';\nimport {inherits} from 'util';\n\nimport {Duplex} from './readable-stream/duplex.js';\nimport {Readable} from './readable-stream/readable.js';\nimport {Writable} from './readable-stream/writable.js';\nimport {Transform} from './readable-stream/transform.js';\nimport {PassThrough} from './readable-stream/passthrough.js';\ninherits(Stream, EE);\nStream.Readable = Readable;\nStream.Writable = Writable;\nStream.Duplex = Duplex;\nStream.Transform = Transform;\nStream.PassThrough = PassThrough;\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\nexport default Stream;\nexport {Readable,Writable,Duplex,Transform,PassThrough,Stream}\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","export default {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nexport default ZStream;\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\n\nexport function assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (source.hasOwnProperty(p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n}\n\n\n// reduce buffer size, avoiding mem copy\nexport function shrinkBuf(buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n}\nexport function arraySet(dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n}\nexport function flattenChunks(chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n}\n\n\nexport var Buf8 = Uint8Array;\nexport var Buf16 = Uint16Array;\nexport var Buf32 = Int32Array;\n// Enable/Disable typed arrays use, for testing\n//\n","'use strict';\n\nimport {arraySet} from './utils';\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) {\n var len = buf.length;\n while (--len >= 0) {\n buf[len] = 0;\n }\n}\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */ [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\nvar extra_dbits = /* extra bits for each distance code */ [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\nvar extra_blbits = /* extra bits for each bit length code */ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nvar bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n // put_byte(s, (uch)((w) & 0xff));\n // put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2] /*.Code*/ , tree[c * 2 + 1] /*.Len*/ );\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc) {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1] /*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1] /*.Dad*/ * 2 + 1] /*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1] /*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) {\n continue;\n } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2] /*.Freq*/ ;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1] /*.Len*/ + xbits);\n }\n }\n if (overflow === 0) {\n return;\n }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) {\n bits--;\n }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) {\n continue;\n }\n if (tree[m * 2 + 1] /*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1] /*.Len*/ ) * tree[m * 2] /*.Freq*/ ;\n tree[m * 2 + 1] /*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count) {\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1] /*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1] /*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1] /*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1] /*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1] /*.Len*/ = 5;\n static_dtree[n * 2] /*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) {\n s.dyn_ltree[n * 2] /*.Freq*/ = 0;\n }\n for (n = 0; n < D_CODES; n++) {\n s.dyn_dtree[n * 2] /*.Freq*/ = 0;\n }\n for (n = 0; n < BL_CODES; n++) {\n s.bl_tree[n * 2] /*.Freq*/ = 0;\n }\n\n s.dyn_ltree[END_BLOCK * 2] /*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s) {\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header) {\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n // while (len--) {\n // put_byte(s, *buf++);\n // }\n arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2] /*.Freq*/ < tree[_m2] /*.Freq*/ ||\n (tree[_n2] /*.Freq*/ === tree[_m2] /*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2] /*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1] /*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2] /*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1] /*.Len*/ ;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1 /*int /2*/ ); n >= 1; n--) {\n pqdownheap(s, tree, n);\n }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1 /*SMALLEST*/ ];\n s.heap[1 /*SMALLEST*/ ] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1 /*SMALLEST*/ );\n /***/\n\n m = s.heap[1 /*SMALLEST*/ ]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2] /*.Freq*/ = tree[n * 2] /*.Freq*/ + tree[m * 2] /*.Freq*/ ;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1] /*.Dad*/ = tree[m * 2 + 1] /*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1 /*SMALLEST*/ ] = node++;\n pqdownheap(s, tree, 1 /*SMALLEST*/ );\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1 /*SMALLEST*/ ];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1] /*.Len*/ ; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1] /*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1] /*.Len*/ ;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2] /*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) {\n s.bl_tree[curlen * 2] /*.Freq*/ ++;\n }\n s.bl_tree[REP_3_6 * 2] /*.Freq*/ ++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2] /*.Freq*/ ++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2] /*.Freq*/ ++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1] /*.Len*/ ; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */\n /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1] /*.Len*/ ;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do {\n send_code(s, curlen, s.bl_tree);\n } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1] /*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1] /*.Len*/ , 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2] /*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2] /*.Freq*/ !== 0 || s.dyn_ltree[10 * 2] /*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2] /*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2] /*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nexport function _tr_init(s) {\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nexport function _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nexport function _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nexport function _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) {\n opt_lenb = static_lenb;\n }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nexport function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2] /*.Freq*/ ++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2] /*.Freq*/ ++;\n s.dyn_dtree[d_code(dist) * 2] /*.Freq*/ ++;\n }\n\n // (!) This block is disabled in zlib defailts,\n // don't enable it for binary compatibility\n\n //#ifdef TRUNCATE_BLOCK\n // /* Try to guess if it is profitable to stop the current block here */\n // if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n // /* Compute an upper bound for the compressed length */\n // out_length = s.last_lit*8;\n // in_length = s.strstart - s.block_start;\n //\n // for (dcode = 0; dcode < D_CODES; dcode++) {\n // out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n // }\n // out_length >>>= 3;\n // //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n // // s->last_lit, in_length, out_length,\n // // 100L - out_length*100L/in_length));\n // if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n // return true;\n // }\n // }\n //#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n","\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It doesn't worth to make additional optimizationa as in original.\n// Small size is preferable.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nexport default adler32;\n","\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nexport default crc32;\n","\nimport {Buf8,Buf16,arraySet} from './utils';\nimport {_tr_flush_block, _tr_tally, _tr_init, _tr_align, _tr_stored_block} from './trees';\nimport adler32 from './adler32';\nimport crc32 from './crc32';\nimport msg from './messages';\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) {\n var len = buf.length;\n while (--len >= 0) {\n buf[len] = 0;\n }\n}\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) {\n return;\n }\n\n arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n // put_byte(s, (Byte)(b >> 8));\n // put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) {\n len = size;\n }\n if (len === 0) {\n return 0;\n }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n } else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0 /*NIL*/ ;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) {\n nice_match = s.lookahead;\n }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n //#if MIN_MATCH != 3\n // Call update_hash() MIN_MATCH-3 more times\n //#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n // if (s.high_water < s.window_size) {\n // var curr = s.strstart + s.lookahead;\n // var init = 0;\n //\n // if (s.high_water < curr) {\n // /* Previous high water mark below current data -- zero WIN_INIT\n // * bytes or up to end of window, whichever is less.\n // */\n // init = s.window_size - curr;\n // if (init > WIN_INIT)\n // init = WIN_INIT;\n // zmemzero(s->window + curr, (unsigned)init);\n // s->high_water = curr + init;\n // }\n // else if (s->high_water < (ulg)curr + WIN_INIT) {\n // /* High water mark at or above current data, but below current data\n // * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n // * to end of window, whichever is less.\n // */\n // init = (ulg)curr + WIN_INIT - s->high_water;\n // if (init > s->window_size - s->high_water)\n // init = s->window_size - s->high_water;\n // zmemzero(s->window + s->high_water, (unsigned)init);\n // s->high_water += init;\n // }\n // }\n //\n // Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n // \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0 /*NIL*/ ;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0 /*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match /*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n //#if MIN_MATCH != 3\n // Call UPDATE_HASH() MIN_MATCH-3 more times\n //#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break;\n } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0 /*NIL*/ ;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0 /*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD) /*MAX_DIST(s)*/ ) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096 /*TOO_FAR*/ ))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break;\n } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all\n */\n\n this.depth = new Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nexport function deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n _tr_init(s);\n return Z_OK;\n}\n\n\nexport function deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nexport function deflateSetHeader(strm, head) {\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n if (strm.state.wrap !== 2) {\n return Z_STREAM_ERROR;\n }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nexport function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n } else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Buf8(s.w_size * 2);\n s.head = new Buf16(s.hash_size);\n s.prev = new Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nexport function deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nexport function deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n if (s.wrap === 2) {\n // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n } else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n } else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) {\n header |= PRESET_DICT;\n }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n //#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra /* != Z_NULL*/ ) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n } else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name /* != Z_NULL*/ ) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n } else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment /* != Z_NULL*/ ) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n } else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n } else {\n s.status = BUSY_STATE;\n }\n }\n //#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n } else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/\n /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) {\n return Z_OK;\n }\n if (s.wrap <= 0) {\n return Z_STREAM_END;\n }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n } else {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) {\n s.wrap = -s.wrap;\n }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nexport function deflateEnd(strm) {\n var status;\n\n if (!strm /*== Z_NULL*/ || !strm.state /*== Z_NULL*/ ) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nexport function deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm /*== Z_NULL*/ || !strm.state /*== Z_NULL*/ ) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new Buf8(s.w_size);\n arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexport var deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nexport default function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","import {Buf16} from './utils';\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nexport default function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0,\n max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n // var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) {\n break;\n }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) {\n break;\n }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n var i = 0;\n /* process all codes and make table entries */\n for (;;) {\n i++;\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n } else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n } else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val | 0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) {\n break;\n }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) {\n break;\n }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) | 0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) | 0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\nimport {Buf8,Buf16,Buf32,arraySet} from './utils';\nimport adler32 from './adler32';\nimport crc32 from './crc32';\nimport inflate_fast from './inffast';\nimport inflate_table from './inftrees';\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Buf16(320); /* temporary storage for code lengths */\n this.work = new Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nexport function inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null /*Z_NULL*/ ;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nexport function inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nexport function inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n } else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nexport function inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) {\n return Z_STREAM_ERROR;\n }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null /*Z_NULL*/ ;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null /*Z_NULL*/ ;\n }\n return ret;\n}\n\nexport function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new Buf32(512);\n distfix = new Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) {\n state.lens[sym++] = 8;\n }\n while (sym < 256) {\n state.lens[sym++] = 9;\n }\n while (sym < 280) {\n state.lens[sym++] = 7;\n }\n while (sym < 288) {\n state.lens[sym++] = 8;\n }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {\n bits: 9\n });\n\n /* distance table */\n sym = 0;\n while (sym < 32) {\n state.lens[sym++] = 5;\n }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {\n bits: 5\n });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n } else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n } else {\n state.wnext += dist;\n if (state.wnext === state.wsize) {\n state.wnext = 0;\n }\n if (state.whave < state.wsize) {\n state.whave += dist;\n }\n }\n }\n return 0;\n}\n\nexport function inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */ [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) {\n state.mode = TYPEDO;\n } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0 /*crc32(0L, Z_NULL, 0)*/ ;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff) /*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f) /*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f) /*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n } else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1 /*adler32(0L, Z_NULL, 0)*/ ;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n } else if (state.head) {\n state.head.extra = null /*Z_NULL*/ ;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) {\n copy = have;\n }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more conveniend processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) {\n break inf_leave;\n }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) {\n break inf_leave;\n }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/ )) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) {\n break inf_leave;\n }\n } else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) {\n break inf_leave;\n }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/ )) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) {\n break inf_leave;\n }\n } else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1 /*adler32(0L, Z_NULL, 0)*/ ;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) {\n break inf_leave;\n }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01) /*BITS(1)*/ ;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03) /*BITS(2)*/ ) {\n case 0:\n /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1:\n /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2:\n /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) {\n break inf_leave;\n }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) {\n copy = have;\n }\n if (copy > left) {\n copy = left;\n }\n if (copy === 0) {\n break inf_leave;\n }\n //--- zmemcpy(put, next, copy); ---\n arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f) /*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f) /*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f) /*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n //#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07); //BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = {\n bits: state.lenbits\n };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n } else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03); //BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n } else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07); //BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n } else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f); //BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) {\n break;\n }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = {\n bits: state.lenbits\n };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = {\n bits: state.distbits\n };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) {\n break inf_leave;\n }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1)) /*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1) /*BITS(state.extra)*/ ;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)]; /*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1)) /*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1) /*BITS(state.extra)*/ ;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) {\n break inf_leave;\n }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n // (!) This block is disabled in zlib defailts,\n // don't enable it for binary compatibility\n //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n // Trace((stderr, \"inflate.c too far\\n\"));\n // copy -= state.whave;\n // if (copy > state.length) { copy = state.length; }\n // if (copy > left) { copy = left; }\n // left -= copy;\n // state.length -= copy;\n // do {\n // output[put++] = 0;\n // } while (--copy);\n // if (state.length === 0) { state.mode = LEN; }\n // break;\n //#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n } else {\n from = state.wnext - copy;\n }\n if (copy > state.length) {\n copy = state.length;\n }\n from_source = state.window;\n } else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) {\n copy = left;\n }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) {\n state.mode = LEN;\n }\n break;\n case LIT:\n if (left === 0) {\n break inf_leave;\n }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n // Use '|' insdead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nexport function inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/ ) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nexport function inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n if ((state.wrap & 2) === 0) {\n return Z_STREAM_ERROR;\n }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nexport function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */ ) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexport var inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","import msg from './messages';\nimport zstream from './zstream';\nimport {deflateInit2, deflateEnd, deflateReset, deflate} from './deflate';\nimport {inflateInit2, inflate, inflateEnd, inflateReset} from './inflate';\n// import constants from './constants';\n\n\n// zlib modes\nexport var NONE = 0;\nexport var DEFLATE = 1;\nexport var INFLATE = 2;\nexport var GZIP = 3;\nexport var GUNZIP = 4;\nexport var DEFLATERAW = 5;\nexport var INFLATERAW = 6;\nexport var UNZIP = 7;\nexport var Z_NO_FLUSH= 0,\n Z_PARTIAL_FLUSH= 1,\n Z_SYNC_FLUSH= 2,\n Z_FULL_FLUSH= 3,\n Z_FINISH= 4,\n Z_BLOCK= 5,\n Z_TREES= 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK= 0,\n Z_STREAM_END= 1,\n Z_NEED_DICT= 2,\n Z_ERRNO= -1,\n Z_STREAM_ERROR= -2,\n Z_DATA_ERROR= -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR= -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION= 0,\n Z_BEST_SPEED= 1,\n Z_BEST_COMPRESSION= 9,\n Z_DEFAULT_COMPRESSION= -1,\n\n\n Z_FILTERED= 1,\n Z_HUFFMAN_ONLY= 2,\n Z_RLE= 3,\n Z_FIXED= 4,\n Z_DEFAULT_STRATEGY= 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY= 0,\n Z_TEXT= 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN= 2,\n\n /* The deflate compression method */\n Z_DEFLATED= 8;\nexport function Zlib(mode) {\n if (mode < DEFLATE || mode > UNZIP)\n throw new TypeError('Bad argument');\n\n this.mode = mode;\n this.init_done = false;\n this.write_in_progress = false;\n this.pending_close = false;\n this.windowBits = 0;\n this.level = 0;\n this.memLevel = 0;\n this.strategy = 0;\n this.dictionary = null;\n}\n\nZlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) {\n this.windowBits = windowBits;\n this.level = level;\n this.memLevel = memLevel;\n this.strategy = strategy;\n // dictionary not supported.\n\n if (this.mode === GZIP || this.mode === GUNZIP)\n this.windowBits += 16;\n\n if (this.mode === UNZIP)\n this.windowBits += 32;\n\n if (this.mode === DEFLATERAW || this.mode === INFLATERAW)\n this.windowBits = -this.windowBits;\n\n this.strm = new zstream();\n var status;\n switch (this.mode) {\n case DEFLATE:\n case GZIP:\n case DEFLATERAW:\n status = deflateInit2(\n this.strm,\n this.level,\n Z_DEFLATED,\n this.windowBits,\n this.memLevel,\n this.strategy\n );\n break;\n case INFLATE:\n case GUNZIP:\n case INFLATERAW:\n case UNZIP:\n status = inflateInit2(\n this.strm,\n this.windowBits\n );\n break;\n default:\n throw new Error('Unknown mode ' + this.mode);\n }\n\n if (status !== Z_OK) {\n this._error(status);\n return;\n }\n\n this.write_in_progress = false;\n this.init_done = true;\n};\n\nZlib.prototype.params = function() {\n throw new Error('deflateParams Not supported');\n};\n\nZlib.prototype._writeCheck = function() {\n if (!this.init_done)\n throw new Error('write before init');\n\n if (this.mode === NONE)\n throw new Error('already finalized');\n\n if (this.write_in_progress)\n throw new Error('write already in progress');\n\n if (this.pending_close)\n throw new Error('close is pending');\n};\n\nZlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n this._writeCheck();\n this.write_in_progress = true;\n\n var self = this;\n process.nextTick(function() {\n self.write_in_progress = false;\n var res = self._write(flush, input, in_off, in_len, out, out_off, out_len);\n self.callback(res[0], res[1]);\n\n if (self.pending_close)\n self.close();\n });\n\n return this;\n};\n\n// set method for Node buffers, used by pako\nfunction bufferSet(data, offset) {\n for (var i = 0; i < data.length; i++) {\n this[offset + i] = data[i];\n }\n}\n\nZlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) {\n this._writeCheck();\n return this._write(flush, input, in_off, in_len, out, out_off, out_len);\n};\n\nZlib.prototype._write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n this.write_in_progress = true;\n\n if (flush !== Z_NO_FLUSH &&\n flush !== Z_PARTIAL_FLUSH &&\n flush !== Z_SYNC_FLUSH &&\n flush !== Z_FULL_FLUSH &&\n flush !== Z_FINISH &&\n flush !== Z_BLOCK) {\n throw new Error('Invalid flush value');\n }\n\n if (input == null) {\n input = new Buffer(0);\n in_len = 0;\n in_off = 0;\n }\n\n if (out._set)\n out.set = out._set;\n else\n out.set = bufferSet;\n\n var strm = this.strm;\n strm.avail_in = in_len;\n strm.input = input;\n strm.next_in = in_off;\n strm.avail_out = out_len;\n strm.output = out;\n strm.next_out = out_off;\n var status;\n switch (this.mode) {\n case DEFLATE:\n case GZIP:\n case DEFLATERAW:\n status = deflate(strm, flush);\n break;\n case UNZIP:\n case INFLATE:\n case GUNZIP:\n case INFLATERAW:\n status = inflate(strm, flush);\n break;\n default:\n throw new Error('Unknown mode ' + this.mode);\n }\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this._error(status);\n }\n\n this.write_in_progress = false;\n return [strm.avail_in, strm.avail_out];\n};\n\nZlib.prototype.close = function() {\n if (this.write_in_progress) {\n this.pending_close = true;\n return;\n }\n\n this.pending_close = false;\n\n if (this.mode === DEFLATE || this.mode === GZIP || this.mode === DEFLATERAW) {\n deflateEnd(this.strm);\n } else {\n inflateEnd(this.strm);\n }\n\n this.mode = NONE;\n};\nvar status\nZlib.prototype.reset = function() {\n switch (this.mode) {\n case DEFLATE:\n case DEFLATERAW:\n status = deflateReset(this.strm);\n break;\n case INFLATE:\n case INFLATERAW:\n status = inflateReset(this.strm);\n break;\n }\n\n if (status !== Z_OK) {\n this._error(status);\n }\n};\n\nZlib.prototype._error = function(status) {\n this.onerror(msg[status] + ': ' + this.strm.msg, status);\n\n this.write_in_progress = false;\n if (this.pending_close)\n this.close();\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport {Transform} from 'stream';\nimport * as _binding from './zlib-lib/binding';\nimport {inherits} from 'util';\nfunction assert (a, msg) {\n if (!a) {\n throw new Error(msg);\n }\n}\nvar binding = {};\nObject.keys(_binding).forEach(function (key) {\n binding[key] = _binding[key];\n});\n// zlib doesn't provide these, so kludge them in following the same\n// const naming scheme zlib uses.\nbinding.Z_MIN_WINDOWBITS = 8;\nbinding.Z_MAX_WINDOWBITS = 15;\nbinding.Z_DEFAULT_WINDOWBITS = 15;\n\n// fewer than 64 bytes per chunk is stupid.\n// technically it could work with as few as 8, but even 64 bytes\n// is absurdly low. Usually a MB or more is best.\nbinding.Z_MIN_CHUNK = 64;\nbinding.Z_MAX_CHUNK = Infinity;\nbinding.Z_DEFAULT_CHUNK = (16 * 1024);\n\nbinding.Z_MIN_MEMLEVEL = 1;\nbinding.Z_MAX_MEMLEVEL = 9;\nbinding.Z_DEFAULT_MEMLEVEL = 8;\n\nbinding.Z_MIN_LEVEL = -1;\nbinding.Z_MAX_LEVEL = 9;\nbinding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;\n\n\n// translation table for return codes.\nexport var codes = {\n Z_OK: binding.Z_OK,\n Z_STREAM_END: binding.Z_STREAM_END,\n Z_NEED_DICT: binding.Z_NEED_DICT,\n Z_ERRNO: binding.Z_ERRNO,\n Z_STREAM_ERROR: binding.Z_STREAM_ERROR,\n Z_DATA_ERROR: binding.Z_DATA_ERROR,\n Z_MEM_ERROR: binding.Z_MEM_ERROR,\n Z_BUF_ERROR: binding.Z_BUF_ERROR,\n Z_VERSION_ERROR: binding.Z_VERSION_ERROR\n};\n\nObject.keys(codes).forEach(function(k) {\n codes[codes[k]] = k;\n});\n\nexport function createDeflate(o) {\n return new Deflate(o);\n}\n\nexport function createInflate(o) {\n return new Inflate(o);\n}\n\nexport function createDeflateRaw(o) {\n return new DeflateRaw(o);\n}\n\nexport function createInflateRaw(o) {\n return new InflateRaw(o);\n}\n\nexport function createGzip(o) {\n return new Gzip(o);\n}\n\nexport function createGunzip(o) {\n return new Gunzip(o);\n}\n\nexport function createUnzip(o) {\n return new Unzip(o);\n}\n\n\n// Convenience methods.\n// compress/decompress a string or buffer in one step.\nexport function deflate(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Deflate(opts), buffer, callback);\n}\n\nexport function deflateSync(buffer, opts) {\n return zlibBufferSync(new Deflate(opts), buffer);\n}\n\nexport function gzip(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Gzip(opts), buffer, callback);\n}\n\nexport function gzipSync(buffer, opts) {\n return zlibBufferSync(new Gzip(opts), buffer);\n}\n\nexport function deflateRaw(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new DeflateRaw(opts), buffer, callback);\n}\n\nexport function deflateRawSync(buffer, opts) {\n return zlibBufferSync(new DeflateRaw(opts), buffer);\n}\n\nexport function unzip(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Unzip(opts), buffer, callback);\n}\n\nexport function unzipSync(buffer, opts) {\n return zlibBufferSync(new Unzip(opts), buffer);\n}\n\nexport function inflate(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Inflate(opts), buffer, callback);\n}\n\nexport function inflateSync(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n}\n\nexport function gunzip(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Gunzip(opts), buffer, callback);\n}\n\nexport function gunzipSync(buffer, opts) {\n return zlibBufferSync(new Gunzip(opts), buffer);\n}\n\nexport function inflateRaw(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new InflateRaw(opts), buffer, callback);\n}\n\nexport function inflateRawSync(buffer, opts) {\n return zlibBufferSync(new InflateRaw(opts), buffer);\n}\n\nfunction zlibBuffer(engine, buffer, callback) {\n var buffers = [];\n var nread = 0;\n\n engine.on('error', onError);\n engine.on('end', onEnd);\n\n engine.end(buffer);\n flow();\n\n function flow() {\n var chunk;\n while (null !== (chunk = engine.read())) {\n buffers.push(chunk);\n nread += chunk.length;\n }\n engine.once('readable', flow);\n }\n\n function onError(err) {\n engine.removeListener('end', onEnd);\n engine.removeListener('readable', flow);\n callback(err);\n }\n\n function onEnd() {\n var buf = Buffer.concat(buffers, nread);\n buffers = [];\n callback(null, buf);\n engine.close();\n }\n}\n\nfunction zlibBufferSync(engine, buffer) {\n if (typeof buffer === 'string')\n buffer = new Buffer(buffer);\n if (!Buffer.isBuffer(buffer))\n throw new TypeError('Not a string or buffer');\n\n var flushFlag = binding.Z_FINISH;\n\n return engine._processChunk(buffer, flushFlag);\n}\n\n// generic zlib\n// minimal 2-byte header\nexport function Deflate(opts) {\n if (!(this instanceof Deflate)) return new Deflate(opts);\n Zlib.call(this, opts, binding.DEFLATE);\n}\n\nexport function Inflate(opts) {\n if (!(this instanceof Inflate)) return new Inflate(opts);\n Zlib.call(this, opts, binding.INFLATE);\n}\n\n\n\n// gzip - bigger header, same deflate compression\nexport function Gzip(opts) {\n if (!(this instanceof Gzip)) return new Gzip(opts);\n Zlib.call(this, opts, binding.GZIP);\n}\n\nexport function Gunzip(opts) {\n if (!(this instanceof Gunzip)) return new Gunzip(opts);\n Zlib.call(this, opts, binding.GUNZIP);\n}\n\n\n\n// raw - no header\nexport function DeflateRaw(opts) {\n if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts);\n Zlib.call(this, opts, binding.DEFLATERAW);\n}\n\nexport function InflateRaw(opts) {\n if (!(this instanceof InflateRaw)) return new InflateRaw(opts);\n Zlib.call(this, opts, binding.INFLATERAW);\n}\n\n\n// auto-detect header.\nexport function Unzip(opts) {\n if (!(this instanceof Unzip)) return new Unzip(opts);\n Zlib.call(this, opts, binding.UNZIP);\n}\n\n\n// the Zlib class they all inherit from\n// This thing manages the queue of requests, and returns\n// true or false if there is anything in the queue when\n// you call the .write() method.\n\nexport function Zlib(opts, mode) {\n this._opts = opts = opts || {};\n this._chunkSize = opts.chunkSize || binding.Z_DEFAULT_CHUNK;\n\n Transform.call(this, opts);\n\n if (opts.flush) {\n if (opts.flush !== binding.Z_NO_FLUSH &&\n opts.flush !== binding.Z_PARTIAL_FLUSH &&\n opts.flush !== binding.Z_SYNC_FLUSH &&\n opts.flush !== binding.Z_FULL_FLUSH &&\n opts.flush !== binding.Z_FINISH &&\n opts.flush !== binding.Z_BLOCK) {\n throw new Error('Invalid flush flag: ' + opts.flush);\n }\n }\n this._flushFlag = opts.flush || binding.Z_NO_FLUSH;\n\n if (opts.chunkSize) {\n if (opts.chunkSize < binding.Z_MIN_CHUNK ||\n opts.chunkSize > binding.Z_MAX_CHUNK) {\n throw new Error('Invalid chunk size: ' + opts.chunkSize);\n }\n }\n\n if (opts.windowBits) {\n if (opts.windowBits < binding.Z_MIN_WINDOWBITS ||\n opts.windowBits > binding.Z_MAX_WINDOWBITS) {\n throw new Error('Invalid windowBits: ' + opts.windowBits);\n }\n }\n\n if (opts.level) {\n if (opts.level < binding.Z_MIN_LEVEL ||\n opts.level > binding.Z_MAX_LEVEL) {\n throw new Error('Invalid compression level: ' + opts.level);\n }\n }\n\n if (opts.memLevel) {\n if (opts.memLevel < binding.Z_MIN_MEMLEVEL ||\n opts.memLevel > binding.Z_MAX_MEMLEVEL) {\n throw new Error('Invalid memLevel: ' + opts.memLevel);\n }\n }\n\n if (opts.strategy) {\n if (opts.strategy != binding.Z_FILTERED &&\n opts.strategy != binding.Z_HUFFMAN_ONLY &&\n opts.strategy != binding.Z_RLE &&\n opts.strategy != binding.Z_FIXED &&\n opts.strategy != binding.Z_DEFAULT_STRATEGY) {\n throw new Error('Invalid strategy: ' + opts.strategy);\n }\n }\n\n if (opts.dictionary) {\n if (!Buffer.isBuffer(opts.dictionary)) {\n throw new Error('Invalid dictionary: it should be a Buffer instance');\n }\n }\n\n this._binding = new binding.Zlib(mode);\n\n var self = this;\n this._hadError = false;\n this._binding.onerror = function(message, errno) {\n // there is no way to cleanly recover.\n // continuing only obscures problems.\n self._binding = null;\n self._hadError = true;\n\n var error = new Error(message);\n error.errno = errno;\n error.code = binding.codes[errno];\n self.emit('error', error);\n };\n\n var level = binding.Z_DEFAULT_COMPRESSION;\n if (typeof opts.level === 'number') level = opts.level;\n\n var strategy = binding.Z_DEFAULT_STRATEGY;\n if (typeof opts.strategy === 'number') strategy = opts.strategy;\n\n this._binding.init(opts.windowBits || binding.Z_DEFAULT_WINDOWBITS,\n level,\n opts.memLevel || binding.Z_DEFAULT_MEMLEVEL,\n strategy,\n opts.dictionary);\n\n this._buffer = new Buffer(this._chunkSize);\n this._offset = 0;\n this._closed = false;\n this._level = level;\n this._strategy = strategy;\n\n this.once('end', this.close);\n}\n\ninherits(Zlib, Transform);\n\nZlib.prototype.params = function(level, strategy, callback) {\n if (level < binding.Z_MIN_LEVEL ||\n level > binding.Z_MAX_LEVEL) {\n throw new RangeError('Invalid compression level: ' + level);\n }\n if (strategy != binding.Z_FILTERED &&\n strategy != binding.Z_HUFFMAN_ONLY &&\n strategy != binding.Z_RLE &&\n strategy != binding.Z_FIXED &&\n strategy != binding.Z_DEFAULT_STRATEGY) {\n throw new TypeError('Invalid strategy: ' + strategy);\n }\n\n if (this._level !== level || this._strategy !== strategy) {\n var self = this;\n this.flush(binding.Z_SYNC_FLUSH, function() {\n self._binding.params(level, strategy);\n if (!self._hadError) {\n self._level = level;\n self._strategy = strategy;\n if (callback) callback();\n }\n });\n } else {\n process.nextTick(callback);\n }\n};\n\nZlib.prototype.reset = function() {\n return this._binding.reset();\n};\n\n// This is the _flush function called by the transform class,\n// internally, when the last chunk has been written.\nZlib.prototype._flush = function(callback) {\n this._transform(new Buffer(0), '', callback);\n};\n\nZlib.prototype.flush = function(kind, callback) {\n var ws = this._writableState;\n\n if (typeof kind === 'function' || (kind === void 0 && !callback)) {\n callback = kind;\n kind = binding.Z_FULL_FLUSH;\n }\n\n if (ws.ended) {\n if (callback)\n process.nextTick(callback);\n } else if (ws.ending) {\n if (callback)\n this.once('end', callback);\n } else if (ws.needDrain) {\n var self = this;\n this.once('drain', function() {\n self.flush(callback);\n });\n } else {\n this._flushFlag = kind;\n this.write(new Buffer(0), '', callback);\n }\n};\n\nZlib.prototype.close = function(callback) {\n if (callback)\n process.nextTick(callback);\n\n if (this._closed)\n return;\n\n this._closed = true;\n\n this._binding.close();\n\n var self = this;\n process.nextTick(function() {\n self.emit('close');\n });\n};\n\nZlib.prototype._transform = function(chunk, encoding, cb) {\n var flushFlag;\n var ws = this._writableState;\n var ending = ws.ending || ws.ended;\n var last = ending && (!chunk || ws.length === chunk.length);\n\n if (!chunk === null && !Buffer.isBuffer(chunk))\n return cb(new Error('invalid input'));\n\n // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag.\n // If it's explicitly flushing at some other time, then we use\n // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression\n // goodness.\n if (last)\n flushFlag = binding.Z_FINISH;\n else {\n flushFlag = this._flushFlag;\n // once we've flushed the last of the queue, stop flushing and\n // go back to the normal behavior.\n if (chunk.length >= ws.length) {\n this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;\n }\n }\n\n this._processChunk(chunk, flushFlag, cb);\n};\n\nZlib.prototype._processChunk = function(chunk, flushFlag, cb) {\n var availInBefore = chunk && chunk.length;\n var availOutBefore = this._chunkSize - this._offset;\n var inOff = 0;\n\n var self = this;\n\n var async = typeof cb === 'function';\n\n if (!async) {\n var buffers = [];\n var nread = 0;\n\n var error;\n this.on('error', function(er) {\n error = er;\n });\n\n do {\n var res = this._binding.writeSync(flushFlag,\n chunk, // in\n inOff, // in_off\n availInBefore, // in_len\n this._buffer, // out\n this._offset, //out_off\n availOutBefore); // out_len\n } while (!this._hadError && callback(res[0], res[1]));\n\n if (this._hadError) {\n throw error;\n }\n\n var buf = Buffer.concat(buffers, nread);\n this.close();\n\n return buf;\n }\n\n var req = this._binding.write(flushFlag,\n chunk, // in\n inOff, // in_off\n availInBefore, // in_len\n this._buffer, // out\n this._offset, //out_off\n availOutBefore); // out_len\n\n req.buffer = chunk;\n req.callback = callback;\n\n function callback(availInAfter, availOutAfter) {\n if (self._hadError)\n return;\n\n var have = availOutBefore - availOutAfter;\n assert(have >= 0, 'have should not go down');\n\n if (have > 0) {\n var out = self._buffer.slice(self._offset, self._offset + have);\n self._offset += have;\n // serve some output to the consumer.\n if (async) {\n self.push(out);\n } else {\n buffers.push(out);\n nread += out.length;\n }\n }\n\n // exhausted the output buffer, or used all the input create a new one.\n if (availOutAfter === 0 || self._offset >= self._chunkSize) {\n availOutBefore = self._chunkSize;\n self._offset = 0;\n self._buffer = new Buffer(self._chunkSize);\n }\n\n if (availOutAfter === 0) {\n // Not actually done. Need to reprocess.\n // Also, update the availInBefore to the availInAfter value,\n // so that if we have to hit it a third (fourth, etc.) time,\n // it'll have the correct byte counts.\n inOff += (availInBefore - availInAfter);\n availInBefore = availInAfter;\n\n if (!async)\n return true;\n\n var newReq = self._binding.write(flushFlag,\n chunk,\n inOff,\n availInBefore,\n self._buffer,\n self._offset,\n self._chunkSize);\n newReq.callback = callback; // this same function\n newReq.buffer = chunk;\n return;\n }\n\n if (!async)\n return false;\n\n // finished with the chunk.\n cb();\n }\n};\n\ninherits(Deflate, Zlib);\ninherits(Inflate, Zlib);\ninherits(Gzip, Zlib);\ninherits(Gunzip, Zlib);\ninherits(DeflateRaw, Zlib);\ninherits(InflateRaw, Zlib);\ninherits(Unzip, Zlib);\nexport default {\n codes: codes,\n createDeflate: createDeflate,\n createInflate: createInflate,\n createDeflateRaw: createDeflateRaw,\n createInflateRaw: createInflateRaw,\n createGzip: createGzip,\n createGunzip: createGunzip,\n createUnzip: createUnzip,\n deflate: deflate,\n deflateSync: deflateSync,\n gzip: gzip,\n gzipSync: gzipSync,\n deflateRaw: deflateRaw,\n deflateRawSync: deflateRawSync,\n unzip: unzip,\n unzipSync: unzipSync,\n inflate: inflate,\n inflateSync: inflateSync,\n gunzip: gunzip,\n gunzipSync: gunzipSync,\n inflateRaw: inflateRaw,\n inflateRawSync: inflateRawSync,\n Deflate: Deflate,\n Inflate: Inflate,\n Gzip: Gzip,\n Gunzip: Gunzip,\n DeflateRaw: DeflateRaw,\n InflateRaw: InflateRaw,\n Unzip: Unzip,\n Zlib: Zlib\n};\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: zlib codec for PlantUML website\n * Encode/Decode code taken from the PlantUML website:\n * http://plantuml.sourceforge.net/codejavascript2.html\n */\n'use strict';\n\nimport zlib from 'zlib';\n\nfunction encode64(data) {\n var r = '';\n for (var i = 0; i < data.length; i += 3) {\n if (i + 2 == data.length) {\n r += append3bytes(data.charCodeAt(i), data.charCodeAt(i + 1), 0);\n } else if (i + 1 == data.length) {\n r += append3bytes(data.charCodeAt(i), 0, 0);\n } else {\n r += append3bytes(data.charCodeAt(i), data.charCodeAt(i + 1), data.charCodeAt(i + 2));\n }\n }\n return r;\n}\n\nfunction append3bytes(b1, b2, b3) {\n var c1 = b1 >> 2;\n var c2 = ((b1 & 0x3) << 4) | (b2 >> 4);\n var c3 = ((b2 & 0xf) << 2) | (b3 >> 6);\n var c4 = b3 & 0x3f;\n var r = '';\n r += encode6bit(c1 & 0x3f);\n r += encode6bit(c2 & 0x3f);\n r += encode6bit(c3 & 0x3f);\n r += encode6bit(c4 & 0x3f);\n return r;\n}\n\nfunction encode6bit(b) {\n if (b < 10) {\n return String.fromCharCode(48 + b);\n }\n b -= 10;\n if (b < 26) {\n return String.fromCharCode(65 + b);\n }\n b -= 26;\n if (b < 26) {\n return String.fromCharCode(97 + b);\n }\n b -= 26;\n if (b == 0) {\n return '-';\n }\n if (b == 1) {\n return '_';\n }\n return '?';\n}\n\nfunction decode6bit(cc) {\n var c = cc.charCodeAt(0);\n if (cc === '_') return 63;\n if (cc === '-') return 62;\n if (c >= 97) return c - 61; // - 97 + 26 + 10\n if (c >= 65) return c - 55; // - 65 + 10\n if (c >= 48) return c - 48;\n return '?';\n}\n\nfunction extract3bytes(data) {\n var c1 = decode6bit(data[0]);\n var c2 = decode6bit(data[1]);\n var c3 = decode6bit(data[2]);\n var c4 = decode6bit(data[3]);\n var b1 = (c1 << 2) | ((c2 >> 4) & 0x3f);\n var b2 = ((c2 << 4) & 0xf0) | ((c3 >> 2) & 0xf);\n var b3 = ((c3 << 6) & 0xc0) | (c4 & 0x3f);\n return [b1, b2, b3];\n}\n\nfunction decode64(data) {\n var r = '';\n var i = 0;\n for (i = 0; i < data.length; i += 4) {\n var t = extract3bytes(data.substring(i, i + 4));\n r = r + String.fromCharCode(t[0]);\n r = r + String.fromCharCode(t[1]);\n r = r + String.fromCharCode(t[2]);\n }\n return r;\n}\n\nfunction encode(data) {\n return encode64(\n zlib\n .deflateRawSync(data, {\n level: 9\n })\n .toString('binary')\n );\n}\n\nfunction decode(data) {\n return zlib.inflateRawSync(Buffer.from(decode64(data), 'binary')).toString();\n}\n\nfunction zEncode(data) {\n return zlib\n .deflateRawSync(data, {\n level: 9\n })\n .toString('base64');\n}\n\nfunction zDecode(data) {\n return zlib.inflateRawSync(Buffer.from(data, 'base64')).toString();\n}\n\nconst brEncode =\n typeof zlib.brotliCompressSync === 'undefined'\n ? undefined\n : function(data) {\n return zlib\n .brotliCompressSync(Buffer.from(data), {\n params: {\n [zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT,\n [zlib.constants.BROTLI_PARAM_QUALITY]: 11\n }\n })\n .toString('base64');\n };\n\nconst brDecode =\n typeof zlib.brotliDecompressSync === 'undefined'\n ? undefined\n : function(data) {\n return zlib.brotliDecompressSync(Buffer.from(data, 'base64')).toString();\n };\n\nconst zlibcodec = { encode, decode, brEncode, brDecode };\nexport { zlibcodec as default, encode, decode, zEncode, zDecode, brEncode, brDecode };\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: plantuml codec for PlantUML website\n * Encode/Decode code taken from the PlantUML website:\n * http://plantuml.sourceforge.net/codejavascript2.html\n */\n\n'use strict';\n\nimport * as zlibcodec from './zlib-codec.js';\n\nfunction encodeuml(data) {\n const startuml = '@startuml';\n const enduml = '@enduml';\n const s = `${startuml}${String(data.split(startuml)[1]).split(enduml)[0] || ''}${enduml}`;\n return zlibcodec.encode(s);\n}\n\nfunction decodeuml(data) {\n return zlibcodec.decode(data);\n}\n\nconst plantumlcodec = {\n encodeuml,\n decodeuml\n};\n\nexport { plantumlcodec as default, encodeuml, decodeuml };\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown plantuml extension for markdown\n */\n'use strict';\n\nimport plantumlcodec from '../utils/plantuml-codec.js';\n\nconst defaultUmlWebsite = 'www.plantuml.com/plantuml';\nconst defaultImageFormat = 'img';\n\nlet umlElementCount = 0;\nfunction renderPlantumlElement(element, config) {\n return new Promise(resolve => {\n const langattr = element.dataset.lang;\n const langobj = langattr ? JSON.parse(langattr) : null;\n let diagramClass = '';\n if (langobj) {\n if (\n (typeof langobj.codeblock === 'boolean' && langobj.codeblock) ||\n (typeof langobj.codeblock === 'string' && langobj.codeblock.toLowerCase() === 'true')\n ) {\n return resolve(false);\n }\n\n if (langobj.align) {\n //default left\n if (langobj.align === 'center') {\n diagramClass = 'diagram-center';\n } else if (langobj.align === 'right') {\n diagramClass = 'diagram-right';\n }\n }\n }\n const code = element.textContent.trim();\n const name =\n (element.classList.length > 0 ? element.classList[0] : '') +\n (!element.className || !diagramClass ? '' : ' ') +\n diagramClass;\n const imageFormat = config.imageFormat;\n if (imageFormat === 'svg') {\n const id = 'plantuml-' + Date.now() + '-' + Math.floor(Math.random() * 10000);\n if (typeof config.svgRender === 'function' && config.svgRender) {\n config.svgRender(id, name, code, umlElementCount).then(svgData => {\n element.parentNode.outerHTML = `
    ${svgData}
    `;\n resolve(true);\n });\n } else if (typeof window !== 'undefined' && window.fetch && window.dispatchEvent) {\n const protocol = window && window.location.protocol;\n const website = (protocol === 'http:' || protocol === 'https:' ? '//' : 'https://') + config.umlWebSite;\n const imageExtension = imageFormat !== defaultImageFormat ? `.${imageFormat}` : '';\n const uml = plantumlcodec.encodeuml(code);\n const src = `${website}/${imageFormat}/${uml}${imageExtension}`;\n window\n .fetch(src)\n .then(response => {\n if (response.ok) {\n return response.text();\n }\n })\n .then(svgData => {\n element.parentNode.outerHTML = `
    ${svgData}
    `;\n resolve(true);\n });\n }\n } else {\n const protocol = window && window.location.protocol;\n const website = (protocol === 'http:' || protocol === 'https:' ? '//' : 'https://') + config.umlWebSite;\n const imageExtension = imageFormat !== defaultImageFormat ? `.${imageFormat}` : '';\n const uml = plantumlcodec.encodeuml(code);\n const src = `${website}/${imageFormat}/${uml}${imageExtension}`;\n element.parentNode.outerHTML = `
    `;\n return resolve(true);\n }\n });\n}\n\n//
    \nfunction renderPlantumlElements(elements, config) {\n umlElementCount = elements.length;\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderPlantumlElement(element, config));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// Plantuml default config\nconst getConfig = (config = {}) => ({\n umlWebSite: defaultUmlWebsite,\n imageFormat: defaultImageFormat,\n svgRender: null,\n ...config\n});\n\nfunction showdownPlantuml(userConfig) {\n const config = getConfig(userConfig);\n\n return [\n {\n type: 'output',\n config: config,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the plantuml in code blocks\n const elements = wrapper.querySelectorAll('code.plantuml.language-plantuml');\n if (!elements.length) {\n return false;\n }\n\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render plantuml elements.`);\n return renderPlantumlElements(elements, this.config).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render plantuml elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownPlantuml;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown railroad extension for markdown\n */\n'use strict';\n\nconst extName = \"railroad\";\nconst cssCdnName = 'railroadCSS';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown railroad extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nlet railroad = false;\nfunction hasRailroad() {\n return railroad;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasRailroad();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs.loadStyleSheet(cssCdnName);\n cdnjs.loadScript(extName).then(() => {\n railroad = true;\n });\n }\n }\n return sync;\n}\n\nfunction onRenderRailroad(resolve, res) {\n if (hasRailroad()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const cssLink = res.cssLink;\n const railroadElement = window.eval(data).format();\n const doc = res.element.ownerDocument;\n res.element.parentNode.outerHTML = cssLink\n ? `
    `\n : `
    `;\n railroadElement.addTo(doc.getElementById(id));\n return resolve(true);\n }\n \n setTimeout(() => {\n onRenderRailroad(resolve, res);\n }, 10);\n}\n\n/**\n * render railroad graphs\n */\nfunction renderRailroad(element) {\n return new Promise(resolve => {\n const meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return resolve(false);\n }\n\n\n meta.cssLink = cdnjs.getSrc(cssCdnName);\n onRenderRailroad(resolve, meta);\n });\n}\n\n//
    \nfunction renderRailroadElements(elements) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderRailroad(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\nfunction showdownRailroad() {\n return [\n {\n type: 'output',\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the railroad in code blocks\n const elements = wrapper.querySelectorAll('code.railroad.language-railroad');\n if (!elements.length) {\n return false;\n }\n\n this.config = {\n cssLink: cdnjs.getSrc(cssCdnName)\n };\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render railroad elements.`);\n return renderRailroadElements(elements).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render railroad elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownRailroad;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown sequence extension for markdown\n */\n'use strict';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown sequence extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\n\n// js-sequence-diagrams can create a global object named Diagrams of window,\n// To be compatible with railroad diagrams extension that also has window.Diagram object,\n// You need to save the original Diagrams object of railroad diagrams extension here.\nlet diagram;\nif (typeof window !== 'undefined') {\n if (window.Diagram) {\n diagram = window.Diagram;\n if (window.Diagram['Signal']) {\n var sequence = window.Diagram;\n }\n }\n}\n\nconst themes = ['simple', 'hand'];\nif (typeof sequence === 'undefined' && typeof window !== 'undefined') {\n var sequence = window.SequenceJS;\n}\n\nfunction hasSequence() {\n return !!sequence;\n}\n\nlet dync = false;\nconst cssCdnName = 'sequenceCSS';\nfunction dyncLoadScript() {\n const sync = hasSequence();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs.loadStyleSheet(cssCdnName);\n cdnjs\n .loadScript('WebFont')\n .then(() => {\n return cdnjs.loadScript('Snap');\n })\n .then(() => {\n return cdnjs.loadScript('underscore');\n })\n .then(() => {\n // You need to save the original Diagrams object of railroad diagrams extension here.\n if (!diagram && window['Diagram']) {\n diagram = window['Diagram'];\n }\n return cdnjs.loadScript('sequence');\n })\n .then(() => {\n sequence = window['Diagram'];\n window.SequenceJS = sequence;\n // You need to replace the original Diagrams object of railroad diagrams extension here.\n if (diagram) {\n window['Diagram'] = diagram;\n }\n });\n }\n }\n return sync;\n}\n\n/**\n * render sequence graphs\n */\nfunction renderSequence(element) {\n const langattr = element.dataset.lang;\n const langobj = langattr ? JSON.parse(langattr) : null;\n let diagramClass = '';\n if (langobj) {\n if (\n (typeof langobj.codeblock === 'boolean' && langobj.codeblock) ||\n (typeof langobj.codeblock === 'string' && langobj.codeblock.toLowerCase() === 'true')\n ) {\n return;\n }\n\n if (langobj.align) {\n //default left\n if (langobj.align === 'center') {\n diagramClass = 'diagram-center';\n } else if (langobj.align === 'right') {\n diagramClass = 'diagram-right';\n }\n }\n }\n const sync = dyncLoadScript();\n const cssLink = cdnjs.getSrc(cssCdnName);\n const code = element.textContent.trim();\n const name = 'js-sequence' + (!diagramClass ? '' : ' ') + diagramClass;\n const id = 'sequence-' + Date.now() + '-' + Math.floor(Math.random() * 10000);\n element.id = id;\n if (cssLink) {\n element.className = element.className + (!element.className ? '' : ' ') + 'css-sequence';\n element.dataset.css = cssLink;\n }\n if (!sync && typeof window !== 'undefined' && window.dispatchEvent) {\n Promise.resolve(id).then(elementid => {\n // dispatch sequence custom event\n window.dispatchEvent(\n new CustomEvent('sequence', {\n detail: {\n id: elementid,\n className: name,\n data: code,\n langattr: langattr,\n cssLink: cssLink\n }\n })\n );\n });\n } else {\n if (typeof window !== 'undefined' && window.dispatchEvent) {\n // dispatch sequence custom event\n window.dispatchEvent(\n new CustomEvent('sequence', {\n detail: {\n id: id,\n className: name,\n data: code,\n langattr: langattr,\n cssLink: cssLink\n }\n })\n );\n }\n }\n}\n\n//
    \nfunction renderSequenceElements(elements) {\n if (!elements.length) {\n return false;\n }\n elements.forEach(element => {\n renderSequence(element);\n });\n return true;\n}\n\nfunction onRenderSequence(element) {\n if (hasSequence()) {\n const id = element.id;\n const name = element.className;\n const data = element.data;\n const cssLink = element.cssLink;\n let theme = 'hand';\n const langattr = element.langattr;\n if (langattr) {\n const obj = JSON.parse(langattr);\n if (obj && obj.theme && themes.indexOf(obj.theme) != -1) {\n theme = obj.theme;\n }\n }\n let el = window.document.getElementById(id);\n if (el) {\n el.parentNode.outerHTML = cssLink\n ? `
    `\n : `
    `;\n el = window.document.getElementById(id);\n const d = sequence.parse(data);\n const options = { theme: theme };\n d.drawSVG(el ? el : id, options);\n return;\n }\n }\n setTimeout(() => {\n onRenderSequence(element);\n }, 50);\n}\n\nfunction showdownSequence() {\n const parser = new DOMParser();\n\n if (typeof window !== 'undefined' && window.dispatchEvent) {\n // Listen sequence custom event\n window.addEventListener('sequence', event => {\n if (event.detail) {\n onRenderSequence(event.detail);\n }\n });\n }\n\n return [\n {\n type: 'output',\n filter: function(html) {\n // parse html\n const doc = parser.parseFromString(html, 'text/html');\n const wrapper = typeof doc.body !== 'undefined' ? doc.body : doc;\n\n // find the sequence in code blocks\n const elements = wrapper.querySelectorAll('code.sequence.language-sequence');\n if (elements.length) {\n this.config = {\n cssLink: cdnjs.getSrc(cssCdnName)\n };\n }\n if (!renderSequenceElements(elements)) {\n return html;\n }\n // return html text content\n return wrapper.innerHTML;\n }\n }\n ];\n}\n\nexport default showdownSequence;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown wavedrom extension for markdown\n */\n'use strict';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown wavedrom extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof WaveDrom === 'undefined') {\n var WaveDrom = window.WaveDrom || undefined;\n}\n\nlet wdCount = 0;\nlet indexWD = 0;\nfunction hasWavedrom() {\n return !!WaveDrom;\n}\n\nlet dync = false;\nfunction dyncLoadScript(skin) {\n const sync = hasWavedrom();\n if (!sync && !dync) {\n dync = true;\n if (typeof window !== 'undefined') {\n cdnjs\n .loadScript({ WaveDromSkin: skin })\n .then(() => {\n return cdnjs.loadScript('WaveDrom');\n })\n .then(name => {\n WaveDrom = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction onRenderWavedrom(resolve, res) {\n if (hasWavedrom()) {\n const index = res.index;\n const id = res.id;\n const name = res.className;\n const data = res.data;\n let element = res.element;\n const doc = element.ownerDocument;\n element.parentNode.outerHTML = utils.renderCacheElement(doc, id + index, name, el => {\n const obj = window.eval(`(${data})`);\n WaveDrom.RenderWaveForm(index, obj, id);\n // Replace the created cache element with the original element with the same id.\n const wdel = document.getElementById('WaveDrom_Display_' + index);\n if (el != wdel) {\n while (wdel.childNodes.length) {\n el.appendChild(wdel.removeChild(wdel.childNodes[0]));\n }\n }\n });\n return resolve(true);\n }\n \n setTimeout(() => {\n onRenderWavedrom(resolve, res);\n }, 10);\n}\n/**\n * render wavedrom graphs\n */\nfunction renderWavedrom(element) {\n return new Promise(resolve => {\n const langattr = element.dataset.lang;\n const langobj = langattr ? JSON.parse(langattr) : null;\n let diagramClass = '';\n if (langobj) {\n if (\n (typeof langobj.codeblock === 'boolean' && langobj.codeblock) ||\n (typeof langobj.codeblock === 'string' && langobj.codeblock.toLowerCase() === 'true')\n ) {\n return;\n }\n\n if (langobj.align) {\n //default left\n if (langobj.align === 'center') {\n diagramClass = 'diagram-center';\n } else if (langobj.align === 'right') {\n diagramClass = 'diagram-right';\n }\n }\n }\n const code = element.textContent.trim();\n const name =\n (element.classList.length > 0 ? element.classList[0] : '') +\n (!element.className || !diagramClass ? '' : ' ') +\n diagramClass;\n const index = indexWD;\n ++indexWD;\n // When index of wavwdrom is 0, there will be some special logic in the WaveDrom lib.\n // So the index needs to be cleared after all WavwDrom element are rendered.\n --wdCount;\n if (!wdCount) {\n indexWD = 0;\n }\n\n //const id = 'wavedrom-' + Date.now() + '-' + Math.floor(Math.random() * 10000) + '-';\n const id = 'WaveDrom_Display_';\n element.id = id + index;\n const res = {\n element: element,\n index: index,\n id: id,\n className: name,\n data: code\n };\n onRenderWavedrom(resolve, res);\n // const id = 'WaveDrom_Display_' + index;\n // element.parentNode.outerHTML = cdnjs.renderCacheElement(element.ownerDocument, id, name, el => {\n // const obj = window.eval(`(${code})`);\n // WaveDrom.RenderWaveForm(index, obj, 'WaveDrom_Display_');\n // // Replace the created cache element with the original element with the same id.\n // const wdel = document.getElementById('WaveDrom_Display_' + index);\n // if (el != wdel) {\n // while (wdel.childNodes.length) {\n // el.appendChild(wdel.removeChild(wdel.childNodes[0]));\n // }\n // }\n // });\n });\n}\n\n//
    \nfunction renderWavedromElements(elements, skin) {\n dyncLoadScript(skin);\n return new Promise(resolve => {\n const promiseArray = [];\n wdCount = elements.length;\n elements.forEach(element => {\n promiseArray.push(renderWavedrom(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// wavedrom default config\nconst getConfig = (config = {}) => ({\n skin: 'default',\n ...config\n});\n\nfunction showdownWavedrom(skinConfig) {\n const config = getConfig(skinConfig)\n\n return [\n {\n type: 'output',\n config: config,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the wavedrom in code blocks\n const elements = wrapper.querySelectorAll('code.wavedrom.language-wavedrom');\n if (!elements.length) {\n return false;\n }\n\n console.log(`${new Date().Format('yyyy-MM-dd hh:mm:ss.S')} Begin render wavedrom elements.`);\n return renderWavedromElements(elements, this.config.skin).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd hh:mm:ss.S')} End render wavedrom elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownWavedrom;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown footnotes extension for markdown\n */\n'use strict';\n\nfunction showdownFootnotes() {\n return [\n {\n type: 'lang',\n filter: (text, converter) =>\n text.replace(/^\\[\\^([\\d\\w]+)\\]:\\s*((\\n+(\\s{2,4}|\\t).+)+)$/gm, (str, name, rawContent, _, padding) => {\n const content = converter.makeHtml(rawContent.replace(new RegExp(`^${padding}`, 'gm'), ''));\n return `
    [${name}]:${content}
    `;\n })\n },\n {\n type: 'lang',\n filter: text =>\n text.replace(\n /^\\[\\^([\\d\\w]+)\\]:( |\\n)((.+\\n)*.+)$/gm,\n (str, name, _, content) =>\n `[${name}]: ${content}`\n )\n },\n {\n type: 'lang',\n filter: text =>\n text.replace(/\\[\\^([\\d\\w]+)\\]/m, (str, name) => `[${name}]`)\n }\n ];\n}\n\nexport default showdownFootnotes;\n","/*\n * Copyright (c) 2020-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown container extension for markdown\n */\n'use strict';\n\nfunction showdownContainer() {\n return [\n {\n type: 'lang',\n filter: (text, converter) =>\n text.replace(\n /(?:^|\\n)(?: {0,3})(:::+)(?: *)([\\S]+)(?:[ \\t]*)([^\\s][\\S\\t ]*)?\\n([\\s\\S]*?)\\n(?: {0,3})\\1(?:[ \\t]*)\\n/g,\n function (wholeMatch, delim, classname, title, content) {\n if (classname) {\n let classes = classname.split('-');\n if (classes.length > 1) {\n classes.forEach(function (name, index, arr) {\n if (index > 0) {\n arr[index] = arr[index - 1] + '-' + name;\n }\n });\n } else {\n classes.unshift('container');\n }\n classname = classes.join(' ');\n }\n if (content) {\n content = converter.makeHtml(content);\n }\n if (title) {\n title = `

    ${title}

    `;\n } else {\n title = ''\n }\n return `
    ${title}${content}
    `;\n }\n ),\n },\n ];\n}\n\nexport default showdownContainer;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown flowchart extension for markdown\n */\n'use strict';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown flowchart extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof Raphael === 'undefined') {\n var Raphael = window.Raphael || undefined;\n}\n\nif (typeof flowchart === 'undefined') {\n var flowchart = window.flowchart || undefined;\n}\n\nfunction hasFlowchart() {\n return typeof Raphael !== 'undefined' && Raphael && typeof flowchart !== 'undefined' && flowchart ? true : false;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasFlowchart();\n if (typeof window !== 'undefined') {\n if (!sync && !dync) {\n dync = true;\n cdnjs\n .loadScript('Raphael')\n .then(name => {\n Raphael = utils.interopDefault(window[name]);\n return cdnjs.loadScript('flowchart');\n })\n .then(name => {\n flowchart = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction onRenderFlowchart(resolve, res) {\n if (hasFlowchart()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const options = res.options;\n const doc = res.element.ownerDocument;\n res.element.parentNode.outerHTML = utils.renderCacheElement(doc, id, name, el => {\n flowchart.parse(data).drawSVG(el, options);\n });\n resolve(true);\n return;\n }\n \n setTimeout(() => {\n onRenderFlowchart(resolve, res);\n }, 10);\n}\n\n/**\n * render flowchart graphs\n */\nfunction renderFlowchart(element, options) {\n return new Promise(resolve => {\n const meta = utils.createElementMeta('flowchart', element);\n if (!meta) {\n return resolve(false);\n }\n\n meta.options = options;\n onRenderFlowchart(resolve, meta);\n });\n}\n\n//
    \nfunction renderFlowchartElements(flowchartElements, flowElements, options) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n flowchartElements.forEach(element => {\n promiseArray.push(renderFlowchart(element, options));\n });\n flowElements.forEach(element => {\n promiseArray.push(renderFlowchart(element, options));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// Flowchart default options:\n// 'x': 0,\n// 'y': 0,\n// 'line-width': 3,\n// 'line-length': 50,\n// 'text-margin': 10,\n// 'font-size': 14,\n// 'font-color': 'black',\n// 'font': 'normal',\n// 'font-family': 'calibri',\n// 'font-weight': 'normal',\n// 'line-color': 'black',\n// 'element-color': 'black',\n// 'fill': 'white',\n// 'yes-text': 'yes',\n// 'no-text': 'no',\n// 'arrow-end': 'block',\n// 'class': 'flowchart',\n// 'scale': 1,\n// 'symbols': {\n// 'start': {},\n// 'end': {},\n// 'condition': {},\n// 'inputoutput': {},\n// 'operation': {},\n// 'subroutine': {},\n// 'parallel': {}\n// },\n// 'flowstate' : {\n// 'past' : { 'fill': '#CCCCCC', 'font-size': 12},\n// 'current' : {'fill': 'yellow', 'font-color': 'red', 'font-weight': 'bold'},\n// 'future' : { 'fill': '#FFFF99'},\n// 'invalid': {'fill': '#444444'}\n// }\nconst getOptions = (userOptions = {}) => ({\n 'line-width': 3,\n maxWidth: 3, //ensures the flowcharts fits within a certian width\n 'line-length': 50,\n 'text-margin': 10,\n 'font-size': 14,\n font: 'normal',\n 'font-family': 'Helvetica',\n 'font-weight': 'normal',\n 'font-color': 'black',\n 'line-color': 'black',\n 'element-color': 'black',\n fill: 'white',\n 'yes-text': 'yes',\n 'no-text': 'no',\n 'arrow-end': 'block',\n scale: 1,\n symbols: {\n start: {\n 'font-color': 'red',\n 'element-color': 'green',\n fill: 'yellow'\n },\n end: {\n class: 'end-element'\n }\n },\n flowstate: {\n past: { fill: '#CCCCCC', 'font-size': 12 },\n current: { fill: 'yellow', 'font-color': 'red', 'font-weight': 'bold' },\n future: { fill: '#FFFF99' },\n request: { fill: 'blue' },\n invalid: { fill: '#444444' },\n approved: {\n fill: '#58C4A3',\n 'font-size': 12,\n 'yes-text': 'APPROVED',\n 'no-text': 'n/a'\n },\n rejected: {\n fill: '#C45879',\n 'font-size': 12,\n 'yes-text': 'n/a',\n 'no-text': 'REJECTED'\n }\n },\n ...userOptions\n});\n\nfunction showdownFlowchart(userOptions) {\n const options = getOptions(userOptions);\n\n return [\n {\n type: 'output',\n config: options,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n\n // find the Flowchart in code blocks\n const flowchartElements = wrapper.querySelectorAll('code.flowchart.language-flowchart');\n const flowElements = wrapper.querySelectorAll('code.flow.language-flow');\n if (!flowchartElements.length && !flowElements.length) {\n return false;\n }\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render flowchart elements.`);\n return renderFlowchartElements(flowchartElements, flowElements, this.config).then(() => {\n console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render flowchart elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownFlowchart;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport './less/preview.less';\nimport './less/container.less';\n\nimport showdown from './parser/showdown.js';\nimport showdownAbc from './extensions/showdown-abc.js';\nimport showdownToc from './extensions/showdown-toc.js';\nimport showdownViz from './extensions/showdown-viz.js';\nimport showdownVega from './extensions/showdown-vega.js';\nimport showdownAlign from './extensions/showdown-align.js';\nimport showdownKatex from './extensions/showdown-katex.js';\nimport showdownEcharts from './extensions/showdown-echarts.js';\nimport showdownMermaid from './extensions/showdown-mermaid.js';\nimport showdownPlantuml from './extensions/showdown-plantuml.js';\nimport showdownRailroad from './extensions/showdown-railroad.js';\nimport showdownSequence from './extensions/showdown-sequence.js';\nimport showdownWavedrom from './extensions/showdown-wavedrom.js';\nimport showdownFootnotes from './extensions/showdown-footnotes.js';\nimport showdownContainer from './extensions/showdown-container.js';\nimport showdownFlowchart from './extensions/showdown-flowchart.js';\n\nimport * as zlibcodec from './utils/zlib-codec.js';\nimport cdnjs from './extensions/cdn';\n\n//////////////////////////////////////////////////////////////////////\nconst getOptions = (options = {}) => {\n return {\n flavor: 'github',\n ...options\n };\n};\n\nconst getAsyncExtensions = (options, extensions = {}) => {\n const mermaidOptions = options ? options.mermaid || {} : {};\n const plantumlOptions = options ? options.plantuml || {} : {};\n const katexOptions = options ? options.katex || {} : {};\n const vegaOptions = options ? options.vega || {} : {};\n\n const asyncExtensions = {\n 'showdown-plantuml': showdownPlantuml(plantumlOptions),\n 'showdown-mermaid': showdownMermaid(mermaidOptions),\n 'showdown-katex': showdownKatex(katexOptions),\n 'showdown-flowchart': showdownFlowchart,\n 'showdown-viz': showdownViz,\n 'showdown-vega': showdownVega(vegaOptions),\n 'showdown-wavedrom': showdownWavedrom,\n 'showdown-railroad': showdownRailroad,\n 'showdown-abc': showdownAbc,\n 'showdown-echarts': showdownEcharts,\n ...extensions\n };\n\n let extnames = [];\n for (let prop in asyncExtensions) {\n if (asyncExtensions.hasOwnProperty(prop)) {\n showdown.asyncExtension(prop, asyncExtensions[prop]);\n extnames.push(prop);\n }\n }\n return extnames;\n};\n\nconst getExtensions = (options, extensions = {}) => {\n const nativeExtensions = {\n 'showdown-toc': showdownToc,\n 'showdown-align': showdownAlign,\n 'showdown-footnotes': showdownFootnotes,\n 'showdown-container': showdownContainer,\n 'showdown-sequence': showdownSequence,\n ...extensions\n };\n\n let extnames = [];\n for (let prop in nativeExtensions) {\n if (nativeExtensions.hasOwnProperty(prop)) {\n showdown.extension(prop, nativeExtensions[prop]);\n extnames.push(prop);\n }\n }\n return extnames;\n};\n\nconst loadScript = (id, code) => {\n if (!code || typeof document === 'undefined') {\n return false;\n }\n\n const body = document.body;\n const parent = document.getElementById(id);\n if (parent) {\n const scriptID = `script-${id}`;\n let script = document.querySelector(`#parent > #${scriptID}`);\n if (script) {\n body.removeChild(script);\n } else {\n script = document.createElement('script');\n script.id = scriptID;\n }\n script.type = \"text/javascript\";\n script.text = code;\n parent.appendChild(script);\n }\n return true\n};\n\n\nconst showdownFlavors = ['github', 'ghost', 'vanilla', 'original', 'allon'];\nconst mermaidThemes = ['default', 'forest', 'dark', 'neutral'];\nconst vegaThemes = ['excel', 'ggplot2', 'quartz', 'vox', 'dark'];\nconst vegaRenderers = ['canvas', 'svg'];\nconst plantumlImgFmts = ['svg', 'png', 'jpg'];\n\n// defaultOptions.vega is embedOptions of vega-embed;\n// defaultOptions.katex is config of katex,\n// format is { delimiters: [ { left: '$$', right: '$$', display: true | false | undefined, asciimath: true | undefined }] };\n// defaultOptions.mermaid is config of mermaidAPI;\n// defaultOptions.plantuml is {umlWebSite: string, imageFormat: string};\n// defaultOptions.showdown is flavor and ShowdownOptions of showdown\nconst showdowns = {\n showdown: showdown,\n converter: null,\n defaultOptions: {\n showdown: getOptions(),\n plantuml: { imageFormat: 'svg' },\n mermaid: { theme: 'default' },\n katex: {},\n vega: { theme: 'vox' }\n },\n defaultExtensions: {},\n defaultAsyncExtensions: {},\n markdownDecodeFilter: function(doc) {\n return '';\n },\n initDefaultOptions: function() {\n if (!this.defaultOptions) {\n this.defaultOptions = {\n showdown: {},\n plantuml: {},\n mermaid: {},\n katex: {},\n vega: {}\n };\n }\n },\n setFlavor: function(name) {\n this.showdown.setFlavor(name);\n if (this.converter) {\n this.converter.setFlavor(name);\n }\n },\n addOptions: function(options) {\n for (const key in options) {\n if (key !== 'flavor') {\n this.showdown.setOption(key, options[key]);\n if (this.converter) {\n this.converter.setOption(key, options[key]);\n }\n }\n }\n },\n addExtension: function(name, extension) {\n this.removeExtension(name);\n if (typeof name === 'string') {\n try {\n showdown.extension(name, extension);\n if (this.converter) {\n this.converter.addExtension(name);\n }\n } catch (err) {\n console.log(err);\n }\n }\n },\n removeExtension: function(name) {\n if (typeof name !== 'string') return;\n if (this.converter) {\n let ext = null;\n try {\n ext = showdown.extension(name);\n } catch (err) {\n console.log(err);\n }\n if (!ext) return;\n this.converter.removeExtension(ext);\n }\n showdown.removeExtension(name);\n },\n addAsyncExtension: function(name, extension) {\n this.removeAsyncExtension(name);\n if (typeof name === 'string') {\n try {\n showdown.asyncExtension(name, extension);\n if (this.converter) {\n this.converter.addAsyncExtension(name);\n }\n } catch (err) {\n console.log(err);\n }\n }\n },\n removeAsyncExtension: function(name) {\n if (typeof name !== 'string') return;\n if (this.converter) {\n let ext = null;\n try {\n ext = showdown.asyncExtension(name);\n } catch (err) {\n console.log(err);\n }\n if (!ext) return;\n this.converter.removeAsyncExtension(ext);\n }\n showdown.removeAsyncExtension(name);\n },\n setCDN: function(cdnname, defScheme, distScheme) {\n if (typeof cdnname === 'string' && cdnname) {\n cdnjs.setCDN(cdnname, defScheme, distScheme);\n }\n },\n setShowdownFlavor: function(name) {\n this.initDefaultOptions();\n if (name) {\n if (showdownFlavors.indexOf(name) === -1) {\n name = 'github';\n }\n this.defaultOptions.showdown.flavor = name;\n this.setFlavor(name);\n }\n },\n setShowdownOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.showdown = Object.assign(this.defaultOptions.showdown || {}, options);\n this.setShowdownFlavor(this.defaultOptions.showdown.flavor);\n this.addOptions(this.defaultOptions.showdown);\n return this.defaultOptions.showdown;\n },\n setPlantumlOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.plantuml = Object.assign(this.defaultOptions.plantuml || {}, options);\n const imageFormat = this.defaultOptions.plantuml.imageFormat;\n if (imageFormat && plantumlImgFmts.indexOf(imageFormat) === -1) {\n this.defaultOptions.plantuml.imageFormat = 'png';\n }\n if (this.converter) {\n this.addAsyncExtension('showdown-plantuml', showdownPlantuml(this.defaultOptions.plantuml));\n }\n return this.defaultOptions.plantuml;\n },\n setMermaidOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.mermaid = Object.assign(this.defaultOptions.mermaid || {}, options);\n const theme = this.defaultOptions.mermaid.theme;\n if (theme && mermaidThemes.indexOf(theme) === -1) {\n this.defaultOptions.mermaid.theme = 'default';\n }\n if (this.converter) {\n this.addAsyncExtension('showdown-mermaid', showdownMermaid(this.defaultOptions.mermaid));\n }\n return this.defaultOptions.mermaid;\n },\n setKatexOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.katex = Object.assign(this.defaultOptions.katex || {}, options);\n if (this.converter) {\n this.addAsyncExtension('showdown-katex', showdownKatex(this.defaultOptions.katex));\n }\n return this.defaultOptions.katex;\n },\n setVegaOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.vega = Object.assign(this.defaultOptions.vega || {}, options);\n const theme = this.defaultOptions.vega.theme;\n if (theme && vegaThemes.indexOf(theme) === -1) {\n this.defaultOptions.vega.theme = 'vox';\n }\n const renderer = this.defaultOptions.vega.renderer;\n if (renderer && vegaRenderers.indexOf(renderer) === -1) {\n this.defaultOptions.vega.renderer = 'canvas';\n }\n if (this.converter) {\n this.addAsyncExtension('showdown-vega', showdownVega(this.defaultOptions.vega));\n }\n return this.defaultOptions.vega;\n },\n init: function(reset) {\n if (!this.converter) {\n const showdownOptions = this.defaultOptions ? this.defaultOptions.showdown || {} : {};\n const options = getOptions(showdownOptions);\n const extensions = getExtensions(this.defaultOptions, this.defaultExtensions);\n const asyncExtensions = getAsyncExtensions(this.defaultOptions, this.defaultAsyncExtensions);\n this.setFlavor(options.flavor);\n // converter instance of showdown\n this.converter = new showdown.Converter({\n extensions: extensions\n }).initConvertExtObj(options.flavor, asyncExtensions);\n this.addOptions(options);\n } else {\n let resetOptions = {};\n if (typeof reset === 'boolean' && reset) {\n resetOptions = { option: true, extension: true };\n } else {\n resetOptions = reset;\n }\n if (typeof resetOptions === 'object') {\n if (resetOptions.hasOwnProperty('option') && resetOptions.option) {\n const showdownOptions = this.defaultOptions ? this.defaultOptions.showdown || {} : {};\n const options = getOptions(showdownOptions);\n this.addOptions(options);\n }\n if (resetOptions.hasOwnProperty('extension') && resetOptions.extension) {\n this.addAsyncExtension('showdown-plantuml', showdownPlantuml(this.defaultOptions.plantuml));\n this.addAsyncExtension('showdown-mermaid', showdownMermaid(this.defaultOptions.mermaid));\n this.addAsyncExtension('showdown-vega', showdownVega(this.defaultOptions.vega));\n }\n }\n }\n return this;\n },\n makeHtml: function(doc, callback) {\n let content = '';\n if (typeof doc === 'object') {\n if (typeof doc.content === 'string') {\n if (typeof doc.type === 'string') {\n switch (doc.type) {\n case 'zip':\n content = this.zDecode(doc.content);\n break;\n default:\n content = this.markdownDecodeFilter(doc) || doc.content;\n break;\n }\n } else {\n content = doc.content;\n }\n }\n } else {\n content = doc;\n }\n\n if (this.converter && content) {\n function _getCssLink(wrapper, className, extName) {\n // find elements that has csslink\n const element = wrapper.querySelector(className);\n let cssLink = '';\n if (element) {\n cssLink = element.dataset.css;\n } else {\n let ext;\n try {\n ext = showdown.extension(extName);\n } catch {}\n\n if (!ext) {\n try {\n ext = showdown.asyncExtension(extName);\n } catch {}\n }\n\n if (ext) {\n if (Array.isArray(ext)) {\n for (var i = 0; i < ext.length; ++i) {\n if (ext[i].hasOwnProperty('config') && ext[i].config.hasOwnProperty('cssLink')) {\n cssLink = ext[i].config.cssLink;\n break;\n }\n }\n } else if (typeof ext === 'object') {\n if (ext.hasOwnProperty('config') && ext.config.hasOwnProperty('cssLink')) {\n cssLink = ext.config.cssLink;\n }\n }\n }\n }\n return cssLink;\n }\n\n function _checkCssTypes(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n\n return new Promise(resolve => {\n const katexCssLink = _getCssLink(wrapper, '.css-katex', 'showdown-katex');\n const sequenceCssLink = _getCssLink(wrapper, '.css-sequence', 'showdown-sequence');\n const railroadCssLink = _getCssLink(wrapper, '.css-railroad', 'showdown-railroad');\n\n obj.cssTypes = {\n hasKatex: katexCssLink ? true : false,\n hasSequence: sequenceCssLink ? true : false,\n hasRailroad: railroadCssLink ? true : false,\n css: {\n katex: katexCssLink,\n sequence: sequenceCssLink,\n railroad: railroadCssLink\n }\n };\n if (typeof callback === 'function' && callback) {\n callback(obj.cssTypes);\n }\n return resolve(obj);\n });\n }\n\n return this.converter.asyncMakeHtml(content, _checkCssTypes).then( obj => {\n content = `
    ${obj.html}
    `;\n return { html: content, scripts: obj.scripts };\n });\n }\n return Promise.reject(!content ? 'Content is empty.' : 'Converter is invaild.');\n },\n completedHtml: function(scripts) {\n if (!showdown.helper.isArray(scripts)) {\n scripts = [scripts];\n }\n return new Promise((revole, reject) => {\n for (var i = 0; i < scripts.length; ++i) {\n const script = scripts[i];\n if (!loadScript(script.id, script.code)) {\n return reject('Args is invaild!');\n }\n }\n revole(true);\n });\n },\n zDecode: function(zContent) {\n return zlibcodec.zDecode(zContent);\n },\n zEncode: function(content) {\n return zlibcodec.zEncode(content);\n }\n};\n\nexport default showdowns;\n"],"names":["getDefaultOpts","simple","defaultOptions","omitExtraWLInCodeBlocks","defaultValue","describe","type","noHeaderId","prefixHeaderId","rawPrefixHeaderId","ghCompatibleHeaderId","rawHeaderId","headerLevelStart","parseImgDimensions","simplifiedAutoLink","excludeTrailingPunctuationFromURLs","literalMidWordUnderscores","literalMidWordAsterisks","strikethrough","tables","tablesHeaderId","ghCodeBlocks","tasklists","smoothLivePreview","smartIndentationFix","disableForced4SpacesIndentedSublists","simpleLineBreaks","requireSpaceBeforeHeadingText","ghMentions","ghMentionsLink","encodeEmails","openLinksInNewWindow","backslashEscapesHTMLTags","emoji","underline","ellipsis","completeHTMLDocument","metadata","splitAdjacentBlockquotes","JSON","parse","stringify","ret","opt","hasOwnProperty","showdown","parsers","extensions","globalOptions","setFlavor","flavor","github","original","ghost","vanilla","allOn","options","allOptionsOn","validate","extension","name","errMsg","valid","error","helper","isArray","i","length","baseMsg","ext","isString","toLowerCase","isUndefined","listeners","filter","regex","ln","RegExp","replace","escapeCharactersCallback","wholeMatch","m1","charCodeAt","setOption","key","value","this","getOption","getOptions","resetOptions","Error","preset","option","getFlavor","getFlavorOptions","getDefaultOptions","subParser","func","stdExtName","validExtension","getAllExtensions","removeExtension","resetExtensions","validateExtension","console","warn","a","String","isFunction","toString","call","Array","forEach","obj","callback","prop","s","escapeCharacters","text","charsToEscape","afterBackslash","regexString","unescapeHTMLEntities","txt","rgxFindMatchPos","str","left","right","flags","t","m","start","end","f","g","indexOf","x","l","pos","exec","test","lastIndex","push","match","index","matchRecursiveRegExp","matchPos","results","slice","replaceRecursiveRegExp","replacement","repStr","finalStr","lng","bits","join","regexIndexOf","fromIndex","substring","search","splitAtIndex","encodeEmailAddress","mail","encode","ch","Math","floor","random","r","padEnd","targetLength","padString","repeat","msg","alert","log","regexes","asteriskDashAndColon","emojis","ab","abc","abcd","accept","aerial_tramway","airplane","alarm_clock","alembic","alien","ambulance","amphora","anchor","angel","anger","angry","anguished","ant","apple","aquarius","aries","arrow_backward","arrow_double_down","arrow_double_up","arrow_down","arrow_down_small","arrow_forward","arrow_heading_down","arrow_heading_up","arrow_left","arrow_lower_left","arrow_lower_right","arrow_right","arrow_right_hook","arrow_up","arrow_up_down","arrow_up_small","arrow_upper_left","arrow_upper_right","arrows_clockwise","arrows_counterclockwise","art","articulated_lorry","artificial_satellite","astonished","athletic_shoe","atm","atom_symbol","avocado","b","baby","baby_bottle","baby_chick","baby_symbol","back","bacon","badminton","baggage_claim","baguette_bread","balance_scale","balloon","ballot_box","ballot_box_with_check","bamboo","banana","bangbang","bank","bar_chart","barber","baseball","basketball","basketball_man","basketball_woman","bat","bath","bathtub","battery","beach_umbrella","bear","bed","bee","beer","beers","beetle","beginner","bell","bellhop_bell","bento","biking_man","bike","biking_woman","bikini","biohazard","bird","birthday","black_circle","black_flag","black_heart","black_joker","black_large_square","black_medium_small_square","black_medium_square","black_nib","black_small_square","black_square_button","blonde_man","blonde_woman","blossom","blowfish","blue_book","blue_car","blue_heart","blush","boar","boat","bomb","book","bookmark","bookmark_tabs","books","boom","boot","bouquet","bowing_man","bow_and_arrow","bowing_woman","bowling","boxing_glove","boy","bread","bride_with_veil","bridge_at_night","briefcase","broken_heart","bug","building_construction","bulb","bullettrain_front","bullettrain_side","burrito","bus","business_suit_levitating","busstop","bust_in_silhouette","busts_in_silhouette","butterfly","cactus","cake","calendar","call_me_hand","calling","camel","camera","camera_flash","camping","cancer","candle","candy","canoe","capital_abcd","capricorn","car","card_file_box","card_index","card_index_dividers","carousel_horse","carrot","cat","cat2","cd","chains","champagne","chart","chart_with_downwards_trend","chart_with_upwards_trend","checkered_flag","cheese","cherries","cherry_blossom","chestnut","chicken","children_crossing","chipmunk","chocolate_bar","christmas_tree","church","cinema","circus_tent","city_sunrise","city_sunset","cityscape","cl","clamp","clap","clapper","classical_building","clinking_glasses","clipboard","clock1","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","closed_book","closed_lock_with_key","closed_umbrella","cloud","cloud_with_lightning","cloud_with_lightning_and_rain","cloud_with_rain","cloud_with_snow","clown_face","clubs","cocktail","coffee","coffin","cold_sweat","comet","computer","computer_mouse","confetti_ball","confounded","confused","congratulations","construction","construction_worker_man","construction_worker_woman","control_knobs","convenience_store","cookie","cool","policeman","copyright","corn","couch_and_lamp","couple","couple_with_heart_woman_man","couple_with_heart_man_man","couple_with_heart_woman_woman","couplekiss_man_man","couplekiss_man_woman","couplekiss_woman_woman","cow","cow2","cowboy_hat_face","crab","crayon","credit_card","crescent_moon","cricket","crocodile","croissant","crossed_fingers","crossed_flags","crossed_swords","crown","cry","crying_cat_face","crystal_ball","cucumber","cupid","curly_loop","currency_exchange","curry","custard","customs","cyclone","dagger","dancer","dancing_women","dancing_men","dango","dark_sunglasses","dart","dash","date","deciduous_tree","deer","department_store","derelict_house","desert","desert_island","desktop_computer","male_detective","diamond_shape_with_a_dot_inside","diamonds","disappointed","disappointed_relieved","dizzy","dizzy_face","do_not_litter","dog","dog2","dollar","dolls","dolphin","door","doughnut","dove","dragon","dragon_face","dress","dromedary_camel","drooling_face","droplet","drum","duck","dvd","eagle","ear","ear_of_rice","earth_africa","earth_americas","earth_asia","egg","eggplant","eight_pointed_black_star","eight_spoked_asterisk","electric_plug","elephant","email","envelope_with_arrow","euro","european_castle","european_post_office","evergreen_tree","exclamation","expressionless","eye","eye_speech_bubble","eyeglasses","eyes","face_with_head_bandage","face_with_thermometer","fist_oncoming","factory","fallen_leaf","family_man_woman_boy","family_man_boy","family_man_boy_boy","family_man_girl","family_man_girl_boy","family_man_girl_girl","family_man_man_boy","family_man_man_boy_boy","family_man_man_girl","family_man_man_girl_boy","family_man_man_girl_girl","family_man_woman_boy_boy","family_man_woman_girl","family_man_woman_girl_boy","family_man_woman_girl_girl","family_woman_boy","family_woman_boy_boy","family_woman_girl","family_woman_girl_boy","family_woman_girl_girl","family_woman_woman_boy","family_woman_woman_boy_boy","family_woman_woman_girl","family_woman_woman_girl_boy","family_woman_woman_girl_girl","fast_forward","fax","fearful","feet","female_detective","ferris_wheel","ferry","field_hockey","file_cabinet","file_folder","film_projector","film_strip","fire","fire_engine","fireworks","first_quarter_moon","first_quarter_moon_with_face","fish","fish_cake","fishing_pole_and_fish","fist_raised","fist_left","fist_right","flashlight","fleur_de_lis","flight_arrival","flight_departure","floppy_disk","flower_playing_cards","flushed","fog","foggy","football","footprints","fork_and_knife","fountain","fountain_pen","four_leaf_clover","fox_face","framed_picture","free","fried_egg","fried_shrimp","fries","frog","frowning","frowning_face","frowning_man","frowning_woman","middle_finger","fuelpump","full_moon","full_moon_with_face","funeral_urn","game_die","gear","gem","gemini","gift","gift_heart","girl","globe_with_meridians","goal_net","goat","golf","golfing_man","golfing_woman","gorilla","grapes","green_apple","green_book","green_heart","green_salad","grey_exclamation","grey_question","grimacing","grin","grinning","guardsman","guardswoman","guitar","gun","haircut_woman","haircut_man","hamburger","hammer","hammer_and_pick","hammer_and_wrench","hamster","hand","handbag","handshake","hankey","hatched_chick","hatching_chick","headphones","hear_no_evil","heart","heart_decoration","heart_eyes","heart_eyes_cat","heartbeat","heartpulse","hearts","heavy_check_mark","heavy_division_sign","heavy_dollar_sign","heavy_heart_exclamation","heavy_minus_sign","heavy_multiplication_x","heavy_plus_sign","helicopter","herb","hibiscus","high_brightness","high_heel","hocho","hole","honey_pot","horse","horse_racing","hospital","hot_pepper","hotdog","hotel","hotsprings","hourglass","hourglass_flowing_sand","house","house_with_garden","houses","hugs","hushed","ice_cream","ice_hockey","ice_skate","icecream","id","ideograph_advantage","imp","inbox_tray","incoming_envelope","tipping_hand_woman","information_source","innocent","interrobang","iphone","izakaya_lantern","jack_o_lantern","japan","japanese_castle","japanese_goblin","japanese_ogre","jeans","joy","joy_cat","joystick","kaaba","keyboard","keycap_ten","kick_scooter","kimono","kiss","kissing","kissing_cat","kissing_closed_eyes","kissing_heart","kissing_smiling_eyes","kiwi_fruit","koala","koko","label","large_blue_circle","large_blue_diamond","large_orange_diamond","last_quarter_moon","last_quarter_moon_with_face","latin_cross","laughing","leaves","ledger","left_luggage","left_right_arrow","leftwards_arrow_with_hook","lemon","leo","leopard","level_slider","libra","light_rail","link","lion","lips","lipstick","lizard","lock","lock_with_ink_pen","lollipop","loop","loud_sound","loudspeaker","love_hotel","love_letter","low_brightness","lying_face","mag","mag_right","mahjong","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","man","man_artist","man_astronaut","man_cartwheeling","man_cook","man_dancing","man_facepalming","man_factory_worker","man_farmer","man_firefighter","man_health_worker","man_in_tuxedo","man_judge","man_juggling","man_mechanic","man_office_worker","man_pilot","man_playing_handball","man_playing_water_polo","man_scientist","man_shrugging","man_singer","man_student","man_teacher","man_technologist","man_with_gua_pi_mao","man_with_turban","tangerine","mans_shoe","mantelpiece_clock","maple_leaf","martial_arts_uniform","mask","massage_woman","massage_man","meat_on_bone","medal_military","medal_sports","mega","melon","memo","men_wrestling","menorah","mens","metal","metro","microphone","microscope","milk_glass","milky_way","minibus","minidisc","mobile_phone_off","money_mouth_face","money_with_wings","moneybag","monkey","monkey_face","monorail","moon","mortar_board","mosque","motor_boat","motor_scooter","motorcycle","motorway","mount_fuji","mountain","mountain_biking_man","mountain_biking_woman","mountain_cableway","mountain_railway","mountain_snow","mouse","mouse2","movie_camera","moyai","mrs_claus","muscle","mushroom","musical_keyboard","musical_note","musical_score","mute","nail_care","name_badge","national_park","nauseated_face","necktie","negative_squared_cross_mark","nerd_face","neutral_face","new","new_moon","new_moon_with_face","newspaper","newspaper_roll","next_track_button","ng","no_good_man","no_good_woman","night_with_stars","no_bell","no_bicycles","no_entry","no_entry_sign","no_mobile_phones","no_mouth","no_pedestrians","no_smoking","nose","notebook","notebook_with_decorative_cover","notes","nut_and_bolt","o","o2","ocean","octopus","oden","office","oil_drum","ok","ok_hand","ok_man","ok_woman","old_key","older_man","older_woman","om","on","oncoming_automobile","oncoming_bus","oncoming_police_car","oncoming_taxi","open_file_folder","open_hands","open_mouth","open_umbrella","ophiuchus","orange_book","orthodox_cross","outbox_tray","owl","ox","package","page_facing_up","page_with_curl","pager","paintbrush","palm_tree","pancakes","panda_face","paperclip","paperclips","parasol_on_ground","parking","part_alternation_mark","partly_sunny","passenger_ship","passport_control","pause_button","peace_symbol","peach","peanuts","pear","pen","pencil2","penguin","pensive","performing_arts","persevere","person_fencing","pouting_woman","phone","pick","pig","pig2","pig_nose","pill","pineapple","ping_pong","pisces","pizza","place_of_worship","plate_with_cutlery","play_or_pause_button","point_down","point_left","point_right","point_up","point_up_2","police_car","policewoman","poodle","popcorn","post_office","postal_horn","postbox","potable_water","potato","pouch","poultry_leg","pound","rage","pouting_cat","pouting_man","pray","prayer_beads","pregnant_woman","previous_track_button","prince","princess","printer","purple_heart","purse","pushpin","put_litter_in_its_place","question","rabbit","rabbit2","racehorse","racing_car","radio","radio_button","radioactive","railway_car","railway_track","rainbow","rainbow_flag","raised_back_of_hand","raised_hand_with_fingers_splayed","raised_hands","raising_hand_woman","raising_hand_man","ram","ramen","rat","record_button","recycle","red_circle","registered","relaxed","relieved","reminder_ribbon","repeat_one","rescue_worker_helmet","restroom","revolving_hearts","rewind","rhinoceros","ribbon","rice","rice_ball","rice_cracker","rice_scene","right_anger_bubble","ring","robot","rocket","rofl","roll_eyes","roller_coaster","rooster","rose","rosette","rotating_light","round_pushpin","rowing_man","rowing_woman","rugby_football","running_man","running_shirt_with_sash","running_woman","sa","sagittarius","sake","sandal","santa","satellite","saxophone","school","school_satchel","scissors","scorpion","scorpius","scream","scream_cat","scroll","seat","secret","see_no_evil","seedling","selfie","shallow_pan_of_food","shamrock","shark","shaved_ice","sheep","shell","shield","shinto_shrine","ship","shirt","shopping","shopping_cart","shower","shrimp","signal_strength","six_pointed_star","ski","skier","skull","skull_and_crossbones","sleeping","sleeping_bed","sleepy","slightly_frowning_face","slightly_smiling_face","slot_machine","small_airplane","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","smile","smile_cat","smiley","smiley_cat","smiling_imp","smirk","smirk_cat","smoking","snail","snake","sneezing_face","snowboarder","snowflake","snowman","snowman_with_snow","sob","soccer","soon","sos","sound","space_invader","spades","spaghetti","sparkle","sparkler","sparkles","sparkling_heart","speak_no_evil","speaker","speaking_head","speech_balloon","speedboat","spider","spider_web","spiral_calendar","spiral_notepad","spoon","squid","stadium","star","star2","star_and_crescent","star_of_david","stars","station","statue_of_liberty","steam_locomotive","stew","stop_button","stop_sign","stopwatch","straight_ruler","strawberry","stuck_out_tongue","stuck_out_tongue_closed_eyes","stuck_out_tongue_winking_eye","studio_microphone","stuffed_flatbread","sun_behind_large_cloud","sun_behind_rain_cloud","sun_behind_small_cloud","sun_with_face","sunflower","sunglasses","sunny","sunrise","sunrise_over_mountains","surfing_man","surfing_woman","sushi","suspension_railway","sweat","sweat_drops","sweat_smile","sweet_potato","swimming_man","swimming_woman","symbols","synagogue","syringe","taco","tada","tanabata_tree","taurus","taxi","tea","telephone_receiver","telescope","tennis","tent","thermometer","thinking","thought_balloon","ticket","tickets","tiger","tiger2","timer_clock","tipping_hand_man","tired_face","tm","toilet","tokyo_tower","tomato","tongue","top","tophat","tornado","trackball","tractor","traffic_light","train","train2","tram","triangular_flag_on_post","triangular_ruler","trident","triumph","trolleybus","trophy","tropical_drink","tropical_fish","truck","trumpet","tulip","tumbler_glass","turkey","turtle","tv","twisted_rightwards_arrows","two_hearts","two_men_holding_hands","two_women_holding_hands","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7981","u7a7a","umbrella","unamused","underage","unicorn","unlock","up","upside_down_face","v","vertical_traffic_light","vhs","vibration_mode","video_camera","video_game","violin","virgo","volcano","volleyball","vs","vulcan_salute","walking_man","walking_woman","waning_crescent_moon","waning_gibbous_moon","warning","wastebasket","watch","water_buffalo","watermelon","wave","wavy_dash","waxing_crescent_moon","wc","weary","wedding","weight_lifting_man","weight_lifting_woman","whale","whale2","wheel_of_dharma","wheelchair","white_check_mark","white_circle","white_flag","white_flower","white_large_square","white_medium_small_square","white_medium_square","white_small_square","white_square_button","wilted_flower","wind_chime","wind_face","wine_glass","wink","wolf","woman","woman_artist","woman_astronaut","woman_cartwheeling","woman_cook","woman_facepalming","woman_factory_worker","woman_farmer","woman_firefighter","woman_health_worker","woman_judge","woman_juggling","woman_mechanic","woman_office_worker","woman_pilot","woman_playing_handball","woman_playing_water_polo","woman_scientist","woman_shrugging","woman_singer","woman_student","woman_teacher","woman_technologist","woman_with_turban","womans_clothes","womans_hat","women_wrestling","womens","world_map","worried","wrench","writing_hand","yellow_heart","yen","yin_yang","yum","zap","zipper_mouth_face","zzz","octocat","Converter","converterOptions","langExtensions","outputModifiers","setConvFlavor","parsed","raw","format","_parseExtension","legacyExtensionLoading","validExt","listen","gOpt","_constructor","_dispatch","evtName","globals","ei","nText","makeHtml","gHtmlBlocks","gHtmlMdBlocks","gHtmlSpans","gUrls","gTitles","gDimensions","gListLevel","hashLinkCounts","converter","rsp","rgx","rTrimInputText","makeMarkdown","makeMd","src","HTMLParser","window","document","doc","createElement","innerHTML","preList","pres","querySelectorAll","presPH","childElementCount","firstChild","tagName","content","trim","language","getAttribute","classes","className","split","c","matches","outerHTML","setAttribute","substitutePreCodeTags","clean","node","n","childNodes","child","nodeType","nodeValue","removeChild","nodes","mdDoc","addExtension","useExtension","extensionName","splice","ii","output","getMetadata","getMetadataFormat","_setMetadataPair","_setMetadataFormat","_setMetadataRaw","writeAnchorTag","linkText","linkId","url","m5","m6","title","result","wm","st","escape","mentions","username","lnk","target","simpleURLRegex","simpleURLRegex2","delimUrlRegex","simpleMailRegex","delimMailRegex","replaceLink","leadingMagicChars","m2","m3","trailingPunctuation","trailingMagicChars","lnkTxt","append","lmc","tmc","replaceMail","href","bq","pre","codeblock","nextChar","doctype","doctypeParsed","charset","lang","meta","leadingText","numSpaces","emojiCode","delim","blockText","blockTags","repFunc","inside","opTagPos","rgx1","patLeft","patRight","subTexts","newSubText1","concat","hashHTMLSpan","html","repText","limit","num","$1","isNaN","parseInt","setextRegexH2","headerId","prefix","customizedHeaderId","spanGamut","hID","hashBlock","matchFound","hLevel","hText","span","header","writeImageTag","altText","width","height","gDims","parseInside","lead","processListItems","listStr","trimTrailing","isParagraphed","m4","taskbtn","checked","item","bulletStyle","otp","wm2","styleStartNumber","list","listType","res","parseConsecutiveLists","olRgx","ulRgx","counterRxg","parseCL","style","parseMetadataContents","wholematch","grafs","grafsOut","grafsOutIt","codeFlag","$2","re","replaceFunc","blankLines","parseCells","cell","parseTable","rawTable","tableLines","sLine","rawHeaders","map","rawStyles","rawCells","headers","styles","cells","shift","tableHeaderId","row","tb","tblLgn","buildTable","fromCharCode","hasChildNodes","children","childrenLength","innerTxt","headerLevel","headerMark","hasAttribute","listItems","listItemsLenght","listNum","listItemTxt","childrenLenght","spansOnly","data","tableArray","headings","rows","headContent","allign","cols","getElementsByTagName","cellContent","cellSpacesCount","strLen","module","exports","ConverterExtObj","asyncExtensions","outputAsyncModifiers","currConvFlavor","_parseAsyncExtension","asyncExtension","addAsyncExtension","removeAsyncExtension","j","getAsyncExtensions","getCurrFlavor","setCurrFlavor","prototype","initConvertExtObj","extObj","_typeof","exts","asyncMakeHtml","outputs","Promise","resolve","DOMParser","parseFromString","wrapper","body","scripts","then","promise","langattr","parseStyles","col","tablesMerge","direct","tablesRowspan","mergeCells","parseTableContent","headerless","parseHeaderlessTable","tablesHeaderless","currFlavor","flavors","_asyncExtensions","resetAsyncExtensions","orgSetFlavor","orgGetFlavorOptions","_unused","setFlavorOptions","Object","assign","cdnName","scheme","location","protocol","defScheme","distScheme","cdnSrc","local","ABCJS","ABCJSCSS","echarts","Viz","Raphael","flowchart","mermaid","katex","katexCSS","renderMathInElement","railroad","railroadCSS","Snap","WebFont","underscore","sequence","sequenceCSS","WaveDrom","WaveDromSkin","default","lowkey","narrow","vega","vegaLite","vegaEmbed","cdnjs","jsdelivr","getSrc","def","cdn","keys","val","setCDN","scheme_default","scheme_dist","getCDN","loadScript","rej","head","script","onload","appendChild","loadStyleSheet","css","rel","Date","Format","fmt","getMonth","getDate","getHours","getMinutes","getSeconds","S","getMilliseconds","k","getFullYear","substr","utils","interopDefault","ex","code","getElementById","renderCacheElement","el","display","renderElement","createElementMeta","element","dataset","langobj","diagramClass","align","textContent","classList","now","extName","cssCdnName","undefined","hasAbc","dync","onRenderAbc","cssLink","ownerDocument","parentNode","renderAbc","setTimeout","renderAbcElements","elements","sync","promiseArray","all","showdownAbc","config","createHeadingElement","toc","nexthead","createTextNode","appendTocElement","currTocNode","headingLevel","tempTocNode","preLevel","showdownToc","parser","replaceChild","tocNode","prev","renderTocElements","engines","hasViz","instance","onRenderViz","engine","viz","svg","renderString","renderViz","renderVizElements","showdownViz","hasVegaEmbed","renderVega","isVegaLite","onRenderVega","renderVegaElements","vegaElements","vegaLiteElements","showdownVega","userOptions","_objectSpread","actions","editor","theme","tooltip","renderer","arguments","showdownAlign","childNode","nextSibling","renderAlignElements","decimalsign","CONST","UNARY","BINARY","INFIX","LEFTBRACKET","RIGHTBRACKET","SPACE","UNDEROVER","DEFINITION","LEFTRIGHT","TEXT","AMquote","input","tag","tex","ttype","AMsymbols","notexcopy","invisible","rewriteleftright","acc","atname","atval","compareNames","s1","s2","AMnestingDepth","AMpreviousSymbol","AMcurrentSymbol","AMnames","AMremoveCharsAndBlanks","charAt","AMposition","arr","h","AMgetSymbol","mk","tagst","more","integ","AMTremoveBrackets","leftchop","AMTgetTeXsymbol","symb","AMTparseSexpr","symbol","newFrag","texsymbol","AMTparseExpr","result2","AMTparseIexpr","sym1","sym2","res2","rightbracket","addedright","len","mxout","matrix","mxnestingd","subpos","lastsubposstart","mxanynestingd","columnaligns","lastmxsubcnt","subarr","AMTparseAMtoTeX","symlen","sort","refreshSymbols","AMinitSymbols","RenderMathInElement","katexElementCount","hasKatex","dyncLoadScript","onRenderKatex","math","renderToString","renderKatex","isAsciimath","latex","codes","asciimathToTex","escapeRegExp","getConfig","displayMode","throwOnError","errorColor","delimiters","_isObjectProperty","_getDelimiter","delimiter","asciimath","showdownKatex","userConfig","inlineMathCount","mathDelimiters","_ref","replacer","_toConsumableArray","nodeName","newText","reduce","_ref2","asyncRenderKatex","render","that","renderBlockElements","hasEcharts","onRenderEcharts","renderEcharts","ssr","renderEchartsElements","showdownEcharts","show","animation","hasMermaid","onRenderMermaid","renderMermaid","renderMermaidElements","initialize","showdownMermaid","logLevel","startOnLoad","arrowMarkerAbsolute","curve","gantt","axisFormat","actorMargin","global$1","global","self","lookup","revLookup","Arr","Uint8Array","inited","init","encodeChunk","uint8","fromByteArray","tmp","extraBytes","parts","maxChunkLength","len2","read","buffer","offset","isLE","mLen","nBytes","e","eLen","eMax","eBias","nBits","d","NaN","Infinity","pow","write","rt","abs","LN2","isArray$1","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","RangeError","__proto__","arg","encodingOrOffset","allocUnsafe","from","TypeError","ArrayBuffer","array","byteOffset","byteLength","fromArrayLike","fromArrayBuffer","string","encoding","isEncoding","actual","fromString","internalIsBuffer","copy","fromObject","assertSize","size","_isBuffer","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","buf","readUInt16BE","foundIndex","found","hexWrite","remaining","Number","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","utf16leToBytes","base64.fromByteArray","min","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","apply","decodeCodePointsArray","poolSize","_augment","Symbol","species","alloc","fill","allocUnsafeSlow","isBuffer","compare","y","swap16","swap32","swap64","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","out","toHex","bytes","checkOffset","checkInt","max","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754.write","writeDouble","newBuf","subarray","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","ieee754.read","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","set","INVALID_BASE64_RE","leadSurrogate","b64","placeHolders","L","base64.toByteArray","stringtrim","base64clean","dst","isFastBuffer","isSlowBuffer","constructor","defaultSetTimout","defaultClearTimeout","cachedSetTimeout","cachedClearTimeout","runTimeout","fun","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","nextTick","args","Item","noop","addListener","once","off","removeListener","removeAllListeners","emit","performance","performanceNow","mozNow","msNow","oNow","webkitNow","getTime","startTime","process","browser","env","argv","version","versions","binding","cwd","chdir","umask","hrtime","previousTimestamp","clocktime","seconds","nanoseconds","platform","release","uptime","EventHandlers","EventEmitter","$getMaxListeners","_maxListeners","defaultMaxListeners","_addListener","listener","prepend","events","existing","_events","newListener","_eventsCount","unshift","warned","w","emitter","count","_onceWrap","fired","listenerCount","evlistener","arrayClone","create","usingDomains","domain","active","getPrototypeOf","setMaxListeners","getMaxListeners","er","handler","doError","err","context","domainEmitter","domainThrown","isFn","emitNone","arg1","emitOne","arg2","emitTwo","arg3","emitThree","emitMany","prependListener","prependOnceListener","position","originalListener","pop","spliceOne","unwrapListeners","eventNames","Reflect","ownKeys","inherits$1","ctor","superCtor","super_","enumerable","writable","configurable","TempCtor","formatRegExp","objects","_","isNull","isObject","deprecate","fn","noDeprecation","throwDeprecation","traceDeprecation","trace","debugEnviron","debugs","opts","ctx","seen","stylize","stylizeNoColor","depth","colors","isBoolean","showHidden","origin","add","_extend","customInspect","stylizeWithColor","formatValue","styleType","recurseTimes","primitive","formatPrimitive","visibleKeys","hash","idx","arrayToHash","getOwnPropertyNames","isError","formatError","isRegExp","isDate","base","braces","toUTCString","formatProperty","formatArray","cur","reduceToSingleString","desc","getOwnPropertyDescriptor","get","line","objectToString","BufferList","tail","bold","italic","inverse","white","grey","black","blue","cyan","green","magenta","red","yellow","special","number","boolean","null","regexp","entry","next","clear","p","isBufferEncoding","StringDecoder","assertEncoding","surrogateSize","detectIncompleteChar","utf16DetectIncompleteChar","base64DetectIncompleteChar","passThroughWrite","charBuffer","charReceived","charLength","charStr","available","charCode","enc","Readable","ReadableState","debug","NODE_DEBUG","toUpperCase","debuglog","stream","objectMode","Duplex","readableObjectMode","hwm","highWaterMark","pipes","pipesCount","flowing","ended","endEmitted","reading","needReadable","emittedReadable","readableListening","resumeScheduled","defaultEncoding","ranOut","awaitDrain","readingMore","decoder","_readableState","readable","_read","readableAddChunk","state","chunk","addToFront","Buffer.isBuffer","chunkInvalid","emitReadable","onEofChunk","skipAdd","maybeReadMore_","maybeReadMore","needMoreData","inherits","isPaused","setEncoding","MAX_HWM","howMuchToRead","computeNewHighWaterMark","emitReadable_","flow","nReadingNextTick","resume_","fromList","hasStrings","nb","copyFromBufferString","copyFromBuffer","fromListPartial","endReadable","endReadableNT","xs","nop","WriteReq","cb","WritableState","defineProperty","getBuffer","writableObjectMode","needDrain","ending","finished","decodeStrings","writing","corked","bufferProcessing","onwrite","_writableState","writecb","writelen","onwriteStateUpdate","pendingcb","errorEmitted","onwriteError","needFinish","bufferedRequest","clearBuffer","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","corkedRequestsFree","CorkedRequest","Writable","_write","writev","_writev","doWrite","onwriteDrain","finishMaybe","holder","finish","prefinish","need","_this","nOrig","doRead","pipe","dest","pipeOpts","endFn","onend","cleanup","onunpipe","ondrain","pipeOnDrain","cleanedUp","onclose","onfinish","onerror","ondata","increasedAwaitDrain","pause","unpipe","event","resume","dests","_i","ev","wrap","paused","method","bind","_fromList","current","writeAfterEnd","validChunk","decodeChunk","last","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","allowHalfOpen","onEndNT","TransformState","afterTransform","ts","_transformState","transforming","writechunk","rs","needTransform","writeencoding","Transform","transform","_transform","flush","_flush","done","PassThrough","Stream","EE","source","_isStdio","didOnEnd","destroy","ZStream","next_in","avail_in","total_in","next_out","avail_out","total_out","data_type","adler","arraySet","src_offs","dest_offs","Buf8","Buf16","Uint16Array","Buf32","Int32Array","Z_FIXED","Z_BINARY","Z_TEXT","Z_UNKNOWN","zero","STORED_BLOCK","STATIC_TREES","DYN_TREES","LENGTH_CODES","LITERALS","L_CODES","D_CODES","BL_CODES","HEAP_SIZE","MAX_BITS","Buf_size","MAX_BL_BITS","END_BLOCK","REP_3_6","REPZ_3_10","REPZ_11_138","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree","zero$1","static_dtree","_dist_code","_length_code","MAX_MATCH","base_length","static_l_desc","static_d_desc","static_bl_desc","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","dist","put_short","pending_buf","pending","send_bits","bi_valid","bi_buf","send_code","tree","bi_reverse","gen_codes","bl_count","next_code","init_block","dyn_ltree","dyn_dtree","bl_tree","opt_len","static_len","last_lit","bi_windup","smaller","_n2","_m2","pqdownheap","heap","heap_len","compress_block","ltree","dtree","lc","extra","lx","d_buf","l_buf","build_tree","stree","heap_max","xbits","overflow","gen_bitlen","scan_tree","curlen","prevlen","nextlen","max_count","min_count","send_tree","static_init_done","_tr_init","tr_static_init","l_desc","d_desc","bl_desc","_tr_stored_block","stored_len","copy_block","_tr_align","bi_flush","_tr_flush_block","opt_lenb","static_lenb","max_blindex","level","strm","black_mask","detect_data_type","build_bl_tree","strategy","lcodes","dcodes","blcodes","rank","send_all_trees","_tr_tally","lit_bufsize","adler32","crcTable","table","makeTable","crc32","crc","configuration_table","Z_NO_FLUSH","Z_FINISH","Z_OK","Z_STREAM_ERROR","Z_DEFLATED","MIN_MATCH","MIN_LOOKAHEAD","INIT_STATE","HCRC_STATE","BUSY_STATE","FINISH_STATE","BS_NEED_MORE","BS_BLOCK_DONE","BS_FINISH_STARTED","BS_FINISH_DONE","errorCode","flush_pending","pending_out","flush_block_only","block_start","strstart","put_byte","putShortMSB","longest_match","cur_match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","w_size","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","_w_size","window_size","hash_size","insert","ins_h","hash_shift","hash_mask","deflate_fast","hash_head","bflush","match_length","max_lazy_match","deflate_slow","max_insert","prev_match","match_available","Config","good_length","max_lazy","nice_length","max_chain","DeflateState","status","pending_buf_size","gzhead","gzindex","last_flush","w_bits","hash_bits","deflateReset","deflateResetKeep","deflate","old_flush","beg","hcrc","comment","time","os","bstate","deflate_huff","deflate_rle","max_block_size","max_start","BAD","TYPE","inflate_fast","_in","_out","dmax","wsize","whave","wnext","s_window","hold","lcode","dcode","lmask","dmask","here","op","from_source","lencode","distcode","lenbits","distbits","dolen","mode","sane","MAXBITS","ENOUGH_LENS","ENOUGH_DISTS","CODES","LENS","DISTS","lbase","lext","dbase","dext","inflate_table","lens","lens_index","table_index","work","incr","low","here_bits","here_op","here_val","sym","root","curr","drop","used","huff","base_index","offs","extra_index","HEAD","zswap32","q","InflateState","havedict","check","total","wbits","ncode","nlen","ndist","have","lendyn","distdyn","was","inflateReset","inflateResetKeep","inflateInit2","windowBits","inflateReset2","lenfix","distfix","virgin","fixedtables","inflate","put","last_bits","last_op","last_val","hbuf","order","inf_leave","xflags","extra_len","updatewindow","Zlib","init_done","write_in_progress","pending_close","memLevel","dictionary","bufferSet","zstream","deflateInit2","_error","params","_writeCheck","in_off","in_len","out_off","out_len","process.nextTick","close","writeSync","_set","deflateEnd","inflateEnd","reset","_binding","Z_MIN_WINDOWBITS","Z_MAX_WINDOWBITS","Z_DEFAULT_WINDOWBITS","Z_MIN_CHUNK","Z_MAX_CHUNK","Z_DEFAULT_CHUNK","Z_MIN_MEMLEVEL","Z_MAX_MEMLEVEL","Z_DEFAULT_MEMLEVEL","Z_MIN_LEVEL","Z_MAX_LEVEL","Z_DEFAULT_LEVEL","Z_DEFAULT_COMPRESSION","Z_STREAM_END","Z_NEED_DICT","Z_ERRNO","Z_DATA_ERROR","Z_MEM_ERROR","Z_BUF_ERROR","Z_VERSION_ERROR","zlibBuffer","buffers","nread","onEnd","zlibBufferSync","_processChunk","Deflate","DEFLATE","Inflate","INFLATE","Gzip","GZIP","Gunzip","GUNZIP","DeflateRaw","DEFLATERAW","InflateRaw","INFLATERAW","Unzip","UNZIP","_opts","_chunkSize","chunkSize","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_BLOCK","_flushFlag","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_DEFAULT_STRATEGY","_hadError","message","errno","_buffer","_offset","_closed","_level","_strategy","kind","ws","flushFlag","availInBefore","availOutBefore","inOff","async","req","availInAfter","availOutAfter","assert","newReq","zlib","createDeflate","createInflate","createDeflateRaw","createInflateRaw","createGzip","createGunzip","createUnzip","deflateSync","gzip","gzipSync","deflateRaw","deflateRawSync","unzip","unzipSync","inflateSync","gunzip","gunzipSync","inflateRaw","inflateRawSync","append3bytes","b1","b2","b3","c2","c3","c4","encode6bit","decode6bit","cc","extract3bytes","c1","encode64","decode","decode64","plantumlcodec","encodeuml","startuml","enduml","zlibcodec","decodeuml","defaultImageFormat","umlElementCount","renderPlantumlElements","imageFormat","website","umlWebSite","imageExtension","uml","svgRender","svgData","fetch","dispatchEvent","response","renderPlantumlElement","showdownPlantuml","hasRailroad","diagram","onRenderRailroad","railroadElement","eval","addTo","renderRailroad","renderRailroadElements","showdownRailroad","Diagram","themes","SequenceJS","hasSequence","renderSequence","elementid","CustomEvent","detail","onRenderSequence","drawSVG","showdownSequence","addEventListener","renderSequenceElements","wdCount","indexWD","hasWavedrom","onRenderWavedrom","RenderWaveForm","wdel","renderWavedrom","renderWavedromElements","skin","showdownWavedrom","skinConfig","showdownFootnotes","rawContent","padding","showdownContainer","classname","hasFlowchart","onRenderFlowchart","renderFlowchart","renderFlowchartElements","flowchartElements","flowElements","showdownFlowchart","maxWidth","font","scale","class","flowstate","past","future","request","invalid","approved","rejected","parent","scriptID","querySelector","showdownFlavors","mermaidThemes","vegaThemes","vegaRenderers","plantumlImgFmts","showdowns","plantuml","defaultExtensions","defaultAsyncExtensions","markdownDecodeFilter","initDefaultOptions","addOptions","cdnname","setShowdownFlavor","setShowdownOptions","setPlantumlOptions","setMermaidOptions","setKatexOptions","setVegaOptions","nativeExtensions","extnames","getExtensions","mermaidOptions","katexOptions","vegaOptions","zDecode","_getCssLink","_unused2","katexCssLink","sequenceCssLink","railroadCssLink","cssTypes","reject","completedHtml","revole","zContent","zEncode"],"mappings":";;;;;o8EACA,WAKA,SAASA,EAAgBC,GAGvB,IAAIC,EAAiB,CACnBC,wBAAyB,CACvBC,cAAc,EACdC,SAAU,wDACVC,KAAM,WAERC,WAAY,CACVH,cAAc,EACdC,SAAU,kCACVC,KAAM,WAERE,eAAgB,CACdJ,cAAc,EACdC,SAAU,4JACVC,KAAM,UAERG,kBAAmB,CACjBL,cAAc,EACdC,SAAU,uKACVC,KAAM,WAERI,qBAAsB,CACpBN,cAAc,EACdC,SAAU,oIACVC,KAAM,WAERK,YAAa,CACXP,cAAc,EACdC,S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SAAQ,SAACi7C,EAAQF,GAC1B,IAAK,IAAIx6F,EAAI,EAAO+/C,EAAQ9/C,OAAZD,IAAsBA,EAAG,CACvC,IAAMskD,EAASvE,EAAQ//C,GACvB,IAAKmkD,GAAWG,EAAOh9B,GAAIg9B,EAAOsB,MAChC,OAAO40C,EAAO,mBAElB,CACAE,GAAO,EACT,GACD,EACDT,QAAS,SAASU,GAChB,MThUKtJ,MAAKmB,eAAer9B,GAAOQ,KSgUPglC,EThUkB,USiU5C,EACDC,QAAS,SAASvoD,GAChB,OT3UKg/C,GACJY,eS0UwB5/C,ET1UH,CACpB8sC,MAAO,IAERx8E,SAAS,SSwUZ","x_google_ignoreList":[0,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45]} \ No newline at end of file +{"version":3,"file":"showdowns.min.js","sources":["../../node_modules/showdown/dist/showdown.js","../../src/parser/converter.js","../../src/parser/githubCodeBlocks.js","../../src/parser/tables.js","../../src/parser/showdown.js","../../src/extensions/log.js","../../src/extensions/date-format.js","../../src/extensions/cdn.js","../../src/extensions/utils.js","../../src/extensions/showdown-abc.js","../../src/extensions/showdown-toc.js","../../src/extensions/showdown-viz.js","../../src/extensions/showdown-vega.js","../../src/extensions/showdown-align.js","../../src/extensions/asciimath2tex.js","../../src/extensions/showdown-katex.js","../../src/extensions/showdown-echarts.js","../../src/extensions/showdown-mermaid.js","../../node_modules/rollup-plugin-node-globals/src/global.js","../../node_modules/buffer-es6/base64.js","../../node_modules/buffer-es6/ieee754.js","../../node_modules/buffer-es6/isArray.js","../../node_modules/buffer-es6/index.js","../../node_modules/process-es6/browser.js","../../node_modules/rollup-plugin-node-builtins/src/es6/events.js","../../node_modules/rollup-plugin-node-builtins/src/es6/inherits.js","../../node_modules/rollup-plugin-node-builtins/src/es6/util.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/buffer-list.js","../../node_modules/rollup-plugin-node-builtins/src/es6/string-decoder.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/readable.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/writable.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/duplex.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/transform.js","../../node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/passthrough.js","../../node_modules/rollup-plugin-node-builtins/src/es6/stream.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/messages.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/zstream.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/utils.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/trees.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/adler32.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/crc32.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/deflate.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/inffast.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/inftrees.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/inflate.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib-lib/binding.js","../../node_modules/rollup-plugin-node-builtins/src/es6/zlib.js","../../src/utils/zlib-codec.js","../../src/utils/plantuml-codec.js","../../src/extensions/showdown-plantuml.js","../../src/extensions/showdown-railroad.js","../../src/extensions/showdown-sequence.js","../../src/extensions/showdown-wavedrom.js","../../src/extensions/showdown-footnotes.js","../../src/extensions/showdown-container.js","../../src/extensions/showdown-flowchart.js","../../src/showdowns.js"],"sourcesContent":[";/*! showdown v 2.1.0 - 21-04-2022 */\r\n(function(){\r\n/**\n * Created by Tivie on 13-07-2015.\n */\n\nfunction getDefaultOpts (simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n describe: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n describe: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n describe: 'Parses simple line breaks as
    (GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n describe: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n describe: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n describe: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n describe: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n describe: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n describe: 'Support for HTML Tag escaping. ex: \\
    foo\\
    ',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n describe: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n describe: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``',\n type: 'boolean'\n },\n ellipsis: {\n defaultValue: true,\n describe: 'Replaces three dots with the ellipsis unicode character',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n describe: 'Outputs a complete html document, including ``, `` and `` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n describe: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n describe: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}\n\nfunction allOptionsOn () {\n 'use strict';\n var options = getDefaultOpts(true),\n ret = {};\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n ret[opt] = true;\n }\n }\n return ret;\n}\n\r\n/**\n * Created by Tivie on 06-01-2015.\n */\n\n// Private properties\nvar showdown = {},\n parsers = {},\n extensions = {},\n globalOptions = getDefaultOpts(true),\n setFlavor = 'vanilla',\n flavor = {\n github: {\n omitExtraWLInCodeBlocks: true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores: true,\n strikethrough: true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks: true,\n tasklists: true,\n disableForced4SpacesIndentedSublists: true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText: true,\n ghCompatibleHeaderId: true,\n ghMentions: true,\n backslashEscapesHTMLTags: true,\n emoji: true,\n splitAdjacentBlockquotes: true\n },\n original: {\n noHeaderId: true,\n ghCodeBlocks: false\n },\n ghost: {\n omitExtraWLInCodeBlocks: true,\n parseImgDimensions: true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores: true,\n strikethrough: true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks: true,\n tasklists: true,\n smoothLivePreview: true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText: true,\n ghMentions: false,\n encodeEmails: true\n },\n vanilla: getDefaultOpts(true),\n allOn: allOptionsOn()\n };\n\n/**\n * helper namespace\n * @type {{}}\n */\nshowdown.helper = {};\n\n/**\n * TODO LEGACY SUPPORT CODE\n * @type {{}}\n */\nshowdown.extensions = {};\n\n/**\n * Set a global option\n * @static\n * @param {string} key\n * @param {*} value\n * @returns {showdown}\n */\nshowdown.setOption = function (key, value) {\n 'use strict';\n globalOptions[key] = value;\n return this;\n};\n\n/**\n * Get a global option\n * @static\n * @param {string} key\n * @returns {*}\n */\nshowdown.getOption = function (key) {\n 'use strict';\n return globalOptions[key];\n};\n\n/**\n * Get the global options\n * @static\n * @returns {{}}\n */\nshowdown.getOptions = function () {\n 'use strict';\n return globalOptions;\n};\n\n/**\n * Reset global options to the default values\n * @static\n */\nshowdown.resetOptions = function () {\n 'use strict';\n globalOptions = getDefaultOpts(true);\n};\n\n/**\n * Set the flavor showdown should use as default\n * @param {string} name\n */\nshowdown.setFlavor = function (name) {\n 'use strict';\n if (!flavor.hasOwnProperty(name)) {\n throw Error(name + ' flavor was not found');\n }\n showdown.resetOptions();\n var preset = flavor[name];\n setFlavor = name;\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n globalOptions[option] = preset[option];\n }\n }\n};\n\n/**\n * Get the currently set flavor\n * @returns {string}\n */\nshowdown.getFlavor = function () {\n 'use strict';\n return setFlavor;\n};\n\n/**\n * Get the options of a specified flavor. Returns undefined if the flavor was not found\n * @param {string} name Name of the flavor\n * @returns {{}|undefined}\n */\nshowdown.getFlavorOptions = function (name) {\n 'use strict';\n if (flavor.hasOwnProperty(name)) {\n return flavor[name];\n }\n};\n\n/**\n * Get the default options\n * @static\n * @param {boolean} [simple=true]\n * @returns {{}}\n */\nshowdown.getDefaultOptions = function (simple) {\n 'use strict';\n return getDefaultOpts(simple);\n};\n\n/**\n * Get or set a subParser\n *\n * subParser(name) - Get a registered subParser\n * subParser(name, func) - Register a subParser\n * @static\n * @param {string} name\n * @param {function} [func]\n * @returns {*}\n */\nshowdown.subParser = function (name, func) {\n 'use strict';\n if (showdown.helper.isString(name)) {\n if (typeof func !== 'undefined') {\n parsers[name] = func;\n } else {\n if (parsers.hasOwnProperty(name)) {\n return parsers[name];\n } else {\n throw Error('SubParser named ' + name + ' not registered!');\n }\n }\n }\n};\n\n/**\n * Gets or registers an extension\n * @static\n * @param {string} name\n * @param {object|object[]|function=} ext\n * @returns {*}\n */\nshowdown.extension = function (name, ext) {\n 'use strict';\n\n if (!showdown.helper.isString(name)) {\n throw Error('Extension \\'name\\' must be a string');\n }\n\n name = showdown.helper.stdExtName(name);\n\n // Getter\n if (showdown.helper.isUndefined(ext)) {\n if (!extensions.hasOwnProperty(name)) {\n throw Error('Extension named ' + name + ' is not registered!');\n }\n return extensions[name];\n\n // Setter\n } else {\n // Expand extension if it's wrapped in a function\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n // Ensure extension is an array\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n var validExtension = validate(ext, name);\n\n if (validExtension.valid) {\n extensions[name] = ext;\n } else {\n throw Error(validExtension.error);\n }\n }\n};\n\n/**\n * Gets all extensions registered\n * @returns {{}}\n */\nshowdown.getAllExtensions = function () {\n 'use strict';\n return extensions;\n};\n\n/**\n * Remove an extension\n * @param {string} name\n */\nshowdown.removeExtension = function (name) {\n 'use strict';\n delete extensions[name];\n};\n\n/**\n * Removes all extensions\n */\nshowdown.resetExtensions = function () {\n 'use strict';\n extensions = {};\n};\n\n/**\n * Validate extension\n * @param {array} extension\n * @param {string} name\n * @returns {{valid: boolean, error: string}}\n */\nfunction validate (extension, name) {\n 'use strict';\n\n var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',\n ret = {\n valid: true,\n error: ''\n };\n\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n\n for (var i = 0; i < extension.length; ++i) {\n var baseMsg = errMsg + ' sub-extension ' + i + ': ',\n ext = extension[i];\n if (typeof ext !== 'object') {\n ret.valid = false;\n ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';\n return ret;\n }\n\n if (!showdown.helper.isString(ext.type)) {\n ret.valid = false;\n ret.error = baseMsg + 'property \"type\" must be a string, but ' + typeof ext.type + ' given';\n return ret;\n }\n\n var type = ext.type = ext.type.toLowerCase();\n\n // normalize extension type\n if (type === 'language') {\n type = ext.type = 'lang';\n }\n\n if (type === 'html') {\n type = ext.type = 'output';\n }\n\n if (type !== 'lang' && type !== 'output' && type !== 'listener') {\n ret.valid = false;\n ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: \"lang/language\", \"output/html\" or \"listener\"';\n return ret;\n }\n\n if (type === 'listener') {\n if (showdown.helper.isUndefined(ext.listeners)) {\n ret.valid = false;\n ret.error = baseMsg + '. Extensions of type \"listener\" must have a property called \"listeners\"';\n return ret;\n }\n } else {\n if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {\n ret.valid = false;\n ret.error = baseMsg + type + ' extensions must define either a \"regex\" property or a \"filter\" method';\n return ret;\n }\n }\n\n if (ext.listeners) {\n if (typeof ext.listeners !== 'object') {\n ret.valid = false;\n ret.error = baseMsg + '\"listeners\" property must be an object but ' + typeof ext.listeners + ' given';\n return ret;\n }\n for (var ln in ext.listeners) {\n if (ext.listeners.hasOwnProperty(ln)) {\n if (typeof ext.listeners[ln] !== 'function') {\n ret.valid = false;\n ret.error = baseMsg + '\"listeners\" property must be an hash of [event name]: [callback]. listeners.' + ln +\n ' must be a function but ' + typeof ext.listeners[ln] + ' given';\n return ret;\n }\n }\n }\n }\n\n if (ext.filter) {\n if (typeof ext.filter !== 'function') {\n ret.valid = false;\n ret.error = baseMsg + '\"filter\" must be a function, but ' + typeof ext.filter + ' given';\n return ret;\n }\n } else if (ext.regex) {\n if (showdown.helper.isString(ext.regex)) {\n ext.regex = new RegExp(ext.regex, 'g');\n }\n if (!(ext.regex instanceof RegExp)) {\n ret.valid = false;\n ret.error = baseMsg + '\"regex\" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given';\n return ret;\n }\n if (showdown.helper.isUndefined(ext.replace)) {\n ret.valid = false;\n ret.error = baseMsg + '\"regex\" extensions must implement a replace string or function';\n return ret;\n }\n }\n }\n return ret;\n}\n\n/**\n * Validate extension\n * @param {object} ext\n * @returns {boolean}\n */\nshowdown.validateExtension = function (ext) {\n 'use strict';\n\n var validateExtension = validate(ext, null);\n if (!validateExtension.valid) {\n console.warn(validateExtension.error);\n return false;\n }\n return true;\n};\n\r\n/**\n * showdownjs helper functions\n */\n\nif (!showdown.hasOwnProperty('helper')) {\n showdown.helper = {};\n}\n\n/**\n * Check if var is string\n * @static\n * @param {string} a\n * @returns {boolean}\n */\nshowdown.helper.isString = function (a) {\n 'use strict';\n return (typeof a === 'string' || a instanceof String);\n};\n\n/**\n * Check if var is a function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isFunction = function (a) {\n 'use strict';\n var getType = {};\n return a && getType.toString.call(a) === '[object Function]';\n};\n\n/**\n * isArray helper function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isArray = function (a) {\n 'use strict';\n return Array.isArray(a);\n};\n\n/**\n * Check if value is undefined\n * @static\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n */\nshowdown.helper.isUndefined = function (value) {\n 'use strict';\n return typeof value === 'undefined';\n};\n\n/**\n * ForEach helper function\n * Iterates over Arrays and Objects (own properties only)\n * @static\n * @param {*} obj\n * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object\n */\nshowdown.helper.forEach = function (obj, callback) {\n 'use strict';\n // check if obj is defined\n if (showdown.helper.isUndefined(obj)) {\n throw new Error('obj param is required');\n }\n\n if (showdown.helper.isUndefined(callback)) {\n throw new Error('callback param is required');\n }\n\n if (!showdown.helper.isFunction(callback)) {\n throw new Error('callback param must be a function/closure');\n }\n\n if (typeof obj.forEach === 'function') {\n obj.forEach(callback);\n } else if (showdown.helper.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n callback(obj[i], i, obj);\n }\n } else if (typeof (obj) === 'object') {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n callback(obj[prop], prop, obj);\n }\n }\n } else {\n throw new Error('obj does not seem to be an array or an iterable object');\n }\n};\n\n/**\n * Standardidize extension name\n * @static\n * @param {string} s extension name\n * @returns {string}\n */\nshowdown.helper.stdExtName = function (s) {\n 'use strict';\n return s.replace(/[_?*+\\/\\\\.^-]/g, '').replace(/\\s/g, '').toLowerCase();\n};\n\nfunction escapeCharactersCallback (wholeMatch, m1) {\n 'use strict';\n var charCodeToEscape = m1.charCodeAt(0);\n return '¨E' + charCodeToEscape + 'E';\n}\n\n/**\n * Callback used to escape characters when passing through String.replace\n * @static\n * @param {string} wholeMatch\n * @param {string} m1\n * @returns {string}\n */\nshowdown.helper.escapeCharactersCallback = escapeCharactersCallback;\n\n/**\n * Escape characters in a string\n * @static\n * @param {string} text\n * @param {string} charsToEscape\n * @param {boolean} afterBackslash\n * @returns {XML|string|void|*}\n */\nshowdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) {\n 'use strict';\n // First we have to escape the escape characters so that\n // we can build a character class out of them\n var regexString = '([' + charsToEscape.replace(/([\\[\\]\\\\])/g, '\\\\$1') + '])';\n\n if (afterBackslash) {\n regexString = '\\\\\\\\' + regexString;\n }\n\n var regex = new RegExp(regexString, 'g');\n text = text.replace(regex, escapeCharactersCallback);\n\n return text;\n};\n\n/**\n * Unescape HTML entities\n * @param txt\n * @returns {string}\n */\nshowdown.helper.unescapeHTMLEntities = function (txt) {\n 'use strict';\n\n return txt\n .replace(/"/g, '\"')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/&/g, '&');\n};\n\nvar rgxFindMatchPos = function (str, left, right, flags) {\n 'use strict';\n var f = flags || '',\n g = f.indexOf('g') > -1,\n x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),\n l = new RegExp(left, f.replace(/g/g, '')),\n pos = [],\n t, s, m, start, end;\n\n do {\n t = 0;\n while ((m = x.exec(str))) {\n if (l.test(m[0])) {\n if (!(t++)) {\n s = x.lastIndex;\n start = s - m[0].length;\n }\n } else if (t) {\n if (!--t) {\n end = m.index + m[0].length;\n var obj = {\n left: {start: start, end: s},\n match: {start: s, end: m.index},\n right: {start: m.index, end: end},\n wholeMatch: {start: start, end: end}\n };\n pos.push(obj);\n if (!g) {\n return pos;\n }\n }\n }\n }\n } while (t && (x.lastIndex = s));\n\n return pos;\n};\n\n/**\n * matchRecursiveRegExp\n *\n * (c) 2007 Steven Levithan \n * MIT License\n *\n * Accepts a string to search, a left and right format delimiter\n * as regex patterns, and optional regex flags. Returns an array\n * of matches, allowing nested instances of left/right delimiters.\n * Use the \"g\" flag to return all matches, otherwise only the\n * first is returned. Be careful to ensure that the left and\n * right format delimiters produce mutually exclusive matches.\n * Backreferences are not supported within the right delimiter\n * due to how it is internally combined with the left delimiter.\n * When matching strings whose format delimiters are unbalanced\n * to the left or right, the output is intentionally as a\n * conventional regex library with recursion support would\n * produce, e.g. \"<\" and \">\" both produce [\"x\"] when using\n * \"<\" and \">\" as the delimiters (both strings contain a single,\n * balanced instance of \"\").\n *\n * examples:\n * matchRecursiveRegExp(\"test\", \"\\\\(\", \"\\\\)\")\n * returns: []\n * matchRecursiveRegExp(\">>t<>\", \"<\", \">\", \"g\")\n * returns: [\"t<>\", \"\"]\n * matchRecursiveRegExp(\"
    test
    \", \"]*>\", \"\", \"gi\")\n * returns: [\"test\"]\n */\nshowdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {\n 'use strict';\n\n var matchPos = rgxFindMatchPos (str, left, right, flags),\n results = [];\n\n for (var i = 0; i < matchPos.length; ++i) {\n results.push([\n str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n str.slice(matchPos[i].match.start, matchPos[i].match.end),\n str.slice(matchPos[i].left.start, matchPos[i].left.end),\n str.slice(matchPos[i].right.start, matchPos[i].right.end)\n ]);\n }\n return results;\n};\n\n/**\n *\n * @param {string} str\n * @param {string|function} replacement\n * @param {string} left\n * @param {string} right\n * @param {string} flags\n * @returns {string}\n */\nshowdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {\n 'use strict';\n\n if (!showdown.helper.isFunction(replacement)) {\n var repStr = replacement;\n replacement = function () {\n return repStr;\n };\n }\n\n var matchPos = rgxFindMatchPos(str, left, right, flags),\n finalStr = str,\n lng = matchPos.length;\n\n if (lng > 0) {\n var bits = [];\n if (matchPos[0].wholeMatch.start !== 0) {\n bits.push(str.slice(0, matchPos[0].wholeMatch.start));\n }\n for (var i = 0; i < lng; ++i) {\n bits.push(\n replacement(\n str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n str.slice(matchPos[i].match.start, matchPos[i].match.end),\n str.slice(matchPos[i].left.start, matchPos[i].left.end),\n str.slice(matchPos[i].right.start, matchPos[i].right.end)\n )\n );\n if (i < lng - 1) {\n bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));\n }\n }\n if (matchPos[lng - 1].wholeMatch.end < str.length) {\n bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));\n }\n finalStr = bits.join('');\n }\n return finalStr;\n};\n\n/**\n * Returns the index within the passed String object of the first occurrence of the specified regex,\n * starting the search at fromIndex. Returns -1 if the value is not found.\n *\n * @param {string} str string to search\n * @param {RegExp} regex Regular expression to search\n * @param {int} [fromIndex = 0] Index to start the search\n * @returns {Number}\n * @throws InvalidArgumentError\n */\nshowdown.helper.regexIndexOf = function (str, regex, fromIndex) {\n 'use strict';\n if (!showdown.helper.isString(str)) {\n throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n }\n if (regex instanceof RegExp === false) {\n throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp';\n }\n var indexOf = str.substring(fromIndex || 0).search(regex);\n return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf;\n};\n\n/**\n * Splits the passed string object at the defined index, and returns an array composed of the two substrings\n * @param {string} str string to split\n * @param {int} index index to split string at\n * @returns {[string,string]}\n * @throws InvalidArgumentError\n */\nshowdown.helper.splitAtIndex = function (str, index) {\n 'use strict';\n if (!showdown.helper.isString(str)) {\n throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n }\n return [str.substring(0, index), str.substring(index)];\n};\n\n/**\n * Obfuscate an e-mail address through the use of Character Entities,\n * transforming ASCII characters into their equivalent decimal or hex entities.\n *\n * Since it has a random component, subsequent calls to this function produce different results\n *\n * @param {string} mail\n * @returns {string}\n */\nshowdown.helper.encodeEmailAddress = function (mail) {\n 'use strict';\n var encode = [\n function (ch) {\n return '&#' + ch.charCodeAt(0) + ';';\n },\n function (ch) {\n return '&#x' + ch.charCodeAt(0).toString(16) + ';';\n },\n function (ch) {\n return ch;\n }\n ];\n\n mail = mail.replace(/./g, function (ch) {\n if (ch === '@') {\n // this *must* be encoded. I insist.\n ch = encode[Math.floor(Math.random() * 2)](ch);\n } else {\n var r = Math.random();\n // roughly 10% raw, 45% hex, 45% dec\n ch = (\n r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch)\n );\n }\n return ch;\n });\n\n return mail;\n};\n\n/**\n *\n * @param str\n * @param targetLength\n * @param padString\n * @returns {string}\n */\nshowdown.helper.padEnd = function padEnd (str, targetLength, padString) {\n 'use strict';\n /*jshint bitwise: false*/\n // eslint-disable-next-line space-infix-ops\n targetLength = targetLength>>0; //floor if number or convert non-number to 0;\n /*jshint bitwise: true*/\n padString = String(padString || ' ');\n if (str.length > targetLength) {\n return String(str);\n } else {\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed\n }\n return String(str) + padString.slice(0,targetLength);\n }\n};\n\n/**\n * POLYFILLS\n */\n// use this instead of builtin is undefined for IE8 compatibility\nif (typeof (console) === 'undefined') {\n console = {\n warn: function (msg) {\n 'use strict';\n alert(msg);\n },\n log: function (msg) {\n 'use strict';\n alert(msg);\n },\n error: function (msg) {\n 'use strict';\n throw msg;\n }\n };\n}\n\n/**\n * Common regexes.\n * We declare some common regexes to improve performance\n */\nshowdown.helper.regexes = {\n asteriskDashAndColon: /([*_:~])/g\n};\n\n/**\n * EMOJIS LIST\n */\nshowdown.helper.emojis = {\n '+1':'\\ud83d\\udc4d',\n '-1':'\\ud83d\\udc4e',\n '100':'\\ud83d\\udcaf',\n '1234':'\\ud83d\\udd22',\n '1st_place_medal':'\\ud83e\\udd47',\n '2nd_place_medal':'\\ud83e\\udd48',\n '3rd_place_medal':'\\ud83e\\udd49',\n '8ball':'\\ud83c\\udfb1',\n 'a':'\\ud83c\\udd70\\ufe0f',\n 'ab':'\\ud83c\\udd8e',\n 'abc':'\\ud83d\\udd24',\n 'abcd':'\\ud83d\\udd21',\n 'accept':'\\ud83c\\ude51',\n 'aerial_tramway':'\\ud83d\\udea1',\n 'airplane':'\\u2708\\ufe0f',\n 'alarm_clock':'\\u23f0',\n 'alembic':'\\u2697\\ufe0f',\n 'alien':'\\ud83d\\udc7d',\n 'ambulance':'\\ud83d\\ude91',\n 'amphora':'\\ud83c\\udffa',\n 'anchor':'\\u2693\\ufe0f',\n 'angel':'\\ud83d\\udc7c',\n 'anger':'\\ud83d\\udca2',\n 'angry':'\\ud83d\\ude20',\n 'anguished':'\\ud83d\\ude27',\n 'ant':'\\ud83d\\udc1c',\n 'apple':'\\ud83c\\udf4e',\n 'aquarius':'\\u2652\\ufe0f',\n 'aries':'\\u2648\\ufe0f',\n 'arrow_backward':'\\u25c0\\ufe0f',\n 'arrow_double_down':'\\u23ec',\n 'arrow_double_up':'\\u23eb',\n 'arrow_down':'\\u2b07\\ufe0f',\n 'arrow_down_small':'\\ud83d\\udd3d',\n 'arrow_forward':'\\u25b6\\ufe0f',\n 'arrow_heading_down':'\\u2935\\ufe0f',\n 'arrow_heading_up':'\\u2934\\ufe0f',\n 'arrow_left':'\\u2b05\\ufe0f',\n 'arrow_lower_left':'\\u2199\\ufe0f',\n 'arrow_lower_right':'\\u2198\\ufe0f',\n 'arrow_right':'\\u27a1\\ufe0f',\n 'arrow_right_hook':'\\u21aa\\ufe0f',\n 'arrow_up':'\\u2b06\\ufe0f',\n 'arrow_up_down':'\\u2195\\ufe0f',\n 'arrow_up_small':'\\ud83d\\udd3c',\n 'arrow_upper_left':'\\u2196\\ufe0f',\n 'arrow_upper_right':'\\u2197\\ufe0f',\n 'arrows_clockwise':'\\ud83d\\udd03',\n 'arrows_counterclockwise':'\\ud83d\\udd04',\n 'art':'\\ud83c\\udfa8',\n 'articulated_lorry':'\\ud83d\\ude9b',\n 'artificial_satellite':'\\ud83d\\udef0',\n 'astonished':'\\ud83d\\ude32',\n 'athletic_shoe':'\\ud83d\\udc5f',\n 'atm':'\\ud83c\\udfe7',\n 'atom_symbol':'\\u269b\\ufe0f',\n 'avocado':'\\ud83e\\udd51',\n 'b':'\\ud83c\\udd71\\ufe0f',\n 'baby':'\\ud83d\\udc76',\n 'baby_bottle':'\\ud83c\\udf7c',\n 'baby_chick':'\\ud83d\\udc24',\n 'baby_symbol':'\\ud83d\\udebc',\n 'back':'\\ud83d\\udd19',\n 'bacon':'\\ud83e\\udd53',\n 'badminton':'\\ud83c\\udff8',\n 'baggage_claim':'\\ud83d\\udec4',\n 'baguette_bread':'\\ud83e\\udd56',\n 'balance_scale':'\\u2696\\ufe0f',\n 'balloon':'\\ud83c\\udf88',\n 'ballot_box':'\\ud83d\\uddf3',\n 'ballot_box_with_check':'\\u2611\\ufe0f',\n 'bamboo':'\\ud83c\\udf8d',\n 'banana':'\\ud83c\\udf4c',\n 'bangbang':'\\u203c\\ufe0f',\n 'bank':'\\ud83c\\udfe6',\n 'bar_chart':'\\ud83d\\udcca',\n 'barber':'\\ud83d\\udc88',\n 'baseball':'\\u26be\\ufe0f',\n 'basketball':'\\ud83c\\udfc0',\n 'basketball_man':'\\u26f9\\ufe0f',\n 'basketball_woman':'\\u26f9\\ufe0f‍\\u2640\\ufe0f',\n 'bat':'\\ud83e\\udd87',\n 'bath':'\\ud83d\\udec0',\n 'bathtub':'\\ud83d\\udec1',\n 'battery':'\\ud83d\\udd0b',\n 'beach_umbrella':'\\ud83c\\udfd6',\n 'bear':'\\ud83d\\udc3b',\n 'bed':'\\ud83d\\udecf',\n 'bee':'\\ud83d\\udc1d',\n 'beer':'\\ud83c\\udf7a',\n 'beers':'\\ud83c\\udf7b',\n 'beetle':'\\ud83d\\udc1e',\n 'beginner':'\\ud83d\\udd30',\n 'bell':'\\ud83d\\udd14',\n 'bellhop_bell':'\\ud83d\\udece',\n 'bento':'\\ud83c\\udf71',\n 'biking_man':'\\ud83d\\udeb4',\n 'bike':'\\ud83d\\udeb2',\n 'biking_woman':'\\ud83d\\udeb4‍\\u2640\\ufe0f',\n 'bikini':'\\ud83d\\udc59',\n 'biohazard':'\\u2623\\ufe0f',\n 'bird':'\\ud83d\\udc26',\n 'birthday':'\\ud83c\\udf82',\n 'black_circle':'\\u26ab\\ufe0f',\n 'black_flag':'\\ud83c\\udff4',\n 'black_heart':'\\ud83d\\udda4',\n 'black_joker':'\\ud83c\\udccf',\n 'black_large_square':'\\u2b1b\\ufe0f',\n 'black_medium_small_square':'\\u25fe\\ufe0f',\n 'black_medium_square':'\\u25fc\\ufe0f',\n 'black_nib':'\\u2712\\ufe0f',\n 'black_small_square':'\\u25aa\\ufe0f',\n 'black_square_button':'\\ud83d\\udd32',\n 'blonde_man':'\\ud83d\\udc71',\n 'blonde_woman':'\\ud83d\\udc71‍\\u2640\\ufe0f',\n 'blossom':'\\ud83c\\udf3c',\n 'blowfish':'\\ud83d\\udc21',\n 'blue_book':'\\ud83d\\udcd8',\n 'blue_car':'\\ud83d\\ude99',\n 'blue_heart':'\\ud83d\\udc99',\n 'blush':'\\ud83d\\ude0a',\n 'boar':'\\ud83d\\udc17',\n 'boat':'\\u26f5\\ufe0f',\n 'bomb':'\\ud83d\\udca3',\n 'book':'\\ud83d\\udcd6',\n 'bookmark':'\\ud83d\\udd16',\n 'bookmark_tabs':'\\ud83d\\udcd1',\n 'books':'\\ud83d\\udcda',\n 'boom':'\\ud83d\\udca5',\n 'boot':'\\ud83d\\udc62',\n 'bouquet':'\\ud83d\\udc90',\n 'bowing_man':'\\ud83d\\ude47',\n 'bow_and_arrow':'\\ud83c\\udff9',\n 'bowing_woman':'\\ud83d\\ude47‍\\u2640\\ufe0f',\n 'bowling':'\\ud83c\\udfb3',\n 'boxing_glove':'\\ud83e\\udd4a',\n 'boy':'\\ud83d\\udc66',\n 'bread':'\\ud83c\\udf5e',\n 'bride_with_veil':'\\ud83d\\udc70',\n 'bridge_at_night':'\\ud83c\\udf09',\n 'briefcase':'\\ud83d\\udcbc',\n 'broken_heart':'\\ud83d\\udc94',\n 'bug':'\\ud83d\\udc1b',\n 'building_construction':'\\ud83c\\udfd7',\n 'bulb':'\\ud83d\\udca1',\n 'bullettrain_front':'\\ud83d\\ude85',\n 'bullettrain_side':'\\ud83d\\ude84',\n 'burrito':'\\ud83c\\udf2f',\n 'bus':'\\ud83d\\ude8c',\n 'business_suit_levitating':'\\ud83d\\udd74',\n 'busstop':'\\ud83d\\ude8f',\n 'bust_in_silhouette':'\\ud83d\\udc64',\n 'busts_in_silhouette':'\\ud83d\\udc65',\n 'butterfly':'\\ud83e\\udd8b',\n 'cactus':'\\ud83c\\udf35',\n 'cake':'\\ud83c\\udf70',\n 'calendar':'\\ud83d\\udcc6',\n 'call_me_hand':'\\ud83e\\udd19',\n 'calling':'\\ud83d\\udcf2',\n 'camel':'\\ud83d\\udc2b',\n 'camera':'\\ud83d\\udcf7',\n 'camera_flash':'\\ud83d\\udcf8',\n 'camping':'\\ud83c\\udfd5',\n 'cancer':'\\u264b\\ufe0f',\n 'candle':'\\ud83d\\udd6f',\n 'candy':'\\ud83c\\udf6c',\n 'canoe':'\\ud83d\\udef6',\n 'capital_abcd':'\\ud83d\\udd20',\n 'capricorn':'\\u2651\\ufe0f',\n 'car':'\\ud83d\\ude97',\n 'card_file_box':'\\ud83d\\uddc3',\n 'card_index':'\\ud83d\\udcc7',\n 'card_index_dividers':'\\ud83d\\uddc2',\n 'carousel_horse':'\\ud83c\\udfa0',\n 'carrot':'\\ud83e\\udd55',\n 'cat':'\\ud83d\\udc31',\n 'cat2':'\\ud83d\\udc08',\n 'cd':'\\ud83d\\udcbf',\n 'chains':'\\u26d3',\n 'champagne':'\\ud83c\\udf7e',\n 'chart':'\\ud83d\\udcb9',\n 'chart_with_downwards_trend':'\\ud83d\\udcc9',\n 'chart_with_upwards_trend':'\\ud83d\\udcc8',\n 'checkered_flag':'\\ud83c\\udfc1',\n 'cheese':'\\ud83e\\uddc0',\n 'cherries':'\\ud83c\\udf52',\n 'cherry_blossom':'\\ud83c\\udf38',\n 'chestnut':'\\ud83c\\udf30',\n 'chicken':'\\ud83d\\udc14',\n 'children_crossing':'\\ud83d\\udeb8',\n 'chipmunk':'\\ud83d\\udc3f',\n 'chocolate_bar':'\\ud83c\\udf6b',\n 'christmas_tree':'\\ud83c\\udf84',\n 'church':'\\u26ea\\ufe0f',\n 'cinema':'\\ud83c\\udfa6',\n 'circus_tent':'\\ud83c\\udfaa',\n 'city_sunrise':'\\ud83c\\udf07',\n 'city_sunset':'\\ud83c\\udf06',\n 'cityscape':'\\ud83c\\udfd9',\n 'cl':'\\ud83c\\udd91',\n 'clamp':'\\ud83d\\udddc',\n 'clap':'\\ud83d\\udc4f',\n 'clapper':'\\ud83c\\udfac',\n 'classical_building':'\\ud83c\\udfdb',\n 'clinking_glasses':'\\ud83e\\udd42',\n 'clipboard':'\\ud83d\\udccb',\n 'clock1':'\\ud83d\\udd50',\n 'clock10':'\\ud83d\\udd59',\n 'clock1030':'\\ud83d\\udd65',\n 'clock11':'\\ud83d\\udd5a',\n 'clock1130':'\\ud83d\\udd66',\n 'clock12':'\\ud83d\\udd5b',\n 'clock1230':'\\ud83d\\udd67',\n 'clock130':'\\ud83d\\udd5c',\n 'clock2':'\\ud83d\\udd51',\n 'clock230':'\\ud83d\\udd5d',\n 'clock3':'\\ud83d\\udd52',\n 'clock330':'\\ud83d\\udd5e',\n 'clock4':'\\ud83d\\udd53',\n 'clock430':'\\ud83d\\udd5f',\n 'clock5':'\\ud83d\\udd54',\n 'clock530':'\\ud83d\\udd60',\n 'clock6':'\\ud83d\\udd55',\n 'clock630':'\\ud83d\\udd61',\n 'clock7':'\\ud83d\\udd56',\n 'clock730':'\\ud83d\\udd62',\n 'clock8':'\\ud83d\\udd57',\n 'clock830':'\\ud83d\\udd63',\n 'clock9':'\\ud83d\\udd58',\n 'clock930':'\\ud83d\\udd64',\n 'closed_book':'\\ud83d\\udcd5',\n 'closed_lock_with_key':'\\ud83d\\udd10',\n 'closed_umbrella':'\\ud83c\\udf02',\n 'cloud':'\\u2601\\ufe0f',\n 'cloud_with_lightning':'\\ud83c\\udf29',\n 'cloud_with_lightning_and_rain':'\\u26c8',\n 'cloud_with_rain':'\\ud83c\\udf27',\n 'cloud_with_snow':'\\ud83c\\udf28',\n 'clown_face':'\\ud83e\\udd21',\n 'clubs':'\\u2663\\ufe0f',\n 'cocktail':'\\ud83c\\udf78',\n 'coffee':'\\u2615\\ufe0f',\n 'coffin':'\\u26b0\\ufe0f',\n 'cold_sweat':'\\ud83d\\ude30',\n 'comet':'\\u2604\\ufe0f',\n 'computer':'\\ud83d\\udcbb',\n 'computer_mouse':'\\ud83d\\uddb1',\n 'confetti_ball':'\\ud83c\\udf8a',\n 'confounded':'\\ud83d\\ude16',\n 'confused':'\\ud83d\\ude15',\n 'congratulations':'\\u3297\\ufe0f',\n 'construction':'\\ud83d\\udea7',\n 'construction_worker_man':'\\ud83d\\udc77',\n 'construction_worker_woman':'\\ud83d\\udc77‍\\u2640\\ufe0f',\n 'control_knobs':'\\ud83c\\udf9b',\n 'convenience_store':'\\ud83c\\udfea',\n 'cookie':'\\ud83c\\udf6a',\n 'cool':'\\ud83c\\udd92',\n 'policeman':'\\ud83d\\udc6e',\n 'copyright':'\\u00a9\\ufe0f',\n 'corn':'\\ud83c\\udf3d',\n 'couch_and_lamp':'\\ud83d\\udecb',\n 'couple':'\\ud83d\\udc6b',\n 'couple_with_heart_woman_man':'\\ud83d\\udc91',\n 'couple_with_heart_man_man':'\\ud83d\\udc68‍\\u2764\\ufe0f‍\\ud83d\\udc68',\n 'couple_with_heart_woman_woman':'\\ud83d\\udc69‍\\u2764\\ufe0f‍\\ud83d\\udc69',\n 'couplekiss_man_man':'\\ud83d\\udc68‍\\u2764\\ufe0f‍\\ud83d\\udc8b‍\\ud83d\\udc68',\n 'couplekiss_man_woman':'\\ud83d\\udc8f',\n 'couplekiss_woman_woman':'\\ud83d\\udc69‍\\u2764\\ufe0f‍\\ud83d\\udc8b‍\\ud83d\\udc69',\n 'cow':'\\ud83d\\udc2e',\n 'cow2':'\\ud83d\\udc04',\n 'cowboy_hat_face':'\\ud83e\\udd20',\n 'crab':'\\ud83e\\udd80',\n 'crayon':'\\ud83d\\udd8d',\n 'credit_card':'\\ud83d\\udcb3',\n 'crescent_moon':'\\ud83c\\udf19',\n 'cricket':'\\ud83c\\udfcf',\n 'crocodile':'\\ud83d\\udc0a',\n 'croissant':'\\ud83e\\udd50',\n 'crossed_fingers':'\\ud83e\\udd1e',\n 'crossed_flags':'\\ud83c\\udf8c',\n 'crossed_swords':'\\u2694\\ufe0f',\n 'crown':'\\ud83d\\udc51',\n 'cry':'\\ud83d\\ude22',\n 'crying_cat_face':'\\ud83d\\ude3f',\n 'crystal_ball':'\\ud83d\\udd2e',\n 'cucumber':'\\ud83e\\udd52',\n 'cupid':'\\ud83d\\udc98',\n 'curly_loop':'\\u27b0',\n 'currency_exchange':'\\ud83d\\udcb1',\n 'curry':'\\ud83c\\udf5b',\n 'custard':'\\ud83c\\udf6e',\n 'customs':'\\ud83d\\udec3',\n 'cyclone':'\\ud83c\\udf00',\n 'dagger':'\\ud83d\\udde1',\n 'dancer':'\\ud83d\\udc83',\n 'dancing_women':'\\ud83d\\udc6f',\n 'dancing_men':'\\ud83d\\udc6f‍\\u2642\\ufe0f',\n 'dango':'\\ud83c\\udf61',\n 'dark_sunglasses':'\\ud83d\\udd76',\n 'dart':'\\ud83c\\udfaf',\n 'dash':'\\ud83d\\udca8',\n 'date':'\\ud83d\\udcc5',\n 'deciduous_tree':'\\ud83c\\udf33',\n 'deer':'\\ud83e\\udd8c',\n 'department_store':'\\ud83c\\udfec',\n 'derelict_house':'\\ud83c\\udfda',\n 'desert':'\\ud83c\\udfdc',\n 'desert_island':'\\ud83c\\udfdd',\n 'desktop_computer':'\\ud83d\\udda5',\n 'male_detective':'\\ud83d\\udd75\\ufe0f',\n 'diamond_shape_with_a_dot_inside':'\\ud83d\\udca0',\n 'diamonds':'\\u2666\\ufe0f',\n 'disappointed':'\\ud83d\\ude1e',\n 'disappointed_relieved':'\\ud83d\\ude25',\n 'dizzy':'\\ud83d\\udcab',\n 'dizzy_face':'\\ud83d\\ude35',\n 'do_not_litter':'\\ud83d\\udeaf',\n 'dog':'\\ud83d\\udc36',\n 'dog2':'\\ud83d\\udc15',\n 'dollar':'\\ud83d\\udcb5',\n 'dolls':'\\ud83c\\udf8e',\n 'dolphin':'\\ud83d\\udc2c',\n 'door':'\\ud83d\\udeaa',\n 'doughnut':'\\ud83c\\udf69',\n 'dove':'\\ud83d\\udd4a',\n 'dragon':'\\ud83d\\udc09',\n 'dragon_face':'\\ud83d\\udc32',\n 'dress':'\\ud83d\\udc57',\n 'dromedary_camel':'\\ud83d\\udc2a',\n 'drooling_face':'\\ud83e\\udd24',\n 'droplet':'\\ud83d\\udca7',\n 'drum':'\\ud83e\\udd41',\n 'duck':'\\ud83e\\udd86',\n 'dvd':'\\ud83d\\udcc0',\n 'e-mail':'\\ud83d\\udce7',\n 'eagle':'\\ud83e\\udd85',\n 'ear':'\\ud83d\\udc42',\n 'ear_of_rice':'\\ud83c\\udf3e',\n 'earth_africa':'\\ud83c\\udf0d',\n 'earth_americas':'\\ud83c\\udf0e',\n 'earth_asia':'\\ud83c\\udf0f',\n 'egg':'\\ud83e\\udd5a',\n 'eggplant':'\\ud83c\\udf46',\n 'eight_pointed_black_star':'\\u2734\\ufe0f',\n 'eight_spoked_asterisk':'\\u2733\\ufe0f',\n 'electric_plug':'\\ud83d\\udd0c',\n 'elephant':'\\ud83d\\udc18',\n 'email':'\\u2709\\ufe0f',\n 'end':'\\ud83d\\udd1a',\n 'envelope_with_arrow':'\\ud83d\\udce9',\n 'euro':'\\ud83d\\udcb6',\n 'european_castle':'\\ud83c\\udff0',\n 'european_post_office':'\\ud83c\\udfe4',\n 'evergreen_tree':'\\ud83c\\udf32',\n 'exclamation':'\\u2757\\ufe0f',\n 'expressionless':'\\ud83d\\ude11',\n 'eye':'\\ud83d\\udc41',\n 'eye_speech_bubble':'\\ud83d\\udc41‍\\ud83d\\udde8',\n 'eyeglasses':'\\ud83d\\udc53',\n 'eyes':'\\ud83d\\udc40',\n 'face_with_head_bandage':'\\ud83e\\udd15',\n 'face_with_thermometer':'\\ud83e\\udd12',\n 'fist_oncoming':'\\ud83d\\udc4a',\n 'factory':'\\ud83c\\udfed',\n 'fallen_leaf':'\\ud83c\\udf42',\n 'family_man_woman_boy':'\\ud83d\\udc6a',\n 'family_man_boy':'\\ud83d\\udc68‍\\ud83d\\udc66',\n 'family_man_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_girl':'\\ud83d\\udc68‍\\ud83d\\udc67',\n 'family_man_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_man_man_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc66',\n 'family_man_man_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_man_girl':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67',\n 'family_man_man_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_man_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_man_woman_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_woman_girl':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_man_woman_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_woman_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_woman_boy':'\\ud83d\\udc69‍\\ud83d\\udc66',\n 'family_woman_boy_boy':'\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_woman_girl':'\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_woman_girl_boy':'\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_woman_girl_girl':'\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_woman_woman_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc66',\n 'family_woman_woman_boy_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_woman_woman_girl':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_woman_woman_girl_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_woman_woman_girl_girl':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'fast_forward':'\\u23e9',\n 'fax':'\\ud83d\\udce0',\n 'fearful':'\\ud83d\\ude28',\n 'feet':'\\ud83d\\udc3e',\n 'female_detective':'\\ud83d\\udd75\\ufe0f‍\\u2640\\ufe0f',\n 'ferris_wheel':'\\ud83c\\udfa1',\n 'ferry':'\\u26f4',\n 'field_hockey':'\\ud83c\\udfd1',\n 'file_cabinet':'\\ud83d\\uddc4',\n 'file_folder':'\\ud83d\\udcc1',\n 'film_projector':'\\ud83d\\udcfd',\n 'film_strip':'\\ud83c\\udf9e',\n 'fire':'\\ud83d\\udd25',\n 'fire_engine':'\\ud83d\\ude92',\n 'fireworks':'\\ud83c\\udf86',\n 'first_quarter_moon':'\\ud83c\\udf13',\n 'first_quarter_moon_with_face':'\\ud83c\\udf1b',\n 'fish':'\\ud83d\\udc1f',\n 'fish_cake':'\\ud83c\\udf65',\n 'fishing_pole_and_fish':'\\ud83c\\udfa3',\n 'fist_raised':'\\u270a',\n 'fist_left':'\\ud83e\\udd1b',\n 'fist_right':'\\ud83e\\udd1c',\n 'flags':'\\ud83c\\udf8f',\n 'flashlight':'\\ud83d\\udd26',\n 'fleur_de_lis':'\\u269c\\ufe0f',\n 'flight_arrival':'\\ud83d\\udeec',\n 'flight_departure':'\\ud83d\\udeeb',\n 'floppy_disk':'\\ud83d\\udcbe',\n 'flower_playing_cards':'\\ud83c\\udfb4',\n 'flushed':'\\ud83d\\ude33',\n 'fog':'\\ud83c\\udf2b',\n 'foggy':'\\ud83c\\udf01',\n 'football':'\\ud83c\\udfc8',\n 'footprints':'\\ud83d\\udc63',\n 'fork_and_knife':'\\ud83c\\udf74',\n 'fountain':'\\u26f2\\ufe0f',\n 'fountain_pen':'\\ud83d\\udd8b',\n 'four_leaf_clover':'\\ud83c\\udf40',\n 'fox_face':'\\ud83e\\udd8a',\n 'framed_picture':'\\ud83d\\uddbc',\n 'free':'\\ud83c\\udd93',\n 'fried_egg':'\\ud83c\\udf73',\n 'fried_shrimp':'\\ud83c\\udf64',\n 'fries':'\\ud83c\\udf5f',\n 'frog':'\\ud83d\\udc38',\n 'frowning':'\\ud83d\\ude26',\n 'frowning_face':'\\u2639\\ufe0f',\n 'frowning_man':'\\ud83d\\ude4d‍\\u2642\\ufe0f',\n 'frowning_woman':'\\ud83d\\ude4d',\n 'middle_finger':'\\ud83d\\udd95',\n 'fuelpump':'\\u26fd\\ufe0f',\n 'full_moon':'\\ud83c\\udf15',\n 'full_moon_with_face':'\\ud83c\\udf1d',\n 'funeral_urn':'\\u26b1\\ufe0f',\n 'game_die':'\\ud83c\\udfb2',\n 'gear':'\\u2699\\ufe0f',\n 'gem':'\\ud83d\\udc8e',\n 'gemini':'\\u264a\\ufe0f',\n 'ghost':'\\ud83d\\udc7b',\n 'gift':'\\ud83c\\udf81',\n 'gift_heart':'\\ud83d\\udc9d',\n 'girl':'\\ud83d\\udc67',\n 'globe_with_meridians':'\\ud83c\\udf10',\n 'goal_net':'\\ud83e\\udd45',\n 'goat':'\\ud83d\\udc10',\n 'golf':'\\u26f3\\ufe0f',\n 'golfing_man':'\\ud83c\\udfcc\\ufe0f',\n 'golfing_woman':'\\ud83c\\udfcc\\ufe0f‍\\u2640\\ufe0f',\n 'gorilla':'\\ud83e\\udd8d',\n 'grapes':'\\ud83c\\udf47',\n 'green_apple':'\\ud83c\\udf4f',\n 'green_book':'\\ud83d\\udcd7',\n 'green_heart':'\\ud83d\\udc9a',\n 'green_salad':'\\ud83e\\udd57',\n 'grey_exclamation':'\\u2755',\n 'grey_question':'\\u2754',\n 'grimacing':'\\ud83d\\ude2c',\n 'grin':'\\ud83d\\ude01',\n 'grinning':'\\ud83d\\ude00',\n 'guardsman':'\\ud83d\\udc82',\n 'guardswoman':'\\ud83d\\udc82‍\\u2640\\ufe0f',\n 'guitar':'\\ud83c\\udfb8',\n 'gun':'\\ud83d\\udd2b',\n 'haircut_woman':'\\ud83d\\udc87',\n 'haircut_man':'\\ud83d\\udc87‍\\u2642\\ufe0f',\n 'hamburger':'\\ud83c\\udf54',\n 'hammer':'\\ud83d\\udd28',\n 'hammer_and_pick':'\\u2692',\n 'hammer_and_wrench':'\\ud83d\\udee0',\n 'hamster':'\\ud83d\\udc39',\n 'hand':'\\u270b',\n 'handbag':'\\ud83d\\udc5c',\n 'handshake':'\\ud83e\\udd1d',\n 'hankey':'\\ud83d\\udca9',\n 'hatched_chick':'\\ud83d\\udc25',\n 'hatching_chick':'\\ud83d\\udc23',\n 'headphones':'\\ud83c\\udfa7',\n 'hear_no_evil':'\\ud83d\\ude49',\n 'heart':'\\u2764\\ufe0f',\n 'heart_decoration':'\\ud83d\\udc9f',\n 'heart_eyes':'\\ud83d\\ude0d',\n 'heart_eyes_cat':'\\ud83d\\ude3b',\n 'heartbeat':'\\ud83d\\udc93',\n 'heartpulse':'\\ud83d\\udc97',\n 'hearts':'\\u2665\\ufe0f',\n 'heavy_check_mark':'\\u2714\\ufe0f',\n 'heavy_division_sign':'\\u2797',\n 'heavy_dollar_sign':'\\ud83d\\udcb2',\n 'heavy_heart_exclamation':'\\u2763\\ufe0f',\n 'heavy_minus_sign':'\\u2796',\n 'heavy_multiplication_x':'\\u2716\\ufe0f',\n 'heavy_plus_sign':'\\u2795',\n 'helicopter':'\\ud83d\\ude81',\n 'herb':'\\ud83c\\udf3f',\n 'hibiscus':'\\ud83c\\udf3a',\n 'high_brightness':'\\ud83d\\udd06',\n 'high_heel':'\\ud83d\\udc60',\n 'hocho':'\\ud83d\\udd2a',\n 'hole':'\\ud83d\\udd73',\n 'honey_pot':'\\ud83c\\udf6f',\n 'horse':'\\ud83d\\udc34',\n 'horse_racing':'\\ud83c\\udfc7',\n 'hospital':'\\ud83c\\udfe5',\n 'hot_pepper':'\\ud83c\\udf36',\n 'hotdog':'\\ud83c\\udf2d',\n 'hotel':'\\ud83c\\udfe8',\n 'hotsprings':'\\u2668\\ufe0f',\n 'hourglass':'\\u231b\\ufe0f',\n 'hourglass_flowing_sand':'\\u23f3',\n 'house':'\\ud83c\\udfe0',\n 'house_with_garden':'\\ud83c\\udfe1',\n 'houses':'\\ud83c\\udfd8',\n 'hugs':'\\ud83e\\udd17',\n 'hushed':'\\ud83d\\ude2f',\n 'ice_cream':'\\ud83c\\udf68',\n 'ice_hockey':'\\ud83c\\udfd2',\n 'ice_skate':'\\u26f8',\n 'icecream':'\\ud83c\\udf66',\n 'id':'\\ud83c\\udd94',\n 'ideograph_advantage':'\\ud83c\\ude50',\n 'imp':'\\ud83d\\udc7f',\n 'inbox_tray':'\\ud83d\\udce5',\n 'incoming_envelope':'\\ud83d\\udce8',\n 'tipping_hand_woman':'\\ud83d\\udc81',\n 'information_source':'\\u2139\\ufe0f',\n 'innocent':'\\ud83d\\ude07',\n 'interrobang':'\\u2049\\ufe0f',\n 'iphone':'\\ud83d\\udcf1',\n 'izakaya_lantern':'\\ud83c\\udfee',\n 'jack_o_lantern':'\\ud83c\\udf83',\n 'japan':'\\ud83d\\uddfe',\n 'japanese_castle':'\\ud83c\\udfef',\n 'japanese_goblin':'\\ud83d\\udc7a',\n 'japanese_ogre':'\\ud83d\\udc79',\n 'jeans':'\\ud83d\\udc56',\n 'joy':'\\ud83d\\ude02',\n 'joy_cat':'\\ud83d\\ude39',\n 'joystick':'\\ud83d\\udd79',\n 'kaaba':'\\ud83d\\udd4b',\n 'key':'\\ud83d\\udd11',\n 'keyboard':'\\u2328\\ufe0f',\n 'keycap_ten':'\\ud83d\\udd1f',\n 'kick_scooter':'\\ud83d\\udef4',\n 'kimono':'\\ud83d\\udc58',\n 'kiss':'\\ud83d\\udc8b',\n 'kissing':'\\ud83d\\ude17',\n 'kissing_cat':'\\ud83d\\ude3d',\n 'kissing_closed_eyes':'\\ud83d\\ude1a',\n 'kissing_heart':'\\ud83d\\ude18',\n 'kissing_smiling_eyes':'\\ud83d\\ude19',\n 'kiwi_fruit':'\\ud83e\\udd5d',\n 'koala':'\\ud83d\\udc28',\n 'koko':'\\ud83c\\ude01',\n 'label':'\\ud83c\\udff7',\n 'large_blue_circle':'\\ud83d\\udd35',\n 'large_blue_diamond':'\\ud83d\\udd37',\n 'large_orange_diamond':'\\ud83d\\udd36',\n 'last_quarter_moon':'\\ud83c\\udf17',\n 'last_quarter_moon_with_face':'\\ud83c\\udf1c',\n 'latin_cross':'\\u271d\\ufe0f',\n 'laughing':'\\ud83d\\ude06',\n 'leaves':'\\ud83c\\udf43',\n 'ledger':'\\ud83d\\udcd2',\n 'left_luggage':'\\ud83d\\udec5',\n 'left_right_arrow':'\\u2194\\ufe0f',\n 'leftwards_arrow_with_hook':'\\u21a9\\ufe0f',\n 'lemon':'\\ud83c\\udf4b',\n 'leo':'\\u264c\\ufe0f',\n 'leopard':'\\ud83d\\udc06',\n 'level_slider':'\\ud83c\\udf9a',\n 'libra':'\\u264e\\ufe0f',\n 'light_rail':'\\ud83d\\ude88',\n 'link':'\\ud83d\\udd17',\n 'lion':'\\ud83e\\udd81',\n 'lips':'\\ud83d\\udc44',\n 'lipstick':'\\ud83d\\udc84',\n 'lizard':'\\ud83e\\udd8e',\n 'lock':'\\ud83d\\udd12',\n 'lock_with_ink_pen':'\\ud83d\\udd0f',\n 'lollipop':'\\ud83c\\udf6d',\n 'loop':'\\u27bf',\n 'loud_sound':'\\ud83d\\udd0a',\n 'loudspeaker':'\\ud83d\\udce2',\n 'love_hotel':'\\ud83c\\udfe9',\n 'love_letter':'\\ud83d\\udc8c',\n 'low_brightness':'\\ud83d\\udd05',\n 'lying_face':'\\ud83e\\udd25',\n 'm':'\\u24c2\\ufe0f',\n 'mag':'\\ud83d\\udd0d',\n 'mag_right':'\\ud83d\\udd0e',\n 'mahjong':'\\ud83c\\udc04\\ufe0f',\n 'mailbox':'\\ud83d\\udceb',\n 'mailbox_closed':'\\ud83d\\udcea',\n 'mailbox_with_mail':'\\ud83d\\udcec',\n 'mailbox_with_no_mail':'\\ud83d\\udced',\n 'man':'\\ud83d\\udc68',\n 'man_artist':'\\ud83d\\udc68‍\\ud83c\\udfa8',\n 'man_astronaut':'\\ud83d\\udc68‍\\ud83d\\ude80',\n 'man_cartwheeling':'\\ud83e\\udd38‍\\u2642\\ufe0f',\n 'man_cook':'\\ud83d\\udc68‍\\ud83c\\udf73',\n 'man_dancing':'\\ud83d\\udd7a',\n 'man_facepalming':'\\ud83e\\udd26‍\\u2642\\ufe0f',\n 'man_factory_worker':'\\ud83d\\udc68‍\\ud83c\\udfed',\n 'man_farmer':'\\ud83d\\udc68‍\\ud83c\\udf3e',\n 'man_firefighter':'\\ud83d\\udc68‍\\ud83d\\ude92',\n 'man_health_worker':'\\ud83d\\udc68‍\\u2695\\ufe0f',\n 'man_in_tuxedo':'\\ud83e\\udd35',\n 'man_judge':'\\ud83d\\udc68‍\\u2696\\ufe0f',\n 'man_juggling':'\\ud83e\\udd39‍\\u2642\\ufe0f',\n 'man_mechanic':'\\ud83d\\udc68‍\\ud83d\\udd27',\n 'man_office_worker':'\\ud83d\\udc68‍\\ud83d\\udcbc',\n 'man_pilot':'\\ud83d\\udc68‍\\u2708\\ufe0f',\n 'man_playing_handball':'\\ud83e\\udd3e‍\\u2642\\ufe0f',\n 'man_playing_water_polo':'\\ud83e\\udd3d‍\\u2642\\ufe0f',\n 'man_scientist':'\\ud83d\\udc68‍\\ud83d\\udd2c',\n 'man_shrugging':'\\ud83e\\udd37‍\\u2642\\ufe0f',\n 'man_singer':'\\ud83d\\udc68‍\\ud83c\\udfa4',\n 'man_student':'\\ud83d\\udc68‍\\ud83c\\udf93',\n 'man_teacher':'\\ud83d\\udc68‍\\ud83c\\udfeb',\n 'man_technologist':'\\ud83d\\udc68‍\\ud83d\\udcbb',\n 'man_with_gua_pi_mao':'\\ud83d\\udc72',\n 'man_with_turban':'\\ud83d\\udc73',\n 'tangerine':'\\ud83c\\udf4a',\n 'mans_shoe':'\\ud83d\\udc5e',\n 'mantelpiece_clock':'\\ud83d\\udd70',\n 'maple_leaf':'\\ud83c\\udf41',\n 'martial_arts_uniform':'\\ud83e\\udd4b',\n 'mask':'\\ud83d\\ude37',\n 'massage_woman':'\\ud83d\\udc86',\n 'massage_man':'\\ud83d\\udc86‍\\u2642\\ufe0f',\n 'meat_on_bone':'\\ud83c\\udf56',\n 'medal_military':'\\ud83c\\udf96',\n 'medal_sports':'\\ud83c\\udfc5',\n 'mega':'\\ud83d\\udce3',\n 'melon':'\\ud83c\\udf48',\n 'memo':'\\ud83d\\udcdd',\n 'men_wrestling':'\\ud83e\\udd3c‍\\u2642\\ufe0f',\n 'menorah':'\\ud83d\\udd4e',\n 'mens':'\\ud83d\\udeb9',\n 'metal':'\\ud83e\\udd18',\n 'metro':'\\ud83d\\ude87',\n 'microphone':'\\ud83c\\udfa4',\n 'microscope':'\\ud83d\\udd2c',\n 'milk_glass':'\\ud83e\\udd5b',\n 'milky_way':'\\ud83c\\udf0c',\n 'minibus':'\\ud83d\\ude90',\n 'minidisc':'\\ud83d\\udcbd',\n 'mobile_phone_off':'\\ud83d\\udcf4',\n 'money_mouth_face':'\\ud83e\\udd11',\n 'money_with_wings':'\\ud83d\\udcb8',\n 'moneybag':'\\ud83d\\udcb0',\n 'monkey':'\\ud83d\\udc12',\n 'monkey_face':'\\ud83d\\udc35',\n 'monorail':'\\ud83d\\ude9d',\n 'moon':'\\ud83c\\udf14',\n 'mortar_board':'\\ud83c\\udf93',\n 'mosque':'\\ud83d\\udd4c',\n 'motor_boat':'\\ud83d\\udee5',\n 'motor_scooter':'\\ud83d\\udef5',\n 'motorcycle':'\\ud83c\\udfcd',\n 'motorway':'\\ud83d\\udee3',\n 'mount_fuji':'\\ud83d\\uddfb',\n 'mountain':'\\u26f0',\n 'mountain_biking_man':'\\ud83d\\udeb5',\n 'mountain_biking_woman':'\\ud83d\\udeb5‍\\u2640\\ufe0f',\n 'mountain_cableway':'\\ud83d\\udea0',\n 'mountain_railway':'\\ud83d\\ude9e',\n 'mountain_snow':'\\ud83c\\udfd4',\n 'mouse':'\\ud83d\\udc2d',\n 'mouse2':'\\ud83d\\udc01',\n 'movie_camera':'\\ud83c\\udfa5',\n 'moyai':'\\ud83d\\uddff',\n 'mrs_claus':'\\ud83e\\udd36',\n 'muscle':'\\ud83d\\udcaa',\n 'mushroom':'\\ud83c\\udf44',\n 'musical_keyboard':'\\ud83c\\udfb9',\n 'musical_note':'\\ud83c\\udfb5',\n 'musical_score':'\\ud83c\\udfbc',\n 'mute':'\\ud83d\\udd07',\n 'nail_care':'\\ud83d\\udc85',\n 'name_badge':'\\ud83d\\udcdb',\n 'national_park':'\\ud83c\\udfde',\n 'nauseated_face':'\\ud83e\\udd22',\n 'necktie':'\\ud83d\\udc54',\n 'negative_squared_cross_mark':'\\u274e',\n 'nerd_face':'\\ud83e\\udd13',\n 'neutral_face':'\\ud83d\\ude10',\n 'new':'\\ud83c\\udd95',\n 'new_moon':'\\ud83c\\udf11',\n 'new_moon_with_face':'\\ud83c\\udf1a',\n 'newspaper':'\\ud83d\\udcf0',\n 'newspaper_roll':'\\ud83d\\uddde',\n 'next_track_button':'\\u23ed',\n 'ng':'\\ud83c\\udd96',\n 'no_good_man':'\\ud83d\\ude45‍\\u2642\\ufe0f',\n 'no_good_woman':'\\ud83d\\ude45',\n 'night_with_stars':'\\ud83c\\udf03',\n 'no_bell':'\\ud83d\\udd15',\n 'no_bicycles':'\\ud83d\\udeb3',\n 'no_entry':'\\u26d4\\ufe0f',\n 'no_entry_sign':'\\ud83d\\udeab',\n 'no_mobile_phones':'\\ud83d\\udcf5',\n 'no_mouth':'\\ud83d\\ude36',\n 'no_pedestrians':'\\ud83d\\udeb7',\n 'no_smoking':'\\ud83d\\udead',\n 'non-potable_water':'\\ud83d\\udeb1',\n 'nose':'\\ud83d\\udc43',\n 'notebook':'\\ud83d\\udcd3',\n 'notebook_with_decorative_cover':'\\ud83d\\udcd4',\n 'notes':'\\ud83c\\udfb6',\n 'nut_and_bolt':'\\ud83d\\udd29',\n 'o':'\\u2b55\\ufe0f',\n 'o2':'\\ud83c\\udd7e\\ufe0f',\n 'ocean':'\\ud83c\\udf0a',\n 'octopus':'\\ud83d\\udc19',\n 'oden':'\\ud83c\\udf62',\n 'office':'\\ud83c\\udfe2',\n 'oil_drum':'\\ud83d\\udee2',\n 'ok':'\\ud83c\\udd97',\n 'ok_hand':'\\ud83d\\udc4c',\n 'ok_man':'\\ud83d\\ude46‍\\u2642\\ufe0f',\n 'ok_woman':'\\ud83d\\ude46',\n 'old_key':'\\ud83d\\udddd',\n 'older_man':'\\ud83d\\udc74',\n 'older_woman':'\\ud83d\\udc75',\n 'om':'\\ud83d\\udd49',\n 'on':'\\ud83d\\udd1b',\n 'oncoming_automobile':'\\ud83d\\ude98',\n 'oncoming_bus':'\\ud83d\\ude8d',\n 'oncoming_police_car':'\\ud83d\\ude94',\n 'oncoming_taxi':'\\ud83d\\ude96',\n 'open_file_folder':'\\ud83d\\udcc2',\n 'open_hands':'\\ud83d\\udc50',\n 'open_mouth':'\\ud83d\\ude2e',\n 'open_umbrella':'\\u2602\\ufe0f',\n 'ophiuchus':'\\u26ce',\n 'orange_book':'\\ud83d\\udcd9',\n 'orthodox_cross':'\\u2626\\ufe0f',\n 'outbox_tray':'\\ud83d\\udce4',\n 'owl':'\\ud83e\\udd89',\n 'ox':'\\ud83d\\udc02',\n 'package':'\\ud83d\\udce6',\n 'page_facing_up':'\\ud83d\\udcc4',\n 'page_with_curl':'\\ud83d\\udcc3',\n 'pager':'\\ud83d\\udcdf',\n 'paintbrush':'\\ud83d\\udd8c',\n 'palm_tree':'\\ud83c\\udf34',\n 'pancakes':'\\ud83e\\udd5e',\n 'panda_face':'\\ud83d\\udc3c',\n 'paperclip':'\\ud83d\\udcce',\n 'paperclips':'\\ud83d\\udd87',\n 'parasol_on_ground':'\\u26f1',\n 'parking':'\\ud83c\\udd7f\\ufe0f',\n 'part_alternation_mark':'\\u303d\\ufe0f',\n 'partly_sunny':'\\u26c5\\ufe0f',\n 'passenger_ship':'\\ud83d\\udef3',\n 'passport_control':'\\ud83d\\udec2',\n 'pause_button':'\\u23f8',\n 'peace_symbol':'\\u262e\\ufe0f',\n 'peach':'\\ud83c\\udf51',\n 'peanuts':'\\ud83e\\udd5c',\n 'pear':'\\ud83c\\udf50',\n 'pen':'\\ud83d\\udd8a',\n 'pencil2':'\\u270f\\ufe0f',\n 'penguin':'\\ud83d\\udc27',\n 'pensive':'\\ud83d\\ude14',\n 'performing_arts':'\\ud83c\\udfad',\n 'persevere':'\\ud83d\\ude23',\n 'person_fencing':'\\ud83e\\udd3a',\n 'pouting_woman':'\\ud83d\\ude4e',\n 'phone':'\\u260e\\ufe0f',\n 'pick':'\\u26cf',\n 'pig':'\\ud83d\\udc37',\n 'pig2':'\\ud83d\\udc16',\n 'pig_nose':'\\ud83d\\udc3d',\n 'pill':'\\ud83d\\udc8a',\n 'pineapple':'\\ud83c\\udf4d',\n 'ping_pong':'\\ud83c\\udfd3',\n 'pisces':'\\u2653\\ufe0f',\n 'pizza':'\\ud83c\\udf55',\n 'place_of_worship':'\\ud83d\\uded0',\n 'plate_with_cutlery':'\\ud83c\\udf7d',\n 'play_or_pause_button':'\\u23ef',\n 'point_down':'\\ud83d\\udc47',\n 'point_left':'\\ud83d\\udc48',\n 'point_right':'\\ud83d\\udc49',\n 'point_up':'\\u261d\\ufe0f',\n 'point_up_2':'\\ud83d\\udc46',\n 'police_car':'\\ud83d\\ude93',\n 'policewoman':'\\ud83d\\udc6e‍\\u2640\\ufe0f',\n 'poodle':'\\ud83d\\udc29',\n 'popcorn':'\\ud83c\\udf7f',\n 'post_office':'\\ud83c\\udfe3',\n 'postal_horn':'\\ud83d\\udcef',\n 'postbox':'\\ud83d\\udcee',\n 'potable_water':'\\ud83d\\udeb0',\n 'potato':'\\ud83e\\udd54',\n 'pouch':'\\ud83d\\udc5d',\n 'poultry_leg':'\\ud83c\\udf57',\n 'pound':'\\ud83d\\udcb7',\n 'rage':'\\ud83d\\ude21',\n 'pouting_cat':'\\ud83d\\ude3e',\n 'pouting_man':'\\ud83d\\ude4e‍\\u2642\\ufe0f',\n 'pray':'\\ud83d\\ude4f',\n 'prayer_beads':'\\ud83d\\udcff',\n 'pregnant_woman':'\\ud83e\\udd30',\n 'previous_track_button':'\\u23ee',\n 'prince':'\\ud83e\\udd34',\n 'princess':'\\ud83d\\udc78',\n 'printer':'\\ud83d\\udda8',\n 'purple_heart':'\\ud83d\\udc9c',\n 'purse':'\\ud83d\\udc5b',\n 'pushpin':'\\ud83d\\udccc',\n 'put_litter_in_its_place':'\\ud83d\\udeae',\n 'question':'\\u2753',\n 'rabbit':'\\ud83d\\udc30',\n 'rabbit2':'\\ud83d\\udc07',\n 'racehorse':'\\ud83d\\udc0e',\n 'racing_car':'\\ud83c\\udfce',\n 'radio':'\\ud83d\\udcfb',\n 'radio_button':'\\ud83d\\udd18',\n 'radioactive':'\\u2622\\ufe0f',\n 'railway_car':'\\ud83d\\ude83',\n 'railway_track':'\\ud83d\\udee4',\n 'rainbow':'\\ud83c\\udf08',\n 'rainbow_flag':'\\ud83c\\udff3\\ufe0f‍\\ud83c\\udf08',\n 'raised_back_of_hand':'\\ud83e\\udd1a',\n 'raised_hand_with_fingers_splayed':'\\ud83d\\udd90',\n 'raised_hands':'\\ud83d\\ude4c',\n 'raising_hand_woman':'\\ud83d\\ude4b',\n 'raising_hand_man':'\\ud83d\\ude4b‍\\u2642\\ufe0f',\n 'ram':'\\ud83d\\udc0f',\n 'ramen':'\\ud83c\\udf5c',\n 'rat':'\\ud83d\\udc00',\n 'record_button':'\\u23fa',\n 'recycle':'\\u267b\\ufe0f',\n 'red_circle':'\\ud83d\\udd34',\n 'registered':'\\u00ae\\ufe0f',\n 'relaxed':'\\u263a\\ufe0f',\n 'relieved':'\\ud83d\\ude0c',\n 'reminder_ribbon':'\\ud83c\\udf97',\n 'repeat':'\\ud83d\\udd01',\n 'repeat_one':'\\ud83d\\udd02',\n 'rescue_worker_helmet':'\\u26d1',\n 'restroom':'\\ud83d\\udebb',\n 'revolving_hearts':'\\ud83d\\udc9e',\n 'rewind':'\\u23ea',\n 'rhinoceros':'\\ud83e\\udd8f',\n 'ribbon':'\\ud83c\\udf80',\n 'rice':'\\ud83c\\udf5a',\n 'rice_ball':'\\ud83c\\udf59',\n 'rice_cracker':'\\ud83c\\udf58',\n 'rice_scene':'\\ud83c\\udf91',\n 'right_anger_bubble':'\\ud83d\\uddef',\n 'ring':'\\ud83d\\udc8d',\n 'robot':'\\ud83e\\udd16',\n 'rocket':'\\ud83d\\ude80',\n 'rofl':'\\ud83e\\udd23',\n 'roll_eyes':'\\ud83d\\ude44',\n 'roller_coaster':'\\ud83c\\udfa2',\n 'rooster':'\\ud83d\\udc13',\n 'rose':'\\ud83c\\udf39',\n 'rosette':'\\ud83c\\udff5',\n 'rotating_light':'\\ud83d\\udea8',\n 'round_pushpin':'\\ud83d\\udccd',\n 'rowing_man':'\\ud83d\\udea3',\n 'rowing_woman':'\\ud83d\\udea3‍\\u2640\\ufe0f',\n 'rugby_football':'\\ud83c\\udfc9',\n 'running_man':'\\ud83c\\udfc3',\n 'running_shirt_with_sash':'\\ud83c\\udfbd',\n 'running_woman':'\\ud83c\\udfc3‍\\u2640\\ufe0f',\n 'sa':'\\ud83c\\ude02\\ufe0f',\n 'sagittarius':'\\u2650\\ufe0f',\n 'sake':'\\ud83c\\udf76',\n 'sandal':'\\ud83d\\udc61',\n 'santa':'\\ud83c\\udf85',\n 'satellite':'\\ud83d\\udce1',\n 'saxophone':'\\ud83c\\udfb7',\n 'school':'\\ud83c\\udfeb',\n 'school_satchel':'\\ud83c\\udf92',\n 'scissors':'\\u2702\\ufe0f',\n 'scorpion':'\\ud83e\\udd82',\n 'scorpius':'\\u264f\\ufe0f',\n 'scream':'\\ud83d\\ude31',\n 'scream_cat':'\\ud83d\\ude40',\n 'scroll':'\\ud83d\\udcdc',\n 'seat':'\\ud83d\\udcba',\n 'secret':'\\u3299\\ufe0f',\n 'see_no_evil':'\\ud83d\\ude48',\n 'seedling':'\\ud83c\\udf31',\n 'selfie':'\\ud83e\\udd33',\n 'shallow_pan_of_food':'\\ud83e\\udd58',\n 'shamrock':'\\u2618\\ufe0f',\n 'shark':'\\ud83e\\udd88',\n 'shaved_ice':'\\ud83c\\udf67',\n 'sheep':'\\ud83d\\udc11',\n 'shell':'\\ud83d\\udc1a',\n 'shield':'\\ud83d\\udee1',\n 'shinto_shrine':'\\u26e9',\n 'ship':'\\ud83d\\udea2',\n 'shirt':'\\ud83d\\udc55',\n 'shopping':'\\ud83d\\udecd',\n 'shopping_cart':'\\ud83d\\uded2',\n 'shower':'\\ud83d\\udebf',\n 'shrimp':'\\ud83e\\udd90',\n 'signal_strength':'\\ud83d\\udcf6',\n 'six_pointed_star':'\\ud83d\\udd2f',\n 'ski':'\\ud83c\\udfbf',\n 'skier':'\\u26f7',\n 'skull':'\\ud83d\\udc80',\n 'skull_and_crossbones':'\\u2620\\ufe0f',\n 'sleeping':'\\ud83d\\ude34',\n 'sleeping_bed':'\\ud83d\\udecc',\n 'sleepy':'\\ud83d\\ude2a',\n 'slightly_frowning_face':'\\ud83d\\ude41',\n 'slightly_smiling_face':'\\ud83d\\ude42',\n 'slot_machine':'\\ud83c\\udfb0',\n 'small_airplane':'\\ud83d\\udee9',\n 'small_blue_diamond':'\\ud83d\\udd39',\n 'small_orange_diamond':'\\ud83d\\udd38',\n 'small_red_triangle':'\\ud83d\\udd3a',\n 'small_red_triangle_down':'\\ud83d\\udd3b',\n 'smile':'\\ud83d\\ude04',\n 'smile_cat':'\\ud83d\\ude38',\n 'smiley':'\\ud83d\\ude03',\n 'smiley_cat':'\\ud83d\\ude3a',\n 'smiling_imp':'\\ud83d\\ude08',\n 'smirk':'\\ud83d\\ude0f',\n 'smirk_cat':'\\ud83d\\ude3c',\n 'smoking':'\\ud83d\\udeac',\n 'snail':'\\ud83d\\udc0c',\n 'snake':'\\ud83d\\udc0d',\n 'sneezing_face':'\\ud83e\\udd27',\n 'snowboarder':'\\ud83c\\udfc2',\n 'snowflake':'\\u2744\\ufe0f',\n 'snowman':'\\u26c4\\ufe0f',\n 'snowman_with_snow':'\\u2603\\ufe0f',\n 'sob':'\\ud83d\\ude2d',\n 'soccer':'\\u26bd\\ufe0f',\n 'soon':'\\ud83d\\udd1c',\n 'sos':'\\ud83c\\udd98',\n 'sound':'\\ud83d\\udd09',\n 'space_invader':'\\ud83d\\udc7e',\n 'spades':'\\u2660\\ufe0f',\n 'spaghetti':'\\ud83c\\udf5d',\n 'sparkle':'\\u2747\\ufe0f',\n 'sparkler':'\\ud83c\\udf87',\n 'sparkles':'\\u2728',\n 'sparkling_heart':'\\ud83d\\udc96',\n 'speak_no_evil':'\\ud83d\\ude4a',\n 'speaker':'\\ud83d\\udd08',\n 'speaking_head':'\\ud83d\\udde3',\n 'speech_balloon':'\\ud83d\\udcac',\n 'speedboat':'\\ud83d\\udea4',\n 'spider':'\\ud83d\\udd77',\n 'spider_web':'\\ud83d\\udd78',\n 'spiral_calendar':'\\ud83d\\uddd3',\n 'spiral_notepad':'\\ud83d\\uddd2',\n 'spoon':'\\ud83e\\udd44',\n 'squid':'\\ud83e\\udd91',\n 'stadium':'\\ud83c\\udfdf',\n 'star':'\\u2b50\\ufe0f',\n 'star2':'\\ud83c\\udf1f',\n 'star_and_crescent':'\\u262a\\ufe0f',\n 'star_of_david':'\\u2721\\ufe0f',\n 'stars':'\\ud83c\\udf20',\n 'station':'\\ud83d\\ude89',\n 'statue_of_liberty':'\\ud83d\\uddfd',\n 'steam_locomotive':'\\ud83d\\ude82',\n 'stew':'\\ud83c\\udf72',\n 'stop_button':'\\u23f9',\n 'stop_sign':'\\ud83d\\uded1',\n 'stopwatch':'\\u23f1',\n 'straight_ruler':'\\ud83d\\udccf',\n 'strawberry':'\\ud83c\\udf53',\n 'stuck_out_tongue':'\\ud83d\\ude1b',\n 'stuck_out_tongue_closed_eyes':'\\ud83d\\ude1d',\n 'stuck_out_tongue_winking_eye':'\\ud83d\\ude1c',\n 'studio_microphone':'\\ud83c\\udf99',\n 'stuffed_flatbread':'\\ud83e\\udd59',\n 'sun_behind_large_cloud':'\\ud83c\\udf25',\n 'sun_behind_rain_cloud':'\\ud83c\\udf26',\n 'sun_behind_small_cloud':'\\ud83c\\udf24',\n 'sun_with_face':'\\ud83c\\udf1e',\n 'sunflower':'\\ud83c\\udf3b',\n 'sunglasses':'\\ud83d\\ude0e',\n 'sunny':'\\u2600\\ufe0f',\n 'sunrise':'\\ud83c\\udf05',\n 'sunrise_over_mountains':'\\ud83c\\udf04',\n 'surfing_man':'\\ud83c\\udfc4',\n 'surfing_woman':'\\ud83c\\udfc4‍\\u2640\\ufe0f',\n 'sushi':'\\ud83c\\udf63',\n 'suspension_railway':'\\ud83d\\ude9f',\n 'sweat':'\\ud83d\\ude13',\n 'sweat_drops':'\\ud83d\\udca6',\n 'sweat_smile':'\\ud83d\\ude05',\n 'sweet_potato':'\\ud83c\\udf60',\n 'swimming_man':'\\ud83c\\udfca',\n 'swimming_woman':'\\ud83c\\udfca‍\\u2640\\ufe0f',\n 'symbols':'\\ud83d\\udd23',\n 'synagogue':'\\ud83d\\udd4d',\n 'syringe':'\\ud83d\\udc89',\n 'taco':'\\ud83c\\udf2e',\n 'tada':'\\ud83c\\udf89',\n 'tanabata_tree':'\\ud83c\\udf8b',\n 'taurus':'\\u2649\\ufe0f',\n 'taxi':'\\ud83d\\ude95',\n 'tea':'\\ud83c\\udf75',\n 'telephone_receiver':'\\ud83d\\udcde',\n 'telescope':'\\ud83d\\udd2d',\n 'tennis':'\\ud83c\\udfbe',\n 'tent':'\\u26fa\\ufe0f',\n 'thermometer':'\\ud83c\\udf21',\n 'thinking':'\\ud83e\\udd14',\n 'thought_balloon':'\\ud83d\\udcad',\n 'ticket':'\\ud83c\\udfab',\n 'tickets':'\\ud83c\\udf9f',\n 'tiger':'\\ud83d\\udc2f',\n 'tiger2':'\\ud83d\\udc05',\n 'timer_clock':'\\u23f2',\n 'tipping_hand_man':'\\ud83d\\udc81‍\\u2642\\ufe0f',\n 'tired_face':'\\ud83d\\ude2b',\n 'tm':'\\u2122\\ufe0f',\n 'toilet':'\\ud83d\\udebd',\n 'tokyo_tower':'\\ud83d\\uddfc',\n 'tomato':'\\ud83c\\udf45',\n 'tongue':'\\ud83d\\udc45',\n 'top':'\\ud83d\\udd1d',\n 'tophat':'\\ud83c\\udfa9',\n 'tornado':'\\ud83c\\udf2a',\n 'trackball':'\\ud83d\\uddb2',\n 'tractor':'\\ud83d\\ude9c',\n 'traffic_light':'\\ud83d\\udea5',\n 'train':'\\ud83d\\ude8b',\n 'train2':'\\ud83d\\ude86',\n 'tram':'\\ud83d\\ude8a',\n 'triangular_flag_on_post':'\\ud83d\\udea9',\n 'triangular_ruler':'\\ud83d\\udcd0',\n 'trident':'\\ud83d\\udd31',\n 'triumph':'\\ud83d\\ude24',\n 'trolleybus':'\\ud83d\\ude8e',\n 'trophy':'\\ud83c\\udfc6',\n 'tropical_drink':'\\ud83c\\udf79',\n 'tropical_fish':'\\ud83d\\udc20',\n 'truck':'\\ud83d\\ude9a',\n 'trumpet':'\\ud83c\\udfba',\n 'tulip':'\\ud83c\\udf37',\n 'tumbler_glass':'\\ud83e\\udd43',\n 'turkey':'\\ud83e\\udd83',\n 'turtle':'\\ud83d\\udc22',\n 'tv':'\\ud83d\\udcfa',\n 'twisted_rightwards_arrows':'\\ud83d\\udd00',\n 'two_hearts':'\\ud83d\\udc95',\n 'two_men_holding_hands':'\\ud83d\\udc6c',\n 'two_women_holding_hands':'\\ud83d\\udc6d',\n 'u5272':'\\ud83c\\ude39',\n 'u5408':'\\ud83c\\ude34',\n 'u55b6':'\\ud83c\\ude3a',\n 'u6307':'\\ud83c\\ude2f\\ufe0f',\n 'u6708':'\\ud83c\\ude37\\ufe0f',\n 'u6709':'\\ud83c\\ude36',\n 'u6e80':'\\ud83c\\ude35',\n 'u7121':'\\ud83c\\ude1a\\ufe0f',\n 'u7533':'\\ud83c\\ude38',\n 'u7981':'\\ud83c\\ude32',\n 'u7a7a':'\\ud83c\\ude33',\n 'umbrella':'\\u2614\\ufe0f',\n 'unamused':'\\ud83d\\ude12',\n 'underage':'\\ud83d\\udd1e',\n 'unicorn':'\\ud83e\\udd84',\n 'unlock':'\\ud83d\\udd13',\n 'up':'\\ud83c\\udd99',\n 'upside_down_face':'\\ud83d\\ude43',\n 'v':'\\u270c\\ufe0f',\n 'vertical_traffic_light':'\\ud83d\\udea6',\n 'vhs':'\\ud83d\\udcfc',\n 'vibration_mode':'\\ud83d\\udcf3',\n 'video_camera':'\\ud83d\\udcf9',\n 'video_game':'\\ud83c\\udfae',\n 'violin':'\\ud83c\\udfbb',\n 'virgo':'\\u264d\\ufe0f',\n 'volcano':'\\ud83c\\udf0b',\n 'volleyball':'\\ud83c\\udfd0',\n 'vs':'\\ud83c\\udd9a',\n 'vulcan_salute':'\\ud83d\\udd96',\n 'walking_man':'\\ud83d\\udeb6',\n 'walking_woman':'\\ud83d\\udeb6‍\\u2640\\ufe0f',\n 'waning_crescent_moon':'\\ud83c\\udf18',\n 'waning_gibbous_moon':'\\ud83c\\udf16',\n 'warning':'\\u26a0\\ufe0f',\n 'wastebasket':'\\ud83d\\uddd1',\n 'watch':'\\u231a\\ufe0f',\n 'water_buffalo':'\\ud83d\\udc03',\n 'watermelon':'\\ud83c\\udf49',\n 'wave':'\\ud83d\\udc4b',\n 'wavy_dash':'\\u3030\\ufe0f',\n 'waxing_crescent_moon':'\\ud83c\\udf12',\n 'wc':'\\ud83d\\udebe',\n 'weary':'\\ud83d\\ude29',\n 'wedding':'\\ud83d\\udc92',\n 'weight_lifting_man':'\\ud83c\\udfcb\\ufe0f',\n 'weight_lifting_woman':'\\ud83c\\udfcb\\ufe0f‍\\u2640\\ufe0f',\n 'whale':'\\ud83d\\udc33',\n 'whale2':'\\ud83d\\udc0b',\n 'wheel_of_dharma':'\\u2638\\ufe0f',\n 'wheelchair':'\\u267f\\ufe0f',\n 'white_check_mark':'\\u2705',\n 'white_circle':'\\u26aa\\ufe0f',\n 'white_flag':'\\ud83c\\udff3\\ufe0f',\n 'white_flower':'\\ud83d\\udcae',\n 'white_large_square':'\\u2b1c\\ufe0f',\n 'white_medium_small_square':'\\u25fd\\ufe0f',\n 'white_medium_square':'\\u25fb\\ufe0f',\n 'white_small_square':'\\u25ab\\ufe0f',\n 'white_square_button':'\\ud83d\\udd33',\n 'wilted_flower':'\\ud83e\\udd40',\n 'wind_chime':'\\ud83c\\udf90',\n 'wind_face':'\\ud83c\\udf2c',\n 'wine_glass':'\\ud83c\\udf77',\n 'wink':'\\ud83d\\ude09',\n 'wolf':'\\ud83d\\udc3a',\n 'woman':'\\ud83d\\udc69',\n 'woman_artist':'\\ud83d\\udc69‍\\ud83c\\udfa8',\n 'woman_astronaut':'\\ud83d\\udc69‍\\ud83d\\ude80',\n 'woman_cartwheeling':'\\ud83e\\udd38‍\\u2640\\ufe0f',\n 'woman_cook':'\\ud83d\\udc69‍\\ud83c\\udf73',\n 'woman_facepalming':'\\ud83e\\udd26‍\\u2640\\ufe0f',\n 'woman_factory_worker':'\\ud83d\\udc69‍\\ud83c\\udfed',\n 'woman_farmer':'\\ud83d\\udc69‍\\ud83c\\udf3e',\n 'woman_firefighter':'\\ud83d\\udc69‍\\ud83d\\ude92',\n 'woman_health_worker':'\\ud83d\\udc69‍\\u2695\\ufe0f',\n 'woman_judge':'\\ud83d\\udc69‍\\u2696\\ufe0f',\n 'woman_juggling':'\\ud83e\\udd39‍\\u2640\\ufe0f',\n 'woman_mechanic':'\\ud83d\\udc69‍\\ud83d\\udd27',\n 'woman_office_worker':'\\ud83d\\udc69‍\\ud83d\\udcbc',\n 'woman_pilot':'\\ud83d\\udc69‍\\u2708\\ufe0f',\n 'woman_playing_handball':'\\ud83e\\udd3e‍\\u2640\\ufe0f',\n 'woman_playing_water_polo':'\\ud83e\\udd3d‍\\u2640\\ufe0f',\n 'woman_scientist':'\\ud83d\\udc69‍\\ud83d\\udd2c',\n 'woman_shrugging':'\\ud83e\\udd37‍\\u2640\\ufe0f',\n 'woman_singer':'\\ud83d\\udc69‍\\ud83c\\udfa4',\n 'woman_student':'\\ud83d\\udc69‍\\ud83c\\udf93',\n 'woman_teacher':'\\ud83d\\udc69‍\\ud83c\\udfeb',\n 'woman_technologist':'\\ud83d\\udc69‍\\ud83d\\udcbb',\n 'woman_with_turban':'\\ud83d\\udc73‍\\u2640\\ufe0f',\n 'womans_clothes':'\\ud83d\\udc5a',\n 'womans_hat':'\\ud83d\\udc52',\n 'women_wrestling':'\\ud83e\\udd3c‍\\u2640\\ufe0f',\n 'womens':'\\ud83d\\udeba',\n 'world_map':'\\ud83d\\uddfa',\n 'worried':'\\ud83d\\ude1f',\n 'wrench':'\\ud83d\\udd27',\n 'writing_hand':'\\u270d\\ufe0f',\n 'x':'\\u274c',\n 'yellow_heart':'\\ud83d\\udc9b',\n 'yen':'\\ud83d\\udcb4',\n 'yin_yang':'\\u262f\\ufe0f',\n 'yum':'\\ud83d\\ude0b',\n 'zap':'\\u26a1\\ufe0f',\n 'zipper_mouth_face':'\\ud83e\\udd10',\n 'zzz':'\\ud83d\\udca4',\n\n /* special emojis :P */\n 'octocat': '\":octocat:\"',\n 'showdown': 'S'\n};\n\r\n/**\n * Created by Estevao on 31-05-2015.\n */\n\n/**\n * Showdown Converter class\n * @class\n * @param {object} [converterOptions]\n * @returns {Converter}\n */\nshowdown.Converter = function (converterOptions) {\n 'use strict';\n\n var\n /**\n * Options used by this converter\n * @private\n * @type {{}}\n */\n options = {},\n\n /**\n * Language extensions used by this converter\n * @private\n * @type {Array}\n */\n langExtensions = [],\n\n /**\n * Output modifiers extensions used by this converter\n * @private\n * @type {Array}\n */\n outputModifiers = [],\n\n /**\n * Event listeners\n * @private\n * @type {{}}\n */\n listeners = {},\n\n /**\n * The flavor set in this converter\n */\n setConvFlavor = setFlavor,\n\n /**\n * Metadata of the document\n * @type {{parsed: {}, raw: string, format: string}}\n */\n metadata = {\n parsed: {},\n raw: '',\n format: ''\n };\n\n _constructor();\n\n /**\n * Converter constructor\n * @private\n */\n function _constructor () {\n converterOptions = converterOptions || {};\n\n for (var gOpt in globalOptions) {\n if (globalOptions.hasOwnProperty(gOpt)) {\n options[gOpt] = globalOptions[gOpt];\n }\n }\n\n // Merge options\n if (typeof converterOptions === 'object') {\n for (var opt in converterOptions) {\n if (converterOptions.hasOwnProperty(opt)) {\n options[opt] = converterOptions[opt];\n }\n }\n } else {\n throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +\n ' was passed instead.');\n }\n\n if (options.extensions) {\n showdown.helper.forEach(options.extensions, _parseExtension);\n }\n }\n\n /**\n * Parse extension\n * @param {*} ext\n * @param {string} [name='']\n * @private\n */\n function _parseExtension (ext, name) {\n\n name = name || null;\n // If it's a string, the extension was previously loaded\n if (showdown.helper.isString(ext)) {\n ext = showdown.helper.stdExtName(ext);\n name = ext;\n\n // LEGACY_SUPPORT CODE\n if (showdown.extensions[ext]) {\n console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +\n 'Please inform the developer that the extension should be updated!');\n legacyExtensionLoading(showdown.extensions[ext], ext);\n return;\n // END LEGACY SUPPORT CODE\n\n } else if (!showdown.helper.isUndefined(extensions[ext])) {\n ext = extensions[ext];\n\n } else {\n throw Error('Extension \"' + ext + '\" could not be loaded. It was either not found or is not a valid extension.');\n }\n }\n\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n var validExt = validate(ext, name);\n if (!validExt.valid) {\n throw Error(validExt.error);\n }\n\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n\n case 'lang':\n langExtensions.push(ext[i]);\n break;\n\n case 'output':\n outputModifiers.push(ext[i]);\n break;\n }\n if (ext[i].hasOwnProperty('listeners')) {\n for (var ln in ext[i].listeners) {\n if (ext[i].listeners.hasOwnProperty(ln)) {\n listen(ln, ext[i].listeners[ln]);\n }\n }\n }\n }\n\n }\n\n /**\n * LEGACY_SUPPORT\n * @param {*} ext\n * @param {string} name\n */\n function legacyExtensionLoading (ext, name) {\n if (typeof ext === 'function') {\n ext = ext(new showdown.Converter());\n }\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n var valid = validate(ext, name);\n\n if (!valid.valid) {\n throw Error(valid.error);\n }\n\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n case 'lang':\n langExtensions.push(ext[i]);\n break;\n case 'output':\n outputModifiers.push(ext[i]);\n break;\n default:// should never reach here\n throw Error('Extension loader error: Type unrecognized!!!');\n }\n }\n }\n\n /**\n * Listen to an event\n * @param {string} name\n * @param {function} callback\n */\n function listen (name, callback) {\n if (!showdown.helper.isString(name)) {\n throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');\n }\n\n if (typeof callback !== 'function') {\n throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');\n }\n\n if (!listeners.hasOwnProperty(name)) {\n listeners[name] = [];\n }\n listeners[name].push(callback);\n }\n\n function rTrimInputText (text) {\n var rsp = text.match(/^\\s*/)[0].length,\n rgx = new RegExp('^\\\\s{0,' + rsp + '}', 'gm');\n return text.replace(rgx, '');\n }\n\n /**\n * Dispatch an event\n * @private\n * @param {string} evtName Event name\n * @param {string} text Text\n * @param {{}} options Converter Options\n * @param {{}} globals\n * @returns {string}\n */\n this._dispatch = function dispatch (evtName, text, options, globals) {\n if (listeners.hasOwnProperty(evtName)) {\n for (var ei = 0; ei < listeners[evtName].length; ++ei) {\n var nText = listeners[evtName][ei](evtName, text, this, options, globals);\n if (nText && typeof nText !== 'undefined') {\n text = nText;\n }\n }\n }\n return text;\n };\n\n /**\n * Listen to an event\n * @param {string} name\n * @param {function} callback\n * @returns {showdown.Converter}\n */\n this.listen = function (name, callback) {\n listen(name, callback);\n return this;\n };\n\n /**\n * Converts a markdown string into HTML\n * @param {string} text\n * @returns {*}\n */\n this.makeHtml = function (text) {\n //check if text is not falsy\n if (!text) {\n return text;\n }\n\n var globals = {\n gHtmlBlocks: [],\n gHtmlMdBlocks: [],\n gHtmlSpans: [],\n gUrls: {},\n gTitles: {},\n gDimensions: {},\n gListLevel: 0,\n hashLinkCounts: {},\n langExtensions: langExtensions,\n outputModifiers: outputModifiers,\n converter: this,\n ghCodeBlocks: [],\n metadata: {\n parsed: {},\n raw: '',\n format: ''\n }\n };\n\n // This lets us use ¨ trema as an escape char to avoid md5 hashes\n // The choice of character is arbitrary; anything that isn't\n // magic in Markdown will work.\n text = text.replace(/¨/g, '¨T');\n\n // Replace $ with ¨D\n // RegExp interprets $ as a special character\n // when it's in a replacement string\n text = text.replace(/\\$/g, '¨D');\n\n // Standardize line endings\n text = text.replace(/\\r\\n/g, '\\n'); // DOS to Unix\n text = text.replace(/\\r/g, '\\n'); // Mac to Unix\n\n // Stardardize line spaces\n text = text.replace(/\\u00A0/g, ' ');\n\n if (options.smartIndentationFix) {\n text = rTrimInputText(text);\n }\n\n // Make sure text begins and ends with a couple of newlines:\n text = '\\n\\n' + text + '\\n\\n';\n\n // detab\n text = showdown.subParser('detab')(text, options, globals);\n\n /**\n * Strip any lines consisting only of spaces and tabs.\n * This makes subsequent regexs easier to write, because we can\n * match consecutive blank lines with /\\n+/ instead of something\n * contorted like /[ \\t]*\\n+/\n */\n text = text.replace(/^[ \\t]+$/mg, '');\n\n //run languageExtensions\n showdown.helper.forEach(langExtensions, function (ext) {\n text = showdown.subParser('runExtension')(ext, text, options, globals);\n });\n\n // run the sub parsers\n text = showdown.subParser('metadata')(text, options, globals);\n text = showdown.subParser('hashPreCodeTags')(text, options, globals);\n text = showdown.subParser('githubCodeBlocks')(text, options, globals);\n text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n text = showdown.subParser('hashCodeTags')(text, options, globals);\n text = showdown.subParser('stripLinkDefinitions')(text, options, globals);\n text = showdown.subParser('blockGamut')(text, options, globals);\n text = showdown.subParser('unhashHTMLSpans')(text, options, globals);\n text = showdown.subParser('unescapeSpecialChars')(text, options, globals);\n\n // attacklab: Restore dollar signs\n text = text.replace(/¨D/g, '$$');\n\n // attacklab: Restore tremas\n text = text.replace(/¨T/g, '¨');\n\n // render a complete html document instead of a partial if the option is enabled\n text = showdown.subParser('completeHTMLDocument')(text, options, globals);\n\n // Run output modifiers\n showdown.helper.forEach(outputModifiers, function (ext) {\n text = showdown.subParser('runExtension')(ext, text, options, globals);\n });\n\n // update metadata\n metadata = globals.metadata;\n return text;\n };\n\n /**\n * Converts an HTML string into a markdown string\n * @param src\n * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used.\n * @returns {string}\n */\n this.makeMarkdown = this.makeMd = function (src, HTMLParser) {\n\n // replace \\r\\n with \\n\n src = src.replace(/\\r\\n/g, '\\n');\n src = src.replace(/\\r/g, '\\n'); // old macs\n\n // due to an edge case, we need to find this: > <\n // to prevent removing of non silent white spaces\n // ex: this is sparta\n src = src.replace(/>[ \\t]+¨NBSP;<');\n\n if (!HTMLParser) {\n if (window && window.document) {\n HTMLParser = window.document;\n } else {\n throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM');\n }\n }\n\n var doc = HTMLParser.createElement('div');\n doc.innerHTML = src;\n\n var globals = {\n preList: substitutePreCodeTags(doc)\n };\n\n // remove all newlines and collapse spaces\n clean(doc);\n\n // some stuff, like accidental reference links must now be escaped\n // TODO\n // doc.innerHTML = doc.innerHTML.replace(/\\[[\\S\\t ]]/);\n\n var nodes = doc.childNodes,\n mdDoc = '';\n\n for (var i = 0; i < nodes.length; i++) {\n mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals);\n }\n\n function clean (node) {\n for (var n = 0; n < node.childNodes.length; ++n) {\n var child = node.childNodes[n];\n if (child.nodeType === 3) {\n if (!/\\S/.test(child.nodeValue) && !/^[ ]+$/.test(child.nodeValue)) {\n node.removeChild(child);\n --n;\n } else {\n child.nodeValue = child.nodeValue.split('\\n').join(' ');\n child.nodeValue = child.nodeValue.replace(/(\\s)+/g, '$1');\n }\n } else if (child.nodeType === 1) {\n clean(child);\n }\n }\n }\n\n // find all pre tags and replace contents with placeholder\n // we need this so that we can remove all indentation from html\n // to ease up parsing\n function substitutePreCodeTags (doc) {\n\n var pres = doc.querySelectorAll('pre'),\n presPH = [];\n\n for (var i = 0; i < pres.length; ++i) {\n\n if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') {\n var content = pres[i].firstChild.innerHTML.trim(),\n language = pres[i].firstChild.getAttribute('data-language') || '';\n\n // if data-language attribute is not defined, then we look for class language-*\n if (language === '') {\n var classes = pres[i].firstChild.className.split(' ');\n for (var c = 0; c < classes.length; ++c) {\n var matches = classes[c].match(/^language-(.+)$/);\n if (matches !== null) {\n language = matches[1];\n break;\n }\n }\n }\n\n // unescape html entities in content\n content = showdown.helper.unescapeHTMLEntities(content);\n\n presPH.push(content);\n pres[i].outerHTML = '';\n } else {\n presPH.push(pres[i].innerHTML);\n pres[i].innerHTML = '';\n pres[i].setAttribute('prenum', i.toString());\n }\n }\n return presPH;\n }\n\n return mdDoc;\n };\n\n /**\n * Set an option of this Converter instance\n * @param {string} key\n * @param {*} value\n */\n this.setOption = function (key, value) {\n options[key] = value;\n };\n\n /**\n * Get the option of this Converter instance\n * @param {string} key\n * @returns {*}\n */\n this.getOption = function (key) {\n return options[key];\n };\n\n /**\n * Get the options of this Converter instance\n * @returns {{}}\n */\n this.getOptions = function () {\n return options;\n };\n\n /**\n * Add extension to THIS converter\n * @param {{}} extension\n * @param {string} [name=null]\n */\n this.addExtension = function (extension, name) {\n name = name || null;\n _parseExtension(extension, name);\n };\n\n /**\n * Use a global registered extension with THIS converter\n * @param {string} extensionName Name of the previously registered extension\n */\n this.useExtension = function (extensionName) {\n _parseExtension(extensionName);\n };\n\n /**\n * Set the flavor THIS converter should use\n * @param {string} name\n */\n this.setFlavor = function (name) {\n if (!flavor.hasOwnProperty(name)) {\n throw Error(name + ' flavor was not found');\n }\n var preset = flavor[name];\n setConvFlavor = name;\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n options[option] = preset[option];\n }\n }\n };\n\n /**\n * Get the currently set flavor of this converter\n * @returns {string}\n */\n this.getFlavor = function () {\n return setConvFlavor;\n };\n\n /**\n * Remove an extension from THIS converter.\n * Note: This is a costly operation. It's better to initialize a new converter\n * and specify the extensions you wish to use\n * @param {Array} extension\n */\n this.removeExtension = function (extension) {\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n for (var a = 0; a < extension.length; ++a) {\n var ext = extension[a];\n for (var i = 0; i < langExtensions.length; ++i) {\n if (langExtensions[i] === ext) {\n langExtensions.splice(i, 1);\n }\n }\n for (var ii = 0; ii < outputModifiers.length; ++ii) {\n if (outputModifiers[ii] === ext) {\n outputModifiers.splice(ii, 1);\n }\n }\n }\n };\n\n /**\n * Get all extension of THIS converter\n * @returns {{language: Array, output: Array}}\n */\n this.getAllExtensions = function () {\n return {\n language: langExtensions,\n output: outputModifiers\n };\n };\n\n /**\n * Get the metadata of the previously parsed document\n * @param raw\n * @returns {string|{}}\n */\n this.getMetadata = function (raw) {\n if (raw) {\n return metadata.raw;\n } else {\n return metadata.parsed;\n }\n };\n\n /**\n * Get the metadata format of the previously parsed document\n * @returns {string}\n */\n this.getMetadataFormat = function () {\n return metadata.format;\n };\n\n /**\n * Private: set a single key, value metadata pair\n * @param {string} key\n * @param {string} value\n */\n this._setMetadataPair = function (key, value) {\n metadata.parsed[key] = value;\n };\n\n /**\n * Private: set metadata format\n * @param {string} format\n */\n this._setMetadataFormat = function (format) {\n metadata.format = format;\n };\n\n /**\n * Private: set metadata raw text\n * @param {string} raw\n */\n this._setMetadataRaw = function (raw) {\n metadata.raw = raw;\n };\n};\n\r\n/**\n * Turn Markdown link shortcuts into XHTML tags.\n */\nshowdown.subParser('anchors', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('anchors.before', text, options, globals);\n\n var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) {\n if (showdown.helper.isUndefined(title)) {\n title = '';\n }\n linkId = linkId.toLowerCase();\n\n // Special case for explicit empty url\n if (wholeMatch.search(/\\(? ?(['\"].*['\"])?\\)$/m) > -1) {\n url = '';\n } else if (!url) {\n if (!linkId) {\n // lower-case and turn embedded newlines into spaces\n linkId = linkText.toLowerCase().replace(/ ?\\n/g, ' ');\n }\n url = '#' + linkId;\n\n if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {\n url = globals.gUrls[linkId];\n if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {\n title = globals.gTitles[linkId];\n }\n } else {\n return wholeMatch;\n }\n }\n\n //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance\n url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n\n var result = '';\n\n return result;\n };\n\n // First, handle reference-style links: [link text] [id]\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)] ?(?:\\n *)?\\[(.*?)]()()()()/g, writeAnchorTag);\n\n // Next, inline-style links: [link text](url \"optional title\")\n // cases with crazy urls like ./image/cat1).png\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]?<([^>]*)>(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag);\n\n // normal cases\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]??(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag);\n\n // handle reference-style shortcuts: [link text]\n // These must come last in case you've also got [link test][1]\n // or [link test](/foo)\n text = text.replace(/\\[([^\\[\\]]+)]()()()()()/g, writeAnchorTag);\n\n // Lastly handle GithubMentions if option is enabled\n if (options.ghMentions) {\n text = text.replace(/(^|\\s)(\\\\)?(@([a-z\\d]+(?:[a-z\\d.-]+?[a-z\\d]+)*))/gmi, function (wm, st, escape, mentions, username) {\n if (escape === '\\\\') {\n return st + mentions;\n }\n\n //check if options.ghMentionsLink is a string\n if (!showdown.helper.isString(options.ghMentionsLink)) {\n throw new Error('ghMentionsLink option must be a string');\n }\n var lnk = options.ghMentionsLink.replace(/\\{u}/g, username),\n target = '';\n if (options.openLinksInNewWindow) {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return st + '' + mentions + '';\n });\n }\n\n text = globals.converter._dispatch('anchors.after', text, options, globals);\n return text;\n});\n\r\n// url allowed chars [a-z\\d_.~:/?#[]@!$&'()*+,;=-]\n\nvar simpleURLRegex = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+?\\.[^'\">\\s]+?)()(\\1)?(?=\\s|$)(?![\"<>])/gi,\n simpleURLRegex2 = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+\\.[^'\">\\s]+?)([.!?,()\\[\\]])?(\\1)?(?=\\s|$)(?![\"<>])/gi,\n delimUrlRegex = /()<(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+)()>()/gi,\n simpleMailRegex = /(^|\\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)(?=$|\\s)/gmi,\n delimMailRegex = /<()(?:mailto:)?([-.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)>/gi,\n\n replaceLink = function (options) {\n 'use strict';\n return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {\n link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n var lnkTxt = link,\n append = '',\n target = '',\n lmc = leadingMagicChars || '',\n tmc = trailingMagicChars || '';\n if (/^www\\./i.test(link)) {\n link = link.replace(/^www\\./i, 'http://www.');\n }\n if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {\n append = trailingPunctuation;\n }\n if (options.openLinksInNewWindow) {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return lmc + '' + lnkTxt + '' + append + tmc;\n };\n },\n\n replaceMail = function (options, globals) {\n 'use strict';\n return function (wholeMatch, b, mail) {\n var href = 'mailto:';\n b = b || '';\n mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);\n if (options.encodeEmails) {\n href = showdown.helper.encodeEmailAddress(href + mail);\n mail = showdown.helper.encodeEmailAddress(mail);\n } else {\n href = href + mail;\n }\n return b + '' + mail + '';\n };\n };\n\nshowdown.subParser('autoLinks', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('autoLinks.before', text, options, globals);\n\n text = text.replace(delimUrlRegex, replaceLink(options));\n text = text.replace(delimMailRegex, replaceMail(options, globals));\n\n text = globals.converter._dispatch('autoLinks.after', text, options, globals);\n\n return text;\n});\n\nshowdown.subParser('simplifiedAutoLinks', function (text, options, globals) {\n 'use strict';\n\n if (!options.simplifiedAutoLink) {\n return text;\n }\n\n text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals);\n\n if (options.excludeTrailingPunctuationFromURLs) {\n text = text.replace(simpleURLRegex2, replaceLink(options));\n } else {\n text = text.replace(simpleURLRegex, replaceLink(options));\n }\n text = text.replace(simpleMailRegex, replaceMail(options, globals));\n\n text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * These are all the transformations that form block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('blockGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('blockGamut.before', text, options, globals);\n\n // we parse blockquotes first so that we can have headings and hrs\n // inside blockquotes\n text = showdown.subParser('blockQuotes')(text, options, globals);\n text = showdown.subParser('headers')(text, options, globals);\n\n // Do Horizontal Rules:\n text = showdown.subParser('horizontalRule')(text, options, globals);\n\n text = showdown.subParser('lists')(text, options, globals);\n text = showdown.subParser('codeBlocks')(text, options, globals);\n text = showdown.subParser('tables')(text, options, globals);\n\n // We already ran _HashHTMLBlocks() before, in Markdown(), but that\n // was to escape raw HTML in the original Markdown source. This time,\n // we're escaping the markup we've just created, so that we don't wrap\n //

    tags around block-level tags.\n text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n text = showdown.subParser('paragraphs')(text, options, globals);\n\n text = globals.converter._dispatch('blockGamut.after', text, options, globals);\n\n return text;\n});\n\r\nshowdown.subParser('blockQuotes', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('blockQuotes.before', text, options, globals);\n\n // add a couple extra lines after the text and endtext mark\n text = text + '\\n\\n';\n\n var rgx = /(^ {0,3}>[ \\t]?.+\\n(.+\\n)*\\n*)+/gm;\n\n if (options.splitAdjacentBlockquotes) {\n rgx = /^ {0,3}>[\\s\\S]*?(?:\\n\\n)/gm;\n }\n\n text = text.replace(rgx, function (bq) {\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n bq = bq.replace(/^[ \\t]*>[ \\t]?/gm, ''); // trim one level of quoting\n\n // attacklab: clean up hack\n bq = bq.replace(/¨0/g, '');\n\n bq = bq.replace(/^[ \\t]+$/gm, ''); // trim whitespace-only lines\n bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);\n bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse\n\n bq = bq.replace(/(^|\\n)/g, '$1 ');\n // These leading spaces screw with

     content, so we need to fix that:\n    bq = bq.replace(/(\\s*
    [^\\r]+?<\\/pre>)/gm, function (wholeMatch, m1) {\n      var pre = m1;\n      // attacklab: hack around Konqueror 3.5.4 bug:\n      pre = pre.replace(/^  /mg, '¨0');\n      pre = pre.replace(/¨0/g, '');\n      return pre;\n    });\n\n    return showdown.subParser('hashBlock')('
    \\n' + bq + '\\n
    ', options, globals);\n });\n\n text = globals.converter._dispatch('blockQuotes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Process Markdown `
    ` blocks.\n */\nshowdown.subParser('codeBlocks', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);\n\n  // sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n  text += '¨0';\n\n  var pattern = /(?:\\n\\n|^)((?:(?:[ ]{4}|\\t).*\\n+)+)(\\n*[ ]{0,3}[^ \\t\\n]|(?=¨0))/g;\n  text = text.replace(pattern, function (wholeMatch, m1, m2) {\n    var codeblock = m1,\n        nextChar = m2,\n        end = '\\n';\n\n    codeblock = showdown.subParser('outdent')(codeblock, options, globals);\n    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n    codeblock = showdown.subParser('detab')(codeblock, options, globals);\n    codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n    codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing newlines\n\n    if (options.omitExtraWLInCodeBlocks) {\n      end = '';\n    }\n\n    codeblock = '
    ' + codeblock + end + '
    ';\n\n return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;\n });\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n\n text = globals.converter._dispatch('codeBlocks.after', text, options, globals);\n return text;\n});\n\r\n/**\n *\n * * Backtick quotes are used for spans.\n *\n * * You can use multiple backticks as the delimiters if you want to\n * include literal backticks in the code span. So, this input:\n *\n * Just type ``foo `bar` baz`` at the prompt.\n *\n * Will translate to:\n *\n *

    Just type foo `bar` baz at the prompt.

    \n *\n * There's no arbitrary limit to the number of backticks you\n * can use as delimters. If you need three consecutive backticks\n * in your code, use four for delimiters, etc.\n *\n * * You can use spaces to get literal backticks at the edges:\n *\n * ... type `` `bar` `` ...\n *\n * Turns to:\n *\n * ... type `bar` ...\n */\nshowdown.subParser('codeSpans', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('codeSpans.before', text, options, globals);\n\n if (typeof (text) === 'undefined') {\n text = '';\n }\n text = text.replace(/(^|[^\\\\])(`+)([^\\r]*?[^`])\\2(?!`)/gm,\n function (wholeMatch, m1, m2, m3) {\n var c = m3;\n c = c.replace(/^([ \\t]*)/g, '');\t// leading whitespace\n c = c.replace(/[ \\t]*$/g, '');\t// trailing whitespace\n c = showdown.subParser('encodeCode')(c, options, globals);\n c = m1 + '' + c + '';\n c = showdown.subParser('hashHTMLSpans')(c, options, globals);\n return c;\n }\n );\n\n text = globals.converter._dispatch('codeSpans.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Create a full HTML document from the processed markdown\n */\nshowdown.subParser('completeHTMLDocument', function (text, options, globals) {\n 'use strict';\n\n if (!options.completeHTMLDocument) {\n return text;\n }\n\n text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals);\n\n var doctype = 'html',\n doctypeParsed = '\\n',\n title = '',\n charset = '\\n',\n lang = '',\n metadata = '';\n\n if (typeof globals.metadata.parsed.doctype !== 'undefined') {\n doctypeParsed = '\\n';\n doctype = globals.metadata.parsed.doctype.toString().toLowerCase();\n if (doctype === 'html' || doctype === 'html5') {\n charset = '';\n }\n }\n\n for (var meta in globals.metadata.parsed) {\n if (globals.metadata.parsed.hasOwnProperty(meta)) {\n switch (meta.toLowerCase()) {\n case 'doctype':\n break;\n\n case 'title':\n title = '' + globals.metadata.parsed.title + '\\n';\n break;\n\n case 'charset':\n if (doctype === 'html' || doctype === 'html5') {\n charset = '\\n';\n } else {\n charset = '\\n';\n }\n break;\n\n case 'language':\n case 'lang':\n lang = ' lang=\"' + globals.metadata.parsed[meta] + '\"';\n metadata += '\\n';\n break;\n\n default:\n metadata += '\\n';\n }\n }\n }\n\n text = doctypeParsed + '\\n\\n' + title + charset + metadata + '\\n\\n' + text.trim() + '\\n\\n';\n\n text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Convert all tabs to spaces\n */\nshowdown.subParser('detab', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('detab.before', text, options, globals);\n\n // expand first n-1 tabs\n text = text.replace(/\\t(?=\\t)/g, ' '); // g_tab_width\n\n // replace the nth with two sentinels\n text = text.replace(/\\t/g, '¨A¨B');\n\n // use the sentinel to anchor our regex so it doesn't explode\n text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {\n var leadingText = m1,\n numSpaces = 4 - leadingText.length % 4; // g_tab_width\n\n // there *must* be a better way to do this:\n for (var i = 0; i < numSpaces; i++) {\n leadingText += ' ';\n }\n\n return leadingText;\n });\n\n // clean up sentinels\n text = text.replace(/¨A/g, ' '); // g_tab_width\n text = text.replace(/¨B/g, '');\n\n text = globals.converter._dispatch('detab.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('ellipsis', function (text, options, globals) {\n 'use strict';\n\n if (!options.ellipsis) {\n return text;\n }\n\n text = globals.converter._dispatch('ellipsis.before', text, options, globals);\n\n text = text.replace(/\\.\\.\\./g, '…');\n\n text = globals.converter._dispatch('ellipsis.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Turn emoji codes into emojis\n *\n * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis\n */\nshowdown.subParser('emoji', function (text, options, globals) {\n 'use strict';\n\n if (!options.emoji) {\n return text;\n }\n\n text = globals.converter._dispatch('emoji.before', text, options, globals);\n\n var emojiRgx = /:([\\S]+?):/g;\n\n text = text.replace(emojiRgx, function (wm, emojiCode) {\n if (showdown.helper.emojis.hasOwnProperty(emojiCode)) {\n return showdown.helper.emojis[emojiCode];\n }\n return wm;\n });\n\n text = globals.converter._dispatch('emoji.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Smart processing for ampersands and angle brackets that need to be encoded.\n */\nshowdown.subParser('encodeAmpsAndAngles', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals);\n\n // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:\n // http://bumppo.net/projects/amputator/\n text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\\w+);)/g, '&');\n\n // Encode naked <'s\n text = text.replace(/<(?![a-z\\/?$!])/gi, '<');\n\n // Encode <\n text = text.replace(/\n text = text.replace(/>/g, '>');\n\n text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Returns the string, with after processing the following backslash escape sequences.\n *\n * attacklab: The polite way to do this is with the new escapeCharacters() function:\n *\n * text = escapeCharacters(text,\"\\\\\",true);\n * text = escapeCharacters(text,\"`*_{}[]()>#+-.!\",true);\n *\n * ...but we're sidestepping its use of the (slow) RegExp constructor\n * as an optimization for Firefox. This function gets called a LOT.\n */\nshowdown.subParser('encodeBackslashEscapes', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);\n\n text = text.replace(/\\\\(\\\\)/g, showdown.helper.escapeCharactersCallback);\n text = text.replace(/\\\\([`*_{}\\[\\]()>#+.!~=|:-])/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Encode/escape certain characters inside Markdown code runs.\n * The point is that in code, these characters are literals,\n * and lose their special Markdown meanings.\n */\nshowdown.subParser('encodeCode', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('encodeCode.before', text, options, globals);\n\n // Encode all ampersands; HTML entities are not\n // entities within a Markdown code span.\n text = text\n .replace(/&/g, '&')\n // Do the angle bracket song and dance:\n .replace(//g, '>')\n // Now, escape characters that are magic in Markdown:\n .replace(/([*_{}\\[\\]\\\\=~-])/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('encodeCode.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Within tags -- meaning between < and > -- encode [\\ ` * _ ~ =] so they\n * don't conflict with their use in Markdown for code, italics and strong.\n */\nshowdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals);\n\n // Build a regex to find HTML tags.\n var tags = /<\\/?[a-z\\d_:-]+(?:[\\s]+[\\s\\S]+?)?>/gi,\n comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;\n\n text = text.replace(tags, function (wholeMatch) {\n return wholeMatch\n .replace(/(.)<\\/?code>(?=.)/g, '$1`')\n .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n });\n\n text = text.replace(comments, function (wholeMatch) {\n return wholeMatch\n .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n });\n\n text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Handle github codeblocks prior to running HashHTML so that\n * HTML contained within the codeblock gets escaped properly\n * Example:\n * ```ruby\n * def hello_world(x)\n * puts \"Hello, #{x}\"\n * end\n * ```\n */\nshowdown.subParser('githubCodeBlocks', function (text, options, globals) {\n 'use strict';\n\n // early exit if option is not enabled\n if (!options.ghCodeBlocks) {\n return text;\n }\n\n text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);\n\n text += '¨0';\n\n text = text.replace(/(?:^|\\n)(?: {0,3})(```+|~~~+)(?: *)([^\\s`~]*)\\n([\\s\\S]*?)\\n(?: {0,3})\\1/g, function (wholeMatch, delim, language, codeblock) {\n var end = (options.omitExtraWLInCodeBlocks) ? '' : '\\n';\n\n // First parse the github code block\n codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n codeblock = showdown.subParser('detab')(codeblock, options, globals);\n codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing whitespace\n\n codeblock = '
    ' + codeblock + end + '
    ';\n\n codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);\n\n // Since GHCodeblocks can be false positives, we need to\n // store the primitive text and the parsed text in a global var,\n // and then return a token\n return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n });\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);\n});\n\r\nshowdown.subParser('hashBlock', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashBlock.before', text, options, globals);\n text = text.replace(/(^\\n+|\\n+$)/g, '');\n text = '\\n\\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\\n\\n';\n text = globals.converter._dispatch('hashBlock.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash and escape elements that should not be parsed as markdown\n */\nshowdown.subParser('hashCodeTags', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashCodeTags.before', text, options, globals);\n\n var repFunc = function (wholeMatch, match, left, right) {\n var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C';\n };\n\n // Hash naked \n text = showdown.helper.replaceRecursiveRegExp(text, repFunc, ']*>', '', 'gim');\n\n text = globals.converter._dispatch('hashCodeTags.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('hashElement', function (text, options, globals) {\n 'use strict';\n\n return function (wholeMatch, m1) {\n var blockText = m1;\n\n // Undo double lines\n blockText = blockText.replace(/\\n\\n/g, '\\n');\n blockText = blockText.replace(/^\\n/, '');\n\n // strip trailing blank lines\n blockText = blockText.replace(/\\n+$/g, '');\n\n // Replace the element text with a marker (\"¨KxK\" where x is its key)\n blockText = '\\n\\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\\n\\n';\n\n return blockText;\n };\n});\n\r\nshowdown.subParser('hashHTMLBlocks', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals);\n\n var blockTags = [\n 'pre',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'blockquote',\n 'table',\n 'dl',\n 'ol',\n 'ul',\n 'script',\n 'noscript',\n 'form',\n 'fieldset',\n 'iframe',\n 'math',\n 'style',\n 'section',\n 'header',\n 'footer',\n 'nav',\n 'article',\n 'aside',\n 'address',\n 'audio',\n 'canvas',\n 'figure',\n 'hgroup',\n 'output',\n 'video',\n 'p'\n ],\n repFunc = function (wholeMatch, match, left, right) {\n var txt = wholeMatch;\n // check if this html element is marked as markdown\n // if so, it's contents should be parsed as markdown\n if (left.search(/\\bmarkdown\\b/) !== -1) {\n txt = left + globals.converter.makeHtml(match) + right;\n }\n return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n };\n\n if (options.backslashEscapesHTMLTags) {\n // encode backslash escaped HTML tags\n text = text.replace(/\\\\<(\\/?[^>]+?)>/g, function (wm, inside) {\n return '<' + inside + '>';\n });\n }\n\n // hash HTML Blocks\n for (var i = 0; i < blockTags.length; ++i) {\n\n var opTagPos,\n rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\\\b[^>]*>)', 'im'),\n patLeft = '<' + blockTags[i] + '\\\\b[^>]*>',\n patRight = '';\n // 1. Look for the first position of the first opening HTML tag in the text\n while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) {\n\n // if the HTML tag is \\ escaped, we need to escape it and break\n\n\n //2. Split the text in that position\n var subTexts = showdown.helper.splitAtIndex(text, opTagPos),\n //3. Match recursively\n newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');\n\n // prevent an infinite loop\n if (newSubText1 === subTexts[1]) {\n break;\n }\n text = subTexts[0].concat(newSubText1);\n }\n }\n // HR SPECIAL CASE\n text = text.replace(/(\\n {0,3}(<(hr)\\b([^<>])*?\\/?>)[ \\t]*(?=\\n{2,}))/g,\n showdown.subParser('hashElement')(text, options, globals));\n\n // Special case for standalone HTML comments\n text = showdown.helper.replaceRecursiveRegExp(text, function (txt) {\n return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n }, '^ {0,3}', 'gm');\n\n // PHP and ASP-style processor instructions ( and <%...%>)\n text = text.replace(/(?:\\n\\n)( {0,3}(?:<([?%])[^\\r]*?\\2>)[ \\t]*(?=\\n{2,}))/g,\n showdown.subParser('hashElement')(text, options, globals));\n\n text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash span elements that should not be parsed as markdown\n */\nshowdown.subParser('hashHTMLSpans', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals);\n\n function hashHTMLSpan (html) {\n return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';\n }\n\n // Hash Self Closing tags\n text = text.replace(/<[^>]+?\\/>/gi, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash tags without properties\n text = text.replace(/<([^>]+?)>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash tags with properties\n text = text.replace(/<([^>]+?)\\s[^>]+?>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash self closing tags without />\n text = text.replace(/<[^>]+?>/gi, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n /*showdown.helper.matchRecursiveRegExp(text, ']*>', '', 'gi');*/\n\n text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals);\n return text;\n});\n\n/**\n * Unhash HTML spans\n */\nshowdown.subParser('unhashHTMLSpans', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals);\n\n for (var i = 0; i < globals.gHtmlSpans.length; ++i) {\n var repText = globals.gHtmlSpans[i],\n // limiter to prevent infinite loop (assume 10 as limit for recurse)\n limit = 0;\n\n while (/¨C(\\d+)C/.test(repText)) {\n var num = RegExp.$1;\n repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]);\n if (limit === 10) {\n console.error('maximum nesting of 10 spans reached!!!');\n break;\n }\n ++limit;\n }\n text = text.replace('¨C' + i + 'C', repText);\n }\n\n text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash and escape
     elements that should not be parsed as markdown\n */\nshowdown.subParser('hashPreCodeTags', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);\n\n  var repFunc = function (wholeMatch, match, left, right) {\n    // encode html entities\n    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n    return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n  };\n\n  // Hash 
    \n  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}]*>\\\\s*]*>', '^ {0,3}\\\\s*
    ', 'gim');\n\n text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('headers', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('headers.before', text, options, globals);\n\n var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),\n\n // Set text-style headers:\n //\tHeader 1\n //\t========\n //\n //\tHeader 2\n //\t--------\n //\n setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n={2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n=+[ \\t]*\\n+/gm,\n setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n-{2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n-+[ \\t]*\\n+/gm;\n\n text = text.replace(setextRegexH1, function (wholeMatch, m1) {\n\n var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n hLevel = headerLevelStart,\n hashBlock = '' + spanGamut + '';\n return showdown.subParser('hashBlock')(hashBlock, options, globals);\n });\n\n text = text.replace(setextRegexH2, function (matchFound, m1) {\n var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n hLevel = headerLevelStart + 1,\n hashBlock = '' + spanGamut + '';\n return showdown.subParser('hashBlock')(hashBlock, options, globals);\n });\n\n // atx-style headers:\n // # Header 1\n // ## Header 2\n // ## Header 2 with closing hashes ##\n // ...\n // ###### Header 6\n //\n var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \\t]+(.+?)[ \\t]*#*\\n+/gm : /^(#{1,6})[ \\t]*(.+?)[ \\t]*#*\\n+/gm;\n\n text = text.replace(atxStyle, function (wholeMatch, m1, m2) {\n var hText = m2;\n if (options.customizedHeaderId) {\n hText = m2.replace(/\\s?\\{([^{]+?)}\\s*$/, '');\n }\n\n var span = showdown.subParser('spanGamut')(hText, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m2) + '\"',\n hLevel = headerLevelStart - 1 + m1.length,\n header = '' + span + '';\n\n return showdown.subParser('hashBlock')(header, options, globals);\n });\n\n function headerId (m) {\n var title,\n prefix;\n\n // It is separate from other options to allow combining prefix and customized\n if (options.customizedHeaderId) {\n var match = m.match(/\\{([^{]+?)}\\s*$/);\n if (match && match[1]) {\n m = match[1];\n }\n }\n\n title = m;\n\n // Prefix id to prevent causing inadvertent pre-existing style matches.\n if (showdown.helper.isString(options.prefixHeaderId)) {\n prefix = options.prefixHeaderId;\n } else if (options.prefixHeaderId === true) {\n prefix = 'section-';\n } else {\n prefix = '';\n }\n\n if (!options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n\n if (options.ghCompatibleHeaderId) {\n title = title\n .replace(/ /g, '-')\n // replace previously escaped chars (&, ¨ and $)\n .replace(/&/g, '')\n .replace(/¨T/g, '')\n .replace(/¨D/g, '')\n // replace rest of the chars (&~$ are repeated as they might have been escaped)\n // borrowed from github's redcarpet (some they should produce similar results)\n .replace(/[&+$,\\/:;=?@\"#{}|^¨~\\[\\]`\\\\*)(%.!'<>]/g, '')\n .toLowerCase();\n } else if (options.rawHeaderId) {\n title = title\n .replace(/ /g, '-')\n // replace previously escaped chars (&, ¨ and $)\n .replace(/&/g, '&')\n .replace(/¨T/g, '¨')\n .replace(/¨D/g, '$')\n // replace \" and '\n .replace(/[\"']/g, '-')\n .toLowerCase();\n } else {\n title = title\n .replace(/[^\\w]/g, '')\n .toLowerCase();\n }\n\n if (options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n\n if (globals.hashLinkCounts[title]) {\n title = title + '-' + (globals.hashLinkCounts[title]++);\n } else {\n globals.hashLinkCounts[title] = 1;\n }\n return title;\n }\n\n text = globals.converter._dispatch('headers.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Turn Markdown link shortcuts into XHTML tags.\n */\nshowdown.subParser('horizontalRule', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('horizontalRule.before', text, options, globals);\n\n var key = showdown.subParser('hashBlock')('
    ', options, globals);\n text = text.replace(/^ {0,2}( ?-){3,}[ \\t]*$/gm, key);\n text = text.replace(/^ {0,2}( ?\\*){3,}[ \\t]*$/gm, key);\n text = text.replace(/^ {0,2}( ?_){3,}[ \\t]*$/gm, key);\n\n text = globals.converter._dispatch('horizontalRule.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Turn Markdown image shortcuts into tags.\n */\nshowdown.subParser('images', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('images.before', text, options, globals);\n\n var inlineRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]??(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n crazyRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]?<([^>]*)>(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:(?:([\"'])([^\"]*?)\\6))?[ \\t]?\\)/g,\n base64RegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]??(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n referenceRegExp = /!\\[([^\\]]*?)] ?(?:\\n *)?\\[([\\s\\S]*?)]()()()()()/g,\n refShortcutRegExp = /!\\[([^\\[\\]]+)]()()()()()/g;\n\n function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) {\n url = url.replace(/\\s/g, '');\n return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title);\n }\n\n function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {\n\n var gUrls = globals.gUrls,\n gTitles = globals.gTitles,\n gDims = globals.gDimensions;\n\n linkId = linkId.toLowerCase();\n\n if (!title) {\n title = '';\n }\n // Special case for explicit empty url\n if (wholeMatch.search(/\\(? ?(['\"].*['\"])?\\)$/m) > -1) {\n url = '';\n\n } else if (url === '' || url === null) {\n if (linkId === '' || linkId === null) {\n // lower-case and turn embedded newlines into spaces\n linkId = altText.toLowerCase().replace(/ ?\\n/g, ' ');\n }\n url = '#' + linkId;\n\n if (!showdown.helper.isUndefined(gUrls[linkId])) {\n url = gUrls[linkId];\n if (!showdown.helper.isUndefined(gTitles[linkId])) {\n title = gTitles[linkId];\n }\n if (!showdown.helper.isUndefined(gDims[linkId])) {\n width = gDims[linkId].width;\n height = gDims[linkId].height;\n }\n } else {\n return wholeMatch;\n }\n }\n\n altText = altText\n .replace(/\"/g, '"')\n //altText = showdown.helper.escapeCharacters(altText, '*_', false);\n .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n //url = showdown.helper.escapeCharacters(url, '*_', false);\n url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n var result = '\"'x \"optional title\")\n\n // base64 encoded images\n text = text.replace(base64RegExp, writeImageTagBase64);\n\n // cases with crazy urls like ./image/cat1).png\n text = text.replace(crazyRegExp, writeImageTag);\n\n // normal cases\n text = text.replace(inlineRegExp, writeImageTag);\n\n // handle reference-style shortcuts: ![img text]\n text = text.replace(refShortcutRegExp, writeImageTag);\n\n text = globals.converter._dispatch('images.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('italicsAndBold', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);\n\n // it's faster to have 3 separate regexes for each case than have just one\n // because of backtracing, in some cases, it could lead to an exponential effect\n // called \"catastrophic backtrace\". Ominous!\n\n function parseInside (txt, left, right) {\n /*\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n */\n return left + txt + right;\n }\n\n // Parse underscores\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n text = text.replace(/\\b_(\\S[\\s\\S]*?)_\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/_([^\\s_][\\s\\S]*?)_/g, function (wm, m) {\n // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it)\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n }\n\n // Now parse asterisks\n if (options.literalMidWordAsterisks) {\n text = text.replace(/([^*]|^)\\B\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n text = text.replace(/([^*]|^)\\B\\*\\*(\\S[\\s\\S]*?)\\*\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n text = text.replace(/([^*]|^)\\B\\*(\\S[\\s\\S]*?)\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n } else {\n text = text.replace(/\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/\\*\\*(\\S[\\s\\S]*?)\\*\\*/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/\\*([^\\s*][\\s\\S]*?)\\*/g, function (wm, m) {\n // !/^\\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it)\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n }\n\n\n text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Form HTML ordered (numbered) and unordered (bulleted) lists.\n */\nshowdown.subParser('lists', function (text, options, globals) {\n 'use strict';\n\n /**\n * Process the contents of a single ordered or unordered list, splitting it\n * into individual list items.\n * @param {string} listStr\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function processListItems (listStr, trimTrailing) {\n // The $g_list_level global keeps track of when we're inside a list.\n // Each time we enter a list, we increment it; when we leave a list,\n // we decrement. If it's zero, we're not in a list anymore.\n //\n // We do this because when we're not inside a list, we want to treat\n // something like this:\n //\n // I recommend upgrading to version\n // 8. Oops, now this line is treated\n // as a sub-list.\n //\n // As a single paragraph, despite the fact that the second line starts\n // with a digit-period-space sequence.\n //\n // Whereas when we're inside a list (or sub-list), that line will be\n // treated as the start of a sub-list. What a kludge, huh? This is\n // an aspect of Markdown's syntax that's hard to parse perfectly\n // without resorting to mind-reading. Perhaps the solution is to\n // change the syntax rules such that sub-lists must start with a\n // starting cardinal number; e.g. \"1.\" or \"a.\".\n globals.gListLevel++;\n\n // trim trailing blank lines:\n listStr = listStr.replace(/\\n{2,}$/, '\\n');\n\n // attacklab: add sentinel to emulate \\z\n listStr += '¨0';\n\n var rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0| {0,3}([*+-]|\\d+[.])[ \\t]+))/gm,\n isParagraphed = (/\\n[ \\t]*\\n(?!¨0)/.test(listStr));\n\n // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation,\n // which is a syntax breaking change\n // activating this option reverts to old behavior\n if (options.disableForced4SpacesIndentedSublists) {\n rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0|\\2([*+-]|\\d+[.])[ \\t]+))/gm;\n }\n\n listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {\n checked = (checked && checked.trim() !== '');\n\n var item = showdown.subParser('outdent')(m4, options, globals),\n bulletStyle = '';\n\n // Support for github tasklists\n if (taskbtn && options.tasklists) {\n bulletStyle = ' class=\"task-list-item\" style=\"list-style-type: none;\"';\n item = item.replace(/^[ \\t]*\\[(x|X| )?]/m, function () {\n var otp = '
  • a
  • \n // instead of:\n //
    • - - a
    \n // So, to prevent it, we will put a marker (¨A)in the beginning of the line\n // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser\n item = item.replace(/^([-*+]|\\d\\.)[ \\t]+[\\S\\n ]*/g, function (wm2) {\n return '¨A' + wm2;\n });\n\n // m1 - Leading line or\n // Has a double return (multi paragraph) or\n // Has sublist\n if (m1 || (item.search(/\\n{2,}/) > -1)) {\n item = showdown.subParser('githubCodeBlocks')(item, options, globals);\n item = showdown.subParser('blockGamut')(item, options, globals);\n } else {\n // Recursion for sub-lists:\n item = showdown.subParser('lists')(item, options, globals);\n item = item.replace(/\\n$/, ''); // chomp(item)\n item = showdown.subParser('hashHTMLBlocks')(item, options, globals);\n\n // Colapse double linebreaks\n item = item.replace(/\\n\\n+/g, '\\n\\n');\n if (isParagraphed) {\n item = showdown.subParser('paragraphs')(item, options, globals);\n } else {\n item = showdown.subParser('spanGamut')(item, options, globals);\n }\n }\n\n // now we need to remove the marker (¨A)\n item = item.replace('¨A', '');\n // we can finally wrap the line in list item tags\n item = '' + item + '\\n';\n\n return item;\n });\n\n // attacklab: strip sentinel\n listStr = listStr.replace(/¨0/g, '');\n\n globals.gListLevel--;\n\n if (trimTrailing) {\n listStr = listStr.replace(/\\s+$/, '');\n }\n\n return listStr;\n }\n\n function styleStartNumber (list, listType) {\n // check if ol and starts by a number different than 1\n if (listType === 'ol') {\n var res = list.match(/^ *(\\d+)\\./);\n if (res && res[1] !== '1') {\n return ' start=\"' + res[1] + '\"';\n }\n }\n return '';\n }\n\n /**\n * Check and parse consecutive lists (better fix for issue #142)\n * @param {string} list\n * @param {string} listType\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function parseConsecutiveLists (list, listType, trimTrailing) {\n // check if we caught 2 or more consecutive lists by mistake\n // we use the counterRgx, meaning if listType is UL we look for OL and vice versa\n var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\\d+\\.[ \\t]/gm : /^ {0,3}\\d+\\.[ \\t]/gm,\n ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \\t]/gm : /^ {0,3}[*+-][ \\t]/gm,\n counterRxg = (listType === 'ul') ? olRgx : ulRgx,\n result = '';\n\n if (list.search(counterRxg) !== -1) {\n (function parseCL (txt) {\n var pos = txt.search(counterRxg),\n style = styleStartNumber(list, listType);\n if (pos !== -1) {\n // slice\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '\\n';\n\n // invert counterType and listType\n listType = (listType === 'ul') ? 'ol' : 'ul';\n counterRxg = (listType === 'ul') ? olRgx : ulRgx;\n\n //recurse\n parseCL(txt.slice(pos));\n } else {\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt, !!trimTrailing) + '\\n';\n }\n })(list);\n } else {\n var style = styleStartNumber(list, listType);\n result = '\\n\\n<' + listType + style + '>\\n' + processListItems(list, !!trimTrailing) + '\\n';\n }\n\n return result;\n }\n\n /** Start of list parsing **/\n text = globals.converter._dispatch('lists.before', text, options, globals);\n // add sentinel to hack around khtml/safari bug:\n // http://bugs.webkit.org/show_bug.cgi?id=11231\n text += '¨0';\n\n if (globals.gListLevel) {\n text = text.replace(/^(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, list, m2) {\n var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, true);\n }\n );\n } else {\n text = text.replace(/(\\n\\n|^\\n?)(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, m1, list, m3) {\n var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, false);\n }\n );\n }\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n text = globals.converter._dispatch('lists.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Parse metadata at the top of the document\n */\nshowdown.subParser('metadata', function (text, options, globals) {\n 'use strict';\n\n if (!options.metadata) {\n return text;\n }\n\n text = globals.converter._dispatch('metadata.before', text, options, globals);\n\n function parseMetadataContents (content) {\n // raw is raw so it's not changed in any way\n globals.metadata.raw = content;\n\n // escape chars forbidden in html attributes\n // double quotes\n content = content\n // ampersand first\n .replace(/&/g, '&')\n // double quotes\n .replace(/\"/g, '"');\n\n content = content.replace(/\\n {4}/g, ' ');\n content.replace(/^([\\S ]+): +([\\s\\S]+?)$/gm, function (wm, key, value) {\n globals.metadata.parsed[key] = value;\n return '';\n });\n }\n\n text = text.replace(/^\\s*«««+(\\S*?)\\n([\\s\\S]+?)\\n»»»+\\n/, function (wholematch, format, content) {\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/^\\s*---+(\\S*?)\\n([\\s\\S]+?)\\n---+\\n/, function (wholematch, format, content) {\n if (format) {\n globals.metadata.format = format;\n }\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/¨M/g, '');\n\n text = globals.converter._dispatch('metadata.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Remove one level of line-leading tabs or spaces\n */\nshowdown.subParser('outdent', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('outdent.before', text, options, globals);\n\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n text = text.replace(/^(\\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width\n\n // attacklab: clean up hack\n text = text.replace(/¨0/g, '');\n\n text = globals.converter._dispatch('outdent.after', text, options, globals);\n return text;\n});\n\r\n/**\n *\n */\nshowdown.subParser('paragraphs', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('paragraphs.before', text, options, globals);\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n\n var grafs = text.split(/\\n{2,}/g),\n grafsOut = [],\n end = grafs.length; // Wrap

    tags\n\n for (var i = 0; i < end; i++) {\n var str = grafs[i];\n // if this is an HTML marker, copy it\n if (str.search(/¨(K|G)(\\d+)\\1/g) >= 0) {\n grafsOut.push(str);\n\n // test for presence of characters to prevent empty lines being parsed\n // as paragraphs (resulting in undesired extra empty paragraphs)\n } else if (str.search(/\\S/) >= 0) {\n str = showdown.subParser('spanGamut')(str, options, globals);\n str = str.replace(/^([ \\t]*)/g, '

    ');\n str += '

    ';\n grafsOut.push(str);\n }\n }\n\n /** Unhashify HTML blocks */\n end = grafsOut.length;\n for (i = 0; i < end; i++) {\n var blockText = '',\n grafsOutIt = grafsOut[i],\n codeFlag = false;\n // if this is a marker for an html block...\n // use RegExp.test instead of string.search because of QML bug\n while (/¨(K|G)(\\d+)\\1/.test(grafsOutIt)) {\n var delim = RegExp.$1,\n num = RegExp.$2;\n\n if (delim === 'K') {\n blockText = globals.gHtmlBlocks[num];\n } else {\n // we need to check if ghBlock is a false positive\n if (codeFlag) {\n // use encoded version of all text\n blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);\n } else {\n blockText = globals.ghCodeBlocks[num].codeblock;\n }\n }\n blockText = blockText.replace(/\\$/g, '$$$$'); // Escape any dollar signs\n\n grafsOutIt = grafsOutIt.replace(/(\\n\\n)?¨(K|G)\\d+\\2(\\n\\n)?/, blockText);\n // Check if grafsOutIt is a pre->code\n if (/^]*>\\s*]*>/.test(grafsOutIt)) {\n codeFlag = true;\n }\n }\n grafsOut[i] = grafsOutIt;\n }\n text = grafsOut.join('\\n');\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n return globals.converter._dispatch('paragraphs.after', text, options, globals);\n});\n\r\n/**\n * Run extension\n */\nshowdown.subParser('runExtension', function (ext, text, options, globals) {\n 'use strict';\n\n if (ext.filter) {\n text = ext.filter(text, globals.converter, options);\n\n } else if (ext.regex) {\n // TODO remove this when old extension loading mechanism is deprecated\n var re = ext.regex;\n if (!(re instanceof RegExp)) {\n re = new RegExp(re, 'g');\n }\n text = text.replace(re, ext.replace);\n }\n\n return text;\n});\n\r\n/**\n * These are all the transformations that occur *within* block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('spanGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('spanGamut.before', text, options, globals);\n text = showdown.subParser('codeSpans')(text, options, globals);\n text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);\n text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);\n\n // Process anchor and image tags. Images must come first,\n // because ![foo][f] looks like an anchor.\n text = showdown.subParser('images')(text, options, globals);\n text = showdown.subParser('anchors')(text, options, globals);\n\n // Make links out of things like ``\n // Must come after anchors, because you can use < and >\n // delimiters in inline links like [this]().\n text = showdown.subParser('autoLinks')(text, options, globals);\n text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);\n text = showdown.subParser('emoji')(text, options, globals);\n text = showdown.subParser('underline')(text, options, globals);\n text = showdown.subParser('italicsAndBold')(text, options, globals);\n text = showdown.subParser('strikethrough')(text, options, globals);\n text = showdown.subParser('ellipsis')(text, options, globals);\n\n // we need to hash HTML tags inside spans\n text = showdown.subParser('hashHTMLSpans')(text, options, globals);\n\n // now we encode amps and angles\n text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);\n\n // Do hard breaks\n if (options.simpleLineBreaks) {\n // GFM style hard breaks\n // only add line breaks if the text does not contain a block (special case for lists)\n if (!/\\n\\n¨K/.test(text)) {\n text = text.replace(/\\n+/g, '
    \\n');\n }\n } else {\n // Vanilla hard breaks\n text = text.replace(/ +\\n/g, '
    \\n');\n }\n\n text = globals.converter._dispatch('spanGamut.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('strikethrough', function (text, options, globals) {\n 'use strict';\n\n function parseInside (txt) {\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n return '' + txt + '';\n }\n\n if (options.strikethrough) {\n text = globals.converter._dispatch('strikethrough.before', text, options, globals);\n text = text.replace(/(?:~){2}([\\s\\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });\n text = globals.converter._dispatch('strikethrough.after', text, options, globals);\n }\n\n return text;\n});\n\r\n/**\n * Strips link definitions from text, stores the URLs and titles in\n * hash references.\n * Link defs are in the form: ^[id]: url \"optional title\"\n */\nshowdown.subParser('stripLinkDefinitions', function (text, options, globals) {\n 'use strict';\n\n var regex = /^ {0,3}\\[([^\\]]+)]:[ \\t]*\\n?[ \\t]*\\s]+)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n+|(?=¨0))/gm,\n base64Regex = /^ {0,3}\\[([^\\]]+)]:[ \\t]*\\n?[ \\t]*?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n\\n|(?=¨0)|(?=\\n\\[))/gm;\n\n // attacklab: sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n text += '¨0';\n\n var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {\n\n // if there aren't two instances of linkId it must not be a reference link so back out\n linkId = linkId.toLowerCase();\n if (text.toLowerCase().split(linkId).length - 1 < 2) {\n return wholeMatch;\n }\n if (url.match(/^data:.+?\\/.+?;base64,/)) {\n // remove newlines\n globals.gUrls[linkId] = url.replace(/\\s/g, '');\n } else {\n globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive\n }\n\n if (blankLines) {\n // Oops, found blank lines, so it's not a title.\n // Put back the parenthetical statement we stole.\n return blankLines + title;\n\n } else {\n if (title) {\n globals.gTitles[linkId] = title.replace(/\"|'/g, '"');\n }\n if (options.parseImgDimensions && width && height) {\n globals.gDimensions[linkId] = {\n width: width,\n height: height\n };\n }\n }\n // Completely remove the definition from the text\n return '';\n };\n\n // first we try to find base64 link references\n text = text.replace(base64Regex, replaceFunc);\n\n text = text.replace(regex, replaceFunc);\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return text;\n});\n\r\nshowdown.subParser('tables', function (text, options, globals) {\n 'use strict';\n\n if (!options.tables) {\n return text;\n }\n\n var tableRgx = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n //singeColTblRgx = /^ {0,3}\\|.+\\|\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n(?: {0,3}\\|.+\\|\\n)+(?:\\n\\n|¨0)/gm;\n singeColTblRgx = /^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm;\n\n function parseStyles (sLine) {\n if (/^:[ \\t]*--*$/.test(sLine)) {\n return ' style=\"text-align:left;\"';\n } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine)) {\n return ' style=\"text-align:right;\"';\n } else if (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n return ' style=\"text-align:center;\"';\n } else {\n return '';\n }\n }\n\n function parseHeaders (header, style) {\n var id = '';\n header = header.trim();\n // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility\n if (options.tablesHeaderId || options.tableHeaderId) {\n id = ' id=\"' + header.replace(/ /g, '_').toLowerCase() + '\"';\n }\n header = showdown.subParser('spanGamut')(header, options, globals);\n\n return '' + header + '\\n';\n }\n\n function parseCells (cell, style) {\n var subText = showdown.subParser('spanGamut')(cell, options, globals);\n return '' + subText + '\\n';\n }\n\n function buildTable (headers, cells) {\n var tb = '\\n\\n\\n',\n tblLgn = headers.length;\n\n for (var i = 0; i < tblLgn; ++i) {\n tb += headers[i];\n }\n tb += '\\n\\n\\n';\n\n for (i = 0; i < cells.length; ++i) {\n tb += '\\n';\n for (var ii = 0; ii < tblLgn; ++ii) {\n tb += cells[i][ii];\n }\n tb += '\\n';\n }\n tb += '\\n
    \\n';\n return tb;\n }\n\n function parseTable (rawTable) {\n var i, tableLines = rawTable.split('\\n');\n\n for (i = 0; i < tableLines.length; ++i) {\n // strip wrong first and last column if wrapped tables are used\n if (/^ {0,3}\\|/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/^ {0,3}\\|/, '');\n }\n if (/\\|[ \\t]*$/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/\\|[ \\t]*$/, '');\n }\n // parse code spans first, but we only support one line code spans\n tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);\n }\n\n var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),\n rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),\n rawCells = [],\n headers = [],\n styles = [],\n cells = [];\n\n tableLines.shift();\n tableLines.shift();\n\n for (i = 0; i < tableLines.length; ++i) {\n if (tableLines[i].trim() === '') {\n continue;\n }\n rawCells.push(\n tableLines[i]\n .split('|')\n .map(function (s) {\n return s.trim();\n })\n );\n }\n\n if (rawHeaders.length < rawStyles.length) {\n return rawTable;\n }\n\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n\n for (i = 0; i < rawHeaders.length; ++i) {\n if (showdown.helper.isUndefined(styles[i])) {\n styles[i] = '';\n }\n headers.push(parseHeaders(rawHeaders[i], styles[i]));\n }\n\n for (i = 0; i < rawCells.length; ++i) {\n var row = [];\n for (var ii = 0; ii < headers.length; ++ii) {\n if (showdown.helper.isUndefined(rawCells[i][ii])) {\n\n }\n row.push(parseCells(rawCells[i][ii], styles[ii]));\n }\n cells.push(row);\n }\n\n return buildTable(headers, cells);\n }\n\n text = globals.converter._dispatch('tables.before', text, options, globals);\n\n // find escaped pipe characters\n text = text.replace(/\\\\(\\|)/g, showdown.helper.escapeCharactersCallback);\n\n // parse multi column tables\n text = text.replace(tableRgx, parseTable);\n\n // parse one column tables\n text = text.replace(singeColTblRgx, parseTable);\n\n text = globals.converter._dispatch('tables.after', text, options, globals);\n\n return text;\n});\n\r\nshowdown.subParser('underline', function (text, options, globals) {\n 'use strict';\n\n if (!options.underline) {\n return text;\n }\n\n text = globals.converter._dispatch('underline.before', text, options, globals);\n\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n }\n\n // escape remaining underscores to prevent them being parsed by italic and bold\n text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('underline.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Swap back in all the special characters we've hidden.\n */\nshowdown.subParser('unescapeSpecialChars', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);\n\n text = text.replace(/¨E(\\d+)E/g, function (wholeMatch, m1) {\n var charCodeToReplace = parseInt(m1);\n return String.fromCharCode(charCodeToReplace);\n });\n\n text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('makeMarkdown.blockquote', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals);\n\n if (innerTxt === '') {\n continue;\n }\n txt += innerTxt;\n }\n }\n // cleanup\n txt = txt.trim();\n txt = '> ' + txt.split('\\n').join('\\n> ');\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.codeBlock', function (node, globals) {\n 'use strict';\n\n var lang = node.getAttribute('language'),\n num = node.getAttribute('precodenum');\n return '```' + lang + '\\n' + globals.preList[num] + '\\n```';\n});\n\r\nshowdown.subParser('makeMarkdown.codeSpan', function (node) {\n 'use strict';\n\n return '`' + node.innerHTML + '`';\n});\n\r\nshowdown.subParser('makeMarkdown.emphasis', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '*';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '*';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) {\n 'use strict';\n\n var headerMark = new Array(headerLevel + 1).join('#'),\n txt = '';\n\n if (node.hasChildNodes()) {\n txt = headerMark + ' ';\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.hr', function () {\n 'use strict';\n\n return '---';\n});\n\r\nshowdown.subParser('makeMarkdown.image', function (node) {\n 'use strict';\n\n var txt = '';\n if (node.hasAttribute('src')) {\n txt += '![' + node.getAttribute('alt') + '](';\n txt += '<' + node.getAttribute('src') + '>';\n if (node.hasAttribute('width') && node.hasAttribute('height')) {\n txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height');\n }\n\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.links', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes() && node.hasAttribute('href')) {\n var children = node.childNodes,\n childrenLength = children.length;\n txt = '[';\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '](';\n txt += '<' + node.getAttribute('href') + '>';\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.list', function (node, globals, type) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var listItems = node.childNodes,\n listItemsLenght = listItems.length,\n listNum = node.getAttribute('start') || 1;\n\n for (var i = 0; i < listItemsLenght; ++i) {\n if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') {\n continue;\n }\n\n // define the bullet to use in list\n var bullet = '';\n if (type === 'ol') {\n bullet = listNum.toString() + '. ';\n } else {\n bullet = '- ';\n }\n\n // parse list item\n txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals);\n ++listNum;\n }\n\n // add comment at the end to prevent consecutive lists to be parsed as one\n txt += '\\n\\n';\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.listItem', function (node, globals) {\n 'use strict';\n\n var listItemTxt = '';\n\n var children = node.childNodes,\n childrenLenght = children.length;\n\n for (var i = 0; i < childrenLenght; ++i) {\n listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n // if it's only one liner, we need to add a newline at the end\n if (!/\\n$/.test(listItemTxt)) {\n listItemTxt += '\\n';\n } else {\n // it's multiparagraph, so we need to indent\n listItemTxt = listItemTxt\n .split('\\n')\n .join('\\n ')\n .replace(/^ {4}$/gm, '')\n .replace(/\\n\\n+/g, '\\n\\n');\n }\n\n return listItemTxt;\n});\n\r\n\n\nshowdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) {\n 'use strict';\n\n spansOnly = spansOnly || false;\n\n var txt = '';\n\n // edge case of text without wrapper paragraph\n if (node.nodeType === 3) {\n return showdown.subParser('makeMarkdown.txt')(node, globals);\n }\n\n // HTML comment\n if (node.nodeType === 8) {\n return '\\n\\n';\n }\n\n // process only node elements\n if (node.nodeType !== 1) {\n return '';\n }\n\n var tagName = node.tagName.toLowerCase();\n\n switch (tagName) {\n\n //\n // BLOCKS\n //\n case 'h1':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\\n\\n'; }\n break;\n case 'h2':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\\n\\n'; }\n break;\n case 'h3':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\\n\\n'; }\n break;\n case 'h4':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\\n\\n'; }\n break;\n case 'h5':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\\n\\n'; }\n break;\n case 'h6':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\\n\\n'; }\n break;\n\n case 'p':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\\n\\n'; }\n break;\n\n case 'blockquote':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\\n\\n'; }\n break;\n\n case 'hr':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\\n\\n'; }\n break;\n\n case 'ol':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\\n\\n'; }\n break;\n\n case 'ul':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\\n\\n'; }\n break;\n\n case 'precode':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\\n\\n'; }\n break;\n\n case 'pre':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\\n\\n'; }\n break;\n\n case 'table':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\\n\\n'; }\n break;\n\n //\n // SPANS\n //\n case 'code':\n txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals);\n break;\n\n case 'em':\n case 'i':\n txt = showdown.subParser('makeMarkdown.emphasis')(node, globals);\n break;\n\n case 'strong':\n case 'b':\n txt = showdown.subParser('makeMarkdown.strong')(node, globals);\n break;\n\n case 'del':\n txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals);\n break;\n\n case 'a':\n txt = showdown.subParser('makeMarkdown.links')(node, globals);\n break;\n\n case 'img':\n txt = showdown.subParser('makeMarkdown.image')(node, globals);\n break;\n\n default:\n txt = node.outerHTML + '\\n\\n';\n }\n\n // common normalization\n // TODO eventually\n\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.paragraph', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n\n // some text normalization\n txt = txt.trim();\n\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.pre', function (node, globals) {\n 'use strict';\n\n var num = node.getAttribute('prenum');\n return '
    ' + globals.preList[num] + '
    ';\n});\n\r\nshowdown.subParser('makeMarkdown.strikethrough', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '~~';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '~~';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.strong', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '**';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '**';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.table', function (node, globals) {\n 'use strict';\n\n var txt = '',\n tableArray = [[], []],\n headings = node.querySelectorAll('thead>tr>th'),\n rows = node.querySelectorAll('tbody>tr'),\n i, ii;\n for (i = 0; i < headings.length; ++i) {\n var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals),\n allign = '---';\n\n if (headings[i].hasAttribute('style')) {\n var style = headings[i].getAttribute('style').toLowerCase().replace(/\\s/g, '');\n switch (style) {\n case 'text-align:left;':\n allign = ':---';\n break;\n case 'text-align:right;':\n allign = '---:';\n break;\n case 'text-align:center;':\n allign = ':---:';\n break;\n }\n }\n tableArray[0][i] = headContent.trim();\n tableArray[1][i] = allign;\n }\n\n for (i = 0; i < rows.length; ++i) {\n var r = tableArray.push([]) - 1,\n cols = rows[i].getElementsByTagName('td');\n\n for (ii = 0; ii < headings.length; ++ii) {\n var cellContent = ' ';\n if (typeof cols[ii] !== 'undefined') {\n cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals);\n }\n tableArray[r].push(cellContent);\n }\n }\n\n var cellSpacesCount = 3;\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n var strLen = tableArray[i][ii].length;\n if (strLen > cellSpacesCount) {\n cellSpacesCount = strLen;\n }\n }\n }\n\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n if (i === 1) {\n if (tableArray[i][ii].slice(-1) === ':') {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':';\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-');\n }\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount);\n }\n }\n txt += '| ' + tableArray[i].join(' | ') + ' |\\n';\n }\n\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.tableCell', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true);\n }\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.txt', function (node) {\n 'use strict';\n\n var txt = node.nodeValue;\n\n // multiple spaces are collapsed\n txt = txt.replace(/ +/g, ' ');\n\n // replace the custom ¨NBSP; with a space\n txt = txt.replace(/¨NBSP;/g, ' ');\n\n // \", <, > and & should replace escaped html entities\n txt = showdown.helper.unescapeHTMLEntities(txt);\n\n // escape markdown magic characters\n // emphasis, strong and strikethrough - can appear everywhere\n // we also escape pipe (|) because of tables\n // and escape ` because of code blocks and spans\n txt = txt.replace(/([*_~|`])/g, '\\\\$1');\n\n // escape > because of blockquotes\n txt = txt.replace(/^(\\s*)>/g, '\\\\$1>');\n\n // hash character, only troublesome at the beginning of a line because of headers\n txt = txt.replace(/^#/gm, '\\\\#');\n\n // horizontal rules\n txt = txt.replace(/^(\\s*)([-=]{3,})(\\s*)$/, '$1\\\\$2$3');\n\n // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer\n txt = txt.replace(/^( {0,3}\\d+)\\./gm, '$1\\\\.');\n\n // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped)\n txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\\\$2');\n\n // images and links, ] followed by ( is problematic, so we escape it\n txt = txt.replace(/]([\\s]*)\\(/g, '\\\\]$1\\\\(');\n\n // reference URIs must also be escaped\n txt = txt.replace(/^ {0,3}\\[([\\S \\t]*?)]:/gm, '\\\\[$1]:');\n\n return txt;\n});\n\r\nvar root = this;\n\n// AMD Loader\nif (typeof define === 'function' && define.amd) {\n define(function () {\n 'use strict';\n return showdown;\n });\n\n// CommonJS/nodeJS Loader\n} else if (typeof module !== 'undefined' && module.exports) {\n module.exports = showdown;\n\n// Regular Browser loader\n} else {\n root.showdown = showdown;\n}\n}).call(this);\r\n\n//# sourceMappingURL=showdown.js.map\r\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport showdown from 'showdown';\n\nshowdown.ConverterExtObj = function(flavor, asyncExtensions) {\n 'use strict';\n\n let outputAsyncModifiers = [],\n /**\n * The flavor set in this converter\n */\n currConvFlavor = flavor;\n\n _constructor();\n\n /**\n * Converter constructor\n * @private\n */\n function _constructor() {\n if (asyncExtensions) {\n showdown.helper.forEach(asyncExtensions, _parseAsyncExtension);\n }\n }\n\n /**\n * Parse async extension\n * @param {*} ext\n * @param {string} [name='']\n * @private\n */\n function _parseAsyncExtension(ext, name) {\n name = name || null;\n // If it's a string, the extension was previously loaded\n if (showdown.helper.isString(ext)) {\n name = showdown.helper.stdExtName(ext);\n ext = showdown.asyncExtension(name);\n if (showdown.helper.isUndefined(ext)) {\n throw Error(\n 'Extension \"' + name + '\" could not be loaded. It was either not found or is not a valid aync extension.'\n );\n }\n }\n\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n if (showdown.validateExtension(ext)) {\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n case 'output':\n outputAsyncModifiers.push(ext[i]);\n break;\n }\n }\n }\n }\n\n this.addAsyncExtension = function(extension, name) {\n name = name || null;\n _parseAsyncExtension(extension, name);\n };\n\n this.removeAsyncExtension = function(extension) {\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n for (var a = 0; a < extension.length; ++a) {\n const ext = extension[a];\n for (var j = 0; j < outputAsyncModifiers.length; ++j) {\n if (outputAsyncModifiers[j] === ext) {\n outputAsyncModifiers.splice(j, 1);\n }\n }\n }\n };\n\n this.getAsyncExtensions = function() {\n return outputAsyncModifiers;\n };\n\n /**\n * Get the currently flavor name of this converter\n * @returns {string}\n */\n this.getCurrFlavor = function() {\n return currConvFlavor;\n };\n\n /**\n * Set the currently flavor name of this converter\n * @param {string} flavor name\n */\n this.setCurrFlavor = function(name) {\n currConvFlavor = name;\n };\n};\n\nshowdown.Converter.prototype.initConvertExtObj = function(flavor, asyncExtensions) {\n this.extObj = new showdown.ConverterExtObj(flavor, asyncExtensions);\n\n this.resetOptions = function(converterOptions) {\n converterOptions = converterOptions || {};\n\n const globalOptions = showdown.getOptions();\n let options = this.getOptions();\n for (var gOpt in globalOptions) {\n if (globalOptions.hasOwnProperty(gOpt)) {\n options[gOpt] = globalOptions[gOpt];\n }\n }\n\n // Merge options\n if (typeof converterOptions === 'object') {\n for (var opt in converterOptions) {\n if (converterOptions.hasOwnProperty(opt)) {\n options[opt] = converterOptions[opt];\n }\n }\n }\n };\n\n /**\n * Set the flavor THIS converter should use\n * @param {string} name\n */\n this.setFlavor = function(name) {\n let preset = showdown.getFlavorOptions(name);\n if (showdown.helper.isUndefined(preset)) return;\n this.extObj.setCurrFlavor(name);\n let defaultOptions = showdown.getDefaultOptions(true);\n for (var option in defaultOptions) {\n if (defaultOptions.hasOwnProperty(option)) {\n this.getOptions()[option] = defaultOptions[option];\n }\n }\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n this.getOptions()[option] = preset[option];\n }\n }\n };\n\n /**\n * Get the currently set flavor of this converter\n * @returns {string}\n */\n this.getFlavor = function() {\n return this.extObj.getCurrFlavor();\n };\n\n this.addAsyncExtension = function(extension, name) {\n this.extObj.addAsyncExtension(extension, name);\n };\n\n this.removeAsyncExtension = function(extension) {\n this.extObj.removeAsyncExtension(extension);\n };\n\n // Because removeExtension function of converter has bug in showdown.js,\n // it needs to be overrode.\n this.removeExtension = function(extension) {\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n const exts = this.getAllExtensions();\n let langExtensions = exts.language;\n let outputModifiers = exts.output;\n for (var a = 0; a < extension.length; ++a) {\n const ext = extension[a];\n for (var i = 0; i < langExtensions.length; ++i) {\n if (langExtensions[i] === ext) {\n langExtensions.splice(i, 1);\n }\n }\n for (var j = 0; j < outputModifiers.length; ++j) {\n if (outputModifiers[j] === ext) {\n outputModifiers.splice(j, 1);\n }\n }\n }\n };\n\n /**\n * Async converts a markdown string into HTML\n * @param {string} text\n * @returns {*}\n */\n this.asyncMakeHtml = function(text, callback) {\n const content = this.makeHtml(text);\n const outputs = this.extObj.getAsyncExtensions();\n if (!outputs.length) {\n return Promise.resolve({html: content});\n }\n\n var globals = {\n outputs: outputs,\n converter: this\n };\n const parser = new DOMParser();\n const doc = parser.parseFromString(content, 'text/html');\n const wrapper = typeof doc.body !== 'undefined' ? doc.body : doc;\n const options = this.getOptions();\n let scripts = [];\n let result = Promise.resolve({ wrapper, options, globals, scripts });\n //forEach写法\n outputs.forEach(function(ext) {\n result = result.then(obj => {\n const filter = ext.filter(obj);\n return filter ? filter : obj;\n });\n });\n return result.then(obj => {\n if (typeof callback === 'function' && callback) {\n const promise = callback(obj);\n if (promise instanceof Promise) {\n return promise.then(obj => {\n return { html: obj.wrapper.innerHTML, scripts: obj.scripts };\n });\n }\n }\n return { html: obj.wrapper.innerHTML, scripts: obj.scripts };\n });\n };\n\n return this;\n};\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Override githubCodeBlocks parser;\n * Support language attribute, see the following format:\n * ```lang {\"theme\": \"github\", \"align\": \"center\"}\n * code block\n * ```\n * OR\n * ```lang [\"theme\": \"vox\", \"align\": \"right\"]\n * code block\n * ```\n */\n'use strict';\n\nimport showdown from 'showdown';\n\nshowdown.subParser('githubCodeBlocks', function(text, options, globals) {\n 'use strict';\n\n // early exit if option is not enabled\n if (!options.ghCodeBlocks) {\n return text;\n }\n\n text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);\n\n text += '¨0';\n\n text = text.replace(\n /(?:^|\\n)(?: {0,3})(```+|~~~+)(?: *)([^\\s`~]*?)(?:[ \\t]*?)((?:\\{[\\S\\t ]*\\}|\\[[\\S\\t ]*\\])?)\\n([\\s\\S]*?)\\n(?: {0,3})\\1/g,\n function(wholeMatch, delim, language, langattr, codeblock) {\n var end = options.omitExtraWLInCodeBlocks ? '' : '\\n';\n\n // First parse the github code block\n codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n codeblock = showdown.subParser('detab')(codeblock, options, globals);\n codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing whitespace\n\n codeblock =\n '
    ';\n\n codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);\n\n // Since GHCodeblocks can be false positives, we need to\n // store the primitive text and the parsed text in a global var,\n // and then return a token\n return (\n '\\n\\n¨G' +\n (globals.ghCodeBlocks.push({\n text: wholeMatch,\n codeblock: codeblock\n }) -\n 1) +\n 'G\\n\\n'\n );\n }\n );\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);\n});\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport showdown from 'showdown';\n\n// Override tables parser;\nshowdown.subParser('tables', function (text, options, globals) {\n 'use strict';\n\n if (!options.tables) {\n return text;\n }\n\n var tableRgx = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n singeColTblRgx = /^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm,\n headerlessTableRgx = /^ {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n headerlessSingeColTblRgx = /^ {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm;\n\n function parseStyles(sLine) {\n if (/^:[ \\t]*--*$/.test(sLine)) {\n return ' style=\"text-align:left;\"';\n } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine)) {\n return ' style=\"text-align:right;\"';\n } else if (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n return ' style=\"text-align:center;\"';\n } else {\n return '';\n }\n }\n\n function parseHeaders(header, style) {\n var id = '';\n header = header.trim();\n // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility\n if (options.tablesHeaderId || options.tableHeaderId) {\n id = ' id=\"' + header.replace(/ /g, '_').toLowerCase() + '\"';\n }\n header = showdown.subParser('spanGamut')(header, options, globals);\n\n return '' + header + '\\n';\n }\n\n function mergeCells(cells, row, col, cell) {\n if (cell) {\n if (!options.tablesRowspan || cell !== '^^' || !row) {\n return;\n }\n\n // up merge except for first row cells\n for (var i = row - 1; i >= 0; --i) {\n if (!cells[i][col]) {\n for (var ii = col - 1; ii >= 0; -ii) {\n if (cells[i + 1][ii] && cells[i + 1][ii] !== '^^') {\n return;\n }\n\n if (cells[i][ii]) {\n if (!cells[i + 1][ii]) {\n return;\n }\n\n cells[i][ii] = cells[i][ii]\n .replace(/rowspan=\"[0-9]*\"/g, '')\n .replace(/^(\\n\\r]*?)(>.*<\\/td>\\n)/, function (str, left, right) {\n return left + ' rowspan=\"' + (row - i + 1) + '\"' + right;\n });\n return cell;\n }\n }\n } else if (cells[i][col] !== '^^') {\n cells[i][col] = cells[i][col]\n .replace(/rowspan=\"[0-9]*\"/g, '')\n .replace(/^(\\n\\r]*?)(>.*<\\/td>\\n)/, function (str, left, right) {\n return left + ' rowspan=\"' + (row - i + 1) + '\"' + right;\n });\n return cell;\n } else if (i === 0) {\n cells[i][col] = '\\n';\n return cell;\n }\n }\n\n return;\n }\n\n // left merge except for first column cells\n if (!col) {\n return;\n }\n\n for (var ii = col - 1; ii >= 0; --ii) {\n if (cells[row][ii]) {\n if (cells[row][ii] === '^^') {\n for (var i = row - 1; i >= 0; --i) {\n if (cells[i][ii + 1]) {\n return;\n }\n\n if (cells[i][ii] !== '^^') {\n cells[i][ii] = cells[i][ii]\n .replace(/colspan=\"[0-9]*\"/g, '')\n .replace(/^(\\n\\r]*?)(>.*<\\/td>\\n)/, function (str, left, right) {\n return left + ' colspan=\"' + (col - ii + 1) + '\"' + right;\n });\n return cell;\n }\n }\n } else {\n cells[row][ii] = cells[row][ii]\n .replace(/colspan=\"[0-9]*\"/g, '')\n .replace(/^(\\n\\r]*?)(>.*<\\/td>\\n)/, function (str, left, right) {\n return left + ' colspan=\"' + (col - ii + 1) + '\"' + right;\n });\n return cell;\n }\n } else if (ii === 0) {\n cells[row][ii] = '\\n';\n return cell;\n }\n }\n\n return;\n }\n\n function parseCells(cells, row, col, cell, style) {\n if (options.tablesMerge) {\n var direct = mergeCells(cells, row, col, cell);\n if (!showdown.helper.isUndefined(direct)) {\n return direct;\n }\n }\n\n cell = cell.trim();\n var subText = showdown.subParser('spanGamut')(cell, options, globals);\n return '' + subText + '\\n';\n }\n\n function buildTable(headers, styles, cells) {\n var tb = '\\n',\n tblLgn = styles.length;\n\n if (headers.length) {\n tb += '\\n\\n';\n for (var i = 0; i < headers.length; ++i) {\n tb += headers[i];\n }\n tb += '\\n\\n';\n }\n tb += '\\n'\n\n for (i = 0; i < cells.length; ++i) {\n tb += '\\n';\n for (var ii = 0; ii < tblLgn; ++ii) {\n if (!options.tablesMerge || cells[i][ii] !== '^^') {\n tb += cells[i][ii];\n }\n }\n tb += '\\n';\n }\n tb += '\\n
    \\n';\n return tb;\n }\n\n function parseTableContent(rawTable, headerless) {\n var i,\n tableLines = rawTable.split('\\n');\n\n for (i = 0; i < tableLines.length; ++i) {\n // strip wrong first and last column if wrapped tables are used\n if (/^ {0,3}\\|/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/^ {0,3}\\|/, '');\n }\n if (/\\|[ \\t]*$/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/\\|[ \\t]*$/, '');\n }\n // parse code spans first, but we only support one line code spans\n tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);\n }\n\n var rawStyles = [],\n rawCells = [],\n headers = [],\n styles = [],\n cells = [];\n\n if (headerless) {\n rawStyles = tableLines[0].split('|').map(function (s) {\n return s.trim();\n });\n tableLines.shift();\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n } else {\n var rawHeaders = tableLines[0].split('|').map(function (s) {\n return s.trim();\n });\n rawStyles = tableLines[1].split('|').map(function (s) {\n return s.trim();\n });\n\n tableLines.shift();\n tableLines.shift();\n\n if (rawHeaders.length < rawStyles.length) {\n return rawTable;\n }\n\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n\n for (i = 0; i < rawHeaders.length; ++i) {\n if (showdown.helper.isUndefined(styles[i])) {\n styles[i] = '';\n }\n headers.push(parseHeaders(rawHeaders[i], styles[i]));\n }\n }\n\n for (i = 0; i < tableLines.length; ++i) {\n if (tableLines[i].trim() === '') {\n continue;\n }\n rawCells.push(\n tableLines[i].split('|').map(function (s) {\n var cell = s.trim();\n if (cell === '' && s.length > 0) return s;\n return cell;\n })\n );\n }\n\n for (i = 0; i < rawCells.length; ++i) {\n var row = [];\n cells.push(row);\n for (var ii = 0; ii < styles.length; ++ii) {\n if (showdown.helper.isUndefined(rawCells[i][ii])) {\n rawCells[i][ii] = '';\n }\n row.push(parseCells(cells, i, ii, rawCells[i][ii], styles[ii]));\n }\n }\n\n return buildTable(headers, styles, cells);\n }\n\n function parseTable(rawTable) {\n return parseTableContent(rawTable, false);\n }\n\n function parseHeaderlessTable(rawTable) {\n return parseTableContent(rawTable, true);\n }\n\n text = globals.converter._dispatch('tables.before', text, options, globals);\n\n // find escaped pipe characters\n text = text.replace(/\\\\(\\|)/g, showdown.helper.escapeCharactersCallback);\n\n // parse multi column tables\n text = text.replace(tableRgx, parseTable);\n\n // parse one column tables\n text = text.replace(singeColTblRgx, parseTable);\n\n if (options.tablesHeaderless) {\n // parse multi column headerless tables\n text = text.replace(headerlessTableRgx, parseHeaderlessTable);\n\n // parse one column headerless tables\n text = text.replace(headerlessSingeColTblRgx, parseHeaderlessTable);\n }\n\n text = globals.converter._dispatch('tables.after', text, options, globals);\n\n return text;\n});\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport showdown from 'showdown';\nimport './converter.js';\nimport './githubCodeBlocks.js';\nimport './tables.js';\n\nlet currFlavor = 'vanilla',\n flavors = {\n github: {\n ghCompatibleHeaderId: false,\n underline: true,\n rawHeaderId: true,\n tablesHeaderless: true,\n tablesMerge: true,\n tablesRowspan: true\n },\n ghost: {\n tablesHeaderless: true,\n tablesMerge: true,\n tablesRowspan: true\n },\n allOn: {\n tablesHeaderless: true,\n tablesMerge: true,\n tablesRowspan: true\n }\n },\n _asyncExtensions = {};\n\n/**\n * Gets or registers an async extension\n * @static\n * @param {string} name\n * @param {object|function=} ext\n * @returns {*}\n */\nshowdown.asyncExtension = function(name, ext) {\n 'use strict';\n\n if (!showdown.helper.isString(name)) {\n throw Error(\"Extension 'name' must be a string\");\n }\n\n name = showdown.helper.stdExtName(name);\n\n // Getter\n if (showdown.helper.isUndefined(ext)) {\n if (!_asyncExtensions.hasOwnProperty(name)) {\n throw Error('Async Extension named ' + name + ' is not registered!');\n }\n return _asyncExtensions[name];\n\n // Setter\n } else {\n // Expand extension if it's wrapped in a function\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n // Ensure extension is an array\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n if (showdown.validateExtension(ext)) {\n _asyncExtensions[name] = ext;\n }\n }\n};\n\n/**\n * Remove an async extension\n * @param {string} name\n */\nshowdown.removeAsyncExtension = function(name) {\n 'use strict';\n name = showdown.helper.stdExtName(name);\n delete _asyncExtensions[name];\n};\n\n/**\n * Removes all async extensions\n */\nshowdown.resetAsyncExtensions = function() {\n 'use strict';\n _asyncExtensions = {};\n};\n\n/**\n * Remove an extension\n * @param {string} name\n */\nshowdown.removeExtension = function(name) {\n 'use strict';\n name = showdown.helper.stdExtName(name);\n delete showdown.getAllExtensions[name];\n};\n\nconst orgSetFlavor = showdown.setFlavor;\nconst orgGetFlavorOptions = showdown.getFlavorOptions;\n\n/**\n * Set the flavor showdown should use as default\n * @param {string} name\n */\nshowdown.setFlavor = function(name) {\n 'use strict';\n\n try {\n orgSetFlavor(name);\n currFlavor = name;\n if (!flavors.hasOwnProperty(name)) return;\n } catch {\n if (!flavors.hasOwnProperty(name)) return;\n showdown.resetOptions();\n currFlavor = name;\n }\n var preset = flavors[name];\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n showdown.getOptions()[option] = preset[option];\n }\n }\n};\n\n/**\n * Get the currently set flavor\n * @returns {string}\n */\nshowdown.getFlavor = function() {\n 'use strict';\n return currFlavor;\n};\n\nshowdown.setFlavorOptions = function(name, options) {\n if (options) {\n flavors[name] = Object.assign(flavors[name] || {}, options);\n }\n};\n\n/**\n * Get the options of a specified flavor. Returns undefined if the flavor was not found\n * @param {string} name Name of the flavor\n * @returns {{}|undefined}\n */\nshowdown.getFlavorOptions = function(name) {\n 'use strict';\n const flavor = orgGetFlavorOptions(name);\n if (!showdown.helper.isUndefined(flavor)) {\n if (!flavors.hasOwnProperty(name)) {\n return flavor;\n }\n return Object.assign(flavor, flavors[name]);\n }\n\n if (flavors.hasOwnProperty(name)) {\n return flavors[name];\n }\n};\n\nexport default showdown;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: dynamic loading js libs for local or cdnjs or jsdelivr\n */\n'use strict';\n\nimport './date-format.js';\n\nfunction format(s) {\n return `${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} ${s}`\n}\n\nexport default format;\n","/*\r\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\r\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\r\n * Description: Date format extension\r\n */\r\n'use strict';\r\n// 对Date的扩展,将 Date 转化为指定格式的String\r\n// 月(M)、日(d)、小时(h/H)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,\r\n// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)\r\n// 例子:\r\n// (new Date()).Format(\"yyyy-MM-dd hh:mm:ss.S\") ==> 1970-01-01 08:09:04.423\r\n// (new Date()).Format(\"yyyy-M-d h:m:s.S\") ==> 1970-1-1 8:9:4.18\r\nDate.prototype.Format = function(fmt) {\r\n var o = {\r\n 'M+': this.getMonth() + 1, //月份\r\n 'd+': this.getDate(), //日\r\n 'h+': this.getHours(), //小时\r\n 'H+': this.getHours(), //小时\r\n 'm+': this.getMinutes(), //分\r\n 's+': this.getSeconds(), //秒\r\n 'q+': Math.floor((this.getMonth() + 3) / 3), //季度\r\n S: this.getMilliseconds() //毫秒\r\n };\r\n if (!fmt) fmt = 'yyyy-MM-dd hh:mm:ss.S';\r\n const matches = /(y+)/.exec(fmt);\r\n if (matches) fmt = fmt.replace(matches[1], (this.getFullYear() + '').substring(4 - matches[1].length));\r\n for (const k in o) {\r\n const m = new RegExp('(' + k + ')').exec(fmt)\r\n if (m) {\r\n let n = o[k];\r\n if (m[1].length == 1) n = ('000' + o[k]).substring(('' + o[k]).length);\r\n else if (m[1].length == 2) n = ('00' + o[k]).substring(('' + o[k]).length);\r\n fmt = fmt.replace(m[1], n);\r\n }\r\n }\r\n return fmt;\r\n};\r\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: dynamic loading js libs for local or cdnjs or jsdelivr\n */\n'use strict';\n\nlet cdnName = 'jsdelivr';\nlet scheme = document.location.protocol === 'file:' ? 'https://' : document.location.protocol + '//';\nlet defScheme = '';\nlet distScheme = '';\n\nconst cdnSrc = {\n local: {\n ABCJS: '../node_modules/abcjs/dist/abcjs-basic.js',\n ABCJSCSS: '../node_modules/abcjs/abcjs-audio.css',\n echarts: '../node_modules/echarts/dist/echarts.js',\n Viz: '../node_modules/@viz-js/viz/lib/viz-standalone.js',\n Raphael: '../node_modules/raphael/raphael.min.js',\n flowchart: '../dist/diagrams/flowchart/flowchart.min.js',\n mermaid: '../node_modules/mermaid/dist/mermaid.js',\n katex: '../node_modules/katex/dist/katex.min.js',\n katexCSS: '../node_modules/katex/dist/katex.min.css',\n renderMathInElement: '../node_modules/katex/dist/contrib/auto-render.js',\n railroad: '../node_modules/railroad-diagrams/railroad-diagrams.js',\n railroadCSS: '../node_modules/railroad-diagrams/railroad-diagrams.css',\n Snap: '../node_modules/snapsvg/dist/snap.svg-min.js',\n WebFont: '../node_modules/webfontloader/webfontloader.js',\n underscore: '../node_modules/underscore/underscore-min.js',\n sequence: '../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js',\n sequenceCSS: '../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.css',\n WaveDrom: '../node_modules/wavedrom/wavedrom.min.js',\n WaveDromSkin: {\n default: '../node_modules/wavedrom/skins/default.js',\n lowkey: '../node_modules/wavedrom/skins/lowkey.js',\n narrow: '../node_modules/wavedrom/skins/narrow.js'\n },\n vega: '../node_modules/vega/build/vega.js',\n vegaLite: '../node_modules/vega-lite/build/vega-lite.js',\n vegaEmbed: '../node_modules/vega-embed/build/vega-embed.js'\n },\n cdnjs: {\n ABCJS: scheme + 'cdnjs.cloudflare.com/ajax/libs/abcjs/6.4.1/abcjs-basic-min.js',\n ABCJSCSS: scheme + 'cdnjs.cloudflare.com/ajax/libs/abcjs/abcjs-audio.css',\n echarts: scheme + 'cdnjs.cloudflare.com/ajax/libs/echarts/5.5.0/echarts.min.js',\n Viz: scheme + 'cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js',\n Raphael: scheme + 'cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js',\n flowchart: scheme + 'cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js',\n mermaid: scheme + 'cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js',\n katex: scheme + 'cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.js',\n katexCSS: scheme + 'cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/katex.min.css',\n renderMathInElement: scheme + 'cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.11/contrib/auto-render.js',\n railroad: scheme + 'cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.js',\n railroadCSS: scheme + 'cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.css',\n Snap: scheme + 'cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js',\n WebFont: scheme + 'cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js',\n underscore: scheme + 'cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js',\n sequence: scheme + 'cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js',\n sequenceCSS: scheme + 'cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css',\n WaveDrom: scheme + 'cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/wavedrom.min.js',\n WaveDromSkin: {\n default: scheme + 'cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/default.js',\n lowkey: scheme + 'cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/lowkey.js',\n narrow: scheme + 'cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/narrow.js'\n },\n vega: scheme + 'cdnjs.cloudflare.com/ajax/libs/vega/5.30.0/vega.min.js',\n vegaLite: scheme + 'cdnjs.cloudflare.com/ajax/libs/vega-lite/5.19.0/vega-lite.min.js',\n vegaEmbed: scheme + 'cdnjs.cloudflare.com/ajax/libs/vega-embed/6.26.0/vega-embed.min.js'\n },\n jsdelivr: {\n ABCJS: scheme + 'cdn.jsdelivr.net/npm/abcjs@6/dist/abcjs-basic-min.js',\n ABCJSCSS: scheme + 'cdn.jsdelivr.net/npm/abcjs@6/abcjs-audio.css',\n echarts: scheme + 'cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js',\n Viz: scheme + 'cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js',\n Raphael: scheme + 'cdn.jsdelivr.net/npm/raphael@2/raphael.min.js',\n flowchart: scheme + 'cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js',\n mermaid: scheme + 'cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js',\n katex: scheme + 'cdn.jsdelivr.net/npm/katex@0/dist/katex.min.js',\n katexCSS: scheme + 'cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css',\n renderMathInElement: scheme + 'cdn.jsdelivr.net/npm/katex@0/dist/contrib/auto-render.js',\n railroad: scheme + 'cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.js',\n railroadCSS: scheme + 'cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.css',\n Snap: scheme + 'cdn.jsdelivr.net/npm/snapsvg@0/dist/snap.svg-min.js',\n WebFont: scheme + 'cdn.jsdelivr.net/npm/webfontloader@1/webfontloader.js',\n underscore: scheme + 'cdn.jsdelivr.net/npm/underscore@1/underscore-min.js',\n sequence: scheme + 'cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js',\n sequenceCSS: scheme + 'cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css',\n WaveDrom: scheme + 'cdn.jsdelivr.net/npm/wavedrom@3/wavedrom.min.js',\n WaveDromSkin: {\n default: scheme + 'cdn.jsdelivr.net/npm/wavedrom@3/skins/default.js',\n lowkey: scheme + 'cdn.jsdelivr.net/npm/wavedrom@3/skins/lowkey.js',\n narrow: scheme + 'cdn.jsdelivr.net/npm/wavedrom@3/skins/narrow.js'\n },\n vega: scheme + 'cdn.jsdelivr.net/npm/vega@5/build/vega.js',\n vegaLite: scheme + 'cdn.jsdelivr.net/npm/vega-lite@5/build/vega-lite.js',\n vegaEmbed: scheme + 'cdn.jsdelivr.net/npm/vega-embed@6/build/vega-embed.js'\n }\n};\n\nfunction setCDN(name, scheme_default, scheme_dist) {\n if (name in cdnSrc) {\n cdnName = name;\n }\n\n if (typeof scheme_default === 'string' && scheme_default) {\n defScheme = scheme_default;\n }\n\n if (typeof scheme_dist === 'string' && scheme_dist) {\n distScheme = scheme_dist;\n }\n}\n\nfunction getCDN() {\n return cdnName;\n}\n\nfunction getName(name) {\n if (typeof name === 'object') {\n const key = Object.keys(name)[0];\n const val = name[key];\n if (typeof val === 'string') {\n return key + \"-\" + val;\n } \n }\n\n return name;\n}\n\nfunction getSrc(name, def) {\n if (cdnSrc.hasOwnProperty(cdnName)) {\n const cdn = cdnSrc[cdnName];\n let url = '';\n if (typeof name === 'object') {\n const key = Object.keys(name)[0];\n const val = name[key];\n if (cdn[key] && typeof val === 'string' && val && cdn[key][val]) {\n url = cdn[key][val];\n }\n } else if (cdn[name]) {\n url = cdn[name];\n }\n\n if (url) {\n if (url.substring(0, scheme.length) === scheme) {\n def = url;\n } else if (url.substring(0, 8) === '../dist/') {\n def = distScheme + url;\n } else {\n def = defScheme + url;\n }\n }\n }\n return def;\n}\n\nfunction loadScript(name, src) {\n return new Promise((resovle, reject) => {\n if (!name || typeof document === 'undefined') {\n reject('Args is invaild!');\n }\n\n if (typeof src === 'undefined') {\n src = '';\n }\n\n src = getSrc(name, src);\n if (!src) {\n reject(name + ' script source invaild!');\n }\n\n const id = 'script-' + getName(name).toLowerCase();\n let script = document.getElementById(id);\n if (script) {\n return resovle(name);\n }\n\n const head = document.head || document.getElementsByTagName('head')[0];\n script = document.createElement('script');\n script.src = src;\n script.id = id;\n script.onload = () => {\n resovle(name);\n };\n head.appendChild(script);\n });\n}\n\nfunction unloadScript(name) {\n name = getName(name);\n const e = document.getElementById('script-' + name.toLowerCase());\n if (e) {\n const head = document.head || document.getElementsByTagName('head')[0];\n head.removeChild(e);\n }\n}\n\nfunction loadStyleSheet(name, css) {\n if (!name || typeof document === 'undefined') {\n return '';\n }\n\n if (typeof css === 'undefined') {\n css = '';\n }\n\n css = getSrc(name, css);\n if (!css) {\n return '';\n }\n\n const id = 'css-' + getName(name).toLowerCase();\n let script = document.getElementById(id);\n if (!script) {\n var head = document.head || document.getElementsByTagName('head')[0];\n var link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = css;\n link.id = id;\n head.appendChild(link);\n }\n return cdnName === 'local' ? '' : css;\n}\n\nfunction unloadStyleSheet(name) {\n name = getName(name);\n const e = document.getElementById('css-' + name.toLowerCase());\n if (e) {\n const head = document.head || document.getElementsByTagName('head')[0];\n head.removeChild(e);\n }\n}\n\nconst cdnjs = {\n setCDN,\n getCDN,\n getSrc,\n loadScript,\n unloadScript,\n loadStyleSheet,\n unloadStyleSheet\n};\n\nexport default cdnjs;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nfunction loadStyle(name, css) {\n if (!name || !css || typeof document === 'undefined') {\n return false;\n }\n\n const id = 'css-' + name.toLowerCase();\n const script = document.getElementById(id);\n if (!script) {\n const head = document.head || document.getElementsByTagName('head')[0];\n const style = document.createElement('style');\n style.id = id;\n style.innerText = css;\n head.appendChild(style);\n }\n return true;\n}\n\nfunction loadScript(id, code) {\n return new Promise((res, rej) => {\n if (!code || typeof document === 'undefined') {\n rej('Args is invaild!');\n }\n\n const body = document.body;\n let script = document.getElementById(id);\n if (script) {\n body.removeChild(script);\n } else {\n script = document.createElement('script');\n script.id = id;\n }\n script.type = \"text/javascript\";\n script.text = code;\n body.appendChild(script);\n res(true);\n });\n}\n\nfunction interopDefault(ex) {\n return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;\n}\n\nfunction renderCacheElement(doc, id, name, callback) {\n if (typeof window !== 'undefined' && window.document) {\n doc = window.document;\n }\n const el = doc.createElement('div');\n el.id = id;\n el.className = name;\n el.style.display = 'none';\n doc.body.appendChild(el);\n if (typeof callback === 'function' && callback) {\n const result = callback(el);\n if (result instanceof Promise) {\n result.then(el => {\n doc.body.removeChild(el);\n el.style.display = '';\n });\n return el.outerHTML;\n }\n }\n doc.body.removeChild(el);\n el.style.display = '';\n return el.outerHTML;\n}\n\nfunction renderElement(doc, id, name) {\n if (typeof window !== 'undefined' && window.document) {\n doc = window.document;\n }\n const el = doc.createElement('div');\n el.id = id;\n el.className = name;\n doc.body.appendChild(el);\n return el\n}\n\nfunction createElementMeta(name, element, callback) {\n const langattr = element.dataset.lang;\n const langobj = langattr ? JSON.parse(langattr) : null;\n let diagramClass = '';\n if (langobj) {\n if (\n (typeof langobj.codeblock === 'boolean' && langobj.codeblock) ||\n (typeof langobj.codeblock === 'string' && langobj.codeblock.toLowerCase() === 'true')\n ) {\n return false;\n }\n\n if (langobj.align) {\n //default left\n if (langobj.align === 'center') {\n diagramClass = 'diagram-center';\n } else if (langobj.align === 'right') {\n diagramClass = 'diagram-right';\n }\n }\n }\n\n let code = element.textContent.trim();\n if (callback && typeof callback === 'function') {\n code = callback(code);\n }\n const className =\n (element.classList.length > 0 ? element.classList[0] : '') +\n (!element.className || !diagramClass ? '' : ' ') +\n diagramClass;\n const id = name + '-' + Date.now() + '-' + Math.floor(Math.random() * 10000);\n element.id = id;\n return {\n id: id,\n className: className,\n data: code,\n element: element, \n };\n}\n\nconst utils = {\n interopDefault,\n loadStyle,\n loadScript,\n renderCacheElement,\n renderElement,\n createElementMeta,\n};\n\nexport default utils;\n","/*\n * Copyright (c) 2024-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown abc extension for markdown\n */\n'use strict';\n\nconst extName = 'abc';\nconst cssCdnName = 'ABCJSCSS';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown abcjs extension can only be used in browser environment!');\n}\n\nimport format from './log';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof ABCJS === 'undefined') {\n var ABCJS = window.ABCJS || undefined;\n} \n\nfunction hasAbc() {\n return !!ABCJS;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasAbc();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) {\n dync = true;\n cdnjs.loadStyleSheet(cssCdnName);\n utils.loadStyle('abc-audio', '.highlight{fill: #0a9ecc;} .abcjs-cursor{stroke: red;}' +\n ' .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed{border: none;}' +\n ' .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed svg path{fill: #6eaa49;}');\n cdnjs.loadScript('ABCJS').then(name => {\n ABCJS = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasAbc()) return;\n cdnjs.unloadScript('ABCJS');\n cdnjs.unloadStyleSheet(cssCdnName);\n ABCJS = null;\n window.ABCJS = null;\n dync = false;\n}\n\nvar abcOptions = {\n\tadd_classes: true,\n\tresponsive: \"resize\"\n};\n\nfunction CursorControl(id) {\n\tconst self = this;\n\n\tself.onReady = function() {\n\t};\n\tself.onStart = function() {\n\t\tconst svg = document.querySelector(`#${id} svg`);\n\t\tconst cursor = document.createElementNS(\"http://www.w3.org/2000/svg\", \"line\");\n\t\tcursor.setAttribute(\"class\", \"abcjs-cursor\");\n\t\tcursor.setAttributeNS(null, 'x1', 0);\n\t\tcursor.setAttributeNS(null, 'y1', 0);\n\t\tcursor.setAttributeNS(null, 'x2', 0);\n\t\tcursor.setAttributeNS(null, 'y2', 0);\n\t\tsvg.appendChild(cursor);\n\n\t};\n\tself.beatSubdivisions = 2;\n\tself.onBeat = function(beatNumber, totalBeats, totalTime) {\n\t};\n\tself.onEvent = function(ev) {\n\t\tif (ev.measureStart && ev.left === null)\n\t\t\treturn; // this was the second part of a tie across a measure line. Just ignore it.\n\n\t\tconst lastSelection = document.querySelectorAll(`#${id} svg .highlight`);\n\t\tfor (let k = 0; k < lastSelection.length; k++)\n\t\t\tlastSelection[k].classList.remove(\"highlight\");\n\n\t\tfor (let i = 0; i < ev.elements.length; i++ ) {\n\t\t\tconst note = ev.elements[i];\n\t\t\tfor (let j = 0; j < note.length; j++) {\n\t\t\t\tnote[j].classList.add(\"highlight\");\n\t\t\t}\n\t\t}\n\n\t\tconst cursor = document.querySelector(`#${id} svg .abcjs-cursor`);\n\t\tif (cursor) {\n\t\t\tcursor.setAttribute(\"x1\", ev.left - 2);\n\t\t\tcursor.setAttribute(\"x2\", ev.left - 2);\n\t\t\tcursor.setAttribute(\"y1\", ev.top);\n\t\t\tcursor.setAttribute(\"y2\", ev.top + ev.height);\n\t\t}\n\t};\n\tself.onFinished = function() {\n\t\tconst els = document.querySelectorAll(`#${id} svg .highlight`);\n\t\tfor (let i = 0; i < els.length; i++ ) {\n\t\t\tels[i].classList.remove(\"highlight\");\n\t\t}\n\t\tconst cursor = document.querySelector(`#${id} svg .abcjs-cursor`);\n\t\tif (cursor) {\n\t\t\tcursor.setAttribute(\"x1\", 0);\n\t\t\tcursor.setAttribute(\"x2\", 0);\n\t\t\tcursor.setAttribute(\"y1\", 0);\n\t\t\tcursor.setAttribute(\"y2\", 0);\n\t\t}\n\t};\n}\n\nlet synthControl;\n\nfunction load(audio, render, abc) {\n\tif (ABCJS.synth.supportsAudio()) {\n\t\tsynthControl = new ABCJS.synth.SynthController();\n\t\tsynthControl.load(`#${audio}`, new CursorControl(render), {displayLoop: true, displayRestart: true, displayPlay: true, displayProgress: true, displayWarp: true});\n\t} else {\n\t\tdocument.querySelector(`#${audio}`).innerHTML = \"
    Audio is not supported in this browser.
    \";\n\t}\n\tsetTune(render, false, abc);\n}\n\nfunction setTune(render, userAction, abc) {\n\tsynthControl.disable(true);\n\tconst visualObj = ABCJS.renderAbc(`${render}`, abc, abcOptions)[0];\n\tconst midiBuffer = new ABCJS.synth.CreateSynth();\n\tmidiBuffer.init({\n\t\tvisualObj: visualObj,\n\t}).then(function (response) {\n\t\t// console.log(response);\n\t\tif (synthControl) {\n\t\t\tsynthControl.setTune(visualObj, userAction).then(function (response) {\n\t\t\t\tconsole.log(format(\"Audio successfully loaded.\"));\n\t\t\t}).catch(function (error) {\n\t\t\t\tconsole.warn(\"Audio problem:\", error);\n\t\t\t});\n\t\t}\n\t}).catch(function (error) {\n\t\tconsole.warn(\"Audio problem:\", error);\n\t});\n}\n\nfunction onRenderAbc(resolve, scripts, res) {\n if (hasAbc()) {\n const id = res.id;\n const name = res.className;\n const data = btoa(res.data);\n const cssLink = res.cssLink;\n // const doc = res.element.ownerDocument;\n const audio = id + '-audio';\n let html = cssLink\n ? `
    `\n : `
    `;\n html +=`
    `;\n res.element.parentNode.outerHTML = html;\n // const renderElement = doc.getElementById(id);\n // ABCJS.renderAbc(element, data);\n const script = {\n id: id,\n code: `(function() {\n if (typeof window !== 'undefined' && window.dispatchEvent) {\n window.dispatchEvent(new CustomEvent('abcjs',{\n detail: {\n audio: '${audio}',\n render: '${id}',\n data: '${data}'\n }\n }));\n }\n })();`\n }\n scripts.push(script);\n return resolve(true);\n }\n\n setTimeout(() => {\n onRenderAbc(resolve, scripts, res);\n }, 10);\n}\n\n/**\n * render abc graphs\n */\nfunction renderAbc(element, scripts) {\n return new Promise(resolve => {\n let meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return resolve(false);\n }\n\n meta.cssLink = cdnjs.getSrc(cssCdnName);\n onRenderAbc(resolve, scripts, meta);\n });\n}\n\n//
    \nfunction renderAbcElements(elements, scripts) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderAbc(element, scripts));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n\nfunction showdownAbc() {\n let hasEvent = false;\n return [\n {\n type: 'output',\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the abc in code blocks\n const elements = wrapper.querySelectorAll(`code.${extName}.language-${extName}`);\n if (!elements.length) {\n return false;\n }\n\n if (!hasEvent) {\n if (typeof window !== 'undefined' && window.dispatchEvent) {\n hasEvent = true;\n // Listen sequence custom event\n window.addEventListener('abcjs', event => {\n if (event.detail) {\n load(event.detail.audio, event.detail.render, atob(event.detail.data));\n }\n }); \n }\n }\n\n this.config = {\n cssLink: cdnjs.getSrc(cssCdnName)\n };\n console.log(format(`Begin render ${extName} elements.`));\n return renderAbcElements(elements, obj.scripts).then(() => {\n console.log(format(`End render ${extName} elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownAbc;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown toc extension for markdown\n */\n'use strict';\n\nimport format from './log';\n\nfunction createHeadingElement(wrapper, element, toc, nexthead) {\n try {\n if (nexthead) {\n toc = toc.appendChild(wrapper.ownerDocument.createElement('ul'));\n }\n const child = toc\n .appendChild(wrapper.ownerDocument.createElement('li'))\n .appendChild(wrapper.ownerDocument.createElement('a'));\n if (element) {\n child.appendChild(wrapper.ownerDocument.createTextNode(element.textContent));\n child.href = '#' + element.id;\n }\n } catch {\n console.warn(format('append child error:'), wrapper);\n }\n return toc;\n}\n\nfunction appendTocElement(wrapper, element, currTocNode, headingLevel) {\n // If the current heading level is not greater than the heading level of current toc node,\n // return the toc node whose heading level is less than the current heading level in the toc node list.\n // At the same time, clearing the invalid toc node.\n if (headingLevel <= currTocNode.headingLevel) {\n let tempTocNode = null;\n while (currTocNode) {\n if (headingLevel > currTocNode.headingLevel) break;\n tempTocNode = currTocNode;\n currTocNode = tempTocNode.parentNode;\n // Remove toc node from node list and clean it.\n tempTocNode.parentNode = null;\n tempTocNode.toc = null;\n tempTocNode.headingLevel = null;\n tempTocNode.preLevel = null;\n }\n if (currTocNode) appendTocElement(wrapper, element, currTocNode, headingLevel);\n return currTocNode;\n }\n\n // If the current heading level is greater than the heading level of\n // the latest heading of the current toc node,\n // you need to create a new level heading with out list.\n // Otherwise add a heading of the same heading level.\n if (headingLevel > currTocNode.preLevel) {\n currTocNode.preLevel ++;\n while (headingLevel > currTocNode.preLevel) {\n currTocNode.toc = createHeadingElement(wrapper, null, currTocNode.toc, true);\n currTocNode.preLevel ++;\n }\n currTocNode.toc = createHeadingElement(wrapper, element, currTocNode.toc, true);\n } else {\n while (headingLevel < currTocNode.preLevel) {\n currTocNode.toc = currTocNode.toc.parentNode;\n currTocNode.preLevel--;\n }\n createHeadingElement(wrapper, element, currTocNode.toc, false);\n }\n\n if (currTocNode.parentNode) appendTocElement(wrapper, element, currTocNode.parentNode, headingLevel);\n return currTocNode;\n}\n\nfunction renderTocElements(wrapper) {\n let element = null;\n let headingLevel = 0;\n let currTocNode = null;\n let result = false;\n const elements = wrapper.querySelectorAll('p,h1,h2,h3,h4,h5,h6');\n for (let i = 0; i < elements.length; i++) {\n element = elements[i];\n\n // Match the element text is [toc].\n // And replace this element with out list that classname is 'showdown-toc'.\n if (element.textContent.trim().toLowerCase() == '[toc]') {\n // New table of contents container.\n let toc = wrapper.ownerDocument.createElement('ul');\n toc.className = 'showdown-toc';\n element.parentNode.replaceChild(toc, element);\n let tocNode = {\n parentNode: null,\n toc: toc,\n headingLevel: headingLevel,\n preLevel: 0\n };\n if (currTocNode) {\n // If the heading level of the TOC node is higher than\n // that of the previous TOC node,\n // the TOC node is a child of the previous TOC node.\n // Otherwise, look up the TOC node in the node list\n // whose heading level is not greater than the TOC node.\n if (headingLevel > currTocNode.headingLevel) {\n tocNode.parentNode = currTocNode;\n } else {\n // The code will never be executed, just to prevent logic loss.\n // Because invalid nodes have been cleared in appendTocElement method.\n let prev = currTocNode;\n while (headingLevel < prev.headingLevel) {\n prev = prev.parentNode;\n }\n if (prev) {\n if (headingLevel === prev.headingLevel) {\n tocNode.parentNode = prev.parentNode;\n } else {\n tocNode.parentNode = prev;\n }\n }\n }\n }\n currTocNode = tocNode;\n result = true;\n }\n // That's going to be what we use as contents entries\n // for this table of contents.\n else if (element['tagName']) {\n switch (element['tagName']) {\n case 'H1':\n case 'H2':\n case 'H3':\n case 'H4':\n case 'H5':\n case 'H6':\n headingLevel = parseInt(element['tagName'].substr(1));\n if (currTocNode) {\n if (!currTocNode.preLevel) {\n currTocNode.preLevel = headingLevel;\n }\n\n currTocNode = appendTocElement(wrapper, element, currTocNode, headingLevel);\n }\n break;\n }\n }\n }\n\n // Final, clear all toc node in node list.\n while (currTocNode) {\n let tempTocNode = currTocNode;\n currTocNode = tempTocNode.parentNode;\n // Clean toc node.\n tempTocNode.parentNode = null;\n tempTocNode.toc = null;\n tempTocNode.headingLevel = null;\n tempTocNode.preLevel = null;\n }\n return result;\n}\n\nfunction showdownToc() {\n const parser = new DOMParser();\n return [\n {\n type: 'output',\n filter: function(html) {\n // parse html\n const doc = parser.parseFromString(html, 'text/html');\n const wrapper = typeof doc.body !== 'undefined' ? doc.body : doc;\n if (!renderTocElements(wrapper)) {\n return html;\n }\n // return html text content\n return wrapper.innerHTML;\n }\n }\n ];\n}\n\nexport default showdownToc;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown viz extension for markdown\n */\n'use strict';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown viz extension can only be used in browser environment!');\n}\n\nimport format from './log';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof Viz === 'undefined') {\n var Viz = window.Viz || undefined;\n}\n\nconst engines = ['circo', 'dot', 'neato', 'osage', 'twopi'];\n\nfunction hasViz() {\n return typeof Viz !== 'undefined' && Viz && typeof Viz.instance !== 'undefined'\n ? true\n : false;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasViz();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) { \n dync = true;\n cdnjs.loadScript('Viz').then(name => {\n Viz = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasViz()) return;\n cdnjs.unloadScript('Viz');\n Viz = null;\n window.Viz = null;\n dync = false; \n}\n\nfunction onRenderViz(resolve, res) {\n if (hasViz()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const el = res.element;\n const langattr = res.element.dataset.lang;\n let engine = 'dot';\n if (langattr) {\n const obj = JSON.parse(langattr);\n if (obj && obj.engine && engines.indexOf(obj.engine) != -1) {\n engine = obj.engine;\n }\n }\n Viz.instance().then(viz => {\n const svg = viz.renderString(data, { format: 'svg', engine: engine });\n el.parentNode.outerHTML = `
    ${svg}
    `;\n resolve(true)\n });\n return;\n }\n\n setTimeout(() => {\n onRenderViz(resolve, res);\n }, 10);\n}\n\n/**\n * render Viz graphs\n */\nfunction renderViz(element) {\n return new Promise(resolve => {\n const meta = utils.createElementMeta(\"viz\", element);\n if (!meta) {\n return resolve(false);\n }\n \n onRenderViz(resolve, meta);\n });\n}\n\n//
    \nfunction renderVizElements(elements) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderViz(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\nfunction showdownViz() {\n return [\n {\n type: 'output',\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the Viz in code blocks\n const elements = wrapper.querySelectorAll('code.dot.language-dot');\n if (!elements.length) {\n return false;\n }\n console.log(format(`Begin render dot elements.`));\n return renderVizElements(elements).then(() => {\n console.log(format(`End render dot elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownViz;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown vega extension for markdown\n */\n'use strict';\n\nconst extName = \"vega\";\n\nif (typeof window === 'undefined') {\n throw Error('The showdown vega extension can only be used in browser environment!');\n}\n\nimport format from './log';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof vegaEmbed === 'undefined') {\n var vegaEmbed = window.vegaEmbed || undefined;\n}\n\nfunction hasVegaEmbed() {\n return typeof vegaEmbed !== 'undefined' && vegaEmbed ? true : false;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasVegaEmbed();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) { \n dync = true;\n cdnjs\n .loadScript(extName)\n .then(() => {\n return cdnjs.loadScript('vegaLite');\n })\n .then(() => {\n return cdnjs.loadScript('vegaEmbed');\n })\n .then(name => {\n vegaEmbed = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasVegaEmbed()) return;\n cdnjs.unloadScript('vegaEmbed');\n cdnjs.unloadScript('vegaLite');\n cdnjs.unloadScript(extName);\n const vegaStyle = document.getElementById('vega-embed-style');\n if (vegaStyle && vegaStyle.tagName.toLowerCase() === 'style') {\n const head = document.head || document.getElementsByTagName('head')[0];\n head.removeChild(vegaStyle);\n }\n vegaEmbed = null;\n window.vegaEmbed = null;\n dync = false; \n}\n\n/**\n * render VegaEmbed graphs\n */\nfunction renderVega(element, options, scripts, isVegaLite) {\n const meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return Promise.resolve(false);\n }\n\n const config = JSON.stringify(options); \n const data = JSON.stringify(JSON.parse(meta.data));\n const id = meta.id;\n const script = {\n id: id,\n code: `(function() {\n let el = document.getElementById('${id}');\n if (el){\n vegaEmbed(el, JSON.parse('${data}'), JSON.parse('${config}'));\n }\n })();`\n }\n scripts.push(script);\n return new Promise(resolve => {\n onRenderVega(resolve, meta);\n });\n}\n\n//
    \nfunction renderVegaElements(vegaElements, vegaLiteElements, scripts, options) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n vegaElements.forEach(element => {\n promiseArray.push(renderVega(element, options, scripts, false));\n });\n vegaLiteElements.forEach(element => {\n promiseArray.push(renderVega(element, options, scripts, true));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// theme: 'excel' | 'ggplot2' | 'quartz' | 'vox' | 'dark'\nconst getOptions = (userOptions = {}) => ({\n actions: { editor: false },\n theme: 'vox',\n tooltip: false,\n renderer: 'svg',\n ...userOptions\n});\n\nfunction onRenderVega(resolve, res) {\n if (hasVegaEmbed()) {\n const id = res.id;\n const name = res.className;\n const node = res.element.parentNode;\n node.outerHTML = `
    `;\n return resolve(true);\n }\n \n setTimeout(() => {\n onRenderVega(resolve, res);\n }, 10);\n}\n\nfunction showdownVega(userOptions) {\n const options = getOptions(userOptions);\n\n return [\n {\n type: 'output',\n config: options,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n\n // find the VegaEmbed in code blocks\n const vegaElements = wrapper.querySelectorAll('code.vega.language-vega');\n const vegaLiteElements = wrapper.querySelectorAll('code.vega-lite.language-vega-lite');\n if (!vegaElements.length && !vegaLiteElements.length) {\n return false;\n }\n\n console.log(format(`Begin render vega elements.`));\n return renderVegaElements(vegaElements, vegaLiteElements, obj.scripts, this.config).then(() => {\n console.log(format(`End render vega elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownVega;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown align extension for markdown\n */\n'use strict';\n\nfunction renderAlignElements(wrapper) {\n let element = null;\n let childNode = null;\n let result = false;\n const elements = wrapper.querySelectorAll('p, li, h1, h2, h3, h4, h5, h6, div.paragraph');\n for (let i = 0; i < elements.length; i++) {\n element = elements[i];\n childNode = element.firstChild;\n while (childNode) {\n // Text node type is 3.\n if (childNode.nodeType === 3) {\n // Does the element consist of ':-:' or '--:'\n let results = childNode.nodeValue.match(/^([\\s\\S]*?)([:-]-:)(?:[\\s]?)([\\s\\S]*)$/);\n if (results) {\n if (results[2] === ':-:') {\n // align-center\n childNode.nodeValue = results[3];\n if (element.className) {\n element.className += ` align-center`;\n } else {\n element.className = `align-center`;\n }\n result = true;\n } else if (results[2] === '--:') {\n //align-right\n childNode.nodeValue = results[3];\n if (element.className) {\n element.className += ` align-right`;\n } else {\n element.className = `align-right`;\n }\n result = true;\n }\n //default algin-left\n }\n break;\n }\n childNode = childNode.nextSibling;\n }\n }\n return result;\n}\n\nfunction showdownAlign() {\n const parser = new DOMParser();\n return [\n {\n type: 'output',\n filter: function(html) {\n // parse html\n const doc = parser.parseFromString(html, 'text/html');\n const wrapper = typeof doc.body !== 'undefined' ? doc.body : doc;\n if (!renderAlignElements(wrapper)) {\n return html;\n }\n // return html text content\n return wrapper.innerHTML;\n }\n }\n ];\n}\n\nexport default showdownAlign;\n","/*\nBased on ASCIIMathTeXImg.js but now part of https://github.com/jhuix/showdowns.git\n\nBased on ASCIIMathML, Version 1.4.7 Aug 30, 2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen\nModified with TeX conversion for IMG rendering Sept 6, 2006 (c) David Lippman http://www.pierce.ctc.edu/dlippman\n Updated to match ver 2.2 Mar 3, 2014\n Latest at https://github.com/mathjax/asciimathml\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\nvar config = {\n decimalsign: \".\" // change to \",\" if you like, beware of `(1,2)`!\n};\n\nvar CONST = 0,\n UNARY = 1,\n BINARY = 2,\n INFIX = 3,\n LEFTBRACKET = 4,\n RIGHTBRACKET = 5,\n SPACE = 6,\n UNDEROVER = 7,\n DEFINITION = 8,\n LEFTRIGHT = 9,\n TEXT = 10; // token types\n\nvar AMsqrt = { input: 'sqrt', tag: 'msqrt', output: 'sqrt', tex: null, ttype: UNARY },\n AMroot = { input: 'root', tag: 'mroot', output: 'root', tex: null, ttype: BINARY },\n AMfrac = { input: 'frac', tag: 'mfrac', output: '/', tex: null, ttype: BINARY },\n AMdiv = { input: '/', tag: 'mfrac', output: '/', tex: null, ttype: INFIX },\n AMover = { input: 'stackrel', tag: 'mover', output: 'stackrel', tex: null, ttype: BINARY },\n AMsub = { input: '_', tag: 'msub', output: '_', tex: null, ttype: INFIX },\n AMsup = { input: '^', tag: 'msup', output: '^', tex: null, ttype: INFIX },\n AMtext = { input: 'text', tag: 'mtext', output: 'text', tex: null, ttype: TEXT },\n AMmbox = { input: 'mbox', tag: 'mtext', output: 'mbox', tex: null, ttype: TEXT },\n AMquote = { input: '\"', tag: 'mtext', output: 'mbox', tex: null, ttype: TEXT };\n\nvar AMsymbols = [\n //some greek symbols\n { input: 'alpha', tag: 'mi', output: '\\u03B1', tex: null, ttype: CONST },\n { input: 'beta', tag: 'mi', output: '\\u03B2', tex: null, ttype: CONST },\n { input: 'chi', tag: 'mi', output: '\\u03C7', tex: null, ttype: CONST },\n { input: 'delta', tag: 'mi', output: '\\u03B4', tex: null, ttype: CONST },\n { input: 'Delta', tag: 'mo', output: '\\u0394', tex: null, ttype: CONST },\n { input: 'epsi', tag: 'mi', output: '\\u03B5', tex: 'epsilon', ttype: CONST },\n { input: 'varepsilon', tag: 'mi', output: '\\u025B', tex: null, ttype: CONST },\n { input: 'eta', tag: 'mi', output: '\\u03B7', tex: null, ttype: CONST },\n { input: 'gamma', tag: 'mi', output: '\\u03B3', tex: null, ttype: CONST },\n { input: 'Gamma', tag: 'mo', output: '\\u0393', tex: null, ttype: CONST },\n { input: 'iota', tag: 'mi', output: '\\u03B9', tex: null, ttype: CONST },\n { input: 'kappa', tag: 'mi', output: '\\u03BA', tex: null, ttype: CONST },\n { input: 'lambda', tag: 'mi', output: '\\u03BB', tex: null, ttype: CONST },\n { input: 'Lambda', tag: 'mo', output: '\\u039B', tex: null, ttype: CONST },\n { input: 'lamda', tag: 'mi', output: 'lambda', tex: null, ttype: DEFINITION },\n { input: 'Lamda', tag: 'mi', output: 'Lambda', tex: null, ttype: DEFINITION },\n { input: 'mu', tag: 'mi', output: '\\u03BC', tex: null, ttype: CONST },\n { input: 'nu', tag: 'mi', output: '\\u03BD', tex: null, ttype: CONST },\n { input: 'omega', tag: 'mi', output: '\\u03C9', tex: null, ttype: CONST },\n { input: 'Omega', tag: 'mo', output: '\\u03A9', tex: null, ttype: CONST },\n { input: 'phi', tag: 'mi', output: '\\u03C6', tex: null, ttype: CONST },\n { input: 'varphi', tag: 'mi', output: '\\u03D5', tex: null, ttype: CONST },\n { input: 'Phi', tag: 'mo', output: '\\u03A6', tex: null, ttype: CONST },\n { input: 'pi', tag: 'mi', output: '\\u03C0', tex: null, ttype: CONST },\n { input: 'Pi', tag: 'mo', output: '\\u03A0', tex: null, ttype: CONST },\n { input: 'psi', tag: 'mi', output: '\\u03C8', tex: null, ttype: CONST },\n { input: 'Psi', tag: 'mi', output: '\\u03A8', tex: null, ttype: CONST },\n { input: 'rho', tag: 'mi', output: '\\u03C1', tex: null, ttype: CONST },\n { input: 'sigma', tag: 'mi', output: '\\u03C3', tex: null, ttype: CONST },\n { input: 'Sigma', tag: 'mo', output: '\\u03A3', tex: null, ttype: CONST },\n { input: 'tau', tag: 'mi', output: '\\u03C4', tex: null, ttype: CONST },\n { input: 'theta', tag: 'mi', output: '\\u03B8', tex: null, ttype: CONST },\n { input: 'vartheta', tag: 'mi', output: '\\u03D1', tex: null, ttype: CONST },\n { input: 'Theta', tag: 'mo', output: '\\u0398', tex: null, ttype: CONST },\n { input: 'upsilon', tag: 'mi', output: '\\u03C5', tex: null, ttype: CONST },\n { input: 'xi', tag: 'mi', output: '\\u03BE', tex: null, ttype: CONST },\n { input: 'Xi', tag: 'mo', output: '\\u039E', tex: null, ttype: CONST },\n { input: 'zeta', tag: 'mi', output: '\\u03B6', tex: null, ttype: CONST },\n\n //binary operation symbols\n { input: '*', tag: 'mo', output: '\\u22C5', tex: 'cdot', ttype: CONST },\n { input: '**', tag: 'mo', output: '\\u2217', tex: 'ast', ttype: CONST },\n { input: '***', tag: 'mo', output: '\\u22C6', tex: 'star', ttype: CONST },\n { input: '//', tag: 'mo', output: '/', tex: '/', ttype: CONST, val: true, notexcopy: true },\n { input: '\\\\\\\\', tag: 'mo', output: '\\\\', tex: 'backslash', ttype: CONST },\n { input: 'setminus', tag: 'mo', output: '\\\\', tex: null, ttype: CONST },\n { input: 'xx', tag: 'mo', output: '\\u00D7', tex: 'times', ttype: CONST },\n { input: '|><', tag: 'mo', output: '\\u22C9', tex: 'ltimes', ttype: CONST },\n { input: '><|', tag: 'mo', output: '\\u22CA', tex: 'rtimes', ttype: CONST },\n { input: '|><|', tag: 'mo', output: '\\u22C8', tex: 'bowtie', ttype: CONST },\n { input: '-:', tag: 'mo', output: '\\u00F7', tex: 'div', ttype: CONST },\n { input: 'divide', tag: 'mo', output: '-:', tex: null, ttype: DEFINITION },\n { input: '@', tag: 'mo', output: '\\u2218', tex: 'circ', ttype: CONST },\n { input: 'o+', tag: 'mo', output: '\\u2295', tex: 'oplus', ttype: CONST },\n { input: 'ox', tag: 'mo', output: '\\u2297', tex: 'otimes', ttype: CONST },\n { input: 'o.', tag: 'mo', output: '\\u2299', tex: 'odot', ttype: CONST },\n { input: 'sum', tag: 'mo', output: '\\u2211', tex: null, ttype: UNDEROVER },\n { input: 'prod', tag: 'mo', output: '\\u220F', tex: null, ttype: UNDEROVER },\n { input: '^^', tag: 'mo', output: '\\u2227', tex: 'wedge', ttype: CONST },\n { input: '^^^', tag: 'mo', output: '\\u22C0', tex: 'bigwedge', ttype: UNDEROVER },\n { input: 'vv', tag: 'mo', output: '\\u2228', tex: 'vee', ttype: CONST },\n { input: 'vvv', tag: 'mo', output: '\\u22C1', tex: 'bigvee', ttype: UNDEROVER },\n { input: 'nn', tag: 'mo', output: '\\u2229', tex: 'cap', ttype: CONST },\n { input: 'nnn', tag: 'mo', output: '\\u22C2', tex: 'bigcap', ttype: UNDEROVER },\n { input: 'uu', tag: 'mo', output: '\\u222A', tex: 'cup', ttype: CONST },\n { input: 'uuu', tag: 'mo', output: '\\u22C3', tex: 'bigcup', ttype: UNDEROVER },\n { input: 'overset', tag: 'mover', output: 'stackrel', tex: null, ttype: BINARY },\n { input: 'underset', tag: 'munder', output: 'stackrel', tex: null, ttype: BINARY },\n\n //binary relation symbols\n { input: '!=', tag: 'mo', output: '\\u2260', tex: 'ne', ttype: CONST },\n { input: ':=', tag: 'mo', output: ':=', tex: null, ttype: CONST },\n { input: 'lt', tag: 'mo', output: '<', tex: null, ttype: CONST },\n { input: 'gt', tag: 'mo', output: '>', tex: null, ttype: CONST },\n { input: '<=', tag: 'mo', output: '\\u2264', tex: 'le', ttype: CONST },\n { input: 'lt=', tag: 'mo', output: '\\u2264', tex: 'leq', ttype: CONST },\n { input: 'gt=', tag: 'mo', output: '\\u2265', tex: 'geq', ttype: CONST },\n { input: '>=', tag: 'mo', output: '\\u2265', tex: 'ge', ttype: CONST },\n { input: '-<', tag: 'mo', output: '\\u227A', tex: 'prec', ttype: CONST },\n { input: '-lt', tag: 'mo', output: '\\u227A', tex: null, ttype: CONST },\n { input: '>-', tag: 'mo', output: '\\u227B', tex: 'succ', ttype: CONST },\n { input: '-<=', tag: 'mo', output: '\\u2AAF', tex: 'preceq', ttype: CONST },\n { input: '>-=', tag: 'mo', output: '\\u2AB0', tex: 'succeq', ttype: CONST },\n { input: 'in', tag: 'mo', output: '\\u2208', tex: null, ttype: CONST },\n { input: '!in', tag: 'mo', output: '\\u2209', tex: 'notin', ttype: CONST },\n { input: 'sub', tag: 'mo', output: '\\u2282', tex: 'subset', ttype: CONST },\n { input: 'sup', tag: 'mo', output: '\\u2283', tex: 'supset', ttype: CONST },\n { input: 'sube', tag: 'mo', output: '\\u2286', tex: 'subseteq', ttype: CONST },\n { input: 'supe', tag: 'mo', output: '\\u2287', tex: 'supseteq', ttype: CONST },\n { input: '-=', tag: 'mo', output: '\\u2261', tex: 'equiv', ttype: CONST },\n { input: '~=', tag: 'mo', output: '\\u2245', tex: 'stackrel{\\\\sim}{=}', notexcopy: true, ttype: CONST }, //back hack b/c mimetex doesn't support /cong\n { input: 'cong', tag: 'mo', output: '~=', tex: null, ttype: DEFINITION },\n { input: '~~', tag: 'mo', output: '\\u2248', tex: 'approx', ttype: CONST },\n { input: 'prop', tag: 'mo', output: '\\u221D', tex: 'propto', ttype: CONST },\n\n //logical symbols\n { input: 'and', tag: 'mtext', output: 'and', tex: null, ttype: SPACE },\n { input: 'or', tag: 'mtext', output: 'or', tex: null, ttype: SPACE },\n { input: 'not', tag: 'mo', output: '\\u00AC', tex: 'neg', ttype: CONST },\n { input: '=>', tag: 'mo', output: '\\u21D2', tex: 'Rightarrow', ttype: CONST },\n { input: 'implies', tag: 'mo', output: '=>', tex: null, ttype: DEFINITION },\n { input: 'if', tag: 'mo', output: 'if', tex: null, ttype: SPACE },\n { input: '<=>', tag: 'mo', output: '\\u21D4', tex: 'Leftrightarrow', ttype: CONST },\n { input: 'iff', tag: 'mo', output: '<=>', tex: null, ttype: DEFINITION },\n { input: 'AA', tag: 'mo', output: '\\u2200', tex: 'forall', ttype: CONST },\n { input: 'EE', tag: 'mo', output: '\\u2203', tex: 'exists', ttype: CONST },\n { input: '_|_', tag: 'mo', output: '\\u22A5', tex: 'bot', ttype: CONST },\n { input: 'TT', tag: 'mo', output: '\\u22A4', tex: 'top', ttype: CONST },\n { input: '|--', tag: 'mo', output: '\\u22A2', tex: 'vdash', ttype: CONST },\n { input: '|==', tag: 'mo', output: '\\u22A8', tex: 'models', ttype: CONST }, //mimetex doesn't support\n\n //grouping brackets\n { input: '(', tag: 'mo', output: '(', tex: null, ttype: LEFTBRACKET, val: true },\n { input: ')', tag: 'mo', output: ')', tex: null, ttype: RIGHTBRACKET, val: true },\n { input: '[', tag: 'mo', output: '[', tex: null, ttype: LEFTBRACKET, val: true },\n { input: ']', tag: 'mo', output: ']', tex: null, ttype: RIGHTBRACKET, val: true },\n { input: 'left(', tag: 'mo', output: '(', tex: '(', notexcopy: true, ttype: LEFTBRACKET, val: true },\n { input: 'right)', tag: 'mo', output: ')', tex: ')', notexcopy: true, ttype: RIGHTBRACKET, val: true },\n { input: 'left[', tag: 'mo', output: '[', tex: '[', notexcopy: true, ttype: LEFTBRACKET, val: true },\n { input: 'right]', tag: 'mo', output: ']', tex: ']', notexcopy: true, ttype: RIGHTBRACKET, val: true },\n { input: '{', tag: 'mo', output: '{', tex: 'lbrace', ttype: LEFTBRACKET },\n { input: '}', tag: 'mo', output: '}', tex: 'rbrace', ttype: RIGHTBRACKET },\n { input: '|', tag: 'mo', output: '|', tex: null, ttype: LEFTRIGHT, val: true },\n { input: '|:', tag: 'mo', output: '|', tex: '|', ttype: LEFTBRACKET, notexcopy: true, val: true },\n { input: ':|', tag: 'mo', output: '|', tex: '|', ttype: RIGHTBRACKET, notexcopy: true, val: true },\n { input: ':|:', tag: 'mo', output: '|', tex: '|', ttype: CONST, notexcopy: true, val: true },\n //{input:\"||\", tag:\"mo\", output:\"||\", tex:null, ttype:LEFTRIGHT},\n { input: '(:', tag: 'mo', output: '\\u2329', tex: 'langle', ttype: LEFTBRACKET },\n { input: ':)', tag: 'mo', output: '\\u232A', tex: 'rangle', ttype: RIGHTBRACKET },\n { input: '<<', tag: 'mo', output: '\\u2329', tex: 'langle', ttype: LEFTBRACKET },\n { input: '>>', tag: 'mo', output: '\\u232A', tex: 'rangle', ttype: RIGHTBRACKET },\n { input: '{:', tag: 'mo', output: '{:', tex: null, ttype: LEFTBRACKET, invisible: true },\n { input: ':}', tag: 'mo', output: ':}', tex: null, ttype: RIGHTBRACKET, invisible: true },\n\n //miscellaneous symbols\n { input: 'int', tag: 'mo', output: '\\u222B', tex: null, ttype: CONST },\n { input: 'dx', tag: 'mi', output: '{:d x:}', tex: null, ttype: DEFINITION },\n { input: 'dy', tag: 'mi', output: '{:d y:}', tex: null, ttype: DEFINITION },\n { input: 'dz', tag: 'mi', output: '{:d z:}', tex: null, ttype: DEFINITION },\n { input: 'dt', tag: 'mi', output: '{:d t:}', tex: null, ttype: DEFINITION },\n { input: 'oint', tag: 'mo', output: '\\u222E', tex: null, ttype: CONST },\n { input: 'del', tag: 'mo', output: '\\u2202', tex: 'partial', ttype: CONST },\n { input: 'grad', tag: 'mo', output: '\\u2207', tex: 'nabla', ttype: CONST },\n { input: '+-', tag: 'mo', output: '\\u00B1', tex: 'pm', ttype: CONST },\n { input: 'O/', tag: 'mo', output: '\\u2205', tex: 'emptyset', ttype: CONST },\n { input: 'oo', tag: 'mo', output: '\\u221E', tex: 'infty', ttype: CONST },\n { input: 'aleph', tag: 'mo', output: '\\u2135', tex: null, ttype: CONST },\n { input: '...', tag: 'mo', output: '...', tex: 'ldots', ttype: CONST },\n { input: ':.', tag: 'mo', output: '\\u2234', tex: 'therefore', ttype: CONST },\n { input: \":'\", tag: 'mo', output: '\\u2235', tex: 'because', ttype: CONST },\n { input: '/_', tag: 'mo', output: '\\u2220', tex: 'angle', ttype: CONST },\n { input: '/_\\\\', tag: 'mo', output: '\\u25B3', tex: 'triangle', ttype: CONST },\n { input: '\\\\ ', tag: 'mo', output: '\\u00A0', tex: null, ttype: CONST, val: true },\n { input: 'frown', tag: 'mo', output: '\\u2322', tex: null, ttype: CONST },\n { input: '%', tag: 'mo', output: '%', tex: '%', ttype: CONST, notexcopy: true },\n { input: 'quad', tag: 'mo', output: '\\u00A0\\u00A0', tex: null, ttype: CONST },\n { input: 'qquad', tag: 'mo', output: '\\u00A0\\u00A0\\u00A0\\u00A0', tex: null, ttype: CONST },\n { input: 'cdots', tag: 'mo', output: '\\u22EF', tex: null, ttype: CONST },\n { input: 'vdots', tag: 'mo', output: '\\u22EE', tex: null, ttype: CONST },\n { input: 'ddots', tag: 'mo', output: '\\u22F1', tex: null, ttype: CONST },\n { input: 'diamond', tag: 'mo', output: '\\u22C4', tex: null, ttype: CONST },\n { input: 'square', tag: 'mo', output: '\\u25A1', tex: 'boxempty', ttype: CONST },\n { input: '|__', tag: 'mo', output: '\\u230A', tex: 'lfloor', ttype: CONST },\n { input: '__|', tag: 'mo', output: '\\u230B', tex: 'rfloor', ttype: CONST },\n { input: '|~', tag: 'mo', output: '\\u2308', tex: 'lceil', ttype: CONST },\n { input: 'lceiling', tag: 'mo', output: '|~', tex: null, ttype: DEFINITION },\n { input: '~|', tag: 'mo', output: '\\u2309', tex: 'rceil', ttype: CONST },\n { input: 'rceiling', tag: 'mo', output: '~|', tex: null, ttype: DEFINITION },\n { input: 'CC', tag: 'mo', output: '\\u2102', tex: 'mathbb{C}', ttype: CONST, notexcopy: true },\n { input: 'NN', tag: 'mo', output: '\\u2115', tex: 'mathbb{N}', ttype: CONST, notexcopy: true },\n { input: 'QQ', tag: 'mo', output: '\\u211A', tex: 'mathbb{Q}', ttype: CONST, notexcopy: true },\n { input: 'RR', tag: 'mo', output: '\\u211D', tex: 'mathbb{R}', ttype: CONST, notexcopy: true },\n { input: 'ZZ', tag: 'mo', output: '\\u2124', tex: 'mathbb{Z}', ttype: CONST, notexcopy: true },\n { input: 'f', tag: 'mi', output: 'f', tex: null, ttype: UNARY, func: true, val: true },\n { input: 'g', tag: 'mi', output: 'g', tex: null, ttype: UNARY, func: true, val: true },\n { input: \"''\", tag: 'mo', output: \"''\", tex: null, val: true },\n { input: \"'''\", tag: 'mo', output: \"'''\", tex: null, val: true },\n { input: \"''''\", tag: 'mo', output: \"''''\", tex: null, val: true },\n\n //standard functions\n { input: 'lim', tag: 'mo', output: 'lim', tex: null, ttype: UNDEROVER },\n { input: 'Lim', tag: 'mo', output: 'Lim', tex: null, ttype: UNDEROVER },\n { input: 'sin', tag: 'mo', output: 'sin', tex: null, ttype: UNARY, func: true },\n { input: 'cos', tag: 'mo', output: 'cos', tex: null, ttype: UNARY, func: true },\n { input: 'tan', tag: 'mo', output: 'tan', tex: null, ttype: UNARY, func: true },\n { input: 'arcsin', tag: 'mo', output: 'arcsin', tex: null, ttype: UNARY, func: true },\n { input: 'arccos', tag: 'mo', output: 'arccos', tex: null, ttype: UNARY, func: true },\n { input: 'arctan', tag: 'mo', output: 'arctan', tex: null, ttype: UNARY, func: true },\n { input: 'sinh', tag: 'mo', output: 'sinh', tex: null, ttype: UNARY, func: true },\n { input: 'cosh', tag: 'mo', output: 'cosh', tex: null, ttype: UNARY, func: true },\n { input: 'tanh', tag: 'mo', output: 'tanh', tex: null, ttype: UNARY, func: true },\n { input: 'cot', tag: 'mo', output: 'cot', tex: null, ttype: UNARY, func: true },\n { input: 'coth', tag: 'mo', output: 'coth', tex: null, ttype: UNARY, func: true },\n { input: 'sech', tag: 'mo', output: 'sech', tex: null, ttype: UNARY, func: true },\n { input: 'csch', tag: 'mo', output: 'csch', tex: null, ttype: UNARY, func: true },\n { input: 'sec', tag: 'mo', output: 'sec', tex: null, ttype: UNARY, func: true },\n { input: 'csc', tag: 'mo', output: 'csc', tex: null, ttype: UNARY, func: true },\n { input: 'log', tag: 'mo', output: 'log', tex: null, ttype: UNARY, func: true },\n { input: 'ln', tag: 'mo', output: 'ln', tex: null, ttype: UNARY, func: true },\n { input: 'abs', tag: 'mo', output: 'abs', tex: null, ttype: UNARY, notexcopy: true, rewriteleftright: ['|', '|'] },\n {\n input: 'norm',\n tag: 'mo',\n output: 'norm',\n tex: null,\n ttype: UNARY,\n notexcopy: true,\n rewriteleftright: ['\\\\|', '\\\\|']\n },\n {\n input: 'floor',\n tag: 'mo',\n output: 'floor',\n tex: null,\n ttype: UNARY,\n notexcopy: true,\n rewriteleftright: ['\\\\lfloor', '\\\\rfloor']\n },\n {\n input: 'ceil',\n tag: 'mo',\n output: 'ceil',\n tex: null,\n ttype: UNARY,\n notexcopy: true,\n rewriteleftright: ['\\\\lceil', '\\\\rceil']\n },\n { input: 'Sin', tag: 'mo', output: 'Sin', tex: null, ttype: UNARY, func: true },\n { input: 'Cos', tag: 'mo', output: 'Cos', tex: null, ttype: UNARY, func: true },\n { input: 'Tan', tag: 'mo', output: 'Tan', tex: null, ttype: UNARY, func: true },\n { input: 'Arcsin', tag: 'mo', output: 'Arcsin', tex: null, ttype: UNARY, func: true },\n { input: 'Arccos', tag: 'mo', output: 'Arccos', tex: null, ttype: UNARY, func: true },\n { input: 'Arctan', tag: 'mo', output: 'Arctan', tex: null, ttype: UNARY, func: true },\n { input: 'Sinh', tag: 'mo', output: 'Sinh', tex: null, ttype: UNARY, func: true },\n { input: 'Cosh', tag: 'mo', output: 'Cosh', tex: null, ttype: UNARY, func: true },\n { input: 'Tanh', tag: 'mo', output: 'Tanh', tex: null, ttype: UNARY, func: true },\n { input: 'Cot', tag: 'mo', output: 'Cot', tex: null, ttype: UNARY, func: true },\n { input: 'Sec', tag: 'mo', output: 'Sec', tex: null, ttype: UNARY, func: true },\n { input: 'Csc', tag: 'mo', output: 'Csc', tex: null, ttype: UNARY, func: true },\n { input: 'Log', tag: 'mo', output: 'Log', tex: null, ttype: UNARY, func: true },\n { input: 'Ln', tag: 'mo', output: 'Ln', tex: null, ttype: UNARY, func: true },\n { input: 'Abs', tag: 'mo', output: 'abs', tex: null, ttype: UNARY, notexcopy: true, rewriteleftright: ['|', '|'] },\n\n { input: 'det', tag: 'mo', output: 'det', tex: null, ttype: UNARY, func: true },\n { input: 'exp', tag: 'mo', output: 'exp', tex: null, ttype: UNARY, func: true },\n { input: 'dim', tag: 'mo', output: 'dim', tex: null, ttype: CONST },\n { input: 'mod', tag: 'mo', output: 'mod', tex: 'text{mod}', ttype: CONST, notexcopy: true },\n { input: 'gcd', tag: 'mo', output: 'gcd', tex: null, ttype: UNARY, func: true },\n { input: 'lcm', tag: 'mo', output: 'lcm', tex: 'text{lcm}', ttype: UNARY, func: true, notexcopy: true },\n { input: 'lub', tag: 'mo', output: 'lub', tex: null, ttype: CONST },\n { input: 'glb', tag: 'mo', output: 'glb', tex: null, ttype: CONST },\n { input: 'min', tag: 'mo', output: 'min', tex: null, ttype: UNDEROVER },\n { input: 'max', tag: 'mo', output: 'max', tex: null, ttype: UNDEROVER },\n\n //arrows\n { input: 'uarr', tag: 'mo', output: '\\u2191', tex: 'uparrow', ttype: CONST },\n { input: 'darr', tag: 'mo', output: '\\u2193', tex: 'downarrow', ttype: CONST },\n { input: 'rarr', tag: 'mo', output: '\\u2192', tex: 'rightarrow', ttype: CONST },\n { input: '->', tag: 'mo', output: '\\u2192', tex: 'to', ttype: CONST },\n { input: '>->', tag: 'mo', output: '\\u21A3', tex: 'rightarrowtail', ttype: CONST },\n { input: '->>', tag: 'mo', output: '\\u21A0', tex: 'twoheadrightarrow', ttype: CONST },\n { input: '>->>', tag: 'mo', output: '\\u2916', tex: 'twoheadrightarrowtail', ttype: CONST },\n { input: '|->', tag: 'mo', output: '\\u21A6', tex: 'mapsto', ttype: CONST },\n { input: 'larr', tag: 'mo', output: '\\u2190', tex: 'leftarrow', ttype: CONST },\n { input: 'harr', tag: 'mo', output: '\\u2194', tex: 'leftrightarrow', ttype: CONST },\n { input: 'rArr', tag: 'mo', output: '\\u21D2', tex: 'Rightarrow', ttype: CONST },\n { input: 'lArr', tag: 'mo', output: '\\u21D0', tex: 'Leftarrow', ttype: CONST },\n { input: 'hArr', tag: 'mo', output: '\\u21D4', tex: 'Leftrightarrow', ttype: CONST },\n\n //commands with argument\n AMsqrt,\n AMroot,\n AMfrac,\n AMdiv,\n AMover,\n AMsub,\n AMsup,\n { input: 'cancel', tag: 'menclose', output: 'cancel', tex: null, ttype: UNARY },\n { input: 'Sqrt', tag: 'msqrt', output: 'sqrt', tex: null, ttype: UNARY },\n { input: 'hat', tag: 'mover', output: '\\u005E', tex: null, ttype: UNARY, acc: true },\n { input: 'bar', tag: 'mover', output: '\\u00AF', tex: 'overline', ttype: UNARY, acc: true },\n { input: 'vec', tag: 'mover', output: '\\u2192', tex: null, ttype: UNARY, acc: true },\n { input: 'tilde', tag: 'mover', output: '~', tex: null, ttype: UNARY, acc: true },\n { input: 'dot', tag: 'mover', output: '.', tex: null, ttype: UNARY, acc: true },\n { input: 'ddot', tag: 'mover', output: '..', tex: null, ttype: UNARY, acc: true },\n {\n input: 'overarc',\n tag: 'mover',\n output: '\\u23DC',\n tex: 'stackrel{\\\\frown}',\n notexcopy: true,\n ttype: UNARY,\n acc: true\n },\n {\n input: 'overparen',\n tag: 'mover',\n output: '\\u23DC',\n tex: 'stackrel{\\\\frown}',\n notexcopy: true,\n ttype: UNARY,\n acc: true\n },\n { input: 'ul', tag: 'munder', output: '\\u0332', tex: 'underline', ttype: UNARY, acc: true },\n { input: 'ubrace', tag: 'munder', output: '\\u23DF', tex: 'underbrace', ttype: UNARY, acc: true },\n { input: 'obrace', tag: 'mover', output: '\\u23DE', tex: 'overbrace', ttype: UNARY, acc: true },\n AMtext,\n AMmbox,\n AMquote,\n //{input:\"var\", tag:\"mstyle\", atname:\"fontstyle\", atval:\"italic\", output:\"var\", tex:null, ttype:UNARY},\n { input: 'color', tag: 'mstyle', ttype: BINARY },\n {\n input: 'bb',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'bold',\n output: 'bb',\n tex: 'mathbf',\n ttype: UNARY,\n notexcopy: true\n },\n { input: 'mathbf', tag: 'mstyle', atname: 'mathvariant', atval: 'bold', output: 'mathbf', tex: null, ttype: UNARY },\n {\n input: 'sf',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'sans-serif',\n output: 'sf',\n tex: 'mathsf',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathsf',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'sans-serif',\n output: 'mathsf',\n tex: null,\n ttype: UNARY\n },\n {\n input: 'bbb',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'double-struck',\n output: 'bbb',\n tex: 'mathbb',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathbb',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'double-struck',\n output: 'mathbb',\n tex: null,\n ttype: UNARY\n },\n {\n input: 'cc',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'script',\n output: 'cc',\n tex: 'mathcal',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathcal',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'script',\n output: 'mathcal',\n tex: null,\n ttype: UNARY\n },\n {\n input: 'tt',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'monospace',\n output: 'tt',\n tex: 'mathtt',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathtt',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'monospace',\n output: 'mathtt',\n tex: null,\n ttype: UNARY\n },\n {\n input: 'fr',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'fraktur',\n output: 'fr',\n tex: 'mathfrak',\n ttype: UNARY,\n notexcopy: true\n },\n {\n input: 'mathfrak',\n tag: 'mstyle',\n atname: 'mathvariant',\n atval: 'fraktur',\n output: 'mathfrak',\n tex: null,\n ttype: UNARY\n }\n];\n\nfunction compareNames(s1, s2) {\n if (s1.input > s2.input) return 1;\n else return -1;\n}\n\nvar AMnames = []; //list of input symbols\n\nfunction AMinitSymbols() {\n var i;\n var symlen = AMsymbols.length;\n for (i = 0; i < symlen; i++) {\n if (AMsymbols[i].tex && !(typeof AMsymbols[i].notexcopy == 'boolean' && AMsymbols[i].notexcopy)) {\n AMsymbols.push({\n input: AMsymbols[i].tex,\n tag: AMsymbols[i].tag,\n output: AMsymbols[i].output,\n ttype: AMsymbols[i].ttype,\n acc: AMsymbols[i].acc || false\n });\n }\n }\n refreshSymbols();\n}\n\nfunction refreshSymbols() {\n var i;\n AMsymbols.sort(compareNames);\n for (i = 0; i < AMsymbols.length; i++) AMnames[i] = AMsymbols[i].input;\n}\n\nfunction AMremoveCharsAndBlanks(str, n) {\n //remove n characters and any following blanks\n var st;\n if (str.charAt(n) == '\\\\' && str.charAt(n + 1) != '\\\\' && str.charAt(n + 1) != ' ') st = str.slice(n + 1);\n else st = str.slice(n);\n for (var i = 0; i < st.length && st.charCodeAt(i) <= 32; i = i + 1);\n return st.slice(i);\n}\n\nfunction AMposition(arr, str, n) {\n // return position >=n where str appears or would be inserted\n // assumes arr is sorted\n if (n == 0) {\n var h, m;\n n = -1;\n h = arr.length;\n while (n + 1 < h) {\n m = (n + h) >> 1;\n if (arr[m] < str) n = m;\n else h = m;\n }\n return h;\n } else for (var i = n; i < arr.length && arr[i] < str; i++);\n return i; // i=arr.length || arr[i]>=str\n}\n\nfunction AMgetSymbol(str) {\n //return maximal initial substring of str that appears in names\n //return null if there is none\n var k = 0; //new pos\n var j = 0; //old pos\n var mk; //match pos\n var st;\n var tagst;\n var match = '';\n var more = true;\n for (var i = 1; i <= str.length && more; i++) {\n st = str.slice(0, i); //initial substring of length i\n j = k;\n k = AMposition(AMnames, st, j);\n if (k < AMnames.length && str.slice(0, AMnames[k].length) == AMnames[k]) {\n match = AMnames[k];\n mk = k;\n i = match.length;\n }\n more = k < AMnames.length && str.slice(0, AMnames[k].length) >= AMnames[k];\n }\n AMpreviousSymbol = AMcurrentSymbol;\n if (match != '') {\n AMcurrentSymbol = AMsymbols[mk].ttype;\n return AMsymbols[mk];\n }\n // if str[0] is a digit or - return maxsubstring of digits.digits\n AMcurrentSymbol = CONST;\n k = 1;\n st = str.slice(0, 1);\n var integ = true;\n\n while ('0' <= st && st <= '9' && k <= str.length) {\n st = str.slice(k, k + 1);\n k++;\n }\n if (st == config.decimalsign) {\n st = str.slice(k, k + 1);\n if ('0' <= st && st <= '9') {\n integ = false;\n k++;\n while ('0' <= st && st <= '9' && k <= str.length) {\n st = str.slice(k, k + 1);\n k++;\n }\n }\n }\n if ((integ && k > 1) || k > 2) {\n st = str.slice(0, k - 1);\n tagst = 'mn';\n } else {\n k = 2;\n st = str.slice(0, 1); //take 1 character\n tagst = ('A' > st || st > 'Z') && ('a' > st || st > 'z') ? 'mo' : 'mi';\n }\n if (st == '-' && AMpreviousSymbol == INFIX) {\n AMcurrentSymbol = INFIX;\n return { input: st, tag: tagst, output: st, ttype: UNARY, func: true, val: true };\n }\n return { input: st, tag: tagst, output: st, ttype: CONST, val: true }; //added val bit\n}\n\nfunction AMTremoveBrackets(node) {\n var st;\n if (node.charAt(0) == '{' && node.charAt(node.length - 1) == '}') {\n var leftchop = 0;\n\n st = node.substr(1, 5);\n if (st == '\\\\left') {\n st = node.charAt(6);\n if (st == '(' || st == '[' || st == '{') {\n leftchop = 7;\n } else {\n st = node.substr(6, 7);\n if (st == '\\\\lbrace') {\n leftchop = 13;\n }\n }\n } else {\n st = node.charAt(1);\n if (st == '(' || st == '[') {\n leftchop = 2;\n }\n }\n if (leftchop > 0) {\n //st = node.charAt(node.length-7);\n st = node.substr(node.length - 8);\n if (st == '\\\\right)}' || st == '\\\\right]}' || st == '\\\\right.}') {\n node = '{' + node.substr(leftchop);\n node = node.substr(0, node.length - 8) + '}';\n } else if (st == '\\\\rbrace}') {\n node = '{' + node.substr(leftchop);\n node = node.substr(0, node.length - 14) + '}';\n }\n }\n }\n return node;\n}\n\n/*Parsing ASCII math expressions with the following grammar\nv ::= [A-Za-z] | greek letters | numbers | other constant symbols\nu ::= sqrt | text | bb | other unary symbols for font commands\nb ::= frac | root | stackrel binary symbols\nl ::= ( | [ | { | (: | {: left brackets\nr ::= ) | ] | } | :) | :} right brackets\nS ::= v | lEr | uS | bSS Simple expression\nI ::= S_S | S^S | S_S^S | S Intermediate expression\nE ::= IE | I/I Expression\nEach terminal symbol is translated into a corresponding mathml node.*/\n\nvar AMnestingDepth, AMpreviousSymbol, AMcurrentSymbol;\n\nfunction AMTgetTeXsymbol(symb) {\n var pre;\n if (typeof symb.val == 'boolean' && symb.val) {\n pre = '';\n } else {\n pre = '\\\\';\n }\n if (symb.tex == null) {\n //can't remember why this was here. Breaks /delta /Delta to removed\n //return (pre+(pre==''?symb.input:symb.input.toLowerCase()));\n return pre + symb.input;\n } else {\n return pre + symb.tex;\n }\n}\n\nfunction AMTparseSexpr(str) {\n //parses str and returns [node,tailstr]\n var symbol,\n node,\n result,\n i,\n st, // rightvert = false,\n newFrag = '';\n str = AMremoveCharsAndBlanks(str, 0);\n symbol = AMgetSymbol(str); //either a token or a bracket or empty\n if (symbol == null || (symbol.ttype == RIGHTBRACKET && AMnestingDepth > 0)) {\n return [null, str];\n }\n if (symbol.ttype == DEFINITION) {\n str = symbol.output + AMremoveCharsAndBlanks(str, symbol.input.length);\n symbol = AMgetSymbol(str);\n }\n switch (symbol.ttype) {\n case UNDEROVER:\n case CONST:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n var texsymbol = AMTgetTeXsymbol(symbol);\n if (texsymbol.charAt(0) == '\\\\' || symbol.tag == 'mo') return [texsymbol, str];\n else return ['{' + texsymbol + '}', str];\n\n case LEFTBRACKET: //read (expr+)\n AMnestingDepth++;\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n\n result = AMTparseExpr(str, true);\n AMnestingDepth--;\n var leftchop = 0;\n if (result[0].substr(0, 6) == '\\\\right') {\n st = result[0].charAt(6);\n if (st == ')' || st == ']' || st == '}') {\n leftchop = 6;\n } else if (st == '.') {\n leftchop = 7;\n } else {\n st = result[0].substr(6, 7);\n if (st == '\\\\rbrace') {\n leftchop = 13;\n }\n }\n }\n if (leftchop > 0) {\n result[0] = result[0].substr(leftchop);\n if (typeof symbol.invisible == 'boolean' && symbol.invisible) node = '{' + result[0] + '}';\n else {\n node = '{' + AMTgetTeXsymbol(symbol) + result[0] + '}';\n }\n } else {\n if (typeof symbol.invisible == 'boolean' && symbol.invisible) node = '{\\\\left.' + result[0] + '}';\n else {\n node = '{\\\\left' + AMTgetTeXsymbol(symbol) + result[0] + '}';\n }\n }\n return [node, result[1]];\n case TEXT:\n if (symbol != AMquote) str = AMremoveCharsAndBlanks(str, symbol.input.length);\n if (str.charAt(0) == '{') i = str.indexOf('}');\n else if (str.charAt(0) == '(') i = str.indexOf(')');\n else if (str.charAt(0) == '[') i = str.indexOf(']');\n else if (symbol == AMquote) i = str.slice(1).indexOf('\"') + 1;\n else i = 0;\n if (i == -1) i = str.length;\n st = str.slice(1, i);\n if (st.charAt(0) == ' ') {\n newFrag = '\\\\ ';\n }\n newFrag += '\\\\text{' + st + '}';\n if (st.charAt(st.length - 1) == ' ') {\n newFrag += '\\\\ ';\n }\n str = AMremoveCharsAndBlanks(str, i + 1);\n return [newFrag, str];\n case UNARY:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n result = AMTparseSexpr(str);\n if (result[0] == null) return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n if (typeof symbol.func == 'boolean' && symbol.func) {\n // functions hack\n st = str.charAt(0);\n if (\n st == '^' ||\n st == '_' ||\n st == '/' ||\n st == '|' ||\n st == ',' ||\n (symbol.input.length == 1 && symbol.input.match(/\\w/) && st != '(')\n ) {\n return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n } else {\n node = '{' + AMTgetTeXsymbol(symbol) + '{' + result[0] + '}}';\n return [node, result[1]];\n }\n }\n result[0] = AMTremoveBrackets(result[0]);\n if (symbol.input == 'sqrt') {\n // sqrt\n return ['\\\\sqrt{' + result[0] + '}', result[1]];\n } else if (symbol.input == 'cancel') {\n // cancel\n return ['\\\\cancel{' + result[0] + '}', result[1]];\n } else if (typeof symbol.rewriteleftright != 'undefined') {\n // abs, floor, ceil\n return [\n '{\\\\left' + symbol.rewriteleftright[0] + result[0] + '\\\\right' + symbol.rewriteleftright[1] + '}',\n result[1]\n ];\n } else if (typeof symbol.acc == 'boolean' && symbol.acc) {\n // accent\n //return ['{'+AMTgetTeXsymbol(symbol)+'{'+result[0]+'}}',result[1]];\n return [AMTgetTeXsymbol(symbol) + '{' + result[0] + '}', result[1]];\n } else {\n // font change command\n return ['{' + AMTgetTeXsymbol(symbol) + '{' + result[0] + '}}', result[1]];\n }\n case BINARY:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n result = AMTparseSexpr(str);\n if (result[0] == null) return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n result[0] = AMTremoveBrackets(result[0]);\n var result2 = AMTparseSexpr(result[1]);\n if (result2[0] == null) return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n result2[0] = AMTremoveBrackets(result2[0]);\n if (symbol.input == 'color') {\n newFrag = '{\\\\color{' + result[0].replace(/[\\{\\}]/g, '') + '}' + result2[0] + '}';\n } else if (symbol.input == 'root') {\n newFrag = '{\\\\sqrt[' + result[0] + ']{' + result2[0] + '}}';\n } else {\n newFrag = '{' + AMTgetTeXsymbol(symbol) + '{' + result[0] + '}{' + result2[0] + '}}';\n }\n return [newFrag, result2[1]];\n case INFIX:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n return [symbol.output, str];\n case SPACE:\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n return ['{\\\\quad\\\\text{' + symbol.input + '}\\\\quad}', str];\n case LEFTRIGHT:\n // if (rightvert) return [null,str]; else rightvert = true;\n AMnestingDepth++;\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n result = AMTparseExpr(str, false);\n AMnestingDepth--;\n var st = '';\n st = result[0].charAt(result[0].length - 1);\n //alert(result[0].lastChild+\"***\"+st);\n if (st == '|' && str.charAt(0) !== ',') {\n // its an absolute value subterm\n node = '{\\\\left|' + result[0] + '}';\n return [node, result[1]];\n } else {\n // the \"|\" is a \\mid\n node = '{\\\\mid}';\n return [node, str];\n }\n\n default:\n //alert(\"default\");\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n return ['{' + AMTgetTeXsymbol(symbol) + '}', str];\n }\n}\n\nfunction AMTparseIexpr(str) {\n var symbol, sym1, sym2, node, result;\n str = AMremoveCharsAndBlanks(str, 0);\n sym1 = AMgetSymbol(str);\n result = AMTparseSexpr(str);\n node = result[0];\n str = result[1];\n symbol = AMgetSymbol(str);\n if (symbol.ttype == INFIX && symbol.input != '/') {\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n // if (symbol.input == \"/\") result = AMTparseIexpr(str); else\n result = AMTparseSexpr(str);\n if (result[0] == null)\n // show box in place of missing argument\n result[0] = '{}';\n else result[0] = AMTremoveBrackets(result[0]);\n str = result[1];\n // if (symbol.input == \"/\") AMTremoveBrackets(node);\n if (symbol.input == '_') {\n sym2 = AMgetSymbol(str);\n if (sym2.input == '^') {\n str = AMremoveCharsAndBlanks(str, sym2.input.length);\n var res2 = AMTparseSexpr(str);\n res2[0] = AMTremoveBrackets(res2[0]);\n str = res2[1];\n node = '{' + node;\n node += '_{' + result[0] + '}';\n node += '^{' + res2[0] + '}';\n node += '}';\n } else {\n node += '_{' + result[0] + '}';\n }\n } else {\n //must be ^\n //node = '{'+node+'}^{'+result[0]+'}';\n node = node + '^{' + result[0] + '}';\n }\n if (typeof sym1.func != 'undefined' && sym1.func) {\n sym2 = AMgetSymbol(str);\n if (sym2.ttype != INFIX && sym2.ttype != RIGHTBRACKET && (sym1.input.length > 1 || sym2.ttype == LEFTBRACKET)) {\n result = AMTparseIexpr(str);\n node = '{' + node + result[0] + '}';\n str = result[1];\n }\n }\n }\n\n return [node, str];\n}\n\nfunction AMTparseExpr(str, rightbracket) {\n var symbol,\n node,\n result,\n i,\n nodeList = [],\n newFrag = '';\n var addedright = false;\n do {\n str = AMremoveCharsAndBlanks(str, 0);\n result = AMTparseIexpr(str);\n node = result[0];\n str = result[1];\n symbol = AMgetSymbol(str);\n if (symbol.ttype == INFIX && symbol.input == '/') {\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n result = AMTparseIexpr(str);\n\n if (result[0] == null)\n // show box in place of missing argument\n result[0] = '{}';\n else result[0] = AMTremoveBrackets(result[0]);\n str = result[1];\n node = AMTremoveBrackets(node);\n node = '\\\\frac' + '{' + node + '}';\n node += '{' + result[0] + '}';\n newFrag += node;\n symbol = AMgetSymbol(str);\n } else if (node != undefined) newFrag += node;\n } while (\n ((symbol.ttype != RIGHTBRACKET && (symbol.ttype != LEFTRIGHT || rightbracket)) || AMnestingDepth == 0) &&\n symbol != null &&\n symbol.output != ''\n );\n if (symbol.ttype == RIGHTBRACKET || symbol.ttype == LEFTRIGHT) {\n // if (AMnestingDepth > 0) AMnestingDepth--;\n var len = newFrag.length;\n if (len > 2 && newFrag.charAt(0) == '{' && newFrag.indexOf(',') > 0) {\n //could be matrix (total rewrite from .js)\n var right = newFrag.charAt(len - 2);\n if (right == ')' || right == ']') {\n var left = newFrag.charAt(6);\n if ((left == '(' && right == ')' && symbol.output != '}') || (left == '[' && right == ']')) {\n var mxout = '';\n var pos = new Array(); //position of commas\n pos.push(0);\n var matrix = true;\n var mxnestingd = 0;\n var subpos = [];\n subpos[0] = [0];\n var lastsubposstart = 0;\n var mxanynestingd = 0;\n var columnaligns = '';\n for (i = 1; i < len - 1; i++) {\n if (newFrag.charAt(i) == left) mxnestingd++;\n if (newFrag.charAt(i) == right) {\n mxnestingd--;\n if (mxnestingd == 0 && newFrag.charAt(i + 2) == ',' && newFrag.charAt(i + 3) == '{') {\n pos.push(i + 2);\n lastsubposstart = i + 2;\n subpos[lastsubposstart] = [i + 2];\n }\n }\n if (newFrag.charAt(i) == '[' || newFrag.charAt(i) == '(' || newFrag.charAt(i) == '{') {\n mxanynestingd++;\n }\n if (newFrag.charAt(i) == ']' || newFrag.charAt(i) == ')' || newFrag.charAt(i) == '}') {\n mxanynestingd--;\n }\n if (newFrag.charAt(i) == ',' && mxanynestingd == 1) {\n subpos[lastsubposstart].push(i);\n }\n if (mxanynestingd < 0) {\n //happens at the end of the row\n if (lastsubposstart == i + 1) {\n //if at end of row, skip to next row\n i++;\n } else {\n //misformed something - abandon treating as a matrix\n matrix = false;\n }\n }\n }\n\n pos.push(len);\n var lastmxsubcnt = -1;\n if (mxnestingd == 0 && pos.length > 0 && matrix) {\n for (i = 0; i < pos.length - 1; i++) {\n if (i > 0) mxout += '\\\\\\\\';\n if (i == 0) {\n //var subarr = newFrag.substr(pos[i]+7,pos[i+1]-pos[i]-15).split(',');\n if (subpos[pos[i]].length == 1) {\n var subarr = [newFrag.substr(pos[i] + 7, pos[i + 1] - pos[i] - 15)];\n } else {\n var subarr = [newFrag.substring(pos[i] + 7, subpos[pos[i]][1])];\n for (var j = 2; j < subpos[pos[i]].length; j++) {\n subarr.push(newFrag.substring(subpos[pos[i]][j - 1] + 1, subpos[pos[i]][j]));\n }\n subarr.push(newFrag.substring(subpos[pos[i]][subpos[pos[i]].length - 1] + 1, pos[i + 1] - 8));\n }\n } else {\n //var subarr = newFrag.substr(pos[i]+8,pos[i+1]-pos[i]-16).split(',');\n if (subpos[pos[i]].length == 1) {\n var subarr = [newFrag.substr(pos[i] + 8, pos[i + 1] - pos[i] - 16)];\n } else {\n var subarr = [newFrag.substring(pos[i] + 8, subpos[pos[i]][1])];\n for (var j = 2; j < subpos[pos[i]].length; j++) {\n subarr.push(newFrag.substring(subpos[pos[i]][j - 1] + 1, subpos[pos[i]][j]));\n }\n subarr.push(newFrag.substring(subpos[pos[i]][subpos[pos[i]].length - 1] + 1, pos[i + 1] - 8));\n }\n }\n for (j = subarr.length - 1; j >= 0; j--) {\n if (subarr[j] == '{\\\\mid}') {\n if (i == 0) {\n columnaligns = '|' + columnaligns;\n }\n subarr.splice(j, 1);\n } else if (i == 0) {\n columnaligns = 'c' + columnaligns;\n }\n }\n if (lastmxsubcnt > 0 && subarr.length != lastmxsubcnt) {\n matrix = false;\n } else if (lastmxsubcnt == -1) {\n lastmxsubcnt = subarr.length;\n }\n mxout += subarr.join('&');\n }\n }\n mxout = '\\\\begin{array}{' + columnaligns + '} ' + mxout + '\\\\end{array}';\n\n if (matrix) {\n newFrag = mxout;\n }\n }\n }\n }\n\n str = AMremoveCharsAndBlanks(str, symbol.input.length);\n if (typeof symbol.invisible != 'boolean' || !symbol.invisible) {\n node = '\\\\right' + AMTgetTeXsymbol(symbol); //AMcreateMmlNode(\"mo\",document.createTextNode(symbol.output));\n newFrag += node;\n addedright = true;\n } else {\n newFrag += '\\\\right.';\n addedright = true;\n }\n }\n if (AMnestingDepth > 0 && !addedright) {\n newFrag += '\\\\right.'; //adjust for non-matching left brackets\n //todo: adjust for non-matching right brackets\n }\n\n return [newFrag, str];\n}\n\nexport default function AMTparseAMtoTeX(str) {\n AMnestingDepth = 0;\n str = str.replace(/( |\\u00a0| )/g, '');\n str = str.replace(/>/g, '>');\n str = str.replace(/</g, '<');\n if (str.match(/\\S/) == null) {\n return '';\n }\n return AMTparseExpr(str.replace(/^\\s+/g, ''), false)[0];\n}\n\nAMinitSymbols();\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown katex extension for markdown\n */\n\nif (typeof window === 'undefined') {\n throw Error('The showdown katex extension can only be used in browser environment!');\n}\n\nimport format from './log';\nimport asciimathToTex from './asciimath2tex';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof katex === 'undefined') {\n var katex = window.katex || undefined;\n}\n\nif (typeof renderMathInElement === 'undefined') {\n var RenderMathInElement = window.renderMathInElement || undefined;\n}\n\nlet katexElementCount = 0;\nfunction hasKatex() {\n return typeof RenderMathInElement !== 'undefined' && RenderMathInElement && typeof katex !== 'undefined' && katex\n ? true\n : false;\n}\n\nlet dync = false;\nconst cssCdnName = 'katexCSS';\nfunction dyncLoadScript(callback) {\n const sync = hasKatex();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) { \n dync = true;\n cdnjs.loadStyleSheet(cssCdnName);\n cdnjs\n .loadScript('katex')\n .then(name => {\n katex = utils.interopDefault(window[name]);\n return cdnjs.loadScript('renderMathInElement');\n })\n .then(name => {\n RenderMathInElement = utils.interopDefault(window[name]);\n if (typeof callback === 'function' && callback) {\n callback(RenderMathInElement);\n }\n })\n .catch(e => {\n console.log('load script error: ' + e);\n });\n return sync;\n }\n }\n\n if (typeof callback === 'function' && callback) {\n callback(RenderMathInElement);\n }\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasKatex()) return;\n cdnjs.unloadScript('renderMathInElement');\n cdnjs.unloadScript('katex');\n cdnjs.unloadStyleSheet(cssCdnName);\n katex = null;\n window.katex = null;\n RenderMathInElement = null;\n window.renderMathInElement = null; \n dync = false; \n}\n\nfunction onRenderKatex(resolve, res) {\n if (hasKatex()) {\n const id = res.id;\n const name = res.className;\n const input = res.input;\n const data = res.data;\n const cssLink = res.cssLink;\n const config = res.options;\n const doc = res.element.ownerDocument;\n let html = '';\n if (data instanceof Array) {\n data.forEach(code => {\n if (code === '') {\n html += '
    ';\n } else {\n const math = katex.renderToString(code, config);\n html += cssLink\n ? `
    ${math}
    `\n : `
    ${math}
    `;\n }\n });\n } else {\n const math = katex.renderToString(data, config);\n html = cssLink\n ? `
    ${math}
    `\n : `
    ${math}
    `;\n }\n res.element.parentNode.outerHTML = html;\n --katexElementCount;\n if (!katexElementCount) {\n RenderMathInElement(doc.body, config);\n }\n resolve(true);\n } else {\n setTimeout(() => {\n onRenderKatex(resolve, res);\n }, 10);\n }\n}\n\nfunction renderKatex(element, config, isAsciimath) {\n return new Promise(resolve => {\n let latex;\n const meta = utils.createElementMeta('katex', element, code => {\n let data;\n latex = code;\n const codes = code.split(/\\n[ \\f\\r\\t\\v]*\\n/);\n if (codes.length > 1) {\n data = new Array();\n codes.forEach(code => {\n code = code.trim();\n if (code !== '') {\n code = isAsciimath ? asciimathToTex(code) : code;\n }\n data.push(code);\n });\n } else {\n data = isAsciimath ? asciimathToTex(latex) : latex;\n }\n return data;\n });\n if (!meta) {\n return resolve(false);\n }\n\n meta.cssLink = cdnjs.getSrc(cssCdnName);\n meta.input = latex;\n meta.options = config;\n onRenderKatex(resolve, meta);\n });\n}\n\nfunction renderBlockElements(latex, asciimath, config) {\n katexElementCount = latex.length + asciimath.length;\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n latex.forEach(element => {\n promiseArray.push(renderKatex(element, config, false));\n });\n asciimath.forEach(element => {\n promiseArray.push(renderKatex(element, config, true));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n/**\n * https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex\n * @param {string} str\n * @returns {string} regexp escaped string\n */\nfunction escapeRegExp(str) {\n return str.replace(/[-[\\]/{}()*+?.\\\\$^|]/g, '\\\\$&');\n}\n\n// katex config\nconst getConfig = (userConfig = {}) => {\n let config = {\n displayMode: true,\n throwOnError: false, // fail silently\n errorColor: '#ff0000',\n delimiters: null,\n ...userConfig\n };\n\n function _isEmptyArray(a) {\n if (!Array.isArray(a) || !a.length) {\n return false;\n }\n\n return true;\n }\n\n function _isObjectProperty(obj, prop) {\n if (!obj || typeof obj !== 'object' || !obj.hasOwnProperty(prop)) {\n return false;\n }\n return true;\n }\n\n function _getDelimiter(obj, style, type) {\n if (!_isObjectProperty(obj, style) || !_isObjectProperty(obj[style], type) || !_isEmptyArray(obj[style][type])) {\n return false;\n }\n\n obj[style][type].forEach(delimiter => {\n delimiter.display = type === 'inline' ? false : true;\n if (style === 'asciimath') {\n delimiter.asciimath = true;\n }\n });\n return obj[style][type];\n }\n\n if (!Array.isArray(config.delimiters)) {\n config.delimiters = []\n .concat(\n _getDelimiter(config.delimiters, 'texmath', 'display') || [\n { left: '$$', right: '$$', display: true },\n { left: '\\\\[', right: '\\\\]', display: true },\n { left: \"\\\\begin{equation}\", right: \"\\\\end{equation}\", display: true },\n { left: \"\\\\begin{align}\", right: \"\\\\end{align}\", display: true },\n { left: \"\\\\begin{alignat}\", right: \"\\\\end{alignat}\", display: true },\n { left: \"\\\\begin{gather}\", right: \"\\\\end{gather}\", display: true },\n { left: \"\\\\begin{CD}\", right: \"\\\\end{CD}\", display: true } \n ]\n )\n .concat(\n _getDelimiter(config.delimiters, 'texmath', 'inline') || [\n { left: '\\\\(', right: '\\\\)', display: false }\n ]\n )\n .concat(\n _getDelimiter(config.delimiters, 'asciimath', 'display') || [\n { left: '@@', right: '@@', display: true, asciimath: true }\n ]\n )\n .concat(\n _getDelimiter(config.delimiters, 'asciimath', 'inline') || [\n { left: '@ ', right: ' @', display: false, asciimath: true },\n { left: \"\\\\~\", right: \"\\\\~\", display: false, asciimath: true }\n ]\n );\n } else if (!config.delimiters.length) {\n config.delimiters = [\n { left: '$$', right: '$$', display: true },\n { left: '\\\\[', right: '\\\\]', display: true },\n { left: \"\\\\begin{equation}\", right: \"\\\\end{equation}\", display: true },\n { left: \"\\\\begin{align}\", right: \"\\\\end{align}\", display: true },\n { left: \"\\\\begin{alignat}\", right: \"\\\\end{alignat}\", display: true },\n { left: \"\\\\begin{gather}\", right: \"\\\\end{gather}\", display: true },\n { left: \"\\\\begin{CD}\", right: \"\\\\end{CD}\", display: true }, \n { left: '\\\\(', right: '\\\\)', display: false },\n { left: '@@', right: '@@', display: true, asciimath: true },\n { left: '@ ', right: ' @', display: false, asciimath: true },\n { left: \"\\\\~\", right: \"\\\\~\", display: false, asciimath: true }\n ];\n }\n return config;\n};\n\nfunction showdownKatex(userConfig) {\n let inlineMathCount = 0;\n const config = getConfig(userConfig);\n const mathDelimiters = config.delimiters.map(({ left, right, display, asciimath }) => {\n const test = new RegExp(`${escapeRegExp(left)}(.+?)${escapeRegExp(right)}`, 'g');\n const replacer = (match, math) => {\n ++inlineMathCount;\n if (asciimath) {\n math = asciimathToTex(math);\n }\n if (display) {\n return `\\\\[${math}\\\\]`;\n }\n return `\\\\(${math}\\\\)`;\n };\n return { test, replacer };\n });\n\n return [\n {\n type: 'output',\n config: config,\n filter: function(obj) {\n inlineMathCount = 0;\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n\n if (mathDelimiters.length) {\n // convert inline math to inline latex\n // ignore anything in code and pre elements\n wrapper.querySelectorAll(':not(code):not(pre)').forEach(el => {\n /** @type Text[] */\n const textNodes = [...el.childNodes].filter(\n // skip \"empty\" text nodes\n node => node.nodeName === '#text' && node.nodeValue.trim()\n );\n\n textNodes.forEach(node => {\n const newText = mathDelimiters.reduce(\n (acc, { test, replacer }) => acc.replace(test, replacer),\n node.nodeValue\n );\n node.nodeValue = newText;\n });\n });\n }\n\n // find the math in code blocks\n const latex = wrapper.querySelectorAll('code.latex.language-latex');\n const asciimath = wrapper.querySelectorAll('code.asciimath.language-asciimath');\n\n if (!latex.length && !asciimath.length) {\n if (inlineMathCount > 0) {\n this.config.cssLink = cdnjs.getSrc(cssCdnName);\n const that = this;\n function asyncRenderKatex(resolve, render) {\n if (hasKatex()) {\n render(wrapper.ownerDocument.body, that.config);\n resolve(true);\n } else {\n setTimeout(() => {\n asyncRenderKatex(resolve, render);\n }, 10);\n }\n }\n console.log(format(`Begin render inline katex elements.`));\n return new Promise(resolve => {\n dyncLoadScript(render => {\n asyncRenderKatex(resolve, render);\n });\n }).then(() => {\n console.log(format(`End render inline katex elements.`));\n return obj;\n });\n }\n\n return false;\n }\n\n config.cssLink = cdnjs.getSrc(cssCdnName);\n console.log(format(`Begin render katex elements.`));\n return renderBlockElements(latex, asciimath, this.config).then(() => {\n console.log(format(`End render katex elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownKatex;\n","/*\n * Copyright (c) 2024-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown echarts extension for markdown\n */\n'use strict';\n\nconst extName = \"echarts\";\n\nif (typeof window === 'undefined') {\n throw Error(`The showdown ${extName} extension can only be used in browser environment!`);\n}\n\nimport format from './log';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof echarts === 'undefined') {\n var echarts = window.echarts || undefined;\n}\n\nfunction hasEcharts() {\n return !!echarts;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasEcharts();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) {\n dync = true;\n cdnjs.loadScript(extName).then(name => {\n echarts = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasEcharts()) return;\n cdnjs.unloadScript(extName);\n echarts = null;\n window.echarts = null;\n dync = false;\n}\n\nfunction onRenderEcharts(resolve, res) {\n if (hasEcharts()) {\n const id = res.id;\n const name = res.className;\n const node = res.element.parentNode;\n // // 在 SSR 模式下第一个参数不需要再传入 DOM 对象\n // let chart = echarts.init(null, null, {\n // renderer: 'svg', // 必须使用 SVG 模式\n // ssr: true,\n // width: res.config.width, // 需要指明高和宽\n // height: res.config.height\n // });\n // // 像正常使用一样 setOption\n // const option = JSON.parse(data);\n // chart.setOption(option);\n // // 输出字符串\n // const svg = chart.renderToSVGString();\n // // 如果不再需要图表,调用 dispose 以释放内存\n // chart.dispose();\n // chart = null;\n node.outerHTML = `
    `;\n return resolve(true);\n }\n\n setTimeout(() => {\n onRenderEcharts(resolve, res);\n }, 20);\n}\n\n\n/**\n * render echarts graphs\n */\nfunction renderEcharts(element, scripts, config) {\n const meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return Promise.resolve(false);\n }\n\n config = JSON.stringify({ ...config, ssr: false });\n const data = JSON.stringify(JSON.parse(meta.data));\n const script = {\n id: meta.id,\n code: `(function() {\n let el = document.getElementById('${meta.id}');\n if (el){\n let config = JSON.parse('${config}');\n let chart = echarts.init(el, null, config);\n let option = JSON.parse('${data}');\n chart.setOption(option);\n }\n })();`\n }\n scripts.push(script);\n return new Promise(resolve => {\n onRenderEcharts(resolve, meta);\n });\n}\n\n//
    \nfunction renderEchartsElements(elements, scripts, config) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderEcharts(element, scripts, config));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// echarts default config\nconst getConfig = (config = {}) => ({\n renderer: 'svg',\n ssr: false,\n width: 400,\n height: 300,\n tooltip: {\n show: true\n },\n animation: true,\n ...config\n});\n\nfunction showdownEcharts(userConfig) {\n const config = getConfig(userConfig);\n return [\n {\n type: 'output',\n config: config,\n filter: function (obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the echarts in code blocks\n const elements = wrapper.querySelectorAll(`code.${extName}.language-${extName}`);\n if (!elements.length) {\n return false;\n }\n\n console.log(format(`Begin render ${extName} elements.`));\n return renderEchartsElements(elements, obj.scripts, this.config).then(() => {\n console.log(format(`End render ${extName} elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownEcharts;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown mermaid extension for markdown\n */\n'use strict';\n\nconst extName = \"mermaid\";\n\nif (typeof window === 'undefined') {\n throw Error('The showdown mermaid extension can only be used in browser environment!');\n}\n\nimport format from './log';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof mermaid === 'undefined') {\n var mermaid = window.mermaid || undefined;\n}\n\nfunction hasMermaid() {\n return typeof mermaid !== 'undefined' && mermaid ? true : false;\n}\n\nlet dync = false;\nfunction dyncLoadScript(config) {\n // When window object exists,\n // it means browser environment, otherwise node.js environment.\n // In browser environment, html need to be rendered asynchronously.\n const sync = hasMermaid();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) {\n dync = true;\n cdnjs.loadScript(extName).then(name => {\n mermaid = utils.interopDefault(window[name]);\n mermaid.initialize(config);\n });\n return sync\n }\n }\n\n mermaid.initialize(config);\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasMermaid()) return;\n cdnjs.unloadScript(extName);\n katex = null;\n window.mermaid = null;\n mermaid = null; \n dync = false; \n}\n\n\nfunction onRenderMermaid(resolve, res) {\n if (hasMermaid()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const node = res.element.parentNode;\n mermaid.render(id, data).then(m =>{\n node.outerHTML = `
    ${m.svg}
    `;\n resolve(true);\n });\n return;\n }\n\n setTimeout(() => {\n onRenderMermaid(resolve, res);\n }, 10);\n}\n\n/**\n * render mermaid graphs\n */\nfunction renderMermaid(element) {\n return new Promise(resolve => {\n const meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return resolve(false);\n }\n\n onRenderMermaid(resolve, meta);\n });\n}\n\n//
    \nfunction renderMermaidElements(elements, config) {\n dyncLoadScript(config);\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderMermaid(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// mermaid default config\nconst getConfig = (config = {}) => ({\n theme: 'forest',\n logLevel: 4,\n startOnLoad: false,\n arrowMarkerAbsolute: false,\n flowchart: {\n curve: 'basis'\n },\n gantt: {\n axisFormat: '%m/%d/%Y'\n },\n sequence: {\n actorMargin: 50\n },\n ...config\n});\n\nfunction showdownMermaid(userConfig) {\n const config = getConfig(userConfig);\n return [\n {\n type: 'output',\n config: config,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the mermaid in code blocks\n const elements = wrapper.querySelectorAll('code.mermaid.language-mermaid');\n if (!elements.length) {\n return false;\n }\n\n console.log(format(`Begin render mermaid elements.`));\n return renderMermaidElements(elements, this.config).then(() => {\n console.log(format(`End render mermaid elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownMermaid;\n","export default (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n","\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\nvar inited = false;\nfunction init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n }\n\n revLookup['-'.charCodeAt(0)] = 62\n revLookup['_'.charCodeAt(0)] = 63\n}\n\nexport function toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nexport function fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n","\nexport function read (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexport function write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nexport default Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\nimport * as base64 from './base64'\nimport * as ieee754 from './ieee754'\nimport isArray from './isArray'\n\nexport var INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : true\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nvar _kMaxLength = kMaxLength()\nexport {_kMaxLength as kMaxLength};\nfunction typedArraySupport () {\n return true;\n // rollup issues\n // try {\n // var arr = new Uint8Array(1)\n // arr.__proto__ = {\n // __proto__: Uint8Array.prototype,\n // foo: function () { return 42 }\n // }\n // return arr.foo() === 42 && // typed array instances can be augmented\n // typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n // arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n // } catch (e) {\n // return false\n // }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nexport function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n // Object.defineProperty(Buffer, Symbol.species, {\n // value: null,\n // configurable: true\n // })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nexport function SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nexport function isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n","// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nexport function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nexport var title = 'browser';\nexport var platform = 'browser';\nexport var browser = true;\nexport var env = {};\nexport var argv = [];\nexport var version = ''; // empty string to avoid regexp issues\nexport var versions = {};\nexport var release = {};\nexport var config = {};\n\nfunction noop() {}\n\nexport var on = noop;\nexport var addListener = noop;\nexport var once = noop;\nexport var off = noop;\nexport var removeListener = noop;\nexport var removeAllListeners = noop;\nexport var emit = noop;\n\nexport function binding(name) {\n throw new Error('process.binding is not supported');\n}\n\nexport function cwd () { return '/' }\nexport function chdir (dir) {\n throw new Error('process.chdir is not supported');\n};\nexport function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {}\nvar performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function(){ return (new Date()).getTime() }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nexport function hrtime(previousTimestamp){\n var clocktime = performanceNow.call(performance)*1e-3\n var seconds = Math.floor(clocktime)\n var nanoseconds = Math.floor((clocktime%1)*1e9)\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0]\n nanoseconds = nanoseconds - previousTimestamp[1]\n if (nanoseconds<0) {\n seconds--\n nanoseconds += 1e9\n }\n }\n return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nexport function uptime() {\n var currentTime = new Date();\n var dif = currentTime - startTime;\n return dif / 1000;\n}\n\nexport default {\n nextTick: nextTick,\n title: title,\n browser: browser,\n env: env,\n argv: argv,\n version: version,\n versions: versions,\n on: on,\n addListener: addListener,\n once: once,\n off: off,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners,\n emit: emit,\n binding: binding,\n cwd: cwd,\n chdir: chdir,\n umask: umask,\n hrtime: hrtime,\n platform: platform,\n release: release,\n config: config,\n uptime: uptime\n};\n","'use strict';\n\nvar domain;\n\n// This constructor is used to store event handlers. Instantiating this is\n// faster than explicitly calling `Object.create(null)` to get a \"clean\" empty\n// object (tested with v8 v4.9).\nfunction EventHandlers() {}\nEventHandlers.prototype = Object.create(null);\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nexport default EventEmitter;\nexport {EventEmitter};\n\n// nodejs oddity\n// require('events') === require('events').EventEmitter\nEventEmitter.EventEmitter = EventEmitter\n\nEventEmitter.usingDomains = false;\n\nEventEmitter.prototype.domain = undefined;\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\nEventEmitter.init = function() {\n this.domain = null;\n if (EventEmitter.usingDomains) {\n // if there is an active domain, then attach to it.\n if (domain.active && !(this instanceof domain.Domain)) {\n this.domain = domain.active;\n }\n }\n\n if (!this._events || this._events === Object.getPrototypeOf(this)._events) {\n this._events = new EventHandlers();\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || isNaN(n))\n throw new TypeError('\"n\" argument must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nfunction $getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return $getMaxListeners(this);\n};\n\n// These standalone emit* functions are used to optimize calling of event\n// handlers for fast cases because emit() itself often has a variable number of\n// arguments and can be deoptimized because of that. These functions always have\n// the same number of arguments and thus do not get deoptimized, so the code\n// inside them can execute faster.\nfunction emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}\nfunction emitOne(handler, isFn, self, arg1) {\n if (isFn)\n handler.call(self, arg1);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1);\n }\n}\nfunction emitTwo(handler, isFn, self, arg1, arg2) {\n if (isFn)\n handler.call(self, arg1, arg2);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1, arg2);\n }\n}\nfunction emitThree(handler, isFn, self, arg1, arg2, arg3) {\n if (isFn)\n handler.call(self, arg1, arg2, arg3);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1, arg2, arg3);\n }\n}\n\nfunction emitMany(handler, isFn, self, args) {\n if (isFn)\n handler.apply(self, args);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].apply(self, args);\n }\n}\n\nEventEmitter.prototype.emit = function emit(type) {\n var er, handler, len, args, i, events, domain;\n var needDomainExit = false;\n var doError = (type === 'error');\n\n events = this._events;\n if (events)\n doError = (doError && events.error == null);\n else if (!doError)\n return false;\n\n domain = this.domain;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n er = arguments[1];\n if (domain) {\n if (!er)\n er = new Error('Uncaught, unspecified \"error\" event');\n er.domainEmitter = this;\n er.domain = domain;\n er.domainThrown = false;\n domain.emit('error', er);\n } else if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n return false;\n }\n\n handler = events[type];\n\n if (!handler)\n return false;\n\n var isFn = typeof handler === 'function';\n len = arguments.length;\n switch (len) {\n // fast cases\n case 1:\n emitNone(handler, isFn, this);\n break;\n case 2:\n emitOne(handler, isFn, this, arguments[1]);\n break;\n case 3:\n emitTwo(handler, isFn, this, arguments[1], arguments[2]);\n break;\n case 4:\n emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);\n break;\n // slower\n default:\n args = new Array(len - 1);\n for (i = 1; i < len; i++)\n args[i - 1] = arguments[i];\n emitMany(handler, isFn, this, args);\n }\n\n if (needDomainExit)\n domain.exit();\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n\n events = target._events;\n if (!events) {\n events = target._events = new EventHandlers();\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (!existing) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] = prepend ? [listener, existing] :\n [existing, listener];\n } else {\n // If we've already got an array, just append.\n if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n }\n\n // Check for listener leak\n if (!existing.warned) {\n m = $getMaxListeners(target);\n if (m && m > 0 && existing.length > m) {\n existing.warned = true;\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + type + ' listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n emitWarning(w);\n }\n }\n }\n\n return target;\n}\nfunction emitWarning(e) {\n typeof console.warn === 'function' ? console.warn(e) : console.log(e);\n}\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction _onceWrap(target, type, listener) {\n var fired = false;\n function g() {\n target.removeListener(type, g);\n if (!fired) {\n fired = true;\n listener.apply(target, arguments);\n }\n }\n g.listener = listener;\n return g;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n\n events = this._events;\n if (!events)\n return this;\n\n list = events[type];\n if (!list)\n return this;\n\n if (list === listener || (list.listener && list.listener === listener)) {\n if (--this._eventsCount === 0)\n this._events = new EventHandlers();\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list[0] = undefined;\n if (--this._eventsCount === 0) {\n this._events = new EventHandlers();\n return this;\n } else {\n delete events[type];\n }\n } else {\n spliceOne(list, position);\n }\n\n if (events.removeListener)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events;\n\n events = this._events;\n if (!events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!events.removeListener) {\n if (arguments.length === 0) {\n this._events = new EventHandlers();\n this._eventsCount = 0;\n } else if (events[type]) {\n if (--this._eventsCount === 0)\n this._events = new EventHandlers();\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n for (var i = 0, key; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = new EventHandlers();\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n do {\n this.removeListener(type, listeners[listeners.length - 1]);\n } while (listeners[0]);\n }\n\n return this;\n };\n\nEventEmitter.prototype.listeners = function listeners(type) {\n var evlistener;\n var ret;\n var events = this._events;\n\n if (!events)\n ret = [];\n else {\n evlistener = events[type];\n if (!evlistener)\n ret = [];\n else if (typeof evlistener === 'function')\n ret = [evlistener.listener || evlistener];\n else\n ret = unwrapListeners(evlistener);\n }\n\n return ret;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];\n};\n\n// About 1.5x faster than the two-arg version of Array#splice().\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n list[i] = list[k];\n list.pop();\n}\n\nfunction arrayClone(arr, i) {\n var copy = new Array(i);\n while (i--)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n","\nvar inherits;\nif (typeof Object.create === 'function'){\n inherits = function inherits(ctor, superCtor) {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n inherits = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\nexport default inherits;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\nimport process from 'process';\nvar formatRegExp = /%[sdj%]/g;\nexport function format(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexport function deprecate(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexport function debuglog(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = 0;\n debugs[set] = function() {\n var msg = format.apply(null, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nexport function inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n _extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexport function isArray(ar) {\n return Array.isArray(ar);\n}\n\nexport function isBoolean(arg) {\n return typeof arg === 'boolean';\n}\n\nexport function isNull(arg) {\n return arg === null;\n}\n\nexport function isNullOrUndefined(arg) {\n return arg == null;\n}\n\nexport function isNumber(arg) {\n return typeof arg === 'number';\n}\n\nexport function isString(arg) {\n return typeof arg === 'string';\n}\n\nexport function isSymbol(arg) {\n return typeof arg === 'symbol';\n}\n\nexport function isUndefined(arg) {\n return arg === void 0;\n}\n\nexport function isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\n\nexport function isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nexport function isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\n\nexport function isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\n\nexport function isFunction(arg) {\n return typeof arg === 'function';\n}\n\nexport function isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\n\nexport function isBuffer(maybeBuf) {\n return Buffer.isBuffer(maybeBuf);\n}\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexport function log() {\n console.log('%s - %s', timestamp(), format.apply(null, arguments));\n}\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nimport inherits from './inherits';\nexport {inherits}\n\nexport function _extend(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport default {\n inherits: inherits,\n _extend: _extend,\n log: log,\n isBuffer: isBuffer,\n isPrimitive: isPrimitive,\n isFunction: isFunction,\n isError: isError,\n isDate: isDate,\n isObject: isObject,\n isRegExp: isRegExp,\n isUndefined: isUndefined,\n isSymbol: isSymbol,\n isString: isString,\n isNumber: isNumber,\n isNullOrUndefined: isNullOrUndefined,\n isNull: isNull,\n isBoolean: isBoolean,\n isArray: isArray,\n inspect: inspect,\n deprecate: deprecate,\n format: format,\n debuglog: debuglog\n}\n","import {Buffer} from 'buffer';\n\nexport default BufferList;\n\nfunction BufferList() {\n this.head = null;\n this.tail = null;\n this.length = 0;\n}\n\nBufferList.prototype.push = function (v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n};\n\nBufferList.prototype.unshift = function (v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n};\n\nBufferList.prototype.shift = function () {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n};\n\nBufferList.prototype.clear = function () {\n this.head = this.tail = null;\n this.length = 0;\n};\n\nBufferList.prototype.join = function (s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n};\n\nBufferList.prototype.concat = function (n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n p.data.copy(ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport {Buffer} from 'buffer';\nvar isBufferEncoding = Buffer.isEncoding\n || function(encoding) {\n switch (encoding && encoding.toLowerCase()) {\n case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n default: return false;\n }\n }\n\n\nfunction assertEncoding(encoding) {\n if (encoding && !isBufferEncoding(encoding)) {\n throw new Error('Unknown encoding: ' + encoding);\n }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nexport function StringDecoder(encoding) {\n this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n assertEncoding(encoding);\n switch (this.encoding) {\n case 'utf8':\n // CESU-8 represents each of Surrogate Pair by 3-bytes\n this.surrogateSize = 3;\n break;\n case 'ucs2':\n case 'utf16le':\n // UTF-16 represents each of Surrogate Pair by 2-bytes\n this.surrogateSize = 2;\n this.detectIncompleteChar = utf16DetectIncompleteChar;\n break;\n case 'base64':\n // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n this.surrogateSize = 3;\n this.detectIncompleteChar = base64DetectIncompleteChar;\n break;\n default:\n this.write = passThroughWrite;\n return;\n }\n\n // Enough space to store all bytes of a single character. UTF-8 needs 4\n // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n this.charBuffer = new Buffer(6);\n // Number of bytes received for the current incomplete multi-byte character.\n this.charReceived = 0;\n // Number of bytes expected for the current incomplete multi-byte character.\n this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n var charStr = '';\n // if our last write ended with an incomplete multibyte character\n while (this.charLength) {\n // determine how many remaining bytes this buffer has to offer for this char\n var available = (buffer.length >= this.charLength - this.charReceived) ?\n this.charLength - this.charReceived :\n buffer.length;\n\n // add the new bytes to the char buffer\n buffer.copy(this.charBuffer, this.charReceived, 0, available);\n this.charReceived += available;\n\n if (this.charReceived < this.charLength) {\n // still not enough chars in this buffer? wait for more ...\n return '';\n }\n\n // remove bytes belonging to the current character from the buffer\n buffer = buffer.slice(available, buffer.length);\n\n // get the character that was split\n charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n var charCode = charStr.charCodeAt(charStr.length - 1);\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n this.charLength += this.surrogateSize;\n charStr = '';\n continue;\n }\n this.charReceived = this.charLength = 0;\n\n // if there are no more bytes in this buffer, just emit our char\n if (buffer.length === 0) {\n return charStr;\n }\n break;\n }\n\n // determine and set charLength / charReceived\n this.detectIncompleteChar(buffer);\n\n var end = buffer.length;\n if (this.charLength) {\n // buffer the incomplete character bytes we got\n buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n end -= this.charReceived;\n }\n\n charStr += buffer.toString(this.encoding, 0, end);\n\n var end = charStr.length - 1;\n var charCode = charStr.charCodeAt(end);\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n var size = this.surrogateSize;\n this.charLength += size;\n this.charReceived += size;\n this.charBuffer.copy(this.charBuffer, size, 0, size);\n buffer.copy(this.charBuffer, 0, 0, size);\n return charStr.substring(0, end);\n }\n\n // or just emit the charStr\n return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n // determine how many bytes we have to check at the end of this buffer\n var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n // Figure out if one of the last i bytes of our buffer announces an\n // incomplete char.\n for (; i > 0; i--) {\n var c = buffer[buffer.length - i];\n\n // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n // 110XXXXX\n if (i == 1 && c >> 5 == 0x06) {\n this.charLength = 2;\n break;\n }\n\n // 1110XXXX\n if (i <= 2 && c >> 4 == 0x0E) {\n this.charLength = 3;\n break;\n }\n\n // 11110XXX\n if (i <= 3 && c >> 3 == 0x1E) {\n this.charLength = 4;\n break;\n }\n }\n this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n var res = '';\n if (buffer && buffer.length)\n res = this.write(buffer);\n\n if (this.charReceived) {\n var cr = this.charReceived;\n var buf = this.charBuffer;\n var enc = this.encoding;\n res += buf.slice(0, cr).toString(enc);\n }\n\n return res;\n};\n\nfunction passThroughWrite(buffer) {\n return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 2;\n this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 3;\n this.charLength = this.charReceived ? 3 : 0;\n}\n","'use strict';\n\n\nReadable.ReadableState = ReadableState;\nimport EventEmitter from 'events';\nimport {inherits, debuglog} from 'util';\nimport BufferList from './buffer-list';\nimport {StringDecoder} from 'string_decoder';\nimport {Duplex} from './duplex';\nimport {nextTick} from 'process';\n\nvar debug = debuglog('stream');\ninherits(Readable, EventEmitter);\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') {\n return emitter.prependListener(event, fn);\n } else {\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event])\n emitter.on(event, fn);\n else if (Array.isArray(emitter._events[event]))\n emitter._events[event].unshift(fn);\n else\n emitter._events[event] = [fn, emitter._events[event]];\n }\n}\nfunction listenerCount (emitter, type) {\n return emitter.listeners(type).length;\n}\nfunction ReadableState(options, stream) {\n\n options = options || {};\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // when piping, we only care about 'readable' events that happen\n // after read()ing all the bytes and not getting any pushback.\n this.ranOut = false;\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nexport default Readable;\nexport function Readable(options) {\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options && typeof options.read === 'function') this._read = options.read;\n\n EventEmitter.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n\n if (!state.objectMode && typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n }\n\n return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n var state = this._readableState;\n return readableAddChunk(this, state, chunk, '', true);\n};\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n var er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (state.ended && !addToFront) {\n var e = new Error('stream.push() after EOF');\n stream.emit('error', e);\n } else if (state.endEmitted && addToFront) {\n var _e = new Error('stream.unshift() after end event');\n stream.emit('error', _e);\n } else {\n var skipAdd;\n if (state.decoder && !addToFront && !encoding) {\n chunk = state.decoder.write(chunk);\n skipAdd = !state.objectMode && chunk.length === 0;\n }\n\n if (!addToFront) state.reading = false;\n\n // Don't add to the buffer if we've decoded to an empty string chunk and\n // we're not in object mode\n if (!skipAdd) {\n // if we want the data now, just emit it.\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n }\n\n maybeReadMore(stream, state);\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n\n return needMoreData(state);\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n var er = null;\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false);\n\n var endFn = doEnd ? onend : cleanup;\n if (state.endEmitted) nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable) {\n debug('onunpipe');\n if (readable === src) {\n cleanup();\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', cleanup);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (listenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && src.listeners('data').length) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var _i = 0; _i < len; _i++) {\n dests[_i].emit('unpipe', this);\n }return this;\n }\n\n // try to find the right one.\n var i = indexOf(state.pipes, dest);\n if (i === -1) return this;\n\n state.pipes.splice(i, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = EventEmitter.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this, state);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var state = this._readableState;\n var paused = false;\n\n var self = this;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) self.push(chunk);\n }\n\n self.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = self.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n forEach(events, function (ev) {\n stream.on(ev, self.emit.bind(self, ev));\n });\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n self._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return self;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n","// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\nimport {inherits, deprecate} from 'util';\nimport {Buffer} from 'buffer';\nWritable.WritableState = WritableState;\nimport {EventEmitter} from 'events';\nimport {Duplex} from './duplex';\nimport {nextTick} from 'process';\ninherits(Writable, EventEmitter);\n\nfunction nop() {}\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\nfunction WritableState(options, stream) {\n Object.defineProperty(this, 'buffer', {\n get: deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n });\n options = options || {};\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function writableStateGetBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\nexport default Writable;\nexport function Writable(options) {\n\n // Writable ctor is applied to Duplexes, though they're not\n // instanceof Writable, they're instanceof Readable.\n if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n }\n\n EventEmitter.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n nextTick(cb, er);\n}\n\n// If we get something that is not a buffer, string, null, or undefined,\n// and we're not in objectMode, then that's an error.\n// Otherwise stream chunks are all considered to be of length=1, and the\n// watermarks determine how many objects to keep in the buffer, rather than\n// how many bytes or characters.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n // Always throw error if a null is written\n // if we are not in object mode then throw\n // if it is not a buffer, string, or undefined.\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, chunk, encoding, cb) {\n chunk = decodeChunk(state, chunk, encoding);\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) nextTick(cb, er);else cb(er);\n\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n nextTick(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished) {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n if (state.pendingcb === 0) {\n prefinish(stream, state);\n state.finished = true;\n stream.emit('finish');\n } else {\n prefinish(stream, state);\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function (err) {\n var entry = _this.entry;\n _this.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = _this;\n } else {\n state.corkedRequestsFree = _this;\n }\n };\n}\n","\nimport {inherits} from 'util';\nimport {nextTick} from 'process';\nimport {Readable} from './readable';\nimport {Writable} from './writable';\n\n\ninherits(Duplex, Readable);\n\nvar keys = Object.keys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\nexport default Duplex;\nexport function Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n","// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n\nimport {Duplex} from './duplex';\n\n\nimport {inherits} from 'util';\ninherits(Transform, Duplex);\n\nfunction TransformState(stream) {\n this.afterTransform = function (er, data) {\n return afterTransform(stream, er, data);\n };\n\n this.needTransform = false;\n this.transforming = false;\n this.writecb = null;\n this.writechunk = null;\n this.writeencoding = null;\n}\n\nfunction afterTransform(stream, er, data) {\n var ts = stream._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data !== null && data !== undefined) stream.push(data);\n\n cb(er);\n\n var rs = stream._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n stream._read(rs.highWaterMark);\n }\n}\nexport default Transform;\nexport function Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = new TransformState(this);\n\n // when the writable side finishes, then flush out anything remaining.\n var stream = this;\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n this.once('prefinish', function () {\n if (typeof this._flush === 'function') this._flush(function (er) {\n done(stream, er);\n });else done(stream);\n });\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('Not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nfunction done(stream, er) {\n if (er) return stream.emit('error', er);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n var ws = stream._writableState;\n var ts = stream._transformState;\n\n if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}\n","\nimport {Transform} from './transform';\n\nimport {inherits} from 'util';\ninherits(PassThrough, Transform);\nexport default PassThrough;\nexport function PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};\n","import EE from 'events';\nimport {inherits} from 'util';\n\nimport {Duplex} from './readable-stream/duplex.js';\nimport {Readable} from './readable-stream/readable.js';\nimport {Writable} from './readable-stream/writable.js';\nimport {Transform} from './readable-stream/transform.js';\nimport {PassThrough} from './readable-stream/passthrough.js';\ninherits(Stream, EE);\nStream.Readable = Readable;\nStream.Writable = Writable;\nStream.Duplex = Duplex;\nStream.Transform = Transform;\nStream.PassThrough = PassThrough;\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\nexport default Stream;\nexport {Readable,Writable,Duplex,Transform,PassThrough,Stream}\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","export default {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nexport default ZStream;\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\n\nexport function assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (source.hasOwnProperty(p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n}\n\n\n// reduce buffer size, avoiding mem copy\nexport function shrinkBuf(buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n}\nexport function arraySet(dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n}\nexport function flattenChunks(chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n}\n\n\nexport var Buf8 = Uint8Array;\nexport var Buf16 = Uint16Array;\nexport var Buf32 = Int32Array;\n// Enable/Disable typed arrays use, for testing\n//\n","'use strict';\n\nimport {arraySet} from './utils';\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) {\n var len = buf.length;\n while (--len >= 0) {\n buf[len] = 0;\n }\n}\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */ [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\n\nvar extra_dbits = /* extra bits for each distance code */ [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\n\nvar extra_blbits = /* extra bits for each bit length code */ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nvar bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n // put_byte(s, (uch)((w) & 0xff));\n // put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2] /*.Code*/ , tree[c * 2 + 1] /*.Len*/ );\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc) {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1] /*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1] /*.Dad*/ * 2 + 1] /*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1] /*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) {\n continue;\n } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2] /*.Freq*/ ;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1] /*.Len*/ + xbits);\n }\n }\n if (overflow === 0) {\n return;\n }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) {\n bits--;\n }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) {\n continue;\n }\n if (tree[m * 2 + 1] /*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1] /*.Len*/ ) * tree[m * 2] /*.Freq*/ ;\n tree[m * 2 + 1] /*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count) {\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1] /*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1] /*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1] /*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1] /*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1] /*.Len*/ = 5;\n static_dtree[n * 2] /*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) {\n s.dyn_ltree[n * 2] /*.Freq*/ = 0;\n }\n for (n = 0; n < D_CODES; n++) {\n s.dyn_dtree[n * 2] /*.Freq*/ = 0;\n }\n for (n = 0; n < BL_CODES; n++) {\n s.bl_tree[n * 2] /*.Freq*/ = 0;\n }\n\n s.dyn_ltree[END_BLOCK * 2] /*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s) {\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header) {\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n // while (len--) {\n // put_byte(s, *buf++);\n // }\n arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2] /*.Freq*/ < tree[_m2] /*.Freq*/ ||\n (tree[_n2] /*.Freq*/ === tree[_m2] /*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2] /*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1] /*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2] /*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1] /*.Len*/ ;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1 /*int /2*/ ); n >= 1; n--) {\n pqdownheap(s, tree, n);\n }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1 /*SMALLEST*/ ];\n s.heap[1 /*SMALLEST*/ ] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1 /*SMALLEST*/ );\n /***/\n\n m = s.heap[1 /*SMALLEST*/ ]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2] /*.Freq*/ = tree[n * 2] /*.Freq*/ + tree[m * 2] /*.Freq*/ ;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1] /*.Dad*/ = tree[m * 2 + 1] /*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1 /*SMALLEST*/ ] = node++;\n pqdownheap(s, tree, 1 /*SMALLEST*/ );\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1 /*SMALLEST*/ ];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1] /*.Len*/ ; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1] /*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1] /*.Len*/ ;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2] /*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) {\n s.bl_tree[curlen * 2] /*.Freq*/ ++;\n }\n s.bl_tree[REP_3_6 * 2] /*.Freq*/ ++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2] /*.Freq*/ ++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2] /*.Freq*/ ++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1] /*.Len*/ ; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */\n /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1] /*.Len*/ ;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do {\n send_code(s, curlen, s.bl_tree);\n } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1] /*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1] /*.Len*/ , 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2] /*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2] /*.Freq*/ !== 0 || s.dyn_ltree[10 * 2] /*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2] /*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2] /*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nexport function _tr_init(s) {\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nexport function _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nexport function _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nexport function _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) {\n opt_lenb = static_lenb;\n }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nexport function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2] /*.Freq*/ ++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2] /*.Freq*/ ++;\n s.dyn_dtree[d_code(dist) * 2] /*.Freq*/ ++;\n }\n\n // (!) This block is disabled in zlib defailts,\n // don't enable it for binary compatibility\n\n //#ifdef TRUNCATE_BLOCK\n // /* Try to guess if it is profitable to stop the current block here */\n // if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n // /* Compute an upper bound for the compressed length */\n // out_length = s.last_lit*8;\n // in_length = s.strstart - s.block_start;\n //\n // for (dcode = 0; dcode < D_CODES; dcode++) {\n // out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n // }\n // out_length >>>= 3;\n // //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n // // s->last_lit, in_length, out_length,\n // // 100L - out_length*100L/in_length));\n // if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n // return true;\n // }\n // }\n //#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n","\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It doesn't worth to make additional optimizationa as in original.\n// Small size is preferable.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nexport default adler32;\n","\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nexport default crc32;\n","\nimport {Buf8,Buf16,arraySet} from './utils';\nimport {_tr_flush_block, _tr_tally, _tr_init, _tr_align, _tr_stored_block} from './trees';\nimport adler32 from './adler32';\nimport crc32 from './crc32';\nimport msg from './messages';\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) {\n var len = buf.length;\n while (--len >= 0) {\n buf[len] = 0;\n }\n}\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) {\n return;\n }\n\n arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n // put_byte(s, (Byte)(b >> 8));\n // put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) {\n len = size;\n }\n if (len === 0) {\n return 0;\n }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n } else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0 /*NIL*/ ;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) {\n nice_match = s.lookahead;\n }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n //#if MIN_MATCH != 3\n // Call update_hash() MIN_MATCH-3 more times\n //#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n // if (s.high_water < s.window_size) {\n // var curr = s.strstart + s.lookahead;\n // var init = 0;\n //\n // if (s.high_water < curr) {\n // /* Previous high water mark below current data -- zero WIN_INIT\n // * bytes or up to end of window, whichever is less.\n // */\n // init = s.window_size - curr;\n // if (init > WIN_INIT)\n // init = WIN_INIT;\n // zmemzero(s->window + curr, (unsigned)init);\n // s->high_water = curr + init;\n // }\n // else if (s->high_water < (ulg)curr + WIN_INIT) {\n // /* High water mark at or above current data, but below current data\n // * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n // * to end of window, whichever is less.\n // */\n // init = (ulg)curr + WIN_INIT - s->high_water;\n // if (init > s->window_size - s->high_water)\n // init = s->window_size - s->high_water;\n // zmemzero(s->window + s->high_water, (unsigned)init);\n // s->high_water += init;\n // }\n // }\n //\n // Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n // \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0 /*NIL*/ ;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0 /*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match /*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n //#if MIN_MATCH != 3\n // Call UPDATE_HASH() MIN_MATCH-3 more times\n //#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break;\n } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0 /*NIL*/ ;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0 /*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD) /*MAX_DIST(s)*/ ) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096 /*TOO_FAR*/ ))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break;\n } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all\n */\n\n this.depth = new Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nexport function deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n _tr_init(s);\n return Z_OK;\n}\n\n\nexport function deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nexport function deflateSetHeader(strm, head) {\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n if (strm.state.wrap !== 2) {\n return Z_STREAM_ERROR;\n }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nexport function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n } else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Buf8(s.w_size * 2);\n s.head = new Buf16(s.hash_size);\n s.prev = new Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nexport function deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nexport function deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n if (s.wrap === 2) {\n // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n } else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n } else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) {\n header |= PRESET_DICT;\n }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n //#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra /* != Z_NULL*/ ) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n } else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name /* != Z_NULL*/ ) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n } else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment /* != Z_NULL*/ ) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n } else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n } else {\n s.status = BUSY_STATE;\n }\n }\n //#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n } else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/\n /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) {\n return Z_OK;\n }\n if (s.wrap <= 0) {\n return Z_STREAM_END;\n }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n } else {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) {\n s.wrap = -s.wrap;\n }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nexport function deflateEnd(strm) {\n var status;\n\n if (!strm /*== Z_NULL*/ || !strm.state /*== Z_NULL*/ ) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nexport function deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm /*== Z_NULL*/ || !strm.state /*== Z_NULL*/ ) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new Buf8(s.w_size);\n arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexport var deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nexport default function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","import {Buf16} from './utils';\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nexport default function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0,\n max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n // var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) {\n break;\n }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) {\n break;\n }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n var i = 0;\n /* process all codes and make table entries */\n for (;;) {\n i++;\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n } else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n } else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val | 0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) {\n break;\n }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) {\n break;\n }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) | 0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) | 0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\nimport {Buf8,Buf16,Buf32,arraySet} from './utils';\nimport adler32 from './adler32';\nimport crc32 from './crc32';\nimport inflate_fast from './inffast';\nimport inflate_table from './inftrees';\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Buf16(320); /* temporary storage for code lengths */\n this.work = new Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nexport function inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null /*Z_NULL*/ ;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nexport function inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nexport function inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n } else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nexport function inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) {\n return Z_STREAM_ERROR;\n }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null /*Z_NULL*/ ;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null /*Z_NULL*/ ;\n }\n return ret;\n}\n\nexport function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new Buf32(512);\n distfix = new Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) {\n state.lens[sym++] = 8;\n }\n while (sym < 256) {\n state.lens[sym++] = 9;\n }\n while (sym < 280) {\n state.lens[sym++] = 7;\n }\n while (sym < 288) {\n state.lens[sym++] = 8;\n }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {\n bits: 9\n });\n\n /* distance table */\n sym = 0;\n while (sym < 32) {\n state.lens[sym++] = 5;\n }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {\n bits: 5\n });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n } else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n } else {\n state.wnext += dist;\n if (state.wnext === state.wsize) {\n state.wnext = 0;\n }\n if (state.whave < state.wsize) {\n state.whave += dist;\n }\n }\n }\n return 0;\n}\n\nexport function inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */ [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) {\n state.mode = TYPEDO;\n } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0 /*crc32(0L, Z_NULL, 0)*/ ;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff) /*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f) /*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f) /*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n } else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1 /*adler32(0L, Z_NULL, 0)*/ ;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n } else if (state.head) {\n state.head.extra = null /*Z_NULL*/ ;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) {\n copy = have;\n }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more conveniend processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) {\n break inf_leave;\n }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) {\n break inf_leave;\n }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/ )) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) {\n break inf_leave;\n }\n } else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) {\n break inf_leave;\n }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/ )) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) {\n break inf_leave;\n }\n } else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1 /*adler32(0L, Z_NULL, 0)*/ ;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) {\n break inf_leave;\n }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01) /*BITS(1)*/ ;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03) /*BITS(2)*/ ) {\n case 0:\n /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1:\n /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2:\n /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) {\n break inf_leave;\n }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) {\n copy = have;\n }\n if (copy > left) {\n copy = left;\n }\n if (copy === 0) {\n break inf_leave;\n }\n //--- zmemcpy(put, next, copy); ---\n arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f) /*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f) /*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f) /*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n //#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07); //BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = {\n bits: state.lenbits\n };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n } else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03); //BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n } else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07); //BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n } else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f); //BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) {\n break;\n }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = {\n bits: state.lenbits\n };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = {\n bits: state.distbits\n };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) {\n break inf_leave;\n }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1)) /*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1) /*BITS(state.extra)*/ ;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)]; /*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1)) /*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) {\n break;\n }\n //--- PULLBYTE() ---//\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1) /*BITS(state.extra)*/ ;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) {\n break inf_leave;\n }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n // (!) This block is disabled in zlib defailts,\n // don't enable it for binary compatibility\n //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n // Trace((stderr, \"inflate.c too far\\n\"));\n // copy -= state.whave;\n // if (copy > state.length) { copy = state.length; }\n // if (copy > left) { copy = left; }\n // left -= copy;\n // state.length -= copy;\n // do {\n // output[put++] = 0;\n // } while (--copy);\n // if (state.length === 0) { state.mode = LEN; }\n // break;\n //#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n } else {\n from = state.wnext - copy;\n }\n if (copy > state.length) {\n copy = state.length;\n }\n from_source = state.window;\n } else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) {\n copy = left;\n }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) {\n state.mode = LEN;\n }\n break;\n case LIT:\n if (left === 0) {\n break inf_leave;\n }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n // Use '|' insdead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) {\n break inf_leave;\n }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nexport function inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/ ) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nexport function inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n if ((state.wrap & 2) === 0) {\n return Z_STREAM_ERROR;\n }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nexport function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */ ) {\n return Z_STREAM_ERROR;\n }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexport var inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","import msg from './messages';\nimport zstream from './zstream';\nimport {deflateInit2, deflateEnd, deflateReset, deflate} from './deflate';\nimport {inflateInit2, inflate, inflateEnd, inflateReset} from './inflate';\n// import constants from './constants';\n\n\n// zlib modes\nexport var NONE = 0;\nexport var DEFLATE = 1;\nexport var INFLATE = 2;\nexport var GZIP = 3;\nexport var GUNZIP = 4;\nexport var DEFLATERAW = 5;\nexport var INFLATERAW = 6;\nexport var UNZIP = 7;\nexport var Z_NO_FLUSH= 0,\n Z_PARTIAL_FLUSH= 1,\n Z_SYNC_FLUSH= 2,\n Z_FULL_FLUSH= 3,\n Z_FINISH= 4,\n Z_BLOCK= 5,\n Z_TREES= 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK= 0,\n Z_STREAM_END= 1,\n Z_NEED_DICT= 2,\n Z_ERRNO= -1,\n Z_STREAM_ERROR= -2,\n Z_DATA_ERROR= -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR= -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION= 0,\n Z_BEST_SPEED= 1,\n Z_BEST_COMPRESSION= 9,\n Z_DEFAULT_COMPRESSION= -1,\n\n\n Z_FILTERED= 1,\n Z_HUFFMAN_ONLY= 2,\n Z_RLE= 3,\n Z_FIXED= 4,\n Z_DEFAULT_STRATEGY= 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY= 0,\n Z_TEXT= 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN= 2,\n\n /* The deflate compression method */\n Z_DEFLATED= 8;\nexport function Zlib(mode) {\n if (mode < DEFLATE || mode > UNZIP)\n throw new TypeError('Bad argument');\n\n this.mode = mode;\n this.init_done = false;\n this.write_in_progress = false;\n this.pending_close = false;\n this.windowBits = 0;\n this.level = 0;\n this.memLevel = 0;\n this.strategy = 0;\n this.dictionary = null;\n}\n\nZlib.prototype.init = function(windowBits, level, memLevel, strategy, dictionary) {\n this.windowBits = windowBits;\n this.level = level;\n this.memLevel = memLevel;\n this.strategy = strategy;\n // dictionary not supported.\n\n if (this.mode === GZIP || this.mode === GUNZIP)\n this.windowBits += 16;\n\n if (this.mode === UNZIP)\n this.windowBits += 32;\n\n if (this.mode === DEFLATERAW || this.mode === INFLATERAW)\n this.windowBits = -this.windowBits;\n\n this.strm = new zstream();\n var status;\n switch (this.mode) {\n case DEFLATE:\n case GZIP:\n case DEFLATERAW:\n status = deflateInit2(\n this.strm,\n this.level,\n Z_DEFLATED,\n this.windowBits,\n this.memLevel,\n this.strategy\n );\n break;\n case INFLATE:\n case GUNZIP:\n case INFLATERAW:\n case UNZIP:\n status = inflateInit2(\n this.strm,\n this.windowBits\n );\n break;\n default:\n throw new Error('Unknown mode ' + this.mode);\n }\n\n if (status !== Z_OK) {\n this._error(status);\n return;\n }\n\n this.write_in_progress = false;\n this.init_done = true;\n};\n\nZlib.prototype.params = function() {\n throw new Error('deflateParams Not supported');\n};\n\nZlib.prototype._writeCheck = function() {\n if (!this.init_done)\n throw new Error('write before init');\n\n if (this.mode === NONE)\n throw new Error('already finalized');\n\n if (this.write_in_progress)\n throw new Error('write already in progress');\n\n if (this.pending_close)\n throw new Error('close is pending');\n};\n\nZlib.prototype.write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n this._writeCheck();\n this.write_in_progress = true;\n\n var self = this;\n process.nextTick(function() {\n self.write_in_progress = false;\n var res = self._write(flush, input, in_off, in_len, out, out_off, out_len);\n self.callback(res[0], res[1]);\n\n if (self.pending_close)\n self.close();\n });\n\n return this;\n};\n\n// set method for Node buffers, used by pako\nfunction bufferSet(data, offset) {\n for (var i = 0; i < data.length; i++) {\n this[offset + i] = data[i];\n }\n}\n\nZlib.prototype.writeSync = function(flush, input, in_off, in_len, out, out_off, out_len) {\n this._writeCheck();\n return this._write(flush, input, in_off, in_len, out, out_off, out_len);\n};\n\nZlib.prototype._write = function(flush, input, in_off, in_len, out, out_off, out_len) {\n this.write_in_progress = true;\n\n if (flush !== Z_NO_FLUSH &&\n flush !== Z_PARTIAL_FLUSH &&\n flush !== Z_SYNC_FLUSH &&\n flush !== Z_FULL_FLUSH &&\n flush !== Z_FINISH &&\n flush !== Z_BLOCK) {\n throw new Error('Invalid flush value');\n }\n\n if (input == null) {\n input = new Buffer(0);\n in_len = 0;\n in_off = 0;\n }\n\n if (out._set)\n out.set = out._set;\n else\n out.set = bufferSet;\n\n var strm = this.strm;\n strm.avail_in = in_len;\n strm.input = input;\n strm.next_in = in_off;\n strm.avail_out = out_len;\n strm.output = out;\n strm.next_out = out_off;\n var status;\n switch (this.mode) {\n case DEFLATE:\n case GZIP:\n case DEFLATERAW:\n status = deflate(strm, flush);\n break;\n case UNZIP:\n case INFLATE:\n case GUNZIP:\n case INFLATERAW:\n status = inflate(strm, flush);\n break;\n default:\n throw new Error('Unknown mode ' + this.mode);\n }\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this._error(status);\n }\n\n this.write_in_progress = false;\n return [strm.avail_in, strm.avail_out];\n};\n\nZlib.prototype.close = function() {\n if (this.write_in_progress) {\n this.pending_close = true;\n return;\n }\n\n this.pending_close = false;\n\n if (this.mode === DEFLATE || this.mode === GZIP || this.mode === DEFLATERAW) {\n deflateEnd(this.strm);\n } else {\n inflateEnd(this.strm);\n }\n\n this.mode = NONE;\n};\nvar status\nZlib.prototype.reset = function() {\n switch (this.mode) {\n case DEFLATE:\n case DEFLATERAW:\n status = deflateReset(this.strm);\n break;\n case INFLATE:\n case INFLATERAW:\n status = inflateReset(this.strm);\n break;\n }\n\n if (status !== Z_OK) {\n this._error(status);\n }\n};\n\nZlib.prototype._error = function(status) {\n this.onerror(msg[status] + ': ' + this.strm.msg, status);\n\n this.write_in_progress = false;\n if (this.pending_close)\n this.close();\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport {Transform} from 'stream';\nimport * as _binding from './zlib-lib/binding';\nimport {inherits} from 'util';\nfunction assert (a, msg) {\n if (!a) {\n throw new Error(msg);\n }\n}\nvar binding = {};\nObject.keys(_binding).forEach(function (key) {\n binding[key] = _binding[key];\n});\n// zlib doesn't provide these, so kludge them in following the same\n// const naming scheme zlib uses.\nbinding.Z_MIN_WINDOWBITS = 8;\nbinding.Z_MAX_WINDOWBITS = 15;\nbinding.Z_DEFAULT_WINDOWBITS = 15;\n\n// fewer than 64 bytes per chunk is stupid.\n// technically it could work with as few as 8, but even 64 bytes\n// is absurdly low. Usually a MB or more is best.\nbinding.Z_MIN_CHUNK = 64;\nbinding.Z_MAX_CHUNK = Infinity;\nbinding.Z_DEFAULT_CHUNK = (16 * 1024);\n\nbinding.Z_MIN_MEMLEVEL = 1;\nbinding.Z_MAX_MEMLEVEL = 9;\nbinding.Z_DEFAULT_MEMLEVEL = 8;\n\nbinding.Z_MIN_LEVEL = -1;\nbinding.Z_MAX_LEVEL = 9;\nbinding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;\n\n\n// translation table for return codes.\nexport var codes = {\n Z_OK: binding.Z_OK,\n Z_STREAM_END: binding.Z_STREAM_END,\n Z_NEED_DICT: binding.Z_NEED_DICT,\n Z_ERRNO: binding.Z_ERRNO,\n Z_STREAM_ERROR: binding.Z_STREAM_ERROR,\n Z_DATA_ERROR: binding.Z_DATA_ERROR,\n Z_MEM_ERROR: binding.Z_MEM_ERROR,\n Z_BUF_ERROR: binding.Z_BUF_ERROR,\n Z_VERSION_ERROR: binding.Z_VERSION_ERROR\n};\n\nObject.keys(codes).forEach(function(k) {\n codes[codes[k]] = k;\n});\n\nexport function createDeflate(o) {\n return new Deflate(o);\n}\n\nexport function createInflate(o) {\n return new Inflate(o);\n}\n\nexport function createDeflateRaw(o) {\n return new DeflateRaw(o);\n}\n\nexport function createInflateRaw(o) {\n return new InflateRaw(o);\n}\n\nexport function createGzip(o) {\n return new Gzip(o);\n}\n\nexport function createGunzip(o) {\n return new Gunzip(o);\n}\n\nexport function createUnzip(o) {\n return new Unzip(o);\n}\n\n\n// Convenience methods.\n// compress/decompress a string or buffer in one step.\nexport function deflate(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Deflate(opts), buffer, callback);\n}\n\nexport function deflateSync(buffer, opts) {\n return zlibBufferSync(new Deflate(opts), buffer);\n}\n\nexport function gzip(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Gzip(opts), buffer, callback);\n}\n\nexport function gzipSync(buffer, opts) {\n return zlibBufferSync(new Gzip(opts), buffer);\n}\n\nexport function deflateRaw(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new DeflateRaw(opts), buffer, callback);\n}\n\nexport function deflateRawSync(buffer, opts) {\n return zlibBufferSync(new DeflateRaw(opts), buffer);\n}\n\nexport function unzip(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Unzip(opts), buffer, callback);\n}\n\nexport function unzipSync(buffer, opts) {\n return zlibBufferSync(new Unzip(opts), buffer);\n}\n\nexport function inflate(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Inflate(opts), buffer, callback);\n}\n\nexport function inflateSync(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n}\n\nexport function gunzip(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new Gunzip(opts), buffer, callback);\n}\n\nexport function gunzipSync(buffer, opts) {\n return zlibBufferSync(new Gunzip(opts), buffer);\n}\n\nexport function inflateRaw(buffer, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n return zlibBuffer(new InflateRaw(opts), buffer, callback);\n}\n\nexport function inflateRawSync(buffer, opts) {\n return zlibBufferSync(new InflateRaw(opts), buffer);\n}\n\nfunction zlibBuffer(engine, buffer, callback) {\n var buffers = [];\n var nread = 0;\n\n engine.on('error', onError);\n engine.on('end', onEnd);\n\n engine.end(buffer);\n flow();\n\n function flow() {\n var chunk;\n while (null !== (chunk = engine.read())) {\n buffers.push(chunk);\n nread += chunk.length;\n }\n engine.once('readable', flow);\n }\n\n function onError(err) {\n engine.removeListener('end', onEnd);\n engine.removeListener('readable', flow);\n callback(err);\n }\n\n function onEnd() {\n var buf = Buffer.concat(buffers, nread);\n buffers = [];\n callback(null, buf);\n engine.close();\n }\n}\n\nfunction zlibBufferSync(engine, buffer) {\n if (typeof buffer === 'string')\n buffer = new Buffer(buffer);\n if (!Buffer.isBuffer(buffer))\n throw new TypeError('Not a string or buffer');\n\n var flushFlag = binding.Z_FINISH;\n\n return engine._processChunk(buffer, flushFlag);\n}\n\n// generic zlib\n// minimal 2-byte header\nexport function Deflate(opts) {\n if (!(this instanceof Deflate)) return new Deflate(opts);\n Zlib.call(this, opts, binding.DEFLATE);\n}\n\nexport function Inflate(opts) {\n if (!(this instanceof Inflate)) return new Inflate(opts);\n Zlib.call(this, opts, binding.INFLATE);\n}\n\n\n\n// gzip - bigger header, same deflate compression\nexport function Gzip(opts) {\n if (!(this instanceof Gzip)) return new Gzip(opts);\n Zlib.call(this, opts, binding.GZIP);\n}\n\nexport function Gunzip(opts) {\n if (!(this instanceof Gunzip)) return new Gunzip(opts);\n Zlib.call(this, opts, binding.GUNZIP);\n}\n\n\n\n// raw - no header\nexport function DeflateRaw(opts) {\n if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts);\n Zlib.call(this, opts, binding.DEFLATERAW);\n}\n\nexport function InflateRaw(opts) {\n if (!(this instanceof InflateRaw)) return new InflateRaw(opts);\n Zlib.call(this, opts, binding.INFLATERAW);\n}\n\n\n// auto-detect header.\nexport function Unzip(opts) {\n if (!(this instanceof Unzip)) return new Unzip(opts);\n Zlib.call(this, opts, binding.UNZIP);\n}\n\n\n// the Zlib class they all inherit from\n// This thing manages the queue of requests, and returns\n// true or false if there is anything in the queue when\n// you call the .write() method.\n\nexport function Zlib(opts, mode) {\n this._opts = opts = opts || {};\n this._chunkSize = opts.chunkSize || binding.Z_DEFAULT_CHUNK;\n\n Transform.call(this, opts);\n\n if (opts.flush) {\n if (opts.flush !== binding.Z_NO_FLUSH &&\n opts.flush !== binding.Z_PARTIAL_FLUSH &&\n opts.flush !== binding.Z_SYNC_FLUSH &&\n opts.flush !== binding.Z_FULL_FLUSH &&\n opts.flush !== binding.Z_FINISH &&\n opts.flush !== binding.Z_BLOCK) {\n throw new Error('Invalid flush flag: ' + opts.flush);\n }\n }\n this._flushFlag = opts.flush || binding.Z_NO_FLUSH;\n\n if (opts.chunkSize) {\n if (opts.chunkSize < binding.Z_MIN_CHUNK ||\n opts.chunkSize > binding.Z_MAX_CHUNK) {\n throw new Error('Invalid chunk size: ' + opts.chunkSize);\n }\n }\n\n if (opts.windowBits) {\n if (opts.windowBits < binding.Z_MIN_WINDOWBITS ||\n opts.windowBits > binding.Z_MAX_WINDOWBITS) {\n throw new Error('Invalid windowBits: ' + opts.windowBits);\n }\n }\n\n if (opts.level) {\n if (opts.level < binding.Z_MIN_LEVEL ||\n opts.level > binding.Z_MAX_LEVEL) {\n throw new Error('Invalid compression level: ' + opts.level);\n }\n }\n\n if (opts.memLevel) {\n if (opts.memLevel < binding.Z_MIN_MEMLEVEL ||\n opts.memLevel > binding.Z_MAX_MEMLEVEL) {\n throw new Error('Invalid memLevel: ' + opts.memLevel);\n }\n }\n\n if (opts.strategy) {\n if (opts.strategy != binding.Z_FILTERED &&\n opts.strategy != binding.Z_HUFFMAN_ONLY &&\n opts.strategy != binding.Z_RLE &&\n opts.strategy != binding.Z_FIXED &&\n opts.strategy != binding.Z_DEFAULT_STRATEGY) {\n throw new Error('Invalid strategy: ' + opts.strategy);\n }\n }\n\n if (opts.dictionary) {\n if (!Buffer.isBuffer(opts.dictionary)) {\n throw new Error('Invalid dictionary: it should be a Buffer instance');\n }\n }\n\n this._binding = new binding.Zlib(mode);\n\n var self = this;\n this._hadError = false;\n this._binding.onerror = function(message, errno) {\n // there is no way to cleanly recover.\n // continuing only obscures problems.\n self._binding = null;\n self._hadError = true;\n\n var error = new Error(message);\n error.errno = errno;\n error.code = binding.codes[errno];\n self.emit('error', error);\n };\n\n var level = binding.Z_DEFAULT_COMPRESSION;\n if (typeof opts.level === 'number') level = opts.level;\n\n var strategy = binding.Z_DEFAULT_STRATEGY;\n if (typeof opts.strategy === 'number') strategy = opts.strategy;\n\n this._binding.init(opts.windowBits || binding.Z_DEFAULT_WINDOWBITS,\n level,\n opts.memLevel || binding.Z_DEFAULT_MEMLEVEL,\n strategy,\n opts.dictionary);\n\n this._buffer = new Buffer(this._chunkSize);\n this._offset = 0;\n this._closed = false;\n this._level = level;\n this._strategy = strategy;\n\n this.once('end', this.close);\n}\n\ninherits(Zlib, Transform);\n\nZlib.prototype.params = function(level, strategy, callback) {\n if (level < binding.Z_MIN_LEVEL ||\n level > binding.Z_MAX_LEVEL) {\n throw new RangeError('Invalid compression level: ' + level);\n }\n if (strategy != binding.Z_FILTERED &&\n strategy != binding.Z_HUFFMAN_ONLY &&\n strategy != binding.Z_RLE &&\n strategy != binding.Z_FIXED &&\n strategy != binding.Z_DEFAULT_STRATEGY) {\n throw new TypeError('Invalid strategy: ' + strategy);\n }\n\n if (this._level !== level || this._strategy !== strategy) {\n var self = this;\n this.flush(binding.Z_SYNC_FLUSH, function() {\n self._binding.params(level, strategy);\n if (!self._hadError) {\n self._level = level;\n self._strategy = strategy;\n if (callback) callback();\n }\n });\n } else {\n process.nextTick(callback);\n }\n};\n\nZlib.prototype.reset = function() {\n return this._binding.reset();\n};\n\n// This is the _flush function called by the transform class,\n// internally, when the last chunk has been written.\nZlib.prototype._flush = function(callback) {\n this._transform(new Buffer(0), '', callback);\n};\n\nZlib.prototype.flush = function(kind, callback) {\n var ws = this._writableState;\n\n if (typeof kind === 'function' || (kind === void 0 && !callback)) {\n callback = kind;\n kind = binding.Z_FULL_FLUSH;\n }\n\n if (ws.ended) {\n if (callback)\n process.nextTick(callback);\n } else if (ws.ending) {\n if (callback)\n this.once('end', callback);\n } else if (ws.needDrain) {\n var self = this;\n this.once('drain', function() {\n self.flush(callback);\n });\n } else {\n this._flushFlag = kind;\n this.write(new Buffer(0), '', callback);\n }\n};\n\nZlib.prototype.close = function(callback) {\n if (callback)\n process.nextTick(callback);\n\n if (this._closed)\n return;\n\n this._closed = true;\n\n this._binding.close();\n\n var self = this;\n process.nextTick(function() {\n self.emit('close');\n });\n};\n\nZlib.prototype._transform = function(chunk, encoding, cb) {\n var flushFlag;\n var ws = this._writableState;\n var ending = ws.ending || ws.ended;\n var last = ending && (!chunk || ws.length === chunk.length);\n\n if (!chunk === null && !Buffer.isBuffer(chunk))\n return cb(new Error('invalid input'));\n\n // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag.\n // If it's explicitly flushing at some other time, then we use\n // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression\n // goodness.\n if (last)\n flushFlag = binding.Z_FINISH;\n else {\n flushFlag = this._flushFlag;\n // once we've flushed the last of the queue, stop flushing and\n // go back to the normal behavior.\n if (chunk.length >= ws.length) {\n this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;\n }\n }\n\n this._processChunk(chunk, flushFlag, cb);\n};\n\nZlib.prototype._processChunk = function(chunk, flushFlag, cb) {\n var availInBefore = chunk && chunk.length;\n var availOutBefore = this._chunkSize - this._offset;\n var inOff = 0;\n\n var self = this;\n\n var async = typeof cb === 'function';\n\n if (!async) {\n var buffers = [];\n var nread = 0;\n\n var error;\n this.on('error', function(er) {\n error = er;\n });\n\n do {\n var res = this._binding.writeSync(flushFlag,\n chunk, // in\n inOff, // in_off\n availInBefore, // in_len\n this._buffer, // out\n this._offset, //out_off\n availOutBefore); // out_len\n } while (!this._hadError && callback(res[0], res[1]));\n\n if (this._hadError) {\n throw error;\n }\n\n var buf = Buffer.concat(buffers, nread);\n this.close();\n\n return buf;\n }\n\n var req = this._binding.write(flushFlag,\n chunk, // in\n inOff, // in_off\n availInBefore, // in_len\n this._buffer, // out\n this._offset, //out_off\n availOutBefore); // out_len\n\n req.buffer = chunk;\n req.callback = callback;\n\n function callback(availInAfter, availOutAfter) {\n if (self._hadError)\n return;\n\n var have = availOutBefore - availOutAfter;\n assert(have >= 0, 'have should not go down');\n\n if (have > 0) {\n var out = self._buffer.slice(self._offset, self._offset + have);\n self._offset += have;\n // serve some output to the consumer.\n if (async) {\n self.push(out);\n } else {\n buffers.push(out);\n nread += out.length;\n }\n }\n\n // exhausted the output buffer, or used all the input create a new one.\n if (availOutAfter === 0 || self._offset >= self._chunkSize) {\n availOutBefore = self._chunkSize;\n self._offset = 0;\n self._buffer = new Buffer(self._chunkSize);\n }\n\n if (availOutAfter === 0) {\n // Not actually done. Need to reprocess.\n // Also, update the availInBefore to the availInAfter value,\n // so that if we have to hit it a third (fourth, etc.) time,\n // it'll have the correct byte counts.\n inOff += (availInBefore - availInAfter);\n availInBefore = availInAfter;\n\n if (!async)\n return true;\n\n var newReq = self._binding.write(flushFlag,\n chunk,\n inOff,\n availInBefore,\n self._buffer,\n self._offset,\n self._chunkSize);\n newReq.callback = callback; // this same function\n newReq.buffer = chunk;\n return;\n }\n\n if (!async)\n return false;\n\n // finished with the chunk.\n cb();\n }\n};\n\ninherits(Deflate, Zlib);\ninherits(Inflate, Zlib);\ninherits(Gzip, Zlib);\ninherits(Gunzip, Zlib);\ninherits(DeflateRaw, Zlib);\ninherits(InflateRaw, Zlib);\ninherits(Unzip, Zlib);\nexport default {\n codes: codes,\n createDeflate: createDeflate,\n createInflate: createInflate,\n createDeflateRaw: createDeflateRaw,\n createInflateRaw: createInflateRaw,\n createGzip: createGzip,\n createGunzip: createGunzip,\n createUnzip: createUnzip,\n deflate: deflate,\n deflateSync: deflateSync,\n gzip: gzip,\n gzipSync: gzipSync,\n deflateRaw: deflateRaw,\n deflateRawSync: deflateRawSync,\n unzip: unzip,\n unzipSync: unzipSync,\n inflate: inflate,\n inflateSync: inflateSync,\n gunzip: gunzip,\n gunzipSync: gunzipSync,\n inflateRaw: inflateRaw,\n inflateRawSync: inflateRawSync,\n Deflate: Deflate,\n Inflate: Inflate,\n Gzip: Gzip,\n Gunzip: Gunzip,\n DeflateRaw: DeflateRaw,\n InflateRaw: InflateRaw,\n Unzip: Unzip,\n Zlib: Zlib\n};\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: zlib codec for PlantUML website\n * Encode/Decode code taken from the PlantUML website:\n * http://plantuml.sourceforge.net/codejavascript2.html\n */\n'use strict';\n\nimport zlib from 'zlib';\n\nfunction encode64(data) {\n var r = '';\n for (var i = 0; i < data.length; i += 3) {\n if (i + 2 == data.length) {\n r += append3bytes(data.charCodeAt(i), data.charCodeAt(i + 1), 0);\n } else if (i + 1 == data.length) {\n r += append3bytes(data.charCodeAt(i), 0, 0);\n } else {\n r += append3bytes(data.charCodeAt(i), data.charCodeAt(i + 1), data.charCodeAt(i + 2));\n }\n }\n return r;\n}\n\nfunction append3bytes(b1, b2, b3) {\n var c1 = b1 >> 2;\n var c2 = ((b1 & 0x3) << 4) | (b2 >> 4);\n var c3 = ((b2 & 0xf) << 2) | (b3 >> 6);\n var c4 = b3 & 0x3f;\n var r = '';\n r += encode6bit(c1 & 0x3f);\n r += encode6bit(c2 & 0x3f);\n r += encode6bit(c3 & 0x3f);\n r += encode6bit(c4 & 0x3f);\n return r;\n}\n\nfunction encode6bit(b) {\n if (b < 10) {\n return String.fromCharCode(48 + b);\n }\n b -= 10;\n if (b < 26) {\n return String.fromCharCode(65 + b);\n }\n b -= 26;\n if (b < 26) {\n return String.fromCharCode(97 + b);\n }\n b -= 26;\n if (b == 0) {\n return '-';\n }\n if (b == 1) {\n return '_';\n }\n return '?';\n}\n\nfunction decode6bit(cc) {\n var c = cc.charCodeAt(0);\n if (cc === '_') return 63;\n if (cc === '-') return 62;\n if (c >= 97) return c - 61; // - 97 + 26 + 10\n if (c >= 65) return c - 55; // - 65 + 10\n if (c >= 48) return c - 48;\n return '?';\n}\n\nfunction extract3bytes(data) {\n var c1 = decode6bit(data[0]);\n var c2 = decode6bit(data[1]);\n var c3 = decode6bit(data[2]);\n var c4 = decode6bit(data[3]);\n var b1 = (c1 << 2) | ((c2 >> 4) & 0x3f);\n var b2 = ((c2 << 4) & 0xf0) | ((c3 >> 2) & 0xf);\n var b3 = ((c3 << 6) & 0xc0) | (c4 & 0x3f);\n return [b1, b2, b3];\n}\n\nfunction decode64(data) {\n var r = '';\n var i = 0;\n for (i = 0; i < data.length; i += 4) {\n var t = extract3bytes(data.substring(i, i + 4));\n r = r + String.fromCharCode(t[0]);\n r = r + String.fromCharCode(t[1]);\n r = r + String.fromCharCode(t[2]);\n }\n return r;\n}\n\nfunction encode(data) {\n return encode64(\n zlib\n .deflateRawSync(data, {\n level: 9\n })\n .toString('binary')\n );\n}\n\nfunction decode(data) {\n return zlib.inflateRawSync(Buffer.from(decode64(data), 'binary')).toString();\n}\n\nfunction zEncode(data) {\n return zlib\n .deflateRawSync(data, {\n level: 9\n })\n .toString('base64');\n}\n\nfunction zDecode(data) {\n return zlib.inflateRawSync(Buffer.from(data, 'base64')).toString();\n}\n\nconst brEncode =\n typeof zlib.brotliCompressSync === 'undefined'\n ? undefined\n : function(data) {\n return zlib\n .brotliCompressSync(Buffer.from(data), {\n params: {\n [zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT,\n [zlib.constants.BROTLI_PARAM_QUALITY]: 11\n }\n })\n .toString('base64');\n };\n\nconst brDecode =\n typeof zlib.brotliDecompressSync === 'undefined'\n ? undefined\n : function(data) {\n return zlib.brotliDecompressSync(Buffer.from(data, 'base64')).toString();\n };\n\nconst zlibcodec = { encode, decode, brEncode, brDecode };\nexport { zlibcodec as default, encode, decode, zEncode, zDecode, brEncode, brDecode };\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: plantuml codec for PlantUML website\n * Encode/Decode code taken from the PlantUML website:\n * http://plantuml.sourceforge.net/codejavascript2.html\n */\n\n'use strict';\n\nimport * as zlibcodec from './zlib-codec.js';\n\nfunction encodeuml(data) {\n const startuml = '@startuml';\n const enduml = '@enduml';\n const s = `${startuml}${String(data.split(startuml)[1]).split(enduml)[0] || ''}${enduml}`;\n return zlibcodec.encode(s);\n}\n\nfunction decodeuml(data) {\n return zlibcodec.decode(data);\n}\n\nconst plantumlcodec = {\n encodeuml,\n decodeuml\n};\n\nexport { plantumlcodec as default, encodeuml, decodeuml };\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown plantuml extension for markdown\n */\n'use strict';\n\nimport format from './log';\nimport plantumlcodec from '../utils/plantuml-codec.js';\n\nconst defaultUmlWebsite = 'www.plantuml.com/plantuml';\nconst defaultImageFormat = 'img';\n\nlet umlElementCount = 0;\nfunction renderPlantumlElement(element, config) {\n return new Promise(resolve => {\n const langattr = element.dataset.lang;\n const langobj = langattr ? JSON.parse(langattr) : null;\n let diagramClass = '';\n if (langobj) {\n if (\n (typeof langobj.codeblock === 'boolean' && langobj.codeblock) ||\n (typeof langobj.codeblock === 'string' && langobj.codeblock.toLowerCase() === 'true')\n ) {\n return resolve(false);\n }\n\n if (langobj.align) {\n //default left\n if (langobj.align === 'center') {\n diagramClass = 'diagram-center';\n } else if (langobj.align === 'right') {\n diagramClass = 'diagram-right';\n }\n }\n }\n const code = element.textContent.trim();\n const name =\n (element.classList.length > 0 ? element.classList[0] : '') +\n (!element.className || !diagramClass ? '' : ' ') +\n diagramClass;\n const imageFormat = config.imageFormat;\n if (imageFormat === 'svg') {\n const id = 'plantuml-' + Date.now() + '-' + Math.floor(Math.random() * 10000);\n if (typeof config.svgRender === 'function' && config.svgRender) {\n config.svgRender(id, name, code, umlElementCount).then(svgData => {\n element.parentNode.outerHTML = `
    ${svgData}
    `;\n resolve(true);\n });\n } else if (typeof window !== 'undefined' && window.fetch && window.dispatchEvent) {\n const protocol = window && window.location.protocol;\n const website = (protocol === 'http:' || protocol === 'https:' ? '//' : 'https://') + config.umlWebSite;\n const imageExtension = imageFormat !== defaultImageFormat ? `.${imageFormat}` : '';\n const uml = plantumlcodec.encodeuml(code);\n const src = `${website}/${imageFormat}/${uml}${imageExtension}`;\n window\n .fetch(src)\n .then(response => {\n if (response.ok) {\n return response.text();\n }\n })\n .then(svgData => {\n element.parentNode.outerHTML = `
    ${svgData}
    `;\n resolve(true);\n });\n }\n } else {\n const protocol = window && window.location.protocol;\n const website = (protocol === 'http:' || protocol === 'https:' ? '//' : 'https://') + config.umlWebSite;\n const imageExtension = imageFormat !== defaultImageFormat ? `.${imageFormat}` : '';\n const uml = plantumlcodec.encodeuml(code);\n const src = `${website}/${imageFormat}/${uml}${imageExtension}`;\n element.parentNode.outerHTML = `
    `;\n return resolve(true);\n }\n });\n}\n\n//
    \nfunction renderPlantumlElements(elements, config) {\n umlElementCount = elements.length;\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderPlantumlElement(element, config));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// Plantuml default config\nconst getConfig = (config = {}) => ({\n umlWebSite: defaultUmlWebsite,\n imageFormat: defaultImageFormat,\n svgRender: null,\n ...config\n});\n\nfunction showdownPlantuml(userConfig) {\n const config = getConfig(userConfig);\n\n return [\n {\n type: 'output',\n config: config,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the plantuml in code blocks\n const elements = wrapper.querySelectorAll('code.plantuml.language-plantuml');\n if (!elements.length) {\n return false;\n }\n\n console.log(format(`Begin render plantuml elements.`));\n return renderPlantumlElements(elements, this.config).then(() => {\n console.log(format(`End render plantuml elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownPlantuml;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown railroad extension for markdown\n */\n'use strict';\n\nconst extName = \"railroad\";\nconst cssCdnName = 'railroadCSS';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown railroad extension can only be used in browser environment!');\n}\n\nimport format from './log';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nlet railroad = false;\nfunction hasRailroad() {\n return railroad;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasRailroad();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) { \n dync = true;\n cdnjs.loadStyleSheet(cssCdnName);\n cdnjs.loadScript(extName).then(() => {\n railroad = true;\n });\n }\n }\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasRailroad()) return;\n cdnjs.unloadScript(extName);\n cdnjs.unloadStyleSheet(cssCdnName);\n railroad = false;\n dync = false; \n}\n\nfunction onRenderRailroad(resolve, res) {\n if (hasRailroad()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const cssLink = res.cssLink;\n const railroadElement = window.eval(data).format();\n const doc = res.element.ownerDocument;\n res.element.parentNode.outerHTML = cssLink\n ? `
    `\n : `
    `;\n railroadElement.addTo(doc.getElementById(id));\n return resolve(true);\n }\n \n setTimeout(() => {\n onRenderRailroad(resolve, res);\n }, 10);\n}\n\n/**\n * render railroad graphs\n */\nfunction renderRailroad(element) {\n return new Promise(resolve => {\n const meta = utils.createElementMeta(extName, element);\n if (!meta) {\n return resolve(false);\n }\n\n\n meta.cssLink = cdnjs.getSrc(cssCdnName);\n onRenderRailroad(resolve, meta);\n });\n}\n\n//
    \nfunction renderRailroadElements(elements) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n elements.forEach(element => {\n promiseArray.push(renderRailroad(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\nfunction showdownRailroad() {\n return [\n {\n type: 'output',\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the railroad in code blocks\n const elements = wrapper.querySelectorAll('code.railroad.language-railroad');\n if (!elements.length) {\n return false;\n }\n\n this.config = {\n cssLink: cdnjs.getSrc(cssCdnName)\n };\n console.log(format(`Begin render railroad elements.`));\n return renderRailroadElements(elements).then(() => {\n console.log(format(`End render railroad elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownRailroad;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown sequence extension for markdown\n */\n'use strict';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown sequence extension can only be used in browser environment!');\n}\n\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof Raphael === 'undefined') {\n var Raphael = window.Raphael || undefined;\n}\n\n// js-sequence-diagrams can create a global object named Diagrams of window,\n// To be compatible with railroad diagrams extension that also has window.Diagram object,\n// You need to save the original Diagrams object of railroad diagrams extension here.\nlet diagram;\nif (typeof window !== 'undefined') {\n if (window.Diagram) {\n diagram = window.Diagram;\n if (window.Diagram['Signal']) {\n var sequence = window.Diagram;\n }\n }\n}\n\nconst themes = ['simple', 'hand'];\nif (typeof sequence === 'undefined' && typeof window !== 'undefined') {\n var sequence = window.SequenceJS;\n}\n\nfunction hasRaphael() {\n return !!Raphael\n}\n\nfunction hasSequence() {\n return hasRaphael() && !!sequence;\n}\n\nfunction hasFlowchart() {\n return hasRaphael() && !!window.flowchart;\n}\n\nlet dync = false;\nconst cssCdnName = 'sequenceCSS';\nfunction dyncLoadScript() {\n const sync = hasSequence();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) { \n dync = true;\n cdnjs.loadStyleSheet(cssCdnName);\n cdnjs\n .loadScript('WebFont')\n .then(() => {\n if (!hasRaphael()) {\n return cdnjs.loadScript('Raphael');\n }\n\n return 'Raphael';\n })\n .then((name) => {\n Raphael = utils.interopDefault(window[name]);\n return cdnjs.loadScript('Snap');\n })\n .then(() => {\n return cdnjs.loadScript('underscore');\n })\n .then(() => {\n // You need to save the original Diagrams object of sequence diagrams extension here.\n if (!diagram && window['Diagram']) {\n diagram = window['Diagram'];\n }\n return cdnjs.loadScript('sequence');\n })\n .then(() => {\n sequence = window['Diagram'];\n window.SequenceJS = sequence;\n // You need to replace the original Diagrams object of sequence diagrams extension here.\n if (diagram) {\n window['Diagram'] = diagram;\n }\n });\n }\n }\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasSequence()) return;\n cdnjs.unloadScript('sequence');\n cdnjs.unloadScript('underscore');\n cdnjs.unloadScript('Snap');\n cdnjs.unloadScript('WebFont');\n cdnjs.unloadStyleSheet(cssCdnName);\n diagram = null;\n sequence = null;\n window.Diagram = null;\n window.SequenceJS = null;\n if (!hasFlowchart()) {\n cdnjs.unloadScript('Raphael');\n const es = document.getElementsByTagName('i');\n if (es && es.length > 0) {\n const body = document.body;\n for (let i = 0; i < es.length; i++) {\n const e = es[i];\n if (e.title && e.title === 'Raphaël Colour Picker') {\n body.removeChild(e);\n }\n }\n }\n Raphael = null;\n window.Raphael = null;\n } \n dync = false; \n}\n\n/**\n * render sequence graphs\n */\nfunction renderSequence(element) {\n const langattr = element.dataset.lang;\n const langobj = langattr ? JSON.parse(langattr) : null;\n let diagramClass = '';\n if (langobj) {\n if (\n (typeof langobj.codeblock === 'boolean' && langobj.codeblock) ||\n (typeof langobj.codeblock === 'string' && langobj.codeblock.toLowerCase() === 'true')\n ) {\n return;\n }\n\n if (langobj.align) {\n //default left\n if (langobj.align === 'center') {\n diagramClass = 'diagram-center';\n } else if (langobj.align === 'right') {\n diagramClass = 'diagram-right';\n }\n }\n }\n const sync = dyncLoadScript();\n const cssLink = cdnjs.getSrc(cssCdnName);\n const code = element.textContent.trim();\n const name = 'js-sequence' + (!diagramClass ? '' : ' ') + diagramClass;\n const id = 'sequence-' + Date.now() + '-' + Math.floor(Math.random() * 10000);\n element.id = id;\n if (cssLink) {\n element.className = element.className + (!element.className ? '' : ' ') + 'css-sequence';\n element.dataset.css = cssLink;\n }\n if (!sync && typeof window !== 'undefined' && window.dispatchEvent) {\n Promise.resolve(id).then(elementid => {\n // dispatch sequence custom event\n window.dispatchEvent(\n new CustomEvent('sequence', {\n detail: {\n id: elementid,\n className: name,\n data: code,\n langattr: langattr,\n cssLink: cssLink\n }\n })\n );\n });\n } else {\n if (typeof window !== 'undefined' && window.dispatchEvent) {\n // dispatch sequence custom event\n window.dispatchEvent(\n new CustomEvent('sequence', {\n detail: {\n id: id,\n className: name,\n data: code,\n langattr: langattr,\n cssLink: cssLink\n }\n })\n );\n }\n }\n}\n\n//
    \nfunction renderSequenceElements(elements) {\n if (!elements.length) {\n return false;\n }\n elements.forEach(element => {\n renderSequence(element);\n });\n return true;\n}\n\nfunction onRenderSequence(element) {\n if (hasSequence()) {\n const id = element.id;\n const name = element.className;\n const data = element.data;\n const cssLink = element.cssLink;\n let theme = 'hand';\n const langattr = element.langattr;\n if (langattr) {\n const obj = JSON.parse(langattr);\n if (obj && obj.theme && themes.indexOf(obj.theme) != -1) {\n theme = obj.theme;\n }\n }\n let el = window.document.getElementById(id);\n if (el) {\n el.parentNode.outerHTML = cssLink\n ? `
    `\n : `
    `;\n el = window.document.getElementById(id);\n const d = sequence.parse(data);\n const options = { theme: theme };\n d.drawSVG(el ? el : id, options);\n return;\n }\n }\n setTimeout(() => {\n onRenderSequence(element);\n }, 10);\n}\n\nfunction showdownSequence() {\n let hasEvent = false;\n const parser = new DOMParser();\n\n return [\n {\n type: 'output',\n filter: function(html) {\n // parse html\n const doc = parser.parseFromString(html, 'text/html');\n const wrapper = typeof doc.body !== 'undefined' ? doc.body : doc;\n\n // find the sequence in code blocks\n const elements = wrapper.querySelectorAll('code.sequence.language-sequence');\n if (elements.length) {\n if (!hasEvent) {\n if (typeof window !== 'undefined' && window.dispatchEvent) {\n hasEvent = true;\n // Listen sequence custom event\n window.addEventListener('sequence', event => {\n if (event.detail) {\n onRenderSequence(event.detail);\n }\n }); \n }\n }\n\n this.config = {\n cssLink: cdnjs.getSrc(cssCdnName)\n };\n }\n if (!renderSequenceElements(elements)) {\n return html;\n }\n // return html text content\n return wrapper.innerHTML;\n }\n }\n ];\n}\n\nexport default showdownSequence;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown wavedrom extension for markdown\n */\n'use strict';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown wavedrom extension can only be used in browser environment!');\n}\n\nimport log from './log';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof WaveDrom === 'undefined') {\n var WaveDrom = window.WaveDrom || undefined;\n}\n\nlet wdCount = 0;\nlet indexWD = 0;\nfunction hasWavedrom() {\n return !!WaveDrom;\n}\n\nlet dync = false;\nfunction dyncLoadScript(skin) {\n const sync = hasWavedrom();\n if (dync) {\n return sync;\n }\n\n if (!sync) { \n dync = true;\n if (typeof window !== 'undefined') {\n cdnjs\n .loadScript({ WaveDromSkin: skin })\n .then(() => {\n return cdnjs.loadScript('WaveDrom');\n })\n .then(name => {\n WaveDrom = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction unloadScript(skin) {\n if (!hasWavedrom()) return;\n cdnjs.unloadScript('WaveDrom');\n cdnjs.unloadScript({ WaveDromSkin: skin });\n WaveDrom = null;\n window.WaveDrom = null;\n dync = false; \n}\n\nfunction onRenderWavedrom(resolve, res) {\n if (hasWavedrom()) {\n const index = res.index;\n const id = res.id;\n const name = res.className;\n const data = res.data;\n let element = res.element;\n const doc = element.ownerDocument;\n element.parentNode.outerHTML = utils.renderCacheElement(doc, id + index, name, el => {\n const obj = window.eval(`(${data})`);\n WaveDrom.RenderWaveForm(index, obj, id);\n // Replace the created cache element with the original element with the same id.\n const wdel = document.getElementById('WaveDrom_Display_' + index);\n if (el != wdel) {\n while (wdel.childNodes.length) {\n el.appendChild(wdel.removeChild(wdel.childNodes[0]));\n }\n }\n });\n return resolve(true);\n }\n \n setTimeout(() => {\n onRenderWavedrom(resolve, res);\n }, 10);\n}\n/**\n * render wavedrom graphs\n */\nfunction renderWavedrom(element) {\n return new Promise(resolve => {\n const langattr = element.dataset.lang;\n const langobj = langattr ? JSON.parse(langattr) : null;\n let diagramClass = '';\n if (langobj) {\n if (\n (typeof langobj.codeblock === 'boolean' && langobj.codeblock) ||\n (typeof langobj.codeblock === 'string' && langobj.codeblock.toLowerCase() === 'true')\n ) {\n return;\n }\n\n if (langobj.align) {\n //default left\n if (langobj.align === 'center') {\n diagramClass = 'diagram-center';\n } else if (langobj.align === 'right') {\n diagramClass = 'diagram-right';\n }\n }\n }\n const code = element.textContent.trim();\n const name =\n (element.classList.length > 0 ? element.classList[0] : '') +\n (!element.className || !diagramClass ? '' : ' ') +\n diagramClass;\n const index = indexWD;\n ++indexWD;\n // When index of wavwdrom is 0, there will be some special logic in the WaveDrom lib.\n // So the index needs to be cleared after all WavwDrom element are rendered.\n --wdCount;\n if (!wdCount) {\n indexWD = 0;\n }\n\n //const id = 'wavedrom-' + Date.now() + '-' + Math.floor(Math.random() * 10000) + '-';\n const id = 'WaveDrom_Display_';\n element.id = id + index;\n const res = {\n element: element,\n index: index,\n id: id,\n className: name,\n data: code\n };\n onRenderWavedrom(resolve, res);\n // const id = 'WaveDrom_Display_' + index;\n // element.parentNode.outerHTML = cdnjs.renderCacheElement(element.ownerDocument, id, name, el => {\n // const obj = window.eval(`(${code})`);\n // WaveDrom.RenderWaveForm(index, obj, 'WaveDrom_Display_');\n // // Replace the created cache element with the original element with the same id.\n // const wdel = document.getElementById('WaveDrom_Display_' + index);\n // if (el != wdel) {\n // while (wdel.childNodes.length) {\n // el.appendChild(wdel.removeChild(wdel.childNodes[0]));\n // }\n // }\n // });\n });\n}\n\n//
    \nfunction renderWavedromElements(elements, skin) {\n dyncLoadScript(skin);\n return new Promise(resolve => {\n const promiseArray = [];\n wdCount = elements.length;\n elements.forEach(element => {\n promiseArray.push(renderWavedrom(element));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// wavedrom default config\nconst getConfig = (config = {}) => ({\n skin: 'default',\n ...config\n});\n\nfunction showdownWavedrom(skinConfig) {\n const config = getConfig(skinConfig)\n\n return [\n {\n type: 'output',\n config: config,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n // find the wavedrom in code blocks\n const elements = wrapper.querySelectorAll('code.wavedrom.language-wavedrom');\n if (!elements.length) {\n return false;\n }\n\n log(`Begin render wavedrom elements.`);\n return renderWavedromElements(elements, this.config.skin).then(() => {\n log(`End render wavedrom elements.`);\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownWavedrom;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown footnotes extension for markdown\n */\n'use strict';\n\nfunction showdownFootnotes() {\n return [\n {\n type: 'lang',\n filter: (text, converter) =>\n text.replace(/^\\[\\^([\\d\\w]+)\\]:\\s*((\\n+(\\s{2,4}|\\t).+)+)$/gm, (str, name, rawContent, _, padding) => {\n const content = converter.makeHtml(rawContent.replace(new RegExp(`^${padding}`, 'gm'), ''));\n return `
    [${name}]:${content}
    `;\n })\n },\n {\n type: 'lang',\n filter: text =>\n text.replace(\n /^\\[\\^([\\d\\w]+)\\]:( |\\n)((.+\\n)*.+)$/gm,\n (str, name, _, content) =>\n `[${name}]: ${content}`\n )\n },\n {\n type: 'lang',\n filter: text =>\n text.replace(/\\[\\^([\\d\\w]+)\\]/m, (str, name) => `[${name}]`)\n }\n ];\n}\n\nexport default showdownFootnotes;\n","/*\n * Copyright (c) 2020-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown container extension for markdown\n */\n'use strict';\n\nfunction showdownContainer() {\n return [\n {\n type: 'lang',\n filter: (text, converter) =>\n text.replace(\n /(?:^|\\n)(?: {0,3})(:::+)(?: *)([\\S]+)(?:[ \\t]*)([^\\s][\\S\\t ]*)?\\n([\\s\\S]*?)\\n(?: {0,3})\\1(?:[ \\t]*)\\n/g,\n function (wholeMatch, delim, classname, title, content) {\n if (classname) {\n let classes = classname.split('-');\n if (classes.length > 1) {\n classes.forEach(function (name, index, arr) {\n if (index > 0) {\n arr[index] = arr[index - 1] + '-' + name;\n }\n });\n } else {\n classes.unshift('container');\n }\n classname = classes.join(' ');\n }\n if (content) {\n content = converter.makeHtml(content);\n }\n if (title) {\n title = `

    ${title}

    `;\n } else {\n title = ''\n }\n return `
    ${title}${content}
    `;\n }\n ),\n },\n ];\n}\n\nexport default showdownContainer;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n * Description: showdown flowchart extension for markdown\n */\n'use strict';\n\nif (typeof window === 'undefined') {\n throw Error('The showdown flowchart extension can only be used in browser environment!');\n}\n\nimport format from './log';\nimport cdnjs from './cdn';\nimport utils from './utils';\n\nif (typeof Raphael === 'undefined') {\n var Raphael = window.Raphael || undefined;\n}\n\nif (typeof flowchart === 'undefined') {\n var flowchart = window.flowchart || undefined;\n}\n\nfunction hasRaphael() {\n return !!Raphael\n}\n\nfunction hasFlowchart() {\n return typeof Raphael !== 'undefined' && Raphael && typeof flowchart !== 'undefined' && flowchart ? true : false;\n}\n\nfunction hasSequence() {\n return hasRaphael() && !!window.SequenceJS;\n}\n\nlet dync = false;\nfunction dyncLoadScript() {\n const sync = hasFlowchart();\n if (typeof window !== 'undefined') {\n if (dync) {\n return sync;\n }\n\n if (!sync) {\n dync = true;\n if (!hasRaphael()) {\n cdnjs\n .loadScript('Raphael')\n .then(name => {\n Raphael = utils.interopDefault(window[name]);\n return cdnjs.loadScript('flowchart');\n })\n .then(name => {\n flowchart = utils.interopDefault(window[name]);\n });\n return sync\n }\n\n cdnjs\n .loadScript('flowchart')\n .then(name => {\n flowchart = utils.interopDefault(window[name]);\n });\n }\n }\n return sync;\n}\n\nfunction unloadScript() {\n if (!hasFlowchart()) return;\n cdnjs.unloadScript('flowchart');\n flowchart = null;\n window.flowchart = null;\n if (!hasSequence()) {\n cdnjs.unloadScript('Raphael');\n const es = document.getElementsByTagName('i');\n if (es && es.length > 0) {\n const body = document.body;\n for (let i = 0; i < es.length; i++) {\n const e = es[i];\n if (e.title && e.title === 'Raphaël Colour Picker') {\n body.removeChild(e);\n }\n }\n }\n Raphael = null;\n window.Raphael = null;\n }\n dync = false;\n}\n\nfunction onRenderFlowchart(resolve, res) {\n if (hasFlowchart()) {\n const id = res.id;\n const name = res.className;\n const data = res.data;\n const options = res.options;\n const doc = res.element.ownerDocument;\n res.element.parentNode.outerHTML = utils.renderCacheElement(doc, id, name, el => {\n flowchart.parse(data).drawSVG(el, options);\n });\n resolve(true);\n return;\n }\n \n setTimeout(() => {\n onRenderFlowchart(resolve, res);\n }, 10);\n}\n\n/**\n * render flowchart graphs\n */\nfunction renderFlowchart(element, options) {\n return new Promise(resolve => {\n const meta = utils.createElementMeta('flowchart', element);\n if (!meta) {\n return resolve(false);\n }\n\n meta.options = options;\n onRenderFlowchart(resolve, meta);\n });\n}\n\n//
    \nfunction renderFlowchartElements(flowchartElements, flowElements, options) {\n dyncLoadScript();\n return new Promise(resolve => {\n const promiseArray = [];\n flowchartElements.forEach(element => {\n promiseArray.push(renderFlowchart(element, options));\n });\n flowElements.forEach(element => {\n promiseArray.push(renderFlowchart(element, options));\n });\n Promise.all(promiseArray).then(() => {\n resolve(true);\n });\n });\n}\n\n// Flowchart default options:\n// 'x': 0,\n// 'y': 0,\n// 'line-width': 3,\n// 'line-length': 50,\n// 'text-margin': 10,\n// 'font-size': 14,\n// 'font-color': 'black',\n// 'font': 'normal',\n// 'font-family': 'calibri',\n// 'font-weight': 'normal',\n// 'line-color': 'black',\n// 'element-color': 'black',\n// 'fill': 'white',\n// 'yes-text': 'yes',\n// 'no-text': 'no',\n// 'arrow-end': 'block',\n// 'class': 'flowchart',\n// 'scale': 1,\n// 'symbols': {\n// 'start': {},\n// 'end': {},\n// 'condition': {},\n// 'inputoutput': {},\n// 'operation': {},\n// 'subroutine': {},\n// 'parallel': {}\n// },\n// 'flowstate' : {\n// 'past' : { 'fill': '#CCCCCC', 'font-size': 12},\n// 'current' : {'fill': 'yellow', 'font-color': 'red', 'font-weight': 'bold'},\n// 'future' : { 'fill': '#FFFF99'},\n// 'invalid': {'fill': '#444444'}\n// }\nconst getOptions = (userOptions = {}) => ({\n 'line-width': 3,\n maxWidth: 3, //ensures the flowcharts fits within a certian width\n 'line-length': 50,\n 'text-margin': 10,\n 'font-size': 14,\n font: 'normal',\n 'font-family': 'Helvetica',\n 'font-weight': 'normal',\n 'font-color': 'black',\n 'line-color': 'black',\n 'element-color': 'black',\n fill: 'white',\n 'yes-text': 'yes',\n 'no-text': 'no',\n 'arrow-end': 'block',\n scale: 1,\n symbols: {\n start: {\n 'font-color': 'red',\n 'element-color': 'green',\n fill: 'yellow'\n },\n end: {\n class: 'end-element'\n }\n },\n flowstate: {\n past: { fill: '#CCCCCC', 'font-size': 12 },\n current: { fill: 'yellow', 'font-color': 'red', 'font-weight': 'bold' },\n future: { fill: '#FFFF99' },\n request: { fill: 'blue' },\n invalid: { fill: '#444444' },\n approved: {\n fill: '#58C4A3',\n 'font-size': 12,\n 'yes-text': 'APPROVED',\n 'no-text': 'n/a'\n },\n rejected: {\n fill: '#C45879',\n 'font-size': 12,\n 'yes-text': 'n/a',\n 'no-text': 'REJECTED'\n }\n },\n ...userOptions\n});\n\nfunction showdownFlowchart(userOptions) {\n const options = getOptions(userOptions);\n\n return [\n {\n type: 'output',\n config: options,\n filter: function(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n\n // find the Flowchart in code blocks\n const flowchartElements = wrapper.querySelectorAll('code.flowchart.language-flowchart');\n const flowElements = wrapper.querySelectorAll('code.flow.language-flow');\n if (!flowchartElements.length && !flowElements.length) {\n return false;\n }\n console.log(format(`Begin render flowchart elements.`));\n return renderFlowchartElements(flowchartElements, flowElements, this.config).then(() => {\n console.log(format(`End render flowchart elements.`));\n return obj;\n });\n }\n }\n ];\n}\n\nexport default showdownFlowchart;\n","/*\n * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved.\n * Use of this source code is governed by a MIT license that can be found in the LICENSE file.\n */\n'use strict';\n\nimport './less/preview.less';\nimport './less/container.less';\n\nimport showdown from './parser/showdown.js';\nimport showdownAbc from './extensions/showdown-abc.js';\nimport showdownToc from './extensions/showdown-toc.js';\nimport showdownViz from './extensions/showdown-viz.js';\nimport showdownVega from './extensions/showdown-vega.js';\nimport showdownAlign from './extensions/showdown-align.js';\nimport showdownKatex from './extensions/showdown-katex.js';\nimport showdownEcharts from './extensions/showdown-echarts.js';\nimport showdownMermaid from './extensions/showdown-mermaid.js';\nimport showdownPlantuml from './extensions/showdown-plantuml.js';\nimport showdownRailroad from './extensions/showdown-railroad.js';\nimport showdownSequence from './extensions/showdown-sequence.js';\nimport showdownWavedrom from './extensions/showdown-wavedrom.js';\nimport showdownFootnotes from './extensions/showdown-footnotes.js';\nimport showdownContainer from './extensions/showdown-container.js';\nimport showdownFlowchart from './extensions/showdown-flowchart.js';\n\nimport * as zlibcodec from './utils/zlib-codec.js';\nimport cdnjs from './extensions/cdn';\n\n//////////////////////////////////////////////////////////////////////\nconst getOptions = (options = {}) => {\n return {\n flavor: 'github',\n ...options\n };\n};\n\nconst getAsyncExtensions = (options, extensions = {}) => {\n const mermaidOptions = options ? options.mermaid || {} : {};\n const plantumlOptions = options ? options.plantuml || {} : {};\n const katexOptions = options ? options.katex || {} : {};\n const vegaOptions = options ? options.vega || {} : {};\n\n const asyncExtensions = {\n 'showdown-plantuml': showdownPlantuml(plantumlOptions),\n 'showdown-mermaid': showdownMermaid(mermaidOptions),\n 'showdown-katex': showdownKatex(katexOptions),\n 'showdown-flowchart': showdownFlowchart,\n 'showdown-viz': showdownViz,\n 'showdown-vega': showdownVega(vegaOptions),\n 'showdown-wavedrom': showdownWavedrom,\n 'showdown-railroad': showdownRailroad,\n 'showdown-abc': showdownAbc,\n 'showdown-echarts': showdownEcharts,\n ...extensions\n };\n\n let extnames = [];\n for (let prop in asyncExtensions) {\n if (asyncExtensions.hasOwnProperty(prop)) {\n showdown.asyncExtension(prop, asyncExtensions[prop]);\n extnames.push(prop);\n }\n }\n return extnames;\n};\n\nconst getExtensions = (options, extensions = {}) => {\n const nativeExtensions = {\n 'showdown-toc': showdownToc,\n 'showdown-align': showdownAlign,\n 'showdown-footnotes': showdownFootnotes,\n 'showdown-container': showdownContainer,\n 'showdown-sequence': showdownSequence,\n ...extensions\n };\n\n let extnames = [];\n for (let prop in nativeExtensions) {\n if (nativeExtensions.hasOwnProperty(prop)) {\n showdown.extension(prop, nativeExtensions[prop]);\n extnames.push(prop);\n }\n }\n return extnames;\n};\n\nconst loadScript = (id, code, element) => {\n if (!code || typeof document === 'undefined') {\n return false;\n }\n\n if (!element) {\n element = document.getElementById(id);\n }\n \n if (element) {\n const eid = element.id;\n const scriptID = `script-${id}`;\n let script = document.querySelector(`#${eid} > #${scriptID}`);\n if (script) {\n document.body.removeChild(script);\n } else {\n script = document.createElement('script');\n script.id = scriptID;\n }\n script.type = \"text/javascript\";\n script.text = code;\n element.appendChild(script);\n }\n return true\n};\n\n\nconst showdownFlavors = ['github', 'ghost', 'vanilla', 'original', 'allon'];\nconst mermaidThemes = ['default', 'forest', 'dark', 'neutral'];\nconst vegaThemes = ['excel', 'ggplot2', 'quartz', 'vox', 'dark'];\nconst vegaRenderers = ['canvas', 'svg'];\nconst plantumlImgFmts = ['svg', 'png', 'jpg'];\n\n// defaultOptions.vega is embedOptions of vega-embed;\n// defaultOptions.katex is config of katex,\n// format is { delimiters: [ { left: '$$', right: '$$', display: true | false | undefined, asciimath: true | undefined }] };\n// defaultOptions.mermaid is config of mermaidAPI;\n// defaultOptions.plantuml is {umlWebSite: string, imageFormat: string};\n// defaultOptions.showdown is flavor and ShowdownOptions of showdown\nconst showdowns = {\n showdown: showdown,\n converter: null,\n defaultOptions: {\n showdown: getOptions(),\n plantuml: { imageFormat: 'svg' },\n mermaid: { theme: 'default' },\n katex: {},\n vega: { theme: 'vox' }\n },\n defaultExtensions: {},\n defaultAsyncExtensions: {},\n markdownDecodeFilter: function(doc) {\n return '';\n },\n initDefaultOptions: function() {\n if (!this.defaultOptions) {\n this.defaultOptions = {\n showdown: {},\n plantuml: {},\n mermaid: {},\n katex: {},\n vega: {}\n };\n }\n },\n setFlavor: function(name) {\n this.showdown.setFlavor(name);\n if (this.converter) {\n this.converter.setFlavor(name);\n }\n },\n addOptions: function(options) {\n for (const key in options) {\n if (key !== 'flavor') {\n this.showdown.setOption(key, options[key]);\n if (this.converter) {\n this.converter.setOption(key, options[key]);\n }\n }\n }\n },\n addExtension: function(name, extension) {\n this.removeExtension(name);\n if (typeof name === 'string') {\n try {\n showdown.extension(name, extension);\n if (this.converter) {\n this.converter.addExtension(name);\n }\n } catch (err) {\n console.log(err);\n }\n }\n },\n removeExtension: function(name) {\n if (typeof name !== 'string') return;\n if (this.converter) {\n let ext = null;\n try {\n ext = showdown.extension(name);\n } catch (err) {\n console.log(err);\n }\n if (!ext) return;\n this.converter.removeExtension(ext);\n }\n showdown.removeExtension(name);\n },\n addAsyncExtension: function(name, extension) {\n this.removeAsyncExtension(name);\n if (typeof name === 'string') {\n try {\n showdown.asyncExtension(name, extension);\n if (this.converter) {\n this.converter.addAsyncExtension(name);\n }\n } catch (err) {\n console.log(err);\n }\n }\n },\n removeAsyncExtension: function(name) {\n if (typeof name !== 'string') return;\n if (this.converter) {\n let ext = null;\n try {\n ext = showdown.asyncExtension(name);\n } catch (err) {\n console.log(err);\n }\n if (!ext) return;\n this.converter.removeAsyncExtension(ext);\n }\n showdown.removeAsyncExtension(name);\n },\n setCDN: function(cdnname, defScheme, distScheme) {\n if (typeof cdnname === 'string' && cdnname) {\n cdnjs.setCDN(cdnname, defScheme, distScheme);\n }\n },\n setShowdownFlavor: function(name) {\n this.initDefaultOptions();\n if (name) {\n if (showdownFlavors.indexOf(name) === -1) {\n name = 'github';\n }\n this.defaultOptions.showdown.flavor = name;\n this.setFlavor(name);\n }\n },\n setShowdownOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.showdown = Object.assign(this.defaultOptions.showdown || {}, options);\n this.setShowdownFlavor(this.defaultOptions.showdown.flavor);\n this.addOptions(this.defaultOptions.showdown);\n return this.defaultOptions.showdown;\n },\n setPlantumlOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.plantuml = Object.assign(this.defaultOptions.plantuml || {}, options);\n const imageFormat = this.defaultOptions.plantuml.imageFormat;\n if (imageFormat && plantumlImgFmts.indexOf(imageFormat) === -1) {\n this.defaultOptions.plantuml.imageFormat = 'png';\n }\n if (this.converter) {\n this.addAsyncExtension('showdown-plantuml', showdownPlantuml(this.defaultOptions.plantuml));\n }\n return this.defaultOptions.plantuml;\n },\n setMermaidOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.mermaid = Object.assign(this.defaultOptions.mermaid || {}, options);\n const theme = this.defaultOptions.mermaid.theme;\n if (theme && mermaidThemes.indexOf(theme) === -1) {\n this.defaultOptions.mermaid.theme = 'default';\n }\n if (this.converter) {\n this.addAsyncExtension('showdown-mermaid', showdownMermaid(this.defaultOptions.mermaid));\n }\n return this.defaultOptions.mermaid;\n },\n setKatexOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.katex = Object.assign(this.defaultOptions.katex || {}, options);\n if (this.converter) {\n this.addAsyncExtension('showdown-katex', showdownKatex(this.defaultOptions.katex));\n }\n return this.defaultOptions.katex;\n },\n setVegaOptions: function(options) {\n this.initDefaultOptions();\n if (typeof options !== 'object' || !options) options = {};\n this.defaultOptions.vega = Object.assign(this.defaultOptions.vega || {}, options);\n const theme = this.defaultOptions.vega.theme;\n if (theme && vegaThemes.indexOf(theme) === -1) {\n this.defaultOptions.vega.theme = 'vox';\n }\n const renderer = this.defaultOptions.vega.renderer;\n if (renderer && vegaRenderers.indexOf(renderer) === -1) {\n this.defaultOptions.vega.renderer = 'canvas';\n }\n if (this.converter) {\n this.addAsyncExtension('showdown-vega', showdownVega(this.defaultOptions.vega));\n }\n return this.defaultOptions.vega;\n },\n init: function(reset) {\n if (!this.converter) {\n const showdownOptions = this.defaultOptions ? this.defaultOptions.showdown || {} : {};\n const options = getOptions(showdownOptions);\n const extensions = getExtensions(this.defaultOptions, this.defaultExtensions);\n const asyncExtensions = getAsyncExtensions(this.defaultOptions, this.defaultAsyncExtensions);\n this.setFlavor(options.flavor);\n // converter instance of showdown\n this.converter = new showdown.Converter({\n extensions: extensions\n }).initConvertExtObj(options.flavor, asyncExtensions);\n this.addOptions(options);\n } else {\n let resetOptions = {};\n if (typeof reset === 'boolean' && reset) {\n resetOptions = { option: true, extension: true };\n } else {\n resetOptions = reset;\n }\n if (typeof resetOptions === 'object') {\n if (resetOptions.hasOwnProperty('option') && resetOptions.option) {\n const showdownOptions = this.defaultOptions ? this.defaultOptions.showdown || {} : {};\n const options = getOptions(showdownOptions);\n this.addOptions(options);\n }\n if (resetOptions.hasOwnProperty('extension') && resetOptions.extension) {\n this.addAsyncExtension('showdown-plantuml', showdownPlantuml(this.defaultOptions.plantuml));\n this.addAsyncExtension('showdown-mermaid', showdownMermaid(this.defaultOptions.mermaid));\n this.addAsyncExtension('showdown-vega', showdownVega(this.defaultOptions.vega));\n }\n }\n }\n return this;\n },\n makeHtml: function(doc, callback) {\n let content = '';\n if (typeof doc === 'object') {\n if (typeof doc.content === 'string') {\n if (typeof doc.type === 'string') {\n switch (doc.type) {\n case 'zip':\n content = this.zDecode(doc.content);\n break;\n default:\n content = this.markdownDecodeFilter(doc) || doc.content;\n break;\n }\n } else {\n content = doc.content;\n }\n }\n } else {\n content = doc;\n }\n\n if (this.converter && content) {\n function _getCssLink(wrapper, className, extName) {\n // find elements that has csslink\n const element = wrapper.querySelector(className);\n let cssLink = '';\n if (element) {\n cssLink = element.dataset.css;\n } else {\n let ext;\n try {\n ext = showdown.extension(extName);\n } catch {}\n\n if (!ext) {\n try {\n ext = showdown.asyncExtension(extName);\n } catch {}\n }\n\n if (ext) {\n if (Array.isArray(ext)) {\n for (var i = 0; i < ext.length; ++i) {\n if (ext[i].hasOwnProperty('config') && ext[i].config.hasOwnProperty('cssLink')) {\n cssLink = ext[i].config.cssLink;\n break;\n }\n }\n } else if (typeof ext === 'object') {\n if (ext.hasOwnProperty('config') && ext.config.hasOwnProperty('cssLink')) {\n cssLink = ext.config.cssLink;\n }\n }\n }\n }\n return cssLink;\n }\n\n function _checkCssTypes(obj) {\n const wrapper = obj.wrapper;\n if (!wrapper) {\n return false;\n }\n\n return new Promise(resolve => {\n const katexCssLink = _getCssLink(wrapper, '.css-katex', 'showdown-katex');\n const sequenceCssLink = _getCssLink(wrapper, '.css-sequence', 'showdown-sequence');\n const railroadCssLink = _getCssLink(wrapper, '.css-railroad', 'showdown-railroad');\n\n obj.cssTypes = {\n hasKatex: katexCssLink ? true : false,\n hasSequence: sequenceCssLink ? true : false,\n hasRailroad: railroadCssLink ? true : false,\n css: {\n katex: katexCssLink,\n sequence: sequenceCssLink,\n railroad: railroadCssLink\n }\n };\n if (typeof callback === 'function' && callback) {\n callback(obj.cssTypes);\n }\n return resolve(obj);\n });\n }\n\n return this.converter.asyncMakeHtml(content, _checkCssTypes).then( obj => {\n content = `
    ${obj.html}
    `;\n return { html: content, scripts: obj.scripts };\n });\n }\n return Promise.reject(!content ? 'Content is empty.' : 'Converter is invaild.');\n },\n completedHtml: function(scripts, element) {\n if (!showdown.helper.isArray(scripts)) {\n scripts = [scripts];\n }\n\n return new Promise((revole, reject) => {\n for (var i = 0; i < scripts.length; ++i) {\n const script = scripts[i];\n if (!loadScript(script.id, script.code, element)) {\n return reject('Args is invaild!');\n }\n }\n revole(true);\n });\n },\n zDecode: function(zContent) {\n return zlibcodec.zDecode(zContent);\n },\n zEncode: function(content) {\n return zlibcodec.zEncode(content);\n }\n};\n\nexport default showdowns;\n"],"names":["getDefaultOpts","simple","defaultOptions","omitExtraWLInCodeBlocks","defaultValue","describe","type","noHeaderId","prefixHeaderId","rawPrefixHeaderId","ghCompatibleHeaderId","rawHeaderId","headerLevelStart","parseImgDimensions","simplifiedAutoLink","excludeTrailingPunctuationFromURLs","literalMidWordUnderscores","literalMidWordAsterisks","strikethrough","tables","tablesHeaderId","ghCodeBlocks","tasklists","smoothLivePreview","smartIndentationFix","disableForced4SpacesIndentedSublists","simpleLineBreaks","requireSpaceBeforeHeadingText","ghMentions","ghMentionsLink","encodeEmails","openLinksInNewWindow","backslashEscapesHTMLTags","emoji","underline","ellipsis","completeHTMLDocument","metadata","splitAdjacentBlockquotes","JSON","parse","stringify","ret","opt","hasOwnProperty","showdown","parsers","extensions","globalOptions","setFlavor","flavor","github","original","ghost","vanilla","allOn","options","allOptionsOn","validate","extension","name","errMsg","valid","error","helper","isArray","i","length","baseMsg","ext","isString","toLowerCase","isUndefined","listeners","filter","regex","ln","RegExp","replace","escapeCharactersCallback","wholeMatch","m1","charCodeAt","setOption","key","value","this","getOption","getOptions","resetOptions","Error","preset","option","getFlavor","getFlavorOptions","getDefaultOptions","subParser","func","stdExtName","validExtension","getAllExtensions","removeExtension","resetExtensions","validateExtension","console","warn","a","String","isFunction","toString","call","Array","forEach","obj","callback","prop","s","escapeCharacters","text","charsToEscape","afterBackslash","regexString","unescapeHTMLEntities","txt","rgxFindMatchPos","str","left","right","flags","t","m","start","end","f","g","indexOf","x","l","pos","exec","test","lastIndex","push","match","index","matchRecursiveRegExp","matchPos","results","slice","replaceRecursiveRegExp","replacement","repStr","finalStr","lng","bits","join","regexIndexOf","fromIndex","substring","search","splitAtIndex","encodeEmailAddress","mail","encode","ch","Math","floor","random","r","padEnd","targetLength","padString","repeat","msg","alert","log","regexes","asteriskDashAndColon","emojis","ab","abc","abcd","accept","aerial_tramway","airplane","alarm_clock","alembic","alien","ambulance","amphora","anchor","angel","anger","angry","anguished","ant","apple","aquarius","aries","arrow_backward","arrow_double_down","arrow_double_up","arrow_down","arrow_down_small","arrow_forward","arrow_heading_down","arrow_heading_up","arrow_left","arrow_lower_left","arrow_lower_right","arrow_right","arrow_right_hook","arrow_up","arrow_up_down","arrow_up_small","arrow_upper_left","arrow_upper_right","arrows_clockwise","arrows_counterclockwise","art","articulated_lorry","artificial_satellite","astonished","athletic_shoe","atm","atom_symbol","avocado","b","baby","baby_bottle","baby_chick","baby_symbol","back","bacon","badminton","baggage_claim","baguette_bread","balance_scale","balloon","ballot_box","ballot_box_with_check","bamboo","banana","bangbang","bank","bar_chart","barber","baseball","basketball","basketball_man","basketball_woman","bat","bath","bathtub","battery","beach_umbrella","bear","bed","bee","beer","beers","beetle","beginner","bell","bellhop_bell","bento","biking_man","bike","biking_woman","bikini","biohazard","bird","birthday","black_circle","black_flag","black_heart","black_joker","black_large_square","black_medium_small_square","black_medium_square","black_nib","black_small_square","black_square_button","blonde_man","blonde_woman","blossom","blowfish","blue_book","blue_car","blue_heart","blush","boar","boat","bomb","book","bookmark","bookmark_tabs","books","boom","boot","bouquet","bowing_man","bow_and_arrow","bowing_woman","bowling","boxing_glove","boy","bread","bride_with_veil","bridge_at_night","briefcase","broken_heart","bug","building_construction","bulb","bullettrain_front","bullettrain_side","burrito","bus","business_suit_levitating","busstop","bust_in_silhouette","busts_in_silhouette","butterfly","cactus","cake","calendar","call_me_hand","calling","camel","camera","camera_flash","camping","cancer","candle","candy","canoe","capital_abcd","capricorn","car","card_file_box","card_index","card_index_dividers","carousel_horse","carrot","cat","cat2","cd","chains","champagne","chart","chart_with_downwards_trend","chart_with_upwards_trend","checkered_flag","cheese","cherries","cherry_blossom","chestnut","chicken","children_crossing","chipmunk","chocolate_bar","christmas_tree","church","cinema","circus_tent","city_sunrise","city_sunset","cityscape","cl","clamp","clap","clapper","classical_building","clinking_glasses","clipboard","clock1","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","closed_book","closed_lock_with_key","closed_umbrella","cloud","cloud_with_lightning","cloud_with_lightning_and_rain","cloud_with_rain","cloud_with_snow","clown_face","clubs","cocktail","coffee","coffin","cold_sweat","comet","computer","computer_mouse","confetti_ball","confounded","confused","congratulations","construction","construction_worker_man","construction_worker_woman","control_knobs","convenience_store","cookie","cool","policeman","copyright","corn","couch_and_lamp","couple","couple_with_heart_woman_man","couple_with_heart_man_man","couple_with_heart_woman_woman","couplekiss_man_man","couplekiss_man_woman","couplekiss_woman_woman","cow","cow2","cowboy_hat_face","crab","crayon","credit_card","crescent_moon","cricket","crocodile","croissant","crossed_fingers","crossed_flags","crossed_swords","crown","cry","crying_cat_face","crystal_ball","cucumber","cupid","curly_loop","currency_exchange","curry","custard","customs","cyclone","dagger","dancer","dancing_women","dancing_men","dango","dark_sunglasses","dart","dash","date","deciduous_tree","deer","department_store","derelict_house","desert","desert_island","desktop_computer","male_detective","diamond_shape_with_a_dot_inside","diamonds","disappointed","disappointed_relieved","dizzy","dizzy_face","do_not_litter","dog","dog2","dollar","dolls","dolphin","door","doughnut","dove","dragon","dragon_face","dress","dromedary_camel","drooling_face","droplet","drum","duck","dvd","eagle","ear","ear_of_rice","earth_africa","earth_americas","earth_asia","egg","eggplant","eight_pointed_black_star","eight_spoked_asterisk","electric_plug","elephant","email","envelope_with_arrow","euro","european_castle","european_post_office","evergreen_tree","exclamation","expressionless","eye","eye_speech_bubble","eyeglasses","eyes","face_with_head_bandage","face_with_thermometer","fist_oncoming","factory","fallen_leaf","family_man_woman_boy","family_man_boy","family_man_boy_boy","family_man_girl","family_man_girl_boy","family_man_girl_girl","family_man_man_boy","family_man_man_boy_boy","family_man_man_girl","family_man_man_girl_boy","family_man_man_girl_girl","family_man_woman_boy_boy","family_man_woman_girl","family_man_woman_girl_boy","family_man_woman_girl_girl","family_woman_boy","family_woman_boy_boy","family_woman_girl","family_woman_girl_boy","family_woman_girl_girl","family_woman_woman_boy","family_woman_woman_boy_boy","family_woman_woman_girl","family_woman_woman_girl_boy","family_woman_woman_girl_girl","fast_forward","fax","fearful","feet","female_detective","ferris_wheel","ferry","field_hockey","file_cabinet","file_folder","film_projector","film_strip","fire","fire_engine","fireworks","first_quarter_moon","first_quarter_moon_with_face","fish","fish_cake","fishing_pole_and_fish","fist_raised","fist_left","fist_right","flashlight","fleur_de_lis","flight_arrival","flight_departure","floppy_disk","flower_playing_cards","flushed","fog","foggy","football","footprints","fork_and_knife","fountain","fountain_pen","four_leaf_clover","fox_face","framed_picture","free","fried_egg","fried_shrimp","fries","frog","frowning","frowning_face","frowning_man","frowning_woman","middle_finger","fuelpump","full_moon","full_moon_with_face","funeral_urn","game_die","gear","gem","gemini","gift","gift_heart","girl","globe_with_meridians","goal_net","goat","golf","golfing_man","golfing_woman","gorilla","grapes","green_apple","green_book","green_heart","green_salad","grey_exclamation","grey_question","grimacing","grin","grinning","guardsman","guardswoman","guitar","gun","haircut_woman","haircut_man","hamburger","hammer","hammer_and_pick","hammer_and_wrench","hamster","hand","handbag","handshake","hankey","hatched_chick","hatching_chick","headphones","hear_no_evil","heart","heart_decoration","heart_eyes","heart_eyes_cat","heartbeat","heartpulse","hearts","heavy_check_mark","heavy_division_sign","heavy_dollar_sign","heavy_heart_exclamation","heavy_minus_sign","heavy_multiplication_x","heavy_plus_sign","helicopter","herb","hibiscus","high_brightness","high_heel","hocho","hole","honey_pot","horse","horse_racing","hospital","hot_pepper","hotdog","hotel","hotsprings","hourglass","hourglass_flowing_sand","house","house_with_garden","houses","hugs","hushed","ice_cream","ice_hockey","ice_skate","icecream","id","ideograph_advantage","imp","inbox_tray","incoming_envelope","tipping_hand_woman","information_source","innocent","interrobang","iphone","izakaya_lantern","jack_o_lantern","japan","japanese_castle","japanese_goblin","japanese_ogre","jeans","joy","joy_cat","joystick","kaaba","keyboard","keycap_ten","kick_scooter","kimono","kiss","kissing","kissing_cat","kissing_closed_eyes","kissing_heart","kissing_smiling_eyes","kiwi_fruit","koala","koko","label","large_blue_circle","large_blue_diamond","large_orange_diamond","last_quarter_moon","last_quarter_moon_with_face","latin_cross","laughing","leaves","ledger","left_luggage","left_right_arrow","leftwards_arrow_with_hook","lemon","leo","leopard","level_slider","libra","light_rail","link","lion","lips","lipstick","lizard","lock","lock_with_ink_pen","lollipop","loop","loud_sound","loudspeaker","love_hotel","love_letter","low_brightness","lying_face","mag","mag_right","mahjong","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","man","man_artist","man_astronaut","man_cartwheeling","man_cook","man_dancing","man_facepalming","man_factory_worker","man_farmer","man_firefighter","man_health_worker","man_in_tuxedo","man_judge","man_juggling","man_mechanic","man_office_worker","man_pilot","man_playing_handball","man_playing_water_polo","man_scientist","man_shrugging","man_singer","man_student","man_teacher","man_technologist","man_with_gua_pi_mao","man_with_turban","tangerine","mans_shoe","mantelpiece_clock","maple_leaf","martial_arts_uniform","mask","massage_woman","massage_man","meat_on_bone","medal_military","medal_sports","mega","melon","memo","men_wrestling","menorah","mens","metal","metro","microphone","microscope","milk_glass","milky_way","minibus","minidisc","mobile_phone_off","money_mouth_face","money_with_wings","moneybag","monkey","monkey_face","monorail","moon","mortar_board","mosque","motor_boat","motor_scooter","motorcycle","motorway","mount_fuji","mountain","mountain_biking_man","mountain_biking_woman","mountain_cableway","mountain_railway","mountain_snow","mouse","mouse2","movie_camera","moyai","mrs_claus","muscle","mushroom","musical_keyboard","musical_note","musical_score","mute","nail_care","name_badge","national_park","nauseated_face","necktie","negative_squared_cross_mark","nerd_face","neutral_face","new","new_moon","new_moon_with_face","newspaper","newspaper_roll","next_track_button","ng","no_good_man","no_good_woman","night_with_stars","no_bell","no_bicycles","no_entry","no_entry_sign","no_mobile_phones","no_mouth","no_pedestrians","no_smoking","nose","notebook","notebook_with_decorative_cover","notes","nut_and_bolt","o","o2","ocean","octopus","oden","office","oil_drum","ok","ok_hand","ok_man","ok_woman","old_key","older_man","older_woman","om","on","oncoming_automobile","oncoming_bus","oncoming_police_car","oncoming_taxi","open_file_folder","open_hands","open_mouth","open_umbrella","ophiuchus","orange_book","orthodox_cross","outbox_tray","owl","ox","package","page_facing_up","page_with_curl","pager","paintbrush","palm_tree","pancakes","panda_face","paperclip","paperclips","parasol_on_ground","parking","part_alternation_mark","partly_sunny","passenger_ship","passport_control","pause_button","peace_symbol","peach","peanuts","pear","pen","pencil2","penguin","pensive","performing_arts","persevere","person_fencing","pouting_woman","phone","pick","pig","pig2","pig_nose","pill","pineapple","ping_pong","pisces","pizza","place_of_worship","plate_with_cutlery","play_or_pause_button","point_down","point_left","point_right","point_up","point_up_2","police_car","policewoman","poodle","popcorn","post_office","postal_horn","postbox","potable_water","potato","pouch","poultry_leg","pound","rage","pouting_cat","pouting_man","pray","prayer_beads","pregnant_woman","previous_track_button","prince","princess","printer","purple_heart","purse","pushpin","put_litter_in_its_place","question","rabbit","rabbit2","racehorse","racing_car","radio","radio_button","radioactive","railway_car","railway_track","rainbow","rainbow_flag","raised_back_of_hand","raised_hand_with_fingers_splayed","raised_hands","raising_hand_woman","raising_hand_man","ram","ramen","rat","record_button","recycle","red_circle","registered","relaxed","relieved","reminder_ribbon","repeat_one","rescue_worker_helmet","restroom","revolving_hearts","rewind","rhinoceros","ribbon","rice","rice_ball","rice_cracker","rice_scene","right_anger_bubble","ring","robot","rocket","rofl","roll_eyes","roller_coaster","rooster","rose","rosette","rotating_light","round_pushpin","rowing_man","rowing_woman","rugby_football","running_man","running_shirt_with_sash","running_woman","sa","sagittarius","sake","sandal","santa","satellite","saxophone","school","school_satchel","scissors","scorpion","scorpius","scream","scream_cat","scroll","seat","secret","see_no_evil","seedling","selfie","shallow_pan_of_food","shamrock","shark","shaved_ice","sheep","shell","shield","shinto_shrine","ship","shirt","shopping","shopping_cart","shower","shrimp","signal_strength","six_pointed_star","ski","skier","skull","skull_and_crossbones","sleeping","sleeping_bed","sleepy","slightly_frowning_face","slightly_smiling_face","slot_machine","small_airplane","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","smile","smile_cat","smiley","smiley_cat","smiling_imp","smirk","smirk_cat","smoking","snail","snake","sneezing_face","snowboarder","snowflake","snowman","snowman_with_snow","sob","soccer","soon","sos","sound","space_invader","spades","spaghetti","sparkle","sparkler","sparkles","sparkling_heart","speak_no_evil","speaker","speaking_head","speech_balloon","speedboat","spider","spider_web","spiral_calendar","spiral_notepad","spoon","squid","stadium","star","star2","star_and_crescent","star_of_david","stars","station","statue_of_liberty","steam_locomotive","stew","stop_button","stop_sign","stopwatch","straight_ruler","strawberry","stuck_out_tongue","stuck_out_tongue_closed_eyes","stuck_out_tongue_winking_eye","studio_microphone","stuffed_flatbread","sun_behind_large_cloud","sun_behind_rain_cloud","sun_behind_small_cloud","sun_with_face","sunflower","sunglasses","sunny","sunrise","sunrise_over_mountains","surfing_man","surfing_woman","sushi","suspension_railway","sweat","sweat_drops","sweat_smile","sweet_potato","swimming_man","swimming_woman","symbols","synagogue","syringe","taco","tada","tanabata_tree","taurus","taxi","tea","telephone_receiver","telescope","tennis","tent","thermometer","thinking","thought_balloon","ticket","tickets","tiger","tiger2","timer_clock","tipping_hand_man","tired_face","tm","toilet","tokyo_tower","tomato","tongue","top","tophat","tornado","trackball","tractor","traffic_light","train","train2","tram","triangular_flag_on_post","triangular_ruler","trident","triumph","trolleybus","trophy","tropical_drink","tropical_fish","truck","trumpet","tulip","tumbler_glass","turkey","turtle","tv","twisted_rightwards_arrows","two_hearts","two_men_holding_hands","two_women_holding_hands","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7981","u7a7a","umbrella","unamused","underage","unicorn","unlock","up","upside_down_face","v","vertical_traffic_light","vhs","vibration_mode","video_camera","video_game","violin","virgo","volcano","volleyball","vs","vulcan_salute","walking_man","walking_woman","waning_crescent_moon","waning_gibbous_moon","warning","wastebasket","watch","water_buffalo","watermelon","wave","wavy_dash","waxing_crescent_moon","wc","weary","wedding","weight_lifting_man","weight_lifting_woman","whale","whale2","wheel_of_dharma","wheelchair","white_check_mark","white_circle","white_flag","white_flower","white_large_square","white_medium_small_square","white_medium_square","white_small_square","white_square_button","wilted_flower","wind_chime","wind_face","wine_glass","wink","wolf","woman","woman_artist","woman_astronaut","woman_cartwheeling","woman_cook","woman_facepalming","woman_factory_worker","woman_farmer","woman_firefighter","woman_health_worker","woman_judge","woman_juggling","woman_mechanic","woman_office_worker","woman_pilot","woman_playing_handball","woman_playing_water_polo","woman_scientist","woman_shrugging","woman_singer","woman_student","woman_teacher","woman_technologist","woman_with_turban","womans_clothes","womans_hat","women_wrestling","womens","world_map","worried","wrench","writing_hand","yellow_heart","yen","yin_yang","yum","zap","zipper_mouth_face","zzz","octocat","Converter","converterOptions","langExtensions","outputModifiers","setConvFlavor","parsed","raw","format","_parseExtension","legacyExtensionLoading","validExt","listen","gOpt","_constructor","_dispatch","evtName","globals","ei","nText","makeHtml","gHtmlBlocks","gHtmlMdBlocks","gHtmlSpans","gUrls","gTitles","gDimensions","gListLevel","hashLinkCounts","converter","rsp","rgx","rTrimInputText","makeMarkdown","makeMd","src","HTMLParser","window","document","doc","createElement","innerHTML","preList","pres","querySelectorAll","presPH","childElementCount","firstChild","tagName","content","trim","language","getAttribute","classes","className","split","c","matches","outerHTML","setAttribute","substitutePreCodeTags","clean","node","n","childNodes","child","nodeType","nodeValue","removeChild","nodes","mdDoc","addExtension","useExtension","extensionName","splice","ii","output","getMetadata","getMetadataFormat","_setMetadataPair","_setMetadataFormat","_setMetadataRaw","writeAnchorTag","linkText","linkId","url","m5","m6","title","result","wm","st","escape","mentions","username","lnk","target","simpleURLRegex","simpleURLRegex2","delimUrlRegex","simpleMailRegex","delimMailRegex","replaceLink","leadingMagicChars","m2","m3","trailingPunctuation","trailingMagicChars","lnkTxt","append","lmc","tmc","replaceMail","href","bq","pre","codeblock","nextChar","doctype","doctypeParsed","charset","lang","meta","leadingText","numSpaces","emojiCode","delim","blockText","blockTags","repFunc","inside","opTagPos","rgx1","patLeft","patRight","subTexts","newSubText1","concat","hashHTMLSpan","html","repText","limit","num","$1","isNaN","parseInt","setextRegexH2","headerId","prefix","customizedHeaderId","spanGamut","hID","hashBlock","matchFound","hLevel","hText","span","header","writeImageTag","altText","width","height","gDims","parseInside","lead","processListItems","listStr","trimTrailing","isParagraphed","m4","taskbtn","checked","item","bulletStyle","otp","wm2","styleStartNumber","list","listType","res","parseConsecutiveLists","olRgx","ulRgx","counterRxg","parseCL","style","parseMetadataContents","wholematch","grafs","grafsOut","grafsOutIt","codeFlag","$2","re","replaceFunc","blankLines","parseCells","cell","parseTable","rawTable","tableLines","sLine","rawHeaders","map","rawStyles","rawCells","headers","styles","cells","shift","tableHeaderId","row","tb","tblLgn","buildTable","fromCharCode","hasChildNodes","children","childrenLength","innerTxt","headerLevel","headerMark","hasAttribute","listItems","listItemsLenght","listNum","listItemTxt","childrenLenght","spansOnly","data","tableArray","headings","rows","headContent","allign","cols","getElementsByTagName","cellContent","cellSpacesCount","strLen","module","exports","ConverterExtObj","asyncExtensions","outputAsyncModifiers","currConvFlavor","_parseAsyncExtension","asyncExtension","addAsyncExtension","removeAsyncExtension","j","getAsyncExtensions","getCurrFlavor","setCurrFlavor","prototype","initConvertExtObj","extObj","_typeof","exts","asyncMakeHtml","outputs","Promise","resolve","DOMParser","parseFromString","wrapper","body","scripts","then","promise","langattr","parseStyles","col","tablesMerge","direct","tablesRowspan","mergeCells","parseTableContent","headerless","parseHeaderlessTable","tablesHeaderless","currFlavor","flavors","_asyncExtensions","resetAsyncExtensions","orgSetFlavor","orgGetFlavorOptions","Date","Format","_unused","setFlavorOptions","Object","assign","fmt","getMonth","getDate","getHours","getMinutes","getSeconds","S","getMilliseconds","k","getFullYear","cdnName","scheme","location","protocol","defScheme","distScheme","cdnSrc","local","ABCJS","ABCJSCSS","echarts","Viz","Raphael","flowchart","mermaid","katex","katexCSS","renderMathInElement","railroad","railroadCSS","Snap","WebFont","underscore","sequence","sequenceCSS","WaveDrom","WaveDromSkin","default","lowkey","narrow","vega","vegaLite","vegaEmbed","cdnjs","jsdelivr","getName","keys","val","getSrc","def","cdn","setCDN","scheme_default","scheme_dist","getCDN","loadScript","resovle","reject","script","getElementById","head","onload","appendChild","unloadScript","e","loadStyleSheet","css","rel","unloadStyleSheet","utils","interopDefault","ex","loadStyle","innerText","code","rej","renderCacheElement","el","display","renderElement","createElementMeta","element","dataset","langobj","diagramClass","align","textContent","classList","now","extName","cssCdnName","undefined","hasAbc","dync","synthControl","abcOptions","add_classes","responsive","CursorControl","self","onReady","onStart","svg","querySelector","cursor","createElementNS","setAttributeNS","beatSubdivisions","onBeat","beatNumber","totalBeats","totalTime","onEvent","ev","measureStart","lastSelection","remove","elements","note","add","onFinished","els","load","audio","render","synth","supportsAudio","SynthController","displayLoop","displayRestart","displayPlay","displayProgress","displayWarp","userAction","disable","visualObj","renderAbc","CreateSynth","init","response","setTune","onRenderAbc","btoa","cssLink","parentNode","setTimeout","renderAbcElements","sync","dyncLoadScript","promiseArray","all","showdownAbc","hasEvent","dispatchEvent","addEventListener","event","detail","atob","config","createHeadingElement","toc","nexthead","ownerDocument","createTextNode","appendTocElement","currTocNode","headingLevel","tempTocNode","preLevel","showdownToc","parser","replaceChild","tocNode","prev","substr","renderTocElements","engines","hasViz","instance","onRenderViz","engine","viz","renderString","renderViz","renderVizElements","showdownViz","hasVegaEmbed","renderVega","isVegaLite","onRenderVega","renderVegaElements","vegaElements","vegaLiteElements","showdownVega","userOptions","_objectSpread","actions","editor","theme","tooltip","renderer","arguments","showdownAlign","childNode","nextSibling","renderAlignElements","decimalsign","CONST","UNARY","BINARY","INFIX","LEFTBRACKET","RIGHTBRACKET","SPACE","UNDEROVER","DEFINITION","LEFTRIGHT","TEXT","AMquote","input","tag","tex","ttype","AMsymbols","notexcopy","invisible","rewriteleftright","acc","atname","atval","compareNames","s1","s2","AMnestingDepth","AMpreviousSymbol","AMcurrentSymbol","AMnames","AMremoveCharsAndBlanks","charAt","AMposition","arr","h","AMgetSymbol","mk","tagst","more","integ","AMTremoveBrackets","leftchop","AMTgetTeXsymbol","symb","AMTparseSexpr","symbol","newFrag","texsymbol","AMTparseExpr","result2","AMTparseIexpr","sym1","sym2","res2","rightbracket","addedright","len","mxout","matrix","mxnestingd","subpos","lastsubposstart","mxanynestingd","columnaligns","lastmxsubcnt","subarr","AMTparseAMtoTeX","symlen","sort","refreshSymbols","AMinitSymbols","RenderMathInElement","katexElementCount","hasKatex","onRenderKatex","math","renderToString","renderKatex","isAsciimath","latex","codes","asciimathToTex","escapeRegExp","getConfig","displayMode","throwOnError","errorColor","delimiters","_isObjectProperty","_getDelimiter","delimiter","asciimath","showdownKatex","userConfig","inlineMathCount","mathDelimiters","_ref","replacer","_toConsumableArray","nodeName","newText","reduce","_ref2","asyncRenderKatex","that","renderBlockElements","hasEcharts","onRenderEcharts","renderEcharts","ssr","renderEchartsElements","showdownEcharts","show","animation","hasMermaid","onRenderMermaid","renderMermaid","renderMermaidElements","initialize","showdownMermaid","logLevel","startOnLoad","arrowMarkerAbsolute","curve","gantt","axisFormat","actorMargin","global$1","global","lookup","revLookup","Arr","Uint8Array","inited","encodeChunk","uint8","fromByteArray","tmp","extraBytes","parts","maxChunkLength","len2","read","buffer","offset","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","NaN","Infinity","pow","write","rt","abs","LN2","isArray$1","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","RangeError","__proto__","arg","encodingOrOffset","allocUnsafe","from","TypeError","ArrayBuffer","array","byteOffset","byteLength","fromArrayLike","fromArrayBuffer","string","encoding","isEncoding","actual","fromString","internalIsBuffer","copy","fromObject","assertSize","size","_isBuffer","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","buf","readUInt16BE","foundIndex","found","hexWrite","remaining","Number","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","utf16leToBytes","base64.fromByteArray","min","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","apply","decodeCodePointsArray","poolSize","_augment","Symbol","species","alloc","fill","allocUnsafeSlow","isBuffer","compare","y","swap16","swap32","swap64","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","out","toHex","bytes","checkOffset","checkInt","max","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754.write","writeDouble","newBuf","subarray","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","ieee754.read","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","set","INVALID_BASE64_RE","leadSurrogate","b64","placeHolders","L","base64.toByteArray","stringtrim","base64clean","dst","isFastBuffer","isSlowBuffer","constructor","defaultSetTimout","defaultClearTimeout","cachedSetTimeout","cachedClearTimeout","runTimeout","fun","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","nextTick","args","Item","noop","addListener","once","off","removeListener","removeAllListeners","emit","performance","performanceNow","mozNow","msNow","oNow","webkitNow","getTime","startTime","process","browser","env","argv","version","versions","binding","cwd","chdir","umask","hrtime","previousTimestamp","clocktime","seconds","nanoseconds","platform","release","uptime","EventHandlers","EventEmitter","$getMaxListeners","_maxListeners","defaultMaxListeners","_addListener","listener","prepend","events","existing","_events","newListener","_eventsCount","unshift","warned","w","emitter","count","_onceWrap","fired","listenerCount","evlistener","arrayClone","create","usingDomains","domain","active","getPrototypeOf","setMaxListeners","getMaxListeners","er","handler","doError","err","context","domainEmitter","domainThrown","isFn","emitNone","arg1","emitOne","arg2","emitTwo","arg3","emitThree","emitMany","prependListener","prependOnceListener","position","originalListener","pop","spliceOne","unwrapListeners","eventNames","Reflect","ownKeys","inherits$1","ctor","superCtor","super_","enumerable","writable","configurable","TempCtor","formatRegExp","objects","_","isNull","isObject","deprecate","fn","noDeprecation","throwDeprecation","traceDeprecation","trace","debugEnviron","debugs","opts","ctx","seen","stylize","stylizeNoColor","depth","colors","isBoolean","showHidden","origin","_extend","customInspect","stylizeWithColor","formatValue","styleType","recurseTimes","primitive","formatPrimitive","visibleKeys","hash","idx","arrayToHash","getOwnPropertyNames","isError","formatError","isRegExp","isDate","base","braces","toUTCString","formatProperty","formatArray","cur","reduceToSingleString","desc","getOwnPropertyDescriptor","get","line","objectToString","BufferList","tail","bold","italic","inverse","white","grey","black","blue","cyan","green","magenta","red","yellow","special","number","boolean","null","regexp","entry","next","clear","p","isBufferEncoding","StringDecoder","assertEncoding","surrogateSize","detectIncompleteChar","utf16DetectIncompleteChar","base64DetectIncompleteChar","passThroughWrite","charBuffer","charReceived","charLength","charStr","available","charCode","enc","Readable","ReadableState","debug","NODE_DEBUG","toUpperCase","debuglog","stream","objectMode","Duplex","readableObjectMode","hwm","highWaterMark","pipes","pipesCount","flowing","ended","endEmitted","reading","needReadable","emittedReadable","readableListening","resumeScheduled","defaultEncoding","ranOut","awaitDrain","readingMore","decoder","_readableState","readable","_read","readableAddChunk","state","chunk","addToFront","Buffer.isBuffer","chunkInvalid","emitReadable","onEofChunk","skipAdd","maybeReadMore_","maybeReadMore","needMoreData","inherits","isPaused","setEncoding","MAX_HWM","howMuchToRead","computeNewHighWaterMark","emitReadable_","flow","nReadingNextTick","resume_","fromList","hasStrings","nb","copyFromBufferString","copyFromBuffer","fromListPartial","endReadable","endReadableNT","xs","nop","WriteReq","cb","WritableState","defineProperty","getBuffer","writableObjectMode","needDrain","ending","finished","decodeStrings","writing","corked","bufferProcessing","onwrite","_writableState","writecb","writelen","onwriteStateUpdate","pendingcb","errorEmitted","onwriteError","needFinish","bufferedRequest","clearBuffer","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","corkedRequestsFree","CorkedRequest","Writable","_write","writev","_writev","doWrite","onwriteDrain","finishMaybe","holder","finish","prefinish","need","_this","nOrig","doRead","pipe","dest","pipeOpts","endFn","onend","cleanup","onunpipe","ondrain","pipeOnDrain","cleanedUp","onclose","onfinish","onerror","ondata","increasedAwaitDrain","pause","unpipe","resume","dests","_i","wrap","paused","method","bind","_fromList","current","writeAfterEnd","validChunk","decodeChunk","last","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","allowHalfOpen","onEndNT","TransformState","afterTransform","ts","_transformState","transforming","writechunk","rs","needTransform","writeencoding","Transform","transform","_transform","flush","_flush","done","PassThrough","Stream","EE","source","_isStdio","didOnEnd","destroy","ZStream","next_in","avail_in","total_in","next_out","avail_out","total_out","data_type","adler","arraySet","src_offs","dest_offs","Buf8","Buf16","Uint16Array","Buf32","Int32Array","Z_FIXED","Z_BINARY","Z_TEXT","Z_UNKNOWN","zero","STORED_BLOCK","STATIC_TREES","DYN_TREES","LENGTH_CODES","LITERALS","L_CODES","D_CODES","BL_CODES","HEAP_SIZE","MAX_BITS","Buf_size","MAX_BL_BITS","END_BLOCK","REP_3_6","REPZ_3_10","REPZ_11_138","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree","zero$1","static_dtree","_dist_code","_length_code","MAX_MATCH","base_length","static_l_desc","static_d_desc","static_bl_desc","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","dist","put_short","pending_buf","pending","send_bits","bi_valid","bi_buf","send_code","tree","bi_reverse","gen_codes","bl_count","next_code","init_block","dyn_ltree","dyn_dtree","bl_tree","opt_len","static_len","last_lit","bi_windup","smaller","_n2","_m2","pqdownheap","heap","heap_len","compress_block","ltree","dtree","lc","extra","lx","d_buf","l_buf","build_tree","stree","heap_max","xbits","overflow","gen_bitlen","scan_tree","curlen","prevlen","nextlen","max_count","min_count","send_tree","static_init_done","_tr_init","tr_static_init","l_desc","d_desc","bl_desc","_tr_stored_block","stored_len","copy_block","_tr_align","bi_flush","_tr_flush_block","opt_lenb","static_lenb","max_blindex","level","strm","black_mask","detect_data_type","build_bl_tree","strategy","lcodes","dcodes","blcodes","rank","send_all_trees","_tr_tally","lit_bufsize","adler32","crcTable","table","makeTable","crc32","crc","configuration_table","Z_NO_FLUSH","Z_FINISH","Z_OK","Z_STREAM_ERROR","Z_DEFLATED","MIN_MATCH","MIN_LOOKAHEAD","INIT_STATE","HCRC_STATE","BUSY_STATE","FINISH_STATE","BS_NEED_MORE","BS_BLOCK_DONE","BS_FINISH_STARTED","BS_FINISH_DONE","errorCode","flush_pending","pending_out","flush_block_only","block_start","strstart","put_byte","putShortMSB","longest_match","cur_match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","w_size","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","_w_size","window_size","hash_size","insert","ins_h","hash_shift","hash_mask","deflate_fast","hash_head","bflush","match_length","max_lazy_match","deflate_slow","max_insert","prev_match","match_available","Config","good_length","max_lazy","nice_length","max_chain","DeflateState","status","pending_buf_size","gzhead","gzindex","last_flush","w_bits","hash_bits","deflateReset","deflateResetKeep","deflate","old_flush","beg","hcrc","comment","time","os","bstate","deflate_huff","deflate_rle","max_block_size","max_start","BAD","TYPE","inflate_fast","_in","_out","dmax","wsize","whave","wnext","s_window","hold","lcode","dcode","lmask","dmask","here","op","from_source","lencode","distcode","lenbits","distbits","dolen","mode","sane","MAXBITS","ENOUGH_LENS","ENOUGH_DISTS","CODES","LENS","DISTS","lbase","lext","dbase","dext","inflate_table","lens","lens_index","table_index","work","incr","low","here_bits","here_op","here_val","sym","root","curr","drop","used","huff","base_index","offs","extra_index","HEAD","zswap32","q","InflateState","havedict","check","total","wbits","ncode","nlen","ndist","have","lendyn","distdyn","was","inflateReset","inflateResetKeep","inflateInit2","windowBits","inflateReset2","lenfix","distfix","virgin","fixedtables","inflate","put","last_bits","last_op","last_val","hbuf","order","inf_leave","xflags","extra_len","updatewindow","Zlib","init_done","write_in_progress","pending_close","memLevel","dictionary","bufferSet","zstream","deflateInit2","_error","params","_writeCheck","in_off","in_len","out_off","out_len","process.nextTick","close","writeSync","_set","deflateEnd","inflateEnd","reset","_binding","Z_MIN_WINDOWBITS","Z_MAX_WINDOWBITS","Z_DEFAULT_WINDOWBITS","Z_MIN_CHUNK","Z_MAX_CHUNK","Z_DEFAULT_CHUNK","Z_MIN_MEMLEVEL","Z_MAX_MEMLEVEL","Z_DEFAULT_MEMLEVEL","Z_MIN_LEVEL","Z_MAX_LEVEL","Z_DEFAULT_LEVEL","Z_DEFAULT_COMPRESSION","Z_STREAM_END","Z_NEED_DICT","Z_ERRNO","Z_DATA_ERROR","Z_MEM_ERROR","Z_BUF_ERROR","Z_VERSION_ERROR","zlibBuffer","buffers","nread","onEnd","zlibBufferSync","_processChunk","Deflate","DEFLATE","Inflate","INFLATE","Gzip","GZIP","Gunzip","GUNZIP","DeflateRaw","DEFLATERAW","InflateRaw","INFLATERAW","Unzip","UNZIP","_opts","_chunkSize","chunkSize","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_BLOCK","_flushFlag","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_DEFAULT_STRATEGY","_hadError","message","errno","_buffer","_offset","_closed","_level","_strategy","kind","ws","flushFlag","availInBefore","availOutBefore","inOff","async","req","availInAfter","availOutAfter","assert","newReq","zlib","createDeflate","createInflate","createDeflateRaw","createInflateRaw","createGzip","createGunzip","createUnzip","deflateSync","gzip","gzipSync","deflateRaw","deflateRawSync","unzip","unzipSync","inflateSync","gunzip","gunzipSync","inflateRaw","inflateRawSync","append3bytes","b1","b2","b3","c2","c3","c4","encode6bit","decode6bit","cc","extract3bytes","c1","encode64","decode","decode64","plantumlcodec","encodeuml","startuml","enduml","zlibcodec","decodeuml","defaultImageFormat","umlElementCount","renderPlantumlElements","imageFormat","website","umlWebSite","imageExtension","uml","svgRender","svgData","fetch","renderPlantumlElement","showdownPlantuml","hasRailroad","diagram","onRenderRailroad","railroadElement","eval","addTo","renderRailroad","renderRailroadElements","showdownRailroad","Diagram","themes","SequenceJS","hasRaphael","hasSequence","renderSequence","elementid","CustomEvent","onRenderSequence","drawSVG","showdownSequence","renderSequenceElements","wdCount","indexWD","hasWavedrom","onRenderWavedrom","RenderWaveForm","wdel","renderWavedrom","renderWavedromElements","skin","showdownWavedrom","skinConfig","showdownFootnotes","rawContent","padding","showdownContainer","classname","hasFlowchart","onRenderFlowchart","renderFlowchart","showdownFlowchart","maxWidth","font","scale","class","flowstate","past","future","request","invalid","approved","rejected","flowchartElements","flowElements","renderFlowchartElements","eid","scriptID","showdownFlavors","mermaidThemes","vegaThemes","vegaRenderers","plantumlImgFmts","showdowns","plantuml","defaultExtensions","defaultAsyncExtensions","markdownDecodeFilter","initDefaultOptions","addOptions","cdnname","setShowdownFlavor","setShowdownOptions","setPlantumlOptions","setMermaidOptions","setKatexOptions","setVegaOptions","nativeExtensions","extnames","getExtensions","mermaidOptions","katexOptions","vegaOptions","zDecode","_getCssLink","_unused2","katexCssLink","sequenceCssLink","railroadCssLink","cssTypes","completedHtml","revole","zContent","zEncode"],"mappings":";;;;;o8EACA,WAKA,SAASA,EAAgBC,GAGvB,IAAIC,EAAiB,CACnBC,wBAAyB,CACvBC,cAAc,EACdC,SAAU,wDACVC,KAAM,WAERC,WAAY,CACVH,cAAc,EACdC,SAAU,kCACVC,KAAM,WAERE,eAAgB,CACdJ,cAAc,EACdC,SAAU,4JACVC,KAAM,UAERG,kBAAmB,CACjBL,cAAc,EACdC,SAAU,uKACVC,KAAM,WAERI,qBAAsB,CACpBN,cAAc,EACdC,SAAU,oIACVC,KAAM,WAERK,YAAa,CACXP,cAAc,EACdC,SAAU,2JACVC,KAAM,WAERM,iBAAkB,CAChBR,cAAc,EACdC,SAAU,gCACVC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AS,SAASS,GAChB,MTpUKjJ,MAAKmB,eAAel9B,GAAOQ,KSoUPwkC,ETpUkB,USqU5C,EACDC,QAAS,SAAStrD,GAChB,OT/UKoiD,GACJY,eS8UwBhjD,ET9UH,CACpBkwC,MAAO,IAER5/E,SAAS,SS4UZ","x_google_ignoreList":[0,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46]} \ No newline at end of file diff --git a/docs/showdowns-features.md b/docs/showdowns-features.md index 2e39477..371ae08 100644 --- a/docs/showdowns-features.md +++ b/docs/showdowns-features.md @@ -855,12 +855,13 @@ Bob-->Alice: I am good thanks! #### ABC example ```abc -X: 1 T: Cooley's M: 4/4 +Q: 1/4=120 L: 1/8 +R: reel K: Emin -|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD| +|:{E}D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD| EBBA B2 EB|B2 AB defg|afe^c dBAF|DEFD E2:| |:gf|eB B2 efge|eB B2 gedB|A2 FA DAFA|A2 FA defg| eB B2 eBgB|eB B2 defg|afe^c dBAF|DEFD E2:| diff --git a/public/showdowns-features.md b/public/showdowns-features.md index 2e39477..371ae08 100644 --- a/public/showdowns-features.md +++ b/public/showdowns-features.md @@ -855,12 +855,13 @@ Bob-->Alice: I am good thanks! #### ABC example ```abc -X: 1 T: Cooley's M: 4/4 +Q: 1/4=120 L: 1/8 +R: reel K: Emin -|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD| +|:{E}D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD| EBBA B2 EB|B2 AB defg|afe^c dBAF|DEFD E2:| |:gf|eB B2 efge|eB B2 gedB|A2 FA DAFA|A2 FA defg| eB B2 eBgB|eB B2 defg|afe^c dBAF|DEFD E2:| diff --git a/src/extensions/cdn.js b/src/extensions/cdn.js index 6b40393..134f654 100644 --- a/src/extensions/cdn.js +++ b/src/extensions/cdn.js @@ -115,6 +115,18 @@ function getCDN() { return cdnName; } +function getName(name) { + if (typeof name === 'object') { + const key = Object.keys(name)[0]; + const val = name[key]; + if (typeof val === 'string') { + return key + "-" + val; + } + } + + return name; +} + function getSrc(name, def) { if (cdnSrc.hasOwnProperty(cdnName)) { const cdn = cdnSrc[cdnName]; @@ -142,51 +154,91 @@ function getSrc(name, def) { return def; } -function loadScript(src, name) { - return new Promise((res, rej) => { - if (!src || typeof document === 'undefined') { - rej('Args is invaild!'); +function loadScript(name, src) { + return new Promise((resovle, reject) => { + if (!name || typeof document === 'undefined') { + reject('Args is invaild!'); } - if (typeof name === 'undefined') { - name = src; + if (typeof src === 'undefined') { + src = ''; } src = getSrc(name, src); + if (!src) { + reject(name + ' script source invaild!'); + } + + const id = 'script-' + getName(name).toLowerCase(); + let script = document.getElementById(id); + if (script) { + return resovle(name); + } + const head = document.head || document.getElementsByTagName('head')[0]; - const script = document.createElement('script'); + script = document.createElement('script'); script.src = src; + script.id = id; script.onload = () => { - res(name); + resovle(name); }; head.appendChild(script); }); } -function loadStyleSheet(css, name) { - if (!css || typeof document === 'undefined') { +function unloadScript(name) { + name = getName(name); + const e = document.getElementById('script-' + name.toLowerCase()); + if (e) { + const head = document.head || document.getElementsByTagName('head')[0]; + head.removeChild(e); + } +} + +function loadStyleSheet(name, css) { + if (!name || typeof document === 'undefined') { return ''; } - if (typeof name === 'undefined') { - name = css; + if (typeof css === 'undefined') { + css = ''; } css = getSrc(name, css); - var head = document.head || document.getElementsByTagName('head')[0]; - var link = document.createElement('link'); - link.rel = 'stylesheet'; - link.href = css; - head.appendChild(link); + if (!css) { + return ''; + } + + const id = 'css-' + getName(name).toLowerCase(); + let script = document.getElementById(id); + if (!script) { + var head = document.head || document.getElementsByTagName('head')[0]; + var link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = css; + link.id = id; + head.appendChild(link); + } return cdnName === 'local' ? '' : css; } +function unloadStyleSheet(name) { + name = getName(name); + const e = document.getElementById('css-' + name.toLowerCase()); + if (e) { + const head = document.head || document.getElementsByTagName('head')[0]; + head.removeChild(e); + } +} + const cdnjs = { setCDN, getCDN, getSrc, loadScript, - loadStyleSheet + unloadScript, + loadStyleSheet, + unloadStyleSheet }; export default cdnjs; diff --git a/src/extensions/date-format.js b/src/extensions/date-format.js index 4d9bf41..d1d7bf5 100644 --- a/src/extensions/date-format.js +++ b/src/extensions/date-format.js @@ -22,10 +22,15 @@ Date.prototype.Format = function(fmt) { S: this.getMilliseconds() //毫秒 }; if (!fmt) fmt = 'yyyy-MM-dd hh:mm:ss.S'; - if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)); - for (var k in o) { - if (new RegExp('(' + k + ')').test(fmt)) { - fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)); + const matches = /(y+)/.exec(fmt); + if (matches) fmt = fmt.replace(matches[1], (this.getFullYear() + '').substring(4 - matches[1].length)); + for (const k in o) { + const m = new RegExp('(' + k + ')').exec(fmt) + if (m) { + let n = o[k]; + if (m[1].length == 1) n = ('000' + o[k]).substring(('' + o[k]).length); + else if (m[1].length == 2) n = ('00' + o[k]).substring(('' + o[k]).length); + fmt = fmt.replace(m[1], n); } } return fmt; diff --git a/src/extensions/log.js b/src/extensions/log.js new file mode 100644 index 0000000..8c0373c --- /dev/null +++ b/src/extensions/log.js @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2019-present, Jhuix (Hui Jin) . All rights reserved. + * Use of this source code is governed by a MIT license that can be found in the LICENSE file. + * Description: dynamic loading js libs for local or cdnjs or jsdelivr + */ +'use strict'; + +import './date-format.js'; + +function format(s) { + return `${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} ${s}` +} + +export default format; diff --git a/src/extensions/showdown-abc.js b/src/extensions/showdown-abc.js index 3198115..aca235d 100644 --- a/src/extensions/showdown-abc.js +++ b/src/extensions/showdown-abc.js @@ -12,6 +12,7 @@ if (typeof window === 'undefined') { throw Error('The showdown abcjs extension can only be used in browser environment!'); } +import format from './log'; import cdnjs from './cdn'; import utils from './utils'; @@ -27,9 +28,16 @@ let dync = false; function dyncLoadScript() { const sync = hasAbc(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; cdnjs.loadStyleSheet(cssCdnName); + utils.loadStyle('abc-audio', '.highlight{fill: #0a9ecc;} .abcjs-cursor{stroke: red;}' + + ' .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed{border: none;}' + + ' .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed svg path{fill: #6eaa49;}'); cdnjs.loadScript('ABCJS').then(name => { ABCJS = utils.interopDefault(window[name]); }); @@ -38,30 +46,151 @@ function dyncLoadScript() { return sync; } -function onRenderAbc(resolve, res) { +function unloadScript() { + if (!hasAbc()) return; + cdnjs.unloadScript('ABCJS'); + cdnjs.unloadStyleSheet(cssCdnName); + ABCJS = null; + window.ABCJS = null; + dync = false; +} + +var abcOptions = { + add_classes: true, + responsive: "resize" +}; + +function CursorControl(id) { + const self = this; + + self.onReady = function() { + }; + self.onStart = function() { + const svg = document.querySelector(`#${id} svg`); + const cursor = document.createElementNS("http://www.w3.org/2000/svg", "line"); + cursor.setAttribute("class", "abcjs-cursor"); + cursor.setAttributeNS(null, 'x1', 0); + cursor.setAttributeNS(null, 'y1', 0); + cursor.setAttributeNS(null, 'x2', 0); + cursor.setAttributeNS(null, 'y2', 0); + svg.appendChild(cursor); + + }; + self.beatSubdivisions = 2; + self.onBeat = function(beatNumber, totalBeats, totalTime) { + }; + self.onEvent = function(ev) { + if (ev.measureStart && ev.left === null) + return; // this was the second part of a tie across a measure line. Just ignore it. + + const lastSelection = document.querySelectorAll(`#${id} svg .highlight`); + for (let k = 0; k < lastSelection.length; k++) + lastSelection[k].classList.remove("highlight"); + + for (let i = 0; i < ev.elements.length; i++ ) { + const note = ev.elements[i]; + for (let j = 0; j < note.length; j++) { + note[j].classList.add("highlight"); + } + } + + const cursor = document.querySelector(`#${id} svg .abcjs-cursor`); + if (cursor) { + cursor.setAttribute("x1", ev.left - 2); + cursor.setAttribute("x2", ev.left - 2); + cursor.setAttribute("y1", ev.top); + cursor.setAttribute("y2", ev.top + ev.height); + } + }; + self.onFinished = function() { + const els = document.querySelectorAll(`#${id} svg .highlight`); + for (let i = 0; i < els.length; i++ ) { + els[i].classList.remove("highlight"); + } + const cursor = document.querySelector(`#${id} svg .abcjs-cursor`); + if (cursor) { + cursor.setAttribute("x1", 0); + cursor.setAttribute("x2", 0); + cursor.setAttribute("y1", 0); + cursor.setAttribute("y2", 0); + } + }; +} + +let synthControl; + +function load(audio, render, abc) { + if (ABCJS.synth.supportsAudio()) { + synthControl = new ABCJS.synth.SynthController(); + synthControl.load(`#${audio}`, new CursorControl(render), {displayLoop: true, displayRestart: true, displayPlay: true, displayProgress: true, displayWarp: true}); + } else { + document.querySelector(`#${audio}`).innerHTML = "
    Audio is not supported in this browser.
    "; + } + setTune(render, false, abc); +} + +function setTune(render, userAction, abc) { + synthControl.disable(true); + const visualObj = ABCJS.renderAbc(`${render}`, abc, abcOptions)[0]; + const midiBuffer = new ABCJS.synth.CreateSynth(); + midiBuffer.init({ + visualObj: visualObj, + }).then(function (response) { + // console.log(response); + if (synthControl) { + synthControl.setTune(visualObj, userAction).then(function (response) { + console.log(format("Audio successfully loaded.")); + }).catch(function (error) { + console.warn("Audio problem:", error); + }); + } + }).catch(function (error) { + console.warn("Audio problem:", error); + }); +} + +function onRenderAbc(resolve, scripts, res) { if (hasAbc()) { const id = res.id; const name = res.className; - const data = res.data; + const data = btoa(res.data); const cssLink = res.cssLink; - const doc = res.element.ownerDocument; - res.element.parentNode.outerHTML = cssLink + // const doc = res.element.ownerDocument; + const audio = id + '-audio'; + let html = cssLink ? `
    ` : `
    `; - const element = doc.getElementById(id); - ABCJS.renderAbc(element, data); + html +=`
    `; + res.element.parentNode.outerHTML = html; + // const renderElement = doc.getElementById(id); + // ABCJS.renderAbc(element, data); + const script = { + id: id, + code: `(function() { + if (typeof window !== 'undefined' && window.dispatchEvent) { + window.dispatchEvent(new CustomEvent('abcjs',{ + detail: { + audio: '${audio}', + render: '${id}', + data: '${data}' + } + })); + } + })();` + } + scripts.push(script); return resolve(true); } setTimeout(() => { - onRenderAbc(resolve, res); - }, 20); + onRenderAbc(resolve, scripts, res); + }, 10); } /** * render abc graphs */ -function renderAbc(element) { +function renderAbc(element, scripts) { return new Promise(resolve => { let meta = utils.createElementMeta(extName, element); if (!meta) { @@ -69,17 +198,17 @@ function renderAbc(element) { } meta.cssLink = cdnjs.getSrc(cssCdnName); - onRenderAbc(resolve, meta); + onRenderAbc(resolve, scripts, meta); }); } //
    -function renderAbcElements(elements) { +function renderAbcElements(elements, scripts) { dyncLoadScript(); return new Promise(resolve => { const promiseArray = []; elements.forEach(element => { - promiseArray.push(renderAbc(element)); + promiseArray.push(renderAbc(element, scripts)); }); Promise.all(promiseArray).then(() => { resolve(true); @@ -89,6 +218,7 @@ function renderAbcElements(elements) { function showdownAbc() { + let hasEvent = false; return [ { type: 'output', @@ -103,12 +233,24 @@ function showdownAbc() { return false; } + if (!hasEvent) { + if (typeof window !== 'undefined' && window.dispatchEvent) { + hasEvent = true; + // Listen sequence custom event + window.addEventListener('abcjs', event => { + if (event.detail) { + load(event.detail.audio, event.detail.render, atob(event.detail.data)); + } + }); + } + } + this.config = { cssLink: cdnjs.getSrc(cssCdnName) }; - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render ${extName} elements.`); - return renderAbcElements(elements).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render ${extName} elements.`); + console.log(format(`Begin render ${extName} elements.`)); + return renderAbcElements(elements, obj.scripts).then(() => { + console.log(format(`End render ${extName} elements.`)); return obj; }); } diff --git a/src/extensions/showdown-echarts.js b/src/extensions/showdown-echarts.js index 1f00cd4..24d6479 100644 --- a/src/extensions/showdown-echarts.js +++ b/src/extensions/showdown-echarts.js @@ -11,6 +11,7 @@ if (typeof window === 'undefined') { throw Error(`The showdown ${extName} extension can only be used in browser environment!`); } +import format from './log'; import cdnjs from './cdn'; import utils from './utils'; @@ -26,7 +27,11 @@ let dync = false; function dyncLoadScript() { const sync = hasEcharts(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; cdnjs.loadScript(extName).then(name => { echarts = utils.interopDefault(window[name]); @@ -36,6 +41,14 @@ function dyncLoadScript() { return sync; } +function unloadScript() { + if (!hasEcharts()) return; + cdnjs.unloadScript(extName); + echarts = null; + window.echarts = null; + dync = false; +} + function onRenderEcharts(resolve, res) { if (hasEcharts()) { const id = res.id; @@ -139,10 +152,9 @@ function showdownEcharts(userConfig) { return false; } - const scripts = obj.scripts; - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render ${extName} elements.`); - return renderEchartsElements(elements, scripts, this.config).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render ${extName} elements.`); + console.log(format(`Begin render ${extName} elements.`)); + return renderEchartsElements(elements, obj.scripts, this.config).then(() => { + console.log(format(`End render ${extName} elements.`)); return obj; }); } diff --git a/src/extensions/showdown-flowchart.js b/src/extensions/showdown-flowchart.js index b5eac7b..5fbbb10 100644 --- a/src/extensions/showdown-flowchart.js +++ b/src/extensions/showdown-flowchart.js @@ -9,6 +9,7 @@ if (typeof window === 'undefined') { throw Error('The showdown flowchart extension can only be used in browser environment!'); } +import format from './log'; import cdnjs from './cdn'; import utils from './utils'; @@ -20,30 +21,74 @@ if (typeof flowchart === 'undefined') { var flowchart = window.flowchart || undefined; } +function hasRaphael() { + return !!Raphael +} + function hasFlowchart() { return typeof Raphael !== 'undefined' && Raphael && typeof flowchart !== 'undefined' && flowchart ? true : false; } +function hasSequence() { + return hasRaphael() && !!window.SequenceJS; +} + let dync = false; function dyncLoadScript() { const sync = hasFlowchart(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; + if (!hasRaphael()) { + cdnjs + .loadScript('Raphael') + .then(name => { + Raphael = utils.interopDefault(window[name]); + return cdnjs.loadScript('flowchart'); + }) + .then(name => { + flowchart = utils.interopDefault(window[name]); + }); + return sync + } + cdnjs - .loadScript('Raphael') - .then(name => { - Raphael = utils.interopDefault(window[name]); - return cdnjs.loadScript('flowchart'); - }) - .then(name => { - flowchart = utils.interopDefault(window[name]); - }); + .loadScript('flowchart') + .then(name => { + flowchart = utils.interopDefault(window[name]); + }); } } return sync; } +function unloadScript() { + if (!hasFlowchart()) return; + cdnjs.unloadScript('flowchart'); + flowchart = null; + window.flowchart = null; + if (!hasSequence()) { + cdnjs.unloadScript('Raphael'); + const es = document.getElementsByTagName('i'); + if (es && es.length > 0) { + const body = document.body; + for (let i = 0; i < es.length; i++) { + const e = es[i]; + if (e.title && e.title === 'Raphaël Colour Picker') { + body.removeChild(e); + } + } + } + Raphael = null; + window.Raphael = null; + } + dync = false; +} + function onRenderFlowchart(resolve, res) { if (hasFlowchart()) { const id = res.id; @@ -197,9 +242,9 @@ function showdownFlowchart(userOptions) { if (!flowchartElements.length && !flowElements.length) { return false; } - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render flowchart elements.`); + console.log(format(`Begin render flowchart elements.`)); return renderFlowchartElements(flowchartElements, flowElements, this.config).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render flowchart elements.`); + console.log(format(`End render flowchart elements.`)); return obj; }); } diff --git a/src/extensions/showdown-katex.js b/src/extensions/showdown-katex.js index 9b6bf82..3580c5e 100644 --- a/src/extensions/showdown-katex.js +++ b/src/extensions/showdown-katex.js @@ -8,6 +8,7 @@ if (typeof window === 'undefined') { throw Error('The showdown katex extension can only be used in browser environment!'); } +import format from './log'; import asciimathToTex from './asciimath2tex'; import cdnjs from './cdn'; import utils from './utils'; @@ -32,7 +33,11 @@ const cssCdnName = 'katexCSS'; function dyncLoadScript(callback) { const sync = hasKatex(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; cdnjs.loadStyleSheet(cssCdnName); cdnjs @@ -46,6 +51,9 @@ function dyncLoadScript(callback) { if (typeof callback === 'function' && callback) { callback(RenderMathInElement); } + }) + .catch(e => { + console.log('load script error: ' + e); }); return sync; } @@ -57,6 +65,18 @@ function dyncLoadScript(callback) { return sync; } +function unloadScript() { + if (!hasKatex()) return; + cdnjs.unloadScript('renderMathInElement'); + cdnjs.unloadScript('katex'); + cdnjs.unloadStyleSheet(cssCdnName); + katex = null; + window.katex = null; + RenderMathInElement = null; + window.renderMathInElement = null; + dync = false; +} + function onRenderKatex(resolve, res) { if (hasKatex()) { const id = res.id; @@ -93,7 +113,7 @@ function onRenderKatex(resolve, res) { } else { setTimeout(() => { onRenderKatex(resolve, res); - }, 50); + }, 10); } } @@ -264,6 +284,7 @@ function showdownKatex(userConfig) { type: 'output', config: config, filter: function(obj) { + inlineMathCount = 0; const wrapper = obj.wrapper; if (!wrapper) { return false; @@ -304,16 +325,16 @@ function showdownKatex(userConfig) { } else { setTimeout(() => { asyncRenderKatex(resolve, render); - }, 50); + }, 10); } } - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render inline katex elements.`); + console.log(format(`Begin render inline katex elements.`)); return new Promise(resolve => { dyncLoadScript(render => { asyncRenderKatex(resolve, render); }); }).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render inline katex elements.`); + console.log(format(`End render inline katex elements.`)); return obj; }); } @@ -322,9 +343,9 @@ function showdownKatex(userConfig) { } config.cssLink = cdnjs.getSrc(cssCdnName); - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render katex elements.`); + console.log(format(`Begin render katex elements.`)); return renderBlockElements(latex, asciimath, this.config).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render katex elements.`); + console.log(format(`End render katex elements.`)); return obj; }); } diff --git a/src/extensions/showdown-mermaid.js b/src/extensions/showdown-mermaid.js index 097e9ee..5a2c020 100644 --- a/src/extensions/showdown-mermaid.js +++ b/src/extensions/showdown-mermaid.js @@ -11,6 +11,7 @@ if (typeof window === 'undefined') { throw Error('The showdown mermaid extension can only be used in browser environment!'); } +import format from './log'; import cdnjs from './cdn'; import utils from './utils'; @@ -29,7 +30,11 @@ function dyncLoadScript(config) { // In browser environment, html need to be rendered asynchronously. const sync = hasMermaid(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; cdnjs.loadScript(extName).then(name => { mermaid = utils.interopDefault(window[name]); @@ -43,6 +48,16 @@ function dyncLoadScript(config) { return sync; } +function unloadScript() { + if (!hasMermaid()) return; + cdnjs.unloadScript(extName); + katex = null; + window.mermaid = null; + mermaid = null; + dync = false; +} + + function onRenderMermaid(resolve, res) { if (hasMermaid()) { const id = res.id; @@ -124,9 +139,9 @@ function showdownMermaid(userConfig) { return false; } - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render mermaid elements.`); + console.log(format(`Begin render mermaid elements.`)); return renderMermaidElements(elements, this.config).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render mermaid elements.`); + console.log(format(`End render mermaid elements.`)); return obj; }); } diff --git a/src/extensions/showdown-plantuml.js b/src/extensions/showdown-plantuml.js index b8b84e2..d642973 100644 --- a/src/extensions/showdown-plantuml.js +++ b/src/extensions/showdown-plantuml.js @@ -5,6 +5,7 @@ */ 'use strict'; +import format from './log'; import plantumlcodec from '../utils/plantuml-codec.js'; const defaultUmlWebsite = 'www.plantuml.com/plantuml'; @@ -116,9 +117,9 @@ function showdownPlantuml(userConfig) { return false; } - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render plantuml elements.`); + console.log(format(`Begin render plantuml elements.`)); return renderPlantumlElements(elements, this.config).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render plantuml elements.`); + console.log(format(`End render plantuml elements.`)); return obj; }); } diff --git a/src/extensions/showdown-railroad.js b/src/extensions/showdown-railroad.js index ff3ebfa..9e89153 100644 --- a/src/extensions/showdown-railroad.js +++ b/src/extensions/showdown-railroad.js @@ -12,6 +12,7 @@ if (typeof window === 'undefined') { throw Error('The showdown railroad extension can only be used in browser environment!'); } +import format from './log'; import cdnjs from './cdn'; import utils from './utils'; @@ -24,7 +25,11 @@ let dync = false; function dyncLoadScript() { const sync = hasRailroad(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; cdnjs.loadStyleSheet(cssCdnName); cdnjs.loadScript(extName).then(() => { @@ -35,6 +40,14 @@ function dyncLoadScript() { return sync; } +function unloadScript() { + if (!hasRailroad()) return; + cdnjs.unloadScript(extName); + cdnjs.unloadStyleSheet(cssCdnName); + railroad = false; + dync = false; +} + function onRenderRailroad(resolve, res) { if (hasRailroad()) { const id = res.id; @@ -103,9 +116,9 @@ function showdownRailroad() { this.config = { cssLink: cdnjs.getSrc(cssCdnName) }; - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render railroad elements.`); + console.log(format(`Begin render railroad elements.`)); return renderRailroadElements(elements).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render railroad elements.`); + console.log(format(`End render railroad elements.`)); return obj; }); } diff --git a/src/extensions/showdown-sequence.js b/src/extensions/showdown-sequence.js index b9bd385..4350b45 100644 --- a/src/extensions/showdown-sequence.js +++ b/src/extensions/showdown-sequence.js @@ -10,6 +10,11 @@ if (typeof window === 'undefined') { } import cdnjs from './cdn'; +import utils from './utils'; + +if (typeof Raphael === 'undefined') { + var Raphael = window.Raphael || undefined; +} // js-sequence-diagrams can create a global object named Diagrams of window, // To be compatible with railroad diagrams extension that also has window.Diagram object, @@ -29,8 +34,16 @@ if (typeof sequence === 'undefined' && typeof window !== 'undefined') { var sequence = window.SequenceJS; } +function hasRaphael() { + return !!Raphael +} + function hasSequence() { - return !!sequence; + return hasRaphael() && !!sequence; +} + +function hasFlowchart() { + return hasRaphael() && !!window.flowchart; } let dync = false; @@ -38,19 +51,31 @@ const cssCdnName = 'sequenceCSS'; function dyncLoadScript() { const sync = hasSequence(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; cdnjs.loadStyleSheet(cssCdnName); cdnjs .loadScript('WebFont') .then(() => { + if (!hasRaphael()) { + return cdnjs.loadScript('Raphael'); + } + + return 'Raphael'; + }) + .then((name) => { + Raphael = utils.interopDefault(window[name]); return cdnjs.loadScript('Snap'); }) .then(() => { return cdnjs.loadScript('underscore'); }) .then(() => { - // You need to save the original Diagrams object of railroad diagrams extension here. + // You need to save the original Diagrams object of sequence diagrams extension here. if (!diagram && window['Diagram']) { diagram = window['Diagram']; } @@ -59,7 +84,7 @@ function dyncLoadScript() { .then(() => { sequence = window['Diagram']; window.SequenceJS = sequence; - // You need to replace the original Diagrams object of railroad diagrams extension here. + // You need to replace the original Diagrams object of sequence diagrams extension here. if (diagram) { window['Diagram'] = diagram; } @@ -69,6 +94,35 @@ function dyncLoadScript() { return sync; } +function unloadScript() { + if (!hasSequence()) return; + cdnjs.unloadScript('sequence'); + cdnjs.unloadScript('underscore'); + cdnjs.unloadScript('Snap'); + cdnjs.unloadScript('WebFont'); + cdnjs.unloadStyleSheet(cssCdnName); + diagram = null; + sequence = null; + window.Diagram = null; + window.SequenceJS = null; + if (!hasFlowchart()) { + cdnjs.unloadScript('Raphael'); + const es = document.getElementsByTagName('i'); + if (es && es.length > 0) { + const body = document.body; + for (let i = 0; i < es.length; i++) { + const e = es[i]; + if (e.title && e.title === 'Raphaël Colour Picker') { + body.removeChild(e); + } + } + } + Raphael = null; + window.Raphael = null; + } + dync = false; +} + /** * render sequence graphs */ @@ -175,21 +229,13 @@ function onRenderSequence(element) { } setTimeout(() => { onRenderSequence(element); - }, 50); + }, 10); } function showdownSequence() { + let hasEvent = false; const parser = new DOMParser(); - if (typeof window !== 'undefined' && window.dispatchEvent) { - // Listen sequence custom event - window.addEventListener('sequence', event => { - if (event.detail) { - onRenderSequence(event.detail); - } - }); - } - return [ { type: 'output', @@ -201,6 +247,18 @@ function showdownSequence() { // find the sequence in code blocks const elements = wrapper.querySelectorAll('code.sequence.language-sequence'); if (elements.length) { + if (!hasEvent) { + if (typeof window !== 'undefined' && window.dispatchEvent) { + hasEvent = true; + // Listen sequence custom event + window.addEventListener('sequence', event => { + if (event.detail) { + onRenderSequence(event.detail); + } + }); + } + } + this.config = { cssLink: cdnjs.getSrc(cssCdnName) }; diff --git a/src/extensions/showdown-toc.js b/src/extensions/showdown-toc.js index a114561..d774600 100644 --- a/src/extensions/showdown-toc.js +++ b/src/extensions/showdown-toc.js @@ -5,6 +5,8 @@ */ 'use strict'; +import format from './log'; + function createHeadingElement(wrapper, element, toc, nexthead) { try { if (nexthead) { @@ -18,7 +20,7 @@ function createHeadingElement(wrapper, element, toc, nexthead) { child.href = '#' + element.id; } } catch { - console.log("append child error:" + wrapper); + console.warn(format('append child error:'), wrapper); } return toc; } diff --git a/src/extensions/showdown-vega.js b/src/extensions/showdown-vega.js index a977fa3..2c59045 100644 --- a/src/extensions/showdown-vega.js +++ b/src/extensions/showdown-vega.js @@ -11,6 +11,7 @@ if (typeof window === 'undefined') { throw Error('The showdown vega extension can only be used in browser environment!'); } +import format from './log'; import cdnjs from './cdn'; import utils from './utils'; @@ -26,7 +27,11 @@ let dync = false; function dyncLoadScript() { const sync = hasVegaEmbed(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; cdnjs .loadScript(extName) @@ -44,6 +49,21 @@ function dyncLoadScript() { return sync; } +function unloadScript() { + if (!hasVegaEmbed()) return; + cdnjs.unloadScript('vegaEmbed'); + cdnjs.unloadScript('vegaLite'); + cdnjs.unloadScript(extName); + const vegaStyle = document.getElementById('vega-embed-style'); + if (vegaStyle && vegaStyle.tagName.toLowerCase() === 'style') { + const head = document.head || document.getElementsByTagName('head')[0]; + head.removeChild(vegaStyle); + } + vegaEmbed = null; + window.vegaEmbed = null; + dync = false; +} + /** * render VegaEmbed graphs */ @@ -131,10 +151,9 @@ function showdownVega(userOptions) { return false; } - const scripts = obj.scripts; - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render vega elements.`); - return renderVegaElements(vegaElements, vegaLiteElements, scripts, this.config).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render vega elements.`); + console.log(format(`Begin render vega elements.`)); + return renderVegaElements(vegaElements, vegaLiteElements, obj.scripts, this.config).then(() => { + console.log(format(`End render vega elements.`)); return obj; }); } diff --git a/src/extensions/showdown-viz.js b/src/extensions/showdown-viz.js index e17286e..48b2020 100644 --- a/src/extensions/showdown-viz.js +++ b/src/extensions/showdown-viz.js @@ -9,6 +9,7 @@ if (typeof window === 'undefined') { throw Error('The showdown viz extension can only be used in browser environment!'); } +import format from './log'; import cdnjs from './cdn'; import utils from './utils'; @@ -28,7 +29,11 @@ let dync = false; function dyncLoadScript() { const sync = hasViz(); if (typeof window !== 'undefined') { - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; cdnjs.loadScript('Viz').then(name => { Viz = utils.interopDefault(window[name]); @@ -38,6 +43,14 @@ function dyncLoadScript() { return sync; } +function unloadScript() { + if (!hasViz()) return; + cdnjs.unloadScript('Viz'); + Viz = null; + window.Viz = null; + dync = false; +} + function onRenderViz(resolve, res) { if (hasViz()) { const id = res.id; @@ -107,9 +120,9 @@ function showdownViz() { if (!elements.length) { return false; } - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} Begin render dot elements.`); + console.log(format(`Begin render dot elements.`)); return renderVizElements(elements).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd HH:mm:ss.S')} End render dot elements.`); + console.log(format(`End render dot elements.`)); return obj; }); } diff --git a/src/extensions/showdown-wavedrom.js b/src/extensions/showdown-wavedrom.js index 63d6984..6e0a187 100644 --- a/src/extensions/showdown-wavedrom.js +++ b/src/extensions/showdown-wavedrom.js @@ -9,6 +9,7 @@ if (typeof window === 'undefined') { throw Error('The showdown wavedrom extension can only be used in browser environment!'); } +import log from './log'; import cdnjs from './cdn'; import utils from './utils'; @@ -25,7 +26,11 @@ function hasWavedrom() { let dync = false; function dyncLoadScript(skin) { const sync = hasWavedrom(); - if (!sync && !dync) { + if (dync) { + return sync; + } + + if (!sync) { dync = true; if (typeof window !== 'undefined') { cdnjs @@ -41,6 +46,15 @@ function dyncLoadScript(skin) { return sync; } +function unloadScript(skin) { + if (!hasWavedrom()) return; + cdnjs.unloadScript('WaveDrom'); + cdnjs.unloadScript({ WaveDromSkin: skin }); + WaveDrom = null; + window.WaveDrom = null; + dync = false; +} + function onRenderWavedrom(resolve, res) { if (hasWavedrom()) { const index = res.index; @@ -171,9 +185,9 @@ function showdownWavedrom(skinConfig) { return false; } - console.log(`${new Date().Format('yyyy-MM-dd hh:mm:ss.S')} Begin render wavedrom elements.`); + log(`Begin render wavedrom elements.`); return renderWavedromElements(elements, this.config.skin).then(() => { - console.log(`${new Date().Format('yyyy-MM-dd hh:mm:ss.S')} End render wavedrom elements.`); + log(`End render wavedrom elements.`); return obj; }); } diff --git a/src/extensions/utils.js b/src/extensions/utils.js index e108b9a..9de9c20 100644 --- a/src/extensions/utils.js +++ b/src/extensions/utils.js @@ -4,7 +4,22 @@ */ 'use strict'; -import './date-format.js'; +function loadStyle(name, css) { + if (!name || !css || typeof document === 'undefined') { + return false; + } + + const id = 'css-' + name.toLowerCase(); + const script = document.getElementById(id); + if (!script) { + const head = document.head || document.getElementsByTagName('head')[0]; + const style = document.createElement('style'); + style.id = id; + style.innerText = css; + head.appendChild(style); + } + return true; +} function loadScript(id, code) { return new Promise((res, rej) => { @@ -108,10 +123,11 @@ function createElementMeta(name, element, callback) { const utils = { interopDefault, + loadStyle, loadScript, renderCacheElement, renderElement, - createElementMeta + createElementMeta, }; export default utils; diff --git a/src/showdowns.js b/src/showdowns.js index 82768fb..88c8092 100644 --- a/src/showdowns.js +++ b/src/showdowns.js @@ -85,25 +85,28 @@ const getExtensions = (options, extensions = {}) => { return extnames; }; -const loadScript = (id, code) => { +const loadScript = (id, code, element) => { if (!code || typeof document === 'undefined') { return false; } - const body = document.body; - const parent = document.getElementById(id); - if (parent) { + if (!element) { + element = document.getElementById(id); + } + + if (element) { + const eid = element.id; const scriptID = `script-${id}`; - let script = document.querySelector(`#parent > #${scriptID}`); + let script = document.querySelector(`#${eid} > #${scriptID}`); if (script) { - body.removeChild(script); + document.body.removeChild(script); } else { script = document.createElement('script'); script.id = scriptID; } script.type = "text/javascript"; script.text = code; - parent.appendChild(script); + element.appendChild(script); } return true }; @@ -419,14 +422,15 @@ const showdowns = { } return Promise.reject(!content ? 'Content is empty.' : 'Converter is invaild.'); }, - completedHtml: function(scripts) { + completedHtml: function(scripts, element) { if (!showdown.helper.isArray(scripts)) { scripts = [scripts]; } + return new Promise((revole, reject) => { for (var i = 0; i < scripts.length; ++i) { const script = scripts[i]; - if (!loadScript(script.id, script.code)) { + if (!loadScript(script.id, script.code, element)) { return reject('Args is invaild!'); } }
    ' +\n        codeblock +\n        end +\n        '
    ' +\n        codeblock +\n        end +\n        '