Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lys-markdown-parser

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lys-markdown-parser - npm Package Compare versions

Comparing version 3.14.0 to 3.14.1

2

dist/index.umd.js

@@ -1,1 +0,1 @@

"use strict";function _objectWithoutProperties(e,t){if(null==e)return{};var n,o,r=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(0<=t.indexOf(n))&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)n=s[o],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n,o=0;o<t.length;o++)n=t[o],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,s=void 0;try{for(var i,d=e[Symbol.iterator]();!(o=(i=d.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(e){r=!0,s=e}finally{try{o||null==d["return"]||d["return"]()}finally{if(r)throw s}}return n}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){"@babel/helpers - typeof";return _typeof="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},_typeof(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t,n=1;n<arguments.length;n++)t=null==arguments[n]?{}:arguments[n],n%2?ownKeys(Object(t),!0).forEach(function(n){_defineProperty(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))});return e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lymd=function(e){'use strict';function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return e.startsWith("__")||["children","$getNode","type","raw","tokens","push"].includes(e)}function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=Object.keys(e),r=Object.keys(n),s=[];return o.forEach(function(o){return t(o)?void 0:r.includes(o)?void(e[o]!==n[o]&&s.push({type:"change",key:o,prevNode:e,nextNode:n})):void s.push({type:"del",key:o,prevNode:e,nextNode:n})}),r.forEach(function(t){o.includes(t)||s.push({type:"add",key:t,prevNode:e,nextNode:n})}),s}function o(e,t){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};if(e===t)return o;if(!e)o.push(_objectSpread({type:"add",prevNode:e,nextNode:t},s));else if(!t)o.push(_objectSpread({type:"del",prevNode:e,nextNode:t},s));else if(e.type!==t.type)o.push(_objectSpread({type:"replace",prevNode:e,nextNode:t},s));else{var i,d={type:"update",prevNode:e,nextNode:t,propsChange:[]};(i=d.propsChange).push.apply(i,_toConsumableArray(n(e,t))),t.$getNode=e.$getNode,t.__update=e.__update,d.propsChange.length&&o.push(d),r(e,t,o)}return o}function r(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],r=e.children,s=void 0===r?[]:r,i=t.children,d=void 0===i?[]:i,l=s.filter(function(e){return!!d.some(function(t){return t.type===e.type})||(o(e,null,n),!1)});d.forEach(function(e){l.some(function(t,n){return t.type===e.type&&(l[n]={isDel:!0,ele:t},!0)})}),l.filter(function(e){return!e.isDel}).forEach(function(e){return o(e,null,n)});var a=l.filter(function(e){return e.isDel}).map(function(e){return e.ele});d.forEach(function(e,t){var r=a.some(function(r,s){return r.type===e.type&&(a.splice(s,1),a.splice(t>s?t-1:t,0,{used:!0,ele:r}),s!==t&&n.push({type:"move",prevNode:r,nextNode:e,current:s,moveTo:t>s?t+1:t}),o(r,e,n),!0)});r||(a.splice(t,0,{add:!0,item:e}),o(null,e,n,{moveTo:t}))})}function s(e,t,n){for(var o,r=[],s=e,i=function(e){return s+=e,[t[s],s]};s<=t.length&&(o=t[s],void 0!==o)&&!!n(o,s,i);){r.push(o);s+=1}return{matchTokens:r,nextToken:t[s]}}function i(e,t){for(var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=[],r=t+1;r<t+n+1;r++)o.push(e[r]);return o}function d(e,t,n,o){var r=[],i=0;return s(e,t,function(e,o,s){for(;;){if("object"===_typeof(n[i])){if(!e){i+=1;break}var d=n[i].test(e.type,o,t);if(z.isCanGoOn(d))return n[i].content.push(e),r.push(e),!0;if(!d||n[i].stop)return!1;if(0<d.offset){r.push.apply(r,_toConsumableArray(t.slice(o,o+d.offset)));var l=s(d.offset),a=_slicedToArray(l,2);e=a[0],o=a[1]}i+=1;continue}return!!(n[i]&&e.type===n[i])&&(i+=1,r.push(e),i!==n.length)}}),!!(i===n.length&&n.every(function(e){return!e.stop}))&&(o(r,z.getQueueContent(n)),!0)}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=new Q(e,t);return Object.assign(o,n),e===K.text&&o.addToken(),o}function a(e,t,n){if(!z.isType(t[e],$.IMG_START))return!1;var o=[t[e]];return!!h(e+1,t,function(e,t){n(o.concat(e),t)})}function p(e,t,n){var o=[$.COMMENT_START,{content:[],name:"content",test:function(e){return z.isType(e,$.COMMENT_END)?{offset:0}:z.goOn}},$.COMMENT_END];return d(e,t,o,n)}function h(e,t,n){var o=[$.URL_DESC_START,{content:[],name:"alt",test:function(e){return z.isType(e,$.URL_DESC_START,$.URL_DESC_END)?{offset:0}:z.goOn}},$.URL_DESC_END,$.URL_START,{content:[],name:"src",test:function(e){return z.isType(e,$.URL_START,$.URL_END)?{offset:0}:z.goOn}},$.URL_END];return d(e,t,o,n)}function c(e,t,n){var o=[$.SIMPLE_URL_START,{content:[],name:"src",test:function(e){return z.isType(e,$.SIMPLE_URL_START,$.SIMPLE_URL_END,$.LINE_END,$.WHITE_SPACE)?{offset:0}:z.goOn}},$.SIMPLE_URL_END];return d(e,t,o,n)}function u(e,t,n){if(z.isType(t[e],$.CODE_BLOCK)&&z.isType(t[e+1],$.CODE_BLOCK))return!1;var o=[$.CODE_BLOCK,{content:[],name:"code",repeatable:!0,ignore:!0,test:function(e){return z.isType(e,$.CODE_BLOCK)?{offset:1}:z.goOn}}];return d(e,t,o,n)}function _(e,t,n){var o=[$.LINE_THROUGH,$.LINE_THROUGH,{content:[],name:"content",test:function(e,t,n){return[n[t+1],n[t+2]].every(function(e){return z.isType(e,$.LINE_THROUGH)})?(this.content.push(n[t]),{offset:1}):z.goOn}},$.LINE_THROUGH,$.LINE_THROUGH];return d(e,t,o,n)}function y(e,t,n){var o=[$.BLOB,{content:[],name:"content",test:function(e,t,n){return[n[t+1]].every(function(e){return z.isType(e,$.BLOB)})?(this.content.push(n[t]),{offset:1}):z.goOn}},$.BLOB];return d(e,t,o,n)}function E(e,t,n){var o=[$.BLOB,$.BLOB,{content:[],name:"content",test:function(e,t,n){return[n[t+1],n[t+2]].every(function(e){return z.isType(e,$.BLOB)})?(this.content.push(n[t]),{offset:1}):z.goOn}},$.BLOB,$.BLOB];return d(e,t,o,n)}function g(e,t,n){var o=t[e];if(a(e,t,function(t,o){var r=l(K.img,t);r.src=z.tokensToString(o.src),r.alt=z.tokensToString(o.alt),n.push(r),e+=t.length}))return e;if(p(e,t,function(t,o){var r=l(K.comment,t);r.data=z.tokensToString(o.content),n.push(r),e+=t.length}))return e;if(h(e,t,function(t,o){var r=l(K.url,t,{href:z.tokensToString(o.src)});r.push(l(K.text,o.alt)),n.push(r),e+=t.length}))return e;if(u(e,t,function(t,o){var r=l(K.inlineCode,t);r.push(l(K.text,o.code)),n.push(r),e+=t.length}))return e;if(c(e,t,function(t,o){var r=l(K.url,t,{href:z.tokensToString(o.src)});r.push(l(K.text,o.src)),n.push(r),e+=t.length}))return e;if(_(e,t,function(t,o){var r=l(K.linethrough,t);T(o.content,r),n.push(r),e+=t.length}))return e;if(E(e,t,function(t,o){var r=l(K.blod,t);T(o.content,r),n.push(r),e+=t.length}))return e;if(y(e,t,function(t,o){var r=l(K.italic,t);T(o.content,r),n.push(r),e+=t.length}))return e;var r=n.children[n.children.length-1];return r&&r.type===K.text?r.addToken(o):n.push(l(K.text,[o])),e+=1,e}function T(e,t){for(var n=0;n<e.length;)n=g(n,e,t)}function m(e,t,n){if(!z.isLineStart(t,e))return!1;var o=[z.getIdentMatcher(),{content:[],name:"headLevel",stop:!1,test:function(e,t,n){var o=s(t,n,function(e){return z.isType(e,$.HEAD_TITLE)}),r=o.matchTokens;return 6<r.length||0===r.length?(this.stop=!0,!1):(this.content=r,{offset:r.length})}},{content:[],name:"children",repeatable:!0,ignore:!0,test:function(e,t,n){return z.isLineEnd(n[t])?{offset:1}:z.goOn}}];return d(e,t,o,n)}function f(e,t,n){if(!z.isLineStart(t,e))return!1;var o=[$.CODE_BLOCK,$.CODE_BLOCK,$.CODE_BLOCK,{content:[],name:"language",test:function(e,t,n){return z.isLineEnd(n[t])?(this.content.push(n[t]),{offset:1}):z.nextIsLineEnd(n,t)?(this.content.push(n[t],n[t+1]),{offset:2}):z.goOn}},{content:[],name:"code",test:function(e,t,n){return e===$.CODE_BLOCK?z.isLineStart(n,t)&&i(n,t,3).every(function(e,t){return 2===t?z.isLineEnd(e):z.isType(e,$.CODE_BLOCK)})?{offset:3}:z.goOn:z.goOn}}];return d(e,t,o,n)}function L(e,t,n){return d(e,t,[{content:[],name:"hr",test:function(e,t,n){if(z.isType(n[t],$.NO_ORDER_LIST)){var o=z.isLineStart(n,t)&&i(n,t,3).every(function(e,t){return 2===t?z.isLineEnd(e):z.isType(e,$.NO_ORDER_LIST)});return!!o&&{offset:3}}return!1}}],n)}function S(e,t,n){if(!z.isLineStart(t,e))return!1;var o=[$.SIMPLE_URL_END,{content:[],name:"children",repeatable:!0,ignore:!0,test:function(e,t,n){return i(n,t,2).every(function(e){return z.isLineEnd(e)})?(this.content.push(n[t]),{offset:2}):z.goOn}}];return d(e,t,o,n)}function N(e,t,n){if(!z.isLineStart(t,e))return!1;return d(e,t,[{content:[],children:[],name:"thead",test:function(e,t,n){if(e!==$.TABLE_SPLIT){if(0===this.children.length){if(z.isType(e,$.WHITE_SPACE))return z.goOn;this.children.push([])}this.children[this.children.length-1].push(n[t])}else e===$.TABLE_SPLIT&&(z.isType(n[t+1],$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT)&&(!z.isType(n[t+1],$.WHITE_SPACE)||z.isType(n[t+2],$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT))||(this.hasSplit=!0,this.children.push([])));return z.isLineEnd(n[t])?!!(this.hasSplit&&0!==this.children.length)&&(this.content.push(n[t]),{offset:1}):z.goOn}},{content:[],name:"split",children:[],test:function(e,t,n){if(!z.isType(e,$.NO_ORDER_LIST,$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT))return this.stop=!0,!1;if(e!==$.TABLE_SPLIT){if(0===this.children.length){if(z.isType(e,$.WHITE_SPACE))return z.goOn;this.children.push([])}this.children[this.children.length-1].push(n[t])}else e===$.TABLE_SPLIT&&(z.isType(n[t+1],$.NO_ORDER_LIST)||z.isType(n[t+1],$.WHITE_SPACE)&&z.isType(n[t+2],$.NO_ORDER_LIST))&&(this.hasSplit=!0,this.children.push([]));return z.isLineEnd(n[t])?!!(this.hasSplit&&0!==this.children.length)&&(this.content.push(n[t]),{offset:1}):z.goOn}},{content:[],children:[],name:"tbody",test:function(e,t,n){if(z.isType(e,$.LINE_END))this.children.push([]);else{if(0===this.children.length){if(z.isType(e,$.WHITE_SPACE))return z.goOn;this.children.push([])}var o=this.children[this.children.length-1];z.isType(e,$.TABLE_SPLIT)?(!z.isType(n[t+1],$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT)||z.isType(n[t+1],$.WHITE_SPACE)&&!z.isType(n[t+2],$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT))&&o.push([]):(0===o.length&&o.push([]),o[o.length-1].push(n[t]))}return i(n,t,2).every(function(e){return z.isLineEnd(e)})?(this.content.push(n[t]),{offset:1}):z.goOn}}],n)}function O(e){var t={deep:0,ident:0,children:[]},n=[];return e.forEach(function(e){for(var o=Math.floor,r,s=o(e.ident.map(function(e){return e.raw}).join("").length/4);n.length;)if(r=n[n.length-1],r.deep<s){e.deep=r.deep+1,r.ul.push(e),n.push(e);break}else n.pop();n.length||(e.deep=0,t.children.push(e),n.push(e))}),t.children}function C(e,t,n){if(!z.isLineStart(t,e))return!1;for(var o=[],r=[];!t.slice(e,e+2).every(function(e){return z.isLineEnd(e)});)if(!d(e,t,[z.getIdentMatcher(),{content:[],name:"listType",nodeType:K.li,listStyleType:"",test:function(e,t,n){if(z.isType(e,$.NO_ORDER_LIST,$.ORDER_LIST)){this.content.push(n[t]),this.listStyleType=e===$.NO_ORDER_LIST?"disc":"decimal";var o="",r=i(n,t,5).every(function(e,t){return 0===t?z.isType(e,$.WHITE_SPACE):1===t?z.isType(e,$.URL_DESC_START):2===t?z.isType(e,$.WHITE_SPACE)?(o=K.li_todo,!0):!!(z.isType(e,$.STRING)&&"x"===e.raw)&&(o=K.li_done,!0):3===t?z.isType(e,$.URL_DESC_END):4===t?z.isType(e,$.WHITE_SPACE)||z.isLineEnd(e):void 0});if(r){var s;return(s=this.content).push.apply(s,_toConsumableArray(i(n,t,4))),this.nodeType=o,{offset:5}}return{offset:1}}return!1}},{content:[],name:"head",test:function(e,t,n){var o=z.checkIsEnd(n,t);if(o.match){var r;return(r=this.content).push.apply(r,_toConsumableArray(o.match)),{offset:o.match.length}}return z.goOn}}],function(t,n){e+=t.length,o.push.apply(o,_toConsumableArray(t)),r.push({ident:n.ident,head:n.head,listStyleType:n.listType_raw.listStyleType,nodeType:n.listType_raw.nodeType,children:[],ul:[],tokens:t})})){if(0===r.length)return;if(!d(e,t,[{content:[],name:"content",test:function(e,t,n){return z.isLineEnd(n[t])?(this.content.push(n[t]),{offset:1}):z.goOn}}],function(t,n){e+=t.length,o.push.apply(o,_toConsumableArray(t)),r[r.length-1].children.push({type:"normal",content:n.content,tokens:t})}))break}return!!(0<r.length)&&(n(o,O(r)),!0)}function I(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=[],n=0;n<e.length;){var o=e[n],r=1;switch(o){case"-":{if("-->"===e.slice(n,n+3)){r=3,t.push(new F($.COMMENT_END,o,n,n+r));break}t.push(new F($.NO_ORDER_LIST,o,n,n+r));break}case"+":{t.push(new F($.ORDER_LIST,o,n,n+r));break}case"<":{if("<!--"===e.slice(n,n+4)){r=4,t.push(new F($.COMMENT_START,o,n,n+r));break}t.push(new F($.SIMPLE_URL_START,o,n,n+r));break}case">":{t.push(new F($.SIMPLE_URL_END,o,n,n+r));break}case"(":{t.push(new F($.URL_START,o,n,n+r));break}case")":{t.push(new F($.URL_END,o,n,n+r));break}case"[":{t.push(new F($.URL_DESC_START,o,n,n+r));break}case"]":{t.push(new F($.URL_DESC_END,o,n,n+r));break}case"#":{t.push(new F($.HEAD_TITLE,o,n,n+r));break}case"!":{t.push(new F($.IMG_START,o,n,n+r));break}case"|":{t.push(new F($.TABLE_SPLIT,o,n,n+r));break}case"`":{t.push(new F($.CODE_BLOCK,o,n,n+r));break}case"~":{t.push(new F($.LINE_THROUGH,o,n,n+r));break}case"*":{t.push(new F($.BLOB,o,n,n+r));break}case" ":{var s=t[t.length-1];s&&s.type===$.WHITE_SPACE?(s.raw+=o,s.end+=1):t.push(new F($.WHITE_SPACE,o,n,n+r));break}case"\n":{t.push(new F($.LINE_END,o,n,n+r));break}default:{var i=e[n+1],d="",l="\\"===o&&i?[o+i,2]:[o,1],a=_slicedToArray(l,2);d=a[0],r=a[1];var p=t[t.length-1];p&&p.type===$.STRING?(p.raw+=d,p.end+=r):t.push(new F($.STRING,d,n,n+r))}}n+=r}return t}function x(e,t){for(var n,o=t||l(K.root,e),r=0;r<e.length&&(n=e[r],!!n);){if(n.type===$.LINE_END){o.push(l(K.br,[n])),r+=1;continue}m(r,e,function(e,t){var n=l(K["h"+t.headLevel.length],e);T(t.children,n),o.push(n),r+=e.length})||f(r,e,function(e,t){var n=l(K.code,e,{code:z.tokensToString(t.code),language:z.tokensToString(t.language).trim()});o.push(n),r+=e.length})||S(r,e,function(e,t){var n=l(K.queto,e);x(t.children,n),o.push(n),r+=e.length+1})||N(r,e,function(e,t){var n=l(K.table,e),s=l(K.thead,t.thead),i=l(K.tr,t.thead);s.push(i),t.thead_raw.children.forEach(function(e){var t=l(K.th,e);T(e,t),i.push(t)}),n.push(s);var d=l(K.tbody,t.tbody);t.tbody_raw.children.forEach(function(e){var n=l(K.tr,t.tbody);d.push(n),t.thead_raw.children.forEach(function(t,o){var r=e[o]||[],s=l(K.td,r);T(r,s),n.push(s)})}),n.push(d),o.push(n),r+=e.length+2})||L(r,e,function(e){var t=l(K.hr,e);o.push(t),r+=e.length})||C(r,e,function(e,t){(function t(n,o){var r=l(K.ul,e);r.listStyleType=n[0].listStyleType,n.forEach(function(e){var n=l(e.nodeType||K.li);T(e.head,n),e.children.forEach(function(e){T(e.content,n)}),r.push(n),e.ul.length&&t(e.ul,n)}),o.push(r)})(t,o),r+=e.length+1})||(r=g(r,e,o))}return o}function R(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return x(I(e))}function b(e,t){return t&&t.parentElement&&t.parentElement.insertBefore(e,t),e}function D(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document.body;e.forEach(function(e){var n=e.nextNode;switch(e.type){case"del":{var o=e.prevNode.$getNode(e.type);o.parentElement||console.log("delete error::",e),o.parentElement.removeChild(o);break}case"add":{var r=n.__parent&&n.__parent.$getNode(e.type)||t;w(n,r,{beforeAppend:function(t){var n=r.childNodes[e.moveTo];if(n)return b(t,n),!0}});break}case"replace":{var s=e.prevNode.$getNode(e.type),i=document.createDocumentFragment();w(n,i),s.parentElement.replaceChild(i,s);break}case"move":{var d=e.moveTo,l=e.prevNode,a=l.$getNode(e.type),p=a.parentElement;p.childNodes[d]!==a&&(p.childNodes[d]?b(a,p.childNodes[d]):p.appendChild(a));break}case"update":{var h=e.propsChange,c=e.prevNode,u=e.nextNode,_=c.$getNode(e.type);u.$getNode=c.$getNode,c.__node&&(u.__node=c.__node),c.__update&&(u.__update=c.__update),h.forEach(function(e){var t=e.key;switch(e.type){case"change":case"add":{var n=u[t];if(c.__update){c.__update(t,u);break}if(_ instanceof Text){_.data=n;break}_.setAttribute(t,n);break}case"del":{_.removeAttribute(t);break}}});break}default:console.error("canot handle type",e,e.type);}})}function v(e){function t(e){"text"==e.type&&(n+=e.value||""),"img"==e.type&&o.push(e.src),e.children&&e.children.forEach(t)}var n="",o=[];return t(e),{text:n,imgs:o}}function k(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("textarea");t.value=e,t.style.cssText="position: absolute; top: -10000px; left: -10000px;",document.body.appendChild(t),t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy"),document.body.removeChild(t)}function A(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function P(e){try{return decodeURIComponent(e)}catch(t){return e}}function w(e,t){var n,o,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s=function(){return n};switch(e.type){case K.audio:case K.video:{if(/^<iframe(\s*.+)*><\/iframe>$/.test(e.src.trim())){n=document.createElement("div"),n.className="audio",n.innerHTML=e.src.replace("http://","//");var i=n.querySelector("iframe");i.style.cssText+=";max-width: 100%; max-height: 60vw; overflow: hidden;"}else n=document.createElement(e.type),n.src=e.src,n.alt=e.alt,n.controls="true";break}case K.img:{var d=e.src.match(/\.(\d+)x(\d+)\./);if(d){var l=d.slice(1,3),a=_slicedToArray(l,2),p=a[0],h=a[1],c=e.src;n=document.createElement("div"),n.style.cssText=";position: relative; max-width: ".concat(p,"px; overflow: hidden; background: rgb(219, 221, 215);"),n.innerHTML="<div style=\"padding-top: ".concat(100*(h/p),"%;\">\n <img ").concat(LY.lazyLoad.caches.includes(c)?"src=\"".concat(c,"\" data-img-cache=\"true\""):"","\n class=\"lazy-load-img img-loading\"\n data-lazy-img=\"").concat(e.src,"\"\n data-src=\"").concat(e.src,"\"\n referrerpolicy=\"no-referrer\"\n style=\"position: absolute; width: 100%; height: 100%; top: 0;\" />\n </div>");break}else{n=document.createElement(e.type),n.src=e.src,n.alt=e.alt,n.referrerPolicy="no-referrer";break}}case K.url:{n=document.createElement(e.type),n.href=e.href,n.referrerPolicy="no-referrer",n.target="_blank";break}case K.comment:{n=document.createComment(""),e.__update=function(e,t){"data"===e&&(n.data=t[e])},e.__update("data",e);break}case K.text:{n=document.createElement("span"),n.setAttribute("md-type","text-node"),e.__update=function(e,t){A(n),t[e].split(/([A-z]+:\/{2}\S+)/g).forEach(function(e,t){if(1==t%2){var o=document.createElement("a");o.href=e,o.textContent=P(e),o.referrerPolicy="no-referrer",o.target="_blank",n.appendChild(o)}else n.appendChild(document.createTextNode(e))})},e.__update("value",e);break}case K.br:{n=document.createElement(e.type);break}case K.linethrough:{n=document.createElement("span"),n.style.cssText+="; text-decoration: line-through;";break}case K.code:{n=document.createElement("pre"),n.className="blockCode";var u=document.createElement("code"),_="";e.__update=function(e,t){switch(e){case"language":{u.className=["highlight",t[e]||""].join(" ");break}case"code":{_=t[e],u.textContent=_;break}}},e.__update("language",e),e.__update("code",e);var y=document.createElement("div");y.className="blockCodeTools";var E=document.createElement("div");E.textContent="copy",E.className="blockCodeCopyBtn",E.addEventListener("click",function(){k(_)}),["red","yellow","green"].forEach(function(e){var t=document.createElement("span");t.className="code-"+e,y.appendChild(t)}),y.appendChild(E),n.appendChild(y),n.appendChild(u);break}case K.inlineCode:{n=document.createElement("code"),n.className="inlineCode";break}case K.head:{n=document.createElement("h".concat(e.level));break}case K.ul:{n=document.createElement(e.type),e.__update=function(e,t){n.style.cssText+=";list-style-type:".concat(t[e],";")},e.__update("listStyleType",e);break}case K.li_done:case K.li_todo:{o=document.createElement("li");var g=document.createElement("span");g.className="list-todo-tag",g.textContent=e.type===K.li_done?"\u2705":"\uD83D\uDEA7",o.appendChild(g),n=document.createElement("span"),o.appendChild(n),o.style.cssText+=";list-style: none;",s=function(e){return"add"===e?n:o};break}case K.h3:case K.h2:case K.h1:{n=document.createElement(e.type),e.__update=function(e,t){"id"===e&&(n.id=v(t).text.trim())},e.__update("id",e);break}default:n=document.createElement(e.type),e.indent&&(n.style.cssText+=";padding-left: 2em;"),e.type==K.table&&n.setAttribute("border","0");}return o=o||n,e.$getNode=s,e.tag&&n.setAttribute("tag",e.tag),e.children&&e.children.forEach(function(e){return w(e,n)}),r.beforeAppend&&r.beforeAppend(o)||t.appendChild(o),n}function B(e){function t(e){return r.measureText(e).width}var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"12px monospace",o=document.createElement("canvas"),r=o.getContext("2d");r.font=n;var s=e.match(/^\s*/)[0],d=" ",l="-",a=[t(d),t(l)],p=a[0],h=a[1],c=[];return e.split("\n").map(function(e){return e.trim().replace(/^\||\|$/,"").split("|").map(function(e){return e.trim()}).map(function(e,n){var o=Math.max;/^-+$/.test(e)&&(e="--");var r=t(e);return c[n]=o(c[n]||0,r),{i:e,width:r}})}).map(function(e){return s+e.map(function(e,t,n){var o=Math.round,r=e.i,s=e.width,i=c[t]-s,a=/^-+$/.test(r.trim())?[l,o(i/h),h]:[d,o(i/p),p],u=_slicedToArray(a,3),_=u[0],y=u[1],E=u[2];return n[t+1]&&(n[t+1].width-=i-E*y),r+_.repeat(y)}).join(" | ")}).join("\n")}function H(e){return e.split(/\n/g).map(function(e){return e.replace(/^\s+/,function(e){return" ".repeat(e.length-e.length%4)})}).join("\n")}function M(e,t){return e.children.map(function(e){switch(e.type){case K.text:return e.value;case K.table:{var n=e.tokens.map(function(e){return e.raw}).join("");return B(n,getComputedStyle(t).font)}case K.ul:return H(e.tokens.map(function(e){return e.raw}).join(""));case K.h1:case K.h2:case K.h3:case K.h4:case K.h5:case K.h6:return U(e);default:return e.tokens.map(function(e){return e.raw}).join("");}}).join("")}function U(e){if(/^h[1-9]$/.test(e.type))return"#"+" ".repeat(e.__headLen)+M(e).trimStart()+"\n"}function j(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=J[e];if(!t){var n=R(e);t=_objectSpread({root:n},v(n)),J[e]=t}return t}function W(e){return new Promise(function(t){if(V[e])return t();var n=function(){V[e]=!0,t()};if(e.endsWith(".js")){var o=document.createElement("script");o.onload=n,o.src=e,document.head.appendChild(o)}else if(e.endsWith(".css")){var r=document.createElement("link");r.onload=n,r.type="text/css",r.rel="stylesheet",r.charset="utf-8",r.href=e,document.head.appendChild(r)}})}function G(e,t){Promise.all(t.asset.map(W)).then(function(){window.hljs&&e&&(window.hljs.configure({tabReplace:4}),_toConsumableArray(e.querySelectorAll("code.highlight")).forEach(function(e){window.hljs.highlightBlock(e)}))})}function q(e){return _objectSpread({asset:[]},e)}var K={text:"text",url:"a",img:"img",video:"video",audio:"audio",inlineCode:"inlineCode",br:"br",hr:"hr",root:"root",blod:"b",italic:"i",linethrough:"lineThrough",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",queto:"queto",code:"code",table:"table",thead:"thead",tbody:"tbody",tr:"tr",th:"th",td:"td",ul:"ul",li:"li",li_done:"li-done",li_todo:"li-todo",comment:"comment",htmlRaw:"htmlRaw"},$={NO_ORDER_LIST:"no_order_list",ORDER_LIST:"order_list",SIMPLE_URL_START:"simple_url_start",SIMPLE_URL_END:"simple_url_end",URL_START:"url_start",URL_END:"url_end",URL_DESC_START:"url_desc_start",URL_DESC_END:"url_desc_end",HEAD_TITLE:"head_title",IMG_START:"img_start",TABLE_SPLIT:"table_split",CODE_BLOCK:"code_block",WHITE_SPACE:"white_space",LINE_END:"line_end",LINE_THROUGH:"linethrough",BLOB:"blob",STRING:"string",COMMENT_START:"comment_start",COMMENT_END:"comment_end"},z={isLineEnd:function(e){return!e||e.type===$.LINE_END},checkIsEnd:function(e,t){var n=[e[t],e[t+1]],o=n[0],r=n[1];return o?o.type===$.LINE_END?{match:[o]}:r?{}:{match:[o]}:{match:[]}},nextIsLineEnd:function(e,t){var n=e[t+1];return n&&n.type===$.LINE_END},isLineStart:function(e,t){var n=e[t-1];return!n||n.type===$.LINE_END},isType:function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return"string"==typeof e?n.includes(e):e&&n.includes(e.type)},goOn:{matchEnd:!1},isCanGoOn:function(e){return this.goOn===e},tokensToString:function(e){return e.map(function(e){return e.raw}).join("")},getQueueContent:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t={};return e.forEach(function(e){e.content&&(t[e.name]=e.content,t[e.name+"_raw"]=e)}),t},getIdentMatcher:function(){return{content:[],name:"ident",test:function(e){return e===$.WHITE_SPACE?z.goOn:{offset:0}}}}},Q=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];_classCallCheck(this,e),this.type=t,this.tokens=n,this.children=[],this.value=""}return _createClass(e,[{key:"push",value:function(e){return e.__parent=this,this.children.push(e),this}},{key:"addToken",value:function(e){e&&this.tokens.push(e),this.value=this.tokens.map(function(e){return e.raw}).join("")}},{key:"raw",get:function(){return this.children.map(function(e){return e.tokens.map(function(e){return e.raw}).join("")}).join("")||this.tokens.map(function(e){return e.raw}).join("")}}]),e}(),F=function e(t,n,o,r){_classCallCheck(this,e),this.type=t,this.start=o,this.end=r,this.raw=n},J={},V={},X=function(){function e(t,n,o){_classCallCheck(this,e),this.dom=t,this.config=n,this.prevRoot=null,o&&this.update(o)}return _createClass(e,[{key:"update",value:function(e){this.dom.classList.add("markdown");var t=j(e),n=o(this.prevRoot,t.root);this.prevRoot=t.root,D(n,this.dom);var r=q(this.config);G(this.dom,r)}}]),e}();return e.Markdown=X,e.codeHighlight=G,e.formater=function(e,t){var n=R(e);return M(n,t)},e.getParseResult=j,e.markdown=function(e,t,n){e.innerHTML="",e.classList.add("markdown");var o=j(t);w(o.root,e),n=q(n),G(e,n)},e.markdownInfo=function(e){var t=j(e),n=t.root,o=_objectWithoutProperties(t,["root"]);return o},e.parser=R,e.trans=w,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
"use strict";function _objectWithoutProperties(e,t){if(null==e)return{};var n,o,r=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(0<=t.indexOf(n))&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)n=s[o],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n,o=0;o<t.length;o++)n=t[o],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,s=void 0;try{for(var i,d=e[Symbol.iterator]();!(o=(i=d.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(e){r=!0,s=e}finally{try{o||null==d["return"]||d["return"]()}finally{if(r)throw s}}return n}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){"@babel/helpers - typeof";return _typeof="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},_typeof(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t,n=1;n<arguments.length;n++)t=null==arguments[n]?{}:arguments[n],n%2?ownKeys(Object(t),!0).forEach(function(n){_defineProperty(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))});return e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lymd=function(e){'use strict';function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return e.startsWith("__")||["children","$getNode","type","raw","tokens","push"].includes(e)}function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=Object.keys(e),r=Object.keys(n),s=[];return o.forEach(function(o){return t(o)?void 0:r.includes(o)?void(e[o]!==n[o]&&s.push({type:"change",key:o,prevNode:e,nextNode:n})):void s.push({type:"del",key:o,prevNode:e,nextNode:n})}),r.forEach(function(t){o.includes(t)||s.push({type:"add",key:t,prevNode:e,nextNode:n})}),s}function o(e,t){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};if(e===t)return o;if(!e)o.push(_objectSpread({type:"add",prevNode:e,nextNode:t},s));else if(!t)o.push(_objectSpread({type:"del",prevNode:e,nextNode:t},s));else if(e.type!==t.type)o.push(_objectSpread({type:"replace",prevNode:e,nextNode:t},s));else{var i,d={type:"update",prevNode:e,nextNode:t,propsChange:[]};(i=d.propsChange).push.apply(i,_toConsumableArray(n(e,t))),t.$getNode=e.$getNode,t.__update=e.__update,d.propsChange.length&&o.push(d),r(e,t,o)}return o}function r(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],r=e.children,s=void 0===r?[]:r,i=t.children,d=void 0===i?[]:i,l=s.filter(function(e){return!!d.some(function(t){return t.type===e.type})||(o(e,null,n),!1)});d.forEach(function(e){l.some(function(t,n){return t.type===e.type&&(l[n]={isDel:!0,ele:t},!0)})}),l.filter(function(e){return!e.isDel}).forEach(function(e){return o(e,null,n)});var a=l.filter(function(e){return e.isDel}).map(function(e){return e.ele});d.forEach(function(e,t){var r=a.some(function(r,s){return r.type===e.type&&(a.splice(s,1),a.splice(t>s?t-1:t,0,{used:!0,ele:r}),s!==t&&n.push({type:"move",prevNode:r,nextNode:e,current:s,moveTo:t>s?t+1:t}),o(r,e,n),!0)});r||(a.splice(t,0,{add:!0,item:e}),o(null,e,n,{moveTo:t}))})}function s(e,t,n){for(var o,r=[],s=e,i=function(e){return s+=e,[t[s],s]};s<=t.length&&(o=t[s],void 0!==o)&&!!n(o,s,i);){r.push(o);s+=1}return{matchTokens:r,nextToken:t[s]}}function i(e,t){for(var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=[],r=t+1;r<t+n+1;r++)o.push(e[r]);return o}function d(e,t,n,o){var r=[],i=0;return s(e,t,function(e,o,s){for(;;){if("object"===_typeof(n[i])){if(!e){i+=1;break}var d=n[i].test(e.type,o,t);if(z.isCanGoOn(d))return n[i].content.push(e),r.push(e),!0;if(!d||n[i].stop)return!1;if(0<d.offset){r.push.apply(r,_toConsumableArray(t.slice(o,o+d.offset)));var l=s(d.offset),a=_slicedToArray(l,2);e=a[0],o=a[1]}i+=1;continue}return!!(n[i]&&e.type===n[i])&&(i+=1,r.push(e),i!==n.length)}}),!!(i===n.length&&n.every(function(e){return!e.stop}))&&(o(r,z.getQueueContent(n)),!0)}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=new Q(e,t);return Object.assign(o,n),e===K.text&&o.addToken(),o}function a(e,t,n){if(!z.isType(t[e],$.IMG_START))return!1;var o=[t[e]];return!!h(e+1,t,function(e,t){n(o.concat(e),t)})}function p(e,t,n){var o=[$.COMMENT_START,{content:[],name:"content",test:function(e){return z.isType(e,$.COMMENT_END)?{offset:0}:z.goOn}},$.COMMENT_END];return d(e,t,o,n)}function h(e,t,n){var o=[$.URL_DESC_START,{content:[],name:"alt",test:function(e){return z.isType(e,$.URL_DESC_START,$.URL_DESC_END)?{offset:0}:z.goOn}},$.URL_DESC_END,$.URL_START,{content:[],name:"src",test:function(e){return z.isType(e,$.URL_START,$.URL_END)?{offset:0}:z.goOn}},$.URL_END];return d(e,t,o,n)}function c(e,t,n){var o=[$.SIMPLE_URL_START,{content:[],name:"src",test:function(e){return z.isType(e,$.SIMPLE_URL_START,$.SIMPLE_URL_END,$.LINE_END,$.WHITE_SPACE)?{offset:0}:z.goOn}},$.SIMPLE_URL_END];return d(e,t,o,n)}function u(e,t,n){if(z.isType(t[e],$.CODE_BLOCK)&&z.isType(t[e+1],$.CODE_BLOCK))return!1;var o=[$.CODE_BLOCK,{content:[],name:"code",repeatable:!0,ignore:!0,test:function(e){return z.isType(e,$.CODE_BLOCK)?{offset:1}:z.goOn}}];return d(e,t,o,n)}function _(e,t,n){var o=[$.LINE_THROUGH,$.LINE_THROUGH,{content:[],name:"content",test:function(e,t,n){return[n[t+1],n[t+2]].every(function(e){return z.isType(e,$.LINE_THROUGH)})?(this.content.push(n[t]),{offset:1}):z.goOn}},$.LINE_THROUGH,$.LINE_THROUGH];return d(e,t,o,n)}function y(e,t,n){var o=[$.BLOB,{content:[],name:"content",test:function(e,t,n){return[n[t+1]].every(function(e){return z.isType(e,$.BLOB)})?(this.content.push(n[t]),{offset:1}):z.goOn}},$.BLOB];return d(e,t,o,n)}function E(e,t,n){var o=[$.BLOB,$.BLOB,{content:[],name:"content",test:function(e,t,n){return[n[t+1],n[t+2]].every(function(e){return z.isType(e,$.BLOB)})?(this.content.push(n[t]),{offset:1}):z.goOn}},$.BLOB,$.BLOB];return d(e,t,o,n)}function g(e,t,n){var o=t[e];if(a(e,t,function(t,o){var r=l(K.img,t);r.src=z.tokensToString(o.src),r.alt=z.tokensToString(o.alt),n.push(r),e+=t.length}))return e;if(p(e,t,function(t,o){var r=l(K.comment,t);r.data=z.tokensToString(o.content),n.push(r),e+=t.length}))return e;if(h(e,t,function(t,o){var r=l(K.url,t,{href:z.tokensToString(o.src)});r.push(l(K.text,o.alt)),n.push(r),e+=t.length}))return e;if(u(e,t,function(t,o){var r=l(K.inlineCode,t);r.push(l(K.text,o.code)),n.push(r),e+=t.length}))return e;if(c(e,t,function(t,o){var r=l(K.url,t,{href:z.tokensToString(o.src)});r.push(l(K.text,o.src)),n.push(r),e+=t.length}))return e;if(_(e,t,function(t,o){var r=l(K.linethrough,t);T(o.content,r),n.push(r),e+=t.length}))return e;if(E(e,t,function(t,o){var r=l(K.blod,t);T(o.content,r),n.push(r),e+=t.length}))return e;if(y(e,t,function(t,o){var r=l(K.italic,t);T(o.content,r),n.push(r),e+=t.length}))return e;var r=n.children[n.children.length-1];return r&&r.type===K.text?r.addToken(o):n.push(l(K.text,[o])),e+=1,e}function T(e,t){for(var n=0;n<e.length;)n=g(n,e,t)}function m(e,t,n){if(!z.isLineStart(t,e))return!1;var o=[z.getIdentMatcher(),{content:[],name:"headLevel",stop:!1,test:function(e,t,n){var o=s(t,n,function(e){return z.isType(e,$.HEAD_TITLE)}),r=o.matchTokens;return 6<r.length||0===r.length?(this.stop=!0,!1):(this.content=r,{offset:r.length})}},{content:[],name:"children",repeatable:!0,ignore:!0,test:function(e,t,n){return z.isLineEnd(n[t])?{offset:1}:z.goOn}}];return d(e,t,o,n)}function f(e,t,n){if(!z.isLineStart(t,e))return!1;var o=[$.CODE_BLOCK,$.CODE_BLOCK,$.CODE_BLOCK,{content:[],name:"language",test:function(e,t,n){return z.isLineEnd(n[t])?(this.content.push(n[t]),{offset:1}):z.nextIsLineEnd(n,t)?(this.content.push(n[t],n[t+1]),{offset:2}):z.goOn}},{content:[],name:"code",test:function(e,t,n){return e===$.CODE_BLOCK?z.isLineStart(n,t)&&i(n,t,3).every(function(e,t){return 2===t?z.isLineEnd(e):z.isType(e,$.CODE_BLOCK)})?{offset:3}:z.goOn:z.goOn}}];return d(e,t,o,n)}function L(e,t,n){return d(e,t,[{content:[],name:"hr",test:function(e,t,n){if(z.isType(n[t],$.NO_ORDER_LIST)){var o=z.isLineStart(n,t)&&i(n,t,3).every(function(e,t){return 2===t?z.isLineEnd(e):z.isType(e,$.NO_ORDER_LIST)});return!!o&&{offset:3}}return!1}}],n)}function S(e,t,n){if(!z.isLineStart(t,e))return!1;var o=[$.SIMPLE_URL_END,{content:[],name:"children",repeatable:!0,ignore:!0,test:function(e,t,n){return i(n,t,2).every(function(e){return z.isLineEnd(e)})?(this.content.push(n[t]),{offset:2}):z.goOn}}];return d(e,t,o,n)}function N(e,t,n){if(!z.isLineStart(t,e))return!1;return d(e,t,[{content:[],children:[],name:"thead",test:function(e,t,n){if(e!==$.TABLE_SPLIT){if(0===this.children.length){if(z.isType(e,$.WHITE_SPACE))return z.goOn;this.children.push([])}this.children[this.children.length-1].push(n[t])}else e===$.TABLE_SPLIT&&(z.isType(n[t+1],$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT)&&(!z.isType(n[t+1],$.WHITE_SPACE)||z.isType(n[t+2],$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT))||(this.hasSplit=!0,this.children.push([])));return z.isLineEnd(n[t])?!!(this.hasSplit&&0!==this.children.length)&&(this.content.push(n[t]),{offset:1}):z.goOn}},{content:[],name:"split",children:[],test:function(e,t,n){if(!z.isType(e,$.NO_ORDER_LIST,$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT))return this.stop=!0,!1;if(e!==$.TABLE_SPLIT){if(0===this.children.length){if(z.isType(e,$.WHITE_SPACE))return z.goOn;this.children.push([])}this.children[this.children.length-1].push(n[t])}else e===$.TABLE_SPLIT&&(z.isType(n[t+1],$.NO_ORDER_LIST)||z.isType(n[t+1],$.WHITE_SPACE)&&z.isType(n[t+2],$.NO_ORDER_LIST))&&(this.hasSplit=!0,this.children.push([]));return z.isLineEnd(n[t])?!!(this.hasSplit&&0!==this.children.length)&&(this.content.push(n[t]),{offset:1}):z.goOn}},{content:[],children:[],name:"tbody",test:function(e,t,n){if(z.isType(e,$.LINE_END))this.children.push([]);else{if(0===this.children.length){if(z.isType(e,$.WHITE_SPACE))return z.goOn;this.children.push([])}var o=this.children[this.children.length-1];z.isType(e,$.TABLE_SPLIT)?(!z.isType(n[t+1],$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT)||z.isType(n[t+1],$.WHITE_SPACE)&&!z.isType(n[t+2],$.WHITE_SPACE,$.LINE_END,$.TABLE_SPLIT))&&o.push([]):(0===o.length&&o.push([]),o[o.length-1].push(n[t]))}return i(n,t,2).every(function(e){return z.isLineEnd(e)})?(this.content.push(n[t]),{offset:1}):z.goOn}}],n)}function O(e){var t={deep:0,ident:0,children:[]},n=[];return e.forEach(function(e){for(var o=Math.floor,r,s=o(e.ident.map(function(e){return e.raw}).join("").length/4);n.length;)if(r=n[n.length-1],r.deep<s){e.deep=r.deep+1,r.ul.push(e),n.push(e);break}else n.pop();n.length||(e.deep=0,t.children.push(e),n.push(e))}),t.children}function C(e,t,n){if(!z.isLineStart(t,e))return!1;for(var o=[],r=[];!t.slice(e,e+2).every(function(e){return z.isLineEnd(e)});)if(!d(e,t,[z.getIdentMatcher(),{content:[],name:"listType",nodeType:K.li,listStyleType:"",test:function(e,t,n){if(z.isType(e,$.NO_ORDER_LIST,$.ORDER_LIST)){this.content.push(n[t]),this.listStyleType=e===$.NO_ORDER_LIST?"disc":"decimal";var o="",r=i(n,t,5).every(function(e,t){return 0===t?z.isType(e,$.WHITE_SPACE):1===t?z.isType(e,$.URL_DESC_START):2===t?z.isType(e,$.WHITE_SPACE)?(o=K.li_todo,!0):!!(z.isType(e,$.STRING)&&"x"===e.raw)&&(o=K.li_done,!0):3===t?z.isType(e,$.URL_DESC_END):4===t?z.isType(e,$.WHITE_SPACE)||z.isLineEnd(e):void 0});if(r){var s;return(s=this.content).push.apply(s,_toConsumableArray(i(n,t,4))),this.nodeType=o,{offset:5}}return{offset:1}}return!1}},{content:[],name:"head",test:function(e,t,n){var o=z.checkIsEnd(n,t);if(o.match){var r;return(r=this.content).push.apply(r,_toConsumableArray(o.match)),{offset:o.match.length}}return z.goOn}}],function(t,n){e+=t.length,o.push.apply(o,_toConsumableArray(t)),r.push({ident:n.ident,head:n.head,listStyleType:n.listType_raw.listStyleType,nodeType:n.listType_raw.nodeType,children:[],ul:[],tokens:t})})){if(0===r.length)return;if(!d(e,t,[{content:[],name:"content",test:function(e,t,n){return z.isLineEnd(n[t])?(this.content.push(n[t]),{offset:1}):z.goOn}}],function(t,n){e+=t.length,o.push.apply(o,_toConsumableArray(t)),r[r.length-1].children.push({type:"normal",content:n.content,tokens:t})}))break}return!!(0<r.length)&&(n(o,O(r)),!0)}function I(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=[],n=0;n<e.length;){var o=e[n],r=1;switch(o){case"-":{if("-->"===e.slice(n,n+3)){r=3,t.push(new F($.COMMENT_END,o,n,n+r));break}t.push(new F($.NO_ORDER_LIST,o,n,n+r));break}case"+":{t.push(new F($.ORDER_LIST,o,n,n+r));break}case"<":{if("<!--"===e.slice(n,n+4)){r=4,t.push(new F($.COMMENT_START,o,n,n+r));break}t.push(new F($.SIMPLE_URL_START,o,n,n+r));break}case">":{t.push(new F($.SIMPLE_URL_END,o,n,n+r));break}case"(":{t.push(new F($.URL_START,o,n,n+r));break}case")":{t.push(new F($.URL_END,o,n,n+r));break}case"[":{t.push(new F($.URL_DESC_START,o,n,n+r));break}case"]":{t.push(new F($.URL_DESC_END,o,n,n+r));break}case"#":{t.push(new F($.HEAD_TITLE,o,n,n+r));break}case"!":{t.push(new F($.IMG_START,o,n,n+r));break}case"|":{t.push(new F($.TABLE_SPLIT,o,n,n+r));break}case"`":{t.push(new F($.CODE_BLOCK,o,n,n+r));break}case"~":{t.push(new F($.LINE_THROUGH,o,n,n+r));break}case"*":{t.push(new F($.BLOB,o,n,n+r));break}case" ":{var s=t[t.length-1];s&&s.type===$.WHITE_SPACE?(s.raw+=o,s.end+=1):t.push(new F($.WHITE_SPACE,o,n,n+r));break}case"\n":{t.push(new F($.LINE_END,o,n,n+r));break}default:{var i=e[n+1],d="",l="\\"===o&&i?[o+i,2]:[o,1],a=_slicedToArray(l,2);d=a[0],r=a[1];var p=t[t.length-1];p&&p.type===$.STRING?(p.raw+=d,p.end+=r):t.push(new F($.STRING,d,n,n+r))}}n+=r}return t}function x(e,t){for(var n,o=t||l(K.root,e),r=0;r<e.length&&(n=e[r],!!n);){if(n.type===$.LINE_END){o.push(l(K.br,[n])),r+=1;continue}m(r,e,function(e,t){var n=l(K["h"+t.headLevel.length],e);T(t.children,n),o.push(n),r+=e.length})||f(r,e,function(e,t){var n=l(K.code,e,{code:z.tokensToString(t.code),language:z.tokensToString(t.language).trim()});o.push(n),r+=e.length})||S(r,e,function(e,t){var n=l(K.queto,e);x(t.children,n),o.push(n),r+=e.length+1})||N(r,e,function(e,t){var n=l(K.table,e),s=l(K.thead,t.thead),i=l(K.tr,t.thead);s.push(i),t.thead_raw.children.forEach(function(e){var t=l(K.th,e);T(e,t),i.push(t)}),n.push(s);var d=l(K.tbody,t.tbody);t.tbody_raw.children.forEach(function(e){var n=l(K.tr,t.tbody);d.push(n),t.thead_raw.children.forEach(function(t,o){var r=e[o]||[],s=l(K.td,r);T(r,s),n.push(s)})}),n.push(d),o.push(n),r+=e.length+2})||L(r,e,function(e){var t=l(K.hr,e);o.push(t),r+=e.length})||C(r,e,function(e,t){(function t(n,o){var r=l(K.ul,e);r.listStyleType=n[0].listStyleType,n.forEach(function(e){var n=l(e.nodeType||K.li);T(e.head,n),e.children.forEach(function(e){T(e.content,n)}),r.push(n),e.ul.length&&t(e.ul,n)}),o.push(r)})(t,o),r+=e.length+1})||(r=g(r,e,o))}return o}function R(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return x(I(e))}function b(e,t){return t&&t.parentElement&&t.parentElement.insertBefore(e,t),e}function D(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document.body;e.forEach(function(e){var n=e.nextNode;switch(e.type){case"del":{var o=e.prevNode.$getNode(e.type);o.parentElement||console.log("delete error::",e),o.parentElement.removeChild(o);break}case"add":{var r=n.__parent&&n.__parent.$getNode(e.type)||t;w(n,r,{beforeAppend:function(t){var n=r.childNodes[e.moveTo];if(n)return b(t,n),!0}});break}case"replace":{var s=e.prevNode.$getNode(e.type),i=document.createDocumentFragment();w(n,i),s.parentElement.replaceChild(i,s);break}case"move":{var d=e.moveTo,l=e.prevNode,a=l.$getNode(e.type),p=a.parentElement;p.childNodes[d]!==a&&(p.childNodes[d]?b(a,p.childNodes[d]):p.appendChild(a));break}case"update":{var h=e.propsChange,c=e.prevNode,u=e.nextNode,_=c.$getNode(e.type);u.$getNode=c.$getNode,c.__node&&(u.__node=c.__node),c.__update&&(u.__update=c.__update),h.forEach(function(e){var t=e.key;switch(e.type){case"change":case"add":{var n=u[t];if(c.__update){c.__update(t,u);break}if(_ instanceof Text){_.data=n;break}_.setAttribute(t,n);break}case"del":{_.removeAttribute(t);break}}});break}default:console.error("canot handle type",e,e.type);}})}function v(e){function t(e){"text"==e.type&&(n+=e.value||""),"img"==e.type&&o.push(e.src),e.children&&e.children.forEach(t)}var n="",o=[];return t(e),{text:n,imgs:o}}function k(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("textarea");t.value=e,t.style.cssText="position: absolute; top: -10000px; left: -10000px;",document.body.appendChild(t),t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy"),document.body.removeChild(t)}function A(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function P(e){try{return decodeURIComponent(e)}catch(t){return e}}function w(e,t){var n,o,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s=function(){return n};switch(e.type){case K.audio:case K.video:{if(/^<iframe(\s*.+)*><\/iframe>$/.test(e.src.trim())){n=document.createElement("div"),n.className="audio",n.innerHTML=e.src.replace("http://","//");var i=n.querySelector("iframe");i.style.cssText+=";max-width: 100%; max-height: 60vw; overflow: hidden;"}else n=document.createElement(e.type),n.src=e.src,n.alt=e.alt,n.controls="true";break}case K.img:{var d=e.src.match(/\.(\d+)x(\d+)\./);if(d){var l=d.slice(1,3),a=_slicedToArray(l,2),p=a[0],h=a[1];n=document.createElement("div"),n.className="markdown-img-wrap",n.style.cssText=";position: relative; max-width: ".concat(p,"px; overflow: hidden; background: rgb(219, 221, 215);"),n.innerHTML="<div style=\"padding-top: ".concat(100*(h/p),"%;\">\n <img\n class=\"lazy-load-img img-loading\"\n data-lazy-img=\"").concat(e.src,"\"\n data-src=\"").concat(e.src,"\"\n referrerpolicy=\"no-referrer\"\n style=\"position: absolute; width: 100%; height: 100%; top: 0;\" />\n </div>");break}else{n=document.createElement(e.type),n.src=e.src,n.alt=e.alt,n.referrerPolicy="no-referrer";break}}case K.url:{n=document.createElement(e.type),n.href=e.href,n.referrerPolicy="no-referrer",n.target="_blank";break}case K.comment:{n=document.createComment(""),e.__update=function(e,t){"data"===e&&(n.data=t[e])},e.__update("data",e);break}case K.text:{n=document.createElement("span"),n.setAttribute("md-type","text-node"),e.__update=function(e,t){A(n),t[e].split(/([A-z]+:\/{2}\S+)/g).forEach(function(e,t){if(1==t%2){var o=document.createElement("a");o.href=e,o.textContent=P(e),o.referrerPolicy="no-referrer",o.target="_blank",n.appendChild(o)}else n.appendChild(document.createTextNode(e))})},e.__update("value",e);break}case K.br:{n=document.createElement(e.type);break}case K.linethrough:{n=document.createElement("span"),n.style.cssText+="; text-decoration: line-through;";break}case K.code:{n=document.createElement("pre"),n.className="blockCode";var c=document.createElement("code"),u="";e.__update=function(e,t){switch(e){case"language":{c.className=["highlight",t[e]||""].join(" ");break}case"code":{u=t[e],c.textContent=u;break}}},e.__update("language",e),e.__update("code",e);var _=document.createElement("div");_.className="blockCodeTools";var y=document.createElement("div");y.textContent="copy",y.className="blockCodeCopyBtn",y.addEventListener("click",function(){k(u)}),["red","yellow","green"].forEach(function(e){var t=document.createElement("span");t.className="code-"+e,_.appendChild(t)}),_.appendChild(y),n.appendChild(_),n.appendChild(c);break}case K.inlineCode:{n=document.createElement("code"),n.className="inlineCode";break}case K.head:{n=document.createElement("h".concat(e.level));break}case K.ul:{n=document.createElement(e.type),e.__update=function(e,t){n.style.cssText+=";list-style-type:".concat(t[e],";")},e.__update("listStyleType",e);break}case K.li_done:case K.li_todo:{o=document.createElement("li");var E=document.createElement("span");E.className="list-todo-tag",E.textContent=e.type===K.li_done?"\u2705":"\uD83D\uDEA7",o.appendChild(E),n=document.createElement("span"),o.appendChild(n),o.style.cssText+=";list-style: none;",s=function(e){return"add"===e?n:o};break}case K.h3:case K.h2:case K.h1:{n=document.createElement(e.type),e.__update=function(e,t){"id"===e&&(n.id=v(t).text.trim())},e.__update("id",e);break}default:n=document.createElement(e.type),e.indent&&(n.style.cssText+=";padding-left: 2em;"),e.type==K.table&&n.setAttribute("border","0");}return o=o||n,e.$getNode=s,e.tag&&n.setAttribute("tag",e.tag),e.children&&e.children.forEach(function(e){return w(e,n)}),r.beforeAppend&&r.beforeAppend(o)||t.appendChild(o),n}function B(e){function t(e){return r.measureText(e).width}var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"12px monospace",o=document.createElement("canvas"),r=o.getContext("2d");r.font=n;var s=e.match(/^\s*/)[0],d=" ",l="-",a=[t(d),t(l)],p=a[0],h=a[1],c=[];return e.split("\n").map(function(e){return e.trim().replace(/^\||\|$/,"").split("|").map(function(e){return e.trim()}).map(function(e,n){var o=Math.max;/^-+$/.test(e)&&(e="--");var r=t(e);return c[n]=o(c[n]||0,r),{i:e,width:r}})}).map(function(e){return s+e.map(function(e,t,n){var o=Math.round,r=e.i,s=e.width,i=c[t]-s,a=/^-+$/.test(r.trim())?[l,o(i/h),h]:[d,o(i/p),p],u=_slicedToArray(a,3),_=u[0],y=u[1],E=u[2];return n[t+1]&&(n[t+1].width-=i-E*y),r+_.repeat(y)}).join(" | ")}).join("\n")}function H(e){return e.split(/\n/g).map(function(e){return e.replace(/^\s+/,function(e){return" ".repeat(e.length-e.length%4)})}).join("\n")}function M(e,t){return e.children.map(function(e){switch(e.type){case K.text:return e.value;case K.table:{var n=e.tokens.map(function(e){return e.raw}).join("");return B(n,getComputedStyle(t).font)}case K.ul:return H(e.tokens.map(function(e){return e.raw}).join(""));case K.h1:case K.h2:case K.h3:case K.h4:case K.h5:case K.h6:return U(e);default:return e.tokens.map(function(e){return e.raw}).join("");}}).join("")}function U(e){if(/^h[1-9]$/.test(e.type))return"#"+" ".repeat(e.__headLen)+M(e).trimStart()+"\n"}function j(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=J[e];if(!t){var n=R(e);t=_objectSpread({root:n},v(n)),J[e]=t}return t}function W(e){return new Promise(function(t){if(V[e])return t();var n=function(){V[e]=!0,t()};if(e.endsWith(".js")){var o=document.createElement("script");o.onload=n,o.src=e,document.head.appendChild(o)}else if(e.endsWith(".css")){var r=document.createElement("link");r.onload=n,r.type="text/css",r.rel="stylesheet",r.charset="utf-8",r.href=e,document.head.appendChild(r)}})}function G(e,t){Promise.all(t.asset.map(W)).then(function(){window.hljs&&e&&(window.hljs.configure({tabReplace:4}),_toConsumableArray(e.querySelectorAll("code.highlight")).forEach(function(e){window.hljs.highlightBlock(e)}))})}function q(e){return _objectSpread({asset:[]},e)}var K={text:"text",url:"a",img:"img",video:"video",audio:"audio",inlineCode:"inlineCode",br:"br",hr:"hr",root:"root",blod:"b",italic:"i",linethrough:"lineThrough",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",queto:"queto",code:"code",table:"table",thead:"thead",tbody:"tbody",tr:"tr",th:"th",td:"td",ul:"ul",li:"li",li_done:"li-done",li_todo:"li-todo",comment:"comment",htmlRaw:"htmlRaw"},$={NO_ORDER_LIST:"no_order_list",ORDER_LIST:"order_list",SIMPLE_URL_START:"simple_url_start",SIMPLE_URL_END:"simple_url_end",URL_START:"url_start",URL_END:"url_end",URL_DESC_START:"url_desc_start",URL_DESC_END:"url_desc_end",HEAD_TITLE:"head_title",IMG_START:"img_start",TABLE_SPLIT:"table_split",CODE_BLOCK:"code_block",WHITE_SPACE:"white_space",LINE_END:"line_end",LINE_THROUGH:"linethrough",BLOB:"blob",STRING:"string",COMMENT_START:"comment_start",COMMENT_END:"comment_end"},z={isLineEnd:function(e){return!e||e.type===$.LINE_END},checkIsEnd:function(e,t){var n=[e[t],e[t+1]],o=n[0],r=n[1];return o?o.type===$.LINE_END?{match:[o]}:r?{}:{match:[o]}:{match:[]}},nextIsLineEnd:function(e,t){var n=e[t+1];return n&&n.type===$.LINE_END},isLineStart:function(e,t){var n=e[t-1];return!n||n.type===$.LINE_END},isType:function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return"string"==typeof e?n.includes(e):e&&n.includes(e.type)},goOn:{matchEnd:!1},isCanGoOn:function(e){return this.goOn===e},tokensToString:function(e){return e.map(function(e){return e.raw}).join("")},getQueueContent:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t={};return e.forEach(function(e){e.content&&(t[e.name]=e.content,t[e.name+"_raw"]=e)}),t},getIdentMatcher:function(){return{content:[],name:"ident",test:function(e){return e===$.WHITE_SPACE?z.goOn:{offset:0}}}}},Q=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];_classCallCheck(this,e),this.type=t,this.tokens=n,this.children=[],this.value=""}return _createClass(e,[{key:"push",value:function(e){return e.__parent=this,this.children.push(e),this}},{key:"addToken",value:function(e){e&&this.tokens.push(e),this.value=this.tokens.map(function(e){return e.raw}).join("")}},{key:"raw",get:function(){return this.children.map(function(e){return e.tokens.map(function(e){return e.raw}).join("")}).join("")||this.tokens.map(function(e){return e.raw}).join("")}}]),e}(),F=function e(t,n,o,r){_classCallCheck(this,e),this.type=t,this.start=o,this.end=r,this.raw=n},J={},V={},X=function(){function e(t,n,o){_classCallCheck(this,e),this.dom=t,this.config=n,this.prevRoot=null,o&&this.update(o)}return _createClass(e,[{key:"update",value:function(e){this.dom.classList.add("markdown");var t=j(e),n=o(this.prevRoot,t.root);this.prevRoot=t.root,D(n,this.dom);var r=q(this.config);G(this.dom,r)}}]),e}();return e.Markdown=X,e.codeHighlight=G,e.formater=function(e,t){var n=R(e);return M(n,t)},e.getParseResult=j,e.markdown=function(e,t,n){e.innerHTML="",e.classList.add("markdown");var o=j(t);w(o.root,e),n=q(n),G(e,n)},e.markdownInfo=function(e){var t=j(e),n=t.root,o=_objectWithoutProperties(t,["root"]);return o},e.parser=R,e.trans=w,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
{
"name": "lys-markdown-parser",
"version": "3.14.0",
"version": "3.14.1",
"description": "js markdown parser",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -72,6 +72,6 @@ /**

if (result) {
// 图片宽高占位
const [width, height] = result.slice(1, 3);
// 图片宽高占位
const { src } = node;
ele = document.createElement('div');
ele.className = 'markdown-img-wrap';
ele.style.cssText = `;position: relative; max-width: ${width}px; overflow: hidden; background: rgb(219, 221, 215);`;

@@ -81,8 +81,3 @@ ele.innerHTML = `<div style="padding-top: ${

}%;">
<img ${
// eslint-disable-next-line no-undef
LY.lazyLoad.caches.includes(src)
? `src="${src}" data-img-cache="true"`
: ''
}
<img
class="lazy-load-img img-loading"

@@ -89,0 +84,0 @@ data-lazy-img="${node.src}"

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc