lantern-harness 0.1.13 → 0.1.14
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/CHANGELOG.md +26 -0
- package/builtin/session/lh-nav-groups.mjs +138 -30
- package/cli/server.mjs +4 -0
- package/config/app.defaults.json +3 -1
- package/dist/500.html +5 -5
- package/dist/_astro/Base.XN4RkAyb.css +1 -0
- package/dist/_astro/Base.astro_astro_type_script_index_0_lang.BS3Daz5F.js +1 -0
- package/dist/_astro/CaseExecBoard.6RFYgAq5.js +1 -0
- package/dist/_astro/CaseGenerateApp.BwvNF4eM.js +9 -0
- package/dist/_astro/CasesLibrary.LnLh6m6G.js +1 -0
- package/dist/_astro/ChatApp.bMYcVMLe.js +226 -0
- package/dist/_astro/{DashboardBoard.uPjTYpJZ.js → DashboardBoard.BKtXwr_n.js} +1 -1
- package/dist/_astro/{DocsFileBrowser.DvBPLCEp.js → DocsFileBrowser.nSAGUo3l.js} +1 -1
- package/dist/_astro/{DocsPager.EPT5-oEx.js → DocsPager.C6R2nQ60.js} +1 -1
- package/dist/_astro/{DrawerField.DqvXFCFh.js → DrawerField.BXWvezBs.js} +1 -1
- package/dist/_astro/ExcelFieldTags.CaD64a2w.js +152 -0
- package/dist/_astro/KnowledgeLibrary.fYr4VQkZ.js +1 -0
- package/dist/_astro/NavLibraries.CpnreEwA.js +1 -0
- package/dist/_astro/OverflowHint.DI-tZ2fv.js +1 -0
- package/dist/_astro/PluginsPage.B56V66Kk.js +7 -0
- package/dist/_astro/PluginsPage.DaLeNTSR.js +1 -0
- package/dist/_astro/PmBugsBoard.ifLSqDOs.js +1 -0
- package/dist/_astro/PmIterationsBoard.CVjphcgB.js +1 -0
- package/dist/_astro/{PmProjectDetail.BDKXOQJD.js → PmProjectDetail.Dudm02Xv.js} +1 -1
- package/dist/_astro/PmProjectsBoard.CKWUrQHF.js +1 -0
- package/dist/_astro/PmRequirementsBoard.CB33kbaD.js +1 -0
- package/dist/_astro/PmRequirementsBoard.CJFck3LB.js +1 -0
- package/dist/_astro/{PmShared.D69sPvec.js → PmShared.BwVlCk92.js} +1 -1
- package/dist/_astro/PromptMountDialog.D_94WQc3.js +58 -0
- package/dist/_astro/PromptsLibrary.Bn5Y9KTB.js +1 -0
- package/dist/_astro/{ReportsPage.N1EaH8E-.js → ReportsPage.BKcIJsLn.js} +1 -1
- package/dist/_astro/ReqAnalysisBoard.D1UGCxJd.js +28 -0
- package/dist/_astro/RequirementsLibrary.D5iItFfK.js +1 -0
- package/dist/_astro/SearchableSelect.BzNQ6oXG.js +1 -0
- package/dist/_astro/SelectDropdown.DqKxIust.js +1 -0
- package/dist/_astro/SettingsDialog.a99Y08tE.js +1 -0
- package/dist/_astro/SpaceSwitcher.DDGfnQBp.js +7 -0
- package/dist/_astro/TasksBoard.BniGtf89.js +1 -0
- package/dist/_astro/TemplatesLibrary.C3mqFIB0.js +1 -0
- package/dist/_astro/{TestStatsBoard.CgVvwMzN.js → TestStatsBoard.CyWsC1tC.js} +1 -1
- package/dist/_astro/Toast.BO2NFckG.js +1 -0
- package/dist/_astro/TodosBoard.Z4Ev2O0M.js +1 -0
- package/dist/_astro/UiAutoBoard.DOYiz3km.js +9 -0
- package/dist/_astro/app-config.Bm4oN4YP.js +1 -0
- package/dist/_astro/app-version.6yGkRTiD.js +1 -0
- package/dist/_astro/bash-tools.CPS0ZiKi.js +25 -0
- package/dist/_astro/fs-tools.3F9MFrLf.js +9 -0
- package/dist/_astro/{hydrate-cache.zljz1n5X.js → hydrate-cache.BJ2nzhRq.js} +1 -1
- package/dist/_astro/i18n.m5rqL3-h.js +7 -0
- package/dist/_astro/index.astro_astro_type_script_index_0_lang.CPKr56B1.js +1 -0
- package/dist/_astro/jszip.min.Bh2Mgo40.js +2 -0
- package/dist/_astro/{lib.BQbwbnfE.js → lib.S37S0T6S.js} +1 -1
- package/dist/_astro/{open-docs-in-session.LWVC43xp.js → open-docs-in-session.DPCjFUcv.js} +1 -1
- package/dist/_astro/plugins.CCqu2gnf.js +1 -0
- package/dist/_astro/prompts-meta.BiymOMAE.js +2 -0
- package/dist/_astro/{settings.HM3DiNh0.js → settings.DNkAyQxA.js} +2 -2
- package/dist/_astro/{spaces-client.CWqBZccW.js → spaces-client.D4EmN6SH.js} +1 -1
- package/dist/_astro/story-review.a7qZTroW.js +15 -0
- package/dist/_astro/{ui-auto-prompt.B09MVaTI.js → ui-auto-prompt.QcLCZoV6.js} +1 -1
- package/dist/_astro/update.DXCPfU4a.js +1 -0
- package/dist/_astro/{view-prefs.7wGuDpzi.js → view-prefs.Do8yjl1I.js} +1 -1
- package/dist/case-exec/index.html +6 -6
- package/dist/cases/generate/index.html +5 -5
- package/dist/cases/library/index.html +6 -6
- package/dist/dashboard/index.html +6 -6
- package/dist/docs/changelog/index.html +30 -6
- package/dist/docs/install/index.html +5 -5
- package/dist/docs/manual/index.html +5 -5
- package/dist/index.html +1 -1
- package/dist/knowledge/index.html +6 -6
- package/dist/knowledge//345/212/237/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/347/274/226/345/206/231/350/247/204/350/214/203/index.html +5 -5
- package/dist/plugins/index.html +5 -5
- package/dist/pm/bugs/index.html +6 -6
- package/dist/pm/iterations/index.html +6 -6
- package/dist/pm/projects/detail/index.html +6 -6
- package/dist/pm/projects/index.html +6 -6
- package/dist/pm/requirements/index.html +6 -6
- package/dist/prompts/index.html +6 -6
- package/dist/reports/index.html +6 -6
- package/dist/requirement-analysis/index.html +6 -6
- package/dist/requirements/index.html +6 -6
- package/dist/tasks/index.html +6 -6
- package/dist/templates/index.html +6 -6
- package/dist/templates//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +5 -5
- package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +5 -5
- package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +5 -5
- package/dist/templates//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +5 -5
- package/dist/templates//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +5 -5
- package/dist/test-automation/index.html +6 -6
- package/dist/test-stats/index.html +6 -6
- package/dist/todos/index.html +6 -6
- package/dist/workbench/index.html +5 -5
- package/lh-plugins/lh-pm.mjs +21 -7
- package/lh-plugins/lh-req-analysis.mjs +62 -2
- package/lh-plugins/lh-story-review.mjs +98 -0
- package/lh-plugins/lh-test-points.mjs +98 -0
- package/lh-plugins/plugin-prompts.mjs +4 -0
- package/lh-plugins/req-analysis-prompt.mjs +8 -37
- package/lh-plugins/story-review-prompt.mjs +97 -0
- package/lh-plugins/test-points-prompt.mjs +88 -0
- package/package.json +1 -1
- package/dist/_astro/Base.UUIdmKid.css +0 -1
- package/dist/_astro/Base.astro_astro_type_script_index_0_lang.DSWudA4D.js +0 -1
- package/dist/_astro/CaseExecBoard.D8K4NzrB.js +0 -1
- package/dist/_astro/CaseGenerateApp.bZ_K72NQ.js +0 -9
- package/dist/_astro/CasesLibrary.Dhg2pdwU.js +0 -1
- package/dist/_astro/ChatApp.B6I3gGKI.js +0 -221
- package/dist/_astro/ExcelFieldTags.De-C3dqn.js +0 -152
- package/dist/_astro/KnowledgeLibrary.BzFTmNwA.js +0 -1
- package/dist/_astro/NavLibraries.CVdolwYy.js +0 -1
- package/dist/_astro/OverflowHint.D6v4Uj2N.js +0 -1
- package/dist/_astro/PluginsPage.B8U4uvD2.js +0 -39
- package/dist/_astro/PluginsPage.v6afs984.js +0 -1
- package/dist/_astro/PmBugsBoard.CSIGq0wz.js +0 -1
- package/dist/_astro/PmIterationsBoard.BmBc90as.js +0 -1
- package/dist/_astro/PmProjectsBoard.DIVs_xJu.js +0 -1
- package/dist/_astro/PmRequirementsBoard.DcLiUhBe.js +0 -1
- package/dist/_astro/PmRequirementsBoard.N0LM5jHo.js +0 -1
- package/dist/_astro/PromptsLibrary.B1RVZqj8.js +0 -1
- package/dist/_astro/ReqAnalysisBoard.BIIUqGVh.js +0 -25
- package/dist/_astro/RequirementsLibrary.BZhxG9VU.js +0 -1
- package/dist/_astro/SearchableSelect.BIjXzTPD.js +0 -1
- package/dist/_astro/SelectDropdown.B3-XpBpn.js +0 -1
- package/dist/_astro/SettingsDialog.DILea5eO.js +0 -1
- package/dist/_astro/SpaceSwitcher.BeCumAuj.js +0 -7
- package/dist/_astro/TasksBoard.B3SzQ5bR.js +0 -1
- package/dist/_astro/TemplatesLibrary.Ci3yHQTr.js +0 -1
- package/dist/_astro/Toast.R8_2OWRX.js +0 -1
- package/dist/_astro/TodosBoard.BNDF1iVZ.js +0 -1
- package/dist/_astro/UiAutoBoard.BNLRrunE.js +0 -9
- package/dist/_astro/app-config.Cq_F8I0l.js +0 -1
- package/dist/_astro/i18n.DPw-aTIZ.js +0 -7
- package/dist/_astro/index.astro_astro_type_script_index_0_lang.B9YrqBHf.js +0 -1
- package/dist/_astro/markdown-client.DRva7DS9.js +0 -58
- package/dist/_astro/plugins.CKkgnq4r.js +0 -1
- package/dist/_astro/prompts-meta.D_2wiFiH.js +0 -2
- package/dist/_astro/req-analysis.C1uUndMm.js +0 -6
- package/dist/_astro/update.BSnBvaFF.js +0 -1
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var t=e();function n(e){t=e}var r={exec:()=>null};function i(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(a.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var a={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},o=/^(?:[ \t]*(?:\n|$))+/,s=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,c=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,u=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,d=/(?:[*+-]|\d{1,9}[.)])/,f=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,p=i(f).replace(/bull/g,d).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),ee=i(f).replace(/bull/g,d).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),te=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ne=/^[^\n]+/,m=/(?!\s*\])(?:\\.|[^\[\]\\])+/,re=i(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,m).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ie=i(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,d).getRegex(),h=`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`,g=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ae=i(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,g).replace(`tag`,h).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_=i(te).replace(`hr`,l).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,h).getRegex(),oe={blockquote:i(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,_).getRegex(),code:s,def:re,fences:c,heading:u,hr:l,html:ae,lheading:p,list:ie,newline:o,paragraph:_,table:r,text:ne},se=i(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,l).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,h).getRegex(),ce={...oe,lheading:ee,table:se,paragraph:i(te).replace(`hr`,l).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,se).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,h).getRegex()},v={...oe,html:i(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,g).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:r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:i(te).replace(`hr`,l).replace(`heading`,` *#{1,6} *[^
|
|
2
|
-
]`).replace(`lheading`,p).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},y=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,le=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ue=/^( {2,}|\\)\n(?!\s*$)/,de=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fe=/[\p{P}\p{S}]/u,b=/[\s\p{P}\p{S}]/u,pe=/[^\s\p{P}\p{S}]/u,me=i(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,b).getRegex(),he=/(?!~)[\p{P}\p{S}]/u,ge=/(?!~)[\s\p{P}\p{S}]/u,_e=/(?:[^\s\p{P}\p{S}]|~)/u,ve=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,ye=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,be=i(ye,`u`).replace(/punct/g,fe).getRegex(),x=i(ye,`u`).replace(/punct/g,he).getRegex(),xe=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Se=i(xe,`gu`).replace(/notPunctSpace/g,pe).replace(/punctSpace/g,b).replace(/punct/g,fe).getRegex(),Ce=i(xe,`gu`).replace(/notPunctSpace/g,_e).replace(/punctSpace/g,ge).replace(/punct/g,he).getRegex(),we=i(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,pe).replace(/punctSpace/g,b).replace(/punct/g,fe).getRegex(),Te=i(/\\(punct)/,`gu`).replace(/punct/g,fe).getRegex(),Ee=i(/^<(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(),De=i(g).replace(`(?:-->|$)`,`-->`).getRegex(),Oe=i(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,De).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ke=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,S=i(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,ke).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ae=i(/^!?\[(label)\]\[(ref)\]/).replace(`label`,ke).replace(`ref`,m).getRegex(),C=i(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,m).getRegex(),je={_backpedal:r,anyPunctuation:Te,autolink:Ee,blockSkip:ve,br:ue,code:le,del:r,emStrongLDelim:be,emStrongRDelimAst:Se,emStrongRDelimUnd:we,escape:y,link:S,nolink:C,punctuation:me,reflink:Ae,reflinkSearch:i(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Ae).replace(`nolink`,C).getRegex(),tag:Oe,text:de,url:r},w={...je,link:i(/^!?\[(label)\]\((.*?)\)/).replace(`label`,ke).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,ke).getRegex()},T={...je,emStrongRDelimAst:Ce,emStrongLDelim:x,url:i(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,`i`).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Me={...T,br:i(ue).replace(`{2,}`,`*`).getRegex(),text:i(T.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},E={normal:oe,gfm:ce,pedantic:v},Ne={normal:je,gfm:T,breaks:Me,pedantic:w},Pe={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Fe=e=>Pe[e];function D(e,t){if(t){if(a.escapeTest.test(e))return e.replace(a.escapeReplace,Fe)}else if(a.escapeTestNoEncode.test(e))return e.replace(a.escapeReplaceNoEncode,Fe);return e}function O(e){try{e=encodeURI(e).replace(a.percentDecode,`%`)}catch{return null}return e}function k(e,t){let n=e.replace(a.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(a.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(a.slashPipe,`|`);return n}function A(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Ie(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Le(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Re(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
3
|
-
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
4
|
-
`)}var ze=class{options;rules;lexer;constructor(e){this.options=e||t}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:A(e,`
|
|
5
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Re(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=A(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:A(t[0],`
|
|
6
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=A(t[0],`
|
|
7
|
-
`).split(`
|
|
8
|
-
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
9
|
-
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
11
|
-
${s}`:s,r=r?`${r}
|
|
12
|
-
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
|
|
13
|
-
`+e.join(`
|
|
14
|
-
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
15
|
-
`+e.join(`
|
|
16
|
-
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
17
|
-
`)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
18
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(`
|
|
19
|
-
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
20
|
-
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(`
|
|
21
|
-
`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
22
|
-
`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
23
|
-
`+l}!u&&!l.trim()&&(u=!0),r+=f+`
|
|
24
|
-
`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=k(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
25
|
-
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(k(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
26
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=A(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ie(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Le(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Le(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&!(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},j=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t,this.options.tokenizer=this.options.tokenizer||new ze,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 n={other:a,block:E.normal,inline:Ne.normal};this.options.pedantic?(n.block=E.pedantic,n.inline=Ne.pedantic):this.options.gfm&&(n.block=E.gfm,n.inline=this.options.breaks?Ne.breaks:Ne.gfm),this.tokenizer.rules=n}static get rules(){return{block:E,inline:Ne}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(a.carriageReturn,`
|
|
27
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(a.tabCharGlobal,` `).replace(a.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
28
|
-
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=`
|
|
29
|
-
`+r.raw,n.text+=`
|
|
30
|
-
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if((r=this.tokenizer.fences(e))||(r=this.tokenizer.heading(e))||(r=this.tokenizer.hr(e))||(r=this.tokenizer.blockquote(e))||(r=this.tokenizer.list(e))||(r=this.tokenizer.html(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=`
|
|
31
|
-
`+r.raw,n.text+=`
|
|
32
|
-
`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if((r=this.tokenizer.table(e))||(r=this.tokenizer.lheading(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=`
|
|
33
|
-
`+r.raw,a.text+=`
|
|
34
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=`
|
|
35
|
-
`+r.raw,n.text+=`
|
|
36
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a=``;for(;e;){i||(a=``),i=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if((r=this.tokenizer.escape(e))||(r=this.tokenizer.tag(e))||(r=this.tokenizer.link(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if((r=this.tokenizer.emStrong(e,n,a))||(r=this.tokenizer.codespan(e))||(r=this.tokenizer.br(e))||(r=this.tokenizer.del(e))||(r=this.tokenizer.autolink(e))||!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(a=r.raw.slice(-1)),i=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r)}else if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},M=class{options;parser;constructor(e){this.options=e||t}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(a.notSpaceStart)?.[0],i=e.replace(a.endingNewline,``)+`
|
|
37
|
-
`;return r?`<pre><code class="language-`+D(r)+`">`+(n?i:D(i,!0))+`</code></pre>
|
|
38
|
-
`:`<pre><code>`+(n?i:D(i,!0))+`</code></pre>
|
|
39
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
40
|
-
${this.parser.parse(e)}</blockquote>
|
|
41
|
-
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
42
|
-
`}hr(e){return`<hr>
|
|
43
|
-
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
44
|
-
`+r+`</`+i+`>
|
|
45
|
-
`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+D(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
46
|
-
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
47
|
-
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
48
|
-
<thead>
|
|
49
|
-
`+t+`</thead>
|
|
50
|
-
`+r+`</table>
|
|
51
|
-
`}tablerow({text:e}){return`<tr>
|
|
52
|
-
${e}</tr>
|
|
53
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
54
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${D(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=O(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+D(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=O(e);if(i===null)return D(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${D(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:D(e.text)}},Be=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},N=class e{options;renderer;textRenderer;constructor(e){this.options=e||t,this.options.renderer=this.options.renderer||new M,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Be}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=`
|
|
55
|
-
`+this.renderer.text(i);n+=t?this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Ve=class{options;block;constructor(e){this.options=e||t}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?j.lex:j.lexInline}provideParser(){return this.block?N.parse:N.parseInline}},He=class{defaults=e();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=N;Renderer=M;TextRenderer=Be;Lexer=j;Tokenizer=ze;Hooks=Ve;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new M(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ze(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Ve;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Ve.passThroughHooks.has(n)?e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>a.call(t,e));let n=i.call(t,e);return a.call(t,n)}:(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return j.lex(e,t??this.defaults)}parser(e,t){return N.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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(t==null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?j.lex:j.lexInline,s=i.hooks?i.hooks.provideParser():e?N.parse:N.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>o(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
56
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+D(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},P=new He;function F(e,t){return P.parse(e,t)}F.options=F.setOptions=function(e){return P.setOptions(e),F.defaults=P.defaults,n(F.defaults),F},F.getDefaults=e,F.defaults=t,F.use=function(...e){return P.use(...e),F.defaults=P.defaults,n(F.defaults),F},F.walkTokens=function(e,t){return P.walkTokens(e,t)},F.parseInline=P.parseInline,F.Parser=N,F.parser=N.parse,F.Renderer=M,F.TextRenderer=Be,F.Lexer=j,F.lexer=j.lex,F.Tokenizer=ze,F.Hooks=Ve,F.parse=F,F.options,F.setOptions,F.use,F.walkTokens,F.parseInline,N.parse,j.lex;function I(e,t){this.v=e,this.k=t}function L(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e){if(Array.isArray(e))return e}function Ue(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function We(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ge(e,t){return R(e)||Ue(e,t)||Ke(e,t)||We()}function Ke(e,t){if(e){if(typeof e==`string`)return L(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}function qe(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof I;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}qe.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},qe.prototype.next=function(e){return this._invoke(`next`,e)},qe.prototype.throw=function(e){return this._invoke(`throw`,e)},qe.prototype.return=function(e){return this._invoke(`return`,e)};var Je=Object.entries,Ye=Object.setPrototypeOf,Xe=Object.isFrozen,z=Object.getPrototypeOf,B=Object.getOwnPropertyDescriptor,V=Object.freeze,H=Object.seal,Ze=Object.create,Qe=typeof Reflect<`u`&&Reflect,$e=Qe.apply,et=Qe.construct;V||=function(e){return e},H||=function(e){return e},$e||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},et||=function(e){return new e(...[...arguments].slice(1))};var U=q(Array.prototype.forEach);Array.prototype.indexOf;var tt=q(Array.prototype.lastIndexOf),nt=q(Array.prototype.pop),rt=q(Array.prototype.push),it=q(Array.prototype.slice),at=q(Array.prototype.splice),ot=Array.isArray,st=xt(Set),ct=q(Set.prototype.add),lt=q(Set.prototype.has),ut=q(String.prototype.toLowerCase),dt=q(String.prototype.toString),ft=q(String.prototype.match),pt=q(String.prototype.replace),mt=q(String.prototype.indexOf),ht=q(String.prototype.trim),gt=q(Number.prototype.toString),_t=q(Boolean.prototype.toString),vt=typeof BigInt>`u`?null:q(BigInt.prototype.toString),yt=typeof Symbol>`u`?null:q(Symbol.prototype.toString),W=q(Object.prototype.hasOwnProperty),bt=q(Object.prototype.toString),G=q(RegExp.prototype.test),K=xt(TypeError);function q(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return $e(e,t,n)}}function xt(e){return function(){return et(e,[...arguments])}}function J(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ut;if(Ye&&Ye(e,null),!ot(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Xe(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Y(e){for(let t=0;t<e.length;t++)W(e,t)||(e[t]=null);return e}function X(e){let t=Ze(null);for(let r of Je(e)){var n=Ge(r,2);let i=n[0],a=n[1];W(e,i)&&(t[i]=ot(a)?Y(a):a&&typeof a==`object`&&a.constructor===Object?X(a):a)}return t}function St(e){switch(typeof e){case`string`:return e;case`number`:return gt(e);case`boolean`:return _t(e);case`bigint`:return vt?vt(e):`0`;case`symbol`:return yt?yt(e):`Symbol()`;case`undefined`:return bt(e);case`function`:case`object`:{if(e===null)return bt(e);let t=e,n=Z(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:bt(e)}return bt(e)}default:return bt(e)}}function Z(e,t){for(;e!==null;){let n=B(e,t);if(n){if(n.get)return q(n.get);if(typeof n.value==`function`)return q(n.value)}e=z(e)}function n(){return null}return n}function Ct(e,t){for(;e!==null;){let n=B(e,t);if(n)return n.get?q(n.get):null;e=z(e)}return null}function wt(e){try{return G(e,``),!0}catch{return!1}}var Tt=V(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Et=V(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Dt=V([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ot=V([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),kt=V(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),At=V([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),jt=V([`#text`]),Mt=V(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Nt=V(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Pt=V(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ft=V([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),It=H(/{{[\w\W]*|^[\w\W]*}}/g),Lt=H(/<%[\w\W]*|^[\w\W]*%>/g),Rt=H(/\${[\w\W]*/g),zt=H(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bt=H(/^aria-[\-\w]+$/),Vt=H(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ht=H(/^(?:\w+script|data):/i),Ut=H(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wt=H(/^html$/i),Gt=H(/^[a-z][.\w]*(-[.\w]+)+$/i),Kt=H(/<[/\w!]/g),qt=H(/<[/\w]/g),Jt=H(/<\/no(script|embed|frames)/i),Yt=H(/\/>/i),Q={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Xt=V(J({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),Zt=function(){return typeof window>`u`?null:window},Qt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},$t=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},en=function(e,t,n,r){return W(e,t)&&ot(e[t])?J(r.base?X(r.base):{},e[t],r.transform):n},tn=function(e,t,n){let r=W(e,t)?e[t]:void 0;return r&&typeof r==`object`?X(r):n()};function nn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zt(),t=e=>nn(e);if(t.version=`3.4.17`,t.removed=[],!e||!e.document||e.document.nodeType!==Q.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Z(d,`cloneNode`),p=Z(d,`remove`),ee=Z(d,`removeAttributeNode`),te=Z(d,`nextSibling`),ne=Z(d,`childNodes`),m=Z(d,`parentNode`),re=Z(d,`shadowRoot`),ie=Z(d,`attributes`),h=o&&o.prototype?Z(o.prototype,`nodeType`):null,g=o&&o.prototype?Z(o.prototype,`nodeName`):null,ae=o&&o.prototype?Z(o.prototype,`ownerDocument`):null,_=function(e){return h?h(e):e.nodeType},oe=function(e){return g?g(e):e.nodeName},se=Ct(d,`namespaceURI`),ce=function(e){return se?se(e):e.namespaceURI};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let v,y=``,le,ue=!1,de=0,fe=function(){if(de>0)throw K(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},b=function(e){fe(),de++;try{return v.createHTML(e)}finally{de--}},pe=function(e){fe(),de++;try{return v.createScriptURL(e)}finally{de--}},me=function(){return ue||=(le=Qt(u,i),!0),le},he=n,ge=he.implementation,_e=he.createNodeIterator,ve=he.createDocumentFragment,ye=he.getElementsByTagName,be=r.importNode,x=$t();t.isSupported=typeof Je==`function`&&typeof m==`function`&&ge&&ge.createHTMLDocument!==void 0;let xe=It,Se=Lt,Ce=Rt,we=zt,Te=Bt,Ee=Ht,De=Ut,Oe=Gt,ke=Vt,S=null,Ae=J({},[...Tt,...Et,...Dt,...kt,...jt]),C=null,je=J({},[...Mt,...Nt,...Pt,...Ft]),w=Object.seal(Ze(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),T=null,Me=null,E=Object.seal(Ze(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ne=!0,Pe=!0,Fe=!1,D=!0,O=!1,k=!0,A=!1,Ie=!1,Le=null,Re=null,ze=!1,j=!1,M=!1,Be=!1,N=!0,Ve=!1,He=`user-content-`,P=!0,F=!1,I=null,L={},R=null,Ue=J({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),We=null,Ge=J({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ke=null,qe=J({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ye=`http://www.w3.org/1998/Math/MathML`,Xe=`http://www.w3.org/2000/svg`,z=`http://www.w3.org/1999/xhtml`,B=z,Qe=!1,$e=null,et=J({},[Ye,Xe,z],dt),gt=V([`mi`,`mo`,`mn`,`ms`,`mtext`]),_t=J({},gt),vt=V([`annotation-xml`]),yt=J({},vt),bt=J({},[`title`,`style`,`font`,`a`,`script`]),q=null,xt=[`application/xhtml+xml`,`text/html`],Y=null,rn=null,an=n.createElement(`form`),on=function(e){return e instanceof RegExp||e instanceof Function},sn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(rn&&rn===e)return;(!e||typeof e!=`object`)&&(e={}),e=X(e),q=xt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Y=q===`application/xhtml+xml`?dt:ut,S=en(e,`ALLOWED_TAGS`,Ae,{transform:Y}),C=en(e,`ALLOWED_ATTR`,je,{transform:Y}),$e=en(e,`ALLOWED_NAMESPACES`,et,{transform:dt}),Ke=en(e,`ADD_URI_SAFE_ATTR`,qe,{transform:Y,base:qe}),We=en(e,`ADD_DATA_URI_TAGS`,Ge,{transform:Y,base:Ge}),R=en(e,`FORBID_CONTENTS`,Ue,{transform:Y}),T=en(e,`FORBID_TAGS`,X({}),{transform:Y}),Me=en(e,`FORBID_ATTR`,X({}),{transform:Y}),L=W(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?X(e.USE_PROFILES):e.USE_PROFILES:!1,Ne=e.ALLOW_ARIA_ATTR!==!1,Pe=e.ALLOW_DATA_ATTR!==!1,Fe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,D=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,O=e.SAFE_FOR_TEMPLATES||!1,k=e.SAFE_FOR_XML!==!1,A=e.WHOLE_DOCUMENT||!1,j=e.RETURN_DOM||!1,M=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,N=e.SANITIZE_DOM!==!1,Ve=e.SANITIZE_NAMED_PROPS||!1,P=e.KEEP_CONTENT!==!1,F=e.IN_PLACE||!1,ke=wt(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Vt,B=typeof e.NAMESPACE==`string`?e.NAMESPACE:z,_t=tn(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>J({},gt)),yt=tn(e,`HTML_INTEGRATION_POINTS`,()=>J({},vt));let t=tn(e,`CUSTOM_ELEMENT_HANDLING`,()=>Ze(null));if(w=Ze(null),W(t,`tagNameCheck`)&&on(t.tagNameCheck)&&(w.tagNameCheck=t.tagNameCheck),W(t,`attributeNameCheck`)&&on(t.attributeNameCheck)&&(w.attributeNameCheck=t.attributeNameCheck),W(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(w.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),H(w),O&&(Pe=!1),M&&(j=!0),L&&(S=J({},jt),C=Ze(null),L.html===!0&&(J(S,Tt),J(C,Mt)),L.svg===!0&&(J(S,Et),J(C,Nt),J(C,Ft)),L.svgFilters===!0&&(J(S,Dt),J(C,Nt),J(C,Ft)),L.mathMl===!0&&(J(S,kt),J(C,Pt),J(C,Ft))),E.tagCheck=null,E.attributeCheck=null,W(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?E.tagCheck=e.ADD_TAGS:ot(e.ADD_TAGS)&&(S===Ae&&(S=X(S)),J(S,e.ADD_TAGS,Y))),W(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?E.attributeCheck=e.ADD_ATTR:ot(e.ADD_ATTR)&&(C===je&&(C=X(C)),J(C,e.ADD_ATTR,Y))),W(e,`ADD_FORBID_CONTENTS`)&&ot(e.ADD_FORBID_CONTENTS)&&(R===Ue&&(R=X(R)),J(R,e.ADD_FORBID_CONTENTS,Y)),P&&(S[`#text`]=!0),A&&J(S,[`html`,`head`,`body`]),S.table&&(J(S,[`tbody`]),delete T.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw K(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw K(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=v;v=e.TRUSTED_TYPES_POLICY;try{y=b(``)}catch(e){throw v=t,e}}else e.TRUSTED_TYPES_POLICY===null?(v=void 0,y=``):(v===void 0&&(v=me()),v&&typeof y==`string`&&(y=b(``)));V&&V(e),rn=e},cn=J({},[...Et,...Dt,...Ot]),ln=J({},[...kt,...At]),un=function(e,t,n){return t.namespaceURI===z?e===`svg`:t.namespaceURI===Ye?e===`svg`&&(n===`annotation-xml`||_t[n]):!!cn[e]},dn=function(e,t,n){return t.namespaceURI===z?e===`math`:t.namespaceURI===Xe?e===`math`&&yt[n]:!!ln[e]},fn=function(e,t,n){return t.namespaceURI===Xe&&!yt[n]||t.namespaceURI===Ye&&!_t[n]?!1:!ln[e]&&(bt[e]||!cn[e])},pn=function(e){let t=ce(e),n=ut(oe(e)),r=m(e),i,a;return r&&_(r)===Q.element?(i={namespaceURI:ce(r)},a=ut(oe(r))):(i={namespaceURI:B},a=`template`),$e[t]?t===Xe?un(n,i,a):t===Ye?dn(n,i,a):t===z?fn(n,i,a):!!(q===`application/xhtml+xml`&&$e[t]):!1},mn=function(e){rt(t.removed,{element:e});try{m(e).removeChild(e)}catch{if(p(e),!m(e))throw K(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},hn=function(e,t,n){try{ee(e,t)}catch{try{e.removeAttribute(n)}catch{}}},gn=function(e){bn(e);let t=ne(e);t&&U(it(t),e=>{try{p(e)}catch{}});let n=_(e)===Q.element?ie(e):null;if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&hn(e,r,i)}},_n=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}rt(t.removed,{attribute:r||null,from:n});try{r?ee(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(j||M)try{mn(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},vn=function(e){let t=ie(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||C[Y(i)]||hn(e,r,i)}},yn=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&_(e)===Q.element){let t=re(e);Fn(t)&&r.push(t)}let i=ne(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},bn=function(e){yn(e,e=>{_(e)===Q.element&&vn(e)})},xn=function(e){let t=[];return yn(e,e=>{t.push(e)},!0),t},Sn=function(e,t){let n=st();U(xn(e),e=>{_(e)===Q.element&&ct(n,e)}),U(t,e=>{_(e)===Q.element&&!lt(n,e)&&vn(e)})},Cn=function(e,n){let r=!1;return U(t.removed,t=>{t.element&&(r||=t.element===e,bn(t.element))}),Sn(e,n),r},wn=function(e,t){let n=I,r=null,i=()=>(r||(r=st(),U(t,e=>{ct(r,e)})),r);for(let t=0;;t++){let r=xn(e),a=[e],o=!1;if(U(r,e=>{_(e)===Q.documentFragment?rt(a,e):!o&&!lt(n,e)&&(o=lt(i(),e))}),!o)return;if(t>=8)throw K(`the tree kept changing during in-place sanitization; refusing to return it`);U(a,(t,n)=>{Tn(t,n>0,e,i())})}},Tn=function(e,t,n,r){let i=An(e),a;for(;a=i.nextNode();)lt(r,a)&&!lt(I,a)&&(t&&$(x.uponSanitizeShadowNode,a,null),Hn(a,n),Yn(a,n),Fn(a.content)&&Xn(a.content))},En=function(e){I&&ct(I,e)},Dn=function(e,t){return k?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},On=function(e){k&&yn(e,e=>{let t=_(e);if(t===Q.processingInstruction||t===Q.comment&&G(qt,e.data)){try{p(e)}catch{}return!1}if(t===Q.element){let t=e,n=Y(oe(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Dn(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},kn=function(e){let t=null,r=null;if(ze)e=`<remove></remove>`+e;else{let t=ft(e,/^[\r\n\t ]+/);r=t&&t[0]}q===`application/xhtml+xml`&&B===z&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=v?b(e):e;if(B===z)try{t=new l().parseFromString(i,q)}catch{}if(!t||!t.documentElement){t=ge.createDocument(B,`template`,null);try{t.documentElement.innerHTML=Qe?y:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),B===z?ye.call(t,A?`html`:`body`)[0]:A?t.documentElement:a},An=function(e){let t=ae?ae(e):e.ownerDocument;return _e.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},jn=function(e){return e=pt(e,xe,` `),e=pt(e,Se,` `),e=pt(e,Ce,` `),e},Mn=function(e){Nn(e);let t=e.querySelectorAll?.call(e,`template`);t&&U(t,e=>{Fn(e.content)&&Mn(e.content)})},Nn=function(e){e.normalize();let t=ae?ae(e):e.ownerDocument,n=_e.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=jn(r.data),r=n.nextNode()},Pn=function(e){let t=g?g(e):null;return typeof t!=`string`||Y(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ie(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==h(e)||e.childNodes!==ne(e)},Fn=function(e){if(!h||typeof e!=`object`||!e)return!1;try{return h(e)===Q.documentFragment}catch{return!1}},In=function(e){if(!h||typeof e!=`object`||!e)return!1;try{return typeof h(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&U(e,e=>{e.call(t,n,r,rn)})}let Ln=function(e,t){return!!(k&&e.hasChildNodes()&&!In(e.firstElementChild)&&G(Kt,e.textContent)&&G(Kt,e.innerHTML)||k&&Xt[t]&&_(e)===Q.element&&ce(e)===z&&(In(e.firstElementChild)||typeof e.textContent==`string`&&G(Kt,e.textContent))||e.nodeType===Q.processingInstruction||k&&e.nodeType===Q.comment&&G(qt,e.data))},Rn=function(e,t){return e instanceof RegExp?G(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},zn=function(e,t,n){if(!T[t]&&Gn(t)&&Rn(w.tagNameCheck,t))return!1;if(P&&!R[t]&&!R[ut(t)]){let t=m(e),r=ne(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,te(e))}}}return mn(e),!0},Bn=function(e,t,n,r){return e.length===0?t:t===n||t===r?X(t):t},Vn=function(e,t){return e===t||m(e)!==null?!1:(F&&bn(e),!0)},Hn=function(e,n){if(En(e),$(x.beforeSanitizeElements,e,null),Vn(e,n))return!0;if(Pn(e))return mn(e),!0;let r=Y(oe(e));if(S=Bn(x.uponSanitizeElement,S,Ae,Le),$(x.uponSanitizeElement,e,{tagName:r,allowedTags:S}),Vn(e,n))return!0;if(Ln(e,r))return mn(e),!0;if(T[r]||!(E.tagCheck instanceof Function&&E.tagCheck(r))&&!S[r]){let t=zn(e,r,n);return t===!1&&($(x.afterSanitizeElements,e,null),Vn(e,n))?!0:t}if(_(e)===Q.element&&!pn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&G(Jt,e.innerHTML))return mn(e),!0;if(O&&e.nodeType===Q.text){let n=jn(e.textContent);e.textContent!==n&&(rt(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(x.afterSanitizeElements,e,null),Vn(e,n)},Un=function(e,t,r){if(Me[t]||Dn(t,e)||N&&(t===`id`||t===`name`)&&(r in n||r in an))return!1;let i=C[t]||E.attributeCheck instanceof Function&&E.attributeCheck(t,e);return Pe&&G(we,t)||Ne&&G(Te,t)?!0:i?Ke[t]||G(ke,pt(r,De,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&mt(r,`data:`)===0&&We[e]||Fe&&!G(Ee,pt(r,De,``))?!0:!r:Gn(e)&&Rn(w.tagNameCheck,e)&&Rn(w.attributeNameCheck,t,e)||t===`is`&&w.allowCustomizedBuiltInElements&&Rn(w.tagNameCheck,r)},Wn=J({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Gn=function(e){return!Wn[ut(e)]&&G(Oe,e)},Kn=function(e,t,n,r){if(v&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return b(r);case`TrustedScriptURL`:return pe(r)}return r},qn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Pn(e)||(mn(e),!1)}catch{return _n(t,e),!1}},Jn=function(e,t){return k&&G(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t)?!0:ut(e)===`attributename`&&ft(t,`href`)!==null},Yn=function(e,n){if($(x.beforeSanitizeAttributes,e,null),Vn(e,n))return;let r=e.attributes;if(!r||Pn(e))return;C=Bn(x.uponSanitizeAttribute,C,je,Re);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:C,forceKeepAttr:void 0},a=r.length,o=Y(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=Y(s),d=l,f=s===`value`?d:ht(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,$(x.uponSanitizeAttribute,e,i),f=i.attrValue,Ve&&(u===`id`||u===`name`)&&mt(f,He)!==0&&(_n(s,e,n),f=He+f,p=!0),Jn(s,f)?_n(s,e,n):i.forceKeepAttr||(i.keepAttr?!D&&G(Yt,f)?_n(s,e,n):(O&&(f=jn(f)),Un(o,u,f)?(f=Kn(o,u,c,f),f!==d&&qn(e,s,c,f)&&p&&nt(t.removed)):_n(s,e,n)):_n(s,e,n))}$(x.afterSanitizeAttributes,e,null),Vn(e,n)},Xn=function(e){let t=null,n=An(e);for($(x.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(x.uponSanitizeShadowNode,t,null),Hn(t,e),Yn(t,e),Fn(t.content)&&Xn(t.content),_(t)===Q.element){let e=re(t);Fn(e)&&(Zn(e),Xn(e))}O&&Nn(e),$(x.afterSanitizeShadowDOM,e,null)},Zn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Xn(e.shadow);continue}let n=e.node,r=_(n)===Q.element,i=ne(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=g?g(n):null;if(typeof e==`string`&&Y(e)===`template`){let e=n.content;Fn(e)&&t.push({node:e,shadow:null})}}if(r){let e=re(n);Fn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Qe=!e,Qe&&(e=`<!-->`),typeof e!=`string`&&!In(e)&&(e=St(e),typeof e!=`string`))throw K(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ie?(S=Le,C=Re):sn(n),(x.uponSanitizeElement.length>0||x.uponSanitizeAttribute.length>0)&&(S=X(S)),x.uponSanitizeAttribute.length>0&&(C=X(C)),t.removed=[];let c=F&&typeof e!=`string`&&In(e),l=[],u=I;if(c){On(e);let t=oe(e);if(typeof t==`string`){let n=Y(t);if(!S[n]||T[n])throw gn(e),K(`root node is forbidden and cannot be sanitized in-place`)}if(Pn(e))throw gn(e),K(`root node is clobbered and cannot be sanitized in-place`);l=xn(e),I=st()}else if(In(e))i=kn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Q.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Zn(i);else{if(!j&&!O&&!A&&e.indexOf(`<`)===-1)return v&&Be?b(e):e;if(i=kn(e),!i)return j?null:Be?y:``}i&&ze&&mn(i.firstChild);let d=c?e:i;try{c&&Zn(e);let t=An(d);for(;o=t.nextNode();)Hn(o,d),Yn(o,d),Fn(o.content)&&Xn(o.content);c&&wn(e,l)}catch(t){throw c&&(gn(e),Cn(e,l)),t}finally{I=u}if(c){if(Cn(e,l))throw K(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return O&&Mn(e),e}if(j){if(O&&Mn(i),M)for(s=ve.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(C.shadowroot||C.shadowrootmode)&&(s=be.call(r,s,!0)),s}let f=A?i.outerHTML:i.innerHTML;return A&&S[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&G(Wt,i.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
58
|
-
`+f),O&&(f=jn(f)),v&&Be?b(f):f},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};sn(e),Ie=!0,Le=S,Re=C},t.clearConfig=function(){rn=null,Ie=!1,Le=null,Re=null,v=le,y=``},t.isValidAttribute=function(e,t,n){rn||sn({});let r=Y(e),i=Y(t);return typeof n==`string`&&(Jn(t,n)||!D&&G(Yt,n))?!1:Un(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&W(x,e)&&rt(x[e],t)},t.removeHook=function(e,t){if(W(x,e)){if(t!==void 0){let n=tt(x[e],t);return n===-1?void 0:at(x[e],n,1)[0]}return nt(x[e])}},t.removeHooks=function(e){W(x,e)&&(x[e]=[])},t.removeAllHooks=function(){x=$t()},t}var rn=nn();function an(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}var on=new He({renderer:{code({text:e,lang:t,escaped:n}){return`<div class="code-block"><div class="code-block-head"><span>${an((t??``).trim().split(/\s+/)[0]||`代码块`)}</span><button type="button" data-copy-code>复制</button></div><pre><code>${n?e:an(e)}</code></pre></div>`},link(e){return`<a href="${an(e.href||``)}"${e.title?` title="${an(e.title)}"`:``} target="_blank" rel="noopener noreferrer">${this.parser.parseInline(e.tokens??[])}</a>`}}});function sn(e){let t=on.parse(e,{async:!1});return rn.sanitize(t,{ADD_ATTR:[`target`]})}export{sn as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t,u as n}from"./app-config.Cq_F8I0l.js";var r=[`内容库`,`生成能力`,`记忆与检索`,`待办与效率`,`项目管理`,`测试统计`,`仪表盘`,`开发工具`],i=[{id:`cases`,category:`内容库`,name:`用例管理`,description:`侧栏进入用例库:浏览、搜索、打开与删除用例。关闭后入口隐藏,「生成测试用例」一并关闭;磁盘文件仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`caseGen`,category:`生成能力`,name:`生成测试用例`,description:`在工作台用「/」打开配置:选类型、模板与提示词后生成用例并写入用例库。需同时开启「用例管理」。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1,hasPanel:!0,requires:`cases`},{id:`prompts`,category:`内容库`,name:`提示词管理`,description:`侧栏进入提示词库:浏览、搜索、打开与删除提示词,并维护当前空间的「默认提示词」。每个空间都需要,因此默认开启且不可关闭;「生成提示词」仍是独立开关。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!0,alwaysOn:!0},{id:`promptGen`,category:`生成能力`,name:`生成提示词`,description:`用「/」打开配置后对话生成提示词;质检通过后写入提示词库。需同时开启「提示词管理」。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1,hasPanel:!0,requires:`prompts`},{id:`knowledgeLib`,category:`内容库`,name:`知识库管理`,description:`侧栏进入知识库:浏览、搜索、打开与删除文档。关闭后入口隐藏,「生成知识库」一并关闭;磁盘文件仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`knowledgeGen`,category:`生成能力`,name:`生成知识库`,description:`用「/」打开配置后对话生成规范、方法论或环境约定;质检通过后写入知识库。需同时开启「知识库管理」。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1,hasPanel:!0,requires:`knowledgeLib`},{id:`requirements`,category:`内容库`,name:`需求文档库`,description:`侧栏进入需求文档库:浏览、搜索、上传与整理需求文档。关闭后入口隐藏;磁盘文件仍保留,生成用例时也不再引用。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`templates`,category:`内容库`,name:`测试模板库`,description:`侧栏进入测试模板库:浏览、上传与整理用例 / 报告模板。关闭后入口隐藏;磁盘文件仍保留,生成用例时不再选用模板。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`knowledge`,category:`记忆与检索`,name:`知识库检索`,description:`工作台输入「@」引用知识库与模板文档;发送后由模型按需读取。关闭后 @ 只列工作区文件。`,version:`1.4.0`,requiresDev:!1,defaultEnabled:!1},{id:`memory`,category:`记忆与检索`,name:`会话记忆`,description:`五轨记忆(用户档案 / 全局事实 / 项目关键 / 项目日志 / 每日):待确认、归档与便签,在工作台「记忆」Tab 管理。`,version:`2.0.0`,requiresDev:!0,defaultEnabled:!1},{id:`todos`,category:`待办与效率`,name:`待办事项`,description:`侧栏进入待办事项:按状态 / 紧急程度筛选、行内改状态与手动维护;工作台会话也能通过工具直接记录与更新同一份待办。关闭后入口隐藏,磁盘数据仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`tasks`,category:`待办与效率`,name:`任务管理`,description:`侧栏进入任务列表:按任务池 / 进行中 / 已完成 / 已关闭 / 已取消跟踪任务,并汇总每个任务下关联待办的数量与完成进度。关闭后入口隐藏,磁盘数据仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`reports`,category:`待办与效率`,name:`工作汇报`,description:`打开后在工作台注入「工作汇报提示词」,并把这份提示词写进提示词管理,方便随时修改;关闭时只停用,提示词文件保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`projects`,category:`项目管理`,name:`项目列表`,description:`侧栏进入项目列表:进度 / 规划 / 归档三种状态的项目卡片,汇总每个项目下的迭代、需求与缺陷数量;支持搜索、归档与删除。关闭后入口隐藏,数据仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`iterations`,category:`项目管理`,name:`迭代管理`,description:`侧栏进入迭代管理:按项目维护迭代的开始 / 截止日期与状态,按日期流逝算进度并标出逾期。需同时开启「项目列表」。关闭后入口隐藏,数据仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1,requires:`projects`},{id:`pmRequirements`,category:`项目管理`,name:`需求管理`,description:`侧栏进入需求管理:按项目 / 迭代维护需求编号、优先级、状态与验收标准;需求挂在项目下,可关联迭代。需同时开启「项目列表」。关闭后入口隐藏,数据仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1,requires:`projects`},{id:`bugs`,category:`项目管理`,name:`缺陷管理`,description:`侧栏进入缺陷管理:按项目 / 迭代 / 需求记录缺陷,含严重程度、状态、重现步骤、期望与实际结果;关闭后入口隐藏,数据仍保留。需同时开启「项目列表」。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1,requires:`projects`},{id:`testStats`,category:`测试统计`,name:`测试统计`,description:`侧栏进入测试统计:按当前日期与测试统计维度(功能用例 / 自动化用例 / 接口用例 / 测试报告 / 缺陷统计等)记录统计数量,维度可搜索或直接创建。打开开关即在当前空间生成 测试统计/测试统计.json。关闭后入口隐藏,磁盘数据仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`caseExec`,category:`测试统计`,name:`用例执行统计`,description:`侧栏进入用例执行统计:按项目记录用例总数、待执行与已执行数量,自动计算当前剩余用例与执行比例;项目名称可搜索或直接创建。打开开关即在当前空间生成 用例执行统计/用例执行统计.json。关闭后入口隐藏,磁盘数据仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`uiAuto`,category:`测试统计`,name:`自动化测试`,description:`侧栏进入自动化测试:把已有的 Playwright / pytest / Selenium 项目挂进来(系统原生选目录,自动识别框架),一键运行 / 停止用例(先跑全量),实时看日志,查看 HTML 报告与结构化结果。执行的是目标项目自己的测试命令,不会自动安装依赖或联网。打开开关时在「提示词管理」生成「Playwright提示词.md」(已存在不覆盖,生成页优先用它,插件开启期间不可删除)。关闭后入口隐藏,项目记录与报告仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`reqAnalysis`,category:`生成能力`,name:`需求分析`,description:`侧栏进入需求分析:选「需求文档库」里的原始需求,用当前模型拆成结构化用户故事(角色 / 前置 / 主流程 / 替代 / 异常 / 后置 / 验收),再做一轮体检(确定性规则 + 模型评审),输出覆盖率矩阵与缺口清单,可勾选补写并导出 Markdown。打开开关时在「提示词管理」生成「需求分析提示词.md」(已存在不覆盖,插件开启期间不可删除)。关闭后入口隐藏,已保存的分析仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`dashboard`,category:`仪表盘`,name:`仪表盘`,description:`侧栏进入仪表盘:把当前空间的待办、任务、项目与测试统计聚合成一页(指标卡、倒计时、今日待办、进行中任务、测试统计柱状图、飞书式待办日历)。首次打开是空白画布,需在「编辑组件」里自行添加卡片;待办 / 任务为表格 + 分页。卡片摆在 12 列自由画布上,按住顶部圆点手柄拖位置、拖右下角把手改宽高,挡住相邻卡片时松手把它们挤开或让位;布局按空间记在浏览器本地。关闭后入口隐藏,数据仍保留。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1},{id:`pluginDev`,category:`开发工具`,name:`插件开发`,description:`用固定提示词开发扩展插件:先评估形态与范围并用选项确认,确认后才改代码,完成后并入「扩展插件」。需要读写项目源码。`,version:`0.1.0`,requiresDev:!0,defaultEnabled:!1,hasPanel:!0}];function a(e=i){return r.map(t=>({category:t,items:e.filter(e=>e.category===t)})).filter(e=>e.items.length>0)}var o=`tw-plugins-changed`;function s(){let e={};for(let t of i)e[t.id]=t.defaultEnabled;return e}function c(e,t){let n={...e};if(t&&!m(t.id)?.alwaysOn){if(n[t.id]=t.enabled,t.enabled){let e=m(t.id)?.requires;e&&(n[e]=!0)}else for(let e of i)e.requires===t.id&&(n[e.id]=!1)}for(let e of i)e.alwaysOn&&(n[e.id]=!0);for(let e of i)e.requires&&!n[e.requires]&&(n[e.id]=!1);return n}function l(){let t=s(),n=e().plugins??{};for(let e of i)typeof n[e.id]==`boolean`&&(t[e.id]=n[e.id]);return c(t)}function u(e){return l()[e]}function d(e){let t=s();for(let n of i)typeof e[n.id]==`boolean`&&(t[n.id]=e[n.id]);return c(t)}function f(e,r){if(m(e)?.alwaysOn)return l();let i=c(l(),{id:e,enabled:r});return n({plugins:i}),t(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(o,{detail:i})),i}function p(e){if(typeof window>`u`)return()=>{};let t=t=>{let n=t.detail;e(n??l())};return window.addEventListener(o,t),()=>{window.removeEventListener(o,t)}}function m(e){return i.find(t=>t.id===e)}function h(e){let t=m(e),n=t?.name??e;return t?.requires&&!u(t.requires)?`请先在「我的插件」中启用「${m(t.requires)?.name??t.requires}」`:`请先在「我的插件」中启用「${n}」`}export{l as a,d as c,u as i,f as l,m as n,p as o,a as r,h as s,i as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=`默认提示词.md`,t=[`空间提示词.md`,`空间默认提示词.md`,`系统提示词.md`,`AI工作台系统提示词.md`],n=`你是 Lantern Harness 的 AI 助手,协助思考、写作、分析、编程与日常工作。
|
|
2
|
-
`,r={"工作汇报提示词.md":`reports`,"Playwright提示词.md":`uiAuto`,"需求分析提示词.md":`reqAnalysis`},i=new Set([e,...t]);function a(e){let t=e.split(`/`).pop()??e;return i.has(t)}function o(e){return r[e.split(`/`).pop()??e]}function s(e,t){let n=o(e);return n&&t?t[n]===!0:!1}function c(e,t){return a(e)||s(e,t)}function l(e){return(e||``).replace(/\\/g,`/`).replace(/^\.\//,``).trim()}function u(e,t){return t?!!t[l(e)]:!1}function d(e,t){let n=e.split(`/`).pop()??e;return a(n)?`system`:o(n)||(t?t[l(e)]??``:``)}function f(e,t){if(a(e))return`默认提示词不可删除`;let n=o(e);return n&&t?.[n]?`插件开启中,这份提示词由插件自带并维护;先在「我的插件」里关闭对应插件再删除`:``}function p(e){return a(e.split(`/`).pop()??e)}export{c as a,l as c,o as d,s as i,f as l,n,u as o,p as r,a as s,e as t,d as u};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
var e=`/__tb_reqanalysis`,t=`需求分析提示词.md`,n=`需求分析`,r={draft:{label:`待拆解`,tone:`gray`},decomposed:{label:`已拆解`,tone:`blue`},checked:{label:`已体检`,tone:`amber`},accepted:{label:`已验收`,tone:`green`}},i={P0:`red`,P1:`amber`,P2:`gray`},a={"uncovered-outline":`条目未覆盖`,"missing-field":`字段缺失`,"missing-scenario":`场景遗漏`,"missing-dimension":`维度缺失`,"untestable-acceptance":`验收不可测`,conflict:`与原文冲突`,"over-split":`过度拆分`,other:`其它`},o={high:`高`,medium:`中`,low:`低`},s={high:`red`,medium:`amber`,low:`gray`},c=[{key:`permission`,label:`权限与角色`,keywords:[`权限`,`角色`,`授权`,`越权`,`未登录`,`登录`,`管理员`,`普通用户`],hint:`补充不同角色 / 未登录 / 越权访问时这条流程的行为。`},{key:`boundary`,label:`边界值`,keywords:[`边界`,`上限`,`下限`,`最大`,`最小`,`长度`,`超长`,`字数`,`为空`,`空值`],hint:`补充字段长度、数量上限、刚好等于阈值时的表现。`},{key:`concurrency`,label:`并发与幂等`,keywords:[`并发`,`重复`,`幂等`,`同时`,`加锁`,`冲突`,`重复提交`],hint:`补充重复提交、多人同时操作同一数据时的结果。`},{key:`empty`,label:`空数据`,keywords:[`空数据`,`无数据`,`没有数据`,`空列表`,`暂无`,`空态`],hint:`补充列表为空、首次使用、数据被清空时的空态。`},{key:`failure`,label:`超时与失败`,keywords:[`超时`,`失败`,`异常`,`错误`,`重试`,`断网`,`不可用`,`降级`,`回滚`],hint:`补充依赖超时、接口失败、网络中断时的提示与回滚。`},{key:`i18n`,label:`国际化与时区`,keywords:[`国际化`,`时区`,`多语言`,`语言`,`翻译`,`utc`,`夏令时`],hint:`补充跨时区时间展示、多语言文案与本地化格式。`}],l=/创建|新增|新建|保存|提交|删除|编辑|修改|更新|上传|导入|导出|发布|审批|撤回|绑定|解绑|发送|支付|下单|配置|启停|启用|停用/;async function u(t,n){let r=await fetch(`${e}${t}`,{...n,headers:n?.body===void 0?void 0:{"Content-Type":`application/json`,...n?.headers}}),i=await r.json().catch(()=>({}));if(!r.ok||i.ok===!1)throw Error(i.error||`HTTP ${r.status}`);return i}async function d(){try{return(await fetch(`${e}?health=1`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}async function f(){return(await u(`/list`)).docs??[]}async function p(e){return(await u(`/create`,{method:`POST`,body:JSON.stringify(e)})).doc}async function m(e,t){return(await u(`/`,{method:`PUT`,body:JSON.stringify({id:e,...t})})).doc}async function h(e){await u(`/delete`,{method:`POST`,body:JSON.stringify({id:e})})}async function g(){try{let e=await u(`/prompt`);return{file:e.file||`需求分析提示词.md`,exists:e.exists===!0,decompose:e.decompose??``,audit:e.audit??``,fix:e.fix??``}}catch(e){return{file:t,exists:!1,decompose:``,audit:``,fix:``,error:e instanceof Error?e.message:String(e)}}}async function _(e){return await u(`/prompt/sync`,{method:`POST`,body:JSON.stringify({enabled:e})})}async function v(e){return(await b(e)).content}async function y(){return(await u(`/sources`)).files??[]}async function b(e){return u(`/source?path=${encodeURIComponent(e)}`)}var x=/[\s\p{P}\p{S}]+/gu;function S(e){return String(e??``).toLowerCase().replace(x,``)}function C(e){return Array.from(new Set(e.map(e=>String(e??``).trim()).filter(Boolean)))}function w(e,t=500){return typeof e==`string`?e.trim().slice(0,t):``}function T(e,t=30,n=500){return Array.isArray(e)?e.map(e=>w(e,n)).filter(Boolean).slice(0,t):[]}function E(e){let t=2166136261,n=String(e??``);for(let e=0;e<n.length;e++)t^=n.charCodeAt(e),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}function D(e){return E(String(e??``))}function O(e,t,n){return`g_${E(`${e}|${t}|${n}`)}`}function k(e){let t=e&&typeof e==`object`?e:{},n=w(t.priority,4);return{id:w(t.id,20),title:w(t.title,200),role:w(t.role,120),goal:w(t.goal,500),value:w(t.value,500),sourceRefs:T(t.sourceRefs,20,40),priority:n===`P0`||n===`P1`||n===`P2`?n:`P1`,preconditions:T(t.preconditions),mainFlow:(Array.isArray(t.mainFlow)?t.mainFlow:[]).map(e=>{let t=e&&typeof e==`object`?e:{};return{actor:w(t.actor,80),action:w(t.action,500),result:w(t.result,500)}}).filter(e=>e.action).slice(0,40),altFlows:(Array.isArray(t.altFlows)?t.altFlows:[]).map(e=>{let t=e&&typeof e==`object`?e:{};return{name:w(t.name,120)||`替代流程`,trigger:w(t.trigger,500),steps:T(t.steps,20)}}).slice(0,20),exceptions:(Array.isArray(t.exceptions)?t.exceptions:[]).map(e=>{let t=e&&typeof e==`object`?e:{};return{scenario:w(t.scenario,500),expected:w(t.expected,500)}}).filter(e=>e.scenario).slice(0,30),postconditions:T(t.postconditions),acceptance:(Array.isArray(t.acceptance)?t.acceptance:[]).map(e=>{let t=e&&typeof e==`object`?e:{};return{given:w(t.given,500),when:w(t.when,500),then:w(t.then,500)}}).filter(e=>e.given||e.when||e.then).slice(0,30),dimensions:T(t.dimensions,12,40)}}function A(e){return{...e,sourceRefs:[...e.sourceRefs],preconditions:[...e.preconditions],mainFlow:e.mainFlow.map(e=>({...e})),altFlows:e.altFlows.map(e=>({...e,steps:[...e.steps]})),exceptions:e.exceptions.map(e=>({...e})),postconditions:[...e.postconditions],acceptance:e.acceptance.map(e=>({...e})),dimensions:[...e.dimensions]}}function j(e){let t=e.mainFlow?.[0];return`${S(e.title)}|${t?S(`${t.action}${t.result??``}`):``}`}function M(e,t){let n=e.map(A),r=new Map(n.filter(e=>e.id).map(e=>[e.id,e])),i=new Map(n.map(e=>[j(e),e]));for(let e of t){let t=k(e);if(!t.title)continue;let a=t.id&&r.get(t.id)||i.get(j(t));if(a)!a.role&&t.role&&(a.role=t.role),!a.goal&&t.goal&&(a.goal=t.goal),!a.value&&t.value&&(a.value=t.value),a.sourceRefs=C([...a.sourceRefs,...t.sourceRefs]),a.dimensions=C([...a.dimensions,...t.dimensions]),a.preconditions.length||(a.preconditions=[...t.preconditions]),a.mainFlow.length||(a.mainFlow=t.mainFlow.map(e=>({...e}))),a.altFlows.length||(a.altFlows=t.altFlows.map(e=>({...e}))),a.exceptions.length||(a.exceptions=t.exceptions.map(e=>({...e}))),a.postconditions.length||(a.postconditions=[...t.postconditions]),a.acceptance.length||(a.acceptance=t.acceptance.map(e=>({...e}))),t.priority===`P0`&&a.priority!==`P0`?a.priority=`P0`:t.priority===`P1`&&a.priority===`P2`&&(a.priority=`P1`);else{let e={...t,id:``};n.push(e),i.set(j(e),e)}}return n}function N(e){return[e.title,e.role,e.goal,e.value,...e.dimensions,...e.preconditions,...e.postconditions,...e.mainFlow.map(e=>`${e.actor??``} ${e.action} ${e.result??``}`),...e.altFlows.map(e=>`${e.name} ${e.trigger} ${e.steps.join(` `)}`),...e.exceptions.map(e=>`${e.scenario} ${e.expected}`),...e.acceptance.map(e=>`${e.given} ${e.when} ${e.then}`)].join(` `)}function P(e){return e.mainFlow.some(e=>l.test(e.action))}function F(e,t,n,r,i,a){return{id:O(e,t,n),storyId:t,type:e,severity:a,title:n,detail:r,suggestion:i,origin:`rule`,selected:!1}}var I=new Set([`缺少角色`,`缺少目标`,`缺少前置条件`,`缺少主流程`,`没有异常场景`,`写操作缺少异常分支`,`缺少验收标准`,`验收标准缺 then`,`没有关联需求条目`,`只写了主流程`]);function L(e){let t=e.outline??[],n=e.stories??[],r=[],i=new Set(n.flatMap(e=>e.sourceRefs));for(let e of t)i.has(e.id)||r.push(F(`uncovered-outline`,``,`需求条目未覆盖:${e.title}`,`条目 ${e.id}「${e.title}」没有任何用户故事引用。`,`补一条覆盖该条目的用户故事,或在已有故事的 sourceRefs 里加上 ${e.id}。`,`high`));for(let e of n){let t=`${e.id} ${e.title}`;e.role||r.push(F(`missing-field`,e.id,`缺少角色`,`${t} 没有写清谁在用这个功能。`,`补一个来自原文的角色;原文没写就标注「推断」。`,`medium`)),e.goal||r.push(F(`missing-field`,e.id,`缺少目标`,`${t} 没有写用户要达成什么。`,`补一句用户目标(想要什么结果)。`,`medium`)),e.preconditions.length||r.push(F(`missing-field`,e.id,`缺少前置条件`,`${t} 没有前置条件。`,`补进入这条流程前必须成立的状态。`,`low`)),e.mainFlow.length||r.push(F(`missing-field`,e.id,`缺少主流程`,`${t} 没有主流程步骤。`,`按「动作 + 结果」补主流程。`,`high`)),e.sourceRefs.length||r.push(F(`missing-field`,e.id,`没有关联需求条目`,`${t} 的 sourceRefs 为空,覆盖率无法统计。`,`把这条故事挂到对应的需求条目 id 上。`,`low`)),e.exceptions.length?P(e)&&e.exceptions.length<2&&r.push(F(`missing-scenario`,e.id,`写操作缺少异常分支`,`${t} 包含写操作,但只写了 ${e.exceptions.length} 条异常。`,`补重复提交 / 并发修改 / 保存失败时的表现与回滚。`,`medium`)):r.push(F(`missing-scenario`,e.id,`没有异常场景`,`${t} 只写了顺利路径,没有异常分支。`,`至少补 3 条:输入非法、权限不足、依赖失败 / 超时。`,`high`)),!e.altFlows.length&&P(e)&&r.push(F(`missing-scenario`,e.id,`只写了主流程`,`${t} 没有替代流程:分支条件、可跳过步骤、不同入口都没覆盖。`,`按触发条件补至少一条替代路径。`,`low`)),e.acceptance.length?e.acceptance.some(e=>!e.then)&&r.push(F(`untestable-acceptance`,e.id,`验收标准缺 then`,`${t} 有 ${e.acceptance.filter(e=>!e.then).length} 条验收没有写 then。`,`补上「应该看到什么 / 查到什么」,不要停在操作步骤。`,`high`)):r.push(F(`untestable-acceptance`,e.id,`缺少验收标准`,`${t} 没有 Given / When / Then。`,`每条验收写成 Given / When / Then,then 必须可判定。`,`high`))}let a=c.map(e=>{let t=n.filter(t=>{let n=N(t).toLowerCase();return e.keywords.some(e=>n.includes(e.toLowerCase()))}).map(e=>e.id);return{key:e.key,label:e.label,covered:t.length>0,stories:t}});for(let e of a){if(e.covered)continue;let t=c.find(t=>t.key===e.key)?.hint??``;r.push(F(`missing-dimension`,``,`维度缺失:${e.label}`,`所有用户故事都没有覆盖「${e.label}」相关场景。`,t,`medium`))}let o=t.filter(e=>i.has(e.id)).length,s={total:t.length,covered:o,rate:t.length?o/t.length:0};return{at:new Date().toISOString(),summary:`规则检查:${n.length} 个故事、${t.length} 条需求条目,覆盖率 ${t.length?Math.round(s.rate*100):0}%,发现 ${r.length} 个问题。`,coverage:s,dimensions:a,gaps:r}}function R(e,t){let n=e.map(e=>({...e})),r=new Map(n.map(e=>[`${e.storyId}|${e.type}`,e])),i=new Set(n.map(e=>e.id));for(let e of t){if(i.has(e.id))continue;let t=`${e.storyId}|${e.type}`,a=r.get(t);a?I.has(a.title)?(a.title=e.title,a.detail=[a.detail,e.detail].filter(Boolean).join(` / `),a.suggestion=e.suggestion||a.suggestion,a.severity=e.severity):S(a.title)!==S(e.title)&&(n.push({...e}),i.add(e.id)):(n.push({...e}),r.set(t,e),i.add(e.id))}return n}function z(e,t){let n=new Set(e.filter(e=>e.selected).map(e=>e.id));return n.size?t.map(e=>n.has(e.id)?{...e,selected:!0}:e):t}function B(e,t){let n=[],r=``;for(let i of e.split(/\n{2,}/)){let e=r?`${r}\n\n${i}`:i;if(e.length<=t)r=e;else if(r&&n.push(r),i.length<=t)r=i;else{for(let e=0;e<i.length;e+=t)n.push(i.slice(e,e+t));r=``}}return r&&n.push(r),n}function V(e,t=12e3){let n=String(e??``).replace(/\r\n/g,`
|
|
2
|
-
`).trim();if(!n)return[];let r=Math.max(2e3,Math.floor(t));if(n.length<=r)return[{index:0,title:``,text:n}];let i=[],a=``,o=[],s=()=>{let e=o.join(`
|
|
3
|
-
`).trim();e&&i.push({title:a,text:e}),o=[]};for(let e of n.split(`
|
|
4
|
-
`)){let t=/^#{2,6}\s+(.+?)\s*$/.exec(e);t&&(s(),a=t[1]),o.push(e)}if(s(),!i.length)return[{index:0,title:``,text:n}];let c=[],l=``,u=``,d=()=>{let e=l.trim();if(e){for(let t of e.length>r?B(e,r):[e])c.push({index:c.length,title:u,text:t});l=``}};for(let e of i){let t=l?`${l}\n\n${e.text}`:e.text;t.length<=r?(l||(u=e.title),l=t):(d(),u=e.title,l=e.text,l.length>r&&d())}return d(),c.length?c:[{index:0,title:``,text:n}]}function H(e,t){return t?`- **${e}**:${t}`:``}function U(e){return e.filter(Boolean).map(e=>`- ${e}`)}function W(e){let t=[];t.push(`### ${e.id} ${e.title}`),t.push(``);let n=[H(`角色`,e.role),H(`目标`,e.goal),H(`价值`,e.value),H(`优先级`,e.priority),H(`来源条目`,e.sourceRefs.join(`、`))].filter(Boolean);if(t.push(...n),n.length&&t.push(``),e.preconditions.length&&(t.push(`**前置条件**`),t.push(...U(e.preconditions)),t.push(``)),e.mainFlow.length&&(t.push(`**主流程**`),e.mainFlow.forEach((e,n)=>{let r=e.actor?`${e.actor}:`:``;t.push(`${n+1}. ${r}${e.action}${e.result?` → ${e.result}`:``}`)}),t.push(``)),e.altFlows.length){t.push(`**替代流程**`);for(let n of e.altFlows)t.push(`- **${n.name}**${n.trigger?`(触发:${n.trigger})`:``}`),n.steps.forEach((e,n)=>t.push(` ${n+1}. ${e}`));t.push(``)}if(e.exceptions.length){t.push(`**异常场景**`);for(let n of e.exceptions)t.push(`- ${n.scenario}${n.expected?` → ${n.expected}`:``}`);t.push(``)}if(e.postconditions.length&&(t.push(`**后置条件**`),t.push(...U(e.postconditions)),t.push(``)),e.acceptance.length){t.push(`**验收标准**`);for(let n of e.acceptance)t.push(`- Given ${n.given||`(未写)`};When ${n.when||`(未写)`};Then ${n.then||`(未写)`}`);t.push(``)}return e.dimensions.length&&(t.push(`**覆盖维度**:${e.dimensions.join(`、`)}`),t.push(``)),t[t.length-1]!==``&&t.push(``),t}function G(e,t){let n=new Set((t??[]).filter(Boolean)),i=n.size?e.stories.filter(e=>n.has(e.id)):e.stories,a=[];a.push(`# ${e.title||`需求分析`} · 用户故事`),a.push(``),a.push(`> 来源需求文档:\`${e.sourcePath||`(未指定)`}\` · 状态:${r[e.status].label} · 更新:${e.updatedAt}`),a.push(``),e.outline.length&&(a.push(`## 需求条目`),a.push(``),e.outline.forEach((e,t)=>{a.push(`${t+1}. **${e.id}** ${e.title}`)}),a.push(``)),a.push(`## 用户故事`),a.push(``),i.length||(a.push(`- (暂无)`),a.push(``));for(let e of i)a.push(...W(e));return a.join(`
|
|
5
|
-
`)}function K(e){let t=[];t.push(`# ${e.title||`需求分析`}`),t.push(``),t.push(`> 来源:\`${e.sourcePath||`(未指定)`}\` · 状态:${r[e.status].label} · 更新:${e.updatedAt}`),t.push(``),t.push(`## 需求条目`),t.push(``),e.outline.length||t.push(`- (暂无)`),e.outline.forEach((e,n)=>{t.push(`${n+1}. **${e.id}** ${e.title}`),e.quote&&t.push(` > ${e.quote.replace(/\n+/g,` `)}`)}),t.push(``),t.push(`## 用户故事`),t.push(``),e.stories.length||t.push(`- (暂无)`);for(let n of e.stories)t.push(...W(n));if(t.push(`## 体检摘要`),t.push(``),!e.check)t.push(`- 还没有跑过体检。`);else{let n=e.check.coverage.total?Math.round(e.check.coverage.rate*100):0;t.push(`- 覆盖率:${e.check.coverage.covered}/${e.check.coverage.total}(${n}%)`),t.push(`- 维度覆盖:${e.check.dimensions.map(e=>`${e.label}${e.covered?` ✓`:` ✗`}`).join(` · `)||`(无)`}`),e.check.summary&&(t.push(``),t.push(e.check.summary)),t.push(``),t.push(`### 缺口清单`),t.push(``),e.check.gaps.length||t.push(`- 没有发现缺口。`);let r=[...e.check.gaps].sort((e,t)=>{let n={high:0,medium:1,low:2};return n[e.severity]-n[t.severity]});for(let e of r){let n=e.storyId?`${e.storyId} `:``;t.push(`- **[${o[e.severity]}] ${a[e.type]}** · ${n}${e.title}`),e.detail&&t.push(` - 原因:${e.detail}`),e.suggestion&&t.push(` - 建议:${e.suggestion}`)}}return t.push(``),t.join(`
|
|
6
|
-
`)}function q(e){return`${(e.title||e.sourcePath.split(`/`).pop()||`需求分析`).replace(/\.(md|markdown|txt)$/i,``).replace(/[\\/:*?"<>|]/g,` `).trim()||`需求分析`}-用户故事.md`}export{G as C,m as E,V as S,K as T,R as _,t as a,v as b,L as c,q as d,d as f,y as g,f as h,n as i,p as l,O as m,s as n,i as o,g as p,a as r,r as s,o as t,h as u,M as v,_ as w,D as x,z as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`0.1.13`,t=`/__tb_update`;async function n(e=!1){try{let n=await fetch(e?`${t}?refresh=1`:t,{signal:AbortSignal.timeout(6e3),headers:{accept:`application/json`},cache:`no-store`});if(!n.ok)return null;let r=await n.json();return!r||typeof r.current!=`string`?null:r}catch{return null}}async function r(e){try{let n=await fetch(t,{method:`POST`,signal:AbortSignal.timeout(1e4),headers:{"content-type":`application/json`},body:JSON.stringify(e?{version:e}:{})});return n.status===202?{ok:!0}:{ok:!1,error:(await n.json().catch(()=>null))?.error||`HTTP ${n.status}`}}catch(e){return{ok:!0,error:e instanceof Error?e.message:String(e)}}}export{r as n,e as r,n as t};
|