@arcgis/coding-components 5.1.0-next.92 → 5.1.0-next.93

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.
@@ -9,27 +9,27 @@ function H(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedanti
9
9
  `)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=$(e[0],`
10
10
  `).split(`
11
11
  `),s="",r="",l=[];for(;t.length>0;){let i=!1,a=[],c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))a.push(t[c]),i=!0;else if(!i)a.push(t[c]);else break;t=t.slice(c);let o=a.join(`
12
- `),h=o.replace(this.rules.other.blockquoteSetextReplace,`
12
+ `),p=o.replace(this.rules.other.blockquoteSetextReplace,`
13
13
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
14
14
  ${o}`:o,r=r?`${r}
15
- ${h}`:h;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=p,t.length===0)break;let k=l.at(-1);if(k?.type==="code")break;if(k?.type==="blockquote"){let f=k,d=f.raw+`
15
+ ${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,l,!0),this.lexer.state.top=h,t.length===0)break;let g=l.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let f=g,d=f.raw+`
16
16
  `+t.join(`
17
- `),y=this.blockquote(d);l[l.length-1]=y,s=s.substring(0,s.length-f.raw.length)+y.raw,r=r.substring(0,r.length-f.text.length)+y.text;break}else if(k?.type==="list"){let f=k,d=f.raw+`
17
+ `),y=this.blockquote(d);l[l.length-1]=y,s=s.substring(0,s.length-f.raw.length)+y.raw,r=r.substring(0,r.length-f.text.length)+y.text;break}else if(g?.type==="list"){let f=g,d=f.raw+`
18
18
  `+t.join(`
19
- `),y=this.list(d);l[l.length-1]=y,s=s.substring(0,s.length-k.raw.length)+y.raw,r=r.substring(0,r.length-f.raw.length)+y.raw,t=d.substring(l.at(-1).raw.length).split(`
20
- `);continue}}return{type:"blockquote",raw:s,tokens:l,text:r}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),s=t.length>1,r={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let l=this.rules.other.listItemRegex(t),i=!1;for(;n;){let c=!1,o="",h="";if(!(e=l.exec(n))||this.rules.block.hr.test(n))break;o=e[0],n=n.substring(o.length);let p=nt(e[2].split(`
21
- `,1)[0],e[1].length),k=n.split(`
22
- `,1)[0],f=!p.trim(),d=0;if(this.options.pedantic?(d=2,h=p.trimStart()):f?d=e[1].length+1:(d=p.search(this.rules.other.nonSpaceChar),d=d>4?1:d,h=p.slice(d),d+=e[1].length),f&&this.rules.other.blankLine.test(k)&&(o+=k+`
23
- `,n=n.substring(k.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(d),J=this.rules.other.hrRegex(d),K=this.rules.other.fencesBeginRegex(d),V=this.rules.other.headingBeginRegex(d),fe=this.rules.other.htmlBeginRegex(d),xe=this.rules.other.blockquoteBeginRegex(d);for(;n;){let Z=n.split(`
24
- `,1)[0],A;if(k=Z,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),A=k):A=k.replace(this.rules.other.tabCharGlobal," "),K.test(k)||V.test(k)||fe.test(k)||xe.test(k)||y.test(k)||J.test(k))break;if(A.search(this.rules.other.nonSpaceChar)>=d||!k.trim())h+=`
25
- `+A.slice(d);else{if(f||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||K.test(p)||V.test(p)||J.test(p))break;h+=`
26
- `+k}f=!k.trim(),o+=Z+`
27
- `,n=n.substring(Z.length+1),p=A.slice(d)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(i=!0)),r.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),r.raw+=o}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c of r.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let o=this.rules.other.listTaskCheckbox.exec(c.raw);if(o){let h={type:"checkbox",raw:o[0]+" ",checked:o[0]!=="[ ]"};c.checked=h.checked,r.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}if(!r.loose){let o=c.tokens.filter(p=>p.type==="space"),h=o.length>0&&o.some(p=>this.rules.other.anyLine.test(p.raw));r.loose=h}}if(r.loose)for(let c of r.items){c.loose=!0;for(let o of c.tokens)o.type==="text"&&(o.type="paragraph")}return r}}html(n){let e=this.rules.block.html.exec(n);if(e){let t=se(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:$(e[0],`
19
+ `),y=this.list(d);l[l.length-1]=y,s=s.substring(0,s.length-g.raw.length)+y.raw,r=r.substring(0,r.length-f.raw.length)+y.raw,t=d.substring(l.at(-1).raw.length).split(`
20
+ `);continue}}return{type:"blockquote",raw:s,tokens:l,text:r}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),s=t.length>1,r={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let l=this.rules.other.listItemRegex(t),i=!1;for(;n;){let c=!1,o="",p="";if(!(e=l.exec(n))||this.rules.block.hr.test(n))break;o=e[0],n=n.substring(o.length);let h=nt(e[2].split(`
21
+ `,1)[0],e[1].length),g=n.split(`
22
+ `,1)[0],f=!h.trim(),d=0;if(this.options.pedantic?(d=2,p=h.trimStart()):f?d=e[1].length+1:(d=h.search(this.rules.other.nonSpaceChar),d=d>4?1:d,p=h.slice(d),d+=e[1].length),f&&this.rules.other.blankLine.test(g)&&(o+=g+`
23
+ `,n=n.substring(g.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(d),J=this.rules.other.hrRegex(d),K=this.rules.other.fencesBeginRegex(d),V=this.rules.other.headingBeginRegex(d),fe=this.rules.other.htmlBeginRegex(d),xe=this.rules.other.blockquoteBeginRegex(d);for(;n;){let Z=n.split(`
24
+ `,1)[0],A;if(g=Z,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),A=g):A=g.replace(this.rules.other.tabCharGlobal," "),K.test(g)||V.test(g)||fe.test(g)||xe.test(g)||y.test(g)||J.test(g))break;if(A.search(this.rules.other.nonSpaceChar)>=d||!g.trim())p+=`
25
+ `+A.slice(d);else{if(f||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||K.test(h)||V.test(h)||J.test(h))break;p+=`
26
+ `+g}f=!g.trim(),o+=Z+`
27
+ `,n=n.substring(Z.length+1),h=A.slice(d)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(i=!0)),r.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),r.raw+=o}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c of r.items){this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]);let o=c.tokens[0];if(c.task&&(o?.type==="text"||o?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),o.raw=o.raw.replace(this.rules.other.listReplaceTask,""),o.text=o.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let h={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=h.checked,r.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}else c.task&&(c.task=!1);if(!r.loose){let p=c.tokens.filter(g=>g.type==="space"),h=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=h}}if(r.loose)for(let c of r.items){c.loose=!0;for(let o of c.tokens)o.type==="text"&&(o.type="paragraph")}return r}}html(n){let e=this.rules.block.html.exec(n);if(e){let t=se(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:$(e[0],`
28
28
  `),href:s,title:r}}}table(n){let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=re(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
29
29
  `):[],l={type:"table",raw:$(e[0],`
30
30
  `),header:[],align:[],rows:[]};if(t.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?l.align.push("right"):this.rules.other.tableAlignCenter.test(i)?l.align.push("center"):this.rules.other.tableAlignLeft.test(i)?l.align.push("left"):l.align.push(null);for(let i=0;i<t.length;i++)l.header.push({text:t[i],tokens:this.lexer.inline(t[i]),header:!0,align:l.align[i]});for(let i of r)l.rows.push(re(i,l.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:l.align[c]})));return l}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e){let t=e[1].trim();return{type:"heading",raw:$(e[0],`
31
31
  `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
32
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let l=$(t.slice(0,-1),"\\");if((t.length-l.length)%2===0)return}else{let l=tt(e[2],"()");if(l===-2)return;if(l>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let s=e[2],r="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],r=l[3])}else r=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),le(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[s.toLowerCase()];if(!r){let l=t[0].charAt(0);return{type:"text",raw:l,text:l}}return le(t,r,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(n);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let r=[...s[0]].length-1,l,i,a=r,c=0,o=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*n.length+r);(s=o.exec(e))!==null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(i=[...l].length,s[3]||s[4]){a+=i;continue}else if((s[5]||s[6])&&r%3&&!((r+i)%3)){c+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+c);let h=[...s[0]][0].length,p=n.slice(0,r+s.index+h+i);if(Math.min(r,i)%2){let f=p.slice(1,-1);return{type:"em",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}let k=p.slice(2,-2);return{type:"strong",raw:p,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n,e,t=""){let s=this.rules.inline.delLDelim.exec(n);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let r=[...s[0]].length-1,l,i,a=r,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*n.length+r);(s=c.exec(e))!==null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l||(i=[...l].length,i!==r))continue;if(s[3]||s[4]){a+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a);let o=[...s[0]][0].length,h=n.slice(0,r+s.index+o+i),p=h.slice(r,-r);return{type:"del",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},b=class M{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||T,this.options.tokenizer=this.options.tokenizer||new C,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:x,block:I.normal,inline:_.normal};this.options.pedantic?(t.block=I.pedantic,t.inline=_.pedantic):this.options.gfm&&(t.block=I.gfm,this.options.breaks?t.inline=_.breaks:t.inline=_.gfm),this.tokenizer.rules=t}static get rules(){return{block:I,inline:_}}static lex(e,t){return new M(t).lex(e)}static lexInline(e,t){return new M(t).inlineTokens(e)}lex(e){e=e.replace(x.carriageReturn,`
32
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let l=$(t.slice(0,-1),"\\");if((t.length-l.length)%2===0)return}else{let l=tt(e[2],"()");if(l===-2)return;if(l>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let s=e[2],r="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],r=l[3])}else r=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),le(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[s.toLowerCase()];if(!r){let l=t[0].charAt(0);return{type:"text",raw:l,text:l}}return le(t,r,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(n);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let r=[...s[0]].length-1,l,i,a=r,c=0,o=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*n.length+r);(s=o.exec(e))!==null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(i=[...l].length,s[3]||s[4]){a+=i;continue}else if((s[5]||s[6])&&r%3&&!((r+i)%3)){c+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+c);let p=[...s[0]][0].length,h=n.slice(0,r+s.index+p+i);if(Math.min(r,i)%2){let f=h.slice(1,-1);return{type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}let g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n,e,t=""){let s=this.rules.inline.delLDelim.exec(n);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let r=[...s[0]].length-1,l,i,a=r,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*n.length+r);(s=c.exec(e))!==null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l||(i=[...l].length,i!==r))continue;if(s[3]||s[4]){a+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a);let o=[...s[0]][0].length,p=n.slice(0,r+s.index+o+i),h=p.slice(r,-r);return{type:"del",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},b=class M{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||T,this.options.tokenizer=this.options.tokenizer||new C,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:x,block:I.normal,inline:_.normal};this.options.pedantic?(t.block=I.pedantic,t.inline=_.pedantic):this.options.gfm&&(t.block=I.gfm,this.options.breaks?t.inline=_.breaks:t.inline=_.gfm),this.tokenizer.rules=t}static get rules(){return{block:I,inline:_}}static lex(e,t){return new M(t).lex(e)}static lexInline(e,t){return new M(t).inlineTokens(e)}lex(e){e=e.replace(x.carriageReturn,`
33
33
  `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(x.tabCharGlobal," ").replace(x.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let l;if(this.options.extensions?.block?.some(a=>(l=a.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.space(e)){e=e.substring(l.raw.length);let a=t.at(-1);l.raw.length===1&&a!==void 0?a.raw+=`
34
34
  `:t.push(l);continue}if(l=this.tokenizer.code(e)){e=e.substring(l.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
35
35
  `)?"":`
@@ -37,13 +37,13 @@ ${h}`:h;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
37
37
  `+l.text,this.inlineQueue.at(-1).src=a.text):t.push(l);continue}if(l=this.tokenizer.fences(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.heading(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.hr(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.blockquote(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.list(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.html(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.def(e)){e=e.substring(l.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
38
38
  `)?"":`
39
39
  `)+l.raw,a.text+=`
40
- `+l.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},t.push(l));continue}if(l=this.tokenizer.table(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),t.push(l);continue}let i=e;if(this.options.extensions?.startBlock){let a=1/0,c=e.slice(1),o;this.options.extensions.startBlock.forEach(h=>{o=h.call({lexer:this},c),typeof o=="number"&&o>=0&&(a=Math.min(a,o))}),a<1/0&&a>=0&&(i=e.substring(0,a+1))}if(this.state.top&&(l=this.tokenizer.paragraph(i))){let a=t.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
40
+ `+l.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},t.push(l));continue}if(l=this.tokenizer.table(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),t.push(l);continue}let i=e;if(this.options.extensions?.startBlock){let a=1/0,c=e.slice(1),o;this.options.extensions.startBlock.forEach(p=>{o=p.call({lexer:this},c),typeof o=="number"&&o>=0&&(a=Math.min(a,o))}),a<1/0&&a>=0&&(i=e.substring(0,a+1))}if(this.state.top&&(l=this.tokenizer.paragraph(i))){let a=t.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
41
41
  `)?"":`
42
42
  `)+l.raw,a.text+=`
43
43
  `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(l),s=i.length!==e.length,e=e.substring(l.raw.length);continue}if(l=this.tokenizer.text(e)){e=e.substring(l.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
44
44
  `)?"":`
45
45
  `)+l.raw,a.text+=`
46
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=e,r=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)o.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)l=r[2]?r[2].length:0,s=s.slice(0,r.index+l)+"["+"a".repeat(r[0].length-l-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let i=!1,a="",c=1/0;for(;e;){if(e.length<c)c=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(a=""),i=!1;let o;if(this.options.extensions?.inline?.some(p=>(o=p.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let p=t.at(-1);o.type==="text"&&p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,s,a)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,s,a)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let h=e;if(this.options.extensions?.startInline){let p=1/0,k=e.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},k),typeof f=="number"&&f>=0&&(p=Math.min(p,f))}),p<1/0&&p>=0&&(h=e.substring(0,p+1))}if(o=this.tokenizer.inlineText(h)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(a=o.raw.slice(-1)),i=!0;let p=t.at(-1);p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},q=class{options;parser;constructor(n){this.options=n||T}space(n){return""}code({text:n,lang:e,escaped:t}){let s=(e||"").match(x.notSpaceStart)?.[0],r=n.replace(x.endingNewline,"")+`
46
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=e,r=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)o.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)l=r[2]?r[2].length:0,s=s.slice(0,r.index+l)+"["+"a".repeat(r[0].length-l-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let i=!1,a="",c=1/0;for(;e;){if(e.length<c)c=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(a=""),i=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let h=t.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,s,a)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,s,a)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let p=e;if(this.options.extensions?.startInline){let h=1/0,g=e.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},g),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(p=e.substring(0,h+1))}if(o=this.tokenizer.inlineText(p)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(a=o.raw.slice(-1)),i=!0;let h=t.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},q=class{options;parser;constructor(n){this.options=n||T}space(n){return""}code({text:n,lang:e,escaped:t}){let s=(e||"").match(x.notSpaceStart)?.[0],r=n.replace(x.endingNewline,"")+`
47
47
  `;return s?'<pre><code class="language-'+m(s)+'">'+(t?r:m(r,!0))+`</code></pre>
48
48
  `:"<pre><code>"+(t?r:m(r,!0))+`</code></pre>
49
49
  `}blockquote({tokens:n}){return`<blockquote>
@@ -61,5 +61,5 @@ ${this.parser.parse(n)}</blockquote>
61
61
  `}tablerow({text:n}){return`<tr>
62
62
  ${n}</tr>
63
63
  `}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
64
- `}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${m(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let s=this.parser.parseInline(t),r=ne(n);if(r===null)return s;n=r;let l='<a href="'+n+'"';return e&&(l+=' title="'+m(e)+'"'),l+=">"+s+"</a>",l}image({href:n,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let r=ne(n);if(r===null)return m(t);n=r;let l=`<img src="${n}" alt="${m(t)}"`;return e&&(l+=` title="${m(e)}"`),l+=">",l}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:m(n.text)}},U=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}checkbox({raw:n}){return n}},w=class Q{options;renderer;textRenderer;constructor(e){this.options=e||T,this.options.renderer=this.options.renderer||new q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new U}static parse(e,t){return new Q(t).parse(e)}static parseInline(e,t){return new Q(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let i=r,a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.type)){t+=a||"";continue}}let l=r;switch(l.type){case"space":{t+=this.renderer.space(l);break}case"hr":{t+=this.renderer.hr(l);break}case"heading":{t+=this.renderer.heading(l);break}case"code":{t+=this.renderer.code(l);break}case"table":{t+=this.renderer.table(l);break}case"blockquote":{t+=this.renderer.blockquote(l);break}case"list":{t+=this.renderer.list(l);break}case"checkbox":{t+=this.renderer.checkbox(l);break}case"html":{t+=this.renderer.html(l);break}case"def":{t+=this.renderer.def(l);break}case"paragraph":{t+=this.renderer.paragraph(l);break}case"text":{t+=this.renderer.text(l);break}default:{let i='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let l=e[r];if(this.options.extensions?.renderers?.[l.type]){let a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=a||"";continue}}let i=l;switch(i.type){case"escape":{s+=t.text(i);break}case"html":{s+=t.html(i);break}case"link":{s+=t.link(i);break}case"image":{s+=t.image(i);break}case"checkbox":{s+=t.checkbox(i);break}case"strong":{s+=t.strong(i);break}case"em":{s+=t.em(i);break}case"codespan":{s+=t.codespan(i);break}case"br":{s+=t.br(i);break}case"del":{s+=t.del(i);break}case"text":{s+=t.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},P=class{options;block;constructor(n){this.options=n||T}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(n=this.block){return n?b.lex:b.lexInline}provideParser(n=this.block){return n?w.parse:w.parseInline}},st=class{defaults=H();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=w;Renderer=q;TextRenderer=U;Lexer=b;Tokenizer=C;Hooks=P;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(let s of n)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let r=s;for(let l of r.header)t=t.concat(this.walkTokens(l.tokens,e));for(let l of r.rows)for(let i of l)t=t.concat(this.walkTokens(i.tokens,e));break}case"list":{let r=s;t=t.concat(this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(l=>{let i=r[l].flat(1/0);t=t.concat(this.walkTokens(i,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let l=e.renderers[r.name];l?e.renderers[r.name]=function(...i){let a=r.renderer.apply(this,i);return a===!1&&(a=l.apply(this,i)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[r.level];l?l.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),t.renderer){let r=this.defaults.renderer||new q(this.defaults);for(let l in t.renderer){if(!(l in r))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let i=l,a=t.renderer[i],c=r[i];r[i]=(...o)=>{let h=a.apply(r,o);return h===!1&&(h=c.apply(r,o)),h||""}}s.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new C(this.defaults);for(let l in t.tokenizer){if(!(l in r))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let i=l,a=t.tokenizer[i],c=r[i];r[i]=(...o)=>{let h=a.apply(r,o);return h===!1&&(h=c.apply(r,o)),h}}s.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new P;for(let l in t.hooks){if(!(l in r))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let i=l,a=t.hooks[i],c=r[i];P.passThroughHooks.has(l)?r[i]=o=>{if(this.defaults.async&&P.passThroughHooksRespectAsync.has(l))return(async()=>{let p=await a.call(r,o);return c.call(r,p)})();let h=a.call(r,o);return c.call(r,h)}:r[i]=(...o)=>{if(this.defaults.async)return(async()=>{let p=await a.apply(r,o);return p===!1&&(p=await c.apply(r,o)),p})();let h=a.apply(r,o);return h===!1&&(h=c.apply(r,o)),h}}s.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,l=t.walkTokens;s.walkTokens=function(i){let a=[];return a.push(l.call(this,i)),r&&(a=a.concat(r.call(this,i))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return b.lex(n,e??this.defaults)}parser(n,e){return w.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let s={...t},r={...this.defaults,...s},l=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=n),r.async)return(async()=>{let i=r.hooks?await r.hooks.preprocess(e):e,a=await(r.hooks?await r.hooks.provideLexer(n):n?b.lex:b.lexInline)(i,r),c=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(c,r.walkTokens));let o=await(r.hooks?await r.hooks.provideParser(n):n?w.parse:w.parseInline)(c,r);return r.hooks?await r.hooks.postprocess(o):o})().catch(l);try{r.hooks&&(e=r.hooks.preprocess(e));let i=(r.hooks?r.hooks.provideLexer(n):n?b.lex:b.lexInline)(e,r);r.hooks&&(i=r.hooks.processAllTokens(i)),r.walkTokens&&this.walkTokens(i,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(n):n?w.parse:w.parseInline)(i,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(i){return l(i)}}}onError(n,e){return t=>{if(t.message+=`
65
- Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+m(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},R=new st;function g(n,e){return R.parse(n,e)}g.options=g.setOptions=function(n){return R.setOptions(n),g.defaults=R.defaults,ie(g.defaults),g};g.getDefaults=H;g.defaults=T;g.use=function(...n){return R.use(...n),g.defaults=R.defaults,ie(g.defaults),g};g.walkTokens=function(n,e){return R.walkTokens(n,e)};g.parseInline=R.parseInline;g.Parser=w;g.parser=w.parse;g.Renderer=q;g.TextRenderer=U;g.Lexer=b;g.lexer=b.lex;g.Tokenizer=C;g.Hooks=P;g.parse=g;g.options;g.setOptions;g.use;g.walkTokens;g.parseInline;w.parse;b.lex;g.use({gfm:!0,breaks:!0,async:!1,renderer:{link({href:n,title:e,tokens:t}){let s=this.parser.parseInline(t);return`<calcite-link href="${n}" title="${e??s}" target="Arcade Help">${s}</calcite-link>`},code({lang:n,text:e}){return`<arcgis-code-viewer language="${n==="sql"?"arcgis-sql-expression":n}">${e}</arcgis-code-viewer>`}}});function lt(n){return n==null?"":g.parse(typeof n=="string"?n:n.value,{async:!1})}export{lt as a};
64
+ `}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${m(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let s=this.parser.parseInline(t),r=ne(n);if(r===null)return s;n=r;let l='<a href="'+n+'"';return e&&(l+=' title="'+m(e)+'"'),l+=">"+s+"</a>",l}image({href:n,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let r=ne(n);if(r===null)return m(t);n=r;let l=`<img src="${n}" alt="${m(t)}"`;return e&&(l+=` title="${m(e)}"`),l+=">",l}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:m(n.text)}},U=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}checkbox({raw:n}){return n}},w=class Q{options;renderer;textRenderer;constructor(e){this.options=e||T,this.options.renderer=this.options.renderer||new q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new U}static parse(e,t){return new Q(t).parse(e)}static parseInline(e,t){return new Q(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let i=r,a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.type)){t+=a||"";continue}}let l=r;switch(l.type){case"space":{t+=this.renderer.space(l);break}case"hr":{t+=this.renderer.hr(l);break}case"heading":{t+=this.renderer.heading(l);break}case"code":{t+=this.renderer.code(l);break}case"table":{t+=this.renderer.table(l);break}case"blockquote":{t+=this.renderer.blockquote(l);break}case"list":{t+=this.renderer.list(l);break}case"checkbox":{t+=this.renderer.checkbox(l);break}case"html":{t+=this.renderer.html(l);break}case"def":{t+=this.renderer.def(l);break}case"paragraph":{t+=this.renderer.paragraph(l);break}case"text":{t+=this.renderer.text(l);break}default:{let i='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let l=e[r];if(this.options.extensions?.renderers?.[l.type]){let a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=a||"";continue}}let i=l;switch(i.type){case"escape":{s+=t.text(i);break}case"html":{s+=t.html(i);break}case"link":{s+=t.link(i);break}case"image":{s+=t.image(i);break}case"checkbox":{s+=t.checkbox(i);break}case"strong":{s+=t.strong(i);break}case"em":{s+=t.em(i);break}case"codespan":{s+=t.codespan(i);break}case"br":{s+=t.br(i);break}case"del":{s+=t.del(i);break}case"text":{s+=t.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},P=class{options;block;constructor(n){this.options=n||T}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(n=this.block){return n?b.lex:b.lexInline}provideParser(n=this.block){return n?w.parse:w.parseInline}},st=class{defaults=H();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=w;Renderer=q;TextRenderer=U;Lexer=b;Tokenizer=C;Hooks=P;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(let s of n)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let r=s;for(let l of r.header)t=t.concat(this.walkTokens(l.tokens,e));for(let l of r.rows)for(let i of l)t=t.concat(this.walkTokens(i.tokens,e));break}case"list":{let r=s;t=t.concat(this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(l=>{let i=r[l].flat(1/0);t=t.concat(this.walkTokens(i,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let l=e.renderers[r.name];l?e.renderers[r.name]=function(...i){let a=r.renderer.apply(this,i);return a===!1&&(a=l.apply(this,i)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[r.level];l?l.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),t.renderer){let r=this.defaults.renderer||new q(this.defaults);for(let l in t.renderer){if(!(l in r))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let i=l,a=t.renderer[i],c=r[i];r[i]=(...o)=>{let p=a.apply(r,o);return p===!1&&(p=c.apply(r,o)),p||""}}s.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new C(this.defaults);for(let l in t.tokenizer){if(!(l in r))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let i=l,a=t.tokenizer[i],c=r[i];r[i]=(...o)=>{let p=a.apply(r,o);return p===!1&&(p=c.apply(r,o)),p}}s.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new P;for(let l in t.hooks){if(!(l in r))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let i=l,a=t.hooks[i],c=r[i];P.passThroughHooks.has(l)?r[i]=o=>{if(this.defaults.async&&P.passThroughHooksRespectAsync.has(l))return(async()=>{let h=await a.call(r,o);return c.call(r,h)})();let p=a.call(r,o);return c.call(r,p)}:r[i]=(...o)=>{if(this.defaults.async)return(async()=>{let h=await a.apply(r,o);return h===!1&&(h=await c.apply(r,o)),h})();let p=a.apply(r,o);return p===!1&&(p=c.apply(r,o)),p}}s.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,l=t.walkTokens;s.walkTokens=function(i){let a=[];return a.push(l.call(this,i)),r&&(a=a.concat(r.call(this,i))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return b.lex(n,e??this.defaults)}parser(n,e){return w.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let s={...t},r={...this.defaults,...s},l=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=n),r.async)return(async()=>{let i=r.hooks?await r.hooks.preprocess(e):e,a=await(r.hooks?await r.hooks.provideLexer(n):n?b.lex:b.lexInline)(i,r),c=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(c,r.walkTokens));let o=await(r.hooks?await r.hooks.provideParser(n):n?w.parse:w.parseInline)(c,r);return r.hooks?await r.hooks.postprocess(o):o})().catch(l);try{r.hooks&&(e=r.hooks.preprocess(e));let i=(r.hooks?r.hooks.provideLexer(n):n?b.lex:b.lexInline)(e,r);r.hooks&&(i=r.hooks.processAllTokens(i)),r.walkTokens&&this.walkTokens(i,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(n):n?w.parse:w.parseInline)(i,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(i){return l(i)}}}onError(n,e){return t=>{if(t.message+=`
65
+ Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+m(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},R=new st;function k(n,e){return R.parse(n,e)}k.options=k.setOptions=function(n){return R.setOptions(n),k.defaults=R.defaults,ie(k.defaults),k};k.getDefaults=H;k.defaults=T;k.use=function(...n){return R.use(...n),k.defaults=R.defaults,ie(k.defaults),k};k.walkTokens=function(n,e){return R.walkTokens(n,e)};k.parseInline=R.parseInline;k.Parser=w;k.parser=w.parse;k.Renderer=q;k.TextRenderer=U;k.Lexer=b;k.lexer=b.lex;k.Tokenizer=C;k.Hooks=P;k.parse=k;k.options;k.setOptions;k.use;k.walkTokens;k.parseInline;w.parse;b.lex;k.use({gfm:!0,breaks:!0,async:!1,renderer:{link({href:n,title:e,tokens:t}){let s=this.parser.parseInline(t);return`<calcite-link href="${n}" title="${e??s}" target="Arcade Help">${s}</calcite-link>`},code({lang:n,text:e}){return`<arcgis-code-viewer language="${n==="sql"?"arcgis-sql-expression":n}">${e}</arcgis-code-viewer>`}}});function lt(n){return n==null?"":k.parse(typeof n=="string"?n:n.value,{async:!1})}export{lt as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as n}from"./NYL3WO6Q.js";import{a as g}from"./AHFU2DJA.js";import"./G56LJGLK.js";import{a as f}from"./BA546EMZ.js";import"./MJ7MJPGA.js";import"./MTIHPCIF.js";import{g as p,h as u}from"./6G5URSC7.js";import{F as a,G as d,K as h,h as m,j as s,n as c,s as o}from"./SM3MA3KP.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var b=m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`,r=class extends d{constructor(){super(...arguments),this.messages=f(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._filterValue="",this.languageId="arcade",this.hideDocumentationActions=!1,this.loading=!1,this.closed=!1,this.arcgisInternalClosePanel=c({bubbles:!1,composed:!1}),this.arcgisInternalItemSelected=c({bubbles:!1,composed:!1})}static{this.properties={_filterValue:16,_selectedApiItem:16,languageId:1,apiLibrary:0,hideDocumentationActions:5,loading:5,closed:5}}static{this.styles=b}willUpdate(e){if(e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisInternalClosePanel.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples))}renderApiCategory(e){let i=g(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${o(t.completion.detail)} @calciteListItemSelect=${l=>this._emitItemSelected(l,t)} @keydown=${l=>this._emitItemSelected(l,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${l=>this._selectItem(l,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${a(p)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${o(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${a(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){if(this.closed)return null;let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<calcite-flow ${a(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list .label=${this.messages.api??"API"}>${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};h("arcgis-language-api-panel",r);export{r as ArcgisLanguageApiPanel};
2
+ import{a as n}from"./6TBGTZVD.js";import{a as g}from"./AHFU2DJA.js";import"./G56LJGLK.js";import{a as f}from"./BA546EMZ.js";import"./MJ7MJPGA.js";import"./MTIHPCIF.js";import{g as p,h as u}from"./6G5URSC7.js";import{F as a,G as d,K as h,h as m,j as s,n as c,s as o}from"./SM3MA3KP.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var b=m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`,r=class extends d{constructor(){super(...arguments),this.messages=f(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._filterValue="",this.languageId="arcade",this.hideDocumentationActions=!1,this.loading=!1,this.closed=!1,this.arcgisInternalClosePanel=c({bubbles:!1,composed:!1}),this.arcgisInternalItemSelected=c({bubbles:!1,composed:!1})}static{this.properties={_filterValue:16,_selectedApiItem:16,languageId:1,apiLibrary:0,hideDocumentationActions:5,loading:5,closed:5}}static{this.styles=b}willUpdate(e){if(e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisInternalClosePanel.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples))}renderApiCategory(e){let i=g(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${o(t.completion.detail)} @calciteListItemSelect=${l=>this._emitItemSelected(l,t)} @keydown=${l=>this._emitItemSelected(l,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${l=>this._selectItem(l,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${a(p)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${o(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${a(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){if(this.closed)return null;let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<calcite-flow ${a(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list .label=${this.messages.api??"API"}>${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};h("arcgis-language-api-panel",r);export{r as ArcgisLanguageApiPanel};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b,c as r,d as _}from"./SMAQD57G.js";import{a as v}from"./NYL3WO6Q.js";import{a as f}from"./AHFU2DJA.js";import"./G56LJGLK.js";import"./ER2MKLVA.js";import{a as p}from"./BA546EMZ.js";import"./MJ7MJPGA.js";import"./MTIHPCIF.js";import{g as h,h as m}from"./6G5URSC7.js";import"./6C52UOYL.js";import{F as c,G as d,K as u,h as g,j as s,l,n as a}from"./SM3MA3KP.js";import"./BCUUVBXH.js";import"./B3UMUBOI.js";import"./CF3TERM3.js";import"./Z5ZZ36DQ.js";import"./LLPQEURF.js";import"./3TTFCHAA.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=g`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`,n=class extends d{constructor(){super(...arguments),this._beforeBack=async()=>{this._selectedSuggestion=void 0},this.messages=p(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisInternalClosePanel=a({bubbles:!1,composed:!1}),this.arcgisInternalItemSelected=a({bubbles:!1,composed:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=_(()=>this._colorizeStyle=r())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{m(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget?.value??""}_emitItemSelected(e,t){let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisInternalClosePanel.emit()}_colorizeCode(e){e!==void 0&&b(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=f(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??l}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??l}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??l} ${c(h)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${v(e.documentation)??""}></div><pre><code ${c(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list .label=${this.messages.suggestions??"Suggestions"}>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};u("arcgis-arcade-suggestions",n);export{n as ArcgisArcadeSuggestions};
2
+ import{b,c as r,d as _}from"./SMAQD57G.js";import{a as v}from"./6TBGTZVD.js";import{a as f}from"./AHFU2DJA.js";import"./G56LJGLK.js";import"./ER2MKLVA.js";import{a as p}from"./BA546EMZ.js";import"./MJ7MJPGA.js";import"./MTIHPCIF.js";import{g as h,h as m}from"./6G5URSC7.js";import"./6C52UOYL.js";import{F as c,G as d,K as u,h as g,j as s,l,n as a}from"./SM3MA3KP.js";import"./BCUUVBXH.js";import"./B3UMUBOI.js";import"./CF3TERM3.js";import"./Z5ZZ36DQ.js";import"./LLPQEURF.js";import"./3TTFCHAA.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=g`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`,n=class extends d{constructor(){super(...arguments),this._beforeBack=async()=>{this._selectedSuggestion=void 0},this.messages=p(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisInternalClosePanel=a({bubbles:!1,composed:!1}),this.arcgisInternalItemSelected=a({bubbles:!1,composed:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=_(()=>this._colorizeStyle=r())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{m(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget?.value??""}_emitItemSelected(e,t){let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisInternalClosePanel.emit()}_colorizeCode(e){e!==void 0&&b(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=f(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??l}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??l}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??l} ${c(h)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${v(e.documentation)??""}></div><pre><code ${c(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list .label=${this.messages.suggestions??"Suggestions"}>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};u("arcgis-arcade-suggestions",n);export{n as ArcgisArcadeSuggestions};
@@ -18248,7 +18248,7 @@ function se(t, e, r, n) {
18248
18248
  const cr = { apiKey: void 0, apiKeys: { scopes: [] }, applicationName: "", applicationUrl: globalThis.location?.href, assetsPath: "", fontsUrl: "https://static.arcgis.com/fonts", geometryServiceUrl: "https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer", geoRSSServiceUrl: "https://utility.arcgis.com/sharing/rss", kmlServiceUrl: "https://utility.arcgis.com/sharing/kml", userPrivilegesApplied: !0, portalUrl: "https://www.arcgis.com", respectPrefersReducedMotion: !0, routeServiceUrl: "https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World", workers: { loaderConfig: { has: {}, paths: {}, map: {}, packages: [] } }, request: { crossOriginNoCorsDomains: null, httpsDomains: ["arcgis.com", "arcgisonline.com", "esrikr.com", "premiumservices.blackbridge.com", "esripremium.accuweather.com", "gbm.digitalglobe.com", "firstlook.digitalglobe.com", "msi.digitalglobe.com"], interceptors: [], internalInterceptors: [], maxUrlLength: 2e3, priority: "high", proxyRules: [], proxyUrl: null, timeout: 62e3, trustedServers: [], useIdentity: !0 }, log: { interceptors: [], level: null } };
18249
18249
  if (globalThis.esriConfig && (H4(cr, globalThis.esriConfig, !0), delete cr.has), !cr.assetsPath) {
18250
18250
  {
18251
- const t = "5.1.0-next.90";
18251
+ const t = "5.1.0-next.91";
18252
18252
  cr.assetsPath = `https://cdn.jsdelivr.net/npm/@arcgis/core@${t}/assets`;
18253
18253
  }
18254
18254
  cr.defaultAssetsPath = cr.assetsPath;
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{J as s,v as e}from"./SM3MA3KP.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var r=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./VJG7CIFY.js"),"appVersion,assistantsEnabled,closed,closePanel:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-debugger-console":[()=>import("./UB7TEPYB.js"),"debuggerStore:,modelId"],"arcgis-arcade-debugger-output":[()=>import("./6BS5M2LA.js"),"debuggerStore:,result:"],"arcgis-arcade-editor":[()=>import("./W7UVGDPL.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,enableDebugger,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./ODCW355N.js"),"consoleLogs:,hideHeader,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./YVB23BMR.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./JHCVXLYB.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./Q376WIX4.js")],"arcgis-code-viewer":[()=>import("./UFDDEHND.js"),"language,lineNumbers,round"],"arcgis-editor-variables":[()=>import("./FEYQMPLI.js"),"closed,heading,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./QQQCEVQW.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./MR5ZGLNC.js"),"hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./C2NTBAZK.js"),"editorInstance:,editorOptions:,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script;setFocus"]});r({resourcesUrl:import.meta.url});var i=new CSSStyleSheet;i.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor,arcgis-sql-layer-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,i];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
2
+ import{J as s,v as e}from"./SM3MA3KP.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var r=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./VJG7CIFY.js"),"appVersion,assistantsEnabled,closed,closePanel:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-debugger-console":[()=>import("./UB7TEPYB.js"),"debuggerStore:,modelId"],"arcgis-arcade-debugger-output":[()=>import("./6BS5M2LA.js"),"debuggerStore:,result:"],"arcgis-arcade-editor":[()=>import("./W7UVGDPL.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,enableDebugger,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./ODCW355N.js"),"consoleLogs:,hideHeader,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./R5QVN7GZ.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./JHCVXLYB.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./Q376WIX4.js")],"arcgis-code-viewer":[()=>import("./UFDDEHND.js"),"language,lineNumbers,round"],"arcgis-editor-variables":[()=>import("./FEYQMPLI.js"),"closed,heading,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./EOGGHL44.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./MR5ZGLNC.js"),"hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./C2NTBAZK.js"),"editorInstance:,editorOptions:,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script;setFocus"]});r({resourcesUrl:import.meta.url});var i=new CSSStyleSheet;i.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor,arcgis-sql-layer-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,i];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
@@ -152,26 +152,26 @@ var C = class {
152
152
  else break;
153
153
  t = t.slice(c);
154
154
  let o = a.join(`
155
- `), h = o.replace(this.rules.other.blockquoteSetextReplace, `
155
+ `), p = o.replace(this.rules.other.blockquoteSetextReplace, `
156
156
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
157
157
  s = s ? `${s}
158
158
  ${o}` : o, n = n ? `${n}
159
- ${h}` : h;
160
- let p = this.lexer.state.top;
161
- if (this.lexer.state.top = !0, this.lexer.blockTokens(h, i, !0), this.lexer.state.top = p, t.length === 0) break;
162
- let k = i.at(-1);
163
- if (k?.type === "code") break;
164
- if (k?.type === "blockquote") {
165
- let d = k, f = d.raw + `
159
+ ${p}` : p;
160
+ let h = this.lexer.state.top;
161
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(p, i, !0), this.lexer.state.top = h, t.length === 0) break;
162
+ let g = i.at(-1);
163
+ if (g?.type === "code") break;
164
+ if (g?.type === "blockquote") {
165
+ let d = g, f = d.raw + `
166
166
  ` + t.join(`
167
167
  `), y = this.blockquote(f);
168
168
  i[i.length - 1] = y, s = s.substring(0, s.length - d.raw.length) + y.raw, n = n.substring(0, n.length - d.text.length) + y.text;
169
169
  break;
170
- } else if (k?.type === "list") {
171
- let d = k, f = d.raw + `
170
+ } else if (g?.type === "list") {
171
+ let d = g, f = d.raw + `
172
172
  ` + t.join(`
173
173
  `), y = this.list(f);
174
- i[i.length - 1] = y, s = s.substring(0, s.length - k.raw.length) + y.raw, n = n.substring(0, n.length - d.raw.length) + y.raw, t = f.substring(i.at(-1).raw.length).split(`
174
+ i[i.length - 1] = y, s = s.substring(0, s.length - g.raw.length) + y.raw, n = n.substring(0, n.length - d.raw.length) + y.raw, t = f.substring(i.at(-1).raw.length).split(`
175
175
  `);
176
176
  continue;
177
177
  }
@@ -186,53 +186,53 @@ ${h}` : h;
186
186
  t = s ? `\\d{1,9}\\${t.slice(-1)}` : `\\${t}`, this.options.pedantic && (t = s ? t : "[*+-]");
187
187
  let i = this.rules.other.listItemRegex(t), l = !1;
188
188
  for (; r; ) {
189
- let c = !1, o = "", h = "";
189
+ let c = !1, o = "", p = "";
190
190
  if (!(e = i.exec(r)) || this.rules.block.hr.test(r)) break;
191
191
  o = e[0], r = r.substring(o.length);
192
- let p = rt(e[2].split(`
193
- `, 1)[0], e[1].length), k = r.split(`
194
- `, 1)[0], d = !p.trim(), f = 0;
195
- if (this.options.pedantic ? (f = 2, h = p.trimStart()) : d ? f = e[1].length + 1 : (f = p.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, h = p.slice(f), f += e[1].length), d && this.rules.other.blankLine.test(k) && (o += k + `
196
- `, r = r.substring(k.length + 1), c = !0), !c) {
192
+ let h = rt(e[2].split(`
193
+ `, 1)[0], e[1].length), g = r.split(`
194
+ `, 1)[0], d = !h.trim(), f = 0;
195
+ if (this.options.pedantic ? (f = 2, p = h.trimStart()) : d ? f = e[1].length + 1 : (f = h.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, p = h.slice(f), f += e[1].length), d && this.rules.other.blankLine.test(g) && (o += g + `
196
+ `, r = r.substring(g.length + 1), c = !0), !c) {
197
197
  let y = this.rules.other.nextBulletRegex(f), J = this.rules.other.hrRegex(f), K = this.rules.other.fencesBeginRegex(f), V = this.rules.other.headingBeginRegex(f), de = this.rules.other.htmlBeginRegex(f), xe = this.rules.other.blockquoteBeginRegex(f);
198
198
  for (; r; ) {
199
199
  let Z = r.split(`
200
200
  `, 1)[0], A;
201
- if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), A = k) : A = k.replace(this.rules.other.tabCharGlobal, " "), K.test(k) || V.test(k) || de.test(k) || xe.test(k) || y.test(k) || J.test(k)) break;
202
- if (A.search(this.rules.other.nonSpaceChar) >= f || !k.trim()) h += `
201
+ if (g = Z, this.options.pedantic ? (g = g.replace(this.rules.other.listReplaceNesting, " "), A = g) : A = g.replace(this.rules.other.tabCharGlobal, " "), K.test(g) || V.test(g) || de.test(g) || xe.test(g) || y.test(g) || J.test(g)) break;
202
+ if (A.search(this.rules.other.nonSpaceChar) >= f || !g.trim()) p += `
203
203
  ` + A.slice(f);
204
204
  else {
205
- if (d || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || K.test(p) || V.test(p) || J.test(p)) break;
206
- h += `
207
- ` + k;
205
+ if (d || h.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || K.test(h) || V.test(h) || J.test(h)) break;
206
+ p += `
207
+ ` + g;
208
208
  }
209
- d = !k.trim(), o += Z + `
210
- `, r = r.substring(Z.length + 1), p = A.slice(f);
209
+ d = !g.trim(), o += Z + `
210
+ `, r = r.substring(Z.length + 1), h = A.slice(f);
211
211
  }
212
212
  }
213
- n.loose || (l ? n.loose = !0 : this.rules.other.doubleBlankLine.test(o) && (l = !0)), n.items.push({ type: "list_item", raw: o, task: !!this.options.gfm && this.rules.other.listIsTask.test(h), loose: !1, text: h, tokens: [] }), n.raw += o;
213
+ n.loose || (l ? n.loose = !0 : this.rules.other.doubleBlankLine.test(o) && (l = !0)), n.items.push({ type: "list_item", raw: o, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: !1, text: p, tokens: [] }), n.raw += o;
214
214
  }
215
215
  let a = n.items.at(-1);
216
216
  if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
217
217
  else return;
218
218
  n.raw = n.raw.trimEnd();
219
219
  for (let c of n.items) {
220
- if (this.lexer.state.top = !1, c.tokens = this.lexer.blockTokens(c.text, []), c.task) {
221
- if (c.text = c.text.replace(this.rules.other.listReplaceTask, ""), c.tokens[0]?.type === "text" || c.tokens[0]?.type === "paragraph") {
222
- c.tokens[0].raw = c.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), c.tokens[0].text = c.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
223
- for (let h = this.lexer.inlineQueue.length - 1; h >= 0; h--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)) {
224
- this.lexer.inlineQueue[h].src = this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask, "");
225
- break;
226
- }
220
+ this.lexer.state.top = !1, c.tokens = this.lexer.blockTokens(c.text, []);
221
+ let o = c.tokens[0];
222
+ if (c.task && (o?.type === "text" || o?.type === "paragraph")) {
223
+ c.text = c.text.replace(this.rules.other.listReplaceTask, ""), o.raw = o.raw.replace(this.rules.other.listReplaceTask, ""), o.text = o.text.replace(this.rules.other.listReplaceTask, "");
224
+ for (let h = this.lexer.inlineQueue.length - 1; h >= 0; h--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)) {
225
+ this.lexer.inlineQueue[h].src = this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask, "");
226
+ break;
227
227
  }
228
- let o = this.rules.other.listTaskCheckbox.exec(c.raw);
229
- if (o) {
230
- let h = { type: "checkbox", raw: o[0] + " ", checked: o[0] !== "[ ]" };
228
+ let p = this.rules.other.listTaskCheckbox.exec(c.raw);
229
+ if (p) {
230
+ let h = { type: "checkbox", raw: p[0] + " ", checked: p[0] !== "[ ]" };
231
231
  c.checked = h.checked, n.loose ? c.tokens[0] && ["paragraph", "text"].includes(c.tokens[0].type) && "tokens" in c.tokens[0] && c.tokens[0].tokens ? (c.tokens[0].raw = h.raw + c.tokens[0].raw, c.tokens[0].text = h.raw + c.tokens[0].text, c.tokens[0].tokens.unshift(h)) : c.tokens.unshift({ type: "paragraph", raw: h.raw, text: h.raw, tokens: [h] }) : c.tokens.unshift(h);
232
232
  }
233
- }
233
+ } else c.task && (c.task = !1);
234
234
  if (!n.loose) {
235
- let o = c.tokens.filter((p) => p.type === "space"), h = o.length > 0 && o.some((p) => this.rules.other.anyLine.test(p.raw));
235
+ let p = c.tokens.filter((g) => g.type === "space"), h = p.length > 0 && p.some((g) => this.rules.other.anyLine.test(g.raw));
236
236
  n.loose = h;
237
237
  }
238
238
  }
@@ -349,13 +349,13 @@ ${h}` : h;
349
349
  }
350
350
  if (a -= l, a > 0) continue;
351
351
  l = Math.min(l, l + a + c);
352
- let h = [...s[0]][0].length, p = r.slice(0, n + s.index + h + l);
352
+ let p = [...s[0]][0].length, h = r.slice(0, n + s.index + p + l);
353
353
  if (Math.min(n, l) % 2) {
354
- let d = p.slice(1, -1);
355
- return { type: "em", raw: p, text: d, tokens: this.lexer.inlineTokens(d) };
354
+ let d = h.slice(1, -1);
355
+ return { type: "em", raw: h, text: d, tokens: this.lexer.inlineTokens(d) };
356
356
  }
357
- let k = p.slice(2, -2);
358
- return { type: "strong", raw: p, text: k, tokens: this.lexer.inlineTokens(k) };
357
+ let g = h.slice(2, -2);
358
+ return { type: "strong", raw: h, text: g, tokens: this.lexer.inlineTokens(g) };
359
359
  }
360
360
  }
361
361
  }
