@ckeditor/ckeditor5-markdown-gfm 45.2.1-alpha.0 → 45.2.1-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/markdown-gfm.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/build/markdown-gfm.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md.
|
4
|
-
*/(()=>{var e={237:e=>{"use strict";e.exports=CKEditor5.dll},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{GFMDataProcessor:()=>Ce,Markdown:()=>Oe,MarkdownToHtml:()=>q,PasteFromMarkdownExperimental:()=>Le});var e=n(782),t=n(783);function i(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let s={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const l=/[&<>"']/,o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,u={"&":"&","<":"<",">":">",'"':""","'":"'"},h=e=>u[e];function p(e,t){if(t){if(l.test(e))return e.replace(o,h)}else if(a.test(e))return e.replace(c,h);return e}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function f(e){return e.replace(g,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const d=/(^|[^\[])\^/g;function m(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(d,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const k=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(e,t,n){if(e){let e;try{e=decodeURIComponent(f(n)).replace(k,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!x.test(n)&&(n=function(e,t){w[" "+e]||(y.test(e)?w[" "+e]=e+"/":w[" "+e]=R(e,"/",!0));e=w[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(A,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}const w={},y=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;const T={exec:function(){}};function S(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function v(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function R(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const s=e.charAt(r-i-1);if(s!==t||n){if(s===t||!n)break;i++}else i++}return e.substr(0,r-i)}function z(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function $(e,t){if(t<1)return"";let n="";for(;t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function E(e,t,n,r){const i=t.href,s=t.title?p(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:i,title:s,text:l,tokens:r.inlineTokens(l,[])};return r.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:s,text:p(l)}}class N{constructor(e){this.options=e||s}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:R(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=R(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const n={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,i,s,l,o,a,c,u,h,p,g,f=t[1].trim();const d=f.length>1,m={type:"list",raw:"",ordered:d,start:d?+f.slice(0,-1):"",loose:!1,items:[]};f=d?`\\d{1,9}\\${f.slice(-1)}`:`\\${f}`,this.options.pedantic&&(f=d?f:"[*+-]");const k=new RegExp(`^( {0,3}${f})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(g=!1,t=k.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(s=2,p=c.trimLeft()):(s=t[2].search(/[^ ]/),s=s>4?1:s,p=c.slice(s),s+=t[1].length),o=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),g=!0),!g){const t=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(h=e.split("\n",1)[0],c=h,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!t.test(c));){if(c.search(/[^ ]/)>=s||!c.trim())p+="\n"+c.slice(s);else{if(o)break;p+="\n"+c}o||c.trim()||(o=!0),n+=h+"\n",e=e.substring(h.length+1)}}m.loose||(a?m.loose=!0:/\n *\n *$/.test(n)&&(a=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(p),r&&(i="[ ] "!==r[0],p=p.replace(/^\[[ xX]\] +/,""))),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:p}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=p.trimRight(),m.raw=m.raw.trimRight();const x=m.items.length;for(l=0;l<x;l++){this.lexer.state.top=!1,m.items[l].tokens=this.lexer.blockTokens(m.items[l].text,[]);const e=m.items[l].tokens.filter((e=>"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let n=0;for(const e of t)if("\n"===e&&(n+=1),n>1)return!0;return!1}));!m.loose&&e.length&&t&&(m.loose=!0,m.items[l].loose=!0)}return m}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):p(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:v(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,i,s,l=e.align.length;for(n=0;n<l;n++)/^ *-+: *$/.test(e.align[n])?e.align[n]="right":/^ *:-+: *$/.test(e.align[n])?e.align[n]="center":/^ *:-+ *$/.test(e.align[n])?e.align[n]="left":e.align[n]=null;for(l=e.rows.length,n=0;n<l;n++)e.rows[n]=v(e.rows[n],e.header.length).map((e=>({text:e})));for(l=e.header.length,r=0;r<l;r++)e.header[r].tokens=[],this.lexer.inlineTokens(e.header[r].text,e.header[r].tokens);for(l=e.rows.length,r=0;r<l;r++)for(s=e.rows[r],i=0;i<s.length;i++)s[i].tokens=[],this.lexer.inlineTokens(s[i].text,s[i].tokens);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t){const e={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}text(e){const t=this.rules.block.text.exec(e);if(t){const e={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:p(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):p(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=R(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),E(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return E(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let i,s,l=n,o=0;const a="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=a.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(s=i.length,r[3]||r[4]){l+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){o+=s;continue}if(l-=s,l>0)continue;if(s=Math.min(s,s+l+o),Math.min(n,s)%2){const t=e.slice(1,n+r.index+s);return{type:"em",raw:e.slice(0,n+r.index+s+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,n+r.index+s-1);return{type:"strong",raw:e.slice(0,n+r.index+s+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=p(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=p(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=p(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=p(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=p(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):p(n[0]):n[0]:p(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const D={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:T,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};D.def=m(D.def).replace("label",D._label).replace("title",D._title).getRegex(),D.bullet=/(?:[*+-]|\d{1,9}[.)])/,D.listItemStart=m(/^( *)(bull) */).replace("bull",D.bullet).getRegex(),D.list=m(D.list).replace(/bull/g,D.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+D.def.source+")").getRegex(),D._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",D._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,D.html=m(D.html,"i").replace("comment",D._comment).replace("tag",D._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D.paragraph=m(D._paragraph).replace("hr",D.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D._tag).getRegex(),D.blockquote=m(D.blockquote).replace("paragraph",D.paragraph).getRegex(),D.normal=S({},D),D.gfm=S({},D.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),D.gfm.table=m(D.gfm.table).replace("hr",D.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D._tag).getRegex(),D.gfm.paragraph=m(D._paragraph).replace("hr",D.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",D.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D._tag).getRegex(),D.pedantic=S({},D.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",D._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:T,paragraph:m(D.normal._paragraph).replace("hr",D.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",D.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const C={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:T,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:T,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function O(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function I(e){let t,n,r="";const i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}C._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",C.punctuation=m(C.punctuation).replace(/punctuation/g,C._punctuation).getRegex(),C.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,C.escapedEmSt=/\\\*|\\_/g,C._comment=m(D._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),C.emStrong.lDelim=m(C.emStrong.lDelim).replace(/punct/g,C._punctuation).getRegex(),C.emStrong.rDelimAst=m(C.emStrong.rDelimAst,"g").replace(/punct/g,C._punctuation).getRegex(),C.emStrong.rDelimUnd=m(C.emStrong.rDelimUnd,"g").replace(/punct/g,C._punctuation).getRegex(),C._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,C._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,C._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,C.autolink=m(C.autolink).replace("scheme",C._scheme).replace("email",C._email).getRegex(),C._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,C.tag=m(C.tag).replace("comment",C._comment).replace("attribute",C._attribute).getRegex(),C._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,C._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,C._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,C.link=m(C.link).replace("label",C._label).replace("href",C._href).replace("title",C._title).getRegex(),C.reflink=m(C.reflink).replace("label",C._label).replace("ref",D._label).getRegex(),C.nolink=m(C.nolink).replace("ref",D._label).getRegex(),C.reflinkSearch=m(C.reflinkSearch,"g").replace("reflink",C.reflink).replace("nolink",C.nolink).getRegex(),C.normal=S({},C),C.pedantic=S({},C.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",C._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",C._label).getRegex()}),C.gfm=S({},C.normal,{escape:m(C.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),C.gfm.url=m(C.gfm.url,"i").replace("email",C.gfm._extended_email).getRegex(),C.breaks=S({},C.gfm,{br:m(C.br).replace("{2,}","*").getRegex(),text:m(C.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class P{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||s,this.options.tokenizer=this.options.tokenizer||new N,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:D.normal,inline:C.normal};this.options.pedantic?(t.block=D.pedantic,t.inline=C.pedantic):this.options.gfm&&(t.block=D.gfm,this.options.breaks?t.inline=C.breaks:t.inline=C.gfm),this.tokenizer.rules=t}static get rules(){return{block:D,inline:C}}static lex(e,t){return new P(t).lex(e)}static lexInline(e,t){return new P(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,i,s;for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let n,r,i,s,l,o,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+$("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,s.index)+"["+$("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.escapedEmSt.exec(a));)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(l||(o=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,o))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,I))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,I))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,O))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),l=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class L{constructor(e){this.options=e||s}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+p(r,!0)+'">'+(n?e:p(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:p(e,!0))+"</code></pre>\n"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(null===(e=b(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+p(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=b(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}}class B{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class M{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class F{constructor(e){this.options=e||s,this.options.renderer=this.options.renderer||new L,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new B,this.slugger=new M}static parse(e,t){return new F(t).parse(e)}static parseInline(e,t){return new F(t).parseInline(e)}parse(e,t=!0){let n,r,i,s,l,o,a,c,u,h,p,g,d,m,k,x,b,w,y,_="";const A=e.length;for(n=0;n<A;n++)if(h=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(y=this.options.extensions.renderers[h.type].call({parser:this},h),!1!==y||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type)))_+=y||"";else switch(h.type){case"space":continue;case"hr":_+=this.renderer.hr();continue;case"heading":_+=this.renderer.heading(this.parseInline(h.tokens),h.depth,f(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue;case"code":_+=this.renderer.code(h.text,h.lang,h.escaped);continue;case"table":for(c="",a="",s=h.header.length,r=0;r<s;r++)a+=this.renderer.tablecell(this.parseInline(h.header[r].tokens),{header:!0,align:h.align[r]});for(c+=this.renderer.tablerow(a),u="",s=h.rows.length,r=0;r<s;r++){for(o=h.rows[r],a="",l=o.length,i=0;i<l;i++)a+=this.renderer.tablecell(this.parseInline(o[i].tokens),{header:!1,align:h.align[i]});u+=this.renderer.tablerow(a)}_+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(h.tokens),_+=this.renderer.blockquote(u);continue;case"list":for(p=h.ordered,g=h.start,d=h.loose,s=h.items.length,u="",r=0;r<s;r++)k=h.items[r],x=k.checked,b=k.task,m="",k.task&&(w=this.renderer.checkbox(x),d?k.tokens.length>0&&"paragraph"===k.tokens[0].type?(k.tokens[0].text=w+" "+k.tokens[0].text,k.tokens[0].tokens&&k.tokens[0].tokens.length>0&&"text"===k.tokens[0].tokens[0].type&&(k.tokens[0].tokens[0].text=w+" "+k.tokens[0].tokens[0].text)):k.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(k.tokens,d),u+=this.renderer.listitem(m,b,x);_+=this.renderer.list(u,p,g);continue;case"html":_+=this.renderer.html(h.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1<A&&"text"===e[n+1].type;)h=e[++n],u+="\n"+(h.tokens?this.parseInline(h.tokens):h.text);_+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return _}parseInline(e,t){t=t||this.renderer;let n,r,i,s="";const l=e.length;for(n=0;n<l;n++)if(r=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]&&(i=this.options.extensions.renderers[r.type].call({parser:this},r),!1!==i||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)))s+=i||"";else switch(r.type){case"escape":case"text":s+=t.text(r.text);break;case"html":s+=t.html(r.text);break;case"link":s+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":s+=t.image(r.href,r.title,r.text);break;case"strong":s+=t.strong(this.parseInline(r.tokens,t));break;case"em":s+=t.em(this.parseInline(r.tokens,t));break;case"codespan":s+=t.codespan(r.text);break;case"br":s+=t.br();break;case"del":s+=t.del(this.parseInline(r.tokens,t));break;default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return s}}function H(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),z(t=S({},H.defaults,t||{})),n){const r=t.highlight;let i;try{i=P.lex(e,t)}catch(e){return n(e)}const s=function(e){let s;if(!e)try{t.walkTokens&&H.walkTokens(i,t.walkTokens),s=F.parse(i,t)}catch(t){e=t}return t.highlight=r,e?n(e):n(null,s)};if(!r||r.length<3)return s();if(delete t.highlight,!i.length)return s();let l=0;return H.walkTokens(i,(function(e){"code"===e.type&&(l++,setTimeout((()=>{r(e.text,e.lang,(function(t,n){if(t)return s(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),l--,0===l&&s()}))}),0))})),void(0===l&&s())}try{const n=P.lex(e,t);return t.walkTokens&&H.walkTokens(n,t.walkTokens),F.parse(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}}H.options=H.setOptions=function(e){var t;return S(H.defaults,e),t=H.defaults,s=t,H},H.getDefaults=i,H.defaults=s,H.use=function(...e){const t=S({},...e),n=H.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach((e=>{if(e.extensions&&(r=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let r=e.renderer.apply(this,n);return!1===r&&(r=t.apply(this,n)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)}))),e.renderer){const n=H.defaults.renderer||new L;for(const t in e.renderer){const r=n[t];n[t]=(...i)=>{let s=e.renderer[t].apply(n,i);return!1===s&&(s=r.apply(n,i)),s}}t.renderer=n}if(e.tokenizer){const n=H.defaults.tokenizer||new N;for(const t in e.tokenizer){const r=n[t];n[t]=(...i)=>{let s=e.tokenizer[t].apply(n,i);return!1===s&&(s=r.apply(n,i)),s}}t.tokenizer=n}if(e.walkTokens){const n=H.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),n&&n.call(this,t)}}r&&(t.extensions=n),H.setOptions(t)}))},H.walkTokens=function(e,t){for(const n of e)switch(t.call(H,n),n.type){case"table":for(const e of n.header)H.walkTokens(e.tokens,t);for(const e of n.rows)for(const n of e)H.walkTokens(n.tokens,t);break;case"list":H.walkTokens(n.items,t);break;default:H.defaults.extensions&&H.defaults.extensions.childTokens&&H.defaults.extensions.childTokens[n.type]?H.defaults.extensions.childTokens[n.type].forEach((function(e){H.walkTokens(n[e],t)})):n.tokens&&H.walkTokens(n.tokens,t)}},H.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");z(t=S({},H.defaults,t||{}));try{const n=P.lexInline(e,t);return t.walkTokens&&H.walkTokens(n,t.walkTokens),F.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}},H.Parser=F,H.parser=F.parse,H.Renderer=L,H.TextRenderer=B,H.Lexer=P,H.lexer=P.lex,H.Tokenizer=N,H.Slugger=M,H.parse=H;H.options,H.setOptions,H.use,H.walkTokens,H.parseInline,F.parse,P.lex;class q{_parser;_options={gfm:!0,breaks:!0,tables:!0,xhtml:!0,headerIds:!1};constructor(){H.use({tokenizer:{autolink:()=>null,url:()=>null},renderer:{checkbox(...e){return Object.getPrototypeOf(this).checkbox.call(this,...e).trimRight()},code(...e){return Object.getPrototypeOf(this).code.call(this,...e).replace("\n</code>","</code>")}}}),this._parser=H}parse(e){return this._parser.parse(e,this._options)}}function j(e,t){return Array(t+1).join(e)}var U=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Z(e){return G(e,U)}var V=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function Q(e){return G(e,V)}var W=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function G(e,t){return t.indexOf(e.nodeName)>=0}function K(e,t){return e.getElementsByTagName&&t.some((function(t){return e.getElementsByTagName(t).length}))}var X={};function Y(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function J(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function ee(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(te(i,t,n))return i}}function te(e,t,n){var r=e.filter;if("string"==typeof r){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof r)throw new TypeError("`filter` needs to be a string, array, or function");if(r.call(e,t,n))return!0}}function ne(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function re(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}X.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},X.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+"\n"}},X.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));return"setext"===n.headingStyle&&r<3?"\n\n"+e+"\n"+j(1===r?"=":"-",e.length)+"\n\n":"\n\n"+j("#",r)+" "+e+"\n\n"}},X.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},X.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return"LI"===n.nodeName&&n.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},X.listItem={filter:"li",replacement:function(e,t,n){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var r=n.bulletListMarker+" ",i=t.parentNode;if("OL"===i.nodeName){var s=i.getAttribute("start"),l=Array.prototype.indexOf.call(i.children,t);r=(s?Number(s)+l:l+1)+". "}return r+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},X.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},X.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){for(var r,i=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],s=t.firstChild.textContent,l=n.fence.charAt(0),o=3,a=new RegExp("^"+l+"{3,}","gm");r=a.exec(s);)r[0].length>=o&&(o=r[0].length+1);var c=j(l,o);return"\n\n"+c+i+"\n"+s.replace(/\n$/,"")+"\n"+c+"\n\n"}},X.horizontalRule={filter:"hr",replacement:function(e,t,n){return"\n\n"+n.hr+"\n\n"}},X.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var n=t.getAttribute("href");n&&(n=n.replace(/([()])/g,"\\$1"));var r=Y(t.getAttribute("title"));return r&&(r=' "'+r.replace(/"/g,'\\"')+'"'),"["+e+"]("+n+r+")"}},X.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,n){var r,i,s=t.getAttribute("href"),l=Y(t.getAttribute("title"));switch(l&&(l=' "'+l+'"'),n.linkReferenceStyle){case"collapsed":r="["+e+"][]",i="["+e+"]: "+s+l;break;case"shortcut":r="["+e+"]",i="["+e+"]: "+s+l;break;default:var o=this.references.length+1;r="["+e+"]["+o+"]",i="["+o+"]: "+s+l}return this.references.push(i),r},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},X.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}},X.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}},X.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",n="`",r=e.match(/`+/gm)||[];-1!==r.indexOf(n);)n+="`";return n+t+e+t+n}},X.image={filter:"img",replacement:function(e,t){var n=Y(t.getAttribute("alt")),r=t.getAttribute("src")||"",i=Y(t.getAttribute("title"));return r?"+")":""}},J.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=ee(this.array,e,this.options))||(t=ee(this._keep,e,this.options))||(t=ee(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var ie="undefined"!=typeof window?window:{};var se,le=function(){var e=ie.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?ie.DOMParser:function(){var e=function(){};return!function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){ie.ActiveXObject&&(e=!0)}return e}()?e.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t}:e.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t},e}();function oe(e,t){var n;"string"==typeof e?n=(se=se||new le).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):n=e.cloneNode(!0);return function(e){var t=e.element,n=e.isBlock,r=e.isVoid,i=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!i(t)){for(var s=null,l=!1,o=null,a=re(o,t,i);a!==t;){if(3===a.nodeType||4===a.nodeType){var c=a.data.replace(/[ \r\n\t]+/g," ");if(s&&!/ $/.test(s.data)||l||" "!==c[0]||(c=c.substr(1)),!c){a=ne(a);continue}a.data=c,s=a}else{if(1!==a.nodeType){a=ne(a);continue}n(a)||"BR"===a.nodeName?(s&&(s.data=s.data.replace(/ $/,"")),s=null,l=!1):r(a)||i(a)?(s=null,l=!0):s&&(l=!1)}var u=re(o,a,i);o=a,a=u}s&&(s.data=s.data.replace(/ $/,""),s.data||ne(s))}}({element:n,isBlock:Z,isVoid:Q,isPre:t.preformattedCode?ae:null}),n}function ae(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function ce(e,t){return e.isBlock=Z(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!Q(e)&&!function(e){return G(e,W)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return K(e,V)}(e)&&!function(e){return K(e,W)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var n=(r=e.textContent,i=r.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:i[1],leadingAscii:i[2],leadingNonAscii:i[3],trailing:i[4],trailingNonAscii:i[5],trailingAscii:i[6]});var r,i;n.leadingAscii&&ue("left",e,t)&&(n.leading=n.leadingNonAscii);n.trailingAscii&&ue("right",e,t)&&(n.trailing=n.trailingNonAscii);return{leading:n.leading,trailing:n.trailing}}(e,t),e}function ue(e,t,n){var r,i,s;return"left"===e?(r=t.previousSibling,i=/ $/):(r=t.nextSibling,i=/^ /),r&&(3===r.nodeType?s=i.test(r.nodeValue):n.preformattedCode&&"CODE"===r.nodeName?s=!1:1!==r.nodeType||Z(r)||(s=i.test(r.textContent))),s}var he=Array.prototype.reduce,pe=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function ge(e){if(!(this instanceof ge))return new ge(e);var t={rules:X,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},t,e),this.rules=new J(this.options)}function fe(e){var t=this;return he.call(e.childNodes,(function(e,n){var r="";return 3===(n=new ce(n,t.options)).nodeType?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(r=me.call(t,n)),ke(e,r)}),"")}function de(e){var t=this;return this.rules.forEach((function(n){"function"==typeof n.append&&(e=ke(e,n.append(t.options)))})),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function me(e){var t=this.rules.forNode(e),n=fe.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function ke(e,t){var n=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),r=t.replace(/^\n*/,""),i=Math.max(e.length-n.length,t.length-r.length);return n+"\n\n".substring(0,i)+r}ge.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=fe.call(this,new oe(e,this.options));return de.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return pe.reduce((function(e,t){return e.replace(t[0],t[1])}),e)}};const xe=ge;var be=/highlight-(?:text|source)-([a-z0-9]+)/;function we(e){e.addRule("highlightedCodeBlock",{filter:function(e){var t=e.firstChild;return"DIV"===e.nodeName&&be.test(e.className)&&t&&"PRE"===t.nodeName},replacement:function(e,t,n){var r=((t.className||"").match(be)||[null,""])[1];return"\n\n"+n.fence+r+"\n"+t.firstChild.textContent+"\n"+n.fence+"\n\n"}})}function ye(e){e.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~"+e+"~"}})}var _e=Array.prototype.indexOf,Ae=Array.prototype.every,Te={};function Se(e){var t,n,r=e.parentNode;return"THEAD"===r.nodeName||r.firstChild===e&&("TABLE"===r.nodeName||(n=(t=r).previousSibling,"TBODY"===t.nodeName&&(!n||"THEAD"===n.nodeName&&/^\s*$/i.test(n.textContent))))&&Ae.call(e.childNodes,(function(e){return"TH"===e.nodeName}))}function ve(e,t){var n=" ";return 0===_e.call(t.parentNode.childNodes,t)&&(n="| "),n+e+" |"}function Re(e){for(var t in e.keep((function(e){return"TABLE"===e.nodeName&&!Se(e.rows[0])})),Te)e.addRule(t,Te[t])}function ze(e){e.addRule("taskListItems",{filter:function(e){return"checkbox"===e.type&&"LI"===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?"[x]":"[ ]")+" "}})}function $e(e){e.use([we,ye,Re,ze])}Te.tableCell={filter:["th","td"],replacement:function(e,t){return ve(e,t)}},Te.tableRow={filter:"tr",replacement:function(e,t){var n="",r={left:":--",right:"--:",center:":-:"};if(Se(t))for(var i=0;i<t.childNodes.length;i++){var s="---",l=(t.childNodes[i].getAttribute("align")||"").toLowerCase();l&&(s=r[l]||s),n+=ve(s,t.childNodes[i])}return"\n"+e+(n?"\n"+n:"")}},Te.table={filter:function(e){return"TABLE"===e.nodeName&&Se(e.rows[0])},replacement:function(e){return"\n\n"+(e=e.replace("\n\n","\n"))+"\n\n"}},Te.tableSection={filter:["thead","tbody","tfoot"],replacement:function(e){return e}};const Ee=new RegExp(/\b(?:(?:https?|ftp):\/\/|www\.)/.source+/(?![-_])(?:[-_a-z0-9\u00a1-\uffff]{1,63}\.)+(?:[a-z\u00a1-\uffff]{2,63})/.source+/(?:[^\s<>]*)/.source,"gi");class Ne extends xe{escape(e){const t=super.escape;function n(e){return e=(e=t(e)).replace(/</g,"\\<")}let r="",i=0;for(const t of this._matchAutolink(e)){const s=t.index;s>i&&(r+=n(e.substring(i,s)));const l=t[0];r+=l,i=s+l.length}return i<e.length&&(r+=n(e.substring(i,e.length))),r}*_matchAutolink(e){for(const t of e.matchAll(Ee)){const e=t[0],n=this._autolinkFindEnd(e);yield Object.assign([e.substring(0,n)],{index:t.index})}}_autolinkFindEnd(e){let t=e.length;for(;t>0;){const n=e[t-1];if("?!.,:*_~'\"".includes(n))t--;else{if(")"!=n)break;{let n=0;for(let r=0;r<t;r++)"("==e[r]?n++:")"==e[r]&&n--;if(!(n<0))break;t--}}}return t}}class De{_parser;constructor(){this._parser=this._createParser()}parse(e){return this._parser.turndown(e)}keep(e){this._parser.keep(e)}_createParser(){const e=new Ne({codeBlockStyle:"fenced",hr:"---",headingStyle:"atx"});return e.use([$e,this._todoList]),e}_todoList(e){e.addRule("taskListItems",{filter:e=>"checkbox"===e.type&&("LI"===e.parentNode.nodeName||"LI"===e.parentNode.parentNode.nodeName),replacement:(e,t)=>(t.checked?"[x]":"[ ]")+" "})}}class Ce{_htmlDP;_markdown2html;_html2markdown;constructor(e){this._htmlDP=new t.HtmlDataProcessor(e),this._markdown2html=new q,this._html2markdown=new De}keepHtml(e){this._html2markdown.keep([e])}toView(e){const t=this._markdown2html.parse(e);return this._htmlDP.toView(t)}toData(e){const t=this._htmlDP.toData(e);return this._html2markdown.parse(t)}registerRawContentMatcher(e){this._htmlDP.registerRawContentMatcher(e)}useFillerType(){}}class Oe extends e.Plugin{constructor(e){super(e),e.data.processor=new Ce(e.data.viewDocument)}static get pluginName(){return"Markdown"}static get isOfficialPlugin(){return!0}}var Ie=n(331);const Pe=["SPAN","BR","PRE","CODE"];class Le extends e.Plugin{_gfmDataProcessor;constructor(e){super(e),this._gfmDataProcessor=new Ce(e.data.viewDocument)}static get pluginName(){return"PasteFromMarkdownExperimental"}static get isOfficialPlugin(){return!0}static get requires(){return[Ie.ClipboardPipeline]}init(){const e=this.editor,t=e.editing.view.document,n=e.plugins.get("ClipboardPipeline");let r=!1;this.listenTo(t,"keydown",((e,t)=>{r=t.shiftKey})),this.listenTo(n,"inputTransformation",((e,t)=>{if(r)return;const n=t.dataTransfer.getData("text/html");if(!n){const e=t.dataTransfer.getData("text/plain");return void(t.content=this._gfmDataProcessor.toView(e))}const i=this._parseMarkdownFromHtml(n);i&&(t.content=this._gfmDataProcessor.toView(i))}))}_parseMarkdownFromHtml(e){const t=this._removeOsSpecificTags(e);if(!this._containsOnlyAllowedFirstLevelTags(t))return null;const n=this._removeFirstLevelWrapperTagsAndBrs(t);return this._containsAnyRemainingHtmlTags(n)?null:this._replaceHtmlReservedEntitiesWithCharacters(n)}_removeOsSpecificTags(e){return e.replace(/^<meta\b[^>]*>/,"").trim().replace(/^<html>/,"").replace(/<\/html>$/,"").trim().replace(/^<body>/,"").replace(/<\/body>$/,"").trim().replace(/^<!--StartFragment-->/,"").replace(/<!--EndFragment-->$/,"").trim()}_containsOnlyAllowedFirstLevelTags(e){const t=new DOMParser,{body:n}=t.parseFromString(e,"text/html");return Array.from(n.children).map((e=>e.tagName)).every((e=>Pe.includes(e)))}_removeFirstLevelWrapperTagsAndBrs(e){const t=new DOMParser,{body:n}=t.parseFromString(e,"text/html"),r=n.querySelectorAll("br");for(const e of r)e.replaceWith("\n");const i=n.querySelectorAll(":scope > *");for(const e of i){const t=e.cloneNode(!0);e.replaceWith(...t.childNodes)}return n.innerHTML}_containsAnyRemainingHtmlTags(e){return e.includes("<")}_replaceHtmlReservedEntitiesWithCharacters(e){return e.replace(/>/g,">").replace(/</g,"<").replace(/ /g," ")}}})(),(window.CKEditor5=window.CKEditor5||{}).markdownGfm=r})();
|
4
|
+
*/(()=>{var e={237:e=>{"use strict";e.exports=CKEditor5.dll},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{GFMDataProcessor:()=>Ce,Markdown:()=>Oe,MarkdownToHtml:()=>q,PasteFromMarkdownExperimental:()=>Le});var e=n(782),t=n(783);function i(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let s={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const l=/[&<>"']/,o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,u={"&":"&","<":"<",">":">",'"':""","'":"'"},h=e=>u[e];function p(e,t){if(t){if(l.test(e))return e.replace(o,h)}else if(a.test(e))return e.replace(c,h);return e}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function f(e){return e.replace(g,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const d=/(^|[^\[])\^/g;function m(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(d,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const k=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(e,t,n){if(e){let e;try{e=decodeURIComponent(f(n)).replace(k,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!x.test(n)&&(n=function(e,t){w[" "+e]||(y.test(e)?w[" "+e]=e+"/":w[" "+e]=R(e,"/",!0));e=w[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(A,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}const w={},y=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;const T={exec:function(){}};function S(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function v(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function R(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const s=e.charAt(r-i-1);if(s!==t||n){if(s===t||!n)break;i++}else i++}return e.substr(0,r-i)}function z(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function $(e,t){if(t<1)return"";let n="";for(;t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function E(e,t,n,r){const i=t.href,s=t.title?p(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:i,title:s,text:l,tokens:r.inlineTokens(l,[])};return r.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:s,text:p(l)}}class N{constructor(e){this.options=e||s}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:R(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=R(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const n={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,i,s,l,o,a,c,u,h,p,g,f=t[1].trim();const d=f.length>1,m={type:"list",raw:"",ordered:d,start:d?+f.slice(0,-1):"",loose:!1,items:[]};f=d?`\\d{1,9}\\${f.slice(-1)}`:`\\${f}`,this.options.pedantic&&(f=d?f:"[*+-]");const k=new RegExp(`^( {0,3}${f})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(g=!1,t=k.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(s=2,p=c.trimLeft()):(s=t[2].search(/[^ ]/),s=s>4?1:s,p=c.slice(s),s+=t[1].length),o=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),g=!0),!g){const t=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(h=e.split("\n",1)[0],c=h,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!t.test(c));){if(c.search(/[^ ]/)>=s||!c.trim())p+="\n"+c.slice(s);else{if(o)break;p+="\n"+c}o||c.trim()||(o=!0),n+=h+"\n",e=e.substring(h.length+1)}}m.loose||(a?m.loose=!0:/\n *\n *$/.test(n)&&(a=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(p),r&&(i="[ ] "!==r[0],p=p.replace(/^\[[ xX]\] +/,""))),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:p}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=p.trimRight(),m.raw=m.raw.trimRight();const x=m.items.length;for(l=0;l<x;l++){this.lexer.state.top=!1,m.items[l].tokens=this.lexer.blockTokens(m.items[l].text,[]);const e=m.items[l].tokens.filter(e=>"space"===e.type),t=e.every(e=>{const t=e.raw.split("");let n=0;for(const e of t)if("\n"===e&&(n+=1),n>1)return!0;return!1});!m.loose&&e.length&&t&&(m.loose=!0,m.items[l].loose=!0)}return m}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):p(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:v(t[1]).map(e=>({text:e})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,i,s,l=e.align.length;for(n=0;n<l;n++)/^ *-+: *$/.test(e.align[n])?e.align[n]="right":/^ *:-+: *$/.test(e.align[n])?e.align[n]="center":/^ *:-+ *$/.test(e.align[n])?e.align[n]="left":e.align[n]=null;for(l=e.rows.length,n=0;n<l;n++)e.rows[n]=v(e.rows[n],e.header.length).map(e=>({text:e}));for(l=e.header.length,r=0;r<l;r++)e.header[r].tokens=[],this.lexer.inlineTokens(e.header[r].text,e.header[r].tokens);for(l=e.rows.length,r=0;r<l;r++)for(s=e.rows[r],i=0;i<s.length;i++)s[i].tokens=[],this.lexer.inlineTokens(s[i].text,s[i].tokens);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t){const e={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}text(e){const t=this.rules.block.text.exec(e);if(t){const e={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:p(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):p(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=R(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),E(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return E(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let i,s,l=n,o=0;const a="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=a.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(s=i.length,r[3]||r[4]){l+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){o+=s;continue}if(l-=s,l>0)continue;if(s=Math.min(s,s+l+o),Math.min(n,s)%2){const t=e.slice(1,n+r.index+s);return{type:"em",raw:e.slice(0,n+r.index+s+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,n+r.index+s-1);return{type:"strong",raw:e.slice(0,n+r.index+s+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=p(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=p(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=p(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=p(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=p(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):p(n[0]):n[0]:p(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const D={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:T,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};D.def=m(D.def).replace("label",D._label).replace("title",D._title).getRegex(),D.bullet=/(?:[*+-]|\d{1,9}[.)])/,D.listItemStart=m(/^( *)(bull) */).replace("bull",D.bullet).getRegex(),D.list=m(D.list).replace(/bull/g,D.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+D.def.source+")").getRegex(),D._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",D._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,D.html=m(D.html,"i").replace("comment",D._comment).replace("tag",D._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D.paragraph=m(D._paragraph).replace("hr",D.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D._tag).getRegex(),D.blockquote=m(D.blockquote).replace("paragraph",D.paragraph).getRegex(),D.normal=S({},D),D.gfm=S({},D.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),D.gfm.table=m(D.gfm.table).replace("hr",D.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D._tag).getRegex(),D.gfm.paragraph=m(D._paragraph).replace("hr",D.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",D.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D._tag).getRegex(),D.pedantic=S({},D.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",D._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:T,paragraph:m(D.normal._paragraph).replace("hr",D.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",D.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const C={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:T,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:T,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function O(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function I(e){let t,n,r="";const i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}C._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",C.punctuation=m(C.punctuation).replace(/punctuation/g,C._punctuation).getRegex(),C.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,C.escapedEmSt=/\\\*|\\_/g,C._comment=m(D._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),C.emStrong.lDelim=m(C.emStrong.lDelim).replace(/punct/g,C._punctuation).getRegex(),C.emStrong.rDelimAst=m(C.emStrong.rDelimAst,"g").replace(/punct/g,C._punctuation).getRegex(),C.emStrong.rDelimUnd=m(C.emStrong.rDelimUnd,"g").replace(/punct/g,C._punctuation).getRegex(),C._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,C._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,C._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,C.autolink=m(C.autolink).replace("scheme",C._scheme).replace("email",C._email).getRegex(),C._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,C.tag=m(C.tag).replace("comment",C._comment).replace("attribute",C._attribute).getRegex(),C._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,C._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,C._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,C.link=m(C.link).replace("label",C._label).replace("href",C._href).replace("title",C._title).getRegex(),C.reflink=m(C.reflink).replace("label",C._label).replace("ref",D._label).getRegex(),C.nolink=m(C.nolink).replace("ref",D._label).getRegex(),C.reflinkSearch=m(C.reflinkSearch,"g").replace("reflink",C.reflink).replace("nolink",C.nolink).getRegex(),C.normal=S({},C),C.pedantic=S({},C.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",C._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",C._label).getRegex()}),C.gfm=S({},C.normal,{escape:m(C.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),C.gfm.url=m(C.gfm.url,"i").replace("email",C.gfm._extended_email).getRegex(),C.breaks=S({},C.gfm,{br:m(C.br).replace("{2,}","*").getRegex(),text:m(C.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class P{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||s,this.options.tokenizer=this.options.tokenizer||new N,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:D.normal,inline:C.normal};this.options.pedantic?(t.block=D.pedantic,t.inline=C.pedantic):this.options.gfm&&(t.block=D.gfm,this.options.breaks?t.inline=C.breaks:t.inline=C.gfm),this.tokenizer.rules=t}static get rules(){return{block:D,inline:C}}static lex(e,t){return new P(t).lex(e)}static lexInline(e,t){return new P(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,i,s;for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach(function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let n,r,i,s,l,o,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+$("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,s.index)+"["+$("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.escapedEmSt.exec(a));)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(l||(o=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,o))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,I))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,I))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach(function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,O))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),l=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class L{constructor(e){this.options=e||s}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+p(r,!0)+'">'+(n?e:p(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:p(e,!0))+"</code></pre>\n"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(null===(e=b(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+p(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=b(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}}class B{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class M{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class F{constructor(e){this.options=e||s,this.options.renderer=this.options.renderer||new L,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new B,this.slugger=new M}static parse(e,t){return new F(t).parse(e)}static parseInline(e,t){return new F(t).parseInline(e)}parse(e,t=!0){let n,r,i,s,l,o,a,c,u,h,p,g,d,m,k,x,b,w,y,_="";const A=e.length;for(n=0;n<A;n++)if(h=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(y=this.options.extensions.renderers[h.type].call({parser:this},h),!1!==y||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type)))_+=y||"";else switch(h.type){case"space":continue;case"hr":_+=this.renderer.hr();continue;case"heading":_+=this.renderer.heading(this.parseInline(h.tokens),h.depth,f(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue;case"code":_+=this.renderer.code(h.text,h.lang,h.escaped);continue;case"table":for(c="",a="",s=h.header.length,r=0;r<s;r++)a+=this.renderer.tablecell(this.parseInline(h.header[r].tokens),{header:!0,align:h.align[r]});for(c+=this.renderer.tablerow(a),u="",s=h.rows.length,r=0;r<s;r++){for(o=h.rows[r],a="",l=o.length,i=0;i<l;i++)a+=this.renderer.tablecell(this.parseInline(o[i].tokens),{header:!1,align:h.align[i]});u+=this.renderer.tablerow(a)}_+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(h.tokens),_+=this.renderer.blockquote(u);continue;case"list":for(p=h.ordered,g=h.start,d=h.loose,s=h.items.length,u="",r=0;r<s;r++)k=h.items[r],x=k.checked,b=k.task,m="",k.task&&(w=this.renderer.checkbox(x),d?k.tokens.length>0&&"paragraph"===k.tokens[0].type?(k.tokens[0].text=w+" "+k.tokens[0].text,k.tokens[0].tokens&&k.tokens[0].tokens.length>0&&"text"===k.tokens[0].tokens[0].type&&(k.tokens[0].tokens[0].text=w+" "+k.tokens[0].tokens[0].text)):k.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(k.tokens,d),u+=this.renderer.listitem(m,b,x);_+=this.renderer.list(u,p,g);continue;case"html":_+=this.renderer.html(h.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1<A&&"text"===e[n+1].type;)h=e[++n],u+="\n"+(h.tokens?this.parseInline(h.tokens):h.text);_+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return _}parseInline(e,t){t=t||this.renderer;let n,r,i,s="";const l=e.length;for(n=0;n<l;n++)if(r=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]&&(i=this.options.extensions.renderers[r.type].call({parser:this},r),!1!==i||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)))s+=i||"";else switch(r.type){case"escape":case"text":s+=t.text(r.text);break;case"html":s+=t.html(r.text);break;case"link":s+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":s+=t.image(r.href,r.title,r.text);break;case"strong":s+=t.strong(this.parseInline(r.tokens,t));break;case"em":s+=t.em(this.parseInline(r.tokens,t));break;case"codespan":s+=t.codespan(r.text);break;case"br":s+=t.br();break;case"del":s+=t.del(this.parseInline(r.tokens,t));break;default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return s}}function H(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),z(t=S({},H.defaults,t||{})),n){const r=t.highlight;let i;try{i=P.lex(e,t)}catch(e){return n(e)}const s=function(e){let s;if(!e)try{t.walkTokens&&H.walkTokens(i,t.walkTokens),s=F.parse(i,t)}catch(t){e=t}return t.highlight=r,e?n(e):n(null,s)};if(!r||r.length<3)return s();if(delete t.highlight,!i.length)return s();let l=0;return H.walkTokens(i,function(e){"code"===e.type&&(l++,setTimeout(()=>{r(e.text,e.lang,function(t,n){if(t)return s(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),l--,0===l&&s()})},0))}),void(0===l&&s())}try{const n=P.lex(e,t);return t.walkTokens&&H.walkTokens(n,t.walkTokens),F.parse(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}}H.options=H.setOptions=function(e){var t;return S(H.defaults,e),t=H.defaults,s=t,H},H.getDefaults=i,H.defaults=s,H.use=function(...e){const t=S({},...e),n=H.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(e=>{if(e.extensions&&(r=!0,e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let r=e.renderer.apply(this,n);return!1===r&&(r=t.apply(this,n)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)})),e.renderer){const n=H.defaults.renderer||new L;for(const t in e.renderer){const r=n[t];n[t]=(...i)=>{let s=e.renderer[t].apply(n,i);return!1===s&&(s=r.apply(n,i)),s}}t.renderer=n}if(e.tokenizer){const n=H.defaults.tokenizer||new N;for(const t in e.tokenizer){const r=n[t];n[t]=(...i)=>{let s=e.tokenizer[t].apply(n,i);return!1===s&&(s=r.apply(n,i)),s}}t.tokenizer=n}if(e.walkTokens){const n=H.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),n&&n.call(this,t)}}r&&(t.extensions=n),H.setOptions(t)})},H.walkTokens=function(e,t){for(const n of e)switch(t.call(H,n),n.type){case"table":for(const e of n.header)H.walkTokens(e.tokens,t);for(const e of n.rows)for(const n of e)H.walkTokens(n.tokens,t);break;case"list":H.walkTokens(n.items,t);break;default:H.defaults.extensions&&H.defaults.extensions.childTokens&&H.defaults.extensions.childTokens[n.type]?H.defaults.extensions.childTokens[n.type].forEach(function(e){H.walkTokens(n[e],t)}):n.tokens&&H.walkTokens(n.tokens,t)}},H.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");z(t=S({},H.defaults,t||{}));try{const n=P.lexInline(e,t);return t.walkTokens&&H.walkTokens(n,t.walkTokens),F.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}},H.Parser=F,H.parser=F.parse,H.Renderer=L,H.TextRenderer=B,H.Lexer=P,H.lexer=P.lex,H.Tokenizer=N,H.Slugger=M,H.parse=H;H.options,H.setOptions,H.use,H.walkTokens,H.parseInline,F.parse,P.lex;class q{_parser;_options={gfm:!0,breaks:!0,tables:!0,xhtml:!0,headerIds:!1};constructor(){H.use({tokenizer:{autolink:()=>null,url:()=>null},renderer:{checkbox(...e){return Object.getPrototypeOf(this).checkbox.call(this,...e).trimRight()},code(...e){return Object.getPrototypeOf(this).code.call(this,...e).replace("\n</code>","</code>")}}}),this._parser=H}parse(e){return this._parser.parse(e,this._options)}}function j(e,t){return Array(t+1).join(e)}var U=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Z(e){return G(e,U)}var V=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function Q(e){return G(e,V)}var W=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function G(e,t){return t.indexOf(e.nodeName)>=0}function K(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var X={};function Y(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function J(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function ee(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(te(i,t,n))return i}}function te(e,t,n){var r=e.filter;if("string"==typeof r){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof r)throw new TypeError("`filter` needs to be a string, array, or function");if(r.call(e,t,n))return!0}}function ne(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function re(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}X.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},X.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+"\n"}},X.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));return"setext"===n.headingStyle&&r<3?"\n\n"+e+"\n"+j(1===r?"=":"-",e.length)+"\n\n":"\n\n"+j("#",r)+" "+e+"\n\n"}},X.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},X.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return"LI"===n.nodeName&&n.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},X.listItem={filter:"li",replacement:function(e,t,n){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var r=n.bulletListMarker+" ",i=t.parentNode;if("OL"===i.nodeName){var s=i.getAttribute("start"),l=Array.prototype.indexOf.call(i.children,t);r=(s?Number(s)+l:l+1)+". "}return r+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},X.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},X.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){for(var r,i=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],s=t.firstChild.textContent,l=n.fence.charAt(0),o=3,a=new RegExp("^"+l+"{3,}","gm");r=a.exec(s);)r[0].length>=o&&(o=r[0].length+1);var c=j(l,o);return"\n\n"+c+i+"\n"+s.replace(/\n$/,"")+"\n"+c+"\n\n"}},X.horizontalRule={filter:"hr",replacement:function(e,t,n){return"\n\n"+n.hr+"\n\n"}},X.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var n=t.getAttribute("href");n&&(n=n.replace(/([()])/g,"\\$1"));var r=Y(t.getAttribute("title"));return r&&(r=' "'+r.replace(/"/g,'\\"')+'"'),"["+e+"]("+n+r+")"}},X.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,n){var r,i,s=t.getAttribute("href"),l=Y(t.getAttribute("title"));switch(l&&(l=' "'+l+'"'),n.linkReferenceStyle){case"collapsed":r="["+e+"][]",i="["+e+"]: "+s+l;break;case"shortcut":r="["+e+"]",i="["+e+"]: "+s+l;break;default:var o=this.references.length+1;r="["+e+"]["+o+"]",i="["+o+"]: "+s+l}return this.references.push(i),r},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},X.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}},X.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}},X.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",n="`",r=e.match(/`+/gm)||[];-1!==r.indexOf(n);)n+="`";return n+t+e+t+n}},X.image={filter:"img",replacement:function(e,t){var n=Y(t.getAttribute("alt")),r=t.getAttribute("src")||"",i=Y(t.getAttribute("title"));return r?"+")":""}},J.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=ee(this.array,e,this.options))||(t=ee(this._keep,e,this.options))||(t=ee(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var ie="undefined"!=typeof window?window:{};var se,le=function(){var e=ie.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?ie.DOMParser:function(){var e=function(){};return!function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){ie.ActiveXObject&&(e=!0)}return e}()?e.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t}:e.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t},e}();function oe(e,t){var n;"string"==typeof e?n=(se=se||new le).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):n=e.cloneNode(!0);return function(e){var t=e.element,n=e.isBlock,r=e.isVoid,i=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!i(t)){for(var s=null,l=!1,o=null,a=re(o,t,i);a!==t;){if(3===a.nodeType||4===a.nodeType){var c=a.data.replace(/[ \r\n\t]+/g," ");if(s&&!/ $/.test(s.data)||l||" "!==c[0]||(c=c.substr(1)),!c){a=ne(a);continue}a.data=c,s=a}else{if(1!==a.nodeType){a=ne(a);continue}n(a)||"BR"===a.nodeName?(s&&(s.data=s.data.replace(/ $/,"")),s=null,l=!1):r(a)||i(a)?(s=null,l=!0):s&&(l=!1)}var u=re(o,a,i);o=a,a=u}s&&(s.data=s.data.replace(/ $/,""),s.data||ne(s))}}({element:n,isBlock:Z,isVoid:Q,isPre:t.preformattedCode?ae:null}),n}function ae(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function ce(e,t){return e.isBlock=Z(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!Q(e)&&!function(e){return G(e,W)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return K(e,V)}(e)&&!function(e){return K(e,W)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var n=(r=e.textContent,i=r.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:i[1],leadingAscii:i[2],leadingNonAscii:i[3],trailing:i[4],trailingNonAscii:i[5],trailingAscii:i[6]});var r,i;n.leadingAscii&&ue("left",e,t)&&(n.leading=n.leadingNonAscii);n.trailingAscii&&ue("right",e,t)&&(n.trailing=n.trailingNonAscii);return{leading:n.leading,trailing:n.trailing}}(e,t),e}function ue(e,t,n){var r,i,s;return"left"===e?(r=t.previousSibling,i=/ $/):(r=t.nextSibling,i=/^ /),r&&(3===r.nodeType?s=i.test(r.nodeValue):n.preformattedCode&&"CODE"===r.nodeName?s=!1:1!==r.nodeType||Z(r)||(s=i.test(r.textContent))),s}var he=Array.prototype.reduce,pe=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function ge(e){if(!(this instanceof ge))return new ge(e);var t={rules:X,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},t,e),this.rules=new J(this.options)}function fe(e){var t=this;return he.call(e.childNodes,function(e,n){var r="";return 3===(n=new ce(n,t.options)).nodeType?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(r=me.call(t,n)),ke(e,r)},"")}function de(e){var t=this;return this.rules.forEach(function(n){"function"==typeof n.append&&(e=ke(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function me(e){var t=this.rules.forNode(e),n=fe.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function ke(e,t){var n=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),r=t.replace(/^\n*/,""),i=Math.max(e.length-n.length,t.length-r.length);return n+"\n\n".substring(0,i)+r}ge.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=fe.call(this,new oe(e,this.options));return de.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return pe.reduce(function(e,t){return e.replace(t[0],t[1])},e)}};const xe=ge;var be=/highlight-(?:text|source)-([a-z0-9]+)/;function we(e){e.addRule("highlightedCodeBlock",{filter:function(e){var t=e.firstChild;return"DIV"===e.nodeName&&be.test(e.className)&&t&&"PRE"===t.nodeName},replacement:function(e,t,n){var r=((t.className||"").match(be)||[null,""])[1];return"\n\n"+n.fence+r+"\n"+t.firstChild.textContent+"\n"+n.fence+"\n\n"}})}function ye(e){e.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~"+e+"~"}})}var _e=Array.prototype.indexOf,Ae=Array.prototype.every,Te={};function Se(e){var t,n,r=e.parentNode;return"THEAD"===r.nodeName||r.firstChild===e&&("TABLE"===r.nodeName||(n=(t=r).previousSibling,"TBODY"===t.nodeName&&(!n||"THEAD"===n.nodeName&&/^\s*$/i.test(n.textContent))))&&Ae.call(e.childNodes,function(e){return"TH"===e.nodeName})}function ve(e,t){var n=" ";return 0===_e.call(t.parentNode.childNodes,t)&&(n="| "),n+e+" |"}function Re(e){for(var t in e.keep(function(e){return"TABLE"===e.nodeName&&!Se(e.rows[0])}),Te)e.addRule(t,Te[t])}function ze(e){e.addRule("taskListItems",{filter:function(e){return"checkbox"===e.type&&"LI"===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?"[x]":"[ ]")+" "}})}function $e(e){e.use([we,ye,Re,ze])}Te.tableCell={filter:["th","td"],replacement:function(e,t){return ve(e,t)}},Te.tableRow={filter:"tr",replacement:function(e,t){var n="",r={left:":--",right:"--:",center:":-:"};if(Se(t))for(var i=0;i<t.childNodes.length;i++){var s="---",l=(t.childNodes[i].getAttribute("align")||"").toLowerCase();l&&(s=r[l]||s),n+=ve(s,t.childNodes[i])}return"\n"+e+(n?"\n"+n:"")}},Te.table={filter:function(e){return"TABLE"===e.nodeName&&Se(e.rows[0])},replacement:function(e){return"\n\n"+(e=e.replace("\n\n","\n"))+"\n\n"}},Te.tableSection={filter:["thead","tbody","tfoot"],replacement:function(e){return e}};const Ee=new RegExp(/\b(?:(?:https?|ftp):\/\/|www\.)/.source+/(?![-_])(?:[-_a-z0-9\u00a1-\uffff]{1,63}\.)+(?:[a-z\u00a1-\uffff]{2,63})/.source+/(?:[^\s<>]*)/.source,"gi");class Ne extends xe{escape(e){const t=super.escape;function n(e){return e=(e=t(e)).replace(/</g,"\\<")}let r="",i=0;for(const t of this._matchAutolink(e)){const s=t.index;s>i&&(r+=n(e.substring(i,s)));const l=t[0];r+=l,i=s+l.length}return i<e.length&&(r+=n(e.substring(i,e.length))),r}*_matchAutolink(e){for(const t of e.matchAll(Ee)){const e=t[0],n=this._autolinkFindEnd(e);yield Object.assign([e.substring(0,n)],{index:t.index})}}_autolinkFindEnd(e){let t=e.length;for(;t>0;){const n=e[t-1];if("?!.,:*_~'\"".includes(n))t--;else{if(")"!=n)break;{let n=0;for(let r=0;r<t;r++)"("==e[r]?n++:")"==e[r]&&n--;if(!(n<0))break;t--}}}return t}}class De{_parser;constructor(){this._parser=this._createParser()}parse(e){return this._parser.turndown(e)}keep(e){this._parser.keep(e)}_createParser(){const e=new Ne({codeBlockStyle:"fenced",hr:"---",headingStyle:"atx"});return e.use([$e,this._todoList]),e}_todoList(e){e.addRule("taskListItems",{filter:e=>"checkbox"===e.type&&("LI"===e.parentNode.nodeName||"LI"===e.parentNode.parentNode.nodeName),replacement:(e,t)=>(t.checked?"[x]":"[ ]")+" "})}}class Ce{_htmlDP;_markdown2html;_html2markdown;constructor(e){this._htmlDP=new t.HtmlDataProcessor(e),this._markdown2html=new q,this._html2markdown=new De}keepHtml(e){this._html2markdown.keep([e])}toView(e){const t=this._markdown2html.parse(e);return this._htmlDP.toView(t)}toData(e){const t=this._htmlDP.toData(e);return this._html2markdown.parse(t)}registerRawContentMatcher(e){this._htmlDP.registerRawContentMatcher(e)}useFillerType(){}}class Oe extends e.Plugin{constructor(e){super(e),e.data.processor=new Ce(e.data.viewDocument)}static get pluginName(){return"Markdown"}static get isOfficialPlugin(){return!0}}var Ie=n(331);const Pe=["SPAN","BR","PRE","CODE"];class Le extends e.Plugin{_gfmDataProcessor;constructor(e){super(e),this._gfmDataProcessor=new Ce(e.data.viewDocument)}static get pluginName(){return"PasteFromMarkdownExperimental"}static get isOfficialPlugin(){return!0}static get requires(){return[Ie.ClipboardPipeline]}init(){const e=this.editor,t=e.editing.view.document,n=e.plugins.get("ClipboardPipeline");let r=!1;this.listenTo(t,"keydown",(e,t)=>{r=t.shiftKey}),this.listenTo(n,"inputTransformation",(e,t)=>{if(r)return;const n=t.dataTransfer.getData("text/html");if(!n){const e=t.dataTransfer.getData("text/plain");return void(t.content=this._gfmDataProcessor.toView(e))}const i=this._parseMarkdownFromHtml(n);i&&(t.content=this._gfmDataProcessor.toView(i))})}_parseMarkdownFromHtml(e){const t=this._removeOsSpecificTags(e);if(!this._containsOnlyAllowedFirstLevelTags(t))return null;const n=this._removeFirstLevelWrapperTagsAndBrs(t);return this._containsAnyRemainingHtmlTags(n)?null:this._replaceHtmlReservedEntitiesWithCharacters(n)}_removeOsSpecificTags(e){return e.replace(/^<meta\b[^>]*>/,"").trim().replace(/^<html>/,"").replace(/<\/html>$/,"").trim().replace(/^<body>/,"").replace(/<\/body>$/,"").trim().replace(/^<!--StartFragment-->/,"").replace(/<!--EndFragment-->$/,"").trim()}_containsOnlyAllowedFirstLevelTags(e){const t=new DOMParser,{body:n}=t.parseFromString(e,"text/html");return Array.from(n.children).map(e=>e.tagName).every(e=>Pe.includes(e))}_removeFirstLevelWrapperTagsAndBrs(e){const t=new DOMParser,{body:n}=t.parseFromString(e,"text/html"),r=n.querySelectorAll("br");for(const e of r)e.replaceWith("\n");const i=n.querySelectorAll(":scope > *");for(const e of i){const t=e.cloneNode(!0);e.replaceWith(...t.childNodes)}return n.innerHTML}_containsAnyRemainingHtmlTags(e){return e.includes("<")}_replaceHtmlReservedEntitiesWithCharacters(e){return e.replace(/>/g,">").replace(/</g,"<").replace(/ /g," ")}}})(),(window.CKEditor5=window.CKEditor5||{}).markdownGfm=r})();
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js","../src/markdown2html/markdown2html.ts","../src/html2markdown/html2markdown.ts","../src/gfmdataprocessor.ts","../src/markdown.ts","../src/pastefrommarkdownexperimental.ts"],"names":["MarkdownToHtml","_parser","_options","gfm","breaks","tables","xhtml","headerIds","marked","use","tokenizer","autolink","url","renderer","checkbox","args","Object","getPrototypeOf","call","trimRight","code","replace","parse","markdown","autolinkRegex","RegExp","source","UpdatedTurndown","Turndown","escape","string","originalEscape","escaped","lastLinkEnd","match","_matchAutolink","index","substring","matchedURL","length","matchAll","matched","_autolinkFindEnd","assign","char","includes","openBrackets","i","HtmlToMarkdown","_createParser","html","turndown","keep","elements","parser","codeBlockStyle","hr","headingStyle","_todoList","addRule","filter","node","type","parentNode","nodeName","replacement","content","checked","GFMDataProcessor","document","_htmlDP","HtmlDataProcessor","_markdown2html","_html2markdown","keepHtml","element","toView","data","toData","viewFragment","registerRawContentMatcher","pattern","useFillerType","Markdown","Plugin","editor","processor","viewDocument","pluginName","isOfficialPlugin","ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS","PasteFromMarkdownExperimental","_gfmDataProcessor","requires","ClipboardPipeline","view","editing","clipboardPipeline","plugins","get","shiftPressed","listenTo","evt","shiftKey","dataAsTextHtml","dataTransfer","getData","dataAsTextPlain","markdownFromHtml","_parseMarkdownFromHtml","htmlString","withoutOsSpecificTags","_removeOsSpecificTags","_containsOnlyAllowedFirstLevelTags","withoutWrapperTag","_removeFirstLevelWrapperTagsAndBrs","_containsAnyRemainingHtmlTags","_replaceHtmlReservedEntitiesWithCharacters","withoutMetaTag","trim","withoutHtmlTag","withoutBodyTag","DOMParser","body","tempElement","parseFromString","tagNames","Array","from","children","map","el","tagName","every","brElements","querySelectorAll","br","replaceWith","outerElements","elementClone","cloneNode","childNodes","innerHTML","str"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/D,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC5E,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;AAC/B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;AAC/B,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;AACzC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAA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,CAAA,CAClBA,OAAO,CAAE,CAAS,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAClBA,OAAO,CAAE,CAAA,CAAA,IAAA,CAAA,CAAA,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACvB,CAAA,CAAA,CAAA,CAAA;AACD;;ALyMA,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,CAAC,6BAA6B,CAAC,CAAC;AACpF,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { HtmlDataProcessor } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { marked } from 'marked';\nimport Turndown from 'turndown';\nimport { gfm } from 'turndown-plugin-gfm';\nimport { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard/dist/index.js';\n\n/**\n * This is a helper class used by the {@link module:markdown-gfm/markdown Markdown feature} to convert Markdown to HTML.\n */ class MarkdownToHtml {\n _parser;\n _options = {\n gfm: true,\n breaks: true,\n tables: true,\n xhtml: true,\n headerIds: false\n };\n constructor(){\n // Overrides.\n marked.use({\n tokenizer: {\n // Disable the autolink rule in the lexer.\n autolink: ()=>null,\n url: ()=>null\n },\n renderer: {\n checkbox (...args) {\n // Remove bogus space after <input type=\"checkbox\"> because it would be preserved\n // by DomConverter as it's next to an inline object.\n return Object.getPrototypeOf(this).checkbox.call(this, ...args).trimRight();\n },\n code (...args) {\n // Since marked v1.2.8, every <code> gets a trailing \"\\n\" whether it originally\n // ended with one or not (see https://github.com/markedjs/marked/issues/1884 to learn why).\n // This results in a redundant soft break in the model when loaded into the editor, which\n // is best prevented at this stage. See https://github.com/ckeditor/ckeditor5/issues/11124.\n return Object.getPrototypeOf(this).code.call(this, ...args).replace('\\n</code>', '</code>');\n }\n }\n });\n this._parser = marked;\n }\n parse(markdown) {\n return this._parser.parse(markdown, this._options);\n }\n}\n\nconst autolinkRegex = /* #__PURE__ */ new RegExp(// Prefix.\n/\\b(?:(?:https?|ftp):\\/\\/|www\\.)/.source + // Domain name.\n/(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})/.source + // The rest.\n/(?:[^\\s<>]*)/.source, 'gi');\nclass UpdatedTurndown extends Turndown {\n escape(string) {\n const originalEscape = super.escape;\n function escape(string) {\n string = originalEscape(string);\n // Escape \"<\".\n string = string.replace(/</g, '\\\\<');\n return string;\n }\n // Urls should not be escaped. Our strategy is using a regex to find them and escape everything\n // which is out of the matches parts.\n let escaped = '';\n let lastLinkEnd = 0;\n for (const match of this._matchAutolink(string)){\n const index = match.index;\n // Append the substring between the last match and the current one (if anything).\n if (index > lastLinkEnd) {\n escaped += escape(string.substring(lastLinkEnd, index));\n }\n const matchedURL = match[0];\n escaped += matchedURL;\n lastLinkEnd = index + matchedURL.length;\n }\n // Add text after the last link or at the string start if no matches.\n if (lastLinkEnd < string.length) {\n escaped += escape(string.substring(lastLinkEnd, string.length));\n }\n return escaped;\n }\n /**\n\t * Trimming end of link.\n\t * https://github.github.com/gfm/#autolinks-extension-\n\t */ *_matchAutolink(string) {\n for (const match of string.matchAll(autolinkRegex)){\n const matched = match[0];\n const length = this._autolinkFindEnd(matched);\n yield Object.assign([\n matched.substring(0, length)\n ], {\n index: match.index\n });\n // We could adjust regex.lastIndex but it's not needed because what we skipped is for sure not a valid URL.\n }\n }\n /**\n\t * Returns the new length of the link (after it would trim trailing characters).\n\t */ _autolinkFindEnd(string) {\n let length = string.length;\n while(length > 0){\n const char = string[length - 1];\n if ('?!.,:*_~\\'\"'.includes(char)) {\n length--;\n } else if (char == ')') {\n let openBrackets = 0;\n for(let i = 0; i < length; i++){\n if (string[i] == '(') {\n openBrackets++;\n } else if (string[i] == ')') {\n openBrackets--;\n }\n }\n // If there is fewer opening brackets then closing ones we should remove a closing bracket.\n if (openBrackets < 0) {\n length--;\n } else {\n break;\n }\n } else {\n break;\n }\n }\n return length;\n }\n}\n/**\n * This is a helper class used by the {@link module:markdown-gfm/markdown Markdown feature} to convert HTML to Markdown.\n */ class HtmlToMarkdown {\n _parser;\n constructor(){\n this._parser = this._createParser();\n }\n parse(html) {\n return this._parser.turndown(html);\n }\n keep(elements) {\n this._parser.keep(elements);\n }\n _createParser() {\n const parser = new UpdatedTurndown({\n codeBlockStyle: 'fenced',\n hr: '---',\n headingStyle: 'atx'\n });\n parser.use([\n gfm,\n this._todoList\n ]);\n return parser;\n }\n // This is a copy of the original taskListItems rule from turndown-plugin-gfm, with minor changes.\n _todoList(turndown) {\n turndown.addRule('taskListItems', {\n filter (node) {\n return node.type === 'checkbox' && // Changes here as CKEditor outputs a deeper structure.\n (node.parentNode.nodeName === 'LI' || node.parentNode.parentNode.nodeName === 'LI');\n },\n replacement (content, node) {\n return (node.checked ? '[x]' : '[ ]') + ' ';\n }\n });\n }\n}\n\n/**\n * This data processor implementation uses GitHub Flavored Markdown as input/output data.\n *\n * See the {@glink features/markdown Markdown output} guide to learn more on how to enable it.\n */ class GFMDataProcessor {\n /**\n\t * HTML data processor used to process HTML produced by the Markdown-to-HTML converter and the other way.\n\t */ _htmlDP;\n /**\n\t * Helper for converting Markdown to HTML.\n\t */ _markdown2html;\n /**\n\t * Helper for converting HTML to Markdown.\n\t */ _html2markdown;\n /**\n\t * Creates a new instance of the Markdown data processor class.\n\t */ constructor(document){\n this._htmlDP = new HtmlDataProcessor(document);\n this._markdown2html = new MarkdownToHtml();\n this._html2markdown = new HtmlToMarkdown();\n }\n /**\n\t * Keeps the specified element in the output as HTML. This is useful if the editor contains\n\t * features producing HTML that is not a part of the Markdown standard.\n\t *\n\t * By default, all HTML tags are removed.\n\t *\n\t * @param element The element name to be kept.\n\t */ keepHtml(element) {\n this._html2markdown.keep([\n element\n ]);\n }\n /**\n\t * Converts the provided Markdown string to a view tree.\n\t *\n\t * @param data A Markdown string.\n\t * @returns The converted view element.\n\t */ toView(data) {\n const html = this._markdown2html.parse(data);\n return this._htmlDP.toView(html);\n }\n /**\n\t * Converts the provided {@link module:engine/view/documentfragment~DocumentFragment} to data format – in this\n\t * case to a Markdown string.\n\t *\n\t * @returns Markdown string.\n\t */ toData(viewFragment) {\n const html = this._htmlDP.toData(viewFragment);\n return this._html2markdown.parse(html);\n }\n /**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from Markdown to view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern The pattern matching all view elements whose content should\n\t * be treated as raw data.\n\t */ registerRawContentMatcher(pattern) {\n this._htmlDP.registerRawContentMatcher(pattern);\n }\n /**\n\t * This method does not have any effect on the data processor result. It exists for compatibility with the\n\t * {@link module:engine/dataprocessor/dataprocessor~DataProcessor `DataProcessor` interface}.\n\t */ useFillerType() {}\n}\n\n/**\n * The GitHub Flavored Markdown (GFM) plugin.\n *\n * For a detailed overview, check the {@glink features/markdown Markdown feature} guide.\n */ class Markdown extends Plugin {\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n editor.data.processor = new GFMDataProcessor(editor.data.viewDocument);\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'Markdown';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n}\n\nconst ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS = [\n 'SPAN',\n 'BR',\n 'PRE',\n 'CODE'\n];\n/**\n * The GitHub Flavored Markdown (GFM) paste plugin.\n *\n * For a detailed overview, check the {@glink features/pasting/paste-markdown Paste Markdown feature} guide.\n */ class PasteFromMarkdownExperimental extends Plugin {\n /**\n\t * @internal\n\t */ _gfmDataProcessor;\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n this._gfmDataProcessor = new GFMDataProcessor(editor.data.viewDocument);\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'PasteFromMarkdownExperimental';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n ClipboardPipeline\n ];\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n const view = editor.editing.view;\n const viewDocument = view.document;\n const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n let shiftPressed = false;\n this.listenTo(viewDocument, 'keydown', (evt, data)=>{\n shiftPressed = data.shiftKey;\n });\n this.listenTo(clipboardPipeline, 'inputTransformation', (evt, data)=>{\n if (shiftPressed) {\n return;\n }\n const dataAsTextHtml = data.dataTransfer.getData('text/html');\n if (!dataAsTextHtml) {\n const dataAsTextPlain = data.dataTransfer.getData('text/plain');\n data.content = this._gfmDataProcessor.toView(dataAsTextPlain);\n return;\n }\n const markdownFromHtml = this._parseMarkdownFromHtml(dataAsTextHtml);\n if (markdownFromHtml) {\n data.content = this._gfmDataProcessor.toView(markdownFromHtml);\n }\n });\n }\n /**\n\t * Determines if the code copied from a website in the `text/html` type can be parsed as Markdown.\n\t * It removes any OS-specific HTML tags, for example, <meta> on macOS and <!--StartFragment--> on Windows.\n\t * Then removes a single wrapper HTML tag or wrappers for sibling tags, and if there are no more tags left,\n\t * returns the remaining text. Returns null if there are any remaining HTML tags detected.\n\t *\n\t * @param htmlString Clipboard content in the `text/html` type format.\n\t */ _parseMarkdownFromHtml(htmlString) {\n const withoutOsSpecificTags = this._removeOsSpecificTags(htmlString);\n if (!this._containsOnlyAllowedFirstLevelTags(withoutOsSpecificTags)) {\n return null;\n }\n const withoutWrapperTag = this._removeFirstLevelWrapperTagsAndBrs(withoutOsSpecificTags);\n if (this._containsAnyRemainingHtmlTags(withoutWrapperTag)) {\n return null;\n }\n return this._replaceHtmlReservedEntitiesWithCharacters(withoutWrapperTag);\n }\n /**\n\t * Removes OS-specific tags.\n\t *\n\t * @param htmlString Clipboard content in the `text/html` type format.\n\t */ _removeOsSpecificTags(htmlString) {\n // Removing the <meta> tag present on Mac.\n const withoutMetaTag = htmlString.replace(/^<meta\\b[^>]*>/, '').trim();\n // Removing the <html> tag present on Windows.\n const withoutHtmlTag = withoutMetaTag.replace(/^<html>/, '').replace(/<\\/html>$/, '').trim();\n // Removing the <body> tag present on Windows.\n const withoutBodyTag = withoutHtmlTag.replace(/^<body>/, '').replace(/<\\/body>$/, '').trim();\n // Removing the <!--StartFragment--> tag present on Windows.\n return withoutBodyTag.replace(/^<!--StartFragment-->/, '').replace(/<!--EndFragment-->$/, '').trim();\n }\n /**\n\t * If the input HTML string contains any first-level formatting tags\n\t * like <b>, <strong>, or <i>, we should not treat it as Markdown.\n\t *\n\t * @param htmlString Clipboard content.\n\t */ _containsOnlyAllowedFirstLevelTags(htmlString) {\n const parser = new DOMParser();\n const { body: tempElement } = parser.parseFromString(htmlString, 'text/html');\n const tagNames = Array.from(tempElement.children).map((el)=>el.tagName);\n return tagNames.every((el)=>ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS.includes(el));\n }\n /**\n\t * Removes multiple HTML wrapper tags from a list of sibling HTML tags.\n\t *\n\t * @param htmlString Clipboard content without any OS-specific tags.\n\t */ _removeFirstLevelWrapperTagsAndBrs(htmlString) {\n const parser = new DOMParser();\n const { body: tempElement } = parser.parseFromString(htmlString, 'text/html');\n const brElements = tempElement.querySelectorAll('br');\n for (const br of brElements){\n br.replaceWith('\\n');\n }\n const outerElements = tempElement.querySelectorAll(':scope > *');\n for (const element of outerElements){\n const elementClone = element.cloneNode(true);\n element.replaceWith(...elementClone.childNodes);\n }\n return tempElement.innerHTML;\n }\n /**\n\t * Determines if a string contains any HTML tags.\n\t */ _containsAnyRemainingHtmlTags(str) {\n return str.includes('<');\n }\n /**\n\t * Replaces the reserved HTML entities with the actual characters.\n\t *\n\t * @param htmlString Clipboard content without any tags.\n\t */ _replaceHtmlReservedEntitiesWithCharacters(htmlString) {\n return htmlString.replace(/>/g, '>').replace(/</g, '<').replace(/ /g, ' ');\n }\n}\n\nexport { GFMDataProcessor, Markdown, MarkdownToHtml, PasteFromMarkdownExperimental };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/markdown2html/markdown2html\n */\n\nimport { marked } from 'marked';\n\n/**\n * This is a helper class used by the {@link module:markdown-gfm/markdown Markdown feature} to convert Markdown to HTML.\n */\nexport class MarkdownToHtml {\n\tprivate _parser: typeof marked;\n\n\tprivate _options = {\n\t\tgfm: true,\n\t\tbreaks: true,\n\t\ttables: true,\n\t\txhtml: true,\n\t\theaderIds: false\n\t};\n\n\tconstructor() {\n\t\t// Overrides.\n\t\tmarked.use( {\n\t\t\ttokenizer: {\n\t\t\t\t// Disable the autolink rule in the lexer.\n\t\t\t\tautolink: () => null as any,\n\t\t\t\turl: () => null as any\n\t\t\t},\n\t\t\trenderer: {\n\t\t\t\tcheckbox( ...args: Array<any> ) {\n\t\t\t\t\t// Remove bogus space after <input type=\"checkbox\"> because it would be preserved\n\t\t\t\t\t// by DomConverter as it's next to an inline object.\n\t\t\t\t\treturn Object.getPrototypeOf( this ).checkbox.call( this, ...args ).trimRight();\n\t\t\t\t},\n\n\t\t\t\tcode( ...args: Array<any> ) {\n\t\t\t\t\t// Since marked v1.2.8, every <code> gets a trailing \"\\n\" whether it originally\n\t\t\t\t\t// ended with one or not (see https://github.com/markedjs/marked/issues/1884 to learn why).\n\t\t\t\t\t// This results in a redundant soft break in the model when loaded into the editor, which\n\t\t\t\t\t// is best prevented at this stage. See https://github.com/ckeditor/ckeditor5/issues/11124.\n\t\t\t\t\treturn Object.getPrototypeOf( this ).code.call( this, ...args ).replace( '\\n</code>', '</code>' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis._parser = marked;\n\t}\n\n\tpublic parse( markdown: string ): string {\n\t\treturn this._parser.parse( markdown, this._options );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/html2markdown/html2markdown\n */\n\nimport Turndown from 'turndown';\n\n// There no avaialble types for 'turndown-plugin-gfm' module and it's not worth to generate them on our own.\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-ignore\nimport { gfm } from 'turndown-plugin-gfm';\n\nconst autolinkRegex = /* #__PURE__ */ new RegExp(\n\t// Prefix.\n\t/\\b(?:(?:https?|ftp):\\/\\/|www\\.)/.source +\n\n\t// Domain name.\n\t/(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})/.source +\n\n\t// The rest.\n\t/(?:[^\\s<>]*)/.source,\n\t'gi'\n);\n\nclass UpdatedTurndown extends Turndown {\n\tpublic override escape( string: string ): string {\n\t\tconst originalEscape = super.escape;\n\n\t\tfunction escape( string: string ): string {\n\t\t\tstring = originalEscape( string );\n\n\t\t\t// Escape \"<\".\n\t\t\tstring = string.replace( /</g, '\\\\<' );\n\n\t\t\treturn string;\n\t\t}\n\n\t\t// Urls should not be escaped. Our strategy is using a regex to find them and escape everything\n\t\t// which is out of the matches parts.\n\n\t\tlet escaped = '';\n\t\tlet lastLinkEnd = 0;\n\n\t\tfor ( const match of this._matchAutolink( string ) ) {\n\t\t\tconst index = match.index!;\n\n\t\t\t// Append the substring between the last match and the current one (if anything).\n\t\t\tif ( index > lastLinkEnd ) {\n\t\t\t\tescaped += escape( string.substring( lastLinkEnd, index ) );\n\t\t\t}\n\n\t\t\tconst matchedURL = match[ 0 ];\n\n\t\t\tescaped += matchedURL;\n\n\t\t\tlastLinkEnd = index + matchedURL.length;\n\t\t}\n\n\t\t// Add text after the last link or at the string start if no matches.\n\t\tif ( lastLinkEnd < string.length ) {\n\t\t\tescaped += escape( string.substring( lastLinkEnd, string.length ) );\n\t\t}\n\n\t\treturn escaped;\n\t}\n\n\t/**\n\t * Trimming end of link.\n\t * https://github.github.com/gfm/#autolinks-extension-\n\t */\n\tprivate* _matchAutolink( string: string ) {\n\t\tfor ( const match of string.matchAll( autolinkRegex ) ) {\n\t\t\tconst matched = match[ 0 ];\n\t\t\tconst length = this._autolinkFindEnd( matched );\n\n\t\t\tyield Object.assign(\n\t\t\t\t[ matched.substring( 0, length ) ],\n\t\t\t\t{ index: match.index }\n\t\t\t);\n\n\t\t\t// We could adjust regex.lastIndex but it's not needed because what we skipped is for sure not a valid URL.\n\t\t}\n\t}\n\n\t/**\n\t * Returns the new length of the link (after it would trim trailing characters).\n\t */\n\tprivate _autolinkFindEnd( string: string ) {\n\t\tlet length = string.length;\n\n\t\twhile ( length > 0 ) {\n\t\t\tconst char = string[ length - 1 ];\n\n\t\t\tif ( '?!.,:*_~\\'\"'.includes( char ) ) {\n\t\t\t\tlength--;\n\t\t\t} else if ( char == ')' ) {\n\t\t\t\tlet openBrackets = 0;\n\n\t\t\t\tfor ( let i = 0; i < length; i++ ) {\n\t\t\t\t\tif ( string[ i ] == '(' ) {\n\t\t\t\t\t\topenBrackets++;\n\t\t\t\t\t} else if ( string[ i ] == ')' ) {\n\t\t\t\t\t\topenBrackets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If there is fewer opening brackets then closing ones we should remove a closing bracket.\n\t\t\t\tif ( openBrackets < 0 ) {\n\t\t\t\t\tlength--;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn length;\n\t}\n}\n\n/**\n * This is a helper class used by the {@link module:markdown-gfm/markdown Markdown feature} to convert HTML to Markdown.\n */\nexport class HtmlToMarkdown {\n\tprivate _parser: UpdatedTurndown;\n\n\tconstructor() {\n\t\tthis._parser = this._createParser();\n\t}\n\n\tpublic parse( html: string ): string {\n\t\treturn this._parser.turndown( html );\n\t}\n\n\tpublic keep( elements: Turndown.Filter ): void {\n\t\tthis._parser.keep( elements );\n\t}\n\n\tprivate _createParser(): UpdatedTurndown {\n\t\tconst parser = new UpdatedTurndown( {\n\t\t\tcodeBlockStyle: 'fenced',\n\t\t\thr: '---',\n\t\t\theadingStyle: 'atx'\n\t\t} );\n\n\t\tparser.use( [\n\t\t\tgfm,\n\t\t\tthis._todoList\n\t\t] );\n\n\t\treturn parser;\n\t}\n\n\t// This is a copy of the original taskListItems rule from turndown-plugin-gfm, with minor changes.\n\tprivate _todoList( turndown: UpdatedTurndown ): void {\n\t\tturndown.addRule( 'taskListItems', {\n\t\t\tfilter( node: any ) {\n\t\t\t\treturn node.type === 'checkbox' &&\n\t\t\t\t\t// Changes here as CKEditor outputs a deeper structure.\n\t\t\t\t\t( node.parentNode.nodeName === 'LI' || node.parentNode.parentNode.nodeName === 'LI' );\n\t\t\t},\n\t\t\treplacement( content: any, node: any ) {\n\t\t\t\treturn ( node.checked ? '[x]' : '[ ]' ) + ' ';\n\t\t\t}\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/gfmdataprocessor\n */\n\nimport {\n\tHtmlDataProcessor,\n\ttype DataProcessor,\n\ttype ViewDocument,\n\ttype ViewDocumentFragment,\n\ttype MatcherPattern\n} from 'ckeditor5/src/engine.js';\n\nimport { MarkdownToHtml } from './markdown2html/markdown2html.js';\nimport { HtmlToMarkdown } from './html2markdown/html2markdown.js';\n\n/**\n * This data processor implementation uses GitHub Flavored Markdown as input/output data.\n *\n * See the {@glink features/markdown Markdown output} guide to learn more on how to enable it.\n */\nexport default class GFMDataProcessor implements DataProcessor {\n\t/**\n\t * HTML data processor used to process HTML produced by the Markdown-to-HTML converter and the other way.\n\t */\n\tprivate _htmlDP: HtmlDataProcessor;\n\n\t/**\n\t * Helper for converting Markdown to HTML.\n\t */\n\tprivate _markdown2html: MarkdownToHtml;\n\n\t/**\n\t * Helper for converting HTML to Markdown.\n\t */\n\tprivate _html2markdown: HtmlToMarkdown;\n\n\t/**\n\t * Creates a new instance of the Markdown data processor class.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis._htmlDP = new HtmlDataProcessor( document );\n\t\tthis._markdown2html = new MarkdownToHtml();\n\t\tthis._html2markdown = new HtmlToMarkdown();\n\t}\n\n\t/**\n\t * Keeps the specified element in the output as HTML. This is useful if the editor contains\n\t * features producing HTML that is not a part of the Markdown standard.\n\t *\n\t * By default, all HTML tags are removed.\n\t *\n\t * @param element The element name to be kept.\n\t */\n\tpublic keepHtml( element: keyof HTMLElementTagNameMap ): void {\n\t\tthis._html2markdown.keep( [ element ] );\n\t}\n\n\t/**\n\t * Converts the provided Markdown string to a view tree.\n\t *\n\t * @param data A Markdown string.\n\t * @returns The converted view element.\n\t */\n\tpublic toView( data: string ): ViewDocumentFragment {\n\t\tconst html = this._markdown2html.parse( data );\n\t\treturn this._htmlDP.toView( html );\n\t}\n\n\t/**\n\t * Converts the provided {@link module:engine/view/documentfragment~DocumentFragment} to data format – in this\n\t * case to a Markdown string.\n\t *\n\t * @returns Markdown string.\n\t */\n\tpublic toData( viewFragment: ViewDocumentFragment ): string {\n\t\tconst html = this._htmlDP.toData( viewFragment );\n\t\treturn this._html2markdown.parse( html );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from Markdown to view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern The pattern matching all view elements whose content should\n\t * be treated as raw data.\n\t */\n\tpublic registerRawContentMatcher( pattern: MatcherPattern ): void {\n\t\tthis._htmlDP.registerRawContentMatcher( pattern );\n\t}\n\n\t/**\n\t * This method does not have any effect on the data processor result. It exists for compatibility with the\n\t * {@link module:engine/dataprocessor/dataprocessor~DataProcessor `DataProcessor` interface}.\n\t */\n\tpublic useFillerType(): void {}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/markdown\n */\n\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport GFMDataProcessor from './gfmdataprocessor.js';\n\n/**\n * The GitHub Flavored Markdown (GFM) plugin.\n *\n * For a detailed overview, check the {@glink features/markdown Markdown feature} guide.\n */\nexport default class Markdown extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.data.processor = new GFMDataProcessor( editor.data.viewDocument );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Markdown' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/pastefrommarkdownexperimental\n */\n\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport { ClipboardPipeline, type ClipboardInputTransformationEvent } from 'ckeditor5/src/clipboard.js';\nimport GFMDataProcessor from './gfmdataprocessor.js';\nimport type { ViewDocumentKeyDownEvent } from 'ckeditor5/src/engine.js';\n\nconst ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS = [ 'SPAN', 'BR', 'PRE', 'CODE' ];\n\n/**\n * The GitHub Flavored Markdown (GFM) paste plugin.\n *\n * For a detailed overview, check the {@glink features/pasting/paste-markdown Paste Markdown feature} guide.\n */\nexport default class PasteFromMarkdownExperimental extends Plugin {\n\t/**\n\t * @internal\n\t */\n\tprivate _gfmDataProcessor: GFMDataProcessor;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._gfmDataProcessor = new GFMDataProcessor( editor.data.viewDocument );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'PasteFromMarkdownExperimental' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ ClipboardPipeline ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\n\t\tlet shiftPressed = false;\n\n\t\tthis.listenTo<ViewDocumentKeyDownEvent>( viewDocument, 'keydown', ( evt, data ) => {\n\t\t\tshiftPressed = data.shiftKey;\n\t\t} );\n\n\t\tthis.listenTo<ClipboardInputTransformationEvent>( clipboardPipeline, 'inputTransformation', ( evt, data ) => {\n\t\t\tif ( shiftPressed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst dataAsTextHtml = data.dataTransfer.getData( 'text/html' );\n\n\t\t\tif ( !dataAsTextHtml ) {\n\t\t\t\tconst dataAsTextPlain = data.dataTransfer.getData( 'text/plain' );\n\n\t\t\t\tdata.content = this._gfmDataProcessor.toView( dataAsTextPlain );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst markdownFromHtml = this._parseMarkdownFromHtml( dataAsTextHtml );\n\n\t\t\tif ( markdownFromHtml ) {\n\t\t\t\tdata.content = this._gfmDataProcessor.toView( markdownFromHtml );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Determines if the code copied from a website in the `text/html` type can be parsed as Markdown.\n\t * It removes any OS-specific HTML tags, for example, <meta> on macOS and <!--StartFragment--> on Windows.\n\t * Then removes a single wrapper HTML tag or wrappers for sibling tags, and if there are no more tags left,\n\t * returns the remaining text. Returns null if there are any remaining HTML tags detected.\n\t *\n\t * @param htmlString Clipboard content in the `text/html` type format.\n\t */\n\tprivate _parseMarkdownFromHtml( htmlString: string ): string | null {\n\t\tconst withoutOsSpecificTags = this._removeOsSpecificTags( htmlString );\n\n\t\tif ( !this._containsOnlyAllowedFirstLevelTags( withoutOsSpecificTags ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst withoutWrapperTag = this._removeFirstLevelWrapperTagsAndBrs( withoutOsSpecificTags );\n\n\t\tif ( this._containsAnyRemainingHtmlTags( withoutWrapperTag ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._replaceHtmlReservedEntitiesWithCharacters( withoutWrapperTag );\n\t}\n\n\t/**\n\t * Removes OS-specific tags.\n\t *\n\t * @param htmlString Clipboard content in the `text/html` type format.\n\t */\n\tprivate _removeOsSpecificTags( htmlString: string ): string {\n\t\t// Removing the <meta> tag present on Mac.\n\t\tconst withoutMetaTag = htmlString.replace( /^<meta\\b[^>]*>/, '' ).trim();\n\t\t// Removing the <html> tag present on Windows.\n\t\tconst withoutHtmlTag = withoutMetaTag.replace( /^<html>/, '' ).replace( /<\\/html>$/, '' ).trim();\n\t\t// Removing the <body> tag present on Windows.\n\t\tconst withoutBodyTag = withoutHtmlTag.replace( /^<body>/, '' ).replace( /<\\/body>$/, '' ).trim();\n\n\t\t// Removing the <!--StartFragment--> tag present on Windows.\n\t\treturn withoutBodyTag.replace( /^<!--StartFragment-->/, '' ).replace( /<!--EndFragment-->$/, '' ).trim();\n\t}\n\n\t/**\n\t * If the input HTML string contains any first-level formatting tags\n\t * like <b>, <strong>, or <i>, we should not treat it as Markdown.\n\t *\n\t * @param htmlString Clipboard content.\n\t */\n\tprivate _containsOnlyAllowedFirstLevelTags( htmlString: string ): boolean {\n\t\tconst parser = new DOMParser();\n\t\tconst { body: tempElement } = parser.parseFromString( htmlString, 'text/html' );\n\n\t\tconst tagNames = Array.from( tempElement.children ).map( el => el.tagName );\n\n\t\treturn tagNames.every( el => ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS.includes( el ) );\n\t}\n\n\t/**\n\t * Removes multiple HTML wrapper tags from a list of sibling HTML tags.\n\t *\n\t * @param htmlString Clipboard content without any OS-specific tags.\n\t */\n\tprivate _removeFirstLevelWrapperTagsAndBrs( htmlString: string ): string {\n\t\tconst parser = new DOMParser();\n\t\tconst { body: tempElement } = parser.parseFromString( htmlString, 'text/html' );\n\n\t\tconst brElements = tempElement.querySelectorAll( 'br' );\n\n\t\tfor ( const br of brElements ) {\n\t\t\tbr.replaceWith( '\\n' );\n\t\t}\n\n\t\tconst outerElements = tempElement.querySelectorAll( ':scope > *' );\n\n\t\tfor ( const element of outerElements ) {\n\t\t\tconst elementClone = element.cloneNode( true );\n\t\t\telement.replaceWith( ...elementClone.childNodes );\n\t\t}\n\n\t\treturn tempElement.innerHTML;\n\t}\n\n\t/**\n\t * Determines if a string contains any HTML tags.\n\t */\n\tprivate _containsAnyRemainingHtmlTags( str: string ): boolean {\n\t\treturn str.includes( '<' );\n\t}\n\n\t/**\n\t * Replaces the reserved HTML entities with the actual characters.\n\t *\n\t * @param htmlString Clipboard content without any tags.\n\t */\n\tprivate _replaceHtmlReservedEntitiesWithCharacters( htmlString: string ) {\n\t\treturn htmlString\n\t\t\t.replace( />/g, '>' )\n\t\t\t.replace( /</g, '<' )\n\t\t\t.replace( / /g, ' ' );\n\t}\n}\n"]}
|
1
|
+
{"version":3,"sources":["index.js","../src/markdown2html/markdown2html.ts","../src/html2markdown/html2markdown.ts","../src/gfmdataprocessor.ts","../src/markdown.ts","../src/pastefrommarkdownexperimental.ts"],"names":["MarkdownToHtml","_parser","_options","gfm","breaks","tables","xhtml","headerIds","marked","use","tokenizer","autolink","url","renderer","checkbox","args","Object","getPrototypeOf","call","trimRight","code","replace","parse","markdown","autolinkRegex","RegExp","source","UpdatedTurndown","Turndown","escape","string","originalEscape","escaped","lastLinkEnd","match","_matchAutolink","index","substring","matchedURL","length","matchAll","matched","_autolinkFindEnd","assign","char","includes","openBrackets","i","HtmlToMarkdown","_createParser","html","turndown","keep","elements","parser","codeBlockStyle","hr","headingStyle","_todoList","addRule","filter","node","type","parentNode","nodeName","replacement","content","checked","GFMDataProcessor","_htmlDP","_markdown2html","_html2markdown","document","HtmlDataProcessor","keepHtml","element","toView","data","toData","viewFragment","registerRawContentMatcher","pattern","useFillerType","Markdown","Plugin","editor","processor","viewDocument","pluginName","isOfficialPlugin","ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS","PasteFromMarkdownExperimental","_gfmDataProcessor","requires","ClipboardPipeline","init","view","editing","clipboardPipeline","plugins","get","shiftPressed","listenTo","evt","shiftKey","dataAsTextHtml","dataTransfer","getData","dataAsTextPlain","markdownFromHtml","_parseMarkdownFromHtml","htmlString","withoutOsSpecificTags","_removeOsSpecificTags","_containsOnlyAllowedFirstLevelTags","withoutWrapperTag","_removeFirstLevelWrapperTagsAndBrs","_containsAnyRemainingHtmlTags","_replaceHtmlReservedEntitiesWithCharacters","withoutMetaTag","trim","withoutHtmlTag","withoutBodyTag","DOMParser","body","tempElement","parseFromString","tagNames","Array","from","children","map","el","tagName","every","brElements","querySelectorAll","br","replaceWith","outerElements","elementClone","cloneNode","childNodes","innerHTML","str"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/D,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC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UAAU;AAClE,CAAC,CAAC;AACF,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI;AACxD,CAAC,CAAC,CAAC,CAAC,CK1MKyE,0CAAAA,CAA4CP,UAAkB,CAAA,CAAG;AL2M1E,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CK1ML,MAAA,CAAOA,UAAAA,CACL1F,OAAO,CAAE,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAClBA,OAAO,CAAE,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAClBA,OAAO,CAAE,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAA,CAAA,CAAA,CAAA;AACvB,CAAA,CAAA,CAAA,CAAA;AACD;;ALyMA,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,CAAC,6BAA6B,CAAC,CAAC;AACpF,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { HtmlDataProcessor } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { marked } from 'marked';\nimport Turndown from 'turndown';\nimport { gfm } from 'turndown-plugin-gfm';\nimport { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard/dist/index.js';\n\n/**\n * This is a helper class used by the {@link module:markdown-gfm/markdown Markdown feature} to convert Markdown to HTML.\n */ class MarkdownToHtml {\n _parser;\n _options = {\n gfm: true,\n breaks: true,\n tables: true,\n xhtml: true,\n headerIds: false\n };\n constructor(){\n // Overrides.\n marked.use({\n tokenizer: {\n // Disable the autolink rule in the lexer.\n autolink: ()=>null,\n url: ()=>null\n },\n renderer: {\n checkbox (...args) {\n // Remove bogus space after <input type=\"checkbox\"> because it would be preserved\n // by DomConverter as it's next to an inline object.\n return Object.getPrototypeOf(this).checkbox.call(this, ...args).trimRight();\n },\n code (...args) {\n // Since marked v1.2.8, every <code> gets a trailing \"\\n\" whether it originally\n // ended with one or not (see https://github.com/markedjs/marked/issues/1884 to learn why).\n // This results in a redundant soft break in the model when loaded into the editor, which\n // is best prevented at this stage. See https://github.com/ckeditor/ckeditor5/issues/11124.\n return Object.getPrototypeOf(this).code.call(this, ...args).replace('\\n</code>', '</code>');\n }\n }\n });\n this._parser = marked;\n }\n parse(markdown) {\n return this._parser.parse(markdown, this._options);\n }\n}\n\nconst autolinkRegex = /* #__PURE__ */ new RegExp(// Prefix.\n/\\b(?:(?:https?|ftp):\\/\\/|www\\.)/.source + // Domain name.\n/(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})/.source + // The rest.\n/(?:[^\\s<>]*)/.source, 'gi');\nclass UpdatedTurndown extends Turndown {\n escape(string) {\n const originalEscape = super.escape;\n function escape(string) {\n string = originalEscape(string);\n // Escape \"<\".\n string = string.replace(/</g, '\\\\<');\n return string;\n }\n // Urls should not be escaped. Our strategy is using a regex to find them and escape everything\n // which is out of the matches parts.\n let escaped = '';\n let lastLinkEnd = 0;\n for (const match of this._matchAutolink(string)){\n const index = match.index;\n // Append the substring between the last match and the current one (if anything).\n if (index > lastLinkEnd) {\n escaped += escape(string.substring(lastLinkEnd, index));\n }\n const matchedURL = match[0];\n escaped += matchedURL;\n lastLinkEnd = index + matchedURL.length;\n }\n // Add text after the last link or at the string start if no matches.\n if (lastLinkEnd < string.length) {\n escaped += escape(string.substring(lastLinkEnd, string.length));\n }\n return escaped;\n }\n /**\n\t * Trimming end of link.\n\t * https://github.github.com/gfm/#autolinks-extension-\n\t */ *_matchAutolink(string) {\n for (const match of string.matchAll(autolinkRegex)){\n const matched = match[0];\n const length = this._autolinkFindEnd(matched);\n yield Object.assign([\n matched.substring(0, length)\n ], {\n index: match.index\n });\n // We could adjust regex.lastIndex but it's not needed because what we skipped is for sure not a valid URL.\n }\n }\n /**\n\t * Returns the new length of the link (after it would trim trailing characters).\n\t */ _autolinkFindEnd(string) {\n let length = string.length;\n while(length > 0){\n const char = string[length - 1];\n if ('?!.,:*_~\\'\"'.includes(char)) {\n length--;\n } else if (char == ')') {\n let openBrackets = 0;\n for(let i = 0; i < length; i++){\n if (string[i] == '(') {\n openBrackets++;\n } else if (string[i] == ')') {\n openBrackets--;\n }\n }\n // If there is fewer opening brackets then closing ones we should remove a closing bracket.\n if (openBrackets < 0) {\n length--;\n } else {\n break;\n }\n } else {\n break;\n }\n }\n return length;\n }\n}\n/**\n * This is a helper class used by the {@link module:markdown-gfm/markdown Markdown feature} to convert HTML to Markdown.\n */ class HtmlToMarkdown {\n _parser;\n constructor(){\n this._parser = this._createParser();\n }\n parse(html) {\n return this._parser.turndown(html);\n }\n keep(elements) {\n this._parser.keep(elements);\n }\n _createParser() {\n const parser = new UpdatedTurndown({\n codeBlockStyle: 'fenced',\n hr: '---',\n headingStyle: 'atx'\n });\n parser.use([\n gfm,\n this._todoList\n ]);\n return parser;\n }\n // This is a copy of the original taskListItems rule from turndown-plugin-gfm, with minor changes.\n _todoList(turndown) {\n turndown.addRule('taskListItems', {\n filter (node) {\n return node.type === 'checkbox' && // Changes here as CKEditor outputs a deeper structure.\n (node.parentNode.nodeName === 'LI' || node.parentNode.parentNode.nodeName === 'LI');\n },\n replacement (content, node) {\n return (node.checked ? '[x]' : '[ ]') + ' ';\n }\n });\n }\n}\n\n/**\n * This data processor implementation uses GitHub Flavored Markdown as input/output data.\n *\n * See the {@glink features/markdown Markdown output} guide to learn more on how to enable it.\n */ class GFMDataProcessor {\n /**\n\t * HTML data processor used to process HTML produced by the Markdown-to-HTML converter and the other way.\n\t */ _htmlDP;\n /**\n\t * Helper for converting Markdown to HTML.\n\t */ _markdown2html;\n /**\n\t * Helper for converting HTML to Markdown.\n\t */ _html2markdown;\n /**\n\t * Creates a new instance of the Markdown data processor class.\n\t */ constructor(document){\n this._htmlDP = new HtmlDataProcessor(document);\n this._markdown2html = new MarkdownToHtml();\n this._html2markdown = new HtmlToMarkdown();\n }\n /**\n\t * Keeps the specified element in the output as HTML. This is useful if the editor contains\n\t * features producing HTML that is not a part of the Markdown standard.\n\t *\n\t * By default, all HTML tags are removed.\n\t *\n\t * @param element The element name to be kept.\n\t */ keepHtml(element) {\n this._html2markdown.keep([\n element\n ]);\n }\n /**\n\t * Converts the provided Markdown string to a view tree.\n\t *\n\t * @param data A Markdown string.\n\t * @returns The converted view element.\n\t */ toView(data) {\n const html = this._markdown2html.parse(data);\n return this._htmlDP.toView(html);\n }\n /**\n\t * Converts the provided {@link module:engine/view/documentfragment~DocumentFragment} to data format – in this\n\t * case to a Markdown string.\n\t *\n\t * @returns Markdown string.\n\t */ toData(viewFragment) {\n const html = this._htmlDP.toData(viewFragment);\n return this._html2markdown.parse(html);\n }\n /**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from Markdown to view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern The pattern matching all view elements whose content should\n\t * be treated as raw data.\n\t */ registerRawContentMatcher(pattern) {\n this._htmlDP.registerRawContentMatcher(pattern);\n }\n /**\n\t * This method does not have any effect on the data processor result. It exists for compatibility with the\n\t * {@link module:engine/dataprocessor/dataprocessor~DataProcessor `DataProcessor` interface}.\n\t */ useFillerType() {}\n}\n\n/**\n * The GitHub Flavored Markdown (GFM) plugin.\n *\n * For a detailed overview, check the {@glink features/markdown Markdown feature} guide.\n */ class Markdown extends Plugin {\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n editor.data.processor = new GFMDataProcessor(editor.data.viewDocument);\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'Markdown';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n}\n\nconst ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS = [\n 'SPAN',\n 'BR',\n 'PRE',\n 'CODE'\n];\n/**\n * The GitHub Flavored Markdown (GFM) paste plugin.\n *\n * For a detailed overview, check the {@glink features/pasting/paste-markdown Paste Markdown feature} guide.\n */ class PasteFromMarkdownExperimental extends Plugin {\n /**\n\t * @internal\n\t */ _gfmDataProcessor;\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n this._gfmDataProcessor = new GFMDataProcessor(editor.data.viewDocument);\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'PasteFromMarkdownExperimental';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n ClipboardPipeline\n ];\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n const view = editor.editing.view;\n const viewDocument = view.document;\n const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n let shiftPressed = false;\n this.listenTo(viewDocument, 'keydown', (evt, data)=>{\n shiftPressed = data.shiftKey;\n });\n this.listenTo(clipboardPipeline, 'inputTransformation', (evt, data)=>{\n if (shiftPressed) {\n return;\n }\n const dataAsTextHtml = data.dataTransfer.getData('text/html');\n if (!dataAsTextHtml) {\n const dataAsTextPlain = data.dataTransfer.getData('text/plain');\n data.content = this._gfmDataProcessor.toView(dataAsTextPlain);\n return;\n }\n const markdownFromHtml = this._parseMarkdownFromHtml(dataAsTextHtml);\n if (markdownFromHtml) {\n data.content = this._gfmDataProcessor.toView(markdownFromHtml);\n }\n });\n }\n /**\n\t * Determines if the code copied from a website in the `text/html` type can be parsed as Markdown.\n\t * It removes any OS-specific HTML tags, for example, <meta> on macOS and <!--StartFragment--> on Windows.\n\t * Then removes a single wrapper HTML tag or wrappers for sibling tags, and if there are no more tags left,\n\t * returns the remaining text. Returns null if there are any remaining HTML tags detected.\n\t *\n\t * @param htmlString Clipboard content in the `text/html` type format.\n\t */ _parseMarkdownFromHtml(htmlString) {\n const withoutOsSpecificTags = this._removeOsSpecificTags(htmlString);\n if (!this._containsOnlyAllowedFirstLevelTags(withoutOsSpecificTags)) {\n return null;\n }\n const withoutWrapperTag = this._removeFirstLevelWrapperTagsAndBrs(withoutOsSpecificTags);\n if (this._containsAnyRemainingHtmlTags(withoutWrapperTag)) {\n return null;\n }\n return this._replaceHtmlReservedEntitiesWithCharacters(withoutWrapperTag);\n }\n /**\n\t * Removes OS-specific tags.\n\t *\n\t * @param htmlString Clipboard content in the `text/html` type format.\n\t */ _removeOsSpecificTags(htmlString) {\n // Removing the <meta> tag present on Mac.\n const withoutMetaTag = htmlString.replace(/^<meta\\b[^>]*>/, '').trim();\n // Removing the <html> tag present on Windows.\n const withoutHtmlTag = withoutMetaTag.replace(/^<html>/, '').replace(/<\\/html>$/, '').trim();\n // Removing the <body> tag present on Windows.\n const withoutBodyTag = withoutHtmlTag.replace(/^<body>/, '').replace(/<\\/body>$/, '').trim();\n // Removing the <!--StartFragment--> tag present on Windows.\n return withoutBodyTag.replace(/^<!--StartFragment-->/, '').replace(/<!--EndFragment-->$/, '').trim();\n }\n /**\n\t * If the input HTML string contains any first-level formatting tags\n\t * like <b>, <strong>, or <i>, we should not treat it as Markdown.\n\t *\n\t * @param htmlString Clipboard content.\n\t */ _containsOnlyAllowedFirstLevelTags(htmlString) {\n const parser = new DOMParser();\n const { body: tempElement } = parser.parseFromString(htmlString, 'text/html');\n const tagNames = Array.from(tempElement.children).map((el)=>el.tagName);\n return tagNames.every((el)=>ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS.includes(el));\n }\n /**\n\t * Removes multiple HTML wrapper tags from a list of sibling HTML tags.\n\t *\n\t * @param htmlString Clipboard content without any OS-specific tags.\n\t */ _removeFirstLevelWrapperTagsAndBrs(htmlString) {\n const parser = new DOMParser();\n const { body: tempElement } = parser.parseFromString(htmlString, 'text/html');\n const brElements = tempElement.querySelectorAll('br');\n for (const br of brElements){\n br.replaceWith('\\n');\n }\n const outerElements = tempElement.querySelectorAll(':scope > *');\n for (const element of outerElements){\n const elementClone = element.cloneNode(true);\n element.replaceWith(...elementClone.childNodes);\n }\n return tempElement.innerHTML;\n }\n /**\n\t * Determines if a string contains any HTML tags.\n\t */ _containsAnyRemainingHtmlTags(str) {\n return str.includes('<');\n }\n /**\n\t * Replaces the reserved HTML entities with the actual characters.\n\t *\n\t * @param htmlString Clipboard content without any tags.\n\t */ _replaceHtmlReservedEntitiesWithCharacters(htmlString) {\n return htmlString.replace(/>/g, '>').replace(/</g, '<').replace(/ /g, ' ');\n }\n}\n\nexport { GFMDataProcessor, Markdown, MarkdownToHtml, PasteFromMarkdownExperimental };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/markdown2html/markdown2html\n */\n\nimport { marked } from 'marked';\n\n/**\n * This is a helper class used by the {@link module:markdown-gfm/markdown Markdown feature} to convert Markdown to HTML.\n */\nexport class MarkdownToHtml {\n\tprivate _parser: typeof marked;\n\n\tprivate _options = {\n\t\tgfm: true,\n\t\tbreaks: true,\n\t\ttables: true,\n\t\txhtml: true,\n\t\theaderIds: false\n\t};\n\n\tconstructor() {\n\t\t// Overrides.\n\t\tmarked.use( {\n\t\t\ttokenizer: {\n\t\t\t\t// Disable the autolink rule in the lexer.\n\t\t\t\tautolink: () => null as any,\n\t\t\t\turl: () => null as any\n\t\t\t},\n\t\t\trenderer: {\n\t\t\t\tcheckbox( ...args: Array<any> ) {\n\t\t\t\t\t// Remove bogus space after <input type=\"checkbox\"> because it would be preserved\n\t\t\t\t\t// by DomConverter as it's next to an inline object.\n\t\t\t\t\treturn Object.getPrototypeOf( this ).checkbox.call( this, ...args ).trimRight();\n\t\t\t\t},\n\n\t\t\t\tcode( ...args: Array<any> ) {\n\t\t\t\t\t// Since marked v1.2.8, every <code> gets a trailing \"\\n\" whether it originally\n\t\t\t\t\t// ended with one or not (see https://github.com/markedjs/marked/issues/1884 to learn why).\n\t\t\t\t\t// This results in a redundant soft break in the model when loaded into the editor, which\n\t\t\t\t\t// is best prevented at this stage. See https://github.com/ckeditor/ckeditor5/issues/11124.\n\t\t\t\t\treturn Object.getPrototypeOf( this ).code.call( this, ...args ).replace( '\\n</code>', '</code>' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis._parser = marked;\n\t}\n\n\tpublic parse( markdown: string ): string {\n\t\treturn this._parser.parse( markdown, this._options );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/html2markdown/html2markdown\n */\n\nimport Turndown from 'turndown';\n\n// There no avaialble types for 'turndown-plugin-gfm' module and it's not worth to generate them on our own.\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-ignore\nimport { gfm } from 'turndown-plugin-gfm';\n\nconst autolinkRegex = /* #__PURE__ */ new RegExp(\n\t// Prefix.\n\t/\\b(?:(?:https?|ftp):\\/\\/|www\\.)/.source +\n\n\t// Domain name.\n\t/(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})/.source +\n\n\t// The rest.\n\t/(?:[^\\s<>]*)/.source,\n\t'gi'\n);\n\nclass UpdatedTurndown extends Turndown {\n\tpublic override escape( string: string ): string {\n\t\tconst originalEscape = super.escape;\n\n\t\tfunction escape( string: string ): string {\n\t\t\tstring = originalEscape( string );\n\n\t\t\t// Escape \"<\".\n\t\t\tstring = string.replace( /</g, '\\\\<' );\n\n\t\t\treturn string;\n\t\t}\n\n\t\t// Urls should not be escaped. Our strategy is using a regex to find them and escape everything\n\t\t// which is out of the matches parts.\n\n\t\tlet escaped = '';\n\t\tlet lastLinkEnd = 0;\n\n\t\tfor ( const match of this._matchAutolink( string ) ) {\n\t\t\tconst index = match.index!;\n\n\t\t\t// Append the substring between the last match and the current one (if anything).\n\t\t\tif ( index > lastLinkEnd ) {\n\t\t\t\tescaped += escape( string.substring( lastLinkEnd, index ) );\n\t\t\t}\n\n\t\t\tconst matchedURL = match[ 0 ];\n\n\t\t\tescaped += matchedURL;\n\n\t\t\tlastLinkEnd = index + matchedURL.length;\n\t\t}\n\n\t\t// Add text after the last link or at the string start if no matches.\n\t\tif ( lastLinkEnd < string.length ) {\n\t\t\tescaped += escape( string.substring( lastLinkEnd, string.length ) );\n\t\t}\n\n\t\treturn escaped;\n\t}\n\n\t/**\n\t * Trimming end of link.\n\t * https://github.github.com/gfm/#autolinks-extension-\n\t */\n\tprivate* _matchAutolink( string: string ) {\n\t\tfor ( const match of string.matchAll( autolinkRegex ) ) {\n\t\t\tconst matched = match[ 0 ];\n\t\t\tconst length = this._autolinkFindEnd( matched );\n\n\t\t\tyield Object.assign(\n\t\t\t\t[ matched.substring( 0, length ) ],\n\t\t\t\t{ index: match.index }\n\t\t\t);\n\n\t\t\t// We could adjust regex.lastIndex but it's not needed because what we skipped is for sure not a valid URL.\n\t\t}\n\t}\n\n\t/**\n\t * Returns the new length of the link (after it would trim trailing characters).\n\t */\n\tprivate _autolinkFindEnd( string: string ) {\n\t\tlet length = string.length;\n\n\t\twhile ( length > 0 ) {\n\t\t\tconst char = string[ length - 1 ];\n\n\t\t\tif ( '?!.,:*_~\\'\"'.includes( char ) ) {\n\t\t\t\tlength--;\n\t\t\t} else if ( char == ')' ) {\n\t\t\t\tlet openBrackets = 0;\n\n\t\t\t\tfor ( let i = 0; i < length; i++ ) {\n\t\t\t\t\tif ( string[ i ] == '(' ) {\n\t\t\t\t\t\topenBrackets++;\n\t\t\t\t\t} else if ( string[ i ] == ')' ) {\n\t\t\t\t\t\topenBrackets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If there is fewer opening brackets then closing ones we should remove a closing bracket.\n\t\t\t\tif ( openBrackets < 0 ) {\n\t\t\t\t\tlength--;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn length;\n\t}\n}\n\n/**\n * This is a helper class used by the {@link module:markdown-gfm/markdown Markdown feature} to convert HTML to Markdown.\n */\nexport class HtmlToMarkdown {\n\tprivate _parser: UpdatedTurndown;\n\n\tconstructor() {\n\t\tthis._parser = this._createParser();\n\t}\n\n\tpublic parse( html: string ): string {\n\t\treturn this._parser.turndown( html );\n\t}\n\n\tpublic keep( elements: Turndown.Filter ): void {\n\t\tthis._parser.keep( elements );\n\t}\n\n\tprivate _createParser(): UpdatedTurndown {\n\t\tconst parser = new UpdatedTurndown( {\n\t\t\tcodeBlockStyle: 'fenced',\n\t\t\thr: '---',\n\t\t\theadingStyle: 'atx'\n\t\t} );\n\n\t\tparser.use( [\n\t\t\tgfm,\n\t\t\tthis._todoList\n\t\t] );\n\n\t\treturn parser;\n\t}\n\n\t// This is a copy of the original taskListItems rule from turndown-plugin-gfm, with minor changes.\n\tprivate _todoList( turndown: UpdatedTurndown ): void {\n\t\tturndown.addRule( 'taskListItems', {\n\t\t\tfilter( node: any ) {\n\t\t\t\treturn node.type === 'checkbox' &&\n\t\t\t\t\t// Changes here as CKEditor outputs a deeper structure.\n\t\t\t\t\t( node.parentNode.nodeName === 'LI' || node.parentNode.parentNode.nodeName === 'LI' );\n\t\t\t},\n\t\t\treplacement( content: any, node: any ) {\n\t\t\t\treturn ( node.checked ? '[x]' : '[ ]' ) + ' ';\n\t\t\t}\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/gfmdataprocessor\n */\n\nimport {\n\tHtmlDataProcessor,\n\ttype DataProcessor,\n\ttype ViewDocument,\n\ttype ViewDocumentFragment,\n\ttype MatcherPattern\n} from 'ckeditor5/src/engine.js';\n\nimport { MarkdownToHtml } from './markdown2html/markdown2html.js';\nimport { HtmlToMarkdown } from './html2markdown/html2markdown.js';\n\n/**\n * This data processor implementation uses GitHub Flavored Markdown as input/output data.\n *\n * See the {@glink features/markdown Markdown output} guide to learn more on how to enable it.\n */\nexport default class GFMDataProcessor implements DataProcessor {\n\t/**\n\t * HTML data processor used to process HTML produced by the Markdown-to-HTML converter and the other way.\n\t */\n\tprivate _htmlDP: HtmlDataProcessor;\n\n\t/**\n\t * Helper for converting Markdown to HTML.\n\t */\n\tprivate _markdown2html: MarkdownToHtml;\n\n\t/**\n\t * Helper for converting HTML to Markdown.\n\t */\n\tprivate _html2markdown: HtmlToMarkdown;\n\n\t/**\n\t * Creates a new instance of the Markdown data processor class.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis._htmlDP = new HtmlDataProcessor( document );\n\t\tthis._markdown2html = new MarkdownToHtml();\n\t\tthis._html2markdown = new HtmlToMarkdown();\n\t}\n\n\t/**\n\t * Keeps the specified element in the output as HTML. This is useful if the editor contains\n\t * features producing HTML that is not a part of the Markdown standard.\n\t *\n\t * By default, all HTML tags are removed.\n\t *\n\t * @param element The element name to be kept.\n\t */\n\tpublic keepHtml( element: keyof HTMLElementTagNameMap ): void {\n\t\tthis._html2markdown.keep( [ element ] );\n\t}\n\n\t/**\n\t * Converts the provided Markdown string to a view tree.\n\t *\n\t * @param data A Markdown string.\n\t * @returns The converted view element.\n\t */\n\tpublic toView( data: string ): ViewDocumentFragment {\n\t\tconst html = this._markdown2html.parse( data );\n\t\treturn this._htmlDP.toView( html );\n\t}\n\n\t/**\n\t * Converts the provided {@link module:engine/view/documentfragment~DocumentFragment} to data format – in this\n\t * case to a Markdown string.\n\t *\n\t * @returns Markdown string.\n\t */\n\tpublic toData( viewFragment: ViewDocumentFragment ): string {\n\t\tconst html = this._htmlDP.toData( viewFragment );\n\t\treturn this._html2markdown.parse( html );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from Markdown to view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern The pattern matching all view elements whose content should\n\t * be treated as raw data.\n\t */\n\tpublic registerRawContentMatcher( pattern: MatcherPattern ): void {\n\t\tthis._htmlDP.registerRawContentMatcher( pattern );\n\t}\n\n\t/**\n\t * This method does not have any effect on the data processor result. It exists for compatibility with the\n\t * {@link module:engine/dataprocessor/dataprocessor~DataProcessor `DataProcessor` interface}.\n\t */\n\tpublic useFillerType(): void {}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/markdown\n */\n\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport GFMDataProcessor from './gfmdataprocessor.js';\n\n/**\n * The GitHub Flavored Markdown (GFM) plugin.\n *\n * For a detailed overview, check the {@glink features/markdown Markdown feature} guide.\n */\nexport default class Markdown extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.data.processor = new GFMDataProcessor( editor.data.viewDocument );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Markdown' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module markdown-gfm/pastefrommarkdownexperimental\n */\n\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport { ClipboardPipeline, type ClipboardInputTransformationEvent } from 'ckeditor5/src/clipboard.js';\nimport GFMDataProcessor from './gfmdataprocessor.js';\nimport type { ViewDocumentKeyDownEvent } from 'ckeditor5/src/engine.js';\n\nconst ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS = [ 'SPAN', 'BR', 'PRE', 'CODE' ];\n\n/**\n * The GitHub Flavored Markdown (GFM) paste plugin.\n *\n * For a detailed overview, check the {@glink features/pasting/paste-markdown Paste Markdown feature} guide.\n */\nexport default class PasteFromMarkdownExperimental extends Plugin {\n\t/**\n\t * @internal\n\t */\n\tprivate _gfmDataProcessor: GFMDataProcessor;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._gfmDataProcessor = new GFMDataProcessor( editor.data.viewDocument );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'PasteFromMarkdownExperimental' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ ClipboardPipeline ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\n\t\tlet shiftPressed = false;\n\n\t\tthis.listenTo<ViewDocumentKeyDownEvent>( viewDocument, 'keydown', ( evt, data ) => {\n\t\t\tshiftPressed = data.shiftKey;\n\t\t} );\n\n\t\tthis.listenTo<ClipboardInputTransformationEvent>( clipboardPipeline, 'inputTransformation', ( evt, data ) => {\n\t\t\tif ( shiftPressed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst dataAsTextHtml = data.dataTransfer.getData( 'text/html' );\n\n\t\t\tif ( !dataAsTextHtml ) {\n\t\t\t\tconst dataAsTextPlain = data.dataTransfer.getData( 'text/plain' );\n\n\t\t\t\tdata.content = this._gfmDataProcessor.toView( dataAsTextPlain );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst markdownFromHtml = this._parseMarkdownFromHtml( dataAsTextHtml );\n\n\t\t\tif ( markdownFromHtml ) {\n\t\t\t\tdata.content = this._gfmDataProcessor.toView( markdownFromHtml );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Determines if the code copied from a website in the `text/html` type can be parsed as Markdown.\n\t * It removes any OS-specific HTML tags, for example, <meta> on macOS and <!--StartFragment--> on Windows.\n\t * Then removes a single wrapper HTML tag or wrappers for sibling tags, and if there are no more tags left,\n\t * returns the remaining text. Returns null if there are any remaining HTML tags detected.\n\t *\n\t * @param htmlString Clipboard content in the `text/html` type format.\n\t */\n\tprivate _parseMarkdownFromHtml( htmlString: string ): string | null {\n\t\tconst withoutOsSpecificTags = this._removeOsSpecificTags( htmlString );\n\n\t\tif ( !this._containsOnlyAllowedFirstLevelTags( withoutOsSpecificTags ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst withoutWrapperTag = this._removeFirstLevelWrapperTagsAndBrs( withoutOsSpecificTags );\n\n\t\tif ( this._containsAnyRemainingHtmlTags( withoutWrapperTag ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._replaceHtmlReservedEntitiesWithCharacters( withoutWrapperTag );\n\t}\n\n\t/**\n\t * Removes OS-specific tags.\n\t *\n\t * @param htmlString Clipboard content in the `text/html` type format.\n\t */\n\tprivate _removeOsSpecificTags( htmlString: string ): string {\n\t\t// Removing the <meta> tag present on Mac.\n\t\tconst withoutMetaTag = htmlString.replace( /^<meta\\b[^>]*>/, '' ).trim();\n\t\t// Removing the <html> tag present on Windows.\n\t\tconst withoutHtmlTag = withoutMetaTag.replace( /^<html>/, '' ).replace( /<\\/html>$/, '' ).trim();\n\t\t// Removing the <body> tag present on Windows.\n\t\tconst withoutBodyTag = withoutHtmlTag.replace( /^<body>/, '' ).replace( /<\\/body>$/, '' ).trim();\n\n\t\t// Removing the <!--StartFragment--> tag present on Windows.\n\t\treturn withoutBodyTag.replace( /^<!--StartFragment-->/, '' ).replace( /<!--EndFragment-->$/, '' ).trim();\n\t}\n\n\t/**\n\t * If the input HTML string contains any first-level formatting tags\n\t * like <b>, <strong>, or <i>, we should not treat it as Markdown.\n\t *\n\t * @param htmlString Clipboard content.\n\t */\n\tprivate _containsOnlyAllowedFirstLevelTags( htmlString: string ): boolean {\n\t\tconst parser = new DOMParser();\n\t\tconst { body: tempElement } = parser.parseFromString( htmlString, 'text/html' );\n\n\t\tconst tagNames = Array.from( tempElement.children ).map( el => el.tagName );\n\n\t\treturn tagNames.every( el => ALLOWED_MARKDOWN_FIRST_LEVEL_TAGS.includes( el ) );\n\t}\n\n\t/**\n\t * Removes multiple HTML wrapper tags from a list of sibling HTML tags.\n\t *\n\t * @param htmlString Clipboard content without any OS-specific tags.\n\t */\n\tprivate _removeFirstLevelWrapperTagsAndBrs( htmlString: string ): string {\n\t\tconst parser = new DOMParser();\n\t\tconst { body: tempElement } = parser.parseFromString( htmlString, 'text/html' );\n\n\t\tconst brElements = tempElement.querySelectorAll( 'br' );\n\n\t\tfor ( const br of brElements ) {\n\t\t\tbr.replaceWith( '\\n' );\n\t\t}\n\n\t\tconst outerElements = tempElement.querySelectorAll( ':scope > *' );\n\n\t\tfor ( const element of outerElements ) {\n\t\t\tconst elementClone = element.cloneNode( true );\n\t\t\telement.replaceWith( ...elementClone.childNodes );\n\t\t}\n\n\t\treturn tempElement.innerHTML;\n\t}\n\n\t/**\n\t * Determines if a string contains any HTML tags.\n\t */\n\tprivate _containsAnyRemainingHtmlTags( str: string ): boolean {\n\t\treturn str.includes( '<' );\n\t}\n\n\t/**\n\t * Replaces the reserved HTML entities with the actual characters.\n\t *\n\t * @param htmlString Clipboard content without any tags.\n\t */\n\tprivate _replaceHtmlReservedEntitiesWithCharacters( htmlString: string ) {\n\t\treturn htmlString\n\t\t\t.replace( />/g, '>' )\n\t\t\t.replace( /</g, '<' )\n\t\t\t.replace( / /g, ' ' );\n\t}\n}\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-markdown-gfm",
|
3
|
-
"version": "45.2.1-alpha.
|
3
|
+
"version": "45.2.1-alpha.10",
|
4
4
|
"description": "GitHub Flavored Markdown data processor for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -18,12 +18,12 @@
|
|
18
18
|
"type": "module",
|
19
19
|
"main": "src/index.js",
|
20
20
|
"dependencies": {
|
21
|
-
"@ckeditor/ckeditor5-clipboard": "45.2.1-alpha.
|
22
|
-
"@ckeditor/ckeditor5-core": "45.2.1-alpha.
|
23
|
-
"@ckeditor/ckeditor5-engine": "45.2.1-alpha.
|
21
|
+
"@ckeditor/ckeditor5-clipboard": "45.2.1-alpha.10",
|
22
|
+
"@ckeditor/ckeditor5-core": "45.2.1-alpha.10",
|
23
|
+
"@ckeditor/ckeditor5-engine": "45.2.1-alpha.10",
|
24
24
|
"@types/marked": "4.3.2",
|
25
25
|
"@types/turndown": "5.0.5",
|
26
|
-
"ckeditor5": "45.2.1-alpha.
|
26
|
+
"ckeditor5": "45.2.1-alpha.10",
|
27
27
|
"marked": "4.0.12",
|
28
28
|
"turndown": "7.2.0",
|
29
29
|
"turndown-plugin-gfm": "1.0.2"
|