@feedmepos/mf-miniprogram-v2 0.1.0-dev.15 → 0.1.0-dev.16
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var aa = Object.defineProperty;
|
|
2
2
|
var oa = (t, e, n) => e in t ? aa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var te = (t, e, n) => oa(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { defineComponent as
|
|
4
|
+
import { defineComponent as it, ref as pe, computed as ne, resolveComponent as $e, openBlock as x, createElementBlock as I, normalizeClass as Fe, createElementVNode as m, createVNode as V, toDisplayString as j, createTextVNode as je, createCommentVNode as se, Fragment as Oe, renderList as De, reactive as An, normalizeStyle as fn, createBlock as Ae, watch as It, nextTick as pn, onBeforeUnmount as gr, withModifiers as Rn, withDirectives as Nn, vModelText as Cn, renderSlot as la, onMounted as In, unref as O, withCtx as st, withKeys as ca } from "vue";
|
|
5
5
|
import { useCoreStore as br, FeedMeAuth as ua } from "@feedmepos/mf-common";
|
|
6
6
|
import { useDialog as da } from "@feedmepos/ui-library";
|
|
7
7
|
import { _ as Lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -35,7 +35,7 @@ var fa = ((t = "") => {
|
|
|
35
35
|
}
|
|
36
36
|
})(), Xe = { 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, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: Wt((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Wt((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Wt((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: Wt((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: Wt((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Wt((t) => new RegExp(`^ {0,${t}}>`)) }, pa = /^(?:[ \t]*(?:\n|$))+/, ha = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ma = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, gn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ga = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, _r = / {0,3}(?:[*+-]|\d{1,9}[.)])/, js = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Hs = we(js).replace(/bull/g, _r).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(), ba = we(js).replace(/bull/g, _r).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(), xr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ya = /^[^\n]+/, wr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, _a = we(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", wr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xa = we(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, _r).getRegex(), zn = "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", vr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, wa = we("^ {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", vr).replace("tag", zn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Gs = we(xr).replace("hr", gn).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[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zn).getRegex(), va = we(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Gs).getRegex(), kr = { blockquote: va, code: ha, def: _a, fences: ma, heading: ga, hr: gn, html: wa, lheading: Hs, list: xa, newline: pa, paragraph: Gs, table: Ct, text: ya }, Vr = we("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", gn).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[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zn).getRegex(), ka = { ...kr, lheading: ba, table: Vr, paragraph: we(xr).replace("hr", gn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Vr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zn).getRegex() }, Ea = { ...kr, html: we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", vr).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: Ct, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: we(xr).replace("hr", gn).replace("heading", ` *#{1,6} *[^
|
|
37
37
|
]`).replace("lheading", Hs).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ta = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Sa = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ws = /^( {2,}|\\)\n(?!\s*$)/, Aa = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Jt = /[\p{P}\p{S}]/u, Bn = /[\s\p{P}\p{S}]/u, Er = /[^\s\p{P}\p{S}]/u, Ra = we(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Bn).getRegex(), Ks = /(?!~)[\p{P}\p{S}]/u, Na = /(?!~)[\s\p{P}\p{S}]/u, Ca = /(?:[^\s\p{P}\p{S}]|~)/u, Ia = we(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", fa ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), qs = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Oa = we(qs, "u").replace(/punct/g, Jt).getRegex(), $a = we(qs, "u").replace(/punct/g, Ks).getRegex(), Vs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ma = we(Vs, "gu").replace(/notPunctSpace/g, Er).replace(/punctSpace/g, Bn).replace(/punct/g, Jt).getRegex(), La = we(Vs, "gu").replace(/notPunctSpace/g, Ca).replace(/punctSpace/g, Na).replace(/punct/g, Ks).getRegex(), Pa = we("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Er).replace(/punctSpace/g, Bn).replace(/punct/g, Jt).getRegex(), Da = we(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Jt).getRegex(), za = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ba = we(za, "gu").replace(/notPunctSpace/g, Er).replace(/punctSpace/g, Bn).replace(/punct/g, Jt).getRegex(), Fa = we(/\\(punct)/, "gu").replace(/punct/g, Jt).getRegex(), Ua = we(/^<(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(), ja = we(vr).replace("(?:-->|$)", "-->").getRegex(), Ha = we("^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", ja).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), On = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Ga = we(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", On).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Zs = we(/^!?\[(label)\]\[(ref)\]/).replace("label", On).replace("ref", wr).getRegex(), Ys = we(/^!?\[(ref)\](?:\[\])?/).replace("ref", wr).getRegex(), Wa = we("reflink|nolink(?!\\()", "g").replace("reflink", Zs).replace("nolink", Ys).getRegex(), Zr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Tr = { _backpedal: Ct, anyPunctuation: Fa, autolink: Ua, blockSkip: Ia, br: Ws, code: Sa, del: Ct, delLDelim: Ct, delRDelim: Ct, emStrongLDelim: Oa, emStrongRDelimAst: Ma, emStrongRDelimUnd: Pa, escape: Ta, link: Ga, nolink: Ys, punctuation: Ra, reflink: Zs, reflinkSearch: Wa, tag: Ha, text: Aa, url: Ct }, Ka = { ...Tr, link: we(/^!?\[(label)\]\((.*?)\)/).replace("label", On).getRegex(), reflink: we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", On).getRegex() }, cr = { ...Tr, emStrongRDelimAst: La, emStrongLDelim: $a, delLDelim: Da, delRDelim: Ba, url: we(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Zr).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\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: we(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Zr).getRegex() }, qa = { ...cr, br: we(Ws).replace("{2,}", "*").getRegex(), text: we(cr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, wn = { normal: kr, gfm: ka, pedantic: Ea }, sn = { normal: Tr, gfm: cr, breaks: qa, pedantic: Ka }, Va = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Yr = (t) => Va[t];
|
|
38
|
-
function
|
|
38
|
+
function bt(t, e) {
|
|
39
39
|
if (e) {
|
|
40
40
|
if (Xe.escapeTest.test(t)) return t.replace(Xe.escapeReplace, Yr);
|
|
41
41
|
} else if (Xe.escapeTestNoEncode.test(t)) return t.replace(Xe.escapeReplaceNoEncode, Yr);
|
|
@@ -61,7 +61,7 @@ function Jr(t, e) {
|
|
|
61
61
|
for (; s < r.length; s++) r[s] = r[s].trim().replace(Xe.slashPipe, "|");
|
|
62
62
|
return r;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Et(t, e, n) {
|
|
65
65
|
let r = t.length;
|
|
66
66
|
if (r === 0) return "";
|
|
67
67
|
let s = 0;
|
|
@@ -141,22 +141,22 @@ var $n = class {
|
|
|
141
141
|
if (e) {
|
|
142
142
|
let n = e[2].trim();
|
|
143
143
|
if (this.rules.other.endingHash.test(n)) {
|
|
144
|
-
let r =
|
|
144
|
+
let r = Et(n, "#");
|
|
145
145
|
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
146
146
|
}
|
|
147
|
-
return { type: "heading", raw:
|
|
147
|
+
return { type: "heading", raw: Et(e[0], `
|
|
148
148
|
`), depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
hr(t) {
|
|
152
152
|
let e = this.rules.block.hr.exec(t);
|
|
153
|
-
if (e) return { type: "hr", raw:
|
|
153
|
+
if (e) return { type: "hr", raw: Et(e[0], `
|
|
154
154
|
`) };
|
|
155
155
|
}
|
|
156
156
|
blockquote(t) {
|
|
157
157
|
let e = this.rules.block.blockquote.exec(t);
|
|
158
158
|
if (e) {
|
|
159
|
-
let n =
|
|
159
|
+
let n = Et(e[0], `
|
|
160
160
|
`).split(`
|
|
161
161
|
`), r = "", s = "", i = [];
|
|
162
162
|
for (; n.length > 0; ) {
|
|
@@ -268,7 +268,7 @@ ${f}` : f;
|
|
|
268
268
|
let e = this.rules.block.def.exec(t);
|
|
269
269
|
if (e) {
|
|
270
270
|
let n = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", s = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
|
|
271
|
-
return { type: "def", tag: n, raw:
|
|
271
|
+
return { type: "def", tag: n, raw: Et(e[0], `
|
|
272
272
|
`), href: r, title: s };
|
|
273
273
|
}
|
|
274
274
|
}
|
|
@@ -277,7 +277,7 @@ ${f}` : f;
|
|
|
277
277
|
let e = this.rules.block.table.exec(t);
|
|
278
278
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
279
279
|
let n = Jr(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (o = e[3]) != null && o.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
280
|
-
`) : [], i = { type: "table", raw:
|
|
280
|
+
`) : [], i = { type: "table", raw: Et(e[0], `
|
|
281
281
|
`), header: [], align: [], rows: [] };
|
|
282
282
|
if (n.length === r.length) {
|
|
283
283
|
for (let a of r) this.rules.other.tableAlignRight.test(a) ? i.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? i.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? i.align.push("left") : i.align.push(null);
|
|
@@ -290,7 +290,7 @@ ${f}` : f;
|
|
|
290
290
|
let e = this.rules.block.lheading.exec(t);
|
|
291
291
|
if (e) {
|
|
292
292
|
let n = e[1].trim();
|
|
293
|
-
return { type: "heading", raw:
|
|
293
|
+
return { type: "heading", raw: Et(e[0], `
|
|
294
294
|
`), depth: e[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
|
|
295
295
|
}
|
|
296
296
|
}
|
|
@@ -320,7 +320,7 @@ ${f}` : f;
|
|
|
320
320
|
let n = e[2].trim();
|
|
321
321
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
322
322
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
323
|
-
let i =
|
|
323
|
+
let i = Et(n.slice(0, -1), "\\");
|
|
324
324
|
if ((n.length - i.length) % 2 === 0) return;
|
|
325
325
|
} else {
|
|
326
326
|
let i = Za(e[2], "()");
|
|
@@ -432,7 +432,7 @@ ${f}` : f;
|
|
|
432
432
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
},
|
|
435
|
+
}, pt = class ur {
|
|
436
436
|
constructor(e) {
|
|
437
437
|
te(this, "tokens");
|
|
438
438
|
te(this, "options");
|
|
@@ -666,8 +666,8 @@ ${f}` : f;
|
|
|
666
666
|
var i;
|
|
667
667
|
let r = (i = (e || "").match(Xe.notSpaceStart)) == null ? void 0 : i[0], s = t.replace(Xe.endingNewline, "") + `
|
|
668
668
|
`;
|
|
669
|
-
return r ? '<pre><code class="language-' +
|
|
670
|
-
` : "<pre><code>" + (n ? s :
|
|
669
|
+
return r ? '<pre><code class="language-' + bt(r) + '">' + (n ? s : bt(s, !0)) + `</code></pre>
|
|
670
|
+
` : "<pre><code>" + (n ? s : bt(s, !0)) + `</code></pre>
|
|
671
671
|
`;
|
|
672
672
|
}
|
|
673
673
|
blockquote({ tokens: t }) {
|
|
@@ -745,7 +745,7 @@ ${t}</tr>
|
|
|
745
745
|
return `<em>${this.parser.parseInline(t)}</em>`;
|
|
746
746
|
}
|
|
747
747
|
codespan({ text: t }) {
|
|
748
|
-
return `<code>${
|
|
748
|
+
return `<code>${bt(t, !0)}</code>`;
|
|
749
749
|
}
|
|
750
750
|
br(t) {
|
|
751
751
|
return "<br>";
|
|
@@ -758,18 +758,18 @@ ${t}</tr>
|
|
|
758
758
|
if (s === null) return r;
|
|
759
759
|
t = s;
|
|
760
760
|
let i = '<a href="' + t + '"';
|
|
761
|
-
return e && (i += ' title="' +
|
|
761
|
+
return e && (i += ' title="' + bt(e) + '"'), i += ">" + r + "</a>", i;
|
|
762
762
|
}
|
|
763
763
|
image({ href: t, title: e, text: n, tokens: r }) {
|
|
764
764
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
765
765
|
let s = Xr(t);
|
|
766
|
-
if (s === null) return
|
|
766
|
+
if (s === null) return bt(n);
|
|
767
767
|
t = s;
|
|
768
|
-
let i = `<img src="${t}" alt="${
|
|
769
|
-
return e && (i += ` title="${
|
|
768
|
+
let i = `<img src="${t}" alt="${bt(n)}"`;
|
|
769
|
+
return e && (i += ` title="${bt(e)}"`), i += ">", i;
|
|
770
770
|
}
|
|
771
771
|
text(t) {
|
|
772
|
-
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text :
|
|
772
|
+
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : bt(t.text);
|
|
773
773
|
}
|
|
774
774
|
}, Sr = class {
|
|
775
775
|
strong({ text: t }) {
|
|
@@ -802,7 +802,7 @@ ${t}</tr>
|
|
|
802
802
|
checkbox({ raw: t }) {
|
|
803
803
|
return t;
|
|
804
804
|
}
|
|
805
|
-
},
|
|
805
|
+
}, ht = class dr {
|
|
806
806
|
constructor(e) {
|
|
807
807
|
te(this, "options");
|
|
808
808
|
te(this, "renderer");
|
|
@@ -974,10 +974,10 @@ ${t}</tr>
|
|
|
974
974
|
return t;
|
|
975
975
|
}
|
|
976
976
|
provideLexer(t = this.block) {
|
|
977
|
-
return t ?
|
|
977
|
+
return t ? pt.lex : pt.lexInline;
|
|
978
978
|
}
|
|
979
979
|
provideParser(t = this.block) {
|
|
980
|
-
return t ?
|
|
980
|
+
return t ? ht.parse : ht.parseInline;
|
|
981
981
|
}
|
|
982
982
|
}, te(Sn, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), te(Sn, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Sn), Xs = class {
|
|
983
983
|
constructor(...t) {
|
|
@@ -985,10 +985,10 @@ ${t}</tr>
|
|
|
985
985
|
te(this, "options", this.setOptions);
|
|
986
986
|
te(this, "parse", this.parseMarkdown(!0));
|
|
987
987
|
te(this, "parseInline", this.parseMarkdown(!1));
|
|
988
|
-
te(this, "Parser",
|
|
988
|
+
te(this, "Parser", ht);
|
|
989
989
|
te(this, "Renderer", Mn);
|
|
990
990
|
te(this, "TextRenderer", Sr);
|
|
991
|
-
te(this, "Lexer",
|
|
991
|
+
te(this, "Lexer", pt);
|
|
992
992
|
te(this, "Tokenizer", $n);
|
|
993
993
|
te(this, "Hooks", un);
|
|
994
994
|
this.use(...t);
|
|
@@ -1101,10 +1101,10 @@ ${t}</tr>
|
|
|
1101
1101
|
return this.defaults = { ...this.defaults, ...t }, this;
|
|
1102
1102
|
}
|
|
1103
1103
|
lexer(t, e) {
|
|
1104
|
-
return
|
|
1104
|
+
return pt.lex(t, e ?? this.defaults);
|
|
1105
1105
|
}
|
|
1106
1106
|
parser(t, e) {
|
|
1107
|
-
return
|
|
1107
|
+
return ht.parse(t, e ?? this.defaults);
|
|
1108
1108
|
}
|
|
1109
1109
|
parseMarkdown(t) {
|
|
1110
1110
|
return (e, n) => {
|
|
@@ -1113,16 +1113,16 @@ ${t}</tr>
|
|
|
1113
1113
|
if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
|
|
1114
1114
|
if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1115
1115
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
|
|
1116
|
-
let o = s.hooks ? await s.hooks.preprocess(e) : e, a = await (s.hooks ? await s.hooks.provideLexer(t) : t ?
|
|
1116
|
+
let o = s.hooks ? await s.hooks.preprocess(e) : e, a = await (s.hooks ? await s.hooks.provideLexer(t) : t ? pt.lex : pt.lexInline)(o, s), l = s.hooks ? await s.hooks.processAllTokens(a) : a;
|
|
1117
1117
|
s.walkTokens && await Promise.all(this.walkTokens(l, s.walkTokens));
|
|
1118
|
-
let u = await (s.hooks ? await s.hooks.provideParser(t) : t ?
|
|
1118
|
+
let u = await (s.hooks ? await s.hooks.provideParser(t) : t ? ht.parse : ht.parseInline)(l, s);
|
|
1119
1119
|
return s.hooks ? await s.hooks.postprocess(u) : u;
|
|
1120
1120
|
})().catch(i);
|
|
1121
1121
|
try {
|
|
1122
1122
|
s.hooks && (e = s.hooks.preprocess(e));
|
|
1123
|
-
let o = (s.hooks ? s.hooks.provideLexer(t) : t ?
|
|
1123
|
+
let o = (s.hooks ? s.hooks.provideLexer(t) : t ? pt.lex : pt.lexInline)(e, s);
|
|
1124
1124
|
s.hooks && (o = s.hooks.processAllTokens(o)), s.walkTokens && this.walkTokens(o, s.walkTokens);
|
|
1125
|
-
let a = (s.hooks ? s.hooks.provideParser(t) : t ?
|
|
1125
|
+
let a = (s.hooks ? s.hooks.provideParser(t) : t ? ht.parse : ht.parseInline)(o, s);
|
|
1126
1126
|
return s.hooks && (a = s.hooks.postprocess(a)), a;
|
|
1127
1127
|
} catch (o) {
|
|
1128
1128
|
return i(o);
|
|
@@ -1133,7 +1133,7 @@ ${t}</tr>
|
|
|
1133
1133
|
return (n) => {
|
|
1134
1134
|
if (n.message += `
|
|
1135
1135
|
Please report this to https://github.com/markedjs/marked.`, t) {
|
|
1136
|
-
let r = "<p>An error occurred:</p><pre>" +
|
|
1136
|
+
let r = "<p>An error occurred:</p><pre>" + bt(n.message + "", !0) + "</pre>";
|
|
1137
1137
|
return e ? Promise.resolve(r) : r;
|
|
1138
1138
|
}
|
|
1139
1139
|
if (e) return Promise.reject(n);
|
|
@@ -1141,37 +1141,37 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
1141
1141
|
};
|
|
1142
1142
|
}
|
|
1143
1143
|
}, $t = new Xs();
|
|
1144
|
-
function
|
|
1144
|
+
function Ne(t, e) {
|
|
1145
1145
|
return $t.parse(t, e);
|
|
1146
1146
|
}
|
|
1147
|
-
|
|
1148
|
-
return $t.setOptions(t),
|
|
1147
|
+
Ne.options = Ne.setOptions = function(t) {
|
|
1148
|
+
return $t.setOptions(t), Ne.defaults = $t.defaults, Us(Ne.defaults), Ne;
|
|
1149
1149
|
};
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
return $t.use(...t),
|
|
1150
|
+
Ne.getDefaults = yr;
|
|
1151
|
+
Ne.defaults = Pt;
|
|
1152
|
+
Ne.use = function(...t) {
|
|
1153
|
+
return $t.use(...t), Ne.defaults = $t.defaults, Us(Ne.defaults), Ne;
|
|
1154
1154
|
};
|
|
1155
|
-
|
|
1155
|
+
Ne.walkTokens = function(t, e) {
|
|
1156
1156
|
return $t.walkTokens(t, e);
|
|
1157
1157
|
};
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1158
|
+
Ne.parseInline = $t.parseInline;
|
|
1159
|
+
Ne.Parser = ht;
|
|
1160
|
+
Ne.parser = ht.parse;
|
|
1161
|
+
Ne.Renderer = Mn;
|
|
1162
|
+
Ne.TextRenderer = Sr;
|
|
1163
|
+
Ne.Lexer = pt;
|
|
1164
|
+
Ne.lexer = pt.lex;
|
|
1165
|
+
Ne.Tokenizer = $n;
|
|
1166
|
+
Ne.Hooks = un;
|
|
1167
|
+
Ne.parse = Ne;
|
|
1168
|
+
Ne.options;
|
|
1169
|
+
Ne.setOptions;
|
|
1170
|
+
Ne.use;
|
|
1171
|
+
Ne.walkTokens;
|
|
1172
|
+
Ne.parseInline;
|
|
1173
|
+
ht.parse;
|
|
1174
|
+
pt.lex;
|
|
1175
1175
|
function Ja(t) {
|
|
1176
1176
|
if (typeof t == "function" && (t = {
|
|
1177
1177
|
highlight: t
|
|
@@ -1251,7 +1251,7 @@ class is {
|
|
|
1251
1251
|
function ti(t) {
|
|
1252
1252
|
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function At(t, ...e) {
|
|
1255
1255
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1256
1256
|
for (const r in t)
|
|
1257
1257
|
n[r] = t[r];
|
|
@@ -1469,7 +1469,7 @@ const po = /\b\B/, si = "[a-zA-Z]\\w*", Cr = "[a-zA-Z_]\\w*", ii = "\\b\\d+(\\.\
|
|
|
1469
1469
|
/.*\b/,
|
|
1470
1470
|
t.binary,
|
|
1471
1471
|
/\b.*/
|
|
1472
|
-
)),
|
|
1472
|
+
)), At({
|
|
1473
1473
|
scope: "meta",
|
|
1474
1474
|
begin: e,
|
|
1475
1475
|
end: /$/,
|
|
@@ -1497,7 +1497,7 @@ const po = /\b\B/, si = "[a-zA-Z]\\w*", Cr = "[a-zA-Z_]\\w*", ii = "\\b\\d+(\\.\
|
|
|
1497
1497
|
}, yo = {
|
|
1498
1498
|
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
|
1499
1499
|
}, Fn = function(t, e, n = {}) {
|
|
1500
|
-
const r =
|
|
1500
|
+
const r = At(
|
|
1501
1501
|
{
|
|
1502
1502
|
scope: "comment",
|
|
1503
1503
|
begin: t,
|
|
@@ -1852,7 +1852,7 @@ function Wo(t) {
|
|
|
1852
1852
|
}
|
|
1853
1853
|
if (t.compilerExtensions || (t.compilerExtensions = []), t.contains && t.contains.includes("self"))
|
|
1854
1854
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
1855
|
-
return t.classNameAliases =
|
|
1855
|
+
return t.classNameAliases = At(t.classNameAliases || {}), i(
|
|
1856
1856
|
/** @type Mode */
|
|
1857
1857
|
t
|
|
1858
1858
|
);
|
|
@@ -1862,8 +1862,8 @@ function ui(t) {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
function Ko(t) {
|
|
1864
1864
|
return t.variants && !t.cachedVariants && (t.cachedVariants = t.variants.map(function(e) {
|
|
1865
|
-
return
|
|
1866
|
-
})), t.cachedVariants ? t.cachedVariants : ui(t) ?
|
|
1865
|
+
return At(t, { variants: null }, e);
|
|
1866
|
+
})), t.cachedVariants ? t.cachedVariants : ui(t) ? At(t, { starts: t.starts ? At(t.starts) : null }) : Object.isFrozen(t) ? At(t) : t;
|
|
1867
1867
|
}
|
|
1868
1868
|
var qo = "11.11.1";
|
|
1869
1869
|
class Vo extends Error {
|
|
@@ -1871,7 +1871,7 @@ class Vo extends Error {
|
|
|
1871
1871
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
|
-
const Xn = ti, us =
|
|
1874
|
+
const Xn = ti, us = At, ds = Symbol("nomatch"), Zo = 7, di = function(t) {
|
|
1875
1875
|
const e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null), r = [];
|
|
1876
1876
|
let s = !0;
|
|
1877
1877
|
const i = "Could not find the language '{}', did you forget to load/include a language module?", o = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
@@ -1909,58 +1909,58 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
1909
1909
|
language: me
|
|
1910
1910
|
};
|
|
1911
1911
|
ue("before:highlight", re);
|
|
1912
|
-
const
|
|
1913
|
-
return
|
|
1912
|
+
const Ie = re.result ? re.result : g(re.language, re.code, G);
|
|
1913
|
+
return Ie.code = re.code, ue("after:highlight", Ie), Ie;
|
|
1914
1914
|
}
|
|
1915
1915
|
function g(T, W, G, le) {
|
|
1916
1916
|
const me = /* @__PURE__ */ Object.create(null);
|
|
1917
1917
|
function re(F, K) {
|
|
1918
1918
|
return F.keywords[K];
|
|
1919
1919
|
}
|
|
1920
|
-
function
|
|
1921
|
-
if (!
|
|
1922
|
-
|
|
1920
|
+
function Ie() {
|
|
1921
|
+
if (!Q.keywords) {
|
|
1922
|
+
Re.addText(Ee);
|
|
1923
1923
|
return;
|
|
1924
1924
|
}
|
|
1925
1925
|
let F = 0;
|
|
1926
|
-
|
|
1927
|
-
let K =
|
|
1926
|
+
Q.keywordPatternRe.lastIndex = 0;
|
|
1927
|
+
let K = Q.keywordPatternRe.exec(Ee), fe = "";
|
|
1928
1928
|
for (; K; ) {
|
|
1929
1929
|
fe += Ee.substring(F, K.index);
|
|
1930
|
-
const _e =
|
|
1931
|
-
if (
|
|
1932
|
-
const [Ye,
|
|
1933
|
-
if (
|
|
1930
|
+
const _e = be.case_insensitive ? K[0].toLowerCase() : K[0], Ce = re(Q, _e);
|
|
1931
|
+
if (Ce) {
|
|
1932
|
+
const [Ye, wt] = Ce;
|
|
1933
|
+
if (Re.addText(fe), fe = "", me[_e] = (me[_e] || 0) + 1, me[_e] <= Zo && (_t += wt), Ye.startsWith("_"))
|
|
1934
1934
|
fe += K[0];
|
|
1935
1935
|
else {
|
|
1936
|
-
const
|
|
1937
|
-
ie(K[0],
|
|
1936
|
+
const vt = be.classNameAliases[Ye] || Ye;
|
|
1937
|
+
ie(K[0], vt);
|
|
1938
1938
|
}
|
|
1939
1939
|
} else
|
|
1940
1940
|
fe += K[0];
|
|
1941
|
-
F =
|
|
1941
|
+
F = Q.keywordPatternRe.lastIndex, K = Q.keywordPatternRe.exec(Ee);
|
|
1942
1942
|
}
|
|
1943
|
-
fe += Ee.substring(F),
|
|
1943
|
+
fe += Ee.substring(F), Re.addText(fe);
|
|
1944
1944
|
}
|
|
1945
1945
|
function N() {
|
|
1946
1946
|
if (Ee === "") return;
|
|
1947
1947
|
let F = null;
|
|
1948
|
-
if (typeof
|
|
1949
|
-
if (!e[
|
|
1950
|
-
|
|
1948
|
+
if (typeof Q.subLanguage == "string") {
|
|
1949
|
+
if (!e[Q.subLanguage]) {
|
|
1950
|
+
Re.addText(Ee);
|
|
1951
1951
|
return;
|
|
1952
1952
|
}
|
|
1953
|
-
F = g(
|
|
1953
|
+
F = g(Q.subLanguage, Ee, !0, tt[Q.subLanguage]), tt[Q.subLanguage] = /** @type {CompiledMode} */
|
|
1954
1954
|
F._top;
|
|
1955
1955
|
} else
|
|
1956
|
-
F = v(Ee,
|
|
1957
|
-
|
|
1956
|
+
F = v(Ee, Q.subLanguage.length ? Q.subLanguage : null);
|
|
1957
|
+
Q.relevance > 0 && (_t += F.relevance), Re.__addSublanguage(F._emitter, F.language);
|
|
1958
1958
|
}
|
|
1959
1959
|
function $() {
|
|
1960
|
-
|
|
1960
|
+
Q.subLanguage != null ? N() : Ie(), Ee = "";
|
|
1961
1961
|
}
|
|
1962
1962
|
function ie(F, K) {
|
|
1963
|
-
F !== "" && (
|
|
1963
|
+
F !== "" && (Re.startScope(K), Re.addText(F), Re.endScope());
|
|
1964
1964
|
}
|
|
1965
1965
|
function ke(F, K) {
|
|
1966
1966
|
let fe = 1;
|
|
@@ -1970,19 +1970,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
1970
1970
|
fe++;
|
|
1971
1971
|
continue;
|
|
1972
1972
|
}
|
|
1973
|
-
const
|
|
1974
|
-
|
|
1973
|
+
const Ce = be.classNameAliases[F[fe]] || F[fe], Ye = K[fe];
|
|
1974
|
+
Ce ? ie(Ye, Ce) : (Ee = Ye, Ie(), Ee = ""), fe++;
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
1977
|
function w(F, K) {
|
|
1978
|
-
return F.scope && typeof F.scope == "string" &&
|
|
1978
|
+
return F.scope && typeof F.scope == "string" && Re.openNode(be.classNameAliases[F.scope] || F.scope), F.beginScope && (F.beginScope._wrap ? (ie(Ee, be.classNameAliases[F.beginScope._wrap] || F.beginScope._wrap), Ee = "") : F.beginScope._multi && (ke(F.beginScope, K), Ee = "")), Q = Object.create(F, { parent: { value: Q } }), Q;
|
|
1979
1979
|
}
|
|
1980
1980
|
function M(F, K, fe) {
|
|
1981
1981
|
let _e = uo(F.endRe, fe);
|
|
1982
1982
|
if (_e) {
|
|
1983
1983
|
if (F["on:end"]) {
|
|
1984
|
-
const
|
|
1985
|
-
F["on:end"](K,
|
|
1984
|
+
const Ce = new is(F);
|
|
1985
|
+
F["on:end"](K, Ce), Ce.isMatchIgnored && (_e = !1);
|
|
1986
1986
|
}
|
|
1987
1987
|
if (_e) {
|
|
1988
1988
|
for (; F.endsParent && F.parent; )
|
|
@@ -1994,49 +1994,49 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
1994
1994
|
return M(F.parent, K, fe);
|
|
1995
1995
|
}
|
|
1996
1996
|
function C(F) {
|
|
1997
|
-
return
|
|
1997
|
+
return Q.matcher.regexIndex === 0 ? (Ee += F[0], 1) : (nt = !0, 0);
|
|
1998
1998
|
}
|
|
1999
1999
|
function H(F) {
|
|
2000
|
-
const K = F[0], fe = F.rule, _e = new is(fe),
|
|
2001
|
-
for (const Ye of
|
|
2000
|
+
const K = F[0], fe = F.rule, _e = new is(fe), Ce = [fe.__beforeBegin, fe["on:begin"]];
|
|
2001
|
+
for (const Ye of Ce)
|
|
2002
2002
|
if (Ye && (Ye(F, _e), _e.isMatchIgnored))
|
|
2003
2003
|
return C(K);
|
|
2004
2004
|
return fe.skip ? Ee += K : (fe.excludeBegin && (Ee += K), $(), !fe.returnBegin && !fe.excludeBegin && (Ee = K)), w(fe, F), fe.returnBegin ? 0 : K.length;
|
|
2005
2005
|
}
|
|
2006
2006
|
function D(F) {
|
|
2007
|
-
const K = F[0], fe = W.substring(F.index), _e = M(
|
|
2007
|
+
const K = F[0], fe = W.substring(F.index), _e = M(Q, F, fe);
|
|
2008
2008
|
if (!_e)
|
|
2009
2009
|
return ds;
|
|
2010
|
-
const
|
|
2011
|
-
|
|
2010
|
+
const Ce = Q;
|
|
2011
|
+
Q.endScope && Q.endScope._wrap ? ($(), ie(K, Q.endScope._wrap)) : Q.endScope && Q.endScope._multi ? ($(), ke(Q.endScope, F)) : Ce.skip ? Ee += K : (Ce.returnEnd || Ce.excludeEnd || (Ee += K), $(), Ce.excludeEnd && (Ee = K));
|
|
2012
2012
|
do
|
|
2013
|
-
|
|
2014
|
-
while (
|
|
2015
|
-
return _e.starts && w(_e.starts, F),
|
|
2013
|
+
Q.scope && Re.closeNode(), !Q.skip && !Q.subLanguage && (_t += Q.relevance), Q = Q.parent;
|
|
2014
|
+
while (Q !== _e.parent);
|
|
2015
|
+
return _e.starts && w(_e.starts, F), Ce.returnEnd ? 0 : K.length;
|
|
2016
2016
|
}
|
|
2017
2017
|
function he() {
|
|
2018
2018
|
const F = [];
|
|
2019
|
-
for (let K =
|
|
2019
|
+
for (let K = Q; K !== be; K = K.parent)
|
|
2020
2020
|
K.scope && F.unshift(K.scope);
|
|
2021
|
-
F.forEach((K) =>
|
|
2021
|
+
F.forEach((K) => Re.openNode(K));
|
|
2022
2022
|
}
|
|
2023
|
-
let
|
|
2024
|
-
function
|
|
2023
|
+
let J = {};
|
|
2024
|
+
function Pe(F, K) {
|
|
2025
2025
|
const fe = K && K[0];
|
|
2026
2026
|
if (Ee += F, fe == null)
|
|
2027
2027
|
return $(), 0;
|
|
2028
|
-
if (
|
|
2028
|
+
if (J.type === "begin" && K.type === "end" && J.index === K.index && fe === "") {
|
|
2029
2029
|
if (Ee += W.slice(K.index, K.index + 1), !s) {
|
|
2030
2030
|
const _e = new Error(`0 width match regex (${T})`);
|
|
2031
|
-
throw _e.languageName = T, _e.badRule =
|
|
2031
|
+
throw _e.languageName = T, _e.badRule = J.rule, _e;
|
|
2032
2032
|
}
|
|
2033
2033
|
return 1;
|
|
2034
2034
|
}
|
|
2035
|
-
if (
|
|
2035
|
+
if (J = K, K.type === "begin")
|
|
2036
2036
|
return H(K);
|
|
2037
2037
|
if (K.type === "illegal" && !G) {
|
|
2038
|
-
const _e = new Error('Illegal lexeme "' + fe + '" for mode "' + (
|
|
2039
|
-
throw _e.mode =
|
|
2038
|
+
const _e = new Error('Illegal lexeme "' + fe + '" for mode "' + (Q.scope || "<unnamed>") + '"');
|
|
2039
|
+
throw _e.mode = Q, _e;
|
|
2040
2040
|
} else if (K.type === "end") {
|
|
2041
2041
|
const _e = D(K);
|
|
2042
2042
|
if (_e !== ds)
|
|
@@ -2045,38 +2045,38 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
2045
2045
|
if (K.type === "illegal" && fe === "")
|
|
2046
2046
|
return Ee += `
|
|
2047
2047
|
`, 1;
|
|
2048
|
-
if (
|
|
2048
|
+
if (ot > 1e5 && ot > K.index * 3)
|
|
2049
2049
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
2050
2050
|
return Ee += fe, fe.length;
|
|
2051
2051
|
}
|
|
2052
|
-
const
|
|
2053
|
-
if (!
|
|
2052
|
+
const be = ee(T);
|
|
2053
|
+
if (!be)
|
|
2054
2054
|
throw Ot(i.replace("{}", T)), new Error('Unknown language: "' + T + '"');
|
|
2055
|
-
const
|
|
2056
|
-
let
|
|
2057
|
-
const
|
|
2055
|
+
const at = Wo(be);
|
|
2056
|
+
let ct = "", Q = le || at;
|
|
2057
|
+
const tt = {}, Re = new a.__emitter(a);
|
|
2058
2058
|
he();
|
|
2059
|
-
let Ee = "",
|
|
2059
|
+
let Ee = "", _t = 0, ze = 0, ot = 0, nt = !1;
|
|
2060
2060
|
try {
|
|
2061
|
-
if (
|
|
2062
|
-
|
|
2061
|
+
if (be.__emitTokens)
|
|
2062
|
+
be.__emitTokens(W, Re);
|
|
2063
2063
|
else {
|
|
2064
|
-
for (
|
|
2065
|
-
|
|
2066
|
-
const F =
|
|
2064
|
+
for (Q.matcher.considerAll(); ; ) {
|
|
2065
|
+
ot++, nt ? nt = !1 : Q.matcher.considerAll(), Q.matcher.lastIndex = ze;
|
|
2066
|
+
const F = Q.matcher.exec(W);
|
|
2067
2067
|
if (!F) break;
|
|
2068
|
-
const K = W.substring(
|
|
2069
|
-
|
|
2068
|
+
const K = W.substring(ze, F.index), fe = Pe(K, F);
|
|
2069
|
+
ze = F.index + fe;
|
|
2070
2070
|
}
|
|
2071
|
-
|
|
2071
|
+
Pe(W.substring(ze));
|
|
2072
2072
|
}
|
|
2073
|
-
return
|
|
2073
|
+
return Re.finalize(), ct = Re.toHTML(), {
|
|
2074
2074
|
language: T,
|
|
2075
|
-
value:
|
|
2076
|
-
relevance:
|
|
2075
|
+
value: ct,
|
|
2076
|
+
relevance: _t,
|
|
2077
2077
|
illegal: !1,
|
|
2078
|
-
_emitter:
|
|
2079
|
-
_top:
|
|
2078
|
+
_emitter: Re,
|
|
2079
|
+
_top: Q
|
|
2080
2080
|
};
|
|
2081
2081
|
} catch (F) {
|
|
2082
2082
|
if (F.message && F.message.includes("Illegal"))
|
|
@@ -2087,12 +2087,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
2087
2087
|
relevance: 0,
|
|
2088
2088
|
_illegalBy: {
|
|
2089
2089
|
message: F.message,
|
|
2090
|
-
index:
|
|
2091
|
-
context: W.slice(
|
|
2090
|
+
index: ze,
|
|
2091
|
+
context: W.slice(ze - 100, ze + 100),
|
|
2092
2092
|
mode: F.mode,
|
|
2093
|
-
resultSoFar:
|
|
2093
|
+
resultSoFar: ct
|
|
2094
2094
|
},
|
|
2095
|
-
_emitter:
|
|
2095
|
+
_emitter: Re
|
|
2096
2096
|
};
|
|
2097
2097
|
if (s)
|
|
2098
2098
|
return {
|
|
@@ -2101,8 +2101,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
2101
2101
|
illegal: !1,
|
|
2102
2102
|
relevance: 0,
|
|
2103
2103
|
errorRaised: F,
|
|
2104
|
-
_emitter:
|
|
2105
|
-
_top:
|
|
2104
|
+
_emitter: Re,
|
|
2105
|
+
_top: Q
|
|
2106
2106
|
};
|
|
2107
2107
|
throw F;
|
|
2108
2108
|
}
|
|
@@ -2132,8 +2132,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
2132
2132
|
return -1;
|
|
2133
2133
|
}
|
|
2134
2134
|
return 0;
|
|
2135
|
-
}), [re,
|
|
2136
|
-
return N.secondBest =
|
|
2135
|
+
}), [re, Ie] = me, N = re;
|
|
2136
|
+
return N.secondBest = Ie, N;
|
|
2137
2137
|
}
|
|
2138
2138
|
function d(T, W, G) {
|
|
2139
2139
|
const le = W && n[W] || G;
|
|
@@ -2234,7 +2234,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
2234
2234
|
function P(T) {
|
|
2235
2235
|
ye(T), r.push(T);
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2237
|
+
function X(T) {
|
|
2238
2238
|
const W = r.indexOf(T);
|
|
2239
2239
|
W !== -1 && r.splice(W, 1);
|
|
2240
2240
|
}
|
|
@@ -2265,7 +2265,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), me = T, le = W), G ==
|
|
|
2265
2265
|
autoDetection: de,
|
|
2266
2266
|
inherit: us,
|
|
2267
2267
|
addPlugin: P,
|
|
2268
|
-
removePlugin:
|
|
2268
|
+
removePlugin: X
|
|
2269
2269
|
}), t.debugMode = function() {
|
|
2270
2270
|
s = !1;
|
|
2271
2271
|
}, t.safeMode = function() {
|
|
@@ -2345,8 +2345,8 @@ pr || (pr = function(e) {
|
|
|
2345
2345
|
r[s - 1] = arguments[s];
|
|
2346
2346
|
return new e(...r);
|
|
2347
2347
|
});
|
|
2348
|
-
const an =
|
|
2349
|
-
function
|
|
2348
|
+
const an = Ue(Array.prototype.forEach), il = Ue(Array.prototype.lastIndexOf), hs = Ue(Array.prototype.pop), qt = Ue(Array.prototype.push), al = Ue(Array.prototype.splice), St = Array.isArray, dn = Ue(String.prototype.toLowerCase), Jn = Ue(String.prototype.toString), ms = Ue(String.prototype.match), on = Ue(String.prototype.replace), gs = Ue(String.prototype.indexOf), ol = Ue(String.prototype.trim), ll = Ue(Number.prototype.toString), cl = Ue(Boolean.prototype.toString), bs = typeof BigInt > "u" ? null : Ue(BigInt.prototype.toString), ys = typeof Symbol > "u" ? null : Ue(Symbol.prototype.toString), Ge = Ue(Object.prototype.hasOwnProperty), ln = Ue(Object.prototype.toString), Ke = Ue(RegExp.prototype.test), Nt = ul(TypeError);
|
|
2349
|
+
function Ue(t) {
|
|
2350
2350
|
return function(e) {
|
|
2351
2351
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
2352
2352
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), s = 1; s < n; s++)
|
|
@@ -2363,7 +2363,7 @@ function ul(t) {
|
|
|
2363
2363
|
}
|
|
2364
2364
|
function xe(t, e) {
|
|
2365
2365
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : dn;
|
|
2366
|
-
if (ps && ps(t, null), !
|
|
2366
|
+
if (ps && ps(t, null), !St(e))
|
|
2367
2367
|
return t;
|
|
2368
2368
|
let r = e.length;
|
|
2369
2369
|
for (; r--; ) {
|
|
@@ -2386,7 +2386,7 @@ function Qe(t) {
|
|
|
2386
2386
|
for (const r of fi(t)) {
|
|
2387
2387
|
var n = el(r, 2);
|
|
2388
2388
|
const s = n[0], i = n[1];
|
|
2389
|
-
Ge(t, s) && (
|
|
2389
|
+
Ge(t, s) && (St(i) ? e[s] = dl(i) : i && typeof i == "object" && i.constructor === Object ? e[s] = Qe(i) : e[s] = i);
|
|
2390
2390
|
}
|
|
2391
2391
|
return e;
|
|
2392
2392
|
}
|
|
@@ -2408,7 +2408,7 @@ function fl(t) {
|
|
|
2408
2408
|
case "object": {
|
|
2409
2409
|
if (t === null)
|
|
2410
2410
|
return ln(t);
|
|
2411
|
-
const e = t, n =
|
|
2411
|
+
const e = t, n = yt(e, "toString");
|
|
2412
2412
|
if (typeof n == "function") {
|
|
2413
2413
|
const r = n(e);
|
|
2414
2414
|
return typeof r == "string" ? r : ln(r);
|
|
@@ -2419,14 +2419,14 @@ function fl(t) {
|
|
|
2419
2419
|
return ln(t);
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
|
-
function
|
|
2422
|
+
function yt(t, e) {
|
|
2423
2423
|
for (; t !== null; ) {
|
|
2424
2424
|
const r = sl(t, e);
|
|
2425
2425
|
if (r) {
|
|
2426
2426
|
if (r.get)
|
|
2427
|
-
return
|
|
2427
|
+
return Ue(r.get);
|
|
2428
2428
|
if (typeof r.value == "function")
|
|
2429
|
-
return
|
|
2429
|
+
return Ue(r.value);
|
|
2430
2430
|
}
|
|
2431
2431
|
t = rl(t);
|
|
2432
2432
|
}
|
|
@@ -2448,7 +2448,7 @@ const _s = Ve(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
2448
2448
|
), wl = Ze(/^(?:\w+script|data):/i), vl = Ze(
|
|
2449
2449
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
2450
2450
|
// eslint-disable-line no-control-regex
|
|
2451
|
-
), kl = Ze(/^html$/i), El = Ze(/^[a-z][.\w]*(-[.\w]+)+$/i), Es = Ze(/<[/\w!]/g), Tl = Ze(/<[/\w]/g), Sl = Ze(/<\/no(script|embed|frames)/i), Al = Ze(/\/>/i),
|
|
2451
|
+
), kl = Ze(/^html$/i), El = Ze(/^[a-z][.\w]*(-[.\w]+)+$/i), Es = Ze(/<[/\w!]/g), Tl = Ze(/<[/\w]/g), Sl = Ze(/<\/no(script|embed|frames)/i), Al = Ze(/\/>/i), gt = {
|
|
2452
2452
|
element: 1,
|
|
2453
2453
|
attribute: 2,
|
|
2454
2454
|
text: 3,
|
|
@@ -2497,20 +2497,20 @@ const _s = Ve(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
2497
2497
|
uponSanitizeElement: [],
|
|
2498
2498
|
uponSanitizeShadowNode: []
|
|
2499
2499
|
};
|
|
2500
|
-
},
|
|
2501
|
-
return Ge(e, n) &&
|
|
2500
|
+
}, Tt = function(e, n, r, s) {
|
|
2501
|
+
return Ge(e, n) && St(e[n]) ? xe(s.base ? Qe(s.base) : {}, e[n], s.transform) : r;
|
|
2502
2502
|
};
|
|
2503
2503
|
function hi() {
|
|
2504
2504
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Rl();
|
|
2505
2505
|
const e = (B) => hi(B);
|
|
2506
|
-
if (e.version = "3.4.11", e.removed = [], !t || !t.document || t.document.nodeType !==
|
|
2506
|
+
if (e.version = "3.4.11", e.removed = [], !t || !t.document || t.document.nodeType !== gt.document || !t.Element)
|
|
2507
2507
|
return e.isSupported = !1, e;
|
|
2508
2508
|
let n = t.document;
|
|
2509
2509
|
const r = n, s = r.currentScript;
|
|
2510
2510
|
t.DocumentFragment;
|
|
2511
2511
|
const i = t.HTMLTemplateElement, o = t.Node, a = t.Element, l = t.NodeFilter, u = t.NamedNodeMap;
|
|
2512
2512
|
u === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
|
|
2513
|
-
const f = t.DOMParser, g = t.trustedTypes, p = a.prototype, v =
|
|
2513
|
+
const f = t.DOMParser, g = t.trustedTypes, p = a.prototype, v = yt(p, "cloneNode"), d = yt(p, "remove"), h = yt(p, "nextSibling"), b = yt(p, "childNodes"), A = yt(p, "parentNode"), _ = yt(p, "shadowRoot"), k = yt(p, "attributes"), S = o && o.prototype ? yt(o.prototype, "nodeType") : null, L = o && o.prototype ? yt(o.prototype, "nodeName") : null;
|
|
2514
2514
|
if (typeof i == "function") {
|
|
2515
2515
|
const B = n.createElement("template");
|
|
2516
2516
|
B.content && B.content.ownerDocument && (n = B.content.ownerDocument);
|
|
@@ -2526,7 +2526,7 @@ function hi() {
|
|
|
2526
2526
|
} finally {
|
|
2527
2527
|
de--;
|
|
2528
2528
|
}
|
|
2529
|
-
},
|
|
2529
|
+
}, X = function(c) {
|
|
2530
2530
|
ye(), de++;
|
|
2531
2531
|
try {
|
|
2532
2532
|
return R.createScriptURL(c);
|
|
@@ -2538,12 +2538,12 @@ function hi() {
|
|
|
2538
2538
|
}, oe = n, T = oe.implementation, W = oe.createNodeIterator, G = oe.createDocumentFragment, le = oe.getElementsByTagName, me = r.importNode;
|
|
2539
2539
|
let re = Ts();
|
|
2540
2540
|
e.isSupported = typeof fi == "function" && typeof A == "function" && T && T.createHTMLDocument !== void 0;
|
|
2541
|
-
const
|
|
2541
|
+
const Ie = gl, N = bl, $ = yl, ie = _l, ke = xl, w = wl, M = vl, C = El;
|
|
2542
2542
|
let H = ks, D = null;
|
|
2543
2543
|
const he = xe({}, [..._s, ...Qn, ...er, ...tr, ...xs]);
|
|
2544
|
-
let
|
|
2545
|
-
const
|
|
2546
|
-
let
|
|
2544
|
+
let J = null;
|
|
2545
|
+
const Pe = xe({}, [...ws, ...nr, ...vs, ...kn]);
|
|
2546
|
+
let be = Object.seal(Vt(null, {
|
|
2547
2547
|
tagNameCheck: {
|
|
2548
2548
|
writable: !0,
|
|
2549
2549
|
configurable: !1,
|
|
@@ -2562,8 +2562,8 @@ function hi() {
|
|
|
2562
2562
|
enumerable: !0,
|
|
2563
2563
|
value: !1
|
|
2564
2564
|
}
|
|
2565
|
-
})),
|
|
2566
|
-
const
|
|
2565
|
+
})), at = null, ct = null;
|
|
2566
|
+
const Q = Object.seal(Vt(null, {
|
|
2567
2567
|
tagCheck: {
|
|
2568
2568
|
writable: !0,
|
|
2569
2569
|
configurable: !1,
|
|
@@ -2577,9 +2577,9 @@ function hi() {
|
|
|
2577
2577
|
value: null
|
|
2578
2578
|
}
|
|
2579
2579
|
}));
|
|
2580
|
-
let
|
|
2580
|
+
let tt = !0, Re = !0, Ee = !1, _t = !0, ze = !1, ot = !0, nt = !1, F = !1, K = null, fe = null, _e = !1, Ce = !1, Ye = !1, wt = !1, vt = !0, Bt = !1;
|
|
2581
2581
|
const E = "user-content-";
|
|
2582
|
-
let U = !0, Te = !1,
|
|
2582
|
+
let U = !0, Te = !1, ut = {}, Se = null;
|
|
2583
2583
|
const Ft = xe({}, [
|
|
2584
2584
|
"annotation-xml",
|
|
2585
2585
|
"audio",
|
|
@@ -2620,9 +2620,9 @@ function hi() {
|
|
|
2620
2620
|
let en = null;
|
|
2621
2621
|
const tn = xe({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
2622
2622
|
let Ut = null;
|
|
2623
|
-
const q = xe({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), et = "http://www.w3.org/1998/Math/MathML", bn = "http://www.w3.org/2000/svg",
|
|
2624
|
-
let jt =
|
|
2625
|
-
const Gi = xe({}, [et, bn,
|
|
2623
|
+
const q = xe({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), et = "http://www.w3.org/1998/Math/MathML", bn = "http://www.w3.org/2000/svg", mt = "http://www.w3.org/1999/xhtml";
|
|
2624
|
+
let jt = mt, Hn = !1, Gn = null;
|
|
2625
|
+
const Gi = xe({}, [et, bn, mt], Jn), Pr = Ve(["mi", "mo", "mn", "ms", "mtext"]);
|
|
2626
2626
|
let Wn = xe({}, Pr);
|
|
2627
2627
|
const Dr = Ve(["annotation-xml"]);
|
|
2628
2628
|
let Kn = xe({}, Dr);
|
|
@@ -2637,27 +2637,27 @@ function hi() {
|
|
|
2637
2637
|
if (Ht && Ht === c)
|
|
2638
2638
|
return;
|
|
2639
2639
|
(!c || typeof c != "object") && (c = {}), c = Qe(c), nn = // eslint-disable-next-line unicorn/prefer-includes
|
|
2640
|
-
Ki.indexOf(c.PARSER_MEDIA_TYPE) === -1 ? qi : c.PARSER_MEDIA_TYPE, Le = nn === "application/xhtml+xml" ? Jn : dn, D =
|
|
2640
|
+
Ki.indexOf(c.PARSER_MEDIA_TYPE) === -1 ? qi : c.PARSER_MEDIA_TYPE, Le = nn === "application/xhtml+xml" ? Jn : dn, D = Tt(c, "ALLOWED_TAGS", he, {
|
|
2641
2641
|
transform: Le
|
|
2642
|
-
}),
|
|
2642
|
+
}), J = Tt(c, "ALLOWED_ATTR", Pe, {
|
|
2643
2643
|
transform: Le
|
|
2644
|
-
}), Gn =
|
|
2644
|
+
}), Gn = Tt(c, "ALLOWED_NAMESPACES", Gi, {
|
|
2645
2645
|
transform: Jn
|
|
2646
|
-
}), Ut =
|
|
2646
|
+
}), Ut = Tt(c, "ADD_URI_SAFE_ATTR", q, {
|
|
2647
2647
|
transform: Le,
|
|
2648
2648
|
base: q
|
|
2649
|
-
}), en =
|
|
2649
|
+
}), en = Tt(c, "ADD_DATA_URI_TAGS", tn, {
|
|
2650
2650
|
transform: Le,
|
|
2651
2651
|
base: tn
|
|
2652
|
-
}), Se =
|
|
2652
|
+
}), Se = Tt(c, "FORBID_CONTENTS", Ft, {
|
|
2653
2653
|
transform: Le
|
|
2654
|
-
}),
|
|
2654
|
+
}), at = Tt(c, "FORBID_TAGS", Qe({}), {
|
|
2655
2655
|
transform: Le
|
|
2656
|
-
}),
|
|
2656
|
+
}), ct = Tt(c, "FORBID_ATTR", Qe({}), {
|
|
2657
2657
|
transform: Le
|
|
2658
|
-
}),
|
|
2658
|
+
}), ut = Ge(c, "USE_PROFILES") ? c.USE_PROFILES && typeof c.USE_PROFILES == "object" ? Qe(c.USE_PROFILES) : c.USE_PROFILES : !1, tt = c.ALLOW_ARIA_ATTR !== !1, Re = c.ALLOW_DATA_ATTR !== !1, Ee = c.ALLOW_UNKNOWN_PROTOCOLS || !1, _t = c.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ze = c.SAFE_FOR_TEMPLATES || !1, ot = c.SAFE_FOR_XML !== !1, nt = c.WHOLE_DOCUMENT || !1, Ce = c.RETURN_DOM || !1, Ye = c.RETURN_DOM_FRAGMENT || !1, wt = c.RETURN_TRUSTED_TYPE || !1, _e = c.FORCE_BODY || !1, vt = c.SANITIZE_DOM !== !1, Bt = c.SANITIZE_NAMED_PROPS || !1, U = c.KEEP_CONTENT !== !1, Te = c.IN_PLACE || !1, H = pl(c.ALLOWED_URI_REGEXP) ? c.ALLOWED_URI_REGEXP : ks, jt = typeof c.NAMESPACE == "string" ? c.NAMESPACE : mt, Wn = Ge(c, "MATHML_TEXT_INTEGRATION_POINTS") && c.MATHML_TEXT_INTEGRATION_POINTS && typeof c.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Qe(c.MATHML_TEXT_INTEGRATION_POINTS) : xe({}, Pr), Kn = Ge(c, "HTML_INTEGRATION_POINTS") && c.HTML_INTEGRATION_POINTS && typeof c.HTML_INTEGRATION_POINTS == "object" ? Qe(c.HTML_INTEGRATION_POINTS) : xe({}, Dr);
|
|
2659
2659
|
const y = Ge(c, "CUSTOM_ELEMENT_HANDLING") && c.CUSTOM_ELEMENT_HANDLING && typeof c.CUSTOM_ELEMENT_HANDLING == "object" ? Qe(c.CUSTOM_ELEMENT_HANDLING) : Vt(null);
|
|
2660
|
-
if (
|
|
2660
|
+
if (be = Vt(null), Ge(y, "tagNameCheck") && zr(y.tagNameCheck) && (be.tagNameCheck = y.tagNameCheck), Ge(y, "attributeNameCheck") && zr(y.attributeNameCheck) && (be.attributeNameCheck = y.attributeNameCheck), Ge(y, "allowCustomizedBuiltInElements") && typeof y.allowCustomizedBuiltInElements == "boolean" && (be.allowCustomizedBuiltInElements = y.allowCustomizedBuiltInElements), Ze(be), ze && (Re = !1), Ye && (Ce = !0), ut && (D = xe({}, xs), J = Vt(null), ut.html === !0 && (xe(D, _s), xe(J, ws)), ut.svg === !0 && (xe(D, Qn), xe(J, nr), xe(J, kn)), ut.svgFilters === !0 && (xe(D, er), xe(J, nr), xe(J, kn)), ut.mathMl === !0 && (xe(D, tr), xe(J, vs), xe(J, kn))), Q.tagCheck = null, Q.attributeCheck = null, Ge(c, "ADD_TAGS") && (typeof c.ADD_TAGS == "function" ? Q.tagCheck = c.ADD_TAGS : St(c.ADD_TAGS) && (D === he && (D = Qe(D)), xe(D, c.ADD_TAGS, Le))), Ge(c, "ADD_ATTR") && (typeof c.ADD_ATTR == "function" ? Q.attributeCheck = c.ADD_ATTR : St(c.ADD_ATTR) && (J === Pe && (J = Qe(J)), xe(J, c.ADD_ATTR, Le))), Ge(c, "ADD_URI_SAFE_ATTR") && St(c.ADD_URI_SAFE_ATTR) && xe(Ut, c.ADD_URI_SAFE_ATTR, Le), Ge(c, "FORBID_CONTENTS") && St(c.FORBID_CONTENTS) && (Se === Ft && (Se = Qe(Se)), xe(Se, c.FORBID_CONTENTS, Le)), Ge(c, "ADD_FORBID_CONTENTS") && St(c.ADD_FORBID_CONTENTS) && (Se === Ft && (Se = Qe(Se)), xe(Se, c.ADD_FORBID_CONTENTS, Le)), U && (D["#text"] = !0), nt && xe(D, ["html", "head", "body"]), D.table && (xe(D, ["tbody"]), delete at.tbody), c.TRUSTED_TYPES_POLICY) {
|
|
2661
2661
|
if (typeof c.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
2662
2662
|
throw Nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2663
2663
|
if (typeof c.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -2672,9 +2672,9 @@ function hi() {
|
|
|
2672
2672
|
} else c.TRUSTED_TYPES_POLICY === null ? (R = void 0, Z = "") : (R === void 0 && (R = ue()), R && typeof Z == "string" && (Z = P("")));
|
|
2673
2673
|
Ve && Ve(c), Ht = c;
|
|
2674
2674
|
}, Br = xe({}, [...Qn, ...er, ...hl]), Fr = xe({}, [...tr, ...ml]), Zi = function(c, y, z) {
|
|
2675
|
-
return y.namespaceURI ===
|
|
2675
|
+
return y.namespaceURI === mt ? c === "svg" : y.namespaceURI === et ? c === "svg" && (z === "annotation-xml" || Wn[z]) : !!Br[c];
|
|
2676
2676
|
}, Yi = function(c, y, z) {
|
|
2677
|
-
return y.namespaceURI ===
|
|
2677
|
+
return y.namespaceURI === mt ? c === "math" : y.namespaceURI === bn ? c === "math" && Kn[z] : !!Fr[c];
|
|
2678
2678
|
}, Xi = function(c, y, z) {
|
|
2679
2679
|
return y.namespaceURI === bn && !Kn[z] || y.namespaceURI === et && !Wn[z] ? !1 : !Fr[c] && (Wi[c] || !Br[c]);
|
|
2680
2680
|
}, Ji = function(c) {
|
|
@@ -2684,8 +2684,8 @@ function hi() {
|
|
|
2684
2684
|
tagName: "template"
|
|
2685
2685
|
});
|
|
2686
2686
|
const z = dn(c.tagName), Y = dn(y.tagName);
|
|
2687
|
-
return Gn[c.namespaceURI] ? c.namespaceURI === bn ? Zi(z, y, Y) : c.namespaceURI === et ? Yi(z, y, Y) : c.namespaceURI ===
|
|
2688
|
-
},
|
|
2687
|
+
return Gn[c.namespaceURI] ? c.namespaceURI === bn ? Zi(z, y, Y) : c.namespaceURI === et ? Yi(z, y, Y) : c.namespaceURI === mt ? Xi(z, y, Y) : !!(nn === "application/xhtml+xml" && Gn[c.namespaceURI]) : !1;
|
|
2688
|
+
}, kt = function(c) {
|
|
2689
2689
|
qt(e.removed, {
|
|
2690
2690
|
element: c
|
|
2691
2691
|
});
|
|
@@ -2699,11 +2699,11 @@ function hi() {
|
|
|
2699
2699
|
const y = b(c);
|
|
2700
2700
|
if (y) {
|
|
2701
2701
|
const Y = [];
|
|
2702
|
-
an(y, (
|
|
2703
|
-
qt(Y,
|
|
2704
|
-
}), an(Y, (
|
|
2702
|
+
an(y, (ge) => {
|
|
2703
|
+
qt(Y, ge);
|
|
2704
|
+
}), an(Y, (ge) => {
|
|
2705
2705
|
try {
|
|
2706
|
-
d(
|
|
2706
|
+
d(ge);
|
|
2707
2707
|
} catch {
|
|
2708
2708
|
}
|
|
2709
2709
|
});
|
|
@@ -2711,7 +2711,7 @@ function hi() {
|
|
|
2711
2711
|
const z = k(c);
|
|
2712
2712
|
if (z)
|
|
2713
2713
|
for (let Y = z.length - 1; Y >= 0; --Y) {
|
|
2714
|
-
const
|
|
2714
|
+
const ge = z[Y], ve = ge && ge.name;
|
|
2715
2715
|
if (typeof ve == "string")
|
|
2716
2716
|
try {
|
|
2717
2717
|
c.removeAttribute(ve);
|
|
@@ -2731,9 +2731,9 @@ function hi() {
|
|
|
2731
2731
|
});
|
|
2732
2732
|
}
|
|
2733
2733
|
if (y.removeAttribute(c), c === "is")
|
|
2734
|
-
if (
|
|
2734
|
+
if (Ce || Ye)
|
|
2735
2735
|
try {
|
|
2736
|
-
|
|
2736
|
+
kt(y);
|
|
2737
2737
|
} catch {
|
|
2738
2738
|
}
|
|
2739
2739
|
else
|
|
@@ -2745,10 +2745,10 @@ function hi() {
|
|
|
2745
2745
|
const y = k(c);
|
|
2746
2746
|
if (y)
|
|
2747
2747
|
for (let z = y.length - 1; z >= 0; --z) {
|
|
2748
|
-
const Y = y[z],
|
|
2749
|
-
if (!(typeof
|
|
2748
|
+
const Y = y[z], ge = Y && Y.name;
|
|
2749
|
+
if (!(typeof ge != "string" || J[Le(ge)]))
|
|
2750
2750
|
try {
|
|
2751
|
-
c.removeAttribute(
|
|
2751
|
+
c.removeAttribute(ge);
|
|
2752
2752
|
} catch {
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
@@ -2756,11 +2756,11 @@ function hi() {
|
|
|
2756
2756
|
const y = [c];
|
|
2757
2757
|
for (; y.length > 0; ) {
|
|
2758
2758
|
const z = y.pop();
|
|
2759
|
-
(S ? S(z) : z.nodeType) ===
|
|
2760
|
-
const
|
|
2761
|
-
if (
|
|
2762
|
-
for (let ve =
|
|
2763
|
-
y.push(
|
|
2759
|
+
(S ? S(z) : z.nodeType) === gt.element && Qi(z);
|
|
2760
|
+
const ge = b(z);
|
|
2761
|
+
if (ge)
|
|
2762
|
+
for (let ve = ge.length - 1; ve >= 0; --ve)
|
|
2763
|
+
y.push(ge[ve]);
|
|
2764
2764
|
}
|
|
2765
2765
|
}, jr = function(c) {
|
|
2766
2766
|
let y = null, z = null;
|
|
@@ -2770,9 +2770,9 @@ function hi() {
|
|
|
2770
2770
|
const ve = ms(c, /^[\r\n\t ]+/);
|
|
2771
2771
|
z = ve && ve[0];
|
|
2772
2772
|
}
|
|
2773
|
-
nn === "application/xhtml+xml" && jt ===
|
|
2773
|
+
nn === "application/xhtml+xml" && jt === mt && (c = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + c + "</body></html>");
|
|
2774
2774
|
const Y = R ? P(c) : c;
|
|
2775
|
-
if (jt ===
|
|
2775
|
+
if (jt === mt)
|
|
2776
2776
|
try {
|
|
2777
2777
|
y = new f().parseFromString(Y, nn);
|
|
2778
2778
|
} catch {
|
|
@@ -2784,8 +2784,8 @@ function hi() {
|
|
|
2784
2784
|
} catch {
|
|
2785
2785
|
}
|
|
2786
2786
|
}
|
|
2787
|
-
const
|
|
2788
|
-
return c && z &&
|
|
2787
|
+
const ge = y.body || y.documentElement;
|
|
2788
|
+
return c && z && ge.insertBefore(n.createTextNode(z), ge.childNodes[0] || null), jt === mt ? le.call(y, nt ? "html" : "body")[0] : nt ? y.documentElement : ge;
|
|
2789
2789
|
}, Hr = function(c) {
|
|
2790
2790
|
return W.call(
|
|
2791
2791
|
c.ownerDocument || c,
|
|
@@ -2795,7 +2795,7 @@ function hi() {
|
|
|
2795
2795
|
null
|
|
2796
2796
|
);
|
|
2797
2797
|
}, yn = function(c) {
|
|
2798
|
-
return c = on(c,
|
|
2798
|
+
return c = on(c, Ie, " "), c = on(c, N, " "), c = on(c, $, " "), c;
|
|
2799
2799
|
}, Vn = function(c) {
|
|
2800
2800
|
var y;
|
|
2801
2801
|
c.normalize();
|
|
@@ -2809,8 +2809,8 @@ function hi() {
|
|
|
2809
2809
|
let Y = z.nextNode();
|
|
2810
2810
|
for (; Y; )
|
|
2811
2811
|
Y.data = yn(Y.data), Y = z.nextNode();
|
|
2812
|
-
const
|
|
2813
|
-
|
|
2812
|
+
const ge = (y = c.querySelectorAll) === null || y === void 0 ? void 0 : y.call(c, "template");
|
|
2813
|
+
ge && an(ge, (ve) => {
|
|
2814
2814
|
Gt(ve.content) && Vn(ve.content);
|
|
2815
2815
|
});
|
|
2816
2816
|
}, _n = function(c) {
|
|
@@ -2843,7 +2843,7 @@ function hi() {
|
|
|
2843
2843
|
if (!S || typeof c != "object" || c === null)
|
|
2844
2844
|
return !1;
|
|
2845
2845
|
try {
|
|
2846
|
-
return S(c) ===
|
|
2846
|
+
return S(c) === gt.documentFragment;
|
|
2847
2847
|
} catch {
|
|
2848
2848
|
return !1;
|
|
2849
2849
|
}
|
|
@@ -2856,53 +2856,53 @@ function hi() {
|
|
|
2856
2856
|
return !1;
|
|
2857
2857
|
}
|
|
2858
2858
|
};
|
|
2859
|
-
function
|
|
2859
|
+
function xt(B, c, y) {
|
|
2860
2860
|
B.length !== 0 && an(B, (z) => {
|
|
2861
2861
|
z.call(e, c, y, Ht);
|
|
2862
2862
|
});
|
|
2863
2863
|
}
|
|
2864
2864
|
const ta = function(c, y) {
|
|
2865
|
-
return !!(
|
|
2865
|
+
return !!(ot && c.hasChildNodes() && !rn(c.firstElementChild) && Ke(Es, c.textContent) && Ke(Es, c.innerHTML) || ot && c.namespaceURI === mt && y === "style" && rn(c.firstElementChild) || c.nodeType === gt.processingInstruction || ot && c.nodeType === gt.comment && Ke(Tl, c.data));
|
|
2866
2866
|
}, na = function(c, y) {
|
|
2867
|
-
if (!
|
|
2867
|
+
if (!at[y] && Kr(y) && (be.tagNameCheck instanceof RegExp && Ke(be.tagNameCheck, y) || be.tagNameCheck instanceof Function && be.tagNameCheck(y)))
|
|
2868
2868
|
return !1;
|
|
2869
2869
|
if (U && !Se[y]) {
|
|
2870
2870
|
const z = A(c), Y = b(c);
|
|
2871
2871
|
if (Y && z) {
|
|
2872
|
-
const
|
|
2873
|
-
for (let ve =
|
|
2872
|
+
const ge = Y.length;
|
|
2873
|
+
for (let ve = ge - 1; ve >= 0; --ve) {
|
|
2874
2874
|
const He = Te ? Y[ve] : v(Y[ve], !0);
|
|
2875
2875
|
z.insertBefore(He, h(c));
|
|
2876
2876
|
}
|
|
2877
2877
|
}
|
|
2878
2878
|
}
|
|
2879
|
-
return
|
|
2879
|
+
return kt(c), !0;
|
|
2880
2880
|
}, Gr = function(c) {
|
|
2881
|
-
if (
|
|
2882
|
-
return
|
|
2881
|
+
if (xt(re.beforeSanitizeElements, c, null), _n(c))
|
|
2882
|
+
return kt(c), !0;
|
|
2883
2883
|
const y = Le(L ? L(c) : c.nodeName);
|
|
2884
|
-
if (
|
|
2884
|
+
if (xt(re.uponSanitizeElement, c, {
|
|
2885
2885
|
tagName: y,
|
|
2886
2886
|
allowedTags: D
|
|
2887
2887
|
}), ta(c, y))
|
|
2888
|
-
return
|
|
2889
|
-
if (
|
|
2888
|
+
return kt(c), !0;
|
|
2889
|
+
if (at[y] || !(Q.tagCheck instanceof Function && Q.tagCheck(y)) && !D[y])
|
|
2890
2890
|
return na(c, y);
|
|
2891
|
-
if ((S ? S(c) : c.nodeType) ===
|
|
2892
|
-
return
|
|
2893
|
-
if (
|
|
2891
|
+
if ((S ? S(c) : c.nodeType) === gt.element && !Ji(c) || (y === "noscript" || y === "noembed" || y === "noframes") && Ke(Sl, c.innerHTML))
|
|
2892
|
+
return kt(c), !0;
|
|
2893
|
+
if (ze && c.nodeType === gt.text) {
|
|
2894
2894
|
const Y = yn(c.textContent);
|
|
2895
2895
|
c.textContent !== Y && (qt(e.removed, {
|
|
2896
2896
|
element: c.cloneNode()
|
|
2897
2897
|
}), c.textContent = Y);
|
|
2898
2898
|
}
|
|
2899
|
-
return
|
|
2899
|
+
return xt(re.afterSanitizeElements, c, null), !1;
|
|
2900
2900
|
}, Wr = function(c, y, z) {
|
|
2901
|
-
if (
|
|
2901
|
+
if (ct[y] || vt && (y === "id" || y === "name") && (z in n || z in Vi))
|
|
2902
2902
|
return !1;
|
|
2903
|
-
const Y =
|
|
2904
|
-
if (!(
|
|
2905
|
-
if (!(
|
|
2903
|
+
const Y = J[y] || Q.attributeCheck instanceof Function && Q.attributeCheck(y, c);
|
|
2904
|
+
if (!(Re && Ke(ie, y))) {
|
|
2905
|
+
if (!(tt && Ke(ke, y))) {
|
|
2906
2906
|
if (Y) {
|
|
2907
2907
|
if (!Ut[y]) {
|
|
2908
2908
|
if (!Ke(H, on(z, M, ""))) {
|
|
@@ -2918,9 +2918,9 @@ function hi() {
|
|
|
2918
2918
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
2919
2919
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2920
2920
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
2921
|
-
!(Kr(c) && (
|
|
2921
|
+
!(Kr(c) && (be.tagNameCheck instanceof RegExp && Ke(be.tagNameCheck, c) || be.tagNameCheck instanceof Function && be.tagNameCheck(c)) && (be.attributeNameCheck instanceof RegExp && Ke(be.attributeNameCheck, y) || be.attributeNameCheck instanceof Function && be.attributeNameCheck(y, c)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
2922
2922
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2923
|
-
y === "is" &&
|
|
2923
|
+
y === "is" && be.allowCustomizedBuiltInElements && (be.tagNameCheck instanceof RegExp && Ke(be.tagNameCheck, z) || be.tagNameCheck instanceof Function && be.tagNameCheck(z)))
|
|
2924
2924
|
) return !1;
|
|
2925
2925
|
}
|
|
2926
2926
|
}
|
|
@@ -2933,17 +2933,17 @@ function hi() {
|
|
|
2933
2933
|
case "TrustedHTML":
|
|
2934
2934
|
return P(Y);
|
|
2935
2935
|
case "TrustedScriptURL":
|
|
2936
|
-
return
|
|
2936
|
+
return X(Y);
|
|
2937
2937
|
}
|
|
2938
2938
|
return Y;
|
|
2939
2939
|
}, ia = function(c, y, z, Y) {
|
|
2940
2940
|
try {
|
|
2941
|
-
z ? c.setAttributeNS(z, y, Y) : c.setAttribute(y, Y), _n(c) ?
|
|
2941
|
+
z ? c.setAttributeNS(z, y, Y) : c.setAttribute(y, Y), _n(c) ? kt(c) : hs(e.removed);
|
|
2942
2942
|
} catch {
|
|
2943
2943
|
Rt(y, c);
|
|
2944
2944
|
}
|
|
2945
2945
|
}, qr = function(c) {
|
|
2946
|
-
|
|
2946
|
+
xt(re.beforeSanitizeAttributes, c, null);
|
|
2947
2947
|
const y = c.attributes;
|
|
2948
2948
|
if (!y || _n(c))
|
|
2949
2949
|
return;
|
|
@@ -2951,19 +2951,19 @@ function hi() {
|
|
|
2951
2951
|
attrName: "",
|
|
2952
2952
|
attrValue: "",
|
|
2953
2953
|
keepAttr: !0,
|
|
2954
|
-
allowedAttributes:
|
|
2954
|
+
allowedAttributes: J,
|
|
2955
2955
|
forceKeepAttr: void 0
|
|
2956
2956
|
};
|
|
2957
2957
|
let Y = y.length;
|
|
2958
|
-
const
|
|
2958
|
+
const ge = Le(c.nodeName);
|
|
2959
2959
|
for (; Y--; ) {
|
|
2960
|
-
const ve = y[Y], He = ve.name,
|
|
2960
|
+
const ve = y[Y], He = ve.name, Be = ve.namespaceURI, lt = ve.value, dt = Le(He), Yn = lt;
|
|
2961
2961
|
let Je = He === "value" ? Yn : ol(Yn);
|
|
2962
|
-
if (z.attrName =
|
|
2962
|
+
if (z.attrName = dt, z.attrValue = Je, z.keepAttr = !0, z.forceKeepAttr = void 0, xt(re.uponSanitizeAttribute, c, z), Je = z.attrValue, Bt && (dt === "id" || dt === "name") && gs(Je, E) !== 0 && (Rt(He, c), Je = E + Je), ot && Ke(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Je)) {
|
|
2963
2963
|
Rt(He, c);
|
|
2964
2964
|
continue;
|
|
2965
2965
|
}
|
|
2966
|
-
if (
|
|
2966
|
+
if (dt === "attributename" && ms(Je, "href")) {
|
|
2967
2967
|
Rt(He, c);
|
|
2968
2968
|
continue;
|
|
2969
2969
|
}
|
|
@@ -2972,27 +2972,27 @@ function hi() {
|
|
|
2972
2972
|
Rt(He, c);
|
|
2973
2973
|
continue;
|
|
2974
2974
|
}
|
|
2975
|
-
if (!
|
|
2975
|
+
if (!_t && Ke(Al, Je)) {
|
|
2976
2976
|
Rt(He, c);
|
|
2977
2977
|
continue;
|
|
2978
2978
|
}
|
|
2979
|
-
if (
|
|
2979
|
+
if (ze && (Je = yn(Je)), !Wr(ge, dt, Je)) {
|
|
2980
2980
|
Rt(He, c);
|
|
2981
2981
|
continue;
|
|
2982
2982
|
}
|
|
2983
|
-
Je = sa(
|
|
2983
|
+
Je = sa(ge, dt, Be, Je), Je !== Yn && ia(c, He, Be, Je);
|
|
2984
2984
|
}
|
|
2985
2985
|
}
|
|
2986
|
-
|
|
2986
|
+
xt(re.afterSanitizeAttributes, c, null);
|
|
2987
2987
|
}, xn = function(c) {
|
|
2988
2988
|
let y = null;
|
|
2989
2989
|
const z = Hr(c);
|
|
2990
|
-
for (
|
|
2991
|
-
if (
|
|
2992
|
-
const
|
|
2993
|
-
Gt(
|
|
2990
|
+
for (xt(re.beforeSanitizeShadowDOM, c, null); y = z.nextNode(); )
|
|
2991
|
+
if (xt(re.uponSanitizeShadowNode, y, null), Gr(y), qr(y), Gt(y.content) && xn(y.content), (S ? S(y) : y.nodeType) === gt.element) {
|
|
2992
|
+
const ge = _(y);
|
|
2993
|
+
Gt(ge) && (Zn(ge), xn(ge));
|
|
2994
2994
|
}
|
|
2995
|
-
|
|
2995
|
+
xt(re.afterSanitizeShadowDOM, c, null);
|
|
2996
2996
|
}, Zn = function(c) {
|
|
2997
2997
|
const y = [{
|
|
2998
2998
|
node: c,
|
|
@@ -3004,92 +3004,92 @@ function hi() {
|
|
|
3004
3004
|
xn(z.shadow);
|
|
3005
3005
|
continue;
|
|
3006
3006
|
}
|
|
3007
|
-
const Y = z.node, ve = (S ? S(Y) : Y.nodeType) ===
|
|
3007
|
+
const Y = z.node, ve = (S ? S(Y) : Y.nodeType) === gt.element, He = b(Y);
|
|
3008
3008
|
if (He)
|
|
3009
|
-
for (let
|
|
3009
|
+
for (let Be = He.length - 1; Be >= 0; --Be)
|
|
3010
3010
|
y.push({
|
|
3011
|
-
node: He[
|
|
3011
|
+
node: He[Be],
|
|
3012
3012
|
shadow: null
|
|
3013
3013
|
});
|
|
3014
3014
|
if (ve) {
|
|
3015
|
-
const
|
|
3016
|
-
if (typeof
|
|
3017
|
-
const
|
|
3018
|
-
Gt(
|
|
3019
|
-
node:
|
|
3015
|
+
const Be = L ? L(Y) : null;
|
|
3016
|
+
if (typeof Be == "string" && Le(Be) === "template") {
|
|
3017
|
+
const lt = Y.content;
|
|
3018
|
+
Gt(lt) && y.push({
|
|
3019
|
+
node: lt,
|
|
3020
3020
|
shadow: null
|
|
3021
3021
|
});
|
|
3022
3022
|
}
|
|
3023
3023
|
}
|
|
3024
3024
|
if (ve) {
|
|
3025
|
-
const
|
|
3026
|
-
Gt(
|
|
3025
|
+
const Be = _(Y);
|
|
3026
|
+
Gt(Be) && y.push({
|
|
3027
3027
|
node: null,
|
|
3028
|
-
shadow:
|
|
3028
|
+
shadow: Be
|
|
3029
3029
|
}, {
|
|
3030
|
-
node:
|
|
3030
|
+
node: Be,
|
|
3031
3031
|
shadow: null
|
|
3032
3032
|
});
|
|
3033
3033
|
}
|
|
3034
3034
|
}
|
|
3035
3035
|
};
|
|
3036
3036
|
return e.sanitize = function(B) {
|
|
3037
|
-
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, y = null, z = null, Y = null,
|
|
3037
|
+
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, y = null, z = null, Y = null, ge = null;
|
|
3038
3038
|
if (Hn = !B, Hn && (B = "<!-->"), typeof B != "string" && !rn(B) && (B = fl(B), typeof B != "string"))
|
|
3039
3039
|
throw Nt("dirty is not a string, aborting");
|
|
3040
3040
|
if (!e.isSupported)
|
|
3041
3041
|
return B;
|
|
3042
|
-
F ? (D = K,
|
|
3042
|
+
F ? (D = K, J = fe) : qn(c), (re.uponSanitizeElement.length > 0 || re.uponSanitizeAttribute.length > 0) && (D = Qe(D)), re.uponSanitizeAttribute.length > 0 && (J = Qe(J)), e.removed = [];
|
|
3043
3043
|
const ve = Te && typeof B != "string" && rn(B);
|
|
3044
3044
|
if (ve) {
|
|
3045
|
-
const
|
|
3046
|
-
if (typeof
|
|
3047
|
-
const
|
|
3048
|
-
if (!D[
|
|
3045
|
+
const lt = L ? L(B) : B.nodeName;
|
|
3046
|
+
if (typeof lt == "string") {
|
|
3047
|
+
const dt = Le(lt);
|
|
3048
|
+
if (!D[dt] || at[dt])
|
|
3049
3049
|
throw Nt("root node is forbidden and cannot be sanitized in-place");
|
|
3050
3050
|
}
|
|
3051
3051
|
if (_n(B))
|
|
3052
3052
|
throw Nt("root node is clobbered and cannot be sanitized in-place");
|
|
3053
3053
|
try {
|
|
3054
3054
|
Zn(B);
|
|
3055
|
-
} catch (
|
|
3056
|
-
throw Ur(B),
|
|
3055
|
+
} catch (dt) {
|
|
3056
|
+
throw Ur(B), dt;
|
|
3057
3057
|
}
|
|
3058
3058
|
} else if (rn(B))
|
|
3059
|
-
y = jr("<!---->"), z = y.ownerDocument.importNode(B, !0), z.nodeType ===
|
|
3059
|
+
y = jr("<!---->"), z = y.ownerDocument.importNode(B, !0), z.nodeType === gt.element && z.nodeName === "BODY" || z.nodeName === "HTML" ? y = z : y.appendChild(z), Zn(z);
|
|
3060
3060
|
else {
|
|
3061
|
-
if (!
|
|
3061
|
+
if (!Ce && !ze && !nt && // eslint-disable-next-line unicorn/prefer-includes
|
|
3062
3062
|
B.indexOf("<") === -1)
|
|
3063
|
-
return R &&
|
|
3063
|
+
return R && wt ? P(B) : B;
|
|
3064
3064
|
if (y = jr(B), !y)
|
|
3065
|
-
return
|
|
3065
|
+
return Ce ? null : wt ? Z : "";
|
|
3066
3066
|
}
|
|
3067
|
-
y && _e &&
|
|
3067
|
+
y && _e && kt(y.firstChild);
|
|
3068
3068
|
const He = Hr(ve ? B : y);
|
|
3069
3069
|
try {
|
|
3070
3070
|
for (; Y = He.nextNode(); )
|
|
3071
3071
|
Gr(Y), qr(Y), Gt(Y.content) && xn(Y.content);
|
|
3072
|
-
} catch (
|
|
3073
|
-
throw ve && Ur(B),
|
|
3072
|
+
} catch (lt) {
|
|
3073
|
+
throw ve && Ur(B), lt;
|
|
3074
3074
|
}
|
|
3075
3075
|
if (ve)
|
|
3076
|
-
return an(e.removed, (
|
|
3077
|
-
|
|
3078
|
-
}),
|
|
3079
|
-
if (
|
|
3080
|
-
if (
|
|
3081
|
-
for (
|
|
3082
|
-
|
|
3076
|
+
return an(e.removed, (lt) => {
|
|
3077
|
+
lt.element && ea(lt.element);
|
|
3078
|
+
}), ze && Vn(B), B;
|
|
3079
|
+
if (Ce) {
|
|
3080
|
+
if (ze && Vn(y), Ye)
|
|
3081
|
+
for (ge = G.call(y.ownerDocument); y.firstChild; )
|
|
3082
|
+
ge.appendChild(y.firstChild);
|
|
3083
3083
|
else
|
|
3084
|
-
|
|
3085
|
-
return (
|
|
3084
|
+
ge = y;
|
|
3085
|
+
return (J.shadowroot || J.shadowrootmode) && (ge = me.call(r, ge, !0)), ge;
|
|
3086
3086
|
}
|
|
3087
|
-
let
|
|
3088
|
-
return
|
|
3089
|
-
` +
|
|
3087
|
+
let Be = nt ? y.outerHTML : y.innerHTML;
|
|
3088
|
+
return nt && D["!doctype"] && y.ownerDocument && y.ownerDocument.doctype && y.ownerDocument.doctype.name && Ke(kl, y.ownerDocument.doctype.name) && (Be = "<!DOCTYPE " + y.ownerDocument.doctype.name + `>
|
|
3089
|
+
` + Be), ze && (Be = yn(Be)), R && wt ? P(Be) : Be;
|
|
3090
3090
|
}, e.setConfig = function() {
|
|
3091
3091
|
let B = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3092
|
-
qn(B), F = !0, K = D, fe =
|
|
3092
|
+
qn(B), F = !0, K = D, fe = J;
|
|
3093
3093
|
}, e.clearConfig = function() {
|
|
3094
3094
|
Ht = null, F = !1, K = null, fe = null, R = ee, Z = "";
|
|
3095
3095
|
}, e.isValidAttribute = function(B, c, y) {
|
|
@@ -3287,13 +3287,13 @@ function Cl(t) {
|
|
|
3287
3287
|
return;
|
|
3288
3288
|
}
|
|
3289
3289
|
re === ">" && (n(G, { after: me }) || le.ignoreMatch());
|
|
3290
|
-
let
|
|
3290
|
+
let Ie;
|
|
3291
3291
|
const N = G.input.substring(me);
|
|
3292
|
-
if (
|
|
3292
|
+
if (Ie = N.match(/^\s*=/)) {
|
|
3293
3293
|
le.ignoreMatch();
|
|
3294
3294
|
return;
|
|
3295
3295
|
}
|
|
3296
|
-
if ((
|
|
3296
|
+
if ((Ie = N.match(/^\s+extends\s+/)) && Ie.index === 0) {
|
|
3297
3297
|
le.ignoreMatch();
|
|
3298
3298
|
return;
|
|
3299
3299
|
}
|
|
@@ -3554,7 +3554,7 @@ function Cl(t) {
|
|
|
3554
3554
|
function P(G) {
|
|
3555
3555
|
return e.concat("(?!", G.join("|"), ")");
|
|
3556
3556
|
}
|
|
3557
|
-
const
|
|
3557
|
+
const X = {
|
|
3558
3558
|
match: e.concat(
|
|
3559
3559
|
/\b/,
|
|
3560
3560
|
P([
|
|
@@ -3757,7 +3757,7 @@ function Cl(t) {
|
|
|
3757
3757
|
className: { 1: "title.function" },
|
|
3758
3758
|
contains: [R]
|
|
3759
3759
|
},
|
|
3760
|
-
|
|
3760
|
+
X,
|
|
3761
3761
|
ye,
|
|
3762
3762
|
Z,
|
|
3763
3763
|
oe,
|
|
@@ -4037,13 +4037,13 @@ function Ai(t) {
|
|
|
4037
4037
|
return;
|
|
4038
4038
|
}
|
|
4039
4039
|
re === ">" && (n(G, { after: me }) || le.ignoreMatch());
|
|
4040
|
-
let
|
|
4040
|
+
let Ie;
|
|
4041
4041
|
const N = G.input.substring(me);
|
|
4042
|
-
if (
|
|
4042
|
+
if (Ie = N.match(/^\s*=/)) {
|
|
4043
4043
|
le.ignoreMatch();
|
|
4044
4044
|
return;
|
|
4045
4045
|
}
|
|
4046
|
-
if ((
|
|
4046
|
+
if ((Ie = N.match(/^\s+extends\s+/)) && Ie.index === 0) {
|
|
4047
4047
|
le.ignoreMatch();
|
|
4048
4048
|
return;
|
|
4049
4049
|
}
|
|
@@ -4304,7 +4304,7 @@ function Ai(t) {
|
|
|
4304
4304
|
function P(G) {
|
|
4305
4305
|
return e.concat("(?!", G.join("|"), ")");
|
|
4306
4306
|
}
|
|
4307
|
-
const
|
|
4307
|
+
const X = {
|
|
4308
4308
|
match: e.concat(
|
|
4309
4309
|
/\b/,
|
|
4310
4310
|
P([
|
|
@@ -4507,7 +4507,7 @@ function Ai(t) {
|
|
|
4507
4507
|
className: { 1: "title.function" },
|
|
4508
4508
|
contains: [R]
|
|
4509
4509
|
},
|
|
4510
|
-
|
|
4510
|
+
X,
|
|
4511
4511
|
ye,
|
|
4512
4512
|
Z,
|
|
4513
4513
|
oe,
|
|
@@ -6290,7 +6290,7 @@ const ql = { class: "min-w-0 flex-1 truncate text-[11px] leading-[16px] text-fm-
|
|
|
6290
6290
|
}, Yl = ["innerHTML"], Xl = {
|
|
6291
6291
|
key: 0,
|
|
6292
6292
|
class: "mt-[6px]"
|
|
6293
|
-
}, Jl = { class: "mb-[3px] text-[10px] font-semibold uppercase leading-[14px] text-fm-color-typo-tertiary" }, Ql = ["innerHTML"], ec = /* @__PURE__ */
|
|
6293
|
+
}, Jl = { class: "mb-[3px] text-[10px] font-semibold uppercase leading-[14px] text-fm-color-typo-tertiary" }, Ql = ["innerHTML"], ec = /* @__PURE__ */ it({
|
|
6294
6294
|
__name: "ToolCallCard",
|
|
6295
6295
|
props: {
|
|
6296
6296
|
part: {}
|
|
@@ -6326,12 +6326,12 @@ const ql = { class: "min-w-0 flex-1 truncate text-[11px] leading-[16px] text-fm-
|
|
|
6326
6326
|
return p.status === "completed" ? p.output : p.status === "error" ? p.error : null;
|
|
6327
6327
|
}), g = ne(() => f.value ? As(f.value, "plaintext") : "");
|
|
6328
6328
|
return (p, v) => {
|
|
6329
|
-
const d =
|
|
6329
|
+
const d = $e("FmIcon");
|
|
6330
6330
|
return x(), I("div", {
|
|
6331
|
-
class:
|
|
6331
|
+
class: Fe(["my-[3px] min-w-0 max-w-full overflow-hidden rounded-md", r.value === "error" ? "bg-fm-color-system-error-100" : "bg-fm-color-neutral-gray-100"])
|
|
6332
6332
|
}, [
|
|
6333
6333
|
m("button", {
|
|
6334
|
-
class:
|
|
6334
|
+
class: Fe(["flex w-full min-w-0 cursor-pointer items-center gap-[5px] border-0 bg-transparent px-[6px] py-[3px] text-left text-fm-color-typo-tertiary transition", r.value === "error" ? "hover:bg-fm-color-system-error-200" : "hover:bg-fm-color-neutral-gray-200"]),
|
|
6335
6335
|
type: "button",
|
|
6336
6336
|
onClick: v[0] || (v[0] = (h) => n.value = !n.value)
|
|
6337
6337
|
}, [
|
|
@@ -6343,10 +6343,10 @@ const ql = { class: "min-w-0 flex-1 truncate text-[11px] leading-[16px] text-fm-
|
|
|
6343
6343
|
m("span", ql, j(s.value), 1),
|
|
6344
6344
|
m("span", Vl, j(t.part.tool), 1),
|
|
6345
6345
|
m("span", {
|
|
6346
|
-
class:
|
|
6346
|
+
class: Fe(["inline-flex shrink-0 items-center gap-[4px] text-[10px] font-medium leading-[14px]", i.value])
|
|
6347
6347
|
}, [
|
|
6348
6348
|
m("span", {
|
|
6349
|
-
class:
|
|
6349
|
+
class: Fe(["h-[5px] w-[5px] rounded-full", o.value])
|
|
6350
6350
|
}, null, 2),
|
|
6351
6351
|
je(" " + j(r.value), 1)
|
|
6352
6352
|
], 2)
|
|
@@ -6370,7 +6370,7 @@ const ql = { class: "min-w-0 flex-1 truncate text-[11px] leading-[16px] text-fm-
|
|
|
6370
6370
|
], 2);
|
|
6371
6371
|
};
|
|
6372
6372
|
}
|
|
6373
|
-
}), tc = /* @__PURE__ */ Lt(ec, [["__scopeId", "data-v-af62b4a2"]]), nc = ["innerHTML"], rc = /* @__PURE__ */
|
|
6373
|
+
}), tc = /* @__PURE__ */ Lt(ec, [["__scopeId", "data-v-af62b4a2"]]), nc = ["innerHTML"], rc = /* @__PURE__ */ it({
|
|
6374
6374
|
__name: "MarkdownContent",
|
|
6375
6375
|
props: {
|
|
6376
6376
|
text: {}
|
|
@@ -6388,14 +6388,14 @@ const ql = { class: "min-w-0 flex-1 truncate text-[11px] leading-[16px] text-fm-
|
|
|
6388
6388
|
}, uc = {
|
|
6389
6389
|
key: 1,
|
|
6390
6390
|
class: "shrink-0"
|
|
6391
|
-
}, dc = /* @__PURE__ */
|
|
6391
|
+
}, dc = /* @__PURE__ */ it({
|
|
6392
6392
|
__name: "AnnotationMessage",
|
|
6393
6393
|
props: {
|
|
6394
6394
|
items: {}
|
|
6395
6395
|
},
|
|
6396
6396
|
setup(t) {
|
|
6397
6397
|
return (e, n) => {
|
|
6398
|
-
const r =
|
|
6398
|
+
const r = $e("FmIcon");
|
|
6399
6399
|
return x(), I("div", sc, [
|
|
6400
6400
|
m("div", ic, [
|
|
6401
6401
|
V(r, {
|
|
@@ -6405,7 +6405,7 @@ const ql = { class: "min-w-0 flex-1 truncate text-[11px] leading-[16px] text-fm-
|
|
|
6405
6405
|
}),
|
|
6406
6406
|
m("span", null, j(t.items.length) + " preview annotation" + j(t.items.length === 1 ? "" : "s"), 1)
|
|
6407
6407
|
]),
|
|
6408
|
-
(x(!0), I(
|
|
6408
|
+
(x(!0), I(Oe, null, De(t.items, (s) => (x(), I("div", {
|
|
6409
6409
|
key: s.id,
|
|
6410
6410
|
class: "min-w-0 rounded-md bg-white/15 px-[8px] py-[6px]"
|
|
6411
6411
|
}, [
|
|
@@ -6475,7 +6475,7 @@ async function Yt(t, e = {}) {
|
|
|
6475
6475
|
const n = new Request(t, e), r = await Ii();
|
|
6476
6476
|
return r && n.headers.set("Authorization", r), fetch(n);
|
|
6477
6477
|
}
|
|
6478
|
-
async function
|
|
6478
|
+
async function rt(t, e = {}) {
|
|
6479
6479
|
const n = new Headers(e.headers);
|
|
6480
6480
|
e.body && !n.has("Content-Type") && n.set("Content-Type", "application/json");
|
|
6481
6481
|
const r = new AbortController(), s = window.setTimeout(() => r.abort(), 15e3);
|
|
@@ -6701,7 +6701,7 @@ const Sc = { class: "my-8 flex flex-col gap-8 rounded-lg border border-fm-color-
|
|
|
6701
6701
|
}, Mc = { class: "text-fm-color-typo-primary" }, Lc = {
|
|
6702
6702
|
key: 2,
|
|
6703
6703
|
class: "m-0 fm-typo-en-body-xs-400 text-fm-color-typo-tertiary"
|
|
6704
|
-
}, Pc = /* @__PURE__ */
|
|
6704
|
+
}, Pc = /* @__PURE__ */ it({
|
|
6705
6705
|
__name: "BrandKitProposalCard",
|
|
6706
6706
|
props: {
|
|
6707
6707
|
proposal: {}
|
|
@@ -6723,7 +6723,7 @@ const Sc = { class: "my-8 flex flex-col gap-8 rounded-lg border border-fm-color-
|
|
|
6723
6723
|
await n.applyProposal(e.proposal), r.value = !0;
|
|
6724
6724
|
}
|
|
6725
6725
|
return (a, l) => {
|
|
6726
|
-
const u =
|
|
6726
|
+
const u = $e("FmIcon"), f = $e("FmButton");
|
|
6727
6727
|
return x(), I("div", Sc, [
|
|
6728
6728
|
m("div", Ac, [
|
|
6729
6729
|
m("span", Rc, [
|
|
@@ -6745,7 +6745,7 @@ const Sc = { class: "my-8 flex flex-col gap-8 rounded-lg border border-fm-color-
|
|
|
6745
6745
|
}, null, 8, ["label", "icon", "variant"])
|
|
6746
6746
|
]),
|
|
6747
6747
|
s.value.length ? (x(), I("div", Cc, [
|
|
6748
|
-
(x(!0), I(
|
|
6748
|
+
(x(!0), I(Oe, null, De(s.value, (g) => (x(), I("span", {
|
|
6749
6749
|
key: g.path,
|
|
6750
6750
|
class: "inline-flex items-center gap-4 rounded-full border border-fm-color-neutral-gray-100 py-[2px] pl-[3px] pr-[8px]",
|
|
6751
6751
|
title: `${g.label}: ${g.value}`
|
|
@@ -6758,7 +6758,7 @@ const Sc = { class: "my-8 flex flex-col gap-8 rounded-lg border border-fm-color-
|
|
|
6758
6758
|
], 8, Ic))), 128))
|
|
6759
6759
|
])) : se("", !0),
|
|
6760
6760
|
i.value.length ? (x(), I("div", $c, [
|
|
6761
|
-
(x(!0), I(
|
|
6761
|
+
(x(!0), I(Oe, null, De(i.value, (g) => (x(), I("span", {
|
|
6762
6762
|
key: g.label,
|
|
6763
6763
|
class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary"
|
|
6764
6764
|
}, [
|
|
@@ -6829,7 +6829,7 @@ function jc(t) {
|
|
|
6829
6829
|
const s = t.slice(n);
|
|
6830
6830
|
return s.trim() && e.push({ kind: "markdown", text: s }), e;
|
|
6831
6831
|
}
|
|
6832
|
-
const Hc = /* @__PURE__ */
|
|
6832
|
+
const Hc = /* @__PURE__ */ it({
|
|
6833
6833
|
__name: "ChatTextPart",
|
|
6834
6834
|
props: {
|
|
6835
6835
|
text: {}
|
|
@@ -6841,7 +6841,7 @@ const Hc = /* @__PURE__ */ st({
|
|
|
6841
6841
|
return (s, i) => n.value ? (x(), Ae(dc, {
|
|
6842
6842
|
key: 0,
|
|
6843
6843
|
items: n.value
|
|
6844
|
-
}, null, 8, ["items"])) : r.value ? (x(!0), I(
|
|
6844
|
+
}, null, 8, ["items"])) : r.value ? (x(!0), I(Oe, { key: 1 }, De(r.value, (o, a) => (x(), I(Oe, { key: a }, [
|
|
6845
6845
|
o.kind === "markdown" ? (x(), Ae(Rs, {
|
|
6846
6846
|
key: 0,
|
|
6847
6847
|
text: o.text
|
|
@@ -7327,7 +7327,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7327
7327
|
}, _u = ["title"], xu = {
|
|
7328
7328
|
key: 0,
|
|
7329
7329
|
class: "m-0 mt-[4px] text-[10px] leading-[15px] text-fm-color-typo-tertiary"
|
|
7330
|
-
}, wu = /* @__PURE__ */
|
|
7330
|
+
}, wu = /* @__PURE__ */ it({
|
|
7331
7331
|
__name: "DiffCard",
|
|
7332
7332
|
props: {
|
|
7333
7333
|
files: {},
|
|
@@ -7404,7 +7404,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7404
7404
|
hunks: o(p)
|
|
7405
7405
|
}))), l = ne(() => e.diffs.reduce((p, v) => p + v.additions, 0)), u = ne(() => e.diffs.reduce((p, v) => p + v.deletions, 0)), f = ne(() => e.diffs.length || e.files.length), g = ne(() => e.loading ? `Editing ${f.value} ${f.value === 1 ? "file" : "files"}…` : `Changed ${f.value} ${f.value === 1 ? "file" : "files"}`);
|
|
7406
7406
|
return (p, v) => {
|
|
7407
|
-
const d =
|
|
7407
|
+
const d = $e("FmCircularProgress"), h = $e("FmIcon");
|
|
7408
7408
|
return x(), I("section", Xc, [
|
|
7409
7409
|
m("button", {
|
|
7410
7410
|
type: "button",
|
|
@@ -7431,11 +7431,11 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7431
7431
|
name: "expand_more",
|
|
7432
7432
|
size: "sm",
|
|
7433
7433
|
color: "typo-tertiary",
|
|
7434
|
-
class:
|
|
7434
|
+
class: Fe(["shrink-0 transition-transform", n.value ? "rotate-180" : ""])
|
|
7435
7435
|
}, null, 8, ["class"])
|
|
7436
7436
|
], 8, Jc),
|
|
7437
7437
|
n.value ? (x(), I("div", ru, [
|
|
7438
|
-
a.value.length ? (x(!0), I(
|
|
7438
|
+
a.value.length ? (x(!0), I(Oe, { key: 0 }, De(a.value, (b, A) => (x(), I("details", {
|
|
7439
7439
|
key: b.file,
|
|
7440
7440
|
class: "diff-file border-b border-fm-color-neutral-gray-100 last:border-b-0",
|
|
7441
7441
|
open: A === 0
|
|
@@ -7462,7 +7462,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7462
7462
|
])
|
|
7463
7463
|
]),
|
|
7464
7464
|
m("div", uu, [
|
|
7465
|
-
(x(!0), I(
|
|
7465
|
+
(x(!0), I(Oe, null, De(b.hunks, (_, k) => (x(), I("div", {
|
|
7466
7466
|
key: `${b.file}-${k}`,
|
|
7467
7467
|
class: "diff-hunk"
|
|
7468
7468
|
}, [
|
|
@@ -7471,9 +7471,9 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7471
7471
|
v[2] || (v[2] = m("span", null, null, -1)),
|
|
7472
7472
|
m("span", fu, j(_.header), 1)
|
|
7473
7473
|
]),
|
|
7474
|
-
(x(!0), I(
|
|
7474
|
+
(x(!0), I(Oe, null, De(_.rows, (S, L) => (x(), I("div", {
|
|
7475
7475
|
key: L,
|
|
7476
|
-
class:
|
|
7476
|
+
class: Fe(["diff-row", `diff-row--${S.kind}`])
|
|
7477
7477
|
}, [
|
|
7478
7478
|
m("span", pu, j(S.oldNumber ?? ""), 1),
|
|
7479
7479
|
m("span", hu, j(S.newNumber ?? ""), 1),
|
|
@@ -7486,7 +7486,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7486
7486
|
b.hunks.length === 0 ? (x(), I("div", bu, " No textual changes to display. ")) : se("", !0)
|
|
7487
7487
|
])
|
|
7488
7488
|
], 8, su))), 128)) : (x(), I("div", yu, [
|
|
7489
|
-
(x(!0), I(
|
|
7489
|
+
(x(!0), I(Oe, null, De(t.files, (b) => (x(), I("div", {
|
|
7490
7490
|
key: b,
|
|
7491
7491
|
class: "flex min-w-0 items-center gap-[6px] py-[2px]"
|
|
7492
7492
|
}, [
|
|
@@ -7515,7 +7515,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7515
7515
|
}, Su = {
|
|
7516
7516
|
key: 2,
|
|
7517
7517
|
class: "mt-8 rounded-lg bg-fm-color-system-error-100 px-10 py-8 fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
7518
|
-
}, Au = /* @__PURE__ */
|
|
7518
|
+
}, Au = /* @__PURE__ */ it({
|
|
7519
7519
|
__name: "MessageItem",
|
|
7520
7520
|
props: {
|
|
7521
7521
|
message: {}
|
|
@@ -7523,14 +7523,14 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7523
7523
|
setup(t) {
|
|
7524
7524
|
const e = t, n = ne(() => e.message.role === "user"), r = ne(() => e.message.parts.filter((i) => i.kind !== "reasoning")), s = ne(() => !n.value && e.message.busy && r.value.length === 0);
|
|
7525
7525
|
return (i, o) => {
|
|
7526
|
-
const a =
|
|
7526
|
+
const a = $e("FmIcon"), l = $e("FmCircularProgress");
|
|
7527
7527
|
return x(), I("div", {
|
|
7528
|
-
class:
|
|
7528
|
+
class: Fe(["flex min-w-0 flex-col", n.value ? "max-w-[88%] items-end self-end" : "w-full self-stretch"])
|
|
7529
7529
|
}, [
|
|
7530
7530
|
m("div", {
|
|
7531
|
-
class:
|
|
7531
|
+
class: Fe(["min-w-0 max-w-full overflow-hidden fm-typo-en-body-md-400", n.value ? "rounded-lg bg-fm-color-primary px-[12px] py-[8px] text-fm-color-typo-white" : "w-full text-fm-color-typo-primary"])
|
|
7532
7532
|
}, [
|
|
7533
|
-
(x(!0), I(
|
|
7533
|
+
(x(!0), I(Oe, null, De(r.value, (u) => (x(), I(Oe, {
|
|
7534
7534
|
key: u.id
|
|
7535
7535
|
}, [
|
|
7536
7536
|
u.kind === "text" ? (x(), Ae(Hc, {
|
|
@@ -7579,7 +7579,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7579
7579
|
}, $u = ["src", "alt"], Mu = ["aria-label", "onClick"], Lu = { class: "flex min-w-0 items-end gap-8 p-8 pl-12" }, Pu = ["disabled"], Du = {
|
|
7580
7580
|
key: 0,
|
|
7581
7581
|
class: "m-0 mt-6 fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
7582
|
-
}, zu = 5 * 1024 * 1024, Ps = 4, Bu = /* @__PURE__ */
|
|
7582
|
+
}, zu = 5 * 1024 * 1024, Ps = 4, Bu = /* @__PURE__ */ it({
|
|
7583
7583
|
__name: "ChatPanel",
|
|
7584
7584
|
props: {
|
|
7585
7585
|
chat: {}
|
|
@@ -7670,7 +7670,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7670
7670
|
text: "Describe a change and the agent will edit the app in the preview on the right."
|
|
7671
7671
|
});
|
|
7672
7672
|
return (R, Z) => {
|
|
7673
|
-
const ee =
|
|
7673
|
+
const ee = $e("FmIcon"), ae = $e("FmButton");
|
|
7674
7674
|
return x(), I("div", Ru, [
|
|
7675
7675
|
m("div", {
|
|
7676
7676
|
ref_key: "listEl",
|
|
@@ -7678,7 +7678,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7678
7678
|
class: "flex min-w-0 flex-1 flex-col gap-[10px] overflow-y-auto overflow-x-hidden p-16",
|
|
7679
7679
|
onScroll: d
|
|
7680
7680
|
}, [
|
|
7681
|
-
(x(!0), I(
|
|
7681
|
+
(x(!0), I(Oe, null, De(v.value, (de) => (x(), Ae(Au, {
|
|
7682
7682
|
key: de.key,
|
|
7683
7683
|
message: de
|
|
7684
7684
|
}, null, 8, ["message"]))), 128)),
|
|
@@ -7697,10 +7697,10 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7697
7697
|
onSubmit: Rn(h, ["prevent"])
|
|
7698
7698
|
}, [
|
|
7699
7699
|
m("div", {
|
|
7700
|
-
class:
|
|
7700
|
+
class: Fe(["flex min-w-0 flex-col rounded-md border transition", l.value ? "border-fm-color-neutral-gray-100 bg-fm-color-neutral-gray-100" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white focus-within:border-fm-color-primary"])
|
|
7701
7701
|
}, [
|
|
7702
7702
|
s.value.length ? (x(), I("div", Ou, [
|
|
7703
|
-
(x(!0), I(
|
|
7703
|
+
(x(!0), I(Oe, null, De(s.value, (de) => (x(), I("div", {
|
|
7704
7704
|
key: de.id,
|
|
7705
7705
|
class: "relative"
|
|
7706
7706
|
}, [
|
|
@@ -7756,7 +7756,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7756
7756
|
]);
|
|
7757
7757
|
};
|
|
7758
7758
|
}
|
|
7759
|
-
}),
|
|
7759
|
+
}), ft = /* @__PURE__ */ it({
|
|
7760
7760
|
__name: "StatusBadge",
|
|
7761
7761
|
props: {
|
|
7762
7762
|
variant: { default: "neutral" },
|
|
@@ -7772,7 +7772,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7772
7772
|
primary: "bg-fm-color-primary text-fm-color-typo-white"
|
|
7773
7773
|
}, r = ne(() => e.size === "sm" ? "rounded-[4px] px-[6px] py-[1px]" : "rounded-full px-8 py-2");
|
|
7774
7774
|
return (s, i) => (x(), I("span", {
|
|
7775
|
-
class:
|
|
7775
|
+
class: Fe(["inline-flex shrink-0 items-center gap-4 fm-typo-en-body-xs-600 leading-[16px]", [n[t.variant], r.value]])
|
|
7776
7776
|
}, [
|
|
7777
7777
|
la(s.$slots, "default")
|
|
7778
7778
|
], 2));
|
|
@@ -7801,7 +7801,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7801
7801
|
}, ld = { class: "flex shrink-0 items-center justify-between gap-8 border-t border-fm-color-neutral-gray-100 px-[10px] py-[8px]" }, cd = {
|
|
7802
7802
|
key: 1,
|
|
7803
7803
|
class: "fm-typo-en-body-xs-400 text-fm-color-typo-tertiary"
|
|
7804
|
-
}, ud = { class: "flex items-center gap-6" }, dd = /* @__PURE__ */
|
|
7804
|
+
}, ud = { class: "flex items-center gap-6" }, dd = /* @__PURE__ */ it({
|
|
7805
7805
|
__name: "BrandKitPanel",
|
|
7806
7806
|
emits: ["saved", "close"],
|
|
7807
7807
|
setup(t, { emit: e }) {
|
|
@@ -7841,7 +7841,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7841
7841
|
return In(() => {
|
|
7842
7842
|
r.load();
|
|
7843
7843
|
}), (f, g) => {
|
|
7844
|
-
const p =
|
|
7844
|
+
const p = $e("FmIcon"), v = $e("FmCircularProgress"), d = $e("FmButton");
|
|
7845
7845
|
return x(), I("section", Fu, [
|
|
7846
7846
|
m("div", Uu, [
|
|
7847
7847
|
m("span", ju, [
|
|
@@ -7898,12 +7898,12 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7898
7898
|
color: "primary"
|
|
7899
7899
|
})
|
|
7900
7900
|
])) : (x(), I("div", Zu, [
|
|
7901
|
-
(x(!0), I(
|
|
7901
|
+
(x(!0), I(Oe, null, De(s.value, (h) => (x(), I("section", {
|
|
7902
7902
|
key: h.name,
|
|
7903
7903
|
class: "flex flex-col gap-4"
|
|
7904
7904
|
}, [
|
|
7905
7905
|
m("h4", Yu, j(h.name), 1),
|
|
7906
|
-
(x(!0), I(
|
|
7906
|
+
(x(!0), I(Oe, null, De(h.fields, (b) => (x(), I("div", {
|
|
7907
7907
|
key: b.path,
|
|
7908
7908
|
class: "flex items-center gap-8",
|
|
7909
7909
|
title: b.hint
|
|
@@ -7928,7 +7928,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7928
7928
|
type: "text",
|
|
7929
7929
|
spellcheck: "false",
|
|
7930
7930
|
placeholder: "#000000",
|
|
7931
|
-
class:
|
|
7931
|
+
class: Fe(["brandkit-panel__hex", { "brandkit-panel__hex--invalid": (O(r).state.colors[b.path] ?? "") !== "" && !O(Or)(O(r).state.colors[b.path] ?? "") }])
|
|
7932
7932
|
}, null, 10, td), [
|
|
7933
7933
|
[Cn, O(r).state.colors[b.path]]
|
|
7934
7934
|
])
|
|
@@ -7936,7 +7936,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
7936
7936
|
]))), 128)),
|
|
7937
7937
|
m("section", nd, [
|
|
7938
7938
|
g[4] || (g[4] = m("h4", { class: "m-0 fm-typo-en-body-xs-600 uppercase tracking-wide text-fm-color-typo-tertiary" }, "Fonts", -1)),
|
|
7939
|
-
(x(!0), I(
|
|
7939
|
+
(x(!0), I(Oe, null, De(O(Qt), (h) => (x(), I("div", {
|
|
7940
7940
|
key: h.path,
|
|
7941
7941
|
class: "flex items-center gap-8",
|
|
7942
7942
|
title: h.hint
|
|
@@ -8001,7 +8001,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
8001
8001
|
}, Rd = { class: "preview__device" }, Nd = ["src"], Cd = {
|
|
8002
8002
|
key: 3,
|
|
8003
8003
|
class: "preview__placeholder"
|
|
8004
|
-
}, En = 20, Id = 0.35, Od = /* @__PURE__ */
|
|
8004
|
+
}, En = 20, Id = 0.35, Od = /* @__PURE__ */ it({
|
|
8005
8005
|
__name: "PreviewPanel",
|
|
8006
8006
|
props: {
|
|
8007
8007
|
chat: {}
|
|
@@ -8096,7 +8096,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
8096
8096
|
const ie = u.value.find((w) => w.id === $.requestId);
|
|
8097
8097
|
!ie || !$.payload || (ie.payload = $.payload, ie.status = "ready");
|
|
8098
8098
|
}
|
|
8099
|
-
function
|
|
8099
|
+
function X(N) {
|
|
8100
8100
|
var $;
|
|
8101
8101
|
if (!(($ = o.value) != null && $.contentWindow)) {
|
|
8102
8102
|
N.status = "fallback";
|
|
@@ -8129,7 +8129,7 @@ const Xc = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
|
|
|
8129
8129
|
status: "inspecting",
|
|
8130
8130
|
payload: null
|
|
8131
8131
|
};
|
|
8132
|
-
u.value.push(D),
|
|
8132
|
+
u.value.push(D), X(D);
|
|
8133
8133
|
}
|
|
8134
8134
|
function oe(N) {
|
|
8135
8135
|
u.value = u.value.filter(($) => $.id !== N);
|
|
@@ -8186,7 +8186,7 @@ ${ie}
|
|
|
8186
8186
|
|
|
8187
8187
|
${ke}`;
|
|
8188
8188
|
}
|
|
8189
|
-
function
|
|
8189
|
+
function Ie() {
|
|
8190
8190
|
const N = u.value.filter(($) => $.feedback.trim());
|
|
8191
8191
|
!N.length || e.chat.status !== "ready" || (e.chat.sendMessage(re(N)), u.value = u.value.filter(($) => !$.feedback.trim()), i.value = !1);
|
|
8192
8192
|
}
|
|
@@ -8199,7 +8199,7 @@ ${ke}`;
|
|
|
8199
8199
|
}), It(s, () => {
|
|
8200
8200
|
pn(ye);
|
|
8201
8201
|
}), (N, $) => {
|
|
8202
|
-
const ie =
|
|
8202
|
+
const ie = $e("FmSelect"), ke = $e("FmButton"), w = $e("FmIcon"), M = $e("FmCircularProgress");
|
|
8203
8203
|
return x(), I("div", pd, [
|
|
8204
8204
|
m("header", hd, [
|
|
8205
8205
|
V(ie, {
|
|
@@ -8234,7 +8234,7 @@ ${ke}`;
|
|
|
8234
8234
|
onClick: ae
|
|
8235
8235
|
}, null, 8, ["disabled"]),
|
|
8236
8236
|
m("a", {
|
|
8237
|
-
class:
|
|
8237
|
+
class: Fe(["inline-flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-lg text-fm-color-typo-primary no-underline transition hover:bg-fm-color-neutral-gray-100", { "pointer-events-none text-fm-color-typo-disabled": !e.chat.previewUrl }]),
|
|
8238
8238
|
href: e.chat.previewUrl ?? void 0,
|
|
8239
8239
|
target: "_blank",
|
|
8240
8240
|
rel: "noopener",
|
|
@@ -8278,7 +8278,7 @@ ${ke}`;
|
|
|
8278
8278
|
type: "button",
|
|
8279
8279
|
class: "preview__mini-primary-button",
|
|
8280
8280
|
disabled: !b.value || t.chat.sending,
|
|
8281
|
-
onClick:
|
|
8281
|
+
onClick: Ie
|
|
8282
8282
|
}, [
|
|
8283
8283
|
V(w, {
|
|
8284
8284
|
name: "send",
|
|
@@ -8290,7 +8290,7 @@ ${ke}`;
|
|
|
8290
8290
|
])
|
|
8291
8291
|
]),
|
|
8292
8292
|
m("div", wd, [
|
|
8293
|
-
(x(!0), I(
|
|
8293
|
+
(x(!0), I(Oe, null, De(u.value, (C) => {
|
|
8294
8294
|
var H;
|
|
8295
8295
|
return x(), I("div", {
|
|
8296
8296
|
key: C.id,
|
|
@@ -8299,11 +8299,11 @@ ${ke}`;
|
|
|
8299
8299
|
m("div", vd, [
|
|
8300
8300
|
m("span", kd, "#" + j(C.id), 1),
|
|
8301
8301
|
m("span", Ed, j(W(((H = C.payload) == null ? void 0 : H.element) ?? null)), 1),
|
|
8302
|
-
V(
|
|
8302
|
+
V(ft, {
|
|
8303
8303
|
variant: _(C.status),
|
|
8304
8304
|
size: "sm"
|
|
8305
8305
|
}, {
|
|
8306
|
-
default:
|
|
8306
|
+
default: st(() => [
|
|
8307
8307
|
je(j(k(C.status)), 1)
|
|
8308
8308
|
]),
|
|
8309
8309
|
_: 2
|
|
@@ -8353,7 +8353,7 @@ ${ke}`;
|
|
|
8353
8353
|
class: "preview__annotation-layer",
|
|
8354
8354
|
onClick: ue
|
|
8355
8355
|
}, [
|
|
8356
|
-
(x(!0), I(
|
|
8356
|
+
(x(!0), I(Oe, null, De(u.value, (C) => (x(), I("button", {
|
|
8357
8357
|
key: C.id,
|
|
8358
8358
|
type: "button",
|
|
8359
8359
|
class: "preview__pin",
|
|
@@ -8362,7 +8362,7 @@ ${ke}`;
|
|
|
8362
8362
|
}, ["stop"]))
|
|
8363
8363
|
}, j(C.id), 5))), 128))
|
|
8364
8364
|
])) : se("", !0),
|
|
8365
|
-
(x(!0), I(
|
|
8365
|
+
(x(!0), I(Oe, null, De(i.value ? [] : u.value, (C) => (x(), I("button", {
|
|
8366
8366
|
key: C.id,
|
|
8367
8367
|
type: "button",
|
|
8368
8368
|
class: "preview__pin preview__pin--readonly",
|
|
@@ -8387,7 +8387,7 @@ ${ke}`;
|
|
|
8387
8387
|
]);
|
|
8388
8388
|
};
|
|
8389
8389
|
}
|
|
8390
|
-
}), $d = /* @__PURE__ */ Lt(Od, [["__scopeId", "data-v-894b60b4"]]), Md = { class: "flex justify-end gap-8" }, Ld = /* @__PURE__ */
|
|
8390
|
+
}), $d = /* @__PURE__ */ Lt(Od, [["__scopeId", "data-v-894b60b4"]]), Md = { class: "flex justify-end gap-8" }, Ld = /* @__PURE__ */ it({
|
|
8391
8391
|
__name: "RenameSessionDialog",
|
|
8392
8392
|
props: {
|
|
8393
8393
|
initialTitle: {}
|
|
@@ -8400,11 +8400,11 @@ ${ke}`;
|
|
|
8400
8400
|
o && r("submit", o);
|
|
8401
8401
|
}
|
|
8402
8402
|
return (o, a) => {
|
|
8403
|
-
const l =
|
|
8403
|
+
const l = $e("FmTextField"), u = $e("FmButton"), f = $e("FmCard"), g = $e("FmForm");
|
|
8404
8404
|
return x(), Ae(g, { onValidationSuccess: i }, {
|
|
8405
|
-
default:
|
|
8405
|
+
default: st(() => [
|
|
8406
8406
|
V(f, { class: "w-[360px] space-y-16 p-16" }, {
|
|
8407
|
-
default:
|
|
8407
|
+
default: st(() => [
|
|
8408
8408
|
a[2] || (a[2] = m("div", { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Rename session", -1)),
|
|
8409
8409
|
V(l, {
|
|
8410
8410
|
modelValue: s.value,
|
|
@@ -8483,22 +8483,22 @@ ${ke}`;
|
|
|
8483
8483
|
const T = Number.parseInt(oe.replace(/^retry:\s*/, ""), 10);
|
|
8484
8484
|
Number.isNaN(T) || (d = T);
|
|
8485
8485
|
}
|
|
8486
|
-
let
|
|
8486
|
+
let X, ue = !1;
|
|
8487
8487
|
if (ye.length) {
|
|
8488
8488
|
const oe = ye.join(`
|
|
8489
8489
|
`);
|
|
8490
8490
|
try {
|
|
8491
|
-
|
|
8491
|
+
X = JSON.parse(oe), ue = !0;
|
|
8492
8492
|
} catch {
|
|
8493
|
-
|
|
8493
|
+
X = oe;
|
|
8494
8494
|
}
|
|
8495
8495
|
}
|
|
8496
|
-
ue && (r && await r(
|
|
8497
|
-
data:
|
|
8496
|
+
ue && (r && await r(X), n && (X = await n(X))), e == null || e({
|
|
8497
|
+
data: X,
|
|
8498
8498
|
event: P,
|
|
8499
8499
|
id: f,
|
|
8500
8500
|
retry: d
|
|
8501
|
-
}), ye.length && (yield
|
|
8501
|
+
}), ye.length && (yield X);
|
|
8502
8502
|
}
|
|
8503
8503
|
}
|
|
8504
8504
|
} finally {
|
|
@@ -9837,7 +9837,7 @@ function Ef(t) {
|
|
|
9837
9837
|
const e = Ui(t);
|
|
9838
9838
|
return e.interceptors.request.use((n) => kf(n, t == null ? void 0 : t.directory)), e.interceptors.error.use(wf), new xf({ client: e });
|
|
9839
9839
|
}
|
|
9840
|
-
const Tf = 200, Sf = 50;
|
|
9840
|
+
const Tf = 200, Sf = 50, Af = 4 * 60 * 1e3;
|
|
9841
9841
|
function cn(t) {
|
|
9842
9842
|
if (t && typeof t == "object" && "name" in t && "data" in t) {
|
|
9843
9843
|
const { name: e, data: n } = t, r = typeof n.message == "string" ? n.message : void 0;
|
|
@@ -9845,10 +9845,10 @@ function cn(t) {
|
|
|
9845
9845
|
}
|
|
9846
9846
|
return "Unknown error";
|
|
9847
9847
|
}
|
|
9848
|
-
function
|
|
9848
|
+
function Rf(t) {
|
|
9849
9849
|
return t.type === "text" ? { kind: "text", id: t.id, text: t.text } : t.type === "reasoning" ? { kind: "reasoning", id: t.id, text: t.text } : t.type === "tool" ? { kind: "tool", id: t.id, tool: t.tool, state: t.state } : t.type === "file" ? { kind: "file", id: t.id, mime: t.mime, filename: t.filename, url: t.url } : null;
|
|
9850
9850
|
}
|
|
9851
|
-
function
|
|
9851
|
+
function Nf() {
|
|
9852
9852
|
const t = pe("idle"), e = pe("No session selected"), n = pe(null), r = pe(!1), s = pe(null), i = pe(null), o = pe(null), a = pe(!1), l = pe(!1), u = pe([]), f = An({}), g = pe(0);
|
|
9853
9853
|
let p = null, v = 0;
|
|
9854
9854
|
const d = /* @__PURE__ */ new Map();
|
|
@@ -9863,7 +9863,7 @@ function Rf() {
|
|
|
9863
9863
|
d.delete(C);
|
|
9864
9864
|
const D = f[H.messageID];
|
|
9865
9865
|
if (!D) continue;
|
|
9866
|
-
const he = D.parts.find((
|
|
9866
|
+
const he = D.parts.find((J) => J.id === H.partID);
|
|
9867
9867
|
he && (he.kind === "text" || he.kind === "reasoning") ? he.text += H.text : he || D.parts.push({ kind: "text", id: H.partID, text: H.text }), M = !0;
|
|
9868
9868
|
}
|
|
9869
9869
|
d.size === 0 && A(), M && g.value++;
|
|
@@ -9911,7 +9911,7 @@ function Rf() {
|
|
|
9911
9911
|
const H = /* @__PURE__ */ new Set();
|
|
9912
9912
|
let D = C.diffs;
|
|
9913
9913
|
for (const he of M) {
|
|
9914
|
-
for (const
|
|
9914
|
+
for (const J of he.changedFiles) H.add(J);
|
|
9915
9915
|
he.diffs.length && (D = he.diffs), he !== C && (he.changedFiles = [], he.diffs = []);
|
|
9916
9916
|
}
|
|
9917
9917
|
C.changedFiles = [...H], C.diffs = D;
|
|
@@ -9941,12 +9941,12 @@ function Rf() {
|
|
|
9941
9941
|
w.changedFiles = [.../* @__PURE__ */ new Set([...w.changedFiles, ...M.files])], w.parentId && ae(w.parentId), g.value++;
|
|
9942
9942
|
return;
|
|
9943
9943
|
}
|
|
9944
|
-
const C =
|
|
9944
|
+
const C = Rf(M);
|
|
9945
9945
|
if (!C) return;
|
|
9946
9946
|
const H = w.parts.findIndex((D) => D.id === C.id);
|
|
9947
9947
|
H === -1 ? w.parts.push(C) : w.parts[H] = C, g.value++;
|
|
9948
9948
|
}
|
|
9949
|
-
function
|
|
9949
|
+
function X(w) {
|
|
9950
9950
|
if (w.sessionID !== s.value) return;
|
|
9951
9951
|
const M = Z(w.id, w.role);
|
|
9952
9952
|
w.role === "assistant" ? (M.parentId = w.parentID, ae(w.parentID), M.busy = !w.time.completed, w.error && (M.errorText = cn(w.error))) : (M.busy = !1, w.summary && ye(w.id, w.summary.diffs));
|
|
@@ -9954,10 +9954,10 @@ function Rf() {
|
|
|
9954
9954
|
function ue(w, M = {}) {
|
|
9955
9955
|
L();
|
|
9956
9956
|
const C = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Set();
|
|
9957
|
-
for (const { info: D, parts: he } of [...w].sort((
|
|
9958
|
-
const
|
|
9959
|
-
|
|
9960
|
-
for (const
|
|
9957
|
+
for (const { info: D, parts: he } of [...w].sort((J, Pe) => J.info.time.created - Pe.info.time.created)) {
|
|
9958
|
+
const J = Z(D.id, D.role);
|
|
9959
|
+
J.createdAt = D.time.created, J.busy = M.forceIdle ? !1 : D.role === "assistant" ? !D.time.completed : !1, D.role === "assistant" ? (J.parentId = D.parentID, H.add(D.parentID), D.error && (J.errorText = cn(D.error))) : D.summary && C.set(D.id, D.summary.diffs);
|
|
9960
|
+
for (const Pe of he) P(J, Pe);
|
|
9961
9961
|
}
|
|
9962
9962
|
for (const D of H) ae(D);
|
|
9963
9963
|
for (const [D, he] of C) ye(D, he);
|
|
@@ -9990,8 +9990,8 @@ function Rf() {
|
|
|
9990
9990
|
}
|
|
9991
9991
|
function le({ sessionID: w, messageID: M, partID: C, field: H, delta: D }) {
|
|
9992
9992
|
if (w !== s.value || H !== "text" || !D || !f[M]) return;
|
|
9993
|
-
const
|
|
9994
|
-
|
|
9993
|
+
const J = `${M}\0${C}`, Pe = d.get(J);
|
|
9994
|
+
Pe ? Pe.text += D : d.set(J, { messageID: M, partID: C, text: D }), S();
|
|
9995
9995
|
}
|
|
9996
9996
|
async function me(w) {
|
|
9997
9997
|
if (p)
|
|
@@ -10020,15 +10020,15 @@ function Rf() {
|
|
|
10020
10020
|
if (G(D))
|
|
10021
10021
|
le(D.properties);
|
|
10022
10022
|
else if (H.type === "message.updated")
|
|
10023
|
-
|
|
10023
|
+
X(H.properties.info);
|
|
10024
10024
|
else if (H.type === "message.part.updated")
|
|
10025
10025
|
W(H.properties.part);
|
|
10026
10026
|
else if (H.type === "permission.updated" && H.properties.sessionID === s.value)
|
|
10027
10027
|
me(H.properties);
|
|
10028
10028
|
else if (H.type === "session.idle" && H.properties.sessionID === s.value) {
|
|
10029
10029
|
for (const he of u.value) {
|
|
10030
|
-
const
|
|
10031
|
-
(
|
|
10030
|
+
const J = f[he];
|
|
10031
|
+
(J == null ? void 0 : J.role) === "assistant" && (J.busy = !1);
|
|
10032
10032
|
}
|
|
10033
10033
|
g.value++;
|
|
10034
10034
|
} else H.type === "session.error" && (!H.properties.sessionID || H.properties.sessionID === s.value) && (e.value = `Session error: ${cn(H.properties.error)}`);
|
|
@@ -10042,7 +10042,7 @@ function Rf() {
|
|
|
10042
10042
|
M++, M >= 3 && (l.value = !0), await Dn(1e3), w === v && t.value === "ready" && !l.value && (e.value = "Ready");
|
|
10043
10043
|
}
|
|
10044
10044
|
}
|
|
10045
|
-
function
|
|
10045
|
+
function Ie(w, M) {
|
|
10046
10046
|
let C = !0;
|
|
10047
10047
|
return (async () => {
|
|
10048
10048
|
for (; C && (await Dn(2e3), !!C); )
|
|
@@ -10072,27 +10072,38 @@ function Rf() {
|
|
|
10072
10072
|
}
|
|
10073
10073
|
e.value = "Starting sandbox…", w.businessId && w.sessionId && await T(w.businessId, w.sessionId).catch(() => {
|
|
10074
10074
|
});
|
|
10075
|
-
const M = w.businessId && w.sessionId ?
|
|
10075
|
+
const M = w.businessId && w.sessionId ? Ie(w.businessId, w.sessionId) : () => {
|
|
10076
10076
|
};
|
|
10077
10077
|
try {
|
|
10078
10078
|
const C = new URLSearchParams();
|
|
10079
10079
|
w.businessId && C.set("businessId", w.businessId), w.sessionId && C.set("sessionId", w.sessionId);
|
|
10080
|
-
const H =
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10080
|
+
const H = new AbortController(), D = window.setTimeout(() => H.abort(), Af);
|
|
10081
|
+
let he;
|
|
10082
|
+
try {
|
|
10083
|
+
he = await Yt(Zt(`/api/start${C.size ? `?${C}` : ""}`), {
|
|
10084
|
+
method: "POST",
|
|
10085
|
+
signal: H.signal
|
|
10086
|
+
});
|
|
10087
|
+
} catch (tt) {
|
|
10088
|
+
throw tt instanceof DOMException && tt.name === "AbortError" ? new Error("Start timed out. The workspace may still be booting — try reopening the session in a moment.") : tt;
|
|
10089
|
+
} finally {
|
|
10090
|
+
window.clearTimeout(D);
|
|
10091
|
+
}
|
|
10092
|
+
if (!he.ok) throw new Error(await he.text());
|
|
10093
|
+
const { previewUrl: J, sessionId: Pe, rawOpencodeSessionId: be } = await he.json();
|
|
10094
|
+
n.value = J, i.value = Pe;
|
|
10095
|
+
const at = be ?? Pe, ct = await Ii(), Q = {
|
|
10085
10096
|
"x-miniprogram-business-id": w.businessId ?? "",
|
|
10086
|
-
"x-miniprogram-session-id":
|
|
10097
|
+
"x-miniprogram-session-id": Pe
|
|
10087
10098
|
};
|
|
10088
|
-
|
|
10099
|
+
ct && (Q.Authorization = ct), p = Ef({
|
|
10089
10100
|
baseUrl: Zt("/api/opencode"),
|
|
10090
|
-
headers:
|
|
10091
|
-
fetch: (
|
|
10092
|
-
const
|
|
10093
|
-
return
|
|
10101
|
+
headers: Q,
|
|
10102
|
+
fetch: (tt) => {
|
|
10103
|
+
const Re = new Request(tt);
|
|
10104
|
+
return Re.headers.set("x-miniprogram-business-id", w.businessId ?? ""), Re.headers.set("x-miniprogram-session-id", Pe), Re.timeout = !1, Yt(Re);
|
|
10094
10105
|
}
|
|
10095
|
-
}), s.value =
|
|
10106
|
+
}), s.value = at, await oe(at), v++, re(v), t.value = "ready", e.value = "Ready";
|
|
10096
10107
|
} catch (C) {
|
|
10097
10108
|
t.value = "error", e.value = `Failed to start: ${qe(C)}`;
|
|
10098
10109
|
} finally {
|
|
@@ -10127,18 +10138,18 @@ function Rf() {
|
|
|
10127
10138
|
r.value = !0;
|
|
10128
10139
|
try {
|
|
10129
10140
|
const C = [];
|
|
10130
|
-
for (const
|
|
10141
|
+
for (const J of M) C.push(await ie(J));
|
|
10131
10142
|
const H = C.length ? `[The attached image file${C.length > 1 ? "s are" : " is"} saved on this machine at: ${C.join(", ")} (outside the repo). If the task needs the actual file as an asset, move it into the app (e.g. src/assets/) — do not try to recreate it. If it is only a visual reference, leave it where it is.]` : "", D = [w.trim(), H].filter(Boolean).join(`
|
|
10132
10143
|
|
|
10133
10144
|
`), { error: he } = await p.session.prompt({
|
|
10134
10145
|
path: { id: s.value },
|
|
10135
10146
|
body: {
|
|
10136
10147
|
parts: [
|
|
10137
|
-
...M.map((
|
|
10148
|
+
...M.map((J) => ({
|
|
10138
10149
|
type: "file",
|
|
10139
|
-
mime:
|
|
10140
|
-
filename:
|
|
10141
|
-
url:
|
|
10150
|
+
mime: J.mime,
|
|
10151
|
+
filename: J.filename,
|
|
10152
|
+
url: J.url
|
|
10142
10153
|
})),
|
|
10143
10154
|
...D ? [{ type: "text", text: D }] : []
|
|
10144
10155
|
]
|
|
@@ -10176,10 +10187,10 @@ function ir(t) {
|
|
|
10176
10187
|
function ar(t) {
|
|
10177
10188
|
return t === "active" ? "Active" : t === "needs_attention" ? "Needs attention" : "Archived";
|
|
10178
10189
|
}
|
|
10179
|
-
function
|
|
10190
|
+
function Cf(t) {
|
|
10180
10191
|
return t === "succeeded" ? "success" : t === "failed" ? "error" : t === "queued" || t === "running" ? "info" : "neutral";
|
|
10181
10192
|
}
|
|
10182
|
-
function
|
|
10193
|
+
function If(t) {
|
|
10183
10194
|
switch (t) {
|
|
10184
10195
|
case "queued":
|
|
10185
10196
|
return "Queued";
|
|
@@ -10193,7 +10204,7 @@ function Cf(t) {
|
|
|
10193
10204
|
return "No build yet";
|
|
10194
10205
|
}
|
|
10195
10206
|
}
|
|
10196
|
-
function
|
|
10207
|
+
function Of(t) {
|
|
10197
10208
|
switch (t) {
|
|
10198
10209
|
case "ready":
|
|
10199
10210
|
return "Ready";
|
|
@@ -10205,20 +10216,20 @@ function If(t) {
|
|
|
10205
10216
|
return "Not set up";
|
|
10206
10217
|
}
|
|
10207
10218
|
}
|
|
10208
|
-
const
|
|
10219
|
+
const $f = ["preview", "published", "rolled_back"];
|
|
10209
10220
|
function Hi(t) {
|
|
10210
|
-
return
|
|
10221
|
+
return $f.includes(t.status);
|
|
10211
10222
|
}
|
|
10212
|
-
function
|
|
10223
|
+
function Mf(t) {
|
|
10213
10224
|
return t.is_live === 1 ? "Live" : t.build_status === "queued" || t.build_status === "running" ? "Building" : t.build_status === "failed" ? "Failed" : t.build_status === "succeeded" ? "Ready" : "Draft";
|
|
10214
10225
|
}
|
|
10215
|
-
function
|
|
10226
|
+
function Lf(t) {
|
|
10216
10227
|
return t.is_live === 1 ? "primary" : t.build_status === "succeeded" ? "success" : t.build_status === "queued" || t.build_status === "running" ? "info" : t.build_status === "failed" ? "error" : "neutral";
|
|
10217
10228
|
}
|
|
10218
|
-
function
|
|
10229
|
+
function Pf(t) {
|
|
10219
10230
|
return t === "ready" ? "success" : t === "error" ? "error" : t === "idle" ? "neutral" : "warning";
|
|
10220
10231
|
}
|
|
10221
|
-
function
|
|
10232
|
+
function Df() {
|
|
10222
10233
|
const t = pe(Mt() || hr), e = pe(null), n = pe([]), r = pe([]), s = pe(!1), i = pe("Project ready"), o = pe(null), a = pe(null), l = ne(() => r.value[0] ?? null), u = ne(() => {
|
|
10223
10234
|
var P;
|
|
10224
10235
|
return ((P = e.value) == null ? void 0 : P.provisioningStatus) === "ready";
|
|
@@ -10231,13 +10242,13 @@ function Pf() {
|
|
|
10231
10242
|
}
|
|
10232
10243
|
async function p() {
|
|
10233
10244
|
g();
|
|
10234
|
-
const P = await
|
|
10245
|
+
const P = await rt(`/api/projects/${t.value}`);
|
|
10235
10246
|
return e.value = P, P.provisioningStatus === "not_started" ? i.value = "Project setup required" : P.provisioningStatus === "provisioning" ? i.value = "Setting up project" : P.provisioningStatus === "failed" ? i.value = "Project setup failed" : i.value = "Project ready", P;
|
|
10236
10247
|
}
|
|
10237
10248
|
async function v() {
|
|
10238
10249
|
g(), s.value = !0, i.value = "Setting up project";
|
|
10239
10250
|
try {
|
|
10240
|
-
const P = await
|
|
10251
|
+
const P = await rt(
|
|
10241
10252
|
`/api/projects/${t.value}/provision`,
|
|
10242
10253
|
{
|
|
10243
10254
|
method: "POST",
|
|
@@ -10260,7 +10271,7 @@ function Pf() {
|
|
|
10260
10271
|
async function d() {
|
|
10261
10272
|
g(), i.value = "Loading sessions";
|
|
10262
10273
|
try {
|
|
10263
|
-
const P = await
|
|
10274
|
+
const P = await rt(
|
|
10264
10275
|
`/api/projects/${t.value}/sessions`
|
|
10265
10276
|
);
|
|
10266
10277
|
n.value = P.sessions, i.value = "Project ready";
|
|
@@ -10270,15 +10281,15 @@ function Pf() {
|
|
|
10270
10281
|
}
|
|
10271
10282
|
async function h() {
|
|
10272
10283
|
g();
|
|
10273
|
-
const P = await
|
|
10284
|
+
const P = await rt(
|
|
10274
10285
|
`/api/projects/${t.value}/releases`
|
|
10275
10286
|
);
|
|
10276
10287
|
r.value = P.releases;
|
|
10277
|
-
const
|
|
10278
|
-
return o.value = (
|
|
10288
|
+
const X = P.releases.find((ue) => ue.id === o.value) ?? P.releases[0];
|
|
10289
|
+
return o.value = (X == null ? void 0 : X.id) ?? null, await A(X), P;
|
|
10279
10290
|
}
|
|
10280
10291
|
async function b(P) {
|
|
10281
|
-
return (await
|
|
10292
|
+
return (await rt(
|
|
10282
10293
|
`/api/projects/${t.value}/releases/${P}/preview-url`
|
|
10283
10294
|
)).previewUrl;
|
|
10284
10295
|
}
|
|
@@ -10286,15 +10297,15 @@ function Pf() {
|
|
|
10286
10297
|
a.value = P && Hi(P) ? await b(P.id) : null;
|
|
10287
10298
|
}
|
|
10288
10299
|
async function _(P) {
|
|
10289
|
-
const
|
|
10290
|
-
o.value = P, await A(
|
|
10300
|
+
const X = r.value.find((ue) => ue.id === P);
|
|
10301
|
+
o.value = P, await A(X);
|
|
10291
10302
|
}
|
|
10292
10303
|
async function k(P = {}) {
|
|
10293
10304
|
if (g(), !u.value)
|
|
10294
10305
|
throw new Error("Set up the v2 project before creating a session");
|
|
10295
10306
|
s.value = !0;
|
|
10296
10307
|
try {
|
|
10297
|
-
const
|
|
10308
|
+
const X = await rt(
|
|
10298
10309
|
`/api/projects/${t.value}/sessions`,
|
|
10299
10310
|
{
|
|
10300
10311
|
method: "POST",
|
|
@@ -10307,15 +10318,15 @@ function Pf() {
|
|
|
10307
10318
|
signal: AbortSignal.timeout(18e4)
|
|
10308
10319
|
}
|
|
10309
10320
|
);
|
|
10310
|
-
return i.value = `Created ${
|
|
10311
|
-
} catch (
|
|
10312
|
-
throw i.value = qe(
|
|
10321
|
+
return i.value = `Created ${X.sessionId}`, await d(), X;
|
|
10322
|
+
} catch (X) {
|
|
10323
|
+
throw i.value = qe(X), X;
|
|
10313
10324
|
} finally {
|
|
10314
10325
|
s.value = !1;
|
|
10315
10326
|
}
|
|
10316
10327
|
}
|
|
10317
10328
|
async function S(P) {
|
|
10318
|
-
return g(),
|
|
10329
|
+
return g(), rt(
|
|
10319
10330
|
`/api/projects/${t.value}/sessions/${P}/changes`,
|
|
10320
10331
|
{ signal: AbortSignal.timeout(6e4) }
|
|
10321
10332
|
);
|
|
@@ -10323,7 +10334,7 @@ function Pf() {
|
|
|
10323
10334
|
async function L(P) {
|
|
10324
10335
|
s.value = !0;
|
|
10325
10336
|
try {
|
|
10326
|
-
const
|
|
10337
|
+
const X = await rt(
|
|
10327
10338
|
`/api/projects/${t.value}/sessions/${P}/resume`,
|
|
10328
10339
|
{
|
|
10329
10340
|
method: "POST",
|
|
@@ -10332,20 +10343,20 @@ function Pf() {
|
|
|
10332
10343
|
signal: AbortSignal.timeout(18e4)
|
|
10333
10344
|
}
|
|
10334
10345
|
);
|
|
10335
|
-
return i.value = `Resumed ${P}`, await d(),
|
|
10336
|
-
} catch (
|
|
10337
|
-
throw i.value = qe(
|
|
10346
|
+
return i.value = `Resumed ${P}`, await d(), X;
|
|
10347
|
+
} catch (X) {
|
|
10348
|
+
throw i.value = qe(X), X;
|
|
10338
10349
|
} finally {
|
|
10339
10350
|
s.value = !1;
|
|
10340
10351
|
}
|
|
10341
10352
|
}
|
|
10342
|
-
async function R(P,
|
|
10343
|
-
const ue =
|
|
10353
|
+
async function R(P, X) {
|
|
10354
|
+
const ue = X.trim();
|
|
10344
10355
|
if (!ue) return;
|
|
10345
10356
|
const oe = n.value.find((T) => T.id === P);
|
|
10346
10357
|
oe && (oe.title = ue);
|
|
10347
10358
|
try {
|
|
10348
|
-
await
|
|
10359
|
+
await rt(`/api/projects/${t.value}/sessions/${P}`, {
|
|
10349
10360
|
method: "PATCH",
|
|
10350
10361
|
body: JSON.stringify({ title: ue })
|
|
10351
10362
|
}), i.value = "Renamed session";
|
|
@@ -10357,23 +10368,23 @@ function Pf() {
|
|
|
10357
10368
|
async function Z(P) {
|
|
10358
10369
|
s.value = !0;
|
|
10359
10370
|
try {
|
|
10360
|
-
const
|
|
10371
|
+
const X = await rt(
|
|
10361
10372
|
`/api/projects/${t.value}/sessions/${P}/commit`,
|
|
10362
10373
|
{ method: "POST" }
|
|
10363
10374
|
);
|
|
10364
|
-
return i.value = `Committed ${
|
|
10375
|
+
return i.value = `Committed ${X.sourceCommitSha.slice(0, 7)}`, X;
|
|
10365
10376
|
} finally {
|
|
10366
10377
|
s.value = !1;
|
|
10367
10378
|
}
|
|
10368
10379
|
}
|
|
10369
|
-
async function ee(P,
|
|
10380
|
+
async function ee(P, X) {
|
|
10370
10381
|
s.value = !0;
|
|
10371
10382
|
try {
|
|
10372
|
-
const ue = await
|
|
10383
|
+
const ue = await rt(
|
|
10373
10384
|
`/api/projects/${t.value}/releases`,
|
|
10374
10385
|
{
|
|
10375
10386
|
method: "POST",
|
|
10376
|
-
body: JSON.stringify({ sourceCommitSha: P, sessionId:
|
|
10387
|
+
body: JSON.stringify({ sourceCommitSha: P, sessionId: X })
|
|
10377
10388
|
}
|
|
10378
10389
|
);
|
|
10379
10390
|
return o.value = ue.releaseId, a.value = ue.previewUrl, i.value = `Build ${ue.buildJobId} queued`, await h(), ae(ue.buildJobId), ue;
|
|
@@ -10382,7 +10393,7 @@ function Pf() {
|
|
|
10382
10393
|
}
|
|
10383
10394
|
}
|
|
10384
10395
|
async function ae(P) {
|
|
10385
|
-
for (let
|
|
10396
|
+
for (let X = 0; X < 40; X += 1) {
|
|
10386
10397
|
await Dn(3e3), await h();
|
|
10387
10398
|
const ue = r.value.find((oe) => oe.build_job_id === P);
|
|
10388
10399
|
if (!ue || !ue.build_status || ["succeeded", "failed"].includes(ue.build_status)) {
|
|
@@ -10396,7 +10407,7 @@ function Pf() {
|
|
|
10396
10407
|
if (P) {
|
|
10397
10408
|
s.value = !0;
|
|
10398
10409
|
try {
|
|
10399
|
-
await
|
|
10410
|
+
await rt(`/api/projects/${t.value}/releases/${P}/publish`, { method: "POST" }), i.value = `Published ${P}`, await h();
|
|
10400
10411
|
} finally {
|
|
10401
10412
|
s.value = !1;
|
|
10402
10413
|
}
|
|
@@ -10405,7 +10416,7 @@ function Pf() {
|
|
|
10405
10416
|
async function ye() {
|
|
10406
10417
|
s.value = !0;
|
|
10407
10418
|
try {
|
|
10408
|
-
await
|
|
10419
|
+
await rt(`/api/projects/${t.value}/rollback-to-v1`, { method: "POST" }), i.value = "Rolled back to v1";
|
|
10409
10420
|
} finally {
|
|
10410
10421
|
s.value = !1;
|
|
10411
10422
|
}
|
|
@@ -10438,63 +10449,63 @@ function Pf() {
|
|
|
10438
10449
|
rollbackToV1: ye
|
|
10439
10450
|
});
|
|
10440
10451
|
}
|
|
10441
|
-
const
|
|
10452
|
+
const zf = ["aria-label", "title"], Bf = { class: "flex flex-col gap-[4px]" }, Ff = ["title", "onClick"], Uf = {
|
|
10442
10453
|
key: 0,
|
|
10443
10454
|
class: "min-w-0 flex-1 truncate fm-typo-en-body-md-600"
|
|
10444
|
-
},
|
|
10455
|
+
}, jf = {
|
|
10445
10456
|
key: 1,
|
|
10446
10457
|
class: "rounded-full bg-fm-color-neutral-gray-100 px-[8px] py-[2px] fm-typo-en-body-xs-600 text-fm-color-typo-secondary"
|
|
10447
|
-
},
|
|
10458
|
+
}, Hf = { class: "mt-auto flex flex-col gap-[8px]" }, Gf = ["title"], Wf = {
|
|
10448
10459
|
key: 2,
|
|
10449
10460
|
class: "min-w-0 truncate"
|
|
10450
|
-
},
|
|
10461
|
+
}, Kf = {
|
|
10451
10462
|
key: 0,
|
|
10452
10463
|
class: "flex min-w-0 flex-1 flex-col overflow-auto bg-fm-color-neutral-white"
|
|
10453
|
-
},
|
|
10464
|
+
}, qf = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, Vf = { class: "flex w-full max-w-[760px] flex-col gap-16 p-24" }, Zf = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white p-16" }, Yf = { class: "flex items-center justify-between gap-16" }, Xf = { class: "min-w-0" }, Jf = { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Qf = { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ep = {
|
|
10454
10465
|
key: 0,
|
|
10455
10466
|
class: "m-0 mt-12 break-words fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
10456
|
-
},
|
|
10467
|
+
}, tp = {
|
|
10457
10468
|
key: 1,
|
|
10458
10469
|
class: "workspace__workspace-main flex min-w-0 flex-1 flex-col"
|
|
10459
|
-
},
|
|
10470
|
+
}, np = { class: "relative flex h-[52px] shrink-0 items-center justify-between gap-8 border-b border-fm-color-neutral-gray-100 px-16" }, rp = { class: "flex min-w-0 items-center gap-8" }, sp = { class: "min-w-0 truncate fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ip = { class: "truncate" }, ap = { class: "flex shrink-0 items-center gap-4" }, op = { class: "absolute left-16 top-[52px] z-20 max-h-[360px] w-[320px] overflow-y-auto rounded-lg border border-fm-color-neutral-gray-200 bg-fm-color-neutral-white py-[4px] shadow-lg" }, lp = ["onClick"], cp = { class: "min-w-0 flex-1" }, up = { class: "truncate fm-typo-en-body-md-600 text-fm-color-typo-primary" }, dp = { class: "mt-2 truncate fm-typo-en-body-xs-400 text-fm-color-typo-tertiary" }, fp = {
|
|
10460
10471
|
key: 0,
|
|
10461
10472
|
class: "px-[12px] py-[10px] fm-typo-en-body-sm-400 text-fm-color-typo-tertiary"
|
|
10462
|
-
},
|
|
10473
|
+
}, pp = {
|
|
10463
10474
|
key: 0,
|
|
10464
10475
|
class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-system-warning-300 bg-fm-color-system-warning-50 px-16 py-8"
|
|
10465
|
-
},
|
|
10476
|
+
}, hp = { class: "min-w-0 truncate fm-typo-en-body-sm-400 text-fm-color-typo-warning" }, mp = {
|
|
10466
10477
|
key: 0,
|
|
10467
10478
|
class: "absolute inset-0 z-20 cursor-col-resize"
|
|
10468
|
-
},
|
|
10479
|
+
}, gp = ["aria-valuenow"], bp = {
|
|
10469
10480
|
key: 2,
|
|
10470
10481
|
class: "flex min-w-0 flex-1 flex-col overflow-auto bg-fm-color-neutral-white"
|
|
10471
|
-
},
|
|
10482
|
+
}, yp = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, _p = { class: "flex shrink-0 items-center gap-8" }, xp = { class: "flex w-full max-w-[920px] flex-col gap-24 p-24" }, wp = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white" }, vp = { class: "flex flex-col gap-16 p-16" }, kp = { class: "flex items-center justify-between gap-16" }, Ep = { class: "min-w-0" }, Tp = { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Sp = { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ap = { class: "flex shrink-0 items-center gap-6" }, Rp = { class: "flex flex-wrap items-center gap-8" }, Np = { class: "rounded-lg border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white" }, Cp = { class: "flex items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-16 py-12" }, Ip = { class: "flex items-center gap-12" }, Op = {
|
|
10472
10483
|
key: 0,
|
|
10473
10484
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
10474
|
-
},
|
|
10485
|
+
}, $p = { class: "font-mono text-fm-color-typo-secondary" }, Mp = {
|
|
10475
10486
|
key: 0,
|
|
10476
10487
|
class: "flex flex-col items-center gap-6 p-24 text-center"
|
|
10477
|
-
},
|
|
10488
|
+
}, Lp = {
|
|
10478
10489
|
key: 1,
|
|
10479
10490
|
class: "divide-y divide-fm-color-neutral-gray-100"
|
|
10480
|
-
},
|
|
10491
|
+
}, Pp = ["onClick"], Dp = { class: "flex min-w-0 flex-wrap items-center gap-[6px]" }, zp = { class: "inline-flex min-w-0 items-center gap-[4px] truncate fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Bp = { class: "mt-4 flex min-w-0 flex-wrap items-center gap-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Fp = { class: "font-mono text-fm-color-typo-tertiary" }, Up = { class: "font-mono text-fm-color-typo-tertiary" }, jp = { class: "flex shrink-0 flex-wrap items-center justify-end gap-4" }, Hp = { class: "rounded-lg border border-fm-color-system-warning-300 bg-fm-color-neutral-white" }, Gp = { class: "flex items-center justify-between gap-16 p-16" }, Wp = {
|
|
10481
10492
|
key: 3,
|
|
10482
10493
|
class: "flex min-w-0 flex-1 flex-col overflow-auto bg-fm-color-neutral-white"
|
|
10483
|
-
},
|
|
10494
|
+
}, Kp = { class: "flex shrink-0 items-center justify-between gap-16 border-b border-fm-color-neutral-gray-100 px-24 py-16" }, qp = { class: "flex w-full max-w-[920px] flex-col gap-8 p-24" }, Vp = ["onClick", "onKeydown"], Zp = { class: "min-w-0" }, Yp = { class: "flex min-w-0 flex-wrap items-center gap-[6px]" }, Xp = { class: "truncate fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Jp = { class: "mt-4 flex flex-wrap items-center gap-x-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Qp = {
|
|
10484
10495
|
key: 0,
|
|
10485
10496
|
class: "mt-4 truncate fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
10486
|
-
},
|
|
10497
|
+
}, eh = { class: "flex shrink-0 items-center gap-4" }, th = {
|
|
10487
10498
|
key: 0,
|
|
10488
10499
|
class: "flex flex-col items-center gap-8 rounded-lg border border-dashed border-fm-color-neutral-gray-200 p-24 text-center"
|
|
10489
|
-
}, Fs = "mpv2:sidebar-collapsed", or = "mpv2:chat-column-width",
|
|
10500
|
+
}, Fs = "mpv2:sidebar-collapsed", or = "mpv2:chat-column-width", nh = 440, Tn = 320, lr = 720, rh = 360, sh = /* @__PURE__ */ it({
|
|
10490
10501
|
__name: "ControlPlaneView",
|
|
10491
10502
|
setup(t) {
|
|
10492
|
-
const e = br(), n =
|
|
10503
|
+
const e = br(), n = Nf(), r = Df(), s = da(), i = pe("workspace"), o = pe(!1), a = pe(G(Fs, !1)), l = pe(!1), u = pe(null), f = pe(le(or, nh)), g = pe(!1);
|
|
10493
10504
|
let p = null, v = null, d = null, h = "", b = "";
|
|
10494
10505
|
const A = ne(() => r.sessions.find((E) => E.status === "active") ?? null), _ = pe(!1), k = pe(!1), S = ne(
|
|
10495
10506
|
() => r.sessions.find((E) => E.id === n.workspaceSessionId) ?? A.value
|
|
10496
10507
|
), L = ne(
|
|
10497
|
-
() => S.value ?
|
|
10508
|
+
() => S.value ? vt(S.value) : "Workspace"
|
|
10498
10509
|
), R = ne(() => {
|
|
10499
10510
|
const E = r.latestRelease;
|
|
10500
10511
|
return E ? E.is_live === 1 ? "Latest release is live" : E.build_status === "succeeded" ? "Release ready to go live" : E.build_status === "failed" ? "Build failed" : "Release build in progress" : "No release has been built yet";
|
|
@@ -10512,7 +10523,7 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10512
10523
|
}), de = ne(() => r.releases.find((E) => E.is_live === 1) ?? null), ye = ne(() => gc()), P = ne(() => {
|
|
10513
10524
|
var E;
|
|
10514
10525
|
return ((E = r.project) == null ? void 0 : E.provisioningError) ?? null;
|
|
10515
|
-
}),
|
|
10526
|
+
}), X = ne(() => r.busy || o.value), ue = ne(() => !!(A.value && r.isProvisioned && !X.value)), oe = ne(() => a.value || l.value), T = ne(() => ({
|
|
10516
10527
|
"--workspace-chat-width": `${f.value}px`
|
|
10517
10528
|
})), W = [
|
|
10518
10529
|
{ key: "workspace", label: "Workspace", icon: "space_dashboard" },
|
|
@@ -10547,13 +10558,13 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10547
10558
|
function re() {
|
|
10548
10559
|
var U;
|
|
10549
10560
|
const E = ((U = u.value) == null ? void 0 : U.clientWidth) ?? 0;
|
|
10550
|
-
return E ? Math.max(Tn, Math.min(lr, E -
|
|
10561
|
+
return E ? Math.max(Tn, Math.min(lr, E - rh)) : lr;
|
|
10551
10562
|
}
|
|
10552
|
-
function
|
|
10563
|
+
function Ie(E) {
|
|
10553
10564
|
return Math.round(Math.min(re(), Math.max(Tn, E)));
|
|
10554
10565
|
}
|
|
10555
10566
|
function N(E, U = !1) {
|
|
10556
|
-
const Te =
|
|
10567
|
+
const Te = Ie(E);
|
|
10557
10568
|
f.value !== Te && (f.value = Te), U && me(or, String(Te));
|
|
10558
10569
|
}
|
|
10559
10570
|
function $() {
|
|
@@ -10632,11 +10643,11 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10632
10643
|
const U = await r.createSession({ archiveCodeAction: E });
|
|
10633
10644
|
i.value = "workspace", k.value = !1, await n.init({ businessId: r.businessId, sessionId: U.sessionId });
|
|
10634
10645
|
}
|
|
10635
|
-
async function
|
|
10646
|
+
async function J() {
|
|
10636
10647
|
await r.provisionProject(), await D();
|
|
10637
10648
|
}
|
|
10638
|
-
async function
|
|
10639
|
-
if (!(!r.isProvisioned ||
|
|
10649
|
+
async function Pe() {
|
|
10650
|
+
if (!(!r.isProvisioned || X.value)) {
|
|
10640
10651
|
if (!A.value) {
|
|
10641
10652
|
await he();
|
|
10642
10653
|
return;
|
|
@@ -10674,24 +10685,24 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10674
10685
|
}
|
|
10675
10686
|
}
|
|
10676
10687
|
}
|
|
10677
|
-
async function
|
|
10688
|
+
async function be() {
|
|
10678
10689
|
if (!A.value) return;
|
|
10679
10690
|
const { sourceCommitSha: E } = await r.commitSession(A.value.id);
|
|
10680
10691
|
await r.createRelease(E, A.value.id), i.value = "releases";
|
|
10681
10692
|
}
|
|
10682
|
-
function
|
|
10693
|
+
function at() {
|
|
10683
10694
|
r.activeReleasePreviewUrl && window.open(r.activeReleasePreviewUrl, "_blank", "noopener");
|
|
10684
10695
|
}
|
|
10685
|
-
async function
|
|
10686
|
-
r.latestRelease && await
|
|
10696
|
+
async function ct() {
|
|
10697
|
+
r.latestRelease && await ot(r.latestRelease);
|
|
10687
10698
|
}
|
|
10688
|
-
function
|
|
10699
|
+
function Q() {
|
|
10689
10700
|
ae.value && window.open(ae.value, "_blank", "noopener");
|
|
10690
10701
|
}
|
|
10691
|
-
function
|
|
10702
|
+
function tt() {
|
|
10692
10703
|
de.value && window.open(ye.value, "_blank", "noopener");
|
|
10693
10704
|
}
|
|
10694
|
-
function
|
|
10705
|
+
function Re() {
|
|
10695
10706
|
r.latestRelease && Ee(r.latestRelease);
|
|
10696
10707
|
}
|
|
10697
10708
|
function Ee(E) {
|
|
@@ -10705,7 +10716,7 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10705
10716
|
F(E);
|
|
10706
10717
|
});
|
|
10707
10718
|
}
|
|
10708
|
-
function
|
|
10719
|
+
function _t() {
|
|
10709
10720
|
s.open({
|
|
10710
10721
|
title: "Roll back to v1?",
|
|
10711
10722
|
message: "This restores the merchant to the current v1 miniprogram for all live traffic and stops serving the published v2 release. It takes effect immediately.",
|
|
@@ -10716,17 +10727,17 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10716
10727
|
r.rollbackToV1();
|
|
10717
10728
|
});
|
|
10718
10729
|
}
|
|
10719
|
-
async function
|
|
10730
|
+
async function ze(E) {
|
|
10720
10731
|
await r.selectRelease(E.id);
|
|
10721
10732
|
}
|
|
10722
|
-
async function
|
|
10723
|
-
await
|
|
10733
|
+
async function ot(E) {
|
|
10734
|
+
await ze(E), at();
|
|
10724
10735
|
}
|
|
10725
|
-
function
|
|
10736
|
+
function nt(E) {
|
|
10726
10737
|
E.build_logs_url && window.open(E.build_logs_url, "_blank", "noopener");
|
|
10727
10738
|
}
|
|
10728
10739
|
async function F(E) {
|
|
10729
|
-
await
|
|
10740
|
+
await ze(E), await r.publish(E.id);
|
|
10730
10741
|
}
|
|
10731
10742
|
async function K(E) {
|
|
10732
10743
|
_.value = !1, i.value = "workspace", k.value = !1, await n.init({ businessId: r.businessId, sessionId: E.id, readOnly: E.status !== "active" });
|
|
@@ -10738,7 +10749,7 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10738
10749
|
const E = n.workspaceSessionId;
|
|
10739
10750
|
E && (await r.resumeSession(E), k.value = !1, await n.init({ businessId: r.businessId, sessionId: E }));
|
|
10740
10751
|
}
|
|
10741
|
-
function
|
|
10752
|
+
function Ce(E) {
|
|
10742
10753
|
s.open({
|
|
10743
10754
|
title: "Rename session",
|
|
10744
10755
|
dialogComponent: Ld,
|
|
@@ -10760,19 +10771,19 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10760
10771
|
if (!U) return;
|
|
10761
10772
|
await r.refreshSessions().catch(() => {
|
|
10762
10773
|
});
|
|
10763
|
-
const Te = r.sessions.find((
|
|
10774
|
+
const Te = r.sessions.find((ut) => ut.id === U);
|
|
10764
10775
|
Te && Te.status !== "active" && (k.value = !0, await n.init({ businessId: r.businessId, sessionId: U, readOnly: !0 }));
|
|
10765
10776
|
}
|
|
10766
10777
|
);
|
|
10767
10778
|
function Ye(E) {
|
|
10768
10779
|
return E.is_live === 1 ? "bg-fm-color-system-success-50" : E.id === r.activeReleaseId ? "bg-fm-color-primary-oats" : "bg-fm-color-neutral-white";
|
|
10769
10780
|
}
|
|
10770
|
-
function
|
|
10781
|
+
function wt(E) {
|
|
10771
10782
|
return E.status === "active" ? "Active session" : E.status === "needs_attention" ? "Needs attention" : "Archived session";
|
|
10772
10783
|
}
|
|
10773
|
-
function
|
|
10784
|
+
function vt(E) {
|
|
10774
10785
|
var U;
|
|
10775
|
-
return ((U = E.title) == null ? void 0 : U.trim()) ||
|
|
10786
|
+
return ((U = E.title) == null ? void 0 : U.trim()) || wt(E);
|
|
10776
10787
|
}
|
|
10777
10788
|
function Bt(E) {
|
|
10778
10789
|
if (!E) return "No timestamp";
|
|
@@ -10786,15 +10797,15 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10786
10797
|
}
|
|
10787
10798
|
return (E, U) => {
|
|
10788
10799
|
var Ft, en, tn, Ut;
|
|
10789
|
-
const Te =
|
|
10800
|
+
const Te = $e("FmIcon"), ut = $e("FmCircularProgress"), Se = $e("FmButton");
|
|
10790
10801
|
return x(), I("div", {
|
|
10791
|
-
class:
|
|
10802
|
+
class: Fe(["workspace__shell flex h-full min-h-0 w-full min-w-0 overflow-hidden bg-fm-color-neutral-white text-fm-color-typo-primary", { "select-none": g.value }])
|
|
10792
10803
|
}, [
|
|
10793
10804
|
m("aside", {
|
|
10794
|
-
class:
|
|
10805
|
+
class: Fe(["workspace__sidebar flex shrink-0 flex-col overflow-y-auto border-r border-fm-color-neutral-gray-100 bg-fm-color-neutral-white transition-[width,padding] duration-200", oe.value ? "w-[64px] gap-[12px] p-[8px]" : "w-[256px] gap-[20px] p-[16px]"])
|
|
10795
10806
|
}, [
|
|
10796
10807
|
m("header", {
|
|
10797
|
-
class:
|
|
10808
|
+
class: Fe(["flex min-w-0 items-center", oe.value ? "justify-center" : "justify-end"])
|
|
10798
10809
|
}, [
|
|
10799
10810
|
m("button", {
|
|
10800
10811
|
type: "button",
|
|
@@ -10808,13 +10819,13 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10808
10819
|
size: "md",
|
|
10809
10820
|
color: "typo-secondary"
|
|
10810
10821
|
}, null, 8, ["name"])
|
|
10811
|
-
], 8,
|
|
10822
|
+
], 8, zf)
|
|
10812
10823
|
], 2),
|
|
10813
|
-
m("nav",
|
|
10814
|
-
(x(), I(
|
|
10824
|
+
m("nav", Bf, [
|
|
10825
|
+
(x(), I(Oe, null, De(W, (q) => m("button", {
|
|
10815
10826
|
key: q.key,
|
|
10816
10827
|
type: "button",
|
|
10817
|
-
class:
|
|
10828
|
+
class: Fe(["flex h-[40px] w-full cursor-pointer items-center rounded-lg border-0 transition", [
|
|
10818
10829
|
i.value === q.key ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-transparent text-fm-color-typo-secondary hover:bg-fm-color-neutral-gray-100 hover:text-fm-color-typo-primary",
|
|
10819
10830
|
oe.value ? "justify-center px-0" : "gap-[10px] px-[10px] text-left"
|
|
10820
10831
|
]]),
|
|
@@ -10826,17 +10837,17 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10826
10837
|
color: i.value === q.key ? "primary" : "typo-secondary",
|
|
10827
10838
|
size: "md"
|
|
10828
10839
|
}, null, 8, ["name", "color"]),
|
|
10829
|
-
oe.value ? se("", !0) : (x(), I("span",
|
|
10830
|
-
!oe.value && q.key === "sessions" ? (x(), I("span",
|
|
10831
|
-
], 10,
|
|
10840
|
+
oe.value ? se("", !0) : (x(), I("span", Uf, j(q.label), 1)),
|
|
10841
|
+
!oe.value && q.key === "sessions" ? (x(), I("span", jf, j(O(r).sessions.length), 1)) : se("", !0)
|
|
10842
|
+
], 10, Ff)), 64))
|
|
10832
10843
|
]),
|
|
10833
|
-
m("div",
|
|
10844
|
+
m("div", Hf, [
|
|
10834
10845
|
O(r).statusText ? (x(), I("p", {
|
|
10835
10846
|
key: 0,
|
|
10836
|
-
class:
|
|
10847
|
+
class: Fe(["m-0 flex items-center rounded-md bg-fm-color-neutral-gray-100 fm-typo-en-body-xs-400 text-fm-color-typo-secondary", oe.value ? "justify-center px-[6px] py-[8px]" : "gap-[6px] px-[10px] py-[6px]"]),
|
|
10837
10848
|
title: O(r).statusText
|
|
10838
10849
|
}, [
|
|
10839
|
-
|
|
10850
|
+
X.value ? (x(), Ae(ut, {
|
|
10840
10851
|
key: 0,
|
|
10841
10852
|
size: "md",
|
|
10842
10853
|
color: "typo-secondary"
|
|
@@ -10846,29 +10857,29 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10846
10857
|
size: "sm",
|
|
10847
10858
|
color: "typo-secondary"
|
|
10848
10859
|
})) : se("", !0),
|
|
10849
|
-
oe.value ? se("", !0) : (x(), I("span",
|
|
10850
|
-
], 10,
|
|
10860
|
+
oe.value ? se("", !0) : (x(), I("span", Wf, j(O(r).statusText), 1))
|
|
10861
|
+
], 10, Gf)) : se("", !0),
|
|
10851
10862
|
O(r).isProvisioned ? se("", !0) : (x(), Ae(Se, {
|
|
10852
10863
|
key: 1,
|
|
10853
10864
|
icon: "source",
|
|
10854
10865
|
label: oe.value ? void 0 : "Set up v2 project",
|
|
10855
10866
|
loading: O(r).busy,
|
|
10856
10867
|
title: oe.value ? "Set up v2 project" : void 0,
|
|
10857
|
-
onClick:
|
|
10868
|
+
onClick: J
|
|
10858
10869
|
}, null, 8, ["label", "loading", "title"])),
|
|
10859
10870
|
V(Se, {
|
|
10860
10871
|
icon: "add",
|
|
10861
10872
|
label: oe.value ? void 0 : "New session",
|
|
10862
|
-
disabled: !O(r).isProvisioned ||
|
|
10863
|
-
loading:
|
|
10873
|
+
disabled: !O(r).isProvisioned || X.value,
|
|
10874
|
+
loading: X.value,
|
|
10864
10875
|
title: oe.value ? "New session" : void 0,
|
|
10865
|
-
onClick:
|
|
10876
|
+
onClick: Pe
|
|
10866
10877
|
}, null, 8, ["label", "disabled", "loading", "title"])
|
|
10867
10878
|
])
|
|
10868
10879
|
], 2),
|
|
10869
|
-
O(r).isProvisioned ? i.value === "workspace" ? (x(), I("main",
|
|
10870
|
-
m("div",
|
|
10871
|
-
m("div",
|
|
10880
|
+
O(r).isProvisioned ? i.value === "workspace" ? (x(), I("main", tp, [
|
|
10881
|
+
m("div", np, [
|
|
10882
|
+
m("div", rp, [
|
|
10872
10883
|
m("button", {
|
|
10873
10884
|
type: "button",
|
|
10874
10885
|
class: "flex min-w-0 cursor-pointer items-center gap-[6px] rounded-md border-0 bg-transparent px-[8px] py-[6px] text-left hover:bg-fm-color-neutral-gray-100",
|
|
@@ -10879,12 +10890,12 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10879
10890
|
color: "primary",
|
|
10880
10891
|
size: "md"
|
|
10881
10892
|
}),
|
|
10882
|
-
m("span",
|
|
10883
|
-
S.value ? (x(), Ae(
|
|
10893
|
+
m("span", sp, j(L.value), 1),
|
|
10894
|
+
S.value ? (x(), Ae(ft, {
|
|
10884
10895
|
key: 0,
|
|
10885
10896
|
variant: O(ir)(S.value.status)
|
|
10886
10897
|
}, {
|
|
10887
|
-
default:
|
|
10898
|
+
default: st(() => [
|
|
10888
10899
|
je(j(O(ar)(S.value.status)), 1)
|
|
10889
10900
|
]),
|
|
10890
10901
|
_: 1
|
|
@@ -10901,25 +10912,25 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10901
10912
|
variant: "tertiary",
|
|
10902
10913
|
title: "Rename session",
|
|
10903
10914
|
"aria-label": "Rename session",
|
|
10904
|
-
onClick: U[1] || (U[1] = (q) =>
|
|
10915
|
+
onClick: U[1] || (U[1] = (q) => Ce(S.value))
|
|
10905
10916
|
})) : se("", !0),
|
|
10906
|
-
O(n).readOnly ? se("", !0) : (x(), Ae(
|
|
10917
|
+
O(n).readOnly ? se("", !0) : (x(), Ae(ft, {
|
|
10907
10918
|
key: 1,
|
|
10908
|
-
variant: O(
|
|
10919
|
+
variant: O(Pf)(O(n).status),
|
|
10909
10920
|
class: "min-w-0 max-w-[240px]"
|
|
10910
10921
|
}, {
|
|
10911
|
-
default:
|
|
10912
|
-
O(n).status === "starting" ? (x(), Ae(
|
|
10922
|
+
default: st(() => [
|
|
10923
|
+
O(n).status === "starting" ? (x(), Ae(ut, {
|
|
10913
10924
|
key: 0,
|
|
10914
10925
|
size: "md",
|
|
10915
10926
|
color: "system-warning-300"
|
|
10916
10927
|
})) : se("", !0),
|
|
10917
|
-
m("span",
|
|
10928
|
+
m("span", ip, j(O(n).statusText), 1)
|
|
10918
10929
|
]),
|
|
10919
10930
|
_: 1
|
|
10920
10931
|
}, 8, ["variant"]))
|
|
10921
10932
|
]),
|
|
10922
|
-
m("div",
|
|
10933
|
+
m("div", ap, [
|
|
10923
10934
|
S.value && S.value.status === "active" ? (x(), Ae(Se, {
|
|
10924
10935
|
key: 0,
|
|
10925
10936
|
icon: "build",
|
|
@@ -10927,40 +10938,40 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10927
10938
|
variant: "secondary",
|
|
10928
10939
|
disabled: !ue.value,
|
|
10929
10940
|
loading: O(r).busy,
|
|
10930
|
-
onClick:
|
|
10941
|
+
onClick: be
|
|
10931
10942
|
}, null, 8, ["disabled", "loading"])) : se("", !0)
|
|
10932
10943
|
]),
|
|
10933
|
-
_.value ? (x(), I(
|
|
10944
|
+
_.value ? (x(), I(Oe, { key: 0 }, [
|
|
10934
10945
|
m("div", {
|
|
10935
10946
|
class: "fixed inset-0 z-10",
|
|
10936
10947
|
onClick: U[2] || (U[2] = (q) => _.value = !1)
|
|
10937
10948
|
}),
|
|
10938
|
-
m("div",
|
|
10939
|
-
(x(!0), I(
|
|
10949
|
+
m("div", op, [
|
|
10950
|
+
(x(!0), I(Oe, null, De(O(r).sessions, (q) => (x(), I("button", {
|
|
10940
10951
|
key: q.id,
|
|
10941
10952
|
type: "button",
|
|
10942
|
-
class:
|
|
10953
|
+
class: Fe(["flex w-full cursor-pointer items-center gap-8 border-0 bg-transparent px-[12px] py-[8px] text-left hover:bg-fm-color-neutral-gray-100", q.id === O(n).workspaceSessionId ? "bg-fm-color-primary-oats" : ""]),
|
|
10943
10954
|
onClick: (et) => K(q)
|
|
10944
10955
|
}, [
|
|
10945
|
-
m("div",
|
|
10946
|
-
m("div",
|
|
10947
|
-
m("div",
|
|
10956
|
+
m("div", cp, [
|
|
10957
|
+
m("div", up, j(vt(q)), 1),
|
|
10958
|
+
m("div", dp, j(Bt(q.updated_at)), 1)
|
|
10948
10959
|
]),
|
|
10949
|
-
V(
|
|
10960
|
+
V(ft, {
|
|
10950
10961
|
variant: O(ir)(q.status)
|
|
10951
10962
|
}, {
|
|
10952
|
-
default:
|
|
10963
|
+
default: st(() => [
|
|
10953
10964
|
je(j(O(ar)(q.status)), 1)
|
|
10954
10965
|
]),
|
|
10955
10966
|
_: 2
|
|
10956
10967
|
}, 1032, ["variant"])
|
|
10957
|
-
], 10,
|
|
10958
|
-
O(r).sessions.length ? se("", !0) : (x(), I("div",
|
|
10968
|
+
], 10, lp))), 128)),
|
|
10969
|
+
O(r).sessions.length ? se("", !0) : (x(), I("div", fp, " No sessions yet. "))
|
|
10959
10970
|
])
|
|
10960
10971
|
], 64)) : se("", !0)
|
|
10961
10972
|
]),
|
|
10962
|
-
O(n).readOnly && O(n).workspaceSessionId ? (x(), I("div",
|
|
10963
|
-
m("span",
|
|
10973
|
+
O(n).readOnly && O(n).workspaceSessionId ? (x(), I("div", pp, [
|
|
10974
|
+
m("span", hp, j(k.value ? "This session was archived after being idle. Resume it to keep working with the agent." : "You are viewing an archived session. Resume it to continue working with the agent."), 1),
|
|
10964
10975
|
V(Se, {
|
|
10965
10976
|
label: "Resume session",
|
|
10966
10977
|
icon: "restart_alt",
|
|
@@ -10974,7 +10985,7 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10974
10985
|
class: "workspace__split relative flex min-h-0 min-w-0 flex-1",
|
|
10975
10986
|
style: fn(T.value)
|
|
10976
10987
|
}, [
|
|
10977
|
-
g.value ? (x(), I("div",
|
|
10988
|
+
g.value ? (x(), I("div", mp)) : se("", !0),
|
|
10978
10989
|
V(Bu, {
|
|
10979
10990
|
chat: O(n),
|
|
10980
10991
|
class: "workspace__chat shrink-0"
|
|
@@ -10993,100 +11004,100 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
10993
11004
|
}, [...U[5] || (U[5] = [
|
|
10994
11005
|
m("span", { class: "w-px bg-fm-color-neutral-gray-100 transition group-hover:bg-fm-color-primary group-focus-visible:bg-fm-color-primary" }, null, -1),
|
|
10995
11006
|
m("span", { class: "pointer-events-none absolute inset-y-0 left-1/2 hidden w-[3px] -translate-x-1/2 rounded-full bg-fm-color-primary opacity-20 group-hover:block group-focus-visible:block" }, null, -1)
|
|
10996
|
-
])], 40,
|
|
11007
|
+
])], 40, gp),
|
|
10997
11008
|
V($d, {
|
|
10998
11009
|
chat: O(n),
|
|
10999
11010
|
class: "min-w-0 flex-1"
|
|
11000
11011
|
}, null, 8, ["chat"])
|
|
11001
11012
|
], 4)
|
|
11002
|
-
])) : i.value === "releases" ? (x(), I("main",
|
|
11003
|
-
m("header",
|
|
11013
|
+
])) : i.value === "releases" ? (x(), I("main", bp, [
|
|
11014
|
+
m("header", yp, [
|
|
11004
11015
|
U[6] || (U[6] = m("div", { class: "min-w-0" }, [
|
|
11005
11016
|
m("h2", { class: "m-0 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Releases"),
|
|
11006
11017
|
m("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Build from the active session, preview the release, then publish when it is ready. ")
|
|
11007
11018
|
], -1)),
|
|
11008
|
-
m("div",
|
|
11019
|
+
m("div", _p, [
|
|
11009
11020
|
V(Se, {
|
|
11010
11021
|
label: "Open live app",
|
|
11011
11022
|
icon: "open_in_new",
|
|
11012
11023
|
variant: "secondary",
|
|
11013
11024
|
disabled: !de.value,
|
|
11014
|
-
onClick:
|
|
11025
|
+
onClick: tt
|
|
11015
11026
|
}, null, 8, ["disabled"]),
|
|
11016
11027
|
V(Se, {
|
|
11017
11028
|
label: "Build release",
|
|
11018
11029
|
icon: "build",
|
|
11019
11030
|
disabled: !ue.value,
|
|
11020
11031
|
loading: O(r).busy,
|
|
11021
|
-
onClick:
|
|
11032
|
+
onClick: be
|
|
11022
11033
|
}, null, 8, ["disabled", "loading"])
|
|
11023
11034
|
])
|
|
11024
11035
|
]),
|
|
11025
|
-
m("div",
|
|
11026
|
-
m("section",
|
|
11036
|
+
m("div", xp, [
|
|
11037
|
+
m("section", wp, [
|
|
11027
11038
|
U[8] || (U[8] = m("div", { class: "border-b border-fm-color-neutral-gray-100 px-16 py-12" }, [
|
|
11028
11039
|
m("h3", { class: "m-0 fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, "Latest release")
|
|
11029
11040
|
], -1)),
|
|
11030
|
-
m("div",
|
|
11031
|
-
m("div",
|
|
11032
|
-
m("div",
|
|
11033
|
-
m("p",
|
|
11034
|
-
m("p",
|
|
11041
|
+
m("div", vp, [
|
|
11042
|
+
m("div", kp, [
|
|
11043
|
+
m("div", Ep, [
|
|
11044
|
+
m("p", Tp, j(R.value), 1),
|
|
11045
|
+
m("p", Sp, j(Z.value), 1)
|
|
11035
11046
|
]),
|
|
11036
|
-
m("div",
|
|
11037
|
-
((tn = O(r).latestRelease) == null ? void 0 : tn.id) === ((Ut = de.value) == null ? void 0 : Ut.id) ? (x(), Ae(
|
|
11047
|
+
m("div", Ap, [
|
|
11048
|
+
((tn = O(r).latestRelease) == null ? void 0 : tn.id) === ((Ut = de.value) == null ? void 0 : Ut.id) ? (x(), Ae(ft, {
|
|
11038
11049
|
key: 0,
|
|
11039
11050
|
variant: "primary",
|
|
11040
11051
|
size: "sm"
|
|
11041
11052
|
}, {
|
|
11042
|
-
default:
|
|
11053
|
+
default: st(() => [...U[7] || (U[7] = [
|
|
11043
11054
|
je(" Live ", -1)
|
|
11044
11055
|
])]),
|
|
11045
11056
|
_: 1
|
|
11046
11057
|
})) : se("", !0),
|
|
11047
|
-
V(
|
|
11048
|
-
variant: O(
|
|
11058
|
+
V(ft, {
|
|
11059
|
+
variant: O(Cf)(ee.value),
|
|
11049
11060
|
size: "sm"
|
|
11050
11061
|
}, {
|
|
11051
|
-
default:
|
|
11052
|
-
je(j(O(
|
|
11062
|
+
default: st(() => [
|
|
11063
|
+
je(j(O(If)(ee.value)), 1)
|
|
11053
11064
|
]),
|
|
11054
11065
|
_: 1
|
|
11055
11066
|
}, 8, ["variant"])
|
|
11056
11067
|
])
|
|
11057
11068
|
]),
|
|
11058
|
-
m("div",
|
|
11069
|
+
m("div", Rp, [
|
|
11059
11070
|
V(Se, {
|
|
11060
11071
|
label: "Set live",
|
|
11061
11072
|
icon: "publish",
|
|
11062
11073
|
disabled: !O(r).latestRelease || ee.value !== "succeeded" || O(r).latestRelease.is_live === 1 || O(r).busy,
|
|
11063
11074
|
loading: O(r).busy,
|
|
11064
|
-
onClick:
|
|
11075
|
+
onClick: Re
|
|
11065
11076
|
}, null, 8, ["disabled", "loading"]),
|
|
11066
11077
|
V(Se, {
|
|
11067
11078
|
label: "Open preview",
|
|
11068
11079
|
icon: "open_in_new",
|
|
11069
11080
|
variant: "secondary",
|
|
11070
11081
|
disabled: !O(r).latestRelease || ee.value !== "succeeded",
|
|
11071
|
-
onClick:
|
|
11082
|
+
onClick: ct
|
|
11072
11083
|
}, null, 8, ["disabled"]),
|
|
11073
11084
|
ae.value ? (x(), Ae(Se, {
|
|
11074
11085
|
key: 0,
|
|
11075
11086
|
label: "Build logs",
|
|
11076
11087
|
icon: "open_in_new",
|
|
11077
11088
|
variant: "tertiary",
|
|
11078
|
-
onClick:
|
|
11089
|
+
onClick: Q
|
|
11079
11090
|
})) : se("", !0)
|
|
11080
11091
|
])
|
|
11081
11092
|
])
|
|
11082
11093
|
]),
|
|
11083
|
-
m("section",
|
|
11084
|
-
m("div",
|
|
11094
|
+
m("section", Np, [
|
|
11095
|
+
m("div", Cp, [
|
|
11085
11096
|
U[10] || (U[10] = m("h3", { class: "m-0 fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, "Recent releases", -1)),
|
|
11086
|
-
m("div",
|
|
11087
|
-
de.value ? (x(), I("div",
|
|
11097
|
+
m("div", Ip, [
|
|
11098
|
+
de.value ? (x(), I("div", Op, [
|
|
11088
11099
|
U[9] || (U[9] = je(" Live: ", -1)),
|
|
11089
|
-
m("span",
|
|
11100
|
+
m("span", $p, j(de.value.id), 1)
|
|
11090
11101
|
])) : se("", !0),
|
|
11091
11102
|
V(Se, {
|
|
11092
11103
|
label: "Refresh",
|
|
@@ -11097,7 +11108,7 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11097
11108
|
}, null, 8, ["loading"])
|
|
11098
11109
|
])
|
|
11099
11110
|
]),
|
|
11100
|
-
O(r).releases.length === 0 ? (x(), I("div",
|
|
11111
|
+
O(r).releases.length === 0 ? (x(), I("div", Mp, [
|
|
11101
11112
|
V(Te, {
|
|
11102
11113
|
name: "rocket_launch",
|
|
11103
11114
|
size: "xl",
|
|
@@ -11105,18 +11116,18 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11105
11116
|
}),
|
|
11106
11117
|
U[11] || (U[11] = m("p", { class: "m-0 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, "No releases yet", -1)),
|
|
11107
11118
|
U[12] || (U[12] = m("p", { class: "m-0 fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, " Build from the active session to create a release you can preview and publish. ", -1))
|
|
11108
|
-
])) : (x(), I("div",
|
|
11109
|
-
(x(!0), I(
|
|
11119
|
+
])) : (x(), I("div", Lp, [
|
|
11120
|
+
(x(!0), I(Oe, null, De(O(r).releases, (q) => (x(), I("div", {
|
|
11110
11121
|
key: q.id,
|
|
11111
|
-
class:
|
|
11122
|
+
class: Fe(["flex items-center gap-16 px-16 py-12", Ye(q)])
|
|
11112
11123
|
}, [
|
|
11113
11124
|
m("button", {
|
|
11114
11125
|
type: "button",
|
|
11115
11126
|
class: "min-w-0 flex-1 cursor-pointer border-0 bg-transparent p-0 text-left",
|
|
11116
|
-
onClick: (et) =>
|
|
11127
|
+
onClick: (et) => ze(q)
|
|
11117
11128
|
}, [
|
|
11118
|
-
m("div",
|
|
11119
|
-
m("span",
|
|
11129
|
+
m("div", Dp, [
|
|
11130
|
+
m("span", zp, [
|
|
11120
11131
|
V(Te, {
|
|
11121
11132
|
name: "space_dashboard",
|
|
11122
11133
|
color: "typo-tertiary",
|
|
@@ -11124,28 +11135,28 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11124
11135
|
}),
|
|
11125
11136
|
je(" " + j(q.session_title || "Manual release"), 1)
|
|
11126
11137
|
]),
|
|
11127
|
-
V(
|
|
11128
|
-
variant: O(
|
|
11138
|
+
V(ft, {
|
|
11139
|
+
variant: O(Lf)(q),
|
|
11129
11140
|
size: "sm"
|
|
11130
11141
|
}, {
|
|
11131
|
-
default:
|
|
11132
|
-
je(j(O(
|
|
11142
|
+
default: st(() => [
|
|
11143
|
+
je(j(O(Mf)(q)), 1)
|
|
11133
11144
|
]),
|
|
11134
11145
|
_: 2
|
|
11135
11146
|
}, 1032, ["variant"])
|
|
11136
11147
|
]),
|
|
11137
|
-
m("div",
|
|
11148
|
+
m("div", Bp, [
|
|
11138
11149
|
m("span", null, j(Bt(q.created_at)), 1),
|
|
11139
|
-
m("span",
|
|
11140
|
-
m("span",
|
|
11150
|
+
m("span", Fp, j(q.id), 1),
|
|
11151
|
+
m("span", Up, j(q.source_commit_sha.slice(0, 7)), 1)
|
|
11141
11152
|
])
|
|
11142
|
-
], 8,
|
|
11143
|
-
m("div",
|
|
11153
|
+
], 8, Pp),
|
|
11154
|
+
m("div", jp, [
|
|
11144
11155
|
V(Se, {
|
|
11145
11156
|
icon: "open_in_new",
|
|
11146
11157
|
variant: "tertiary",
|
|
11147
11158
|
disabled: !O(Hi)(q),
|
|
11148
|
-
onClick: (et) =>
|
|
11159
|
+
onClick: (et) => ot(q)
|
|
11149
11160
|
}, null, 8, ["disabled", "onClick"]),
|
|
11150
11161
|
V(Se, {
|
|
11151
11162
|
label: "Set live",
|
|
@@ -11158,14 +11169,14 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11158
11169
|
key: 0,
|
|
11159
11170
|
icon: "receipt_long",
|
|
11160
11171
|
variant: "tertiary",
|
|
11161
|
-
onClick: (et) =>
|
|
11172
|
+
onClick: (et) => nt(q)
|
|
11162
11173
|
}, null, 8, ["onClick"])) : se("", !0)
|
|
11163
11174
|
])
|
|
11164
11175
|
], 2))), 128))
|
|
11165
11176
|
]))
|
|
11166
11177
|
]),
|
|
11167
|
-
m("section",
|
|
11168
|
-
m("div",
|
|
11178
|
+
m("section", Hp, [
|
|
11179
|
+
m("div", Gp, [
|
|
11169
11180
|
U[13] || (U[13] = m("div", { class: "min-w-0" }, [
|
|
11170
11181
|
m("h3", { class: "m-0 fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, "Fallback"),
|
|
11171
11182
|
m("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Restore the merchant back to the current v1 miniprogram. ")
|
|
@@ -11176,13 +11187,13 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11176
11187
|
"border-color": "system-warning-300",
|
|
11177
11188
|
"text-color": "typo-warning",
|
|
11178
11189
|
loading: O(r).busy,
|
|
11179
|
-
onClick:
|
|
11190
|
+
onClick: _t
|
|
11180
11191
|
}, null, 8, ["loading"])
|
|
11181
11192
|
])
|
|
11182
11193
|
])
|
|
11183
11194
|
])
|
|
11184
|
-
])) : (x(), I("main",
|
|
11185
|
-
m("header",
|
|
11195
|
+
])) : (x(), I("main", Wp, [
|
|
11196
|
+
m("header", Kp, [
|
|
11186
11197
|
U[14] || (U[14] = m("div", { class: "min-w-0" }, [
|
|
11187
11198
|
m("h2", { class: "m-0 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Sessions"),
|
|
11188
11199
|
m("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Switch between active and archived sessions without exposing internal identifiers. ")
|
|
@@ -11190,53 +11201,53 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11190
11201
|
V(Se, {
|
|
11191
11202
|
label: "New workspace",
|
|
11192
11203
|
icon: "add",
|
|
11193
|
-
disabled: !O(r).isProvisioned ||
|
|
11194
|
-
loading:
|
|
11195
|
-
onClick:
|
|
11204
|
+
disabled: !O(r).isProvisioned || X.value,
|
|
11205
|
+
loading: X.value,
|
|
11206
|
+
onClick: Pe
|
|
11196
11207
|
}, null, 8, ["disabled", "loading"])
|
|
11197
11208
|
]),
|
|
11198
|
-
m("div",
|
|
11199
|
-
(x(!0), I(
|
|
11209
|
+
m("div", qp, [
|
|
11210
|
+
(x(!0), I(Oe, null, De(O(r).sessions, (q) => (x(), I("div", {
|
|
11200
11211
|
key: q.id,
|
|
11201
11212
|
role: "button",
|
|
11202
11213
|
tabindex: "0",
|
|
11203
|
-
class:
|
|
11214
|
+
class: Fe(["flex w-full cursor-pointer items-center justify-between gap-16 rounded-lg border bg-fm-color-neutral-white p-16 text-left transition hover:bg-fm-color-neutral-gray-100", q.status === "active" ? "border-fm-color-system-success-300" : "border-fm-color-neutral-gray-100"]),
|
|
11204
11215
|
onClick: (et) => K(q),
|
|
11205
11216
|
onKeydown: ca((et) => K(q), ["enter"])
|
|
11206
11217
|
}, [
|
|
11207
|
-
m("div",
|
|
11208
|
-
m("div",
|
|
11209
|
-
m("span",
|
|
11210
|
-
q.has_live_release ? (x(), Ae(
|
|
11218
|
+
m("div", Zp, [
|
|
11219
|
+
m("div", Yp, [
|
|
11220
|
+
m("span", Xp, j(vt(q)), 1),
|
|
11221
|
+
q.has_live_release ? (x(), Ae(ft, {
|
|
11211
11222
|
key: 0,
|
|
11212
11223
|
variant: "primary",
|
|
11213
11224
|
size: "sm"
|
|
11214
11225
|
}, {
|
|
11215
|
-
default:
|
|
11226
|
+
default: st(() => [...U[15] || (U[15] = [
|
|
11216
11227
|
je("Live", -1)
|
|
11217
11228
|
])]),
|
|
11218
11229
|
_: 1
|
|
11219
|
-
})) : q.release_count > 0 ? (x(), Ae(
|
|
11230
|
+
})) : q.release_count > 0 ? (x(), Ae(ft, {
|
|
11220
11231
|
key: 1,
|
|
11221
11232
|
variant: "neutral",
|
|
11222
11233
|
size: "sm"
|
|
11223
11234
|
}, {
|
|
11224
|
-
default:
|
|
11235
|
+
default: st(() => [
|
|
11225
11236
|
je(j(q.release_count) + " release" + j(q.release_count > 1 ? "s" : ""), 1)
|
|
11226
11237
|
]),
|
|
11227
11238
|
_: 2
|
|
11228
11239
|
}, 1024)) : se("", !0)
|
|
11229
11240
|
]),
|
|
11230
|
-
m("div",
|
|
11241
|
+
m("div", Jp, [
|
|
11231
11242
|
m("span", null, "Updated " + j(Bt(q.updated_at)), 1)
|
|
11232
11243
|
]),
|
|
11233
|
-
q.status === "needs_attention" && q.attention_error ? (x(), I("div",
|
|
11244
|
+
q.status === "needs_attention" && q.attention_error ? (x(), I("div", Qp, j(q.attention_action) + ": " + j(q.attention_error), 1)) : se("", !0)
|
|
11234
11245
|
]),
|
|
11235
|
-
m("div",
|
|
11236
|
-
V(
|
|
11246
|
+
m("div", eh, [
|
|
11247
|
+
V(ft, {
|
|
11237
11248
|
variant: O(ir)(q.status)
|
|
11238
11249
|
}, {
|
|
11239
|
-
default:
|
|
11250
|
+
default: st(() => [
|
|
11240
11251
|
je(j(O(ar)(q.status)), 1)
|
|
11241
11252
|
]),
|
|
11242
11253
|
_: 2
|
|
@@ -11244,7 +11255,7 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11244
11255
|
V(Se, {
|
|
11245
11256
|
icon: "edit",
|
|
11246
11257
|
variant: "tertiary",
|
|
11247
|
-
onClick: Rn((et) =>
|
|
11258
|
+
onClick: Rn((et) => Ce(q), ["stop"])
|
|
11248
11259
|
}, null, 8, ["onClick"]),
|
|
11249
11260
|
q.status !== "active" ? (x(), Ae(Se, {
|
|
11250
11261
|
key: 0,
|
|
@@ -11259,8 +11270,8 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11259
11270
|
size: "md"
|
|
11260
11271
|
})
|
|
11261
11272
|
])
|
|
11262
|
-
], 42,
|
|
11263
|
-
O(r).sessions.length ? se("", !0) : (x(), I("div",
|
|
11273
|
+
], 42, Vp))), 128)),
|
|
11274
|
+
O(r).sessions.length ? se("", !0) : (x(), I("div", th, [
|
|
11264
11275
|
V(Te, {
|
|
11265
11276
|
name: "history",
|
|
11266
11277
|
size: "xl",
|
|
@@ -11272,14 +11283,14 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11272
11283
|
label: "New session",
|
|
11273
11284
|
icon: "add",
|
|
11274
11285
|
variant: "secondary",
|
|
11275
|
-
disabled: !O(r).isProvisioned ||
|
|
11276
|
-
loading:
|
|
11277
|
-
onClick:
|
|
11286
|
+
disabled: !O(r).isProvisioned || X.value,
|
|
11287
|
+
loading: X.value,
|
|
11288
|
+
onClick: Pe
|
|
11278
11289
|
}, null, 8, ["disabled", "loading"])
|
|
11279
11290
|
]))
|
|
11280
11291
|
])
|
|
11281
|
-
])) : (x(), I("main",
|
|
11282
|
-
m("header",
|
|
11292
|
+
])) : (x(), I("main", Kf, [
|
|
11293
|
+
m("header", qf, [
|
|
11283
11294
|
U[4] || (U[4] = m("div", { class: "min-w-0" }, [
|
|
11284
11295
|
m("h2", { class: "m-0 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Set up v2 project"),
|
|
11285
11296
|
m("p", { class: "m-0 mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Create the merchant app repository and prepare live previews. Live traffic stays on v1 until a release is published. ")
|
|
@@ -11288,36 +11299,36 @@ const Df = ["aria-label", "title"], zf = { class: "flex flex-col gap-[4px]" }, B
|
|
|
11288
11299
|
icon: "source",
|
|
11289
11300
|
label: "Set up project",
|
|
11290
11301
|
loading: O(r).busy,
|
|
11291
|
-
onClick:
|
|
11302
|
+
onClick: J
|
|
11292
11303
|
}, null, 8, ["loading"])
|
|
11293
11304
|
]),
|
|
11294
|
-
m("div",
|
|
11295
|
-
m("section",
|
|
11296
|
-
m("div",
|
|
11297
|
-
m("div",
|
|
11298
|
-
m("p",
|
|
11299
|
-
m("p",
|
|
11305
|
+
m("div", Vf, [
|
|
11306
|
+
m("section", Zf, [
|
|
11307
|
+
m("div", Yf, [
|
|
11308
|
+
m("div", Xf, [
|
|
11309
|
+
m("p", Jf, j(((Ft = O(r).project) == null ? void 0 : Ft.provisioningStatus) === "failed" ? "Setup failed" : "Project is not set up yet"), 1),
|
|
11310
|
+
m("p", Qf, j(((en = O(r).project) == null ? void 0 : en.repoName) ?? "miniprogram repository"), 1)
|
|
11300
11311
|
]),
|
|
11301
|
-
V(
|
|
11312
|
+
V(ft, {
|
|
11302
11313
|
variant: O(r).provisioningFailed ? "error" : "neutral"
|
|
11303
11314
|
}, {
|
|
11304
|
-
default:
|
|
11315
|
+
default: st(() => {
|
|
11305
11316
|
var q;
|
|
11306
11317
|
return [
|
|
11307
|
-
je(j(O(
|
|
11318
|
+
je(j(O(Of)((q = O(r).project) == null ? void 0 : q.provisioningStatus)), 1)
|
|
11308
11319
|
];
|
|
11309
11320
|
}),
|
|
11310
11321
|
_: 1
|
|
11311
11322
|
}, 8, ["variant"])
|
|
11312
11323
|
]),
|
|
11313
|
-
P.value ? (x(), I("p",
|
|
11324
|
+
P.value ? (x(), I("p", ep, j(P.value), 1)) : se("", !0)
|
|
11314
11325
|
])
|
|
11315
11326
|
])
|
|
11316
11327
|
]))
|
|
11317
11328
|
], 2);
|
|
11318
11329
|
};
|
|
11319
11330
|
}
|
|
11320
|
-
}),
|
|
11331
|
+
}), uh = /* @__PURE__ */ Lt(sh, [["__scopeId", "data-v-28b26b82"]]);
|
|
11321
11332
|
export {
|
|
11322
|
-
|
|
11333
|
+
uh as default
|
|
11323
11334
|
};
|