From 10f773415cd7eaa98da74118af0708aeae1779f3 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Wed, 11 Dec 2024 19:38:10 +0100 Subject: [PATCH] fix BASE_URL --- examples/server/public/index.html | 2 +- examples/server/webui/src/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/server/public/index.html b/examples/server/public/index.html index d34f5f5ff..35b4f61c7 100644 --- a/examples/server/public/index.html +++ b/examples/server/public/index.html @@ -78,7 +78,7 @@ Server rendered element contains fewer child nodes than client vdom.`),T=!0),fu( `),t=t.replace(ug,"�"),e.src=t}function rg(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function ig(e){const t=e.tokens;for(let u=0,n=t.length;u\s]/i.test(e)}function og(e){return/^<\/a\s*>/i.test(e)}function cg(e){const t=e.tokens;if(e.md.options.linkify)for(let u=0,n=t.length;u=0;s--){const o=r[s];if(o.type==="link_close"){for(s--;r[s].level!==o.level&&r[s].type!=="link_open";)s--;continue}if(o.type==="html_inline"&&(sg(o.content)&&i>0&&i--,og(o.content)&&i++),!(i>0)&&o.type==="text"&&e.md.linkify.test(o.content)){const c=o.content;let l=e.md.linkify.match(c);const a=[];let f=o.level,h=0;l.length>0&&l[0].index===0&&s>0&&r[s-1].type==="text_special"&&(l=l.slice(1));for(let d=0;dh){const x=new e.Token("text","",0);x.content=c.slice(h,S),x.level=f,a.push(x)}const E=new e.Token("link_open","a",1);E.attrs=[["href",_]],E.level=f++,E.markup="linkify",E.info="auto",a.push(E);const m=new e.Token("text","",0);m.content=D,m.level=f,a.push(m);const g=new e.Token("link_close","a",-1);g.level=--f,g.markup="linkify",g.info="auto",a.push(g),h=l[d].lastIndex}if(h=0;u--){const n=e[u];n.type==="text"&&!t&&(n.content=n.content.replace(ag,dg)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function pg(e){let t=0;for(let u=e.length-1;u>=0;u--){const n=e[u];n.type==="text"&&!t&&Nf.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function mg(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(lg.test(e.tokens[t].content)&&hg(e.tokens[t].children),Nf.test(e.tokens[t].content)&&pg(e.tokens[t].children))}const bg=/['"]/,yl=/['"]/g,xl="’";function Cr(e,t,u){return e.slice(0,t)+u+e.slice(t+1)}function gg(e,t){let u;const n=[];for(let r=0;r=0&&!(n[u].level<=s);u--);if(n.length=u+1,i.type!=="text")continue;let o=i.content,c=0,l=o.length;e:for(;c=0)p=o.charCodeAt(a.index-1);else for(u=r-1;u>=0&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u--)if(e[u].content){p=e[u].content.charCodeAt(e[u].content.length-1);break}let _=32;if(c=48&&p<=57&&(h=f=!1),f&&h&&(f=D,h=S),!f&&!h){d&&(i.content=Cr(i.content,a.index,xl));continue}if(h)for(u=n.length-1;u>=0;u--){let g=n[u];if(n[u].level=0;t--)e.tokens[t].type!=="inline"||!bg.test(e.tokens[t].content)||gg(e.tokens[t].children,e)}function yg(e){let t,u;const n=e.tokens,r=n.length;for(let i=0;i0&&this.level++,this.tokens.push(n),n};Tt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Tt.prototype.skipEmptyLines=function(t){for(let u=this.lineMax;tu;)if(!ae(this.src.charCodeAt(--t)))return t+1;return t};Tt.prototype.skipChars=function(t,u){for(let n=this.src.length;tn;)if(u!==this.src.charCodeAt(--t))return t+1;return t};Tt.prototype.getLines=function(t,u,n,r){if(t>=u)return"";const i=new Array(u-t);for(let s=0,o=t;on?i[s]=new Array(c-n+1).join(" ")+this.src.slice(a,f):i[s]=this.src.slice(a,f)}return i.join("")};Tt.prototype.Token=_t;const xg=65536;function ss(e,t){const u=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(u,n)}function El(e){const t=[],u=e.length;let n=0,r=e.charCodeAt(n),i=!1,s=0,o="";for(;nu)return!1;let r=t+1;if(e.sCount[r]=4)return!1;let i=e.bMarks[r]+e.tShift[r];if(i>=e.eMarks[r])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[r])return!1;const o=e.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58&&!ae(o)||s===45&&ae(o))return!1;for(;i=4)return!1;l=El(c),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const f=l.length;if(f===0||f!==a.length)return!1;if(n)return!0;const h=e.parentType;e.parentType="table";const d=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),_=[t,0];p.map=_;const D=e.push("thead_open","thead",1);D.map=[t,t+1];const S=e.push("tr_open","tr",1);S.map=[t,t+1];for(let g=0;g=4||(l=El(c),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),m+=f-l.length,m>xg))break;if(r===t+2){const k=e.push("tbody_open","tbody",1);k.map=E=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[r,r+1];for(let k=0;k=4){n++,r=n;continue}break}e.line=r;const i=e.push("code_block","code",0);return i.content=e.getLines(t,r,4+e.blkIndent,!1)+` `,i.map=[t,e.line],!0}function kg(e,t,u,n){let r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>i)return!1;const s=e.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let o=r;r=e.skipChars(r,s);let c=r-o;if(c<3)return!1;const l=e.src.slice(o,r),a=e.src.slice(r,i);if(s===96&&a.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=u||(r=o=e.bMarks[f]+e.tShift[f],i=e.eMarks[f],r=4)&&(r=e.skipChars(r,s),!(r-o=4||e.src.charCodeAt(r)!==62)return!1;if(n)return!0;const o=[],c=[],l=[],a=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let d=!1,p;for(p=t;p=i)break;if(e.src.charCodeAt(r++)===62&&!m){let x=e.sCount[p]+1,k,I;e.src.charCodeAt(r)===32?(r++,x++,I=!1,k=!0):e.src.charCodeAt(r)===9?(k=!0,(e.bsCount[p]+x)%4===3?(r++,x++,I=!1):I=!0):k=!1;let w=x;for(o.push(e.bMarks[p]),e.bMarks[p]=r;r=i,c.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(k?1:0),l.push(e.sCount[p]),e.sCount[p]=w-x,a.push(e.tShift[p]),e.tShift[p]=r-e.bMarks[p];continue}if(d)break;let g=!1;for(let x=0,k=f.length;x";const S=[t,0];D.map=S,e.md.block.tokenize(e,t,p);const E=e.push("blockquote_close","blockquote",-1);E.markup=">",e.lineMax=s,e.parentType=h,S[1]=e.line;for(let m=0;m=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let o=1;for(;i=n)return-1;let i=e.src.charCodeAt(r++);if(i<48||i>57)return-1;for(;;){if(r>=n)return-1;if(i=e.src.charCodeAt(r++),i>=48&&i<=57){if(r-u>=10)return-1;continue}if(i===41||i===46)break;return-1}return r=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]=e.blkIndent&&(a=!0);let f,h,d;if((d=kl(e,c))>=0){if(f=!0,s=e.bMarks[c]+e.tShift[c],h=Number(e.src.slice(s,d-1)),a&&h!==1)return!1}else if((d=Cl(e,c))>=0)f=!1;else return!1;if(a&&e.skipSpaces(d)>=e.eMarks[c])return!1;if(n)return!0;const p=e.src.charCodeAt(d-1),_=e.tokens.length;f?(o=e.push("ordered_list_open","ol",1),h!==1&&(o.attrs=[["start",h]])):o=e.push("bullet_list_open","ul",1);const D=[c,0];o.map=D,o.markup=String.fromCharCode(p);let S=!1;const E=e.md.block.ruler.getRules("list"),m=e.parentType;for(e.parentType="list";c=r?I=1:I=x-g,I>4&&(I=1);const w=g+I;o=e.push("list_item_open","li",1),o.markup=String.fromCharCode(p);const C=[c,0];o.map=C,f&&(o.info=e.src.slice(s,d-1));const A=e.tight,R=e.tShift[c],T=e.sCount[c],P=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=w,e.tight=!0,e.tShift[c]=k-e.bMarks[c],e.sCount[c]=x,k>=r&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,u):e.md.block.tokenize(e,c,u,!0),(!e.tight||S)&&(l=!1),S=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=P,e.tShift[c]=R,e.sCount[c]=T,e.tight=A,o=e.push("list_item_close","li",-1),o.markup=String.fromCharCode(p),c=e.line,C[1]=c,c>=u||e.sCount[c]=4)break;let q=!1;for(let z=0,H=E.length;z=4||e.src.charCodeAt(r)!==91)return!1;function o(E){const m=e.lineMax;if(E>=m||e.isEmpty(E))return null;let g=!1;if(e.sCount[E]-e.blkIndent>3&&(g=!0),e.sCount[E]<0&&(g=!0),!g){const I=e.md.block.ruler.getRules("reference"),w=e.parentType;e.parentType="reference";let C=!1;for(let A=0,R=I.length;A"u"&&(e.env.references={}),typeof e.env.references[S]>"u"&&(e.env.references[S]={title:D,href:f}),e.line=s),!0):!1}const wg=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fg="[a-zA-Z_:][a-zA-Z0-9:._-]*",Ig="[^\"'=<>`\\x00-\\x20]+",Og="'[^']*'",Ng='"[^"]*"',Rg="(?:"+Ig+"|"+Og+"|"+Ng+")",Mg="(?:\\s+"+Fg+"(?:\\s*=\\s*"+Rg+")?)",Rf="<[A-Za-z][A-Za-z0-9\\-]*"+Mg+"*\\s*\\/?>",Mf="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Pg="\x3C!---?>|\x3C!--(?:[^-]|-[^-]|--[^>])*-->",Lg="<[?][\\s\\S]*?[?]>",Bg="]*>",Vg="",$g=new RegExp("^(?:"+Rf+"|"+Mf+"|"+Pg+"|"+Lg+"|"+Bg+"|"+Vg+")"),Hg=new RegExp("^(?:"+Rf+"|"+Mf+")"),Lu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^\x3C!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Hg.source+"\\s*$"),/^$/,!1]];function Ug(e,t,u,n){let r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let s=e.src.slice(r,i),o=0;for(;o=4)return!1;let s=e.src.charCodeAt(r);if(s!==35||r>=i)return!1;let o=1;for(s=e.src.charCodeAt(++r);s===35&&r6||rr&&ae(e.src.charCodeAt(c-1))&&(i=c),e.line=t+1;const l=e.push("heading_open","h"+String(o),1);l.markup="########".slice(0,o),l.map=[t,e.line];const a=e.push("inline","",0);a.content=e.src.slice(r,i).trim(),a.map=[t,e.line],a.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup="########".slice(0,o),!0}function jg(e,t,u){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const r=e.parentType;e.parentType="paragraph";let i=0,s,o=t+1;for(;o3)continue;if(e.sCount[o]>=e.blkIndent){let d=e.bMarks[o]+e.tShift[o];const p=e.eMarks[o];if(d=p))){i=s===61?1:2;break}}if(e.sCount[o]<0)continue;let h=!1;for(let d=0,p=n.length;d3||e.sCount[i]<0)continue;let l=!1;for(let a=0,f=n.length;a=u||e.sCount[s]=i){e.line=u;break}const c=e.line;let l=!1;for(let a=0;a=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!o,e.isEmpty(e.line-1)&&(o=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(r),n};cr.prototype.scanDelims=function(e,t){const u=this.posMax,n=this.src.charCodeAt(e),r=e>0?this.src.charCodeAt(e-1):32;let i=e;for(;i0)return!1;const u=e.pos,n=e.posMax;if(u+3>n||e.src.charCodeAt(u)!==58||e.src.charCodeAt(u+1)!==47||e.src.charCodeAt(u+2)!==47)return!1;const r=e.pending.match(Gg);if(!r)return!1;const i=r[1],s=e.md.linkify.matchAtStart(e.src.slice(u-i.length));if(!s)return!1;let o=s.url;if(o.length<=i.length)return!1;o=o.replace(/\*+$/,"");const c=e.md.normalizeLink(o);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const l=e.push("link_open","a",1);l.attrs=[["href",c]],l.markup="linkify",l.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(o);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=o.length-i.length,!0}function Jg(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==10)return!1;const n=e.pending.length-1,r=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let i=n-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(u++;u?@[]^_`{|}~-".split("").forEach(function(e){Yo[e.charCodeAt(0)]=1});function Yg(e,t){let u=e.pos;const n=e.posMax;if(e.src.charCodeAt(u)!==92||(u++,u>=n))return!1;let r=e.src.charCodeAt(u);if(r===10){for(t||e.push("hardbreak","br",0),u++;u=55296&&r<=56319&&u+1=56320&&o<=57343&&(i+=e.src[u+1],u++)}const s="\\"+i;if(!t){const o=e.push("text_special","",0);r<256&&Yo[r]!==0?o.content=i:o.content=s,o.markup=s,o.info="escape"}return e.pos=u+1,!0}function Xg(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==96)return!1;const r=u;u++;const i=e.posMax;for(;u=0;n--){const r=t[n];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1,o=String.fromCharCode(r.marker),c=e.tokens[r.token];c.type=s?"strong_open":"em_open",c.tag=s?"strong":"em",c.nesting=1,c.markup=s?o+o:o,c.content="";const l=e.tokens[i.token];l.type=s?"strong_close":"em_close",l.tag=s?"strong":"em",l.nesting=-1,l.markup=s?o+o:o,l.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--)}}function u3(e){const t=e.tokens_meta,u=e.tokens_meta.length;Al(e,e.delimiters);for(let n=0;n=f)return!1;if(c=p,r=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),r.ok){for(s=e.md.normalizeLink(r.str),e.md.validateLink(s)?p=r.pos:s="",c=p;p=f||e.src.charCodeAt(p)!==41)&&(l=!0),p++}if(l){if(typeof e.env.references>"u")return!1;if(p=0?n=e.src.slice(c,p++):p=d+1):p=d+1,n||(n=e.src.slice(h,d)),i=e.env.references[Mi(n)],!i)return e.pos=a,!1;s=i.href,o=i.title}if(!t){e.pos=h,e.posMax=d;const _=e.push("link_open","a",1),D=[["href",s]];_.attrs=D,o&&D.push(["title",o]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=f,!0}function r3(e,t){let u,n,r,i,s,o,c,l,a="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const d=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(i=p+1,i=h)return!1;for(l=i,o=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),o.ok&&(a=e.md.normalizeLink(o.str),e.md.validateLink(a)?i=o.pos:a=""),l=i;i=h||e.src.charCodeAt(i)!==41)return e.pos=f,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?r=e.src.slice(l,i++):i=p+1):i=p+1,r||(r=e.src.slice(d,p)),s=e.env.references[Mi(r)],!s)return e.pos=f,!1;a=s.href,c=s.title}if(!t){n=e.src.slice(d,p);const _=[];e.md.inline.parse(n,e.md,e.env,_);const D=e.push("image","img",0),S=[["src",a],["alt",""]];D.attrs=S,D.children=_,D.content=n,c&&S.push(["title",c])}return e.pos=i,e.posMax=h,!0}const i3=/^([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])?)*)$/,s3=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function o3(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;const n=e.pos,r=e.posMax;for(;;){if(++u>=r)return!1;const s=e.src.charCodeAt(u);if(s===60)return!1;if(s===62)break}const i=e.src.slice(n+1,u);if(s3.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const o=e.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(i);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=i.length+2,!0}if(i3.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const o=e.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(i);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=i.length+2,!0}return!1}function c3(e){return/^\s]/i.test(e)}function l3(e){return/^<\/a\s*>/i.test(e)}function a3(e){const t=e|32;return t>=97&&t<=122}function f3(e,t){if(!e.md.options.html)return!1;const u=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=u)return!1;const r=e.src.charCodeAt(n+1);if(r!==33&&r!==63&&r!==47&&!a3(r))return!1;const i=e.src.slice(n).match($g);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],c3(s.content)&&e.linkLevel++,l3(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const d3=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,h3=/^&([a-z][a-z0-9]{1,31});/i;function p3(e,t){const u=e.pos,n=e.posMax;if(e.src.charCodeAt(u)!==38||u+1>=n)return!1;if(e.src.charCodeAt(u+1)===35){const i=e.src.slice(u).match(d3);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),o=e.push("text_special","",0);o.content=Zo(s)?si(s):si(65533),o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(u).match(h3);if(i){const s=wf(i[0]);if(s!==i[0]){if(!t){const o=e.push("text_special","",0);o.content=s,o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function vl(e){const t={},u=e.length;if(!u)return;let n=0,r=-2;const i=[];for(let s=0;sc;l-=i[l]+1){const f=e[l];if(f.marker===o.marker&&f.open&&f.end<0){let h=!1;if((f.close||o.open)&&(f.length+o.length)%3===0&&(f.length%3!==0||o.length%3!==0)&&(h=!0),!h){const d=l>0&&!e[l-1].open?i[l-1]+1:0;i[s]=s-l+d,i[l]=d,o.open=!1,f.end=s,f.close=!1,a=-1,r=-2;break}}}a!==-1&&(t[o.marker][(o.open?3:0)+(o.length||0)%3]=a)}}function m3(e){const t=e.tokens_meta,u=e.tokens_meta.length;vl(e.delimiters);for(let n=0;n0&&n++,r[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};lr.prototype.tokenize=function(e){const t=this.ruler.getRules(""),u=t.length,n=e.posMax,r=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};lr.prototype.parse=function(e,t,u,n){const r=new this.State(e,t,u,n);this.tokenize(r);const i=this.ruler2.getRules(""),s=i.length;for(let o=0;o|$))",t.tpl_email_fuzzy="(^|"+u+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Us(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){u&&Object.keys(u).forEach(function(n){e[n]=u[n]})}),e}function Li(e){return Object.prototype.toString.call(e)}function _3(e){return Li(e)==="[object String]"}function y3(e){return Li(e)==="[object Object]"}function x3(e){return Li(e)==="[object RegExp]"}function Dl(e){return Li(e)==="[object Function]"}function E3(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Bf={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function C3(e){return Object.keys(e||{}).reduce(function(t,u){return t||Bf.hasOwnProperty(u)},!1)}const k3={"http:":{validate:function(e,t,u){const n=e.slice(t);return u.re.http||(u.re.http=new RegExp("^\\/\\/"+u.re.src_auth+u.re.src_host_port_strict+u.re.src_path,"i")),u.re.http.test(n)?n.match(u.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,u){const n=e.slice(t);return u.re.no_http||(u.re.no_http=new RegExp("^"+u.re.src_auth+"(?:localhost|(?:(?:"+u.re.src_domain+")\\.)+"+u.re.src_domain_root+")"+u.re.src_port+u.re.src_host_terminator+u.re.src_path,"i")),u.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(u.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,u){const n=e.slice(t);return u.re.mailto||(u.re.mailto=new RegExp("^"+u.re.src_email_name+"@"+u.re.src_host_strict,"i")),u.re.mailto.test(n)?n.match(u.re.mailto)[0].length:0}}},S3="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",A3="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function v3(e){e.__index__=-1,e.__text_cache__=""}function D3(e){return function(t,u){const n=t.slice(u);return e.test(n)?n.match(e)[0].length:0}}function Tl(){return function(e,t){t.normalize(e)}}function oi(e){const t=e.re=g3(e.__opts__),u=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||u.push(S3),u.push(t.src_xn),t.src_tlds=u.join("|");function n(o){return o.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const r=[];e.__compiled__={};function i(o,c){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+c)}Object.keys(e.__schemas__).forEach(function(o){const c=e.__schemas__[o];if(c===null)return;const l={validate:null,link:null};if(e.__compiled__[o]=l,y3(c)){x3(c.validate)?l.validate=D3(c.validate):Dl(c.validate)?l.validate=c.validate:i(o,c),Dl(c.normalize)?l.normalize=c.normalize:c.normalize?i(o,c):l.normalize=Tl();return}if(_3(c)){r.push(o);return}i(o,c)}),r.forEach(function(o){e.__compiled__[e.__schemas__[o]]&&(e.__compiled__[o].validate=e.__compiled__[e.__schemas__[o]].validate,e.__compiled__[o].normalize=e.__compiled__[e.__schemas__[o]].normalize)}),e.__compiled__[""]={validate:null,normalize:Tl()};const s=Object.keys(e.__compiled__).filter(function(o){return o.length>0&&e.__compiled__[o]}).map(E3).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),v3(e)}function T3(e,t){const u=e.__index__,n=e.__last_index__,r=e.__text_cache__.slice(u,n);this.schema=e.__schema__.toLowerCase(),this.index=u+t,this.lastIndex=n+t,this.raw=r,this.text=r,this.url=r}function qs(e,t){const u=new T3(e,t);return e.__compiled__[u.schema].normalize(u,e),u}function nt(e,t){if(!(this instanceof nt))return new nt(e,t);t||C3(e)&&(t=e,e={}),this.__opts__=Us({},Bf,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Us({},k3,e),this.__compiled__={},this.__tlds__=A3,this.__tlds_replaced__=!1,this.re={},oi(this)}nt.prototype.add=function(t,u){return this.__schemas__[t]=u,oi(this),this};nt.prototype.set=function(t){return this.__opts__=Us(this.__opts__,t),this};nt.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let u,n,r,i,s,o,c,l,a;if(this.re.schema_test.test(t)){for(c=this.re.schema_search,c.lastIndex=0;(u=c.exec(t))!==null;)if(i=this.testSchemaAt(t,u[2],c.lastIndex),i){this.__schema__=u[2],this.__index__=u.index+u[1].length,this.__last_index__=u.index+u[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(r=t.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||sthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=o))),this.__index__>=0};nt.prototype.pretest=function(t){return this.re.pretest.test(t)};nt.prototype.testSchemaAt=function(t,u,n){return this.__compiled__[u.toLowerCase()]?this.__compiled__[u.toLowerCase()].validate(t,n,this):0};nt.prototype.match=function(t){const u=[];let n=0;this.__index__>=0&&this.__text_cache__===t&&(u.push(qs(this,n)),n=this.__last_index__);let r=n?t.slice(n):t;for(;this.test(r);)u.push(qs(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return u.length?u:null};nt.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const u=this.re.schema_at_start.exec(t);if(!u)return null;const n=this.testSchemaAt(t,u[2],u[0].length);return n?(this.__schema__=u[2],this.__index__=u.index+u[1].length,this.__last_index__=u.index+u[0].length+n,qs(this,0)):null};nt.prototype.tlds=function(t,u){return t=Array.isArray(t)?t:[t],u?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,r,i){return n!==i[r-1]}).reverse(),oi(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,oi(this),this)};nt.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};nt.prototype.onCompile=function(){};const Ku=2147483647,St=36,Xo=1,Jn=26,w3=38,F3=700,Vf=72,$f=128,Hf="-",I3=/^xn--/,O3=/[^\0-\x7F]/,N3=/[\x2E\u3002\uFF0E\uFF61]/g,R3={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ls=St-Xo,At=Math.floor,as=String.fromCharCode;function Qt(e){throw new RangeError(R3[e])}function M3(e,t){const u=[];let n=e.length;for(;n--;)u[n]=t(e[n]);return u}function Uf(e,t){const u=e.split("@");let n="";u.length>1&&(n=u[0]+"@",e=u[1]),e=e.replace(N3,".");const r=e.split("."),i=M3(r,t).join(".");return n+i}function qf(e){const t=[];let u=0;const n=e.length;for(;u=55296&&r<=56319&&uString.fromCodePoint(...e),L3=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:St},wl=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},jf=function(e,t,u){let n=0;for(e=u?At(e/F3):e>>1,e+=At(e/t);e>ls*Jn>>1;n+=St)e=At(e/ls);return At(n+(ls+1)*e/(e+w3))},zf=function(e){const t=[],u=e.length;let n=0,r=$f,i=Vf,s=e.lastIndexOf(Hf);s<0&&(s=0);for(let o=0;o=128&&Qt("not-basic"),t.push(e.charCodeAt(o));for(let o=s>0?s+1:0;o=u&&Qt("invalid-input");const h=L3(e.charCodeAt(o++));h>=St&&Qt("invalid-input"),h>At((Ku-n)/a)&&Qt("overflow"),n+=h*a;const d=f<=i?Xo:f>=i+Jn?Jn:f-i;if(hAt(Ku/p)&&Qt("overflow"),a*=p}const l=t.length+1;i=jf(n-c,l,c==0),At(n/l)>Ku-r&&Qt("overflow"),r+=At(n/l),n%=l,t.splice(n++,0,r)}return String.fromCodePoint(...t)},Kf=function(e){const t=[];e=qf(e);const u=e.length;let n=$f,r=0,i=Vf;for(const c of e)c<128&&t.push(as(c));const s=t.length;let o=s;for(s&&t.push(Hf);o=n&&aAt((Ku-r)/l)&&Qt("overflow"),r+=(c-n)*l,n=c;for(const a of e)if(aKu&&Qt("overflow"),a===n){let f=r;for(let h=St;;h+=St){const d=h<=i?Xo:h>=i+Jn?Jn:h-i;if(f=0))try{t.hostname=Wf.toASCII(t.hostname)}catch{}return or(zo(t))}function G3(e){const t=Ko(e,!0);if(t.hostname&&(!t.protocol||Gf.indexOf(t.protocol)>=0))try{t.hostname=Wf.toUnicode(t.hostname)}catch{}return nn(zo(t),nn.defaultChars+"%")}function at(e,t){if(!(this instanceof at))return new at(e,t);t||Go(e)||(t=e||{},e="default"),this.inline=new lr,this.block=new Pi,this.core=new Jo,this.renderer=new an,this.linkify=new nt,this.validateLink=K3,this.normalizeLink=W3,this.normalizeLinkText=G3,this.utils=Jb,this.helpers=Ri({},eg),this.options={},this.configure(e),t&&this.set(t)}at.prototype.set=function(e){return Ri(this.options,e),this};at.prototype.configure=function(e){const t=this;if(Go(e)){const u=e;if(e=q3[u],!e)throw new Error('Wrong `markdown-it` preset "'+u+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(u){e.components[u].rules&&t[u].ruler.enableOnly(e.components[u].rules),e.components[u].rules2&&t[u].ruler2.enableOnly(e.components[u].rules2)}),this};at.prototype.enable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){u=u.concat(this[r].ruler.enable(e,!0))},this),u=u.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(r){return u.indexOf(r)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};at.prototype.disable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){u=u.concat(this[r].ruler.disable(e,!0))},this),u=u.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(r){return u.indexOf(r)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};at.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};at.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const u=new this.core.State(e,this,t);return this.core.process(u),u.tokens};at.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};at.prototype.parseInline=function(e,t){const u=new this.core.State(e,this,t);return u.inlineMode=!0,this.core.process(u),u.tokens};at.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Yn,Xn,Wu,_u,Qn,js;class Z3 extends TransformStream{constructor(u){super({transform:(n,r)=>Ui(this,Qn,js).call(this,n,r),flush:n=>Ui(this,Qn,js).call(this,`\r `,n)});Ru(this,Qn);Ru(this,Yn,"");Ru(this,Xn,!1);Ru(this,Wu,!1);Ru(this,_u,u=>u);hn(this,Xn,(u==null?void 0:u.allowCR)??!1),hn(this,Wu,(u==null?void 0:u.returnEmptyLines)??!1),hn(this,_u,(u==null?void 0:u.mapperFun)??qt(this,_u))}}Yn=new WeakMap,Xn=new WeakMap,Wu=new WeakMap,_u=new WeakMap,Qn=new WeakSet,js=function(u,n){for(u=qt(this,Yn)+u;;){const r=u.indexOf(` -`);if(qt(this,Xn)){const i=u.indexOf("\r");if(i!==-1&&i!==u.length-1&&(r===-1||r-1>i)){const s=qt(this,_u).call(this,u.slice(0,crOrLfIndex));(qt(this,Wu)||s)&&n.enqueue(s),u=u.slice(i+1);continue}}if(r!==-1){let i=r;u[r-1]==="\r"&&i--;const s=qt(this,_u).call(this,u.slice(0,i));(qt(this,Wu)||s)&&n.enqueue(s),u=u.slice(r+1);continue}break}hn(this,Yn,u)};const J3=e=>!!e.toLowerCase,Y3=e=>e===!0||e===!1,X3=e=>!J3(e)&&!isNaN(e)&&!Y3(e),Q3=e=>e.replace(/>/g,">").replace(/"/g,"""),Zf=e=>navigator.clipboard.writeText(e),e_=localStorage.getItem("base")||new URL(".",document.baseURI).href.toString(),ci={apiKey:"",systemMessage:"You are a helpful assistant.",showTokensPerSecond:!1,samplers:"dkypmxt",temperature:.8,dynatemp_range:0,dynatemp_exponent:1,top_k:40,top_p:.95,min_p:.05,xtc_probability:0,xtc_threshold:.1,typical_p:1,repeat_last_n:64,repeat_penalty:1,presence_penalty:0,frequency_penalty:0,dry_multiplier:0,dry_base:1.75,dry_allowed_length:2,dry_penalty_last_n:-1,max_tokens:-1,custom:""},t_={apiKey:"Set the API Key if you are using --api-key option for the server.",systemMessage:"The starting message that defines how model should behave.",samplers:'The order at which samplers are applied, in simplified way. Default is "dkypmxt": dry->top_k->typ_p->top_p->min_p->xtc->temperature',temperature:"Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.",dynatemp_range:"Addon for the temperature sampler. The added value to the range of dynamic temperature, which adjusts probabilities by entropy of tokens.",dynatemp_exponent:"Addon for the temperature sampler. Smoothes out the probability redistribution based on the most probable token.",top_k:"Keeps only k top tokens.",top_p:"Limits tokens to those that together have a cumulative probability of at least p",min_p:"Limits tokens based on the minimum probability for a token to be considered, relative to the probability of the most likely token.",xtc_probability:"XTC sampler cuts out top tokens; this parameter controls the chance of cutting tokens at all. 0 disables XTC.",xtc_threshold:"XTC sampler cuts out top tokens; this parameter controls the token probability that is required to cut that token.",typical_p:"Sorts and limits tokens based on the difference between log-probability and entropy.",repeat_last_n:"Last n tokens to consider for penalizing repetition",repeat_penalty:"Controls the repetition of token sequences in the generated text",presence_penalty:"Limits tokens based on whether they appear in the output or not.",frequency_penalty:"Limits tokens based on how often they appear in the output.",dry_multiplier:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling multiplier.",dry_base:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling base value.",dry_allowed_length:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the allowed length for DRY sampling.",dry_penalty_last_n:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets DRY penalty for the last n tokens.",max_tokens:"The maximum number of token per output.",custom:""},u_=Object.entries(ci).filter(e=>X3(e[1])).map(e=>e[0]),n_=["light","dark","cupcake","bumblebee","emerald","corporate","synthwave","retro","cyberpunk","valentine","halloween","garden","forest","aqua","lofi","pastel","fantasy","wireframe","black","luxury","dracula","cmyk","autumn","business","acid","lemonade","night","coffee","winter","dim","nord","sunset"],Jf=ln(e=>{const t=to(new at({breaks:!0})),u=t.value.renderer.rules.fence;t.value.renderer.rules.fence=(r,i,...s)=>{const o=r[i].content,c=u(r,i,...s);return`
+`);if(qt(this,Xn)){const i=u.indexOf("\r");if(i!==-1&&i!==u.length-1&&(r===-1||r-1>i)){const s=qt(this,_u).call(this,u.slice(0,crOrLfIndex));(qt(this,Wu)||s)&&n.enqueue(s),u=u.slice(i+1);continue}}if(r!==-1){let i=r;u[r-1]==="\r"&&i--;const s=qt(this,_u).call(this,u.slice(0,i));(qt(this,Wu)||s)&&n.enqueue(s),u=u.slice(r+1);continue}break}hn(this,Yn,u)};const J3=e=>!!e.toLowerCase,Y3=e=>e===!0||e===!1,X3=e=>!J3(e)&&!isNaN(e)&&!Y3(e),Q3=e=>e.replace(/>/g,">").replace(/"/g,"""),Zf=e=>navigator.clipboard.writeText(e),e_=localStorage.getItem("base")||new URL(".",document.baseURI).href.toString().replace(/\/$/,""),ci={apiKey:"",systemMessage:"You are a helpful assistant.",showTokensPerSecond:!1,samplers:"dkypmxt",temperature:.8,dynatemp_range:0,dynatemp_exponent:1,top_k:40,top_p:.95,min_p:.05,xtc_probability:0,xtc_threshold:.1,typical_p:1,repeat_last_n:64,repeat_penalty:1,presence_penalty:0,frequency_penalty:0,dry_multiplier:0,dry_base:1.75,dry_allowed_length:2,dry_penalty_last_n:-1,max_tokens:-1,custom:""},t_={apiKey:"Set the API Key if you are using --api-key option for the server.",systemMessage:"The starting message that defines how model should behave.",samplers:'The order at which samplers are applied, in simplified way. Default is "dkypmxt": dry->top_k->typ_p->top_p->min_p->xtc->temperature',temperature:"Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.",dynatemp_range:"Addon for the temperature sampler. The added value to the range of dynamic temperature, which adjusts probabilities by entropy of tokens.",dynatemp_exponent:"Addon for the temperature sampler. Smoothes out the probability redistribution based on the most probable token.",top_k:"Keeps only k top tokens.",top_p:"Limits tokens to those that together have a cumulative probability of at least p",min_p:"Limits tokens based on the minimum probability for a token to be considered, relative to the probability of the most likely token.",xtc_probability:"XTC sampler cuts out top tokens; this parameter controls the chance of cutting tokens at all. 0 disables XTC.",xtc_threshold:"XTC sampler cuts out top tokens; this parameter controls the token probability that is required to cut that token.",typical_p:"Sorts and limits tokens based on the difference between log-probability and entropy.",repeat_last_n:"Last n tokens to consider for penalizing repetition",repeat_penalty:"Controls the repetition of token sequences in the generated text",presence_penalty:"Limits tokens based on whether they appear in the output or not.",frequency_penalty:"Limits tokens based on how often they appear in the output.",dry_multiplier:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling multiplier.",dry_base:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling base value.",dry_allowed_length:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the allowed length for DRY sampling.",dry_penalty_last_n:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets DRY penalty for the last n tokens.",max_tokens:"The maximum number of token per output.",custom:""},u_=Object.entries(ci).filter(e=>X3(e[1])).map(e=>e[0]),n_=["light","dark","cupcake","bumblebee","emerald","corporate","synthwave","retro","cyberpunk","valentine","halloween","garden","forest","aqua","lofi","pastel","fantasy","wireframe","black","luxury","dracula","cmyk","autumn","business","acid","lemonade","night","coffee","winter","dim","nord","sunset"],Jf=ln(e=>{const t=to(new at({breaks:!0})),u=t.value.renderer.rules.fence;t.value.renderer.rules.fence=(r,i,...s)=>{const o=r[i].content,c=u(r,i,...s);return`
diff --git a/examples/server/webui/src/main.js b/examples/server/webui/src/main.js index 53adfb159..94a428eb3 100644 --- a/examples/server/webui/src/main.js +++ b/examples/server/webui/src/main.js @@ -14,7 +14,7 @@ const copyStr = (str) => navigator.clipboard.writeText(str); // constants const BASE_URL = localStorage.getItem('base') // for debugging - || (new URL('.', document.baseURI).href).toString(); // for production + || (new URL('.', document.baseURI).href).toString().replace(/\/$/, ''); // for production const CONFIG_DEFAULT = { // Note: in order not to introduce breaking changes, please keep the same data type (number, string, etc) if you want to change the default value. Do not use null or undefined for default value. apiKey: '',