@squirrel-cloud/ui-vue 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as F, openBlock as m, createElementVNode as E, createStaticVNode as uu, defineComponent as O, computed as y, createBlock as L, unref as b, normalizeClass as J, withCtx as Z, createCommentVNode as U, createTextVNode as cu, resolveDynamicComponent as me, toDisplayString as re, h as Ju, ref as R, normalizeStyle as ee, onMounted as be, onBeforeUnmount as
|
|
1
|
+
import { createElementBlock as F, openBlock as m, createElementVNode as E, createStaticVNode as uu, defineComponent as O, computed as y, createBlock as L, unref as b, normalizeClass as J, withCtx as Z, createCommentVNode as U, createTextVNode as cu, resolveDynamicComponent as me, toDisplayString as re, h as Ju, ref as R, normalizeStyle as ee, onMounted as be, onBeforeUnmount as Ze, Transition as Te, withDirectives as de, renderSlot as W, vShow as Ve, useSlots as pu, createVNode as T, inject as _e, provide as tu, toRef as oe, mergeModels as se, useModel as ie, watch as fe, vModelCheckbox as Kt, toRaw as We, Fragment as xe, renderList as Ue, Teleport as Qt, mergeProps as Ge, shallowRef as le, withModifiers as Be, nextTick as Ku, vModelDynamic as u0, vModelText as t0, render as _t, cloneVNode as n0, Text as o0, Comment as r0, vModelRadio as en } from "vue";
|
|
2
2
|
const X = (e, u) => {
|
|
3
3
|
const t = e.__vccOpts || e;
|
|
4
4
|
for (const [n, o] of u)
|
|
@@ -457,7 +457,7 @@ const er = /* @__PURE__ */ X(Jo, [["render", Qo]]), st = {
|
|
|
457
457
|
const o = [];
|
|
458
458
|
return u.type && o.push(`is-${u.type}`), o;
|
|
459
459
|
}), n = y(() => u.icon ? u.icon : u.showIcon && u.type ? st[u.type] : void 0);
|
|
460
|
-
return (o, r) => (m(), L(b(
|
|
460
|
+
return (o, r) => (m(), L(b(Ie), {
|
|
461
461
|
class: J(["sq-alert", t.value])
|
|
462
462
|
}, {
|
|
463
463
|
default: Z(() => [
|
|
@@ -1481,16 +1481,16 @@ ou.prototype.render = function(e, u, t) {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
return n;
|
|
1483
1483
|
};
|
|
1484
|
-
function
|
|
1484
|
+
function ae() {
|
|
1485
1485
|
this.__rules__ = [], this.__cache__ = null;
|
|
1486
1486
|
}
|
|
1487
|
-
|
|
1487
|
+
ae.prototype.__find__ = function(e) {
|
|
1488
1488
|
for (let u = 0; u < this.__rules__.length; u++)
|
|
1489
1489
|
if (this.__rules__[u].name === e)
|
|
1490
1490
|
return u;
|
|
1491
1491
|
return -1;
|
|
1492
1492
|
};
|
|
1493
|
-
|
|
1493
|
+
ae.prototype.__compile__ = function() {
|
|
1494
1494
|
const e = this, u = [""];
|
|
1495
1495
|
e.__rules__.forEach(function(t) {
|
|
1496
1496
|
t.enabled && t.alt.forEach(function(n) {
|
|
@@ -1502,13 +1502,13 @@ le.prototype.__compile__ = function() {
|
|
|
1502
1502
|
});
|
|
1503
1503
|
});
|
|
1504
1504
|
};
|
|
1505
|
-
|
|
1505
|
+
ae.prototype.at = function(e, u, t) {
|
|
1506
1506
|
const n = this.__find__(e), o = t || {};
|
|
1507
1507
|
if (n === -1)
|
|
1508
1508
|
throw new Error("Parser rule not found: " + e);
|
|
1509
1509
|
this.__rules__[n].fn = u, this.__rules__[n].alt = o.alt || [], this.__cache__ = null;
|
|
1510
1510
|
};
|
|
1511
|
-
|
|
1511
|
+
ae.prototype.before = function(e, u, t, n) {
|
|
1512
1512
|
const o = this.__find__(e), r = n || {};
|
|
1513
1513
|
if (o === -1)
|
|
1514
1514
|
throw new Error("Parser rule not found: " + e);
|
|
@@ -1519,7 +1519,7 @@ le.prototype.before = function(e, u, t, n) {
|
|
|
1519
1519
|
alt: r.alt || []
|
|
1520
1520
|
}), this.__cache__ = null;
|
|
1521
1521
|
};
|
|
1522
|
-
|
|
1522
|
+
ae.prototype.after = function(e, u, t, n) {
|
|
1523
1523
|
const o = this.__find__(e), r = n || {};
|
|
1524
1524
|
if (o === -1)
|
|
1525
1525
|
throw new Error("Parser rule not found: " + e);
|
|
@@ -1530,7 +1530,7 @@ le.prototype.after = function(e, u, t, n) {
|
|
|
1530
1530
|
alt: r.alt || []
|
|
1531
1531
|
}), this.__cache__ = null;
|
|
1532
1532
|
};
|
|
1533
|
-
|
|
1533
|
+
ae.prototype.push = function(e, u, t) {
|
|
1534
1534
|
const n = t || {};
|
|
1535
1535
|
this.__rules__.push({
|
|
1536
1536
|
name: e,
|
|
@@ -1539,7 +1539,7 @@ le.prototype.push = function(e, u, t) {
|
|
|
1539
1539
|
alt: n.alt || []
|
|
1540
1540
|
}), this.__cache__ = null;
|
|
1541
1541
|
};
|
|
1542
|
-
|
|
1542
|
+
ae.prototype.enable = function(e, u) {
|
|
1543
1543
|
Array.isArray(e) || (e = [e]);
|
|
1544
1544
|
const t = [];
|
|
1545
1545
|
return e.forEach(function(n) {
|
|
@@ -1552,12 +1552,12 @@ le.prototype.enable = function(e, u) {
|
|
|
1552
1552
|
this.__rules__[o].enabled = !0, t.push(n);
|
|
1553
1553
|
}, this), this.__cache__ = null, t;
|
|
1554
1554
|
};
|
|
1555
|
-
|
|
1555
|
+
ae.prototype.enableOnly = function(e, u) {
|
|
1556
1556
|
Array.isArray(e) || (e = [e]), this.__rules__.forEach(function(t) {
|
|
1557
1557
|
t.enabled = !1;
|
|
1558
1558
|
}), this.enable(e, u);
|
|
1559
1559
|
};
|
|
1560
|
-
|
|
1560
|
+
ae.prototype.disable = function(e, u) {
|
|
1561
1561
|
Array.isArray(e) || (e = [e]);
|
|
1562
1562
|
const t = [];
|
|
1563
1563
|
return e.forEach(function(n) {
|
|
@@ -1570,7 +1570,7 @@ le.prototype.disable = function(e, u) {
|
|
|
1570
1570
|
this.__rules__[o].enabled = !1, t.push(n);
|
|
1571
1571
|
}, this), this.__cache__ = null, t;
|
|
1572
1572
|
};
|
|
1573
|
-
|
|
1573
|
+
ae.prototype.getRules = function(e) {
|
|
1574
1574
|
return this.__cache__ === null && this.__compile__(), this.__cache__[e] || [];
|
|
1575
1575
|
};
|
|
1576
1576
|
function gn(e, u, t) {
|
|
@@ -1776,7 +1776,7 @@ const Zu = [
|
|
|
1776
1776
|
["text_join", hs]
|
|
1777
1777
|
];
|
|
1778
1778
|
function pt() {
|
|
1779
|
-
this.ruler = new
|
|
1779
|
+
this.ruler = new ae();
|
|
1780
1780
|
for (let e = 0; e < Zu.length; e++)
|
|
1781
1781
|
this.ruler.push(Zu[e][0], Zu[e][1]);
|
|
1782
1782
|
}
|
|
@@ -2479,7 +2479,7 @@ const _u = [
|
|
|
2479
2479
|
["paragraph", Ps]
|
|
2480
2480
|
];
|
|
2481
2481
|
function Mu() {
|
|
2482
|
-
this.ruler = new
|
|
2482
|
+
this.ruler = new ae();
|
|
2483
2483
|
for (let e = 0; e < _u.length; e++)
|
|
2484
2484
|
this.ruler.push(_u[e][0], _u[e][1], { alt: (_u[e][2] || []).slice() });
|
|
2485
2485
|
}
|
|
@@ -3012,10 +3012,10 @@ const Uu = [
|
|
|
3012
3012
|
["fragments_join", dc]
|
|
3013
3013
|
];
|
|
3014
3014
|
function mu() {
|
|
3015
|
-
this.ruler = new
|
|
3015
|
+
this.ruler = new ae();
|
|
3016
3016
|
for (let e = 0; e < Uu.length; e++)
|
|
3017
3017
|
this.ruler.push(Uu[e][0], Uu[e][1]);
|
|
3018
|
-
this.ruler2 = new
|
|
3018
|
+
this.ruler2 = new ae();
|
|
3019
3019
|
for (let e = 0; e < Hu.length; e++)
|
|
3020
3020
|
this.ruler2.push(Hu[e][0], Hu[e][1]);
|
|
3021
3021
|
}
|
|
@@ -3927,7 +3927,7 @@ const { md2tokens: jc, tokens2vueh: Wc } = Uc(), Gc = "sq-article", Xc = O({
|
|
|
3927
3927
|
a(), t(), window.addEventListener("scroll", t);
|
|
3928
3928
|
const d = document.querySelector(o.target) ?? document.body;
|
|
3929
3929
|
n.observe(d), (h = window.visualViewport) == null || h.addEventListener("resize", a);
|
|
3930
|
-
}),
|
|
3930
|
+
}), Ze(() => {
|
|
3931
3931
|
var d;
|
|
3932
3932
|
window.removeEventListener("scroll", t), n.disconnect(), (d = window.visualViewport) == null || d.removeEventListener("resize", a);
|
|
3933
3933
|
});
|
|
@@ -3947,7 +3947,7 @@ const { md2tokens: jc, tokens2vueh: Wc } = Uc(), Gc = "sq-article", Xc = O({
|
|
|
3947
3947
|
default: Z(() => {
|
|
3948
3948
|
var p, f, g;
|
|
3949
3949
|
return [
|
|
3950
|
-
|
|
3950
|
+
de(E("div", Qc, [
|
|
3951
3951
|
E("div", {
|
|
3952
3952
|
class: "sq-backtop-wrap",
|
|
3953
3953
|
onClick: l
|
|
@@ -3967,7 +3967,7 @@ const { md2tokens: jc, tokens2vueh: Wc } = Uc(), Gc = "sq-article", Xc = O({
|
|
|
3967
3967
|
])
|
|
3968
3968
|
])
|
|
3969
3969
|
], 512), [
|
|
3970
|
-
[
|
|
3970
|
+
[Ve, c.value]
|
|
3971
3971
|
])
|
|
3972
3972
|
];
|
|
3973
3973
|
}),
|
|
@@ -4025,7 +4025,7 @@ const { md2tokens: jc, tokens2vueh: Wc } = Uc(), Gc = "sq-article", Xc = O({
|
|
|
4025
4025
|
name: ni,
|
|
4026
4026
|
__name: "blur",
|
|
4027
4027
|
setup(e) {
|
|
4028
|
-
return (u, t) => (m(), L(b(
|
|
4028
|
+
return (u, t) => (m(), L(b(Ie), { class: "sq-blur" }, {
|
|
4029
4029
|
default: Z(() => [
|
|
4030
4030
|
W(u.$slots, "default")
|
|
4031
4031
|
]),
|
|
@@ -4247,7 +4247,7 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4247
4247
|
type: n.nativeType,
|
|
4248
4248
|
onClick: p[0] || (p[0] = (f) => t("click", f))
|
|
4249
4249
|
}, [
|
|
4250
|
-
T(b(
|
|
4250
|
+
T(b(Ie), {
|
|
4251
4251
|
size: b(r) === "lg" ? "md" : b(r)
|
|
4252
4252
|
}, {
|
|
4253
4253
|
default: Z(() => [
|
|
@@ -4336,7 +4336,7 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4336
4336
|
checkboxName: c,
|
|
4337
4337
|
checkboxVariant: i,
|
|
4338
4338
|
groupContext: a
|
|
4339
|
-
} = si(n), l =
|
|
4339
|
+
} = si(n), l = ie(e, "checked"), d = y(() => {
|
|
4340
4340
|
const p = [], f = b(o), g = b(r), _ = b(i);
|
|
4341
4341
|
return f !== "md" && p.push(`sq-selection--${f}`), h.value && p.push("is-checked"), g && p.push("is-disabled"), _ && p.push(`is-${_}`), p;
|
|
4342
4342
|
}), h = y(() => a ? b(a).list.includes(n.value) : l.value);
|
|
@@ -4352,7 +4352,7 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4352
4352
|
}), (p, f) => (m(), F("label", {
|
|
4353
4353
|
class: J(["sq-selection sq-checkbox", d.value])
|
|
4354
4354
|
}, [
|
|
4355
|
-
|
|
4355
|
+
de(E("input", {
|
|
4356
4356
|
type: "checkbox",
|
|
4357
4357
|
autofocus: n.autofocus,
|
|
4358
4358
|
name: b(c),
|
|
@@ -4442,11 +4442,11 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4442
4442
|
setup(e) {
|
|
4443
4443
|
const { nextZIndex: u } = ct();
|
|
4444
4444
|
let t;
|
|
4445
|
-
const n = e, o = R(0), r = R(!1), s =
|
|
4445
|
+
const n = e, o = R(0), r = R(!1), s = ie(e, "visible");
|
|
4446
4446
|
r.value = s.value, fe(s, (l) => {
|
|
4447
4447
|
const d = document.scrollingElement;
|
|
4448
4448
|
l ? (t = d.style.overflow, d.style.overflow = "hidden", o.value = u(), r.value = !0, document.addEventListener("keydown", c)) : (d.style.overflow = t, document.removeEventListener("keydown", c));
|
|
4449
|
-
}),
|
|
4449
|
+
}), Ze(() => {
|
|
4450
4450
|
document.removeEventListener("keydown", c);
|
|
4451
4451
|
});
|
|
4452
4452
|
function c(l) {
|
|
@@ -4469,14 +4469,14 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4469
4469
|
return (l, d) => (m(), L(Qt, { to: "body" }, [
|
|
4470
4470
|
T(Te, { name: "sq-fade" }, {
|
|
4471
4471
|
default: Z(() => [
|
|
4472
|
-
r.value ?
|
|
4472
|
+
r.value ? de((m(), F("div", Ge({
|
|
4473
4473
|
key: 0,
|
|
4474
4474
|
class: "sq-mask",
|
|
4475
4475
|
style: { zIndex: o.value }
|
|
4476
4476
|
}, l.$attrs, { onClick: i }), [
|
|
4477
4477
|
W(l.$slots, "default")
|
|
4478
4478
|
], 16)), [
|
|
4479
|
-
[
|
|
4479
|
+
[Ve, s.value]
|
|
4480
4480
|
]) : U("", !0)
|
|
4481
4481
|
]),
|
|
4482
4482
|
_: 3
|
|
@@ -4509,7 +4509,7 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4509
4509
|
}),
|
|
4510
4510
|
emits: ["update:visible"],
|
|
4511
4511
|
setup(e) {
|
|
4512
|
-
const u = pu(), t = e, n = R(!1), o = R(!1), r =
|
|
4512
|
+
const u = pu(), t = e, n = R(!1), o = R(!1), r = ie(e, "visible"), s = y(() => !!t.title || !!u.header), c = y(() => {
|
|
4513
4513
|
const h = [];
|
|
4514
4514
|
return t.type && h.push(`is-${t.type}`), s.value && h.push("has-header"), h;
|
|
4515
4515
|
}), i = y(() => t.type ? st[t.type] : void 0);
|
|
@@ -4534,7 +4534,7 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4534
4534
|
onClose: p[1] || (p[1] = () => a(t.onClose))
|
|
4535
4535
|
}, {
|
|
4536
4536
|
default: Z(() => [
|
|
4537
|
-
|
|
4537
|
+
E("div", {
|
|
4538
4538
|
class: J(["sq-dialog", c.value])
|
|
4539
4539
|
}, [
|
|
4540
4540
|
s.value ? (m(), F("div", Ai, [
|
|
@@ -4582,9 +4582,7 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4582
4582
|
}, 8, ["type", "disabled", "loading"])
|
|
4583
4583
|
])
|
|
4584
4584
|
])) : U("", !0)
|
|
4585
|
-
], 2)
|
|
4586
|
-
[Ie, r.value]
|
|
4587
|
-
])
|
|
4585
|
+
], 2)
|
|
4588
4586
|
]),
|
|
4589
4587
|
_: 3
|
|
4590
4588
|
}, 8, ["visible"]));
|
|
@@ -4608,7 +4606,7 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4608
4606
|
class: J(["sq-divider", n.value]),
|
|
4609
4607
|
style: ee({ "--divider-line-type": t.variant })
|
|
4610
4608
|
}, [
|
|
4611
|
-
b(u).default && t.direction !== "vertical" ? (m(), L(b(
|
|
4609
|
+
b(u).default && t.direction !== "vertical" ? (m(), L(b(Ie), {
|
|
4612
4610
|
key: 0,
|
|
4613
4611
|
ellipsis: t.ellipsis,
|
|
4614
4612
|
size: t.size
|
|
@@ -4967,9 +4965,9 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4967
4965
|
}
|
|
4968
4966
|
];
|
|
4969
4967
|
let t;
|
|
4970
|
-
const n = e, o = R("edit"), r = R([]), s = R(!1), c = R(""), i = R(), a = R({}), l =
|
|
4968
|
+
const n = e, o = R("edit"), r = R([]), s = R(!1), c = R(""), i = R(), a = R({}), l = le(null), d = le(null), h = le(null), p = le(
|
|
4971
4969
|
null
|
|
4972
|
-
), f =
|
|
4970
|
+
), f = ie(e, "value"), g = y(() => {
|
|
4973
4971
|
const q = [];
|
|
4974
4972
|
return n.size !== "md" && q.push(`sq-editor--${n.size}`), n.round && q.push("is-round"), q;
|
|
4975
4973
|
}), _ = y(
|
|
@@ -4982,7 +4980,7 @@ const di = ["disabled", "form", "type"], fi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4982
4980
|
);
|
|
4983
4981
|
be(() => {
|
|
4984
4982
|
document.addEventListener("selectionchange", $), document.addEventListener("click", M);
|
|
4985
|
-
}),
|
|
4983
|
+
}), Ze(() => {
|
|
4986
4984
|
document.removeEventListener("selectionchange", $), document.removeEventListener("click", M);
|
|
4987
4985
|
});
|
|
4988
4986
|
function C(q) {
|
|
@@ -5087,7 +5085,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5087
5085
|
onClick: D[2] || (D[2] = Be(() => {
|
|
5088
5086
|
}, ["stop"]))
|
|
5089
5087
|
}, [
|
|
5090
|
-
|
|
5088
|
+
de(E("div", Wi, [
|
|
5091
5089
|
E("div", Gi, [
|
|
5092
5090
|
T(zi, {
|
|
5093
5091
|
ref_key: "boldRef",
|
|
@@ -5170,7 +5168,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5170
5168
|
onKeydown: k
|
|
5171
5169
|
}, null, 8, ["size", "round", "disabled", "placeholder", "maxlength", "minlength", "value"])
|
|
5172
5170
|
], 512), [
|
|
5173
|
-
[
|
|
5171
|
+
[Ve, o.value === "edit"]
|
|
5174
5172
|
]),
|
|
5175
5173
|
o.value === "preview" ? (m(), L(b(Xc), {
|
|
5176
5174
|
key: 0,
|
|
@@ -5237,11 +5235,11 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5237
5235
|
onAfterLeave: c
|
|
5238
5236
|
}, {
|
|
5239
5237
|
default: Z(() => [
|
|
5240
|
-
|
|
5238
|
+
de(E("span", {
|
|
5241
5239
|
class: "sq-form-item-check",
|
|
5242
5240
|
textContent: re(o.value)
|
|
5243
5241
|
}, null, 8, Qi), [
|
|
5244
|
-
[
|
|
5242
|
+
[Ve, t.errorMsg]
|
|
5245
5243
|
])
|
|
5246
5244
|
]),
|
|
5247
5245
|
_: 1
|
|
@@ -5442,13 +5440,13 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5442
5440
|
},
|
|
5443
5441
|
emits: ["load", "error"],
|
|
5444
5442
|
setup(e, { emit: u }) {
|
|
5445
|
-
const t = new IntersectionObserver(g), n = u, o = e, r = R(!1), s = R(o.src), c = R(!1), i = R(!1), a = R(!1), l =
|
|
5443
|
+
const t = new IntersectionObserver(g), n = u, o = e, r = R(!1), s = R(o.src), c = R(!1), i = R(!1), a = R(!1), l = le(null), d = y(() => r.value && !c.value), h = y(() => ({
|
|
5446
5444
|
height: d.value ? void 0 : "var(--image-placeholder-height)",
|
|
5447
5445
|
aspectRatio: d.value ? void 0 : o.aspectRatio
|
|
5448
5446
|
}));
|
|
5449
5447
|
be(() => {
|
|
5450
5448
|
t.observe(l.value);
|
|
5451
|
-
}),
|
|
5449
|
+
}), Ze(() => {
|
|
5452
5450
|
t.disconnect();
|
|
5453
5451
|
});
|
|
5454
5452
|
function p(A) {
|
|
@@ -5535,7 +5533,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5535
5533
|
setup(e) {
|
|
5536
5534
|
const u = {}, t = {};
|
|
5537
5535
|
let n = !1, o;
|
|
5538
|
-
const r = e, s = R(1), c = R(!1), i = R(!1), a = R(0), l = R(0), d = R(!0), h = R({ x: 0, y: 0 }), p =
|
|
5536
|
+
const r = e, s = R(1), c = R(!1), i = R(!1), a = R(0), l = R(0), d = R(!0), h = R({ x: 0, y: 0 }), p = ie(e, "visible"), f = y(() => r.srcList[l.value]), g = y(() => {
|
|
5539
5537
|
const B = c.value ? -1 : 1, P = i.value ? -1 : 1;
|
|
5540
5538
|
return {
|
|
5541
5539
|
transform: [
|
|
@@ -5771,14 +5769,14 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5771
5769
|
setup(e, { expose: u }) {
|
|
5772
5770
|
const t = {};
|
|
5773
5771
|
let n = 0, o, r = !1, s;
|
|
5774
|
-
const c = e, i = R(1), a = R({ x: 0, y: 0 }), l =
|
|
5772
|
+
const c = e, i = R(1), a = R({ x: 0, y: 0 }), l = le(null), d = le(null), h = y(() => ({
|
|
5775
5773
|
transform: `scale(${i.value})`,
|
|
5776
5774
|
marginInlineStart: `${a.value.x}px`,
|
|
5777
5775
|
marginBlockStart: `${a.value.y}px`
|
|
5778
5776
|
}));
|
|
5779
5777
|
be(() => {
|
|
5780
5778
|
document.addEventListener("mousemove", A), document.addEventListener("mouseup", _);
|
|
5781
|
-
}),
|
|
5779
|
+
}), Ze(() => {
|
|
5782
5780
|
document.removeEventListener("mousemove", A), document.removeEventListener("mouseup", _);
|
|
5783
5781
|
});
|
|
5784
5782
|
function p(v) {
|
|
@@ -5915,7 +5913,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5915
5913
|
}),
|
|
5916
5914
|
emits: /* @__PURE__ */ se(["focus", "blur", "input", "change"], ["update:value"]),
|
|
5917
5915
|
setup(e, { expose: u, emit: t }) {
|
|
5918
|
-
const n = pu(), o = t, r = e, { inputSize: s, inputRound: c, inputDisabled: i, inputReadonly: a, id: l } = ci(r), d =
|
|
5916
|
+
const n = pu(), o = t, r = e, { inputSize: s, inputRound: c, inputDisabled: i, inputReadonly: a, id: l } = ci(r), d = ie(e, "value"), h = R(!1), p = R(!1), f = le(null), g = y(() => {
|
|
5919
5917
|
const N = [], I = b(s), B = b(c), P = b(H);
|
|
5920
5918
|
return I !== "md" && N.push(`sq-input--${I}`), r.status && N.push(`is-${r.status}`), B && N.push("is-round"), P && N.push("is-disabled"), N;
|
|
5921
5919
|
}), _ = y(() => b(p) ? rn : sn), A = y(() => b(p) ? "text" : r.type), w = y(() => n.prefix || r.prefixIcon), C = y(() => b(h) && b(d).length), k = y(
|
|
@@ -5958,7 +5956,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5958
5956
|
(m(), L(me(r.prefixIcon)))
|
|
5959
5957
|
])
|
|
5960
5958
|
])) : U("", !0),
|
|
5961
|
-
r.type !== "textarea" ?
|
|
5959
|
+
r.type !== "textarea" ? de((m(), F("input", {
|
|
5962
5960
|
key: 1,
|
|
5963
5961
|
class: "sq-input-inner",
|
|
5964
5962
|
"onUpdate:modelValue": I[0] || (I[0] = (B) => d.value = B),
|
|
@@ -5982,7 +5980,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
5982
5980
|
onChange: I[2] || (I[2] = (B) => o("change", B))
|
|
5983
5981
|
}, null, 40, ma)), [
|
|
5984
5982
|
[u0, d.value]
|
|
5985
|
-
]) :
|
|
5983
|
+
]) : de((m(), F("textarea", {
|
|
5986
5984
|
key: 2,
|
|
5987
5985
|
class: "sq-input-inner",
|
|
5988
5986
|
style: ee({ resize: S.value }),
|
|
@@ -6010,7 +6008,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
6010
6008
|
}, null, 44, xa)), [
|
|
6011
6009
|
[t0, d.value]
|
|
6012
6010
|
]),
|
|
6013
|
-
|
|
6011
|
+
de(E("span", ga, [
|
|
6014
6012
|
k.value ? (m(), L(me(_.value), {
|
|
6015
6013
|
key: 0,
|
|
6016
6014
|
class: "sq-input-suffix-pwd",
|
|
@@ -6025,7 +6023,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
6025
6023
|
M.value ? (m(), L(me(M.value), { key: 0 })) : U("", !0)
|
|
6026
6024
|
])
|
|
6027
6025
|
], 512), [
|
|
6028
|
-
[
|
|
6026
|
+
[Ve, V.value]
|
|
6029
6027
|
])
|
|
6030
6028
|
], 34));
|
|
6031
6029
|
}
|
|
@@ -6056,12 +6054,12 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
6056
6054
|
onAfterLeave: t.onDestroy
|
|
6057
6055
|
}, {
|
|
6058
6056
|
default: Z(() => [
|
|
6059
|
-
|
|
6057
|
+
de(E("div", {
|
|
6060
6058
|
class: J(["sq-message", `is-${t.type}`]),
|
|
6061
6059
|
id: t.id,
|
|
6062
6060
|
style: ee({ top: `${t.offsetTop}px` })
|
|
6063
6061
|
}, [
|
|
6064
|
-
T(b(
|
|
6062
|
+
T(b(Ie), { class: "sq-message-inner" }, {
|
|
6065
6063
|
default: Z(() => [
|
|
6066
6064
|
t.type && o.value ? (m(), L(me(o.value), {
|
|
6067
6065
|
key: 0,
|
|
@@ -6076,7 +6074,7 @@ ${Y}${P}`, V(q.target), x(r.value, gu, gu);
|
|
|
6076
6074
|
}),
|
|
6077
6075
|
c[0] || (c[0] = E("div", { class: "sq-message-progress" }, null, -1))
|
|
6078
6076
|
], 14, _a), [
|
|
6079
|
-
[
|
|
6077
|
+
[Ve, n.value]
|
|
6080
6078
|
])
|
|
6081
6079
|
]),
|
|
6082
6080
|
_: 1
|
|
@@ -6142,7 +6140,7 @@ const A1 = tt, Fa = "sq-pagination-prev", Sa = /* @__PURE__ */ O({
|
|
|
6142
6140
|
}),
|
|
6143
6141
|
emits: ["update:current"],
|
|
6144
6142
|
setup(e) {
|
|
6145
|
-
const u = e, t =
|
|
6143
|
+
const u = e, t = ie(e, "current"), n = (o) => {
|
|
6146
6144
|
t.value += o;
|
|
6147
6145
|
};
|
|
6148
6146
|
return (o, r) => (m(), L(b(Q), {
|
|
@@ -6165,7 +6163,7 @@ const A1 = tt, Fa = "sq-pagination-prev", Sa = /* @__PURE__ */ O({
|
|
|
6165
6163
|
}),
|
|
6166
6164
|
emits: ["update:current"],
|
|
6167
6165
|
setup(e) {
|
|
6168
|
-
const u = e, t =
|
|
6166
|
+
const u = e, t = ie(e, "current"), n = (o) => {
|
|
6169
6167
|
t.value += o;
|
|
6170
6168
|
};
|
|
6171
6169
|
return (o, r) => (m(), L(b(Q), {
|
|
@@ -6188,7 +6186,7 @@ const A1 = tt, Fa = "sq-pagination-prev", Sa = /* @__PURE__ */ O({
|
|
|
6188
6186
|
}),
|
|
6189
6187
|
emits: ["update:current"],
|
|
6190
6188
|
setup(e) {
|
|
6191
|
-
const u = e, t =
|
|
6189
|
+
const u = e, t = ie(e, "current"), n = (o) => {
|
|
6192
6190
|
t.value = o;
|
|
6193
6191
|
};
|
|
6194
6192
|
return (o, r) => (m(), F("div", Ba, [
|
|
@@ -6230,7 +6228,7 @@ const A1 = tt, Fa = "sq-pagination-prev", Sa = /* @__PURE__ */ O({
|
|
|
6230
6228
|
}),
|
|
6231
6229
|
emits: ["update:current", "update:pageSize"],
|
|
6232
6230
|
setup(e) {
|
|
6233
|
-
const u = e, t =
|
|
6231
|
+
const u = e, t = ie(e, "current"), n = ie(e, "pageSize"), o = y(() => Math.ceil(u.total / n.value) || 1), r = y(() => {
|
|
6234
6232
|
const c = [], i = Math.floor(u.pagerCount / 2) - 1;
|
|
6235
6233
|
let a = t.value - i, l = t.value + i;
|
|
6236
6234
|
a < 2 && (a = 2, l = a + i * 2), l > o.value - 1 && (l = o.value - 1, a = l - i * 2);
|
|
@@ -6301,7 +6299,7 @@ function Pn(e) {
|
|
|
6301
6299
|
function Vt(e) {
|
|
6302
6300
|
return T("span", null, [e]);
|
|
6303
6301
|
}
|
|
6304
|
-
const Du = Math.min,
|
|
6302
|
+
const Du = Math.min, Oe = Math.max, Eu = Math.round, ku = Math.floor, De = (e) => ({
|
|
6305
6303
|
x: e,
|
|
6306
6304
|
y: e
|
|
6307
6305
|
}), Oa = {
|
|
@@ -6314,12 +6312,12 @@ const Du = Math.min, Pe = Math.max, Eu = Math.round, ku = Math.floor, De = (e) =
|
|
|
6314
6312
|
end: "start"
|
|
6315
6313
|
};
|
|
6316
6314
|
function Ut(e, u, t) {
|
|
6317
|
-
return
|
|
6315
|
+
return Oe(e, Du(u, t));
|
|
6318
6316
|
}
|
|
6319
6317
|
function Tu(e, u) {
|
|
6320
6318
|
return typeof e == "function" ? e(u) : e;
|
|
6321
6319
|
}
|
|
6322
|
-
function
|
|
6320
|
+
function Pe(e) {
|
|
6323
6321
|
return e.split("-")[0];
|
|
6324
6322
|
}
|
|
6325
6323
|
function Ru(e) {
|
|
@@ -6333,7 +6331,7 @@ function Zn(e) {
|
|
|
6333
6331
|
}
|
|
6334
6332
|
const Na = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
6335
6333
|
function ze(e) {
|
|
6336
|
-
return Na.has(
|
|
6334
|
+
return Na.has(Pe(e)) ? "y" : "x";
|
|
6337
6335
|
}
|
|
6338
6336
|
function Vn(e) {
|
|
6339
6337
|
return Nn(ze(e));
|
|
@@ -6366,7 +6364,7 @@ function ja(e, u, t) {
|
|
|
6366
6364
|
}
|
|
6367
6365
|
function Wa(e, u, t, n) {
|
|
6368
6366
|
const o = Ru(e);
|
|
6369
|
-
let r = ja(
|
|
6367
|
+
let r = ja(Pe(e), t === "start", n);
|
|
6370
6368
|
return o && (r = r.map((s) => s + "-" + o), u && (r = r.concat(r.map(nt)))), r;
|
|
6371
6369
|
}
|
|
6372
6370
|
function Au(e) {
|
|
@@ -6412,7 +6410,7 @@ function Wt(e, u, t) {
|
|
|
6412
6410
|
reference: n,
|
|
6413
6411
|
floating: o
|
|
6414
6412
|
} = e;
|
|
6415
|
-
const r = ze(u), s = Vn(u), c = Zn(s), i =
|
|
6413
|
+
const r = ze(u), s = Vn(u), c = Zn(s), i = Pe(u), a = r === "y", l = n.x + n.width / 2 - o.width / 2, d = n.y + n.height / 2 - o.height / 2, h = n[c] / 2 - o[c] / 2;
|
|
6416
6414
|
let p;
|
|
6417
6415
|
switch (i) {
|
|
6418
6416
|
case "top":
|
|
@@ -6585,7 +6583,7 @@ const Ja = function(e) {
|
|
|
6585
6583
|
} = Tu(e, u);
|
|
6586
6584
|
if ((t = r.arrow) != null && t.alignmentOffset)
|
|
6587
6585
|
return {};
|
|
6588
|
-
const A =
|
|
6586
|
+
const A = Pe(o), w = ze(c), C = Pe(c) === c, k = await (i.isRTL == null ? void 0 : i.isRTL(a.floating)), $ = h || (C || !g ? [Au(c)] : Va(c)), M = f !== "none";
|
|
6589
6587
|
!h && M && $.push(...Wa(c, g, f, k));
|
|
6590
6588
|
const V = [c, ...$], H = await Un(u, _), S = [];
|
|
6591
6589
|
let v = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
@@ -6648,7 +6646,7 @@ async function Qa(e, u) {
|
|
|
6648
6646
|
placement: t,
|
|
6649
6647
|
platform: n,
|
|
6650
6648
|
elements: o
|
|
6651
|
-
} = e, r = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), s =
|
|
6649
|
+
} = e, r = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), s = Pe(t), c = Ru(t), i = ze(t) === "y", a = Ka.has(s) ? -1 : 1, l = r && i ? -1 : 1, d = Tu(u, e);
|
|
6652
6650
|
let {
|
|
6653
6651
|
mainAxis: h,
|
|
6654
6652
|
crossAxis: p,
|
|
@@ -6720,7 +6718,7 @@ const el = function(e) {
|
|
|
6720
6718
|
} = Tu(e, u), a = {
|
|
6721
6719
|
x: t,
|
|
6722
6720
|
y: n
|
|
6723
|
-
}, l = await Un(u, i), d = ze(
|
|
6721
|
+
}, l = await Un(u, i), d = ze(Pe(o)), h = Nn(d);
|
|
6724
6722
|
let p = a[h], f = a[d];
|
|
6725
6723
|
if (r) {
|
|
6726
6724
|
const _ = h === "y" ? "top" : "left", A = h === "y" ? "bottom" : "right", w = p + l[_], C = p - l[A];
|
|
@@ -6902,7 +6900,7 @@ function Gn(e) {
|
|
|
6902
6900
|
function fl(e, u, t) {
|
|
6903
6901
|
return u === void 0 && (u = !1), !t || u && t !== pe(e) ? !1 : u;
|
|
6904
6902
|
}
|
|
6905
|
-
function
|
|
6903
|
+
function Ne(e, u, t, n) {
|
|
6906
6904
|
u === void 0 && (u = !1), t === void 0 && (t = !1);
|
|
6907
6905
|
const o = e.getBoundingClientRect(), r = vt(e);
|
|
6908
6906
|
let s = De(1);
|
|
@@ -6926,7 +6924,7 @@ function Ze(e, u, t, n) {
|
|
|
6926
6924
|
}
|
|
6927
6925
|
function Pu(e, u) {
|
|
6928
6926
|
const t = Ou(e).scrollLeft;
|
|
6929
|
-
return u ? u.left + t :
|
|
6927
|
+
return u ? u.left + t : Ne(Se(e)).left + t;
|
|
6930
6928
|
}
|
|
6931
6929
|
function Xn(e, u) {
|
|
6932
6930
|
const t = e.getBoundingClientRect(), n = t.left + u.scrollLeft - Pu(e, t), o = t.top + u.scrollTop;
|
|
@@ -6951,7 +6949,7 @@ function pl(e) {
|
|
|
6951
6949
|
}, a = De(1);
|
|
6952
6950
|
const l = De(0), d = Ee(n);
|
|
6953
6951
|
if ((d || !d && !r) && ((su(n) !== "body" || xu(s)) && (i = Ou(n)), Ee(n))) {
|
|
6954
|
-
const p =
|
|
6952
|
+
const p = Ne(n);
|
|
6955
6953
|
a = Je(n), l.x = p.x + n.clientLeft, l.y = p.y + n.clientTop;
|
|
6956
6954
|
}
|
|
6957
6955
|
const h = s && !d && !r ? Xn(s, i) : De(0);
|
|
@@ -6966,10 +6964,10 @@ function hl(e) {
|
|
|
6966
6964
|
return Array.from(e.getClientRects());
|
|
6967
6965
|
}
|
|
6968
6966
|
function bl(e) {
|
|
6969
|
-
const u = Se(e), t = Ou(e), n = e.ownerDocument.body, o =
|
|
6967
|
+
const u = Se(e), t = Ou(e), n = e.ownerDocument.body, o = Oe(u.scrollWidth, u.clientWidth, n.scrollWidth, n.clientWidth), r = Oe(u.scrollHeight, u.clientHeight, n.scrollHeight, n.clientHeight);
|
|
6970
6968
|
let s = -t.scrollLeft + Pu(e);
|
|
6971
6969
|
const c = -t.scrollTop;
|
|
6972
|
-
return ye(n).direction === "rtl" && (s +=
|
|
6970
|
+
return ye(n).direction === "rtl" && (s += Oe(u.clientWidth, n.clientWidth) - o), {
|
|
6973
6971
|
width: o,
|
|
6974
6972
|
height: r,
|
|
6975
6973
|
x: s,
|
|
@@ -6999,7 +6997,7 @@ function ml(e, u) {
|
|
|
6999
6997
|
}
|
|
7000
6998
|
const xl = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
7001
6999
|
function gl(e, u) {
|
|
7002
|
-
const t =
|
|
7000
|
+
const t = Ne(e, !0, u === "fixed"), n = t.top + e.clientTop, o = t.left + e.clientLeft, r = Ee(e) ? Je(e) : De(1), s = e.clientWidth * r.x, c = e.clientHeight * r.y, i = o * r.x, a = n * r.y;
|
|
7003
7001
|
return {
|
|
7004
7002
|
width: s,
|
|
7005
7003
|
height: c,
|
|
@@ -7052,7 +7050,7 @@ function _l(e) {
|
|
|
7052
7050
|
} = e;
|
|
7053
7051
|
const s = [...t === "clippingAncestors" ? Iu(u) ? [] : vl(u, this._c) : [].concat(t), n], c = s[0], i = s.reduce((a, l) => {
|
|
7054
7052
|
const d = Yt(u, l, o);
|
|
7055
|
-
return a.top =
|
|
7053
|
+
return a.top = Oe(d.top, a.top), a.right = Du(d.right, a.right), a.bottom = Du(d.bottom, a.bottom), a.left = Oe(d.left, a.left), a;
|
|
7056
7054
|
}, Yt(u, c, o));
|
|
7057
7055
|
return {
|
|
7058
7056
|
width: i.right - i.left,
|
|
@@ -7072,7 +7070,7 @@ function kl(e) {
|
|
|
7072
7070
|
};
|
|
7073
7071
|
}
|
|
7074
7072
|
function yl(e, u, t) {
|
|
7075
|
-
const n = Ee(u), o = Se(u), r = t === "fixed", s =
|
|
7073
|
+
const n = Ee(u), o = Se(u), r = t === "fixed", s = Ne(e, !0, r, u);
|
|
7076
7074
|
let c = {
|
|
7077
7075
|
scrollLeft: 0,
|
|
7078
7076
|
scrollTop: 0
|
|
@@ -7083,7 +7081,7 @@ function yl(e, u, t) {
|
|
|
7083
7081
|
}
|
|
7084
7082
|
if (n || !n && !r)
|
|
7085
7083
|
if ((su(u) !== "body" || xu(o)) && (c = Ou(u)), n) {
|
|
7086
|
-
const p =
|
|
7084
|
+
const p = Ne(u, !0, r, u);
|
|
7087
7085
|
i.x = p.x + u.clientLeft, i.y = p.y + u.clientTop;
|
|
7088
7086
|
} else o && a();
|
|
7089
7087
|
r && !n && o && a();
|
|
@@ -7173,7 +7171,7 @@ function El(e, u) {
|
|
|
7173
7171
|
return;
|
|
7174
7172
|
const f = ku(d), g = ku(o.clientWidth - (l + h)), _ = ku(o.clientHeight - (d + p)), A = ku(l), C = {
|
|
7175
7173
|
rootMargin: -f + "px " + -g + "px " + -_ + "px " + -A + "px",
|
|
7176
|
-
threshold:
|
|
7174
|
+
threshold: Oe(0, Du(1, i)) || 1
|
|
7177
7175
|
};
|
|
7178
7176
|
let k = !0;
|
|
7179
7177
|
function $(M) {
|
|
@@ -7223,10 +7221,10 @@ function Al(e, u, t, n) {
|
|
|
7223
7221
|
(C = p) == null || C.observe(u);
|
|
7224
7222
|
})), t();
|
|
7225
7223
|
}), a && !i && p.observe(a), p.observe(u));
|
|
7226
|
-
let f, g = i ?
|
|
7224
|
+
let f, g = i ? Ne(e) : null;
|
|
7227
7225
|
i && _();
|
|
7228
7226
|
function _() {
|
|
7229
|
-
const A =
|
|
7227
|
+
const A = Ne(e);
|
|
7230
7228
|
g && !Kn(g, A) && t(), g = A, f = requestAnimationFrame(_);
|
|
7231
7229
|
}
|
|
7232
7230
|
return t(), () => {
|
|
@@ -7269,7 +7267,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7269
7267
|
setup(e) {
|
|
7270
7268
|
const { getCssVar: u } = an(), { nextZIndex: t } = ct(), n = parseInt(u("--sq-padding-sm")), o = parseInt(u("--sq-padding-md"));
|
|
7271
7269
|
let r, s;
|
|
7272
|
-
const c = e, i =
|
|
7270
|
+
const c = e, i = ie(e, "visible"), a = R(0), l = R({}), d = le(null), h = le(null);
|
|
7273
7271
|
fe(i, (k) => {
|
|
7274
7272
|
k ? (a.value = t(), w(), s = Al(
|
|
7275
7273
|
d.value.$el,
|
|
@@ -7278,7 +7276,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7278
7276
|
)) : s == null || s();
|
|
7279
7277
|
}), be(() => {
|
|
7280
7278
|
w();
|
|
7281
|
-
}),
|
|
7279
|
+
}), Ze(() => {
|
|
7282
7280
|
C(), document.removeEventListener("click", A);
|
|
7283
7281
|
});
|
|
7284
7282
|
function p() {
|
|
@@ -7343,7 +7341,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7343
7341
|
name: c.transition
|
|
7344
7342
|
}, {
|
|
7345
7343
|
default: Z(() => [
|
|
7346
|
-
|
|
7344
|
+
de(E("div", {
|
|
7347
7345
|
class: J(["sq-popover", k.popoverClass]),
|
|
7348
7346
|
style: ee({ ...l.value, zIndex: a.value }),
|
|
7349
7347
|
ref_key: "popverRef",
|
|
@@ -7353,7 +7351,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7353
7351
|
}, [
|
|
7354
7352
|
W(k.$slots, "default")
|
|
7355
7353
|
], 6), [
|
|
7356
|
-
[
|
|
7354
|
+
[Ve, i.value]
|
|
7357
7355
|
])
|
|
7358
7356
|
]),
|
|
7359
7357
|
_: 3
|
|
@@ -7378,7 +7376,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7378
7376
|
label: { type: Boolean, default: !0 }
|
|
7379
7377
|
},
|
|
7380
7378
|
setup(e) {
|
|
7381
|
-
const u = new ResizeObserver(a), t = e, n = R(100), o =
|
|
7379
|
+
const u = new ResizeObserver(a), t = e, n = R(100), o = le(null), r = y(() => {
|
|
7382
7380
|
const l = [];
|
|
7383
7381
|
return t.color || l.push(`is-${t.type}`), t.variant && l.push(`is-${t.variant}`), l;
|
|
7384
7382
|
}), s = y(() => {
|
|
@@ -7400,7 +7398,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7400
7398
|
});
|
|
7401
7399
|
be(() => {
|
|
7402
7400
|
u.observe(o.value);
|
|
7403
|
-
}),
|
|
7401
|
+
}), Ze(() => {
|
|
7404
7402
|
u.disconnect();
|
|
7405
7403
|
});
|
|
7406
7404
|
function a() {
|
|
@@ -7467,7 +7465,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7467
7465
|
radioName: c,
|
|
7468
7466
|
radioVariant: i,
|
|
7469
7467
|
groupContext: a
|
|
7470
|
-
} = ii(n), l = R(), d =
|
|
7468
|
+
} = ii(n), l = R(), d = ie(e, "checked"), h = y(() => {
|
|
7471
7469
|
const f = [], g = b(o), _ = b(r), A = b(i);
|
|
7472
7470
|
return g !== "md" && f.push(`sq-selection--${g}`), p.value && f.push("is-checked"), _ && f.push("is-disabled"), A && f.push(`is-${A}`), f;
|
|
7473
7471
|
}), p = y(() => a ? b(a).checked === n.value : d.value);
|
|
@@ -7485,7 +7483,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7485
7483
|
}), (f, g) => (m(), F("label", {
|
|
7486
7484
|
class: J(["sq-selection sq-radio", h.value])
|
|
7487
7485
|
}, [
|
|
7488
|
-
|
|
7486
|
+
de(E("input", {
|
|
7489
7487
|
type: "radio",
|
|
7490
7488
|
autofocus: n.autofocus,
|
|
7491
7489
|
name: b(c),
|
|
@@ -7619,7 +7617,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7619
7617
|
value: {}
|
|
7620
7618
|
},
|
|
7621
7619
|
setup(e) {
|
|
7622
|
-
const u = e, { segmentedDisabled: t, parentContext: n } = ai(u), o = R(), r =
|
|
7620
|
+
const u = e, { segmentedDisabled: t, parentContext: n } = ai(u), o = R(), r = le(null), s = y(() => {
|
|
7623
7621
|
const l = [], d = b(t);
|
|
7624
7622
|
return c.value && l.push("is-active"), d && l.push("is-disabled"), l;
|
|
7625
7623
|
}), c = y(() => b(n).active === u.value), i = y(() => b(n).size !== "sm" ? "md" : "sm");
|
|
@@ -7641,7 +7639,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7641
7639
|
ref_key: "itemRef",
|
|
7642
7640
|
ref: r
|
|
7643
7641
|
}, [
|
|
7644
|
-
|
|
7642
|
+
de(E("input", {
|
|
7645
7643
|
type: "radio",
|
|
7646
7644
|
name: (h = b(n)) == null ? void 0 : h.name,
|
|
7647
7645
|
value: u.value,
|
|
@@ -7652,7 +7650,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7652
7650
|
[en, o.value]
|
|
7653
7651
|
]),
|
|
7654
7652
|
W(l.$slots, "default", {}, () => [
|
|
7655
|
-
T(b(
|
|
7653
|
+
T(b(Ie), { size: i.value }, {
|
|
7656
7654
|
default: Z(() => [
|
|
7657
7655
|
u.icon ? (m(), L(me(u.icon), { key: 0 })) : U("", !0),
|
|
7658
7656
|
cu(" " + re(u.text), 1)
|
|
@@ -7682,14 +7680,14 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7682
7680
|
}),
|
|
7683
7681
|
emits: /* @__PURE__ */ se(["change", "click"], ["update:checked"]),
|
|
7684
7682
|
setup(e, { emit: u }) {
|
|
7685
|
-
const t = u, n = e, { switchSize: o, switchDisabled: r, id: s } = li(n), c =
|
|
7683
|
+
const t = u, n = e, { switchSize: o, switchDisabled: r, id: s } = li(n), c = ie(e, "checked"), i = y(() => {
|
|
7686
7684
|
const a = [], l = b(o), d = b(r);
|
|
7687
7685
|
return l !== "md" && a.push(`sq-switch--${l}`), c.value && a.push("is-checked"), (d || n.loading) && a.push("is-disabled"), n.variant && a.push(`is-${n.variant}`), a;
|
|
7688
7686
|
});
|
|
7689
7687
|
return (a, l) => (m(), F("label", {
|
|
7690
7688
|
class: J(["sq-switch", i.value])
|
|
7691
7689
|
}, [
|
|
7692
|
-
|
|
7690
|
+
de(E("input", {
|
|
7693
7691
|
type: "checkbox",
|
|
7694
7692
|
"onUpdate:modelValue": l[0] || (l[0] = (d) => c.value = d),
|
|
7695
7693
|
id: b(s),
|
|
@@ -7723,7 +7721,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7723
7721
|
const o = [];
|
|
7724
7722
|
return u.size !== "md" && o.push(`sq-tag--${u.size}`), u.variant && u.type && o.push(`is-${u.variant}`), u.type && o.push(`is-${u.type}`), u.round && o.push("is-round"), o;
|
|
7725
7723
|
}), n = y(() => u.size === "lg" ? "md" : "sm");
|
|
7726
|
-
return (o, r) => (m(), L(b(
|
|
7724
|
+
return (o, r) => (m(), L(b(Ie), {
|
|
7727
7725
|
class: J(["sq-tag", t.value]),
|
|
7728
7726
|
size: n.value
|
|
7729
7727
|
}, {
|
|
@@ -7748,7 +7746,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7748
7746
|
const s = [];
|
|
7749
7747
|
return n.size !== "md" && s.push(`sq-tag--${n.size}`), n.type && s.push(`is-${n.type}`), n.round && s.push("is-round"), n.checked && s.push("is-checked"), s;
|
|
7750
7748
|
}), r = y(() => n.size === "lg" ? "md" : "sm");
|
|
7751
|
-
return (s, c) => (m(), L(b(
|
|
7749
|
+
return (s, c) => (m(), L(b(Ie), {
|
|
7752
7750
|
class: J(["sq-check-tag", o.value]),
|
|
7753
7751
|
size: r.value,
|
|
7754
7752
|
onClick: c[0] || (c[0] = (i) => t("change", !n.checked))
|
|
@@ -7759,7 +7757,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7759
7757
|
_: 3
|
|
7760
7758
|
}, 8, ["class", "size"]));
|
|
7761
7759
|
}
|
|
7762
|
-
}), o1 = "sq-text",
|
|
7760
|
+
}), o1 = "sq-text", Ie = /* @__PURE__ */ O({
|
|
7763
7761
|
name: o1,
|
|
7764
7762
|
__name: "text",
|
|
7765
7763
|
props: {
|
|
@@ -7891,7 +7889,7 @@ const Fl = el, Sl = ul, ql = Ja, $l = (e, u, t) => {
|
|
|
7891
7889
|
},
|
|
7892
7890
|
emits: ["change"],
|
|
7893
7891
|
setup(e, { emit: u }) {
|
|
7894
|
-
const t = u, n = e, o =
|
|
7892
|
+
const t = u, n = e, o = le(null);
|
|
7895
7893
|
function r() {
|
|
7896
7894
|
var l;
|
|
7897
7895
|
a(((l = o.value) == null ? void 0 : l.files) ?? void 0);
|
|
@@ -7973,7 +7971,7 @@ export {
|
|
|
7973
7971
|
Yl as SqSegmentedItem,
|
|
7974
7972
|
u1 as SqSwitch,
|
|
7975
7973
|
S1 as SqTag,
|
|
7976
|
-
|
|
7974
|
+
Ie as SqText,
|
|
7977
7975
|
$1 as SqTimeline,
|
|
7978
7976
|
B1 as SqTimelineItem,
|
|
7979
7977
|
ce as SqTooltip,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
`:">",c},Ce.prototype.renderInline=function(e,t,n){let o="";const r=this.rules;for(let c=0,s=e.length;c<s;c++){const i=e[c].type;typeof r[i]<"u"?o+=r[i](e,c,t,n,this):o+=this.renderToken(e,c,t)}return o},Ce.prototype.renderInlineAsText=function(e,t,n){let o="";for(let r=0,c=e.length;r<c;r++)switch(e[r].type){case"text":o+=e[r].content;break;case"image":o+=this.renderInlineAsText(e[r].children,t,n);break;case"html_inline":case"html_block":o+=e[r].content;break;case"softbreak":case"hardbreak":o+=`
|
|
47
47
|
`;break}return o},Ce.prototype.render=function(e,t,n){let o="";const r=this.rules;for(let c=0,s=e.length;c<s;c++){const i=e[c].type;i==="inline"?o+=this.renderInline(e[c].children,t,n):typeof r[i]<"u"?o+=r[i](e,c,t,n,this):o+=this.renderToken(e,c,t,n)}return o};function W(){this.__rules__=[],this.__cache__=null}W.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},W.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(o){t.indexOf(o)<0&&t.push(o)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(o){o.enabled&&(n&&o.alt.indexOf(n)<0||e.__cache__[n].push(o.fn))})})},W.prototype.at=function(e,t,n){const o=this.__find__(e),r=n||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__[o].fn=t,this.__rules__[o].alt=r.alt||[],this.__cache__=null},W.prototype.before=function(e,t,n,o){const r=this.__find__(e),c=o||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:c.alt||[]}),this.__cache__=null},W.prototype.after=function(e,t,n,o){const r=this.__find__(e),c=o||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:c.alt||[]}),this.__cache__=null},W.prototype.push=function(e,t,n){const o=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},W.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(o){const r=this.__find__(o);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[r].enabled=!0,n.push(o)},this),this.__cache__=null,n},W.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)},W.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(o){const r=this.__find__(o);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[r].enabled=!1,n.push(o)},this),this.__cache__=null,n},W.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function bu(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}bu.prototype.Token=Y;const b0=/\r\n?|\n/g,x0=/\0/g;function g0(e){let t;t=e.src.replace(b0,`
|
|
48
48
|
`),t=t.replace(x0,"�"),e.src=t}function _0(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function k0(e){const t=e.tokens;for(let n=0,o=t.length;n<o;n++){const r=t[n];r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function y0(e){return/^<a[>\s]/i.test(e)}function C0(e){return/^<\/a\s*>/i.test(e)}function w0(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,o=t.length;n<o;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,c=0;for(let s=r.length-1;s>=0;s--){const i=r[s];if(i.type==="link_close"){for(s--;r[s].level!==i.level&&r[s].type!=="link_open";)s--;continue}if(i.type==="html_inline"&&(y0(i.content)&&c>0&&c--,C0(i.content)&&c++),!(c>0)&&i.type==="text"&&e.md.linkify.test(i.content)){const a=i.content;let l=e.md.linkify.match(a);const d=[];let f=i.level,m=0;l.length>0&&l[0].index===0&&s>0&&r[s-1].type==="text_special"&&(l=l.slice(1));for(let h=0;h<l.length;h++){const p=l[h].url,x=e.md.normalizeLink(p);if(!e.md.validateLink(x))continue;let _=l[h].text;l[h].schema?l[h].schema==="mailto:"&&!/^mailto:/i.test(_)?_=e.md.normalizeLinkText("mailto:"+_).replace(/^mailto:/,""):_=e.md.normalizeLinkText(_):_=e.md.normalizeLinkText("http://"+_).replace(/^http:\/\//,"");const E=l[h].index;if(E>m){const B=new e.Token("text","",0);B.content=a.slice(m,E),B.level=f,d.push(B)}const y=new e.Token("link_open","a",1);y.attrs=[["href",x]],y.level=f++,y.markup="linkify",y.info="auto",d.push(y);const C=new e.Token("text","",0);C.content=_,C.level=f,d.push(C);const k=new e.Token("link_close","a",-1);k.level=--f,k.markup="linkify",k.info="auto",d.push(k),m=l[h].lastIndex}if(m<a.length){const h=new e.Token("text","",0);h.content=a.slice(m),h.level=f,d.push(h)}t[n].children=r=hu(r,s,d)}}}}const xu=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,E0=/\((c|tm|r)\)/i,D0=/\((c|tm|r)\)/ig,A0={c:"©",r:"®",tm:"™"};function B0(e,t){return A0[t.toLowerCase()]}function F0(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&(o.content=o.content.replace(D0,B0)),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function S0(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&xu.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function M0(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(E0.test(e.tokens[t].content)&&F0(e.tokens[t].children),xu.test(e.tokens[t].content)&&S0(e.tokens[t].children))}const $0=/['"]/,gu=/['"]/g,_u="’";function Ue(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function q0(e,t){let n;const o=[];for(let r=0;r<e.length;r++){const c=e[r],s=e[r].level;for(n=o.length-1;n>=0&&!(o[n].level<=s);n--);if(o.length=n+1,c.type!=="text")continue;let i=c.content,a=0,l=i.length;e:for(;a<l;){gu.lastIndex=a;const d=gu.exec(i);if(!d)break;let f=!0,m=!0;a=d.index+1;const h=d[0]==="'";let p=32;if(d.index-1>=0)p=i.charCodeAt(d.index-1);else for(n=r-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){p=e[n].content.charCodeAt(e[n].content.length-1);break}let x=32;if(a<l)x=i.charCodeAt(a);else for(n=r+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){x=e[n].content.charCodeAt(0);break}const _=qe(p)||$e(String.fromCharCode(p)),E=qe(x)||$e(String.fromCharCode(x)),y=Me(p),C=Me(x);if(C?f=!1:E&&(y||_||(f=!1)),y?m=!1:_&&(C||E||(m=!1)),x===34&&d[0]==='"'&&p>=48&&p<=57&&(m=f=!1),f&&m&&(f=_,m=E),!f&&!m){h&&(c.content=Ue(c.content,d.index,_u));continue}if(m)for(n=o.length-1;n>=0;n--){let k=o[n];if(o[n].level<s)break;if(k.single===h&&o[n].level===s){k=o[n];let B,S;h?(B=t.md.options.quotes[2],S=t.md.options.quotes[3]):(B=t.md.options.quotes[0],S=t.md.options.quotes[1]),c.content=Ue(c.content,d.index,S),e[k.token].content=Ue(e[k.token].content,k.pos,B),a+=S.length-1,k.token===r&&(a+=B.length-1),i=c.content,l=i.length,o.length=n;continue e}}f?o.push({token:r,pos:d.index,single:h,level:s}):m&&h&&(c.content=Ue(c.content,d.index,_u))}}}function N0(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!$0.test(e.tokens[t].content)||q0(e.tokens[t].children,e)}function z0(e){let t,n;const o=e.tokens,r=o.length;for(let c=0;c<r;c++){if(o[c].type!=="inline")continue;const s=o[c].children,i=s.length;for(t=0;t<i;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<i;t++)s[t].type==="text"&&t+1<i&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const gt=[["normalize",g0],["block",_0],["inline",k0],["linkify",w0],["replacements",M0],["smartquotes",N0],["text_join",z0]];function _t(){this.ruler=new W;for(let e=0;e<gt.length;e++)this.ruler.push(gt[e][0],gt[e][1])}_t.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,o=t.length;n<o;n++)t[n](e)},_t.prototype.State=bu;function te(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const r=this.src;for(let c=0,s=0,i=0,a=0,l=r.length,d=!1;s<l;s++){const f=r.charCodeAt(s);if(!d)if(O(f)){i++,f===9?a+=4-a%4:a++;continue}else d=!0;(f===10||s===l-1)&&(f!==10&&s++,this.bMarks.push(c),this.eMarks.push(s),this.tShift.push(i),this.sCount.push(a),this.bsCount.push(0),d=!1,i=0,a=0,c=s+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}te.prototype.push=function(e,t,n){const o=new Y(e,t,n);return o.block=!0,n<0&&this.level--,o.level=this.level,n>0&&this.level++,this.tokens.push(o),o},te.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},te.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},te.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const o=this.src.charCodeAt(t);if(!O(o))break}return t},te.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!O(this.src.charCodeAt(--t)))return t+1;return t},te.prototype.skipChars=function(t,n){for(let o=this.src.length;t<o&&this.src.charCodeAt(t)===n;t++);return t},te.prototype.skipCharsBack=function(t,n,o){if(t<=o)return t;for(;t>o;)if(n!==this.src.charCodeAt(--t))return t+1;return t},te.prototype.getLines=function(t,n,o,r){if(t>=n)return"";const c=new Array(n-t);for(let s=0,i=t;i<n;i++,s++){let a=0;const l=this.bMarks[i];let d=l,f;for(i+1<n||r?f=this.eMarks[i]+1:f=this.eMarks[i];d<f&&a<o;){const m=this.src.charCodeAt(d);if(O(m))m===9?a+=4-(a+this.bsCount[i])%4:a++;else if(d-l<this.tShift[i])a++;else break;d++}a>o?c[s]=new Array(a-o+1).join(" ")+this.src.slice(d,f):c[s]=this.src.slice(d,f)}return c.join("")},te.prototype.Token=Y;const R0=65536;function kt(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(n,o)}function ku(e){const t=[],n=e.length;let o=0,r=e.charCodeAt(o),c=!1,s=0,i="";for(;o<n;)r===124&&(c?(i+=e.substring(s,o-1),s=o):(t.push(i+e.substring(s,o)),i="",s=o+1)),c=r===92,o++,r=e.charCodeAt(o);return t.push(i+e.substring(s)),t}function T0(e,t,n,o){if(t+2>n)return!1;let r=t+1;if(e.sCount[r]<e.blkIndent||e.sCount[r]-e.blkIndent>=4)return!1;let c=e.bMarks[r]+e.tShift[r];if(c>=e.eMarks[r])return!1;const s=e.src.charCodeAt(c++);if(s!==124&&s!==45&&s!==58||c>=e.eMarks[r])return!1;const i=e.src.charCodeAt(c++);if(i!==124&&i!==45&&i!==58&&!O(i)||s===45&&O(i))return!1;for(;c<e.eMarks[r];){const k=e.src.charCodeAt(c);if(k!==124&&k!==45&&k!==58&&!O(k))return!1;c++}let a=kt(e,t+1),l=a.split("|");const d=[];for(let k=0;k<l.length;k++){const B=l[k].trim();if(!B){if(k===0||k===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(B))return!1;B.charCodeAt(B.length-1)===58?d.push(B.charCodeAt(0)===58?"center":"right"):B.charCodeAt(0)===58?d.push("left"):d.push("")}if(a=kt(e,t).trim(),a.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=ku(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const f=l.length;if(f===0||f!==d.length)return!1;if(o)return!0;const m=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),x=[t,0];p.map=x;const _=e.push("thead_open","thead",1);_.map=[t,t+1];const E=e.push("tr_open","tr",1);E.map=[t,t+1];for(let k=0;k<l.length;k++){const B=e.push("th_open","th",1);d[k]&&(B.attrs=[["style","text-align:"+d[k]]]);const S=e.push("inline","",0);S.content=l[k].trim(),S.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,C=0;for(r=t+2;r<n&&!(e.sCount[r]<e.blkIndent);r++){let k=!1;for(let S=0,R=h.length;S<R;S++)if(h[S](e,r,n,!0)){k=!0;break}if(k||(a=kt(e,r).trim(),!a)||e.sCount[r]-e.blkIndent>=4||(l=ku(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),C+=f-l.length,C>R0))break;if(r===t+2){const S=e.push("tbody_open","tbody",1);S.map=y=[t+2,0]}const B=e.push("tr_open","tr",1);B.map=[r,r+1];for(let S=0;S<f;S++){const R=e.push("td_open","td",1);d[S]&&(R.attrs=[["style","text-align:"+d[S]]]);const T=e.push("inline","",0);T.content=l[S]?l[S].trim():"",T.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=r),e.push("table_close","table",-1),x[1]=r,e.parentType=m,e.line=r,!0}function L0(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let o=t+1,r=o;for(;o<n;){if(e.isEmpty(o)){o++;continue}if(e.sCount[o]-e.blkIndent>=4){o++,r=o;continue}break}e.line=r;const c=e.push("code_block","code",0);return c.content=e.getLines(t,r,4+e.blkIndent,!1)+`
|
|
49
|
-
`,c.map=[t,e.line],!0}function V0(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>c)return!1;const s=e.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let i=r;r=e.skipChars(r,s);let a=r-i;if(a<3)return!1;const l=e.src.slice(i,r),d=e.src.slice(r,c);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(o)return!0;let f=t,m=!1;for(;f++,!(f>=n||(r=i=e.bMarks[f]+e.tShift[f],c=e.eMarks[f],r<c&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(r)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(r=e.skipChars(r,s),!(r-i<a)&&(r=e.skipSpaces(r),!(r<c)))){m=!0;break}a=e.sCount[t],e.line=f+(m?1:0);const h=e.push("fence","code",0);return h.info=d,h.content=e.getLines(t+1,f,a,!0),h.markup=l,h.map=[t,e.line],!0}function I0(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(o)return!0;const i=[],a=[],l=[],d=[],f=e.md.block.ruler.getRules("blockquote"),m=e.parentType;e.parentType="blockquote";let h=!1,p;for(p=t;p<n;p++){const C=e.sCount[p]<e.blkIndent;if(r=e.bMarks[p]+e.tShift[p],c=e.eMarks[p],r>=c)break;if(e.src.charCodeAt(r++)===62&&!C){let B=e.sCount[p]+1,S,R;e.src.charCodeAt(r)===32?(r++,B++,R=!1,S=!0):e.src.charCodeAt(r)===9?(S=!0,(e.bsCount[p]+B)%4===3?(r++,B++,R=!1):R=!0):S=!1;let T=B;for(i.push(e.bMarks[p]),e.bMarks[p]=r;r<c;){const D=e.src.charCodeAt(r);if(O(D))D===9?T+=4-(T+e.bsCount[p]+(R?1:0))%4:T++;else break;r++}h=r>=c,a.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(S?1:0),l.push(e.sCount[p]),e.sCount[p]=T-B,d.push(e.tShift[p]),e.tShift[p]=r-e.bMarks[p];continue}if(h)break;let k=!1;for(let B=0,S=f.length;B<S;B++)if(f[B](e,p,n,!0)){k=!0;break}if(k){e.lineMax=p,e.blkIndent!==0&&(i.push(e.bMarks[p]),a.push(e.bsCount[p]),d.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}i.push(e.bMarks[p]),a.push(e.bsCount[p]),d.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]=-1}const x=e.blkIndent;e.blkIndent=0;const _=e.push("blockquote_open","blockquote",1);_.markup=">";const E=[t,0];_.map=E,e.md.block.tokenize(e,t,p);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=m,E[1]=e.line;for(let C=0;C<d.length;C++)e.bMarks[C+t]=i[C],e.tShift[C+t]=d[C],e.sCount[C+t]=l[C],e.bsCount[C+t]=a[C];return e.blkIndent=x,!0}function v0(e,t,n,o){const r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let c=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(c++);if(s!==42&&s!==45&&s!==95)return!1;let i=1;for(;c<r;){const l=e.src.charCodeAt(c++);if(l!==s&&!O(l))return!1;l===s&&i++}if(i<3)return!1;if(o)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=Array(i+1).join(String.fromCharCode(s)),!0}function yu(e,t){const n=e.eMarks[t];let o=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(o++);if(r!==42&&r!==45&&r!==43)return-1;if(o<n){const c=e.src.charCodeAt(o);if(!O(c))return-1}return o}function Cu(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];let r=n;if(r+1>=o)return-1;let c=e.src.charCodeAt(r++);if(c<48||c>57)return-1;for(;;){if(r>=o)return-1;if(c=e.src.charCodeAt(r++),c>=48&&c<=57){if(r-n>=10)return-1;continue}if(c===41||c===46)break;return-1}return r<o&&(c=e.src.charCodeAt(r),!O(c))?-1:r}function O0(e,t){const n=e.level+2;for(let o=t+2,r=e.tokens.length-2;o<r;o++)e.tokens[o].level===n&&e.tokens[o].type==="paragraph_open"&&(e.tokens[o+2].hidden=!0,e.tokens[o].hidden=!0,o+=2)}function P0(e,t,n,o){let r,c,s,i,a=t,l=!0;if(e.sCount[a]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]<e.blkIndent)return!1;let d=!1;o&&e.parentType==="paragraph"&&e.sCount[a]>=e.blkIndent&&(d=!0);let f,m,h;if((h=Cu(e,a))>=0){if(f=!0,s=e.bMarks[a]+e.tShift[a],m=Number(e.src.slice(s,h-1)),d&&m!==1)return!1}else if((h=yu(e,a))>=0)f=!1;else return!1;if(d&&e.skipSpaces(h)>=e.eMarks[a])return!1;if(o)return!0;const p=e.src.charCodeAt(h-1),x=e.tokens.length;f?(i=e.push("ordered_list_open","ol",1),m!==1&&(i.attrs=[["start",m]])):i=e.push("bullet_list_open","ul",1);const _=[a,0];i.map=_,i.markup=String.fromCharCode(p);let E=!1;const y=e.md.block.ruler.getRules("list"),C=e.parentType;for(e.parentType="list";a<n;){c=h,r=e.eMarks[a];const k=e.sCount[a]+h-(e.bMarks[a]+e.tShift[a]);let B=k;for(;c<r;){const L=e.src.charCodeAt(c);if(L===9)B+=4-(B+e.bsCount[a])%4;else if(L===32)B++;else break;c++}const S=c;let R;S>=r?R=1:R=B-k,R>4&&(R=1);const T=k+R;i=e.push("list_item_open","li",1),i.markup=String.fromCharCode(p);const D=[a,0];i.map=D,f&&(i.info=e.src.slice(s,h-1));const g=e.tight,b=e.tShift[a],A=e.sCount[a],w=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=T,e.tight=!0,e.tShift[a]=S-e.bMarks[a],e.sCount[a]=B,S>=r&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,a,n,!0),(!e.tight||E)&&(l=!1),E=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[a]=b,e.sCount[a]=A,e.tight=g,i=e.push("list_item_close","li",-1),i.markup=String.fromCharCode(p),a=e.line,D[1]=a,a>=n||e.sCount[a]<e.blkIndent||e.sCount[a]-e.blkIndent>=4)break;let M=!1;for(let L=0,V=y.length;L<V;L++)if(y[L](e,a,n,!0)){M=!0;break}if(M)break;if(f){if(h=Cu(e,a),h<0)break;s=e.bMarks[a]+e.tShift[a]}else if(h=yu(e,a),h<0)break;if(p!==e.src.charCodeAt(h-1))break}return f?i=e.push("ordered_list_close","ol",-1):i=e.push("bullet_list_close","ul",-1),i.markup=String.fromCharCode(p),_[1]=a,e.line=a,e.parentType=C,l&&O0(e,x),!0}function Z0(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==91)return!1;function i(y){const C=e.lineMax;if(y>=C||e.isEmpty(y))return null;let k=!1;if(e.sCount[y]-e.blkIndent>3&&(k=!0),e.sCount[y]<0&&(k=!0),!k){const R=e.md.block.ruler.getRules("reference"),T=e.parentType;e.parentType="reference";let D=!1;for(let g=0,b=R.length;g<b;g++)if(R[g](e,y,C,!0)){D=!0;break}if(e.parentType=T,D)return null}const B=e.bMarks[y]+e.tShift[y],S=e.eMarks[y];return e.src.slice(B,S+1)}let a=e.src.slice(r,c+1);c=a.length;let l=-1;for(r=1;r<c;r++){const y=a.charCodeAt(r);if(y===91)return!1;if(y===93){l=r;break}else if(y===10){const C=i(s);C!==null&&(a+=C,c=a.length,s++)}else if(y===92&&(r++,r<c&&a.charCodeAt(r)===10)){const C=i(s);C!==null&&(a+=C,c=a.length,s++)}}if(l<0||a.charCodeAt(l+1)!==58)return!1;for(r=l+2;r<c;r++){const y=a.charCodeAt(r);if(y===10){const C=i(s);C!==null&&(a+=C,c=a.length,s++)}else if(!O(y))break}const d=e.md.helpers.parseLinkDestination(a,r,c);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;r=d.pos;const m=r,h=s,p=r;for(;r<c;r++){const y=a.charCodeAt(r);if(y===10){const C=i(s);C!==null&&(a+=C,c=a.length,s++)}else if(!O(y))break}let x=e.md.helpers.parseLinkTitle(a,r,c);for(;x.can_continue;){const y=i(s);if(y===null)break;a+=y,r=c,c=a.length,s++,x=e.md.helpers.parseLinkTitle(a,r,c,x)}let _;for(r<c&&p!==r&&x.ok?(_=x.str,r=x.pos):(_="",r=m,s=h);r<c;){const y=a.charCodeAt(r);if(!O(y))break;r++}if(r<c&&a.charCodeAt(r)!==10&&_)for(_="",r=m,s=h;r<c;){const y=a.charCodeAt(r);if(!O(y))break;r++}if(r<c&&a.charCodeAt(r)!==10)return!1;const E=Ze(a.slice(1,l));return E?(o||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[E]>"u"&&(e.env.references[E]={title:_,href:f}),e.line=s),!0):!1}const U0=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],j0="[a-zA-Z_:][a-zA-Z0-9:._-]*",H0="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",wu="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+j0+"(?:\\s*=\\s*"+H0+")?)")+"*\\s*\\/?>",Eu="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",W0="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",G0="<[?][\\s\\S]*?[?]>",X0="<![A-Za-z][^>]*>",Y0="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",K0=new RegExp("^(?:"+wu+"|"+Eu+"|"+W0+"|"+G0+"|"+X0+"|"+Y0+")"),J0=new RegExp("^(?:"+wu+"|"+Eu+")"),we=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+U0.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(J0.source+"\\s*$"),/^$/,!1]];function Q0(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let s=e.src.slice(r,c),i=0;for(;i<we.length&&!we[i][0].test(s);i++);if(i===we.length)return!1;if(o)return we[i][2];let a=t+1;if(!we[i][1].test(s)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(r=e.bMarks[a]+e.tShift[a],c=e.eMarks[a],s=e.src.slice(r,c),we[i][1].test(s)){s.length!==0&&a++;break}}e.line=a;const l=e.push("html_block","",0);return l.map=[t,a],l.content=e.getLines(t,a,e.blkIndent,!0),!0}function ec(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(r);if(s!==35||r>=c)return!1;let i=1;for(s=e.src.charCodeAt(++r);s===35&&r<c&&i<=6;)i++,s=e.src.charCodeAt(++r);if(i>6||r<c&&!O(s))return!1;if(o)return!0;c=e.skipSpacesBack(c,r);const a=e.skipCharsBack(c,35,r);a>r&&O(e.src.charCodeAt(a-1))&&(c=a),e.line=t+1;const l=e.push("heading_open","h"+String(i),1);l.markup="########".slice(0,i),l.map=[t,e.line];const d=e.push("inline","",0);d.content=e.src.slice(r,c).trim(),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(i),-1);return f.markup="########".slice(0,i),!0}function tc(e,t,n){const o=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const r=e.parentType;e.parentType="paragraph";let c=0,s,i=t+1;for(;i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]>=e.blkIndent){let h=e.bMarks[i]+e.tShift[i];const p=e.eMarks[i];if(h<p&&(s=e.src.charCodeAt(h),(s===45||s===61)&&(h=e.skipChars(h,s),h=e.skipSpaces(h),h>=p))){c=s===61?1:2;break}}if(e.sCount[i]<0)continue;let m=!1;for(let h=0,p=o.length;h<p;h++)if(o[h](e,i,n,!0)){m=!0;break}if(m)break}if(!c)return!1;const a=e.getLines(t,i,e.blkIndent,!1).trim();e.line=i+1;const l=e.push("heading_open","h"+String(c),1);l.markup=String.fromCharCode(s),l.map=[t,e.line];const d=e.push("inline","",0);d.content=a,d.map=[t,e.line-1],d.children=[];const f=e.push("heading_close","h"+String(c),-1);return f.markup=String.fromCharCode(s),e.parentType=r,!0}function uc(e,t,n){const o=e.md.block.ruler.getRules("paragraph"),r=e.parentType;let c=t+1;for(e.parentType="paragraph";c<n&&!e.isEmpty(c);c++){if(e.sCount[c]-e.blkIndent>3||e.sCount[c]<0)continue;let l=!1;for(let d=0,f=o.length;d<f;d++)if(o[d](e,c,n,!0)){l=!0;break}if(l)break}const s=e.getLines(t,c,e.blkIndent,!1).trim();e.line=c;const i=e.push("paragraph_open","p",1);i.map=[t,e.line];const a=e.push("inline","",0);return a.content=s,a.map=[t,e.line],a.children=[],e.push("paragraph_close","p",-1),e.parentType=r,!0}const je=[["table",T0,["paragraph","reference"]],["code",L0],["fence",V0,["paragraph","reference","blockquote","list"]],["blockquote",I0,["paragraph","reference","blockquote","list"]],["hr",v0,["paragraph","reference","blockquote","list"]],["list",P0,["paragraph","reference","blockquote"]],["reference",Z0],["html_block",Q0,["paragraph","reference","blockquote"]],["heading",ec,["paragraph","reference","blockquote"]],["lheading",tc],["paragraph",uc]];function He(){this.ruler=new W;for(let e=0;e<je.length;e++)this.ruler.push(je[e][0],je[e][1],{alt:(je[e][2]||[]).slice()})}He.prototype.tokenize=function(e,t,n){const o=this.ruler.getRules(""),r=o.length,c=e.md.options.maxNesting;let s=t,i=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=c){e.line=n;break}const a=e.line;let l=!1;for(let d=0;d<r;d++)if(l=o[d](e,s,n,!1),l){if(a>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!i,e.isEmpty(e.line-1)&&(i=!0),s=e.line,s<n&&e.isEmpty(s)&&(i=!0,s++,e.line=s)}},He.prototype.parse=function(e,t,n,o){if(!e)return;const r=new this.State(e,t,n,o);this.tokenize(r,r.line,r.lineMax)},He.prototype.State=te;function Ne(e,t,n,o){this.src=e,this.env=n,this.md=t,this.tokens=o,this.tokens_meta=Array(o.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Ne.prototype.pushPending=function(){const e=new Y("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Ne.prototype.push=function(e,t,n){this.pending&&this.pushPending();const o=new Y(e,t,n);let r=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(r),o},Ne.prototype.scanDelims=function(e,t){const n=this.posMax,o=this.src.charCodeAt(e),r=e>0?this.src.charCodeAt(e-1):32;let c=e;for(;c<n&&this.src.charCodeAt(c)===o;)c++;const s=c-e,i=c<n?this.src.charCodeAt(c):32,a=qe(r)||$e(String.fromCharCode(r)),l=qe(i)||$e(String.fromCharCode(i)),d=Me(r),f=Me(i),m=!f&&(!l||d||a),h=!d&&(!a||f||l);return{can_open:m&&(t||!h||a),can_close:h&&(t||!m||l),length:s}},Ne.prototype.Token=Y;function nc(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function oc(e,t){let n=e.pos;for(;n<e.posMax&&!nc(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const rc=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function cc(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,o=e.posMax;if(n+3>o||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const r=e.pending.match(rc);if(!r)return!1;const c=r[1],s=e.md.linkify.matchAtStart(e.src.slice(n-c.length));if(!s)return!1;let i=s.url;if(i.length<=c.length)return!1;i=i.replace(/\*+$/,"");const a=e.md.normalizeLink(i);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-c.length);const l=e.push("link_open","a",1);l.attrs=[["href",a]],l.markup="linkify",l.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(i);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=i.length-c.length,!0}function sc(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const o=e.pending.length-1,r=e.posMax;if(!t)if(o>=0&&e.pending.charCodeAt(o)===32)if(o>=1&&e.pending.charCodeAt(o-1)===32){let c=o-1;for(;c>=1&&e.pending.charCodeAt(c-1)===32;)c--;e.pending=e.pending.slice(0,c),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<r&&O(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const yt=[];for(let e=0;e<256;e++)yt.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){yt[e.charCodeAt(0)]=1});function ic(e,t){let n=e.pos;const o=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=o))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n<o&&(r=e.src.charCodeAt(n),!!O(r));)n++;return e.pos=n,!0}let c=e.src[n];if(r>=55296&&r<=56319&&n+1<o){const i=e.src.charCodeAt(n+1);i>=56320&&i<=57343&&(c+=e.src[n+1],n++)}const s="\\"+c;if(!t){const i=e.push("text_special","",0);r<256&&yt[r]!==0?i.content=c:i.content=s,i.markup=s,i.info="escape"}return e.pos=n+1,!0}function ac(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const r=n;n++;const c=e.posMax;for(;n<c&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(r,n),i=s.length;if(e.backticksScanned&&(e.backticks[i]||0)<=r)return t||(e.pending+=s),e.pos+=i,!0;let a=n,l;for(;(l=e.src.indexOf("`",a))!==-1;){for(a=l+1;a<c&&e.src.charCodeAt(a)===96;)a++;const d=a-l;if(d===i){if(!t){const f=e.push("code_inline","code",0);f.markup=s,f.content=e.src.slice(n,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=a,!0}e.backticks[d]=l}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=i,!0}function lc(e,t){const n=e.pos,o=e.src.charCodeAt(n);if(t||o!==126)return!1;const r=e.scanDelims(e.pos,!0);let c=r.length;const s=String.fromCharCode(o);if(c<2)return!1;let i;c%2&&(i=e.push("text","",0),i.content=s,c--);for(let a=0;a<c;a+=2)i=e.push("text","",0),i.content=s+s,e.delimiters.push({marker:o,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function Du(e,t){let n;const o=[],r=t.length;for(let c=0;c<r;c++){const s=t[c];if(s.marker!==126||s.end===-1)continue;const i=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[i.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[i.token-1].type==="text"&&e.tokens[i.token-1].content==="~"&&o.push(i.token-1)}for(;o.length;){const c=o.pop();let s=c+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,c!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[c],e.tokens[c]=n)}}function dc(e){const t=e.tokens_meta,n=e.tokens_meta.length;Du(e,e.delimiters);for(let o=0;o<n;o++)t[o]&&t[o].delimiters&&Du(e,t[o].delimiters)}const Au={tokenize:lc,postProcess:dc};function fc(e,t){const n=e.pos,o=e.src.charCodeAt(n);if(t||o!==95&&o!==42)return!1;const r=e.scanDelims(e.pos,o===42);for(let c=0;c<r.length;c++){const s=e.push("text","",0);s.content=String.fromCharCode(o),e.delimiters.push({marker:o,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return e.pos+=r.length,!0}function Bu(e,t){const n=t.length;for(let o=n-1;o>=0;o--){const r=t[o];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const c=t[r.end],s=o>0&&t[o-1].end===r.end+1&&t[o-1].marker===r.marker&&t[o-1].token===r.token-1&&t[r.end+1].token===c.token+1,i=String.fromCharCode(r.marker),a=e.tokens[r.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?i+i:i,a.content="";const l=e.tokens[c.token];l.type=s?"strong_close":"em_close",l.tag=s?"strong":"em",l.nesting=-1,l.markup=s?i+i:i,l.content="",s&&(e.tokens[t[o-1].token].content="",e.tokens[t[r.end+1].token].content="",o--)}}function pc(e){const t=e.tokens_meta,n=e.tokens_meta.length;Bu(e,e.delimiters);for(let o=0;o<n;o++)t[o]&&t[o].delimiters&&Bu(e,t[o].delimiters)}const Fu={tokenize:fc,postProcess:pc};function hc(e,t){let n,o,r,c,s="",i="",a=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,f=e.posMax,m=e.pos+1,h=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(h<0)return!1;let p=h+1;if(p<f&&e.src.charCodeAt(p)===40){for(l=!1,p++;p<f&&(n=e.src.charCodeAt(p),!(!O(n)&&n!==10));p++);if(p>=f)return!1;if(a=p,r=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),r.ok){for(s=e.md.normalizeLink(r.str),e.md.validateLink(s)?p=r.pos:s="",a=p;p<f&&(n=e.src.charCodeAt(p),!(!O(n)&&n!==10));p++);if(r=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<f&&a!==p&&r.ok)for(i=r.str,p=r.pos;p<f&&(n=e.src.charCodeAt(p),!(!O(n)&&n!==10));p++);}(p>=f||e.src.charCodeAt(p)!==41)&&(l=!0),p++}if(l){if(typeof e.env.references>"u")return!1;if(p<f&&e.src.charCodeAt(p)===91?(a=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?o=e.src.slice(a,p++):p=h+1):p=h+1,o||(o=e.src.slice(m,h)),c=e.env.references[Ze(o)],!c)return e.pos=d,!1;s=c.href,i=c.title}if(!t){e.pos=m,e.posMax=h;const x=e.push("link_open","a",1),_=[["href",s]];x.attrs=_,i&&_.push(["title",i]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=f,!0}function mc(e,t){let n,o,r,c,s,i,a,l,d="";const f=e.pos,m=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(c=p+1,c<m&&e.src.charCodeAt(c)===40){for(c++;c<m&&(n=e.src.charCodeAt(c),!(!O(n)&&n!==10));c++);if(c>=m)return!1;for(l=c,i=e.md.helpers.parseLinkDestination(e.src,c,e.posMax),i.ok&&(d=e.md.normalizeLink(i.str),e.md.validateLink(d)?c=i.pos:d=""),l=c;c<m&&(n=e.src.charCodeAt(c),!(!O(n)&&n!==10));c++);if(i=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<m&&l!==c&&i.ok)for(a=i.str,c=i.pos;c<m&&(n=e.src.charCodeAt(c),!(!O(n)&&n!==10));c++);else a="";if(c>=m||e.src.charCodeAt(c)!==41)return e.pos=f,!1;c++}else{if(typeof e.env.references>"u")return!1;if(c<m&&e.src.charCodeAt(c)===91?(l=c+1,c=e.md.helpers.parseLinkLabel(e,c),c>=0?r=e.src.slice(l,c++):c=p+1):c=p+1,r||(r=e.src.slice(h,p)),s=e.env.references[Ze(r)],!s)return e.pos=f,!1;d=s.href,a=s.title}if(!t){o=e.src.slice(h,p);const x=[];e.md.inline.parse(o,e.md,e.env,x);const _=e.push("image","img",0),E=[["src",d],["alt",""]];_.attrs=E,_.children=x,_.content=o,a&&E.push(["title",a])}return e.pos=c,e.posMax=m,!0}const bc=/^([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])?)*)$/,xc=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function gc(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const o=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const c=e.src.slice(o+1,n);if(xc.test(c)){const s=e.md.normalizeLink(c);if(!e.md.validateLink(s))return!1;if(!t){const i=e.push("link_open","a",1);i.attrs=[["href",s]],i.markup="autolink",i.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(c);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=c.length+2,!0}if(bc.test(c)){const s=e.md.normalizeLink("mailto:"+c);if(!e.md.validateLink(s))return!1;if(!t){const i=e.push("link_open","a",1);i.attrs=[["href",s]],i.markup="autolink",i.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(c);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=c.length+2,!0}return!1}function _c(e){return/^<a[>\s]/i.test(e)}function kc(e){return/^<\/a\s*>/i.test(e)}function yc(e){const t=e|32;return t>=97&&t<=122}function Cc(e,t){if(!e.md.options.html)return!1;const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==60||o+2>=n)return!1;const r=e.src.charCodeAt(o+1);if(r!==33&&r!==63&&r!==47&&!yc(r))return!1;const c=e.src.slice(o).match(K0);if(!c)return!1;if(!t){const s=e.push("html_inline","",0);s.content=c[0],_c(s.content)&&e.linkLevel++,kc(s.content)&&e.linkLevel--}return e.pos+=c[0].length,!0}const wc=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Ec=/^&([a-z][a-z0-9]{1,31});/i;function Dc(e,t){const n=e.pos,o=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=o)return!1;if(e.src.charCodeAt(n+1)===35){const c=e.src.slice(n).match(wc);if(c){if(!t){const s=c[1][0].toLowerCase()==="x"?parseInt(c[1].slice(1),16):parseInt(c[1],10),i=e.push("text_special","",0);i.content=xt(s)?Pe(s):Pe(65533),i.markup=c[0],i.info="entity"}return e.pos+=c[0].length,!0}}else{const c=e.src.slice(n).match(Ec);if(c){const s=pu(c[0]);if(s!==c[0]){if(!t){const i=e.push("text_special","",0);i.content=s,i.markup=c[0],i.info="entity"}return e.pos+=c[0].length,!0}}}return!1}function Su(e){const t={},n=e.length;if(!n)return;let o=0,r=-2;const c=[];for(let s=0;s<n;s++){const i=e[s];if(c.push(0),(e[o].marker!==i.marker||r!==i.token-1)&&(o=s),r=i.token,i.length=i.length||0,!i.close)continue;t.hasOwnProperty(i.marker)||(t[i.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[i.marker][(i.open?3:0)+i.length%3];let l=o-c[o]-1,d=l;for(;l>a;l-=c[l]+1){const f=e[l];if(f.marker===i.marker&&f.open&&f.end<0){let m=!1;if((f.close||i.open)&&(f.length+i.length)%3===0&&(f.length%3!==0||i.length%3!==0)&&(m=!0),!m){const h=l>0&&!e[l-1].open?c[l-1]+1:0;c[s]=s-l+h,c[l]=h,i.open=!1,f.end=s,f.close=!1,d=-1,r=-2;break}}}d!==-1&&(t[i.marker][(i.open?3:0)+(i.length||0)%3]=d)}}function Ac(e){const t=e.tokens_meta,n=e.tokens_meta.length;Su(e.delimiters);for(let o=0;o<n;o++)t[o]&&t[o].delimiters&&Su(t[o].delimiters)}function Bc(e){let t,n,o=0;const r=e.tokens,c=e.tokens.length;for(t=n=0;t<c;t++)r[t].nesting<0&&o--,r[t].level=o,r[t].nesting>0&&o++,r[t].type==="text"&&t+1<c&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==n&&(r[n]=r[t]),n++);t!==n&&(r.length=n)}const Ct=[["text",oc],["linkify",cc],["newline",sc],["escape",ic],["backticks",ac],["strikethrough",Au.tokenize],["emphasis",Fu.tokenize],["link",hc],["image",mc],["autolink",gc],["html_inline",Cc],["entity",Dc]],wt=[["balance_pairs",Ac],["strikethrough",Au.postProcess],["emphasis",Fu.postProcess],["fragments_join",Bc]];function ze(){this.ruler=new W;for(let e=0;e<Ct.length;e++)this.ruler.push(Ct[e][0],Ct[e][1]);this.ruler2=new W;for(let e=0;e<wt.length;e++)this.ruler2.push(wt[e][0],wt[e][1])}ze.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),o=n.length,r=e.md.options.maxNesting,c=e.cache;if(typeof c[t]<"u"){e.pos=c[t];return}let s=!1;if(e.level<r){for(let i=0;i<o;i++)if(e.level++,s=n[i](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,c[t]=e.pos},ze.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,o=e.posMax,r=e.md.options.maxNesting;for(;e.pos<o;){const c=e.pos;let s=!1;if(e.level<r){for(let i=0;i<n;i++)if(s=t[i](e,!1),s){if(c>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=o)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},ze.prototype.parse=function(e,t,n,o){const r=new this.State(e,t,n,o);this.tokenize(r);const c=this.ruler2.getRules(""),s=c.length;for(let i=0;i<s;i++)c[i](r)},ze.prototype.State=Ne;function Fc(e){const t={};e=e||{},t.src_Any=iu.source,t.src_Cc=au.source,t.src_Z=du.source,t.src_P=pt.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Et(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(o){e[o]=n[o]})}),e}function We(e){return Object.prototype.toString.call(e)}function Sc(e){return We(e)==="[object String]"}function Mc(e){return We(e)==="[object Object]"}function $c(e){return We(e)==="[object RegExp]"}function Mu(e){return We(e)==="[object Function]"}function qc(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const $u={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Nc(e){return Object.keys(e||{}).reduce(function(t,n){return t||$u.hasOwnProperty(n)},!1)}const zc={"http:":{validate:function(e,t,n){const o=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},Rc="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Tc="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Lc(e){e.__index__=-1,e.__text_cache__=""}function Vc(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function qu(){return function(e,t){t.normalize(e)}}function Ge(e){const t=e.re=Fc(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Rc),n.push(t.src_xn),t.src_tlds=n.join("|");function o(i){return i.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(o(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(o(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(o(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(o(t.tpl_host_fuzzy_test),"i");const r=[];e.__compiled__={};function c(i,a){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+a)}Object.keys(e.__schemas__).forEach(function(i){const a=e.__schemas__[i];if(a===null)return;const l={validate:null,link:null};if(e.__compiled__[i]=l,Mc(a)){$c(a.validate)?l.validate=Vc(a.validate):Mu(a.validate)?l.validate=a.validate:c(i,a),Mu(a.normalize)?l.normalize=a.normalize:a.normalize?c(i,a):l.normalize=qu();return}if(Sc(a)){r.push(i);return}c(i,a)}),r.forEach(function(i){e.__compiled__[e.__schemas__[i]]&&(e.__compiled__[i].validate=e.__compiled__[e.__schemas__[i]].validate,e.__compiled__[i].normalize=e.__compiled__[e.__schemas__[i]].normalize)}),e.__compiled__[""]={validate:null,normalize:qu()};const s=Object.keys(e.__compiled__).filter(function(i){return i.length>0&&e.__compiled__[i]}).map(qc).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Lc(e)}function Ic(e,t){const n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function Dt(e,t){const n=new Ic(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function G(e,t){if(!(this instanceof G))return new G(e,t);t||Nc(e)&&(t=e,e={}),this.__opts__=Et({},$u,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Et({},zc,e),this.__compiled__={},this.__tlds__=Tc,this.__tlds_replaced__=!1,this.re={},Ge(this)}G.prototype.add=function(t,n){return this.__schemas__[t]=n,Ge(this),this},G.prototype.set=function(t){return this.__opts__=Et(this.__opts__,t),this},G.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,o,r,c,s,i,a,l,d;if(this.re.schema_test.test(t)){for(a=this.re.schema_search,a.lastIndex=0;(n=a.exec(t))!==null;)if(c=this.testSchemaAt(t,n[2],a.lastIndex),c){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(o=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=o.index+o[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=o.index+o[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=t.indexOf("@"),d>=0&&(r=t.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=i))),this.__index__>=0},G.prototype.pretest=function(t){return this.re.pretest.test(t)},G.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0},G.prototype.match=function(t){const n=[];let o=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(Dt(this,o)),o=this.__last_index__);let r=o?t.slice(o):t;for(;this.test(r);)n.push(Dt(this,o)),r=r.slice(this.__last_index__),o+=this.__last_index__;return n.length?n:null},G.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const o=this.testSchemaAt(t,n[2],n[0].length);return o?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o,Dt(this,0)):null},G.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(o,r,c){return o!==c[r-1]}).reverse(),Ge(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Ge(this),this)},G.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},G.prototype.onCompile=function(){};const Ee=2147483647,ue=36,At=1,Re=26,vc=38,Oc=700,Nu=72,zu=128,Ru="-",Pc=/^xn--/,Zc=/[^\0-\x7F]/,Uc=/[\x2E\u3002\uFF0E\uFF61]/g,jc={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Bt=ue-At,ne=Math.floor,Ft=String.fromCharCode;function de(e){throw new RangeError(jc[e])}function Hc(e,t){const n=[];let o=e.length;for(;o--;)n[o]=t(e[o]);return n}function Tu(e,t){const n=e.split("@");let o="";n.length>1&&(o=n[0]+"@",e=n[1]),e=e.replace(Uc,".");const r=e.split("."),c=Hc(r,t).join(".");return o+c}function Lu(e){const t=[];let n=0;const o=e.length;for(;n<o;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<o){const c=e.charCodeAt(n++);(c&64512)==56320?t.push(((r&1023)<<10)+(c&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}const Wc=e=>String.fromCodePoint(...e),Gc=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ue},Vu=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Iu=function(e,t,n){let o=0;for(e=n?ne(e/Oc):e>>1,e+=ne(e/t);e>Bt*Re>>1;o+=ue)e=ne(e/Bt);return ne(o+(Bt+1)*e/(e+vc))},vu=function(e){const t=[],n=e.length;let o=0,r=zu,c=Nu,s=e.lastIndexOf(Ru);s<0&&(s=0);for(let i=0;i<s;++i)e.charCodeAt(i)>=128&&de("not-basic"),t.push(e.charCodeAt(i));for(let i=s>0?s+1:0;i<n;){const a=o;for(let d=1,f=ue;;f+=ue){i>=n&&de("invalid-input");const m=Gc(e.charCodeAt(i++));m>=ue&&de("invalid-input"),m>ne((Ee-o)/d)&&de("overflow"),o+=m*d;const h=f<=c?At:f>=c+Re?Re:f-c;if(m<h)break;const p=ue-h;d>ne(Ee/p)&&de("overflow"),d*=p}const l=t.length+1;c=Iu(o-a,l,a==0),ne(o/l)>Ee-r&&de("overflow"),r+=ne(o/l),o%=l,t.splice(o++,0,r)}return String.fromCodePoint(...t)},Ou=function(e){const t=[];e=Lu(e);const n=e.length;let o=zu,r=0,c=Nu;for(const a of e)a<128&&t.push(Ft(a));const s=t.length;let i=s;for(s&&t.push(Ru);i<n;){let a=Ee;for(const d of e)d>=o&&d<a&&(a=d);const l=i+1;a-o>ne((Ee-r)/l)&&de("overflow"),r+=(a-o)*l,o=a;for(const d of e)if(d<o&&++r>Ee&&de("overflow"),d===o){let f=r;for(let m=ue;;m+=ue){const h=m<=c?At:m>=c+Re?Re:m-c;if(f<h)break;const p=f-h,x=ue-h;t.push(Ft(Vu(h+p%x,0))),f=ne(p/x)}t.push(Ft(Vu(f,0))),c=Iu(r,l,i===s),r=0,++i}++r,++o}return t.join("")},Pu={version:"2.3.1",ucs2:{decode:Lu,encode:Wc},decode:vu,encode:Ou,toASCII:function(e){return Tu(e,function(t){return Zc.test(t)?"xn--"+Ou(t):t})},toUnicode:function(e){return Tu(e,function(t){return Pc.test(t)?vu(t.slice(4).toLowerCase()):t})}},Xc={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Yc=/^(vbscript|javascript|file|data):/,Kc=/^data:image\/(gif|png|jpeg|webp);/;function Jc(e){const t=e.trim().toLowerCase();return Yc.test(t)?Kc.test(t):!0}const Zu=["http:","https:","mailto:"];function Qc(e){const t=ft(e,!0);if(t.hostname&&(!t.protocol||Zu.indexOf(t.protocol)>=0))try{t.hostname=Pu.toASCII(t.hostname)}catch{}return Se(dt(t))}function es(e){const t=ft(e,!0);if(t.hostname&&(!t.protocol||Zu.indexOf(t.protocol)>=0))try{t.hostname=Pu.toUnicode(t.hostname)}catch{}return ke(dt(t),ke.defaultChars+"%")}function K(e,t){if(!(this instanceof K))return new K(e,t);t||bt(e)||(t=e||{},e="default"),this.inline=new ze,this.block=new He,this.core=new _t,this.renderer=new Ce,this.linkify=new G,this.validateLink=Jc,this.normalizeLink=Qc,this.normalizeLinkText=es,this.utils=d0,this.helpers=Oe({},m0),this.options={},this.configure(e),t&&this.set(t)}K.prototype.set=function(e){return Oe(this.options,e),this},K.prototype.configure=function(e){const t=this;if(bt(e)){const n=e;if(e=Xc[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},K.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const o=e.filter(function(r){return n.indexOf(r)<0});if(o.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+o);return this},K.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const o=e.filter(function(r){return n.indexOf(r)<0});if(o.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+o);return this},K.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},K.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},K.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},K.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},K.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};let Uu=1;function ts(){function e(r,c){const s=new K({html:!0,typographer:!0});return s.use(Dr),c&&c.forEach(i=>s.use(i)),s.parse(r,"")}function t(r,c){const s=o(r,c)??[];return u.h("article",{class:"sq-article"},n(s))}function n(r){if(!r)return;const c=r.map(s=>{if(typeof s=="string")return s;{const i=n(s.children);return u.h(s.tag,s.attrs,typeof s.tag!="string"?{default:()=>i}:i)}});return c.length>1?c:c[0]}function o(r,c){const s=[],i={children:[]};let a=i;return r.forEach(l=>{var _,E,y,C,k,B,S,R,T,D,g;const{type:d,children:f,content:m,attrs:h,tag:p,hidden:x}=l;switch(d){case"heading_open":case"paragraph_open":case"bullet_list_open":case"ordered_list_open":case"list_item_open":case"table_open":case"thead_open":case"tbody_open":case"tr_open":case"th_open":case"td_open":case"blockquote_open":case"strong_open":case"em_open":case"s_open":case"link_open":{if(x)break;const b={tag:(c==null?void 0:c[p])??p,children:[],attrs:h?Object.fromEntries(h):{}};if(d==="link_open"){const A=l.attrGet("href")??"",w=document.location.origin;A!=null&&A.startsWith("http")&&!A.includes(w)&&(b.attrs.target="_blank",b.attrs.rel="noopener noreferrer",b.attrs.dataOuter="",(_=b.children)==null||_.push({tag:Po}))}if(d==="table_open"){const A={tag:"div",children:[],attrs:{class:"sq-article-table"}};(E=a.children)==null||E.push(A),s.push(a),a=A}(y=a.children)==null||y.push(b),s.push(a),a=b;break}case"heading_close":case"paragraph_close":case"bullet_list_close":case"ordered_list_close":case"list_item_close":case"table_close":case"thead_close":case"tbody_close":case"tr_close":case"th_close":case"td_close":case"blockquote_close":case"strong_close":case"em_close":case"s_close":case"link_close":{if(x)break;a=s.pop();break}case"code_inline":{(C=a.children)==null||C.push({tag:(c==null?void 0:c[p])??p,children:[m],attrs:h?Object.fromEntries(h):{}});break}case"inline":{if(f){const b=o(f,c);(k=a.children)==null||k.push(...b??[])}else(B=a.children)==null||B.push(m);break}case"text":{(S=a.children)==null||S.push(m);break}case"image":{(R=a.children)==null||R.push({tag:(c==null?void 0:c[p])??p,children:[],attrs:h?Object.fromEntries(h):{}});break}case"hr":{(T=a.children)==null||T.push({tag:(c==null?void 0:c[p])??p});break}case"input":{const b=h?Object.fromEntries(h):{},A=b.type??"text",w=`${p}-${A}`,M={tag:(c==null?void 0:c[w])??p,children:[],attrs:b};A==="checkbox"&&(M.attrs.value=`task-list-${Uu}`,Uu++),(D=a.children)==null||D.push(M);break}case"html_inline":{if(m.startsWith("</"))a=s.pop();else{const b=m.replace("<","").replace(">",""),A={tag:(c==null?void 0:c[b])??b,children:[]};(g=a.children)==null||g.push(A),s.push(a),a=A}break}}}),i.children}return{md2tokens:e,tokens2vueh:t}}function us(){function e(t,n=100){let o;return function(...r){o||(o=setTimeout(()=>{t.apply(this,r),o=void 0},n))}}return{throttle:e}}const{md2tokens:ns,tokens2vueh:os}=ts(),ju=u.defineComponent({name:"sq-article",props:{text:{type:String,required:!0},md:{type:Boolean,default:!0},customNodeMap:{type:Object},plugins:{type:Object}},setup(e){const t=u.computed(()=>({hr:he,blur:Hu,img:Xu,"input-checkbox":Mt,...e.customNodeMap}));return()=>{if(!e.md)return u.h("article",{class:"sq-article",innerHTML:e.text});const n=ns(e.text,e.plugins);return os(n,t.value)}}}),rs=["src","alt"],cs=["textContent"],ss=u.defineComponent({name:"sq-avatar",__name:"avatar",props:{img:{},alt:{},randomColor:{type:Boolean,default:!0},round:{type:Boolean,default:!0},size:{default:"md"}},setup(e){const t=e,n=u.ref(!0),o=u.computed(()=>{const i=[];return t.size!=="md"&&i.push(`sq-avatar--${t.size}`),t.round&&i.push("is-round"),i}),r=u.computed(()=>{if(!t.randomColor)return;const{getRandomColor:i}=wr();return{"--avatar-bg-color":i()}}),c=u.computed(()=>t.alt.charAt(0).toUpperCase());function s(){n.value=!1}return(i,a)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["sq-avatar",o.value]),style:u.normalizeStyle(r.value)},[t.img&&n.value?(u.openBlock(),u.createElementBlock("img",{key:0,src:t.img,alt:t.alt,onError:s},null,40,rs)):(u.openBlock(),u.createElementBlock("span",{key:1,textContent:u.toDisplayString(c.value)},null,8,cs))],6))}}),is={class:"sq-backtop"},as=u.defineComponent({name:"sq-backtop",__name:"backtop",props:{progress:{type:Boolean,default:!0},icon:{default:vn},transition:{default:"sq-rotate-in-left"},visibilityHeight:{default:100},target:{default:"#app"},progressProps:{}},setup(e){const{throttle:t}=us(),n=t(a),o=new ResizeObserver(l),r=e,c=u.ref(100),s=u.ref(0),i=u.computed(()=>s.value>r.visibilityHeight);u.onMounted(()=>{var m;l(),n(),window.addEventListener("scroll",n);const f=document.querySelector(r.target)??document.body;o.observe(f),(m=window.visualViewport)==null||m.addEventListener("resize",l)}),u.onBeforeUnmount(()=>{var f;window.removeEventListener("scroll",n),o.disconnect(),(f=window.visualViewport)==null||f.removeEventListener("resize",l)});function a(){s.value=window.scrollY}function l(){const f=(document.scrollingElement??document.body).scrollHeight,m=window.innerHeight;c.value=f-m}function d(){window.scrollTo({top:0,behavior:"smooth"})}return(f,m)=>(u.openBlock(),u.createBlock(u.Transition,{name:r.transition},{default:u.withCtx(()=>{var h,p,x;return[u.withDirectives(u.createElementVNode("div",is,[u.createElementVNode("div",{class:"sq-backtop-wrap",onClick:d},[r.progress?(u.openBlock(),u.createBlock(u.unref(yn),{key:0,variant:"circle",label:!1,value:s.value,max:c.value,type:(h=r.progressProps)==null?void 0:h.type,stroke:(p=r.progressProps)==null?void 0:p.stroke,color:(x=r.progressProps)==null?void 0:x.color},null,8,["value","max","type","stroke","color"])):u.createCommentVNode("",!0),u.renderSlot(f.$slots,"default",{},()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.icon)))])])],512),[[u.vShow,i.value]])]}),_:3},8,["name"]))}}),ls=["textContent"],ds=u.defineComponent({name:"sq-badge",__name:"badge",props:{type:{default:"error"},color:{},showZero:{type:Boolean},max:{default:99},count:{default:0},text:{},dot:{type:Boolean}},setup(e){const t=u.useSlots(),n=e,o=u.computed(()=>{const i=[];return n.dot&&i.push("is-dot"),i.push(`is-${n.type}`),i}),r=u.computed(()=>t.default?"sup":"div"),c=u.computed(()=>!n.dot&&n.text||n.showZero?!0:n.count>0),s=u.computed(()=>n.dot?"":n.text?n.text:n.max&&n.count>n.max?`${n.max}+`:`${n.count}`);return(i,a)=>(u.openBlock(),u.createBlock(u.Transition,{name:"sq-zoom"},{default:u.withCtx(()=>[u.unref(t).default||c.value?(u.openBlock(),u.createElementBlock("span",{key:0,class:u.normalizeClass(["sq-badge",o.value]),style:u.normalizeStyle({"--badge-color":n.color})},[u.renderSlot(i.$slots,"default"),(u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.value),{class:"sq-badge-label"},{default:u.withCtx(()=>[u.createVNode(u.Transition,{name:u.unref(t).default?"sq-zoom":""},{default:u.withCtx(()=>[c.value?(u.openBlock(),u.createElementBlock("span",{key:0,class:"sq-badge-label-inner",textContent:u.toDisplayString(s.value)},null,8,ls)):u.createCommentVNode("",!0)]),_:1},8,["name"])]),_:1}))],6)):u.createCommentVNode("",!0)]),_:3}))}}),Hu=u.defineComponent({name:"sq-blur",__name:"blur",setup(e){return(t,n)=>(u.openBlock(),u.createBlock(u.unref(se),{class:"sq-blur"},{default:u.withCtx(()=>[u.renderSlot(t.$slots,"default")]),_:3}))}});function fs(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject(St,void 0),r=u.computed(()=>u.unref(o)?void 0:e.text),c=u.computed(()=>{var l,d;return t((l=u.unref(o))==null?void 0:l.size,e.size,(d=u.unref(n))==null?void 0:d.size,"md")}),s=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.type,e.type)}),i=u.computed(()=>{var l,d;return t((l=u.unref(o))==null?void 0:l.round,e.round,(d=u.unref(n))==null?void 0:d.round)}),a=u.computed(()=>{var l,d,f;return t((l=u.unref(n))==null?void 0:l.disabled,(d=u.unref(n))==null?void 0:d.readonly,(f=u.unref(o))==null?void 0:f.disabled,e.disabled)});return{btnTextType:r,btnSize:c,btnType:s,btnRound:i,btnDisabled:a}}function ps(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject($t,void 0),r=u.computed(()=>{var l,d;return t((l=u.unref(o))==null?void 0:l.size,e.size,(d=u.unref(n))==null?void 0:d.size,"md")}),c=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.form,e.form)}),s=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.name,e.name)}),i=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.variant,e.variant)}),a=u.computed(()=>{var l,d,f;return t((l=u.unref(n))==null?void 0:l.disabled,(d=u.unref(n))==null?void 0:d.readonly,(f=u.unref(o))==null?void 0:f.disabled,e.disabled)});return{checkboxSize:r,checkboxForm:c,checkboxName:s,checkboxVariant:i,checkboxDisabled:a,groupContext:o}}function hs(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject(Xe,void 0),r=u.computed(()=>{var a;return t(e.size,(a=u.unref(n))==null?void 0:a.size,"md")}),c=u.computed(()=>{var a;return t(e.round,(a=u.unref(n))==null?void 0:a.round)}),s=u.computed(()=>{var a;return t((a=u.unref(n))==null?void 0:a.disabled,e.disabled)}),i=u.computed(()=>{var a;return t((a=u.unref(n))==null?void 0:a.readonly,e.readonly)});return{inputSize:r,inputRound:c,inputDisabled:s,inputReadonly:i,id:o}}function ms(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject(Pt,void 0),r=u.computed(()=>{var l,d;return t((l=u.unref(o))==null?void 0:l.size,e.size,(d=u.unref(n))==null?void 0:d.size,"md")}),c=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.form,e.form)}),s=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.name,e.name)}),i=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.variant,e.variant)}),a=u.computed(()=>{var l,d,f;return t((l=u.unref(n))==null?void 0:l.disabled,(d=u.unref(n))==null?void 0:d.readonly,(f=u.unref(o))==null?void 0:f.disabled,e.disabled)});return{radioSize:r,radioForm:c,radioName:s,radioVariant:i,radioDisabled:a,groupContext:o}}function bs(e){const{getOption:t}=_e(),n=u.inject(Zt,void 0);return{segmentedDisabled:u.computed(()=>{var r;return t((r=u.unref(n))==null?void 0:r.disabled,e.disabled)}),parentContext:n}}function xs(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject(Xe,void 0),r=u.computed(()=>{var s;return t(e.size,(s=u.unref(n))==null?void 0:s.size,"md")}),c=u.computed(()=>{var s,i;return t((s=u.unref(n))==null?void 0:s.disabled,(i=u.unref(n))==null?void 0:i.readonly,e.disabled)});return{switchSize:r,switchDisabled:c,id:o}}const gs=["disabled","form","type"],P=u.defineComponent({name:"sq-button",__name:"button",props:{type:{},round:{type:Boolean,default:void 0},text:{type:Boolean},icon:{},loading:{type:Boolean},form:{},bg:{type:Boolean},nativeType:{default:"button"},disabled:{type:Boolean,default:void 0},size:{}},emits:["click"],setup(e,{emit:t}){const n=t,o=e,{btnTextType:r,btnSize:c,btnType:s,btnRound:i,btnDisabled:a}=fs(o),l=u.computed(()=>{const m=[],h=u.unref(c),p=u.unref(s),x=u.unref(i),_=u.unref(r);return h!=="md"&&m.push(`sq-button--${h}`),p&&m.push(`is-${p}`),x&&m.push("is-round"),_&&m.push("is-text"),_&&o.bg&&m.push("has-bg"),m}),d=u.computed(()=>o.loading?Ve:o.icon),f=u.computed(()=>o.loading||u.unref(a));return(m,h)=>(u.openBlock(),u.createElementBlock("button",{class:u.normalizeClass(["sq-button",l.value]),disabled:f.value,form:o.form,type:o.nativeType,onClick:h[0]||(h[0]=p=>n("click",p))},[u.createVNode(u.unref(se),{size:u.unref(c)==="lg"?"md":u.unref(c)},{default:u.withCtx(()=>[d.value?(u.openBlock(),u.createBlock(u.resolveDynamicComponent(d.value),{key:0})):u.createCommentVNode("",!0),u.renderSlot(m.$slots,"default")]),_:3},8,["size"])],10,gs))}}),_s={class:"sq-button-group"},ks=u.defineComponent({name:"sq-button-group",__name:"button-group",props:{size:{},type:{},round:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},setup(e){const t=e;return u.provide(St,u.ref({size:u.toRef(t,"size"),type:u.toRef(t,"type"),round:u.toRef(t,"round"),disabled:u.toRef(t,"disabled")})),(n,o)=>(u.openBlock(),u.createElementBlock("div",_s,[u.renderSlot(n.$slots,"default")]))}}),St=Symbol("button-group-context-keys"),ys={class:"sq-card"},Cs={key:0,class:"sq-card-header"},ws=["textContent"],Es={key:1,class:"sq-card-footer"},Ds=u.defineComponent({name:"sq-card",__name:"card",props:{title:{},decorative:{type:Boolean,default:!1}},setup(e){const t=u.useSlots(),n=e;return(o,r)=>(u.openBlock(),u.createElementBlock("section",ys,[n.title||u.unref(t).title?(u.openBlock(),u.createElementBlock("div",Cs,[u.createElementVNode("h2",{class:u.normalizeClass({"has-decorative":n.decorative}),textContent:u.toDisplayString(n.title)},null,10,ws),u.renderSlot(o.$slots,"title")])):u.createCommentVNode("",!0),u.renderSlot(o.$slots,"default"),u.unref(t).footer?(u.openBlock(),u.createElementBlock("div",Es,[u.renderSlot(o.$slots,"footer")])):u.createCommentVNode("",!0)]))}}),As=["autofocus","name","form","value","disabled"],Bs=["textContent"],Mt=u.defineComponent({name:"sq-checkbox",__name:"checkbox",props:u.mergeModels({form:{},name:{},disabled:{type:Boolean,default:void 0},size:{},indeterminate:{type:Boolean},variant:{},autofocus:{type:Boolean},label:{},value:{}},{checked:{type:Boolean,default:!1},checkedModifiers:{}}),emits:u.mergeModels(["change"],["update:checked"]),setup(e,{emit:t}){const n=t,o=e,{checkboxSize:r,checkboxDisabled:c,checkboxForm:s,checkboxName:i,checkboxVariant:a,groupContext:l}=ps(o),d=u.useModel(e,"checked"),f=u.computed(()=>{const h=[],p=u.unref(r),x=u.unref(c),_=u.unref(a);return p!=="md"&&h.push(`sq-selection--${p}`),m.value&&h.push("is-checked"),x&&h.push("is-disabled"),_&&h.push(`is-${_}`),h}),m=u.computed(()=>l?u.unref(l).list.includes(o.value):d.value);return u.watch(m,h=>{if(d.value!==h){d.value=h;return}}),u.watch(d,h=>{m.value!==h&&l&&l.value.toggleItem(o.value)}),u.onMounted(()=>{d.value=m.value}),(h,p)=>(u.openBlock(),u.createElementBlock("label",{class:u.normalizeClass(["sq-selection sq-checkbox",f.value])},[u.withDirectives(u.createElementVNode("input",{type:"checkbox",autofocus:o.autofocus,name:u.unref(i),form:u.unref(s),value:o.value,disabled:u.unref(c),"onUpdate:modelValue":p[0]||(p[0]=x=>d.value=x),onChange:p[1]||(p[1]=x=>n("change",d.value))},null,40,As),[[u.vModelCheckbox,d.value]]),u.unref(a)!=="solid"?(u.openBlock(),u.createElementBlock("span",{key:0,class:u.normalizeClass(["sq-checkbox-box",{"is-indeterminate":o.indeterminate&&!m.value}])},[m.value?(u.openBlock(),u.createBlock(u.unref(Un),{key:0,class:"sq-checkbox-inner"})):u.createCommentVNode("",!0)],2)):u.createCommentVNode("",!0),o.label?(u.openBlock(),u.createElementBlock("span",{key:1,class:"sq-selection-label",textContent:u.toDisplayString(o.label)},null,8,Bs)):u.createCommentVNode("",!0)],2))}}),Fs={class:"sq-checkbox-group sq-selection-group"},Wu=u.defineComponent({name:"sq-checkbox-group",__name:"checkbox-group",props:{items:{default:()=>[]},value:{},form:{},name:{},disabled:{type:Boolean,default:void 0},size:{},variant:{}},emits:["change","update:value"],setup(e,{emit:t}){const{nextId:n}=Ie(),o=t,r=e,c=u.ref(r.value??[]),s=u.computed(()=>r.name??`sq-checkbox-${n()}`);u.provide($t,u.ref({form:u.toRef(r,"form"),name:s,disabled:u.toRef(r,"disabled"),size:u.toRef(r,"size"),variant:u.toRef(r,"variant"),list:c,toggleItem:i})),u.watch(()=>r.value,a=>{const l=a||[],d=[...new Set([...l,c.value])];d.length===l.length&&d.length===c.value.length||(c.value=l)});function i(a){c.value.includes(a)?c.value=c.value.filter(l=>l!==a):c.value.push(a),o("change",u.toRaw(c.value)),o("update:value",u.toRaw(c.value))}return(a,l)=>(u.openBlock(),u.createElementBlock("div",Fs,[u.renderSlot(a.$slots,"default",{},()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.items,(d,f)=>(u.openBlock(),u.createBlock(u.unref(Mt),{key:f,label:d.toString(),value:d},null,8,["label","value"]))),128))])]))}}),$t=Symbol("checkbox-group-context-keys"),Gu=u.defineComponent({name:"sq-mask",inheritAttrs:!1,__name:"mask",props:u.mergeModels({keyboard:{type:Boolean,default:!0},maskCloseable:{type:Boolean},onClose:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(e){const{nextZIndex:t}=lt();let n;const o=e,r=u.ref(0),c=u.ref(!1),s=u.useModel(e,"visible");c.value=s.value,u.watch(s,d=>{const f=document.scrollingElement;d?(n=f.style.overflow,f.style.overflow="hidden",r.value=t(),c.value=!0,document.addEventListener("keydown",i)):(f.style.overflow=n,document.removeEventListener("keydown",i))}),u.onBeforeUnmount(()=>{document.removeEventListener("keydown",i)});function i(d){d.key==="Escape"&&o.keyboard&&l()}function a(){o.maskCloseable&&l()}function l(){if(typeof o.onClose!="function"){s.value=!1;return}const d=o.onClose();d instanceof Promise?d.then(f=>{f&&(s.value=!1)}).catch(()=>{}):d&&(s.value=!1)}return(d,f)=>(u.openBlock(),u.createBlock(u.Teleport,{to:"body"},[u.createVNode(u.Transition,{name:"sq-fade"},{default:u.withCtx(()=>[c.value?u.withDirectives((u.openBlock(),u.createElementBlock("div",u.mergeProps({key:0,class:"sq-mask",style:{zIndex:r.value}},d.$attrs,{onClick:a}),[u.renderSlot(d.$slots,"default")],16)),[[u.vShow,s.value]]):u.createCommentVNode("",!0)]),_:3})]))}}),Ss={key:0,class:"sq-dialog-header"},Ms=["textContent"],$s={class:"sq-dialog-body"},qs={key:1,class:"sq-dialog-footer"},Ns=u.defineComponent({name:"sq-dialog",__name:"dialog",props:u.mergeModels({type:{},title:{},okText:{default:"确认"},cancelText:{default:"取消"},footer:{type:Boolean,default:!0},closeable:{type:Boolean},onOk:{},keyboard:{type:Boolean,default:void 0},maskCloseable:{type:Boolean,default:void 0},onClose:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(e){const t=u.useSlots(),n=e,o=u.ref(!1),r=u.ref(!1),c=u.useModel(e,"visible"),s=u.computed(()=>!!n.title||!!t.header),i=u.computed(()=>{const m=[];return n.type&&m.push(`is-${n.type}`),s.value&&m.push("has-header"),m}),a=u.computed(()=>n.type?at[n.type]:void 0);function l(m){if(o.value)return!1;if(typeof m!="function")return!0;const h=m();return h instanceof Promise?(o.value=!0,h.finally(()=>{o.value=!1})):h}async function d(){if(o.value)return;r.value=!1,await l(n.onClose)&&(c.value=!1)}async function f(){r.value=!0,await l(n.onOk)&&(c.value=!1)}return(m,h)=>(u.openBlock(),u.createBlock(u.unref(Gu),{visible:c.value,"onUpdate:visible":h[0]||(h[0]=p=>c.value=p),onClose:h[1]||(h[1]=()=>l(n.onClose))},{default:u.withCtx(()=>[u.withDirectives(u.createElementVNode("div",{class:u.normalizeClass(["sq-dialog",i.value])},[s.value?(u.openBlock(),u.createElementBlock("div",Ss,[a.value?(u.openBlock(),u.createBlock(u.resolveDynamicComponent(a.value),{key:0,class:"sq-dialog-header-icon"})):u.createCommentVNode("",!0),u.renderSlot(m.$slots,"header",{},()=>[u.createElementVNode("span",{class:"sq-dialog-header-title",textContent:u.toDisplayString(n.title)},null,8,Ms)]),u.createVNode(u.unref(it),{class:"sq-dialog-close",onClick:d})])):u.createCommentVNode("",!0),u.createElementVNode("div",$s,[u.renderSlot(m.$slots,"default")]),n.footer?(u.openBlock(),u.createElementBlock("div",qs,[u.renderSlot(m.$slots,"footer",{},()=>[u.createVNode(u.unref(P),{text:"",bg:"",disabled:o.value,onClick:d},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(n.cancelText),1)]),_:1},8,["disabled"]),u.createVNode(u.unref(P),{type:n.type??"primary",disabled:o.value,loading:o.value&&r.value,onClick:f},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(n.okText),1)]),_:1},8,["type","disabled","loading"])])])):u.createCommentVNode("",!0)],2),[[u.vShow,c.value]])]),_:3},8,["visible"]))}}),he=u.defineComponent({name:"sq-divider",__name:"divider",props:{direction:{default:"horizontal"},variant:{default:"solid"},orientation:{default:"left"},ellipsis:{type:[Boolean,Number]},size:{}},setup(e){const t=u.useSlots(),n=e,o=u.computed(()=>{const r=[];return["none","solid","dotted","dashed"].includes(n.variant)&&r.push("is-thin"),t.default&&n.direction!=="vertical"&&r.push(`text-${n.orientation}`),r.push(`sq-divider--${n.direction}`),r});return(r,c)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["sq-divider",o.value]),style:u.normalizeStyle({"--divider-line-type":n.variant})},[u.unref(t).default&&n.direction!=="vertical"?(u.openBlock(),u.createBlock(u.unref(se),{key:0,ellipsis:n.ellipsis,size:n.size},{default:u.withCtx(()=>[u.renderSlot(r.$slots,"default")]),_:3},8,["ellipsis","size"])):u.createCommentVNode("",!0)],6))}}),zs=u.defineComponent({name:"sq-editor-bold",__name:"editor-bold",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{expose:t,emit:n}){const o=n,r=e;function c(){if(r.disabled)return;const s=[...r.rows],i=s[r.selectedRow],a=i.substring(0,r.selectInfo.startOfRow),l=i.substring(r.selectInfo.endOfRow);let d=r.selectedVal??"";if(d.match(/\*\*\*.*?\*\*\*/)){d=d.replaceAll("***","*"),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-4);return}if(d.match(/\*\*.*?\*\*/)){d=d.replaceAll("**",""),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-4);return}d=`**${d}**`,s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,4)}return t({setBold:c}),(s,i)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"加粗 ( Ctrl + B )",disabled:r.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Tn),disabled:r.disabled,onClick:c},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Rs=u.defineComponent({name:"sq-editor-italic",__name:"editor-italic",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{expose:t,emit:n}){const o=n,r=e;function c(){if(r.disabled)return;const s=[...r.rows],i=s[r.selectedRow],a=i.substring(0,r.selectInfo.startOfRow),l=i.substring(r.selectInfo.endOfRow);let d=r.selectedVal??"";if(d.match(/\*\*\*.*?\*\*\*/)){d=d.replaceAll("***","**"),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-2);return}const m=d.match(/\*\*.*?\*\*/),p=((m==null?void 0:m[0])??"").replaceAll("**","").match(/\*.*?\*/);if(m&&!p){d=`*${d}*`,s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,2);return}else if(p){d=d.replaceAll("**","[B]").replaceAll("*","").replaceAll("[B]","**"),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-2);return}if(d.match(/\*.*?\*/)){d=d.replaceAll("*",""),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-2);return}d=`*${d}*`,s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,2)}return t({setItalic:c}),(s,i)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"斜体 ( Ctrl + I )",disabled:r.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Vo),disabled:r.disabled,onClick:c},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Ts=u.defineComponent({name:"sq-editor-underline",__name:"editor-underline",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{expose:t,emit:n}){const o=n,r=e;function c(){var p;if(r.disabled)return;const s=[...r.rows],i=s[r.selectedRow],a=i.substring(0,r.selectInfo.startOfRow),l=i.substring(r.selectInfo.endOfRow),d=/<u\b.*?>/;let f=r.selectedVal??"";const m=((p=f.match(d))==null?void 0:p[0])??"";if(f.match(/<u\b.*?>.*?<\/u>/)){f=f.replace(m,"").replace("</u>","");const x=m.length+4;s[r.selectedRow]=`${a}${f}${l}`,o("updateText",s,0,-x);return}f=`<u>${f}</u>`,s[r.selectedRow]=`${a}${f}${l}`,o("updateText",s,0,7)}return t({setUnderline:c}),(s,i)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"下划线 ( Ctrl + U )",disabled:r.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(sr),disabled:r.disabled,onClick:c},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Ls=u.defineComponent({name:"sq-editor-strikethrough",__name:"editor-strikethrough",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{emit:t}){const n=t,o=e;function r(){if(o.disabled)return;const c=[...o.rows],s=c[o.selectedRow],i=s.substring(0,o.selectInfo.startOfRow),a=s.substring(o.selectInfo.endOfRow);let l=o.selectedVal??"";if(l.match(/\~\~.*?\~\~/)){l=l.replaceAll("~~",""),c[o.selectedRow]=`${i}${l}${a}`,n("updateText",c,0,-4);return}l=`~~${l}~~`,c[o.selectedRow]=`${i}${l}${a}`,n("updateText",c,0,4)}return(c,s)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"删除线",disabled:o.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(nr),disabled:o.disabled,onClick:r},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Vs=u.defineComponent({name:"sq-editor-blur",__name:"editor-blur",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{emit:t}){const n=t,o=e;function r(){var h;if(o.disabled)return;const c=[...o.rows],s=c[o.selectedRow],i=s.substring(0,o.selectInfo.startOfRow),a=s.substring(o.selectInfo.endOfRow),l=/<blur\b.*?>/;let d=o.selectedVal??"";const f=((h=d.match(l))==null?void 0:h[0])??"";if(d.match(/<blur\b.*?>.*?<\/blur>/)){d=d.replace(f,"").replace("</blur>","");const p=f.length+7;c[o.selectedRow]=`${i}${d}${a}`,n("updateText",c,0,-p);return}d=`<blur>${d}</blur>`,c[o.selectedRow]=`${i}${d}${a}`,n("updateText",c,0,13)}return(c,s)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"模糊块",disabled:o.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Gt),disabled:o.disabled,onClick:r},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Is=u.defineComponent({name:"sq-editor-ul",__name:"editor-ul",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{emit:t}){const n=t,o=e;function r(){const a=o.selectedRow,l=[...o.rows],d=l[a];if(c(d)){l[a]=d.replace("- ",""),n("updateText",l,-2,-2);return}if(s(d)){const f=i(d),m=2-f.length;l[a]=d.replace(f,"- "),n("updateText",l,m,m);return}l[a]=`- ${d}`,n("updateText",l,2,2)}function c(a){return a.replace(" ","").startsWith("- ")}function s(a){return/^\d+\.\s+/.test(a.replace(" ",""))}function i(a){return a.replace(" ","").match(/^\d+\.\s/)[0]}return(a,l)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"无序列表",disabled:o.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Yo),disabled:o.disabled,onClick:r},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),vs=u.defineComponent({name:"sq-editor-ol",__name:"editor-ol",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{emit:t}){const n=t,o=e;function r(){const a=o.selectedRow,l=[...o.rows],d=l[a],f=a>0?l[a-1]:"";let m=1;if(c(d)){f&&s(f)&&(m=parseInt(i(f))+1);const x=`${m}. `,_=x.length-2;l[a]=d.replace("- ",x),n("updateText",l,_,_);return}if(s(d)){const x=i(d),_=-x.length;l[a]=d.replace(x,""),n("updateText",l,_,_);return}f&&s(f)&&(m=parseInt(i(f))+1);const h=`${m}. `,p=h.length;l[a]=`${h}${d}`,n("updateText",l,p,p)}function c(a){return a.replace(" ","").startsWith("- ")}function s(a){return/^\d+\.\s+/.test(a.replace(" ",""))}function i(a){return a.replace(" ","").match(/^\d+\.\s/)[0]}return(a,l)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"有序列表",disabled:o.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Ho),disabled:o.disabled,onClick:r},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Os={class:"sq-editor-body"},Ps={class:"sq-editor-toolbar"},Zs={class:"sq-editor-control"},Us=u.defineComponent({name:"sq-editor",__name:"editor",props:u.mergeModels({round:{type:Boolean},disabled:{type:Boolean},placeholder:{},maxlength:{},minlength:{},size:{},beforePreview:{}},{value:{default:""},valueModifiers:{}}),emits:["update:value"],setup(e){const t=[{text:"编辑",value:"edit"},{text:"预览",value:"preview"}];let n;const o=e,r=u.ref("edit"),c=u.ref([]),s=u.ref(!1),i=u.ref(""),a=u.ref(),l=u.ref({}),d=u.shallowRef(null),f=u.shallowRef(null),m=u.shallowRef(null),h=u.shallowRef(null),p=u.useModel(e,"value"),x=u.computed(()=>{const A=[];return o.size!=="md"&&A.push(`sq-editor--${o.size}`),o.round&&A.push("is-round"),A}),_=u.computed(()=>i.value.length&&!i.value.includes(`
|
|
49
|
+
`,c.map=[t,e.line],!0}function V0(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>c)return!1;const s=e.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let i=r;r=e.skipChars(r,s);let a=r-i;if(a<3)return!1;const l=e.src.slice(i,r),d=e.src.slice(r,c);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(o)return!0;let f=t,m=!1;for(;f++,!(f>=n||(r=i=e.bMarks[f]+e.tShift[f],c=e.eMarks[f],r<c&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(r)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(r=e.skipChars(r,s),!(r-i<a)&&(r=e.skipSpaces(r),!(r<c)))){m=!0;break}a=e.sCount[t],e.line=f+(m?1:0);const h=e.push("fence","code",0);return h.info=d,h.content=e.getLines(t+1,f,a,!0),h.markup=l,h.map=[t,e.line],!0}function I0(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(o)return!0;const i=[],a=[],l=[],d=[],f=e.md.block.ruler.getRules("blockquote"),m=e.parentType;e.parentType="blockquote";let h=!1,p;for(p=t;p<n;p++){const C=e.sCount[p]<e.blkIndent;if(r=e.bMarks[p]+e.tShift[p],c=e.eMarks[p],r>=c)break;if(e.src.charCodeAt(r++)===62&&!C){let B=e.sCount[p]+1,S,R;e.src.charCodeAt(r)===32?(r++,B++,R=!1,S=!0):e.src.charCodeAt(r)===9?(S=!0,(e.bsCount[p]+B)%4===3?(r++,B++,R=!1):R=!0):S=!1;let T=B;for(i.push(e.bMarks[p]),e.bMarks[p]=r;r<c;){const D=e.src.charCodeAt(r);if(O(D))D===9?T+=4-(T+e.bsCount[p]+(R?1:0))%4:T++;else break;r++}h=r>=c,a.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(S?1:0),l.push(e.sCount[p]),e.sCount[p]=T-B,d.push(e.tShift[p]),e.tShift[p]=r-e.bMarks[p];continue}if(h)break;let k=!1;for(let B=0,S=f.length;B<S;B++)if(f[B](e,p,n,!0)){k=!0;break}if(k){e.lineMax=p,e.blkIndent!==0&&(i.push(e.bMarks[p]),a.push(e.bsCount[p]),d.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}i.push(e.bMarks[p]),a.push(e.bsCount[p]),d.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]=-1}const x=e.blkIndent;e.blkIndent=0;const _=e.push("blockquote_open","blockquote",1);_.markup=">";const E=[t,0];_.map=E,e.md.block.tokenize(e,t,p);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=m,E[1]=e.line;for(let C=0;C<d.length;C++)e.bMarks[C+t]=i[C],e.tShift[C+t]=d[C],e.sCount[C+t]=l[C],e.bsCount[C+t]=a[C];return e.blkIndent=x,!0}function v0(e,t,n,o){const r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let c=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(c++);if(s!==42&&s!==45&&s!==95)return!1;let i=1;for(;c<r;){const l=e.src.charCodeAt(c++);if(l!==s&&!O(l))return!1;l===s&&i++}if(i<3)return!1;if(o)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=Array(i+1).join(String.fromCharCode(s)),!0}function yu(e,t){const n=e.eMarks[t];let o=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(o++);if(r!==42&&r!==45&&r!==43)return-1;if(o<n){const c=e.src.charCodeAt(o);if(!O(c))return-1}return o}function Cu(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];let r=n;if(r+1>=o)return-1;let c=e.src.charCodeAt(r++);if(c<48||c>57)return-1;for(;;){if(r>=o)return-1;if(c=e.src.charCodeAt(r++),c>=48&&c<=57){if(r-n>=10)return-1;continue}if(c===41||c===46)break;return-1}return r<o&&(c=e.src.charCodeAt(r),!O(c))?-1:r}function O0(e,t){const n=e.level+2;for(let o=t+2,r=e.tokens.length-2;o<r;o++)e.tokens[o].level===n&&e.tokens[o].type==="paragraph_open"&&(e.tokens[o+2].hidden=!0,e.tokens[o].hidden=!0,o+=2)}function P0(e,t,n,o){let r,c,s,i,a=t,l=!0;if(e.sCount[a]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]<e.blkIndent)return!1;let d=!1;o&&e.parentType==="paragraph"&&e.sCount[a]>=e.blkIndent&&(d=!0);let f,m,h;if((h=Cu(e,a))>=0){if(f=!0,s=e.bMarks[a]+e.tShift[a],m=Number(e.src.slice(s,h-1)),d&&m!==1)return!1}else if((h=yu(e,a))>=0)f=!1;else return!1;if(d&&e.skipSpaces(h)>=e.eMarks[a])return!1;if(o)return!0;const p=e.src.charCodeAt(h-1),x=e.tokens.length;f?(i=e.push("ordered_list_open","ol",1),m!==1&&(i.attrs=[["start",m]])):i=e.push("bullet_list_open","ul",1);const _=[a,0];i.map=_,i.markup=String.fromCharCode(p);let E=!1;const y=e.md.block.ruler.getRules("list"),C=e.parentType;for(e.parentType="list";a<n;){c=h,r=e.eMarks[a];const k=e.sCount[a]+h-(e.bMarks[a]+e.tShift[a]);let B=k;for(;c<r;){const L=e.src.charCodeAt(c);if(L===9)B+=4-(B+e.bsCount[a])%4;else if(L===32)B++;else break;c++}const S=c;let R;S>=r?R=1:R=B-k,R>4&&(R=1);const T=k+R;i=e.push("list_item_open","li",1),i.markup=String.fromCharCode(p);const D=[a,0];i.map=D,f&&(i.info=e.src.slice(s,h-1));const g=e.tight,b=e.tShift[a],A=e.sCount[a],w=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=T,e.tight=!0,e.tShift[a]=S-e.bMarks[a],e.sCount[a]=B,S>=r&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,a,n,!0),(!e.tight||E)&&(l=!1),E=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[a]=b,e.sCount[a]=A,e.tight=g,i=e.push("list_item_close","li",-1),i.markup=String.fromCharCode(p),a=e.line,D[1]=a,a>=n||e.sCount[a]<e.blkIndent||e.sCount[a]-e.blkIndent>=4)break;let M=!1;for(let L=0,V=y.length;L<V;L++)if(y[L](e,a,n,!0)){M=!0;break}if(M)break;if(f){if(h=Cu(e,a),h<0)break;s=e.bMarks[a]+e.tShift[a]}else if(h=yu(e,a),h<0)break;if(p!==e.src.charCodeAt(h-1))break}return f?i=e.push("ordered_list_close","ol",-1):i=e.push("bullet_list_close","ul",-1),i.markup=String.fromCharCode(p),_[1]=a,e.line=a,e.parentType=C,l&&O0(e,x),!0}function Z0(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==91)return!1;function i(y){const C=e.lineMax;if(y>=C||e.isEmpty(y))return null;let k=!1;if(e.sCount[y]-e.blkIndent>3&&(k=!0),e.sCount[y]<0&&(k=!0),!k){const R=e.md.block.ruler.getRules("reference"),T=e.parentType;e.parentType="reference";let D=!1;for(let g=0,b=R.length;g<b;g++)if(R[g](e,y,C,!0)){D=!0;break}if(e.parentType=T,D)return null}const B=e.bMarks[y]+e.tShift[y],S=e.eMarks[y];return e.src.slice(B,S+1)}let a=e.src.slice(r,c+1);c=a.length;let l=-1;for(r=1;r<c;r++){const y=a.charCodeAt(r);if(y===91)return!1;if(y===93){l=r;break}else if(y===10){const C=i(s);C!==null&&(a+=C,c=a.length,s++)}else if(y===92&&(r++,r<c&&a.charCodeAt(r)===10)){const C=i(s);C!==null&&(a+=C,c=a.length,s++)}}if(l<0||a.charCodeAt(l+1)!==58)return!1;for(r=l+2;r<c;r++){const y=a.charCodeAt(r);if(y===10){const C=i(s);C!==null&&(a+=C,c=a.length,s++)}else if(!O(y))break}const d=e.md.helpers.parseLinkDestination(a,r,c);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;r=d.pos;const m=r,h=s,p=r;for(;r<c;r++){const y=a.charCodeAt(r);if(y===10){const C=i(s);C!==null&&(a+=C,c=a.length,s++)}else if(!O(y))break}let x=e.md.helpers.parseLinkTitle(a,r,c);for(;x.can_continue;){const y=i(s);if(y===null)break;a+=y,r=c,c=a.length,s++,x=e.md.helpers.parseLinkTitle(a,r,c,x)}let _;for(r<c&&p!==r&&x.ok?(_=x.str,r=x.pos):(_="",r=m,s=h);r<c;){const y=a.charCodeAt(r);if(!O(y))break;r++}if(r<c&&a.charCodeAt(r)!==10&&_)for(_="",r=m,s=h;r<c;){const y=a.charCodeAt(r);if(!O(y))break;r++}if(r<c&&a.charCodeAt(r)!==10)return!1;const E=Ze(a.slice(1,l));return E?(o||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[E]>"u"&&(e.env.references[E]={title:_,href:f}),e.line=s),!0):!1}const U0=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],j0="[a-zA-Z_:][a-zA-Z0-9:._-]*",H0="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",wu="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+j0+"(?:\\s*=\\s*"+H0+")?)")+"*\\s*\\/?>",Eu="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",W0="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",G0="<[?][\\s\\S]*?[?]>",X0="<![A-Za-z][^>]*>",Y0="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",K0=new RegExp("^(?:"+wu+"|"+Eu+"|"+W0+"|"+G0+"|"+X0+"|"+Y0+")"),J0=new RegExp("^(?:"+wu+"|"+Eu+")"),we=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+U0.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(J0.source+"\\s*$"),/^$/,!1]];function Q0(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let s=e.src.slice(r,c),i=0;for(;i<we.length&&!we[i][0].test(s);i++);if(i===we.length)return!1;if(o)return we[i][2];let a=t+1;if(!we[i][1].test(s)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(r=e.bMarks[a]+e.tShift[a],c=e.eMarks[a],s=e.src.slice(r,c),we[i][1].test(s)){s.length!==0&&a++;break}}e.line=a;const l=e.push("html_block","",0);return l.map=[t,a],l.content=e.getLines(t,a,e.blkIndent,!0),!0}function ec(e,t,n,o){let r=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(r);if(s!==35||r>=c)return!1;let i=1;for(s=e.src.charCodeAt(++r);s===35&&r<c&&i<=6;)i++,s=e.src.charCodeAt(++r);if(i>6||r<c&&!O(s))return!1;if(o)return!0;c=e.skipSpacesBack(c,r);const a=e.skipCharsBack(c,35,r);a>r&&O(e.src.charCodeAt(a-1))&&(c=a),e.line=t+1;const l=e.push("heading_open","h"+String(i),1);l.markup="########".slice(0,i),l.map=[t,e.line];const d=e.push("inline","",0);d.content=e.src.slice(r,c).trim(),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(i),-1);return f.markup="########".slice(0,i),!0}function tc(e,t,n){const o=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const r=e.parentType;e.parentType="paragraph";let c=0,s,i=t+1;for(;i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]>=e.blkIndent){let h=e.bMarks[i]+e.tShift[i];const p=e.eMarks[i];if(h<p&&(s=e.src.charCodeAt(h),(s===45||s===61)&&(h=e.skipChars(h,s),h=e.skipSpaces(h),h>=p))){c=s===61?1:2;break}}if(e.sCount[i]<0)continue;let m=!1;for(let h=0,p=o.length;h<p;h++)if(o[h](e,i,n,!0)){m=!0;break}if(m)break}if(!c)return!1;const a=e.getLines(t,i,e.blkIndent,!1).trim();e.line=i+1;const l=e.push("heading_open","h"+String(c),1);l.markup=String.fromCharCode(s),l.map=[t,e.line];const d=e.push("inline","",0);d.content=a,d.map=[t,e.line-1],d.children=[];const f=e.push("heading_close","h"+String(c),-1);return f.markup=String.fromCharCode(s),e.parentType=r,!0}function uc(e,t,n){const o=e.md.block.ruler.getRules("paragraph"),r=e.parentType;let c=t+1;for(e.parentType="paragraph";c<n&&!e.isEmpty(c);c++){if(e.sCount[c]-e.blkIndent>3||e.sCount[c]<0)continue;let l=!1;for(let d=0,f=o.length;d<f;d++)if(o[d](e,c,n,!0)){l=!0;break}if(l)break}const s=e.getLines(t,c,e.blkIndent,!1).trim();e.line=c;const i=e.push("paragraph_open","p",1);i.map=[t,e.line];const a=e.push("inline","",0);return a.content=s,a.map=[t,e.line],a.children=[],e.push("paragraph_close","p",-1),e.parentType=r,!0}const je=[["table",T0,["paragraph","reference"]],["code",L0],["fence",V0,["paragraph","reference","blockquote","list"]],["blockquote",I0,["paragraph","reference","blockquote","list"]],["hr",v0,["paragraph","reference","blockquote","list"]],["list",P0,["paragraph","reference","blockquote"]],["reference",Z0],["html_block",Q0,["paragraph","reference","blockquote"]],["heading",ec,["paragraph","reference","blockquote"]],["lheading",tc],["paragraph",uc]];function He(){this.ruler=new W;for(let e=0;e<je.length;e++)this.ruler.push(je[e][0],je[e][1],{alt:(je[e][2]||[]).slice()})}He.prototype.tokenize=function(e,t,n){const o=this.ruler.getRules(""),r=o.length,c=e.md.options.maxNesting;let s=t,i=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=c){e.line=n;break}const a=e.line;let l=!1;for(let d=0;d<r;d++)if(l=o[d](e,s,n,!1),l){if(a>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!i,e.isEmpty(e.line-1)&&(i=!0),s=e.line,s<n&&e.isEmpty(s)&&(i=!0,s++,e.line=s)}},He.prototype.parse=function(e,t,n,o){if(!e)return;const r=new this.State(e,t,n,o);this.tokenize(r,r.line,r.lineMax)},He.prototype.State=te;function Ne(e,t,n,o){this.src=e,this.env=n,this.md=t,this.tokens=o,this.tokens_meta=Array(o.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Ne.prototype.pushPending=function(){const e=new Y("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Ne.prototype.push=function(e,t,n){this.pending&&this.pushPending();const o=new Y(e,t,n);let r=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(r),o},Ne.prototype.scanDelims=function(e,t){const n=this.posMax,o=this.src.charCodeAt(e),r=e>0?this.src.charCodeAt(e-1):32;let c=e;for(;c<n&&this.src.charCodeAt(c)===o;)c++;const s=c-e,i=c<n?this.src.charCodeAt(c):32,a=qe(r)||$e(String.fromCharCode(r)),l=qe(i)||$e(String.fromCharCode(i)),d=Me(r),f=Me(i),m=!f&&(!l||d||a),h=!d&&(!a||f||l);return{can_open:m&&(t||!h||a),can_close:h&&(t||!m||l),length:s}},Ne.prototype.Token=Y;function nc(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function oc(e,t){let n=e.pos;for(;n<e.posMax&&!nc(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const rc=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function cc(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,o=e.posMax;if(n+3>o||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const r=e.pending.match(rc);if(!r)return!1;const c=r[1],s=e.md.linkify.matchAtStart(e.src.slice(n-c.length));if(!s)return!1;let i=s.url;if(i.length<=c.length)return!1;i=i.replace(/\*+$/,"");const a=e.md.normalizeLink(i);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-c.length);const l=e.push("link_open","a",1);l.attrs=[["href",a]],l.markup="linkify",l.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(i);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=i.length-c.length,!0}function sc(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const o=e.pending.length-1,r=e.posMax;if(!t)if(o>=0&&e.pending.charCodeAt(o)===32)if(o>=1&&e.pending.charCodeAt(o-1)===32){let c=o-1;for(;c>=1&&e.pending.charCodeAt(c-1)===32;)c--;e.pending=e.pending.slice(0,c),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<r&&O(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const yt=[];for(let e=0;e<256;e++)yt.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){yt[e.charCodeAt(0)]=1});function ic(e,t){let n=e.pos;const o=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=o))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n<o&&(r=e.src.charCodeAt(n),!!O(r));)n++;return e.pos=n,!0}let c=e.src[n];if(r>=55296&&r<=56319&&n+1<o){const i=e.src.charCodeAt(n+1);i>=56320&&i<=57343&&(c+=e.src[n+1],n++)}const s="\\"+c;if(!t){const i=e.push("text_special","",0);r<256&&yt[r]!==0?i.content=c:i.content=s,i.markup=s,i.info="escape"}return e.pos=n+1,!0}function ac(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const r=n;n++;const c=e.posMax;for(;n<c&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(r,n),i=s.length;if(e.backticksScanned&&(e.backticks[i]||0)<=r)return t||(e.pending+=s),e.pos+=i,!0;let a=n,l;for(;(l=e.src.indexOf("`",a))!==-1;){for(a=l+1;a<c&&e.src.charCodeAt(a)===96;)a++;const d=a-l;if(d===i){if(!t){const f=e.push("code_inline","code",0);f.markup=s,f.content=e.src.slice(n,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=a,!0}e.backticks[d]=l}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=i,!0}function lc(e,t){const n=e.pos,o=e.src.charCodeAt(n);if(t||o!==126)return!1;const r=e.scanDelims(e.pos,!0);let c=r.length;const s=String.fromCharCode(o);if(c<2)return!1;let i;c%2&&(i=e.push("text","",0),i.content=s,c--);for(let a=0;a<c;a+=2)i=e.push("text","",0),i.content=s+s,e.delimiters.push({marker:o,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function Du(e,t){let n;const o=[],r=t.length;for(let c=0;c<r;c++){const s=t[c];if(s.marker!==126||s.end===-1)continue;const i=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[i.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[i.token-1].type==="text"&&e.tokens[i.token-1].content==="~"&&o.push(i.token-1)}for(;o.length;){const c=o.pop();let s=c+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,c!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[c],e.tokens[c]=n)}}function dc(e){const t=e.tokens_meta,n=e.tokens_meta.length;Du(e,e.delimiters);for(let o=0;o<n;o++)t[o]&&t[o].delimiters&&Du(e,t[o].delimiters)}const Au={tokenize:lc,postProcess:dc};function fc(e,t){const n=e.pos,o=e.src.charCodeAt(n);if(t||o!==95&&o!==42)return!1;const r=e.scanDelims(e.pos,o===42);for(let c=0;c<r.length;c++){const s=e.push("text","",0);s.content=String.fromCharCode(o),e.delimiters.push({marker:o,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return e.pos+=r.length,!0}function Bu(e,t){const n=t.length;for(let o=n-1;o>=0;o--){const r=t[o];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const c=t[r.end],s=o>0&&t[o-1].end===r.end+1&&t[o-1].marker===r.marker&&t[o-1].token===r.token-1&&t[r.end+1].token===c.token+1,i=String.fromCharCode(r.marker),a=e.tokens[r.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?i+i:i,a.content="";const l=e.tokens[c.token];l.type=s?"strong_close":"em_close",l.tag=s?"strong":"em",l.nesting=-1,l.markup=s?i+i:i,l.content="",s&&(e.tokens[t[o-1].token].content="",e.tokens[t[r.end+1].token].content="",o--)}}function pc(e){const t=e.tokens_meta,n=e.tokens_meta.length;Bu(e,e.delimiters);for(let o=0;o<n;o++)t[o]&&t[o].delimiters&&Bu(e,t[o].delimiters)}const Fu={tokenize:fc,postProcess:pc};function hc(e,t){let n,o,r,c,s="",i="",a=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,f=e.posMax,m=e.pos+1,h=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(h<0)return!1;let p=h+1;if(p<f&&e.src.charCodeAt(p)===40){for(l=!1,p++;p<f&&(n=e.src.charCodeAt(p),!(!O(n)&&n!==10));p++);if(p>=f)return!1;if(a=p,r=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),r.ok){for(s=e.md.normalizeLink(r.str),e.md.validateLink(s)?p=r.pos:s="",a=p;p<f&&(n=e.src.charCodeAt(p),!(!O(n)&&n!==10));p++);if(r=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<f&&a!==p&&r.ok)for(i=r.str,p=r.pos;p<f&&(n=e.src.charCodeAt(p),!(!O(n)&&n!==10));p++);}(p>=f||e.src.charCodeAt(p)!==41)&&(l=!0),p++}if(l){if(typeof e.env.references>"u")return!1;if(p<f&&e.src.charCodeAt(p)===91?(a=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?o=e.src.slice(a,p++):p=h+1):p=h+1,o||(o=e.src.slice(m,h)),c=e.env.references[Ze(o)],!c)return e.pos=d,!1;s=c.href,i=c.title}if(!t){e.pos=m,e.posMax=h;const x=e.push("link_open","a",1),_=[["href",s]];x.attrs=_,i&&_.push(["title",i]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=f,!0}function mc(e,t){let n,o,r,c,s,i,a,l,d="";const f=e.pos,m=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(c=p+1,c<m&&e.src.charCodeAt(c)===40){for(c++;c<m&&(n=e.src.charCodeAt(c),!(!O(n)&&n!==10));c++);if(c>=m)return!1;for(l=c,i=e.md.helpers.parseLinkDestination(e.src,c,e.posMax),i.ok&&(d=e.md.normalizeLink(i.str),e.md.validateLink(d)?c=i.pos:d=""),l=c;c<m&&(n=e.src.charCodeAt(c),!(!O(n)&&n!==10));c++);if(i=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<m&&l!==c&&i.ok)for(a=i.str,c=i.pos;c<m&&(n=e.src.charCodeAt(c),!(!O(n)&&n!==10));c++);else a="";if(c>=m||e.src.charCodeAt(c)!==41)return e.pos=f,!1;c++}else{if(typeof e.env.references>"u")return!1;if(c<m&&e.src.charCodeAt(c)===91?(l=c+1,c=e.md.helpers.parseLinkLabel(e,c),c>=0?r=e.src.slice(l,c++):c=p+1):c=p+1,r||(r=e.src.slice(h,p)),s=e.env.references[Ze(r)],!s)return e.pos=f,!1;d=s.href,a=s.title}if(!t){o=e.src.slice(h,p);const x=[];e.md.inline.parse(o,e.md,e.env,x);const _=e.push("image","img",0),E=[["src",d],["alt",""]];_.attrs=E,_.children=x,_.content=o,a&&E.push(["title",a])}return e.pos=c,e.posMax=m,!0}const bc=/^([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])?)*)$/,xc=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function gc(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const o=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const c=e.src.slice(o+1,n);if(xc.test(c)){const s=e.md.normalizeLink(c);if(!e.md.validateLink(s))return!1;if(!t){const i=e.push("link_open","a",1);i.attrs=[["href",s]],i.markup="autolink",i.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(c);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=c.length+2,!0}if(bc.test(c)){const s=e.md.normalizeLink("mailto:"+c);if(!e.md.validateLink(s))return!1;if(!t){const i=e.push("link_open","a",1);i.attrs=[["href",s]],i.markup="autolink",i.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(c);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=c.length+2,!0}return!1}function _c(e){return/^<a[>\s]/i.test(e)}function kc(e){return/^<\/a\s*>/i.test(e)}function yc(e){const t=e|32;return t>=97&&t<=122}function Cc(e,t){if(!e.md.options.html)return!1;const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==60||o+2>=n)return!1;const r=e.src.charCodeAt(o+1);if(r!==33&&r!==63&&r!==47&&!yc(r))return!1;const c=e.src.slice(o).match(K0);if(!c)return!1;if(!t){const s=e.push("html_inline","",0);s.content=c[0],_c(s.content)&&e.linkLevel++,kc(s.content)&&e.linkLevel--}return e.pos+=c[0].length,!0}const wc=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Ec=/^&([a-z][a-z0-9]{1,31});/i;function Dc(e,t){const n=e.pos,o=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=o)return!1;if(e.src.charCodeAt(n+1)===35){const c=e.src.slice(n).match(wc);if(c){if(!t){const s=c[1][0].toLowerCase()==="x"?parseInt(c[1].slice(1),16):parseInt(c[1],10),i=e.push("text_special","",0);i.content=xt(s)?Pe(s):Pe(65533),i.markup=c[0],i.info="entity"}return e.pos+=c[0].length,!0}}else{const c=e.src.slice(n).match(Ec);if(c){const s=pu(c[0]);if(s!==c[0]){if(!t){const i=e.push("text_special","",0);i.content=s,i.markup=c[0],i.info="entity"}return e.pos+=c[0].length,!0}}}return!1}function Su(e){const t={},n=e.length;if(!n)return;let o=0,r=-2;const c=[];for(let s=0;s<n;s++){const i=e[s];if(c.push(0),(e[o].marker!==i.marker||r!==i.token-1)&&(o=s),r=i.token,i.length=i.length||0,!i.close)continue;t.hasOwnProperty(i.marker)||(t[i.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[i.marker][(i.open?3:0)+i.length%3];let l=o-c[o]-1,d=l;for(;l>a;l-=c[l]+1){const f=e[l];if(f.marker===i.marker&&f.open&&f.end<0){let m=!1;if((f.close||i.open)&&(f.length+i.length)%3===0&&(f.length%3!==0||i.length%3!==0)&&(m=!0),!m){const h=l>0&&!e[l-1].open?c[l-1]+1:0;c[s]=s-l+h,c[l]=h,i.open=!1,f.end=s,f.close=!1,d=-1,r=-2;break}}}d!==-1&&(t[i.marker][(i.open?3:0)+(i.length||0)%3]=d)}}function Ac(e){const t=e.tokens_meta,n=e.tokens_meta.length;Su(e.delimiters);for(let o=0;o<n;o++)t[o]&&t[o].delimiters&&Su(t[o].delimiters)}function Bc(e){let t,n,o=0;const r=e.tokens,c=e.tokens.length;for(t=n=0;t<c;t++)r[t].nesting<0&&o--,r[t].level=o,r[t].nesting>0&&o++,r[t].type==="text"&&t+1<c&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==n&&(r[n]=r[t]),n++);t!==n&&(r.length=n)}const Ct=[["text",oc],["linkify",cc],["newline",sc],["escape",ic],["backticks",ac],["strikethrough",Au.tokenize],["emphasis",Fu.tokenize],["link",hc],["image",mc],["autolink",gc],["html_inline",Cc],["entity",Dc]],wt=[["balance_pairs",Ac],["strikethrough",Au.postProcess],["emphasis",Fu.postProcess],["fragments_join",Bc]];function ze(){this.ruler=new W;for(let e=0;e<Ct.length;e++)this.ruler.push(Ct[e][0],Ct[e][1]);this.ruler2=new W;for(let e=0;e<wt.length;e++)this.ruler2.push(wt[e][0],wt[e][1])}ze.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),o=n.length,r=e.md.options.maxNesting,c=e.cache;if(typeof c[t]<"u"){e.pos=c[t];return}let s=!1;if(e.level<r){for(let i=0;i<o;i++)if(e.level++,s=n[i](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,c[t]=e.pos},ze.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,o=e.posMax,r=e.md.options.maxNesting;for(;e.pos<o;){const c=e.pos;let s=!1;if(e.level<r){for(let i=0;i<n;i++)if(s=t[i](e,!1),s){if(c>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=o)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},ze.prototype.parse=function(e,t,n,o){const r=new this.State(e,t,n,o);this.tokenize(r);const c=this.ruler2.getRules(""),s=c.length;for(let i=0;i<s;i++)c[i](r)},ze.prototype.State=Ne;function Fc(e){const t={};e=e||{},t.src_Any=iu.source,t.src_Cc=au.source,t.src_Z=du.source,t.src_P=pt.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Et(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(o){e[o]=n[o]})}),e}function We(e){return Object.prototype.toString.call(e)}function Sc(e){return We(e)==="[object String]"}function Mc(e){return We(e)==="[object Object]"}function $c(e){return We(e)==="[object RegExp]"}function Mu(e){return We(e)==="[object Function]"}function qc(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const $u={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Nc(e){return Object.keys(e||{}).reduce(function(t,n){return t||$u.hasOwnProperty(n)},!1)}const zc={"http:":{validate:function(e,t,n){const o=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},Rc="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Tc="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Lc(e){e.__index__=-1,e.__text_cache__=""}function Vc(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function qu(){return function(e,t){t.normalize(e)}}function Ge(e){const t=e.re=Fc(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Rc),n.push(t.src_xn),t.src_tlds=n.join("|");function o(i){return i.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(o(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(o(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(o(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(o(t.tpl_host_fuzzy_test),"i");const r=[];e.__compiled__={};function c(i,a){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+a)}Object.keys(e.__schemas__).forEach(function(i){const a=e.__schemas__[i];if(a===null)return;const l={validate:null,link:null};if(e.__compiled__[i]=l,Mc(a)){$c(a.validate)?l.validate=Vc(a.validate):Mu(a.validate)?l.validate=a.validate:c(i,a),Mu(a.normalize)?l.normalize=a.normalize:a.normalize?c(i,a):l.normalize=qu();return}if(Sc(a)){r.push(i);return}c(i,a)}),r.forEach(function(i){e.__compiled__[e.__schemas__[i]]&&(e.__compiled__[i].validate=e.__compiled__[e.__schemas__[i]].validate,e.__compiled__[i].normalize=e.__compiled__[e.__schemas__[i]].normalize)}),e.__compiled__[""]={validate:null,normalize:qu()};const s=Object.keys(e.__compiled__).filter(function(i){return i.length>0&&e.__compiled__[i]}).map(qc).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Lc(e)}function Ic(e,t){const n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function Dt(e,t){const n=new Ic(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function G(e,t){if(!(this instanceof G))return new G(e,t);t||Nc(e)&&(t=e,e={}),this.__opts__=Et({},$u,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Et({},zc,e),this.__compiled__={},this.__tlds__=Tc,this.__tlds_replaced__=!1,this.re={},Ge(this)}G.prototype.add=function(t,n){return this.__schemas__[t]=n,Ge(this),this},G.prototype.set=function(t){return this.__opts__=Et(this.__opts__,t),this},G.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,o,r,c,s,i,a,l,d;if(this.re.schema_test.test(t)){for(a=this.re.schema_search,a.lastIndex=0;(n=a.exec(t))!==null;)if(c=this.testSchemaAt(t,n[2],a.lastIndex),c){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(o=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=o.index+o[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=o.index+o[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=t.indexOf("@"),d>=0&&(r=t.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=i))),this.__index__>=0},G.prototype.pretest=function(t){return this.re.pretest.test(t)},G.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0},G.prototype.match=function(t){const n=[];let o=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(Dt(this,o)),o=this.__last_index__);let r=o?t.slice(o):t;for(;this.test(r);)n.push(Dt(this,o)),r=r.slice(this.__last_index__),o+=this.__last_index__;return n.length?n:null},G.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const o=this.testSchemaAt(t,n[2],n[0].length);return o?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o,Dt(this,0)):null},G.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(o,r,c){return o!==c[r-1]}).reverse(),Ge(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Ge(this),this)},G.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},G.prototype.onCompile=function(){};const Ee=2147483647,ue=36,At=1,Re=26,vc=38,Oc=700,Nu=72,zu=128,Ru="-",Pc=/^xn--/,Zc=/[^\0-\x7F]/,Uc=/[\x2E\u3002\uFF0E\uFF61]/g,jc={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Bt=ue-At,ne=Math.floor,Ft=String.fromCharCode;function de(e){throw new RangeError(jc[e])}function Hc(e,t){const n=[];let o=e.length;for(;o--;)n[o]=t(e[o]);return n}function Tu(e,t){const n=e.split("@");let o="";n.length>1&&(o=n[0]+"@",e=n[1]),e=e.replace(Uc,".");const r=e.split("."),c=Hc(r,t).join(".");return o+c}function Lu(e){const t=[];let n=0;const o=e.length;for(;n<o;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<o){const c=e.charCodeAt(n++);(c&64512)==56320?t.push(((r&1023)<<10)+(c&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}const Wc=e=>String.fromCodePoint(...e),Gc=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ue},Vu=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Iu=function(e,t,n){let o=0;for(e=n?ne(e/Oc):e>>1,e+=ne(e/t);e>Bt*Re>>1;o+=ue)e=ne(e/Bt);return ne(o+(Bt+1)*e/(e+vc))},vu=function(e){const t=[],n=e.length;let o=0,r=zu,c=Nu,s=e.lastIndexOf(Ru);s<0&&(s=0);for(let i=0;i<s;++i)e.charCodeAt(i)>=128&&de("not-basic"),t.push(e.charCodeAt(i));for(let i=s>0?s+1:0;i<n;){const a=o;for(let d=1,f=ue;;f+=ue){i>=n&&de("invalid-input");const m=Gc(e.charCodeAt(i++));m>=ue&&de("invalid-input"),m>ne((Ee-o)/d)&&de("overflow"),o+=m*d;const h=f<=c?At:f>=c+Re?Re:f-c;if(m<h)break;const p=ue-h;d>ne(Ee/p)&&de("overflow"),d*=p}const l=t.length+1;c=Iu(o-a,l,a==0),ne(o/l)>Ee-r&&de("overflow"),r+=ne(o/l),o%=l,t.splice(o++,0,r)}return String.fromCodePoint(...t)},Ou=function(e){const t=[];e=Lu(e);const n=e.length;let o=zu,r=0,c=Nu;for(const a of e)a<128&&t.push(Ft(a));const s=t.length;let i=s;for(s&&t.push(Ru);i<n;){let a=Ee;for(const d of e)d>=o&&d<a&&(a=d);const l=i+1;a-o>ne((Ee-r)/l)&&de("overflow"),r+=(a-o)*l,o=a;for(const d of e)if(d<o&&++r>Ee&&de("overflow"),d===o){let f=r;for(let m=ue;;m+=ue){const h=m<=c?At:m>=c+Re?Re:m-c;if(f<h)break;const p=f-h,x=ue-h;t.push(Ft(Vu(h+p%x,0))),f=ne(p/x)}t.push(Ft(Vu(f,0))),c=Iu(r,l,i===s),r=0,++i}++r,++o}return t.join("")},Pu={version:"2.3.1",ucs2:{decode:Lu,encode:Wc},decode:vu,encode:Ou,toASCII:function(e){return Tu(e,function(t){return Zc.test(t)?"xn--"+Ou(t):t})},toUnicode:function(e){return Tu(e,function(t){return Pc.test(t)?vu(t.slice(4).toLowerCase()):t})}},Xc={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Yc=/^(vbscript|javascript|file|data):/,Kc=/^data:image\/(gif|png|jpeg|webp);/;function Jc(e){const t=e.trim().toLowerCase();return Yc.test(t)?Kc.test(t):!0}const Zu=["http:","https:","mailto:"];function Qc(e){const t=ft(e,!0);if(t.hostname&&(!t.protocol||Zu.indexOf(t.protocol)>=0))try{t.hostname=Pu.toASCII(t.hostname)}catch{}return Se(dt(t))}function es(e){const t=ft(e,!0);if(t.hostname&&(!t.protocol||Zu.indexOf(t.protocol)>=0))try{t.hostname=Pu.toUnicode(t.hostname)}catch{}return ke(dt(t),ke.defaultChars+"%")}function K(e,t){if(!(this instanceof K))return new K(e,t);t||bt(e)||(t=e||{},e="default"),this.inline=new ze,this.block=new He,this.core=new _t,this.renderer=new Ce,this.linkify=new G,this.validateLink=Jc,this.normalizeLink=Qc,this.normalizeLinkText=es,this.utils=d0,this.helpers=Oe({},m0),this.options={},this.configure(e),t&&this.set(t)}K.prototype.set=function(e){return Oe(this.options,e),this},K.prototype.configure=function(e){const t=this;if(bt(e)){const n=e;if(e=Xc[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},K.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const o=e.filter(function(r){return n.indexOf(r)<0});if(o.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+o);return this},K.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const o=e.filter(function(r){return n.indexOf(r)<0});if(o.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+o);return this},K.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},K.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},K.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},K.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},K.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};let Uu=1;function ts(){function e(r,c){const s=new K({html:!0,typographer:!0});return s.use(Dr),c&&c.forEach(i=>s.use(i)),s.parse(r,"")}function t(r,c){const s=o(r,c)??[];return u.h("article",{class:"sq-article"},n(s))}function n(r){if(!r)return;const c=r.map(s=>{if(typeof s=="string")return s;{const i=n(s.children);return u.h(s.tag,s.attrs,typeof s.tag!="string"?{default:()=>i}:i)}});return c.length>1?c:c[0]}function o(r,c){const s=[],i={children:[]};let a=i;return r.forEach(l=>{var _,E,y,C,k,B,S,R,T,D,g;const{type:d,children:f,content:m,attrs:h,tag:p,hidden:x}=l;switch(d){case"heading_open":case"paragraph_open":case"bullet_list_open":case"ordered_list_open":case"list_item_open":case"table_open":case"thead_open":case"tbody_open":case"tr_open":case"th_open":case"td_open":case"blockquote_open":case"strong_open":case"em_open":case"s_open":case"link_open":{if(x)break;const b={tag:(c==null?void 0:c[p])??p,children:[],attrs:h?Object.fromEntries(h):{}};if(d==="link_open"){const A=l.attrGet("href")??"",w=document.location.origin;A!=null&&A.startsWith("http")&&!A.includes(w)&&(b.attrs.target="_blank",b.attrs.rel="noopener noreferrer",b.attrs.dataOuter="",(_=b.children)==null||_.push({tag:Po}))}if(d==="table_open"){const A={tag:"div",children:[],attrs:{class:"sq-article-table"}};(E=a.children)==null||E.push(A),s.push(a),a=A}(y=a.children)==null||y.push(b),s.push(a),a=b;break}case"heading_close":case"paragraph_close":case"bullet_list_close":case"ordered_list_close":case"list_item_close":case"table_close":case"thead_close":case"tbody_close":case"tr_close":case"th_close":case"td_close":case"blockquote_close":case"strong_close":case"em_close":case"s_close":case"link_close":{if(x)break;a=s.pop();break}case"code_inline":{(C=a.children)==null||C.push({tag:(c==null?void 0:c[p])??p,children:[m],attrs:h?Object.fromEntries(h):{}});break}case"inline":{if(f){const b=o(f,c);(k=a.children)==null||k.push(...b??[])}else(B=a.children)==null||B.push(m);break}case"text":{(S=a.children)==null||S.push(m);break}case"image":{(R=a.children)==null||R.push({tag:(c==null?void 0:c[p])??p,children:[],attrs:h?Object.fromEntries(h):{}});break}case"hr":{(T=a.children)==null||T.push({tag:(c==null?void 0:c[p])??p});break}case"input":{const b=h?Object.fromEntries(h):{},A=b.type??"text",w=`${p}-${A}`,M={tag:(c==null?void 0:c[w])??p,children:[],attrs:b};A==="checkbox"&&(M.attrs.value=`task-list-${Uu}`,Uu++),(D=a.children)==null||D.push(M);break}case"html_inline":{if(m.startsWith("</"))a=s.pop();else{const b=m.replace("<","").replace(">",""),A={tag:(c==null?void 0:c[b])??b,children:[]};(g=a.children)==null||g.push(A),s.push(a),a=A}break}}}),i.children}return{md2tokens:e,tokens2vueh:t}}function us(){function e(t,n=100){let o;return function(...r){o||(o=setTimeout(()=>{t.apply(this,r),o=void 0},n))}}return{throttle:e}}const{md2tokens:ns,tokens2vueh:os}=ts(),ju=u.defineComponent({name:"sq-article",props:{text:{type:String,required:!0},md:{type:Boolean,default:!0},customNodeMap:{type:Object},plugins:{type:Object}},setup(e){const t=u.computed(()=>({hr:he,blur:Hu,img:Xu,"input-checkbox":Mt,...e.customNodeMap}));return()=>{if(!e.md)return u.h("article",{class:"sq-article",innerHTML:e.text});const n=ns(e.text,e.plugins);return os(n,t.value)}}}),rs=["src","alt"],cs=["textContent"],ss=u.defineComponent({name:"sq-avatar",__name:"avatar",props:{img:{},alt:{},randomColor:{type:Boolean,default:!0},round:{type:Boolean,default:!0},size:{default:"md"}},setup(e){const t=e,n=u.ref(!0),o=u.computed(()=>{const i=[];return t.size!=="md"&&i.push(`sq-avatar--${t.size}`),t.round&&i.push("is-round"),i}),r=u.computed(()=>{if(!t.randomColor)return;const{getRandomColor:i}=wr();return{"--avatar-bg-color":i()}}),c=u.computed(()=>t.alt.charAt(0).toUpperCase());function s(){n.value=!1}return(i,a)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["sq-avatar",o.value]),style:u.normalizeStyle(r.value)},[t.img&&n.value?(u.openBlock(),u.createElementBlock("img",{key:0,src:t.img,alt:t.alt,onError:s},null,40,rs)):(u.openBlock(),u.createElementBlock("span",{key:1,textContent:u.toDisplayString(c.value)},null,8,cs))],6))}}),is={class:"sq-backtop"},as=u.defineComponent({name:"sq-backtop",__name:"backtop",props:{progress:{type:Boolean,default:!0},icon:{default:vn},transition:{default:"sq-rotate-in-left"},visibilityHeight:{default:100},target:{default:"#app"},progressProps:{}},setup(e){const{throttle:t}=us(),n=t(a),o=new ResizeObserver(l),r=e,c=u.ref(100),s=u.ref(0),i=u.computed(()=>s.value>r.visibilityHeight);u.onMounted(()=>{var m;l(),n(),window.addEventListener("scroll",n);const f=document.querySelector(r.target)??document.body;o.observe(f),(m=window.visualViewport)==null||m.addEventListener("resize",l)}),u.onBeforeUnmount(()=>{var f;window.removeEventListener("scroll",n),o.disconnect(),(f=window.visualViewport)==null||f.removeEventListener("resize",l)});function a(){s.value=window.scrollY}function l(){const f=(document.scrollingElement??document.body).scrollHeight,m=window.innerHeight;c.value=f-m}function d(){window.scrollTo({top:0,behavior:"smooth"})}return(f,m)=>(u.openBlock(),u.createBlock(u.Transition,{name:r.transition},{default:u.withCtx(()=>{var h,p,x;return[u.withDirectives(u.createElementVNode("div",is,[u.createElementVNode("div",{class:"sq-backtop-wrap",onClick:d},[r.progress?(u.openBlock(),u.createBlock(u.unref(yn),{key:0,variant:"circle",label:!1,value:s.value,max:c.value,type:(h=r.progressProps)==null?void 0:h.type,stroke:(p=r.progressProps)==null?void 0:p.stroke,color:(x=r.progressProps)==null?void 0:x.color},null,8,["value","max","type","stroke","color"])):u.createCommentVNode("",!0),u.renderSlot(f.$slots,"default",{},()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.icon)))])])],512),[[u.vShow,i.value]])]}),_:3},8,["name"]))}}),ls=["textContent"],ds=u.defineComponent({name:"sq-badge",__name:"badge",props:{type:{default:"error"},color:{},showZero:{type:Boolean},max:{default:99},count:{default:0},text:{},dot:{type:Boolean}},setup(e){const t=u.useSlots(),n=e,o=u.computed(()=>{const i=[];return n.dot&&i.push("is-dot"),i.push(`is-${n.type}`),i}),r=u.computed(()=>t.default?"sup":"div"),c=u.computed(()=>!n.dot&&n.text||n.showZero?!0:n.count>0),s=u.computed(()=>n.dot?"":n.text?n.text:n.max&&n.count>n.max?`${n.max}+`:`${n.count}`);return(i,a)=>(u.openBlock(),u.createBlock(u.Transition,{name:"sq-zoom"},{default:u.withCtx(()=>[u.unref(t).default||c.value?(u.openBlock(),u.createElementBlock("span",{key:0,class:u.normalizeClass(["sq-badge",o.value]),style:u.normalizeStyle({"--badge-color":n.color})},[u.renderSlot(i.$slots,"default"),(u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.value),{class:"sq-badge-label"},{default:u.withCtx(()=>[u.createVNode(u.Transition,{name:u.unref(t).default?"sq-zoom":""},{default:u.withCtx(()=>[c.value?(u.openBlock(),u.createElementBlock("span",{key:0,class:"sq-badge-label-inner",textContent:u.toDisplayString(s.value)},null,8,ls)):u.createCommentVNode("",!0)]),_:1},8,["name"])]),_:1}))],6)):u.createCommentVNode("",!0)]),_:3}))}}),Hu=u.defineComponent({name:"sq-blur",__name:"blur",setup(e){return(t,n)=>(u.openBlock(),u.createBlock(u.unref(se),{class:"sq-blur"},{default:u.withCtx(()=>[u.renderSlot(t.$slots,"default")]),_:3}))}});function fs(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject(St,void 0),r=u.computed(()=>u.unref(o)?void 0:e.text),c=u.computed(()=>{var l,d;return t((l=u.unref(o))==null?void 0:l.size,e.size,(d=u.unref(n))==null?void 0:d.size,"md")}),s=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.type,e.type)}),i=u.computed(()=>{var l,d;return t((l=u.unref(o))==null?void 0:l.round,e.round,(d=u.unref(n))==null?void 0:d.round)}),a=u.computed(()=>{var l,d,f;return t((l=u.unref(n))==null?void 0:l.disabled,(d=u.unref(n))==null?void 0:d.readonly,(f=u.unref(o))==null?void 0:f.disabled,e.disabled)});return{btnTextType:r,btnSize:c,btnType:s,btnRound:i,btnDisabled:a}}function ps(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject($t,void 0),r=u.computed(()=>{var l,d;return t((l=u.unref(o))==null?void 0:l.size,e.size,(d=u.unref(n))==null?void 0:d.size,"md")}),c=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.form,e.form)}),s=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.name,e.name)}),i=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.variant,e.variant)}),a=u.computed(()=>{var l,d,f;return t((l=u.unref(n))==null?void 0:l.disabled,(d=u.unref(n))==null?void 0:d.readonly,(f=u.unref(o))==null?void 0:f.disabled,e.disabled)});return{checkboxSize:r,checkboxForm:c,checkboxName:s,checkboxVariant:i,checkboxDisabled:a,groupContext:o}}function hs(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject(Xe,void 0),r=u.computed(()=>{var a;return t(e.size,(a=u.unref(n))==null?void 0:a.size,"md")}),c=u.computed(()=>{var a;return t(e.round,(a=u.unref(n))==null?void 0:a.round)}),s=u.computed(()=>{var a;return t((a=u.unref(n))==null?void 0:a.disabled,e.disabled)}),i=u.computed(()=>{var a;return t((a=u.unref(n))==null?void 0:a.readonly,e.readonly)});return{inputSize:r,inputRound:c,inputDisabled:s,inputReadonly:i,id:o}}function ms(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject(Pt,void 0),r=u.computed(()=>{var l,d;return t((l=u.unref(o))==null?void 0:l.size,e.size,(d=u.unref(n))==null?void 0:d.size,"md")}),c=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.form,e.form)}),s=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.name,e.name)}),i=u.computed(()=>{var l;return t((l=u.unref(o))==null?void 0:l.variant,e.variant)}),a=u.computed(()=>{var l,d,f;return t((l=u.unref(n))==null?void 0:l.disabled,(d=u.unref(n))==null?void 0:d.readonly,(f=u.unref(o))==null?void 0:f.disabled,e.disabled)});return{radioSize:r,radioForm:c,radioName:s,radioVariant:i,radioDisabled:a,groupContext:o}}function bs(e){const{getOption:t}=_e(),n=u.inject(Zt,void 0);return{segmentedDisabled:u.computed(()=>{var r;return t((r=u.unref(n))==null?void 0:r.disabled,e.disabled)}),parentContext:n}}function xs(e){const{getOption:t}=_e(),n=u.inject(me,void 0),o=u.inject(Xe,void 0),r=u.computed(()=>{var s;return t(e.size,(s=u.unref(n))==null?void 0:s.size,"md")}),c=u.computed(()=>{var s,i;return t((s=u.unref(n))==null?void 0:s.disabled,(i=u.unref(n))==null?void 0:i.readonly,e.disabled)});return{switchSize:r,switchDisabled:c,id:o}}const gs=["disabled","form","type"],P=u.defineComponent({name:"sq-button",__name:"button",props:{type:{},round:{type:Boolean,default:void 0},text:{type:Boolean},icon:{},loading:{type:Boolean},form:{},bg:{type:Boolean},nativeType:{default:"button"},disabled:{type:Boolean,default:void 0},size:{}},emits:["click"],setup(e,{emit:t}){const n=t,o=e,{btnTextType:r,btnSize:c,btnType:s,btnRound:i,btnDisabled:a}=fs(o),l=u.computed(()=>{const m=[],h=u.unref(c),p=u.unref(s),x=u.unref(i),_=u.unref(r);return h!=="md"&&m.push(`sq-button--${h}`),p&&m.push(`is-${p}`),x&&m.push("is-round"),_&&m.push("is-text"),_&&o.bg&&m.push("has-bg"),m}),d=u.computed(()=>o.loading?Ve:o.icon),f=u.computed(()=>o.loading||u.unref(a));return(m,h)=>(u.openBlock(),u.createElementBlock("button",{class:u.normalizeClass(["sq-button",l.value]),disabled:f.value,form:o.form,type:o.nativeType,onClick:h[0]||(h[0]=p=>n("click",p))},[u.createVNode(u.unref(se),{size:u.unref(c)==="lg"?"md":u.unref(c)},{default:u.withCtx(()=>[d.value?(u.openBlock(),u.createBlock(u.resolveDynamicComponent(d.value),{key:0})):u.createCommentVNode("",!0),u.renderSlot(m.$slots,"default")]),_:3},8,["size"])],10,gs))}}),_s={class:"sq-button-group"},ks=u.defineComponent({name:"sq-button-group",__name:"button-group",props:{size:{},type:{},round:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},setup(e){const t=e;return u.provide(St,u.ref({size:u.toRef(t,"size"),type:u.toRef(t,"type"),round:u.toRef(t,"round"),disabled:u.toRef(t,"disabled")})),(n,o)=>(u.openBlock(),u.createElementBlock("div",_s,[u.renderSlot(n.$slots,"default")]))}}),St=Symbol("button-group-context-keys"),ys={class:"sq-card"},Cs={key:0,class:"sq-card-header"},ws=["textContent"],Es={key:1,class:"sq-card-footer"},Ds=u.defineComponent({name:"sq-card",__name:"card",props:{title:{},decorative:{type:Boolean,default:!1}},setup(e){const t=u.useSlots(),n=e;return(o,r)=>(u.openBlock(),u.createElementBlock("section",ys,[n.title||u.unref(t).title?(u.openBlock(),u.createElementBlock("div",Cs,[u.createElementVNode("h2",{class:u.normalizeClass({"has-decorative":n.decorative}),textContent:u.toDisplayString(n.title)},null,10,ws),u.renderSlot(o.$slots,"title")])):u.createCommentVNode("",!0),u.renderSlot(o.$slots,"default"),u.unref(t).footer?(u.openBlock(),u.createElementBlock("div",Es,[u.renderSlot(o.$slots,"footer")])):u.createCommentVNode("",!0)]))}}),As=["autofocus","name","form","value","disabled"],Bs=["textContent"],Mt=u.defineComponent({name:"sq-checkbox",__name:"checkbox",props:u.mergeModels({form:{},name:{},disabled:{type:Boolean,default:void 0},size:{},indeterminate:{type:Boolean},variant:{},autofocus:{type:Boolean},label:{},value:{}},{checked:{type:Boolean,default:!1},checkedModifiers:{}}),emits:u.mergeModels(["change"],["update:checked"]),setup(e,{emit:t}){const n=t,o=e,{checkboxSize:r,checkboxDisabled:c,checkboxForm:s,checkboxName:i,checkboxVariant:a,groupContext:l}=ps(o),d=u.useModel(e,"checked"),f=u.computed(()=>{const h=[],p=u.unref(r),x=u.unref(c),_=u.unref(a);return p!=="md"&&h.push(`sq-selection--${p}`),m.value&&h.push("is-checked"),x&&h.push("is-disabled"),_&&h.push(`is-${_}`),h}),m=u.computed(()=>l?u.unref(l).list.includes(o.value):d.value);return u.watch(m,h=>{if(d.value!==h){d.value=h;return}}),u.watch(d,h=>{m.value!==h&&l&&l.value.toggleItem(o.value)}),u.onMounted(()=>{d.value=m.value}),(h,p)=>(u.openBlock(),u.createElementBlock("label",{class:u.normalizeClass(["sq-selection sq-checkbox",f.value])},[u.withDirectives(u.createElementVNode("input",{type:"checkbox",autofocus:o.autofocus,name:u.unref(i),form:u.unref(s),value:o.value,disabled:u.unref(c),"onUpdate:modelValue":p[0]||(p[0]=x=>d.value=x),onChange:p[1]||(p[1]=x=>n("change",d.value))},null,40,As),[[u.vModelCheckbox,d.value]]),u.unref(a)!=="solid"?(u.openBlock(),u.createElementBlock("span",{key:0,class:u.normalizeClass(["sq-checkbox-box",{"is-indeterminate":o.indeterminate&&!m.value}])},[m.value?(u.openBlock(),u.createBlock(u.unref(Un),{key:0,class:"sq-checkbox-inner"})):u.createCommentVNode("",!0)],2)):u.createCommentVNode("",!0),o.label?(u.openBlock(),u.createElementBlock("span",{key:1,class:"sq-selection-label",textContent:u.toDisplayString(o.label)},null,8,Bs)):u.createCommentVNode("",!0)],2))}}),Fs={class:"sq-checkbox-group sq-selection-group"},Wu=u.defineComponent({name:"sq-checkbox-group",__name:"checkbox-group",props:{items:{default:()=>[]},value:{},form:{},name:{},disabled:{type:Boolean,default:void 0},size:{},variant:{}},emits:["change","update:value"],setup(e,{emit:t}){const{nextId:n}=Ie(),o=t,r=e,c=u.ref(r.value??[]),s=u.computed(()=>r.name??`sq-checkbox-${n()}`);u.provide($t,u.ref({form:u.toRef(r,"form"),name:s,disabled:u.toRef(r,"disabled"),size:u.toRef(r,"size"),variant:u.toRef(r,"variant"),list:c,toggleItem:i})),u.watch(()=>r.value,a=>{const l=a||[],d=[...new Set([...l,c.value])];d.length===l.length&&d.length===c.value.length||(c.value=l)});function i(a){c.value.includes(a)?c.value=c.value.filter(l=>l!==a):c.value.push(a),o("change",u.toRaw(c.value)),o("update:value",u.toRaw(c.value))}return(a,l)=>(u.openBlock(),u.createElementBlock("div",Fs,[u.renderSlot(a.$slots,"default",{},()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.items,(d,f)=>(u.openBlock(),u.createBlock(u.unref(Mt),{key:f,label:d.toString(),value:d},null,8,["label","value"]))),128))])]))}}),$t=Symbol("checkbox-group-context-keys"),Gu=u.defineComponent({name:"sq-mask",inheritAttrs:!1,__name:"mask",props:u.mergeModels({keyboard:{type:Boolean,default:!0},maskCloseable:{type:Boolean},onClose:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(e){const{nextZIndex:t}=lt();let n;const o=e,r=u.ref(0),c=u.ref(!1),s=u.useModel(e,"visible");c.value=s.value,u.watch(s,d=>{const f=document.scrollingElement;d?(n=f.style.overflow,f.style.overflow="hidden",r.value=t(),c.value=!0,document.addEventListener("keydown",i)):(f.style.overflow=n,document.removeEventListener("keydown",i))}),u.onBeforeUnmount(()=>{document.removeEventListener("keydown",i)});function i(d){d.key==="Escape"&&o.keyboard&&l()}function a(){o.maskCloseable&&l()}function l(){if(typeof o.onClose!="function"){s.value=!1;return}const d=o.onClose();d instanceof Promise?d.then(f=>{f&&(s.value=!1)}).catch(()=>{}):d&&(s.value=!1)}return(d,f)=>(u.openBlock(),u.createBlock(u.Teleport,{to:"body"},[u.createVNode(u.Transition,{name:"sq-fade"},{default:u.withCtx(()=>[c.value?u.withDirectives((u.openBlock(),u.createElementBlock("div",u.mergeProps({key:0,class:"sq-mask",style:{zIndex:r.value}},d.$attrs,{onClick:a}),[u.renderSlot(d.$slots,"default")],16)),[[u.vShow,s.value]]):u.createCommentVNode("",!0)]),_:3})]))}}),Ss={key:0,class:"sq-dialog-header"},Ms=["textContent"],$s={class:"sq-dialog-body"},qs={key:1,class:"sq-dialog-footer"},Ns=u.defineComponent({name:"sq-dialog",__name:"dialog",props:u.mergeModels({type:{},title:{},okText:{default:"确认"},cancelText:{default:"取消"},footer:{type:Boolean,default:!0},closeable:{type:Boolean},onOk:{},keyboard:{type:Boolean,default:void 0},maskCloseable:{type:Boolean,default:void 0},onClose:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(e){const t=u.useSlots(),n=e,o=u.ref(!1),r=u.ref(!1),c=u.useModel(e,"visible"),s=u.computed(()=>!!n.title||!!t.header),i=u.computed(()=>{const m=[];return n.type&&m.push(`is-${n.type}`),s.value&&m.push("has-header"),m}),a=u.computed(()=>n.type?at[n.type]:void 0);function l(m){if(o.value)return!1;if(typeof m!="function")return!0;const h=m();return h instanceof Promise?(o.value=!0,h.finally(()=>{o.value=!1})):h}async function d(){if(o.value)return;r.value=!1,await l(n.onClose)&&(c.value=!1)}async function f(){r.value=!0,await l(n.onOk)&&(c.value=!1)}return(m,h)=>(u.openBlock(),u.createBlock(u.unref(Gu),{visible:c.value,"onUpdate:visible":h[0]||(h[0]=p=>c.value=p),onClose:h[1]||(h[1]=()=>l(n.onClose))},{default:u.withCtx(()=>[u.createElementVNode("div",{class:u.normalizeClass(["sq-dialog",i.value])},[s.value?(u.openBlock(),u.createElementBlock("div",Ss,[a.value?(u.openBlock(),u.createBlock(u.resolveDynamicComponent(a.value),{key:0,class:"sq-dialog-header-icon"})):u.createCommentVNode("",!0),u.renderSlot(m.$slots,"header",{},()=>[u.createElementVNode("span",{class:"sq-dialog-header-title",textContent:u.toDisplayString(n.title)},null,8,Ms)]),u.createVNode(u.unref(it),{class:"sq-dialog-close",onClick:d})])):u.createCommentVNode("",!0),u.createElementVNode("div",$s,[u.renderSlot(m.$slots,"default")]),n.footer?(u.openBlock(),u.createElementBlock("div",qs,[u.renderSlot(m.$slots,"footer",{},()=>[u.createVNode(u.unref(P),{text:"",bg:"",disabled:o.value,onClick:d},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(n.cancelText),1)]),_:1},8,["disabled"]),u.createVNode(u.unref(P),{type:n.type??"primary",disabled:o.value,loading:o.value&&r.value,onClick:f},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(n.okText),1)]),_:1},8,["type","disabled","loading"])])])):u.createCommentVNode("",!0)],2)]),_:3},8,["visible"]))}}),he=u.defineComponent({name:"sq-divider",__name:"divider",props:{direction:{default:"horizontal"},variant:{default:"solid"},orientation:{default:"left"},ellipsis:{type:[Boolean,Number]},size:{}},setup(e){const t=u.useSlots(),n=e,o=u.computed(()=>{const r=[];return["none","solid","dotted","dashed"].includes(n.variant)&&r.push("is-thin"),t.default&&n.direction!=="vertical"&&r.push(`text-${n.orientation}`),r.push(`sq-divider--${n.direction}`),r});return(r,c)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["sq-divider",o.value]),style:u.normalizeStyle({"--divider-line-type":n.variant})},[u.unref(t).default&&n.direction!=="vertical"?(u.openBlock(),u.createBlock(u.unref(se),{key:0,ellipsis:n.ellipsis,size:n.size},{default:u.withCtx(()=>[u.renderSlot(r.$slots,"default")]),_:3},8,["ellipsis","size"])):u.createCommentVNode("",!0)],6))}}),zs=u.defineComponent({name:"sq-editor-bold",__name:"editor-bold",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{expose:t,emit:n}){const o=n,r=e;function c(){if(r.disabled)return;const s=[...r.rows],i=s[r.selectedRow],a=i.substring(0,r.selectInfo.startOfRow),l=i.substring(r.selectInfo.endOfRow);let d=r.selectedVal??"";if(d.match(/\*\*\*.*?\*\*\*/)){d=d.replaceAll("***","*"),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-4);return}if(d.match(/\*\*.*?\*\*/)){d=d.replaceAll("**",""),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-4);return}d=`**${d}**`,s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,4)}return t({setBold:c}),(s,i)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"加粗 ( Ctrl + B )",disabled:r.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Tn),disabled:r.disabled,onClick:c},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Rs=u.defineComponent({name:"sq-editor-italic",__name:"editor-italic",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{expose:t,emit:n}){const o=n,r=e;function c(){if(r.disabled)return;const s=[...r.rows],i=s[r.selectedRow],a=i.substring(0,r.selectInfo.startOfRow),l=i.substring(r.selectInfo.endOfRow);let d=r.selectedVal??"";if(d.match(/\*\*\*.*?\*\*\*/)){d=d.replaceAll("***","**"),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-2);return}const m=d.match(/\*\*.*?\*\*/),p=((m==null?void 0:m[0])??"").replaceAll("**","").match(/\*.*?\*/);if(m&&!p){d=`*${d}*`,s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,2);return}else if(p){d=d.replaceAll("**","[B]").replaceAll("*","").replaceAll("[B]","**"),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-2);return}if(d.match(/\*.*?\*/)){d=d.replaceAll("*",""),s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,-2);return}d=`*${d}*`,s[r.selectedRow]=`${a}${d}${l}`,o("updateText",s,0,2)}return t({setItalic:c}),(s,i)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"斜体 ( Ctrl + I )",disabled:r.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Vo),disabled:r.disabled,onClick:c},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Ts=u.defineComponent({name:"sq-editor-underline",__name:"editor-underline",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{expose:t,emit:n}){const o=n,r=e;function c(){var p;if(r.disabled)return;const s=[...r.rows],i=s[r.selectedRow],a=i.substring(0,r.selectInfo.startOfRow),l=i.substring(r.selectInfo.endOfRow),d=/<u\b.*?>/;let f=r.selectedVal??"";const m=((p=f.match(d))==null?void 0:p[0])??"";if(f.match(/<u\b.*?>.*?<\/u>/)){f=f.replace(m,"").replace("</u>","");const x=m.length+4;s[r.selectedRow]=`${a}${f}${l}`,o("updateText",s,0,-x);return}f=`<u>${f}</u>`,s[r.selectedRow]=`${a}${f}${l}`,o("updateText",s,0,7)}return t({setUnderline:c}),(s,i)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"下划线 ( Ctrl + U )",disabled:r.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(sr),disabled:r.disabled,onClick:c},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Ls=u.defineComponent({name:"sq-editor-strikethrough",__name:"editor-strikethrough",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{emit:t}){const n=t,o=e;function r(){if(o.disabled)return;const c=[...o.rows],s=c[o.selectedRow],i=s.substring(0,o.selectInfo.startOfRow),a=s.substring(o.selectInfo.endOfRow);let l=o.selectedVal??"";if(l.match(/\~\~.*?\~\~/)){l=l.replaceAll("~~",""),c[o.selectedRow]=`${i}${l}${a}`,n("updateText",c,0,-4);return}l=`~~${l}~~`,c[o.selectedRow]=`${i}${l}${a}`,n("updateText",c,0,4)}return(c,s)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"删除线",disabled:o.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(nr),disabled:o.disabled,onClick:r},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Vs=u.defineComponent({name:"sq-editor-blur",__name:"editor-blur",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{emit:t}){const n=t,o=e;function r(){var h;if(o.disabled)return;const c=[...o.rows],s=c[o.selectedRow],i=s.substring(0,o.selectInfo.startOfRow),a=s.substring(o.selectInfo.endOfRow),l=/<blur\b.*?>/;let d=o.selectedVal??"";const f=((h=d.match(l))==null?void 0:h[0])??"";if(d.match(/<blur\b.*?>.*?<\/blur>/)){d=d.replace(f,"").replace("</blur>","");const p=f.length+7;c[o.selectedRow]=`${i}${d}${a}`,n("updateText",c,0,-p);return}d=`<blur>${d}</blur>`,c[o.selectedRow]=`${i}${d}${a}`,n("updateText",c,0,13)}return(c,s)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"模糊块",disabled:o.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Gt),disabled:o.disabled,onClick:r},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Is=u.defineComponent({name:"sq-editor-ul",__name:"editor-ul",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{emit:t}){const n=t,o=e;function r(){const a=o.selectedRow,l=[...o.rows],d=l[a];if(c(d)){l[a]=d.replace("- ",""),n("updateText",l,-2,-2);return}if(s(d)){const f=i(d),m=2-f.length;l[a]=d.replace(f,"- "),n("updateText",l,m,m);return}l[a]=`- ${d}`,n("updateText",l,2,2)}function c(a){return a.replace(" ","").startsWith("- ")}function s(a){return/^\d+\.\s+/.test(a.replace(" ",""))}function i(a){return a.replace(" ","").match(/^\d+\.\s/)[0]}return(a,l)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"无序列表",disabled:o.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Yo),disabled:o.disabled,onClick:r},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),vs=u.defineComponent({name:"sq-editor-ol",__name:"editor-ol",props:{disabled:{type:Boolean},rows:{default:()=>[]},selectedVal:{},selectedRow:{},selectInfo:{default:()=>({})}},emits:["updateText"],setup(e,{emit:t}){const n=t,o=e;function r(){const a=o.selectedRow,l=[...o.rows],d=l[a],f=a>0?l[a-1]:"";let m=1;if(c(d)){f&&s(f)&&(m=parseInt(i(f))+1);const x=`${m}. `,_=x.length-2;l[a]=d.replace("- ",x),n("updateText",l,_,_);return}if(s(d)){const x=i(d),_=-x.length;l[a]=d.replace(x,""),n("updateText",l,_,_);return}f&&s(f)&&(m=parseInt(i(f))+1);const h=`${m}. `,p=h.length;l[a]=`${h}${d}`,n("updateText",l,p,p)}function c(a){return a.replace(" ","").startsWith("- ")}function s(a){return/^\d+\.\s+/.test(a.replace(" ",""))}function i(a){return a.replace(" ","").match(/^\d+\.\s/)[0]}return(a,l)=>(u.openBlock(),u.createBlock(u.unref(H),{tip:"有序列表",disabled:o.disabled},{default:u.withCtx(()=>[u.createVNode(u.unref(P),{text:"",icon:u.unref(Ho),disabled:o.disabled,onClick:r},null,8,["icon","disabled"])]),_:1},8,["disabled"]))}}),Os={class:"sq-editor-body"},Ps={class:"sq-editor-toolbar"},Zs={class:"sq-editor-control"},Us=u.defineComponent({name:"sq-editor",__name:"editor",props:u.mergeModels({round:{type:Boolean},disabled:{type:Boolean},placeholder:{},maxlength:{},minlength:{},size:{},beforePreview:{}},{value:{default:""},valueModifiers:{}}),emits:["update:value"],setup(e){const t=[{text:"编辑",value:"edit"},{text:"预览",value:"preview"}];let n;const o=e,r=u.ref("edit"),c=u.ref([]),s=u.ref(!1),i=u.ref(""),a=u.ref(),l=u.ref({}),d=u.shallowRef(null),f=u.shallowRef(null),m=u.shallowRef(null),h=u.shallowRef(null),p=u.useModel(e,"value"),x=u.computed(()=>{const A=[];return o.size!=="md"&&A.push(`sq-editor--${o.size}`),o.round&&A.push("is-round"),A}),_=u.computed(()=>i.value.length&&!i.value.includes(`
|
|
50
50
|
`)&&i.value!==" "&&!o.disabled),E=u.computed(()=>a.value!==void 0&&!i.value.length&&!o.disabled),y=u.computed(()=>typeof o.beforePreview=="function"?o.beforePreview(p.value):p.value);u.onMounted(()=>{document.addEventListener("selectionchange",B),document.addEventListener("click",S)}),u.onBeforeUnmount(()=>{document.removeEventListener("selectionchange",B),document.removeEventListener("click",S)});function C(A){A==="edit"&&u.nextTick(()=>{var w;(w=d.value)==null||w.focus()})}function k(A){var L,V,z;const w=c.value[a.value],M=(w==null?void 0:w.replace(" ",""))??"";if(A.key==="Tab"){A.preventDefault();const $=w.substring(0,l.value.startOfRow),F=w.substring(l.value.endOfRow);c.value[a.value]=`${$} ${F}`,b(c.value,1,1);return}if(A.ctrlKey)switch(A.key.toUpperCase()){case"B":(L=f.value)==null||L.setBold();return;case"I":(V=m.value)==null||V.setItalic();return;case"U":A.preventDefault(),(z=h.value)==null||z.setUnderline();return}if(A.key==="Enter"){if(D(w)){A.preventDefault();const $=w.substring(0,w.indexOf("- "));if(M!=="- "){const N=3+$.length;c.value[a.value]=`${w}
|
|
51
51
|
${$}- `,R(A.target),b(c.value,N,N);return}const F=2+$.length;c.value[a.value]=w.substring(F),b(c.value,-F,-F);return}if(g(w)){A.preventDefault();const $=M.match(/^\d+\.\s/)[0],N=`${parseInt($)+1}. `,v=w.substring(0,w.indexOf($));if(M!==$){const st=N.length+v.length+1;c.value[a.value]=`${w}
|
|
52
52
|
${v}${N}`,R(A.target),b(c.value,st,st);return}const j=$.length+v.length;c.value[a.value]=w.substring(j),b(c.value,-j,-j);return}}}function B(A){var M;const w=window.getSelection();(w==null?void 0:w.focusNode)===((M=d.value)==null?void 0:M.$el)&&(n=A.target,!((n==null?void 0:n.selectionStart)===void 0||(n==null?void 0:n.selectionEnd)===void 0)&&(l.value.start=(n==null?void 0:n.selectionStart)??0,l.value.end=(n==null?void 0:n.selectionEnd)??0,i.value=p.value.substring(l.value.start,l.value.end),T()))}function S(){i.value="",a.value=void 0}function R(A){const w=A.selectionStart,L=p.value.substring(0,w??0).split(`
|