"use strict";const w=new RegExp('^\\s*{[|]\\s*class\\s*=\\s*"\\s*(.*)"\\s*'),C=new RegExp("^\\s*[|]}\\s*"),R=new RegExp("^s*->.*"),W=new RegExp(".*<-s*$"),O=new RegExp("^s*[|].+[|]s*$");function x(s,o){const r=s.bMarks[o]+s.blkIndent,e=s.eMarks[o];return s.src.substring(r,e)}function y(s){O.test(s)&&(s=s.replace(/^\||\|$/g,""));const o=[];let r=0;const e=s.length;let n,f=0,d=0,t=!1,h=n=s.charCodeAt(r);for(;r$.includes(o)).join(" ")}function A(s){if(!s.startsWith("|")||!s.endsWith("|"))return null;const o=s.split("|").map(e=>e.trim());o.splice(0,1);const r=[];return o.forEach(e=>{e.startsWith(":")&&e.endsWith(":")?r.push("center"):e.startsWith(":")?r.push("left"):e.endsWith(":")?r.push("right"):r.push(null)}),r}function T(s){const o=(e,n,f,d)=>{let t,h,p,c,i,l,E,S,g,m,u,_=!1,k=!1;if(n+1>f||(h=e.bMarks[n]+e.tShift[n],h>=e.eMarks[n])||(t=x(e,n),w.test(t)?(g=t.match(w)[1],k=g.indexOf("short")!==-1,u=n+1,_=!0):u=n,e.sCount[u]=e.eMarks[u])||(t=x(e,u).trim(),t.indexOf("|")===-1&&!_)||t.indexOf("$$")!==-1)return!1;i=y(t);const b=i.length;if(d)return!0;k&&(l=e.push("div_wrapper","div",1),l.attrJoin("class","markdowntableWrap")),l=e.push("table_open","table",1),l.map=E=[n,0],g&&(l.attrJoin("class",M(g)),n++),t=x(e,u+1).trim();let a=null;if(/^[-:| ]+$/.test(t)&&t.indexOf("|")!==-1){for(a=A(t),m=u+2,l=e.push("thead_open","thead",1),l.map=[n,n+1],l=e.push("tr_open","tr",1),l.map=[n,n+1],p=0;p")+2),i[b-1]=i[b-1].substring(0,i[b-1].indexOf("<-"))),p=0;p