@arcgis/portal-components 6.0.0-next.21 → 6.0.0-next.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/DX7ZVMO3.js +70 -0
- package/dist/cdn/index.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +8 -8
- package/dist/cdn/EQRBP6H6.js +0 -66
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/portal-components",
|
|
3
|
-
"version": "6.0.0-next.
|
|
3
|
+
"version": "6.0.0-next.22",
|
|
4
4
|
"description": "ArcGIS Portal Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -38,22 +38,22 @@
|
|
|
38
38
|
],
|
|
39
39
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@arcgis/ai-components": "6.0.0-next.
|
|
42
|
-
"@arcgis/lumina": "6.0.0-next.
|
|
43
|
-
"@arcgis/lumina-toolkit": "6.0.0-next.
|
|
44
|
-
"@arcgis/map-components": "6.0.0-next.
|
|
45
|
-
"@arcgis/toolkit": "6.0.0-next.
|
|
41
|
+
"@arcgis/ai-components": "6.0.0-next.22",
|
|
42
|
+
"@arcgis/lumina": "6.0.0-next.22",
|
|
43
|
+
"@arcgis/lumina-toolkit": "6.0.0-next.22",
|
|
44
|
+
"@arcgis/map-components": "6.0.0-next.22",
|
|
45
|
+
"@arcgis/toolkit": "6.0.0-next.22",
|
|
46
46
|
"@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
|
|
47
47
|
"@langchain/core": "^1.2.9",
|
|
48
48
|
"@langchain/langgraph": "^1.4.14",
|
|
49
49
|
"@lit/task": "^1.0.3",
|
|
50
50
|
"lit": "^3.3.0",
|
|
51
|
-
"marked": "~18.1.
|
|
51
|
+
"marked": "~18.1.2",
|
|
52
52
|
"tslib": "^2.8.1",
|
|
53
53
|
"zod": "^4.6.7"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@arcgis/core": "6.0.0-next.
|
|
56
|
+
"@arcgis/core": "6.0.0-next.22",
|
|
57
57
|
"@esri/calcite-components": "^5.2.0"
|
|
58
58
|
},
|
|
59
59
|
"css.customData": [
|
package/dist/cdn/EQRBP6H6.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as W}from"./SSCKCDXD.js";import{e as ye}from"./DELNTRCT.js";import{a as $e}from"./DAAON2UO.js";import{a as be}from"./2XJX2JUO.js";import{a as we}from"./FN2QMDEW.js";import{a as U}from"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import{I as de,J as ke,K as fe,N as me,Q as xe,h as ge,j as $,v as X}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./K3GAZFRI.js";import"./5PV2GUZW.js";function ee(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var I=ee();function Ce(r){I=r}var v={exec:()=>null};function E(r){let e=[];return t=>{let i=Math.max(0,Math.min(3,t-1)),n=e[i];return n||(n=r(i),e[i]=n),n}}function u(r,e=""){let t=typeof r=="string"?r:r.source,i={replace:(n,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(b.caret,"$1"),t=t.replace(n,a),i},getRegex:()=>new RegExp(t,e)};return i}var Fe=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),b={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:E(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:E(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:E(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:E(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:E(r=>new RegExp(`^ {0,${r}}(?:</?(?:${O})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:E(r=>new RegExp(`^ {0,${r}}>`))},Ge=/^(?:[ \t]*(?:\n|$))+/,Xe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ue=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,D=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,We=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,te=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Le=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qe=u(Le).replace(/bull/g,te).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ke=u(Le).replace(/bull/g,te).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),re=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Je=/^[^\n]+/,ne=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ve=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ne).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ye=u(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,te).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ie=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,et=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ie).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Be=r=>u(re).replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",O).getRegex(),tt=Be(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),rt=Be(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),nt=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rt).getRegex(),se={blockquote:nt,code:Xe,def:Ve,fences:Ue,heading:We,hr:D,html:et,lheading:qe,list:Ye,newline:Ge,paragraph:tt,table:v,text:Je},Se=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",O).getRegex(),it={...se,lheading:Ke,table:Se,paragraph:u(re).replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Se).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",O).getRegex()},st={...se,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ie).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(re).replace("hr",D).replace("heading",` *#{1,6} *[^
|
|
3
|
-
]`).replace("lheading",qe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,at=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ze=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,ot=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T=/[\p{P}\p{S}]/u,C=/[\s\p{P}\p{S}]/u,M=/[^\s\p{P}\p{S}]/u,ct=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,C).getRegex(),pt=/[\p{Pi}\p{Ps}"']/u,De=/(?!~)[\p{P}\p{S}]/u,ht=/(?!~)[\s\p{P}\p{S}]/u,ut=/(?:[^\s\p{P}\p{S}]|~)/u,gt=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Fe?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Oe=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,dt=u(Oe,"u").replace(/punct/g,T).getRegex(),kt=u(Oe,"u").replace(/punct/g,De).getRegex(),ft=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,mt=u(ft,"u").replace(/openQuote/g,pt).replace(/punct/g,T).getRegex(),Me="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xt=u(Me,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),bt=u(Me,"gu").replace(/notPunctSpace/g,ut).replace(/punctSpace/g,ht).replace(/punct/g,De).getRegex(),wt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",yt=u(wt,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),$t=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),St="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Rt=u(St,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),Tt=u(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,T).getRegex(),At="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",zt=u(At,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),_t=u(/\\(punct)/,"gu").replace(/punct/g,T).getRegex(),vt=u(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,T).getRegex(),Pt=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),It=u(ie).replace("(?:-->|$)","-->").getRegex(),Et=u("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",It).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qe=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,j=u(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Qe).getRegex(),Ct=u(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",j).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lt=u(/^!?\[(label)\]\[(ref)\]/).replace("label",j).replace("ref",ne).getRegex(),qt=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",ne).getRegex(),Re=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Bt=u(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Qe).getRegex(),Zt=u("reflink|nolink(?!\\()","g").replace("reflink",u(/^!?\[(label)\]\[(ref)\]/).replace("label",Bt).replace("ref",Re).getRegex()).replace("nolink",u(/^!?\[(ref)\](?:\[\])?/).replace("ref",Re).getRegex()).getRegex(),Te=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Dt=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ot=u(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Dt).getRegex(),le={_backpedal:v,anyPunctuation:_t,anyPunctuationOutsideCode:vt,autolink:Pt,blockSkip:gt,br:Ze,code:at,del:v,delLDelim:v,delRDelim:v,emStrongLDelim:dt,emStrongRDelimAst:xt,emStrongRDelimUnd:$t,escape:lt,link:Ct,nolink:qt,punctuation:ct,reflink:Lt,reflinkSearch:Zt,tag:Et,text:ot,url:v},Mt={...le,emStrongLDelim:mt,emStrongRDelimAst:yt,emStrongRDelimUnd:Rt,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",j).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j).getRegex()},J={...le,emStrongRDelimAst:bt,emStrongLDelim:kt,delLDelim:Tt,delRDelim:zt,url:u(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ot).replace("protocol",Te).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Te).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Qt={...J,br:u(Ze).replace("{2,}","*").getRegex(),text:u(J.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:se,gfm:it,pedantic:st},B={normal:le,gfm:J,breaks:Qt,pedantic:Mt},jt={"&":"&","<":"<",">":">",'"':""","'":"'"},Ae=r=>jt[r];function w(r,e){if(e){if(b.escapeTest.test(r))return r.replace(b.escapeReplace,Ae)}else if(b.escapeTestNoEncode.test(r))return r.replace(b.escapeReplaceNoEncode,Ae);return r}function Ht(r){return b.numericCharacterReference.test(r)?r.replace(b.numericCharacterReferenceOrAmpersand,(e,t,i)=>{if(t===void 0&&i===void 0)return"&";let n=t===void 0?Number.parseInt(i,16):Number.parseInt(t,10);return n===0||n>1114111||n>=55296&&n<=57343?"\uFFFD":n===38?"&":String.fromCodePoint(n)}):r}function ze(r){try{r=encodeURI(r).replace(b.percentDecode,"%")}catch{return null}return r}function _e(r,e){let t=r.replace(b.findPipe,(s,a,l)=>{let p=!1,o=a;for(;--o>=0&&l[o]==="\\";)p=!p;return p?"|":" |"}),i=t.split(b.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(b.slashPipe,"|");return i}function A(r,e,t){let i=r.length;if(i===0)return"";let n=0;for(;n<i;){let s=r.charAt(i-n-1);if(s===e&&!t)n++;else if(s!==e&&t)n++;else break}return r.slice(0,i-n)}function ve(r){let e=r.split(`
|
|
4
|
-
`),t=e.length-1;for(;t>=0&&b.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
|
|
5
|
-
`)}function H(r){return r.trim().toLowerCase().toUpperCase().toLowerCase()}function Pe(r,e){if(r.indexOf(e[0])===-1&&r.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<r.length;i++)if(r[i]==="\\")i++;else if(r[i]===e[0])t++;else if(r[i]===e[1]&&(t--,t<0))return i;return t>0?-2:-1}function K(r,e=0){let t=e,i="";for(let n of r)if(n===" "){let s=4-t%4;i+=" ".repeat(s),t+=s}else i+=n,t++;return i}function Ie(r,e,t,i,n){let s=e.href,a=e.title||null,l=r[1].replace(n.other.outputLinkReplace,"$1"),p=r[0].charAt(0)==="!",o=i.state.inLink,c=i.state.linkEmitted,h=i.state.inRawBlock;i.state.inLink=!0,i.state.linkEmitted=!1;let k=i.inlineTokens(l),g=i.state.linkEmitted;if(i.state.linkEmitted=c,i.state.inLink=o,!p){if(g){i.state.inRawBlock=h;return}i.state.linkEmitted=!0}return{type:p?"image":"link",raw:t,href:s,title:a,text:l,tokens:k}}function Nt(r,e,t){let i=r.match(t.other.indentCodeCompensation);if(i===null)return e;let n=i[1];return e.split(`
|
|
6
|
-
`).map(s=>{let a=s.match(t.other.beginningSpace);if(a===null)return s;let[l]=a;return s.slice(Math.min(l.length,n.length))}).join(`
|
|
7
|
-
`)}function Ee(r,e,t,i){if(!e.includes("<"))return!1;for(let n=0;n<e.length;n++){if(e[n]==="\\"){n++;continue}if(e[n]==="`"){let l=i.inline.code.exec(e.slice(n));if(l){n+=l[0].length-1;continue}}if(e[n]!=="<")continue;let s=r.slice(t+n),a=i.inline.tag.exec(s)||i.inline.autolink.exec(s);if(a){if(a[0].length>e.length-n)return!0;n+=a[0].length-1}}return!1}var N=class{options;rules;lexer;constructor(r){this.options=r||I}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:ve(e[0]),i=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:i}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],i=Nt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let i=A(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceTabChar.test(i))&&(t=i.trim())}return{type:"heading",raw:A(e[0],`
|
|
8
|
-
`),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:A(e[0],`
|
|
9
|
-
`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=A(e[0],`
|
|
10
|
-
`).split(`
|
|
11
|
-
`),i="",n="",s=[];for(;t.length>0;){let a=!1,l=[],p;for(p=0;p<t.length;p++)if(this.rules.other.blockquoteStart.test(t[p]))l.push(t[p]),a=!0;else if(!a)l.push(t[p]);else break;t=t.slice(p);let o=l.join(`
|
|
12
|
-
`),c=o.replace(this.rules.other.blockquoteSetextReplace,`
|
|
13
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
14
|
-
${o}`:o,n=n?`${n}
|
|
15
|
-
${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=h,t.length===0)break;let k=s.at(-1);if(k?.type==="code"||k?.type==="heading"||k?.type==="hr"||k?.type==="html")break;if(k?.type==="blockquote"){let g=k,y=t.join(`
|
|
16
|
-
`),x=g.raw+`
|
|
17
|
-
`+y.replace(this.rules.other.blockquoteSetextReplace2,""),f=this.blockquote(x);s[s.length-1]=f;let z=x.substring(f.raw.length).replace(/^\n/,""),m=z?z.split(`
|
|
18
|
-
`).length:0,L=m?t.slice(0,-m):t;L.length>0&&(i=`${i}
|
|
19
|
-
${L.join(`
|
|
20
|
-
`)}`),n=n.substring(0,n.length-g.text.length)+f.text;break}else if(k?.type==="list"){let g=k,y=g.raw+`
|
|
21
|
-
`+t.join(`
|
|
22
|
-
`),x=this.list(y);s[s.length-1]=x,i=i.substring(0,i.length-k.raw.length)+x.raw,n=n.substring(0,n.length-g.raw.length)+x.raw,t=y.substring(s.at(-1).raw.length).split(`
|
|
23
|
-
`);continue}}return{type:"blockquote",raw:i,tokens:s,text:n}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=r,i=()=>t.length-r.length,n=e[1].trim(),s=n.length>1,a={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let l=this.rules.other.listItemRegex(n),p=!1;for(;r;){let c=!1,h="";if(!(e=l.exec(r))||this.rules.block.hr.test(r))break;let k=i();r=r.substring(e[0].length);let g=e[2].split(`
|
|
24
|
-
`,1)[0],y=e[1].length,x=this.options.pedantic?K(g,y):g.replace(this.rules.other.leadingSpaceTab,G=>K(G,y)),f=r.split(`
|
|
25
|
-
`,1)[0],z=!x.trim(),m=0;if(this.options.pedantic?(m=2,h=x.trimStart()):z?m=y+1:(m=x.search(this.rules.other.nonSpaceChar),m=m>4?1:m,h=x.slice(m),m+=y),z&&this.rules.other.blankLine.test(f)&&(r=r.substring(f.length+1),c=!0),!c){let G=this.rules.other.nextBulletRegex(m),ce=this.rules.other.hrRegex(m),pe=this.rules.other.fencesBeginRegex(m),he=this.rules.other.headingBeginRegex(m),je=this.rules.other.htmlBeginRegex(m),He=this.rules.other.blockquoteBeginRegex(m);for(;r;){let ue=r.split(`
|
|
26
|
-
`,1)[0],q;if(f=ue,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),q=f):q=f.replace(this.rules.other.leadingSpaceTab,Ne=>K(Ne)),pe.test(f)||he.test(f)||je.test(f)||He.test(f)||G.test(f)||ce.test(f))break;if(q.search(this.rules.other.nonSpaceChar)>=m||!f.trim())h+=`
|
|
27
|
-
`+q.slice(m);else{if(z||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||pe.test(x)||he.test(x)||ce.test(x))break;h+=`
|
|
28
|
-
`+f}z=!f.trim(),r=r.substring(ue.length+1),x=q.slice(m)}}let L=t.slice(k,i());a.loose||(p?a.loose=!0:this.rules.other.doubleBlankLine.test(L)&&(p=!0)),a.items.push({type:"list_item",raw:L,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]})}let o=a.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;a.raw=t.slice(0,i()).trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let h=c.tokens.filter(g=>g.type==="space"),k=h.length>0&&h.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=k}for(let c of a.items){let h=c.tokens[0];if(c.task&&(h?.type==="text"||h?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}let k=this.rules.other.listTaskCheckbox.exec(c.raw);if(k){let g={type:"checkbox",raw:k[0]+" ",checked:k[0]!=="[ ]"};c.checked=g.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=g.raw+c.tokens[0].raw,c.tokens[0].text=g.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(g)):c.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):c.tokens.unshift(g)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=ve(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Pe(e[2],"()")!==-1)return;let t=H(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:A(e[0],`
|
|
29
|
-
`),href:i,title:n}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=_e(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
30
|
-
`):[],s={type:"table",raw:A(e[0],`
|
|
31
|
-
`),header:[],align:[],rows:[]};if(t.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<t.length;a++)s.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:s.align[a]});for(let a of n)s.rows.push(_e(a,s.header.length).map((l,p)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[p]})));return s}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:A(e[0],`
|
|
32
|
-
`),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
33
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);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(r){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(r);if(e){let t=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Ee(r,e[1],t,this.rules))return;let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=A(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=Pe(e[2],"()");if(a===-2)return;if(a>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],s=a[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Ie(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let i=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Ee(r,t[1],i,this.rules))return;let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[H(n)];if(!s){let a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return Ie(t,s,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let i=this.rules.inline.emStrongLDelim.exec(r);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,s,a,l=n,p=0,o=i[0][0],c=t===o,h=o==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+n);(i=h.exec(e))!==null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){l+=a;continue}else if(i[5]||i[6]){if(n%3&&!((n+a)%3)){p+=a;continue}if(c)break}if(l-=a,l>0)continue;a=Math.min(a,a+l+p);let k=[...i[0]][0].length,g=r.slice(0,n+i.index+k+a);if(Math.min(n,a)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let y=g.slice(2,-2);return{type:"strong",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let i=this.rules.inline.delLDelim.exec(r);if(i&&(!i[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,s,a,l=n,p=this.rules.inline.delRDelim;for(p.lastIndex=0,e=e.slice(-1*r.length+n);(i=p.exec(e))!==null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s||(a=[...s].length,a!==n))continue;if(i[3]||i[4]){l+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l);let o=[...i[0]][0].length,c=r.slice(0,n+i.index+o+a),h=c.slice(n,-n);return{type:"del",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,i;return e[2]==="@"?(t=e[1],i="mailto:"+t):(t=e[1],i=t),{type:"link",raw:e[0],text:t,href:i,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,i;if(e[2]==="@")t=e[0],i="mailto:"+t;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);t=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:t,href:i,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:t?e[0]:Ht(e[0]),escaped:t}}}},S=class V{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||I,this.options.tokenizer=this.options.tokenizer||new N,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:b,block:Q.normal,inline:B.normal};this.options.pedantic?(t.block=Q.pedantic,t.inline=B.pedantic):this.options.gfm&&(t.block=Q.gfm,this.options.breaks?t.inline=B.breaks:t.inline=B.gfm),this.tokenizer.rules=t}static get rules(){return{block:Q,inline:B}}static lex(e,t){return new V(t).lex(e)}static lexInline(e,t){return new V(t).inlineTokens(e)}lex(e){e=e.replace(b.carriageReturn,`
|
|
34
|
-
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(b.tabCharGlobal," ").replace(b.spaceLine,""));let n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let s;if(this.options.extensions?.block?.some(l=>(s=l.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let l=t.at(-1);s.raw.length===1&&l!==void 0?l.raw+=`
|
|
35
|
-
`:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
36
|
-
`)?"":`
|
|
37
|
-
`)+s.raw,l.text+=`
|
|
38
|
-
`+s.text,this.inlineQueue.at(-1).src=l.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
39
|
-
`)?"":`
|
|
40
|
-
`)+s.raw,l.text+=`
|
|
41
|
-
`+s.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},t.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let a=e;if(this.options.extensions?.startBlock){let l=1/0,p=e.slice(1),o;this.options.extensions.startBlock.forEach(c=>{o=c.call({lexer:this},p),typeof o=="number"&&o>=0&&(l=Math.min(l,o))}),l<1/0&&l>=0&&(a=e.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(a))){let l=t.at(-1);i&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
42
|
-
`)?"":`
|
|
43
|
-
`)+s.raw,l.text+=`
|
|
44
|
-
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(s),i=a.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let l=t.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
45
|
-
`)?"":`
|
|
46
|
-
`)+s.raw,l.text+=`
|
|
47
|
-
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(s);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}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let i of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(i[0])&&e.charAt(i.index-1)!=="!")return!0;for(let i of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let n=i[0],s=n.lastIndexOf("[");if(!(n.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,H(n.slice(s+1,-1))))&&!(s>1&&this.linkInText(n.slice(1,s-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let i=this.state.linkParenPossible;this.state.linkParenPossible=i&&e.includes(")");try{return this.#e(e,t)}finally{this.state.linkParenPossible=i}}#e(e,t){let i=e;if(this.tokens.links&&e.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,p=o=>{let c=o.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,H(o.slice(c+1,-1))))return o;if(c>1&&o.charAt(0)!=="!"){let h=o.slice(1,c-1);if(this.linkInText(h))return"["+h.replace(l,p)+"]["+"a".repeat(o.length-c-2)+"]"}return"["+"a".repeat(o.length-2)+"]"};i=i.replace(l,p)}i=i.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(l,p,o)=>o?"+".repeat(l.length):p?p+l.slice(p.length,-p.length).replace(/`/g,"+")+p:l),i=i.replace(this.tokenizer.rules.inline.blockSkip,(l,p,o)=>{let c=o?o.length:0;return l.slice(0,c)+"["+"a".repeat(l.length-c-2)+"]"}),i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,s="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}n||(s=""),n=!1;let l;if(this.options.extensions?.inline?.some(o=>(l=o.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let o=t.at(-1);l.type==="text"&&o?.type==="text"?(o.raw+=l.raw,o.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,i,s)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e,i,s)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let p=e;if(this.options.extensions?.startInline){let o=1/0,c=e.slice(1),h;this.options.extensions.startInline.forEach(k=>{h=k.call({lexer:this},c),typeof h=="number"&&h>=0&&(o=Math.min(o,h))}),o<1/0&&o>=0&&(p=e.substring(0,o+1))}if(l=this.tokenizer.inlineText(p)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),n=!0;let o=t.at(-1);o?.type==="text"?(o.raw+=l.raw,o.text+=l.text):t.push(l);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)}},F=class{options;parser;constructor(r){this.options=r||I}space(r){return""}code({text:r,lang:e,escaped:t}){let i=(e||"").match(b.notSpaceStart)?.[0],n=r?r.replace(b.endingNewline,"")+`
|
|
48
|
-
`:"";return i?'<pre><code class="language-'+w(i)+'">'+(t?n:w(n,!0))+`</code></pre>
|
|
49
|
-
`:"<pre><code>"+(t?n:w(n,!0))+`</code></pre>
|
|
50
|
-
`}blockquote({tokens:r}){return`<blockquote>
|
|
51
|
-
${this.parser.parse(r)}</blockquote>
|
|
52
|
-
`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
53
|
-
`}hr(r){return`<hr>
|
|
54
|
-
`}list(r){let e=r.ordered,t=r.start,i="";for(let a=0;a<r.items.length;a++){let l=r.items[a];i+=this.listitem(l)}let n=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+n+s+`>
|
|
55
|
-
`+i+"</"+n+`>
|
|
56
|
-
`}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
|
|
57
|
-
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
58
|
-
`}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let i="";for(let n=0;n<r.rows.length;n++){let s=r.rows[n];t="";for(let a=0;a<s.length;a++)t+=this.tablecell(s[a]);i+=this.tablerow({text:t})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
59
|
-
<thead>
|
|
60
|
-
`+e+`</thead>
|
|
61
|
-
`+i+`</table>
|
|
62
|
-
`}tablerow({text:r}){return`<tr>
|
|
63
|
-
${r}</tr>
|
|
64
|
-
`}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
|
|
65
|
-
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${w(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,text:t,tokens:i,autolink:n}){let s=n?w(t,!0):this.parser.parseInline(i),a=ze(r);if(a===null)return s;r=w(a,n);let l='<a href="'+r+'"';return e&&(l+=' title="'+w(e)+'"'),l+=">"+s+"</a>",l}image({href:r,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let n=ze(r);if(n===null)return w(t);r=n;let s=`<img src="${w(r)}" alt="${w(t)}"`;return e&&(s+=` title="${w(e)}"`),s+=">",s}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:w(r.text)}},ae=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},R=class Y{options;renderer;textRenderer;constructor(e){this.options=e||I,this.options.renderer=this.options.renderer||new F,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ae}static parse(e,t){return new Y(t).parse(e)}static parseInline(e,t){return new Y(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){t+=l||"";continue}}let s=n;switch(s.type){case"space":{t+=this.renderer.space(s);break}case"hr":{t+=this.renderer.hr(s);break}case"heading":{t+=this.renderer.heading(s);break}case"code":{t+=this.renderer.code(s);break}case"table":{t+=this.renderer.table(s);break}case"blockquote":{t+=this.renderer.blockquote(s);break}case"list":{t+=this.renderer.list(s);break}case"checkbox":{t+=this.renderer.checkbox(s);break}case"html":{t+=this.renderer.html(s);break}case"def":{t+=this.renderer.def(s);break}case"paragraph":{t+=this.renderer.paragraph(s);break}case"text":{t+=this.renderer.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){i+=l||"";continue}}let a=s;switch(a.type){case"escape":{i+=t.text(a);break}case"html":{i+=t.html(a);break}case"link":{i+=t.link(a);break}case"image":{i+=t.image(a);break}case"checkbox":{i+=t.checkbox(a);break}case"strong":{i+=t.strong(a);break}case"em":{i+=t.em(a);break}case"codespan":{i+=t.codespan(a);break}case"br":{i+=t.br(a);break}case"del":{i+=t.del(a);break}case"text":{i+=t.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},Z=class{options;block;constructor(r){this.options=r||I}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?S.lex:S.lexInline}provideParser(r=this.block){return r?R.parse:R.parseInline}};function _(r,e){if(Array.isArray(e))for(let t=0;t<e.length;t++)r.push(e[t]);else r.push(e)}var Ft=class{defaults=ee();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=R;Renderer=F;TextRenderer=ae;Lexer=S;Tokenizer=N;Hooks=Z;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let i of r)switch(_(t,e.call(this,i)),i.type){case"table":{let n=i;for(let s of n.header)_(t,this.walkTokens(s.tokens,e));for(let s of n.rows)for(let a of s)_(t,this.walkTokens(a.tokens,e));break}case"list":{let n=i;_(t,this.walkTokens(n.items,e));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(s=>{let a=n[s].flat(1/0);_(t,this.walkTokens(a,e))}):n.tokens&&_(t,this.walkTokens(n.tokens,e))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let i={...t};if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let s=e.renderers[n.name];s?e.renderers[n.name]=function(...a){let l=n.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[n.level];s?s.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),i.extensions=e),t.renderer){let n=this.defaults.renderer||new F(this.defaults);for(let s in t.renderer){if(!(s in n))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,l=t.renderer[a],p=n[a];n[a]=(...o)=>{let c=l.apply(n,o);return c===!1&&(c=p.apply(n,o)),c||""}}i.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new N(this.defaults);for(let s in t.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,l=t.tokenizer[a],p=n[a];n[a]=(...o)=>{let c=l.apply(n,o);return c===!1&&(c=p.apply(n,o)),c}}i.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Z;for(let s in t.hooks){if(!(s in n))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,l=t.hooks[a],p=n[a];Z.passThroughHooks.has(s)?n[a]=o=>{if(this.defaults.async&&Z.passThroughHooksRespectAsync.has(s))return(async()=>{let h=await l.call(n,o);return p.call(n,h)})();let c=l.call(n,o);return p.call(n,c)}:n[a]=(...o)=>{if(this.defaults.async)return(async()=>{let h=await l.apply(n,o);return h===!1&&(h=await p.apply(n,o)),h})();let c=l.apply(n,o);return c===!1&&(c=p.apply(n,o)),c}}i.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,s=t.walkTokens;i.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),n&&_(l,n.call(this,a)),l}}this.defaults={...this.defaults,...i}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return S.lex(r,e??this.defaults)}parser(r,e){return R.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let i={...t},n={...this.defaults,...i},s=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return s(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 s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(e):e,l=await(n.hooks?await n.hooks.provideLexer(r):r?S.lex:S.lexInline)(a,n),p=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(p,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser(r):r?R.parse:R.parseInline)(p,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(s);try{n.hooks&&(e=n.hooks.preprocess(e));let a=(n.hooks?n.hooks.provideLexer(r):r?S.lex:S.lexInline)(e,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(r):r?R.parse:R.parseInline)(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return s(a)}}}onError(r,e){return t=>{if(t.message+=`
|
|
66
|
-
Please report this to https://github.com/markedjs/marked.`,r){let i="<p>An error occurred:</p><pre>"+w(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},P=new Ft;function d(r,e){return P.parse(r,e)}d.options=d.setOptions=function(r){return P.setOptions(r),d.defaults=P.defaults,Ce(d.defaults),d};d.getDefaults=ee;d.defaults=I;function Gt(...r){return P.use(...r),d.defaults=P.defaults,Ce(d.defaults),d}d.use=Gt;d.walkTokens=function(r,e){return P.walkTokens(r,e)};d.parseInline=P.parseInline;d.Parser=R;d.parser=R.parse;d.Renderer=F;d.TextRenderer=ae;d.Lexer=S;d.lexer=S.lex;d.Tokenizer=N;d.Hooks=Z;d.parse=d;var Wt=d.options,Kt=d.setOptions,Jt=d.walkTokens,Vt=d.parseInline;var Yt=R.parse,er=S.lex;var Xt=ge`:host{container-type:inline-size;display:block;min-inline-size:0}.interrupt-container{display:flex;flex-direction:column;gap:.75rem}.interrupt-actions,.interrupt-buttons{display:flex;justify-content:flex-end;gap:.5rem}.interrupt-message{white-space:normal}.interrupt-message :where(p){margin:0}.interrupt-message :where(ul,ol){margin:0;padding-inline-start:1.25rem}.entity-interrupt{background:var(--calcite-color-foreground-1);border-block-start:2px solid var(--calcite-color-brand);gap:0}.entity-heading{align-items:center;display:flex;gap:.75rem;padding:1rem 1rem .75rem}.entity-heading-icon{color:var(--calcite-color-brand);flex:none}.entity-heading-content{display:grid;gap:.25rem;min-inline-size:0}.entity-eyebrow{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm);line-height:1.25}.entity-question{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-md);font-weight:500;line-height:1.4;overflow-wrap:anywhere}.interrupt-picker{--arcgis-portal-entity-picker-results-max-block-size: min(22rem, 40vh);--arcgis-portal-entity-picker-selection-display: none;box-sizing:border-box;padding:0 1rem .75rem}.entity-interrupt .interrupt-actions{align-items:center;border-block-start:1px solid var(--calcite-color-border-3);display:grid;gap:.75rem;grid-template-columns:minmax(0,1fr) auto;min-block-size:2.25rem;padding:.625rem 1rem}.entity-selection{align-items:center;color:var(--calcite-color-text-2);display:flex;font-size:var(--calcite-font-size-relative-base);gap:.5rem;min-inline-size:0}.entity-selection calcite-icon{color:var(--calcite-color-status-success);flex:none}.entity-selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container (max-width: 24rem){.entity-heading{padding:.875rem .75rem .625rem}.interrupt-picker{padding:0 .75rem .625rem}.entity-interrupt .interrupt-actions{gap:.5rem;grid-template-columns:minmax(0,1fr);padding:.625rem .75rem}.entity-selection:empty{display:none}}`;d.use({gfm:!0,breaks:!0,async:!1});var Ut=new $e,oe=class extends fe{constructor(){super(...arguments),this.#e=[],this._messages=U({blocking:!0}),this.pickerMessages=U({blocking:!0,name:"portal-entity-picker"}),this.pickerRef=de(),this.pickerKey=0,this.selectedEntity=null,this.selectionSubmitted=!1,this.arcgisCancel=X(),this.arcgisSubmit=X()}static{this.properties={selectedEntity:16,selectionSubmitted:16,type:1,message:1,options:0,portal:0,entityRequest:0,requestId:1}}static{this.styles=Xt}#e;get selectedReference(){return this.selectedEntity&&this.selectedEntity.entityType===this.entityRequest?.entityType?ye(this.selectedEntity):void 0}willUpdate(e){(e.has("entityRequest")||e.has("requestId")||e.has("portal"))&&(this.pickerKey+=1,this.selectedEntity=null,this.selectionSubmitted=!1,this.#e=[])}updated(e){this.isConnected&&this.entityRequest&&(e.has("entityRequest")||e.has("requestId")||e.has("portal"))&&this.pickerRef.value?.setFocus()}submit(){if(this.entityRequest){let e=this.selectedReference;if(!e||this.selectionSubmitted)return;this.selectionSubmitted=!0,this.arcgisSubmit.emit(JSON.stringify(e));return}this.arcgisSubmit.emit(this.type==="boolean-choice"?!0:this.#e)}_renderMessageContent(){let e=this.message??"",t=d.parse(e,{async:!1});return Ut.sanitize(t)}_renderInterruptInput(){let{_messages:e,type:t,options:i}=this;switch(t){case"single-select":return $`<calcite-list class="interrupt-list" .label=${e.singleSelectLabel} selection-mode=single-persist @calciteListChange=${n=>this.#e=n.target.selectedItems[0]?.value}>${i?.map(n=>$`<calcite-list-item .label=${n} .value=${n}></calcite-list-item>`)}</calcite-list>`;case"multi-select":return $`<calcite-list class="interrupt-list" .label=${e.multiSelectLabel} selection-mode=multiple @calciteListChange=${n=>this.#e=n.target.selectedItems.map(s=>s.value)}>${i?.map(n=>$`<calcite-list-item .label=${n} .value=${n}></calcite-list-item>`)}</calcite-list>`;case"text-input":return $`<calcite-input class="interrupt-input" .label=${e.textInputLabel} @calciteInputInput=${n=>this.#e=n.target.value}></calcite-input>`;case"boolean-choice":return null;default:return we(t)}}_renderInterruptButtons(e=!1){let{_messages:t,type:i,selectedReference:n}=this,s=i==="boolean-choice";return $`<div class="interrupt-buttons"><calcite-button .appearance=${e?"transparent":"outline"} .kind=${e?"neutral":void 0} @click=${()=>this.arcgisCancel.emit()}>${s?t.cancelButton:t.skipButton}</calcite-button><calcite-button appearance=solid .iconEnd=${e?"arrow-right":void 0} .disabled=${e&&(!n||this.selectionSubmitted)} @click=${this.submit}>${s?t.confirmButton:t.submitButton}</calcite-button></div>`}_renderEntityInterrupt(e){let{_messages:t,selectedReference:i}=this;return $`<div class="interrupt-container entity-interrupt"><div class="entity-heading"><calcite-icon class="entity-heading-icon" .icon=${e==="user"?"user":e==="group"?"group":"file"} scale=m></calcite-icon><div class="entity-heading-content"><span class="entity-eyebrow">${t.titleInput}</span><div class="interrupt-message entity-question">${W(this._renderMessageContent())}</div></div></div>${this.portal?be(this.pickerKey,$`<arcgis-portal-entity-picker class="interrupt-picker" .portal=${this.portal} .entityType=${e} .initialSearchTerm=${this.entityRequest?.searchTerm??""} mode=inline icon=search .selected=${this.selectedEntity} @arcgisSelectionChange=${({detail:n})=>{!this.selectionSubmitted&&(!n||n.entityType===this.entityRequest?.entityType)&&(this.selectedEntity=n)}} ${ke(this.pickerRef)}></arcgis-portal-entity-picker>`):this._renderInterruptInput()}<div class="interrupt-actions"><div class="entity-selection" role=status>${i&&$`<calcite-icon icon=check-circle scale=s></calcite-icon><span class="entity-selection-label" title=${i.label??me}>${i.label}</span><calcite-button appearance=transparent .disabled=${this.selectionSubmitted} icon-start=x kind=neutral .label=${this.pickerMessages.clearSelection} scale=s @click=${()=>{this.selectedEntity=null,this.pickerRef.value?.setFocus()}}></calcite-button>`||""}</div>${this._renderInterruptButtons(!0)}</div></div>`}render(){if(this.entityRequest)return this._renderEntityInterrupt(this.entityRequest.entityType);let{_messages:e,type:t}=this;return $`<div class="interrupt-container"><calcite-notice open kind=neutral width=full><div slot=title>${t==="boolean-choice"?e.titleConfirm:e.titleInput}</div><div slot=message class="interrupt-message">${W(this._renderMessageContent())}</div></calcite-notice>${this._renderInterruptInput()}<div class="interrupt-actions">${this._renderInterruptButtons()}</div></div>`}};xe("arcgis-portal-ai-assistant-interrupt",oe);export{oe as ArcgisPortalAiAssistantInterrupt};
|