@squirrel-cloud/ui-vue 0.4.11 → 0.4.13
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 S, openBlock as m, createElementVNode as F, createStaticVNode as tu, defineComponent as O, computed as
|
|
1
|
+
import { createElementBlock as S, openBlock as m, createElementVNode as F, createStaticVNode as tu, defineComponent as O, computed as w, createBlock as L, unref as b, normalizeClass as K, withCtx as Z, createCommentVNode as U, createTextVNode as iu, resolveDynamicComponent as me, toDisplayString as se, h as Ju, ref as R, watch as ie, normalizeStyle as ee, onMounted as be, onBeforeUnmount as Ue, Transition as Re, withDirectives as fe, renderSlot as j, vShow as He, useSlots as hu, createVNode as T, inject as _e, provide as nu, toRef as re, mergeModels as ue, useModel as ae, vModelCheckbox as Kt, toRaw as Xe, Fragment as xe, renderList as je, Teleport as Qt, mergeProps as qe, shallowRef as de, withModifiers as Me, nextTick as Ku, vModelDynamic as t0, vModelText as n0, render as _t, cloneVNode as o0, Text as r0, Comment as s0, 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)
|
|
@@ -453,16 +453,16 @@ const ur = /* @__PURE__ */ X(Ko, [["render", er]]), st = {
|
|
|
453
453
|
text: {}
|
|
454
454
|
},
|
|
455
455
|
setup(e) {
|
|
456
|
-
const u = e, t =
|
|
456
|
+
const u = e, t = w(() => {
|
|
457
457
|
const o = [];
|
|
458
458
|
return u.type && o.push(`is-${u.type}`), o;
|
|
459
|
-
}), n =
|
|
459
|
+
}), n = w(() => u.icon ? u.icon : u.showIcon && u.type ? st[u.type] : void 0);
|
|
460
460
|
return (o, r) => (m(), L(b(Oe), {
|
|
461
461
|
class: K(["sq-alert", t.value])
|
|
462
462
|
}, {
|
|
463
463
|
default: Z(() => [
|
|
464
464
|
n.value ? (m(), L(me(n.value), { key: 0 })) : U("", !0),
|
|
465
|
-
iu(" " +
|
|
465
|
+
iu(" " + se(u.text), 1)
|
|
466
466
|
]),
|
|
467
467
|
_: 1
|
|
468
468
|
}, 8, ["class"]));
|
|
@@ -746,15 +746,15 @@ yu.prototype.parse = function(e, u) {
|
|
|
746
746
|
const p = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
747
747
|
if (!p) {
|
|
748
748
|
const f = this.hostname.split(/\./);
|
|
749
|
-
for (let g = 0,
|
|
750
|
-
const
|
|
751
|
-
if (
|
|
752
|
-
let
|
|
753
|
-
for (let
|
|
754
|
-
|
|
755
|
-
if (!
|
|
756
|
-
const
|
|
757
|
-
$ && (
|
|
749
|
+
for (let g = 0, _ = f.length; g < _; g++) {
|
|
750
|
+
const k = f[g];
|
|
751
|
+
if (k && !k.match(Ft)) {
|
|
752
|
+
let v = "";
|
|
753
|
+
for (let D = 0, C = k.length; D < C; D++)
|
|
754
|
+
k.charCodeAt(D) > 127 ? v += "x" : v += k[D];
|
|
755
|
+
if (!v.match(Ft)) {
|
|
756
|
+
const D = f.slice(0, g), C = f.slice(g + 1), $ = k.match(br);
|
|
757
|
+
$ && (D.push($[1]), C.unshift($[2])), C.length && (r = C.join(".") + r), this.hostname = D.join(".");
|
|
758
758
|
break;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
@@ -834,42 +834,42 @@ function wr(e) {
|
|
|
834
834
|
var u;
|
|
835
835
|
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u = kr.get(e)) !== null && u !== void 0 ? u : e;
|
|
836
836
|
}
|
|
837
|
-
var
|
|
837
|
+
var oe;
|
|
838
838
|
(function(e) {
|
|
839
839
|
e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
|
|
840
|
-
})(
|
|
840
|
+
})(oe || (oe = {}));
|
|
841
841
|
const Cr = 32;
|
|
842
842
|
var ze;
|
|
843
843
|
(function(e) {
|
|
844
844
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
845
845
|
})(ze || (ze = {}));
|
|
846
846
|
function Qu(e) {
|
|
847
|
-
return e >=
|
|
847
|
+
return e >= oe.ZERO && e <= oe.NINE;
|
|
848
848
|
}
|
|
849
849
|
function Dr(e) {
|
|
850
|
-
return e >=
|
|
850
|
+
return e >= oe.UPPER_A && e <= oe.UPPER_F || e >= oe.LOWER_A && e <= oe.LOWER_F;
|
|
851
851
|
}
|
|
852
852
|
function Er(e) {
|
|
853
|
-
return e >=
|
|
853
|
+
return e >= oe.UPPER_A && e <= oe.UPPER_Z || e >= oe.LOWER_A && e <= oe.LOWER_Z || Qu(e);
|
|
854
854
|
}
|
|
855
855
|
function Ar(e) {
|
|
856
|
-
return e ===
|
|
856
|
+
return e === oe.EQUALS || Er(e);
|
|
857
857
|
}
|
|
858
|
-
var
|
|
858
|
+
var ne;
|
|
859
859
|
(function(e) {
|
|
860
860
|
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
|
|
861
|
-
})(
|
|
861
|
+
})(ne || (ne = {}));
|
|
862
862
|
var Be;
|
|
863
863
|
(function(e) {
|
|
864
864
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
|
865
865
|
})(Be || (Be = {}));
|
|
866
866
|
class Fr {
|
|
867
867
|
constructor(u, t, n) {
|
|
868
|
-
this.decodeTree = u, this.emitCodePoint = t, this.errors = n, this.state =
|
|
868
|
+
this.decodeTree = u, this.emitCodePoint = t, this.errors = n, this.state = ne.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Be.Strict;
|
|
869
869
|
}
|
|
870
870
|
/** Resets the instance to make it reusable. */
|
|
871
871
|
startEntity(u) {
|
|
872
|
-
this.decodeMode = u, this.state =
|
|
872
|
+
this.decodeMode = u, this.state = ne.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
873
873
|
}
|
|
874
874
|
/**
|
|
875
875
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -884,15 +884,15 @@ class Fr {
|
|
|
884
884
|
*/
|
|
885
885
|
write(u, t) {
|
|
886
886
|
switch (this.state) {
|
|
887
|
-
case
|
|
888
|
-
return u.charCodeAt(t) ===
|
|
889
|
-
case
|
|
887
|
+
case ne.EntityStart:
|
|
888
|
+
return u.charCodeAt(t) === oe.NUM ? (this.state = ne.NumericStart, this.consumed += 1, this.stateNumericStart(u, t + 1)) : (this.state = ne.NamedEntity, this.stateNamedEntity(u, t));
|
|
889
|
+
case ne.NumericStart:
|
|
890
890
|
return this.stateNumericStart(u, t);
|
|
891
|
-
case
|
|
891
|
+
case ne.NumericDecimal:
|
|
892
892
|
return this.stateNumericDecimal(u, t);
|
|
893
|
-
case
|
|
893
|
+
case ne.NumericHex:
|
|
894
894
|
return this.stateNumericHex(u, t);
|
|
895
|
-
case
|
|
895
|
+
case ne.NamedEntity:
|
|
896
896
|
return this.stateNamedEntity(u, t);
|
|
897
897
|
}
|
|
898
898
|
}
|
|
@@ -906,7 +906,7 @@ class Fr {
|
|
|
906
906
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
907
907
|
*/
|
|
908
908
|
stateNumericStart(u, t) {
|
|
909
|
-
return t >= u.length ? -1 : (u.charCodeAt(t) | Cr) ===
|
|
909
|
+
return t >= u.length ? -1 : (u.charCodeAt(t) | Cr) === oe.LOWER_X ? (this.state = ne.NumericHex, this.consumed += 1, this.stateNumericHex(u, t + 1)) : (this.state = ne.NumericDecimal, this.stateNumericDecimal(u, t));
|
|
910
910
|
}
|
|
911
911
|
addToNumericResult(u, t, n, o) {
|
|
912
912
|
if (t !== n) {
|
|
@@ -971,11 +971,11 @@ class Fr {
|
|
|
971
971
|
var n;
|
|
972
972
|
if (this.consumed <= t)
|
|
973
973
|
return (n = this.errors) === null || n === void 0 || n.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
974
|
-
if (u ===
|
|
974
|
+
if (u === oe.SEMI)
|
|
975
975
|
this.consumed += 1;
|
|
976
976
|
else if (this.decodeMode === Be.Strict)
|
|
977
977
|
return 0;
|
|
978
|
-
return this.emitCodePoint(wr(this.result), this.consumed), this.errors && (u !==
|
|
978
|
+
return this.emitCodePoint(wr(this.result), this.consumed), this.errors && (u !== oe.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
979
979
|
}
|
|
980
980
|
/**
|
|
981
981
|
* Parses a named entity.
|
|
@@ -997,7 +997,7 @@ class Fr {
|
|
|
997
997
|
(r === 0 || // And there should be no invalid characters.
|
|
998
998
|
Ar(s)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
999
999
|
if (o = n[this.treeIndex], r = (o & ze.VALUE_LENGTH) >> 14, r !== 0) {
|
|
1000
|
-
if (s ===
|
|
1000
|
+
if (s === oe.SEMI)
|
|
1001
1001
|
return this.emitNamedEntityData(this.treeIndex, r, this.consumed + this.excess);
|
|
1002
1002
|
this.decodeMode !== Be.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
1003
1003
|
}
|
|
@@ -1037,16 +1037,16 @@ class Fr {
|
|
|
1037
1037
|
end() {
|
|
1038
1038
|
var u;
|
|
1039
1039
|
switch (this.state) {
|
|
1040
|
-
case
|
|
1040
|
+
case ne.NamedEntity:
|
|
1041
1041
|
return this.result !== 0 && (this.decodeMode !== Be.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
1042
1042
|
// Otherwise, emit a numeric entity if we have one.
|
|
1043
|
-
case
|
|
1043
|
+
case ne.NumericDecimal:
|
|
1044
1044
|
return this.emitNumericEntity(0, 2);
|
|
1045
|
-
case
|
|
1045
|
+
case ne.NumericHex:
|
|
1046
1046
|
return this.emitNumericEntity(0, 3);
|
|
1047
|
-
case
|
|
1047
|
+
case ne.NumericStart:
|
|
1048
1048
|
return (u = this.errors) === null || u === void 0 || u.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1049
|
-
case
|
|
1049
|
+
case ne.EntityStart:
|
|
1050
1050
|
return 0;
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
@@ -1624,19 +1624,19 @@ function os(e) {
|
|
|
1624
1624
|
const f = a[p].url, g = e.md.normalizeLink(f);
|
|
1625
1625
|
if (!e.md.validateLink(g))
|
|
1626
1626
|
continue;
|
|
1627
|
-
let
|
|
1628
|
-
a[p].schema ? a[p].schema === "mailto:" && !/^mailto:/i.test(
|
|
1629
|
-
const
|
|
1630
|
-
if (
|
|
1627
|
+
let _ = a[p].text;
|
|
1628
|
+
a[p].schema ? a[p].schema === "mailto:" && !/^mailto:/i.test(_) ? _ = e.md.normalizeLinkText("mailto:" + _).replace(/^mailto:/, "") : _ = e.md.normalizeLinkText(_) : _ = e.md.normalizeLinkText("http://" + _).replace(/^http:\/\//, "");
|
|
1629
|
+
const k = a[p].index;
|
|
1630
|
+
if (k > h) {
|
|
1631
1631
|
const $ = new e.Token("text", "", 0);
|
|
1632
|
-
$.content = i.slice(h,
|
|
1632
|
+
$.content = i.slice(h, k), $.level = d, l.push($);
|
|
1633
1633
|
}
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1634
|
+
const v = new e.Token("link_open", "a", 1);
|
|
1635
|
+
v.attrs = [["href", g]], v.level = d++, v.markup = "linkify", v.info = "auto", l.push(v);
|
|
1636
|
+
const D = new e.Token("text", "", 0);
|
|
1637
|
+
D.content = _, D.level = d, l.push(D);
|
|
1638
|
+
const C = new e.Token("link_close", "a", -1);
|
|
1639
|
+
C.level = --d, C.markup = "linkify", C.info = "auto", l.push(C), h = a[p].lastIndex;
|
|
1640
1640
|
}
|
|
1641
1641
|
if (h < i.length) {
|
|
1642
1642
|
const p = new e.Token("text", "", 0);
|
|
@@ -1716,24 +1716,24 @@ function ps(e, u) {
|
|
|
1716
1716
|
g = e[t].content.charCodeAt(0);
|
|
1717
1717
|
break;
|
|
1718
1718
|
}
|
|
1719
|
-
const
|
|
1720
|
-
if (
|
|
1719
|
+
const _ = du(f) || lu(String.fromCharCode(f)), k = du(g) || lu(String.fromCharCode(g)), v = au(f), D = au(g);
|
|
1720
|
+
if (D ? d = !1 : k && (v || _ || (d = !1)), v ? h = !1 : _ && (D || k || (h = !1)), g === 34 && l[0] === '"' && f >= 48 && f <= 57 && (h = d = !1), d && h && (d = _, h = k), !d && !h) {
|
|
1721
1721
|
p && (r.content = vu(r.content, l.index, Bt));
|
|
1722
1722
|
continue;
|
|
1723
1723
|
}
|
|
1724
1724
|
if (h)
|
|
1725
1725
|
for (t = n.length - 1; t >= 0; t--) {
|
|
1726
|
-
let
|
|
1726
|
+
let C = n[t];
|
|
1727
1727
|
if (n[t].level < s)
|
|
1728
1728
|
break;
|
|
1729
|
-
if (
|
|
1730
|
-
|
|
1729
|
+
if (C.single === p && n[t].level === s) {
|
|
1730
|
+
C = n[t];
|
|
1731
1731
|
let $, M;
|
|
1732
|
-
p ? ($ = u.md.options.quotes[2], M = u.md.options.quotes[3]) : ($ = u.md.options.quotes[0], M = u.md.options.quotes[1]), r.content = vu(r.content, l.index, M), e[
|
|
1733
|
-
e[
|
|
1734
|
-
|
|
1732
|
+
p ? ($ = u.md.options.quotes[2], M = u.md.options.quotes[3]) : ($ = u.md.options.quotes[0], M = u.md.options.quotes[1]), r.content = vu(r.content, l.index, M), e[C.token].content = vu(
|
|
1733
|
+
e[C.token].content,
|
|
1734
|
+
C.pos,
|
|
1735
1735
|
$
|
|
1736
|
-
), i += M.length - 1,
|
|
1736
|
+
), i += M.length - 1, C.token === o && (i += $.length - 1), c = r.content, a = c.length, n.length = t;
|
|
1737
1737
|
continue e;
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
@@ -1893,17 +1893,17 @@ function xs(e, u, t, n) {
|
|
|
1893
1893
|
if (c !== 124 && c !== 45 && c !== 58 && !J(c) || s === 45 && J(c))
|
|
1894
1894
|
return !1;
|
|
1895
1895
|
for (; r < e.eMarks[o]; ) {
|
|
1896
|
-
const
|
|
1897
|
-
if (
|
|
1896
|
+
const C = e.src.charCodeAt(r);
|
|
1897
|
+
if (C !== 124 && C !== 45 && C !== 58 && !J(C))
|
|
1898
1898
|
return !1;
|
|
1899
1899
|
r++;
|
|
1900
1900
|
}
|
|
1901
1901
|
let i = Vu(e, u + 1), a = i.split("|");
|
|
1902
1902
|
const l = [];
|
|
1903
|
-
for (let
|
|
1904
|
-
const $ = a[
|
|
1903
|
+
for (let C = 0; C < a.length; C++) {
|
|
1904
|
+
const $ = a[C].trim();
|
|
1905
1905
|
if (!$) {
|
|
1906
|
-
if (
|
|
1906
|
+
if (C === 0 || C === a.length - 1)
|
|
1907
1907
|
continue;
|
|
1908
1908
|
return !1;
|
|
1909
1909
|
}
|
|
@@ -1923,30 +1923,30 @@ function xs(e, u, t, n) {
|
|
|
1923
1923
|
e.parentType = "table";
|
|
1924
1924
|
const p = e.md.block.ruler.getRules("blockquote"), f = e.push("table_open", "table", 1), g = [u, 0];
|
|
1925
1925
|
f.map = g;
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1928
|
-
const
|
|
1929
|
-
|
|
1930
|
-
for (let
|
|
1926
|
+
const _ = e.push("thead_open", "thead", 1);
|
|
1927
|
+
_.map = [u, u + 1];
|
|
1928
|
+
const k = e.push("tr_open", "tr", 1);
|
|
1929
|
+
k.map = [u, u + 1];
|
|
1930
|
+
for (let C = 0; C < a.length; C++) {
|
|
1931
1931
|
const $ = e.push("th_open", "th", 1);
|
|
1932
|
-
l[
|
|
1932
|
+
l[C] && ($.attrs = [["style", "text-align:" + l[C]]]);
|
|
1933
1933
|
const M = e.push("inline", "", 0);
|
|
1934
|
-
M.content = a[
|
|
1934
|
+
M.content = a[C].trim(), M.children = [], e.push("th_close", "th", -1);
|
|
1935
1935
|
}
|
|
1936
1936
|
e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
|
|
1937
|
-
let
|
|
1937
|
+
let v, D = 0;
|
|
1938
1938
|
for (o = u + 2; o < t && !(e.sCount[o] < e.blkIndent); o++) {
|
|
1939
|
-
let
|
|
1939
|
+
let C = !1;
|
|
1940
1940
|
for (let M = 0, V = p.length; M < V; M++)
|
|
1941
1941
|
if (p[M](e, o, t, !0)) {
|
|
1942
|
-
|
|
1942
|
+
C = !0;
|
|
1943
1943
|
break;
|
|
1944
1944
|
}
|
|
1945
|
-
if (
|
|
1945
|
+
if (C || (i = Vu(e, o).trim(), !i) || e.sCount[o] - e.blkIndent >= 4 || (a = Mt(i), a.length && a[0] === "" && a.shift(), a.length && a[a.length - 1] === "" && a.pop(), D += d - a.length, D > ms))
|
|
1946
1946
|
break;
|
|
1947
1947
|
if (o === u + 2) {
|
|
1948
1948
|
const M = e.push("tbody_open", "tbody", 1);
|
|
1949
|
-
M.map =
|
|
1949
|
+
M.map = v = [u + 2, 0];
|
|
1950
1950
|
}
|
|
1951
1951
|
const $ = e.push("tr_open", "tr", 1);
|
|
1952
1952
|
$.map = [o, o + 1];
|
|
@@ -1958,7 +1958,7 @@ function xs(e, u, t, n) {
|
|
|
1958
1958
|
}
|
|
1959
1959
|
e.push("tr_close", "tr", -1);
|
|
1960
1960
|
}
|
|
1961
|
-
return
|
|
1961
|
+
return v && (e.push("tbody_close", "tbody", -1), v[1] = o), e.push("table_close", "table", -1), g[1] = o, e.parentType = h, e.line = o, !0;
|
|
1962
1962
|
}
|
|
1963
1963
|
function gs(e, u, t) {
|
|
1964
1964
|
if (e.sCount[u] - e.blkIndent < 4)
|
|
@@ -2018,10 +2018,10 @@ function _s(e, u, t, n) {
|
|
|
2018
2018
|
e.parentType = "blockquote";
|
|
2019
2019
|
let p = !1, f;
|
|
2020
2020
|
for (f = u; f < t; f++) {
|
|
2021
|
-
const
|
|
2021
|
+
const D = e.sCount[f] < e.blkIndent;
|
|
2022
2022
|
if (o = e.bMarks[f] + e.tShift[f], r = e.eMarks[f], o >= r)
|
|
2023
2023
|
break;
|
|
2024
|
-
if (e.src.charCodeAt(o++) === 62 && !
|
|
2024
|
+
if (e.src.charCodeAt(o++) === 62 && !D) {
|
|
2025
2025
|
let $ = e.sCount[f] + 1, M, V;
|
|
2026
2026
|
e.src.charCodeAt(o) === 32 ? (o++, $++, V = !1, M = !0) : e.src.charCodeAt(o) === 9 ? (M = !0, (e.bsCount[f] + $) % 4 === 3 ? (o++, $++, V = !1) : V = !0) : M = !1;
|
|
2027
2027
|
let H = $;
|
|
@@ -2038,13 +2038,13 @@ function _s(e, u, t, n) {
|
|
|
2038
2038
|
}
|
|
2039
2039
|
if (p)
|
|
2040
2040
|
break;
|
|
2041
|
-
let
|
|
2041
|
+
let C = !1;
|
|
2042
2042
|
for (let $ = 0, M = d.length; $ < M; $++)
|
|
2043
2043
|
if (d[$](e, f, t, !0)) {
|
|
2044
|
-
|
|
2044
|
+
C = !0;
|
|
2045
2045
|
break;
|
|
2046
2046
|
}
|
|
2047
|
-
if (
|
|
2047
|
+
if (C) {
|
|
2048
2048
|
e.lineMax = f, e.blkIndent !== 0 && (c.push(e.bMarks[f]), i.push(e.bsCount[f]), l.push(e.tShift[f]), a.push(e.sCount[f]), e.sCount[f] -= e.blkIndent);
|
|
2049
2049
|
break;
|
|
2050
2050
|
}
|
|
@@ -2052,14 +2052,14 @@ function _s(e, u, t, n) {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
const g = e.blkIndent;
|
|
2054
2054
|
e.blkIndent = 0;
|
|
2055
|
-
const
|
|
2056
|
-
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2059
|
-
const
|
|
2060
|
-
|
|
2061
|
-
for (let
|
|
2062
|
-
e.bMarks[
|
|
2055
|
+
const _ = e.push("blockquote_open", "blockquote", 1);
|
|
2056
|
+
_.markup = ">";
|
|
2057
|
+
const k = [u, 0];
|
|
2058
|
+
_.map = k, e.md.block.tokenize(e, u, f);
|
|
2059
|
+
const v = e.push("blockquote_close", "blockquote", -1);
|
|
2060
|
+
v.markup = ">", e.lineMax = s, e.parentType = h, k[1] = e.line;
|
|
2061
|
+
for (let D = 0; D < l.length; D++)
|
|
2062
|
+
e.bMarks[D + u] = c[D], e.tShift[D + u] = l[D], e.sCount[D + u] = a[D], e.bsCount[D + u] = i[D];
|
|
2063
2063
|
return e.blkIndent = g, !0;
|
|
2064
2064
|
}
|
|
2065
2065
|
function ks(e, u, t, n) {
|
|
@@ -2144,14 +2144,14 @@ function ws(e, u, t, n) {
|
|
|
2144
2144
|
return !0;
|
|
2145
2145
|
const f = e.src.charCodeAt(p - 1), g = e.tokens.length;
|
|
2146
2146
|
d ? (c = e.push("ordered_list_open", "ol", 1), h !== 1 && (c.attrs = [["start", h]])) : c = e.push("bullet_list_open", "ul", 1);
|
|
2147
|
-
const
|
|
2148
|
-
c.map =
|
|
2149
|
-
let
|
|
2150
|
-
const
|
|
2147
|
+
const _ = [i, 0];
|
|
2148
|
+
c.map = _, c.markup = String.fromCharCode(f);
|
|
2149
|
+
let k = !1;
|
|
2150
|
+
const v = e.md.block.ruler.getRules("list"), D = e.parentType;
|
|
2151
2151
|
for (e.parentType = "list"; i < t; ) {
|
|
2152
2152
|
r = p, o = e.eMarks[i];
|
|
2153
|
-
const
|
|
2154
|
-
let $ =
|
|
2153
|
+
const C = e.sCount[i] + p - (e.bMarks[i] + e.tShift[i]);
|
|
2154
|
+
let $ = C;
|
|
2155
2155
|
for (; r < o; ) {
|
|
2156
2156
|
const W = e.src.charCodeAt(r);
|
|
2157
2157
|
if (W === 9)
|
|
@@ -2164,17 +2164,17 @@ function ws(e, u, t, n) {
|
|
|
2164
2164
|
}
|
|
2165
2165
|
const M = r;
|
|
2166
2166
|
let V;
|
|
2167
|
-
M >= o ? V = 1 : V = $ -
|
|
2168
|
-
const H =
|
|
2167
|
+
M >= o ? V = 1 : V = $ - C, V > 4 && (V = 1);
|
|
2168
|
+
const H = C + V;
|
|
2169
2169
|
c = e.push("list_item_open", "li", 1), c.markup = String.fromCharCode(f);
|
|
2170
2170
|
const q = [i, 0];
|
|
2171
2171
|
c.map = q, d && (c.info = e.src.slice(s, p - 1));
|
|
2172
|
-
const
|
|
2173
|
-
if (e.listIndent = e.blkIndent, e.blkIndent = H, e.tight = !0, e.tShift[i] = M - e.bMarks[i], e.sCount[i] = $, M >= o && e.isEmpty(i + 1) ? e.line = Math.min(e.line + 2, t) : e.md.block.tokenize(e, i, t, !0), (!e.tight ||
|
|
2172
|
+
const y = e.tight, x = e.tShift[i], A = e.sCount[i], E = e.listIndent;
|
|
2173
|
+
if (e.listIndent = e.blkIndent, e.blkIndent = H, e.tight = !0, e.tShift[i] = M - e.bMarks[i], e.sCount[i] = $, M >= o && e.isEmpty(i + 1) ? e.line = Math.min(e.line + 2, t) : e.md.block.tokenize(e, i, t, !0), (!e.tight || k) && (a = !1), k = e.line - i > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = E, e.tShift[i] = x, e.sCount[i] = A, e.tight = y, c = e.push("list_item_close", "li", -1), c.markup = String.fromCharCode(f), i = e.line, q[1] = i, i >= t || e.sCount[i] < e.blkIndent || e.sCount[i] - e.blkIndent >= 4)
|
|
2174
2174
|
break;
|
|
2175
2175
|
let z = !1;
|
|
2176
|
-
for (let W = 0, G =
|
|
2177
|
-
if (
|
|
2176
|
+
for (let W = 0, G = v.length; W < G; W++)
|
|
2177
|
+
if (v[W](e, i, t, !0)) {
|
|
2178
2178
|
z = !0;
|
|
2179
2179
|
break;
|
|
2180
2180
|
}
|
|
@@ -2189,58 +2189,58 @@ function ws(e, u, t, n) {
|
|
|
2189
2189
|
if (f !== e.src.charCodeAt(p - 1))
|
|
2190
2190
|
break;
|
|
2191
2191
|
}
|
|
2192
|
-
return d ? c = e.push("ordered_list_close", "ol", -1) : c = e.push("bullet_list_close", "ul", -1), c.markup = String.fromCharCode(f),
|
|
2192
|
+
return d ? c = e.push("ordered_list_close", "ol", -1) : c = e.push("bullet_list_close", "ul", -1), c.markup = String.fromCharCode(f), _[1] = i, e.line = i, e.parentType = D, a && ys(e, g), !0;
|
|
2193
2193
|
}
|
|
2194
2194
|
function Cs(e, u, t, n) {
|
|
2195
2195
|
let o = e.bMarks[u] + e.tShift[u], r = e.eMarks[u], s = u + 1;
|
|
2196
2196
|
if (e.sCount[u] - e.blkIndent >= 4 || e.src.charCodeAt(o) !== 91)
|
|
2197
2197
|
return !1;
|
|
2198
|
-
function c(
|
|
2199
|
-
const
|
|
2200
|
-
if (
|
|
2198
|
+
function c(v) {
|
|
2199
|
+
const D = e.lineMax;
|
|
2200
|
+
if (v >= D || e.isEmpty(v))
|
|
2201
2201
|
return null;
|
|
2202
|
-
let
|
|
2203
|
-
if (e.sCount[
|
|
2202
|
+
let C = !1;
|
|
2203
|
+
if (e.sCount[v] - e.blkIndent > 3 && (C = !0), e.sCount[v] < 0 && (C = !0), !C) {
|
|
2204
2204
|
const V = e.md.block.ruler.getRules("reference"), H = e.parentType;
|
|
2205
2205
|
e.parentType = "reference";
|
|
2206
2206
|
let q = !1;
|
|
2207
|
-
for (let
|
|
2208
|
-
if (V[
|
|
2207
|
+
for (let y = 0, x = V.length; y < x; y++)
|
|
2208
|
+
if (V[y](e, v, D, !0)) {
|
|
2209
2209
|
q = !0;
|
|
2210
2210
|
break;
|
|
2211
2211
|
}
|
|
2212
2212
|
if (e.parentType = H, q)
|
|
2213
2213
|
return null;
|
|
2214
2214
|
}
|
|
2215
|
-
const $ = e.bMarks[
|
|
2215
|
+
const $ = e.bMarks[v] + e.tShift[v], M = e.eMarks[v];
|
|
2216
2216
|
return e.src.slice($, M + 1);
|
|
2217
2217
|
}
|
|
2218
2218
|
let i = e.src.slice(o, r + 1);
|
|
2219
2219
|
r = i.length;
|
|
2220
2220
|
let a = -1;
|
|
2221
2221
|
for (o = 1; o < r; o++) {
|
|
2222
|
-
const
|
|
2223
|
-
if (
|
|
2222
|
+
const v = i.charCodeAt(o);
|
|
2223
|
+
if (v === 91)
|
|
2224
2224
|
return !1;
|
|
2225
|
-
if (
|
|
2225
|
+
if (v === 93) {
|
|
2226
2226
|
a = o;
|
|
2227
2227
|
break;
|
|
2228
|
-
} else if (
|
|
2229
|
-
const
|
|
2230
|
-
|
|
2231
|
-
} else if (
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2228
|
+
} else if (v === 10) {
|
|
2229
|
+
const D = c(s);
|
|
2230
|
+
D !== null && (i += D, r = i.length, s++);
|
|
2231
|
+
} else if (v === 92 && (o++, o < r && i.charCodeAt(o) === 10)) {
|
|
2232
|
+
const D = c(s);
|
|
2233
|
+
D !== null && (i += D, r = i.length, s++);
|
|
2234
2234
|
}
|
|
2235
2235
|
}
|
|
2236
2236
|
if (a < 0 || i.charCodeAt(a + 1) !== 58)
|
|
2237
2237
|
return !1;
|
|
2238
2238
|
for (o = a + 2; o < r; o++) {
|
|
2239
|
-
const
|
|
2240
|
-
if (
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2243
|
-
} else if (!J(
|
|
2239
|
+
const v = i.charCodeAt(o);
|
|
2240
|
+
if (v === 10) {
|
|
2241
|
+
const D = c(s);
|
|
2242
|
+
D !== null && (i += D, r = i.length, s++);
|
|
2243
|
+
} else if (!J(v)) break;
|
|
2244
2244
|
}
|
|
2245
2245
|
const l = e.md.helpers.parseLinkDestination(i, o, r);
|
|
2246
2246
|
if (!l.ok)
|
|
@@ -2251,36 +2251,36 @@ function Cs(e, u, t, n) {
|
|
|
2251
2251
|
o = l.pos;
|
|
2252
2252
|
const h = o, p = s, f = o;
|
|
2253
2253
|
for (; o < r; o++) {
|
|
2254
|
-
const
|
|
2255
|
-
if (
|
|
2256
|
-
const
|
|
2257
|
-
|
|
2258
|
-
} else if (!J(
|
|
2254
|
+
const v = i.charCodeAt(o);
|
|
2255
|
+
if (v === 10) {
|
|
2256
|
+
const D = c(s);
|
|
2257
|
+
D !== null && (i += D, r = i.length, s++);
|
|
2258
|
+
} else if (!J(v)) break;
|
|
2259
2259
|
}
|
|
2260
2260
|
let g = e.md.helpers.parseLinkTitle(i, o, r);
|
|
2261
2261
|
for (; g.can_continue; ) {
|
|
2262
|
-
const
|
|
2263
|
-
if (
|
|
2264
|
-
i +=
|
|
2265
|
-
}
|
|
2266
|
-
let
|
|
2267
|
-
for (o < r && f !== o && g.ok ? (
|
|
2268
|
-
const
|
|
2269
|
-
if (!J(
|
|
2262
|
+
const v = c(s);
|
|
2263
|
+
if (v === null) break;
|
|
2264
|
+
i += v, o = r, r = i.length, s++, g = e.md.helpers.parseLinkTitle(i, o, r, g);
|
|
2265
|
+
}
|
|
2266
|
+
let _;
|
|
2267
|
+
for (o < r && f !== o && g.ok ? (_ = g.str, o = g.pos) : (_ = "", o = h, s = p); o < r; ) {
|
|
2268
|
+
const v = i.charCodeAt(o);
|
|
2269
|
+
if (!J(v))
|
|
2270
2270
|
break;
|
|
2271
2271
|
o++;
|
|
2272
2272
|
}
|
|
2273
|
-
if (o < r && i.charCodeAt(o) !== 10 &&
|
|
2274
|
-
for (
|
|
2275
|
-
const
|
|
2276
|
-
if (!J(
|
|
2273
|
+
if (o < r && i.charCodeAt(o) !== 10 && _)
|
|
2274
|
+
for (_ = "", o = h, s = p; o < r; ) {
|
|
2275
|
+
const v = i.charCodeAt(o);
|
|
2276
|
+
if (!J(v))
|
|
2277
2277
|
break;
|
|
2278
2278
|
o++;
|
|
2279
2279
|
}
|
|
2280
2280
|
if (o < r && i.charCodeAt(o) !== 10)
|
|
2281
2281
|
return !1;
|
|
2282
|
-
const
|
|
2283
|
-
return
|
|
2282
|
+
const k = Bu(i.slice(1, a));
|
|
2283
|
+
return k ? (n || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[k] > "u" && (e.env.references[k] = { title: _, href: d }), e.line = s), !0) : !1;
|
|
2284
2284
|
}
|
|
2285
2285
|
const Ds = [
|
|
2286
2286
|
"address",
|
|
@@ -2804,8 +2804,8 @@ function Qs(e, u) {
|
|
|
2804
2804
|
}
|
|
2805
2805
|
if (!u) {
|
|
2806
2806
|
e.pos = h, e.posMax = p;
|
|
2807
|
-
const g = e.push("link_open", "a", 1),
|
|
2808
|
-
g.attrs =
|
|
2807
|
+
const g = e.push("link_open", "a", 1), _ = [["href", s]];
|
|
2808
|
+
g.attrs = _, c && _.push(["title", c]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
|
|
2809
2809
|
}
|
|
2810
2810
|
return e.pos = f, e.posMax = d, !0;
|
|
2811
2811
|
}
|
|
@@ -2848,8 +2848,8 @@ function ec(e, u) {
|
|
|
2848
2848
|
e.env,
|
|
2849
2849
|
g
|
|
2850
2850
|
);
|
|
2851
|
-
const
|
|
2852
|
-
|
|
2851
|
+
const _ = e.push("image", "img", 0), k = [["src", l], ["alt", ""]];
|
|
2852
|
+
_.attrs = k, _.children = g, _.content = n, i && k.push(["title", i]);
|
|
2853
2853
|
}
|
|
2854
2854
|
return e.pos = r, e.posMax = h, !0;
|
|
2855
2855
|
}
|
|
@@ -3682,7 +3682,7 @@ function Hc() {
|
|
|
3682
3682
|
const s = [], c = { children: [] };
|
|
3683
3683
|
let i = c;
|
|
3684
3684
|
return o.forEach((a) => {
|
|
3685
|
-
var
|
|
3685
|
+
var _, k, v, D, C, $, M, V, H, q, y;
|
|
3686
3686
|
const { type: l, children: d, content: h, attrs: p, tag: f, hidden: g } = a;
|
|
3687
3687
|
switch (l) {
|
|
3688
3688
|
case "heading_open":
|
|
@@ -3708,8 +3708,8 @@ function Hc() {
|
|
|
3708
3708
|
attrs: p ? Object.fromEntries(p) : {}
|
|
3709
3709
|
};
|
|
3710
3710
|
if (l === "link_open") {
|
|
3711
|
-
const A = a.attrGet("href") ?? "",
|
|
3712
|
-
A != null && A.startsWith("http") && !A.includes(
|
|
3711
|
+
const A = a.attrGet("href") ?? "", E = document.location.origin;
|
|
3712
|
+
A != null && A.startsWith("http") && !A.includes(E) && (x.attrs.target = "_blank", x.attrs.rel = "noopener noreferrer", x.attrs.dataOuter = "", (_ = x.children) == null || _.push({ tag: yo }));
|
|
3713
3713
|
}
|
|
3714
3714
|
if (l === "table_open") {
|
|
3715
3715
|
const A = {
|
|
@@ -3717,9 +3717,9 @@ function Hc() {
|
|
|
3717
3717
|
children: [],
|
|
3718
3718
|
attrs: { class: "sq-article-table" }
|
|
3719
3719
|
};
|
|
3720
|
-
(
|
|
3720
|
+
(k = i.children) == null || k.push(A), s.push(i), i = A;
|
|
3721
3721
|
}
|
|
3722
|
-
(
|
|
3722
|
+
(v = i.children) == null || v.push(x), s.push(i), i = x;
|
|
3723
3723
|
break;
|
|
3724
3724
|
}
|
|
3725
3725
|
case "heading_close":
|
|
@@ -3743,7 +3743,7 @@ function Hc() {
|
|
|
3743
3743
|
break;
|
|
3744
3744
|
}
|
|
3745
3745
|
case "code_inline": {
|
|
3746
|
-
(
|
|
3746
|
+
(D = i.children) == null || D.push({
|
|
3747
3747
|
tag: (r == null ? void 0 : r[f]) ?? f,
|
|
3748
3748
|
children: [h],
|
|
3749
3749
|
attrs: p ? Object.fromEntries(p) : {}
|
|
@@ -3753,7 +3753,7 @@ function Hc() {
|
|
|
3753
3753
|
case "inline": {
|
|
3754
3754
|
if (d) {
|
|
3755
3755
|
const x = n(d, r);
|
|
3756
|
-
(
|
|
3756
|
+
(C = i.children) == null || C.push(...x ?? []);
|
|
3757
3757
|
} else
|
|
3758
3758
|
($ = i.children) == null || $.push(h);
|
|
3759
3759
|
break;
|
|
@@ -3777,8 +3777,8 @@ function Hc() {
|
|
|
3777
3777
|
break;
|
|
3778
3778
|
}
|
|
3779
3779
|
case "input": {
|
|
3780
|
-
const x = p ? Object.fromEntries(p) : {}, A = x.type ?? "text",
|
|
3781
|
-
tag: (r == null ? void 0 : r[
|
|
3780
|
+
const x = p ? Object.fromEntries(p) : {}, A = x.type ?? "text", E = `${f}-${A}`, z = {
|
|
3781
|
+
tag: (r == null ? void 0 : r[E]) ?? f,
|
|
3782
3782
|
children: [],
|
|
3783
3783
|
attrs: x
|
|
3784
3784
|
};
|
|
@@ -3793,7 +3793,7 @@ function Hc() {
|
|
|
3793
3793
|
tag: (r == null ? void 0 : r[x]) ?? x,
|
|
3794
3794
|
children: []
|
|
3795
3795
|
};
|
|
3796
|
-
(
|
|
3796
|
+
(y = i.children) == null || y.push(A), s.push(i), i = A;
|
|
3797
3797
|
}
|
|
3798
3798
|
break;
|
|
3799
3799
|
}
|
|
@@ -3853,7 +3853,7 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3853
3853
|
}
|
|
3854
3854
|
},
|
|
3855
3855
|
setup(e) {
|
|
3856
|
-
const u =
|
|
3856
|
+
const u = w(() => ({
|
|
3857
3857
|
hr: Je,
|
|
3858
3858
|
blur: ri,
|
|
3859
3859
|
img: la,
|
|
@@ -3881,16 +3881,22 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3881
3881
|
size: { default: "md" }
|
|
3882
3882
|
},
|
|
3883
3883
|
setup(e) {
|
|
3884
|
-
const u = e, t = R(!0), n =
|
|
3884
|
+
const u = e, t = R(!0), n = w(() => {
|
|
3885
3885
|
const c = [];
|
|
3886
3886
|
return u.size !== "md" && c.push(`sq-avatar--${u.size}`), u.round && c.push("is-round"), c;
|
|
3887
|
-
}), o =
|
|
3887
|
+
}), o = w(() => {
|
|
3888
3888
|
if (!u.randomColor) return;
|
|
3889
3889
|
const { getRandomColor: c } = nr();
|
|
3890
3890
|
return {
|
|
3891
3891
|
"--avatar-bg-color": c()
|
|
3892
3892
|
};
|
|
3893
|
-
}), r =
|
|
3893
|
+
}), r = w(() => u.alt.charAt(0).toUpperCase());
|
|
3894
|
+
ie(
|
|
3895
|
+
() => u.img,
|
|
3896
|
+
() => {
|
|
3897
|
+
t.value = !0;
|
|
3898
|
+
}
|
|
3899
|
+
);
|
|
3894
3900
|
function s() {
|
|
3895
3901
|
t.value = !1;
|
|
3896
3902
|
}
|
|
@@ -3905,7 +3911,7 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3905
3911
|
onError: s
|
|
3906
3912
|
}, null, 40, Jc)) : (m(), S("span", {
|
|
3907
3913
|
key: 1,
|
|
3908
|
-
textContent:
|
|
3914
|
+
textContent: se(r.value)
|
|
3909
3915
|
}, null, 8, Kc))
|
|
3910
3916
|
], 6));
|
|
3911
3917
|
}
|
|
@@ -3921,7 +3927,7 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3921
3927
|
progressProps: {}
|
|
3922
3928
|
},
|
|
3923
3929
|
setup(e) {
|
|
3924
|
-
const { throttle: u } = jc(), t = u(i), n = new ResizeObserver(a), o = e, r = R(100), s = R(0), c =
|
|
3930
|
+
const { throttle: u } = jc(), t = u(i), n = new ResizeObserver(a), o = e, r = R(100), s = R(0), c = w(() => s.value > o.visibilityHeight);
|
|
3925
3931
|
be(() => {
|
|
3926
3932
|
var h;
|
|
3927
3933
|
a(), t(), window.addEventListener("scroll", t);
|
|
@@ -3987,10 +3993,10 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3987
3993
|
dot: { type: Boolean }
|
|
3988
3994
|
},
|
|
3989
3995
|
setup(e) {
|
|
3990
|
-
const u = hu(), t = e, n =
|
|
3996
|
+
const u = hu(), t = e, n = w(() => {
|
|
3991
3997
|
const c = [];
|
|
3992
3998
|
return t.dot && c.push("is-dot"), c.push(`is-${t.type}`), c;
|
|
3993
|
-
}), o =
|
|
3999
|
+
}), o = w(() => u.default ? "sup" : "div"), r = w(() => !t.dot && t.text || t.showZero ? !0 : t.count > 0), s = w(() => t.dot ? "" : t.text ? t.text : t.max && t.count > t.max ? `${t.max}+` : `${t.count}`);
|
|
3994
4000
|
return (c, i) => (m(), L(Re, { name: "sq-zoom" }, {
|
|
3995
4001
|
default: Z(() => [
|
|
3996
4002
|
b(u).default || r.value ? (m(), S("span", {
|
|
@@ -4008,7 +4014,7 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
4008
4014
|
r.value ? (m(), S("span", {
|
|
4009
4015
|
key: 0,
|
|
4010
4016
|
class: "sq-badge-label-inner",
|
|
4011
|
-
textContent:
|
|
4017
|
+
textContent: se(s.value)
|
|
4012
4018
|
}, null, 8, ti)) : U("", !0)
|
|
4013
4019
|
]),
|
|
4014
4020
|
_: 1
|
|
@@ -4034,9 +4040,9 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
4034
4040
|
}
|
|
4035
4041
|
});
|
|
4036
4042
|
function si(e) {
|
|
4037
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Tn, void 0), o =
|
|
4043
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Tn, void 0), o = w(
|
|
4038
4044
|
() => b(n) ? void 0 : e.text
|
|
4039
|
-
), r =
|
|
4045
|
+
), r = w(
|
|
4040
4046
|
() => {
|
|
4041
4047
|
var a, l;
|
|
4042
4048
|
return u(
|
|
@@ -4046,12 +4052,12 @@ function si(e) {
|
|
|
4046
4052
|
"md"
|
|
4047
4053
|
);
|
|
4048
4054
|
}
|
|
4049
|
-
), s =
|
|
4055
|
+
), s = w(
|
|
4050
4056
|
() => {
|
|
4051
4057
|
var a;
|
|
4052
4058
|
return u((a = b(n)) == null ? void 0 : a.type, e.type);
|
|
4053
4059
|
}
|
|
4054
|
-
), c =
|
|
4060
|
+
), c = w(
|
|
4055
4061
|
() => {
|
|
4056
4062
|
var a, l;
|
|
4057
4063
|
return u(
|
|
@@ -4060,7 +4066,7 @@ function si(e) {
|
|
|
4060
4066
|
(l = b(t)) == null ? void 0 : l.round
|
|
4061
4067
|
);
|
|
4062
4068
|
}
|
|
4063
|
-
), i =
|
|
4069
|
+
), i = w(
|
|
4064
4070
|
() => {
|
|
4065
4071
|
var a, l, d;
|
|
4066
4072
|
return u(
|
|
@@ -4074,7 +4080,7 @@ function si(e) {
|
|
|
4074
4080
|
return { btnTextType: o, btnSize: r, btnType: s, btnRound: c, btnDisabled: i };
|
|
4075
4081
|
}
|
|
4076
4082
|
function ci(e) {
|
|
4077
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Ln, void 0), o =
|
|
4083
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Ln, void 0), o = w(
|
|
4078
4084
|
() => {
|
|
4079
4085
|
var a, l;
|
|
4080
4086
|
return u(
|
|
@@ -4084,22 +4090,22 @@ function ci(e) {
|
|
|
4084
4090
|
"md"
|
|
4085
4091
|
);
|
|
4086
4092
|
}
|
|
4087
|
-
), r =
|
|
4093
|
+
), r = w(
|
|
4088
4094
|
() => {
|
|
4089
4095
|
var a;
|
|
4090
4096
|
return u((a = b(n)) == null ? void 0 : a.form, e.form);
|
|
4091
4097
|
}
|
|
4092
|
-
), s =
|
|
4098
|
+
), s = w(
|
|
4093
4099
|
() => {
|
|
4094
4100
|
var a;
|
|
4095
4101
|
return u((a = b(n)) == null ? void 0 : a.name, e.name);
|
|
4096
4102
|
}
|
|
4097
|
-
), c =
|
|
4103
|
+
), c = w(
|
|
4098
4104
|
() => {
|
|
4099
4105
|
var a;
|
|
4100
4106
|
return u((a = b(n)) == null ? void 0 : a.variant, e.variant);
|
|
4101
4107
|
}
|
|
4102
|
-
), i =
|
|
4108
|
+
), i = w(
|
|
4103
4109
|
() => {
|
|
4104
4110
|
var a, l, d;
|
|
4105
4111
|
return u(
|
|
@@ -4120,22 +4126,22 @@ function ci(e) {
|
|
|
4120
4126
|
};
|
|
4121
4127
|
}
|
|
4122
4128
|
function ii(e) {
|
|
4123
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(mt, void 0), o =
|
|
4129
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(mt, void 0), o = w(
|
|
4124
4130
|
() => {
|
|
4125
4131
|
var i;
|
|
4126
4132
|
return u(e.size, (i = b(t)) == null ? void 0 : i.size, "md");
|
|
4127
4133
|
}
|
|
4128
|
-
), r =
|
|
4134
|
+
), r = w(
|
|
4129
4135
|
() => {
|
|
4130
4136
|
var i;
|
|
4131
4137
|
return u(e.round, (i = b(t)) == null ? void 0 : i.round);
|
|
4132
4138
|
}
|
|
4133
|
-
), s =
|
|
4139
|
+
), s = w(
|
|
4134
4140
|
() => {
|
|
4135
4141
|
var i;
|
|
4136
4142
|
return u((i = b(t)) == null ? void 0 : i.disabled, e.disabled);
|
|
4137
4143
|
}
|
|
4138
|
-
), c =
|
|
4144
|
+
), c = w(
|
|
4139
4145
|
() => {
|
|
4140
4146
|
var i;
|
|
4141
4147
|
return u((i = b(t)) == null ? void 0 : i.readonly, e.readonly);
|
|
@@ -4144,7 +4150,7 @@ function ii(e) {
|
|
|
4144
4150
|
return { inputSize: o, inputRound: r, inputDisabled: s, inputReadonly: c, id: n };
|
|
4145
4151
|
}
|
|
4146
4152
|
function ai(e) {
|
|
4147
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Qn, void 0), o =
|
|
4153
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Qn, void 0), o = w(
|
|
4148
4154
|
() => {
|
|
4149
4155
|
var a, l;
|
|
4150
4156
|
return u(
|
|
@@ -4154,22 +4160,22 @@ function ai(e) {
|
|
|
4154
4160
|
"md"
|
|
4155
4161
|
);
|
|
4156
4162
|
}
|
|
4157
|
-
), r =
|
|
4163
|
+
), r = w(
|
|
4158
4164
|
() => {
|
|
4159
4165
|
var a;
|
|
4160
4166
|
return u((a = b(n)) == null ? void 0 : a.form, e.form);
|
|
4161
4167
|
}
|
|
4162
|
-
), s =
|
|
4168
|
+
), s = w(
|
|
4163
4169
|
() => {
|
|
4164
4170
|
var a;
|
|
4165
4171
|
return u((a = b(n)) == null ? void 0 : a.name, e.name);
|
|
4166
4172
|
}
|
|
4167
|
-
), c =
|
|
4173
|
+
), c = w(
|
|
4168
4174
|
() => {
|
|
4169
4175
|
var a;
|
|
4170
4176
|
return u((a = b(n)) == null ? void 0 : a.variant, e.variant);
|
|
4171
4177
|
}
|
|
4172
|
-
), i =
|
|
4178
|
+
), i = w(
|
|
4173
4179
|
() => {
|
|
4174
4180
|
var a, l, d;
|
|
4175
4181
|
return u(
|
|
@@ -4192,7 +4198,7 @@ function ai(e) {
|
|
|
4192
4198
|
function li(e) {
|
|
4193
4199
|
const { getOption: u } = ou(), t = _e(e0, void 0);
|
|
4194
4200
|
return {
|
|
4195
|
-
segmentedDisabled:
|
|
4201
|
+
segmentedDisabled: w(
|
|
4196
4202
|
() => {
|
|
4197
4203
|
var o;
|
|
4198
4204
|
return u((o = b(t)) == null ? void 0 : o.disabled, e.disabled);
|
|
@@ -4202,12 +4208,12 @@ function li(e) {
|
|
|
4202
4208
|
};
|
|
4203
4209
|
}
|
|
4204
4210
|
function di(e) {
|
|
4205
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(mt, void 0), o =
|
|
4211
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(mt, void 0), o = w(
|
|
4206
4212
|
() => {
|
|
4207
4213
|
var s;
|
|
4208
4214
|
return u(e.size, (s = b(t)) == null ? void 0 : s.size, "md");
|
|
4209
4215
|
}
|
|
4210
|
-
), r =
|
|
4216
|
+
), r = w(
|
|
4211
4217
|
() => {
|
|
4212
4218
|
var s, c;
|
|
4213
4219
|
return u(
|
|
@@ -4236,10 +4242,10 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4236
4242
|
},
|
|
4237
4243
|
emits: ["click"],
|
|
4238
4244
|
setup(e, { emit: u }) {
|
|
4239
|
-
const t = u, n = e, { btnTextType: o, btnSize: r, btnType: s, btnRound: c, btnDisabled: i } = si(n), a =
|
|
4240
|
-
const h = [], p = b(r), f = b(s), g = b(c),
|
|
4241
|
-
return p !== "md" && h.push(`sq-button--${p}`), f && h.push(`is-${f}`), g && h.push("is-round"),
|
|
4242
|
-
}), l =
|
|
4245
|
+
const t = u, n = e, { btnTextType: o, btnSize: r, btnType: s, btnRound: c, btnDisabled: i } = si(n), a = w(() => {
|
|
4246
|
+
const h = [], p = b(r), f = b(s), g = b(c), _ = b(o);
|
|
4247
|
+
return p !== "md" && h.push(`sq-button--${p}`), f && h.push(`is-${f}`), g && h.push("is-round"), _ && h.push("is-text"), _ && n.bg && h.push("has-bg"), h;
|
|
4248
|
+
}), l = w(() => n.loading ? Su : n.icon), d = w(() => n.loading || b(i));
|
|
4243
4249
|
return (h, p) => (m(), S("button", {
|
|
4244
4250
|
class: K(["sq-button", a.value]),
|
|
4245
4251
|
disabled: d.value,
|
|
@@ -4272,10 +4278,10 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4272
4278
|
return nu(
|
|
4273
4279
|
Tn,
|
|
4274
4280
|
R({
|
|
4275
|
-
size:
|
|
4276
|
-
type:
|
|
4277
|
-
round:
|
|
4278
|
-
disabled:
|
|
4281
|
+
size: re(u, "size"),
|
|
4282
|
+
type: re(u, "type"),
|
|
4283
|
+
round: re(u, "round"),
|
|
4284
|
+
disabled: re(u, "disabled")
|
|
4279
4285
|
})
|
|
4280
4286
|
), (t, n) => (m(), S("div", hi, [
|
|
4281
4287
|
j(t.$slots, "default")
|
|
@@ -4300,7 +4306,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4300
4306
|
t.title || b(u).title ? (m(), S("div", xi, [
|
|
4301
4307
|
F("h2", {
|
|
4302
4308
|
class: K({ "has-decorative": t.decorative }),
|
|
4303
|
-
textContent:
|
|
4309
|
+
textContent: se(t.title)
|
|
4304
4310
|
}, null, 10, gi),
|
|
4305
4311
|
j(n.$slots, "title")
|
|
4306
4312
|
])) : U("", !0),
|
|
@@ -4313,7 +4319,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4313
4319
|
}), ki = ["autofocus", "name", "form", "value", "disabled"], yi = ["textContent"], wi = "sq-checkbox", Rn = /* @__PURE__ */ O({
|
|
4314
4320
|
name: wi,
|
|
4315
4321
|
__name: "checkbox",
|
|
4316
|
-
props: /* @__PURE__ */
|
|
4322
|
+
props: /* @__PURE__ */ ue({
|
|
4317
4323
|
form: {},
|
|
4318
4324
|
name: {},
|
|
4319
4325
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -4327,7 +4333,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4327
4333
|
checked: { type: Boolean, default: !1 },
|
|
4328
4334
|
checkedModifiers: {}
|
|
4329
4335
|
}),
|
|
4330
|
-
emits: /* @__PURE__ */
|
|
4336
|
+
emits: /* @__PURE__ */ ue(["change"], ["update:checked"]),
|
|
4331
4337
|
setup(e, { emit: u }) {
|
|
4332
4338
|
const t = u, n = e, {
|
|
4333
4339
|
checkboxSize: o,
|
|
@@ -4336,10 +4342,10 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4336
4342
|
checkboxName: c,
|
|
4337
4343
|
checkboxVariant: i,
|
|
4338
4344
|
groupContext: a
|
|
4339
|
-
} = ci(n), l = ae(e, "checked"), d =
|
|
4340
|
-
const p = [], f = b(o), g = b(r),
|
|
4341
|
-
return f !== "md" && p.push(`sq-selection--${f}`), h.value && p.push("is-checked"), g && p.push("is-disabled"),
|
|
4342
|
-
}), h =
|
|
4345
|
+
} = ci(n), l = ae(e, "checked"), d = w(() => {
|
|
4346
|
+
const p = [], f = b(o), g = b(r), _ = b(i);
|
|
4347
|
+
return f !== "md" && p.push(`sq-selection--${f}`), h.value && p.push("is-checked"), g && p.push("is-disabled"), _ && p.push(`is-${_}`), p;
|
|
4348
|
+
}), h = w(() => a ? b(a).list.includes(n.value) : l.value);
|
|
4343
4349
|
return ie(h, (p) => {
|
|
4344
4350
|
if (l.value !== p) {
|
|
4345
4351
|
l.value = p;
|
|
@@ -4376,7 +4382,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4376
4382
|
n.label ? (m(), S("span", {
|
|
4377
4383
|
key: 1,
|
|
4378
4384
|
class: "sq-selection-label",
|
|
4379
|
-
textContent:
|
|
4385
|
+
textContent: se(n.label)
|
|
4380
4386
|
}, null, 8, yi)) : U("", !0)
|
|
4381
4387
|
], 2));
|
|
4382
4388
|
}
|
|
@@ -4394,15 +4400,15 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4394
4400
|
},
|
|
4395
4401
|
emits: ["change", "update:value"],
|
|
4396
4402
|
setup(e, { emit: u }) {
|
|
4397
|
-
const { nextId: t } = qu(), n = u, o = e, r = R(o.value ?? []), s =
|
|
4403
|
+
const { nextId: t } = qu(), n = u, o = e, r = R(o.value ?? []), s = w(() => o.name ?? `sq-checkbox-${t()}`);
|
|
4398
4404
|
nu(
|
|
4399
4405
|
Ln,
|
|
4400
4406
|
R({
|
|
4401
|
-
form:
|
|
4407
|
+
form: re(o, "form"),
|
|
4402
4408
|
name: s,
|
|
4403
|
-
disabled:
|
|
4404
|
-
size:
|
|
4405
|
-
variant:
|
|
4409
|
+
disabled: re(o, "disabled"),
|
|
4410
|
+
size: re(o, "size"),
|
|
4411
|
+
variant: re(o, "variant"),
|
|
4406
4412
|
list: r,
|
|
4407
4413
|
toggleItem: c
|
|
4408
4414
|
})
|
|
@@ -4430,53 +4436,59 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4430
4436
|
name: Ai,
|
|
4431
4437
|
inheritAttrs: !1,
|
|
4432
4438
|
__name: "mask",
|
|
4433
|
-
props: /* @__PURE__ */
|
|
4439
|
+
props: /* @__PURE__ */ ue({
|
|
4434
4440
|
keyboard: { type: Boolean, default: !0 },
|
|
4435
4441
|
maskCloseable: { type: Boolean },
|
|
4436
|
-
|
|
4442
|
+
beforeClose: {}
|
|
4437
4443
|
}, {
|
|
4438
4444
|
visible: { type: Boolean, default: !1 },
|
|
4439
4445
|
visibleModifiers: {}
|
|
4440
4446
|
}),
|
|
4441
|
-
emits: ["update:visible"],
|
|
4442
|
-
setup(e) {
|
|
4443
|
-
const { nextZIndex:
|
|
4444
|
-
let
|
|
4445
|
-
const
|
|
4446
|
-
|
|
4447
|
-
const
|
|
4448
|
-
|
|
4447
|
+
emits: /* @__PURE__ */ ue(["open", "opened", "close", "closed"], ["update:visible"]),
|
|
4448
|
+
setup(e, { emit: u }) {
|
|
4449
|
+
const { nextZIndex: t } = ct();
|
|
4450
|
+
let n;
|
|
4451
|
+
const o = u, r = e, s = R(0), c = R(!1), i = ae(e, "visible");
|
|
4452
|
+
c.value = i.value, ie(i, (h) => {
|
|
4453
|
+
const p = document.scrollingElement;
|
|
4454
|
+
h ? (n = p.style.overflow, p.style.overflow = "hidden", s.value = t(), c.value = !0, document.addEventListener("keydown", a)) : (p.style.overflow = n, document.removeEventListener("keydown", a));
|
|
4449
4455
|
}), Ue(() => {
|
|
4450
|
-
document.removeEventListener("keydown",
|
|
4456
|
+
document.removeEventListener("keydown", a);
|
|
4451
4457
|
});
|
|
4452
|
-
function
|
|
4453
|
-
|
|
4458
|
+
function a(h) {
|
|
4459
|
+
h.key === "Escape" && r.keyboard && d();
|
|
4454
4460
|
}
|
|
4455
|
-
function
|
|
4456
|
-
|
|
4461
|
+
function l() {
|
|
4462
|
+
r.maskCloseable && d();
|
|
4457
4463
|
}
|
|
4458
|
-
function
|
|
4459
|
-
if (typeof
|
|
4460
|
-
|
|
4464
|
+
function d() {
|
|
4465
|
+
if (typeof r.beforeClose != "function") {
|
|
4466
|
+
i.value = !1;
|
|
4461
4467
|
return;
|
|
4462
4468
|
}
|
|
4463
|
-
const
|
|
4464
|
-
|
|
4465
|
-
|
|
4469
|
+
const h = r.beforeClose();
|
|
4470
|
+
h instanceof Promise ? h.then((p) => {
|
|
4471
|
+
p && (i.value = !1);
|
|
4466
4472
|
}).catch(() => {
|
|
4467
|
-
}) :
|
|
4468
|
-
}
|
|
4469
|
-
return (
|
|
4470
|
-
T(Re, {
|
|
4473
|
+
}) : h && (i.value = !1);
|
|
4474
|
+
}
|
|
4475
|
+
return (h, p) => (m(), L(Qt, { to: "body" }, [
|
|
4476
|
+
T(Re, {
|
|
4477
|
+
name: "sq-fade",
|
|
4478
|
+
onBeforeEnter: p[0] || (p[0] = (f) => o("open")),
|
|
4479
|
+
onAfterEnter: p[1] || (p[1] = (f) => o("opened")),
|
|
4480
|
+
onBeforeLeave: p[2] || (p[2] = (f) => o("close")),
|
|
4481
|
+
onAfterLeave: p[3] || (p[3] = (f) => o("closed"))
|
|
4482
|
+
}, {
|
|
4471
4483
|
default: Z(() => [
|
|
4472
|
-
|
|
4484
|
+
c.value ? fe((m(), S("div", qe({
|
|
4473
4485
|
key: 0,
|
|
4474
4486
|
class: "sq-mask",
|
|
4475
|
-
style: { zIndex:
|
|
4476
|
-
},
|
|
4477
|
-
j(
|
|
4487
|
+
style: { zIndex: s.value }
|
|
4488
|
+
}, h.$attrs, { onClick: l }), [
|
|
4489
|
+
j(h.$slots, "default")
|
|
4478
4490
|
], 16)), [
|
|
4479
|
-
[He,
|
|
4491
|
+
[He, i.value]
|
|
4480
4492
|
]) : U("", !0)
|
|
4481
4493
|
]),
|
|
4482
4494
|
_: 3
|
|
@@ -4493,7 +4505,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4493
4505
|
name: Bi,
|
|
4494
4506
|
inheritAttrs: !1,
|
|
4495
4507
|
__name: "dialog",
|
|
4496
|
-
props: /* @__PURE__ */
|
|
4508
|
+
props: /* @__PURE__ */ ue({
|
|
4497
4509
|
type: {},
|
|
4498
4510
|
title: {},
|
|
4499
4511
|
okText: { default: "确认" },
|
|
@@ -4505,82 +4517,86 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4505
4517
|
onOk: {},
|
|
4506
4518
|
keyboard: { type: Boolean, default: void 0 },
|
|
4507
4519
|
maskCloseable: { type: Boolean, default: void 0 },
|
|
4508
|
-
|
|
4520
|
+
beforeClose: {}
|
|
4509
4521
|
}, {
|
|
4510
4522
|
visible: { type: Boolean, default: !1 },
|
|
4511
4523
|
visibleModifiers: {}
|
|
4512
4524
|
}),
|
|
4513
|
-
emits: ["update:visible"],
|
|
4514
|
-
setup(e) {
|
|
4515
|
-
const
|
|
4516
|
-
const
|
|
4517
|
-
return
|
|
4518
|
-
}),
|
|
4519
|
-
type:
|
|
4520
|
-
loading:
|
|
4521
|
-
disabled:
|
|
4522
|
-
...
|
|
4523
|
-
})),
|
|
4525
|
+
emits: /* @__PURE__ */ ue(["open", "opened", "close", "closed"], ["update:visible"]),
|
|
4526
|
+
setup(e, { emit: u }) {
|
|
4527
|
+
const t = hu(), n = u, o = e, r = R(!1), s = R(!1), c = ae(e, "visible"), i = w(() => !!o.title || !!t.header), a = w(() => {
|
|
4528
|
+
const k = [];
|
|
4529
|
+
return o.type && k.push(`is-${o.type}`), i.value && k.push("has-header"), k;
|
|
4530
|
+
}), l = w(() => o.type ? st[o.type] : void 0), d = w(() => ({
|
|
4531
|
+
type: o.type ?? "primary",
|
|
4532
|
+
loading: r.value && s.value,
|
|
4533
|
+
disabled: r.value && !s.value,
|
|
4534
|
+
...o.okButtonProps
|
|
4535
|
+
})), h = w(() => ({
|
|
4524
4536
|
text: !0,
|
|
4525
4537
|
bg: !0,
|
|
4526
|
-
loading:
|
|
4527
|
-
disabled:
|
|
4528
|
-
...
|
|
4529
|
-
})),
|
|
4530
|
-
() =>
|
|
4538
|
+
loading: r.value && !s.value,
|
|
4539
|
+
disabled: r.value && s.value,
|
|
4540
|
+
...o.cancelButtonProps
|
|
4541
|
+
})), p = w(
|
|
4542
|
+
() => d.value.loading || h.value.loading || !c.value
|
|
4531
4543
|
);
|
|
4532
|
-
function
|
|
4533
|
-
if (
|
|
4534
|
-
if (typeof
|
|
4535
|
-
const v =
|
|
4536
|
-
return v instanceof Promise ? (
|
|
4537
|
-
|
|
4544
|
+
function f(k) {
|
|
4545
|
+
if (p.value) return !1;
|
|
4546
|
+
if (typeof k != "function") return !0;
|
|
4547
|
+
const v = k();
|
|
4548
|
+
return v instanceof Promise ? (r.value = !0, v.finally(() => {
|
|
4549
|
+
r.value = !1;
|
|
4538
4550
|
})) : v;
|
|
4539
4551
|
}
|
|
4540
|
-
async function
|
|
4541
|
-
if (
|
|
4542
|
-
|
|
4543
|
-
}
|
|
4544
|
-
async function
|
|
4545
|
-
|
|
4546
|
-
}
|
|
4547
|
-
return (
|
|
4548
|
-
visible:
|
|
4549
|
-
"onUpdate:visible": v[0] || (v[0] = (
|
|
4550
|
-
|
|
4552
|
+
async function g() {
|
|
4553
|
+
if (p.value) return !1;
|
|
4554
|
+
s.value = !1, await f(o.beforeClose) && (c.value = !1);
|
|
4555
|
+
}
|
|
4556
|
+
async function _() {
|
|
4557
|
+
s.value = !0, await f(o.onOk) && (c.value = !1);
|
|
4558
|
+
}
|
|
4559
|
+
return (k, v) => (m(), L(b(In), {
|
|
4560
|
+
visible: c.value,
|
|
4561
|
+
"onUpdate:visible": v[0] || (v[0] = (D) => c.value = D),
|
|
4562
|
+
"before-close": () => f(o.beforeClose),
|
|
4563
|
+
onOpen: v[1] || (v[1] = (D) => n("open")),
|
|
4564
|
+
onOpened: v[2] || (v[2] = (D) => n("opened")),
|
|
4565
|
+
onClose: v[3] || (v[3] = (D) => n("close")),
|
|
4566
|
+
onClosed: v[4] || (v[4] = (D) => n("closed"))
|
|
4551
4567
|
}, {
|
|
4552
4568
|
default: Z(() => [
|
|
4553
|
-
F("div", qe({ class: "sq-dialog" },
|
|
4554
|
-
|
|
4555
|
-
|
|
4569
|
+
F("div", qe({ class: "sq-dialog" }, k.$attrs, { class: a.value }), [
|
|
4570
|
+
i.value ? (m(), S("div", Fi, [
|
|
4571
|
+
l.value ? (m(), L(me(l.value), {
|
|
4556
4572
|
key: 0,
|
|
4557
4573
|
class: "sq-dialog-header-icon"
|
|
4558
4574
|
})) : U("", !0),
|
|
4559
|
-
j(
|
|
4575
|
+
j(k.$slots, "header", {}, () => [
|
|
4560
4576
|
F("span", {
|
|
4561
4577
|
class: "sq-dialog-header-title",
|
|
4562
|
-
textContent:
|
|
4578
|
+
textContent: se(o.title)
|
|
4563
4579
|
}, null, 8, Si)
|
|
4564
4580
|
]),
|
|
4565
4581
|
T(b(rt), {
|
|
4566
4582
|
class: "sq-dialog-close",
|
|
4567
|
-
onClick:
|
|
4583
|
+
onClick: g
|
|
4568
4584
|
})
|
|
4569
4585
|
])) : U("", !0),
|
|
4570
4586
|
F("div", qi, [
|
|
4571
|
-
j(
|
|
4587
|
+
j(k.$slots, "default")
|
|
4572
4588
|
]),
|
|
4573
|
-
|
|
4574
|
-
j(
|
|
4575
|
-
T(b(Q), qe(
|
|
4589
|
+
o.footer ? (m(), S("div", $i, [
|
|
4590
|
+
j(k.$slots, "footer", {}, () => [
|
|
4591
|
+
T(b(Q), qe(h.value, { onClick: g }), {
|
|
4576
4592
|
default: Z(() => [
|
|
4577
|
-
iu(
|
|
4593
|
+
iu(se(o.cancelText), 1)
|
|
4578
4594
|
]),
|
|
4579
4595
|
_: 1
|
|
4580
4596
|
}, 16),
|
|
4581
|
-
T(b(Q), qe(
|
|
4597
|
+
T(b(Q), qe(d.value, { onClick: _ }), {
|
|
4582
4598
|
default: Z(() => [
|
|
4583
|
-
iu(
|
|
4599
|
+
iu(se(o.okText), 1)
|
|
4584
4600
|
]),
|
|
4585
4601
|
_: 1
|
|
4586
4602
|
}, 16)
|
|
@@ -4589,7 +4605,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4589
4605
|
], 16)
|
|
4590
4606
|
]),
|
|
4591
4607
|
_: 3
|
|
4592
|
-
}, 8, ["visible"]));
|
|
4608
|
+
}, 8, ["visible", "before-close"]));
|
|
4593
4609
|
}
|
|
4594
4610
|
}), Mi = "sq-divider", Je = /* @__PURE__ */ O({
|
|
4595
4611
|
name: Mi,
|
|
@@ -4602,7 +4618,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4602
4618
|
size: {}
|
|
4603
4619
|
},
|
|
4604
4620
|
setup(e) {
|
|
4605
|
-
const u = hu(), t = e, n =
|
|
4621
|
+
const u = hu(), t = e, n = w(() => {
|
|
4606
4622
|
const o = [];
|
|
4607
4623
|
return ["none", "solid", "dotted", "dashed"].includes(t.variant) && o.push("is-thin"), u.default && t.direction !== "vertical" && o.push(`text-${t.orientation}`), o.push(`sq-divider--${t.direction}`), o;
|
|
4608
4624
|
});
|
|
@@ -4904,13 +4920,13 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4904
4920
|
let h = 1;
|
|
4905
4921
|
if (r(l)) {
|
|
4906
4922
|
d && s(d) && (h = parseInt(c(d)) + 1);
|
|
4907
|
-
const g = `${h}. `,
|
|
4908
|
-
a[i] = l.replace("- ", g), t("updateText", a,
|
|
4923
|
+
const g = `${h}. `, _ = g.length - 2;
|
|
4924
|
+
a[i] = l.replace("- ", g), t("updateText", a, _, _);
|
|
4909
4925
|
return;
|
|
4910
4926
|
}
|
|
4911
4927
|
if (s(l)) {
|
|
4912
|
-
const g = c(l),
|
|
4913
|
-
a[i] = l.replace(g, ""), t("updateText", a,
|
|
4928
|
+
const g = c(l), _ = -g.length;
|
|
4929
|
+
a[i] = l.replace(g, ""), t("updateText", a, _, _);
|
|
4914
4930
|
return;
|
|
4915
4931
|
}
|
|
4916
4932
|
d && s(d) && (h = parseInt(c(d)) + 1);
|
|
@@ -4944,7 +4960,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4944
4960
|
}), Gi = { class: "sq-editor-body" }, Xi = { class: "sq-editor-toolbar" }, Yi = { class: "sq-editor-control" }, Ji = "sq-editor", D1 = /* @__PURE__ */ O({
|
|
4945
4961
|
name: Ji,
|
|
4946
4962
|
__name: "editor",
|
|
4947
|
-
props: /* @__PURE__ */
|
|
4963
|
+
props: /* @__PURE__ */ ue({
|
|
4948
4964
|
round: { type: Boolean },
|
|
4949
4965
|
disabled: { type: Boolean },
|
|
4950
4966
|
placeholder: {},
|
|
@@ -4971,15 +4987,15 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4971
4987
|
let t;
|
|
4972
4988
|
const n = e, o = R("edit"), r = R([]), s = R(!1), c = R(""), i = R(), a = R({}), l = de(null), d = de(null), h = de(null), p = de(
|
|
4973
4989
|
null
|
|
4974
|
-
), f = ae(e, "value"), g =
|
|
4990
|
+
), f = ae(e, "value"), g = w(() => {
|
|
4975
4991
|
const A = [];
|
|
4976
4992
|
return n.size !== "md" && A.push(`sq-editor--${n.size}`), n.round && A.push("is-round"), A;
|
|
4977
|
-
}),
|
|
4993
|
+
}), _ = w(
|
|
4978
4994
|
() => c.value.length && !c.value.includes(`
|
|
4979
4995
|
`) && c.value !== " " && !n.disabled
|
|
4980
|
-
),
|
|
4996
|
+
), k = w(
|
|
4981
4997
|
() => i.value !== void 0 && !c.value.length && !n.disabled
|
|
4982
|
-
),
|
|
4998
|
+
), v = w(
|
|
4983
4999
|
() => typeof n.beforePreview == "function" ? n.beforePreview(f.value) : f.value
|
|
4984
5000
|
);
|
|
4985
5001
|
be(() => {
|
|
@@ -4987,18 +5003,18 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4987
5003
|
}), Ue(() => {
|
|
4988
5004
|
document.removeEventListener("selectionchange", $), document.removeEventListener("click", M);
|
|
4989
5005
|
});
|
|
4990
|
-
function
|
|
5006
|
+
function D(A) {
|
|
4991
5007
|
A === "edit" && Ku(() => {
|
|
4992
|
-
var
|
|
4993
|
-
(
|
|
5008
|
+
var E;
|
|
5009
|
+
(E = l.value) == null || E.focus();
|
|
4994
5010
|
});
|
|
4995
5011
|
}
|
|
4996
|
-
function
|
|
5012
|
+
function C(A) {
|
|
4997
5013
|
var W, G, I;
|
|
4998
|
-
const
|
|
5014
|
+
const E = r.value[i.value], z = (E == null ? void 0 : E.replace(" ", "")) ?? "";
|
|
4999
5015
|
if (A.key === "Tab") {
|
|
5000
5016
|
A.preventDefault();
|
|
5001
|
-
const P =
|
|
5017
|
+
const P = E.substring(0, a.value.startOfRow), B = E.substring(a.value.endOfRow);
|
|
5002
5018
|
r.value[i.value] = `${P} ${B}`, x(r.value, 1, 1);
|
|
5003
5019
|
return;
|
|
5004
5020
|
}
|
|
@@ -5015,38 +5031,38 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
5015
5031
|
return;
|
|
5016
5032
|
}
|
|
5017
5033
|
if (A.key === "Enter") {
|
|
5018
|
-
if (q(
|
|
5034
|
+
if (q(E)) {
|
|
5019
5035
|
A.preventDefault();
|
|
5020
|
-
const P =
|
|
5036
|
+
const P = E.substring(0, E.indexOf("- "));
|
|
5021
5037
|
if (z !== "- ") {
|
|
5022
5038
|
const N = 3 + P.length;
|
|
5023
|
-
r.value[i.value] = `${
|
|
5039
|
+
r.value[i.value] = `${E}
|
|
5024
5040
|
${P}- `, V(A.target), x(r.value, N, N);
|
|
5025
5041
|
return;
|
|
5026
5042
|
}
|
|
5027
5043
|
const B = 2 + P.length;
|
|
5028
|
-
r.value[i.value] =
|
|
5044
|
+
r.value[i.value] = E.substring(B), x(r.value, -B, -B);
|
|
5029
5045
|
return;
|
|
5030
5046
|
}
|
|
5031
|
-
if (
|
|
5047
|
+
if (y(E)) {
|
|
5032
5048
|
A.preventDefault();
|
|
5033
|
-
const P = z.match(/^\d+\.\s/)[0], N = `${parseInt(P) + 1}. `, Y =
|
|
5049
|
+
const P = z.match(/^\d+\.\s/)[0], N = `${parseInt(P) + 1}. `, Y = E.substring(0, E.indexOf(P));
|
|
5034
5050
|
if (z !== P) {
|
|
5035
5051
|
const Pe = N.length + Y.length + 1;
|
|
5036
|
-
r.value[i.value] = `${
|
|
5052
|
+
r.value[i.value] = `${E}
|
|
5037
5053
|
${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
5038
5054
|
return;
|
|
5039
5055
|
}
|
|
5040
|
-
const
|
|
5041
|
-
r.value[i.value] =
|
|
5056
|
+
const te = P.length + Y.length;
|
|
5057
|
+
r.value[i.value] = E.substring(te), x(r.value, -te, -te);
|
|
5042
5058
|
return;
|
|
5043
5059
|
}
|
|
5044
5060
|
}
|
|
5045
5061
|
}
|
|
5046
5062
|
function $(A) {
|
|
5047
5063
|
var z;
|
|
5048
|
-
const
|
|
5049
|
-
(
|
|
5064
|
+
const E = window.getSelection();
|
|
5065
|
+
(E == null ? void 0 : E.focusNode) === ((z = l.value) == null ? void 0 : z.$el) && (t = A.target, !((t == null ? void 0 : t.selectionStart) === void 0 || (t == null ? void 0 : t.selectionEnd) === void 0) && (a.value.start = (t == null ? void 0 : t.selectionStart) ?? 0, a.value.end = (t == null ? void 0 : t.selectionEnd) ?? 0, c.value = f.value.substring(
|
|
5050
5066
|
a.value.start,
|
|
5051
5067
|
a.value.end
|
|
5052
5068
|
), H()));
|
|
@@ -5055,17 +5071,17 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5055
5071
|
c.value = "", i.value = void 0;
|
|
5056
5072
|
}
|
|
5057
5073
|
function V(A) {
|
|
5058
|
-
const
|
|
5074
|
+
const E = A.selectionStart, W = f.value.substring(0, E ?? 0).split(`
|
|
5059
5075
|
`).length + 1, G = A.scrollTop, I = window.getComputedStyle(A), P = parseFloat(I.lineHeight), B = parseFloat(I.height), Y = parseFloat(I.paddingBlockStart) + P * W;
|
|
5060
5076
|
B + G > Y || requestAnimationFrame(() => {
|
|
5061
5077
|
A.scrollTo({ top: Y - B });
|
|
5062
5078
|
});
|
|
5063
5079
|
}
|
|
5064
5080
|
function H() {
|
|
5065
|
-
const A = t.selectionStart,
|
|
5066
|
-
i.value =
|
|
5081
|
+
const A = t.selectionStart, E = f.value.substring(0, A ?? 0);
|
|
5082
|
+
i.value = E.split(`
|
|
5067
5083
|
`).length - 1;
|
|
5068
|
-
const z = Math.max(
|
|
5084
|
+
const z = Math.max(E.lastIndexOf(`
|
|
5069
5085
|
`) + 1, 0);
|
|
5070
5086
|
a.value.startOfRow = a.value.start - z, a.value.endOfRow = a.value.startOfRow + c.value.length, r.value = f.value.split(`
|
|
5071
5087
|
`);
|
|
@@ -5073,20 +5089,20 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5073
5089
|
function q(A) {
|
|
5074
5090
|
return A.replace(" ", "").startsWith("- ");
|
|
5075
5091
|
}
|
|
5076
|
-
function
|
|
5092
|
+
function y(A) {
|
|
5077
5093
|
return /^\d+\.\s+/.test(A.replace(" ", ""));
|
|
5078
5094
|
}
|
|
5079
|
-
function x(A,
|
|
5095
|
+
function x(A, E = 0, z = 0) {
|
|
5080
5096
|
s.value || (r.value = [...A], f.value = r.value.join(`
|
|
5081
|
-
`), a.value.start +=
|
|
5097
|
+
`), a.value.start += E, a.value.end += z, a.value.startOfRow += E, a.value.endOfRow += z, t == null || t.focus(), s.value = !0, Ku(() => {
|
|
5082
5098
|
t == null || t.setSelectionRange(a.value.start, a.value.end), setTimeout(() => {
|
|
5083
5099
|
s.value = !1;
|
|
5084
5100
|
}, 100);
|
|
5085
5101
|
}));
|
|
5086
5102
|
}
|
|
5087
|
-
return (A,
|
|
5103
|
+
return (A, E) => (m(), S("div", {
|
|
5088
5104
|
class: K(["sq-editor", g.value]),
|
|
5089
|
-
onClick:
|
|
5105
|
+
onClick: E[2] || (E[2] = Me(() => {
|
|
5090
5106
|
}, ["stop"]))
|
|
5091
5107
|
}, [
|
|
5092
5108
|
fe(F("div", Gi, [
|
|
@@ -5094,7 +5110,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5094
5110
|
T(Ti, {
|
|
5095
5111
|
ref_key: "boldRef",
|
|
5096
5112
|
ref: d,
|
|
5097
|
-
disabled: !
|
|
5113
|
+
disabled: !_.value,
|
|
5098
5114
|
rows: r.value,
|
|
5099
5115
|
"selected-val": c.value,
|
|
5100
5116
|
"selected-row": i.value,
|
|
@@ -5104,7 +5120,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5104
5120
|
T(Li, {
|
|
5105
5121
|
ref_key: "italicRef",
|
|
5106
5122
|
ref: h,
|
|
5107
|
-
disabled: !
|
|
5123
|
+
disabled: !_.value,
|
|
5108
5124
|
rows: r.value,
|
|
5109
5125
|
"selected-val": c.value,
|
|
5110
5126
|
"selected-row": i.value,
|
|
@@ -5114,7 +5130,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5114
5130
|
T(Oi, {
|
|
5115
5131
|
ref_key: "underlineRef",
|
|
5116
5132
|
ref: p,
|
|
5117
|
-
disabled: !
|
|
5133
|
+
disabled: !_.value,
|
|
5118
5134
|
rows: r.value,
|
|
5119
5135
|
"selected-val": c.value,
|
|
5120
5136
|
"selected-row": i.value,
|
|
@@ -5122,7 +5138,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5122
5138
|
onUpdateText: x
|
|
5123
5139
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
5124
5140
|
T(Ni, {
|
|
5125
|
-
disabled: !
|
|
5141
|
+
disabled: !_.value,
|
|
5126
5142
|
rows: r.value,
|
|
5127
5143
|
"selected-val": c.value,
|
|
5128
5144
|
"selected-row": i.value,
|
|
@@ -5130,7 +5146,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5130
5146
|
onUpdateText: x
|
|
5131
5147
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
5132
5148
|
T(Vi, {
|
|
5133
|
-
disabled: !
|
|
5149
|
+
disabled: !_.value,
|
|
5134
5150
|
rows: r.value,
|
|
5135
5151
|
"selected-val": c.value,
|
|
5136
5152
|
"selected-row": i.value,
|
|
@@ -5139,7 +5155,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5139
5155
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
5140
5156
|
T(b(Je), { direction: "vertical" }),
|
|
5141
5157
|
T(Hi, {
|
|
5142
|
-
disabled: !
|
|
5158
|
+
disabled: !k.value,
|
|
5143
5159
|
rows: r.value,
|
|
5144
5160
|
"selected-val": c.value,
|
|
5145
5161
|
"selected-row": i.value,
|
|
@@ -5147,7 +5163,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5147
5163
|
onUpdateText: x
|
|
5148
5164
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
5149
5165
|
T(Wi, {
|
|
5150
|
-
disabled: !
|
|
5166
|
+
disabled: !k.value,
|
|
5151
5167
|
rows: r.value,
|
|
5152
5168
|
"selected-val": c.value,
|
|
5153
5169
|
"selected-row": i.value,
|
|
@@ -5168,15 +5184,15 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5168
5184
|
maxlength: n.maxlength,
|
|
5169
5185
|
minlength: n.minlength,
|
|
5170
5186
|
value: f.value,
|
|
5171
|
-
"onUpdate:value":
|
|
5172
|
-
onKeydown:
|
|
5187
|
+
"onUpdate:value": E[0] || (E[0] = (z) => f.value = z),
|
|
5188
|
+
onKeydown: C
|
|
5173
5189
|
}, null, 8, ["size", "round", "disabled", "placeholder", "maxlength", "minlength", "value"])
|
|
5174
5190
|
], 512), [
|
|
5175
5191
|
[He, o.value === "edit"]
|
|
5176
5192
|
]),
|
|
5177
5193
|
o.value === "preview" ? (m(), L(b(Yc), {
|
|
5178
5194
|
key: 0,
|
|
5179
|
-
text:
|
|
5195
|
+
text: v.value
|
|
5180
5196
|
}, null, 8, ["text"])) : U("", !0),
|
|
5181
5197
|
F("div", Yi, [
|
|
5182
5198
|
T(b(Gl), {
|
|
@@ -5185,8 +5201,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5185
5201
|
disabled: n.disabled,
|
|
5186
5202
|
items: u,
|
|
5187
5203
|
value: o.value,
|
|
5188
|
-
"onUpdate:value":
|
|
5189
|
-
onChange:
|
|
5204
|
+
"onUpdate:value": E[1] || (E[1] = (z) => o.value = z),
|
|
5205
|
+
onChange: D
|
|
5190
5206
|
}, null, 8, ["size", "round", "disabled", "value"]),
|
|
5191
5207
|
j(A.$slots, "control")
|
|
5192
5208
|
])
|
|
@@ -5206,10 +5222,10 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5206
5222
|
setup(e) {
|
|
5207
5223
|
const { nextId: u } = qu(), t = e, n = R(""), o = R("");
|
|
5208
5224
|
nu(mt, n);
|
|
5209
|
-
const r =
|
|
5225
|
+
const r = w(() => {
|
|
5210
5226
|
const i = [];
|
|
5211
5227
|
return t.isRequired && i.push("is-required"), i;
|
|
5212
|
-
}), s =
|
|
5228
|
+
}), s = w(() => ["input", "switch"].includes(t.type));
|
|
5213
5229
|
ie(
|
|
5214
5230
|
() => t.errorMsg,
|
|
5215
5231
|
(i) => {
|
|
@@ -5228,7 +5244,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5228
5244
|
t.label || t.showLabel ? (m(), S("label", {
|
|
5229
5245
|
key: 0,
|
|
5230
5246
|
class: K(["sq-form-item-label", r.value]),
|
|
5231
|
-
textContent:
|
|
5247
|
+
textContent: se(t.label),
|
|
5232
5248
|
for: t.type !== "custom" ? n.value : void 0
|
|
5233
5249
|
}, null, 10, Ki)) : U("", !0),
|
|
5234
5250
|
F("div", Qi, [
|
|
@@ -5241,7 +5257,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5241
5257
|
default: Z(() => [
|
|
5242
5258
|
fe(F("span", {
|
|
5243
5259
|
class: "sq-form-item-check",
|
|
5244
|
-
textContent:
|
|
5260
|
+
textContent: se(o.value)
|
|
5245
5261
|
}, null, 8, ea), [
|
|
5246
5262
|
[He, t.errorMsg]
|
|
5247
5263
|
])
|
|
@@ -5276,27 +5292,27 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5276
5292
|
nu(
|
|
5277
5293
|
su,
|
|
5278
5294
|
R({
|
|
5279
|
-
size:
|
|
5280
|
-
round:
|
|
5281
|
-
disabled:
|
|
5282
|
-
readonly:
|
|
5295
|
+
size: re(r, "size"),
|
|
5296
|
+
round: re(r, "round"),
|
|
5297
|
+
disabled: re(r, "disabled"),
|
|
5298
|
+
readonly: re(r, "readonly")
|
|
5283
5299
|
})
|
|
5284
5300
|
);
|
|
5285
|
-
const s = R({}), c = R([]), i = R({}), a =
|
|
5301
|
+
const s = R({}), c = R([]), i = R({}), a = w(() => {
|
|
5286
5302
|
const q = [];
|
|
5287
5303
|
return r.size !== "md" && q.push(`sq-form--${r.size}`), r.requiredMark !== "hidden" && q.push(`required-${r.requiredMark}`), q.push(`is-${r.layout}`), q;
|
|
5288
|
-
}), l =
|
|
5304
|
+
}), l = w(() => ({
|
|
5289
5305
|
"--form-label-width": r.labelWidth
|
|
5290
|
-
})), d =
|
|
5306
|
+
})), d = w(() => {
|
|
5291
5307
|
const q = r.step;
|
|
5292
|
-
return q === void 0 ? r.items : r.items.filter((
|
|
5308
|
+
return q === void 0 ? r.items : r.items.filter((y) => y.step === void 0 ? y : Array.isArray(y.step) ? y.step.includes(q) : y.step === q);
|
|
5293
5309
|
});
|
|
5294
5310
|
be(() => {
|
|
5295
5311
|
n = structuredClone(Xe(r.formData));
|
|
5296
5312
|
});
|
|
5297
5313
|
function h(q) {
|
|
5298
|
-
var
|
|
5299
|
-
return (
|
|
5314
|
+
var y;
|
|
5315
|
+
return (y = q.rule) == null ? void 0 : y.required;
|
|
5300
5316
|
}
|
|
5301
5317
|
function p(q) {
|
|
5302
5318
|
if (i.value[q]) return Su;
|
|
@@ -5304,48 +5320,48 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5304
5320
|
if (s.value[q])
|
|
5305
5321
|
return r.invalidStatus === "error" ? on : cn;
|
|
5306
5322
|
}
|
|
5307
|
-
async function f(q,
|
|
5323
|
+
async function f(q, y, x, A = !0) {
|
|
5308
5324
|
if (!x) return;
|
|
5309
|
-
const
|
|
5310
|
-
if (
|
|
5311
|
-
if (z === "array" && !
|
|
5312
|
-
if (z === "string" &&
|
|
5325
|
+
const E = x.trigger ?? "change", z = Array.isArray(E) ? "array" : "string";
|
|
5326
|
+
if (y) {
|
|
5327
|
+
if (z === "array" && !E.includes(y)) return;
|
|
5328
|
+
if (z === "string" && E !== y) return;
|
|
5313
5329
|
}
|
|
5314
5330
|
c.value = c.value.filter((P) => P !== q), M(q), i.value[q] = new AbortController(), await Ku();
|
|
5315
5331
|
const W = r.formData[q];
|
|
5316
5332
|
let G = !1;
|
|
5317
5333
|
const I = x.validateType ?? "string";
|
|
5318
|
-
return x.validateFunc ? G = await
|
|
5334
|
+
return x.validateFunc ? G = await _(q, W, x, y) : I === "string" ? G = k(q, W, x) : I === "boolean" ? G = v(q, W, x) : I === "list" && (G = D(q, W, x)), A && o("validate", q, G, Xe(c.value)), i.value[q].signal.aborted || M(q), G;
|
|
5319
5335
|
}
|
|
5320
5336
|
function g(q) {
|
|
5321
5337
|
if (s.value[q]) return r.invalidStatus;
|
|
5322
5338
|
}
|
|
5323
|
-
async function
|
|
5324
|
-
const
|
|
5339
|
+
async function _(q, y, x, A) {
|
|
5340
|
+
const E = i.value[q].signal, z = await x.validateFunc(y, E, A);
|
|
5325
5341
|
if (z === void 0) {
|
|
5326
5342
|
c.value = c.value.filter((W) => W !== q), delete s.value[q];
|
|
5327
5343
|
return;
|
|
5328
5344
|
}
|
|
5329
|
-
return z === !0 ? $(q) : z === !1 ?
|
|
5345
|
+
return z === !0 ? $(q) : z === !1 ? C(q, "字段验证失败") : z ? C(q, z) : $(q), z === !0 || typeof z == "string" && !z;
|
|
5330
5346
|
}
|
|
5331
|
-
function
|
|
5332
|
-
return x.required && !
|
|
5347
|
+
function k(q, y, x) {
|
|
5348
|
+
return x.required && !y ? (C(q, x.requiredText ?? "字段必填"), !1) : x.pattern && y && !x.pattern.test(y) ? (C(q, x.patternText ?? "字段验证失败"), !1) : ($(q), !0);
|
|
5333
5349
|
}
|
|
5334
|
-
function
|
|
5335
|
-
return x.required &&
|
|
5350
|
+
function v(q, y, x) {
|
|
5351
|
+
return x.required && y === void 0 ? (C(q, x.requiredText ?? "字段必填"), !1) : ($(q), !0);
|
|
5336
5352
|
}
|
|
5337
|
-
function
|
|
5338
|
-
return x.required && (!
|
|
5353
|
+
function D(q, y, x) {
|
|
5354
|
+
return x.required && (!y || !y.length) ? (C(q, x.requiredText ?? "字段必填"), !1) : x.pattern && y && y.map((z) => z.toString()).map((z) => x.pattern.test(z)).includes(!1) ? (C(q, x.patternText ?? "字段验证失败"), !1) : ($(q), !0);
|
|
5339
5355
|
}
|
|
5340
|
-
function
|
|
5341
|
-
c.value = c.value.filter((x) => x !== q), s.value[q] =
|
|
5356
|
+
function C(q, y) {
|
|
5357
|
+
c.value = c.value.filter((x) => x !== q), s.value[q] = y;
|
|
5342
5358
|
}
|
|
5343
5359
|
function $(q) {
|
|
5344
5360
|
c.value.push(q), delete s.value[q];
|
|
5345
5361
|
}
|
|
5346
5362
|
function M(q) {
|
|
5347
|
-
var
|
|
5348
|
-
(
|
|
5363
|
+
var y;
|
|
5364
|
+
(y = i.value[q]) == null || y.abort(), delete i.value[q];
|
|
5349
5365
|
}
|
|
5350
5366
|
function V() {
|
|
5351
5367
|
o("update:formData", structuredClone(n)), s.value = {}, c.value = [], o("validate", "SQFORM", !1, Xe(c.value));
|
|
@@ -5354,15 +5370,15 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5354
5370
|
const x = (q ? r.items : d.value).filter(
|
|
5355
5371
|
(A) => A.type !== "custom" && A.rule && !c.value.includes(A.binding)
|
|
5356
5372
|
).map((A) => {
|
|
5357
|
-
const
|
|
5358
|
-
return f(
|
|
5373
|
+
const E = A;
|
|
5374
|
+
return f(E.binding, void 0, E.rule, !1);
|
|
5359
5375
|
});
|
|
5360
5376
|
return Promise.all(x).then((A) => (o("validate", "SQFORM", !A.includes(!1), Xe(c.value)), A));
|
|
5361
5377
|
}
|
|
5362
|
-
return u({ resetFields: V, validate: H }), (q,
|
|
5378
|
+
return u({ resetFields: V, validate: H }), (q, y) => (m(), S("form", {
|
|
5363
5379
|
class: K(["sq-form", a.value]),
|
|
5364
5380
|
style: ee(l.value),
|
|
5365
|
-
onSubmit:
|
|
5381
|
+
onSubmit: y[0] || (y[0] = Me(() => {
|
|
5366
5382
|
}, ["prevent"]))
|
|
5367
5383
|
}, [
|
|
5368
5384
|
(m(!0), S(xe, null, je(d.value, (x, A) => (m(), L(ta, {
|
|
@@ -5384,26 +5400,26 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5384
5400
|
status: g(x.binding),
|
|
5385
5401
|
"suffix-icon": p(x.binding),
|
|
5386
5402
|
value: r.formData[x.binding],
|
|
5387
|
-
"onUpdate:value": (
|
|
5388
|
-
onChange: (
|
|
5389
|
-
onInput: (
|
|
5390
|
-
onBlur: (
|
|
5403
|
+
"onUpdate:value": (E) => r.formData[x.binding] = E,
|
|
5404
|
+
onChange: (E) => f(x.binding, "change", x.rule),
|
|
5405
|
+
onInput: (E) => f(x.binding, "input", x.rule),
|
|
5406
|
+
onBlur: (E) => f(x.binding, "blur", x.rule)
|
|
5391
5407
|
}), null, 16, ["name", "status", "suffix-icon", "value", "onUpdate:value", "onChange", "onInput", "onBlur"])) : x.type === "checkbox" ? (m(), L(b(Ei), qe({
|
|
5392
5408
|
key: 1,
|
|
5393
5409
|
ref_for: !0
|
|
5394
5410
|
}, x.props, {
|
|
5395
5411
|
name: x.name,
|
|
5396
5412
|
value: r.formData[x.binding],
|
|
5397
|
-
"onUpdate:value": (
|
|
5398
|
-
onChange: (
|
|
5413
|
+
"onUpdate:value": (E) => r.formData[x.binding] = E,
|
|
5414
|
+
onChange: (E) => f(x.binding, "change", x.rule)
|
|
5399
5415
|
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : x.type === "radio" ? (m(), L(b(jl), qe({
|
|
5400
5416
|
key: 2,
|
|
5401
5417
|
ref_for: !0
|
|
5402
5418
|
}, x.props, {
|
|
5403
5419
|
name: x.name,
|
|
5404
5420
|
value: r.formData[x.binding],
|
|
5405
|
-
"onUpdate:value": (
|
|
5406
|
-
onChange: (
|
|
5421
|
+
"onUpdate:value": (E) => r.formData[x.binding] = E,
|
|
5422
|
+
onChange: (E) => f(x.binding, "change", x.rule)
|
|
5407
5423
|
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : x.type === "switch" ? (m(), L(b(t1), qe({
|
|
5408
5424
|
key: 3,
|
|
5409
5425
|
ref_for: !0
|
|
@@ -5411,8 +5427,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5411
5427
|
name: x.name,
|
|
5412
5428
|
loading: i.value[x.binding] !== void 0,
|
|
5413
5429
|
checked: r.formData[x.binding],
|
|
5414
|
-
"onUpdate:checked": (
|
|
5415
|
-
onChange: (
|
|
5430
|
+
"onUpdate:checked": (E) => r.formData[x.binding] = E,
|
|
5431
|
+
onChange: (E) => f(x.binding, "change", x.rule)
|
|
5416
5432
|
}), null, 16, ["name", "loading", "checked", "onUpdate:checked", "onChange"])) : j(q.$slots, x.slot, { key: 4 })
|
|
5417
5433
|
]),
|
|
5418
5434
|
_: 2
|
|
@@ -5444,7 +5460,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5444
5460
|
},
|
|
5445
5461
|
emits: ["load", "error"],
|
|
5446
5462
|
setup(e, { emit: u }) {
|
|
5447
|
-
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 = de(null), d =
|
|
5463
|
+
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 = de(null), d = w(() => r.value && !c.value), h = w(() => ({
|
|
5448
5464
|
height: d.value ? void 0 : "var(--image-placeholder-height)",
|
|
5449
5465
|
aspectRatio: d.value ? void 0 : o.aspectRatio
|
|
5450
5466
|
}));
|
|
@@ -5453,23 +5469,23 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5453
5469
|
}), Ue(() => {
|
|
5454
5470
|
t.disconnect();
|
|
5455
5471
|
});
|
|
5456
|
-
function p(
|
|
5457
|
-
r.value = !0, n("load",
|
|
5472
|
+
function p(k) {
|
|
5473
|
+
r.value = !0, n("load", k);
|
|
5458
5474
|
}
|
|
5459
|
-
function f(
|
|
5475
|
+
function f(k) {
|
|
5460
5476
|
if (s.value !== o.fallback && o.fallback) {
|
|
5461
5477
|
s.value = o.fallback;
|
|
5462
5478
|
return;
|
|
5463
5479
|
}
|
|
5464
|
-
c.value = !0, r.value = !0, n("error",
|
|
5480
|
+
c.value = !0, r.value = !0, n("error", k);
|
|
5465
5481
|
}
|
|
5466
|
-
function g(
|
|
5467
|
-
|
|
5482
|
+
function g(k) {
|
|
5483
|
+
k[0].isIntersecting && (i.value = !0, t.disconnect());
|
|
5468
5484
|
}
|
|
5469
|
-
function
|
|
5485
|
+
function _() {
|
|
5470
5486
|
a.value = !0;
|
|
5471
5487
|
}
|
|
5472
|
-
return (
|
|
5488
|
+
return (k, v) => (m(), S("div", {
|
|
5473
5489
|
class: "sq-image",
|
|
5474
5490
|
style: ee(h.value),
|
|
5475
5491
|
ref_key: "imgRef",
|
|
@@ -5482,11 +5498,11 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5482
5498
|
_: 1
|
|
5483
5499
|
}),
|
|
5484
5500
|
!c.value && i.value ? (m(), S("picture", ra, [
|
|
5485
|
-
(m(!0), S(xe, null, je(o.source, (
|
|
5486
|
-
key:
|
|
5487
|
-
srcset:
|
|
5488
|
-
media:
|
|
5489
|
-
type:
|
|
5501
|
+
(m(!0), S(xe, null, je(o.source, (D, C) => (m(), S("source", {
|
|
5502
|
+
key: C,
|
|
5503
|
+
srcset: D.src,
|
|
5504
|
+
media: D.media,
|
|
5505
|
+
type: D.type
|
|
5490
5506
|
}, null, 8, sa))), 128)),
|
|
5491
5507
|
F("img", {
|
|
5492
5508
|
style: ee({ objectFit: o.objectFit }),
|
|
@@ -5500,27 +5516,27 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5500
5516
|
!c.value && i.value && o.preview ? (m(), S("div", {
|
|
5501
5517
|
key: 1,
|
|
5502
5518
|
class: "sq-image-control",
|
|
5503
|
-
onClick:
|
|
5519
|
+
onClick: _
|
|
5504
5520
|
}, [
|
|
5505
5521
|
T(b(sn))
|
|
5506
5522
|
])) : U("", !0),
|
|
5507
5523
|
c.value ? (m(), S("div", ia, [
|
|
5508
|
-
j(
|
|
5509
|
-
|
|
5524
|
+
j(k.$slots, "error", {}, () => [
|
|
5525
|
+
v[1] || (v[1] = F("span", null, "图片加载失败", -1))
|
|
5510
5526
|
])
|
|
5511
5527
|
])) : U("", !0),
|
|
5512
5528
|
o.preview ? (m(), L(b(pa), {
|
|
5513
5529
|
key: 3,
|
|
5514
5530
|
"src-list": [s.value],
|
|
5515
5531
|
visible: a.value,
|
|
5516
|
-
"onUpdate:visible":
|
|
5532
|
+
"onUpdate:visible": v[0] || (v[0] = (D) => a.value = D)
|
|
5517
5533
|
}, null, 8, ["src-list", "visible"])) : U("", !0)
|
|
5518
5534
|
], 4));
|
|
5519
5535
|
}
|
|
5520
5536
|
}), da = ["src"], fa = "sq-image-viewer", pa = /* @__PURE__ */ O({
|
|
5521
5537
|
name: fa,
|
|
5522
5538
|
__name: "image-viewer",
|
|
5523
|
-
props: /* @__PURE__ */
|
|
5539
|
+
props: /* @__PURE__ */ ue({
|
|
5524
5540
|
srcList: {},
|
|
5525
5541
|
toolbar: { type: Boolean, default: !0 },
|
|
5526
5542
|
minScale: { default: 0.5 },
|
|
@@ -5528,7 +5544,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5528
5544
|
scaleStep: { default: 0.5 },
|
|
5529
5545
|
moveable: { type: Boolean, default: !0 },
|
|
5530
5546
|
keyboard: { type: Boolean, default: void 0 },
|
|
5531
|
-
maskCloseable: { type: Boolean, default: void 0 }
|
|
5547
|
+
maskCloseable: { type: Boolean, default: void 0 },
|
|
5548
|
+
beforeClose: {}
|
|
5532
5549
|
}, {
|
|
5533
5550
|
visible: { type: Boolean, default: !1 },
|
|
5534
5551
|
visibleModifiers: {}
|
|
@@ -5537,7 +5554,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5537
5554
|
setup(e) {
|
|
5538
5555
|
const u = {}, t = {};
|
|
5539
5556
|
let n = !1, o;
|
|
5540
|
-
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 = ae(e, "visible"), f =
|
|
5557
|
+
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 = ae(e, "visible"), f = w(() => r.srcList[l.value]), g = w(() => {
|
|
5541
5558
|
const B = c.value ? -1 : 1, N = i.value ? -1 : 1;
|
|
5542
5559
|
return {
|
|
5543
5560
|
transform: [
|
|
@@ -5549,24 +5566,21 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5549
5566
|
transition: d.value ? void 0 : "none"
|
|
5550
5567
|
};
|
|
5551
5568
|
});
|
|
5552
|
-
|
|
5553
|
-
B
|
|
5554
|
-
});
|
|
5555
|
-
function v(B) {
|
|
5556
|
-
B.deltaY < 0 ? _() : x();
|
|
5569
|
+
function _(B) {
|
|
5570
|
+
B.deltaY < 0 ? y() : x();
|
|
5557
5571
|
}
|
|
5558
|
-
function
|
|
5572
|
+
function k(B) {
|
|
5559
5573
|
n = !0, u.x = B.x, u.y = B.y;
|
|
5560
5574
|
}
|
|
5561
|
-
function
|
|
5575
|
+
function v() {
|
|
5562
5576
|
n = !1;
|
|
5563
5577
|
}
|
|
5564
|
-
function
|
|
5578
|
+
function D(B) {
|
|
5565
5579
|
if (!n || !r.moveable) return;
|
|
5566
5580
|
const N = B.x - u.x, Y = B.y - u.y;
|
|
5567
5581
|
h.value.x += N * 2, h.value.y += Y * 2, u.x = B.x, u.y = B.y;
|
|
5568
5582
|
}
|
|
5569
|
-
function
|
|
5583
|
+
function C(B) {
|
|
5570
5584
|
B.touches.length === 1 ? (n = !0, u.x = B.touches[0].screenX, u.y = B.touches[0].screenY) : B.touches.length === 2 && (o = q(B.touches[0], B.touches[1]));
|
|
5571
5585
|
}
|
|
5572
5586
|
function $() {
|
|
@@ -5575,14 +5589,14 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5575
5589
|
function M(B) {
|
|
5576
5590
|
if (B.touches.length === 1) {
|
|
5577
5591
|
if (!n || !r.moveable) return;
|
|
5578
|
-
const N = B.touches[0], Y = N.screenX - u.x,
|
|
5579
|
-
h.value.x += Y * 2, h.value.y +=
|
|
5592
|
+
const N = B.touches[0], Y = N.screenX - u.x, te = N.screenY - u.y;
|
|
5593
|
+
h.value.x += Y * 2, h.value.y += te * 2, u.x = N.screenX, u.y = N.screenY;
|
|
5580
5594
|
} else if (B.touches.length === 2) {
|
|
5581
5595
|
if (!o) return;
|
|
5582
5596
|
d.value = !1;
|
|
5583
5597
|
const N = q(B.touches[0], B.touches[1]), Y = N / o;
|
|
5584
|
-
let
|
|
5585
|
-
|
|
5598
|
+
let te = s.value * Y;
|
|
5599
|
+
te = Math.min(r.maxScale, te), te = Math.max(r.minScale, te), s.value = te, o = N;
|
|
5586
5600
|
}
|
|
5587
5601
|
}
|
|
5588
5602
|
function V() {
|
|
@@ -5592,10 +5606,10 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5592
5606
|
l.value += B;
|
|
5593
5607
|
}
|
|
5594
5608
|
function q(B, N) {
|
|
5595
|
-
const Y = N.clientX - B.clientX,
|
|
5596
|
-
return Math.sqrt(Y * Y +
|
|
5609
|
+
const Y = N.clientX - B.clientX, te = N.clientY - B.clientY;
|
|
5610
|
+
return Math.sqrt(Y * Y + te * te);
|
|
5597
5611
|
}
|
|
5598
|
-
function
|
|
5612
|
+
function y() {
|
|
5599
5613
|
s.value >= r.maxScale || (s.value = Math.min(r.maxScale, s.value * (1 + r.scaleStep)));
|
|
5600
5614
|
}
|
|
5601
5615
|
function x() {
|
|
@@ -5604,7 +5618,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5604
5618
|
function A() {
|
|
5605
5619
|
s.value = Math.min(t.x, t.y), h.value = { x: 0, y: 0 };
|
|
5606
5620
|
}
|
|
5607
|
-
function
|
|
5621
|
+
function E() {
|
|
5608
5622
|
s.value = 1, h.value = { x: 0, y: 0 };
|
|
5609
5623
|
}
|
|
5610
5624
|
function z() {
|
|
@@ -5620,8 +5634,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5620
5634
|
p.value = !1;
|
|
5621
5635
|
}
|
|
5622
5636
|
function P(B) {
|
|
5623
|
-
const Y = B.target.getBoundingClientRect(),
|
|
5624
|
-
t.x =
|
|
5637
|
+
const Y = B.target.getBoundingClientRect(), te = window.innerWidth, Pe = window.innerHeight;
|
|
5638
|
+
t.x = te / Y.width, t.y = Pe / Y.height, s.value = Math.min(t.x, t.y, 1);
|
|
5625
5639
|
}
|
|
5626
5640
|
return (B, N) => (m(), L(b(In), {
|
|
5627
5641
|
class: "sq-image-viewer-mask",
|
|
@@ -5629,11 +5643,12 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5629
5643
|
"onUpdate:visible": N[6] || (N[6] = (Y) => p.value = Y),
|
|
5630
5644
|
keyboard: r.keyboard,
|
|
5631
5645
|
"mask-closeable": r.maskCloseable,
|
|
5632
|
-
onWheelPassive:
|
|
5633
|
-
onMousemove:
|
|
5634
|
-
onMouseup:
|
|
5646
|
+
onWheelPassive: _,
|
|
5647
|
+
onMousemove: D,
|
|
5648
|
+
onMouseup: v,
|
|
5635
5649
|
onTouchmovePassive: M,
|
|
5636
|
-
onTouchend:
|
|
5650
|
+
onTouchend: $,
|
|
5651
|
+
onClosed: V
|
|
5637
5652
|
}, {
|
|
5638
5653
|
default: Z(() => [
|
|
5639
5654
|
F("img", {
|
|
@@ -5642,8 +5657,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5642
5657
|
onClick: N[0] || (N[0] = Me(() => {
|
|
5643
5658
|
}, ["stop"])),
|
|
5644
5659
|
onLoad: P,
|
|
5645
|
-
onMousedown: Me(
|
|
5646
|
-
onTouchstartPassive:
|
|
5660
|
+
onMousedown: Me(k, ["prevent"]),
|
|
5661
|
+
onTouchstartPassive: C
|
|
5647
5662
|
}, null, 44, da),
|
|
5648
5663
|
T(b(Q), {
|
|
5649
5664
|
class: "sq-image-viewer-close",
|
|
@@ -5679,7 +5694,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5679
5694
|
text: "",
|
|
5680
5695
|
icon: b(Jo),
|
|
5681
5696
|
disabled: s.value >= r.maxScale,
|
|
5682
|
-
onClick:
|
|
5697
|
+
onClick: y
|
|
5683
5698
|
}, null, 8, ["icon", "disabled"])
|
|
5684
5699
|
]),
|
|
5685
5700
|
_: 1
|
|
@@ -5743,7 +5758,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5743
5758
|
T(b(Q), {
|
|
5744
5759
|
text: "",
|
|
5745
5760
|
icon: b(X0),
|
|
5746
|
-
onClick:
|
|
5761
|
+
onClick: E
|
|
5747
5762
|
}, null, 8, ["icon"])
|
|
5748
5763
|
]),
|
|
5749
5764
|
_: 1
|
|
@@ -5773,58 +5788,59 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5773
5788
|
setup(e, { expose: u }) {
|
|
5774
5789
|
const t = {};
|
|
5775
5790
|
let n = 0, o, r = !1, s;
|
|
5776
|
-
const c = e, i = R(1), a = R({ x: 0, y: 0 }), l = de(null), d = de(null), h =
|
|
5791
|
+
const c = e, i = R(1), a = R({ x: 0, y: 0 }), l = de(null), d = de(null), h = w(() => ({
|
|
5777
5792
|
transform: `scale(${i.value})`,
|
|
5778
5793
|
marginInlineStart: `${a.value.x}px`,
|
|
5779
5794
|
marginBlockStart: `${a.value.y}px`
|
|
5780
5795
|
}));
|
|
5781
5796
|
be(() => {
|
|
5782
|
-
document.addEventListener("mousemove",
|
|
5797
|
+
document.addEventListener("mousemove", k), document.addEventListener("mouseup", _);
|
|
5783
5798
|
}), Ue(() => {
|
|
5784
|
-
document.removeEventListener("mousemove",
|
|
5799
|
+
document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", _);
|
|
5785
5800
|
});
|
|
5786
|
-
function p(
|
|
5801
|
+
function p(y) {
|
|
5787
5802
|
a.value = { x: 0, y: 0 }, o = l.value.getBoundingClientRect();
|
|
5788
|
-
const x =
|
|
5803
|
+
const x = y.target, A = x.naturalWidth, E = x.naturalHeight, z = o.width / A, W = o.height / E;
|
|
5789
5804
|
n = Math.max(z, W), i.value = n;
|
|
5790
5805
|
}
|
|
5791
|
-
function f(
|
|
5792
|
-
|
|
5806
|
+
function f(y) {
|
|
5807
|
+
y.deltaY < 0 ? M() : V();
|
|
5793
5808
|
}
|
|
5794
|
-
function g(
|
|
5795
|
-
r = !0, t.x =
|
|
5809
|
+
function g(y) {
|
|
5810
|
+
r = !0, t.x = y.x, t.y = y.y;
|
|
5796
5811
|
}
|
|
5797
|
-
function
|
|
5812
|
+
function _() {
|
|
5798
5813
|
r = !1;
|
|
5799
5814
|
}
|
|
5800
|
-
function
|
|
5815
|
+
function k(y) {
|
|
5801
5816
|
if (!r) return;
|
|
5802
|
-
const x =
|
|
5803
|
-
t.x =
|
|
5804
|
-
const
|
|
5805
|
-
a.value.x =
|
|
5817
|
+
const x = y.x - t.x, A = y.y - t.y;
|
|
5818
|
+
t.x = y.x, t.y = y.y;
|
|
5819
|
+
const E = a.value.x + x * 2, z = a.value.y + A * 2;
|
|
5820
|
+
a.value.x = E, a.value.y = z, H();
|
|
5806
5821
|
}
|
|
5807
|
-
function
|
|
5808
|
-
|
|
5822
|
+
function v(y) {
|
|
5823
|
+
y.touches.length === 1 ? (r = !0, t.x = y.touches[0].screenX, t.y = y.touches[0].screenY) : y.touches.length === 2 && (s = $(y.touches[0], y.touches[1]));
|
|
5809
5824
|
}
|
|
5810
|
-
function
|
|
5825
|
+
function D() {
|
|
5811
5826
|
r = !1, s = void 0;
|
|
5812
5827
|
}
|
|
5813
|
-
function y
|
|
5814
|
-
if (
|
|
5828
|
+
function C(y) {
|
|
5829
|
+
if (y.touches.length === 1) {
|
|
5815
5830
|
if (!r) return;
|
|
5816
|
-
const x =
|
|
5817
|
-
a.value.x += A * 2, a.value.y +=
|
|
5818
|
-
} else if (
|
|
5831
|
+
const x = y.touches[0], A = x.screenX - t.x, E = x.screenY - t.y;
|
|
5832
|
+
a.value.x += A * 2, a.value.y += E * 2, t.x = x.screenX, t.y = x.screenY;
|
|
5833
|
+
} else if (y.touches.length === 2) {
|
|
5819
5834
|
if (!s) return;
|
|
5820
|
-
const x = $(
|
|
5821
|
-
let
|
|
5822
|
-
|
|
5835
|
+
const x = $(y.touches[0], y.touches[1]), A = x / s;
|
|
5836
|
+
let E = i.value * A;
|
|
5837
|
+
E = Math.min(Gu, E), E = Math.max(n, E), i.value = E, s = x;
|
|
5823
5838
|
}
|
|
5839
|
+
H();
|
|
5824
5840
|
}
|
|
5825
|
-
function $(
|
|
5826
|
-
const A = x.clientX -
|
|
5827
|
-
return Math.sqrt(A * A +
|
|
5841
|
+
function $(y, x) {
|
|
5842
|
+
const A = x.clientX - y.clientX, E = x.clientY - y.clientY;
|
|
5843
|
+
return Math.sqrt(A * A + E * E);
|
|
5828
5844
|
}
|
|
5829
5845
|
function M() {
|
|
5830
5846
|
i.value >= Gu || (i.value = Math.min(Gu, i.value * (1 + 0.1)));
|
|
@@ -5834,42 +5850,42 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5834
5850
|
}
|
|
5835
5851
|
function H() {
|
|
5836
5852
|
requestAnimationFrame(() => {
|
|
5837
|
-
const
|
|
5838
|
-
x ? a.value.x -= (
|
|
5839
|
-
const
|
|
5840
|
-
|
|
5853
|
+
const y = d.value.getBoundingClientRect(), x = y.left >= o.left, A = y.right <= o.right;
|
|
5854
|
+
x ? a.value.x -= (y.left - o.left) * 2 : A && (a.value.x += (o.right - y.right) * 2);
|
|
5855
|
+
const E = y.top >= o.top, z = y.bottom <= o.bottom;
|
|
5856
|
+
E ? a.value.y -= (y.top - o.top) * 2 : z && (a.value.y += (o.bottom - y.bottom) * 2);
|
|
5841
5857
|
});
|
|
5842
5858
|
}
|
|
5843
|
-
async function q(
|
|
5859
|
+
async function q(y = "base64") {
|
|
5844
5860
|
if (!c.src) return;
|
|
5845
|
-
const x = d.value.naturalWidth, A = d.value.naturalHeight,
|
|
5861
|
+
const x = d.value.naturalWidth, A = d.value.naturalHeight, E = x / A, W = x > A && E < c.aspectRatio || x < A && E > c.aspectRatio ? x / A : 1, G = i.value / n / W;
|
|
5846
5862
|
let I = document.createElement("canvas");
|
|
5847
5863
|
const P = Math.min(x, A);
|
|
5848
5864
|
I.width = P, I.height = P / c.aspectRatio;
|
|
5849
5865
|
let B = I.getContext("2d");
|
|
5850
|
-
const N = d.value.getBoundingClientRect(), Y = (N.left - o.left) / i.value,
|
|
5866
|
+
const N = d.value.getBoundingClientRect(), Y = (N.left - o.left) / i.value, te = (N.top - o.top) / i.value;
|
|
5851
5867
|
return B == null || B.drawImage(
|
|
5852
5868
|
d.value,
|
|
5853
5869
|
Y * G,
|
|
5854
|
-
|
|
5870
|
+
te * G,
|
|
5855
5871
|
x * G,
|
|
5856
5872
|
A * G
|
|
5857
5873
|
), new Promise((Pe) => {
|
|
5858
|
-
|
|
5874
|
+
y === "base64" ? Pe(I.toDataURL("image/png")) : I == null || I.toBlob((u0) => {
|
|
5859
5875
|
Pe(u0 ?? void 0);
|
|
5860
5876
|
}, "image/png");
|
|
5861
5877
|
}).finally(() => {
|
|
5862
5878
|
B = void 0, I = void 0;
|
|
5863
5879
|
});
|
|
5864
5880
|
}
|
|
5865
|
-
return u({ cropImageAsync: q }), (
|
|
5881
|
+
return u({ cropImageAsync: q }), (y, x) => (m(), S("div", {
|
|
5866
5882
|
class: "sq-image-crop",
|
|
5867
5883
|
style: ee({ "--image-crop-ratio": c.aspectRatio }),
|
|
5868
5884
|
onWheelPassive: f,
|
|
5869
5885
|
onMousedown: Me(g, ["prevent"]),
|
|
5870
|
-
onTouchstartPassive:
|
|
5871
|
-
onTouchmovePassive:
|
|
5872
|
-
onTouchend:
|
|
5886
|
+
onTouchstartPassive: v,
|
|
5887
|
+
onTouchmovePassive: C,
|
|
5888
|
+
onTouchend: D
|
|
5873
5889
|
}, [
|
|
5874
5890
|
F("div", {
|
|
5875
5891
|
class: "sq-image-crop-cropper",
|
|
@@ -5893,7 +5909,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5893
5909
|
}, xa = ["id", "disabled", "readonly", "placeholder", "type", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "inputmode"], ga = ["id", "disabled", "readonly", "placeholder", "type", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "inputmode", "rows", "cols"], va = { class: "sq-input-suffix" }, _a = "sq-input", On = /* @__PURE__ */ O({
|
|
5894
5910
|
name: _a,
|
|
5895
5911
|
__name: "input",
|
|
5896
|
-
props: /* @__PURE__ */
|
|
5912
|
+
props: /* @__PURE__ */ ue({
|
|
5897
5913
|
status: {},
|
|
5898
5914
|
round: { type: Boolean, default: void 0 },
|
|
5899
5915
|
prefixIcon: {},
|
|
@@ -5919,20 +5935,20 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5919
5935
|
value: { default: "" },
|
|
5920
5936
|
valueModifiers: {}
|
|
5921
5937
|
}),
|
|
5922
|
-
emits: /* @__PURE__ */
|
|
5938
|
+
emits: /* @__PURE__ */ ue(["focus", "blur", "input", "change"], ["update:value"]),
|
|
5923
5939
|
setup(e, { expose: u, emit: t }) {
|
|
5924
|
-
const n = hu(), o = t, r = e, { inputSize: s, inputRound: c, inputDisabled: i, inputReadonly: a, id: l } = ii(r), d = ae(e, "value"), h = R(!1), p = R(!1), f = de(null), g =
|
|
5940
|
+
const n = hu(), o = t, r = e, { inputSize: s, inputRound: c, inputDisabled: i, inputReadonly: a, id: l } = ii(r), d = ae(e, "value"), h = R(!1), p = R(!1), f = de(null), g = w(() => {
|
|
5925
5941
|
const I = [], P = b(s), B = b(c), N = b(H);
|
|
5926
5942
|
return P !== "md" && I.push(`sq-input--${P}`), r.status && I.push(`is-${r.status}`), B && I.push("is-round"), N && I.push("is-disabled"), I;
|
|
5927
|
-
}),
|
|
5928
|
-
() => r.type === "password" && b(
|
|
5929
|
-
), $ =
|
|
5930
|
-
() => b(
|
|
5931
|
-
), H =
|
|
5943
|
+
}), _ = w(() => b(p) ? rn : sn), k = w(() => b(p) ? "text" : r.type), v = w(() => n.prefix || r.prefixIcon), D = w(() => b(h) && b(d).length), C = w(
|
|
5944
|
+
() => r.type === "password" && b(D)
|
|
5945
|
+
), $ = w(() => r.clearable && b(D)), M = w(() => r.loading ? Su : r.suffixIcon), V = w(
|
|
5946
|
+
() => b(C) || b($) || b(M) || n.suffix
|
|
5947
|
+
), H = w(() => r.loading || b(i)), q = w(() => {
|
|
5932
5948
|
if (r.type === "textarea")
|
|
5933
5949
|
return b(H) || b(a) ? "none" : r.resize;
|
|
5934
5950
|
});
|
|
5935
|
-
function
|
|
5951
|
+
function y(I) {
|
|
5936
5952
|
o("focus", I), !b(a) && (h.value = !0);
|
|
5937
5953
|
}
|
|
5938
5954
|
function x(I) {
|
|
@@ -5941,7 +5957,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5941
5957
|
function A() {
|
|
5942
5958
|
setTimeout(W);
|
|
5943
5959
|
}
|
|
5944
|
-
function
|
|
5960
|
+
function E() {
|
|
5945
5961
|
d.value = "";
|
|
5946
5962
|
}
|
|
5947
5963
|
function z() {
|
|
@@ -5959,7 +5975,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5959
5975
|
class: K(["sq-input", g.value]),
|
|
5960
5976
|
onMousedown: A
|
|
5961
5977
|
}, [
|
|
5962
|
-
|
|
5978
|
+
v.value ? (m(), S("span", ma, [
|
|
5963
5979
|
j(I.$slots, "prefix", {}, () => [
|
|
5964
5980
|
(m(), L(me(r.prefixIcon)))
|
|
5965
5981
|
])
|
|
@@ -5972,7 +5988,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5972
5988
|
disabled: H.value,
|
|
5973
5989
|
readonly: b(a),
|
|
5974
5990
|
placeholder: r.placeholder,
|
|
5975
|
-
type:
|
|
5991
|
+
type: k.value,
|
|
5976
5992
|
maxlength: r.maxlength,
|
|
5977
5993
|
minlength: r.minlength,
|
|
5978
5994
|
autocomplete: r.autocomplete,
|
|
@@ -5982,7 +5998,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5982
5998
|
inputmode: r.inputmode,
|
|
5983
5999
|
ref_key: "inputRef",
|
|
5984
6000
|
ref: f,
|
|
5985
|
-
onFocus:
|
|
6001
|
+
onFocus: y,
|
|
5986
6002
|
onBlur: x,
|
|
5987
6003
|
onInput: P[1] || (P[1] = (B) => o("input", B)),
|
|
5988
6004
|
onChange: P[2] || (P[2] = (B) => o("change", B))
|
|
@@ -5997,7 +6013,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5997
6013
|
disabled: H.value,
|
|
5998
6014
|
readonly: b(a),
|
|
5999
6015
|
placeholder: r.placeholder,
|
|
6000
|
-
type:
|
|
6016
|
+
type: k.value,
|
|
6001
6017
|
maxlength: r.maxlength,
|
|
6002
6018
|
minlength: r.minlength,
|
|
6003
6019
|
autocomplete: r.autocomplete,
|
|
@@ -6009,7 +6025,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6009
6025
|
cols: r.cols,
|
|
6010
6026
|
ref_key: "inputRef",
|
|
6011
6027
|
ref: f,
|
|
6012
|
-
onFocus:
|
|
6028
|
+
onFocus: y,
|
|
6013
6029
|
onBlur: x,
|
|
6014
6030
|
onInput: P[4] || (P[4] = (B) => o("input", B)),
|
|
6015
6031
|
onChange: P[5] || (P[5] = (B) => o("change", B))
|
|
@@ -6017,7 +6033,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6017
6033
|
[n0, d.value]
|
|
6018
6034
|
]),
|
|
6019
6035
|
fe(F("span", va, [
|
|
6020
|
-
|
|
6036
|
+
C.value ? (m(), L(me(_.value), {
|
|
6021
6037
|
key: 0,
|
|
6022
6038
|
class: "sq-input-suffix-pwd",
|
|
6023
6039
|
onMousedown: z
|
|
@@ -6025,7 +6041,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6025
6041
|
$.value ? (m(), L(b(rt), {
|
|
6026
6042
|
key: 1,
|
|
6027
6043
|
class: "sq-input-suffix-clear",
|
|
6028
|
-
onMousedown:
|
|
6044
|
+
onMousedown: E
|
|
6029
6045
|
})) : U("", !0),
|
|
6030
6046
|
j(I.$slots, "suffix", {}, () => [
|
|
6031
6047
|
M.value ? (m(), L(me(M.value), { key: 0 })) : U("", !0)
|
|
@@ -6048,7 +6064,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6048
6064
|
id: {}
|
|
6049
6065
|
},
|
|
6050
6066
|
setup(e, { expose: u }) {
|
|
6051
|
-
const t = e, n = R(!0), o =
|
|
6067
|
+
const t = e, n = R(!0), o = w(() => t.type ? st[t.type] : void 0);
|
|
6052
6068
|
be(() => {
|
|
6053
6069
|
setTimeout(r, t.closeAfter);
|
|
6054
6070
|
});
|
|
@@ -6075,7 +6091,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6075
6091
|
})) : U("", !0),
|
|
6076
6092
|
F("div", {
|
|
6077
6093
|
class: "sq-message-content",
|
|
6078
|
-
textContent:
|
|
6094
|
+
textContent: se(t.message)
|
|
6079
6095
|
}, null, 8, ya)
|
|
6080
6096
|
]),
|
|
6081
6097
|
_: 1
|
|
@@ -6138,7 +6154,7 @@ Aa.forEach((e) => {
|
|
|
6138
6154
|
const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
6139
6155
|
name: Sa,
|
|
6140
6156
|
__name: "pagination-prev",
|
|
6141
|
-
props: /* @__PURE__ */
|
|
6157
|
+
props: /* @__PURE__ */ ue({
|
|
6142
6158
|
disabled: { type: Boolean },
|
|
6143
6159
|
size: {},
|
|
6144
6160
|
maxPage: {}
|
|
@@ -6161,7 +6177,7 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6161
6177
|
}), $a = "sq-pagination-next", Ba = /* @__PURE__ */ O({
|
|
6162
6178
|
name: $a,
|
|
6163
6179
|
__name: "pagination-next",
|
|
6164
|
-
props: /* @__PURE__ */
|
|
6180
|
+
props: /* @__PURE__ */ ue({
|
|
6165
6181
|
disabled: { type: Boolean },
|
|
6166
6182
|
size: {},
|
|
6167
6183
|
maxPage: {}
|
|
@@ -6184,7 +6200,7 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6184
6200
|
}), Ma = { class: "sq-pagination-pager" }, za = "sq-pagination-pager", Ta = /* @__PURE__ */ O({
|
|
6185
6201
|
name: za,
|
|
6186
6202
|
__name: "pagination-pager",
|
|
6187
|
-
props: /* @__PURE__ */
|
|
6203
|
+
props: /* @__PURE__ */ ue({
|
|
6188
6204
|
disabled: { type: Boolean },
|
|
6189
6205
|
size: {},
|
|
6190
6206
|
list: {}
|
|
@@ -6207,7 +6223,7 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6207
6223
|
onClick: (c) => n(s)
|
|
6208
6224
|
}, {
|
|
6209
6225
|
default: Z(() => [
|
|
6210
|
-
iu(
|
|
6226
|
+
iu(se(s), 1)
|
|
6211
6227
|
]),
|
|
6212
6228
|
_: 2
|
|
6213
6229
|
}, 1032, ["type", "size", "disabled", "onClick"])) : (m(), L(b(Q), {
|
|
@@ -6222,7 +6238,7 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6222
6238
|
}), Ra = { class: "sq-pagination" }, La = "sq-pagination", S1 = /* @__PURE__ */ O({
|
|
6223
6239
|
name: La,
|
|
6224
6240
|
__name: "pagination",
|
|
6225
|
-
props: /* @__PURE__ */
|
|
6241
|
+
props: /* @__PURE__ */ ue({
|
|
6226
6242
|
total: { default: 0 },
|
|
6227
6243
|
disabled: { type: Boolean, default: !1 },
|
|
6228
6244
|
size: {},
|
|
@@ -6236,14 +6252,14 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6236
6252
|
}),
|
|
6237
6253
|
emits: ["update:current", "update:pageSize"],
|
|
6238
6254
|
setup(e) {
|
|
6239
|
-
const u = e, t = ae(e, "current"), n = ae(e, "pageSize"), o =
|
|
6255
|
+
const u = e, t = ae(e, "current"), n = ae(e, "pageSize"), o = w(() => Math.ceil(u.total / n.value) || 1), r = w(() => {
|
|
6240
6256
|
const c = [], i = Math.floor(u.pagerCount / 2) - 1;
|
|
6241
6257
|
let a = t.value - i, l = t.value + i;
|
|
6242
6258
|
a < 2 && (a = 2, l = a + i * 2), l > o.value - 1 && (l = o.value - 1, a = l - i * 2);
|
|
6243
6259
|
for (let d = 1; d <= o.value; d++)
|
|
6244
6260
|
d === 1 || d === o.value || d >= a && d <= l ? c.push(d) : (d === a - 1 || d === l + 1) && c.push(0);
|
|
6245
6261
|
return c;
|
|
6246
|
-
}), s =
|
|
6262
|
+
}), s = w(() => {
|
|
6247
6263
|
const c = u.layout ?? ["prev", "pager", "next"], i = [];
|
|
6248
6264
|
for (const a of c)
|
|
6249
6265
|
switch (a) {
|
|
@@ -6478,14 +6494,14 @@ const Ja = async (e, u, t) => {
|
|
|
6478
6494
|
} = Wt(a, n, i), h = n, p = {}, f = 0;
|
|
6479
6495
|
for (let g = 0; g < c.length; g++) {
|
|
6480
6496
|
const {
|
|
6481
|
-
name:
|
|
6482
|
-
fn:
|
|
6497
|
+
name: _,
|
|
6498
|
+
fn: k
|
|
6483
6499
|
} = c[g], {
|
|
6484
|
-
x:
|
|
6485
|
-
y:
|
|
6486
|
-
data:
|
|
6500
|
+
x: v,
|
|
6501
|
+
y: D,
|
|
6502
|
+
data: C,
|
|
6487
6503
|
reset: $
|
|
6488
|
-
} = await
|
|
6504
|
+
} = await k({
|
|
6489
6505
|
x: l,
|
|
6490
6506
|
y: d,
|
|
6491
6507
|
initialPlacement: n,
|
|
@@ -6499,11 +6515,11 @@ const Ja = async (e, u, t) => {
|
|
|
6499
6515
|
floating: u
|
|
6500
6516
|
}
|
|
6501
6517
|
});
|
|
6502
|
-
l =
|
|
6518
|
+
l = v ?? l, d = D ?? d, p = {
|
|
6503
6519
|
...p,
|
|
6504
|
-
[
|
|
6505
|
-
...p[
|
|
6506
|
-
...
|
|
6520
|
+
[_]: {
|
|
6521
|
+
...p[_],
|
|
6522
|
+
...C
|
|
6507
6523
|
}
|
|
6508
6524
|
}, $ && f <= 50 && (f++, typeof $ == "object" && ($.placement && (h = $.placement), $.rects && (a = $.rects === !0 ? await s.getElementRects({
|
|
6509
6525
|
reference: e,
|
|
@@ -6538,17 +6554,17 @@ async function Un(e, u) {
|
|
|
6538
6554
|
elementContext: d = "floating",
|
|
6539
6555
|
altBoundary: h = !1,
|
|
6540
6556
|
padding: p = 0
|
|
6541
|
-
} = Tu(u, e), f = Ya(p),
|
|
6542
|
-
element: (t = await (r.isElement == null ? void 0 : r.isElement(
|
|
6557
|
+
} = Tu(u, e), f = Ya(p), _ = c[h ? d === "floating" ? "reference" : "floating" : d], k = Fu(await r.getClippingRect({
|
|
6558
|
+
element: (t = await (r.isElement == null ? void 0 : r.isElement(_))) == null || t ? _ : _.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
6543
6559
|
boundary: a,
|
|
6544
6560
|
rootBoundary: l,
|
|
6545
6561
|
strategy: i
|
|
6546
|
-
})),
|
|
6562
|
+
})), v = d === "floating" ? {
|
|
6547
6563
|
x: n,
|
|
6548
6564
|
y: o,
|
|
6549
6565
|
width: s.floating.width,
|
|
6550
6566
|
height: s.floating.height
|
|
6551
|
-
} : s.reference,
|
|
6567
|
+
} : s.reference, D = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), C = await (r.isElement == null ? void 0 : r.isElement(D)) ? await (r.getScale == null ? void 0 : r.getScale(D)) || {
|
|
6552
6568
|
x: 1,
|
|
6553
6569
|
y: 1
|
|
6554
6570
|
} : {
|
|
@@ -6556,15 +6572,15 @@ async function Un(e, u) {
|
|
|
6556
6572
|
y: 1
|
|
6557
6573
|
}, $ = Fu(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
6558
6574
|
elements: c,
|
|
6559
|
-
rect:
|
|
6560
|
-
offsetParent:
|
|
6575
|
+
rect: v,
|
|
6576
|
+
offsetParent: D,
|
|
6561
6577
|
strategy: i
|
|
6562
|
-
}) :
|
|
6578
|
+
}) : v);
|
|
6563
6579
|
return {
|
|
6564
|
-
top: (
|
|
6565
|
-
bottom: ($.bottom -
|
|
6566
|
-
left: (
|
|
6567
|
-
right: ($.right -
|
|
6580
|
+
top: (k.top - $.top + f.top) / C.y,
|
|
6581
|
+
bottom: ($.bottom - k.bottom + f.bottom) / C.y,
|
|
6582
|
+
left: (k.left - $.left + f.left) / C.x,
|
|
6583
|
+
right: ($.right - k.right + f.right) / C.x
|
|
6568
6584
|
};
|
|
6569
6585
|
}
|
|
6570
6586
|
const Ka = function(e) {
|
|
@@ -6587,50 +6603,50 @@ const Ka = function(e) {
|
|
|
6587
6603
|
fallbackStrategy: p = "bestFit",
|
|
6588
6604
|
fallbackAxisSideDirection: f = "none",
|
|
6589
6605
|
flipAlignment: g = !0,
|
|
6590
|
-
...
|
|
6606
|
+
..._
|
|
6591
6607
|
} = Tu(e, u);
|
|
6592
6608
|
if ((t = r.arrow) != null && t.alignmentOffset)
|
|
6593
6609
|
return {};
|
|
6594
|
-
const
|
|
6595
|
-
!h && M && $.push(...Ga(c, g, f,
|
|
6596
|
-
const V = [c, ...$], H = await Un(u,
|
|
6597
|
-
let
|
|
6598
|
-
if (l && q.push(H[
|
|
6599
|
-
const z = Va(o, s,
|
|
6610
|
+
const k = Ze(o), v = Te(c), D = Ze(c) === c, C = await (i.isRTL == null ? void 0 : i.isRTL(a.floating)), $ = h || (D || !g ? [Au(c)] : Ua(c)), M = f !== "none";
|
|
6611
|
+
!h && M && $.push(...Ga(c, g, f, C));
|
|
6612
|
+
const V = [c, ...$], H = await Un(u, _), q = [];
|
|
6613
|
+
let y = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
6614
|
+
if (l && q.push(H[k]), d) {
|
|
6615
|
+
const z = Va(o, s, C);
|
|
6600
6616
|
q.push(H[z[0]], H[z[1]]);
|
|
6601
6617
|
}
|
|
6602
|
-
if (
|
|
6618
|
+
if (y = [...y, {
|
|
6603
6619
|
placement: o,
|
|
6604
6620
|
overflows: q
|
|
6605
6621
|
}], !q.every((z) => z <= 0)) {
|
|
6606
6622
|
var x, A;
|
|
6607
6623
|
const z = (((x = r.flip) == null ? void 0 : x.index) || 0) + 1, W = V[z];
|
|
6608
|
-
if (W && (!(d === "alignment" ?
|
|
6624
|
+
if (W && (!(d === "alignment" ? v !== Te(W) : !1) || // We leave the current main axis only if every placement on that axis
|
|
6609
6625
|
// overflows the main axis.
|
|
6610
|
-
|
|
6626
|
+
y.every((P) => Te(P.placement) === v ? P.overflows[0] > 0 : !0)))
|
|
6611
6627
|
return {
|
|
6612
6628
|
data: {
|
|
6613
6629
|
index: z,
|
|
6614
|
-
overflows:
|
|
6630
|
+
overflows: y
|
|
6615
6631
|
},
|
|
6616
6632
|
reset: {
|
|
6617
6633
|
placement: W
|
|
6618
6634
|
}
|
|
6619
6635
|
};
|
|
6620
|
-
let G = (A =
|
|
6636
|
+
let G = (A = y.filter((I) => I.overflows[0] <= 0).sort((I, P) => I.overflows[1] - P.overflows[1])[0]) == null ? void 0 : A.placement;
|
|
6621
6637
|
if (!G)
|
|
6622
6638
|
switch (p) {
|
|
6623
6639
|
case "bestFit": {
|
|
6624
|
-
var
|
|
6625
|
-
const I = (
|
|
6640
|
+
var E;
|
|
6641
|
+
const I = (E = y.filter((P) => {
|
|
6626
6642
|
if (M) {
|
|
6627
6643
|
const B = Te(P.placement);
|
|
6628
|
-
return B ===
|
|
6644
|
+
return B === v || // Create a bias to the `y` side axis due to horizontal
|
|
6629
6645
|
// reading directions favoring greater width.
|
|
6630
6646
|
B === "y";
|
|
6631
6647
|
}
|
|
6632
6648
|
return !0;
|
|
6633
|
-
}).map((P) => [P.placement, P.overflows.filter((B) => B > 0).reduce((B, N) => B + N, 0)]).sort((P, B) => P[1] - B[1])[0]) == null ? void 0 :
|
|
6649
|
+
}).map((P) => [P.placement, P.overflows.filter((B) => B > 0).reduce((B, N) => B + N, 0)]).sort((P, B) => P[1] - B[1])[0]) == null ? void 0 : E[0];
|
|
6634
6650
|
I && (G = I);
|
|
6635
6651
|
break;
|
|
6636
6652
|
}
|
|
@@ -6711,14 +6727,14 @@ const ul = function(e) {
|
|
|
6711
6727
|
mainAxis: r = !0,
|
|
6712
6728
|
crossAxis: s = !1,
|
|
6713
6729
|
limiter: c = {
|
|
6714
|
-
fn: (
|
|
6730
|
+
fn: (_) => {
|
|
6715
6731
|
let {
|
|
6716
|
-
x:
|
|
6717
|
-
y:
|
|
6718
|
-
} =
|
|
6732
|
+
x: k,
|
|
6733
|
+
y: v
|
|
6734
|
+
} = _;
|
|
6719
6735
|
return {
|
|
6720
|
-
x:
|
|
6721
|
-
y:
|
|
6736
|
+
x: k,
|
|
6737
|
+
y: v
|
|
6722
6738
|
};
|
|
6723
6739
|
}
|
|
6724
6740
|
},
|
|
@@ -6729,12 +6745,12 @@ const ul = function(e) {
|
|
|
6729
6745
|
}, l = await Un(u, i), d = Te(Ze(o)), h = Nn(d);
|
|
6730
6746
|
let p = a[h], f = a[d];
|
|
6731
6747
|
if (r) {
|
|
6732
|
-
const
|
|
6733
|
-
p = Ut(
|
|
6748
|
+
const _ = h === "y" ? "top" : "left", k = h === "y" ? "bottom" : "right", v = p + l[_], D = p - l[k];
|
|
6749
|
+
p = Ut(v, p, D);
|
|
6734
6750
|
}
|
|
6735
6751
|
if (s) {
|
|
6736
|
-
const
|
|
6737
|
-
f = Ut(
|
|
6752
|
+
const _ = d === "y" ? "top" : "left", k = d === "y" ? "bottom" : "right", v = f + l[_], D = f - l[k];
|
|
6753
|
+
f = Ut(v, f, D);
|
|
6738
6754
|
}
|
|
6739
6755
|
const g = c.fn({
|
|
6740
6756
|
...u,
|
|
@@ -6919,8 +6935,8 @@ function Ve(e, u, t, n) {
|
|
|
6919
6935
|
const h = pe(r), p = n && ke(n) ? pe(n) : n;
|
|
6920
6936
|
let f = h, g = ot(f);
|
|
6921
6937
|
for (; g && n && p !== f; ) {
|
|
6922
|
-
const
|
|
6923
|
-
i *=
|
|
6938
|
+
const _ = Ke(g), k = g.getBoundingClientRect(), v = ye(g), D = k.left + (g.clientLeft + parseFloat(v.paddingLeft)) * _.x, C = k.top + (g.clientTop + parseFloat(v.paddingTop)) * _.y;
|
|
6939
|
+
i *= _.x, a *= _.y, l *= _.x, d *= _.y, i += D, a += C, f = pe(g), g = ot(f);
|
|
6924
6940
|
}
|
|
6925
6941
|
}
|
|
6926
6942
|
return Fu({
|
|
@@ -7177,30 +7193,30 @@ function Al(e, u) {
|
|
|
7177
7193
|
} = a;
|
|
7178
7194
|
if (c || u(), !h || !p)
|
|
7179
7195
|
return;
|
|
7180
|
-
const f = ku(d), g = ku(o.clientWidth - (l + h)),
|
|
7181
|
-
rootMargin: -f + "px " + -g + "px " + -
|
|
7196
|
+
const f = ku(d), g = ku(o.clientWidth - (l + h)), _ = ku(o.clientHeight - (d + p)), k = ku(l), D = {
|
|
7197
|
+
rootMargin: -f + "px " + -g + "px " + -_ + "px " + -k + "px",
|
|
7182
7198
|
threshold: Ne(0, Du(1, i)) || 1
|
|
7183
7199
|
};
|
|
7184
|
-
let
|
|
7200
|
+
let C = !0;
|
|
7185
7201
|
function $(M) {
|
|
7186
7202
|
const V = M[0].intersectionRatio;
|
|
7187
7203
|
if (V !== i) {
|
|
7188
|
-
if (!
|
|
7204
|
+
if (!C)
|
|
7189
7205
|
return s();
|
|
7190
7206
|
V ? s(!1, V) : n = setTimeout(() => {
|
|
7191
7207
|
s(!1, 1e-7);
|
|
7192
7208
|
}, 1e3);
|
|
7193
7209
|
}
|
|
7194
|
-
V === 1 && !Kn(a, e.getBoundingClientRect()) && s(),
|
|
7210
|
+
V === 1 && !Kn(a, e.getBoundingClientRect()) && s(), C = !1;
|
|
7195
7211
|
}
|
|
7196
7212
|
try {
|
|
7197
7213
|
t = new IntersectionObserver($, {
|
|
7198
|
-
...
|
|
7214
|
+
...D,
|
|
7199
7215
|
// Handle <iframe>s
|
|
7200
7216
|
root: o.ownerDocument
|
|
7201
7217
|
});
|
|
7202
7218
|
} catch {
|
|
7203
|
-
t = new IntersectionObserver($,
|
|
7219
|
+
t = new IntersectionObserver($, D);
|
|
7204
7220
|
}
|
|
7205
7221
|
t.observe(e);
|
|
7206
7222
|
}
|
|
@@ -7215,31 +7231,31 @@ function Fl(e, u, t, n) {
|
|
|
7215
7231
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
7216
7232
|
animationFrame: i = !1
|
|
7217
7233
|
} = n, a = vt(e), l = o || r ? [...a ? pu(a) : [], ...pu(u)] : [];
|
|
7218
|
-
l.forEach((
|
|
7219
|
-
o &&
|
|
7234
|
+
l.forEach((k) => {
|
|
7235
|
+
o && k.addEventListener("scroll", t, {
|
|
7220
7236
|
passive: !0
|
|
7221
|
-
}), r &&
|
|
7237
|
+
}), r && k.addEventListener("resize", t);
|
|
7222
7238
|
});
|
|
7223
7239
|
const d = a && c ? Al(a, t) : null;
|
|
7224
7240
|
let h = -1, p = null;
|
|
7225
|
-
s && (p = new ResizeObserver((
|
|
7226
|
-
let [
|
|
7227
|
-
|
|
7228
|
-
var
|
|
7229
|
-
(
|
|
7241
|
+
s && (p = new ResizeObserver((k) => {
|
|
7242
|
+
let [v] = k;
|
|
7243
|
+
v && v.target === a && p && (p.unobserve(u), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
7244
|
+
var D;
|
|
7245
|
+
(D = p) == null || D.observe(u);
|
|
7230
7246
|
})), t();
|
|
7231
7247
|
}), a && !i && p.observe(a), p.observe(u));
|
|
7232
7248
|
let f, g = i ? Ve(e) : null;
|
|
7233
|
-
i &&
|
|
7234
|
-
function
|
|
7235
|
-
const
|
|
7236
|
-
g && !Kn(g,
|
|
7249
|
+
i && _();
|
|
7250
|
+
function _() {
|
|
7251
|
+
const k = Ve(e);
|
|
7252
|
+
g && !Kn(g, k) && t(), g = k, f = requestAnimationFrame(_);
|
|
7237
7253
|
}
|
|
7238
7254
|
return t(), () => {
|
|
7239
|
-
var
|
|
7240
|
-
l.forEach((
|
|
7241
|
-
o &&
|
|
7242
|
-
}), d == null || d(), (
|
|
7255
|
+
var k;
|
|
7256
|
+
l.forEach((v) => {
|
|
7257
|
+
o && v.removeEventListener("scroll", t), r && v.removeEventListener("resize", t);
|
|
7258
|
+
}), d == null || d(), (k = p) == null || k.disconnect(), p = null, i && cancelAnimationFrame(f);
|
|
7243
7259
|
};
|
|
7244
7260
|
}
|
|
7245
7261
|
const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
@@ -7257,7 +7273,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7257
7273
|
}, Ml = "sq-popover", zl = /* @__PURE__ */ O({
|
|
7258
7274
|
name: Ml,
|
|
7259
7275
|
__name: "popover",
|
|
7260
|
-
props: /* @__PURE__ */
|
|
7276
|
+
props: /* @__PURE__ */ ue({
|
|
7261
7277
|
placement: { default: "top" },
|
|
7262
7278
|
offset: {},
|
|
7263
7279
|
teleported: { type: Boolean, default: !0 },
|
|
@@ -7276,40 +7292,40 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7276
7292
|
const { getCssVar: u } = an(), { nextZIndex: t } = ct(), n = parseInt(u("--sq-padding-sm")), o = parseInt(u("--sq-padding-md"));
|
|
7277
7293
|
let r, s;
|
|
7278
7294
|
const c = e, i = ae(e, "visible"), a = R(0), l = R({}), d = de(null), h = de(null);
|
|
7279
|
-
ie(i, (
|
|
7280
|
-
|
|
7295
|
+
ie(i, (C) => {
|
|
7296
|
+
C ? (a.value = t(), v(), s = Fl(
|
|
7281
7297
|
d.value.$el,
|
|
7282
7298
|
h.value,
|
|
7283
|
-
|
|
7299
|
+
v
|
|
7284
7300
|
)) : s == null || s();
|
|
7285
7301
|
}), be(() => {
|
|
7286
|
-
|
|
7302
|
+
v();
|
|
7287
7303
|
}), Ue(() => {
|
|
7288
|
-
|
|
7304
|
+
D(), document.removeEventListener("click", k);
|
|
7289
7305
|
});
|
|
7290
7306
|
function p() {
|
|
7291
|
-
c.trigger !== "hover" || c.disabled || (
|
|
7292
|
-
|
|
7307
|
+
c.trigger !== "hover" || c.disabled || (D(), r = setTimeout(() => {
|
|
7308
|
+
_(!1);
|
|
7293
7309
|
}, c.showAfter));
|
|
7294
7310
|
}
|
|
7295
7311
|
function f() {
|
|
7296
|
-
c.trigger === "hover" && (
|
|
7297
|
-
|
|
7312
|
+
c.trigger === "hover" && (D(), r = setTimeout(() => {
|
|
7313
|
+
k();
|
|
7298
7314
|
}, c.hideAfter));
|
|
7299
7315
|
}
|
|
7300
|
-
function g(
|
|
7301
|
-
c.trigger === "click" && !c.disabled && !i.value && (
|
|
7316
|
+
function g(C) {
|
|
7317
|
+
c.trigger === "click" && !c.disabled && !i.value && (C.stopPropagation(), _());
|
|
7302
7318
|
}
|
|
7303
|
-
function
|
|
7304
|
-
i.value = !0,
|
|
7319
|
+
function _(C = !0) {
|
|
7320
|
+
i.value = !0, C && document.addEventListener("click", k);
|
|
7305
7321
|
}
|
|
7306
|
-
function
|
|
7307
|
-
i.value = !1, document.removeEventListener("click",
|
|
7322
|
+
function k() {
|
|
7323
|
+
i.value = !1, document.removeEventListener("click", k);
|
|
7308
7324
|
}
|
|
7309
|
-
async function
|
|
7310
|
-
var q,
|
|
7311
|
-
const
|
|
7312
|
-
if (
|
|
7325
|
+
async function v() {
|
|
7326
|
+
var q, y;
|
|
7327
|
+
const C = typeof ((q = d.value) == null ? void 0 : q.$el.getBoundingClientRect), $ = typeof ((y = h.value) == null ? void 0 : y.getBoundingClientRect);
|
|
7328
|
+
if (C !== "function" || $ !== "function") return;
|
|
7313
7329
|
const M = await Bl(d.value.$el, h.value, {
|
|
7314
7330
|
placement: c.placement,
|
|
7315
7331
|
middleware: [
|
|
@@ -7323,13 +7339,13 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7323
7339
|
top: `${H}px`
|
|
7324
7340
|
};
|
|
7325
7341
|
}
|
|
7326
|
-
function
|
|
7342
|
+
function D() {
|
|
7327
7343
|
r && (clearTimeout(r), r = void 0);
|
|
7328
7344
|
}
|
|
7329
|
-
return (
|
|
7345
|
+
return (C, $) => (m(), S(xe, null, [
|
|
7330
7346
|
T(b(Oa), {
|
|
7331
|
-
class: K(["sq-popover-trigger",
|
|
7332
|
-
style: ee(
|
|
7347
|
+
class: K(["sq-popover-trigger", C.$attrs.class]),
|
|
7348
|
+
style: ee(C.$attrs.style),
|
|
7333
7349
|
ref_key: "triggerRef",
|
|
7334
7350
|
ref: d,
|
|
7335
7351
|
onMouseenter: p,
|
|
@@ -7337,7 +7353,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7337
7353
|
onClick: g
|
|
7338
7354
|
}, {
|
|
7339
7355
|
default: Z(() => [
|
|
7340
|
-
j(
|
|
7356
|
+
j(C.$slots, "reference")
|
|
7341
7357
|
]),
|
|
7342
7358
|
_: 3
|
|
7343
7359
|
}, 8, ["class", "style"]),
|
|
@@ -7350,14 +7366,14 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7350
7366
|
}, {
|
|
7351
7367
|
default: Z(() => [
|
|
7352
7368
|
fe(F("div", {
|
|
7353
|
-
class: K(["sq-popover",
|
|
7369
|
+
class: K(["sq-popover", C.popoverClass]),
|
|
7354
7370
|
style: ee({ ...l.value, zIndex: a.value }),
|
|
7355
7371
|
ref_key: "popverRef",
|
|
7356
7372
|
ref: h,
|
|
7357
7373
|
onClick: $[0] || ($[0] = Me(() => {
|
|
7358
7374
|
}, ["stop"]))
|
|
7359
7375
|
}, [
|
|
7360
|
-
j(
|
|
7376
|
+
j(C.$slots, "default")
|
|
7361
7377
|
], 6), [
|
|
7362
7378
|
[He, i.value]
|
|
7363
7379
|
])
|
|
@@ -7384,13 +7400,13 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7384
7400
|
label: { type: Boolean, default: !0 }
|
|
7385
7401
|
},
|
|
7386
7402
|
setup(e) {
|
|
7387
|
-
const u = new ResizeObserver(a), t = e, n = R(100), o = de(null), r =
|
|
7403
|
+
const u = new ResizeObserver(a), t = e, n = R(100), o = de(null), r = w(() => {
|
|
7388
7404
|
const l = [];
|
|
7389
7405
|
return t.color || l.push(`is-${t.type}`), t.variant && l.push(`is-${t.variant}`), l;
|
|
7390
|
-
}), s =
|
|
7406
|
+
}), s = w(() => {
|
|
7391
7407
|
const l = t.max - t.min;
|
|
7392
7408
|
return (t.value - t.min) * 100 / l;
|
|
7393
|
-
}), c =
|
|
7409
|
+
}), c = w(() => `${Math.round(s.value * 10) / 10} %`), i = w(() => {
|
|
7394
7410
|
const l = {};
|
|
7395
7411
|
if (l["--progress-stroke"] = `${t.stroke}px`, !t.variant)
|
|
7396
7412
|
l["--progress-value"] = `${s.value}%`;
|
|
@@ -7438,7 +7454,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7438
7454
|
t.label ? (m(), S("div", Tl, [
|
|
7439
7455
|
j(l.$slots, "default", { percentage: s.value }, () => [
|
|
7440
7456
|
F("span", {
|
|
7441
|
-
textContent:
|
|
7457
|
+
textContent: se(c.value)
|
|
7442
7458
|
}, null, 8, Rl)
|
|
7443
7459
|
])
|
|
7444
7460
|
])) : U("", !0)
|
|
@@ -7451,7 +7467,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7451
7467
|
}, Nl = ["textContent"], Zl = "sq-radio", Vl = /* @__PURE__ */ O({
|
|
7452
7468
|
name: Zl,
|
|
7453
7469
|
__name: "radio",
|
|
7454
|
-
props: /* @__PURE__ */
|
|
7470
|
+
props: /* @__PURE__ */ ue({
|
|
7455
7471
|
form: {},
|
|
7456
7472
|
name: {},
|
|
7457
7473
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -7464,7 +7480,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7464
7480
|
checked: { type: Boolean, default: !1 },
|
|
7465
7481
|
checkedModifiers: {}
|
|
7466
7482
|
}),
|
|
7467
|
-
emits: /* @__PURE__ */
|
|
7483
|
+
emits: /* @__PURE__ */ ue(["change"], ["update:checked"]),
|
|
7468
7484
|
setup(e, { emit: u }) {
|
|
7469
7485
|
const t = u, n = e, {
|
|
7470
7486
|
radioSize: o,
|
|
@@ -7473,10 +7489,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7473
7489
|
radioName: c,
|
|
7474
7490
|
radioVariant: i,
|
|
7475
7491
|
groupContext: a
|
|
7476
|
-
} = ai(n), l = R(), d = ae(e, "checked"), h =
|
|
7477
|
-
const f = [], g = b(o),
|
|
7478
|
-
return g !== "md" && f.push(`sq-selection--${g}`), p.value && f.push("is-checked"),
|
|
7479
|
-
}), p =
|
|
7492
|
+
} = ai(n), l = R(), d = ae(e, "checked"), h = w(() => {
|
|
7493
|
+
const f = [], g = b(o), _ = b(r), k = b(i);
|
|
7494
|
+
return g !== "md" && f.push(`sq-selection--${g}`), p.value && f.push("is-checked"), _ && f.push("is-disabled"), k && f.push(`is-${k}`), f;
|
|
7495
|
+
}), p = w(() => a ? b(a).checked === n.value : d.value);
|
|
7480
7496
|
return ie(l, (f) => {
|
|
7481
7497
|
d.value = f === n.value;
|
|
7482
7498
|
}), ie(p, (f) => {
|
|
@@ -7498,8 +7514,8 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7498
7514
|
form: b(s),
|
|
7499
7515
|
value: n.value,
|
|
7500
7516
|
disabled: b(r),
|
|
7501
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
7502
|
-
onChange: g[1] || (g[1] = (
|
|
7517
|
+
"onUpdate:modelValue": g[0] || (g[0] = (_) => l.value = _),
|
|
7518
|
+
onChange: g[1] || (g[1] = (_) => t("change", p.value))
|
|
7503
7519
|
}, null, 40, Ol), [
|
|
7504
7520
|
[en, l.value]
|
|
7505
7521
|
]),
|
|
@@ -7507,7 +7523,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7507
7523
|
n.label ? (m(), S("span", {
|
|
7508
7524
|
key: 1,
|
|
7509
7525
|
class: "sq-selection-label",
|
|
7510
|
-
textContent:
|
|
7526
|
+
textContent: se(n.label)
|
|
7511
7527
|
}, null, 8, Nl)) : U("", !0)
|
|
7512
7528
|
], 2));
|
|
7513
7529
|
}
|
|
@@ -7525,15 +7541,15 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7525
7541
|
},
|
|
7526
7542
|
emits: ["change", "update:value"],
|
|
7527
7543
|
setup(e, { emit: u }) {
|
|
7528
|
-
const { nextId: t } = qu(), n = u, o = e, r = R(o.value), s =
|
|
7544
|
+
const { nextId: t } = qu(), n = u, o = e, r = R(o.value), s = w(() => o.name ?? `sq-radio-${t()}`);
|
|
7529
7545
|
nu(
|
|
7530
7546
|
Qn,
|
|
7531
7547
|
R({
|
|
7532
|
-
form:
|
|
7548
|
+
form: re(o, "form"),
|
|
7533
7549
|
name: s,
|
|
7534
|
-
disabled:
|
|
7535
|
-
size:
|
|
7536
|
-
variant:
|
|
7550
|
+
disabled: re(o, "disabled"),
|
|
7551
|
+
size: re(o, "size"),
|
|
7552
|
+
variant: re(o, "variant"),
|
|
7537
7553
|
checked: r,
|
|
7538
7554
|
toggleItem: c
|
|
7539
7555
|
})
|
|
@@ -7569,22 +7585,22 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7569
7585
|
},
|
|
7570
7586
|
emits: ["change", "update:value"],
|
|
7571
7587
|
setup(e, { emit: u }) {
|
|
7572
|
-
const { nextId: t } = qu(), n = u, o = e, r = R(o.value), s = R(), c = R(), i =
|
|
7588
|
+
const { nextId: t } = qu(), n = u, o = e, r = R(o.value), s = R(), c = R(), i = w(() => o.items.length && typeof o.items[0] == "string" ? o.items.map((f) => ({
|
|
7573
7589
|
text: f,
|
|
7574
7590
|
value: f
|
|
7575
|
-
})) : o.items), a =
|
|
7591
|
+
})) : o.items), a = w(() => {
|
|
7576
7592
|
const f = [];
|
|
7577
7593
|
return o.size !== "md" && f.push(`sq-segmented--${o.size}`), o.round && f.push("is-round"), f;
|
|
7578
|
-
}), l =
|
|
7594
|
+
}), l = w(() => {
|
|
7579
7595
|
const f = {};
|
|
7580
7596
|
return s.value && (f.width = `${s.value}px`), c.value && (f.left = `${c.value}px`), f;
|
|
7581
|
-
}), d =
|
|
7597
|
+
}), d = w(() => o.name ?? `sq-segmented-${t()}`);
|
|
7582
7598
|
nu(
|
|
7583
7599
|
e0,
|
|
7584
7600
|
R({
|
|
7585
7601
|
name: d,
|
|
7586
|
-
disabled:
|
|
7587
|
-
size:
|
|
7602
|
+
disabled: re(o, "disabled"),
|
|
7603
|
+
size: re(o, "size"),
|
|
7588
7604
|
active: r,
|
|
7589
7605
|
toggleItem: h,
|
|
7590
7606
|
updateThumb: p
|
|
@@ -7614,9 +7630,9 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7614
7630
|
style: ee(l.value)
|
|
7615
7631
|
}, null, 4),
|
|
7616
7632
|
j(f.$slots, "default", {}, () => [
|
|
7617
|
-
(m(!0), S(xe, null, je(i.value, (
|
|
7618
|
-
key:
|
|
7619
|
-
}, { ref_for: !0 },
|
|
7633
|
+
(m(!0), S(xe, null, je(i.value, (_) => (m(), L(b(Jl), qe({
|
|
7634
|
+
key: _.text
|
|
7635
|
+
}, { ref_for: !0 }, _), null, 16))), 128))
|
|
7620
7636
|
])
|
|
7621
7637
|
], 2));
|
|
7622
7638
|
}
|
|
@@ -7630,10 +7646,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7630
7646
|
value: {}
|
|
7631
7647
|
},
|
|
7632
7648
|
setup(e) {
|
|
7633
|
-
const u = e, { segmentedDisabled: t, parentContext: n } = li(u), o = R(), r = de(null), s =
|
|
7649
|
+
const u = e, { segmentedDisabled: t, parentContext: n } = li(u), o = R(), r = de(null), s = w(() => {
|
|
7634
7650
|
const l = [], d = b(t);
|
|
7635
7651
|
return c.value && l.push("is-active"), d && l.push("is-disabled"), l;
|
|
7636
|
-
}), c =
|
|
7652
|
+
}), c = w(() => b(n).active === u.value), i = w(() => b(n).size !== "sm" ? "md" : "sm");
|
|
7637
7653
|
ie(c, (l) => {
|
|
7638
7654
|
if (l) {
|
|
7639
7655
|
if (o.value = u.value ?? "on", !n) return;
|
|
@@ -7666,7 +7682,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7666
7682
|
T(b(Oe), { size: i.value }, {
|
|
7667
7683
|
default: Z(() => [
|
|
7668
7684
|
u.icon ? (m(), L(me(u.icon), { key: 0 })) : U("", !0),
|
|
7669
|
-
iu(" " +
|
|
7685
|
+
iu(" " + se(u.text), 1)
|
|
7670
7686
|
]),
|
|
7671
7687
|
_: 1
|
|
7672
7688
|
}, 8, ["size"])
|
|
@@ -7679,7 +7695,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7679
7695
|
), Kl = ["id", "autofocus", "name", "form", "disabled"], Ql = { class: "sq-switch-track" }, e1 = { class: "sq-switch-thumb" }, u1 = "sq-switch", t1 = /* @__PURE__ */ O({
|
|
7680
7696
|
name: u1,
|
|
7681
7697
|
__name: "switch",
|
|
7682
|
-
props: /* @__PURE__ */
|
|
7698
|
+
props: /* @__PURE__ */ ue({
|
|
7683
7699
|
form: {},
|
|
7684
7700
|
name: {},
|
|
7685
7701
|
disabled: { type: Boolean },
|
|
@@ -7691,9 +7707,9 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7691
7707
|
checked: { type: Boolean, default: !1 },
|
|
7692
7708
|
checkedModifiers: {}
|
|
7693
7709
|
}),
|
|
7694
|
-
emits: /* @__PURE__ */
|
|
7710
|
+
emits: /* @__PURE__ */ ue(["change", "click"], ["update:checked"]),
|
|
7695
7711
|
setup(e, { emit: u }) {
|
|
7696
|
-
const t = u, n = e, { switchSize: o, switchDisabled: r, id: s } = di(n), c = ae(e, "checked"), i =
|
|
7712
|
+
const t = u, n = e, { switchSize: o, switchDisabled: r, id: s } = di(n), c = ae(e, "checked"), i = w(() => {
|
|
7697
7713
|
const a = [], l = b(o), d = b(r);
|
|
7698
7714
|
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;
|
|
7699
7715
|
});
|
|
@@ -7730,10 +7746,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7730
7746
|
size: { default: "md" }
|
|
7731
7747
|
},
|
|
7732
7748
|
setup(e) {
|
|
7733
|
-
const u = e, t =
|
|
7749
|
+
const u = e, t = w(() => {
|
|
7734
7750
|
const o = [];
|
|
7735
7751
|
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;
|
|
7736
|
-
}), n =
|
|
7752
|
+
}), n = w(() => u.size === "lg" ? "md" : "sm");
|
|
7737
7753
|
return (o, r) => (m(), L(b(Oe), {
|
|
7738
7754
|
class: K(["sq-tag", t.value]),
|
|
7739
7755
|
size: n.value
|
|
@@ -7755,10 +7771,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7755
7771
|
},
|
|
7756
7772
|
emits: ["change"],
|
|
7757
7773
|
setup(e, { emit: u }) {
|
|
7758
|
-
const t = u, n = e, o =
|
|
7774
|
+
const t = u, n = e, o = w(() => {
|
|
7759
7775
|
const s = [];
|
|
7760
7776
|
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;
|
|
7761
|
-
}), r =
|
|
7777
|
+
}), r = w(() => n.size === "lg" ? "md" : "sm");
|
|
7762
7778
|
return (s, c) => (m(), L(b(Oe), {
|
|
7763
7779
|
class: K(["sq-check-tag", o.value]),
|
|
7764
7780
|
size: r.value,
|
|
@@ -7778,10 +7794,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7778
7794
|
size: { default: "md" }
|
|
7779
7795
|
},
|
|
7780
7796
|
setup(e) {
|
|
7781
|
-
const u = e, t =
|
|
7797
|
+
const u = e, t = w(() => {
|
|
7782
7798
|
const r = [];
|
|
7783
7799
|
return u.size !== "md" && r.push(`sq-text--${u.size}`), u.ellipsis !== void 0 && u.ellipsis !== !1 && r.push(n.value > 1 ? "multi-line" : "single-line"), r;
|
|
7784
|
-
}), n =
|
|
7800
|
+
}), n = w(() => typeof u.ellipsis == "number" ? Number(Math.max(u.ellipsis, 1).toFixed(0)) : 1), o = w(
|
|
7785
7801
|
() => u.ellipsis ? `--row-num: ${n.value}` : ""
|
|
7786
7802
|
);
|
|
7787
7803
|
return (r, s) => (m(), S("span", {
|
|
@@ -7799,7 +7815,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7799
7815
|
variant: {}
|
|
7800
7816
|
},
|
|
7801
7817
|
setup(e) {
|
|
7802
|
-
const u = e, t =
|
|
7818
|
+
const u = e, t = w(() => {
|
|
7803
7819
|
const n = [];
|
|
7804
7820
|
return u.variant && n.push(`is-${u.variant}`), n.push(`align-${u.align}`), n;
|
|
7805
7821
|
});
|
|
@@ -7821,10 +7837,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7821
7837
|
title: {}
|
|
7822
7838
|
},
|
|
7823
7839
|
setup(e) {
|
|
7824
|
-
const u = e, t =
|
|
7840
|
+
const u = e, t = w(() => {
|
|
7825
7841
|
const o = [];
|
|
7826
7842
|
return u.type && o.push(`is-${u.type}`), u.hollow && o.push("is-hollow"), o;
|
|
7827
|
-
}), n =
|
|
7843
|
+
}), n = w(() => {
|
|
7828
7844
|
const o = {};
|
|
7829
7845
|
return u.color && (o["--timeline-dot-color"] = u.color), o;
|
|
7830
7846
|
});
|
|
@@ -7839,12 +7855,12 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7839
7855
|
u.title ? (m(), S("h2", {
|
|
7840
7856
|
key: 0,
|
|
7841
7857
|
class: "content-title",
|
|
7842
|
-
textContent:
|
|
7858
|
+
textContent: se(u.title)
|
|
7843
7859
|
}, null, 8, a1)) : U("", !0),
|
|
7844
7860
|
u.timestamp ? (m(), S("span", {
|
|
7845
7861
|
key: 1,
|
|
7846
7862
|
class: "content-time",
|
|
7847
|
-
textContent:
|
|
7863
|
+
textContent: se(u.timestamp)
|
|
7848
7864
|
}, null, 8, l1)) : U("", !0),
|
|
7849
7865
|
F("div", d1, [
|
|
7850
7866
|
j(o.$slots, "default")
|
|
@@ -7864,7 +7880,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7864
7880
|
popoverClass: {}
|
|
7865
7881
|
},
|
|
7866
7882
|
setup(e) {
|
|
7867
|
-
const u = e, t =
|
|
7883
|
+
const u = e, t = w(() => {
|
|
7868
7884
|
const n = ["sq-tooltip"], o = u.popoverClass;
|
|
7869
7885
|
return Array.isArray(o) ? n.push(...o) : typeof o == "string" && n.push(o), n;
|
|
7870
7886
|
});
|
|
@@ -7882,7 +7898,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7882
7898
|
]),
|
|
7883
7899
|
default: Z(() => [
|
|
7884
7900
|
F("span", {
|
|
7885
|
-
textContent:
|
|
7901
|
+
textContent: se(u.tip)
|
|
7886
7902
|
}, null, 8, p1)
|
|
7887
7903
|
]),
|
|
7888
7904
|
_: 3
|
|
@@ -7920,9 +7936,9 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7920
7936
|
}
|
|
7921
7937
|
function l(h) {
|
|
7922
7938
|
const p = h ?? new FileList(), f = [], g = o.max ? Math.min(p.length, o.max) : p.length;
|
|
7923
|
-
for (let
|
|
7924
|
-
const
|
|
7925
|
-
f.push(
|
|
7939
|
+
for (let _ = 0; _ < g; _++) {
|
|
7940
|
+
const k = p[_];
|
|
7941
|
+
f.push(k);
|
|
7926
7942
|
}
|
|
7927
7943
|
n("change", f);
|
|
7928
7944
|
}
|