@luzmo/lucero 2.4.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/chat-message/index.cjs +1 -1
- package/components/chat-message/index.js +1 -1
- package/components/chat-message-BDfomRm-.cjs +148 -0
- package/components/{chat-message-T6QIK2Bl.js → chat-message-D6U-sprD.js} +562 -526
- package/components/index.cjs +1 -1
- package/components/index.js +2 -2
- package/components/progress-steps/index.cjs +1 -1
- package/components/progress-steps/index.js +1 -1
- package/components/progress-steps/progress-steps.d.ts +10 -8
- package/components/{progress-steps-ohguJaPa.js → progress-steps-BvCzsq9Z.js} +2 -2
- package/components/progress-steps-CvdQQwHc.cjs +98 -0
- package/custom-elements.json +1 -1
- package/package.json +1 -1
- package/standalone/chat-message.js +27 -27
- package/standalone/progress-steps.js +2 -2
- package/components/chat-message-Dgo6h0rD.cjs +0 -148
- package/components/progress-steps-Y-Tgh_fQ.cjs +0 -98
|
@@ -29,10 +29,10 @@ function d(e, t) {
|
|
|
29
29
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
30
30
|
return r;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function f(e) {
|
|
33
33
|
if (Array.isArray(e)) return e;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function p(e, t) {
|
|
36
36
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
37
37
|
if (n != null) {
|
|
38
38
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -50,113 +50,113 @@ function te(e, t) {
|
|
|
50
50
|
return s;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function ee() {
|
|
54
54
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return
|
|
56
|
+
function te(e, t) {
|
|
57
|
+
return f(e) || p(e, t) || ne(e, t) || ee();
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function ne(e, t) {
|
|
60
60
|
if (e) {
|
|
61
61
|
if (typeof e == "string") return d(e, t);
|
|
62
62
|
var n = {}.toString.call(e).slice(8, -1);
|
|
63
63
|
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? d(e, t) : void 0;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
var
|
|
67
|
-
|
|
66
|
+
var re = Object.entries, m = Object.setPrototypeOf, ie = Object.isFrozen, ae = Object.getPrototypeOf, h = Object.getOwnPropertyDescriptor, g = Object.freeze, _ = Object.seal, oe = Object.create, se = typeof Reflect < "u" && Reflect, ce = se.apply, le = se.construct;
|
|
67
|
+
g ||= function(e) {
|
|
68
68
|
return e;
|
|
69
|
-
},
|
|
69
|
+
}, _ ||= function(e) {
|
|
70
70
|
return e;
|
|
71
|
-
},
|
|
71
|
+
}, ce ||= function(e, t) {
|
|
72
72
|
var n = [...arguments].slice(2);
|
|
73
73
|
return e.apply(t, n);
|
|
74
|
-
},
|
|
74
|
+
}, le ||= function(e) {
|
|
75
75
|
return new e(...[...arguments].slice(1));
|
|
76
76
|
};
|
|
77
|
-
var
|
|
78
|
-
function
|
|
77
|
+
var ue = S(Array.prototype.forEach), de = S(Array.prototype.lastIndexOf), fe = S(Array.prototype.pop), pe = S(Array.prototype.push), me = S(Array.prototype.splice), he = Array.isArray, ge = S(String.prototype.toLowerCase), _e = S(String.prototype.toString), ve = S(String.prototype.match), ye = S(String.prototype.replace), be = S(String.prototype.indexOf), xe = S(String.prototype.trim), Se = S(Number.prototype.toString), v = S(Boolean.prototype.toString), y = typeof BigInt > "u" ? null : S(BigInt.prototype.toString), Ce = typeof Symbol > "u" ? null : S(Symbol.prototype.toString), b = S(Object.prototype.hasOwnProperty), we = S(Object.prototype.toString), x = S(RegExp.prototype.test), Te = Ee(TypeError);
|
|
78
|
+
function S(e) {
|
|
79
79
|
return function(t) {
|
|
80
80
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
81
81
|
var n = [...arguments].slice(1);
|
|
82
|
-
return
|
|
82
|
+
return ce(e, t, n);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Ee(e) {
|
|
86
86
|
return function() {
|
|
87
|
-
return
|
|
87
|
+
return le(e, [...arguments]);
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
92
|
-
if (
|
|
90
|
+
function C(e, t) {
|
|
91
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ge;
|
|
92
|
+
if (m && m(e, null), !he(t)) return e;
|
|
93
93
|
let r = t.length;
|
|
94
94
|
for (; r--;) {
|
|
95
95
|
let i = t[r];
|
|
96
96
|
if (typeof i == "string") {
|
|
97
97
|
let e = n(i);
|
|
98
|
-
e !== i && (
|
|
98
|
+
e !== i && (ie(t) || (t[r] = e), i = e);
|
|
99
99
|
}
|
|
100
100
|
e[i] = !0;
|
|
101
101
|
}
|
|
102
102
|
return e;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
for (let t = 0; t < e.length; t++)
|
|
104
|
+
function De(e) {
|
|
105
|
+
for (let t = 0; t < e.length; t++) b(e, t) || (e[t] = null);
|
|
106
106
|
return e;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
let t =
|
|
110
|
-
for (let r of
|
|
111
|
-
var n =
|
|
108
|
+
function w(e) {
|
|
109
|
+
let t = oe(null);
|
|
110
|
+
for (let r of re(e)) {
|
|
111
|
+
var n = te(r, 2);
|
|
112
112
|
let i = n[0], a = n[1];
|
|
113
|
-
|
|
113
|
+
b(e, i) && (he(a) ? t[i] = De(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = w(a) : t[i] = a);
|
|
114
114
|
}
|
|
115
115
|
return t;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Oe(e) {
|
|
118
118
|
switch (typeof e) {
|
|
119
119
|
case "string": return e;
|
|
120
|
-
case "number": return
|
|
121
|
-
case "boolean": return
|
|
122
|
-
case "bigint": return
|
|
123
|
-
case "symbol": return
|
|
124
|
-
case "undefined": return
|
|
120
|
+
case "number": return Se(e);
|
|
121
|
+
case "boolean": return v(e);
|
|
122
|
+
case "bigint": return y ? y(e) : "0";
|
|
123
|
+
case "symbol": return Ce ? Ce(e) : "Symbol()";
|
|
124
|
+
case "undefined": return we(e);
|
|
125
125
|
case "function":
|
|
126
126
|
case "object": {
|
|
127
|
-
if (e === null) return
|
|
128
|
-
let t = e, n =
|
|
127
|
+
if (e === null) return we(e);
|
|
128
|
+
let t = e, n = T(t, "toString");
|
|
129
129
|
if (typeof n == "function") {
|
|
130
130
|
let e = n(t);
|
|
131
|
-
return typeof e == "string" ? e :
|
|
131
|
+
return typeof e == "string" ? e : we(e);
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return we(e);
|
|
134
134
|
}
|
|
135
|
-
default: return
|
|
135
|
+
default: return we(e);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function T(e, t) {
|
|
139
139
|
for (; e !== null;) {
|
|
140
|
-
let n =
|
|
140
|
+
let n = h(e, t);
|
|
141
141
|
if (n) {
|
|
142
|
-
if (n.get) return
|
|
143
|
-
if (typeof n.value == "function") return
|
|
142
|
+
if (n.get) return S(n.get);
|
|
143
|
+
if (typeof n.value == "function") return S(n.value);
|
|
144
144
|
}
|
|
145
|
-
e =
|
|
145
|
+
e = ae(e);
|
|
146
146
|
}
|
|
147
147
|
function n() {
|
|
148
148
|
return null;
|
|
149
149
|
}
|
|
150
150
|
return n;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function ke(e) {
|
|
153
153
|
try {
|
|
154
|
-
return
|
|
154
|
+
return x(e, ""), !0;
|
|
155
155
|
} catch {
|
|
156
156
|
return !1;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
var
|
|
159
|
+
var Ae = g(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), je = g(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Me = g([
|
|
160
160
|
"feBlend",
|
|
161
161
|
"feColorMatrix",
|
|
162
162
|
"feComponentTransfer",
|
|
@@ -182,7 +182,7 @@ var ke = h(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
182
182
|
"feSpotLight",
|
|
183
183
|
"feTile",
|
|
184
184
|
"feTurbulence"
|
|
185
|
-
]),
|
|
185
|
+
]), Ne = g([
|
|
186
186
|
"animate",
|
|
187
187
|
"color-profile",
|
|
188
188
|
"cursor",
|
|
@@ -205,7 +205,7 @@ var ke = h(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
205
205
|
"solidcolor",
|
|
206
206
|
"unknown",
|
|
207
207
|
"use"
|
|
208
|
-
]),
|
|
208
|
+
]), Pe = g(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Fe = g([
|
|
209
209
|
"maction",
|
|
210
210
|
"maligngroup",
|
|
211
211
|
"malignmark",
|
|
@@ -221,13 +221,13 @@ var ke = h(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
221
221
|
"annotation-xml",
|
|
222
222
|
"mprescripts",
|
|
223
223
|
"none"
|
|
224
|
-
]),
|
|
224
|
+
]), Ie = g(["#text"]), Le = g(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Re = g(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), ze = g(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Be = g([
|
|
225
225
|
"xlink:href",
|
|
226
226
|
"xml:id",
|
|
227
227
|
"xlink:title",
|
|
228
228
|
"xml:space",
|
|
229
229
|
"xmlns:xlink"
|
|
230
|
-
]),
|
|
230
|
+
]), Ve = _(/{{[\w\W]*|^[\w\W]*}}/g), He = _(/<%[\w\W]*|^[\w\W]*%>/g), Ue = _(/\${[\w\W]*/g), We = _(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ge = _(/^aria-[\-\w]+$/), Ke = _(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), qe = _(/^(?:\w+script|data):/i), Je = _(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ye = _(/^html$/i), Xe = _(/^[a-z][.\w]*(-[.\w]+)+$/i), Ze = _(/<[/\w!]/g), Qe = _(/<[/\w]/g), $e = _(/<\/no(script|embed|frames)/i), et = _(/\/>/i), E = {
|
|
231
231
|
element: 1,
|
|
232
232
|
attribute: 2,
|
|
233
233
|
text: 3,
|
|
@@ -240,9 +240,23 @@ var ke = h(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
240
240
|
documentType: 10,
|
|
241
241
|
documentFragment: 11,
|
|
242
242
|
notation: 12
|
|
243
|
-
},
|
|
243
|
+
}, tt = [
|
|
244
|
+
"style",
|
|
245
|
+
"script",
|
|
246
|
+
"xmp",
|
|
247
|
+
"iframe",
|
|
248
|
+
"noembed",
|
|
249
|
+
"noframes",
|
|
250
|
+
"plaintext",
|
|
251
|
+
"noscript"
|
|
252
|
+
], nt = g(C({}, tt)), rt = function() {
|
|
253
|
+
let e = {};
|
|
254
|
+
return ue(tt, (t) => {
|
|
255
|
+
e[t] = _(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
256
|
+
}), g(e);
|
|
257
|
+
}(), it = function() {
|
|
244
258
|
return typeof window > "u" ? null : window;
|
|
245
|
-
},
|
|
259
|
+
}, at = function(e, t) {
|
|
246
260
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
247
261
|
let n = null, r = "data-tt-policy-suffix";
|
|
248
262
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -259,7 +273,7 @@ var ke = h(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
259
273
|
} catch {
|
|
260
274
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
261
275
|
}
|
|
262
|
-
},
|
|
276
|
+
}, ot = function() {
|
|
263
277
|
return {
|
|
264
278
|
afterSanitizeAttributes: [],
|
|
265
279
|
afterSanitizeElements: [],
|
|
@@ -271,53 +285,60 @@ var ke = h(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
271
285
|
uponSanitizeElement: [],
|
|
272
286
|
uponSanitizeShadowNode: []
|
|
273
287
|
};
|
|
274
|
-
},
|
|
275
|
-
return
|
|
288
|
+
}, st = function(e, t, n, r) {
|
|
289
|
+
return b(e, t) && he(e[t]) ? C(r.base ? w(r.base) : {}, e[t], r.transform) : n;
|
|
290
|
+
}, ct = function(e, t, n) {
|
|
291
|
+
let r = b(e, t) ? e[t] : void 0;
|
|
292
|
+
return r && typeof r == "object" ? w(r) : n();
|
|
276
293
|
};
|
|
277
|
-
function
|
|
278
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
279
|
-
if (t.version = "3.4.
|
|
294
|
+
function lt() {
|
|
295
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : it(), t = (e) => lt(e);
|
|
296
|
+
if (t.version = "3.4.15", t.removed = [], !e || !e.document || e.document.nodeType !== E.document || !e.Element) return t.isSupported = !1, t;
|
|
280
297
|
let n = e.document, r = n, i = r.currentScript;
|
|
281
298
|
e.DocumentFragment;
|
|
282
299
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
283
300
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
284
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype,
|
|
301
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = T(d, "cloneNode"), p = T(d, "remove"), ee = T(d, "removeAttributeNode"), te = T(d, "nextSibling"), ne = T(d, "childNodes"), m = T(d, "parentNode"), ie = T(d, "shadowRoot"), ae = T(d, "attributes"), h = o && o.prototype ? T(o.prototype, "nodeType") : null, se = o && o.prototype ? T(o.prototype, "nodeName") : null, ce = o && o.prototype ? T(o.prototype, "ownerDocument") : null, le = function(e) {
|
|
302
|
+
return h ? h(e) : e.nodeType;
|
|
303
|
+
}, Se = function(e) {
|
|
304
|
+
return se ? se(e) : e.nodeName;
|
|
305
|
+
};
|
|
285
306
|
if (typeof a == "function") {
|
|
286
307
|
let e = n.createElement("template");
|
|
287
308
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
288
309
|
}
|
|
289
|
-
let
|
|
290
|
-
if (
|
|
291
|
-
},
|
|
292
|
-
|
|
310
|
+
let v, y = "", Ce, we = !1, S = 0, Ee = function() {
|
|
311
|
+
if (S > 0) throw Te("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
|
|
312
|
+
}, De = function(e) {
|
|
313
|
+
Ee(), S++;
|
|
293
314
|
try {
|
|
294
|
-
return
|
|
315
|
+
return v.createHTML(e);
|
|
295
316
|
} finally {
|
|
296
|
-
|
|
317
|
+
S--;
|
|
297
318
|
}
|
|
298
|
-
},
|
|
299
|
-
|
|
319
|
+
}, tt = function(e) {
|
|
320
|
+
Ee(), S++;
|
|
300
321
|
try {
|
|
301
|
-
return
|
|
322
|
+
return v.createScriptURL(e);
|
|
302
323
|
} finally {
|
|
303
|
-
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
return
|
|
307
|
-
},
|
|
308
|
-
t.isSupported = typeof
|
|
309
|
-
let
|
|
310
|
-
...ke,
|
|
324
|
+
S--;
|
|
325
|
+
}
|
|
326
|
+
}, ut = function() {
|
|
327
|
+
return we ||= (Ce = at(u, i), !0), Ce;
|
|
328
|
+
}, dt = n, D = dt.implementation, ft = dt.createNodeIterator, pt = dt.createDocumentFragment, mt = dt.getElementsByTagName, O = r.importNode, k = ot();
|
|
329
|
+
t.isSupported = typeof re == "function" && typeof m == "function" && D && D.createHTMLDocument !== void 0;
|
|
330
|
+
let A = Ve, ht = He, gt = Ue, _t = We, vt = Ge, yt = qe, bt = Je, xt = Xe, St = Ke, j = null, Ct = C({}, [
|
|
311
331
|
...Ae,
|
|
312
332
|
...je,
|
|
313
|
-
...
|
|
314
|
-
...
|
|
315
|
-
|
|
316
|
-
|
|
333
|
+
...Me,
|
|
334
|
+
...Pe,
|
|
335
|
+
...Ie
|
|
336
|
+
]), M = null, wt = C({}, [
|
|
317
337
|
...Le,
|
|
318
338
|
...Re,
|
|
319
|
-
...ze
|
|
320
|
-
|
|
339
|
+
...ze,
|
|
340
|
+
...Be
|
|
341
|
+
]), N = Object.seal(oe(null, {
|
|
321
342
|
tagNameCheck: {
|
|
322
343
|
writable: !0,
|
|
323
344
|
configurable: !1,
|
|
@@ -336,7 +357,7 @@ function rt() {
|
|
|
336
357
|
enumerable: !0,
|
|
337
358
|
value: !1
|
|
338
359
|
}
|
|
339
|
-
})),
|
|
360
|
+
})), Tt = null, Et = null, P = Object.seal(oe(null, {
|
|
340
361
|
tagCheck: {
|
|
341
362
|
writable: !0,
|
|
342
363
|
configurable: !1,
|
|
@@ -349,14 +370,14 @@ function rt() {
|
|
|
349
370
|
enumerable: !0,
|
|
350
371
|
value: null
|
|
351
372
|
}
|
|
352
|
-
})),
|
|
373
|
+
})), Dt = !0, Ot = !0, kt = !1, At = !0, F = !1, I = !0, L = !1, jt = !1, Mt = null, Nt = null, Pt = !1, Ft = !1, R = !1, z = !1, It = !0, Lt = !1, Rt = "user-content-", zt = !0, Bt = !1, Vt = {}, Ht = null, Ut = C({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Wt = null, Gt = C({}, [
|
|
353
374
|
"audio",
|
|
354
375
|
"video",
|
|
355
376
|
"img",
|
|
356
377
|
"source",
|
|
357
378
|
"image",
|
|
358
379
|
"track"
|
|
359
|
-
]),
|
|
380
|
+
]), Kt = null, qt = C({}, [
|
|
360
381
|
"alt",
|
|
361
382
|
"class",
|
|
362
383
|
"for",
|
|
@@ -371,249 +392,262 @@ function rt() {
|
|
|
371
392
|
"value",
|
|
372
393
|
"style",
|
|
373
394
|
"xmlns"
|
|
374
|
-
]),
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
],
|
|
395
|
+
]), Jt = "http://www.w3.org/1998/Math/MathML", Yt = "http://www.w3.org/2000/svg", B = "http://www.w3.org/1999/xhtml", Xt = B, Zt = !1, Qt = null, $t = C({}, [
|
|
396
|
+
Jt,
|
|
397
|
+
Yt,
|
|
398
|
+
B
|
|
399
|
+
], _e), en = g([
|
|
379
400
|
"mi",
|
|
380
401
|
"mo",
|
|
381
402
|
"mn",
|
|
382
403
|
"ms",
|
|
383
404
|
"mtext"
|
|
384
|
-
]),
|
|
405
|
+
]), tn = C({}, en), nn = g(["annotation-xml"]), rn = C({}, nn), an = C({}, [
|
|
385
406
|
"title",
|
|
386
407
|
"style",
|
|
387
408
|
"font",
|
|
388
409
|
"a",
|
|
389
410
|
"script"
|
|
390
|
-
]),
|
|
411
|
+
]), on = null, sn = ["application/xhtml+xml", "text/html"], V = null, H = null, cn = n.createElement("form"), ln = function(e) {
|
|
391
412
|
return e instanceof RegExp || e instanceof Function;
|
|
392
|
-
},
|
|
413
|
+
}, un = function() {
|
|
393
414
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
394
|
-
if (
|
|
395
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
396
|
-
transform:
|
|
397
|
-
base:
|
|
398
|
-
}),
|
|
399
|
-
transform:
|
|
400
|
-
base:
|
|
401
|
-
}),
|
|
402
|
-
let t =
|
|
403
|
-
if (
|
|
415
|
+
if (H && H === e) return;
|
|
416
|
+
(!e || typeof e != "object") && (e = {}), e = w(e), on = sn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, V = on === "application/xhtml+xml" ? _e : ge, j = st(e, "ALLOWED_TAGS", Ct, { transform: V }), M = st(e, "ALLOWED_ATTR", wt, { transform: V }), Qt = st(e, "ALLOWED_NAMESPACES", $t, { transform: _e }), Kt = st(e, "ADD_URI_SAFE_ATTR", qt, {
|
|
417
|
+
transform: V,
|
|
418
|
+
base: qt
|
|
419
|
+
}), Wt = st(e, "ADD_DATA_URI_TAGS", Gt, {
|
|
420
|
+
transform: V,
|
|
421
|
+
base: Gt
|
|
422
|
+
}), Ht = st(e, "FORBID_CONTENTS", Ut, { transform: V }), Tt = st(e, "FORBID_TAGS", w({}), { transform: V }), Et = st(e, "FORBID_ATTR", w({}), { transform: V }), Vt = b(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? w(e.USE_PROFILES) : e.USE_PROFILES : !1, Dt = e.ALLOW_ARIA_ATTR !== !1, Ot = e.ALLOW_DATA_ATTR !== !1, kt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, At = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, F = e.SAFE_FOR_TEMPLATES || !1, I = e.SAFE_FOR_XML !== !1, L = e.WHOLE_DOCUMENT || !1, Ft = e.RETURN_DOM || !1, R = e.RETURN_DOM_FRAGMENT || !1, z = e.RETURN_TRUSTED_TYPE || !1, Pt = e.FORCE_BODY || !1, It = e.SANITIZE_DOM !== !1, Lt = e.SANITIZE_NAMED_PROPS || !1, zt = e.KEEP_CONTENT !== !1, Bt = e.IN_PLACE || !1, St = ke(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ke, Xt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : B, tn = ct(e, "MATHML_TEXT_INTEGRATION_POINTS", () => C({}, en)), rn = ct(e, "HTML_INTEGRATION_POINTS", () => C({}, nn));
|
|
423
|
+
let t = ct(e, "CUSTOM_ELEMENT_HANDLING", () => oe(null));
|
|
424
|
+
if (N = oe(null), b(t, "tagNameCheck") && ln(t.tagNameCheck) && (N.tagNameCheck = t.tagNameCheck), b(t, "attributeNameCheck") && ln(t.attributeNameCheck) && (N.attributeNameCheck = t.attributeNameCheck), b(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), _(N), F && (Ot = !1), R && (Ft = !0), Vt && (j = C({}, Ie), M = oe(null), Vt.html === !0 && (C(j, Ae), C(M, Le)), Vt.svg === !0 && (C(j, je), C(M, Re), C(M, Be)), Vt.svgFilters === !0 && (C(j, Me), C(M, Re), C(M, Be)), Vt.mathMl === !0 && (C(j, Pe), C(M, ze), C(M, Be))), P.tagCheck = null, P.attributeCheck = null, b(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? P.tagCheck = e.ADD_TAGS : he(e.ADD_TAGS) && (j === Ct && (j = w(j)), C(j, e.ADD_TAGS, V))), b(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? P.attributeCheck = e.ADD_ATTR : he(e.ADD_ATTR) && (M === wt && (M = w(M)), C(M, e.ADD_ATTR, V))), b(e, "ADD_FORBID_CONTENTS") && he(e.ADD_FORBID_CONTENTS) && (Ht === Ut && (Ht = w(Ht)), C(Ht, e.ADD_FORBID_CONTENTS, V)), zt && (j["#text"] = !0), L && C(j, [
|
|
404
425
|
"html",
|
|
405
426
|
"head",
|
|
406
427
|
"body"
|
|
407
|
-
]),
|
|
408
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
409
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
410
|
-
let t =
|
|
411
|
-
|
|
428
|
+
]), j.table && (C(j, ["tbody"]), delete Tt.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
429
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Te("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
430
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Te("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
431
|
+
let t = v;
|
|
432
|
+
v = e.TRUSTED_TYPES_POLICY;
|
|
412
433
|
try {
|
|
413
|
-
|
|
434
|
+
y = De("");
|
|
414
435
|
} catch (e) {
|
|
415
|
-
throw
|
|
436
|
+
throw v = t, e;
|
|
416
437
|
}
|
|
417
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
...Ae,
|
|
438
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (v = void 0, y = "") : (v === void 0 && (v = ut()), v && typeof y == "string" && (y = De("")));
|
|
439
|
+
g && g(e), H = e;
|
|
440
|
+
}, dn = C({}, [
|
|
421
441
|
...je,
|
|
422
|
-
...Me
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
442
|
+
...Me,
|
|
443
|
+
...Ne
|
|
444
|
+
]), fn = C({}, [...Pe, ...Fe]), U = function(e, t, n) {
|
|
445
|
+
return t.namespaceURI === B ? e === "svg" : t.namespaceURI === Jt ? e === "svg" && (n === "annotation-xml" || tn[n]) : !!dn[e];
|
|
446
|
+
}, pn = function(e, t, n) {
|
|
447
|
+
return t.namespaceURI === B ? e === "math" : t.namespaceURI === Yt ? e === "math" && rn[n] : !!fn[e];
|
|
448
|
+
}, mn = function(e, t, n) {
|
|
449
|
+
return t.namespaceURI === Yt && !rn[n] || t.namespaceURI === Jt && !tn[n] ? !1 : !fn[e] && (an[e] || !dn[e]);
|
|
450
|
+
}, W = function(e) {
|
|
451
|
+
let t = m(e);
|
|
431
452
|
(!t || !t.tagName) && (t = {
|
|
432
|
-
namespaceURI:
|
|
453
|
+
namespaceURI: Xt,
|
|
433
454
|
tagName: "template"
|
|
434
455
|
});
|
|
435
|
-
let n =
|
|
436
|
-
return
|
|
437
|
-
},
|
|
438
|
-
|
|
456
|
+
let n = ge(e.tagName), r = ge(t.tagName);
|
|
457
|
+
return Qt[e.namespaceURI] ? e.namespaceURI === Yt ? U(n, t, r) : e.namespaceURI === Jt ? pn(n, t, r) : e.namespaceURI === B ? mn(n, t, r) : !!(on === "application/xhtml+xml" && Qt[e.namespaceURI]) : !1;
|
|
458
|
+
}, G = function(e) {
|
|
459
|
+
pe(t.removed, { element: e });
|
|
460
|
+
try {
|
|
461
|
+
m(e).removeChild(e);
|
|
462
|
+
} catch {
|
|
463
|
+
if (p(e), !m(e)) throw Te("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
464
|
+
}
|
|
465
|
+
}, hn = function(e, t, n) {
|
|
439
466
|
try {
|
|
440
|
-
|
|
467
|
+
ee(e, t);
|
|
441
468
|
} catch {
|
|
442
|
-
|
|
469
|
+
try {
|
|
470
|
+
e.removeAttribute(n);
|
|
471
|
+
} catch {}
|
|
443
472
|
}
|
|
444
|
-
},
|
|
445
|
-
|
|
446
|
-
let t =
|
|
473
|
+
}, gn = function(e) {
|
|
474
|
+
vn(e);
|
|
475
|
+
let t = ne(e);
|
|
447
476
|
if (t) {
|
|
448
477
|
let e = [];
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}),
|
|
478
|
+
ue(t, (t) => {
|
|
479
|
+
pe(e, t);
|
|
480
|
+
}), ue(e, (e) => {
|
|
452
481
|
try {
|
|
453
|
-
|
|
482
|
+
p(e);
|
|
454
483
|
} catch {}
|
|
455
484
|
});
|
|
456
485
|
}
|
|
457
|
-
let n =
|
|
486
|
+
let n = ae(e);
|
|
458
487
|
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
459
488
|
let r = n[t], i = r && r.name;
|
|
460
|
-
|
|
461
|
-
e.removeAttribute(i);
|
|
462
|
-
} catch {}
|
|
489
|
+
typeof i == "string" && hn(e, r, i);
|
|
463
490
|
}
|
|
464
|
-
},
|
|
491
|
+
}, K = function(e, n, r) {
|
|
492
|
+
if (!r) try {
|
|
493
|
+
r = n.getAttributeNode(e);
|
|
494
|
+
} catch {
|
|
495
|
+
r = null;
|
|
496
|
+
}
|
|
497
|
+
pe(t.removed, {
|
|
498
|
+
attribute: r || null,
|
|
499
|
+
from: n
|
|
500
|
+
});
|
|
465
501
|
try {
|
|
466
|
-
|
|
467
|
-
attribute: n.getAttributeNode(e),
|
|
468
|
-
from: n
|
|
469
|
-
});
|
|
502
|
+
r ? ee(n, r) : n.removeAttribute(e);
|
|
470
503
|
} catch {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
});
|
|
504
|
+
try {
|
|
505
|
+
n.removeAttribute(e);
|
|
506
|
+
} catch {}
|
|
475
507
|
}
|
|
476
|
-
if (
|
|
477
|
-
|
|
508
|
+
if (e === "is") if (Ft || R) try {
|
|
509
|
+
G(n);
|
|
478
510
|
} catch {}
|
|
479
511
|
else try {
|
|
480
512
|
n.setAttribute(e, "");
|
|
481
513
|
} catch {}
|
|
482
|
-
},
|
|
483
|
-
let t =
|
|
514
|
+
}, _n = function(e) {
|
|
515
|
+
let t = ae(e);
|
|
484
516
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
485
517
|
let r = t[n], i = r && r.name;
|
|
486
|
-
|
|
487
|
-
e.removeAttribute(i);
|
|
488
|
-
} catch {}
|
|
518
|
+
typeof i != "string" || M[V(i)] || hn(e, r, i);
|
|
489
519
|
}
|
|
490
|
-
},
|
|
520
|
+
}, vn = function(e) {
|
|
491
521
|
let t = [e];
|
|
492
522
|
for (; t.length > 0;) {
|
|
493
523
|
let e = t.pop();
|
|
494
|
-
(
|
|
495
|
-
let n =
|
|
524
|
+
le(e) === E.element && _n(e);
|
|
525
|
+
let n = ne(e);
|
|
496
526
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
497
527
|
}
|
|
498
|
-
},
|
|
499
|
-
|
|
528
|
+
}, q = function(e, t) {
|
|
529
|
+
return I ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
|
|
530
|
+
}, yn = function(e) {
|
|
531
|
+
if (!I) return;
|
|
500
532
|
let t = [e];
|
|
501
533
|
for (; t.length > 0;) {
|
|
502
|
-
let e = t.pop(), n =
|
|
503
|
-
if (n ===
|
|
534
|
+
let e = t.pop(), n = le(e);
|
|
535
|
+
if (n === E.processingInstruction || n === E.comment && x(Qe, e.data)) {
|
|
504
536
|
try {
|
|
505
|
-
|
|
537
|
+
p(e);
|
|
506
538
|
} catch {}
|
|
507
539
|
continue;
|
|
508
540
|
}
|
|
509
|
-
if (n ===
|
|
510
|
-
let t = e, n =
|
|
541
|
+
if (n === E.element) {
|
|
542
|
+
let t = e, n = V(Se(e));
|
|
511
543
|
try {
|
|
512
|
-
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") &&
|
|
544
|
+
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && q("for", n) && t.removeAttribute("for");
|
|
513
545
|
} catch {}
|
|
514
546
|
}
|
|
515
|
-
let r =
|
|
547
|
+
let r = ne(e);
|
|
516
548
|
if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
|
|
517
549
|
}
|
|
518
|
-
},
|
|
550
|
+
}, bn = function(e) {
|
|
519
551
|
let t = null, r = null;
|
|
520
|
-
if (
|
|
552
|
+
if (Pt) e = "<remove></remove>" + e;
|
|
521
553
|
else {
|
|
522
|
-
let t =
|
|
554
|
+
let t = ve(e, /^[\r\n\t ]+/);
|
|
523
555
|
r = t && t[0];
|
|
524
556
|
}
|
|
525
|
-
|
|
526
|
-
let i =
|
|
527
|
-
if (
|
|
528
|
-
t = new l().parseFromString(i,
|
|
557
|
+
on === "application/xhtml+xml" && Xt === B && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
558
|
+
let i = v ? De(e) : e;
|
|
559
|
+
if (Xt === B) try {
|
|
560
|
+
t = new l().parseFromString(i, on);
|
|
529
561
|
} catch {}
|
|
530
562
|
if (!t || !t.documentElement) {
|
|
531
|
-
t =
|
|
563
|
+
t = D.createDocument(Xt, "template", null);
|
|
532
564
|
try {
|
|
533
|
-
t.documentElement.innerHTML =
|
|
565
|
+
t.documentElement.innerHTML = Zt ? y : i;
|
|
534
566
|
} catch {}
|
|
535
567
|
}
|
|
536
568
|
let a = t.body || t.documentElement;
|
|
537
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
538
|
-
}, fn = function(e) {
|
|
539
|
-
return it.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
540
|
-
}, pn = function(e) {
|
|
541
|
-
return e = _e(e, st, " "), e = _e(e, j, " "), e = _e(e, ct, " "), e;
|
|
569
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Xt === B ? mt.call(t, L ? "html" : "body")[0] : L ? t.documentElement : a;
|
|
542
570
|
}, J = function(e) {
|
|
571
|
+
let t = ce ? ce(e) : e.ownerDocument;
|
|
572
|
+
return ft.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
573
|
+
}, Y = function(e) {
|
|
574
|
+
return e = ye(e, A, " "), e = ye(e, ht, " "), e = ye(e, gt, " "), e;
|
|
575
|
+
}, X = function(e) {
|
|
543
576
|
e.normalize();
|
|
544
|
-
let t =
|
|
545
|
-
for (;
|
|
546
|
-
let
|
|
547
|
-
|
|
548
|
-
|
|
577
|
+
let t = ce ? ce(e) : e.ownerDocument, n = ft.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
578
|
+
for (; r;) r.data = Y(r.data), r = n.nextNode();
|
|
579
|
+
let i = e.querySelectorAll?.call(e, "template");
|
|
580
|
+
i && ue(i, (e) => {
|
|
581
|
+
xn(e.content) && X(e.content);
|
|
549
582
|
});
|
|
550
|
-
},
|
|
551
|
-
let t =
|
|
552
|
-
return typeof t != "string" ||
|
|
553
|
-
},
|
|
554
|
-
if (!
|
|
583
|
+
}, Z = function(e) {
|
|
584
|
+
let t = se ? se(e) : null;
|
|
585
|
+
return typeof t != "string" || V(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ae(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== h(e) || e.childNodes !== ne(e);
|
|
586
|
+
}, xn = function(e) {
|
|
587
|
+
if (!h || typeof e != "object" || !e) return !1;
|
|
555
588
|
try {
|
|
556
|
-
return
|
|
589
|
+
return h(e) === E.documentFragment;
|
|
557
590
|
} catch {
|
|
558
591
|
return !1;
|
|
559
592
|
}
|
|
560
|
-
},
|
|
561
|
-
if (!
|
|
593
|
+
}, Q = function(e) {
|
|
594
|
+
if (!h || typeof e != "object" || !e) return !1;
|
|
562
595
|
try {
|
|
563
|
-
return typeof
|
|
596
|
+
return typeof h(e) == "number";
|
|
564
597
|
} catch {
|
|
565
598
|
return !1;
|
|
566
599
|
}
|
|
567
600
|
};
|
|
568
|
-
function
|
|
569
|
-
e.length !== 0 &&
|
|
570
|
-
e.call(t, n, r,
|
|
601
|
+
function $(e, n, r) {
|
|
602
|
+
e.length !== 0 && ue(e, (e) => {
|
|
603
|
+
e.call(t, n, r, H);
|
|
571
604
|
});
|
|
572
605
|
}
|
|
573
|
-
let
|
|
574
|
-
return !!(
|
|
575
|
-
},
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
606
|
+
let Sn = function(e, t) {
|
|
607
|
+
return !!(I && e.hasChildNodes() && !Q(e.firstElementChild) && x(Ze, e.textContent) && x(Ze, e.innerHTML) || I && e.namespaceURI === B && nt[t] && (Q(e.firstElementChild) || typeof e.textContent == "string" && x(rt[t], e.textContent)) || e.nodeType === E.processingInstruction || I && e.nodeType === E.comment && x(Qe, e.data));
|
|
608
|
+
}, Cn = function(e, t) {
|
|
609
|
+
return e instanceof RegExp ? x(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
|
|
610
|
+
}, wn = function(e, t, n) {
|
|
611
|
+
if (!Tt[t] && An(t) && Cn(N.tagNameCheck, t)) return !1;
|
|
612
|
+
if (zt && !Ht[t]) {
|
|
613
|
+
let t = m(e), r = ne(e);
|
|
614
|
+
if (r && t) {
|
|
615
|
+
let i = r.length;
|
|
616
|
+
for (let a = i - 1; a >= 0; --a) {
|
|
617
|
+
let i = e === n ? f(r[a], !0) : r[a];
|
|
618
|
+
t.insertBefore(i, te(e));
|
|
584
619
|
}
|
|
585
620
|
}
|
|
586
621
|
}
|
|
587
|
-
return
|
|
588
|
-
},
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
622
|
+
return G(e), !0;
|
|
623
|
+
}, Tn = function(e, t, n, r) {
|
|
624
|
+
return e.length === 0 ? t : t === n || t === r ? w(t) : t;
|
|
625
|
+
}, En = function(e, t) {
|
|
626
|
+
return e === t || m(e) !== null ? !1 : (Bt && vn(e), !0);
|
|
627
|
+
}, Dn = function(e, n) {
|
|
628
|
+
if ($(k.beforeSanitizeElements, e, null), En(e, n)) return !0;
|
|
629
|
+
if (Z(e)) return G(e), !0;
|
|
630
|
+
let r = V(Se(e));
|
|
631
|
+
if (j = Tn(k.uponSanitizeElement, j, Ct, Mt), $(k.uponSanitizeElement, e, {
|
|
593
632
|
tagName: r,
|
|
594
|
-
allowedTags:
|
|
595
|
-
}), e
|
|
596
|
-
if (
|
|
597
|
-
if (
|
|
598
|
-
let t =
|
|
599
|
-
return t === !1 &&
|
|
600
|
-
}
|
|
601
|
-
if ((
|
|
602
|
-
if (
|
|
603
|
-
let n =
|
|
604
|
-
e.textContent !== n && (
|
|
605
|
-
}
|
|
606
|
-
return
|
|
607
|
-
},
|
|
608
|
-
if (
|
|
609
|
-
let i =
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
if (!(vn(e) && (F.tagNameCheck instanceof RegExp && S(F.tagNameCheck, e) || F.tagNameCheck instanceof Function && F.tagNameCheck(e)) && (F.attributeNameCheck instanceof RegExp && S(F.attributeNameCheck, t) || F.attributeNameCheck instanceof Function && F.attributeNameCheck(t, e)) || t === "is" && F.allowCustomizedBuiltInElements && (F.tagNameCheck instanceof RegExp && S(F.tagNameCheck, r) || F.tagNameCheck instanceof Function && F.tagNameCheck(r)))) return !1;
|
|
613
|
-
} else if (!It[t] && !S(pt, _e(r, dt, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ve(r, "data:") === 0 && Pt[e]) && !(bt && !S(ut, _e(r, dt, ""))) && r) return !1;
|
|
614
|
-
}
|
|
615
|
-
return !0;
|
|
616
|
-
}, _n = w({}, [
|
|
633
|
+
allowedTags: j
|
|
634
|
+
}), En(e, n)) return !0;
|
|
635
|
+
if (Sn(e, r)) return G(e), !0;
|
|
636
|
+
if (Tt[r] || !(P.tagCheck instanceof Function && P.tagCheck(r)) && !j[r]) {
|
|
637
|
+
let t = wn(e, r, n);
|
|
638
|
+
return t === !1 && $(k.afterSanitizeElements, e, null), t;
|
|
639
|
+
}
|
|
640
|
+
if (le(e) === E.element && !W(e) || (r === "noscript" || r === "noembed" || r === "noframes") && x($e, e.innerHTML)) return G(e), !0;
|
|
641
|
+
if (F && e.nodeType === E.text) {
|
|
642
|
+
let n = Y(e.textContent);
|
|
643
|
+
e.textContent !== n && (pe(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
644
|
+
}
|
|
645
|
+
return $(k.afterSanitizeElements, e, null), !1;
|
|
646
|
+
}, On = function(e, t, r) {
|
|
647
|
+
if (Et[t] || q(t, e) || It && (t === "id" || t === "name") && (r in n || r in cn)) return !1;
|
|
648
|
+
let i = M[t] || P.attributeCheck instanceof Function && P.attributeCheck(t, e);
|
|
649
|
+
return Ot && x(_t, t) || Dt && x(vt, t) ? !0 : i ? Kt[t] || x(St, ye(r, bt, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && be(r, "data:") === 0 && Wt[e] || kt && !x(yt, ye(r, bt, "")) ? !0 : !r : An(e) && Cn(N.tagNameCheck, e) && Cn(N.attributeNameCheck, t, e) || t === "is" && N.allowCustomizedBuiltInElements && Cn(N.tagNameCheck, r);
|
|
650
|
+
}, kn = C({}, [
|
|
617
651
|
"annotation-xml",
|
|
618
652
|
"color-profile",
|
|
619
653
|
"font-face",
|
|
@@ -622,66 +656,67 @@ function rt() {
|
|
|
622
656
|
"font-face-src",
|
|
623
657
|
"font-face-uri",
|
|
624
658
|
"missing-glyph"
|
|
625
|
-
]),
|
|
626
|
-
return !
|
|
627
|
-
},
|
|
628
|
-
if (
|
|
629
|
-
case "TrustedHTML": return
|
|
630
|
-
case "TrustedScriptURL": return
|
|
659
|
+
]), An = function(e) {
|
|
660
|
+
return !kn[ge(e)] && x(xt, e);
|
|
661
|
+
}, jn = function(e, t, n, r) {
|
|
662
|
+
if (v && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
663
|
+
case "TrustedHTML": return De(r);
|
|
664
|
+
case "TrustedScriptURL": return tt(r);
|
|
631
665
|
}
|
|
632
666
|
return r;
|
|
633
|
-
},
|
|
667
|
+
}, Mn = function(e, t, n, r) {
|
|
634
668
|
try {
|
|
635
|
-
|
|
669
|
+
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Z(e) ? (G(e), !1) : !0;
|
|
636
670
|
} catch {
|
|
637
|
-
|
|
671
|
+
return K(t, e), !1;
|
|
638
672
|
}
|
|
639
|
-
},
|
|
640
|
-
|
|
641
|
-
let
|
|
642
|
-
if (!
|
|
643
|
-
|
|
673
|
+
}, Nn = function(e) {
|
|
674
|
+
$(k.beforeSanitizeAttributes, e, null);
|
|
675
|
+
let n = e.attributes;
|
|
676
|
+
if (!n || Z(e)) return;
|
|
677
|
+
M = Tn(k.uponSanitizeAttribute, M, wt, Nt);
|
|
678
|
+
let r = {
|
|
644
679
|
attrName: "",
|
|
645
680
|
attrValue: "",
|
|
646
681
|
keepAttr: !0,
|
|
647
|
-
allowedAttributes:
|
|
682
|
+
allowedAttributes: M,
|
|
648
683
|
forceKeepAttr: void 0
|
|
649
|
-
},
|
|
650
|
-
for (;
|
|
651
|
-
let
|
|
652
|
-
if (
|
|
653
|
-
|
|
684
|
+
}, i = n.length, a = V(e.nodeName);
|
|
685
|
+
for (; i--;) {
|
|
686
|
+
let o = n[i], s = o.name, c = o.namespaceURI, l = o.value, u = V(s), d = l, f = s === "value" ? d : xe(d), p = !1;
|
|
687
|
+
if (r.attrName = u, r.attrValue = f, r.keepAttr = !0, r.forceKeepAttr = void 0, $(k.uponSanitizeAttribute, e, r), f = r.attrValue, Lt && (u === "id" || u === "name") && be(f, Rt) !== 0 && (K(s, e, o), f = Rt + f, p = !0), I && x(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
|
|
688
|
+
K(s, e, o);
|
|
654
689
|
continue;
|
|
655
690
|
}
|
|
656
|
-
if (
|
|
657
|
-
|
|
691
|
+
if (u === "attributename" && ve(f, "href")) {
|
|
692
|
+
K(s, e, o);
|
|
658
693
|
continue;
|
|
659
694
|
}
|
|
660
|
-
if (!
|
|
661
|
-
if (!
|
|
662
|
-
|
|
695
|
+
if (!r.forceKeepAttr) {
|
|
696
|
+
if (!r.keepAttr) {
|
|
697
|
+
K(s, e, o);
|
|
663
698
|
continue;
|
|
664
699
|
}
|
|
665
|
-
if (!
|
|
666
|
-
|
|
700
|
+
if (!At && x(et, f)) {
|
|
701
|
+
K(s, e, o);
|
|
667
702
|
continue;
|
|
668
703
|
}
|
|
669
|
-
if (
|
|
670
|
-
|
|
704
|
+
if (F && (f = Y(f)), !On(a, u, f)) {
|
|
705
|
+
K(s, e, o);
|
|
671
706
|
continue;
|
|
672
707
|
}
|
|
673
|
-
|
|
708
|
+
f = jn(a, u, c, f), f !== d && Mn(e, s, c, f) && p && fe(t.removed);
|
|
674
709
|
}
|
|
675
710
|
}
|
|
676
|
-
|
|
677
|
-
},
|
|
678
|
-
let t = null, n =
|
|
679
|
-
for (
|
|
680
|
-
let e =
|
|
681
|
-
|
|
711
|
+
$(k.afterSanitizeAttributes, e, null);
|
|
712
|
+
}, Pn = function(e) {
|
|
713
|
+
let t = null, n = J(e);
|
|
714
|
+
for ($(k.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(k.uponSanitizeShadowNode, t, null), Dn(t, e), Nn(t), xn(t.content) && Pn(t.content), le(t) === E.element) {
|
|
715
|
+
let e = ie(t);
|
|
716
|
+
xn(e) && (Fn(e), Pn(e));
|
|
682
717
|
}
|
|
683
|
-
|
|
684
|
-
},
|
|
718
|
+
$(k.afterSanitizeShadowDOM, e, null);
|
|
719
|
+
}, Fn = function(e) {
|
|
685
720
|
let t = [{
|
|
686
721
|
node: e,
|
|
687
722
|
shadow: null
|
|
@@ -689,27 +724,27 @@ function rt() {
|
|
|
689
724
|
for (; t.length > 0;) {
|
|
690
725
|
let e = t.pop();
|
|
691
726
|
if (e.shadow) {
|
|
692
|
-
|
|
727
|
+
Pn(e.shadow);
|
|
693
728
|
continue;
|
|
694
729
|
}
|
|
695
|
-
let n = e.node, r = (
|
|
730
|
+
let n = e.node, r = le(n) === E.element, i = ne(n);
|
|
696
731
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
697
732
|
node: i[e],
|
|
698
733
|
shadow: null
|
|
699
734
|
});
|
|
700
735
|
if (r) {
|
|
701
|
-
let e =
|
|
702
|
-
if (typeof e == "string" &&
|
|
736
|
+
let e = se ? se(n) : null;
|
|
737
|
+
if (typeof e == "string" && V(e) === "template") {
|
|
703
738
|
let e = n.content;
|
|
704
|
-
|
|
739
|
+
xn(e) && t.push({
|
|
705
740
|
node: e,
|
|
706
741
|
shadow: null
|
|
707
742
|
});
|
|
708
743
|
}
|
|
709
744
|
}
|
|
710
745
|
if (r) {
|
|
711
|
-
let e =
|
|
712
|
-
|
|
746
|
+
let e = ie(n);
|
|
747
|
+
xn(e) && t.push({
|
|
713
748
|
node: null,
|
|
714
749
|
shadow: e
|
|
715
750
|
}, {
|
|
@@ -721,76 +756,77 @@ function rt() {
|
|
|
721
756
|
};
|
|
722
757
|
return t.sanitize = function(e) {
|
|
723
758
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
724
|
-
if (
|
|
759
|
+
if (Zt = !e, Zt && (e = "<!-->"), typeof e != "string" && !Q(e) && (e = Oe(e), typeof e != "string")) throw Te("dirty is not a string, aborting");
|
|
725
760
|
if (!t.isSupported) return e;
|
|
726
|
-
|
|
727
|
-
let c =
|
|
761
|
+
jt ? (j = Mt, M = Nt) : un(n), (k.uponSanitizeElement.length > 0 || k.uponSanitizeAttribute.length > 0) && (j = w(j)), k.uponSanitizeAttribute.length > 0 && (M = w(M)), t.removed = [];
|
|
762
|
+
let c = Bt && typeof e != "string" && Q(e);
|
|
728
763
|
if (c) {
|
|
729
|
-
|
|
730
|
-
let t =
|
|
764
|
+
yn(e);
|
|
765
|
+
let t = Se(e);
|
|
731
766
|
if (typeof t == "string") {
|
|
732
|
-
let n =
|
|
733
|
-
if (!
|
|
767
|
+
let n = V(t);
|
|
768
|
+
if (!j[n] || Tt[n]) throw gn(e), Te("root node is forbidden and cannot be sanitized in-place");
|
|
734
769
|
}
|
|
735
|
-
if (
|
|
770
|
+
if (Z(e)) throw gn(e), Te("root node is clobbered and cannot be sanitized in-place");
|
|
736
771
|
try {
|
|
737
|
-
|
|
772
|
+
Fn(e);
|
|
738
773
|
} catch (t) {
|
|
739
|
-
throw
|
|
774
|
+
throw gn(e), t;
|
|
740
775
|
}
|
|
741
|
-
} else if (
|
|
776
|
+
} else if (Q(e)) i = bn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === E.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Fn(i);
|
|
742
777
|
else {
|
|
743
|
-
if (!
|
|
744
|
-
if (i =
|
|
778
|
+
if (!Ft && !F && !L && e.indexOf("<") === -1) return v && z ? De(e) : e;
|
|
779
|
+
if (i = bn(e), !i) return Ft ? null : z ? y : "";
|
|
745
780
|
}
|
|
746
|
-
i &&
|
|
747
|
-
let l = c ? e : i
|
|
781
|
+
i && Pt && G(i.firstChild);
|
|
782
|
+
let l = c ? e : i;
|
|
748
783
|
try {
|
|
749
|
-
|
|
784
|
+
let e = J(l);
|
|
785
|
+
for (; o = e.nextNode();) Dn(o, l), Nn(o), xn(o.content) && Pn(o.content);
|
|
750
786
|
} catch (n) {
|
|
751
|
-
throw c && (
|
|
752
|
-
e.element &&
|
|
787
|
+
throw c && (gn(e), ue(t.removed, (e) => {
|
|
788
|
+
e.element && vn(e.element);
|
|
753
789
|
})), n;
|
|
754
790
|
}
|
|
755
|
-
if (c) return
|
|
756
|
-
e.element &&
|
|
757
|
-
}),
|
|
758
|
-
if (
|
|
759
|
-
if (
|
|
791
|
+
if (c) return ue(t.removed, (e) => {
|
|
792
|
+
e.element && vn(e.element);
|
|
793
|
+
}), F && X(e), e;
|
|
794
|
+
if (Ft) {
|
|
795
|
+
if (F && X(i), R) for (s = pt.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
760
796
|
else s = i;
|
|
761
|
-
return (
|
|
797
|
+
return (M.shadowroot || M.shadowrootmode) && (s = O.call(r, s, !0)), s;
|
|
762
798
|
}
|
|
763
|
-
let
|
|
764
|
-
return
|
|
799
|
+
let u = L ? i.outerHTML : i.innerHTML;
|
|
800
|
+
return L && j["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && x(Ye, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), F && (u = Y(u)), v && z ? De(u) : u;
|
|
765
801
|
}, t.setConfig = function() {
|
|
766
802
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
767
|
-
|
|
803
|
+
un(e), jt = !0, Mt = j, Nt = M;
|
|
768
804
|
}, t.clearConfig = function() {
|
|
769
|
-
|
|
805
|
+
H = null, jt = !1, Mt = null, Nt = null, v = Ce, y = "";
|
|
770
806
|
}, t.isValidAttribute = function(e, t, n) {
|
|
771
|
-
|
|
772
|
-
let r =
|
|
773
|
-
return
|
|
807
|
+
H || un({});
|
|
808
|
+
let r = V(e), i = V(t);
|
|
809
|
+
return On(r, i, n);
|
|
774
810
|
}, t.addHook = function(e, t) {
|
|
775
|
-
typeof t == "function" &&
|
|
811
|
+
typeof t == "function" && b(k, e) && pe(k[e], t);
|
|
776
812
|
}, t.removeHook = function(e, t) {
|
|
777
|
-
if (
|
|
813
|
+
if (b(k, e)) {
|
|
778
814
|
if (t !== void 0) {
|
|
779
|
-
let n =
|
|
780
|
-
return n === -1 ? void 0 :
|
|
815
|
+
let n = de(k[e], t);
|
|
816
|
+
return n === -1 ? void 0 : me(k[e], n, 1)[0];
|
|
781
817
|
}
|
|
782
|
-
return
|
|
818
|
+
return fe(k[e]);
|
|
783
819
|
}
|
|
784
820
|
}, t.removeHooks = function(e) {
|
|
785
|
-
|
|
821
|
+
b(k, e) && (k[e] = []);
|
|
786
822
|
}, t.removeAllHooks = function() {
|
|
787
|
-
|
|
823
|
+
k = ot();
|
|
788
824
|
}, t;
|
|
789
825
|
}
|
|
790
|
-
var
|
|
826
|
+
var ut = lt();
|
|
791
827
|
//#endregion
|
|
792
828
|
//#region node_modules/marked/lib/marked.esm.js
|
|
793
|
-
function
|
|
829
|
+
function dt() {
|
|
794
830
|
return {
|
|
795
831
|
async: !1,
|
|
796
832
|
breaks: !1,
|
|
@@ -804,35 +840,35 @@ function at() {
|
|
|
804
840
|
walkTokens: null
|
|
805
841
|
};
|
|
806
842
|
}
|
|
807
|
-
var
|
|
808
|
-
function
|
|
809
|
-
|
|
843
|
+
var D = dt();
|
|
844
|
+
function ft(e) {
|
|
845
|
+
D = e;
|
|
810
846
|
}
|
|
811
|
-
var
|
|
812
|
-
function
|
|
847
|
+
var pt = { exec: () => null };
|
|
848
|
+
function mt(e) {
|
|
813
849
|
let t = [];
|
|
814
850
|
return (n) => {
|
|
815
851
|
let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
|
|
816
852
|
return i || (i = e(r), t[r] = i), i;
|
|
817
853
|
};
|
|
818
854
|
}
|
|
819
|
-
function
|
|
855
|
+
function O(e, t = "") {
|
|
820
856
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
821
857
|
replace: (e, t) => {
|
|
822
858
|
let i = typeof t == "string" ? t : t.source;
|
|
823
|
-
return i = i.replace(
|
|
859
|
+
return i = i.replace(A.caret, "$1"), n = n.replace(e, i), r;
|
|
824
860
|
},
|
|
825
861
|
getRegex: () => new RegExp(n, t)
|
|
826
862
|
};
|
|
827
863
|
return r;
|
|
828
864
|
}
|
|
829
|
-
var
|
|
865
|
+
var k = ((e = "") => {
|
|
830
866
|
try {
|
|
831
867
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
832
868
|
} catch {
|
|
833
869
|
return !1;
|
|
834
870
|
}
|
|
835
|
-
})(),
|
|
871
|
+
})(), A = {
|
|
836
872
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
837
873
|
outputLinkReplace: /\\([\[\]])/g,
|
|
838
874
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -883,121 +919,121 @@ var ct = ((e = "") => {
|
|
|
883
919
|
notSpaceStart: /^\S*/,
|
|
884
920
|
endingNewline: /\n$/,
|
|
885
921
|
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
886
|
-
nextBulletRegex:
|
|
887
|
-
hrRegex:
|
|
888
|
-
fencesBeginRegex:
|
|
889
|
-
headingBeginRegex:
|
|
890
|
-
htmlBeginRegex:
|
|
891
|
-
blockquoteBeginRegex:
|
|
892
|
-
},
|
|
893
|
-
blockquote:
|
|
894
|
-
code:
|
|
895
|
-
def:
|
|
896
|
-
fences:
|
|
897
|
-
heading:
|
|
898
|
-
hr:
|
|
899
|
-
html:
|
|
900
|
-
lheading:
|
|
901
|
-
list:
|
|
902
|
-
newline:
|
|
903
|
-
paragraph:
|
|
904
|
-
table:
|
|
905
|
-
text:
|
|
906
|
-
},
|
|
907
|
-
...
|
|
908
|
-
lheading:
|
|
909
|
-
table:
|
|
910
|
-
paragraph:
|
|
911
|
-
},
|
|
912
|
-
...
|
|
913
|
-
html:
|
|
922
|
+
nextBulletRegex: mt((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
|
|
923
|
+
hrRegex: mt((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
|
|
924
|
+
fencesBeginRegex: mt((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
|
|
925
|
+
headingBeginRegex: mt((e) => RegExp(`^ {0,${e}}#`)),
|
|
926
|
+
htmlBeginRegex: mt((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
927
|
+
blockquoteBeginRegex: mt((e) => RegExp(`^ {0,${e}}>`))
|
|
928
|
+
}, ht = /^(?:[ \t]*(?:\n|$))+/, gt = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, _t = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, vt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, yt = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, bt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, xt = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, St = O(xt).replace(/bull/g, bt).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(), j = O(xt).replace(/bull/g, bt).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(), Ct = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, M = /^[^\n]+/, wt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, N = O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", wt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Tt = O(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, bt).getRegex(), Et = "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", P = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Dt = O("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-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", P).replace("tag", Et).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ot = (e) => O(Ct).replace("hr", vt).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", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Et).getRegex(), kt = Ot(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), At = Ot(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), F = {
|
|
929
|
+
blockquote: O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", At).getRegex(),
|
|
930
|
+
code: gt,
|
|
931
|
+
def: N,
|
|
932
|
+
fences: _t,
|
|
933
|
+
heading: yt,
|
|
934
|
+
hr: vt,
|
|
935
|
+
html: Dt,
|
|
936
|
+
lheading: St,
|
|
937
|
+
list: Tt,
|
|
938
|
+
newline: ht,
|
|
939
|
+
paragraph: kt,
|
|
940
|
+
table: pt,
|
|
941
|
+
text: M
|
|
942
|
+
}, I = O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", vt).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", Et).getRegex(), L = {
|
|
943
|
+
...F,
|
|
944
|
+
lheading: j,
|
|
945
|
+
table: I,
|
|
946
|
+
paragraph: O(Ct).replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", I).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", Et).getRegex()
|
|
947
|
+
}, jt = {
|
|
948
|
+
...F,
|
|
949
|
+
html: O("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", P).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(),
|
|
914
950
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
915
951
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
916
|
-
fences:
|
|
952
|
+
fences: pt,
|
|
917
953
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
918
|
-
paragraph:
|
|
919
|
-
},
|
|
920
|
-
_backpedal:
|
|
921
|
-
anyPunctuation:
|
|
922
|
-
autolink:
|
|
923
|
-
blockSkip:
|
|
924
|
-
br:
|
|
925
|
-
code:
|
|
926
|
-
del:
|
|
927
|
-
delLDelim:
|
|
928
|
-
delRDelim:
|
|
929
|
-
emStrongLDelim:
|
|
930
|
-
emStrongRDelimAst:
|
|
931
|
-
emStrongRDelimUnd:
|
|
932
|
-
escape:
|
|
933
|
-
link:
|
|
934
|
-
nolink:
|
|
935
|
-
punctuation:
|
|
936
|
-
reflink:
|
|
937
|
-
reflinkSearch:
|
|
938
|
-
tag:
|
|
939
|
-
text:
|
|
940
|
-
url:
|
|
941
|
-
},
|
|
942
|
-
...
|
|
943
|
-
link:
|
|
944
|
-
reflink:
|
|
945
|
-
},
|
|
946
|
-
...
|
|
947
|
-
emStrongRDelimAst:
|
|
948
|
-
emStrongLDelim:
|
|
949
|
-
delLDelim:
|
|
950
|
-
delRDelim:
|
|
951
|
-
url:
|
|
954
|
+
paragraph: O(Ct).replace("hr", vt).replace("heading", " *#{1,6} *[^\n]").replace("lheading", St).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
955
|
+
}, Mt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Nt = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Pt = /^( {2,}|\\)\n(?!\s*$)/, Ft = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, R = /[\p{P}\p{S}]/u, z = /[\s\p{P}\p{S}]/u, It = /[^\s\p{P}\p{S}]/u, Lt = O(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, z).getRegex(), Rt = /(?!~)[\p{P}\p{S}]/u, zt = /(?!~)[\s\p{P}\p{S}]/u, Bt = /(?:[^\s\p{P}\p{S}]|~)/u, Vt = O(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", k ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ht = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ut = O(Ht, "u").replace(/punct/g, R).getRegex(), Wt = O(Ht, "u").replace(/punct/g, Rt).getRegex(), Gt = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Kt = O(Gt, "gu").replace(/notPunctSpace/g, It).replace(/punctSpace/g, z).replace(/punct/g, R).getRegex(), qt = O(Gt, "gu").replace(/notPunctSpace/g, Bt).replace(/punctSpace/g, zt).replace(/punct/g, Rt).getRegex(), Jt = O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, It).replace(/punctSpace/g, z).replace(/punct/g, R).getRegex(), Yt = O(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, R).getRegex(), B = O("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, It).replace(/punctSpace/g, z).replace(/punct/g, R).getRegex(), Xt = O(/\\(punct)/, "gu").replace(/punct/g, R).getRegex(), Zt = O(/^<(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(), Qt = O(P).replace("(?:-->|$)", "-->").getRegex(), $t = O("^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", Qt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), en = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, tn = O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", en).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), nn = O(/^!?\[(label)\]\[(ref)\]/).replace("label", en).replace("ref", wt).getRegex(), rn = O(/^!?\[(ref)\](?:\[\])?/).replace("ref", wt).getRegex(), an = O("reflink|nolink(?!\\()", "g").replace("reflink", nn).replace("nolink", rn).getRegex(), on = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, sn = {
|
|
956
|
+
_backpedal: pt,
|
|
957
|
+
anyPunctuation: Xt,
|
|
958
|
+
autolink: Zt,
|
|
959
|
+
blockSkip: Vt,
|
|
960
|
+
br: Pt,
|
|
961
|
+
code: Nt,
|
|
962
|
+
del: pt,
|
|
963
|
+
delLDelim: pt,
|
|
964
|
+
delRDelim: pt,
|
|
965
|
+
emStrongLDelim: Ut,
|
|
966
|
+
emStrongRDelimAst: Kt,
|
|
967
|
+
emStrongRDelimUnd: Jt,
|
|
968
|
+
escape: Mt,
|
|
969
|
+
link: tn,
|
|
970
|
+
nolink: rn,
|
|
971
|
+
punctuation: Lt,
|
|
972
|
+
reflink: nn,
|
|
973
|
+
reflinkSearch: an,
|
|
974
|
+
tag: $t,
|
|
975
|
+
text: Ft,
|
|
976
|
+
url: pt
|
|
977
|
+
}, V = {
|
|
978
|
+
...sn,
|
|
979
|
+
link: O(/^!?\[(label)\]\((.*?)\)/).replace("label", en).getRegex(),
|
|
980
|
+
reflink: O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", en).getRegex()
|
|
981
|
+
}, H = {
|
|
982
|
+
...sn,
|
|
983
|
+
emStrongRDelimAst: qt,
|
|
984
|
+
emStrongLDelim: Wt,
|
|
985
|
+
delLDelim: Yt,
|
|
986
|
+
delRDelim: B,
|
|
987
|
+
url: O(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", on).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
952
988
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
953
989
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
954
|
-
text:
|
|
955
|
-
},
|
|
956
|
-
...
|
|
957
|
-
br:
|
|
958
|
-
text:
|
|
959
|
-
},
|
|
960
|
-
normal:
|
|
961
|
-
gfm:
|
|
962
|
-
pedantic:
|
|
963
|
-
},
|
|
964
|
-
normal:
|
|
965
|
-
gfm:
|
|
966
|
-
breaks:
|
|
967
|
-
pedantic:
|
|
968
|
-
},
|
|
990
|
+
text: O(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", on).getRegex()
|
|
991
|
+
}, cn = {
|
|
992
|
+
...H,
|
|
993
|
+
br: O(Pt).replace("{2,}", "*").getRegex(),
|
|
994
|
+
text: O(H.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
995
|
+
}, ln = {
|
|
996
|
+
normal: F,
|
|
997
|
+
gfm: L,
|
|
998
|
+
pedantic: jt
|
|
999
|
+
}, un = {
|
|
1000
|
+
normal: sn,
|
|
1001
|
+
gfm: H,
|
|
1002
|
+
breaks: cn,
|
|
1003
|
+
pedantic: V
|
|
1004
|
+
}, dn = {
|
|
969
1005
|
"&": "&",
|
|
970
1006
|
"<": "<",
|
|
971
1007
|
">": ">",
|
|
972
1008
|
"\"": """,
|
|
973
1009
|
"'": "'"
|
|
974
|
-
},
|
|
975
|
-
function
|
|
1010
|
+
}, fn = (e) => dn[e];
|
|
1011
|
+
function U(e, t) {
|
|
976
1012
|
if (t) {
|
|
977
|
-
if (
|
|
978
|
-
} else if (
|
|
1013
|
+
if (A.escapeTest.test(e)) return e.replace(A.escapeReplace, fn);
|
|
1014
|
+
} else if (A.escapeTestNoEncode.test(e)) return e.replace(A.escapeReplaceNoEncode, fn);
|
|
979
1015
|
return e;
|
|
980
1016
|
}
|
|
981
|
-
function
|
|
1017
|
+
function pn(e) {
|
|
982
1018
|
try {
|
|
983
|
-
e = encodeURI(e).replace(
|
|
1019
|
+
e = encodeURI(e).replace(A.percentDecode, "%");
|
|
984
1020
|
} catch {
|
|
985
1021
|
return null;
|
|
986
1022
|
}
|
|
987
1023
|
return e;
|
|
988
1024
|
}
|
|
989
|
-
function
|
|
990
|
-
let n = e.replace(
|
|
1025
|
+
function mn(e, t) {
|
|
1026
|
+
let n = e.replace(A.findPipe, (e, t, n) => {
|
|
991
1027
|
let r = !1, i = t;
|
|
992
1028
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
993
1029
|
return r ? "|" : " |";
|
|
994
|
-
}).split(
|
|
1030
|
+
}).split(A.splitPipe), r = 0;
|
|
995
1031
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
996
1032
|
else for (; n.length < t;) n.push("");
|
|
997
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
1033
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(A.slashPipe, "|");
|
|
998
1034
|
return n;
|
|
999
1035
|
}
|
|
1000
|
-
function
|
|
1036
|
+
function W(e, t, n) {
|
|
1001
1037
|
let r = e.length;
|
|
1002
1038
|
if (r === 0) return "";
|
|
1003
1039
|
let i = 0;
|
|
@@ -1009,12 +1045,12 @@ function q(e, t, n) {
|
|
|
1009
1045
|
}
|
|
1010
1046
|
return e.slice(0, r - i);
|
|
1011
1047
|
}
|
|
1012
|
-
function
|
|
1048
|
+
function G(e) {
|
|
1013
1049
|
let t = e.split("\n"), n = t.length - 1;
|
|
1014
|
-
for (; n >= 0 &&
|
|
1050
|
+
for (; n >= 0 && A.blankLine.test(t[n]);) n--;
|
|
1015
1051
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
1016
1052
|
}
|
|
1017
|
-
function
|
|
1053
|
+
function hn(e, t) {
|
|
1018
1054
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
1019
1055
|
let n = 0;
|
|
1020
1056
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -1022,7 +1058,7 @@ function ln(e, t) {
|
|
|
1022
1058
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
1023
1059
|
return n > 0 ? -2 : -1;
|
|
1024
1060
|
}
|
|
1025
|
-
function
|
|
1061
|
+
function gn(e, t = 0) {
|
|
1026
1062
|
let n = t, r = "";
|
|
1027
1063
|
for (let t of e) if (t === " ") {
|
|
1028
1064
|
let e = 4 - n % 4;
|
|
@@ -1030,7 +1066,7 @@ function un(e, t = 0) {
|
|
|
1030
1066
|
} else r += t, n++;
|
|
1031
1067
|
return r;
|
|
1032
1068
|
}
|
|
1033
|
-
function
|
|
1069
|
+
function K(e, t, n, r, i) {
|
|
1034
1070
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
1035
1071
|
r.state.inLink = !0;
|
|
1036
1072
|
let c = {
|
|
@@ -1043,7 +1079,7 @@ function dn(e, t, n, r, i) {
|
|
|
1043
1079
|
};
|
|
1044
1080
|
return r.state.inLink = !1, c;
|
|
1045
1081
|
}
|
|
1046
|
-
function
|
|
1082
|
+
function _n(e, t, n) {
|
|
1047
1083
|
let r = e.match(n.other.indentCodeCompensation);
|
|
1048
1084
|
if (r === null) return t;
|
|
1049
1085
|
let i = r[1];
|
|
@@ -1054,12 +1090,12 @@ function fn(e, t, n) {
|
|
|
1054
1090
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
1055
1091
|
}).join("\n");
|
|
1056
1092
|
}
|
|
1057
|
-
var
|
|
1093
|
+
var vn = class {
|
|
1058
1094
|
options;
|
|
1059
1095
|
rules;
|
|
1060
1096
|
lexer;
|
|
1061
1097
|
constructor(e) {
|
|
1062
|
-
this.options = e ||
|
|
1098
|
+
this.options = e || D;
|
|
1063
1099
|
}
|
|
1064
1100
|
space(e) {
|
|
1065
1101
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -1071,7 +1107,7 @@ var pn = class {
|
|
|
1071
1107
|
code(e) {
|
|
1072
1108
|
let t = this.rules.block.code.exec(e);
|
|
1073
1109
|
if (t) {
|
|
1074
|
-
let e = this.options.pedantic ? t[0] :
|
|
1110
|
+
let e = this.options.pedantic ? t[0] : G(t[0]);
|
|
1075
1111
|
return {
|
|
1076
1112
|
type: "code",
|
|
1077
1113
|
raw: e,
|
|
@@ -1083,7 +1119,7 @@ var pn = class {
|
|
|
1083
1119
|
fences(e) {
|
|
1084
1120
|
let t = this.rules.block.fences.exec(e);
|
|
1085
1121
|
if (t) {
|
|
1086
|
-
let e = t[0], n =
|
|
1122
|
+
let e = t[0], n = _n(e, t[3] || "", this.rules);
|
|
1087
1123
|
return {
|
|
1088
1124
|
type: "code",
|
|
1089
1125
|
raw: e,
|
|
@@ -1097,12 +1133,12 @@ var pn = class {
|
|
|
1097
1133
|
if (t) {
|
|
1098
1134
|
let e = t[2].trim();
|
|
1099
1135
|
if (this.rules.other.endingHash.test(e)) {
|
|
1100
|
-
let t =
|
|
1136
|
+
let t = W(e, "#");
|
|
1101
1137
|
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
1102
1138
|
}
|
|
1103
1139
|
return {
|
|
1104
1140
|
type: "heading",
|
|
1105
|
-
raw:
|
|
1141
|
+
raw: W(t[0], "\n"),
|
|
1106
1142
|
depth: t[1].length,
|
|
1107
1143
|
text: e,
|
|
1108
1144
|
tokens: this.lexer.inline(e)
|
|
@@ -1113,13 +1149,13 @@ var pn = class {
|
|
|
1113
1149
|
let t = this.rules.block.hr.exec(e);
|
|
1114
1150
|
if (t) return {
|
|
1115
1151
|
type: "hr",
|
|
1116
|
-
raw:
|
|
1152
|
+
raw: W(t[0], "\n")
|
|
1117
1153
|
};
|
|
1118
1154
|
}
|
|
1119
1155
|
blockquote(e) {
|
|
1120
1156
|
let t = this.rules.block.blockquote.exec(e);
|
|
1121
1157
|
if (t) {
|
|
1122
|
-
let e =
|
|
1158
|
+
let e = W(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
1123
1159
|
for (; e.length > 0;) {
|
|
1124
1160
|
let t = !1, a = [], o;
|
|
1125
1161
|
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -1169,18 +1205,18 @@ ${c}` : c;
|
|
|
1169
1205
|
let n = !1, r = "", s = "";
|
|
1170
1206
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
1171
1207
|
r = t[0], e = e.substring(r.length);
|
|
1172
|
-
let c =
|
|
1208
|
+
let c = gn(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
1173
1209
|
if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
1174
|
-
let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d),
|
|
1210
|
+
let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), f = this.rules.other.blockquoteBeginRegex(d);
|
|
1175
1211
|
for (; e;) {
|
|
1176
|
-
let
|
|
1177
|
-
if (l =
|
|
1178
|
-
if (
|
|
1212
|
+
let p = e.split("\n", 1)[0], ee;
|
|
1213
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), ee = l) : ee = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || f.test(l) || t.test(l) || n.test(l)) break;
|
|
1214
|
+
if (ee.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ee.slice(d);
|
|
1179
1215
|
else {
|
|
1180
1216
|
if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
|
|
1181
1217
|
s += "\n" + l;
|
|
1182
1218
|
}
|
|
1183
|
-
u = !l.trim(), r +=
|
|
1219
|
+
u = !l.trim(), r += p + "\n", e = e.substring(p.length + 1), c = ee.slice(d);
|
|
1184
1220
|
}
|
|
1185
1221
|
}
|
|
1186
1222
|
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
|
|
@@ -1235,7 +1271,7 @@ ${c}` : c;
|
|
|
1235
1271
|
html(e) {
|
|
1236
1272
|
let t = this.rules.block.html.exec(e);
|
|
1237
1273
|
if (t) {
|
|
1238
|
-
let e =
|
|
1274
|
+
let e = G(t[0]);
|
|
1239
1275
|
return {
|
|
1240
1276
|
type: "html",
|
|
1241
1277
|
block: !0,
|
|
@@ -1252,7 +1288,7 @@ ${c}` : c;
|
|
|
1252
1288
|
return {
|
|
1253
1289
|
type: "def",
|
|
1254
1290
|
tag: e,
|
|
1255
|
-
raw:
|
|
1291
|
+
raw: W(t[0], "\n"),
|
|
1256
1292
|
href: n,
|
|
1257
1293
|
title: r
|
|
1258
1294
|
};
|
|
@@ -1261,9 +1297,9 @@ ${c}` : c;
|
|
|
1261
1297
|
table(e) {
|
|
1262
1298
|
let t = this.rules.block.table.exec(e);
|
|
1263
1299
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
1264
|
-
let n =
|
|
1300
|
+
let n = mn(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
1265
1301
|
type: "table",
|
|
1266
|
-
raw:
|
|
1302
|
+
raw: W(t[0], "\n"),
|
|
1267
1303
|
header: [],
|
|
1268
1304
|
align: [],
|
|
1269
1305
|
rows: []
|
|
@@ -1276,7 +1312,7 @@ ${c}` : c;
|
|
|
1276
1312
|
header: !0,
|
|
1277
1313
|
align: a.align[e]
|
|
1278
1314
|
});
|
|
1279
|
-
for (let e of i) a.rows.push(
|
|
1315
|
+
for (let e of i) a.rows.push(mn(e, a.header.length).map((e, t) => ({
|
|
1280
1316
|
text: e,
|
|
1281
1317
|
tokens: this.lexer.inline(e),
|
|
1282
1318
|
header: !1,
|
|
@@ -1291,7 +1327,7 @@ ${c}` : c;
|
|
|
1291
1327
|
let e = t[1].trim();
|
|
1292
1328
|
return {
|
|
1293
1329
|
type: "heading",
|
|
1294
|
-
raw:
|
|
1330
|
+
raw: W(t[0], "\n"),
|
|
1295
1331
|
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
1296
1332
|
text: e,
|
|
1297
1333
|
tokens: this.lexer.inline(e)
|
|
@@ -1344,10 +1380,10 @@ ${c}` : c;
|
|
|
1344
1380
|
let e = t[2].trim();
|
|
1345
1381
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
1346
1382
|
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
1347
|
-
let t =
|
|
1383
|
+
let t = W(e.slice(0, -1), "\\");
|
|
1348
1384
|
if ((e.length - t.length) % 2 == 0) return;
|
|
1349
1385
|
} else {
|
|
1350
|
-
let e =
|
|
1386
|
+
let e = hn(t[2], "()");
|
|
1351
1387
|
if (e === -2) return;
|
|
1352
1388
|
if (e > -1) {
|
|
1353
1389
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -1359,7 +1395,7 @@ ${c}` : c;
|
|
|
1359
1395
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
1360
1396
|
e && (n = e[1], r = e[3]);
|
|
1361
1397
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
1362
|
-
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)),
|
|
1398
|
+
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), K(t, {
|
|
1363
1399
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
1364
1400
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
1365
1401
|
}, t[0], this.lexer, this.rules);
|
|
@@ -1377,7 +1413,7 @@ ${c}` : c;
|
|
|
1377
1413
|
text: e
|
|
1378
1414
|
};
|
|
1379
1415
|
}
|
|
1380
|
-
return
|
|
1416
|
+
return K(n, e, n[0], this.lexer, this.rules);
|
|
1381
1417
|
}
|
|
1382
1418
|
}
|
|
1383
1419
|
emStrong(e, t, n = "") {
|
|
@@ -1509,29 +1545,29 @@ ${c}` : c;
|
|
|
1509
1545
|
};
|
|
1510
1546
|
}
|
|
1511
1547
|
}
|
|
1512
|
-
},
|
|
1548
|
+
}, q = class e {
|
|
1513
1549
|
tokens;
|
|
1514
1550
|
options;
|
|
1515
1551
|
state;
|
|
1516
1552
|
inlineQueue;
|
|
1517
1553
|
tokenizer;
|
|
1518
1554
|
constructor(e) {
|
|
1519
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
1555
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || D, this.options.tokenizer = this.options.tokenizer || new vn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
1520
1556
|
inLink: !1,
|
|
1521
1557
|
inRawBlock: !1,
|
|
1522
1558
|
top: !0
|
|
1523
1559
|
};
|
|
1524
1560
|
let t = {
|
|
1525
|
-
other:
|
|
1526
|
-
block:
|
|
1527
|
-
inline:
|
|
1561
|
+
other: A,
|
|
1562
|
+
block: ln.normal,
|
|
1563
|
+
inline: un.normal
|
|
1528
1564
|
};
|
|
1529
|
-
this.options.pedantic ? (t.block =
|
|
1565
|
+
this.options.pedantic ? (t.block = ln.pedantic, t.inline = un.pedantic) : this.options.gfm && (t.block = ln.gfm, this.options.breaks ? t.inline = un.breaks : t.inline = un.gfm), this.tokenizer.rules = t;
|
|
1530
1566
|
}
|
|
1531
1567
|
static get rules() {
|
|
1532
1568
|
return {
|
|
1533
|
-
block:
|
|
1534
|
-
inline:
|
|
1569
|
+
block: ln,
|
|
1570
|
+
inline: un
|
|
1535
1571
|
};
|
|
1536
1572
|
}
|
|
1537
1573
|
static lex(t, n) {
|
|
@@ -1541,7 +1577,7 @@ ${c}` : c;
|
|
|
1541
1577
|
return new e(n).inlineTokens(t);
|
|
1542
1578
|
}
|
|
1543
1579
|
lex(e) {
|
|
1544
|
-
e = e.replace(
|
|
1580
|
+
e = e.replace(A.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
1545
1581
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
1546
1582
|
let t = this.inlineQueue[e];
|
|
1547
1583
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -1549,7 +1585,7 @@ ${c}` : c;
|
|
|
1549
1585
|
return this.inlineQueue = [], this.tokens;
|
|
1550
1586
|
}
|
|
1551
1587
|
blockTokens(e, t = [], n = !1) {
|
|
1552
|
-
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
1588
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(A.tabCharGlobal, " ").replace(A.spaceLine, ""));
|
|
1553
1589
|
let r = Infinity;
|
|
1554
1590
|
for (; e;) {
|
|
1555
1591
|
if (e.length < r) r = e.length;
|
|
@@ -1731,18 +1767,18 @@ ${c}` : c;
|
|
|
1731
1767
|
if (this.options.silent) console.error(t);
|
|
1732
1768
|
else throw Error(t);
|
|
1733
1769
|
}
|
|
1734
|
-
},
|
|
1770
|
+
}, yn = class {
|
|
1735
1771
|
options;
|
|
1736
1772
|
parser;
|
|
1737
1773
|
constructor(e) {
|
|
1738
|
-
this.options = e ||
|
|
1774
|
+
this.options = e || D;
|
|
1739
1775
|
}
|
|
1740
1776
|
space(e) {
|
|
1741
1777
|
return "";
|
|
1742
1778
|
}
|
|
1743
1779
|
code({ text: e, lang: t, escaped: n }) {
|
|
1744
|
-
let r = (t || "").match(
|
|
1745
|
-
return r ? "<pre><code class=\"language-" +
|
|
1780
|
+
let r = (t || "").match(A.notSpaceStart)?.[0], i = e.replace(A.endingNewline, "") + "\n";
|
|
1781
|
+
return r ? "<pre><code class=\"language-" + U(r) + "\">" + (n ? i : U(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : U(i, !0)) + "</code></pre>\n";
|
|
1746
1782
|
}
|
|
1747
1783
|
blockquote({ tokens: e }) {
|
|
1748
1784
|
return `<blockquote>
|
|
@@ -1812,7 +1848,7 @@ ${e}</tr>
|
|
|
1812
1848
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
1813
1849
|
}
|
|
1814
1850
|
codespan({ text: e }) {
|
|
1815
|
-
return `<code>${
|
|
1851
|
+
return `<code>${U(e, !0)}</code>`;
|
|
1816
1852
|
}
|
|
1817
1853
|
br(e) {
|
|
1818
1854
|
return "<br>";
|
|
@@ -1821,24 +1857,24 @@ ${e}</tr>
|
|
|
1821
1857
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1822
1858
|
}
|
|
1823
1859
|
link({ href: e, title: t, tokens: n }) {
|
|
1824
|
-
let r = this.parser.parseInline(n), i =
|
|
1860
|
+
let r = this.parser.parseInline(n), i = pn(e);
|
|
1825
1861
|
if (i === null) return r;
|
|
1826
1862
|
e = i;
|
|
1827
1863
|
let a = "<a href=\"" + e + "\"";
|
|
1828
|
-
return t && (a += " title=\"" +
|
|
1864
|
+
return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
|
|
1829
1865
|
}
|
|
1830
1866
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
1831
1867
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1832
|
-
let i =
|
|
1833
|
-
if (i === null) return
|
|
1868
|
+
let i = pn(e);
|
|
1869
|
+
if (i === null) return U(n);
|
|
1834
1870
|
e = i;
|
|
1835
|
-
let a = `<img src="${e}" alt="${
|
|
1836
|
-
return t && (a += ` title="${
|
|
1871
|
+
let a = `<img src="${e}" alt="${U(n)}"`;
|
|
1872
|
+
return t && (a += ` title="${U(t)}"`), a += ">", a;
|
|
1837
1873
|
}
|
|
1838
1874
|
text(e) {
|
|
1839
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
1875
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
|
|
1840
1876
|
}
|
|
1841
|
-
},
|
|
1877
|
+
}, bn = class {
|
|
1842
1878
|
strong({ text: e }) {
|
|
1843
1879
|
return e;
|
|
1844
1880
|
}
|
|
@@ -1869,12 +1905,12 @@ ${e}</tr>
|
|
|
1869
1905
|
checkbox({ raw: e }) {
|
|
1870
1906
|
return e;
|
|
1871
1907
|
}
|
|
1872
|
-
},
|
|
1908
|
+
}, J = class e {
|
|
1873
1909
|
options;
|
|
1874
1910
|
renderer;
|
|
1875
1911
|
textRenderer;
|
|
1876
1912
|
constructor(e) {
|
|
1877
|
-
this.options = e ||
|
|
1913
|
+
this.options = e || D, this.options.renderer = this.options.renderer || new yn(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new bn();
|
|
1878
1914
|
}
|
|
1879
1915
|
static parse(t, n) {
|
|
1880
1916
|
return new e(n).parse(t);
|
|
@@ -2020,11 +2056,11 @@ ${e}</tr>
|
|
|
2020
2056
|
}
|
|
2021
2057
|
return n;
|
|
2022
2058
|
}
|
|
2023
|
-
},
|
|
2059
|
+
}, Y = class {
|
|
2024
2060
|
options;
|
|
2025
2061
|
block;
|
|
2026
2062
|
constructor(e) {
|
|
2027
|
-
this.options = e ||
|
|
2063
|
+
this.options = e || D;
|
|
2028
2064
|
}
|
|
2029
2065
|
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
2030
2066
|
"preprocess",
|
|
@@ -2050,22 +2086,22 @@ ${e}</tr>
|
|
|
2050
2086
|
return e;
|
|
2051
2087
|
}
|
|
2052
2088
|
provideLexer(e = this.block) {
|
|
2053
|
-
return e ?
|
|
2089
|
+
return e ? q.lex : q.lexInline;
|
|
2054
2090
|
}
|
|
2055
2091
|
provideParser(e = this.block) {
|
|
2056
|
-
return e ?
|
|
2092
|
+
return e ? J.parse : J.parseInline;
|
|
2057
2093
|
}
|
|
2058
|
-
},
|
|
2059
|
-
defaults =
|
|
2094
|
+
}, X = new class {
|
|
2095
|
+
defaults = dt();
|
|
2060
2096
|
options = this.setOptions;
|
|
2061
2097
|
parse = this.parseMarkdown(!0);
|
|
2062
2098
|
parseInline = this.parseMarkdown(!1);
|
|
2063
|
-
Parser =
|
|
2064
|
-
Renderer =
|
|
2065
|
-
TextRenderer =
|
|
2066
|
-
Lexer =
|
|
2067
|
-
Tokenizer =
|
|
2068
|
-
Hooks =
|
|
2099
|
+
Parser = J;
|
|
2100
|
+
Renderer = yn;
|
|
2101
|
+
TextRenderer = bn;
|
|
2102
|
+
Lexer = q;
|
|
2103
|
+
Tokenizer = vn;
|
|
2104
|
+
Hooks = Y;
|
|
2069
2105
|
constructor(...e) {
|
|
2070
2106
|
this.use(...e);
|
|
2071
2107
|
}
|
|
@@ -2116,7 +2152,7 @@ ${e}</tr>
|
|
|
2116
2152
|
}
|
|
2117
2153
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
2118
2154
|
}), n.extensions = t), e.renderer) {
|
|
2119
|
-
let t = this.defaults.renderer || new
|
|
2155
|
+
let t = this.defaults.renderer || new yn(this.defaults);
|
|
2120
2156
|
for (let n in e.renderer) {
|
|
2121
2157
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
2122
2158
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -2129,7 +2165,7 @@ ${e}</tr>
|
|
|
2129
2165
|
n.renderer = t;
|
|
2130
2166
|
}
|
|
2131
2167
|
if (e.tokenizer) {
|
|
2132
|
-
let t = this.defaults.tokenizer || new
|
|
2168
|
+
let t = this.defaults.tokenizer || new vn(this.defaults);
|
|
2133
2169
|
for (let n in e.tokenizer) {
|
|
2134
2170
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
2135
2171
|
if ([
|
|
@@ -2146,13 +2182,13 @@ ${e}</tr>
|
|
|
2146
2182
|
n.tokenizer = t;
|
|
2147
2183
|
}
|
|
2148
2184
|
if (e.hooks) {
|
|
2149
|
-
let t = this.defaults.hooks || new
|
|
2185
|
+
let t = this.defaults.hooks || new Y();
|
|
2150
2186
|
for (let n in e.hooks) {
|
|
2151
2187
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
2152
2188
|
if (["options", "block"].includes(n)) continue;
|
|
2153
2189
|
let r = n, i = e.hooks[r], a = t[r];
|
|
2154
|
-
|
|
2155
|
-
if (this.defaults.async &&
|
|
2190
|
+
Y.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
2191
|
+
if (this.defaults.async && Y.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
2156
2192
|
let n = await i.call(t, e);
|
|
2157
2193
|
return a.call(t, n);
|
|
2158
2194
|
})();
|
|
@@ -2189,10 +2225,10 @@ ${e}</tr>
|
|
|
2189
2225
|
}, this;
|
|
2190
2226
|
}
|
|
2191
2227
|
lexer(e, t) {
|
|
2192
|
-
return
|
|
2228
|
+
return q.lex(e, t ?? this.defaults);
|
|
2193
2229
|
}
|
|
2194
2230
|
parser(e, t) {
|
|
2195
|
-
return
|
|
2231
|
+
return J.parse(e, t ?? this.defaults);
|
|
2196
2232
|
}
|
|
2197
2233
|
parseMarkdown(e) {
|
|
2198
2234
|
return (t, n) => {
|
|
@@ -2204,16 +2240,16 @@ ${e}</tr>
|
|
|
2204
2240
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
2205
2241
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
2206
2242
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
2207
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
2243
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
2208
2244
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
2209
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
2245
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? J.parse : J.parseInline)(a, i);
|
|
2210
2246
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
2211
2247
|
})().catch(a);
|
|
2212
2248
|
try {
|
|
2213
2249
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
2214
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
2250
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
|
|
2215
2251
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
2216
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
2252
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? J.parse : J.parseInline)(n, i);
|
|
2217
2253
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
2218
2254
|
} catch (e) {
|
|
2219
2255
|
return a(e);
|
|
@@ -2223,7 +2259,7 @@ ${e}</tr>
|
|
|
2223
2259
|
onError(e, t) {
|
|
2224
2260
|
return (n) => {
|
|
2225
2261
|
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
2226
|
-
let e = "<p>An error occurred:</p><pre>" +
|
|
2262
|
+
let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
|
|
2227
2263
|
return t ? Promise.resolve(e) : e;
|
|
2228
2264
|
}
|
|
2229
2265
|
if (t) return Promise.reject(n);
|
|
@@ -2231,19 +2267,19 @@ ${e}</tr>
|
|
|
2231
2267
|
};
|
|
2232
2268
|
}
|
|
2233
2269
|
}();
|
|
2234
|
-
function
|
|
2235
|
-
return
|
|
2270
|
+
function Z(e, t) {
|
|
2271
|
+
return X.parse(e, t);
|
|
2236
2272
|
}
|
|
2237
|
-
|
|
2238
|
-
return
|
|
2239
|
-
},
|
|
2240
|
-
return
|
|
2241
|
-
},
|
|
2242
|
-
return
|
|
2243
|
-
},
|
|
2273
|
+
Z.options = Z.setOptions = function(e) {
|
|
2274
|
+
return X.setOptions(e), Z.defaults = X.defaults, ft(Z.defaults), Z;
|
|
2275
|
+
}, Z.getDefaults = dt, Z.defaults = D, Z.use = function(...e) {
|
|
2276
|
+
return X.use(...e), Z.defaults = X.defaults, ft(Z.defaults), Z;
|
|
2277
|
+
}, Z.walkTokens = function(e, t) {
|
|
2278
|
+
return X.walkTokens(e, t);
|
|
2279
|
+
}, Z.parseInline = X.parseInline, Z.Parser = J, Z.parser = J.parse, Z.Renderer = yn, Z.TextRenderer = bn, Z.Lexer = q, Z.lexer = q.lex, Z.Tokenizer = vn, Z.Hooks = Y, Z.parse = Z, Z.options, Z.setOptions, Z.use, Z.walkTokens, Z.parseInline, J.parse, q.lex;
|
|
2244
2280
|
//#endregion
|
|
2245
2281
|
//#region src/components/chat-message/chat-message.module.scss?inline
|
|
2246
|
-
var gn = ":host{width:100%;font-family:var(--luzmo-chat-message-font-family,var(--chat-message-font-family));font-size:var(--luzmo-chat-message-font-size,var(--chat-message-font-size));line-height:var(--luzmo-chat-message-line-height,var(--chat-message-line-height));color:var(--highcontrast-chat-message-text-color,var(--luzmo-chat-message-text-color,var(--chat-message-text-color)));display:flex}:host([position=left]){justify-content:flex-start}:host([position=right]){justify-content:flex-end}:host([position=middle]){justify-content:center}.container{gap:var(--luzmo-chat-message-message-to-avatar,var(--chat-message-message-to-avatar));max-width:var(--luzmo-chat-message-max-width,var(--chat-message-max-width));width:fit-content;display:flex}:host(:not([data-has-avatar])) .container{gap:0}:host(:not([data-has-avatar])) .avatar-wrapper{display:none}.position-left{flex-direction:row}.position-left .avatar-wrapper{order:0}.position-left .message-wrapper{order:1;align-items:flex-start}.position-left .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius-start,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius-bottom-start,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)))}.position-right{flex-direction:row-reverse}.position-right .avatar-wrapper{order:0}.position-right .message-wrapper{order:1;align-items:flex-end}.position-right .header{justify-content:flex-end}.position-right .message{border-top-right-radius:var(--luzmo-chat-message-message-border-radius-end,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius-bottom-end,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)))}.position-right .actions-outside{justify-content:flex-end}.position-middle .message-wrapper{align-items:center}.position-middle .header,.position-middle .actions-outside{justify-content:center}.avatar-wrapper{margin-top:var(--luzmo-chat-message-avatar-margin-top,var(--chat-message-avatar-margin-top,0));margin-bottom:var(--luzmo-chat-message-avatar-margin-bottom,var(--chat-message-avatar-margin-bottom,0));flex-shrink:0;align-items:flex-start;display:flex}:host([data-in-group]) .avatar-wrapper{min-width:var(--chat-message-avatar-size,var(--luzmo-avatar-size,var(--avatar-size,32px)));flex-basis:var(--chat-message-avatar-size,var(--luzmo-avatar-size,var(--avatar-size,32px)))}:host([data-in-group]:not([data-group-square-border])) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important}.avatar-top .avatar-wrapper{align-self:flex-start}.avatar-middle .avatar-wrapper{align-self:center}.avatar-bottom .avatar-wrapper{align-self:flex-end}.avatar-middle .message-wrapper,.avatar-bottom .message-wrapper{position:relative}.avatar-middle .actions-outside,.avatar-bottom .actions-outside{margin-top:var(--luzmo-chat-message-gap,var(--chat-message-gap));position:absolute;top:100%}.avatar-middle.position-left .actions-outside,.avatar-bottom.position-left .actions-outside{left:0}.avatar-middle.position-right .actions-outside,.avatar-bottom.position-right .actions-outside{right:0}.avatar-bottom.position-left .message{--luzmo-chat-message-message-border-radius-bottom-start:0}.avatar-bottom.position-right .message{--luzmo-chat-message-message-border-radius-bottom-end:0}.message-wrapper{gap:var(--luzmo-chat-message-gap,var(--chat-message-gap));flex-direction:column;min-width:0;display:flex}.message{padding:var(--luzmo-chat-message-content-vertical-padding,var(--chat-message-content-vertical-padding)) var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding));border-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-width:var(--luzmo-chat-message-message-border-width,var(--chat-message-message-border-width));border-style:solid;border-color:var(--highcontrast-chat-message-message-border-color,var(--luzmo-chat-message-message-border-color,var(--chat-message-message-border-color)));background-color:var(--highcontrast-chat-message-message-background-color,var(--luzmo-chat-message-message-background-color,var(--chat-message-message-background-color)));box-shadow:var(--luzmo-chat-message-message-shadow,var(--chat-message-message-shadow));color:var(--luzmo-chat-message-message-text-color,var(--chat-message-message-text-color));word-wrap:break-word;overflow-wrap:break-word;max-width:100%;position:relative}.message .header,.message .user-name,.message .datetime,.message .actions-inside{color:inherit}.message.squared-top-left{border-top-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-top-right{border-top-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-bottom-left{border-bottom-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-bottom-right{border-bottom-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=top-left]) .message{border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=top-right]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=bottom-left]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=bottom-right]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.header{align-items:baseline;gap:var(--luzmo-chat-message-header-gap,var(--chat-message-header-gap));margin-bottom:var(--luzmo-chat-message-header-margin-bottom,var(--chat-message-header-margin-bottom));flex-wrap:wrap;display:flex}:host([meta=outside]) .header{margin-bottom:0}.user-name{font-weight:var(--luzmo-chat-message-user-name-font-weight,var(--chat-message-user-name-font-weight));color:var(--luzmo-chat-message-user-name-color,var(--chat-message-user-name-color))}.datetime{font-size:var(--luzmo-chat-message-datetime-font-size,var(--chat-message-datetime-font-size));color:var(--luzmo-chat-message-datetime-color,var(--chat-message-datetime-color));opacity:var(--luzmo-chat-message-datetime-opacity,var(--chat-message-datetime-opacity))}.content{display:block}.markdown-content>*{margin-block:0 var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing))}.markdown-content>:first-child{margin-top:0}.markdown-content>:last-child{margin-bottom:0}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{margin-block:var(--luzmo-chat-message-markdown-heading-spacing-top,var(--chat-message-markdown-heading-spacing-top)) var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));font-weight:var(--luzmo-chat-message-markdown-heading-font-weight,var(--chat-message-markdown-heading-font-weight));line-height:var(--luzmo-chat-message-markdown-heading-line-height,var(--chat-message-markdown-heading-line-height))}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.3em}.markdown-content h3{font-size:1.15em}.markdown-content h4{font-size:1em}.markdown-content h5{font-size:.9em}.markdown-content h6{font-size:.85em}.markdown-content strong{font-weight:var(--luzmo-font-weight-bold,600)}.markdown-content em{font-style:italic}.markdown-content del{text-decoration:line-through}.markdown-content a{color:var(--luzmo-chat-message-markdown-link-color,var(--chat-message-markdown-link-color));text-underline-offset:.15em;text-decoration:underline}.markdown-content a:hover{text-decoration-thickness:2px}.markdown-content a:focus-visible{outline:var(--luzmo-indicator-width,1px) solid var(--luzmo-chat-message-markdown-link-color,var(--chat-message-markdown-link-color));outline-offset:2px;border-radius:var(--luzmo-border-radius-s)}.markdown-content code{font-family:var(--luzmo-chat-message-markdown-code-font-family,var(--chat-message-markdown-code-font-family));font-size:var(--luzmo-chat-message-markdown-code-font-size,var(--chat-message-markdown-code-font-size));background:var(--luzmo-chat-message-markdown-code-background,var(--chat-message-markdown-code-background));border-radius:var(--luzmo-chat-message-markdown-code-radius,var(--chat-message-markdown-code-radius));padding:.15em .35em}.markdown-content pre{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));padding:var(--luzmo-chat-message-markdown-pre-padding,var(--chat-message-markdown-pre-padding));background:var(--luzmo-chat-message-markdown-pre-background,var(--chat-message-markdown-pre-background));border-radius:var(--luzmo-chat-message-markdown-pre-radius,var(--chat-message-markdown-pre-radius));white-space:pre;scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-scrollbar-thumb-background) var(--luzmo-scrollbar-track-background);overflow-x:auto}.markdown-content pre code{font-size:var(--luzmo-chat-message-markdown-code-font-size,var(--chat-message-markdown-code-font-size));background:0 0;border-radius:0;padding:0}.markdown-content blockquote{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));border-inline-start:var(--luzmo-spacing-1,2px) solid var(--luzmo-chat-message-markdown-blockquote-border-color,var(--chat-message-markdown-blockquote-border-color));margin-inline:0;padding-inline-start:var(--luzmo-spacing-4)}.markdown-content blockquote>:first-child{margin-top:0}.markdown-content blockquote>:last-child{margin-bottom:0}.markdown-content ul,.markdown-content ol{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));padding-inline-start:var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent))}.markdown-content li,.markdown-content li>ul,.markdown-content li>ol{margin-block:var(--luzmo-spacing-1)}.markdown-content li.task-list-item{margin-inline-start:calc(-1 * var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent)));padding-inline-start:var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent));list-style:none}.markdown-content li.task-list-item input[type=checkbox]{vertical-align:middle;margin-inline-end:var(--luzmo-spacing-2)}.markdown-content table{width:max-content;max-width:100%;margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));border-collapse:collapse;display:block;overflow-x:auto}.markdown-content th,.markdown-content td{padding:var(--luzmo-chat-message-markdown-table-cell-padding,var(--chat-message-markdown-table-cell-padding));border:var(--luzmo-border-width,1px) solid var(--luzmo-chat-message-markdown-border-color,var(--chat-message-markdown-border-color));text-align:start}.markdown-content th{font-weight:var(--luzmo-font-weight-bold,600)}.markdown-content hr{margin-block:var(--luzmo-chat-message-markdown-heading-spacing-top,var(--chat-message-markdown-heading-spacing-top));border:0;border-top:var(--luzmo-border-width,1px) solid var(--luzmo-chat-message-markdown-border-color,var(--chat-message-markdown-border-color))}.markdown-content img{border-radius:var(--luzmo-border-radius);max-width:100%;height:auto}.actions{gap:var(--luzmo-chat-message-actions-gap,var(--chat-message-actions-gap));align-items:center;display:flex}.actions-inside{margin-top:var(--luzmo-chat-message-actions-margin-top,var(--chat-message-actions-margin-top))}.actions-outside{opacity:var(--luzmo-chat-message-actions-opacity,var(--chat-message-actions-opacity));transition:opacity var(--luzmo-chat-message-animation-duration,var(--chat-message-animation-duration)) ease-in-out}:host(:hover) .actions-outside,:host(:focus-within) .actions-outside{opacity:var(--luzmo-chat-message-actions-opacity-hover,var(--chat-message-actions-opacity-hover))}::slotted([slot=avatar]){display:block}::slotted([slot=actions]){align-items:center;display:inline-flex}.extra-actions{top:var(--luzmo-chat-message-extra-actions-top,var(--chat-message-extra-actions-top));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right));bottom:var(--luzmo-chat-message-extra-actions-bottom,var(--chat-message-extra-actions-bottom));left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left));padding:var(--luzmo-chat-message-extra-actions-vertical-padding,var(--chat-message-extra-actions-vertical-padding)) var(--luzmo-chat-message-extra-actions-horizontal-padding,var(--chat-message-extra-actions-horizontal-padding));opacity:0;pointer-events:none;transition:opacity var(--luzmo-chat-message-animation-duration,var(--chat-message-animation-duration)) ease-in-out;z-index:10;position:absolute}:host([position=left]) .extra-actions{left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left), var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding)));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right), auto)}:host([size=m]) .extra-actions{top:calc(-1 * var(--luzmo-spacing-5))}:host([size=m][position=right]) .extra-actions{left:calc(-1 * var(--luzmo-spacing-5));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right), auto)}:host([size=m][position=middle]) .extra-actions,:host([size=m][position=left]) .extra-actions{right:calc(-1 * var(--luzmo-spacing-5));left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left), auto)}.extra-actions-wrapper{background-color:var(--luzmo-chat-message-extra-actions-wrapper-background-color,var(--luzmo-background-color));border-radius:var(--luzmo-chat-message-extra-actions-wrapper-border-radius,var(--luzmo-border-radius));border-width:var(--luzmo-chat-message-extra-actions-wrapper-border-width,var(--luzmo-border-width));border-style:var(--luzmo-chat-message-extra-actions-wrapper-border-style,solid);border-color:var(--luzmo-chat-message-extra-actions-wrapper-border,var(--luzmo-border-color));padding:var(--luzmo-chat-message-extra-actions-wrapper-vertical-padding,var(--chat-message-extra-actions-wrapper-vertical-padding)) var(--luzmo-chat-message-extra-actions-wrapper-horizontal-padding,var(--chat-message-extra-actions-wrapper-horizontal-padding));position:var(--luzmo-chat-message-extra-actions-wrapper-position,var(--chat-message-extra-actions-wrapper-position), relative);top:var(--luzmo-chat-message-extra-actions-wrapper-top,var(--chat-message-extra-actions-wrapper-top));right:var(--luzmo-chat-message-extra-actions-wrapper-right,var(--chat-message-extra-actions-wrapper-right));bottom:var(--luzmo-chat-message-extra-actions-wrapper-bottom,var(--chat-message-extra-actions-wrapper-bottom));left:var(--luzmo-chat-message-extra-actions-wrapper-left,var(--chat-message-extra-actions-wrapper-left));align-items:center;display:inline-flex}:host(:hover) .extra-actions,:host(:focus-within) .extra-actions,:host(:active) .extra-actions{opacity:1;pointer-events:auto}::slotted([slot=extra-actions]){align-items:center;display:inline-flex}@media (forced-colors:active){.markdown-content th,.markdown-content td,.markdown-content hr{border-color:canvastext}.markdown-content pre,.markdown-content code{border:1px solid canvastext}.markdown-content pre code{border:0}.markdown-content blockquote{border-inline-start-color:canvastext}.markdown-content a{color:linktext}:host{--highcontrast-chat-message-message-background-color:Canvas;--highcontrast-chat-message-message-border-color:CanvasText;--highcontrast-chat-message-text-color:CanvasText}}:host{--chat-message-message-border-width:var(--luzmo-border-width);--chat-message-message-border-color:var(--luzmo-border-color);--chat-message-message-background-color:var(--luzmo-background-color-highlight);--chat-message-message-shadow:0 1px 2px var(--luzmo-shadow-color);--chat-message-message-text-color:inherit;--chat-message-font-family:var(--luzmo-font-family);--chat-message-font-size:var(--luzmo-font-size);--chat-message-line-height:1.5;--chat-message-text-color:var(--luzmo-font-color);--chat-message-header-gap:var(--luzmo-spacing-2);--chat-message-header-margin-bottom:var(--luzmo-spacing-1);--chat-message-user-name-font-weight:var(--luzmo-font-weight-bold,600);--chat-message-user-name-color:var(--luzmo-font-color);--chat-message-datetime-font-size:.75em;--chat-message-datetime-color:var(--luzmo-font-color-secondary);--chat-message-datetime-opacity:.7;--chat-message-actions-gap:var(--luzmo-spacing-1);--chat-message-actions-margin-top:var(--luzmo-spacing-2);--chat-message-actions-opacity:1;--chat-message-actions-opacity-hover:1;--chat-message-animation-duration:var(--luzmo-animation-duration,.15s);--chat-message-gap:var(--luzmo-spacing-4);--chat-message-message-to-avatar:var(--luzmo-spacing-3);--chat-message-max-width:80%;--chat-message-content-vertical-padding:var(--luzmo-spacing-3);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--chat-message-primary-background-color:var(--luzmo-primary);--chat-message-primary-border-color:var(--luzmo-primary);--chat-message-primary-text-color:var(--luzmo-primary-inverse-color);--chat-message-primary-text-color-outline:var(--luzmo-primary);--chat-message-secondary-background-color:var(--luzmo-secondary);--chat-message-secondary-border-color:var(--luzmo-secondary);--chat-message-secondary-text-color:var(--luzmo-secondary-inverse-color);--chat-message-secondary-text-color-outline:var(--luzmo-secondary);--chat-message-markdown-block-spacing:var(--luzmo-spacing-4);--chat-message-markdown-heading-font-weight:var(--luzmo-font-weight-bold);--chat-message-markdown-heading-spacing-top:var(--luzmo-spacing-5);--chat-message-markdown-heading-line-height:1.25;--chat-message-markdown-code-font-family:ui-monospace, sfmono-regular, \"SF Mono\", menlo, consolas, \"Liberation Mono\", monospace;--chat-message-markdown-code-font-size:.875em;--chat-message-markdown-code-background:var(--luzmo-background-color-highlight);--chat-message-markdown-code-radius:var(--luzmo-border-radius-s);--chat-message-markdown-pre-background:var(--luzmo-background-color-highlight);--chat-message-markdown-pre-radius:var(--luzmo-border-radius);--chat-message-markdown-pre-padding:var(--luzmo-spacing-4);--chat-message-markdown-border-color:var(--luzmo-border-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-border-color);--chat-message-markdown-link-color:var(--luzmo-primary);--chat-message-markdown-list-indent:var(--luzmo-spacing-5);--chat-message-markdown-table-cell-padding:var(--luzmo-spacing-2) var(--luzmo-spacing-3)}:host([position=middle]){--chat-message-max-width:90%}:host{--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-gap:var(--luzmo-spacing-2);--chat-message-message-to-avatar:var(--luzmo-spacing-4);--chat-message-max-width:80%;--chat-message-content-vertical-padding:var(--luzmo-spacing-4);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1))}:host([size=xs]){--chat-message-message-border-radius:var(--luzmo-border-radius);--chat-message-squared-border-radius:var(--luzmo-border-radius-xs);--chat-message-font-size:11px;--chat-message-content-vertical-padding:var(--luzmo-spacing-3);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--chat-message-gap:var(--luzmo-spacing-1);--chat-message-message-to-avatar:var(--luzmo-spacing-3)}:host([size=s]){--chat-message-message-border-radius:var(--luzmo-border-radius-l);--chat-message-squared-border-radius:var(--luzmo-border-radius-xs);--chat-message-font-size:12px;--chat-message-content-vertical-padding:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--chat-message-content-horizontal-padding:var(--luzmo-spacing-4);--chat-message-gap:var(--luzmo-spacing-2);--chat-message-message-to-avatar:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=l]){--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-font-size:16px;--chat-message-content-vertical-padding:var(--luzmo-spacing-5);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--chat-message-gap:var(--luzmo-spacing-3);--chat-message-message-to-avatar:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1))}:host([size=xl]){--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-font-size:18px;--chat-message-content-vertical-padding:var(--luzmo-spacing-5);--chat-message-content-horizontal-padding:var(--luzmo-spacing-5);--chat-message-gap:var(--luzmo-spacing-4);--chat-message-message-to-avatar:var(--luzmo-spacing-5)}:host([treatment=fill]){--chat-message-message-shadow:none}:host([variant=default][treatment=fill]){--chat-message-message-border-width:0}:host([variant=primary][treatment=fill]){--chat-message-message-background-color:var(--chat-message-primary-background-color);--chat-message-message-border-color:var(--chat-message-primary-border-color);--chat-message-message-text-color:var(--chat-message-primary-text-color)}:host([variant=secondary][treatment=fill]){--chat-message-message-background-color:var(--chat-message-secondary-background-color);--chat-message-message-border-color:var(--chat-message-secondary-border-color);--chat-message-message-text-color:var(--chat-message-secondary-text-color)}:host([variant=primary][treatment=fill]:not([quiet])){--chat-message-markdown-code-background:var(--luzmo-primary-down);--chat-message-markdown-pre-background:var(--luzmo-primary-down);--chat-message-markdown-link-color:var(--luzmo-primary-inverse-color);--chat-message-markdown-border-color:var(--luzmo-primary-inverse-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-primary-inverse-color)}:host([variant=secondary][treatment=fill]:not([quiet])){--chat-message-markdown-code-background:var(--luzmo-secondary-down);--chat-message-markdown-pre-background:var(--luzmo-secondary-down);--chat-message-markdown-link-color:var(--luzmo-secondary-inverse-color);--chat-message-markdown-border-color:var(--luzmo-secondary-inverse-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-secondary-inverse-color)}:host([treatment=outline]){--chat-message-message-background-color:transparent;--chat-message-message-shadow:none}:host([variant=primary][treatment=outline]){--chat-message-message-border-color:var(--chat-message-primary-border-color);--chat-message-message-text-color:var(--chat-message-primary-text-color-outline)}:host([variant=secondary][treatment=outline]){--chat-message-message-border-color:var(--chat-message-secondary-border-color);--chat-message-message-text-color:var(--chat-message-secondary-text-color-outline)}:host([quiet]){--chat-message-message-background-color:transparent;--chat-message-message-border-color:transparent;--chat-message-message-border-width:0;--chat-message-message-shadow:none;--chat-message-content-vertical-padding:0;--chat-message-content-horizontal-padding:0}:host([quiet][avatar-placement=top]){--chat-message-avatar-margin-top:calc((var(--chat-message-line-height) - 1) / 2 * 1em)}:host([quiet][avatar-placement=bottom]){--chat-message-avatar-margin-bottom:calc((var(--chat-message-line-height) - 1) / 2 * -1em)}:host([quiet][variant=primary]){--chat-message-primary-background-color:transparent;--chat-message-primary-border-color:transparent;--chat-message-primary-text-color:var(--luzmo-primary)}:host([quiet][variant=secondary]){--chat-message-secondary-background-color:transparent;--chat-message-secondary-border-color:transparent;--chat-message-secondary-text-color:var(--luzmo-secondary)}:host{--chat-message-extra-actions-top:var(--luzmo-chat-message-content-vertical-padding,var(--chat-message-content-vertical-padding));--chat-message-extra-actions-right:var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding));--chat-message-extra-actions-bottom:auto;--chat-message-extra-actions-left:auto;--chat-message-extra-actions-vertical-padding:0;--chat-message-extra-actions-horizontal-padding:0;--chat-message-extra-actions-wrapper-background-color:var(--luzmo-border-color);--chat-message-extra-actions-wrapper-border-radius:var(--luzmo-border-radius);--chat-message-extra-actions-wrapper-border:none;--chat-message-extra-actions-wrapper-vertical-padding:var(--luzmo-spacing-1);--chat-message-extra-actions-wrapper-horizontal-padding:var(--luzmo-spacing-1);--chat-message-extra-actions-wrapper-position:relative;--chat-message-extra-actions-wrapper-top:auto;--chat-message-extra-actions-wrapper-right:auto;--chat-message-extra-actions-wrapper-bottom:auto;--chat-message-extra-actions-wrapper-left:auto}", $ = class extends n(e, {
|
|
2282
|
+
var xn = ":host{width:100%;font-family:var(--luzmo-chat-message-font-family,var(--chat-message-font-family));font-size:var(--luzmo-chat-message-font-size,var(--chat-message-font-size));line-height:var(--luzmo-chat-message-line-height,var(--chat-message-line-height));color:var(--highcontrast-chat-message-text-color,var(--luzmo-chat-message-text-color,var(--chat-message-text-color)));display:flex}:host([position=left]){justify-content:flex-start}:host([position=right]){justify-content:flex-end}:host([position=middle]){justify-content:center}.container{gap:var(--luzmo-chat-message-message-to-avatar,var(--chat-message-message-to-avatar));max-width:var(--luzmo-chat-message-max-width,var(--chat-message-max-width));width:fit-content;display:flex}:host(:not([data-has-avatar])) .container{gap:0}:host(:not([data-has-avatar])) .avatar-wrapper{display:none}.position-left{flex-direction:row}.position-left .avatar-wrapper{order:0}.position-left .message-wrapper{order:1;align-items:flex-start}.position-left .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius-start,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius-bottom-start,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)))}.position-right{flex-direction:row-reverse}.position-right .avatar-wrapper{order:0}.position-right .message-wrapper{order:1;align-items:flex-end}.position-right .header{justify-content:flex-end}.position-right .message{border-top-right-radius:var(--luzmo-chat-message-message-border-radius-end,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius-bottom-end,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)))}.position-right .actions-outside{justify-content:flex-end}.position-middle .message-wrapper{align-items:center}.position-middle .header,.position-middle .actions-outside{justify-content:center}.avatar-wrapper{margin-top:var(--luzmo-chat-message-avatar-margin-top,var(--chat-message-avatar-margin-top,0));margin-bottom:var(--luzmo-chat-message-avatar-margin-bottom,var(--chat-message-avatar-margin-bottom,0));flex-shrink:0;align-items:flex-start;display:flex}:host([data-in-group]) .avatar-wrapper{min-width:var(--chat-message-avatar-size,var(--luzmo-avatar-size,var(--avatar-size,32px)));flex-basis:var(--chat-message-avatar-size,var(--luzmo-avatar-size,var(--avatar-size,32px)))}:host([data-in-group]:not([data-group-square-border])) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important}.avatar-top .avatar-wrapper{align-self:flex-start}.avatar-middle .avatar-wrapper{align-self:center}.avatar-bottom .avatar-wrapper{align-self:flex-end}.avatar-middle .message-wrapper,.avatar-bottom .message-wrapper{position:relative}.avatar-middle .actions-outside,.avatar-bottom .actions-outside{margin-top:var(--luzmo-chat-message-gap,var(--chat-message-gap));position:absolute;top:100%}.avatar-middle.position-left .actions-outside,.avatar-bottom.position-left .actions-outside{left:0}.avatar-middle.position-right .actions-outside,.avatar-bottom.position-right .actions-outside{right:0}.avatar-bottom.position-left .message{--luzmo-chat-message-message-border-radius-bottom-start:0}.avatar-bottom.position-right .message{--luzmo-chat-message-message-border-radius-bottom-end:0}.message-wrapper{gap:var(--luzmo-chat-message-gap,var(--chat-message-gap));flex-direction:column;min-width:0;display:flex}.message{padding:var(--luzmo-chat-message-content-vertical-padding,var(--chat-message-content-vertical-padding)) var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding));border-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-width:var(--luzmo-chat-message-message-border-width,var(--chat-message-message-border-width));border-style:solid;border-color:var(--highcontrast-chat-message-message-border-color,var(--luzmo-chat-message-message-border-color,var(--chat-message-message-border-color)));background-color:var(--highcontrast-chat-message-message-background-color,var(--luzmo-chat-message-message-background-color,var(--chat-message-message-background-color)));box-shadow:var(--luzmo-chat-message-message-shadow,var(--chat-message-message-shadow));color:var(--luzmo-chat-message-message-text-color,var(--chat-message-message-text-color));word-wrap:break-word;overflow-wrap:break-word;max-width:100%;position:relative}.message .header,.message .user-name,.message .datetime,.message .actions-inside{color:inherit}.message.squared-top-left{border-top-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-top-right{border-top-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-bottom-left{border-bottom-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-bottom-right{border-bottom-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=top-left]) .message{border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=top-right]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=bottom-left]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=bottom-right]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.header{align-items:baseline;gap:var(--luzmo-chat-message-header-gap,var(--chat-message-header-gap));margin-bottom:var(--luzmo-chat-message-header-margin-bottom,var(--chat-message-header-margin-bottom));flex-wrap:wrap;display:flex}:host([meta=outside]) .header{margin-bottom:0}.user-name{font-weight:var(--luzmo-chat-message-user-name-font-weight,var(--chat-message-user-name-font-weight));color:var(--luzmo-chat-message-user-name-color,var(--chat-message-user-name-color))}.datetime{font-size:var(--luzmo-chat-message-datetime-font-size,var(--chat-message-datetime-font-size));color:var(--luzmo-chat-message-datetime-color,var(--chat-message-datetime-color));opacity:var(--luzmo-chat-message-datetime-opacity,var(--chat-message-datetime-opacity))}.content{display:block}.markdown-content>*{margin-block:0 var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing))}.markdown-content>:first-child{margin-top:0}.markdown-content>:last-child{margin-bottom:0}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{margin-block:var(--luzmo-chat-message-markdown-heading-spacing-top,var(--chat-message-markdown-heading-spacing-top)) var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));font-weight:var(--luzmo-chat-message-markdown-heading-font-weight,var(--chat-message-markdown-heading-font-weight));line-height:var(--luzmo-chat-message-markdown-heading-line-height,var(--chat-message-markdown-heading-line-height))}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.3em}.markdown-content h3{font-size:1.15em}.markdown-content h4{font-size:1em}.markdown-content h5{font-size:.9em}.markdown-content h6{font-size:.85em}.markdown-content strong{font-weight:var(--luzmo-font-weight-bold,600)}.markdown-content em{font-style:italic}.markdown-content del{text-decoration:line-through}.markdown-content a{color:var(--luzmo-chat-message-markdown-link-color,var(--chat-message-markdown-link-color));text-underline-offset:.15em;text-decoration:underline}.markdown-content a:hover{text-decoration-thickness:2px}.markdown-content a:focus-visible{outline:var(--luzmo-indicator-width,1px) solid var(--luzmo-chat-message-markdown-link-color,var(--chat-message-markdown-link-color));outline-offset:2px;border-radius:var(--luzmo-border-radius-s)}.markdown-content code{font-family:var(--luzmo-chat-message-markdown-code-font-family,var(--chat-message-markdown-code-font-family));font-size:var(--luzmo-chat-message-markdown-code-font-size,var(--chat-message-markdown-code-font-size));background:var(--luzmo-chat-message-markdown-code-background,var(--chat-message-markdown-code-background));border-radius:var(--luzmo-chat-message-markdown-code-radius,var(--chat-message-markdown-code-radius));padding:.15em .35em}.markdown-content pre{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));padding:var(--luzmo-chat-message-markdown-pre-padding,var(--chat-message-markdown-pre-padding));background:var(--luzmo-chat-message-markdown-pre-background,var(--chat-message-markdown-pre-background));border-radius:var(--luzmo-chat-message-markdown-pre-radius,var(--chat-message-markdown-pre-radius));white-space:pre;scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-scrollbar-thumb-background) var(--luzmo-scrollbar-track-background);overflow-x:auto}.markdown-content pre code{font-size:var(--luzmo-chat-message-markdown-code-font-size,var(--chat-message-markdown-code-font-size));background:0 0;border-radius:0;padding:0}.markdown-content blockquote{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));border-inline-start:var(--luzmo-spacing-1,2px) solid var(--luzmo-chat-message-markdown-blockquote-border-color,var(--chat-message-markdown-blockquote-border-color));margin-inline:0;padding-inline-start:var(--luzmo-spacing-4)}.markdown-content blockquote>:first-child{margin-top:0}.markdown-content blockquote>:last-child{margin-bottom:0}.markdown-content ul,.markdown-content ol{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));padding-inline-start:var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent))}.markdown-content li,.markdown-content li>ul,.markdown-content li>ol{margin-block:var(--luzmo-spacing-1)}.markdown-content li.task-list-item{margin-inline-start:calc(-1 * var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent)));padding-inline-start:var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent));list-style:none}.markdown-content li.task-list-item input[type=checkbox]{vertical-align:middle;margin-inline-end:var(--luzmo-spacing-2)}.markdown-content table{width:max-content;max-width:100%;margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));border-collapse:collapse;display:block;overflow-x:auto}.markdown-content th,.markdown-content td{padding:var(--luzmo-chat-message-markdown-table-cell-padding,var(--chat-message-markdown-table-cell-padding));border:var(--luzmo-border-width,1px) solid var(--luzmo-chat-message-markdown-border-color,var(--chat-message-markdown-border-color));text-align:start}.markdown-content th{font-weight:var(--luzmo-font-weight-bold,600)}.markdown-content hr{margin-block:var(--luzmo-chat-message-markdown-heading-spacing-top,var(--chat-message-markdown-heading-spacing-top));border:0;border-top:var(--luzmo-border-width,1px) solid var(--luzmo-chat-message-markdown-border-color,var(--chat-message-markdown-border-color))}.markdown-content img{border-radius:var(--luzmo-border-radius);max-width:100%;height:auto}.actions{gap:var(--luzmo-chat-message-actions-gap,var(--chat-message-actions-gap));align-items:center;display:flex}.actions-inside{margin-top:var(--luzmo-chat-message-actions-margin-top,var(--chat-message-actions-margin-top))}.actions-outside{opacity:var(--luzmo-chat-message-actions-opacity,var(--chat-message-actions-opacity));transition:opacity var(--luzmo-chat-message-animation-duration,var(--chat-message-animation-duration)) ease-in-out}:host(:hover) .actions-outside,:host(:focus-within) .actions-outside{opacity:var(--luzmo-chat-message-actions-opacity-hover,var(--chat-message-actions-opacity-hover))}::slotted([slot=avatar]){display:block}::slotted([slot=actions]){align-items:center;display:inline-flex}.extra-actions{top:var(--luzmo-chat-message-extra-actions-top,var(--chat-message-extra-actions-top));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right));bottom:var(--luzmo-chat-message-extra-actions-bottom,var(--chat-message-extra-actions-bottom));left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left));padding:var(--luzmo-chat-message-extra-actions-vertical-padding,var(--chat-message-extra-actions-vertical-padding)) var(--luzmo-chat-message-extra-actions-horizontal-padding,var(--chat-message-extra-actions-horizontal-padding));opacity:0;pointer-events:none;transition:opacity var(--luzmo-chat-message-animation-duration,var(--chat-message-animation-duration)) ease-in-out;z-index:10;position:absolute}:host([position=left]) .extra-actions{left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left), var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding)));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right), auto)}:host([size=m]) .extra-actions{top:calc(-1 * var(--luzmo-spacing-5))}:host([size=m][position=right]) .extra-actions{left:calc(-1 * var(--luzmo-spacing-5));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right), auto)}:host([size=m][position=middle]) .extra-actions,:host([size=m][position=left]) .extra-actions{right:calc(-1 * var(--luzmo-spacing-5));left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left), auto)}.extra-actions-wrapper{background-color:var(--luzmo-chat-message-extra-actions-wrapper-background-color,var(--luzmo-background-color));border-radius:var(--luzmo-chat-message-extra-actions-wrapper-border-radius,var(--luzmo-border-radius));border-width:var(--luzmo-chat-message-extra-actions-wrapper-border-width,var(--luzmo-border-width));border-style:var(--luzmo-chat-message-extra-actions-wrapper-border-style,solid);border-color:var(--luzmo-chat-message-extra-actions-wrapper-border,var(--luzmo-border-color));padding:var(--luzmo-chat-message-extra-actions-wrapper-vertical-padding,var(--chat-message-extra-actions-wrapper-vertical-padding)) var(--luzmo-chat-message-extra-actions-wrapper-horizontal-padding,var(--chat-message-extra-actions-wrapper-horizontal-padding));position:var(--luzmo-chat-message-extra-actions-wrapper-position,var(--chat-message-extra-actions-wrapper-position), relative);top:var(--luzmo-chat-message-extra-actions-wrapper-top,var(--chat-message-extra-actions-wrapper-top));right:var(--luzmo-chat-message-extra-actions-wrapper-right,var(--chat-message-extra-actions-wrapper-right));bottom:var(--luzmo-chat-message-extra-actions-wrapper-bottom,var(--chat-message-extra-actions-wrapper-bottom));left:var(--luzmo-chat-message-extra-actions-wrapper-left,var(--chat-message-extra-actions-wrapper-left));align-items:center;display:inline-flex}:host(:hover) .extra-actions,:host(:focus-within) .extra-actions,:host(:active) .extra-actions{opacity:1;pointer-events:auto}::slotted([slot=extra-actions]){align-items:center;display:inline-flex}@media (forced-colors:active){.markdown-content th,.markdown-content td,.markdown-content hr{border-color:canvastext}.markdown-content pre,.markdown-content code{border:1px solid canvastext}.markdown-content pre code{border:0}.markdown-content blockquote{border-inline-start-color:canvastext}.markdown-content a{color:linktext}:host{--highcontrast-chat-message-message-background-color:Canvas;--highcontrast-chat-message-message-border-color:CanvasText;--highcontrast-chat-message-text-color:CanvasText}}:host{--chat-message-message-border-width:var(--luzmo-border-width);--chat-message-message-border-color:var(--luzmo-border-color);--chat-message-message-background-color:var(--luzmo-background-color-highlight);--chat-message-message-shadow:0 1px 2px var(--luzmo-shadow-color);--chat-message-message-text-color:inherit;--chat-message-font-family:var(--luzmo-font-family);--chat-message-font-size:var(--luzmo-font-size);--chat-message-line-height:1.5;--chat-message-text-color:var(--luzmo-font-color);--chat-message-header-gap:var(--luzmo-spacing-2);--chat-message-header-margin-bottom:var(--luzmo-spacing-1);--chat-message-user-name-font-weight:var(--luzmo-font-weight-bold,600);--chat-message-user-name-color:var(--luzmo-font-color);--chat-message-datetime-font-size:.75em;--chat-message-datetime-color:var(--luzmo-font-color-secondary);--chat-message-datetime-opacity:.7;--chat-message-actions-gap:var(--luzmo-spacing-1);--chat-message-actions-margin-top:var(--luzmo-spacing-2);--chat-message-actions-opacity:1;--chat-message-actions-opacity-hover:1;--chat-message-animation-duration:var(--luzmo-animation-duration,.15s);--chat-message-gap:var(--luzmo-spacing-4);--chat-message-message-to-avatar:var(--luzmo-spacing-3);--chat-message-max-width:80%;--chat-message-content-vertical-padding:var(--luzmo-spacing-3);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--chat-message-primary-background-color:var(--luzmo-primary);--chat-message-primary-border-color:var(--luzmo-primary);--chat-message-primary-text-color:var(--luzmo-primary-inverse-color);--chat-message-primary-text-color-outline:var(--luzmo-primary);--chat-message-secondary-background-color:var(--luzmo-secondary);--chat-message-secondary-border-color:var(--luzmo-secondary);--chat-message-secondary-text-color:var(--luzmo-secondary-inverse-color);--chat-message-secondary-text-color-outline:var(--luzmo-secondary);--chat-message-markdown-block-spacing:var(--luzmo-spacing-4);--chat-message-markdown-heading-font-weight:var(--luzmo-font-weight-bold);--chat-message-markdown-heading-spacing-top:var(--luzmo-spacing-5);--chat-message-markdown-heading-line-height:1.25;--chat-message-markdown-code-font-family:ui-monospace, sfmono-regular, \"SF Mono\", menlo, consolas, \"Liberation Mono\", monospace;--chat-message-markdown-code-font-size:.875em;--chat-message-markdown-code-background:var(--luzmo-background-color-highlight);--chat-message-markdown-code-radius:var(--luzmo-border-radius-s);--chat-message-markdown-pre-background:var(--luzmo-background-color-highlight);--chat-message-markdown-pre-radius:var(--luzmo-border-radius);--chat-message-markdown-pre-padding:var(--luzmo-spacing-4);--chat-message-markdown-border-color:var(--luzmo-border-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-border-color);--chat-message-markdown-link-color:var(--luzmo-primary);--chat-message-markdown-list-indent:var(--luzmo-spacing-5);--chat-message-markdown-table-cell-padding:var(--luzmo-spacing-2) var(--luzmo-spacing-3)}:host([position=middle]){--chat-message-max-width:90%}:host{--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-gap:var(--luzmo-spacing-2);--chat-message-message-to-avatar:var(--luzmo-spacing-4);--chat-message-max-width:80%;--chat-message-content-vertical-padding:var(--luzmo-spacing-4);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1))}:host([size=xs]){--chat-message-message-border-radius:var(--luzmo-border-radius);--chat-message-squared-border-radius:var(--luzmo-border-radius-xs);--chat-message-font-size:11px;--chat-message-content-vertical-padding:var(--luzmo-spacing-3);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--chat-message-gap:var(--luzmo-spacing-1);--chat-message-message-to-avatar:var(--luzmo-spacing-3)}:host([size=s]){--chat-message-message-border-radius:var(--luzmo-border-radius-l);--chat-message-squared-border-radius:var(--luzmo-border-radius-xs);--chat-message-font-size:12px;--chat-message-content-vertical-padding:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--chat-message-content-horizontal-padding:var(--luzmo-spacing-4);--chat-message-gap:var(--luzmo-spacing-2);--chat-message-message-to-avatar:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=l]){--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-font-size:16px;--chat-message-content-vertical-padding:var(--luzmo-spacing-5);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--chat-message-gap:var(--luzmo-spacing-3);--chat-message-message-to-avatar:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1))}:host([size=xl]){--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-font-size:18px;--chat-message-content-vertical-padding:var(--luzmo-spacing-5);--chat-message-content-horizontal-padding:var(--luzmo-spacing-5);--chat-message-gap:var(--luzmo-spacing-4);--chat-message-message-to-avatar:var(--luzmo-spacing-5)}:host([treatment=fill]){--chat-message-message-shadow:none}:host([variant=default][treatment=fill]){--chat-message-message-border-width:0}:host([variant=primary][treatment=fill]){--chat-message-message-background-color:var(--chat-message-primary-background-color);--chat-message-message-border-color:var(--chat-message-primary-border-color);--chat-message-message-text-color:var(--chat-message-primary-text-color)}:host([variant=secondary][treatment=fill]){--chat-message-message-background-color:var(--chat-message-secondary-background-color);--chat-message-message-border-color:var(--chat-message-secondary-border-color);--chat-message-message-text-color:var(--chat-message-secondary-text-color)}:host([variant=primary][treatment=fill]:not([quiet])){--chat-message-markdown-code-background:var(--luzmo-primary-down);--chat-message-markdown-pre-background:var(--luzmo-primary-down);--chat-message-markdown-link-color:var(--luzmo-primary-inverse-color);--chat-message-markdown-border-color:var(--luzmo-primary-inverse-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-primary-inverse-color)}:host([variant=secondary][treatment=fill]:not([quiet])){--chat-message-markdown-code-background:var(--luzmo-secondary-down);--chat-message-markdown-pre-background:var(--luzmo-secondary-down);--chat-message-markdown-link-color:var(--luzmo-secondary-inverse-color);--chat-message-markdown-border-color:var(--luzmo-secondary-inverse-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-secondary-inverse-color)}:host([treatment=outline]){--chat-message-message-background-color:transparent;--chat-message-message-shadow:none}:host([variant=primary][treatment=outline]){--chat-message-message-border-color:var(--chat-message-primary-border-color);--chat-message-message-text-color:var(--chat-message-primary-text-color-outline)}:host([variant=secondary][treatment=outline]){--chat-message-message-border-color:var(--chat-message-secondary-border-color);--chat-message-message-text-color:var(--chat-message-secondary-text-color-outline)}:host([quiet]){--chat-message-message-background-color:transparent;--chat-message-message-border-color:transparent;--chat-message-message-border-width:0;--chat-message-message-shadow:none;--chat-message-content-vertical-padding:0;--chat-message-content-horizontal-padding:0}:host([quiet][avatar-placement=top]){--chat-message-avatar-margin-top:calc((var(--chat-message-line-height) - 1) / 2 * 1em)}:host([quiet][avatar-placement=bottom]){--chat-message-avatar-margin-bottom:calc((var(--chat-message-line-height) - 1) / 2 * -1em)}:host([quiet][variant=primary]){--chat-message-primary-background-color:transparent;--chat-message-primary-border-color:transparent;--chat-message-primary-text-color:var(--luzmo-primary)}:host([quiet][variant=secondary]){--chat-message-secondary-background-color:transparent;--chat-message-secondary-border-color:transparent;--chat-message-secondary-text-color:var(--luzmo-secondary)}:host{--chat-message-extra-actions-top:var(--luzmo-chat-message-content-vertical-padding,var(--chat-message-content-vertical-padding));--chat-message-extra-actions-right:var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding));--chat-message-extra-actions-bottom:auto;--chat-message-extra-actions-left:auto;--chat-message-extra-actions-vertical-padding:0;--chat-message-extra-actions-horizontal-padding:0;--chat-message-extra-actions-wrapper-background-color:var(--luzmo-border-color);--chat-message-extra-actions-wrapper-border-radius:var(--luzmo-border-radius);--chat-message-extra-actions-wrapper-border:none;--chat-message-extra-actions-wrapper-vertical-padding:var(--luzmo-spacing-1);--chat-message-extra-actions-wrapper-horizontal-padding:var(--luzmo-spacing-1);--chat-message-extra-actions-wrapper-position:relative;--chat-message-extra-actions-wrapper-top:auto;--chat-message-extra-actions-wrapper-right:auto;--chat-message-extra-actions-wrapper-bottom:auto;--chat-message-extra-actions-wrapper-left:auto}", Q = class extends n(e, {
|
|
2247
2283
|
validSizes: [
|
|
2248
2284
|
"xs",
|
|
2249
2285
|
"s",
|
|
@@ -2271,7 +2307,7 @@ var gn = ":host{width:100%;font-family:var(--luzmo-chat-message-font-family,var(
|
|
|
2271
2307
|
this.defaultSlotObserver.disconnect(), super.disconnectedCallback();
|
|
2272
2308
|
}
|
|
2273
2309
|
static get styles() {
|
|
2274
|
-
return [o(
|
|
2310
|
+
return [o(xn)];
|
|
2275
2311
|
}
|
|
2276
2312
|
_handleAvatarSlotChange(e) {
|
|
2277
2313
|
let t = e.target;
|
|
@@ -2297,7 +2333,7 @@ var gn = ":host{width:100%;font-family:var(--luzmo-chat-message-font-family,var(
|
|
|
2297
2333
|
let e = [...this.childNodes].filter((e) => e.nodeType !== Node.ELEMENT_NODE || !e.hasAttribute("slot"));
|
|
2298
2334
|
if (e.some((e) => e.nodeType === Node.ELEMENT_NODE)) return;
|
|
2299
2335
|
let t = e.filter((e) => e.nodeType === Node.TEXT_NODE || e.nodeType === Node.CDATA_SECTION_NODE).map((e) => e.textContent || "").join("").replaceAll("\r\n", "\n").replaceAll("\r", "\n").trim();
|
|
2300
|
-
if (t) return
|
|
2336
|
+
if (t) return ut.sanitize(Z.parse(t, {
|
|
2301
2337
|
gfm: !0,
|
|
2302
2338
|
async: !1
|
|
2303
2339
|
}), { USE_PROFILES: { html: !0 } });
|
|
@@ -2435,38 +2471,38 @@ var gn = ":host{width:100%;font-family:var(--luzmo-chat-message-font-family,var(
|
|
|
2435
2471
|
t([s({
|
|
2436
2472
|
type: String,
|
|
2437
2473
|
reflect: !0
|
|
2438
|
-
})],
|
|
2474
|
+
})], Q.prototype, "position", void 0), t([s({
|
|
2439
2475
|
type: String,
|
|
2440
2476
|
reflect: !0
|
|
2441
|
-
})],
|
|
2477
|
+
})], Q.prototype, "variant", void 0), t([s({
|
|
2442
2478
|
type: String,
|
|
2443
2479
|
reflect: !0
|
|
2444
|
-
})],
|
|
2480
|
+
})], Q.prototype, "treatment", void 0), t([s({
|
|
2445
2481
|
type: Boolean,
|
|
2446
2482
|
reflect: !0
|
|
2447
|
-
})],
|
|
2483
|
+
})], Q.prototype, "quiet", void 0), t([s({
|
|
2448
2484
|
type: String,
|
|
2449
2485
|
attribute: "name"
|
|
2450
|
-
})],
|
|
2486
|
+
})], Q.prototype, "name", void 0), t([s({
|
|
2451
2487
|
type: String,
|
|
2452
2488
|
attribute: "datetime"
|
|
2453
|
-
})],
|
|
2489
|
+
})], Q.prototype, "datetime", void 0), t([s({
|
|
2454
2490
|
type: Object,
|
|
2455
2491
|
attribute: "datetime-format-options"
|
|
2456
|
-
})],
|
|
2492
|
+
})], Q.prototype, "datetimeFormatOptions", void 0), t([s({
|
|
2457
2493
|
type: String,
|
|
2458
2494
|
attribute: "datetime-language"
|
|
2459
|
-
})],
|
|
2495
|
+
})], Q.prototype, "datetimeLanguage", void 0), t([s({
|
|
2460
2496
|
type: String,
|
|
2461
2497
|
reflect: !0
|
|
2462
|
-
})],
|
|
2498
|
+
})], Q.prototype, "meta", void 0), t([s({
|
|
2463
2499
|
type: String,
|
|
2464
2500
|
reflect: !0,
|
|
2465
2501
|
attribute: "actions"
|
|
2466
|
-
})],
|
|
2502
|
+
})], Q.prototype, "actionsPosition", void 0), t([s({
|
|
2467
2503
|
type: String,
|
|
2468
2504
|
reflect: !0,
|
|
2469
2505
|
attribute: "avatar-placement"
|
|
2470
|
-
})],
|
|
2506
|
+
})], Q.prototype, "avatarPlacement", void 0), t([c()], Q.prototype, "_hasAvatar", void 0), t([c()], Q.prototype, "_hasActions", void 0), t([c()], Q.prototype, "_hasExtraActions", void 0), customElements.get("luzmo-chat-message") || customElements.define("luzmo-chat-message", Q);
|
|
2471
2507
|
//#endregion
|
|
2472
|
-
export {
|
|
2508
|
+
export { Q as t };
|