@@ -382,8 +382,8 @@ ${h}` : h;
382
382
  }
383
383
  if (a -= l, a > 0) continue;
384
384
  l = Math.min(l, l + a);
385
- let o = [...s[0]][0].length, h = r.slice(0, n + s.index + o + l), p = h.slice(n, -n);
386
- return { type: "del", raw: h, text: p, tokens: this.lexer.inlineTokens(p) };
385
+ let o = [...s[0]][0].length, p = r.slice(0, n + s.index + o + l), h = p.slice(n, -n);
386
+ return { type: "del", raw: p, text: h, tokens: this.lexer.inlineTokens(h) };
387
387
  }
388
388
  }
389
389
  }
@@ -516,8 +516,8 @@ ${h}` : h;
516
516
  let l = e;
517
517
  if (this.options.extensions?.startBlock) {
518
518
  let a = 1 / 0, c = e.slice(1), o;
519
- this.options.extensions.startBlock.forEach((h) => {
520
- o = h.call({ lexer: this }, c), typeof o == "number" && o >= 0 && (a = Math.min(a, o));
519
+ this.options.extensions.startBlock.forEach((p) => {
520
+ o = p.call({ lexer: this }, c), typeof o == "number" && o >= 0 && (a = Math.min(a, o));
521
521
  }), a < 1 / 0 && a >= 0 && (l = e.substring(0, a + 1));
522
522
  }
523
523
  if (this.state.top && (i = this.tokenizer.paragraph(l))) {
@@ -567,7 +567,7 @@ ${h}` : h;
567
567
  }
568
568
  l || (a = ""), l = !1;
569
569
  let o;
570
- if (this.options.extensions?.inline?.some((p) => (o = p.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), !0) : !1)) continue;
570
+ if (this.options.extensions?.inline?.some((h) => (o = h.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), !0) : !1)) continue;
571
571
  if (o = this.tokenizer.escape(e)) {
572
572
  e = e.substring(o.raw.length), t.push(o);
573
573
  continue;
@@ -582,8 +582,8 @@ ${h}` : h;
582
582
  }
583
583
  if (o = this.tokenizer.reflink(e, this.tokens.links)) {
584
584
  e = e.substring(o.raw.length);
585
- let p = t.at(-1);
586
- o.type === "text" && p?.type === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
585
+ let h = t.at(-1);
586
+ o.type === "text" && h?.type === "text" ? (h.raw += o.raw, h.text += o.text) : t.push(o);
587
587
  continue;
588
588
  }
589
589
  if (o = this.tokenizer.emStrong(e, s, a)) {
@@ -610,17 +610,17 @@ ${h}` : h;
610
610
  e = e.substring(o.raw.length), t.push(o);
611
611
  continue;
612
612
  }
613
- let h = e;
613
+ let p = e;
614
614
  if (this.options.extensions?.startInline) {
615
- let p = 1 / 0, k = e.slice(1), d;
615
+ let h = 1 / 0, g = e.slice(1), d;
616
616
  this.options.extensions.startInline.forEach((f) => {
617
- d = f.call({ lexer: this }, k), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
618
- }), p < 1 / 0 && p >= 0 && (h = e.substring(0, p + 1));
617
+ d = f.call({ lexer: this }, g), typeof d == "number" && d >= 0 && (h = Math.min(h, d));
618
+ }), h < 1 / 0 && h >= 0 && (p = e.substring(0, h + 1));
619
619
  }
620
- if (o = this.tokenizer.inlineText(h)) {
620
+ if (o = this.tokenizer.inlineText(p)) {
621
621
  e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), l = !0;
622
- let p = t.at(-1);
623
- p?.type === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
622
+ let h = t.at(-1);
623
+ h?.type === "text" ? (h.raw += o.raw, h.text += o.text) : t.push(o);
624
624
  continue;
625
625
  }
626
626
  if (e) {
@@ -1024,8 +1024,8 @@ ${r}</tr>
1024
1024
  if (["options", "parser"].includes(i)) continue;
1025
1025
  let l = i, a = t.renderer[l], c = n[l];
1026
1026
  n[l] = (...o) => {
1027
- let h = a.apply(n, o);
1028
- return h === !1 && (h = c.apply(n, o)), h || "";
1027
+ let p = a.apply(n, o);
1028
+ return p === !1 && (p = c.apply(n, o)), p || "";
1029
1029
  };
1030
1030
  }
1031
1031
  s.renderer = n;
@@ -1037,8 +1037,8 @@ ${r}</tr>
1037
1037
  if (["options", "rules", "lexer"].includes(i)) continue;
1038
1038
  let l = i, a = t.tokenizer[l], c = n[l];
1039
1039
  n[l] = (...o) => {
1040
- let h = a.apply(n, o);
1041
- return h === !1 && (h = c.apply(n, o)), h;
1040
+ let p = a.apply(n, o);
1041
+ return p === !1 && (p = c.apply(n, o)), p;
1042
1042
  };
1043
1043
  }
1044
1044
  s.tokenizer = n;
@@ -1051,18 +1051,18 @@ ${r}</tr>
1051
1051
  let l = i, a = t.hooks[l], c = n[l];
1052
1052
  P.passThroughHooks.has(i) ? n[l] = (o) => {
1053
1053
  if (this.defaults.async && P.passThroughHooksRespectAsync.has(i)) return (async () => {
1054
- let p = await a.call(n, o);
1055
- return c.call(n, p);
1054
+ let h = await a.call(n, o);
1055
+ return c.call(n, h);
1056
1056
  })();
1057
- let h = a.call(n, o);
1058
- return c.call(n, h);
1057
+ let p = a.call(n, o);
1058
+ return c.call(n, p);
1059
1059
  } : n[l] = (...o) => {
1060
1060
  if (this.defaults.async) return (async () => {
1061
- let p = await a.apply(n, o);
1062
- return p === !1 && (p = await c.apply(n, o)), p;
1061
+ let h = await a.apply(n, o);
1062
+ return h === !1 && (h = await c.apply(n, o)), h;
1063
1063
  })();
1064
- let h = a.apply(n, o);
1065
- return h === !1 && (h = c.apply(n, o)), h;
1064
+ let p = a.apply(n, o);
1065
+ return p === !1 && (p = c.apply(n, o)), p;
1066
1066
  };
1067
1067
  }
1068
1068
  s.hooks = n;
@@ -1121,38 +1121,38 @@ Please report this to https://github.com/markedjs/marked.`, r) {
1121
1121
  };
1122
1122
  }
1123
1123
  }, R = new st();
1124
- function g(r, e) {
1124
+ function k(r, e) {
1125
1125
  return R.parse(r, e);
1126
1126
  }
1127
- g.options = g.setOptions = function(r) {
1128
- return R.setOptions(r), g.defaults = R.defaults, le(g.defaults), g;
1127
+ k.options = k.setOptions = function(r) {
1128
+ return R.setOptions(r), k.defaults = R.defaults, le(k.defaults), k;
1129
1129
  };
1130
- g.getDefaults = H;
1131
- g.defaults = T;
1132
- g.use = function(...r) {
1133
- return R.use(...r), g.defaults = R.defaults, le(g.defaults), g;
1130
+ k.getDefaults = H;
1131
+ k.defaults = T;
1132
+ k.use = function(...r) {
1133
+ return R.use(...r), k.defaults = R.defaults, le(k.defaults), k;
1134
1134
  };
1135
- g.walkTokens = function(r, e) {
1135
+ k.walkTokens = function(r, e) {
1136
1136
  return R.walkTokens(r, e);
1137
1137
  };
1138
- g.parseInline = R.parseInline;
1139
- g.Parser = w;
1140
- g.parser = w.parse;
1141
- g.Renderer = q;
1142
- g.TextRenderer = U;
1143
- g.Lexer = b;
1144
- g.lexer = b.lex;
1145
- g.Tokenizer = C;
1146
- g.Hooks = P;
1147
- g.parse = g;
1148
- g.options;
1149
- g.setOptions;
1150
- g.use;
1151
- g.walkTokens;
1152
- g.parseInline;
1138
+ k.parseInline = R.parseInline;
1139
+ k.Parser = w;
1140
+ k.parser = w.parse;
1141
+ k.Renderer = q;
1142
+ k.TextRenderer = U;
1143
+ k.Lexer = b;
1144
+ k.lexer = b.lex;
1145
+ k.Tokenizer = C;
1146
+ k.Hooks = P;
1147
+ k.parse = k;
1148
+ k.options;
1149
+ k.setOptions;
1150
+ k.use;
1151
+ k.walkTokens;
1152
+ k.parseInline;
1153
1153
  w.parse;
1154
1154
  b.lex;
1155
- g.use({
1155
+ k.use({
1156
1156
  gfm: !0,
1157
1157
  breaks: !0,
1158
1158
  async: !1,
@@ -1167,7 +1167,7 @@ g.use({
1167
1167
  }
1168
1168
  });
1169
1169
  function it(r) {
1170
- return r == null ? "" : g.parse(typeof r == "string" ? r : r.value, { async: !1 });
1170
+ return r == null ? "" : k.parse(typeof r == "string" ? r : r.value, { async: !1 });
1171
1171
  }
1172
1172
  export {
1173
1173
  it as c