@deep-eye/core 1.3.71 → 1.3.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{ChartRenderer-QeMgqf38.js → ChartRenderer-BTGNnckl.js} +1 -1
- package/dist/{ChartRenderer-D5W6F19v.cjs → ChartRenderer-CK0eRRAe.cjs} +1 -1
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
- package/dist/{docx-preview-CLBs49He.js → docx-preview-7EJVIsVS.js} +1 -1
- package/dist/{docx-preview-Ccc9Z26L.cjs → docx-preview-BO5S91m9.cjs} +1 -1
- package/dist/{index-CPj2B8fk.cjs → index-BIcJodRn.cjs} +1 -1
- package/dist/{index-ByPGK6Am.cjs → index-Blgkz38u.cjs} +38 -38
- package/dist/{index-D4fmOI8b.js → index-Dgj9NCyc.js} +593 -595
- package/dist/{index-DlLfxcWd.js → index-NEbpKrI9.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{papaparse.min-BQr65YVX.cjs → papaparse.min-2hvgfsNg.cjs} +1 -1
- package/dist/{papaparse.min-CGY2JnhS.js → papaparse.min-D21Cihob.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var WR = Object.defineProperty;
|
|
2
2
|
var VR = (e, t, n) => t in e ? WR(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var ir = (e, t, n) => VR(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { computed as x, unref as $, ref as O, shallowRef as Bn, render as al, h as _o, defineComponent as Re, useModel as zo, watch as xe, nextTick as dt, onMounted as Wn, onBeforeUnmount as gn, openBlock as y, createElementBlock as k, normalizeStyle as Ut, createElementVNode as S, normalizeClass as Fe, renderSlot as ut, Fragment as ze, toDisplayString as re, createCommentVNode as X, createStaticVNode as pl, withDirectives as yo, withModifiers as At, withKeys as Gn, vModelText as ll, mergeModels as so, provide as Si, inject as Fs, toValue as
|
|
4
|
+
import { computed as x, unref as $, ref as O, shallowRef as Bn, render as al, h as _o, defineComponent as Re, useModel as zo, watch as xe, nextTick as dt, onMounted as Wn, onBeforeUnmount as gn, openBlock as y, createElementBlock as k, normalizeStyle as Ut, createElementVNode as S, normalizeClass as Fe, renderSlot as ut, Fragment as ze, toDisplayString as re, createCommentVNode as X, createStaticVNode as pl, withDirectives as yo, withModifiers as At, withKeys as Gn, vModelText as ll, mergeModels as so, provide as Si, inject as Fs, toValue as _n, getCurrentScope as qR, onScopeDispose as ZR, renderList as ht, createBlock as he, resolveDynamicComponent as Co, createVNode as ve, withCtx as qe, createTextVNode as xr, mergeProps as as, Transition as Ss, createSlots as eo, normalizeProps as Er, guardReactiveProps as Or, toRef as v1, Teleport as Gi, cloneVNode as XR, useTemplateRef as Eu, markRaw as Rd, shallowReactive as _9, watchEffect as YR, onUnmounted as Mu, vShow as Ai, defineAsyncComponent as Ly, TransitionGroup as KR, useSlots as Ny, isRef as Py, onUpdated as JR, reactive as B4, Suspense as QR, useId as eO, effectScope as tO } from "vue";
|
|
5
5
|
import * as jt from "d3";
|
|
6
6
|
import { gsap as er } from "gsap";
|
|
7
7
|
import { useManualRefHistory as nO, cloneFnJSON as F4, useResizeObserver as Uu, useEventListener as y1, useIntersectionObserver as xh, useVirtualList as rO, onClickOutside as A9, useScrollLock as oO, usePreferredReducedMotion as E9, useDebounceFn as M9, useTimeoutFn as T9, useStorage as sO } from "@vueuse/core";
|
|
@@ -1660,8 +1660,8 @@ const LL = {
|
|
|
1660
1660
|
maxExpandedDepth: ue
|
|
1661
1661
|
});
|
|
1662
1662
|
}, Dt = (U) => {
|
|
1663
|
-
var
|
|
1664
|
-
const q = ((
|
|
1663
|
+
var xn, yn;
|
|
1664
|
+
const q = ((xn = U.data) == null ? void 0 : xn.topic) || "", ue = E(U.data, U.depth), Ce = `${ue.fontSize} ${ue.fontFamily}`, Ue = (yn = r.nodeTextWrap) == null ? void 0 : yn.call(r, U.data._original || U.data, U.depth);
|
|
1665
1665
|
if (!Ue || !Ue.maxWidth) {
|
|
1666
1666
|
const Jn = hO(q, Ce);
|
|
1667
1667
|
return {
|
|
@@ -1728,7 +1728,7 @@ const LL = {
|
|
|
1728
1728
|
ue,
|
|
1729
1729
|
Ce,
|
|
1730
1730
|
Ht.value
|
|
1731
|
-
), nn = r.expandable && lt(U),
|
|
1731
|
+
), nn = r.expandable && lt(U), xn = JO({
|
|
1732
1732
|
nodeWidth: Ue,
|
|
1733
1733
|
hasExpandButton: nn,
|
|
1734
1734
|
slots: QO(kt, q),
|
|
@@ -1737,8 +1737,8 @@ const LL = {
|
|
|
1737
1737
|
return {
|
|
1738
1738
|
decoration: q,
|
|
1739
1739
|
renderActions: [...kt, ...Ft],
|
|
1740
|
-
slotCenterX: { ...
|
|
1741
|
-
layout:
|
|
1740
|
+
slotCenterX: { ...xn.slotCenterX, ...yn },
|
|
1741
|
+
layout: xn
|
|
1742
1742
|
};
|
|
1743
1743
|
}, mn = (U) => {
|
|
1744
1744
|
var Ce;
|
|
@@ -1772,19 +1772,19 @@ const LL = {
|
|
|
1772
1772
|
position: q.position,
|
|
1773
1773
|
event: ue
|
|
1774
1774
|
});
|
|
1775
|
-
},
|
|
1775
|
+
}, En = (U) => U instanceof Element ? !!(U.closest(".node-action") || U.closest(".node-peripheral-action") || U.classList.contains("expand-symbol") || U.tagName === "circle") : !1, Rn = (U, q) => {
|
|
1776
1776
|
const ue = U.attr("data-node-decoration-class");
|
|
1777
1777
|
ue == null || ue.split(/\s+/).filter(Boolean).forEach((Ue) => U.classed(Ue, !1));
|
|
1778
1778
|
const Ce = (q == null ? void 0 : q.split(/\s+/).filter(Boolean)) || [];
|
|
1779
1779
|
Ce.forEach((Ue) => U.classed(Ue, !0)), U.attr("data-node-decoration-class", Ce.length ? Ce.join(" ") : null);
|
|
1780
1780
|
}, xt = (U, q, ue = Bt(q), Ce = fn(q).layout.slotCenterX) => {
|
|
1781
|
-
|
|
1781
|
+
Rn(U, ue == null ? void 0 : ue.className);
|
|
1782
1782
|
const Ue = U.select(".node-decoration-border");
|
|
1783
1783
|
if (!(ue != null && ue.border))
|
|
1784
1784
|
Ue.remove();
|
|
1785
1785
|
else {
|
|
1786
|
-
const kt = U.select("rect:not(.node-decoration-border)"), Ft = Number(kt.attr("width")) || yt(q), nn = Number(kt.attr("height")) || 55,
|
|
1787
|
-
_r.attr("x",
|
|
1786
|
+
const kt = U.select("rect:not(.node-decoration-border)"), Ft = Number(kt.attr("width")) || yt(q), nn = Number(kt.attr("height")) || 55, xn = Number(kt.attr("x")) || -18, yn = Number(kt.attr("y")) || -27.5, Jn = kt.attr("rx") || "8", _r = Ue.empty() ? U.insert("rect", ".node-name").attr("class", "node-decoration-border").style("pointer-events", "none") : Ue;
|
|
1787
|
+
_r.attr("x", xn).attr("y", yn).attr("width", Ft).attr("height", nn).attr("rx", Jn).attr("ry", kt.attr("ry") || Jn).style("fill", "none").style("stroke", ue.border.color || "none").style("stroke-width", ue.border.width ?? 1), ue.border.dasharray ? _r.style("stroke-dasharray", ue.border.dasharray) : _r.style("stroke-dasharray", null);
|
|
1788
1788
|
const sr = By(ue.border.animation);
|
|
1789
1789
|
sr ? _r.style("animation", sr).classed("is-animated", !1) : _r.style("animation", null).classed("is-animated", !!(ue.border.animated && ue.border.dasharray));
|
|
1790
1790
|
}
|
|
@@ -1823,7 +1823,7 @@ const LL = {
|
|
|
1823
1823
|
O9(U, Ke, We);
|
|
1824
1824
|
}, cr = () => {
|
|
1825
1825
|
L9(de.value, Ke);
|
|
1826
|
-
}, zr = () => 52,
|
|
1826
|
+
}, zr = () => 52, Dn = (U) => {
|
|
1827
1827
|
const q = jt.hierarchy(U.data, _e), ue = zr();
|
|
1828
1828
|
let Ce = 1;
|
|
1829
1829
|
q.each((Zt) => {
|
|
@@ -1839,7 +1839,7 @@ const LL = {
|
|
|
1839
1839
|
maxSiblings: Ce,
|
|
1840
1840
|
maxNodeWidth: Ve,
|
|
1841
1841
|
layoutConfig: r.layoutConfig
|
|
1842
|
-
}), { verticalGap: Ft, baseLevelGap: nn, levelPadding:
|
|
1842
|
+
}), { verticalGap: Ft, baseLevelGap: nn, levelPadding: xn, separationPadding: yn, crowdedActive: Jn } = kt;
|
|
1843
1843
|
ke.value = { maxSiblings: Ce, crowdedActive: Jn, verticalGap: Ft }, jt.tree().nodeSize([Ft, nn]).separation((Zt, Q) => {
|
|
1844
1844
|
const ct = Wt(Zt), Xt = Wt(Q), un = (Math.max(ct, Xt, ue) + yn) / Ft;
|
|
1845
1845
|
return Zt.parent === Q.parent ? Math.max(1, un) : Math.max(1.2, un);
|
|
@@ -1847,7 +1847,7 @@ const LL = {
|
|
|
1847
1847
|
const sr = { 0: 0 }, Os = Math.max(...Array.from(Object.keys(Ue)).map(Number));
|
|
1848
1848
|
for (let Zt = 1; Zt <= Os; Zt++) {
|
|
1849
1849
|
const Q = Ue[Zt - 1] || 100;
|
|
1850
|
-
sr[Zt] = sr[Zt - 1] + Q +
|
|
1850
|
+
sr[Zt] = sr[Zt - 1] + Q + xn;
|
|
1851
1851
|
}
|
|
1852
1852
|
q.each((Zt) => {
|
|
1853
1853
|
const Q = Zt.depth || 0;
|
|
@@ -1878,9 +1878,9 @@ const LL = {
|
|
|
1878
1878
|
}), fo !== 1 / 0 && fo !== 0 && U.each((Zt) => {
|
|
1879
1879
|
Zt.y = (Zt.y || 0) - fo;
|
|
1880
1880
|
});
|
|
1881
|
-
const
|
|
1881
|
+
const Ji = U.x || 0;
|
|
1882
1882
|
U.each((Zt) => {
|
|
1883
|
-
Zt.x = (Zt.x || 0) -
|
|
1883
|
+
Zt.x = (Zt.x || 0) - Ji;
|
|
1884
1884
|
});
|
|
1885
1885
|
let Tr = 1 / 0;
|
|
1886
1886
|
if (U.each((Zt) => {
|
|
@@ -1896,13 +1896,13 @@ const LL = {
|
|
|
1896
1896
|
const U = ye(r.data);
|
|
1897
1897
|
st(U, 0, 0), se.value = U;
|
|
1898
1898
|
const q = iu(U);
|
|
1899
|
-
|
|
1899
|
+
Dn(q);
|
|
1900
1900
|
let ue = q.y || 0;
|
|
1901
1901
|
q.each((Ce) => {
|
|
1902
1902
|
Ce.y < ue && (ue = Ce.y);
|
|
1903
1903
|
}), ue !== 0 && q.each((Ce) => {
|
|
1904
1904
|
Ce.y = Ce.y - ue;
|
|
1905
|
-
}), q.y !== 0 && (q.y = 0), de.value = q, Ct(),
|
|
1905
|
+
}), q.y !== 0 && (q.y = 0), de.value = q, Ct(), kn(), uo(), dt(() => {
|
|
1906
1906
|
zt(), it(), dr();
|
|
1907
1907
|
});
|
|
1908
1908
|
};
|
|
@@ -1915,7 +1915,7 @@ const LL = {
|
|
|
1915
1915
|
U.selectAll(".node").classed("is-dragging", !1).classed("is-drop-target", !1), U.selectAll(".link").classed("is-drop-link", !1), Ze();
|
|
1916
1916
|
}, cn = (U) => {
|
|
1917
1917
|
U.select(".drop-preview-link").empty() && U.append("path").attr("class", "drop-preview-link").attr("fill", "none"), U.select(".drop-slot").empty() && U.append("rect").attr("class", "drop-slot").attr("rx", 8).attr("ry", 8), U.select(".drop-float").empty() && U.append("rect").attr("class", "drop-float").attr("rx", 8).attr("ry", 8), U.select(".drop-float-label").empty() && U.append("text").attr("class", "drop-float-label").attr("dominant-baseline", "middle");
|
|
1918
|
-
},
|
|
1918
|
+
}, Ln = (U, q, ue, Ce, Ue) => {
|
|
1919
1919
|
if (!a.value) return;
|
|
1920
1920
|
const Ve = jt.select(a.value);
|
|
1921
1921
|
Ve.selectAll(".node").classed(
|
|
@@ -1930,12 +1930,12 @@ const LL = {
|
|
|
1930
1930
|
);
|
|
1931
1931
|
const Ot = Ve.select(".drag-overlay");
|
|
1932
1932
|
cn(Ot), Ot.select(".drop-float").attr("x", Ce.x).attr("y", Ce.y).attr("width", Ce.width).attr("height", Ce.height), Ot.select(".drop-float-label").attr("x", Ce.x + 18).attr("y", Ce.y + Ce.height / 2).text(ue);
|
|
1933
|
-
const kt = Ot.select(".drop-slot"), Ft = Ot.select(".drop-preview-link"), nn = ke.value.crowdedActive ? "smooth" : "bezier",
|
|
1934
|
-
if (!
|
|
1933
|
+
const kt = Ot.select(".drop-slot"), Ft = Ot.select(".drop-preview-link"), nn = ke.value.crowdedActive ? "smooth" : "bezier", xn = U ? NO(U, q, Ce, { curve: nn }) : null;
|
|
1934
|
+
if (!xn) {
|
|
1935
1935
|
kt.interrupt().style("opacity", 0), Ft.interrupt().style("opacity", 0);
|
|
1936
1936
|
return;
|
|
1937
1937
|
}
|
|
1938
|
-
kt.interrupt().attr("x",
|
|
1938
|
+
kt.interrupt().attr("x", xn.slot.x).attr("y", xn.slot.y).attr("width", xn.slot.width).attr("height", xn.slot.height).style("opacity", 1), Ft.interrupt().attr("d", xn.linkPath).style("opacity", 1);
|
|
1939
1939
|
}, Kt = (U) => U.map((q) => MO(q, yt)), qn = () => {
|
|
1940
1940
|
const U = de.value;
|
|
1941
1941
|
if (!U) return [];
|
|
@@ -1957,7 +1957,7 @@ const LL = {
|
|
|
1957
1957
|
ue.node.data._original || ue.node.data
|
|
1958
1958
|
);
|
|
1959
1959
|
return r.canDrop && !r.canDrop({ node: Ue, drop: Ce }) ? null : Ce;
|
|
1960
|
-
},
|
|
1960
|
+
}, On = (U, q) => {
|
|
1961
1961
|
if (!r.draggable || !a.value) {
|
|
1962
1962
|
U.on(".drag", null);
|
|
1963
1963
|
return;
|
|
@@ -1968,9 +1968,9 @@ const LL = {
|
|
|
1968
1968
|
const Ve = Ce.target;
|
|
1969
1969
|
return (Ot = Ve == null ? void 0 : Ve.closest) != null && Ot.call(Ve, ".expand-button") || (kt = Ve == null ? void 0 : Ve.classList) != null && kt.contains("expand-symbol") ? !1 : !Ce.button;
|
|
1970
1970
|
}).on("start", function(Ce, Ue) {
|
|
1971
|
-
var nn,
|
|
1971
|
+
var nn, xn, yn;
|
|
1972
1972
|
if (!Ue.parent) return;
|
|
1973
|
-
(
|
|
1973
|
+
(xn = (nn = Ce.sourceEvent) == null ? void 0 : nn.stopPropagation) == null || xn.call(nn);
|
|
1974
1974
|
const Ve = H9(Ue), Ot = (yn = this.transform.baseVal.consolidate()) == null ? void 0 : yn.matrix, kt = ((Ot == null ? void 0 : Ot.e) ?? Ue.y) + da.offsetX, Ft = ((Ot == null ? void 0 : Ot.f) ?? Ue.x) + da.offsetY;
|
|
1975
1975
|
le = {
|
|
1976
1976
|
node: Ue,
|
|
@@ -1997,7 +1997,7 @@ const LL = {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
Ve.boxes = qn();
|
|
1999
1999
|
const kt = { x: Ce.x, y: Ce.y }, Ft = OO(kt, Ve.grabOffset, yt(Ue)), nn = ur(kt, Ft, Ve);
|
|
2000
|
-
Ve.drop = nn,
|
|
2000
|
+
Ve.drop = nn, Ln(nn, Ve.boxes, Ue.data.topic || "", Ft, Ve.node.data.id), s("node-drag", {
|
|
2001
2001
|
node: au(Ue.data._original || Ue.data),
|
|
2002
2002
|
drop: nn,
|
|
2003
2003
|
event: Ce.sourceEvent ?? null
|
|
@@ -2016,7 +2016,7 @@ const LL = {
|
|
|
2016
2016
|
});
|
|
2017
2017
|
});
|
|
2018
2018
|
U.call(ue);
|
|
2019
|
-
},
|
|
2019
|
+
}, kn = (U = {}) => {
|
|
2020
2020
|
var Zt;
|
|
2021
2021
|
const q = U.chromeOnly ?? !1;
|
|
2022
2022
|
if (!i.value || !a.value || !de.value) return;
|
|
@@ -2030,7 +2030,7 @@ const LL = {
|
|
|
2030
2030
|
B ? nn.interrupt().remove() : nn.transition().duration(Ie.linkFadeDuration).ease(Ie.collapseEase).style("stroke-width", "1px").style("opacity", 0).on("end", function() {
|
|
2031
2031
|
jt.select(this).style("will-change", "auto"), jt.select(this).remove();
|
|
2032
2032
|
});
|
|
2033
|
-
const
|
|
2033
|
+
const xn = (Q) => {
|
|
2034
2034
|
const ct = Q.target.depth || 0;
|
|
2035
2035
|
return _(Q, ct);
|
|
2036
2036
|
};
|
|
@@ -2053,13 +2053,13 @@ const LL = {
|
|
|
2053
2053
|
"target"
|
|
2054
2054
|
);
|
|
2055
2055
|
return _r(ct, Xt);
|
|
2056
|
-
}).style("fill", "none").style("stroke", (Q) =>
|
|
2056
|
+
}).style("fill", "none").style("stroke", (Q) => xn(Q)).style("stroke-width", "1px");
|
|
2057
2057
|
sr.style("opacity", 0).style("will-change", "opacity, d, stroke-width"), Ft.style("will-change", "opacity, d, stroke-width");
|
|
2058
2058
|
const Os = sr.merge(Ft);
|
|
2059
2059
|
q ? (Os.interrupt(), Os.each(function(Q) {
|
|
2060
2060
|
var un, Vn, Kr, ho;
|
|
2061
2061
|
const ct = yn(Q.source, "source"), Xt = yn(Q.target, "target");
|
|
2062
|
-
jt.select(this).attr("d", _r(ct, Xt)).style("opacity", 1).style("stroke-width", `${M()}px`).style("stroke",
|
|
2062
|
+
jt.select(this).attr("d", _r(ct, Xt)).style("opacity", 1).style("stroke-width", `${M()}px`).style("stroke", xn(Q)).style("will-change", "auto"), Q.source.x0 = Q.source.x, Q.source.y0 = Q.source.y, Q.target.x0 = Q.target.x, Q.target.y0 = Q.target.y, (Vn = (un = Q.source) == null ? void 0 : un.data) != null && Vn.id && Ke.set(Q.source.data.id, { x: Q.source.x, y: Q.source.y }), (ho = (Kr = Q.target) == null ? void 0 : Kr.data) != null && ho.id && Ke.set(Q.target.data.id, { x: Q.target.x, y: Q.target.y });
|
|
2063
2063
|
})) : Os.transition().duration(Ie.expandDuration).ease(Ie.expandEase).delay((Q) => pt(Q.target)).style("opacity", 1).style("stroke-width", `${M()}px`).attrTween("d", function(Q) {
|
|
2064
2064
|
const ct = yn(
|
|
2065
2065
|
{ ...Q.source, x: Q.source.x0 ?? Q.source.x, y: Q.source.y0 ?? Q.source.y },
|
|
@@ -2075,7 +2075,7 @@ const LL = {
|
|
|
2075
2075
|
const wd = { y: ho(Ta), x: gs(Ta) }, kd = { y: vs(Ta), x: xo(Ta) };
|
|
2076
2076
|
return _r(wd, kd);
|
|
2077
2077
|
};
|
|
2078
|
-
}).style("stroke", (Q) =>
|
|
2078
|
+
}).style("stroke", (Q) => xn(Q)).on("end", function(Q) {
|
|
2079
2079
|
var ct, Xt, un, Vn;
|
|
2080
2080
|
Q.source.x0 = Q.source.x, Q.source.y0 = Q.source.y, Q.target.x0 = Q.target.x, Q.target.y0 = Q.target.y, (Xt = (ct = Q.source) == null ? void 0 : ct.data) != null && Xt.id && Ke.set(Q.source.data.id, { x: Q.source.x, y: Q.source.y }), (Vn = (un = Q.target) == null ? void 0 : un.data) != null && Vn.id && Ke.set(Q.target.data.id, { x: Q.target.x, y: Q.target.y }), jt.select(this).style("will-change", "auto");
|
|
2081
2081
|
});
|
|
@@ -2106,7 +2106,7 @@ const LL = {
|
|
|
2106
2106
|
}).attr("tabindex", (Q, ct) => ct === 0 ? 0 : -1).attr("transform", (Q) => {
|
|
2107
2107
|
const ct = Q.y0 !== void 0 ? Q.y0 : Q.parent ? Q.parent.y : Q.y, Xt = Q.x0 !== void 0 ? Q.x0 : Q.parent ? Q.parent.x : Q.x;
|
|
2108
2108
|
return `translate(${ct},${Xt}) scale(${Ie.nodeScaleFrom})`;
|
|
2109
|
-
}).style("opacity", 0).style("cursor", "pointer").style("outline", "none").style("will-change", "transform, opacity"),
|
|
2109
|
+
}).style("opacity", 0).style("cursor", "pointer").style("outline", "none").style("will-change", "transform, opacity"), Ji = (Q) => b(Q.data, Q.depth);
|
|
2110
2110
|
fo.each((Q) => {
|
|
2111
2111
|
const { width: ct, height: Xt, lines: un } = Dt(Q);
|
|
2112
2112
|
Q.data._nodeWidth = ct, Q.data._nodeHeight = Xt, Q.data._nodeLines = un;
|
|
@@ -2116,10 +2116,10 @@ const LL = {
|
|
|
2116
2116
|
}).attr("ry", (Q) => {
|
|
2117
2117
|
const ct = E(Q.data, Q.depth);
|
|
2118
2118
|
return parseInt(ct.borderRadius || "8");
|
|
2119
|
-
}).attr("x", -18).attr("y", (Q) => -(Q.data._nodeHeight || mo) / 2).attr("width", (Q) => Q.data._nodeWidth || 100).attr("height", (Q) => Q.data._nodeHeight || mo).style("fill", (Q) =>
|
|
2119
|
+
}).attr("x", -18).attr("y", (Q) => -(Q.data._nodeHeight || mo) / 2).attr("width", (Q) => Q.data._nodeWidth || 100).attr("height", (Q) => Q.data._nodeHeight || mo).style("fill", (Q) => Ji(Q)).style("stroke", (Q) => C(Q.data, Q.depth) || "none").style("stroke-width", (Q) => E(Q.data, Q.depth).borderWidth || "0").style("cursor", "pointer"), fo.append("text").attr("class", "node-name").attr("text-anchor", "start").attr("x", 0).attr("y", 0).style("font-size", (Q) => E(Q.data, Q.depth).fontSize).style("font-family", (Q) => E(Q.data, Q.depth).fontFamily).style("font-weight", (Q) => E(Q.data, Q.depth).fontWeight).style("fill", (Q) => w(Q.data, Q.depth)).style("pointer-events", "none").style("user-select", "none").call(Be), fo.each(function(Q) {
|
|
2120
2120
|
r.expandable && lt(Q) && nr(jt.select(this));
|
|
2121
2121
|
}), fo.on("click", (Q, ct) => {
|
|
2122
|
-
if (
|
|
2122
|
+
if (En(Q.target)) return;
|
|
2123
2123
|
const Xt = ct.data.id ?? null;
|
|
2124
2124
|
_t("selection") && (o.value = Xt), s("node-click", ct.data._original || ct.data, Q);
|
|
2125
2125
|
}), fo.on("dblclick", (Q, ct) => {
|
|
@@ -2182,7 +2182,7 @@ const LL = {
|
|
|
2182
2182
|
"aria-expanded",
|
|
2183
2183
|
r.expandable && gs ? String(Q.data.expanded !== !1) : null
|
|
2184
2184
|
).attr("aria-label", `${Q.data.topic}, ${vs} 个子项`);
|
|
2185
|
-
}),
|
|
2185
|
+
}), On(
|
|
2186
2186
|
Tr,
|
|
2187
2187
|
Ve
|
|
2188
2188
|
), le != null && le.activated && Tr.classed("is-dragging", (Q) => Q.data.id === (le == null ? void 0 : le.node.data.id)), c.value && kl();
|
|
@@ -2212,22 +2212,22 @@ const LL = {
|
|
|
2212
2212
|
kt(U), Ce(U);
|
|
2213
2213
|
} else {
|
|
2214
2214
|
const kt = (nn) => {
|
|
2215
|
-
nn.children && nn.children.forEach((
|
|
2216
|
-
|
|
2215
|
+
nn.children && nn.children.forEach((xn) => {
|
|
2216
|
+
xn.x0 = void 0, xn.y0 = void 0, kt(xn);
|
|
2217
2217
|
});
|
|
2218
2218
|
};
|
|
2219
2219
|
kt(U);
|
|
2220
2220
|
const Ft = (nn) => {
|
|
2221
|
-
nn.children && nn.children.forEach((
|
|
2221
|
+
nn.children && nn.children.forEach((xn) => {
|
|
2222
2222
|
var yn;
|
|
2223
|
-
(yn =
|
|
2223
|
+
(yn = xn.data) != null && yn.id && We.add(xn.data.id), Ft(xn);
|
|
2224
2224
|
});
|
|
2225
2225
|
};
|
|
2226
2226
|
Ft(U), Ce(U);
|
|
2227
2227
|
}
|
|
2228
|
-
te = !0, de.value &&
|
|
2228
|
+
te = !0, de.value && Dn(de.value), kn(), s("change", be()), dt(() => {
|
|
2229
2229
|
setTimeout(() => {
|
|
2230
|
-
const kt = 0.7 - Ve * 0.08, Ft = Math.min(Math.sqrt(ue) * 0.03, 0.18), nn = 0.35,
|
|
2230
|
+
const kt = 0.7 - Ve * 0.08, Ft = Math.min(Math.sqrt(ue) * 0.03, 0.18), nn = 0.35, xn = 0.8, yn = kt + Ft, Jn = Math.max(Math.min(yn, xn), nn);
|
|
2231
2231
|
Tt(U, { duration: Jn });
|
|
2232
2232
|
}, 50);
|
|
2233
2233
|
});
|
|
@@ -2291,7 +2291,7 @@ const LL = {
|
|
|
2291
2291
|
} : null, De = (U) => {
|
|
2292
2292
|
P = !0, se.value = ye(U), cr();
|
|
2293
2293
|
const q = iu(se.value);
|
|
2294
|
-
|
|
2294
|
+
Dn(q), sn(q), de.value = q, kn(), s("change", be()), hn(), dt(() => {
|
|
2295
2295
|
P = !1;
|
|
2296
2296
|
});
|
|
2297
2297
|
}, {
|
|
@@ -2312,7 +2312,7 @@ const LL = {
|
|
|
2312
2312
|
}), Z = () => {
|
|
2313
2313
|
cr();
|
|
2314
2314
|
const U = iu(se.value);
|
|
2315
|
-
|
|
2315
|
+
Dn(U), sn(U), de.value = U, kn(), s("change", be()), hn(), dt(() => {
|
|
2316
2316
|
P = !1;
|
|
2317
2317
|
});
|
|
2318
2318
|
}, ce = (U, q = {}) => {
|
|
@@ -2322,8 +2322,8 @@ const LL = {
|
|
|
2322
2322
|
previousRoot: se.value,
|
|
2323
2323
|
snapshotPositions: cr,
|
|
2324
2324
|
restorePositions: sn,
|
|
2325
|
-
layout:
|
|
2326
|
-
render:
|
|
2325
|
+
layout: Dn,
|
|
2326
|
+
render: kn,
|
|
2327
2327
|
onAfterSetNodeData: (ue, Ce) => {
|
|
2328
2328
|
se.value = Ce, de.value = ue;
|
|
2329
2329
|
},
|
|
@@ -2423,7 +2423,7 @@ const LL = {
|
|
|
2423
2423
|
const q = (Ce) => {
|
|
2424
2424
|
Ce.expanded = U, Ce.children && Ce.children.length > 0 && Ce.children.forEach((Ue) => q(Ue));
|
|
2425
2425
|
};
|
|
2426
|
-
q(se.value), te = !0,
|
|
2426
|
+
q(se.value), te = !0, Dn(de.value), kn(), s("change", be()), dt(() => {
|
|
2427
2427
|
setTimeout(() => {
|
|
2428
2428
|
zt();
|
|
2429
2429
|
const Ce = Ie.centerDuration * 1e3;
|
|
@@ -2478,7 +2478,7 @@ const LL = {
|
|
|
2478
2478
|
nodeData: se.value
|
|
2479
2479
|
}), wl = () => {
|
|
2480
2480
|
wn(!Ee.value);
|
|
2481
|
-
},
|
|
2481
|
+
}, Xi = () => {
|
|
2482
2482
|
s("download");
|
|
2483
2483
|
}, Ii = async (U = "png", q) => {
|
|
2484
2484
|
if (!i.value)
|
|
@@ -2505,7 +2505,7 @@ const LL = {
|
|
|
2505
2505
|
), xe(
|
|
2506
2506
|
() => r.draggable,
|
|
2507
2507
|
() => {
|
|
2508
|
-
de.value &&
|
|
2508
|
+
de.value && kn();
|
|
2509
2509
|
}
|
|
2510
2510
|
), xe(
|
|
2511
2511
|
() => r.expandable,
|
|
@@ -2513,7 +2513,7 @@ const LL = {
|
|
|
2513
2513
|
if (!se.value || !de.value) return;
|
|
2514
2514
|
P = !0, U || Dy(se.value), cr();
|
|
2515
2515
|
const q = iu(se.value);
|
|
2516
|
-
sn(q),
|
|
2516
|
+
sn(q), Dn(q), de.value = q, kn(), dt(() => {
|
|
2517
2517
|
P = !1;
|
|
2518
2518
|
});
|
|
2519
2519
|
}
|
|
@@ -2522,16 +2522,16 @@ const LL = {
|
|
|
2522
2522
|
() => {
|
|
2523
2523
|
if (!(G || !de.value)) {
|
|
2524
2524
|
if (c.value) {
|
|
2525
|
-
|
|
2525
|
+
kn({ chromeOnly: !0 }), kl();
|
|
2526
2526
|
return;
|
|
2527
2527
|
}
|
|
2528
|
-
|
|
2528
|
+
kn();
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
2531
2531
|
), xe(
|
|
2532
2532
|
() => r.layoutConfig,
|
|
2533
2533
|
() => {
|
|
2534
|
-
!se.value || !de.value || (P = !0, cr(),
|
|
2534
|
+
!se.value || !de.value || (P = !0, cr(), Dn(de.value), kn(), dt(() => {
|
|
2535
2535
|
P = !1;
|
|
2536
2536
|
}));
|
|
2537
2537
|
},
|
|
@@ -2672,7 +2672,7 @@ const LL = {
|
|
|
2672
2672
|
const q = ko(U);
|
|
2673
2673
|
if (!q) return !1;
|
|
2674
2674
|
const ue = q.data._original || q.data;
|
|
2675
|
-
return (Ce = r.nodeEditable) != null && Ce.call(r, ue, q.depth) ? (c.value && c.value !== U && Zs(!0), G = !0, c.value = U, (_t("selection") || _t("peripheralActions")) && (o.value = U), u.value = q.data.topic || "", d.value = !!((Ue = r.nodeTextWrap) != null && Ue.call(r, ue, q.depth)), m.value = null, Oi(U, !1), G = !1,
|
|
2675
|
+
return (Ce = r.nodeEditable) != null && Ce.call(r, ue, q.depth) ? (c.value && c.value !== U && Zs(!0), G = !0, c.value = U, (_t("selection") || _t("peripheralActions")) && (o.value = U), u.value = q.data.topic || "", d.value = !!((Ue = r.nodeTextWrap) != null && Ue.call(r, ue, q.depth)), m.value = null, Oi(U, !1), G = !1, kn({ chromeOnly: !0 }), kl(), s("node-edit-start", ue), dt(() => {
|
|
2676
2676
|
const Ve = d.value ? h.value : f.value;
|
|
2677
2677
|
Ve == null || Ve.focus(), Ve == null || Ve.select();
|
|
2678
2678
|
}), !0) : !1;
|
|
@@ -2683,11 +2683,11 @@ const LL = {
|
|
|
2683
2683
|
if (c.value = null, m.value = null, !ue) return;
|
|
2684
2684
|
const Ce = ue.data._original || ue.data, Ue = u.value.trim(), Ve = ue.data.topic ?? "";
|
|
2685
2685
|
if (Oi(q, !0), !U || !Ue) {
|
|
2686
|
-
Lc(q),
|
|
2686
|
+
Lc(q), kn({ chromeOnly: !0 }), s("node-edit-cancel", Ce);
|
|
2687
2687
|
return;
|
|
2688
2688
|
}
|
|
2689
|
-
Ue !== Ve ? Cl(q, { topic: Ue }) : (Lc(q),
|
|
2690
|
-
},
|
|
2689
|
+
Ue !== Ve ? Cl(q, { topic: Ue }) : (Lc(q), kn({ chromeOnly: !0 })), s("node-edit-confirm", Ce, Ue);
|
|
2690
|
+
}, Yi = (U) => {
|
|
2691
2691
|
U.isComposing || (U.preventDefault(), Zs(!0));
|
|
2692
2692
|
}, ms = () => {
|
|
2693
2693
|
const U = h.value;
|
|
@@ -2713,7 +2713,7 @@ const LL = {
|
|
|
2713
2713
|
const Ue = Ce.data._original || Ce.data, Ve = j4(q);
|
|
2714
2714
|
return r.autoEditOnAdd && Te.add(Ve.id), (ue || r.autoEditOnAdd) && tt(Ve.id, ue), Ue.children || (Ue.children = []), Ue.children.push(Ve), Ue.expanded = !0, Z(), Zn(), Ve.id;
|
|
2715
2715
|
}, bd = (U, q, ue = {}, Ce) => {
|
|
2716
|
-
var
|
|
2716
|
+
var xn;
|
|
2717
2717
|
if (q === "right")
|
|
2718
2718
|
return Sl(U, ue, Ce);
|
|
2719
2719
|
const Ue = ko(U);
|
|
@@ -2729,14 +2729,14 @@ const LL = {
|
|
|
2729
2729
|
const sr = q === "up" ? _r : _r + 1;
|
|
2730
2730
|
return yn.children.splice(sr, 0, Ve), yn.expanded = !0, Z(), Zn(), Ve.id;
|
|
2731
2731
|
}
|
|
2732
|
-
if (!((
|
|
2732
|
+
if (!((xn = Ue.parent) != null && xn.parent)) return "";
|
|
2733
2733
|
const Ot = Ue.parent, kt = Ot.parent.data._original || Ot.parent.data, Ft = Ot.data._original || Ot.data;
|
|
2734
2734
|
if (!kt.children) return "";
|
|
2735
2735
|
const nn = kt.children.findIndex(
|
|
2736
2736
|
(yn) => yn.id === Ft.id
|
|
2737
2737
|
);
|
|
2738
2738
|
return nn === -1 ? "" : (r.autoEditOnAdd && Te.add(Ve.id), (Ce || r.autoEditOnAdd) && tt(Ve.id, Ce), P = !0, kt.children.splice(nn + 1, 0, Ve), kt.expanded = !0, Z(), Zn(), Ve.id);
|
|
2739
|
-
},
|
|
2739
|
+
}, Ki = (U) => {
|
|
2740
2740
|
const q = ko(U);
|
|
2741
2741
|
if (!q || !q.parent) return !1;
|
|
2742
2742
|
const ue = q.parent.data._original || q.parent.data, Ce = (q.data._original || q.data).id;
|
|
@@ -2749,14 +2749,14 @@ const LL = {
|
|
|
2749
2749
|
kt && (Ke.delete(kt), We.delete(kt), Se.delete(kt), Te.delete(kt), J === kt && (J = null));
|
|
2750
2750
|
});
|
|
2751
2751
|
const Ve = iu(se.value);
|
|
2752
|
-
return
|
|
2752
|
+
return Dn(Ve), sn(Ve), de.value = Ve, kn(), s("change", be()), hn(), Zn(), dt(() => {
|
|
2753
2753
|
P = !1;
|
|
2754
2754
|
}), !0;
|
|
2755
2755
|
}, Ma = (U, q, ue) => se.value ? (P = !0, yO(se.value, U, q, ue) ? (Z(), Zn(), !0) : (dt(() => {
|
|
2756
2756
|
P = !1;
|
|
2757
2757
|
}), !1)) : !1, Cl = (U, q) => {
|
|
2758
2758
|
const ue = ko(U);
|
|
2759
|
-
ue && (P = !0, Object.assign(ue.data, q), ue.data._original && Object.assign(ue.data._original, q), q.topic !== void 0 && (delete ue.data._nodeWidth, delete ue.data._nodeHeight, delete ue.data._nodeLines, ue.data._original && (delete ue.data._original._nodeWidth, delete ue.data._original._nodeHeight, delete ue.data._original._nodeLines)),
|
|
2759
|
+
ue && (P = !0, Object.assign(ue.data, q), ue.data._original && Object.assign(ue.data._original, q), q.topic !== void 0 && (delete ue.data._nodeWidth, delete ue.data._nodeHeight, delete ue.data._nodeLines, ue.data._original && (delete ue.data._original._nodeWidth, delete ue.data._original._nodeHeight, delete ue.data._original._nodeLines)), Dn(de.value), kn(), s("change", be()), hn(), Zn(), dt(() => {
|
|
2760
2760
|
P = !1;
|
|
2761
2761
|
}));
|
|
2762
2762
|
};
|
|
@@ -2783,7 +2783,7 @@ const LL = {
|
|
|
2783
2783
|
updateNode: Cl,
|
|
2784
2784
|
addNode: Sl,
|
|
2785
2785
|
addNodeByDirection: bd,
|
|
2786
|
-
removeNode:
|
|
2786
|
+
removeNode: Ki,
|
|
2787
2787
|
moveNode: Ma,
|
|
2788
2788
|
undo: Ro,
|
|
2789
2789
|
redo: fs,
|
|
@@ -2945,7 +2945,7 @@ const LL = {
|
|
|
2945
2945
|
key: 4,
|
|
2946
2946
|
class: "toolbar-btn",
|
|
2947
2947
|
title: "导出图片",
|
|
2948
|
-
onClick:
|
|
2948
|
+
onClick: Xi
|
|
2949
2949
|
}, [...q[16] || (q[16] = [
|
|
2950
2950
|
S("svg", {
|
|
2951
2951
|
width: "18",
|
|
@@ -2995,7 +2995,7 @@ const LL = {
|
|
|
2995
2995
|
rows: "1",
|
|
2996
2996
|
onKeydown: [
|
|
2997
2997
|
q[1] || (q[1] = Gn(At((ue) => Zs(!1), ["stop", "prevent"]), ["esc"])),
|
|
2998
|
-
Gn(At(
|
|
2998
|
+
Gn(At(Yi, ["exact"]), ["enter"])
|
|
2999
2999
|
],
|
|
3000
3000
|
onInput: ms,
|
|
3001
3001
|
onBlur: q[2] || (q[2] = (ue) => Zs(!0)),
|
|
@@ -3015,7 +3015,7 @@ const LL = {
|
|
|
3015
3015
|
style: Ut(p.value),
|
|
3016
3016
|
onKeydown: [
|
|
3017
3017
|
q[6] || (q[6] = Gn(At((ue) => Zs(!1), ["stop", "prevent"]), ["esc"])),
|
|
3018
|
-
Gn(
|
|
3018
|
+
Gn(Yi, ["enter"])
|
|
3019
3019
|
],
|
|
3020
3020
|
onBlur: q[7] || (q[7] = (ue) => Zs(!0)),
|
|
3021
3021
|
onClick: q[8] || (q[8] = At(() => {
|
|
@@ -3261,7 +3261,7 @@ function sN(e, t, n) {
|
|
|
3261
3261
|
}
|
|
3262
3262
|
const iN = "top-start", aN = 4, lN = 4, cN = 8;
|
|
3263
3263
|
function Gy(e) {
|
|
3264
|
-
const t = O(0), n = O(0), r = O(!1), o = O(!1), s = x(() =>
|
|
3264
|
+
const t = O(0), n = O(0), r = O(!1), o = O(!1), s = x(() => _n(e.reference)), i = x(() => e.floating.value), a = x(() => _n(e.mainAxisEdge) ?? null), l = x(() => _n(e.collisionElements) ?? []), c = x(() => _n(e.placement)), u = x(() => e.open.value);
|
|
3265
3265
|
function d() {
|
|
3266
3266
|
const v = s.value, b = i.value;
|
|
3267
3267
|
if (v == null || b == null || !u.value) return;
|
|
@@ -3329,10 +3329,10 @@ function sx(e) {
|
|
|
3329
3329
|
open: e.open,
|
|
3330
3330
|
reference: e.anchor,
|
|
3331
3331
|
floating: e.menuRef,
|
|
3332
|
-
placement: () =>
|
|
3332
|
+
placement: () => _n(e.placement) ?? iN,
|
|
3333
3333
|
gap: aN,
|
|
3334
3334
|
padding: cN,
|
|
3335
|
-
zIndex:
|
|
3335
|
+
zIndex: _n(e.zIndex) ?? 1e3
|
|
3336
3336
|
});
|
|
3337
3337
|
return {
|
|
3338
3338
|
menuStyle: t.floatingStyles,
|
|
@@ -5249,7 +5249,7 @@ const tz = ["data-chat-color-mode"], nz = /* @__PURE__ */ Re({
|
|
|
5249
5249
|
u.value[J] = null;
|
|
5250
5250
|
return;
|
|
5251
5251
|
}
|
|
5252
|
-
const tt =
|
|
5252
|
+
const tt = _n(Ne.panelRef) ?? null;
|
|
5253
5253
|
u.value[J] = { panelRef: tt };
|
|
5254
5254
|
}
|
|
5255
5255
|
return A9(a, (J) => {
|
|
@@ -5263,7 +5263,7 @@ const tz = ["data-chat-color-mode"], nz = /* @__PURE__ */ Re({
|
|
|
5263
5263
|
J && (c.value = []);
|
|
5264
5264
|
}), (J, me) => {
|
|
5265
5265
|
var Ne;
|
|
5266
|
-
return y(), he(
|
|
5266
|
+
return y(), he(Gi, { to: "body" }, [
|
|
5267
5267
|
ve(Ss, { name: "ui-menu" }, {
|
|
5268
5268
|
default: qe(() => [
|
|
5269
5269
|
r.value ? (y(), k("div", {
|
|
@@ -5514,7 +5514,7 @@ const uz = /* @__PURE__ */ Re({
|
|
|
5514
5514
|
}
|
|
5515
5515
|
});
|
|
5516
5516
|
function _h(e = {}) {
|
|
5517
|
-
const t = e.open ?? O(!1), n = e.triggerRef ?? O(null), r = x(() =>
|
|
5517
|
+
const t = e.open ?? O(!1), n = e.triggerRef ?? O(null), r = x(() => _n(e.items) ?? []), o = x(() => _n(e.leadingItems) ?? []), s = x(() => _n(e.disabled) ?? !1), i = x(() => _n(e.placement) ?? "top-start"), a = x(() => _n(e.submenuPlacement) ?? "right-start"), l = x(() => _n(e.title) ?? ""), c = x(() => r.value.length > 0 || o.value.length > 0), u = x(() => _n(e.enabled) ?? c.value);
|
|
5518
5518
|
function d() {
|
|
5519
5519
|
var b;
|
|
5520
5520
|
t.value && (t.value = !1, (b = e.onClose) == null || b.call(e));
|
|
@@ -5557,10 +5557,10 @@ function _h(e = {}) {
|
|
|
5557
5557
|
placement: i.value,
|
|
5558
5558
|
submenuPlacement: a.value,
|
|
5559
5559
|
title: l.value,
|
|
5560
|
-
zIndex:
|
|
5561
|
-
selectedId:
|
|
5562
|
-
maxHeight:
|
|
5563
|
-
width:
|
|
5560
|
+
zIndex: _n(e.zIndex) ?? 1e3,
|
|
5561
|
+
selectedId: _n(e.selectedId),
|
|
5562
|
+
maxHeight: _n(e.maxHeight),
|
|
5563
|
+
width: _n(e.width),
|
|
5564
5564
|
onSubmenuOpen: e.onSubmenuOpen,
|
|
5565
5565
|
...w,
|
|
5566
5566
|
onItemClick: (E) => {
|
|
@@ -5687,7 +5687,7 @@ const dz = ["data-chat-color-mode"], fz = ["aria-label"], hz = { class: "ui-dial
|
|
|
5687
5687
|
hidden: "",
|
|
5688
5688
|
class: "ui-dialog__color-anchor"
|
|
5689
5689
|
}, null, 512),
|
|
5690
|
-
(y(), he(
|
|
5690
|
+
(y(), he(Gi, { to: "body" }, [
|
|
5691
5691
|
ve(Ss, { name: "ui-dialog-fade" }, {
|
|
5692
5692
|
default: qe(() => [
|
|
5693
5693
|
t.value ? (y(), k("div", {
|
|
@@ -5822,7 +5822,7 @@ const dz = ["data-chat-color-mode"], fz = ["aria-label"], hz = { class: "ui-dial
|
|
|
5822
5822
|
}
|
|
5823
5823
|
return xe([a, c, () => n.virtualRef], async () => {
|
|
5824
5824
|
a.value && (await dt(), m());
|
|
5825
|
-
}), (g, v) => (y(), he(
|
|
5825
|
+
}), (g, v) => (y(), he(Gi, { to: "body" }, [
|
|
5826
5826
|
ve(Ss, { name: "ui-popover-fade" }, {
|
|
5827
5827
|
default: qe(() => [
|
|
5828
5828
|
a.value ? (y(), k("div", as({
|
|
@@ -9004,7 +9004,7 @@ const QF = ["data-side"], eU = /* @__PURE__ */ Re({
|
|
|
9004
9004
|
onFocusout: g
|
|
9005
9005
|
}, [
|
|
9006
9006
|
ut(v.$slots, "default", {}, void 0, !0),
|
|
9007
|
-
(y(), he(
|
|
9007
|
+
(y(), he(Gi, { to: "body" }, [
|
|
9008
9008
|
n.value && e.label ? (y(), k("span", {
|
|
9009
9009
|
key: 0,
|
|
9010
9010
|
ref_key: "bubbleRef",
|
|
@@ -10605,7 +10605,7 @@ function Sj(e) {
|
|
|
10605
10605
|
}
|
|
10606
10606
|
function c(d) {
|
|
10607
10607
|
var m;
|
|
10608
|
-
const f =
|
|
10608
|
+
const f = _n(e), h = xj(d);
|
|
10609
10609
|
if (!f || !h) return;
|
|
10610
10610
|
Gc == null || Gc(), Gc = l, n.value = "", i = "", s = !1, o = new AbortController(), bS();
|
|
10611
10611
|
const p = new wS({
|
|
@@ -11318,14 +11318,14 @@ function T1(e) {
|
|
|
11318
11318
|
}
|
|
11319
11319
|
return o > 0 ? `${r}m${o}s` : `${r}m`;
|
|
11320
11320
|
}
|
|
11321
|
-
function
|
|
11321
|
+
function Ui(e) {
|
|
11322
11322
|
return typeof e == "number" && Number.isFinite(e);
|
|
11323
11323
|
}
|
|
11324
11324
|
function m3(e, t) {
|
|
11325
11325
|
return e >= Hj && e <= t + 6e4;
|
|
11326
11326
|
}
|
|
11327
11327
|
function Wj(e, t = Date.now()) {
|
|
11328
|
-
if (!
|
|
11328
|
+
if (!Ui(e)) return "";
|
|
11329
11329
|
const n = Us(e);
|
|
11330
11330
|
return m3(n, t) ? T1(Math.floor((t - n) / 1e3)) : "";
|
|
11331
11331
|
}
|
|
@@ -11339,23 +11339,23 @@ function Vj(e, t, n) {
|
|
|
11339
11339
|
return { carriedSec: s, totalSec: s + o };
|
|
11340
11340
|
}
|
|
11341
11341
|
function RS(e, t = Date.now()) {
|
|
11342
|
-
if (
|
|
11343
|
-
if (
|
|
11342
|
+
if (Ui(e.run_ms) && e.run_ms >= 0) return e.run_ms;
|
|
11343
|
+
if (Ui(e.created_at) && Ui(e.completed_at)) {
|
|
11344
11344
|
const n = e.completed_at - e.created_at;
|
|
11345
11345
|
if (n >= 0 && m3(e.created_at, t)) return n;
|
|
11346
11346
|
}
|
|
11347
11347
|
}
|
|
11348
11348
|
function qj(e, t = Date.now()) {
|
|
11349
|
-
if (
|
|
11350
|
-
const n =
|
|
11351
|
-
let r =
|
|
11352
|
-
if (r === void 0 &&
|
|
11349
|
+
if (Ui(e.run_ms) && Ui(e.completed_at)) return e;
|
|
11350
|
+
const n = Ui(e.completed_at) ? e.completed_at : t;
|
|
11351
|
+
let r = Ui(e.run_ms) ? Math.max(0, e.run_ms) : void 0;
|
|
11352
|
+
if (r === void 0 && Ui(e.created_at)) {
|
|
11353
11353
|
const o = n - e.created_at;
|
|
11354
11354
|
o >= 0 && m3(e.created_at, t) && (r = o);
|
|
11355
11355
|
}
|
|
11356
11356
|
return {
|
|
11357
11357
|
...e,
|
|
11358
|
-
completed_at:
|
|
11358
|
+
completed_at: Ui(e.completed_at) ? e.completed_at : n,
|
|
11359
11359
|
...r !== void 0 ? { run_ms: r } : {}
|
|
11360
11360
|
};
|
|
11361
11361
|
}
|
|
@@ -12280,7 +12280,7 @@ var W6 = {
|
|
|
12280
12280
|
zoomed: null,
|
|
12281
12281
|
play: null,
|
|
12282
12282
|
stop: null
|
|
12283
|
-
}, aG = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', im = typeof window < "u" && typeof window.document < "u", ba = im ? window : {}, Tu = im && ba.document.documentElement ? "ontouchstart" in ba.document.documentElement : !1, v3 = im ? "PointerEvent" in ba : !1,
|
|
12283
|
+
}, aG = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', im = typeof window < "u" && typeof window.document < "u", ba = im ? window : {}, Tu = im && ba.document.documentElement ? "ontouchstart" in ba.document.documentElement : !1, v3 = im ? "PointerEvent" in ba : !1, In = "viewer", n1 = "move", PS = "switch", rf = "zoom", up = "".concat(In, "-active"), lG = "".concat(In, "-close"), r1 = "".concat(In, "-fade"), sv = "".concat(In, "-fixed"), cG = "".concat(In, "-fullscreen"), V6 = "".concat(In, "-fullscreen-exit"), Bl = "".concat(In, "-hide"), uG = "".concat(In, "-hide-md-down"), dG = "".concat(In, "-hide-sm-down"), fG = "".concat(In, "-hide-xs-down"), Ys = "".concat(In, "-in"), bf = "".concat(In, "-invisible"), Iu = "".concat(In, "-loading"), hG = "".concat(In, "-move"), q6 = "".concat(In, "-open"), Wc = "".concat(In, "-show"), qr = "".concat(In, "-transition"), Wu = "click", iv = "dblclick", Z6 = "dragstart", X6 = "focusin", Y6 = "keydown", oi = "load", Ql = "error", pG = Tu ? "touchend touchcancel" : "mouseup", mG = Tu ? "touchmove" : "mousemove", gG = Tu ? "touchstart" : "mousedown", K6 = v3 ? "pointerdown" : gG, J6 = v3 ? "pointermove" : mG, Q6 = v3 ? "pointerup pointercancel" : pG, e5 = "resize", vi = "transitionend", t5 = "wheel", n5 = "ready", r5 = "show", o5 = "shown", s5 = "hide", i5 = "hidden", a5 = "view", Xf = "viewed", l5 = "move", c5 = "moved", u5 = "rotate", d5 = "rotated", f5 = "scale", h5 = "scaled", p5 = "zoom", m5 = "zoomed", g5 = "play", v5 = "stop", L1 = "".concat(In, "Action"), y3 = /\s\s*/, dp = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
|
|
12284
12284
|
function Yf(e) {
|
|
12285
12285
|
return typeof e == "string";
|
|
12286
12286
|
}
|
|
@@ -13318,7 +13318,7 @@ var AG = {
|
|
|
13318
13318
|
// Destroy the viewer
|
|
13319
13319
|
destroy: function() {
|
|
13320
13320
|
var t = this.element, n = this.options;
|
|
13321
|
-
return t[
|
|
13321
|
+
return t[In] ? (this.destroyed = !0, this.ready ? (this.played && this.stop(), n.inline ? (this.fulled && this.exit(), this.unbind()) : this.isShown ? (this.viewing && (this.imageRendering ? this.imageRendering.abort() : this.imageInitializing && this.imageInitializing.abort()), this.hiding && this.transitioning.abort(), this.hidden()) : this.showing && (this.transitioning.abort(), this.hidden()), this.ready = !1, this.viewer.parentNode.removeChild(this.viewer)) : n.inline && (this.delaying ? this.delaying.abort() : this.initializing && this.initializing.abort()), n.inline || gr(t, Wu, this.onStart), t[In] = void 0, this) : this;
|
|
13322
13322
|
}
|
|
13323
13323
|
}, IG = {
|
|
13324
13324
|
getImageURL: function(t) {
|
|
@@ -13417,12 +13417,12 @@ var AG = {
|
|
|
13417
13417
|
key: "init",
|
|
13418
13418
|
value: function() {
|
|
13419
13419
|
var n = this, r = this.element, o = this.options;
|
|
13420
|
-
if (!r[
|
|
13421
|
-
r[
|
|
13420
|
+
if (!r[In]) {
|
|
13421
|
+
r[In] = this, o.focus && !o.keyboard && (o.focus = !1);
|
|
13422
13422
|
var s = r.localName === "img", i = [];
|
|
13423
13423
|
if (kr(s ? [r] : r.querySelectorAll("img"), function(c) {
|
|
13424
13424
|
mr(o.filter) ? o.filter.call(n, c) && i.push(c) : n.getImageURL(c) && i.push(c);
|
|
13425
|
-
}), this.isImg = s, this.length = i.length, this.images = i, this.initBody(), ku(document.createElement(
|
|
13425
|
+
}), this.isImg = s, this.length = i.length, this.images = i, this.initBody(), ku(document.createElement(In).style.transition) && (o.transition = !1), o.inline) {
|
|
13426
13426
|
var a = 0, l = function() {
|
|
13427
13427
|
if (a += 1, a === n.length) {
|
|
13428
13428
|
var u;
|
|
@@ -13470,8 +13470,8 @@ var AG = {
|
|
|
13470
13470
|
if (!this.ready) {
|
|
13471
13471
|
var n = this.element, r = this.options, o = n.parentNode, s = document.createElement("div");
|
|
13472
13472
|
s.innerHTML = aG;
|
|
13473
|
-
var i = s.querySelector(".".concat(
|
|
13474
|
-
if (this.parent = o, this.viewer = i, this.title = a, this.toolbar = l, this.navbar = c, this.button = u, this.canvas = d, this.footer = i.querySelector(".".concat(
|
|
13473
|
+
var i = s.querySelector(".".concat(In, "-container")), a = i.querySelector(".".concat(In, "-title")), l = i.querySelector(".".concat(In, "-toolbar")), c = i.querySelector(".".concat(In, "-navbar")), u = i.querySelector(".".concat(In, "-button")), d = i.querySelector(".".concat(In, "-canvas"));
|
|
13474
|
+
if (this.parent = o, this.viewer = i, this.title = a, this.toolbar = l, this.navbar = c, this.button = u, this.canvas = d, this.footer = i.querySelector(".".concat(In, "-footer")), this.tooltipBox = i.querySelector(".".concat(In, "-tooltip")), this.player = i.querySelector(".".concat(In, "-player")), this.list = i.querySelector(".".concat(In, "-list")), i.id = "".concat(In).concat(this.id), a.id = "".concat(In, "Title").concat(this.id), pn(a, r.title ? fp(Array.isArray(r.title) ? r.title[0] : r.title) : Bl), pn(c, r.navbar ? fp(r.navbar) : Bl), Kf(u, Bl, !r.button), r.keyboard && u.setAttribute("tabindex", 0), r.backdrop && (pn(i, "".concat(In, "-backdrop")), !r.inline && r.backdrop !== "static" && av(d, L1, "hide")), Yf(r.className) && r.className && r.className.split(y3).forEach(function(w) {
|
|
13475
13475
|
pn(i, w);
|
|
13476
13476
|
}), r.toolbar) {
|
|
13477
13477
|
var f = document.createElement("ul"), h = xu(r.toolbar), p = dp.slice(0, 3), m = dp.slice(7, 9), g = dp.slice(9);
|
|
@@ -13479,7 +13479,7 @@ var AG = {
|
|
|
13479
13479
|
var _ = h && xu(w), E = h ? b3(C) : w, M = _ && !ku(w.show) ? w.show : w;
|
|
13480
13480
|
if (!(!M || !r.zoomable && p.indexOf(E) !== -1 || !r.rotatable && m.indexOf(E) !== -1 || !r.scalable && g.indexOf(E) !== -1)) {
|
|
13481
13481
|
var I = _ && !ku(w.size) ? w.size : w, D = _ && !ku(w.click) ? w.click : w, z = document.createElement("li");
|
|
13482
|
-
r.keyboard && z.setAttribute("tabindex", 0), z.setAttribute("role", "button"), pn(z, "".concat(
|
|
13482
|
+
r.keyboard && z.setAttribute("tabindex", 0), z.setAttribute("role", "button"), pn(z, "".concat(In, "-").concat(E)), mr(D) || av(z, L1, E), Fr(M) && pn(z, fp(M)), ["small", "large"].indexOf(I) !== -1 ? pn(z, "".concat(In, "-").concat(I)) : E === "play" && pn(z, "".concat(In, "-large")), mr(D) && bn(z, Wu, D), f.appendChild(z);
|
|
13483
13483
|
}
|
|
13484
13484
|
}), l.appendChild(f);
|
|
13485
13485
|
} else
|
|
@@ -15280,7 +15280,7 @@ function IV(e) {
|
|
|
15280
15280
|
return hv(e, n);
|
|
15281
15281
|
};
|
|
15282
15282
|
}
|
|
15283
|
-
function
|
|
15283
|
+
function Cn(e, t) {
|
|
15284
15284
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : of;
|
|
15285
15285
|
if (E5 && E5(e, null), !ts(t))
|
|
15286
15286
|
return e;
|
|
@@ -15466,9 +15466,9 @@ function gC() {
|
|
|
15466
15466
|
let {
|
|
15467
15467
|
IS_ALLOWED_URI: Y
|
|
15468
15468
|
} = z5, ee = null;
|
|
15469
|
-
const K =
|
|
15469
|
+
const K = Cn({}, [...L5, ...Lg, ...Ng, ...Pg, ...N5]);
|
|
15470
15470
|
let te = null;
|
|
15471
|
-
const fe =
|
|
15471
|
+
const fe = Cn({}, [...P5, ...Dg, ...D5, ...mp]);
|
|
15472
15472
|
let Me = Object.seal(du(null, {
|
|
15473
15473
|
tagNameCheck: {
|
|
15474
15474
|
writable: !0,
|
|
@@ -15506,15 +15506,15 @@ function gC() {
|
|
|
15506
15506
|
let We = !0, Ke = !0, Se = !1, Te = !0, J = !1, me = !0, Ne = !1, tt = !1, Qe = !1, V = !1, se = !1, de = !1, ke = !0, Le = !1;
|
|
15507
15507
|
const Ae = "user-content-";
|
|
15508
15508
|
let ae = !0, _e = !1, Pe = {}, Ee = null;
|
|
15509
|
-
const Je =
|
|
15509
|
+
const Je = Cn({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
15510
15510
|
let wt = null;
|
|
15511
|
-
const Ie =
|
|
15511
|
+
const Ie = Cn({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
15512
15512
|
let pt = null;
|
|
15513
|
-
const vt =
|
|
15513
|
+
const vt = Cn({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), $t = "http://www.w3.org/1998/Math/MathML", mt = "http://www.w3.org/2000/svg", ye = "http://www.w3.org/1999/xhtml";
|
|
15514
15514
|
let st = ye, Dt = !1, yt = null;
|
|
15515
|
-
const Wt =
|
|
15516
|
-
let Be =
|
|
15517
|
-
const _t =
|
|
15515
|
+
const Wt = Cn({}, [$t, mt, ye], Og);
|
|
15516
|
+
let Be = Cn({}, ["mi", "mo", "mn", "ms", "mtext"]), lt = Cn({}, ["annotation-xml"]);
|
|
15517
|
+
const _t = Cn({}, ["title", "style", "font", "a", "script"]);
|
|
15518
15518
|
let Ht = null;
|
|
15519
15519
|
const Bt = ["application/xhtml+xml", "text/html"], Rt = "text/html";
|
|
15520
15520
|
let Mt = null, an = null;
|
|
@@ -15525,9 +15525,9 @@ function gC() {
|
|
|
15525
15525
|
if (an && an === le)
|
|
15526
15526
|
return;
|
|
15527
15527
|
(!le || typeof le != "object") && (le = {}), le = bs(le), Ht = // eslint-disable-next-line unicorn/prefer-includes
|
|
15528
|
-
Bt.indexOf(le.PARSER_MEDIA_TYPE) === -1 ? Rt : le.PARSER_MEDIA_TYPE, Mt = Ht === "application/xhtml+xml" ? Og : of, ee = Vr(le, "ALLOWED_TAGS") && ts(le.ALLOWED_TAGS) ?
|
|
15528
|
+
Bt.indexOf(le.PARSER_MEDIA_TYPE) === -1 ? Rt : le.PARSER_MEDIA_TYPE, Mt = Ht === "application/xhtml+xml" ? Og : of, ee = Vr(le, "ALLOWED_TAGS") && ts(le.ALLOWED_TAGS) ? Cn({}, le.ALLOWED_TAGS, Mt) : K, te = Vr(le, "ALLOWED_ATTR") && ts(le.ALLOWED_ATTR) ? Cn({}, le.ALLOWED_ATTR, Mt) : fe, yt = Vr(le, "ALLOWED_NAMESPACES") && ts(le.ALLOWED_NAMESPACES) ? Cn({}, le.ALLOWED_NAMESPACES, Og) : Wt, pt = Vr(le, "ADD_URI_SAFE_ATTR") && ts(le.ADD_URI_SAFE_ATTR) ? Cn(bs(vt), le.ADD_URI_SAFE_ATTR, Mt) : vt, wt = Vr(le, "ADD_DATA_URI_TAGS") && ts(le.ADD_DATA_URI_TAGS) ? Cn(bs(Ie), le.ADD_DATA_URI_TAGS, Mt) : Ie, Ee = Vr(le, "FORBID_CONTENTS") && ts(le.FORBID_CONTENTS) ? Cn({}, le.FORBID_CONTENTS, Mt) : Je, $e = Vr(le, "FORBID_TAGS") && ts(le.FORBID_TAGS) ? Cn({}, le.FORBID_TAGS, Mt) : bs({}), He = Vr(le, "FORBID_ATTR") && ts(le.FORBID_ATTR) ? Cn({}, le.FORBID_ATTR, Mt) : bs({}), Pe = Vr(le, "USE_PROFILES") ? le.USE_PROFILES && typeof le.USE_PROFILES == "object" ? bs(le.USE_PROFILES) : le.USE_PROFILES : !1, We = le.ALLOW_ARIA_ATTR !== !1, Ke = le.ALLOW_DATA_ATTR !== !1, Se = le.ALLOW_UNKNOWN_PROTOCOLS || !1, Te = le.ALLOW_SELF_CLOSE_IN_ATTR !== !1, J = le.SAFE_FOR_TEMPLATES || !1, me = le.SAFE_FOR_XML !== !1, Ne = le.WHOLE_DOCUMENT || !1, V = le.RETURN_DOM || !1, se = le.RETURN_DOM_FRAGMENT || !1, de = le.RETURN_TRUSTED_TYPE || !1, Qe = le.FORCE_BODY || !1, ke = le.SANITIZE_DOM !== !1, Le = le.SANITIZE_NAMED_PROPS || !1, ae = le.KEEP_CONTENT !== !1, _e = le.IN_PLACE || !1, Y = LV(le.ALLOWED_URI_REGEXP) ? le.ALLOWED_URI_REGEXP : pC, st = typeof le.NAMESPACE == "string" ? le.NAMESPACE : ye, Be = Vr(le, "MATHML_TEXT_INTEGRATION_POINTS") && le.MATHML_TEXT_INTEGRATION_POINTS && typeof le.MATHML_TEXT_INTEGRATION_POINTS == "object" ? bs(le.MATHML_TEXT_INTEGRATION_POINTS) : Cn({}, ["mi", "mo", "mn", "ms", "mtext"]), lt = Vr(le, "HTML_INTEGRATION_POINTS") && le.HTML_INTEGRATION_POINTS && typeof le.HTML_INTEGRATION_POINTS == "object" ? bs(le.HTML_INTEGRATION_POINTS) : Cn({}, ["annotation-xml"]);
|
|
15529
15529
|
const Ze = Vr(le, "CUSTOM_ELEMENT_HANDLING") && le.CUSTOM_ELEMENT_HANDLING && typeof le.CUSTOM_ELEMENT_HANDLING == "object" ? bs(le.CUSTOM_ELEMENT_HANDLING) : du(null);
|
|
15530
|
-
if (Me = du(null), Vr(Ze, "tagNameCheck") && qt(Ze.tagNameCheck) && (Me.tagNameCheck = Ze.tagNameCheck), Vr(Ze, "attributeNameCheck") && qt(Ze.attributeNameCheck) && (Me.attributeNameCheck = Ze.attributeNameCheck), Vr(Ze, "allowCustomizedBuiltInElements") && typeof Ze.allowCustomizedBuiltInElements == "boolean" && (Me.allowCustomizedBuiltInElements = Ze.allowCustomizedBuiltInElements), J && (Ke = !1), se && (V = !0), Pe && (ee =
|
|
15530
|
+
if (Me = du(null), Vr(Ze, "tagNameCheck") && qt(Ze.tagNameCheck) && (Me.tagNameCheck = Ze.tagNameCheck), Vr(Ze, "attributeNameCheck") && qt(Ze.attributeNameCheck) && (Me.attributeNameCheck = Ze.attributeNameCheck), Vr(Ze, "allowCustomizedBuiltInElements") && typeof Ze.allowCustomizedBuiltInElements == "boolean" && (Me.allowCustomizedBuiltInElements = Ze.allowCustomizedBuiltInElements), J && (Ke = !1), se && (V = !0), Pe && (ee = Cn({}, N5), te = du(null), Pe.html === !0 && (Cn(ee, L5), Cn(te, P5)), Pe.svg === !0 && (Cn(ee, Lg), Cn(te, Dg), Cn(te, mp)), Pe.svgFilters === !0 && (Cn(ee, Ng), Cn(te, Dg), Cn(te, mp)), Pe.mathMl === !0 && (Cn(ee, Pg), Cn(te, D5), Cn(te, mp))), ot.tagCheck = null, ot.attributeCheck = null, Vr(le, "ADD_TAGS") && (typeof le.ADD_TAGS == "function" ? ot.tagCheck = le.ADD_TAGS : ts(le.ADD_TAGS) && (ee === K && (ee = bs(ee)), Cn(ee, le.ADD_TAGS, Mt))), Vr(le, "ADD_ATTR") && (typeof le.ADD_ATTR == "function" ? ot.attributeCheck = le.ADD_ATTR : ts(le.ADD_ATTR) && (te === fe && (te = bs(te)), Cn(te, le.ADD_ATTR, Mt))), Vr(le, "ADD_URI_SAFE_ATTR") && ts(le.ADD_URI_SAFE_ATTR) && Cn(pt, le.ADD_URI_SAFE_ATTR, Mt), Vr(le, "FORBID_CONTENTS") && ts(le.FORBID_CONTENTS) && (Ee === Je && (Ee = bs(Ee)), Cn(Ee, le.FORBID_CONTENTS, Mt)), Vr(le, "ADD_FORBID_CONTENTS") && ts(le.ADD_FORBID_CONTENTS) && (Ee === Je && (Ee = bs(Ee)), Cn(Ee, le.ADD_FORBID_CONTENTS, Mt)), ae && (ee["#text"] = !0), Ne && Cn(ee, ["html", "head", "body"]), ee.table && (Cn(ee, ["tbody"]), delete $e.tbody), le.TRUSTED_TYPES_POLICY) {
|
|
15531
15531
|
if (typeof le.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
15532
15532
|
throw pp('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
15533
15533
|
if (typeof le.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -15536,7 +15536,7 @@ function gC() {
|
|
|
15536
15536
|
} else
|
|
15537
15537
|
C === void 0 && (C = WV(h, o)), C !== null && typeof _ == "string" && (_ = C.createHTML(""));
|
|
15538
15538
|
ls && ls(le), an = le;
|
|
15539
|
-
}, mn =
|
|
15539
|
+
}, mn = Cn({}, [...Lg, ...Ng, ...NV]), ln = Cn({}, [...Pg, ...PV]), Oe = function(le) {
|
|
15540
15540
|
let Ze = w(le);
|
|
15541
15541
|
(!Ze || !Ze.tagName) && (Ze = {
|
|
15542
15542
|
namespaceURI: st,
|
|
@@ -15598,8 +15598,8 @@ function gC() {
|
|
|
15598
15598
|
} catch {
|
|
15599
15599
|
}
|
|
15600
15600
|
}
|
|
15601
|
-
const
|
|
15602
|
-
return le && bt &&
|
|
15601
|
+
const Ln = Ze.body || Ze.documentElement;
|
|
15602
|
+
return le && bt && Ln.insertBefore(n.createTextNode(bt), Ln.childNodes[0] || null), st === ye ? D.call(Ze, Ne ? "html" : "body")[0] : Ne ? Ze.documentElement : Ln;
|
|
15603
15603
|
}, dn = function(le) {
|
|
15604
15604
|
return M.call(
|
|
15605
15605
|
le.ownerDocument || le,
|
|
@@ -15608,9 +15608,9 @@ function gC() {
|
|
|
15608
15608
|
c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION,
|
|
15609
15609
|
null
|
|
15610
15610
|
);
|
|
15611
|
-
},
|
|
15611
|
+
}, En = function(le) {
|
|
15612
15612
|
return le instanceof d && (typeof le.nodeName != "string" || typeof le.textContent != "string" || typeof le.removeChild != "function" || !(le.attributes instanceof u) || typeof le.removeAttribute != "function" || typeof le.setAttribute != "function" || typeof le.namespaceURI != "string" || typeof le.insertBefore != "function" || typeof le.hasChildNodes != "function");
|
|
15613
|
-
},
|
|
15613
|
+
}, Rn = function(le) {
|
|
15614
15614
|
return typeof a == "function" && le instanceof a;
|
|
15615
15615
|
};
|
|
15616
15616
|
function xt(St, le, Ze) {
|
|
@@ -15620,23 +15620,23 @@ function gC() {
|
|
|
15620
15620
|
}
|
|
15621
15621
|
const nr = function(le) {
|
|
15622
15622
|
let Ze = null;
|
|
15623
|
-
if (xt(N.beforeSanitizeElements, le, null),
|
|
15623
|
+
if (xt(N.beforeSanitizeElements, le, null), En(le))
|
|
15624
15624
|
return Ge(le), !0;
|
|
15625
15625
|
const bt = Mt(le.nodeName);
|
|
15626
15626
|
if (xt(N.uponSanitizeElement, le, {
|
|
15627
15627
|
tagName: bt,
|
|
15628
15628
|
allowedTags: ee
|
|
15629
|
-
}), me && le.hasChildNodes() && !
|
|
15629
|
+
}), me && le.hasChildNodes() && !Rn(le.firstElementChild) && Oo(/<[/\w!]/g, le.innerHTML) && Oo(/<[/\w!]/g, le.textContent) || me && le.namespaceURI === ye && bt === "style" && Rn(le.firstElementChild) || le.nodeType === Fd.progressingInstruction || me && le.nodeType === Fd.comment && Oo(/<[/\w]/g, le.data))
|
|
15630
15630
|
return Ge(le), !0;
|
|
15631
15631
|
if ($e[bt] || !(ot.tagCheck instanceof Function && ot.tagCheck(bt)) && !ee[bt]) {
|
|
15632
15632
|
if (!$e[bt] && cr(bt) && (Me.tagNameCheck instanceof RegExp && Oo(Me.tagNameCheck, bt) || Me.tagNameCheck instanceof Function && Me.tagNameCheck(bt)))
|
|
15633
15633
|
return !1;
|
|
15634
15634
|
if (ae && !Ee[bt]) {
|
|
15635
|
-
const cn = w(le) || le.parentNode,
|
|
15636
|
-
if (
|
|
15637
|
-
const Kt =
|
|
15635
|
+
const cn = w(le) || le.parentNode, Ln = b(le) || le.childNodes;
|
|
15636
|
+
if (Ln && cn) {
|
|
15637
|
+
const Kt = Ln.length;
|
|
15638
15638
|
for (let qn = Kt - 1; qn >= 0; --qn) {
|
|
15639
|
-
const ur = m(
|
|
15639
|
+
const ur = m(Ln[qn], !0);
|
|
15640
15640
|
cn.insertBefore(ur, v(le));
|
|
15641
15641
|
}
|
|
15642
15642
|
}
|
|
@@ -15676,14 +15676,14 @@ function gC() {
|
|
|
15676
15676
|
}
|
|
15677
15677
|
}
|
|
15678
15678
|
return !0;
|
|
15679
|
-
}, sn =
|
|
15679
|
+
}, sn = Cn({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), cr = function(le) {
|
|
15680
15680
|
return !sn[of(le)] && Oo(F, le);
|
|
15681
15681
|
}, zr = function(le) {
|
|
15682
15682
|
xt(N.beforeSanitizeAttributes, le, null);
|
|
15683
15683
|
const {
|
|
15684
15684
|
attributes: Ze
|
|
15685
15685
|
} = le;
|
|
15686
|
-
if (!Ze ||
|
|
15686
|
+
if (!Ze || En(le))
|
|
15687
15687
|
return;
|
|
15688
15688
|
const bt = {
|
|
15689
15689
|
attrName: "",
|
|
@@ -15694,17 +15694,17 @@ function gC() {
|
|
|
15694
15694
|
};
|
|
15695
15695
|
let cn = Ze.length;
|
|
15696
15696
|
for (; cn--; ) {
|
|
15697
|
-
const
|
|
15697
|
+
const Ln = Ze[cn], {
|
|
15698
15698
|
name: Kt,
|
|
15699
15699
|
namespaceURI: qn,
|
|
15700
15700
|
value: ur
|
|
15701
|
-
} =
|
|
15702
|
-
let vn = Kt === "value" ?
|
|
15703
|
-
if (bt.attrName =
|
|
15701
|
+
} = Ln, On = Mt(Kt), kn = ur;
|
|
15702
|
+
let vn = Kt === "value" ? kn : EV(kn);
|
|
15703
|
+
if (bt.attrName = On, bt.attrValue = vn, bt.keepAttr = !0, bt.forceKeepAttr = void 0, xt(N.uponSanitizeAttribute, le, bt), vn = bt.attrValue, Le && (On === "id" || On === "name") && I5(vn, Ae) !== 0 && (ft(Kt, le), vn = Ae + vn), me && Oo(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, vn)) {
|
|
15704
15704
|
ft(Kt, le);
|
|
15705
15705
|
continue;
|
|
15706
15706
|
}
|
|
15707
|
-
if (
|
|
15707
|
+
if (On === "attributename" && T5(vn, "href")) {
|
|
15708
15708
|
ft(Kt, le);
|
|
15709
15709
|
continue;
|
|
15710
15710
|
}
|
|
@@ -15722,12 +15722,12 @@ function gC() {
|
|
|
15722
15722
|
vn = Zc(vn, be, " ");
|
|
15723
15723
|
});
|
|
15724
15724
|
const uo = Mt(le.nodeName);
|
|
15725
|
-
if (!Gt(uo,
|
|
15725
|
+
if (!Gt(uo, On, vn)) {
|
|
15726
15726
|
ft(Kt, le);
|
|
15727
15727
|
continue;
|
|
15728
15728
|
}
|
|
15729
15729
|
if (C && typeof h == "object" && typeof h.getAttributeType == "function" && !qn)
|
|
15730
|
-
switch (h.getAttributeType(uo,
|
|
15730
|
+
switch (h.getAttributeType(uo, On)) {
|
|
15731
15731
|
case "TrustedHTML": {
|
|
15732
15732
|
vn = C.createHTML(vn);
|
|
15733
15733
|
break;
|
|
@@ -15737,32 +15737,32 @@ function gC() {
|
|
|
15737
15737
|
break;
|
|
15738
15738
|
}
|
|
15739
15739
|
}
|
|
15740
|
-
if (vn !==
|
|
15740
|
+
if (vn !== kn)
|
|
15741
15741
|
try {
|
|
15742
|
-
qn ? le.setAttributeNS(qn, Kt, vn) : le.setAttribute(Kt, vn),
|
|
15742
|
+
qn ? le.setAttributeNS(qn, Kt, vn) : le.setAttribute(Kt, vn), En(le) ? Ge(le) : M5(t.removed);
|
|
15743
15743
|
} catch {
|
|
15744
15744
|
ft(Kt, le);
|
|
15745
15745
|
}
|
|
15746
15746
|
}
|
|
15747
15747
|
xt(N.afterSanitizeAttributes, le, null);
|
|
15748
|
-
},
|
|
15748
|
+
}, Dn = function(le) {
|
|
15749
15749
|
let Ze = null;
|
|
15750
15750
|
const bt = dn(le);
|
|
15751
15751
|
for (xt(N.beforeSanitizeShadowDOM, le, null); Ze = bt.nextNode(); )
|
|
15752
|
-
xt(N.uponSanitizeShadowNode, Ze, null), nr(Ze), zr(Ze), Ze.content instanceof s &&
|
|
15752
|
+
xt(N.uponSanitizeShadowNode, Ze, null), nr(Ze), zr(Ze), Ze.content instanceof s && Dn(Ze.content);
|
|
15753
15753
|
xt(N.afterSanitizeShadowDOM, le, null);
|
|
15754
15754
|
};
|
|
15755
15755
|
return t.sanitize = function(St) {
|
|
15756
|
-
let le = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Ze = null, bt = null, cn = null,
|
|
15757
|
-
if (Dt = !St, Dt && (St = "<!-->"), typeof St != "string" && !
|
|
15756
|
+
let le = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Ze = null, bt = null, cn = null, Ln = null;
|
|
15757
|
+
if (Dt = !St, Dt && (St = "<!-->"), typeof St != "string" && !Rn(St) && (St = OV(St), typeof St != "string"))
|
|
15758
15758
|
throw pp("dirty is not a string, aborting");
|
|
15759
15759
|
if (!t.isSupported)
|
|
15760
15760
|
return St;
|
|
15761
15761
|
if (tt || fn(le), t.removed = [], typeof St == "string" && (_e = !1), _e) {
|
|
15762
15762
|
const ur = St.nodeName;
|
|
15763
15763
|
if (typeof ur == "string") {
|
|
15764
|
-
const
|
|
15765
|
-
if (!ee[
|
|
15764
|
+
const On = Mt(ur);
|
|
15765
|
+
if (!ee[On] || $e[On])
|
|
15766
15766
|
throw pp("root node is forbidden and cannot be sanitized in-place");
|
|
15767
15767
|
}
|
|
15768
15768
|
} else if (St instanceof a)
|
|
@@ -15777,23 +15777,23 @@ function gC() {
|
|
|
15777
15777
|
Ze && Qe && Ge(Ze.firstChild);
|
|
15778
15778
|
const Kt = dn(_e ? St : Ze);
|
|
15779
15779
|
for (; cn = Kt.nextNode(); )
|
|
15780
|
-
nr(cn), zr(cn), cn.content instanceof s &&
|
|
15780
|
+
nr(cn), zr(cn), cn.content instanceof s && Dn(cn.content);
|
|
15781
15781
|
if (_e)
|
|
15782
15782
|
return St;
|
|
15783
15783
|
if (V) {
|
|
15784
15784
|
if (J) {
|
|
15785
15785
|
Ze.normalize();
|
|
15786
15786
|
let ur = Ze.innerHTML;
|
|
15787
|
-
Dd([W, P, B], (
|
|
15788
|
-
ur = Zc(ur,
|
|
15787
|
+
Dd([W, P, B], (On) => {
|
|
15788
|
+
ur = Zc(ur, On, " ");
|
|
15789
15789
|
}), Ze.innerHTML = ur;
|
|
15790
15790
|
}
|
|
15791
15791
|
if (se)
|
|
15792
|
-
for (
|
|
15793
|
-
|
|
15792
|
+
for (Ln = I.call(Ze.ownerDocument); Ze.firstChild; )
|
|
15793
|
+
Ln.appendChild(Ze.firstChild);
|
|
15794
15794
|
else
|
|
15795
|
-
|
|
15796
|
-
return (te.shadowroot || te.shadowrootmode) && (
|
|
15795
|
+
Ln = Ze;
|
|
15796
|
+
return (te.shadowroot || te.shadowrootmode) && (Ln = z.call(r, Ln, !0)), Ln;
|
|
15797
15797
|
}
|
|
15798
15798
|
let qn = Ne ? Ze.outerHTML : Ze.innerHTML;
|
|
15799
15799
|
return Ne && ee["!doctype"] && Ze.ownerDocument && Ze.ownerDocument.doctype && Ze.ownerDocument.doctype.name && Oo(mC, Ze.ownerDocument.doctype.name) && (qn = "<!DOCTYPE " + Ze.ownerDocument.doctype.name + `>
|
|
@@ -18685,7 +18685,7 @@ function Ks(e = {}) {
|
|
|
18685
18685
|
...e
|
|
18686
18686
|
};
|
|
18687
18687
|
}
|
|
18688
|
-
function
|
|
18688
|
+
function ta(e) {
|
|
18689
18689
|
const t = (e % 4 + 4) % 4;
|
|
18690
18690
|
return t < 0.05 ? 1 - t / 0.05 : t < 0.1 ? (t - 0.05) / 0.05 : 1;
|
|
18691
18691
|
}
|
|
@@ -18702,7 +18702,7 @@ const nK = [
|
|
|
18702
18702
|
return Ks({
|
|
18703
18703
|
radii: Qs(t),
|
|
18704
18704
|
cy: Math.sin(e * (sf / 2.6)) * 0.04,
|
|
18705
|
-
eyes: ei(r, o, af, lf,
|
|
18705
|
+
eyes: ei(r, o, af, lf, ta(e))
|
|
18706
18706
|
});
|
|
18707
18707
|
}
|
|
18708
18708
|
},
|
|
@@ -18738,7 +18738,7 @@ const nK = [
|
|
|
18738
18738
|
});
|
|
18739
18739
|
return Ks({
|
|
18740
18740
|
radii: Qs(1),
|
|
18741
|
-
eyes: ei(Math.cos(n) * 0.04, Math.sin(n) * 0.03, af, lf,
|
|
18741
|
+
eyes: ei(Math.cos(n) * 0.04, Math.sin(n) * 0.03, af, lf, ta(e)),
|
|
18742
18742
|
sparks: [r(0, gi, 0.9), r(-0.5, gi * 0.45, 0.22)]
|
|
18743
18743
|
});
|
|
18744
18744
|
}
|
|
@@ -18751,7 +18751,7 @@ const nK = [
|
|
|
18751
18751
|
return Ks({
|
|
18752
18752
|
radii: Qs(1 + 0.015 * Math.sin(e * 1.7)),
|
|
18753
18753
|
// 略睁大 — 「在找」
|
|
18754
|
-
eyes: ei(n * 0.1, -0.02, 0.155, 0.34,
|
|
18754
|
+
eyes: ei(n * 0.1, -0.02, 0.155, 0.34, ta(e)),
|
|
18755
18755
|
sparks: [
|
|
18756
18756
|
{ x: n, y: -1.08, r: gi * 0.8, opacity: r * t },
|
|
18757
18757
|
{ x: n * 0.5, y: -0.86, r: gi * 0.38, opacity: 0.22 * r * t }
|
|
@@ -18768,7 +18768,7 @@ const nK = [
|
|
|
18768
18768
|
radii: QY(t, 4.6),
|
|
18769
18769
|
rot: n,
|
|
18770
18770
|
// 略收窄的专注眼
|
|
18771
|
-
eyes: ei(0, 0.01, 0.115, 0.28,
|
|
18771
|
+
eyes: ei(0, 0.01, 0.115, 0.28, ta(e)),
|
|
18772
18772
|
sparks: [
|
|
18773
18773
|
{
|
|
18774
18774
|
x: 1.05 * Math.cos(e * 0.9),
|
|
@@ -18790,7 +18790,7 @@ const nK = [
|
|
|
18790
18790
|
radii: Qs(1 + 0.025 * Math.sin(e * 2.8)),
|
|
18791
18791
|
cx: t * 0.04,
|
|
18792
18792
|
cy: Math.sin(e * 2.8) * 0.035,
|
|
18793
|
-
eyes: ei(0.07 + t * 0.08, 0.07 + r * 0.05, 0.125, 0.28,
|
|
18793
|
+
eyes: ei(0.07 + t * 0.08, 0.07 + r * 0.05, 0.125, 0.28, ta(e)),
|
|
18794
18794
|
sparks: [
|
|
18795
18795
|
{ x: n, y: r, r: gi * 0.8, opacity: 0.5 + 0.5 * o },
|
|
18796
18796
|
{ x: n - 0.26, y: r + 0.09, r: gi * 0.36, opacity: 0.2 + 0.25 * o }
|
|
@@ -18805,7 +18805,7 @@ const nK = [
|
|
|
18805
18805
|
const t = Dl.easeOutQuint(Di(e / 0.5)), n = 1 + 0.04 * Math.sin(t * Math.PI) * (1 - t * 0.7);
|
|
18806
18806
|
return Ks({
|
|
18807
18807
|
radii: Qs(n),
|
|
18808
|
-
eyes: ei(0, -0.05, 0.15, 0.34,
|
|
18808
|
+
eyes: ei(0, -0.05, 0.15, 0.34, ta(e + 0.6)),
|
|
18809
18809
|
sparks: [
|
|
18810
18810
|
{ x: 0, y: -1.12, r: gi * 0.72, opacity: t },
|
|
18811
18811
|
{ x: 0, y: -0.88, r: gi * 0.26, opacity: 0.7 * t }
|
|
@@ -18820,7 +18820,7 @@ const nK = [
|
|
|
18820
18820
|
const t = e * 0.35;
|
|
18821
18821
|
return Ks({
|
|
18822
18822
|
radii: Qs(1 + 0.02 * Math.sin(e * (sf / 4))),
|
|
18823
|
-
eyes: ei(0.04, -0.08 + Math.sin(t) * 0.03, af, lf,
|
|
18823
|
+
eyes: ei(0.04, -0.08 + Math.sin(t) * 0.03, af, lf, ta(e))
|
|
18824
18824
|
});
|
|
18825
18825
|
}
|
|
18826
18826
|
},
|
|
@@ -18832,7 +18832,7 @@ const nK = [
|
|
|
18832
18832
|
return Ks({
|
|
18833
18833
|
radii: Qs(1 + t),
|
|
18834
18834
|
cy: -t * 0.4,
|
|
18835
|
-
eyes: ei(0, -0.06, 0.14, 0.26,
|
|
18835
|
+
eyes: ei(0, -0.06, 0.14, 0.26, ta(e))
|
|
18836
18836
|
});
|
|
18837
18837
|
}
|
|
18838
18838
|
},
|
|
@@ -18861,7 +18861,7 @@ const nK = [
|
|
|
18861
18861
|
radii: Qs(0.98),
|
|
18862
18862
|
cx: t,
|
|
18863
18863
|
rot: t * 0.4,
|
|
18864
|
-
eyes: ei(0.06, 0.05, 0.12, 0.24,
|
|
18864
|
+
eyes: ei(0.06, 0.05, 0.12, 0.24, ta(e))
|
|
18865
18865
|
});
|
|
18866
18866
|
}
|
|
18867
18867
|
},
|
|
@@ -19841,33 +19841,33 @@ const vK = {
|
|
|
19841
19841
|
var dn = lt * (0.5 + mn / (rn - 1) * 0.5) / 2;
|
|
19842
19842
|
qt.push(-ft * dn), fn.push(Ge * dn);
|
|
19843
19843
|
}
|
|
19844
|
-
function
|
|
19844
|
+
function En(bt) {
|
|
19845
19845
|
var cn = Math.max(Math.hypot(qt[bt], fn[bt]), 0.2);
|
|
19846
19846
|
return "A" + f(cn) + " " + f(cn) + " 0 0 0 ";
|
|
19847
19847
|
}
|
|
19848
|
-
function
|
|
19849
|
-
var
|
|
19850
|
-
for (Kt = bt; Kt <= cn; Kt++)
|
|
19851
|
-
for (
|
|
19852
|
-
return bt === 0 && (
|
|
19848
|
+
function Rn(bt, cn) {
|
|
19849
|
+
var Ln = "", Kt;
|
|
19850
|
+
for (Kt = bt; Kt <= cn; Kt++) Ln += (Kt === bt ? "M" : "L") + f(Be[Kt].x + qt[Kt]) + " " + f(Be[Kt].y + fn[Kt]);
|
|
19851
|
+
for (Ln += cn === rn - 1 ? En(cn) : "L", Kt = cn; Kt >= bt; Kt--) Ln += (Kt === cn ? "" : "L") + f(Be[Kt].x - qt[Kt]) + " " + f(Be[Kt].y - fn[Kt]);
|
|
19852
|
+
return bt === 0 && (Ln += En(0) + f(Be[0].x + qt[0]) + " " + f(Be[0].y + fn[0])), Ln + "Z";
|
|
19853
19853
|
}
|
|
19854
19854
|
var xt = "", nr = "", Gt = 0;
|
|
19855
19855
|
if (_t) {
|
|
19856
19856
|
for (var sn = 1; sn < rn; sn++)
|
|
19857
19857
|
if (!(Be[sn].z !== 0 && sn !== rn - 1)) {
|
|
19858
19858
|
var cr = Be[Gt].z || Be[Math.min(Gt + 1, sn)].z;
|
|
19859
|
-
cr >= 0 ? xt +=
|
|
19859
|
+
cr >= 0 ? xt += Rn(Gt, sn) : nr += Rn(Gt, sn), Gt = sn;
|
|
19860
19860
|
}
|
|
19861
19861
|
return { front: xt, back: nr };
|
|
19862
19862
|
}
|
|
19863
19863
|
for (; Gt < rn; ) {
|
|
19864
|
-
for (var zr = Be[Gt].z >= 0,
|
|
19865
|
-
var St = Math.max(Gt - 1, 0), le = Math.min(
|
|
19864
|
+
for (var zr = Be[Gt].z >= 0, Dn = Gt; Dn + 1 < rn && Be[Dn + 1].z >= 0 === zr; ) Dn++;
|
|
19865
|
+
var St = Math.max(Gt - 1, 0), le = Math.min(Dn + 1, rn - 1);
|
|
19866
19866
|
if (le > St) {
|
|
19867
|
-
var Ze =
|
|
19867
|
+
var Ze = Rn(St, le);
|
|
19868
19868
|
zr ? xt += Ze : nr += Ze;
|
|
19869
19869
|
}
|
|
19870
|
-
Gt =
|
|
19870
|
+
Gt = Dn + 1;
|
|
19871
19871
|
}
|
|
19872
19872
|
return { front: xt, back: nr };
|
|
19873
19873
|
}
|
|
@@ -19905,16 +19905,16 @@ const vK = {
|
|
|
19905
19905
|
Rt && Rt !== Be.ring && (Be.ring = Rt, Be.node.setAttribute("d", g(Rt)), Be.c = v(Rt));
|
|
19906
19906
|
var Mt = Be.c || Se[_t], an = h(lt.open, 0.02, 2.4), rn = h(lt.scaleY * an * I.eye, 0.02, 2.4), qt = lt.scaleX * I.eye, fn = i * rn + 2, mn = s + I.y + (Mt[1] - s) * I.sy + lt.y + lt.lookY;
|
|
19907
19907
|
mn = h(mn, z + fn, N - fn);
|
|
19908
|
-
var ln = G(mn), Oe = (ln[0] + ln[1]) / 2, Ge = Math.max((ln[1] - ln[0]) / 2, 12), ft = I.x + (Mt[0] - s) * I.sx + lt.x + lt.lookX, Nt = h(ft / Ge, -1.15, 1.15), dn = Nt + (Bt || 0),
|
|
19909
|
-
if (
|
|
19908
|
+
var ln = G(mn), Oe = (ln[0] + ln[1]) / 2, Ge = Math.max((ln[1] - ln[0]) / 2, 12), ft = I.x + (Mt[0] - s) * I.sx + lt.x + lt.lookX, Nt = h(ft / Ge, -1.15, 1.15), dn = Nt + (Bt || 0), En = Math.cos(dn);
|
|
19909
|
+
if (En <= 0.02) {
|
|
19910
19910
|
Be.node.style.display = "none";
|
|
19911
19911
|
return;
|
|
19912
19912
|
}
|
|
19913
19913
|
Be.node.style.display = "";
|
|
19914
|
-
var
|
|
19914
|
+
var Rn = Oe + Ge * Math.sin(dn) * 0.985, xt = (mn - s) / 130, nr = Math.sqrt(1 - xt * xt * 0.22);
|
|
19915
19915
|
Be.node.setAttribute(
|
|
19916
19916
|
"transform",
|
|
19917
|
-
"translate(" + f(
|
|
19917
|
+
"translate(" + f(Rn) + " " + f(mn) + ")" + (lt.rotate ? " rotate(" + f(lt.rotate) + ")" : "") + " scale(" + f(qt * En) + " " + f(rn * nr) + ") translate(" + f(-Mt[0]) + " " + f(-Mt[1]) + ")"
|
|
19918
19918
|
);
|
|
19919
19919
|
var Gt = Ht > 0.5 ? "none" : lt.color, sn = Ht > 0.5 ? lt.color : "none";
|
|
19920
19920
|
Gt !== Be.lastFill && (Be.node.setAttribute("fill", Gt), Be.lastFill = Gt), sn !== Be.lastStroke && (Be.node.setAttribute("stroke", sn), Be.lastStroke = sn);
|
|
@@ -19953,20 +19953,20 @@ const vK = {
|
|
|
19953
19953
|
se.shift(), wt(Bt - p(0, 0.18) * Ge, Ge);
|
|
19954
19954
|
var Nt = (lt.orbit || 0) > 0;
|
|
19955
19955
|
if (Nt && _t >= ae) {
|
|
19956
|
-
for (var dn = 0,
|
|
19956
|
+
for (var dn = 0, En = 0; En < Ne.length; En++) Ne[En].orbitMode && dn++;
|
|
19957
19957
|
dn < 2 && Ie(dn), ae = _t + 700;
|
|
19958
19958
|
}
|
|
19959
|
-
for (var
|
|
19960
|
-
var xt = Ne[
|
|
19959
|
+
for (var Rn = Ne.length - 1; Rn >= 0; Rn--) {
|
|
19960
|
+
var xt = Ne[Rn];
|
|
19961
19961
|
xt.life += Rt;
|
|
19962
19962
|
var nr = xt.orbitMode ? !Nt : !Oe || xt.life > 5;
|
|
19963
19963
|
if (xt.ret = h(xt.ret + (nr ? Rt / 0.5 : -Rt / 0.35), 0, 1), nr && xt.ret >= 1) {
|
|
19964
|
-
vt(
|
|
19964
|
+
vt(Rn);
|
|
19965
19965
|
continue;
|
|
19966
19966
|
}
|
|
19967
19967
|
var Gt = xt.o;
|
|
19968
19968
|
xt.orbitMode ? Gt.lam += Gt.lamVel * Rt + mn * Gt.follow : Oe ? (Gt.carry = ln * Gt.follow, Gt.lam += mn * Gt.follow + Gt.lamVel * Rt) : (Gt.lam += (Gt.carry + Gt.lamVel) * Rt, Gt.carry *= Math.exp(-2.6 * Rt), Gt.lamVel *= Math.exp(-2.6 * Rt)), Gt.rad += Gt.radVel * Rt;
|
|
19969
|
-
for (var sn = xt.hist, cr = sn.length ? sn[sn.length - 1].l : Gt.lam - 1e-3 * Ge, zr = Gt.lam - cr,
|
|
19969
|
+
for (var sn = xt.hist, cr = sn.length ? sn[sn.length - 1].l : Gt.lam - 1e-3 * Ge, zr = Gt.lam - cr, Dn = Math.min(Math.ceil(Math.abs(zr) / 0.09), 24), St = 1; St <= Dn; St++) sn.push(Ee(Gt, cr + zr * St / Dn));
|
|
19970
19970
|
sn.length || sn.push(Ee(Gt, Gt.lam));
|
|
19971
19971
|
for (var le = Gt.arc * (1 - xt.ret * xt.ret * (3 - 2 * xt.ret)); sn.length > 2 && Math.abs(Gt.lam - sn[0].l) > le; ) sn.shift();
|
|
19972
19972
|
var Ze = Math.abs(Gt.lam - sn[0].l) - le;
|
|
@@ -19975,17 +19975,17 @@ const vK = {
|
|
|
19975
19975
|
sn[0] = Ee(Gt, bt);
|
|
19976
19976
|
}
|
|
19977
19977
|
sn.length > 48 && sn.splice(0, sn.length - 48);
|
|
19978
|
-
var cn = Math.cos(Gt.lam) * Math.cos(Gt.tilt),
|
|
19978
|
+
var cn = Math.cos(Gt.lam) * Math.cos(Gt.tilt), Ln = 0.72 + 0.28 * h(cn, 0, 1), Kt = Math.min(xt.life / 0.34, 1);
|
|
19979
19979
|
Kt = Kt * Kt * (3 - 2 * Kt);
|
|
19980
|
-
var qn = xt.r *
|
|
19980
|
+
var qn = xt.r * Ln * 1.7 * Kt * (1 - 0.72 * xt.ret * xt.ret), ur = Math.min(xt.life / 0.26, 1).toFixed(3);
|
|
19981
19981
|
if (sn.length < 2 || qn < 0.5) {
|
|
19982
19982
|
xt.back.setAttribute("opacity", "0"), xt.front.setAttribute("opacity", "0");
|
|
19983
19983
|
continue;
|
|
19984
19984
|
}
|
|
19985
|
-
var
|
|
19985
|
+
var On = We && We.projectTrail ? sn.map(function(fs) {
|
|
19986
19986
|
return We.projectTrail([fs.x - s, fs.y - s, fs.depth], xt.orbitMode);
|
|
19987
|
-
}) : sn,
|
|
19988
|
-
xt.back.setAttribute("d",
|
|
19987
|
+
}) : sn, kn = pt(On, qn);
|
|
19988
|
+
xt.back.setAttribute("d", kn.back), xt.front.setAttribute("d", kn.front), xt.back.setAttribute("opacity", ur), xt.front.setAttribute("opacity", ur);
|
|
19989
19989
|
for (var vn = xt.hue + xt.hueVel * xt.life, uo = 0; uo < xt.stops.length; uo++) {
|
|
19990
19990
|
var be = uo / (xt.stops.length - 1), De = vn + be * xt.hueSpan;
|
|
19991
19991
|
xt.stops[uo].setAttribute(
|
|
@@ -19993,7 +19993,7 @@ const vK = {
|
|
|
19993
19993
|
"hsl(" + ((De % 360 + 360) % 360).toFixed(0) + " 56% " + (56 + 11 * be).toFixed(0) + "%)"
|
|
19994
19994
|
);
|
|
19995
19995
|
}
|
|
19996
|
-
var it =
|
|
19996
|
+
var it = On[0], dr = On[On.length - 1];
|
|
19997
19997
|
xt.gradEl.setAttribute("x1", it.x.toFixed(1)), xt.gradEl.setAttribute("y1", it.y.toFixed(1)), xt.gradEl.setAttribute("x2", dr.x.toFixed(1)), xt.gradEl.setAttribute("y2", dr.y.toFixed(1));
|
|
19998
19998
|
}
|
|
19999
19999
|
for (var Zn = _e.length - 1; Zn >= 0; Zn--) {
|
|
@@ -21137,10 +21137,10 @@ function AK(e, t) {
|
|
|
21137
21137
|
if (!lt || !Be.length) return Be;
|
|
21138
21138
|
const _t = lt * Math.PI / 2, Ht = 7.2 * yt.scaleX, Bt = 14.6 * yt.scaleY, Rt = Math.min(Ht, Bt);
|
|
21139
21139
|
return Array.from({ length: 48 }, (Mt, an) => {
|
|
21140
|
-
const rn = an / 48 * Math.PI * 2, qt = Ht * Math.cos(rn), fn = Math.sign(Math.sin(rn)) * Math.max(0, Bt - Rt) + Rt * Math.sin(rn), mn = qt * Math.cos(_t) - fn * Math.sin(_t), ln = (qt * Math.sin(_t) + fn * Math.cos(_t)) * yt.open, Oe = an / 48 * Be.length, Ge = Math.floor(Oe), ft = Oe - Ge, Nt = Be[Ge], dn = Be[(Ge + 1) % Be.length],
|
|
21140
|
+
const rn = an / 48 * Math.PI * 2, qt = Ht * Math.cos(rn), fn = Math.sign(Math.sin(rn)) * Math.max(0, Bt - Rt) + Rt * Math.sin(rn), mn = qt * Math.cos(_t) - fn * Math.sin(_t), ln = (qt * Math.sin(_t) + fn * Math.cos(_t)) * yt.open, Oe = an / 48 * Be.length, Ge = Math.floor(Oe), ft = Oe - Ge, Nt = Be[Ge], dn = Be[(Ge + 1) % Be.length], En = Nt[0] + (dn[0] - Nt[0]) * ft, Rn = Nt[1] + (dn[1] - Nt[1]) * ft;
|
|
21141
21141
|
return [
|
|
21142
|
-
|
|
21143
|
-
|
|
21142
|
+
En * (1 - lt) + (Wt * 23 + yt.x * 0.4 + mn) * lt,
|
|
21143
|
+
Rn * (1 - lt) + (yt.y * 0.4 + ln) * lt
|
|
21144
21144
|
];
|
|
21145
21145
|
});
|
|
21146
21146
|
}
|
|
@@ -21246,12 +21246,12 @@ function IK({
|
|
|
21246
21246
|
r.value = Math.max(0, Math.floor((d - o) / 1e3));
|
|
21247
21247
|
}
|
|
21248
21248
|
function a() {
|
|
21249
|
-
const d =
|
|
21249
|
+
const d = _n(e), f = _n(n), h = f !== void 0 && Number.isFinite(f) ? Us(f) : void 0;
|
|
21250
21250
|
o = TK(d, h), i();
|
|
21251
21251
|
}
|
|
21252
21252
|
function l() {
|
|
21253
21253
|
if (o === null) return;
|
|
21254
|
-
const d =
|
|
21254
|
+
const d = _n(e), f = Date.now();
|
|
21255
21255
|
zC(d) || Cu.set(d, { startedAt: o, completedAt: f }), i(f);
|
|
21256
21256
|
}
|
|
21257
21257
|
function c() {
|
|
@@ -21261,7 +21261,7 @@ function IK({
|
|
|
21261
21261
|
c(), s = setInterval(() => i(), 1e3);
|
|
21262
21262
|
}
|
|
21263
21263
|
return xe(
|
|
21264
|
-
() => [
|
|
21264
|
+
() => [_n(t), _n(e), _n(n)],
|
|
21265
21265
|
([d]) => {
|
|
21266
21266
|
if (d) {
|
|
21267
21267
|
a(), u();
|
|
@@ -21891,7 +21891,7 @@ const uJ = ["data-testid"], dJ = { class: "text-ref-chip__text" }, fJ = /* @__PU
|
|
|
21891
21891
|
"aria-hidden": "true"
|
|
21892
21892
|
})
|
|
21893
21893
|
])) : X("", !0),
|
|
21894
|
-
(y(), he(
|
|
21894
|
+
(y(), he(Gi, { to: "body" }, [
|
|
21895
21895
|
s.value ? (y(), k("div", {
|
|
21896
21896
|
key: 0,
|
|
21897
21897
|
class: "text-ref-chip__tooltip",
|
|
@@ -26676,7 +26676,7 @@ class k_ {
|
|
|
26676
26676
|
}
|
|
26677
26677
|
}
|
|
26678
26678
|
const Gg = /* @__PURE__ */ Object.create(null);
|
|
26679
|
-
class
|
|
26679
|
+
class An {
|
|
26680
26680
|
/**
|
|
26681
26681
|
Initialize a selection with the head and anchor and ranges. If no
|
|
26682
26682
|
ranges are given, constructs a single range across `$anchor` and
|
|
@@ -26840,7 +26840,7 @@ class En {
|
|
|
26840
26840
|
return Jt.between(this.$anchor, this.$head).getBookmark();
|
|
26841
26841
|
}
|
|
26842
26842
|
}
|
|
26843
|
-
|
|
26843
|
+
An.prototype.visible = !0;
|
|
26844
26844
|
class zQ {
|
|
26845
26845
|
/**
|
|
26846
26846
|
Create a range.
|
|
@@ -26853,7 +26853,7 @@ let y8 = !1;
|
|
|
26853
26853
|
function b8(e) {
|
|
26854
26854
|
!y8 && !e.parent.inlineContent && (y8 = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + e.parent.type.name + ")"));
|
|
26855
26855
|
}
|
|
26856
|
-
class Jt extends
|
|
26856
|
+
class Jt extends An {
|
|
26857
26857
|
/**
|
|
26858
26858
|
Construct a text selection between the given points.
|
|
26859
26859
|
*/
|
|
@@ -26870,7 +26870,7 @@ class Jt extends En {
|
|
|
26870
26870
|
map(t, n) {
|
|
26871
26871
|
let r = t.resolve(n.map(this.head));
|
|
26872
26872
|
if (!r.parent.inlineContent)
|
|
26873
|
-
return
|
|
26873
|
+
return An.near(r);
|
|
26874
26874
|
let o = t.resolve(n.map(this.anchor));
|
|
26875
26875
|
return new Jt(o.parent.inlineContent ? o : r, r);
|
|
26876
26876
|
}
|
|
@@ -26915,16 +26915,16 @@ class Jt extends En {
|
|
|
26915
26915
|
static between(t, n, r) {
|
|
26916
26916
|
let o = t.pos - n.pos;
|
|
26917
26917
|
if ((!r || o) && (r = o >= 0 ? 1 : -1), !n.parent.inlineContent) {
|
|
26918
|
-
let s =
|
|
26918
|
+
let s = An.findFrom(n, r, !0) || An.findFrom(n, -r, !0);
|
|
26919
26919
|
if (s)
|
|
26920
26920
|
n = s.$head;
|
|
26921
26921
|
else
|
|
26922
|
-
return
|
|
26922
|
+
return An.near(n, r);
|
|
26923
26923
|
}
|
|
26924
|
-
return t.parent.inlineContent || (o == 0 ? t = n : (t = (
|
|
26924
|
+
return t.parent.inlineContent || (o == 0 ? t = n : (t = (An.findFrom(t, -r, !0) || An.findFrom(t, r, !0)).$anchor, t.pos < n.pos != o < 0 && (t = n))), new Jt(t, n);
|
|
26925
26925
|
}
|
|
26926
26926
|
}
|
|
26927
|
-
|
|
26927
|
+
An.jsonID("text", Jt);
|
|
26928
26928
|
class hm {
|
|
26929
26929
|
constructor(t, n) {
|
|
26930
26930
|
this.anchor = t, this.head = n;
|
|
@@ -26936,7 +26936,7 @@ class hm {
|
|
|
26936
26936
|
return Jt.between(t.resolve(this.anchor), t.resolve(this.head));
|
|
26937
26937
|
}
|
|
26938
26938
|
}
|
|
26939
|
-
class tn extends
|
|
26939
|
+
class tn extends An {
|
|
26940
26940
|
/**
|
|
26941
26941
|
Create a node selection. Does not verify the validity of its
|
|
26942
26942
|
argument.
|
|
@@ -26947,7 +26947,7 @@ class tn extends En {
|
|
|
26947
26947
|
}
|
|
26948
26948
|
map(t, n) {
|
|
26949
26949
|
let { deleted: r, pos: o } = n.mapResult(this.anchor), s = t.resolve(o);
|
|
26950
|
-
return r ?
|
|
26950
|
+
return r ? An.near(s) : new tn(s);
|
|
26951
26951
|
}
|
|
26952
26952
|
content() {
|
|
26953
26953
|
return new Lt(rt.from(this.node), 0, 0);
|
|
@@ -26984,7 +26984,7 @@ class tn extends En {
|
|
|
26984
26984
|
}
|
|
26985
26985
|
}
|
|
26986
26986
|
tn.prototype.visible = !1;
|
|
26987
|
-
|
|
26987
|
+
An.jsonID("node", tn);
|
|
26988
26988
|
class B3 {
|
|
26989
26989
|
constructor(t) {
|
|
26990
26990
|
this.anchor = t;
|
|
@@ -26995,10 +26995,10 @@ class B3 {
|
|
|
26995
26995
|
}
|
|
26996
26996
|
resolve(t) {
|
|
26997
26997
|
let n = t.resolve(this.anchor), r = n.nodeAfter;
|
|
26998
|
-
return r && tn.isSelectable(r) ? new tn(n) :
|
|
26998
|
+
return r && tn.isSelectable(r) ? new tn(n) : An.near(n);
|
|
26999
26999
|
}
|
|
27000
27000
|
}
|
|
27001
|
-
class Hs extends
|
|
27001
|
+
class Hs extends An {
|
|
27002
27002
|
/**
|
|
27003
27003
|
Create an all-selection over the given document.
|
|
27004
27004
|
*/
|
|
@@ -27008,7 +27008,7 @@ class Hs extends En {
|
|
|
27008
27008
|
replace(t, n = Lt.empty) {
|
|
27009
27009
|
if (n == Lt.empty) {
|
|
27010
27010
|
t.delete(0, t.doc.content.size);
|
|
27011
|
-
let r =
|
|
27011
|
+
let r = An.atStart(t.doc);
|
|
27012
27012
|
r.eq(t.selection) || t.setSelection(r);
|
|
27013
27013
|
} else
|
|
27014
27014
|
super.replace(t, n);
|
|
@@ -27032,7 +27032,7 @@ class Hs extends En {
|
|
|
27032
27032
|
return BQ;
|
|
27033
27033
|
}
|
|
27034
27034
|
}
|
|
27035
|
-
|
|
27035
|
+
An.jsonID("all", Hs);
|
|
27036
27036
|
const BQ = {
|
|
27037
27037
|
map() {
|
|
27038
27038
|
return this;
|
|
@@ -27068,7 +27068,7 @@ function w8(e, t, n) {
|
|
|
27068
27068
|
let s = e.mapping.maps[r], i;
|
|
27069
27069
|
s.forEach((a, l, c, u) => {
|
|
27070
27070
|
i == null && (i = u);
|
|
27071
|
-
}), e.setSelection(
|
|
27071
|
+
}), e.setSelection(An.near(e.doc.resolve(i), n));
|
|
27072
27072
|
}
|
|
27073
27073
|
const k8 = 1, kp = 2, x8 = 4;
|
|
27074
27074
|
class FQ extends k_ {
|
|
@@ -27183,7 +27183,7 @@ class FQ extends k_ {
|
|
|
27183
27183
|
let i = this.doc.resolve(n);
|
|
27184
27184
|
s = r == n ? i.marks() : i.marksAcross(this.doc.resolve(r));
|
|
27185
27185
|
}
|
|
27186
|
-
return this.replaceRangeWith(n, r, o.text(t, s)), !this.selection.empty && this.selection.to == n + t.length && this.setSelection(
|
|
27186
|
+
return this.replaceRangeWith(n, r, o.text(t, s)), !this.selection.empty && this.selection.to == n + t.length && this.setSelection(An.near(this.selection.$to)), this;
|
|
27187
27187
|
}
|
|
27188
27188
|
}
|
|
27189
27189
|
/**
|
|
@@ -27241,7 +27241,7 @@ const UQ = [
|
|
|
27241
27241
|
}),
|
|
27242
27242
|
new df("selection", {
|
|
27243
27243
|
init(e, t) {
|
|
27244
|
-
return e.selection ||
|
|
27244
|
+
return e.selection || An.atStart(t.doc);
|
|
27245
27245
|
},
|
|
27246
27246
|
apply(e) {
|
|
27247
27247
|
return e.selection;
|
|
@@ -27421,7 +27421,7 @@ class ha {
|
|
|
27421
27421
|
if (i.name == "doc")
|
|
27422
27422
|
s.doc = nc.fromJSON(t.schema, n.doc);
|
|
27423
27423
|
else if (i.name == "selection")
|
|
27424
|
-
s.selection =
|
|
27424
|
+
s.selection = An.fromJSON(s.doc, n.selection);
|
|
27425
27425
|
else if (i.name == "storedMarks")
|
|
27426
27426
|
n.storedMarks && (s.storedMarks = n.storedMarks.map(t.schema.markFromJSON));
|
|
27427
27427
|
else {
|
|
@@ -27515,7 +27515,7 @@ const A_ = (e, t, n) => {
|
|
|
27515
27515
|
if (a && a.slice.size < a.to - a.from) {
|
|
27516
27516
|
if (t) {
|
|
27517
27517
|
let l = e.tr.step(a);
|
|
27518
|
-
l.setSelection(Xu(s, "end") ?
|
|
27518
|
+
l.setSelection(Xu(s, "end") ? An.findFrom(l.doc.resolve(l.mapping.map(o.pos, -1)), -1) : tn.create(l.doc, o.pos - s.nodeSize)), t(l.scrollIntoView());
|
|
27519
27519
|
}
|
|
27520
27520
|
return !0;
|
|
27521
27521
|
}
|
|
@@ -27614,7 +27614,7 @@ const I_ = (e, t, n) => {
|
|
|
27614
27614
|
if (i && i.slice.size < i.to - i.from) {
|
|
27615
27615
|
if (t) {
|
|
27616
27616
|
let a = e.tr.step(i);
|
|
27617
|
-
a.setSelection(Xu(s, "start") ?
|
|
27617
|
+
a.setSelection(Xu(s, "start") ? An.findFrom(a.doc.resolve(a.mapping.map(o.pos)), 1) : tn.create(a.doc, a.mapping.map(o.pos))), t(a.scrollIntoView());
|
|
27618
27618
|
}
|
|
27619
27619
|
return !0;
|
|
27620
27620
|
}
|
|
@@ -27690,7 +27690,7 @@ const qQ = (e, t) => {
|
|
|
27690
27690
|
return !1;
|
|
27691
27691
|
if (t) {
|
|
27692
27692
|
let a = n.after(), l = e.tr.replaceWith(a, a, i.createAndFill());
|
|
27693
|
-
l.setSelection(
|
|
27693
|
+
l.setSelection(An.near(l.doc.resolve(a), 1)), t(l.scrollIntoView());
|
|
27694
27694
|
}
|
|
27695
27695
|
return !0;
|
|
27696
27696
|
}, L_ = (e, t) => {
|
|
@@ -27771,7 +27771,7 @@ function P_(e, t, n, r) {
|
|
|
27771
27771
|
}
|
|
27772
27772
|
return !0;
|
|
27773
27773
|
}
|
|
27774
|
-
let u = s.type.spec.isolating || r > 0 && l ? null :
|
|
27774
|
+
let u = s.type.spec.isolating || r > 0 && l ? null : An.findFrom(t, 1), d = u && u.$from.blockRange(u.$to), f = d && pd(d);
|
|
27775
27775
|
if (f != null && f >= t.depth)
|
|
27776
27776
|
return n && n(e.tr.lift(d, f).scrollIntoView()), !0;
|
|
27777
27777
|
if (c && Xu(s, "start", !0) && Xu(o, "end")) {
|
|
@@ -27943,7 +27943,7 @@ const No = function(e) {
|
|
|
27943
27943
|
return t && t.nodeType == 11 ? t.host : t;
|
|
27944
27944
|
};
|
|
27945
27945
|
let Mv = null;
|
|
27946
|
-
const
|
|
27946
|
+
const aa = function(e, t, n) {
|
|
27947
27947
|
let r = Mv || (Mv = document.createRange());
|
|
27948
27948
|
return r.setEnd(e, n ?? e.nodeValue.length), r.setStart(e, t || 0), r;
|
|
27949
27949
|
}, lee = function() {
|
|
@@ -28056,9 +28056,9 @@ function pee(e, t, n) {
|
|
|
28056
28056
|
return { node: r.startContainer, offset: Math.min(Wo(r.startContainer), r.startOffset) };
|
|
28057
28057
|
}
|
|
28058
28058
|
}
|
|
28059
|
-
const
|
|
28059
|
+
const Wi = typeof navigator < "u" ? navigator : null, E8 = typeof document < "u" ? document : null, gl = Wi && Wi.userAgent || "", Tv = /Edge\/(\d+)/.exec(gl), z_ = /MSIE \d/.exec(gl), Iv = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(gl), As = !!(z_ || Iv || Tv), tl = z_ ? document.documentMode : Iv ? +Iv[1] : Tv ? +Tv[1] : 0, js = !As && /gecko\/(\d+)/i.test(gl);
|
|
28060
28060
|
js && +(/Firefox\/(\d+)/.exec(gl) || [0, 0])[1];
|
|
28061
|
-
const Rv = !As && /Chrome\/(\d+)/.exec(gl), Bo = !!Rv, B_ = Rv ? +Rv[1] : 0, Xo = !As && !!
|
|
28061
|
+
const Rv = !As && /Chrome\/(\d+)/.exec(gl), Bo = !!Rv, B_ = Rv ? +Rv[1] : 0, Xo = !As && !!Wi && /Apple Computer/.test(Wi.vendor), Ku = Xo && (/Mobile\/\w+/.test(gl) || !!Wi && Wi.maxTouchPoints > 2), ni = Ku || (Wi ? /Mac/.test(Wi.platform) : !1), F_ = Wi ? /Win/.test(Wi.platform) : !1, pa = /Android \d/.test(gl), mm = !!E8 && "webkitFontSmoothing" in E8.documentElement.style, mee = mm ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
28062
28062
|
function gee(e) {
|
|
28063
28063
|
let t = e.defaultView && e.defaultView.visualViewport;
|
|
28064
28064
|
return t ? {
|
|
@@ -28073,7 +28073,7 @@ function gee(e) {
|
|
|
28073
28073
|
bottom: e.documentElement.clientHeight
|
|
28074
28074
|
};
|
|
28075
28075
|
}
|
|
28076
|
-
function
|
|
28076
|
+
function na(e, t) {
|
|
28077
28077
|
return typeof e == "number" ? e : e[t];
|
|
28078
28078
|
}
|
|
28079
28079
|
function vee(e) {
|
|
@@ -28095,7 +28095,7 @@ function M8(e, t, n) {
|
|
|
28095
28095
|
continue;
|
|
28096
28096
|
}
|
|
28097
28097
|
let a = i == s.body, l = a ? gee(s) : vee(i), c = 0, u = 0;
|
|
28098
|
-
if (t.top < l.top +
|
|
28098
|
+
if (t.top < l.top + na(r, "top") ? u = -(l.top - t.top + na(o, "top")) : t.bottom > l.bottom - na(r, "bottom") && (u = t.bottom - t.top > l.bottom - l.top ? t.top + na(o, "top") - l.top : t.bottom - l.bottom + na(o, "bottom")), t.left < l.left + na(r, "left") ? c = -(l.left - t.left + na(o, "left")) : t.right > l.right - na(r, "right") && (c = t.right - l.right + na(o, "right")), c || u)
|
|
28099
28099
|
if (a)
|
|
28100
28100
|
s.defaultView.scrollBy(c, u);
|
|
28101
28101
|
else {
|
|
@@ -28160,7 +28160,7 @@ function j_(e, t) {
|
|
|
28160
28160
|
if (en(u))
|
|
28161
28161
|
f = u.getClientRects();
|
|
28162
28162
|
else if (vo(u))
|
|
28163
|
-
f =
|
|
28163
|
+
f = aa(u).getClientRects();
|
|
28164
28164
|
else
|
|
28165
28165
|
continue;
|
|
28166
28166
|
for (let h = 0; h < f.length; h++) {
|
|
@@ -28280,11 +28280,11 @@ function G_(e, t, n) {
|
|
|
28280
28280
|
let { node: r, offset: o, atom: s } = e.docView.domFromPos(t, n < 0 ? -1 : 1), i = mm || js;
|
|
28281
28281
|
if (vo(r))
|
|
28282
28282
|
if (i && (Aee.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
|
|
28283
|
-
let l = Ua(
|
|
28283
|
+
let l = Ua(aa(r, o, o), n);
|
|
28284
28284
|
if (js && o && /\s/.test(r.nodeValue[o - 1]) && o < r.nodeValue.length) {
|
|
28285
|
-
let c = Ua(
|
|
28285
|
+
let c = Ua(aa(r, o - 1, o - 1), -1);
|
|
28286
28286
|
if (c.top == l.top) {
|
|
28287
|
-
let u = Ua(
|
|
28287
|
+
let u = Ua(aa(r, o, o + 1), -1);
|
|
28288
28288
|
if (u.top != l.top)
|
|
28289
28289
|
return Hd(u, u.left < c.left);
|
|
28290
28290
|
}
|
|
@@ -28292,7 +28292,7 @@ function G_(e, t, n) {
|
|
|
28292
28292
|
return l;
|
|
28293
28293
|
} else {
|
|
28294
28294
|
let l = o, c = o, u = n < 0 ? 1 : -1;
|
|
28295
|
-
return n < 0 && !o ? (c++, u = -1) : n >= 0 && o == r.nodeValue.length ? (l--, u = 1) : n < 0 ? l-- : c++, Hd(Ua(
|
|
28295
|
+
return n < 0 && !o ? (c++, u = -1) : n >= 0 && o == r.nodeValue.length ? (l--, u = 1) : n < 0 ? l-- : c++, Hd(Ua(aa(r, l, c), u), u < 0);
|
|
28296
28296
|
}
|
|
28297
28297
|
if (!e.state.doc.resolve(t - (s || 0)).parent.inlineContent) {
|
|
28298
28298
|
if (s == null && o && (n < 0 || o == Wo(r))) {
|
|
@@ -28308,7 +28308,7 @@ function G_(e, t, n) {
|
|
|
28308
28308
|
return qg(r.getBoundingClientRect(), n >= 0);
|
|
28309
28309
|
}
|
|
28310
28310
|
if (s == null && o && (n < 0 || o == Wo(r))) {
|
|
28311
|
-
let l = r.childNodes[o - 1], c = vo(l) ?
|
|
28311
|
+
let l = r.childNodes[o - 1], c = vo(l) ? aa(l, Wo(l) - (i ? 0 : 1)) : en(l) && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
28312
28312
|
if (c)
|
|
28313
28313
|
return Hd(Ua(c, 1), !1);
|
|
28314
28314
|
}
|
|
@@ -28316,11 +28316,11 @@ function G_(e, t, n) {
|
|
|
28316
28316
|
let l = r.childNodes[o];
|
|
28317
28317
|
for (; l.pmViewDesc && l.pmViewDesc.ignoreForCoords; )
|
|
28318
28318
|
l = l.nextSibling;
|
|
28319
|
-
let c = l ? vo(l) ?
|
|
28319
|
+
let c = l ? vo(l) ? aa(l, 0, i ? 0 : 1) : en(l) ? l : null : null;
|
|
28320
28320
|
if (c)
|
|
28321
28321
|
return Hd(Ua(c, -1), !0);
|
|
28322
28322
|
}
|
|
28323
|
-
return Hd(Ua(vo(r) ?
|
|
28323
|
+
return Hd(Ua(vo(r) ? aa(r) : r, -n), n >= 0);
|
|
28324
28324
|
}
|
|
28325
28325
|
function Hd(e, t) {
|
|
28326
28326
|
if (e.width == 0)
|
|
@@ -28363,7 +28363,7 @@ function Eee(e, t, n) {
|
|
|
28363
28363
|
if (en(a))
|
|
28364
28364
|
l = a.getClientRects();
|
|
28365
28365
|
else if (vo(a))
|
|
28366
|
-
l =
|
|
28366
|
+
l = aa(a, 0, a.nodeValue.length).getClientRects();
|
|
28367
28367
|
else
|
|
28368
28368
|
continue;
|
|
28369
28369
|
for (let c = 0; c < l.length; c++) {
|
|
@@ -29441,7 +29441,7 @@ function G3(e, t = null) {
|
|
|
29441
29441
|
} else if (js && t == "key" && i > e.state.selection.to && en(n.focusNode) && n.focusOffset == n.focusNode.childNodes.length && o && o.posAtStart > e.state.selection.to)
|
|
29442
29442
|
for (let d = n.focusNode; ; d = d.parentNode) {
|
|
29443
29443
|
if (getComputedStyle(d).overflow != "visible") {
|
|
29444
|
-
c =
|
|
29444
|
+
c = An.findFrom(r.resolve(o.posAtStart), 1);
|
|
29445
29445
|
break;
|
|
29446
29446
|
}
|
|
29447
29447
|
if (d == o.dom || d.nextSibling || !d.parentNode || !en(d.parentNode))
|
|
@@ -29559,7 +29559,7 @@ function jee(e) {
|
|
|
29559
29559
|
}
|
|
29560
29560
|
function Pv(e, t) {
|
|
29561
29561
|
let { $anchor: n, $head: r } = e.selection, o = t > 0 ? n.max(r) : n.min(r), s = o.parent.inlineContent ? o.depth ? e.doc.resolve(t > 0 ? o.after() : o.before()) : null : o;
|
|
29562
|
-
return s &&
|
|
29562
|
+
return s && An.findFrom(s, t);
|
|
29563
29563
|
}
|
|
29564
29564
|
function Wa(e, t) {
|
|
29565
29565
|
return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()), !0;
|
|
@@ -29741,7 +29741,7 @@ function j8(e, t, n) {
|
|
|
29741
29741
|
return Wa(e, i);
|
|
29742
29742
|
}
|
|
29743
29743
|
if (!o.parent.inlineContent) {
|
|
29744
|
-
let i = t < 0 ? o : s, a = r instanceof Hs ?
|
|
29744
|
+
let i = t < 0 ? o : s, a = r instanceof Hs ? An.near(i, t) : An.findFrom(i, t);
|
|
29745
29745
|
return a ? Wa(e, a) : !1;
|
|
29746
29746
|
}
|
|
29747
29747
|
return !1;
|
|
@@ -30235,7 +30235,7 @@ class mte extends cA {
|
|
|
30235
30235
|
// (hidden) cursor is doesn't change the selection, and
|
|
30236
30236
|
// thus doesn't get a reaction from ProseMirror. This
|
|
30237
30237
|
// works around that.
|
|
30238
|
-
Bo && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (Uh(this.view,
|
|
30238
|
+
Bo && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (Uh(this.view, An.near(this.view.state.doc.resolve(n.pos))), t.preventDefault()) : ma(this.view, "pointer");
|
|
30239
30239
|
}
|
|
30240
30240
|
move(t) {
|
|
30241
30241
|
this.updateAllowDefault(t), ma(this.view, "pointer"), super.move(t);
|
|
@@ -31149,7 +31149,7 @@ class Ite {
|
|
|
31149
31149
|
}
|
|
31150
31150
|
}
|
|
31151
31151
|
let c = null;
|
|
31152
|
-
s < 0 && o && t.input.lastFocus > Date.now() - 200 && Math.max(t.input.lastTouch, t.input.lastClick.time) < Date.now() - 300 && pm(r) && (c = G3(t)) && c.eq(
|
|
31152
|
+
s < 0 && o && t.input.lastFocus > Date.now() - 200 && Math.max(t.input.lastTouch, t.input.lastClick.time) < Date.now() - 300 && pm(r) && (c = G3(t)) && c.eq(An.near(t.state.doc.resolve(0), 1)) ? (t.input.lastFocus = 0, va(t), this.currentSelection.set(r), t.scrollToSelection()) : (s > -1 || o) && (s > -1 && (t.docView.markDirty(s, i), Rte(t)), t.input.badSafariComposition && (t.input.badSafariComposition = !1, Nte(t, l)), this.handleDOMChange(s, i, a, l), t.docView && t.docView.dirty ? t.updateState(t.state) : this.currentSelection.eq(r) || va(t), this.currentSelection.set(r));
|
|
31153
31153
|
}
|
|
31154
31154
|
registerMutation(t, n) {
|
|
31155
31155
|
if (n.indexOf(t.target) > -1)
|
|
@@ -32553,7 +32553,7 @@ function Vl(e = 0, t = 0, n = 0) {
|
|
|
32553
32553
|
}
|
|
32554
32554
|
function Fv(e, t = null) {
|
|
32555
32555
|
if (!t) return null;
|
|
32556
|
-
const n =
|
|
32556
|
+
const n = An.atStart(e), r = An.atEnd(e);
|
|
32557
32557
|
if (t === "start" || t === !0) return n;
|
|
32558
32558
|
if (t === "end") return r;
|
|
32559
32559
|
const o = n.from, s = r.to;
|
|
@@ -32667,7 +32667,7 @@ function OA(e, t, n) {
|
|
|
32667
32667
|
let i = 0;
|
|
32668
32668
|
s.forEach((a, l, c, u) => {
|
|
32669
32669
|
i === 0 && (i = u);
|
|
32670
|
-
}), e.setSelection(
|
|
32670
|
+
}), e.setSelection(An.near(e.doc.resolve(i), n));
|
|
32671
32671
|
}
|
|
32672
32672
|
const Tne = (e, t, n) => ({ tr: r, dispatch: o, editor: s }) => {
|
|
32673
32673
|
if (o) {
|
|
@@ -35356,7 +35356,7 @@ const Aoe = Nr.create({
|
|
|
35356
35356
|
const e = () => this.editor.commands.first(({ commands: i }) => [
|
|
35357
35357
|
() => i.undoInputRule(),
|
|
35358
35358
|
() => i.command(({ tr: a }) => {
|
|
35359
|
-
const { selection: l, doc: c } = a, { empty: u, $anchor: d } = l, { pos: f, parent: h } = d, p = d.parent.isTextblock && f > 0 ? a.doc.resolve(f - 1) : d, m = p.parent.type.spec.isolating, g = d.pos - d.parentOffset, v = m && p.parent.childCount === 1 ? g === d.pos :
|
|
35359
|
+
const { selection: l, doc: c } = a, { empty: u, $anchor: d } = l, { pos: f, parent: h } = d, p = d.parent.isTextblock && f > 0 ? a.doc.resolve(f - 1) : d, m = p.parent.type.spec.isolating, g = d.pos - d.parentOffset, v = m && p.parent.childCount === 1 ? g === d.pos : An.atStart(c).from === f;
|
|
35360
35360
|
return !u || !h.type.isTextblock || h.textContent.length || !v || v && d.parent.type.name === "paragraph" ? !1 : i.clearNodes();
|
|
35361
35361
|
}),
|
|
35362
35362
|
() => i.deleteSelection(),
|
|
@@ -35401,7 +35401,7 @@ const Aoe = Nr.create({
|
|
|
35401
35401
|
if (e.some((h) => h.getMeta("composition"))) return;
|
|
35402
35402
|
const r = e.some((h) => h.docChanged) && !t.doc.eq(n.doc), o = e.some((h) => h.getMeta("preventClearDocument"));
|
|
35403
35403
|
if (!r || o) return;
|
|
35404
|
-
const { empty: s, from: i, to: a } = t.selection, l =
|
|
35404
|
+
const { empty: s, from: i, to: a } = t.selection, l = An.atStart(t.doc).from, c = An.atEnd(t.doc).to;
|
|
35405
35405
|
if (s || !(i === l && a === c) || !Hh(n.doc)) return;
|
|
35406
35406
|
const u = n.tr, d = vm({
|
|
35407
35407
|
state: n,
|
|
@@ -36625,7 +36625,7 @@ const Qoe = Cc.create({
|
|
|
36625
36625
|
const { state: t } = e, { selection: n, doc: r } = t, { $from: o, empty: s } = n;
|
|
36626
36626
|
if (!s || o.parent.type !== this.type || o.parentOffset !== o.parent.nodeSize - 2) return !1;
|
|
36627
36627
|
const i = o.after();
|
|
36628
|
-
return i === void 0 ? !1 : r.nodeAt(i) ? e.commands.command(({ tr: a }) => (a.setSelection(
|
|
36628
|
+
return i === void 0 ? !1 : r.nodeAt(i) ? e.commands.command(({ tr: a }) => (a.setSelection(An.near(r.resolve(i))), !0)) : e.commands.exitCode();
|
|
36629
36629
|
}
|
|
36630
36630
|
};
|
|
36631
36631
|
},
|
|
@@ -37016,7 +37016,7 @@ ks.prototype = {
|
|
|
37016
37016
|
return o.j[e] = i, i;
|
|
37017
37017
|
}
|
|
37018
37018
|
};
|
|
37019
|
-
const
|
|
37019
|
+
const Tn = (e, t, n, r, o) => e.ta(t, n, r, o), Gr = (e, t, n, r, o) => e.tr(t, n, r, o), _w = (e, t, n, r, o) => e.ts(t, n, r, o), gt = (e, t, n, r, o) => e.tt(t, n, r, o), ia = "WORD", Xv = "UWORD", hE = "ASCIINUMERICAL", pE = "ALPHANUMERICAL", dh = "LOCALHOST", Yv = "TLD", Kv = "UTLD", f1 = "SCHEME", yu = "SLASH_SCHEME", sb = "NUM", Jv = "WS", ib = "NL", Tf = "OPENBRACE", If = "CLOSEBRACE", Q1 = "OPENBRACKET", e0 = "CLOSEBRACKET", t0 = "OPENPAREN", n0 = "CLOSEPAREN", r0 = "OPENANGLEBRACKET", o0 = "CLOSEANGLEBRACKET", s0 = "FULLWIDTHLEFTPAREN", i0 = "FULLWIDTHRIGHTPAREN", a0 = "LEFTCORNERBRACKET", l0 = "RIGHTCORNERBRACKET", c0 = "LEFTWHITECORNERBRACKET", u0 = "RIGHTWHITECORNERBRACKET", d0 = "FULLWIDTHLESSTHAN", f0 = "FULLWIDTHGREATERTHAN", h0 = "AMPERSAND", p0 = "APOSTROPHE", m0 = "ASTERISK", qa = "AT", g0 = "BACKSLASH", v0 = "BACKTICK", y0 = "CARET", Zl = "COLON", ab = "COMMA", b0 = "DOLLAR", Bi = "DOT", w0 = "EQUALS", lb = "EXCLAMATION", ti = "HYPHEN", Rf = "PERCENT", k0 = "PIPE", x0 = "PLUS", S0 = "POUND", Of = "QUERY", cb = "QUOTE", mE = "FULLWIDTHMIDDLEDOT", ub = "SEMI", Fi = "SLASH", Lf = "TILDE", C0 = "UNDERSCORE", gE = "EMOJI", _0 = "SYM";
|
|
37020
37020
|
var vE = /* @__PURE__ */ Object.freeze({
|
|
37021
37021
|
__proto__: null,
|
|
37022
37022
|
ALPHANUMERICAL: pE,
|
|
@@ -37072,10 +37072,10 @@ var vE = /* @__PURE__ */ Object.freeze({
|
|
|
37072
37072
|
UNDERSCORE: C0,
|
|
37073
37073
|
UTLD: Kv,
|
|
37074
37074
|
UWORD: Xv,
|
|
37075
|
-
WORD:
|
|
37075
|
+
WORD: ia,
|
|
37076
37076
|
WS: Jv
|
|
37077
37077
|
});
|
|
37078
|
-
const
|
|
37078
|
+
const ra = /[a-z]/, Gd = new RegExp("\\p{L}", "u"), r2 = new RegExp("\\p{Emoji}", "u"), oa = /\d/, o2 = /\s/, Aw = "\r", s2 = `
|
|
37079
37079
|
`, yse = "️", bse = "", i2 = "";
|
|
37080
37080
|
let Ep = null, Mp = null;
|
|
37081
37081
|
function wse(e = []) {
|
|
@@ -37083,22 +37083,22 @@ function wse(e = []) {
|
|
|
37083
37083
|
ks.groups = t;
|
|
37084
37084
|
const n = new ks();
|
|
37085
37085
|
Ep == null && (Ep = Ew(fse)), Mp == null && (Mp = Ew(hse)), gt(n, "'", p0), gt(n, "{", Tf), gt(n, "}", If), gt(n, "[", Q1), gt(n, "]", e0), gt(n, "(", t0), gt(n, ")", n0), gt(n, "<", r0), gt(n, ">", o0), gt(n, "(", s0), gt(n, ")", i0), gt(n, "「", a0), gt(n, "」", l0), gt(n, "『", c0), gt(n, "』", u0), gt(n, "<", d0), gt(n, ">", f0), gt(n, "&", h0), gt(n, "*", m0), gt(n, "@", qa), gt(n, "`", v0), gt(n, "^", y0), gt(n, ":", Zl), gt(n, ",", ab), gt(n, "$", b0), gt(n, ".", Bi), gt(n, "=", w0), gt(n, "!", lb), gt(n, "-", ti), gt(n, "%", Rf), gt(n, "|", k0), gt(n, "+", x0), gt(n, "#", S0), gt(n, "?", Of), gt(n, '"', cb), gt(n, "/", Fi), gt(n, ";", ub), gt(n, "~", Lf), gt(n, "_", C0), gt(n, "\\", g0), gt(n, "・", mE);
|
|
37086
|
-
const r = Gr(n,
|
|
37086
|
+
const r = Gr(n, oa, sb, {
|
|
37087
37087
|
[Wv]: !0
|
|
37088
37088
|
});
|
|
37089
|
-
Gr(r,
|
|
37090
|
-
const o = Gr(r,
|
|
37089
|
+
Gr(r, oa, r);
|
|
37090
|
+
const o = Gr(r, ra, hE, {
|
|
37091
37091
|
[Mf]: !0
|
|
37092
37092
|
}), s = Gr(r, Gd, pE, {
|
|
37093
37093
|
[hf]: !0
|
|
37094
|
-
}), i = Gr(n,
|
|
37094
|
+
}), i = Gr(n, ra, ia, {
|
|
37095
37095
|
[Vv]: !0
|
|
37096
37096
|
});
|
|
37097
|
-
Gr(i,
|
|
37097
|
+
Gr(i, oa, o), Gr(i, ra, i), Gr(o, oa, o), Gr(o, ra, o);
|
|
37098
37098
|
const a = Gr(n, Gd, Xv, {
|
|
37099
37099
|
[qv]: !0
|
|
37100
37100
|
});
|
|
37101
|
-
Gr(a,
|
|
37101
|
+
Gr(a, ra), Gr(a, oa, s), Gr(a, Gd, a), Gr(s, oa, s), Gr(s, ra), Gr(s, Gd, s);
|
|
37102
37102
|
const l = gt(n, s2, ib, {
|
|
37103
37103
|
[n2]: !0
|
|
37104
37104
|
}), c = gt(n, Aw, Jv, {
|
|
@@ -37113,9 +37113,9 @@ function wse(e = []) {
|
|
|
37113
37113
|
gt(d, "#"), Gr(d, r2, d), gt(d, yse, d);
|
|
37114
37114
|
const f = gt(d, bse);
|
|
37115
37115
|
gt(f, "#"), Gr(f, r2, d);
|
|
37116
|
-
const h = [[
|
|
37116
|
+
const h = [[ra, i], [oa, o]], p = [[ra, null], [Gd, a], [oa, s]];
|
|
37117
37117
|
for (let m = 0; m < Ep.length; m++)
|
|
37118
|
-
Pa(n, Ep[m], Yv,
|
|
37118
|
+
Pa(n, Ep[m], Yv, ia, h);
|
|
37119
37119
|
for (let m = 0; m < Mp.length; m++)
|
|
37120
37120
|
Pa(n, Mp[m], Kv, Xv, p);
|
|
37121
37121
|
ql(Yv, {
|
|
@@ -37124,7 +37124,7 @@ function wse(e = []) {
|
|
|
37124
37124
|
}, t), ql(Kv, {
|
|
37125
37125
|
utld: !0,
|
|
37126
37126
|
alpha: !0
|
|
37127
|
-
}, t), Pa(n, "file", f1,
|
|
37127
|
+
}, t), Pa(n, "file", f1, ia, h), Pa(n, "mailto", f1, ia, h), Pa(n, "http", yu, ia, h), Pa(n, "https", yu, ia, h), Pa(n, "ftp", yu, ia, h), Pa(n, "ftps", yu, ia, h), ql(f1, {
|
|
37128
37128
|
scheme: !0,
|
|
37129
37129
|
ascii: !0
|
|
37130
37130
|
}, t), ql(yu, {
|
|
@@ -37137,7 +37137,7 @@ function wse(e = []) {
|
|
|
37137
37137
|
} : {
|
|
37138
37138
|
[mse]: !0
|
|
37139
37139
|
};
|
|
37140
|
-
g.indexOf("-") >= 0 ? b[Zv] = !0 :
|
|
37140
|
+
g.indexOf("-") >= 0 ? b[Zv] = !0 : ra.test(g) ? oa.test(g) ? b[Mf] = !0 : b[Vv] = !0 : b[Wv] = !0, _w(n, g, g, b);
|
|
37141
37141
|
}
|
|
37142
37142
|
return _w(n, "localhost", dh, {
|
|
37143
37143
|
ascii: !0
|
|
@@ -37439,31 +37439,31 @@ function Cse({
|
|
|
37439
37439
|
groups: e
|
|
37440
37440
|
}) {
|
|
37441
37441
|
const t = e.domain.concat([h0, m0, qa, g0, v0, y0, b0, w0, ti, sb, Rf, k0, x0, S0, Fi, _0, Lf, C0]), n = [p0, Zl, ab, Bi, lb, Rf, Of, cb, ub, r0, o0, Tf, If, e0, Q1, t0, n0, s0, i0, a0, l0, c0, u0, d0, f0], r = [h0, p0, m0, g0, v0, y0, b0, w0, ti, Tf, If, Rf, k0, x0, S0, Of, Fi, _0, Lf, C0], o = Js(), s = gt(o, Lf);
|
|
37442
|
-
|
|
37442
|
+
Tn(s, r, s), Tn(s, e.domain, s);
|
|
37443
37443
|
const i = Js(), a = Js(), l = Js();
|
|
37444
|
-
|
|
37444
|
+
Tn(o, e.domain, i), Tn(o, e.scheme, a), Tn(o, e.slashscheme, l), Tn(i, r, s), Tn(i, e.domain, i);
|
|
37445
37445
|
const c = gt(i, qa);
|
|
37446
37446
|
gt(s, qa, c), gt(a, qa, c), gt(l, qa, c);
|
|
37447
37447
|
const u = gt(s, Bi);
|
|
37448
|
-
|
|
37448
|
+
Tn(u, r, s), Tn(u, e.domain, s);
|
|
37449
37449
|
const d = Js();
|
|
37450
|
-
|
|
37450
|
+
Tn(c, e.domain, d), Tn(d, e.domain, d);
|
|
37451
37451
|
const f = gt(d, Bi);
|
|
37452
|
-
|
|
37452
|
+
Tn(f, e.domain, d);
|
|
37453
37453
|
const h = Js(xse);
|
|
37454
|
-
|
|
37454
|
+
Tn(f, e.tld, h), Tn(f, e.utld, h), gt(c, dh, h);
|
|
37455
37455
|
const p = gt(d, ti);
|
|
37456
|
-
gt(p, ti, p),
|
|
37456
|
+
gt(p, ti, p), Tn(p, e.domain, d), Tn(h, e.domain, d), gt(h, Bi, f), gt(h, ti, p);
|
|
37457
37457
|
const m = gt(i, ti), g = gt(i, Bi);
|
|
37458
|
-
gt(m, ti, m),
|
|
37458
|
+
gt(m, ti, m), Tn(m, e.domain, i), Tn(g, r, s), Tn(g, e.domain, i);
|
|
37459
37459
|
const v = Js(Tp);
|
|
37460
|
-
|
|
37460
|
+
Tn(g, e.tld, v), Tn(g, e.utld, v), Tn(v, e.domain, i), Tn(v, r, s), gt(v, Bi, g), gt(v, ti, m), gt(v, qa, c);
|
|
37461
37461
|
const b = gt(v, Zl), w = Js(Tp);
|
|
37462
|
-
|
|
37462
|
+
Tn(b, e.numeric, w);
|
|
37463
37463
|
const C = Js(Tp), _ = Js();
|
|
37464
|
-
|
|
37464
|
+
Tn(C, t, C), Tn(C, n, _), Tn(_, t, C), Tn(_, n, _), gt(v, Fi, C), gt(w, Fi, C);
|
|
37465
37465
|
const E = gt(a, Zl), M = gt(l, Zl), I = gt(M, Fi), D = gt(I, Fi);
|
|
37466
|
-
|
|
37466
|
+
Tn(a, e.domain, i), gt(a, Bi, g), gt(a, ti, m), Tn(l, e.domain, i), gt(l, Bi, g), gt(l, ti, m), Tn(E, e.domain, C), gt(E, Fi, C), gt(E, Of, C), Tn(D, e.domain, C), Tn(D, t, C), gt(D, Fi, C);
|
|
37467
37467
|
const z = [
|
|
37468
37468
|
[Tf, If],
|
|
37469
37469
|
// {}
|
|
@@ -37486,9 +37486,9 @@ function Cse({
|
|
|
37486
37486
|
const [W, P] = z[N], B = gt(C, W);
|
|
37487
37487
|
gt(_, W, B);
|
|
37488
37488
|
const G = Js(Tp);
|
|
37489
|
-
|
|
37489
|
+
Tn(B, t, G);
|
|
37490
37490
|
const j = Js();
|
|
37491
|
-
|
|
37491
|
+
Tn(B, n, j), gt(B, P, C), Tn(G, t, G), Tn(G, n, j), Tn(j, t, G), Tn(j, n, j), gt(G, P, C), gt(j, P, C);
|
|
37492
37492
|
}
|
|
37493
37493
|
return gt(o, dh, v), gt(o, ib, Sse), {
|
|
37494
37494
|
start: o,
|
|
@@ -37763,7 +37763,7 @@ function Gse(e) {
|
|
|
37763
37763
|
} }
|
|
37764
37764
|
});
|
|
37765
37765
|
}
|
|
37766
|
-
function
|
|
37766
|
+
function sa(e, t) {
|
|
37767
37767
|
const n = [
|
|
37768
37768
|
"http",
|
|
37769
37769
|
"https",
|
|
@@ -37815,7 +37815,7 @@ const Wse = Cc.create({
|
|
|
37815
37815
|
rel: "noopener noreferrer nofollow",
|
|
37816
37816
|
class: null
|
|
37817
37817
|
},
|
|
37818
|
-
isAllowedUri: (e, t) => !!
|
|
37818
|
+
isAllowedUri: (e, t) => !!sa(e, t.protocols),
|
|
37819
37819
|
validate: (e) => !!e,
|
|
37820
37820
|
shouldAutoLink: (e) => {
|
|
37821
37821
|
const t = /^[a-z][a-z0-9+.-]*:\/\//i.test(e), n = /^[a-z][a-z0-9+.-]*:/i.test(e);
|
|
@@ -37846,7 +37846,7 @@ const Wse = Cc.create({
|
|
|
37846
37846
|
getAttrs: (e) => {
|
|
37847
37847
|
const t = e.getAttribute("href");
|
|
37848
37848
|
return !t || !this.options.isAllowedUri(t, {
|
|
37849
|
-
defaultValidate: (n) => !!
|
|
37849
|
+
defaultValidate: (n) => !!sa(n, this.options.protocols),
|
|
37850
37850
|
protocols: this.options.protocols,
|
|
37851
37851
|
defaultProtocol: this.options.defaultProtocol
|
|
37852
37852
|
}) ? !1 : null;
|
|
@@ -37855,7 +37855,7 @@ const Wse = Cc.create({
|
|
|
37855
37855
|
},
|
|
37856
37856
|
renderHTML({ HTMLAttributes: e }) {
|
|
37857
37857
|
return this.options.isAllowedUri(e.href, {
|
|
37858
|
-
defaultValidate: (t) => !!
|
|
37858
|
+
defaultValidate: (t) => !!sa(t, this.options.protocols),
|
|
37859
37859
|
protocols: this.options.protocols,
|
|
37860
37860
|
defaultProtocol: this.options.defaultProtocol
|
|
37861
37861
|
}) ? [
|
|
@@ -37886,7 +37886,7 @@ const Wse = Cc.create({
|
|
|
37886
37886
|
setLink: (e) => ({ chain: t }) => {
|
|
37887
37887
|
const { href: n } = e;
|
|
37888
37888
|
return this.options.isAllowedUri(n, {
|
|
37889
|
-
defaultValidate: (r) => !!
|
|
37889
|
+
defaultValidate: (r) => !!sa(r, this.options.protocols),
|
|
37890
37890
|
protocols: this.options.protocols,
|
|
37891
37891
|
defaultProtocol: this.options.defaultProtocol
|
|
37892
37892
|
}) ? t().setMark(this.name, e).setMeta("preventAutolink", !0).run() : !1;
|
|
@@ -37894,7 +37894,7 @@ const Wse = Cc.create({
|
|
|
37894
37894
|
toggleLink: (e) => ({ chain: t }) => {
|
|
37895
37895
|
const { href: n } = e || {};
|
|
37896
37896
|
return n && !this.options.isAllowedUri(n, {
|
|
37897
|
-
defaultValidate: (r) => !!
|
|
37897
|
+
defaultValidate: (r) => !!sa(r, this.options.protocols),
|
|
37898
37898
|
protocols: this.options.protocols,
|
|
37899
37899
|
defaultProtocol: this.options.defaultProtocol
|
|
37900
37900
|
}) ? !1 : t().toggleMark(this.name, e, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run();
|
|
@@ -37906,7 +37906,7 @@ const Wse = Cc.create({
|
|
|
37906
37906
|
return this.options.markdownLinks ? [jse({
|
|
37907
37907
|
type: this.type,
|
|
37908
37908
|
isAllowedHref: (e) => this.options.isAllowedUri(e, {
|
|
37909
|
-
defaultValidate: (t) => !!
|
|
37909
|
+
defaultValidate: (t) => !!sa(t, this.options.protocols),
|
|
37910
37910
|
protocols: this.options.protocols,
|
|
37911
37911
|
defaultProtocol: this.options.defaultProtocol
|
|
37912
37912
|
})
|
|
@@ -37918,7 +37918,7 @@ const Wse = Cc.create({
|
|
|
37918
37918
|
if (t) {
|
|
37919
37919
|
const { protocols: r, defaultProtocol: o } = this.options;
|
|
37920
37920
|
wE(t).filter((s) => s.isLink && this.options.isAllowedUri(s.value, {
|
|
37921
|
-
defaultValidate: (i) => !!
|
|
37921
|
+
defaultValidate: (i) => !!sa(i, r),
|
|
37922
37922
|
protocols: r,
|
|
37923
37923
|
defaultProtocol: o
|
|
37924
37924
|
})).forEach((s) => {
|
|
@@ -37934,7 +37934,7 @@ const Wse = Cc.create({
|
|
|
37934
37934
|
return this.options.markdownLinks ? [$se({
|
|
37935
37935
|
type: this.type,
|
|
37936
37936
|
isAllowedHref: (t) => this.options.isAllowedUri(t, {
|
|
37937
|
-
defaultValidate: (n) => !!
|
|
37937
|
+
defaultValidate: (n) => !!sa(n, this.options.protocols),
|
|
37938
37938
|
protocols: this.options.protocols,
|
|
37939
37939
|
defaultProtocol: this.options.defaultProtocol
|
|
37940
37940
|
}),
|
|
@@ -37954,7 +37954,7 @@ const Wse = Cc.create({
|
|
|
37954
37954
|
type: this.type,
|
|
37955
37955
|
defaultProtocol: this.options.defaultProtocol,
|
|
37956
37956
|
validate: (r) => this.options.isAllowedUri(r, {
|
|
37957
|
-
defaultValidate: (o) => !!
|
|
37957
|
+
defaultValidate: (o) => !!sa(o, t),
|
|
37958
37958
|
protocols: t,
|
|
37959
37959
|
defaultProtocol: n
|
|
37960
37960
|
}),
|
|
@@ -39231,7 +39231,7 @@ class Oie {
|
|
|
39231
39231
|
this.editorView.dom.contains(t.relatedTarget) || this.setCursor(null);
|
|
39232
39232
|
}
|
|
39233
39233
|
}
|
|
39234
|
-
class Xr extends
|
|
39234
|
+
class Xr extends An {
|
|
39235
39235
|
/**
|
|
39236
39236
|
Create a gap cursor.
|
|
39237
39237
|
*/
|
|
@@ -39240,7 +39240,7 @@ class Xr extends En {
|
|
|
39240
39240
|
}
|
|
39241
39241
|
map(t, n) {
|
|
39242
39242
|
let r = t.resolve(n.map(this.head));
|
|
39243
|
-
return Xr.valid(r) ? new Xr(r) :
|
|
39243
|
+
return Xr.valid(r) ? new Xr(r) : An.near(r);
|
|
39244
39244
|
}
|
|
39245
39245
|
content() {
|
|
39246
39246
|
return Lt.empty;
|
|
@@ -39318,7 +39318,7 @@ class Xr extends En {
|
|
|
39318
39318
|
}
|
|
39319
39319
|
Xr.prototype.visible = !1;
|
|
39320
39320
|
Xr.findFrom = Xr.findGapCursorFrom;
|
|
39321
|
-
|
|
39321
|
+
An.jsonID("gapcursor", Xr);
|
|
39322
39322
|
class gb {
|
|
39323
39323
|
constructor(t) {
|
|
39324
39324
|
this.pos = t;
|
|
@@ -39328,7 +39328,7 @@ class gb {
|
|
|
39328
39328
|
}
|
|
39329
39329
|
resolve(t) {
|
|
39330
39330
|
let n = t.resolve(this.pos);
|
|
39331
|
-
return Xr.valid(n) ? new Xr(n) :
|
|
39331
|
+
return Xr.valid(n) ? new Xr(n) : An.near(n);
|
|
39332
39332
|
}
|
|
39333
39333
|
}
|
|
39334
39334
|
function PE(e) {
|
|
@@ -39978,12 +39978,12 @@ function $w(e) {
|
|
|
39978
39978
|
for (; e.firstChild; ) t == null || t.insertBefore(e.firstChild, e);
|
|
39979
39979
|
e.remove();
|
|
39980
39980
|
}
|
|
39981
|
-
const Pu = "data-mention-trigger-id",
|
|
39981
|
+
const Pu = "data-mention-trigger-id", la = "data-mention-id", td = "data-mention-label", Em = "data-mention-char", $E = "data-mention-custom", h1 = "data-mention-mount-id", Mm = "data-mention-kind", Vi = "chat-sender__mention";
|
|
39982
39982
|
function Tm(e) {
|
|
39983
39983
|
return e === "knowledge" || e === "skill" ? e : void 0;
|
|
39984
39984
|
}
|
|
39985
39985
|
function sc(e) {
|
|
39986
|
-
return !!e && e.nodeType === Node.ELEMENT_NODE && e.classList.contains(
|
|
39986
|
+
return !!e && e.nodeType === Node.ELEMENT_NODE && e.classList.contains(Vi);
|
|
39987
39987
|
}
|
|
39988
39988
|
function Du(e) {
|
|
39989
39989
|
if (!e || e.nodeType !== Node.TEXT_NODE) return !1;
|
|
@@ -40164,7 +40164,7 @@ function pae(e) {
|
|
|
40164
40164
|
t.push(vc(r));
|
|
40165
40165
|
return;
|
|
40166
40166
|
}
|
|
40167
|
-
if (r.classList.contains(
|
|
40167
|
+
if (r.classList.contains(Vi)) {
|
|
40168
40168
|
t.push(ZE(r));
|
|
40169
40169
|
return;
|
|
40170
40170
|
}
|
|
@@ -40201,7 +40201,7 @@ function vc(e) {
|
|
|
40201
40201
|
`;
|
|
40202
40202
|
return;
|
|
40203
40203
|
}
|
|
40204
|
-
if (r.classList.contains(
|
|
40204
|
+
if (r.classList.contains(Vi)) {
|
|
40205
40205
|
t += ZE(r);
|
|
40206
40206
|
return;
|
|
40207
40207
|
}
|
|
@@ -40242,13 +40242,13 @@ function yae(e) {
|
|
|
40242
40242
|
`;
|
|
40243
40243
|
return;
|
|
40244
40244
|
}
|
|
40245
|
-
if (i.classList.contains(
|
|
40245
|
+
if (i.classList.contains(Vi)) {
|
|
40246
40246
|
r();
|
|
40247
40247
|
const a = Tm(i.getAttribute(Mm));
|
|
40248
40248
|
t.push({
|
|
40249
40249
|
type: "mention",
|
|
40250
40250
|
triggerId: i.getAttribute(Pu) ?? "",
|
|
40251
|
-
id: i.getAttribute(
|
|
40251
|
+
id: i.getAttribute(la) ?? "",
|
|
40252
40252
|
label: i.getAttribute(td) ?? "",
|
|
40253
40253
|
char: i.getAttribute(Em) ?? "@",
|
|
40254
40254
|
...a ? { kind: a } : {}
|
|
@@ -40285,7 +40285,7 @@ function kae(e) {
|
|
|
40285
40285
|
const xae = "chat-sender__mention--selected";
|
|
40286
40286
|
function Lp(e) {
|
|
40287
40287
|
const t = window.getSelection(), n = t && t.rangeCount > 0 && !t.isCollapsed ? t.getRangeAt(0) : null, r = !!n && (n.commonAncestorContainer === e || e.contains(n.commonAncestorContainer));
|
|
40288
|
-
e.querySelectorAll(`.${
|
|
40288
|
+
e.querySelectorAll(`.${Vi}`).forEach((o) => {
|
|
40289
40289
|
let s = !1;
|
|
40290
40290
|
if (r && n)
|
|
40291
40291
|
try {
|
|
@@ -40298,7 +40298,7 @@ function Lp(e) {
|
|
|
40298
40298
|
}
|
|
40299
40299
|
function XE(e, t, n, r = {}) {
|
|
40300
40300
|
const o = document.createElement("span");
|
|
40301
|
-
return o.className =
|
|
40301
|
+
return o.className = Vi, o.setAttribute("contenteditable", "false"), o.setAttribute(Pu, e.id), o.setAttribute(la, t), o.setAttribute(td, n), o.setAttribute(Em, e.char), r.custom && o.setAttribute($E, "true"), r.mountId && o.setAttribute(h1, r.mountId), r.kind && o.setAttribute(Mm, r.kind), o;
|
|
40302
40302
|
}
|
|
40303
40303
|
function Sae(e, t, n, r = {}) {
|
|
40304
40304
|
const o = XE(e, t, n, r), s = document.createElement("button");
|
|
@@ -40536,11 +40536,11 @@ const Nae = { class: "user-message-editor" }, Pae = { class: "user-message-edito
|
|
|
40536
40536
|
v.view.dom.parentElement !== g && (g.replaceChildren(v.view.dom), v.setOptions({ element: g }));
|
|
40537
40537
|
}
|
|
40538
40538
|
function c(g) {
|
|
40539
|
-
return [...g.querySelectorAll(`.${
|
|
40539
|
+
return [...g.querySelectorAll(`.${Vi}`)].map((v) => {
|
|
40540
40540
|
const b = Tm(v.getAttribute(Mm));
|
|
40541
40541
|
return {
|
|
40542
40542
|
triggerId: v.getAttribute(Pu) ?? "",
|
|
40543
|
-
id: v.getAttribute(
|
|
40543
|
+
id: v.getAttribute(la) ?? "",
|
|
40544
40544
|
label: v.getAttribute(td) ?? "",
|
|
40545
40545
|
...b ? { kind: b } : {}
|
|
40546
40546
|
};
|
|
@@ -40575,7 +40575,7 @@ const Nae = { class: "user-message-editor" }, Pae = { class: "user-message-edito
|
|
|
40575
40575
|
}
|
|
40576
40576
|
function m(g) {
|
|
40577
40577
|
var M;
|
|
40578
|
-
const v = g.target, b = (M = v == null ? void 0 : v.closest) == null ? void 0 : M.call(v, ".chat-sender__mention-remove"), w = a(), C = b == null ? void 0 : b.closest(`.${
|
|
40578
|
+
const v = g.target, b = (M = v == null ? void 0 : v.closest) == null ? void 0 : M.call(v, ".chat-sender__mention-remove"), w = a(), C = b == null ? void 0 : b.closest(`.${Vi}`);
|
|
40579
40579
|
if (!b || !w || !C || !i.value) return;
|
|
40580
40580
|
g.preventDefault();
|
|
40581
40581
|
const _ = i.value.view.posAtDOM(C, 0), E = i.value.state.doc.nodeAt(_);
|
|
@@ -41433,7 +41433,7 @@ const rce = ["src", "alt"], oce = {
|
|
|
41433
41433
|
});
|
|
41434
41434
|
}), gn(() => {
|
|
41435
41435
|
document.body.style.overflow = a, document.removeEventListener("keydown", u), i == null || i.focus();
|
|
41436
|
-
}), (p, m) => (y(), he(
|
|
41436
|
+
}), (p, m) => (y(), he(Gi, { to: "body" }, [
|
|
41437
41437
|
S("div", {
|
|
41438
41438
|
ref_key: "dialogRef",
|
|
41439
41439
|
ref: o,
|
|
@@ -42760,7 +42760,7 @@ const Cue = {
|
|
|
42760
42760
|
},
|
|
42761
42761
|
emits: ["action"],
|
|
42762
42762
|
setup(e, { emit: t }) {
|
|
42763
|
-
const n = Ly(() => import("./ChartRenderer-
|
|
42763
|
+
const n = Ly(() => import("./ChartRenderer-BTGNnckl.js")), r = e, o = t, s = _3((g) => o("action", g)), i = O([]), a = O(), l = O();
|
|
42764
42764
|
function c(g, v) {
|
|
42765
42765
|
const b = new k3({ registry: fd });
|
|
42766
42766
|
g && b.push(g);
|
|
@@ -43442,8 +43442,8 @@ const cde = ["aria-label", "aria-busy"], ude = { class: "conversation-message__i
|
|
|
43442
43442
|
}
|
|
43443
43443
|
const dn = _5(Nt.content);
|
|
43444
43444
|
dn && (ft = dn);
|
|
43445
|
-
const
|
|
43446
|
-
|
|
43445
|
+
const En = dv(Nt.content);
|
|
43446
|
+
En.trim() && (Ge = !0, Oe.push(Te(Nt, En)));
|
|
43447
43447
|
}
|
|
43448
43448
|
return !Ge && w.value.trim() && Oe.push(J(w.value)), Oe;
|
|
43449
43449
|
}), Ne = x(() => _.value.length > 0);
|
|
@@ -43533,9 +43533,9 @@ const cde = ["aria-label", "aria-busy"], ude = { class: "conversation-message__i
|
|
|
43533
43533
|
const Ge = Qe.value;
|
|
43534
43534
|
if (((dn = Ge[Oe]) == null ? void 0 : dn.kind) !== "process_group") return !1;
|
|
43535
43535
|
let ft = -1, Nt = -1;
|
|
43536
|
-
for (let
|
|
43537
|
-
const
|
|
43538
|
-
(
|
|
43536
|
+
for (let En = 0; En < Ge.length; En += 1) {
|
|
43537
|
+
const Rn = Ge[En];
|
|
43538
|
+
(Rn == null ? void 0 : Rn.kind) === "process_group" && (Nt = En, ZW({ steps: Rn.steps, toolMessages: n.toolMessages }) && (ft = En));
|
|
43539
43539
|
}
|
|
43540
43540
|
return ft >= 0 ? Oe === ft : Oe === Nt;
|
|
43541
43541
|
}
|
|
@@ -43673,7 +43673,7 @@ const cde = ["aria-label", "aria-busy"], ude = { class: "conversation-message__i
|
|
|
43673
43673
|
])) : X("", !0),
|
|
43674
43674
|
an.value ? (y(), k("div", gde, [
|
|
43675
43675
|
p.value ? (y(!0), k(ze, { key: 0 }, ht(Qe.value, (ft, Nt) => {
|
|
43676
|
-
var dn,
|
|
43676
|
+
var dn, En, Rn;
|
|
43677
43677
|
return y(), k(ze, {
|
|
43678
43678
|
key: `segment-${ft.kind}-${Nt}`
|
|
43679
43679
|
}, [
|
|
@@ -43687,8 +43687,8 @@ const cde = ["aria-label", "aria-busy"], ude = { class: "conversation-message__i
|
|
|
43687
43687
|
"message-id": (dn = m.value) == null ? void 0 : dn.id,
|
|
43688
43688
|
"group-index": ft.segmentIndex,
|
|
43689
43689
|
"started-at-ms": Le(ft),
|
|
43690
|
-
"completed-at-ms": de(Nt) ? (
|
|
43691
|
-
"run-ms": de(Nt) ? (
|
|
43690
|
+
"completed-at-ms": de(Nt) ? (En = m.value) == null ? void 0 : En.completed_at : void 0,
|
|
43691
|
+
"run-ms": de(Nt) ? (Rn = m.value) == null ? void 0 : Rn.run_ms : void 0,
|
|
43692
43692
|
"show-elapsed": "",
|
|
43693
43693
|
streaming: ye(Nt),
|
|
43694
43694
|
"awaiting-user": mt(Nt),
|
|
@@ -45557,13 +45557,13 @@ function phe(e) {
|
|
|
45557
45557
|
return rs(e.upload) || rs(e.mode) || rs(e.screenshot) || rs(e.expert) || rs(e.skill) || rs(e.knowledge);
|
|
45558
45558
|
}
|
|
45559
45559
|
function mhe(e) {
|
|
45560
|
-
const t = e.open ?? O(!1), n = e.triggerRef ?? O(null), r = x(() =>
|
|
45560
|
+
const t = e.open ?? O(!1), n = e.triggerRef ?? O(null), r = x(() => _n(e.fetchConfig)), o = x(() => _n(e.tipMenuItems) ?? {}), s = x(() => _n(e.disabled) ?? !1), i = x(() => _n(e.customMenuItems) ?? []), a = x(() => ({
|
|
45561
45561
|
placement: "top-start",
|
|
45562
45562
|
submenuPlacement: "right-start",
|
|
45563
|
-
...
|
|
45564
|
-
...e.placement !== void 0 ? { placement:
|
|
45565
|
-
...e.submenuPlacement !== void 0 ? { submenuPlacement:
|
|
45566
|
-
})), l = x(() => a.value.submenuSearchable ?? !0), c = x(() => i.value.length > 0 ? !0 : e.tipMenuItems !== void 0 ? phe(o.value) : !1), u = x(() =>
|
|
45563
|
+
..._n(e.menuProps),
|
|
45564
|
+
...e.placement !== void 0 ? { placement: _n(e.placement) } : {},
|
|
45565
|
+
...e.submenuPlacement !== void 0 ? { submenuPlacement: _n(e.submenuPlacement) } : {}
|
|
45566
|
+
})), l = x(() => a.value.submenuSearchable ?? !0), c = x(() => i.value.length > 0 ? !0 : e.tipMenuItems !== void 0 ? phe(o.value) : !1), u = x(() => _n(e.enabled) ?? c.value);
|
|
45567
45567
|
function d() {
|
|
45568
45568
|
var w;
|
|
45569
45569
|
t.value && (t.value = !1, (w = e.onClose) == null || w.call(e));
|
|
@@ -45589,7 +45589,7 @@ function mhe(e) {
|
|
|
45589
45589
|
onDeselectSkill: e.onDeselectSkill ?? Nl,
|
|
45590
45590
|
onDeselectKnowledge: e.onDeselectKnowledge ?? Nl,
|
|
45591
45591
|
onToggleMode: e.onToggleMode,
|
|
45592
|
-
agentMode: x(() =>
|
|
45592
|
+
agentMode: x(() => _n(e.agentMode) ?? "normal"),
|
|
45593
45593
|
onMenuItemClick: (w) => {
|
|
45594
45594
|
var C;
|
|
45595
45595
|
return (C = e.onMenuItemClick) == null ? void 0 : C.call(e, w);
|
|
@@ -46367,7 +46367,7 @@ const Ihe = {
|
|
|
46367
46367
|
const A = d.value;
|
|
46368
46368
|
return !A || !I.value ? null : D.value ?? _ae(A);
|
|
46369
46369
|
}), Ke = x(() => {
|
|
46370
|
-
if (r.triggerMenuPlacement === "custom" && !
|
|
46370
|
+
if (r.triggerMenuPlacement === "custom" && !Sn.value) return;
|
|
46371
46371
|
if (!I.value)
|
|
46372
46372
|
return { position: "fixed", left: "0px", top: "0px", visibility: "hidden" };
|
|
46373
46373
|
if (m.value) return m.value;
|
|
@@ -46380,7 +46380,7 @@ const Ihe = {
|
|
|
46380
46380
|
} : { position: "fixed", left: "0px", top: "0px", visibility: "hidden" };
|
|
46381
46381
|
});
|
|
46382
46382
|
function Se() {
|
|
46383
|
-
if (r.triggerMenuPlacement === "custom" && !
|
|
46383
|
+
if (r.triggerMenuPlacement === "custom" && !Sn.value) {
|
|
46384
46384
|
m.value = void 0;
|
|
46385
46385
|
return;
|
|
46386
46386
|
}
|
|
@@ -46397,7 +46397,7 @@ const Ihe = {
|
|
|
46397
46397
|
viewportWidth: window.innerWidth,
|
|
46398
46398
|
viewportHeight: window.innerHeight,
|
|
46399
46399
|
// 内置光标菜单(技能/知识库列表)默认弲在光标上方;宿主 #trigger-menu 保持下方优先
|
|
46400
|
-
preferAbove: !!
|
|
46400
|
+
preferAbove: !!Sn.value
|
|
46401
46401
|
});
|
|
46402
46402
|
m.value = {
|
|
46403
46403
|
position: "fixed",
|
|
@@ -46566,15 +46566,15 @@ const Ihe = {
|
|
|
46566
46566
|
}
|
|
46567
46567
|
}
|
|
46568
46568
|
const dn = O([]);
|
|
46569
|
-
function
|
|
46569
|
+
function En(A) {
|
|
46570
46570
|
if (!A) return !1;
|
|
46571
46571
|
const R = dn.value.find((oe) => oe.id === A);
|
|
46572
46572
|
return !!R && !R.disabled;
|
|
46573
46573
|
}
|
|
46574
|
-
const
|
|
46575
|
-
get: () => r.model === void 0 ?
|
|
46574
|
+
const Rn = O(null), xt = x({
|
|
46575
|
+
get: () => r.model === void 0 ? Rn.value : r.model,
|
|
46576
46576
|
set: (A) => {
|
|
46577
|
-
r.model === void 0 && (
|
|
46577
|
+
r.model === void 0 && (Rn.value = A), Ge(A), o("update:model", A);
|
|
46578
46578
|
}
|
|
46579
46579
|
}), nr = x(
|
|
46580
46580
|
() => dn.value.find((A) => A.id === xt.value)
|
|
@@ -46587,13 +46587,13 @@ const Ihe = {
|
|
|
46587
46587
|
return GM(Gt.value.label, Gt.value.iconUrl);
|
|
46588
46588
|
}), cr = x(
|
|
46589
46589
|
() => r.showModelSelector && dn.value.length > 0
|
|
46590
|
-
), zr = O(!1),
|
|
46590
|
+
), zr = O(!1), Dn = O(ft()), St = x(() => be.value || vn.value);
|
|
46591
46591
|
function le(A) {
|
|
46592
46592
|
if (A)
|
|
46593
|
-
return ZM(A,
|
|
46593
|
+
return ZM(A, Dn.value[A.id]);
|
|
46594
46594
|
}
|
|
46595
46595
|
function Ze(A, R) {
|
|
46596
|
-
|
|
46596
|
+
Dn.value = { ...Dn.value, [A]: R }, Nt(Dn.value);
|
|
46597
46597
|
}
|
|
46598
46598
|
function bt() {
|
|
46599
46599
|
zr.value = !1;
|
|
@@ -46606,7 +46606,7 @@ const Ihe = {
|
|
|
46606
46606
|
to: A
|
|
46607
46607
|
}), bt();
|
|
46608
46608
|
}
|
|
46609
|
-
function
|
|
46609
|
+
function Ln(A) {
|
|
46610
46610
|
var R;
|
|
46611
46611
|
return ((R = dn.value.find((oe) => oe.id === A)) == null ? void 0 : R.label) ?? ph(A);
|
|
46612
46612
|
}
|
|
@@ -46621,31 +46621,31 @@ const Ihe = {
|
|
|
46621
46621
|
}
|
|
46622
46622
|
}
|
|
46623
46623
|
const qn = x(
|
|
46624
|
-
() => ohe(dn.value,
|
|
46624
|
+
() => ohe(dn.value, Dn.value)
|
|
46625
46625
|
);
|
|
46626
46626
|
function ur() {
|
|
46627
46627
|
if (!cr.value) return;
|
|
46628
|
-
if (
|
|
46628
|
+
if (En(xt.value)) {
|
|
46629
46629
|
Ge(xt.value);
|
|
46630
46630
|
return;
|
|
46631
46631
|
}
|
|
46632
46632
|
const A = Oe();
|
|
46633
|
-
if (
|
|
46633
|
+
if (En(A) && r.model === void 0) {
|
|
46634
46634
|
xt.value = A;
|
|
46635
46635
|
return;
|
|
46636
46636
|
}
|
|
46637
46637
|
const R = mn(dn.value);
|
|
46638
46638
|
R && r.model === void 0 && (xt.value = R);
|
|
46639
46639
|
}
|
|
46640
|
-
let
|
|
46641
|
-
async function
|
|
46642
|
-
if (
|
|
46640
|
+
let On = null;
|
|
46641
|
+
async function kn() {
|
|
46642
|
+
if (On == null || On.abort(), On = null, !r.showModelSelector) {
|
|
46643
46643
|
dn.value = [];
|
|
46644
46644
|
return;
|
|
46645
46645
|
}
|
|
46646
46646
|
if (typeof window > "u") return;
|
|
46647
46647
|
const A = new AbortController();
|
|
46648
|
-
|
|
46648
|
+
On = A;
|
|
46649
46649
|
try {
|
|
46650
46650
|
const R = J.value ? await xa(J.value) : void 0;
|
|
46651
46651
|
if (A.signal.aborted) return;
|
|
@@ -46666,11 +46666,11 @@ const Ihe = {
|
|
|
46666
46666
|
return [r.showModelSelector, (A = J.value) == null ? void 0 : A.auth.token];
|
|
46667
46667
|
},
|
|
46668
46668
|
() => {
|
|
46669
|
-
|
|
46669
|
+
kn();
|
|
46670
46670
|
},
|
|
46671
46671
|
{ immediate: !0 }
|
|
46672
46672
|
), xe(dn, ur, { immediate: !0, deep: !0 }), xe(cr, ur), Mu(() => {
|
|
46673
|
-
|
|
46673
|
+
On == null || On.abort(), On = null;
|
|
46674
46674
|
});
|
|
46675
46675
|
const {
|
|
46676
46676
|
showVoiceMenu: vn,
|
|
@@ -46726,7 +46726,7 @@ const Ihe = {
|
|
|
46726
46726
|
if (ds.value) return "浏览器未开启麦克风权限";
|
|
46727
46727
|
}), Cr = x(() => Hn.value ? Hn.value : De.value ? "停止录音" : "录音"), rr = O(!1);
|
|
46728
46728
|
let Yr = !1;
|
|
46729
|
-
const Is = O(), Tc = O(), Ic = O(), wl = O(),
|
|
46729
|
+
const Is = O(), Tc = O(), Ic = O(), wl = O(), Xi = O(), Ii = O();
|
|
46730
46730
|
let hs = null;
|
|
46731
46731
|
function di() {
|
|
46732
46732
|
hs != null && (clearTimeout(hs), hs = null);
|
|
@@ -46751,9 +46751,9 @@ const Ihe = {
|
|
|
46751
46751
|
"--radius-md",
|
|
46752
46752
|
"--radius-sm"
|
|
46753
46753
|
], ie = {};
|
|
46754
|
-
for (const
|
|
46755
|
-
const
|
|
46756
|
-
|
|
46754
|
+
for (const Mn of oe) {
|
|
46755
|
+
const zn = R.getPropertyValue(Mn).trim();
|
|
46756
|
+
zn && (ie[Mn] = zn);
|
|
46757
46757
|
}
|
|
46758
46758
|
return ie;
|
|
46759
46759
|
}
|
|
@@ -46762,14 +46762,14 @@ const Ihe = {
|
|
|
46762
46762
|
oe.value = void 0;
|
|
46763
46763
|
return;
|
|
46764
46764
|
}
|
|
46765
|
-
const nt = R.offsetWidth,
|
|
46766
|
-
let
|
|
46767
|
-
|
|
46768
|
-
let Rr = A.top -
|
|
46769
|
-
Rr < 8 && (Rr = Math.min(A.bottom + ie, Math.max(8, window.innerHeight -
|
|
46765
|
+
const nt = R.offsetWidth, Mn = R.offsetHeight;
|
|
46766
|
+
let zn = A.right - nt;
|
|
46767
|
+
zn = Math.max(8, Math.min(zn, window.innerWidth - nt - 8));
|
|
46768
|
+
let Rr = A.top - Mn - ie;
|
|
46769
|
+
Rr < 8 && (Rr = Math.min(A.bottom + ie, Math.max(8, window.innerHeight - Mn - 8))), oe.value = {
|
|
46770
46770
|
...ko(),
|
|
46771
46771
|
position: "fixed",
|
|
46772
|
-
left: `${
|
|
46772
|
+
left: `${zn}px`,
|
|
46773
46773
|
top: `${Rr}px`,
|
|
46774
46774
|
zIndex: String(je.zIndex),
|
|
46775
46775
|
visibility: "visible"
|
|
@@ -46783,12 +46783,12 @@ const Ihe = {
|
|
|
46783
46783
|
}
|
|
46784
46784
|
function Ri() {
|
|
46785
46785
|
dt(() => {
|
|
46786
|
-
vn.value ? (
|
|
46786
|
+
vn.value ? (Xi.value || (Xi.value = {
|
|
46787
46787
|
position: "fixed",
|
|
46788
46788
|
left: "0px",
|
|
46789
46789
|
top: "0px",
|
|
46790
46790
|
visibility: "hidden"
|
|
46791
|
-
}), Vs(Tc.value,
|
|
46791
|
+
}), Vs(Tc.value, Xi, 8)) : Xi.value = void 0, rr.value ? (Ii.value || (Ii.value = {
|
|
46792
46792
|
position: "fixed",
|
|
46793
46793
|
left: "0px",
|
|
46794
46794
|
top: "0px",
|
|
@@ -46844,7 +46844,7 @@ const Ihe = {
|
|
|
46844
46844
|
xe(ke, (A) => {
|
|
46845
46845
|
A || dt(Dc);
|
|
46846
46846
|
});
|
|
46847
|
-
const
|
|
46847
|
+
const Yi = x(() => {
|
|
46848
46848
|
var R;
|
|
46849
46849
|
return (j.value.trim().length > 0 || w.value.length > 0 || C.value.length > 0 || !!((R = E.value) != null && R.trim())) && w.value.every((oe) => oe.status === "uploaded");
|
|
46850
46850
|
}), ms = O(!1), Nc = x(() => {
|
|
@@ -46870,13 +46870,13 @@ const Ihe = {
|
|
|
46870
46870
|
},
|
|
46871
46871
|
{ immediate: !0 }
|
|
46872
46872
|
);
|
|
46873
|
-
const Rs = x(() => r.sendWhileStreaming &&
|
|
46873
|
+
const Rs = x(() => r.sendWhileStreaming && Yi.value ? !1 : r.streaming || ms.value), Sl = x(() => Rs.value || Yi.value);
|
|
46874
46874
|
xe(
|
|
46875
46875
|
() => r.streaming,
|
|
46876
46876
|
() => {
|
|
46877
46877
|
ms.value = !1;
|
|
46878
46878
|
}
|
|
46879
|
-
), xe(
|
|
46879
|
+
), xe(Yi, (A) => {
|
|
46880
46880
|
A && (ms.value = !1);
|
|
46881
46881
|
}), xe(
|
|
46882
46882
|
() => r.attachments,
|
|
@@ -46888,7 +46888,7 @@ const Ihe = {
|
|
|
46888
46888
|
function bd(A) {
|
|
46889
46889
|
w.value = [...A], o("update:attachments", w.value);
|
|
46890
46890
|
}
|
|
46891
|
-
const
|
|
46891
|
+
const Ki = Ife({
|
|
46892
46892
|
getAttachments: () => w.value,
|
|
46893
46893
|
setAttachments: bd,
|
|
46894
46894
|
getUploadConfig: () => me.value,
|
|
@@ -46950,8 +46950,8 @@ const Ihe = {
|
|
|
46950
46950
|
N.value = A, j.value = A;
|
|
46951
46951
|
}
|
|
46952
46952
|
function ue(A) {
|
|
46953
|
-
return d.value ? [...d.value.querySelectorAll(`[${
|
|
46954
|
-
(R) => R.getAttribute(
|
|
46953
|
+
return d.value ? [...d.value.querySelectorAll(`[${la}]`)].some(
|
|
46954
|
+
(R) => R.getAttribute(la) === A
|
|
46955
46955
|
) : !1;
|
|
46956
46956
|
}
|
|
46957
46957
|
function Ce(A) {
|
|
@@ -46964,17 +46964,17 @@ const Ihe = {
|
|
|
46964
46964
|
if (!d.value) return;
|
|
46965
46965
|
const A = /* @__PURE__ */ new Set();
|
|
46966
46966
|
d.value.querySelectorAll(`[${Pu}]`).forEach((R) => {
|
|
46967
|
-
const oe = R.getAttribute(Pu), ie = R.getAttribute(
|
|
46967
|
+
const oe = R.getAttribute(Pu), ie = R.getAttribute(la);
|
|
46968
46968
|
if (!oe || !ie) return;
|
|
46969
|
-
const je =
|
|
46969
|
+
const je = xn(oe, ie);
|
|
46970
46970
|
if (A.add(je), !W.has(je)) {
|
|
46971
|
-
const nt = R.getAttribute(td) ?? "",
|
|
46972
|
-
W.set(je,
|
|
46971
|
+
const nt = R.getAttribute(td) ?? "", Mn = Tm(R.getAttribute(Mm)), zn = { triggerId: oe, id: ie, label: nt, ...Mn ? { kind: Mn } : {} };
|
|
46972
|
+
W.set(je, zn), Ue(zn), o("mention-insert", zn);
|
|
46973
46973
|
}
|
|
46974
46974
|
}), P.forEach((R) => {
|
|
46975
46975
|
if (A.has(R)) return;
|
|
46976
46976
|
const oe = W.get(R);
|
|
46977
|
-
oe && (W.delete(R), o("mention-remove", oe), Ce(oe));
|
|
46977
|
+
oe && (W.delete(R), o("mention-remove", oe), Ce(oe), oe.id.startsWith("sel-") && (i == null || i(oe.id)));
|
|
46978
46978
|
}), P = A, Ot();
|
|
46979
46979
|
}
|
|
46980
46980
|
function Ot() {
|
|
@@ -46994,16 +46994,16 @@ const Ihe = {
|
|
|
46994
46994
|
function kt(A) {
|
|
46995
46995
|
const R = A.getAttribute(h1);
|
|
46996
46996
|
if (!R || !c() || l.has(R)) return;
|
|
46997
|
-
const oe = A.getAttribute(Pu) ?? "", ie = A.getAttribute(
|
|
46997
|
+
const oe = A.getAttribute(Pu) ?? "", ie = A.getAttribute(la) ?? "", je = A.getAttribute(td) ?? "", nt = A.getAttribute(Em) ?? "", Mn = () => Jn(A), zn = Re({
|
|
46998
46998
|
name: "ChatSenderMentionSlotHost",
|
|
46999
46999
|
setup() {
|
|
47000
47000
|
return () => {
|
|
47001
47001
|
var $r;
|
|
47002
|
-
return (($r = a.mention) == null ? void 0 : $r.call(a, { triggerId: oe, id: ie, label: je, char: nt, remove:
|
|
47002
|
+
return (($r = a.mention) == null ? void 0 : $r.call(a, { triggerId: oe, id: ie, label: je, char: nt, remove: Mn })) ?? null;
|
|
47003
47003
|
};
|
|
47004
47004
|
}
|
|
47005
47005
|
});
|
|
47006
|
-
al(_o(
|
|
47006
|
+
al(_o(zn), A), l.set(R, {
|
|
47007
47007
|
el: A,
|
|
47008
47008
|
cleanup: () => al(null, A)
|
|
47009
47009
|
});
|
|
@@ -47015,23 +47015,21 @@ const Ihe = {
|
|
|
47015
47015
|
function nn() {
|
|
47016
47016
|
l.forEach((A, R) => Ft(R));
|
|
47017
47017
|
}
|
|
47018
|
-
function
|
|
47018
|
+
function xn(A, R) {
|
|
47019
47019
|
return `${A}:${R}`;
|
|
47020
47020
|
}
|
|
47021
47021
|
function yn(A) {
|
|
47022
47022
|
if (!d.value) return;
|
|
47023
|
-
[...d.value.querySelectorAll(`[${
|
|
47024
|
-
(oe) => oe.getAttribute(
|
|
47023
|
+
[...d.value.querySelectorAll(`[${la}]`)].filter(
|
|
47024
|
+
(oe) => oe.getAttribute(la) === A
|
|
47025
47025
|
).forEach((oe) => Jn(oe));
|
|
47026
47026
|
}
|
|
47027
47027
|
function Jn(A) {
|
|
47028
|
-
var
|
|
47028
|
+
var Mn;
|
|
47029
47029
|
const R = T.value;
|
|
47030
|
-
if (!R || !((
|
|
47031
|
-
const oe = A.
|
|
47032
|
-
|
|
47033
|
-
const ie = R.view.posAtDOM(A, 0), je = R.state.doc.nodeAt(ie), nt = (je == null ? void 0 : je.type.name) === "mention" ? ie : ie - 1, kn = R.state.doc.nodeAt(nt);
|
|
47034
|
-
(kn == null ? void 0 : kn.type.name) === "mention" ? (R.commands.deleteRange({ from: nt, to: nt + kn.nodeSize }), _r(R)) : A.remove(), sr(), vs();
|
|
47030
|
+
if (!R || !((Mn = d.value) != null && Mn.contains(A))) return;
|
|
47031
|
+
const oe = R.view.posAtDOM(A, 0), ie = R.state.doc.nodeAt(oe), je = (ie == null ? void 0 : ie.type.name) === "mention" ? oe : oe - 1, nt = R.state.doc.nodeAt(je);
|
|
47032
|
+
(nt == null ? void 0 : nt.type.name) === "mention" ? (R.commands.deleteRange({ from: je, to: je + nt.nodeSize }), _r(R)) : A.remove(), sr(), vs();
|
|
47035
47033
|
}
|
|
47036
47034
|
function _r(A) {
|
|
47037
47035
|
var je;
|
|
@@ -47058,12 +47056,12 @@ const Ihe = {
|
|
|
47058
47056
|
function fo(A) {
|
|
47059
47057
|
_ += 1, C.value = [...C.value, { id: `paste-${_}`, text: A }];
|
|
47060
47058
|
}
|
|
47061
|
-
function
|
|
47059
|
+
function Ji(A) {
|
|
47062
47060
|
C.value = C.value.filter((R) => R.id !== A);
|
|
47063
47061
|
}
|
|
47064
47062
|
function Tr(A) {
|
|
47065
47063
|
const R = C.value.find((oe) => oe.id === A);
|
|
47066
|
-
R && (
|
|
47064
|
+
R && (Ji(A), Nn(R.text));
|
|
47067
47065
|
}
|
|
47068
47066
|
function Zt(A) {
|
|
47069
47067
|
var Rr, $r, hi;
|
|
@@ -47074,8 +47072,8 @@ const Ihe = {
|
|
|
47074
47072
|
const ie = (($r = A.clipboardData) == null ? void 0 : $r.getData("text/plain")) ?? "", je = ((hi = A.clipboardData) == null ? void 0 : hi.getData("text/html")) ?? "", nt = oy(A.clipboardData);
|
|
47075
47073
|
if (ie && Ho(ie) && r.showAttachment && !r.disabled)
|
|
47076
47074
|
return A.preventDefault(), fo(ie), !0;
|
|
47077
|
-
const
|
|
47078
|
-
return !
|
|
47075
|
+
const Mn = je ? new DOMParser().parseFromString(je, "text/html").body.textContent ?? "" : "", zn = !!(ie.trim() || Mn.trim());
|
|
47076
|
+
return !zn && nt.length > 0 && r.showAttachment && !r.disabled ? (A.preventDefault(), ea(nt), !0) : je && HE(je) || !je && ct(ie) || nt.length > 0 && zn && !Mn.trim() ? (A.preventDefault(), Q(ie), !0) : !1;
|
|
47079
47077
|
}
|
|
47080
47078
|
function Q(A) {
|
|
47081
47079
|
const R = T.value;
|
|
@@ -47139,16 +47137,16 @@ const Ihe = {
|
|
|
47139
47137
|
R.chain().focus().insertContent(je).run(), sr();
|
|
47140
47138
|
}
|
|
47141
47139
|
function gs(A) {
|
|
47142
|
-
var nt,
|
|
47140
|
+
var nt, Mn, zn, Rr;
|
|
47143
47141
|
const R = A.target, oe = (nt = R == null ? void 0 : R.closest) == null ? void 0 : nt.call(R, ".chat-sender__mention-remove");
|
|
47144
|
-
if (oe && ((
|
|
47142
|
+
if (oe && ((Mn = d.value) != null && Mn.contains(oe))) {
|
|
47145
47143
|
A.preventDefault(), A.stopPropagation();
|
|
47146
|
-
const $r = oe.closest(`.${
|
|
47144
|
+
const $r = oe.closest(`.${Vi}`);
|
|
47147
47145
|
if (!$r || !d.value) return;
|
|
47148
47146
|
Jn($r);
|
|
47149
47147
|
return;
|
|
47150
47148
|
}
|
|
47151
|
-
const ie = (
|
|
47149
|
+
const ie = (zn = R == null ? void 0 : R.closest) == null ? void 0 : zn.call(R, `.${Vi}`);
|
|
47152
47150
|
if (!ie || !((Rr = d.value) != null && Rr.contains(ie))) return;
|
|
47153
47151
|
const je = ie.getAttribute("data-mention-id") ?? "";
|
|
47154
47152
|
je.startsWith("sel-") && (A.preventDefault(), s == null || s(je));
|
|
@@ -47259,7 +47257,7 @@ const Ihe = {
|
|
|
47259
47257
|
}
|
|
47260
47258
|
D.value = null;
|
|
47261
47259
|
}
|
|
47262
|
-
function
|
|
47260
|
+
function Qi() {
|
|
47263
47261
|
const A = I.value;
|
|
47264
47262
|
A && (I.value = null, D.value = null, m.value = void 0, te[A.triggerId] && (Jo.value = [], no.value = {}), o("trigger-close", { triggerId: A.triggerId }));
|
|
47265
47263
|
}
|
|
@@ -47277,12 +47275,12 @@ const Ihe = {
|
|
|
47277
47275
|
function H() {
|
|
47278
47276
|
const A = d.value, R = A ? L(A) : [];
|
|
47279
47277
|
if (!A || R.length === 0) {
|
|
47280
|
-
|
|
47278
|
+
Qi();
|
|
47281
47279
|
return;
|
|
47282
47280
|
}
|
|
47283
47281
|
const oe = R.map((nt) => Gw(fe.value, A, nt.node, nt.offset)).find((nt) => nt !== null) ?? null;
|
|
47284
47282
|
if (!oe) {
|
|
47285
|
-
|
|
47283
|
+
Qi();
|
|
47286
47284
|
return;
|
|
47287
47285
|
}
|
|
47288
47286
|
const ie = oe.range.toString().slice(oe.trigger.char.length), je = I.value;
|
|
@@ -47305,7 +47303,7 @@ const Ihe = {
|
|
|
47305
47303
|
fe.value.some((oe) => oe.id === R.id) && pe(R);
|
|
47306
47304
|
}
|
|
47307
47305
|
function Pt() {
|
|
47308
|
-
|
|
47306
|
+
Qi();
|
|
47309
47307
|
}
|
|
47310
47308
|
function It(A, R) {
|
|
47311
47309
|
if (R) return R;
|
|
@@ -47329,13 +47327,13 @@ const Ihe = {
|
|
|
47329
47327
|
Xn(oe, R, ie);
|
|
47330
47328
|
}
|
|
47331
47329
|
function Un(A, R, oe, ie) {
|
|
47332
|
-
const je = `${R}${oe}`, nt = A.state.doc,
|
|
47330
|
+
const je = `${R}${oe}`, nt = A.state.doc, Mn = nt.content.size;
|
|
47333
47331
|
for (const Rr of [ie, A.state.selection.from]) {
|
|
47334
|
-
const $r = Math.max(0, Math.min(Rr,
|
|
47332
|
+
const $r = Math.max(0, Math.min(Rr, Mn)), hi = Math.max(0, $r - je.length);
|
|
47335
47333
|
if (nt.textBetween(hi, $r) === je) return { from: hi, to: $r };
|
|
47336
47334
|
}
|
|
47337
|
-
const
|
|
47338
|
-
return nt.textBetween(ie,
|
|
47335
|
+
const zn = Math.min(Mn, ie + je.length);
|
|
47336
|
+
return nt.textBetween(ie, zn) === je ? { from: ie, to: zn } : { from: ie, to: ie };
|
|
47339
47337
|
}
|
|
47340
47338
|
function jn(A, R) {
|
|
47341
47339
|
var ie;
|
|
@@ -47353,7 +47351,7 @@ const Ihe = {
|
|
|
47353
47351
|
} catch {
|
|
47354
47352
|
nt = ie.state.selection.from;
|
|
47355
47353
|
}
|
|
47356
|
-
const { from:
|
|
47354
|
+
const { from: Mn, to: zn } = Un(ie, A.char, R.query, nt), Rr = jn(ie.state.doc, Mn) ? " " : "", $r = [
|
|
47357
47355
|
...Rr ? [{ type: "text", text: Rr }] : [],
|
|
47358
47356
|
{
|
|
47359
47357
|
type: "mention",
|
|
@@ -47366,15 +47364,15 @@ const Ihe = {
|
|
|
47366
47364
|
}
|
|
47367
47365
|
},
|
|
47368
47366
|
{ type: "text", text: " " }
|
|
47369
|
-
], hi =
|
|
47367
|
+
], hi = xn(A.id, oe.id), Id = {
|
|
47370
47368
|
triggerId: A.id,
|
|
47371
47369
|
id: oe.id,
|
|
47372
47370
|
label: oe.label,
|
|
47373
47371
|
...oe.kind ? { kind: oe.kind } : {}
|
|
47374
47372
|
};
|
|
47375
|
-
W.set(hi, Id), P.add(hi), ie.commands.insertContentAt({ from:
|
|
47373
|
+
W.set(hi, Id), P.add(hi), ie.commands.insertContentAt({ from: Mn, to: zn }, $r), q(), o("mention-insert", Id), Qi();
|
|
47376
47374
|
}
|
|
47377
|
-
const
|
|
47375
|
+
const Sn = x(() => {
|
|
47378
47376
|
var R;
|
|
47379
47377
|
const A = (R = I.value) == null ? void 0 : R.triggerId;
|
|
47380
47378
|
return A ? te[A] ?? null : null;
|
|
@@ -47385,7 +47383,7 @@ const Ihe = {
|
|
|
47385
47383
|
}
|
|
47386
47384
|
const po = x(() => {
|
|
47387
47385
|
var R, oe;
|
|
47388
|
-
if (!
|
|
47386
|
+
if (!Sn.value) return;
|
|
47389
47387
|
const A = So(
|
|
47390
47388
|
((oe = (R = jr.value) == null ? void 0 : R.submenu) == null ? void 0 : oe.width) ?? $t.value.submenuWidth
|
|
47391
47389
|
);
|
|
@@ -47394,7 +47392,7 @@ const Ihe = {
|
|
|
47394
47392
|
}), Ir = x(
|
|
47395
47393
|
() => $t.value.nestedSubmenuWidth ?? $t.value.submenuWidth
|
|
47396
47394
|
), jr = x(() => {
|
|
47397
|
-
const A =
|
|
47395
|
+
const A = Sn.value;
|
|
47398
47396
|
return A ? mt.menu.builtinMenuItems.value.find((R) => R.id === A) ?? null : null;
|
|
47399
47397
|
}), Jo = O([]), no = O({}), _l = M9((A, R) => {
|
|
47400
47398
|
mt.searchTipMenu(A, R);
|
|
@@ -47413,9 +47411,9 @@ const Ihe = {
|
|
|
47413
47411
|
if (R.length === 1) return oe.submenu;
|
|
47414
47412
|
let ie = oe.submenu.children ?? [], je = oe.submenu;
|
|
47415
47413
|
for (let nt = 1; nt < R.length; nt += 1) {
|
|
47416
|
-
const
|
|
47417
|
-
if (!(
|
|
47418
|
-
je =
|
|
47414
|
+
const Mn = ie.find((zn) => zn.id === R[nt]);
|
|
47415
|
+
if (!(Mn != null && Mn.submenu)) return;
|
|
47416
|
+
je = Mn.submenu, ie = je.children ?? [];
|
|
47419
47417
|
}
|
|
47420
47418
|
return je;
|
|
47421
47419
|
}
|
|
@@ -47429,21 +47427,21 @@ const Ihe = {
|
|
|
47429
47427
|
var R;
|
|
47430
47428
|
return (R = Jo.value[A]) == null ? void 0 : R.path.split("/").pop();
|
|
47431
47429
|
}
|
|
47432
|
-
xe(
|
|
47430
|
+
xe(Sn, (A) => {
|
|
47433
47431
|
var R;
|
|
47434
47432
|
A && (Jo.value = [], no.value = { [A]: ((R = I.value) == null ? void 0 : R.query) ?? "" }, mt.menu.onSubmenuOpen(A));
|
|
47435
47433
|
}), xe(
|
|
47436
47434
|
() => {
|
|
47437
47435
|
var A;
|
|
47438
|
-
return
|
|
47436
|
+
return Sn.value ? (A = I.value) == null ? void 0 : A.query : null;
|
|
47439
47437
|
},
|
|
47440
47438
|
(A) => {
|
|
47441
|
-
const R =
|
|
47439
|
+
const R = Sn.value;
|
|
47442
47440
|
!R || A == null || no.value[R] !== A && (no.value = { ...no.value, [R]: A }, _l(R, A));
|
|
47443
47441
|
}
|
|
47444
47442
|
);
|
|
47445
47443
|
function Sd(A) {
|
|
47446
|
-
const R =
|
|
47444
|
+
const R = Sn.value;
|
|
47447
47445
|
if (!R) return;
|
|
47448
47446
|
if ((R === "skill" ? mt.menu.selectedSkillIds : mt.menu.selectedKnowledgeIds).value.includes(A.id)) {
|
|
47449
47447
|
yn(A.id);
|
|
@@ -47452,7 +47450,7 @@ const Ihe = {
|
|
|
47452
47450
|
Qt({ id: A.id, label: A.label, kind: R }), mt.addSubmenuSelection(R, A.id);
|
|
47453
47451
|
}
|
|
47454
47452
|
function El(A, R) {
|
|
47455
|
-
const oe =
|
|
47453
|
+
const oe = Sn.value, ie = R.subItem.submenu;
|
|
47456
47454
|
if (!oe || !ie) return;
|
|
47457
47455
|
const nt = `${A === 0 ? oe : Jo.value[A - 1].path}/${R.subItem.id}`;
|
|
47458
47456
|
Jo.value = [
|
|
@@ -47467,7 +47465,7 @@ const Ihe = {
|
|
|
47467
47465
|
R && zc(A);
|
|
47468
47466
|
}
|
|
47469
47467
|
function Ml() {
|
|
47470
|
-
const A =
|
|
47468
|
+
const A = Sn.value;
|
|
47471
47469
|
A && mt.menu.loadMoreItem(A);
|
|
47472
47470
|
}
|
|
47473
47471
|
let Oa = 0;
|
|
@@ -47486,11 +47484,11 @@ const Ihe = {
|
|
|
47486
47484
|
}
|
|
47487
47485
|
function Xs() {
|
|
47488
47486
|
const A = I.value, R = d.value;
|
|
47489
|
-
if (!A || !
|
|
47487
|
+
if (!A || !Sn.value || !R || Cd(A, R)) return;
|
|
47490
47488
|
const oe = A.triggerId;
|
|
47491
47489
|
cancelAnimationFrame(Oa), Oa = requestAnimationFrame(() => {
|
|
47492
47490
|
const ie = I.value, je = d.value;
|
|
47493
|
-
!ie || ie.triggerId !== oe || !je || Cd(ie, je) ||
|
|
47491
|
+
!ie || ie.triggerId !== oe || !je || Cd(ie, je) || Qi();
|
|
47494
47492
|
});
|
|
47495
47493
|
}
|
|
47496
47494
|
function _d(A) {
|
|
@@ -47500,7 +47498,7 @@ const Ihe = {
|
|
|
47500
47498
|
if (!ie || !ie.isCollapsed || ie.rangeCount === 0) return !1;
|
|
47501
47499
|
const je = ie.getRangeAt(0), nt = A === "Backspace" ? cae(oe, je) : uae(oe, je);
|
|
47502
47500
|
if (!nt) return !1;
|
|
47503
|
-
const
|
|
47501
|
+
const Mn = R.view.posAtDOM(nt, 0), zn = R.state.doc.nodeAt(Mn), Rr = (zn == null ? void 0 : zn.type.name) === "mention" ? Mn : Mn - 1, $r = R.state.doc.nodeAt(Rr);
|
|
47504
47502
|
return ($r == null ? void 0 : $r.type.name) !== "mention" ? !1 : (R.commands.deleteRange({ from: Rr, to: Rr + $r.nodeSize }), _r(R), !0);
|
|
47505
47503
|
}
|
|
47506
47504
|
function Fc(A) {
|
|
@@ -47534,17 +47532,17 @@ const Ihe = {
|
|
|
47534
47532
|
}
|
|
47535
47533
|
function Rl(A) {
|
|
47536
47534
|
var hi, Id;
|
|
47537
|
-
if (!
|
|
47535
|
+
if (!Yi.value || r.disabled || Rs.value && !r.sendWhileStreaming) return;
|
|
47538
47536
|
const R = [...W.values()].map((Ni) => ({
|
|
47539
47537
|
triggerId: Ni.triggerId,
|
|
47540
47538
|
id: Ni.id,
|
|
47541
47539
|
label: Ni.label,
|
|
47542
47540
|
...Ni.kind ? { kind: Ni.kind } : {}
|
|
47543
|
-
})), oe = B.value ?? void 0, ie = (hi = xt.value) == null ? void 0 : hi.trim(), je = le(nr.value ?? Gt.value), nt = ((Id = E.value) == null ? void 0 : Id.trim()) ?? "",
|
|
47541
|
+
})), oe = B.value ?? void 0, ie = (hi = xt.value) == null ? void 0 : hi.trim(), je = le(nr.value ?? Gt.value), nt = ((Id = E.value) == null ? void 0 : Id.trim()) ?? "", zn = [C.value.map((Ni) => Ni.text.trim()).filter(Boolean).join(`
|
|
47544
47542
|
|
|
47545
47543
|
`), j.value.trim()].filter(Boolean).join(`
|
|
47546
47544
|
|
|
47547
|
-
`), Rr = nt ? KK(nt,
|
|
47545
|
+
`), Rr = nt ? KK(nt, zn) : zn, $r = Q2(Rr, w.value, {
|
|
47548
47546
|
attachmentInput: r.attachmentInput,
|
|
47549
47547
|
mentions: R.length ? R : void 0,
|
|
47550
47548
|
sceneId: oe,
|
|
@@ -47552,7 +47550,7 @@ const Ihe = {
|
|
|
47552
47550
|
reasoningEffort: je,
|
|
47553
47551
|
mode: Je.value
|
|
47554
47552
|
});
|
|
47555
|
-
Il(), ms.value = !0, o(A === "send-now" ? "send-now" : "send", $r), np(), Ns(), C.value = [],
|
|
47553
|
+
Il(), ms.value = !0, o(A === "send-now" ? "send-now" : "send", $r), np(), Ns(), C.value = [], Ki.clear(), dt(() => {
|
|
47556
47554
|
var Ni;
|
|
47557
47555
|
(Ni = d.value) == null || Ni.focus();
|
|
47558
47556
|
});
|
|
@@ -47565,7 +47563,7 @@ const Ihe = {
|
|
|
47565
47563
|
}
|
|
47566
47564
|
function np() {
|
|
47567
47565
|
var A;
|
|
47568
|
-
mt.clearSubmenuSelection("skill"), mt.clearSubmenuSelection("knowledge"), (A = T.value) == null || A.commands.clearContent(!1), nn(), N.value = "", j.value = "", W.clear(), P = /* @__PURE__ */ new Set(), z = null, G = null,
|
|
47566
|
+
mt.clearSubmenuSelection("skill"), mt.clearSubmenuSelection("knowledge"), (A = T.value) == null || A.commands.clearContent(!1), nn(), N.value = "", j.value = "", W.clear(), P = /* @__PURE__ */ new Set(), z = null, G = null, Qi();
|
|
47569
47567
|
}
|
|
47570
47568
|
function rp() {
|
|
47571
47569
|
var A;
|
|
@@ -47575,14 +47573,14 @@ const Ihe = {
|
|
|
47575
47573
|
const R = A.target;
|
|
47576
47574
|
if (R.files && R.files.length > 0) {
|
|
47577
47575
|
const oe = Array.from(R.files);
|
|
47578
|
-
|
|
47576
|
+
ea(oe);
|
|
47579
47577
|
}
|
|
47580
47578
|
R.value = "";
|
|
47581
47579
|
}
|
|
47582
|
-
function
|
|
47583
|
-
|
|
47580
|
+
function ea(A) {
|
|
47581
|
+
Ki.addFiles(A);
|
|
47584
47582
|
}
|
|
47585
|
-
function
|
|
47583
|
+
function Nn(A) {
|
|
47586
47584
|
const R = T.value;
|
|
47587
47585
|
if (!R || !A) return;
|
|
47588
47586
|
const oe = R.view, ie = oe.dom, je = document.activeElement === ie ? oe.state.selection.from : oe.state.doc.content.size - 1;
|
|
@@ -47677,7 +47675,7 @@ const Ihe = {
|
|
|
47677
47675
|
k4(A.id);
|
|
47678
47676
|
return;
|
|
47679
47677
|
case "paste":
|
|
47680
|
-
|
|
47678
|
+
Ji(A.id);
|
|
47681
47679
|
return;
|
|
47682
47680
|
case "quote":
|
|
47683
47681
|
Ns();
|
|
@@ -47690,8 +47688,8 @@ const Ihe = {
|
|
|
47690
47688
|
(A.kind === "image" || A.kind === "file") && x4(A.id);
|
|
47691
47689
|
}
|
|
47692
47690
|
t({
|
|
47693
|
-
addFiles:
|
|
47694
|
-
insertText:
|
|
47691
|
+
addFiles: ea,
|
|
47692
|
+
insertText: Nn,
|
|
47695
47693
|
setTextReference: Qo,
|
|
47696
47694
|
clearTextReference: Ns,
|
|
47697
47695
|
addNodeTag: hr,
|
|
@@ -47712,7 +47710,7 @@ const Ihe = {
|
|
|
47712
47710
|
syncTipMenuSelection: (A, R) => mt.addSubmenuSelection(A, R),
|
|
47713
47711
|
clearTipMenuSelection: (A, R) => mt.clearSubmenuSelection(A, R),
|
|
47714
47712
|
searchTipMenu: (A, R) => mt.searchTipMenu(A, R),
|
|
47715
|
-
getModelLabel:
|
|
47713
|
+
getModelLabel: Ln
|
|
47716
47714
|
});
|
|
47717
47715
|
const w4 = Fs(FM, null);
|
|
47718
47716
|
let Ad;
|
|
@@ -47737,7 +47735,7 @@ const Ihe = {
|
|
|
47737
47735
|
if (!Md()) return;
|
|
47738
47736
|
A.preventDefault(), A.stopPropagation(), ig();
|
|
47739
47737
|
const R = oy(A.dataTransfer);
|
|
47740
|
-
R.length > 0 &&
|
|
47738
|
+
R.length > 0 && ea(R);
|
|
47741
47739
|
}
|
|
47742
47740
|
xe(
|
|
47743
47741
|
() => [r.disabled, r.showAttachment, r.enableFileDrop],
|
|
@@ -47746,10 +47744,10 @@ const Ihe = {
|
|
|
47746
47744
|
}
|
|
47747
47745
|
);
|
|
47748
47746
|
function k4(A) {
|
|
47749
|
-
|
|
47747
|
+
Ki.remove(A);
|
|
47750
47748
|
}
|
|
47751
47749
|
function x4(A) {
|
|
47752
|
-
|
|
47750
|
+
Ki.retry(A);
|
|
47753
47751
|
}
|
|
47754
47752
|
function ag(A) {
|
|
47755
47753
|
return A.status === "uploaded" ? A.resource.filename : A.file.name;
|
|
@@ -47828,8 +47826,8 @@ const Ihe = {
|
|
|
47828
47826
|
const je = ie.getContext("2d");
|
|
47829
47827
|
je && (je.drawImage(oe, 0, 0), R.getTracks().forEach((nt) => nt.stop()), ie.toBlob((nt) => {
|
|
47830
47828
|
if (nt) {
|
|
47831
|
-
const
|
|
47832
|
-
|
|
47829
|
+
const Mn = new File([nt], `screenshot-${Date.now()}.png`, { type: "image/png" });
|
|
47830
|
+
ea([Mn]);
|
|
47833
47831
|
}
|
|
47834
47832
|
}, "image/png"));
|
|
47835
47833
|
} catch (A) {
|
|
@@ -47889,14 +47887,14 @@ const Ihe = {
|
|
|
47889
47887
|
mt.addSubmenuSelection(R, A.id);
|
|
47890
47888
|
return;
|
|
47891
47889
|
}
|
|
47892
|
-
const je = window.getSelection(),
|
|
47893
|
-
oe.focus(),
|
|
47894
|
-
const
|
|
47895
|
-
if (!
|
|
47890
|
+
const je = window.getSelection(), Mn = document.activeElement === oe && !!je && je.rangeCount > 0 && oe.contains(je.getRangeAt(0).startContainer) ? je.getRangeAt(0).cloneRange() : null;
|
|
47891
|
+
oe.focus(), Mn && je ? (je.removeAllRanges(), je.addRange(Mn)) : Pc(oe);
|
|
47892
|
+
const zn = window.getSelection();
|
|
47893
|
+
if (!zn || zn.rangeCount === 0) {
|
|
47896
47894
|
mt.addSubmenuSelection(R, A.id);
|
|
47897
47895
|
return;
|
|
47898
47896
|
}
|
|
47899
|
-
const Rr =
|
|
47897
|
+
const Rr = zn.getRangeAt(0).cloneRange();
|
|
47900
47898
|
Rr.collapse(!0), Xn(
|
|
47901
47899
|
ie,
|
|
47902
47900
|
{ triggerId: ie.id, query: "", range: Rr },
|
|
@@ -47935,12 +47933,12 @@ const Ihe = {
|
|
|
47935
47933
|
const { skill: oe, text: ie } = A;
|
|
47936
47934
|
if (!oe.id) return;
|
|
47937
47935
|
const je = R === "dialog", nt = je ? fg() : null;
|
|
47938
|
-
oe.kind === "scene" ? ip({ id: oe.id, label: oe.title, avatar: oe.avatar }) : Td({ id: oe.id, label: oe.title }, "skill"),
|
|
47936
|
+
oe.kind === "scene" ? ip({ id: oe.id, label: oe.title, avatar: oe.avatar }) : Td({ id: oe.id, label: oe.title }, "skill"), Nn(ie), sr(), je && dg(nt);
|
|
47939
47937
|
}
|
|
47940
47938
|
function L4(A) {
|
|
47941
47939
|
if (!A.text) return;
|
|
47942
47940
|
const R = fg();
|
|
47943
|
-
|
|
47941
|
+
Nn(A.text), sr(), dg(R);
|
|
47944
47942
|
}
|
|
47945
47943
|
function UR(A) {
|
|
47946
47944
|
ip(A);
|
|
@@ -47959,13 +47957,13 @@ const Ihe = {
|
|
|
47959
47957
|
}
|
|
47960
47958
|
function N4(A) {
|
|
47961
47959
|
const R = A.target;
|
|
47962
|
-
I.value &&
|
|
47960
|
+
I.value && Sn.value && !R.closest(".chat-sender__trigger-menu") && !R.closest(".ui-menu") && Qi(), vn.value && !R.closest(".chat-sender__voice-wrapper") && !R.closest(".chat-sender__voice-menu") && Z(), ke.value && !R.closest(".chat-sender__attachment-wrapper") && // TipMenu 通过 Teleport 挂到 body,需用 .ui-menu 判断内外(勿用已移除的 .chat-tip-menu)
|
|
47963
47961
|
!(Ae.value && R.closest(".ui-menu")) && (ke.value = !1);
|
|
47964
47962
|
}
|
|
47965
47963
|
return Wn(() => {
|
|
47966
|
-
document.addEventListener("click", N4), document.addEventListener("selectionchange", U), window.addEventListener("resize", Te), window.addEventListener("scroll", Te, !0), window.addEventListener("resize", Ri), window.addEventListener("scroll", Ri, !0), w4 && r.showAttachment && (Ad = w4.register(
|
|
47964
|
+
document.addEventListener("click", N4), document.addEventListener("selectionchange", U), window.addEventListener("resize", Te), window.addEventListener("scroll", Te, !0), window.addEventListener("resize", Ri), window.addEventListener("scroll", Ri, !0), w4 && r.showAttachment && (Ad = w4.register(ea));
|
|
47967
47965
|
}), Mu(() => {
|
|
47968
|
-
document.removeEventListener("click", N4), document.removeEventListener("selectionchange", U), window.removeEventListener("resize", Te), window.removeEventListener("scroll", Te, !0), window.removeEventListener("resize", Ri), window.removeEventListener("scroll", Ri, !0), di(), Il(), nn(), Ad == null || Ad(), Ad = void 0, ig(),
|
|
47966
|
+
document.removeEventListener("click", N4), document.removeEventListener("selectionchange", U), window.removeEventListener("resize", Te), window.removeEventListener("scroll", Te, !0), window.removeEventListener("resize", Ri), window.removeEventListener("scroll", Ri, !0), di(), Il(), nn(), Ad == null || Ad(), Ad = void 0, ig(), Ki.dispose();
|
|
47969
47967
|
}), (A, R) => {
|
|
47970
47968
|
var oe;
|
|
47971
47969
|
return y(), k("div", {
|
|
@@ -47999,7 +47997,7 @@ const Ihe = {
|
|
|
47999
47997
|
text: ie.text,
|
|
48000
47998
|
disabled: r.disabled,
|
|
48001
47999
|
onEdit: (je) => Tr(ie.id),
|
|
48002
|
-
onRemove: (je) =>
|
|
48000
|
+
onRemove: (je) => Ji(ie.id)
|
|
48003
48001
|
}, null, 8, ["text", "disabled", "onEdit", "onRemove"]))), 128)),
|
|
48004
48002
|
(y(!0), k(ze, null, ht(w.value, (ie) => (y(), he(LS, {
|
|
48005
48003
|
key: ie.id,
|
|
@@ -48048,7 +48046,7 @@ const Ihe = {
|
|
|
48048
48046
|
onCut: Kr,
|
|
48049
48047
|
onClick: gs
|
|
48050
48048
|
}, null, 32),
|
|
48051
|
-
(y(), he(
|
|
48049
|
+
(y(), he(Gi, { to: "body" }, [
|
|
48052
48050
|
ve(Ss, { name: "attachment-menu" }, {
|
|
48053
48051
|
default: qe(() => [
|
|
48054
48052
|
I.value ? (y(), k("div", {
|
|
@@ -48056,21 +48054,21 @@ const Ihe = {
|
|
|
48056
48054
|
ref_key: "triggerMenuRef",
|
|
48057
48055
|
ref: p,
|
|
48058
48056
|
class: Fe(["chat-sender__trigger-menu", {
|
|
48059
|
-
"chat-sender__trigger-menu--custom": r.triggerMenuPlacement === "custom" && !
|
|
48060
|
-
"chat-sender__trigger-menu--builtin ui-menu ui-menu--sub": !!
|
|
48057
|
+
"chat-sender__trigger-menu--custom": r.triggerMenuPlacement === "custom" && !Sn.value,
|
|
48058
|
+
"chat-sender__trigger-menu--builtin ui-menu ui-menu--sub": !!Sn.value
|
|
48061
48059
|
}]),
|
|
48062
48060
|
"data-chat-color-mode": $(h),
|
|
48063
48061
|
style: Ut([Ke.value, po.value]),
|
|
48064
48062
|
onMousedown: R[6] || (R[6] = At(() => {
|
|
48065
48063
|
}, ["prevent"]))
|
|
48066
48064
|
}, [
|
|
48067
|
-
|
|
48065
|
+
Sn.value ? (y(), k(ze, { key: 0 }, [
|
|
48068
48066
|
jr.value ? (y(), he($(fx), {
|
|
48069
48067
|
key: 0,
|
|
48070
48068
|
item: jr.value,
|
|
48071
|
-
keyword: Al(
|
|
48069
|
+
keyword: Al(Sn.value),
|
|
48072
48070
|
"active-item-id": Li(0),
|
|
48073
|
-
"onUpdate:keyword": R[3] || (R[3] = (ie) => Ia(
|
|
48071
|
+
"onUpdate:keyword": R[3] || (R[3] = (ie) => Ia(Sn.value, ie)),
|
|
48074
48072
|
onSelect: Sd,
|
|
48075
48073
|
onExpandNested: R[4] || (R[4] = (ie) => El(0, ie)),
|
|
48076
48074
|
onCollapseNested: R[5] || (R[5] = (ie) => zc(0)),
|
|
@@ -48439,7 +48437,7 @@ const Ihe = {
|
|
|
48439
48437
|
], 34)
|
|
48440
48438
|
], 2)
|
|
48441
48439
|
], 42, rpe),
|
|
48442
|
-
(y(), he(
|
|
48440
|
+
(y(), he(Gi, { to: "body" }, [
|
|
48443
48441
|
ve(Ss, { name: "voice-menu" }, {
|
|
48444
48442
|
default: qe(() => [
|
|
48445
48443
|
rr.value ? (y(), k("div", {
|
|
@@ -48491,7 +48489,7 @@ const Ihe = {
|
|
|
48491
48489
|
ref: Tc,
|
|
48492
48490
|
class: "chat-sender__voice-menu",
|
|
48493
48491
|
"data-chat-color-mode": $(h),
|
|
48494
|
-
style: Ut(
|
|
48492
|
+
style: Ut(Xi.value),
|
|
48495
48493
|
onClick: R[19] || (R[19] = At(() => {
|
|
48496
48494
|
}, ["stop"]))
|
|
48497
48495
|
}, [
|
|
@@ -48637,7 +48635,7 @@ const Ihe = {
|
|
|
48637
48635
|
], 38);
|
|
48638
48636
|
};
|
|
48639
48637
|
}
|
|
48640
|
-
}), Ope = /* @__PURE__ */ Xe(Rpe, [["__scopeId", "data-v-
|
|
48638
|
+
}), Ope = /* @__PURE__ */ Xe(Rpe, [["__scopeId", "data-v-48368df3"]]), Lpe = ["data-testid"], Npe = /* @__PURE__ */ Re({
|
|
48641
48639
|
name: "DocumentAskPopup",
|
|
48642
48640
|
__name: "DocumentAskPopup",
|
|
48643
48641
|
props: {
|
|
@@ -51216,7 +51214,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51216
51214
|
const at = !me.value;
|
|
51217
51215
|
return !at && (Le === 0 || we > 0) ? !1 : (Le = Math.max(0, Le + we), se = Wt(), Z.scrollTop = ce, Be(Z), at);
|
|
51218
51216
|
}
|
|
51219
|
-
function
|
|
51217
|
+
function En() {
|
|
51220
51218
|
var we;
|
|
51221
51219
|
Ke.value = ((we = We.value) == null ? void 0 : we.offsetHeight) ?? 0;
|
|
51222
51220
|
const Z = Te.value, ce = J.value;
|
|
@@ -51232,7 +51230,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51232
51230
|
qt({ intent: "stream" });
|
|
51233
51231
|
}
|
|
51234
51232
|
}
|
|
51235
|
-
function
|
|
51233
|
+
function Rn(Z, ce) {
|
|
51236
51234
|
dt(() => {
|
|
51237
51235
|
Nt(), requestAnimationFrame(() => {
|
|
51238
51236
|
requestAnimationFrame(() => {
|
|
@@ -51281,7 +51279,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51281
51279
|
...we != null && we.toolCallId ? { toolCallId: we.toolCallId } : {}
|
|
51282
51280
|
});
|
|
51283
51281
|
}
|
|
51284
|
-
function
|
|
51282
|
+
function Dn() {
|
|
51285
51283
|
if (!fe.value) {
|
|
51286
51284
|
const Tt = Y.value.findIndex(
|
|
51287
51285
|
(zt) => !k5(zt, p.value.get(zt.id))
|
|
@@ -51346,7 +51344,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51346
51344
|
return;
|
|
51347
51345
|
}
|
|
51348
51346
|
if (ce) {
|
|
51349
|
-
me.value = !0,
|
|
51347
|
+
me.value = !0, Rn("new-turn", !0);
|
|
51350
51348
|
return;
|
|
51351
51349
|
}
|
|
51352
51350
|
if (!mn()) {
|
|
@@ -51361,7 +51359,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51361
51359
|
});
|
|
51362
51360
|
return;
|
|
51363
51361
|
}
|
|
51364
|
-
|
|
51362
|
+
Rn("stream", !1);
|
|
51365
51363
|
},
|
|
51366
51364
|
{ deep: !0 }
|
|
51367
51365
|
), xe(
|
|
@@ -51400,14 +51398,14 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51400
51398
|
(Z, ce) => {
|
|
51401
51399
|
dt(() => {
|
|
51402
51400
|
var we;
|
|
51403
|
-
Ke.value = ((we = We.value) == null ? void 0 : we.offsetHeight) ?? 0, Nt(), !(!Z || r.autoScroll === "off") &&
|
|
51401
|
+
Ke.value = ((we = We.value) == null ? void 0 : we.offsetHeight) ?? 0, Nt(), !(!Z || r.autoScroll === "off") && Rn(ce ? "stream" : "return", !ce);
|
|
51404
51402
|
});
|
|
51405
51403
|
},
|
|
51406
51404
|
{ flush: "post" }
|
|
51407
51405
|
), Wn(() => {
|
|
51408
|
-
tt = Ae(m.value), typeof ResizeObserver < "u" && (Ne = new ResizeObserver(
|
|
51406
|
+
tt = Ae(m.value), typeof ResizeObserver < "u" && (Ne = new ResizeObserver(En), Nt());
|
|
51409
51407
|
const Z = Te.value;
|
|
51410
|
-
Z && Be(Z), Z == null || Z.addEventListener("wheel", Ge, { passive: !0 }), Z == null || Z.addEventListener("touchstart", Ge, { passive: !0 }), r.autoScroll !== "off" ?
|
|
51408
|
+
Z && Be(Z), Z == null || Z.addEventListener("wheel", Ge, { passive: !0 }), Z == null || Z.addEventListener("touchstart", Ge, { passive: !0 }), r.autoScroll !== "off" ? Rn("mount", !1) : dt(Wt);
|
|
51411
51409
|
}), JR(() => {
|
|
51412
51410
|
Nt(), Wt();
|
|
51413
51411
|
}), gn(() => {
|
|
@@ -51416,7 +51414,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51416
51414
|
Z == null || Z.removeEventListener("wheel", Ge), Z == null || Z.removeEventListener("touchstart", Ge), Ne == null || Ne.disconnect(), document.removeEventListener("pointerdown", be), uo();
|
|
51417
51415
|
});
|
|
51418
51416
|
const St = O(null), le = O(null);
|
|
51419
|
-
let Ze = null, bt = !1, cn = !1,
|
|
51417
|
+
let Ze = null, bt = !1, cn = !1, Ln = null;
|
|
51420
51418
|
function Kt(Z) {
|
|
51421
51419
|
const ce = Z instanceof Element ? Z : Z == null ? void 0 : Z.parentElement, we = ce == null ? void 0 : ce.closest(".conversation-message__text");
|
|
51422
51420
|
return !(we instanceof HTMLElement) || !we.closest(".conversation-message--assistant") || we.closest(".conversation-message__process, .conversation-message__tools") ? null : we;
|
|
@@ -51442,15 +51440,15 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51442
51440
|
function ur(Z, ce) {
|
|
51443
51441
|
return Z.startContainer === ce.startContainer && Z.startOffset === ce.startOffset && Z.endContainer === ce.endContainer && Z.endOffset === ce.endOffset;
|
|
51444
51442
|
}
|
|
51445
|
-
function
|
|
51443
|
+
function On() {
|
|
51446
51444
|
const Z = window.getSelection(), ce = Z && !Z.isCollapsed && Z.rangeCount > 0 ? Z.getRangeAt(0) : null;
|
|
51447
|
-
if (cn && (!ce ||
|
|
51445
|
+
if (cn && (!ce || Ln !== null && ur(ce, Ln)) || !Z || Z.isCollapsed || Z.rangeCount === 0 || !Te.value) return;
|
|
51448
51446
|
const we = Z.getRangeAt(0), at = Kt(we.commonAncestorContainer);
|
|
51449
51447
|
if (!at || !Te.value.contains(at) || hn(we)) return;
|
|
51450
51448
|
const Ct = qn(we), Tt = Ct.replace(/\s+/g, " ").trim();
|
|
51451
|
-
Tt && (Ze = we.cloneRange(), St.value = { text: Tt, copyText: Ct, top: 0, left: 0, hidden: !1 },
|
|
51449
|
+
Tt && (Ze = we.cloneRange(), St.value = { text: Tt, copyText: Ct, top: 0, left: 0, hidden: !1 }, kn(), dt(kn), vn(), document.addEventListener("pointerdown", be));
|
|
51452
51450
|
}
|
|
51453
|
-
function
|
|
51451
|
+
function kn() {
|
|
51454
51452
|
var rr;
|
|
51455
51453
|
const Z = Ze, ce = Te.value, we = St.value;
|
|
51456
51454
|
if (!Z || !ce || !we) return;
|
|
@@ -51471,17 +51469,17 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51471
51469
|
};
|
|
51472
51470
|
}
|
|
51473
51471
|
function vn() {
|
|
51474
|
-
bt || (bt = !0, window.addEventListener("scroll",
|
|
51472
|
+
bt || (bt = !0, window.addEventListener("scroll", kn, !0), window.addEventListener("resize", kn));
|
|
51475
51473
|
}
|
|
51476
51474
|
function uo() {
|
|
51477
|
-
bt && (bt = !1, window.removeEventListener("scroll",
|
|
51475
|
+
bt && (bt = !1, window.removeEventListener("scroll", kn, !0), window.removeEventListener("resize", kn));
|
|
51478
51476
|
}
|
|
51479
51477
|
function be(Z) {
|
|
51480
51478
|
const ce = Z.target;
|
|
51481
|
-
ce instanceof Element && ce.closest(".chat-select-tip, .document-ask-popup") || (
|
|
51479
|
+
ce instanceof Element && ce.closest(".chat-select-tip, .document-ask-popup") || (Ln = (Ze == null ? void 0 : Ze.cloneRange()) ?? null, cn = !0, De(), document.addEventListener(
|
|
51482
51480
|
"mouseup",
|
|
51483
51481
|
() => {
|
|
51484
|
-
cn = !1,
|
|
51482
|
+
cn = !1, Ln = null;
|
|
51485
51483
|
},
|
|
51486
51484
|
{ once: !0 }
|
|
51487
51485
|
));
|
|
@@ -51584,7 +51582,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51584
51582
|
"aria-live": "polite",
|
|
51585
51583
|
"aria-relevant": "additions text",
|
|
51586
51584
|
onScrollPassive: ln,
|
|
51587
|
-
onMouseup:
|
|
51585
|
+
onMouseup: On,
|
|
51588
51586
|
onCopy: dr
|
|
51589
51587
|
}, [
|
|
51590
51588
|
ut(Z.$slots, "prepend", {}, void 0, !0),
|
|
@@ -51706,7 +51704,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51706
51704
|
onPrevious: xt,
|
|
51707
51705
|
onNext: nr,
|
|
51708
51706
|
onAnswerChange: (Tt) => sn(we, Tt),
|
|
51709
|
-
onSubmitGroup:
|
|
51707
|
+
onSubmitGroup: Dn,
|
|
51710
51708
|
onDismiss: (Tt) => cr(),
|
|
51711
51709
|
onAction: (Tt) => zr(Tt)
|
|
51712
51710
|
}, null, 8, ["question", "question-index", "question-count", "group-can-submit", "onAnswerChange", "onDismiss", "onAction"])), [
|
|
@@ -51757,7 +51755,7 @@ const x0e = ["aria-busy"], S0e = ["data-chat-node-id", "data-chat-source-index"]
|
|
|
51757
51755
|
]),
|
|
51758
51756
|
_: 1
|
|
51759
51757
|
}),
|
|
51760
|
-
(y(), he(
|
|
51758
|
+
(y(), he(Gi, { to: "body" }, [
|
|
51761
51759
|
St.value ? (y(), k("div", {
|
|
51762
51760
|
key: 0,
|
|
51763
51761
|
ref_key: "selectTipEl",
|
|
@@ -52433,7 +52431,7 @@ const _me = ["aria-label"], Ame = /* @__PURE__ */ Re({
|
|
|
52433
52431
|
pl('<div class="chat-preview-skeleton__body" aria-hidden="true" data-v-7904a5f1><span class="chat-preview-skeleton__line chat-preview-skeleton__line--lg" data-v-7904a5f1></span><span class="chat-preview-skeleton__line chat-preview-skeleton__line--md" data-v-7904a5f1></span><span class="chat-preview-skeleton__line chat-preview-skeleton__line--full" data-v-7904a5f1></span><span class="chat-preview-skeleton__line chat-preview-skeleton__line--full" data-v-7904a5f1></span><span class="chat-preview-skeleton__line chat-preview-skeleton__line--sm" data-v-7904a5f1></span><span class="chat-preview-skeleton__line chat-preview-skeleton__line--md" data-v-7904a5f1></span><span class="chat-preview-skeleton__line chat-preview-skeleton__line--full" data-v-7904a5f1></span><span class="chat-preview-skeleton__line chat-preview-skeleton__line--lg" data-v-7904a5f1></span></div><div class="chat-preview-skeleton__shimmer" aria-hidden="true" data-v-7904a5f1></div>', 2)
|
|
52434
52432
|
])], 10, _me));
|
|
52435
52433
|
}
|
|
52436
|
-
}),
|
|
52434
|
+
}), qi = /* @__PURE__ */ Xe(Ame, [["__scopeId", "data-v-7904a5f1"]]), yT = new URL("./pdf.worker.min.mjs", import.meta.url).href;
|
|
52437
52435
|
let Bk = null;
|
|
52438
52436
|
function bT() {
|
|
52439
52437
|
return Bk ?? (Bk = import("./pdf-Cl8ZP0Rp.js").then((e) => (e.GlobalWorkerOptions.workerSrc || (e.GlobalWorkerOptions.workerSrc = yT), e))), Bk;
|
|
@@ -52808,7 +52806,7 @@ const Dme = { class: "pdf-renderer" }, zme = {
|
|
|
52808
52806
|
scale: f,
|
|
52809
52807
|
rotation: h
|
|
52810
52808
|
}), (ne, T) => (y(), k("div", Dme, [
|
|
52811
|
-
$(l) ? (y(), he(
|
|
52809
|
+
$(l) ? (y(), he(qi, {
|
|
52812
52810
|
key: 0,
|
|
52813
52811
|
label: "正在加载 PDF"
|
|
52814
52812
|
})) : $(c) ? (y(), k("div", zme, [
|
|
@@ -52895,7 +52893,7 @@ const Dme = { class: "pdf-renderer" }, zme = {
|
|
|
52895
52893
|
scrollToOutline: g,
|
|
52896
52894
|
download: v
|
|
52897
52895
|
}), (b, w) => (y(), k("div", Ume, [
|
|
52898
|
-
s.value ? (y(), he(
|
|
52896
|
+
s.value ? (y(), he(qi, {
|
|
52899
52897
|
key: 0,
|
|
52900
52898
|
label: "正在加载 HTML"
|
|
52901
52899
|
})) : i.value ? (y(), k("div", Hme, [
|
|
@@ -52954,7 +52952,7 @@ class D0 extends Error {
|
|
|
52954
52952
|
super(t), this.name = "BentoDocParseError";
|
|
52955
52953
|
}
|
|
52956
52954
|
}
|
|
52957
|
-
class
|
|
52955
|
+
class ji extends Error {
|
|
52958
52956
|
constructor(t) {
|
|
52959
52957
|
super(t), this.name = "BentoLoadError";
|
|
52960
52958
|
}
|
|
@@ -53227,10 +53225,10 @@ async function gge(e, t = {}) {
|
|
|
53227
53225
|
} catch (r) {
|
|
53228
53226
|
if (mge(r)) throw r;
|
|
53229
53227
|
const o = r instanceof Error ? r.message : String(r);
|
|
53230
|
-
throw new
|
|
53228
|
+
throw new ji(`failed to fetch bento artifact: ${o}`);
|
|
53231
53229
|
}
|
|
53232
53230
|
if (!n.ok)
|
|
53233
|
-
throw new
|
|
53231
|
+
throw new ji(`failed to fetch bento artifact: HTTP ${n.status}`);
|
|
53234
53232
|
return ET(await n.text());
|
|
53235
53233
|
}
|
|
53236
53234
|
function vge(e) {
|
|
@@ -53273,7 +53271,7 @@ async function wge(e, t, n = {}) {
|
|
|
53273
53271
|
if ((a = n.signal) != null && a.aborted) return;
|
|
53274
53272
|
const { api: l, crossOrigin: c } = MT(e);
|
|
53275
53273
|
if (c)
|
|
53276
|
-
throw new
|
|
53274
|
+
throw new ji(
|
|
53277
53275
|
"the bento shell is cross-origin with this page, so loadDoc() cannot be called into it — `bentoShellUrl` must resolve to the same origin as the host page (see yxuer-bento/docs/HOST-EMBED.md)"
|
|
53278
53276
|
);
|
|
53279
53277
|
if (l != null && l.loadDoc) {
|
|
@@ -53282,23 +53280,23 @@ async function wge(e, t, n = {}) {
|
|
|
53282
53280
|
u = l.loadDoc(s);
|
|
53283
53281
|
} catch (d) {
|
|
53284
53282
|
const f = d instanceof Error ? d.message : String(d);
|
|
53285
|
-
throw new
|
|
53283
|
+
throw new ji(`the bento shell failed to load the document: ${f}`);
|
|
53286
53284
|
}
|
|
53287
53285
|
if (!u)
|
|
53288
|
-
throw new
|
|
53286
|
+
throw new ji(
|
|
53289
53287
|
"the bento shell rejected the document as invalid bento/slides JSON"
|
|
53290
53288
|
);
|
|
53291
53289
|
return;
|
|
53292
53290
|
}
|
|
53293
53291
|
if (Date.now() >= i)
|
|
53294
|
-
throw new
|
|
53292
|
+
throw new ji("timed out waiting for the bento shell to boot");
|
|
53295
53293
|
await new Promise((u) => setTimeout(u, o));
|
|
53296
53294
|
}
|
|
53297
53295
|
}
|
|
53298
53296
|
async function kge(e, t, n, r = {}) {
|
|
53299
53297
|
var d;
|
|
53300
53298
|
const o = e.ownerDocument.defaultView;
|
|
53301
|
-
if (!o) throw new
|
|
53299
|
+
if (!o) throw new ji("bento preview iframe is not attached to a document");
|
|
53302
53300
|
const s = r.timeoutMs ?? ST, i = Date.now() + s;
|
|
53303
53301
|
vge(o);
|
|
53304
53302
|
const a = new URL(yge(t, o.location.href));
|
|
@@ -53308,18 +53306,18 @@ async function kge(e, t, n, r = {}) {
|
|
|
53308
53306
|
const c = await l;
|
|
53309
53307
|
if ((d = r.signal) != null && d.aborted || c === "aborted") return;
|
|
53310
53308
|
if (c === "timeout")
|
|
53311
|
-
throw new
|
|
53309
|
+
throw new ji(`timed out loading the bento shell at ${a.toString()}`);
|
|
53312
53310
|
const u = Math.max(0, i - Date.now());
|
|
53313
53311
|
await wge(e, n, { ...r, timeoutMs: u });
|
|
53314
53312
|
}
|
|
53315
53313
|
function xge(e) {
|
|
53316
53314
|
const { api: t, crossOrigin: n } = MT(e);
|
|
53317
53315
|
if (n)
|
|
53318
|
-
throw new
|
|
53316
|
+
throw new ji(
|
|
53319
53317
|
"the bento shell is cross-origin with this page, so saveCopy() cannot be called into it — `bentoShellUrl` must resolve to the same origin as the host page (see yxuer-bento/docs/HOST-EMBED.md)"
|
|
53320
53318
|
);
|
|
53321
53319
|
if (typeof (t == null ? void 0 : t.saveCopy) != "function")
|
|
53322
|
-
throw new
|
|
53320
|
+
throw new ji("the bento shell has not exposed saveCopy() yet");
|
|
53323
53321
|
t.saveCopy();
|
|
53324
53322
|
}
|
|
53325
53323
|
const Sge = { class: "bento-renderer" }, Cge = ["title", "allow"], _ge = {
|
|
@@ -53431,7 +53429,7 @@ const Sge = { class: "bento-renderer" }, Cge = ["title", "allow"], _ge = {
|
|
|
53431
53429
|
}, null, 10, Cge), [
|
|
53432
53430
|
[Ai, !l.value]
|
|
53433
53431
|
]),
|
|
53434
|
-
a.value ? (y(), he(
|
|
53432
|
+
a.value ? (y(), he(qi, {
|
|
53435
53433
|
key: 0,
|
|
53436
53434
|
label: "正在加载课件"
|
|
53437
53435
|
})) : l.value ? (y(), k("div", _ge, [
|
|
@@ -53528,7 +53526,7 @@ const Sge = { class: "bento-renderer" }, Cge = ["title", "allow"], _ge = {
|
|
|
53528
53526
|
scrollToOutline: m,
|
|
53529
53527
|
download: g
|
|
53530
53528
|
}), (v, b) => (y(), k("div", Mge, [
|
|
53531
|
-
s.value ? (y(), he(
|
|
53529
|
+
s.value ? (y(), he(qi, {
|
|
53532
53530
|
key: 0,
|
|
53533
53531
|
label: "正在加载 Markdown"
|
|
53534
53532
|
})) : i.value ? (y(), k("div", Tge, [
|
|
@@ -53614,7 +53612,7 @@ const Sge = { class: "bento-renderer" }, Cge = ["title", "allow"], _ge = {
|
|
|
53614
53612
|
getOutline: h,
|
|
53615
53613
|
download: p
|
|
53616
53614
|
}), (m, g) => (y(), k("div", Oge, [
|
|
53617
|
-
s.value ? (y(), he(
|
|
53615
|
+
s.value ? (y(), he(qi, {
|
|
53618
53616
|
key: 0,
|
|
53619
53617
|
label: "正在加载文本"
|
|
53620
53618
|
})) : i.value ? (y(), k("div", Lge, [
|
|
@@ -53729,7 +53727,7 @@ async function Zge(e) {
|
|
|
53729
53727
|
const t = (e.urlType || Vge(e.filename)).toLowerCase(), n = await fetch(e.url);
|
|
53730
53728
|
if (!n.ok) throw new Error(`HTTP ${n.status}`);
|
|
53731
53729
|
if (t === "csv") {
|
|
53732
|
-
const [i, { default: a }] = await Promise.all([n.text(), import("./papaparse.min-
|
|
53730
|
+
const [i, { default: a }] = await Promise.all([n.text(), import("./papaparse.min-D21Cihob.js").then((c) => c.p)]), l = a.parse(i, { skipEmptyLines: !0 });
|
|
53733
53731
|
return [{ name: qge(e.filename), rows: Uk(l.data) }];
|
|
53734
53732
|
}
|
|
53735
53733
|
const [r, o] = await Promise.all([n.arrayBuffer(), import("./xlsx-BopDBbWb.js")]), s = o.read(r, { type: "array" });
|
|
@@ -53808,7 +53806,7 @@ const Xge = { class: "xlsx-renderer" }, Yge = {
|
|
|
53808
53806
|
scrollToOutline: p,
|
|
53809
53807
|
download: m
|
|
53810
53808
|
}), (g, v) => (y(), k("div", Xge, [
|
|
53811
|
-
s.value ? (y(), he(
|
|
53809
|
+
s.value ? (y(), he(qi, {
|
|
53812
53810
|
key: 0,
|
|
53813
53811
|
label: "正在解析表格"
|
|
53814
53812
|
})) : i.value ? (y(), k("div", Yge, [
|
|
@@ -54068,7 +54066,7 @@ var s2e = /* @__PURE__ */ Ff(Wh, 9, 1), i2e = /* @__PURE__ */ Ff(NT, 5, 1), w2 =
|
|
|
54068
54066
|
t.l = h, t.p = K, t.b = f, t.f = u, h && (u = 1, t.m = m, t.d = p, t.n = g);
|
|
54069
54067
|
} while (!u);
|
|
54070
54068
|
return f != n.length && i ? Pb(n, 0, f) : n.subarray(0, f);
|
|
54071
|
-
}, u2e = /* @__PURE__ */ new Bs(0),
|
|
54069
|
+
}, u2e = /* @__PURE__ */ new Bs(0), Hi = function(e, t) {
|
|
54072
54070
|
return e[t] | e[t + 1] << 8;
|
|
54073
54071
|
}, ri = function(e, t) {
|
|
54074
54072
|
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
|
|
@@ -54104,15 +54102,15 @@ function p2e(e, t) {
|
|
|
54104
54102
|
}
|
|
54105
54103
|
}
|
|
54106
54104
|
var m2e = function(e, t) {
|
|
54107
|
-
return t + 30 +
|
|
54105
|
+
return t + 30 + Hi(e, t + 26) + Hi(e, t + 28);
|
|
54108
54106
|
}, g2e = function(e, t, n) {
|
|
54109
|
-
var r =
|
|
54110
|
-
return [
|
|
54107
|
+
var r = Hi(e, t + 28), o = Hi(e, t + 30), s = p2e(e.subarray(t + 46, t + 46 + r), !(Hi(e, t + 8) & 2048)), i = t + 46 + r, a = v2e(e, i, o, n, ri(e, t + 20), ri(e, t + 24), ri(e, t + 42)), l = a[0], c = a[1], u = a[2];
|
|
54108
|
+
return [Hi(e, t + 10), l, c, s, i + o + Hi(e, t + 32), u];
|
|
54111
54109
|
}, v2e = function(e, t, n, r, o, s, i) {
|
|
54112
54110
|
var a = o == 4294967295, l = s == 4294967295, c = i == 4294967295, u = t + n, d = a + l + c;
|
|
54113
54111
|
if (r && d) {
|
|
54114
|
-
for (; t + 4 < u; t += 4 +
|
|
54115
|
-
if (
|
|
54112
|
+
for (; t + 4 < u; t += 4 + Hi(e, t + 2))
|
|
54113
|
+
if (Hi(e, t) == 1)
|
|
54116
54114
|
return [
|
|
54117
54115
|
a ? x2(e, t + 4 + 8 * l) : o,
|
|
54118
54116
|
l ? x2(e, t + 4) : s,
|
|
@@ -54126,7 +54124,7 @@ var m2e = function(e, t) {
|
|
|
54126
54124
|
function PT(e, t) {
|
|
54127
54125
|
for (var n = {}, r = e.length - 22; ri(e, r) != 101010256; --r)
|
|
54128
54126
|
(!r || e.length - r > 65558) && Ps(13);
|
|
54129
|
-
var o =
|
|
54127
|
+
var o = Hi(e, r + 8);
|
|
54130
54128
|
if (!o)
|
|
54131
54129
|
return {};
|
|
54132
54130
|
var s = ri(e, r + 16), i = ri(e, r - 20) == 117853008;
|
|
@@ -54360,7 +54358,7 @@ const E2e = {
|
|
|
54360
54358
|
scrollToOutline: I,
|
|
54361
54359
|
download: D
|
|
54362
54360
|
}), (B, G) => (y(), k("div", E2e, [
|
|
54363
|
-
i.value ? (y(), he(
|
|
54361
|
+
i.value ? (y(), he(qi, {
|
|
54364
54362
|
key: 0,
|
|
54365
54363
|
label: "正在读取压缩包"
|
|
54366
54364
|
})) : a.value ? (y(), k("div", M2e, [
|
|
@@ -54740,7 +54738,7 @@ const rve = {
|
|
|
54740
54738
|
class: "onlyoffice-renderer__mount"
|
|
54741
54739
|
}, null, 512),
|
|
54742
54740
|
u.value ? (y(), k("div", rve, [
|
|
54743
|
-
ve(
|
|
54741
|
+
ve(qi, { label: "正在加载文档" })
|
|
54744
54742
|
])) : X("", !0),
|
|
54745
54743
|
d.value ? (y(), k("div", ove, [
|
|
54746
54744
|
S("p", null, "文档加载失败:" + re(d.value.message), 1)
|
|
@@ -55724,7 +55722,7 @@ const rye = /* @__PURE__ */ Re({
|
|
|
55724
55722
|
if (!(!c || !n.src)) {
|
|
55725
55723
|
c.replaceChildren();
|
|
55726
55724
|
try {
|
|
55727
|
-
const [u, { renderAsync: d }] = await Promise.all([i(), import("./docx-preview-
|
|
55725
|
+
const [u, { renderAsync: d }] = await Promise.all([i(), import("./docx-preview-7EJVIsVS.js")]);
|
|
55728
55726
|
if (l !== s || (await d(u, c, void 0, {
|
|
55729
55727
|
className: "docx",
|
|
55730
55728
|
inWrapper: !0,
|
|
@@ -55772,7 +55770,7 @@ const rye = /* @__PURE__ */ Re({
|
|
|
55772
55770
|
setup(e, { emit: t }) {
|
|
55773
55771
|
const n = e, r = t, o = {
|
|
55774
55772
|
docx: rye,
|
|
55775
|
-
pptx: Ly(() => import("./index-
|
|
55773
|
+
pptx: Ly(() => import("./index-NEbpKrI9.js").then((We) => We.i))
|
|
55776
55774
|
}, s = x(() => o[n.kind]), i = O(!1), a = O(1), l = O(0), c = O([]), u = O(null), d = O(), f = O(), h = O(!1), p = O(!1);
|
|
55777
55775
|
let m = 0;
|
|
55778
55776
|
const g = Fb();
|
|
@@ -55935,7 +55933,7 @@ const rye = /* @__PURE__ */ Re({
|
|
|
55935
55933
|
}, [
|
|
55936
55934
|
I.value ? (y(), he(QR, { key: 1 }, {
|
|
55937
55935
|
fallback: qe(() => [
|
|
55938
|
-
ve(
|
|
55936
|
+
ve(qi, { label: "正在加载预览" })
|
|
55939
55937
|
]),
|
|
55940
55938
|
default: qe(() => [
|
|
55941
55939
|
(y(), he(Co(s.value), {
|
|
@@ -55947,7 +55945,7 @@ const rye = /* @__PURE__ */ Re({
|
|
|
55947
55945
|
}, null, 40, ["src", "options"]))
|
|
55948
55946
|
]),
|
|
55949
55947
|
_: 1
|
|
55950
|
-
})) : (y(), he(
|
|
55948
|
+
})) : (y(), he(qi, {
|
|
55951
55949
|
key: 0,
|
|
55952
55950
|
label: "正在加载预览"
|
|
55953
55951
|
}))
|
|
@@ -57256,7 +57254,7 @@ const kye = { class: "open-file-viewer-host__body" }, xye = { class: "open-file-
|
|
|
57256
57254
|
])
|
|
57257
57255
|
], 2)) : X("", !0);
|
|
57258
57256
|
}
|
|
57259
|
-
}), h3e = /* @__PURE__ */ Xe(f3e, [["__scopeId", "data-v-cec1ca23"]]),
|
|
57257
|
+
}), h3e = /* @__PURE__ */ Xe(f3e, [["__scopeId", "data-v-cec1ca23"]]), $i = { width: 600, height: 628 }, GT = { x: 90, y: -14, width: 522, height: 654 }, fa = {
|
|
57260
57258
|
x: 232,
|
|
57261
57259
|
y: 248,
|
|
57262
57260
|
width: 242,
|
|
@@ -57409,7 +57407,7 @@ const Zd = id.find((e) => e.key === "torso"), y3e = (Zd == null ? void 0 : Zd.sh
|
|
|
57409
57407
|
width: Xd.maxX - Xd.minX + Jk * 2,
|
|
57410
57408
|
height: y3e - (Xd.minY - Qk)
|
|
57411
57409
|
};
|
|
57412
|
-
function
|
|
57410
|
+
function Zi(e) {
|
|
57413
57411
|
const [t, n] = WT, r = wy / (wy - e[2]);
|
|
57414
57412
|
return [t + (e[0] - t) * r, n + (e[1] - n) * r];
|
|
57415
57413
|
}
|
|
@@ -57438,7 +57436,7 @@ function qT(e, t, n, r) {
|
|
|
57438
57436
|
return [l * Math.cos(d) - c * Math.sin(d), l * Math.sin(d) + c * Math.cos(d), u];
|
|
57439
57437
|
}
|
|
57440
57438
|
function ZT(e, t, n) {
|
|
57441
|
-
const [r, o] =
|
|
57439
|
+
const [r, o] = Zi(e.center), [s, i] = Zi([
|
|
57442
57440
|
e.center[0] + t[0],
|
|
57443
57441
|
e.center[1] + t[1],
|
|
57444
57442
|
e.center[2] + t[2]
|
|
@@ -57450,11 +57448,11 @@ function ZT(e, t, n) {
|
|
|
57450
57448
|
];
|
|
57451
57449
|
}
|
|
57452
57450
|
function t7(e, t, n) {
|
|
57453
|
-
const [r, o] =
|
|
57451
|
+
const [r, o] = Zi(e.center), s = new Float64Array(Br);
|
|
57454
57452
|
for (let a = 0; a <= 90; a++) {
|
|
57455
57453
|
const l = -Math.PI / 2 + Math.PI * a / 90;
|
|
57456
57454
|
for (let c = 0; c < 360; c++) {
|
|
57457
|
-
const [u, d] =
|
|
57455
|
+
const [u, d] = Zi(
|
|
57458
57456
|
ZT(e, qT(e, t, l, 2 * Math.PI * c / 360), n)
|
|
57459
57457
|
), f = Math.round(VT(Math.atan2(d - o, u - r))) % Br;
|
|
57460
57458
|
s[f] = Math.max(s[f], Math.hypot(u - r, d - o));
|
|
@@ -57484,13 +57482,13 @@ function k3e(e, t, n) {
|
|
|
57484
57482
|
for (const r of id) {
|
|
57485
57483
|
const o = r.shape;
|
|
57486
57484
|
if (o.kind !== "blob" || o === e) continue;
|
|
57487
|
-
const [s, i] =
|
|
57485
|
+
const [s, i] = Zi(o.center), a = (t - s) / (o.radii[0] + H0), l = (n - i) / (o.radii[1] + H0);
|
|
57488
57486
|
if (Math.abs(a) ** o.power + Math.abs(l) ** o.power < 0.9) return !0;
|
|
57489
57487
|
}
|
|
57490
57488
|
return !1;
|
|
57491
57489
|
}
|
|
57492
57490
|
function x3e(e, t, n, r) {
|
|
57493
|
-
const [o, s] =
|
|
57491
|
+
const [o, s] = Zi(e.center), i = t7(e, n, () => 1), a = new Float64Array(Br);
|
|
57494
57492
|
for (let u = 0; u < Br; u++) {
|
|
57495
57493
|
const d = 2 * Math.PI * u / Br, f = i[u];
|
|
57496
57494
|
a[u] = 1;
|
|
@@ -57551,11 +57549,11 @@ function S3e(e, t, n, r, o, s) {
|
|
|
57551
57549
|
}
|
|
57552
57550
|
}
|
|
57553
57551
|
function C3e(e, t, n, r, o) {
|
|
57554
|
-
const [s, i] =
|
|
57552
|
+
const [s, i] = Zi([
|
|
57555
57553
|
e[0] + t[0] * n,
|
|
57556
57554
|
e[1] + t[1] * n,
|
|
57557
57555
|
e[2] + t[2] * n
|
|
57558
|
-
]), [a, l] =
|
|
57556
|
+
]), [a, l] = Zi(e), c = s - a, u = i - l, d = Math.hypot(c, u) || 1;
|
|
57559
57557
|
let f = 0;
|
|
57560
57558
|
for (let h = 1; h <= 4; h++) {
|
|
57561
57559
|
const [p, , m, g] = o(s + c / d * h, i + u / d * h);
|
|
@@ -57640,10 +57638,10 @@ function M3e(e, t) {
|
|
|
57640
57638
|
let d = 0;
|
|
57641
57639
|
const f = (g, v, b, w) => {
|
|
57642
57640
|
i.set(g, d * 3), a.set(v, d * 3);
|
|
57643
|
-
const [C, _] =
|
|
57644
|
-
l[d * 2] = C /
|
|
57645
|
-
const [E, M] =
|
|
57646
|
-
u[d * 2] = E /
|
|
57641
|
+
const [C, _] = Zi(g);
|
|
57642
|
+
l[d * 2] = C / $i.width, l[d * 2 + 1] = _ / $i.height, c[d * 2] = b[0] / Zk, c[d * 2 + 1] = b[1] / Zk;
|
|
57643
|
+
const [E, M] = Zi(w);
|
|
57644
|
+
u[d * 2] = E / $i.width, u[d * 2 + 1] = M / $i.height, d++;
|
|
57647
57645
|
}, h = e.shape;
|
|
57648
57646
|
switch (h.kind) {
|
|
57649
57647
|
case "blob":
|
|
@@ -58008,7 +58006,7 @@ function Z3e(e, t) {
|
|
|
58008
58006
|
return n ? (e.bindTexture(e.TEXTURE_2D, n), e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, t), e.generateMipmap(e.TEXTURE_2D), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR_MIPMAP_LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.MIRRORED_REPEAT), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.MIRRORED_REPEAT), n) : null;
|
|
58009
58007
|
}
|
|
58010
58008
|
function c7(e) {
|
|
58011
|
-
const { width: t, height: n } =
|
|
58009
|
+
const { width: t, height: n } = $i, r = document.createElement("canvas");
|
|
58012
58010
|
r.width = t, r.height = n;
|
|
58013
58011
|
const o = r.getContext("2d", { willReadFrequently: !0 });
|
|
58014
58012
|
return o ? (o.drawImage(e, 0, 0, t, n), o.getImageData(0, 0, t, n).data) : null;
|
|
@@ -58028,7 +58026,7 @@ function u7(e, t, n) {
|
|
|
58028
58026
|
}
|
|
58029
58027
|
}
|
|
58030
58028
|
function X3e(e, t, n, r) {
|
|
58031
|
-
const { width: o, height: s } =
|
|
58029
|
+
const { width: o, height: s } = $i, i = (u, d) => (Math.min(s - 1, Math.max(0, Math.round(d * s))) * o + Math.min(o - 1, Math.max(0, Math.round(u * o)))) * 4, a = [0, 0, 0], l = [0, 0, 0];
|
|
58032
58030
|
let c = 0;
|
|
58033
58031
|
for (let u = 0; u < t.normals.length / 3; u++) {
|
|
58034
58032
|
if (t.normals[u * 3 + 2] < 0.8) continue;
|
|
@@ -58055,7 +58053,7 @@ function K3e(e, t, n) {
|
|
|
58055
58053
|
const o = r, s = l7(o, a7, V3e), i = l7(o, a7, W3e), a = E2(o, t.photo, !0), l = E2(o, t.eyes, !1), c = Z3e(o, t.fur), u = E2(o, t.back, !0);
|
|
58056
58054
|
if (!s || !i || !a || !l || !c || !u) return null;
|
|
58057
58055
|
const d = c7(t.photo), f = c7(t.back), h = [], p = d ? (P, B) => {
|
|
58058
|
-
const { width: G, height: j } =
|
|
58056
|
+
const { width: G, height: j } = $i, ne = Math.round(P), T = Math.round(B);
|
|
58059
58057
|
if (ne < 0 || T < 0 || ne >= G || T >= j) return [0, 0, 0, 0];
|
|
58060
58058
|
const F = (T * G + ne) * 4;
|
|
58061
58059
|
return [
|
|
@@ -58082,7 +58080,7 @@ function K3e(e, t, n) {
|
|
|
58082
58080
|
backGain: d && f ? X3e(P, B, d, f) : [1, 1, 1]
|
|
58083
58081
|
});
|
|
58084
58082
|
}
|
|
58085
|
-
const { width: v, height: b } =
|
|
58083
|
+
const { width: v, height: b } = $i, w = o.createTexture();
|
|
58086
58084
|
o.bindTexture(o.TEXTURE_2D, w), o.texImage2D(o.TEXTURE_2D, 0, o.RGBA, v, b, 0, o.RGBA, o.UNSIGNED_BYTE, null), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_MIN_FILTER, o.NEAREST), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_MAG_FILTER, o.NEAREST), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_WRAP_S, o.CLAMP_TO_EDGE), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_WRAP_T, o.CLAMP_TO_EDGE);
|
|
58087
58085
|
const C = o.createRenderbuffer();
|
|
58088
58086
|
o.bindRenderbuffer(o.RENDERBUFFER, C), o.renderbufferStorage(o.RENDERBUFFER, o.DEPTH_COMPONENT16, v, b);
|
|
@@ -58193,8 +58191,8 @@ const J3e = {
|
|
|
58193
58191
|
const s = o(
|
|
58194
58192
|
0,
|
|
58195
58193
|
0,
|
|
58196
|
-
|
|
58197
|
-
|
|
58194
|
+
$i.width,
|
|
58195
|
+
$i.height
|
|
58198
58196
|
), i = o(
|
|
58199
58197
|
fa.x,
|
|
58200
58198
|
fa.y,
|
|
@@ -58684,7 +58682,7 @@ function ou(e) {
|
|
|
58684
58682
|
return o || (o = e(r), t[r] = o), o;
|
|
58685
58683
|
};
|
|
58686
58684
|
}
|
|
58687
|
-
function
|
|
58685
|
+
function Pn(e, t = "") {
|
|
58688
58686
|
let n = typeof e == "string" ? e : e.source, r = { replace: (o, s) => {
|
|
58689
58687
|
let i = typeof s == "string" ? s : s.source;
|
|
58690
58688
|
return i = i.replace(Vo.caret, "$1"), n = n.replace(o, i), r;
|
|
@@ -58697,8 +58695,8 @@ var Mbe = ((e = "") => {
|
|
|
58697
58695
|
} catch {
|
|
58698
58696
|
return !1;
|
|
58699
58697
|
}
|
|
58700
|
-
})(), Vo = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: ou((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: ou((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: ou((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: ou((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: ou((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: ou((e) => new RegExp(`^ {0,${e}}>`)) }, Tbe = /^(?:[ \t]*(?:\n|$))+/, Ibe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Rbe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Vh = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Obe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Gb = / {0,3}(?:[*+-]|\d{1,9}[.)])/, QT = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, eI =
|
|
58701
|
-
]`).replace("lheading", eI).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, $be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Gbe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, nI = /^( {2,}|\\)\n(?!\s*$)/, Wbe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _a = /[\p{P}\p{S}]/u, gd = /[\s\p{P}\p{S}]/u, qh = /[^\s\p{P}\p{S}]/u, Vbe =
|
|
58698
|
+
})(), Vo = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: ou((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: ou((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: ou((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: ou((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: ou((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: ou((e) => new RegExp(`^ {0,${e}}>`)) }, Tbe = /^(?:[ \t]*(?:\n|$))+/, Ibe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Rbe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Vh = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Obe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Gb = / {0,3}(?:[*+-]|\d{1,9}[.)])/, QT = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, eI = Pn(QT).replace(/bull/g, Gb).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Lbe = Pn(QT).replace(/bull/g, Gb).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Wb = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Nbe = /^[^\n]+/, Vb = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pbe = Pn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Vb).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Dbe = Pn(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, Gb).getRegex(), Vm = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", qb = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, zbe = Pn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", qb).replace("tag", Vm).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), tI = (e) => Pn(Wb).replace("hr", Vh).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Vm).getRegex(), Bbe = tI(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Fbe = tI(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Ube = Pn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Fbe).getRegex(), Zb = { blockquote: Ube, code: Ibe, def: Pbe, fences: Rbe, heading: Obe, hr: Vh, html: zbe, lheading: eI, list: Dbe, newline: Tbe, paragraph: Bbe, table: Ul, text: Nbe }, g7 = Pn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Vh).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Vm).getRegex(), Hbe = { ...Zb, lheading: Lbe, table: g7, paragraph: Pn(Wb).replace("hr", Vh).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", g7).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Vm).getRegex() }, jbe = { ...Zb, html: Pn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", qb).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Ul, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: Pn(Wb).replace("hr", Vh).replace("heading", ` *#{1,6} *[^
|
|
58699
|
+
]`).replace("lheading", eI).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, $be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Gbe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, nI = /^( {2,}|\\)\n(?!\s*$)/, Wbe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _a = /[\p{P}\p{S}]/u, gd = /[\s\p{P}\p{S}]/u, qh = /[^\s\p{P}\p{S}]/u, Vbe = Pn(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, gd).getRegex(), qbe = /[\p{Pi}\p{Ps}"']/u, rI = /(?!~)[\p{P}\p{S}]/u, Zbe = /(?!~)[\s\p{P}\p{S}]/u, Xbe = /(?:[^\s\p{P}\p{S}]|~)/u, Ybe = Pn(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Mbe ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), oI = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Kbe = Pn(oI, "u").replace(/punct/g, _a).getRegex(), Jbe = Pn(oI, "u").replace(/punct/g, rI).getRegex(), Qbe = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, e4e = Pn(Qbe, "u").replace(/openQuote/g, qbe).replace(/punct/g, _a).getRegex(), sI = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", t4e = Pn(sI, "gu").replace(/notPunctSpace/g, qh).replace(/punctSpace/g, gd).replace(/punct/g, _a).getRegex(), n4e = Pn(sI, "gu").replace(/notPunctSpace/g, Xbe).replace(/punctSpace/g, Zbe).replace(/punct/g, rI).getRegex(), r4e = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", o4e = Pn(r4e, "gu").replace(/notPunctSpace/g, qh).replace(/punctSpace/g, gd).replace(/punct/g, _a).getRegex(), s4e = Pn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, qh).replace(/punctSpace/g, gd).replace(/punct/g, _a).getRegex(), i4e = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", a4e = Pn(i4e, "gu").replace(/notPunctSpace/g, qh).replace(/punctSpace/g, gd).replace(/punct/g, _a).getRegex(), l4e = Pn(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _a).getRegex(), c4e = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", u4e = Pn(c4e, "gu").replace(/notPunctSpace/g, qh).replace(/punctSpace/g, gd).replace(/punct/g, _a).getRegex(), d4e = Pn(/\\(punct)/, "gu").replace(/punct/g, _a).getRegex(), f4e = Pn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), h4e = Pn(qb).replace("(?:-->|$)", "-->").getRegex(), p4e = Pn("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", h4e).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), $0 = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, m4e = Pn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", $0).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), iI = Pn(/^!?\[(label)\]\[(ref)\]/).replace("label", $0).replace("ref", Vb).getRegex(), aI = Pn(/^!?\[(ref)\](?:\[\])?/).replace("ref", Vb).getRegex(), g4e = Pn("reflink|nolink(?!\\()", "g").replace("reflink", iI).replace("nolink", aI).getRegex(), v7 = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Xb = { _backpedal: Ul, anyPunctuation: d4e, autolink: f4e, blockSkip: Ybe, br: nI, code: Gbe, del: Ul, delLDelim: Ul, delRDelim: Ul, emStrongLDelim: Kbe, emStrongRDelimAst: t4e, emStrongRDelimUnd: s4e, escape: $be, link: m4e, nolink: aI, punctuation: Vbe, reflink: iI, reflinkSearch: g4e, tag: p4e, text: Wbe, url: Ul }, v4e = { ...Xb, emStrongLDelim: e4e, emStrongRDelimAst: o4e, emStrongRDelimUnd: a4e, link: Pn(/^!?\[(label)\]\((.*?)\)/).replace("label", $0).getRegex(), reflink: Pn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", $0).getRegex() }, Sy = { ...Xb, emStrongRDelimAst: n4e, emStrongLDelim: Jbe, delLDelim: l4e, delRDelim: u4e, url: Pn(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", v7).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: Pn(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", v7).getRegex() }, y4e = { ...Sy, br: Pn(nI).replace("{2,}", "*").getRegex(), text: Pn(Sy.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, jp = { normal: Zb, gfm: Hbe, pedantic: jbe }, Kd = { normal: Xb, gfm: Sy, breaks: y4e, pedantic: v4e }, b4e = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, y7 = (e) => b4e[e];
|
|
58702
58700
|
function Pi(e, t) {
|
|
58703
58701
|
if (t) {
|
|
58704
58702
|
if (Vo.escapeTest.test(e)) return e.replace(Vo.escapeReplace, y7);
|
|
@@ -60594,17 +60592,17 @@ async function b6e(e, t, n) {
|
|
|
60594
60592
|
return o.status !== 1 || o.result == null ? null : g6e(o.result);
|
|
60595
60593
|
}
|
|
60596
60594
|
function w6e(e) {
|
|
60597
|
-
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = O(!1), o = O(!1), s = O(""), i = O(null), a = O(null), l = x(() => !!(
|
|
60595
|
+
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = O(!1), o = O(!1), s = O(""), i = O(null), a = O(null), l = x(() => !!(_n(e.cloud) && _n(e.sessionId))), c = x(
|
|
60598
60596
|
() => {
|
|
60599
60597
|
var m, g;
|
|
60600
60598
|
return ((m = a.value) == null ? void 0 : m.fileName) || ((g = i.value) == null ? void 0 : g.doc_name) || "文件详情";
|
|
60601
60599
|
}
|
|
60602
60600
|
);
|
|
60603
60601
|
function u(m) {
|
|
60604
|
-
return `${
|
|
60602
|
+
return `${_n(e.sessionId) ?? ""}-${m}`;
|
|
60605
60603
|
}
|
|
60606
60604
|
async function d(m) {
|
|
60607
|
-
const g =
|
|
60605
|
+
const g = _n(e.cloud), v = _n(e.sessionId);
|
|
60608
60606
|
if (!g || !v || !m) return null;
|
|
60609
60607
|
const b = u(m), w = t.get(b);
|
|
60610
60608
|
if (w) return w;
|
|
@@ -60629,7 +60627,7 @@ function w6e(e) {
|
|
|
60629
60627
|
await h(g);
|
|
60630
60628
|
}
|
|
60631
60629
|
async function h(m) {
|
|
60632
|
-
const g =
|
|
60630
|
+
const g = _n(e.cloud);
|
|
60633
60631
|
if (g) {
|
|
60634
60632
|
i.value = m, a.value = null, s.value = "", o.value = !0, r.value = !0;
|
|
60635
60633
|
try {
|
|
@@ -61557,7 +61555,7 @@ function W5e(e) {
|
|
|
61557
61555
|
(t) => {
|
|
61558
61556
|
D7 || (P5e({
|
|
61559
61557
|
appId: G5e,
|
|
61560
|
-
version: "1.3.
|
|
61558
|
+
version: "1.3.73",
|
|
61561
61559
|
env: "web",
|
|
61562
61560
|
auth: z7(t),
|
|
61563
61561
|
endpoint: () => Yo(CI, e().cloudPrefix),
|
|
@@ -62495,8 +62493,8 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62495
62493
|
dialogOpen: ft,
|
|
62496
62494
|
loading: Nt,
|
|
62497
62495
|
error: dn,
|
|
62498
|
-
reference:
|
|
62499
|
-
fileDetail:
|
|
62496
|
+
reference: En,
|
|
62497
|
+
fileDetail: Rn,
|
|
62500
62498
|
openFromRefIndex: xt
|
|
62501
62499
|
} = w6e({
|
|
62502
62500
|
cloud: ln,
|
|
@@ -62521,7 +62519,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62521
62519
|
() => hS(s.skillUi.value, r.skillUi)
|
|
62522
62520
|
), zr = x(
|
|
62523
62521
|
() => r.bentoShellUrl ?? s.bentoShellUrl.value
|
|
62524
|
-
),
|
|
62522
|
+
), Dn = x(() => {
|
|
62525
62523
|
var L;
|
|
62526
62524
|
return {
|
|
62527
62525
|
...r.senderConfig,
|
|
@@ -62615,7 +62613,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62615
62613
|
function cn(L) {
|
|
62616
62614
|
Ae.value = L, o("update:model", L);
|
|
62617
62615
|
}
|
|
62618
|
-
function
|
|
62616
|
+
function Ln(L) {
|
|
62619
62617
|
ae.value = Ds(L), o("update:mode", ae.value);
|
|
62620
62618
|
}
|
|
62621
62619
|
function Kt(L) {
|
|
@@ -62635,10 +62633,10 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62635
62633
|
lastIndex: H
|
|
62636
62634
|
}));
|
|
62637
62635
|
}
|
|
62638
|
-
function
|
|
62636
|
+
function On(L) {
|
|
62639
62637
|
return L || r.model || Ae.value || r.senderConfig.model || void 0;
|
|
62640
62638
|
}
|
|
62641
|
-
function
|
|
62639
|
+
function kn(L) {
|
|
62642
62640
|
return Ds(
|
|
62643
62641
|
L ?? r.mode ?? ae.value ?? r.senderConfig.mode
|
|
62644
62642
|
);
|
|
@@ -62742,9 +62740,9 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62742
62740
|
H != null && H.chat && at(
|
|
62743
62741
|
{
|
|
62744
62742
|
payload: L,
|
|
62745
|
-
model:
|
|
62743
|
+
model: On(L.model),
|
|
62746
62744
|
reasoningEffort: L.reasoningEffort,
|
|
62747
|
-
mode:
|
|
62745
|
+
mode: kn(L.mode),
|
|
62748
62746
|
sessionId: vn(H),
|
|
62749
62747
|
messageId: we(H),
|
|
62750
62748
|
input: [L.modelInput]
|
|
@@ -62839,12 +62837,12 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62839
62837
|
() => !!(fe.value || $e.value) || Tc.value
|
|
62840
62838
|
), wl = x(
|
|
62841
62839
|
() => fe.value || $e.value ? "editing" : "generating"
|
|
62842
|
-
),
|
|
62840
|
+
), Xi = x(() => {
|
|
62843
62841
|
const L = a.value[f.value];
|
|
62844
62842
|
return (L == null ? void 0 : L.role) === "assistant" ? L.created_at : void 0;
|
|
62845
62843
|
}), Ii = x(() => {
|
|
62846
62844
|
if (wl.value !== "generating") return "";
|
|
62847
|
-
const L = Wj(
|
|
62845
|
+
const L = Wj(Xi.value, We.value), H = Math.max(
|
|
62848
62846
|
I1(L),
|
|
62849
62847
|
Ne.value + tt.value
|
|
62850
62848
|
);
|
|
@@ -62906,7 +62904,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62906
62904
|
src: L.src
|
|
62907
62905
|
});
|
|
62908
62906
|
}
|
|
62909
|
-
if (L.type === "submit" && L.source === "follow-up" && ((H = L.value) != null && H.trim()) && Io(Q2(L.value.trim(), [], { mode:
|
|
62907
|
+
if (L.type === "submit" && L.source === "follow-up" && ((H = L.value) != null && H.trim()) && Io(Q2(L.value.trim(), [], { mode: kn() })), L.type === "submit" && L.source === "ask-user" && ((pe = L.answers) != null && pe.length)) {
|
|
62910
62908
|
const Ye = kl(L), Pt = { ...L, label: Ye }, It = [...a.value];
|
|
62911
62909
|
L.toolCallId ? It.some(
|
|
62912
62910
|
(jn) => jn.role === "tool" && jn.tool_call_id === L.toolCallId
|
|
@@ -62927,8 +62925,8 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62927
62925
|
const Un = [hW(L.toolCallId, L.answers)];
|
|
62928
62926
|
at(
|
|
62929
62927
|
{
|
|
62930
|
-
model:
|
|
62931
|
-
mode:
|
|
62928
|
+
model: On(),
|
|
62929
|
+
mode: kn(),
|
|
62932
62930
|
sessionId: vn(Qt),
|
|
62933
62931
|
input: Un
|
|
62934
62932
|
},
|
|
@@ -62953,9 +62951,9 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62953
62951
|
for (let jn = a.value.length - 1; jn >= 0; jn -= 1) {
|
|
62954
62952
|
const Xn = a.value[jn];
|
|
62955
62953
|
if (!((Xn == null ? void 0 : Xn.role) !== "assistant" || !((Qt = Xn.tool_calls) != null && Qt.length))) {
|
|
62956
|
-
for (const
|
|
62957
|
-
if (
|
|
62958
|
-
const So = (Un = hd(
|
|
62954
|
+
for (const Sn of Xn.tool_calls)
|
|
62955
|
+
if (Sn.id === L.toolCallId && _s(Sn.function.name)) {
|
|
62956
|
+
const So = (Un = hd(Sn)) == null ? void 0 : Un.questions;
|
|
62959
62957
|
if (So != null && So.length)
|
|
62960
62958
|
return Ou(So, L.answers).trim();
|
|
62961
62959
|
}
|
|
@@ -62964,9 +62962,9 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
62964
62962
|
for (let jn = a.value.length - 1; jn >= 0; jn -= 1) {
|
|
62965
62963
|
const Xn = a.value[jn];
|
|
62966
62964
|
if ((Xn == null ? void 0 : Xn.role) !== "assistant") continue;
|
|
62967
|
-
const
|
|
62968
|
-
if (
|
|
62969
|
-
return Ou(
|
|
62965
|
+
const Sn = N1(Xn.tool_calls);
|
|
62966
|
+
if (Sn != null && Sn.payload.questions.length)
|
|
62967
|
+
return Ou(Sn.payload.questions, L.answers).trim();
|
|
62970
62968
|
}
|
|
62971
62969
|
return "";
|
|
62972
62970
|
}
|
|
@@ -63002,26 +63000,26 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63002
63000
|
const Xn = Q2(T0(Un.content), [], {
|
|
63003
63001
|
mentions: Un.mentions,
|
|
63004
63002
|
resourceFiles: Un.resource_files,
|
|
63005
|
-
attachmentInput:
|
|
63006
|
-
model:
|
|
63007
|
-
mode:
|
|
63003
|
+
attachmentInput: Dn.value.attachmentInput,
|
|
63004
|
+
model: On(),
|
|
63005
|
+
mode: kn(),
|
|
63008
63006
|
reasoningEffort: (Ir = V.value) == null ? void 0 : Ir.reasoningEffort,
|
|
63009
63007
|
sceneId: (jr = V.value) == null ? void 0 : jr.sceneId
|
|
63010
63008
|
});
|
|
63011
63009
|
V.value = Xn, o("send", Xn);
|
|
63012
|
-
const
|
|
63013
|
-
|
|
63010
|
+
const Sn = ln.value;
|
|
63011
|
+
Sn != null && Sn.chat && at(
|
|
63014
63012
|
{
|
|
63015
63013
|
payload: Xn,
|
|
63016
|
-
model:
|
|
63014
|
+
model: On(Xn.model),
|
|
63017
63015
|
reasoningEffort: Xn.reasoningEffort,
|
|
63018
|
-
mode:
|
|
63019
|
-
sessionId: vn(
|
|
63016
|
+
mode: kn(Xn.mode),
|
|
63017
|
+
sessionId: vn(Sn),
|
|
63020
63018
|
messageId: It,
|
|
63021
63019
|
messageMode: "edit",
|
|
63022
63020
|
input: [Xn.modelInput]
|
|
63023
63021
|
},
|
|
63024
|
-
|
|
63022
|
+
Sn
|
|
63025
63023
|
).catch(() => {
|
|
63026
63024
|
});
|
|
63027
63025
|
}
|
|
@@ -63047,7 +63045,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63047
63045
|
E.value = L, _.value = null, N.value = !1;
|
|
63048
63046
|
}, !0), o("file-preview", L));
|
|
63049
63047
|
}
|
|
63050
|
-
function
|
|
63048
|
+
function Yi(L, H) {
|
|
63051
63049
|
var pe;
|
|
63052
63050
|
for (let Ye = L.length - 1; Ye >= 0; Ye -= 1) {
|
|
63053
63051
|
const Pt = L[Ye];
|
|
@@ -63060,7 +63058,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63060
63058
|
return -1;
|
|
63061
63059
|
}
|
|
63062
63060
|
async function ms(L, H = {}, pe) {
|
|
63063
|
-
var Tl, Il, Rl, ep, tp, np, rp, op,
|
|
63061
|
+
var Tl, Il, Rl, ep, tp, np, rp, op, ea;
|
|
63064
63062
|
let Ye = pe ?? Ee();
|
|
63065
63063
|
const Pt = Pe.get(Ye);
|
|
63066
63064
|
if (Pt != null && Pt.controller)
|
|
@@ -63078,21 +63076,21 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63078
63076
|
function Qt() {
|
|
63079
63077
|
return It() ? a.value : Pe.ensure(Ye).messages;
|
|
63080
63078
|
}
|
|
63081
|
-
function Un(
|
|
63082
|
-
It() ? Jn(
|
|
63079
|
+
function Un(Nn, fr = -1) {
|
|
63080
|
+
It() ? Jn(Nn, fr) : Pe.ensure(Ye).messages = Nn;
|
|
63083
63081
|
}
|
|
63084
|
-
function jn(
|
|
63082
|
+
function jn(Nn) {
|
|
63085
63083
|
const fr = Pe.ensure(Ye), Jr = fr.status;
|
|
63086
|
-
fr.status =
|
|
63084
|
+
fr.status = Nn, It() ? c.value = Nn : (o("status-change", Nn, Ye), Jr === "streaming" && Nn === "completed" && Is(Ye));
|
|
63087
63085
|
}
|
|
63088
|
-
function Xn(
|
|
63089
|
-
It() ? u.value =
|
|
63086
|
+
function Xn(Nn) {
|
|
63087
|
+
It() ? u.value = Nn : Pe.ensure(Ye).response = Nn;
|
|
63090
63088
|
}
|
|
63091
|
-
function
|
|
63092
|
-
It() ? d.value =
|
|
63089
|
+
function Sn(Nn) {
|
|
63090
|
+
It() ? d.value = Nn : Pe.ensure(Ye).error = Nn;
|
|
63093
63091
|
}
|
|
63094
|
-
function So(
|
|
63095
|
-
It() ? f.value =
|
|
63092
|
+
function So(Nn) {
|
|
63093
|
+
It() ? f.value = Nn : Pe.ensure(Ye).streamingMessageIndex = Nn;
|
|
63096
63094
|
}
|
|
63097
63095
|
const po = Pe.ensure(Ye);
|
|
63098
63096
|
po.generation += 1;
|
|
@@ -63105,10 +63103,10 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63105
63103
|
protocol: Al != null && Al.chat ? Yl(Al) : "host",
|
|
63106
63104
|
sessionId: () => Ye,
|
|
63107
63105
|
resumed: H.resumeLastAssistant === !0
|
|
63108
|
-
}), xd = (
|
|
63109
|
-
fr && (_l = fr), !(!
|
|
63110
|
-
}, Ra = Qt(), Li = Ra.at(-1), Sd = H.continueAssistantToolCallId, El = !Sd && H.resumeLastAssistant === !0 && (Li == null ? void 0 : Li.role) === "tool" ? Li.tool_call_id : void 0, zc = Sd ?? El, Bc = zc ?
|
|
63111
|
-
So(Xs), jn("streaming"), Xn(null),
|
|
63106
|
+
}), xd = (Nn, fr) => {
|
|
63107
|
+
fr && (_l = fr), !(!Nn || Nn === Ye) && (It() ? St(Nn) : Pe.renameKey(Ye, Nn), Ye = Nn);
|
|
63108
|
+
}, Ra = Qt(), Li = Ra.at(-1), Sd = H.continueAssistantToolCallId, El = !Sd && H.resumeLastAssistant === !0 && (Li == null ? void 0 : Li.role) === "tool" ? Li.tool_call_id : void 0, zc = Sd ?? El, Bc = zc ? Yi(Ra, zc) : -1, Ml = Bc >= 0 && ((Tl = Ra[Bc]) == null ? void 0 : Tl.role) === "assistant" ? Ra[Bc] : null, Oa = Ml && El && zI(Ml, El) ? D1e(Ml, El) : Ml, Cd = !Oa && H.resumeLastAssistant === !0 && (Li == null ? void 0 : Li.role) === "assistant", Xs = Oa ? Bc : Cd ? Ra.length - 1 : Ra.length;
|
|
63109
|
+
So(Xs), jn("streaming"), Xn(null), Sn(null), !Cd && !Oa && Un([...Qt(), { role: "assistant" }]), Pe.enforceLimits(Ee(), Mt);
|
|
63112
63110
|
const _d = () => jr.abort();
|
|
63113
63111
|
(Il = H.signal) == null || Il.addEventListener("abort", _d, { once: !0 }), (Rl = H.signal) != null && Rl.aborted && _d();
|
|
63114
63112
|
const Fc = () => {
|
|
@@ -63124,11 +63122,11 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63124
63122
|
Un(fr);
|
|
63125
63123
|
};
|
|
63126
63124
|
try {
|
|
63127
|
-
const
|
|
63125
|
+
const Nn = await L;
|
|
63128
63126
|
if (po.generation !== Ir || jr.signal.aborted) return;
|
|
63129
|
-
const fr = (ep =
|
|
63127
|
+
const fr = (ep = Nn.headers.get("x-chat-session-id")) == null ? void 0 : ep.trim(), Jr = (tp = Nn.headers.get("x-chat-message-id")) == null ? void 0 : tp.trim();
|
|
63130
63128
|
(fr || Jr) && xd(fr || void 0, Jr || void 0);
|
|
63131
|
-
const Qo = P1e(
|
|
63129
|
+
const Qo = P1e(Nn, {
|
|
63132
63130
|
signal: jr.signal,
|
|
63133
63131
|
replay: H.replay,
|
|
63134
63132
|
onUpdate(hr, fi) {
|
|
@@ -63148,13 +63146,13 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63148
63146
|
const Ns = await Qo;
|
|
63149
63147
|
if (po.generation !== Ir) return;
|
|
63150
63148
|
Xn(Ns.response), jn(Ns.status), Fc();
|
|
63151
|
-
} catch (
|
|
63149
|
+
} catch (Nn) {
|
|
63152
63150
|
if (po.generation !== Ir) return;
|
|
63153
63151
|
if (jr.signal.aborted) {
|
|
63154
63152
|
jn("aborted"), Fc();
|
|
63155
63153
|
return;
|
|
63156
63154
|
}
|
|
63157
|
-
const fr =
|
|
63155
|
+
const fr = Nn instanceof Error ? Nn : new Error(String(Nn)), Jr = ln.value, Qo = !H.suppressAutoResume && !Jo && !!(Jr != null && Jr.chat) && ((rp = Jr == null ? void 0 : Jr.chat) == null ? void 0 : rp.resumeEnabled) !== !1 && (k0e(fr) || g1(fr)) && !!Ye && Ye !== Qd, Ns = $m(fr);
|
|
63158
63156
|
if (Ia.report("对话流式中断", {
|
|
63159
63157
|
kind: Ns.kind,
|
|
63160
63158
|
code: Ns.code ?? ((op = Ns.status) == null ? void 0 : op.toString()) ?? "none",
|
|
@@ -63182,9 +63180,9 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63182
63180
|
}
|
|
63183
63181
|
if (H.suppressAutoResume) throw fr;
|
|
63184
63182
|
const hr = w0e(fr);
|
|
63185
|
-
throw
|
|
63183
|
+
throw Sn(hr.error), jn("error"), Fc(), o("response-error", hr.error, hr.info), hr.error;
|
|
63186
63184
|
} finally {
|
|
63187
|
-
Ia.stop(), (
|
|
63185
|
+
Ia.stop(), (ea = H.signal) == null || ea.removeEventListener("abort", _d), po.generation === Ir && (po.controller = null, So(-1)), Pe.enforceLimits(Ee(), Mt);
|
|
63188
63186
|
}
|
|
63189
63187
|
}
|
|
63190
63188
|
async function Nc(L, H = {}) {
|
|
@@ -63196,9 +63194,9 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63196
63194
|
await at(
|
|
63197
63195
|
{
|
|
63198
63196
|
payload: H.payload,
|
|
63199
|
-
model: H.model ??
|
|
63197
|
+
model: H.model ?? On(),
|
|
63200
63198
|
reasoningEffort: H.reasoningEffort ?? ((Pt = H.payload) == null ? void 0 : Pt.reasoningEffort),
|
|
63201
|
-
mode: H.mode ??
|
|
63199
|
+
mode: H.mode ?? kn((It = H.payload) == null ? void 0 : It.mode),
|
|
63202
63200
|
sessionId: Ye,
|
|
63203
63201
|
input: H.input ?? L
|
|
63204
63202
|
},
|
|
@@ -63224,7 +63222,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63224
63222
|
function bd(L) {
|
|
63225
63223
|
return !!L.hasSession;
|
|
63226
63224
|
}
|
|
63227
|
-
function
|
|
63225
|
+
function Ki(L, H) {
|
|
63228
63226
|
if (!L) return H;
|
|
63229
63227
|
if (!H) return L;
|
|
63230
63228
|
if (typeof AbortSignal.any == "function") return AbortSignal.any([L, H]);
|
|
@@ -63324,25 +63322,25 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63324
63322
|
const jr = Ir;
|
|
63325
63323
|
typeof jr.message_id == "string" && jr.message_id.trim() && (Un = jr.message_id.trim()), typeof jr.last_id == "string" && jr.last_id && (jn = jr.last_id);
|
|
63326
63324
|
}
|
|
63327
|
-
const
|
|
63325
|
+
const Sn = B6e(It[It.length - 1]) ? new Response(null, { status: 200, headers: { "Content-Type": "text/event-stream" } }) : vI(
|
|
63328
63326
|
L,
|
|
63329
63327
|
Un ? { message_id: Un, last_id: jn } : { session_id: Pt, last_id: jn },
|
|
63330
63328
|
pe.signal
|
|
63331
63329
|
);
|
|
63332
|
-
return await ms(
|
|
63330
|
+
return await ms(Sn, { ...pe, replay: Qt, resumeLastAssistant: !0 }, Ye), !0;
|
|
63333
63331
|
}
|
|
63334
63332
|
async function Ue(L, H = {}) {
|
|
63335
|
-
var Xn,
|
|
63333
|
+
var Xn, Sn, So;
|
|
63336
63334
|
const pe = ln.value;
|
|
63337
63335
|
if (!(pe != null && pe.chat))
|
|
63338
63336
|
throw new Error("ChatBot.resumeFromLastSession() requires `cloud.chat` to be configured.");
|
|
63339
63337
|
const Ye = String(L.ga_session_id ?? "").trim(), Pt = Ee(), It = Ye && (Ye === Pt || (Xn = Pe.get(Ye)) != null && Xn.synced) ? Ye : Pt, Qt = Ye || Pt;
|
|
63340
63338
|
if (rn(It) || Qt !== It && rn(Qt))
|
|
63341
|
-
return (
|
|
63339
|
+
return (Sn = H.onStarted) == null || Sn.call(H), !0;
|
|
63342
63340
|
(So = ue.get(Qt)) == null || So.abort();
|
|
63343
63341
|
const Un = new AbortController();
|
|
63344
63342
|
ue.set(Qt, Un);
|
|
63345
|
-
const jn =
|
|
63343
|
+
const jn = Ki(H.signal, Un.signal);
|
|
63346
63344
|
try {
|
|
63347
63345
|
return Yl(pe) === "generic-responses" ? await Ce(
|
|
63348
63346
|
pe,
|
|
@@ -63370,7 +63368,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63370
63368
|
function nn() {
|
|
63371
63369
|
Ve({ notifyServer: !1 }), c.value = "idle", d.value = null, u.value = null, EK();
|
|
63372
63370
|
}
|
|
63373
|
-
function
|
|
63371
|
+
function xn(L) {
|
|
63374
63372
|
nn(), Ho({ animate: !1 }), se.value = [];
|
|
63375
63373
|
const H = sr(L);
|
|
63376
63374
|
Jn(H), qn(H), wt();
|
|
@@ -63415,7 +63413,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63415
63413
|
const pe = P;
|
|
63416
63414
|
P = !1, Abe(L, H, pe);
|
|
63417
63415
|
}
|
|
63418
|
-
function
|
|
63416
|
+
function Ji(L, H) {
|
|
63419
63417
|
const pe = P;
|
|
63420
63418
|
P = !1, Ebe(L, H, pe);
|
|
63421
63419
|
}
|
|
@@ -63459,7 +63457,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63459
63457
|
}
|
|
63460
63458
|
});
|
|
63461
63459
|
const Kr = x(() => {
|
|
63462
|
-
const L =
|
|
63460
|
+
const L = Dn.value;
|
|
63463
63461
|
return !(L.showAttachment === !1 || L.disabled);
|
|
63464
63462
|
});
|
|
63465
63463
|
function ho() {
|
|
@@ -63520,7 +63518,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63520
63518
|
const H = L.relatedTarget;
|
|
63521
63519
|
H && ((pe = h.value) != null && pe.contains(H)) || ho();
|
|
63522
63520
|
}
|
|
63523
|
-
function
|
|
63521
|
+
function Qi(L) {
|
|
63524
63522
|
if (!Kr.value) return;
|
|
63525
63523
|
const H = oy(L.dataTransfer);
|
|
63526
63524
|
H.length !== 0 && (L.preventDefault(), L.stopPropagation(), ho(), gs(H));
|
|
@@ -63547,7 +63545,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63547
63545
|
useSkillShortcut: kd,
|
|
63548
63546
|
useConnectorShortcut: Dc,
|
|
63549
63547
|
getSender: rg,
|
|
63550
|
-
setMessages:
|
|
63548
|
+
setMessages: xn,
|
|
63551
63549
|
getSessionId: Ze,
|
|
63552
63550
|
setSessionId: bt,
|
|
63553
63551
|
renameSessionId: le,
|
|
@@ -63573,7 +63571,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63573
63571
|
onDragenter: og,
|
|
63574
63572
|
onDragoverCapture: sg,
|
|
63575
63573
|
onDragleave: Qh,
|
|
63576
|
-
onDropCapture:
|
|
63574
|
+
onDropCapture: Qi
|
|
63577
63575
|
}, [
|
|
63578
63576
|
un.value ? (y(), he(PM, { key: 0 })) : X("", !0),
|
|
63579
63577
|
S("div", P8e, [
|
|
@@ -63717,7 +63715,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63717
63715
|
ve(Ope, as({
|
|
63718
63716
|
ref_key: "senderRef",
|
|
63719
63717
|
ref: m
|
|
63720
|
-
},
|
|
63718
|
+
}, Dn.value, {
|
|
63721
63719
|
"enable-file-drop": !1,
|
|
63722
63720
|
compact: Me.value,
|
|
63723
63721
|
onSend: Io,
|
|
@@ -63725,7 +63723,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63725
63723
|
onStop: Ot,
|
|
63726
63724
|
"onUpdate:draft": H[2] || (H[2] = (pe) => o("update:draft", pe)),
|
|
63727
63725
|
"onUpdate:model": cn,
|
|
63728
|
-
"onUpdate:mode":
|
|
63726
|
+
"onUpdate:mode": Ln,
|
|
63729
63727
|
"onUpdate:attachments": H[3] || (H[3] = (pe) => o("update:attachments", pe)),
|
|
63730
63728
|
onAttachmentError: H[4] || (H[4] = (pe, Ye) => o("attachment-error", pe, Ye)),
|
|
63731
63729
|
onVoiceClick: H[5] || (H[5] = (pe) => o("voice-click")),
|
|
@@ -63785,7 +63783,7 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63785
63783
|
ve(Ss, {
|
|
63786
63784
|
css: !1,
|
|
63787
63785
|
onEnter: fo,
|
|
63788
|
-
onLeave:
|
|
63786
|
+
onLeave: Ji
|
|
63789
63787
|
}, {
|
|
63790
63788
|
default: qe(() => [
|
|
63791
63789
|
T.value ? (y(), k("div", {
|
|
@@ -63885,8 +63883,8 @@ const N8e = ["data-chat-color-mode"], P8e = { class: "chat-bot__main" }, D8e = [
|
|
|
63885
63883
|
title: "文件详情",
|
|
63886
63884
|
loading: $(Nt),
|
|
63887
63885
|
error: $(dn),
|
|
63888
|
-
"file-detail": $(
|
|
63889
|
-
reference: $(
|
|
63886
|
+
"file-detail": $(Rn),
|
|
63887
|
+
reference: $(En)
|
|
63890
63888
|
}, null, 8, ["modelValue", "loading", "error", "file-detail", "reference"])
|
|
63891
63889
|
], 46, N8e));
|
|
63892
63890
|
}
|
|
@@ -64355,7 +64353,7 @@ function iwe(e) {
|
|
|
64355
64353
|
return xe(
|
|
64356
64354
|
() => {
|
|
64357
64355
|
var de;
|
|
64358
|
-
const V = (de =
|
|
64356
|
+
const V = (de = _n(e.activeSessionId)) == null ? void 0 : de.trim();
|
|
64359
64357
|
if (!V) return null;
|
|
64360
64358
|
const se = w(V);
|
|
64361
64359
|
return se ? { id: se.id, status: se.status } : null;
|
|
@@ -66666,7 +66664,7 @@ const pwe = /* @__PURE__ */ Re({
|
|
|
66666
66664
|
]),
|
|
66667
66665
|
_: 1
|
|
66668
66666
|
})) : X("", !0),
|
|
66669
|
-
(y(), he(
|
|
66667
|
+
(y(), he(Gi, { to: "body" }, [
|
|
66670
66668
|
c.value ? (y(), k("div", {
|
|
66671
66669
|
key: 0,
|
|
66672
66670
|
ref_key: "spaceMenuRef",
|
|
@@ -66783,7 +66781,7 @@ const pwe = /* @__PURE__ */ Re({
|
|
|
66783
66781
|
}, 8, ["modelValue", "title"])
|
|
66784
66782
|
], 512));
|
|
66785
66783
|
}
|
|
66786
|
-
}), U7e = /* @__PURE__ */ Xe(F7e, [["__scopeId", "data-v-
|
|
66784
|
+
}), U7e = /* @__PURE__ */ Xe(F7e, [["__scopeId", "data-v-66078e3d"]]);
|
|
66787
66785
|
function Z7() {
|
|
66788
66786
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
66789
66787
|
}
|
|
@@ -67323,12 +67321,12 @@ const G7e = ["data-chat-color-mode"], W7e = { class: "chat-app__chat" }, V7e = {
|
|
|
67323
67321
|
function dn(be) {
|
|
67324
67322
|
i("nav-select", be), be === "new" && st();
|
|
67325
67323
|
}
|
|
67326
|
-
const
|
|
67324
|
+
const En = x(
|
|
67327
67325
|
() => {
|
|
67328
67326
|
var be;
|
|
67329
67327
|
return (be = r.cloud.auth) != null && be.token ? gS(r.cloud) : void 0;
|
|
67330
67328
|
}
|
|
67331
|
-
),
|
|
67329
|
+
), Rn = [
|
|
67332
67330
|
{ id: "type-2", label: "公开", params: { type: 2 } },
|
|
67333
67331
|
{ id: "type-1", label: "校内", params: { type: 1 } },
|
|
67334
67332
|
{ id: "type-0", label: "个人", params: { type: 0 } }
|
|
@@ -67343,24 +67341,24 @@ const G7e = ["data-chat-color-mode"], W7e = { class: "chat-app__chat" }, V7e = {
|
|
|
67343
67341
|
mode: !0,
|
|
67344
67342
|
expert: !1,
|
|
67345
67343
|
skill: !0,
|
|
67346
|
-
knowledge: { groups:
|
|
67344
|
+
knowledge: { groups: Rn, width: X7 },
|
|
67347
67345
|
screenshot: !1
|
|
67348
67346
|
},
|
|
67349
67347
|
showAgentModeChip: !(nr.value && Gt.value)
|
|
67350
67348
|
})), cr = x(
|
|
67351
|
-
() => !!
|
|
67349
|
+
() => !!En.value && v.value.length === 0 && xt.value
|
|
67352
67350
|
), {
|
|
67353
67351
|
activeCategory: zr,
|
|
67354
|
-
skillTabs:
|
|
67352
|
+
skillTabs: Dn,
|
|
67355
67353
|
typesLoading: St,
|
|
67356
67354
|
panelLoading: le,
|
|
67357
67355
|
panelLoadingMore: Ze,
|
|
67358
67356
|
panelHasMore: bt,
|
|
67359
67357
|
panelCardModels: cn,
|
|
67360
|
-
panelInitialized:
|
|
67358
|
+
panelInitialized: Ln,
|
|
67361
67359
|
loadMorePanel: Kt
|
|
67362
67360
|
} = Qx({
|
|
67363
|
-
fetchConfig:
|
|
67361
|
+
fetchConfig: En,
|
|
67364
67362
|
enabled: cr,
|
|
67365
67363
|
panelPageSize: ((uo = (vn = r.cloud.skills) == null ? void 0 : vn.params) == null ? void 0 : uo.size) ?? 12
|
|
67366
67364
|
});
|
|
@@ -67372,11 +67370,11 @@ const G7e = ["data-chat-color-mode"], W7e = { class: "chat-app__chat" }, V7e = {
|
|
|
67372
67370
|
var it;
|
|
67373
67371
|
(it = m.value) == null || it.useSkillShortcut(be, De), i("skill-shortcut", be);
|
|
67374
67372
|
}
|
|
67375
|
-
function
|
|
67373
|
+
function On(be) {
|
|
67376
67374
|
var De;
|
|
67377
67375
|
(De = m.value) == null || De.useConnectorShortcut(be);
|
|
67378
67376
|
}
|
|
67379
|
-
function
|
|
67377
|
+
function kn() {
|
|
67380
67378
|
var be;
|
|
67381
67379
|
return ((be = m.value) == null ? void 0 : be.getSender()) ?? null;
|
|
67382
67380
|
}
|
|
@@ -67387,8 +67385,8 @@ const G7e = ["data-chat-color-mode"], W7e = { class: "chat-app__chat" }, V7e = {
|
|
|
67387
67385
|
selectSession: mt,
|
|
67388
67386
|
useSkill: qn,
|
|
67389
67387
|
useSkillShortcut: ur,
|
|
67390
|
-
useConnectorShortcut:
|
|
67391
|
-
getSender:
|
|
67388
|
+
useConnectorShortcut: On,
|
|
67389
|
+
getSender: kn
|
|
67392
67390
|
}), (be, De) => (y(), k("div", {
|
|
67393
67391
|
class: "chat-app",
|
|
67394
67392
|
"data-chat-color-mode": s.value
|
|
@@ -67557,18 +67555,18 @@ const G7e = ["data-chat-color-mode"], W7e = { class: "chat-app__chat" }, V7e = {
|
|
|
67557
67555
|
"sender-append": qe(() => [
|
|
67558
67556
|
nr.value ? (y(), k("div", K7e, [
|
|
67559
67557
|
ut(be.$slots, "empty-extra", {}, () => [
|
|
67560
|
-
|
|
67558
|
+
En.value ? (y(), he(DM, {
|
|
67561
67559
|
key: 0,
|
|
67562
67560
|
"active-category": $(zr),
|
|
67563
67561
|
"onUpdate:activeCategory": De[6] || (De[6] = (it) => Py(zr) ? zr.value = it : null),
|
|
67564
67562
|
class: "chat-app__skill-panel",
|
|
67565
|
-
tabs: $(
|
|
67563
|
+
tabs: $(Dn),
|
|
67566
67564
|
"card-models": $(cn),
|
|
67567
67565
|
loading: $(le),
|
|
67568
67566
|
"types-loading": $(St),
|
|
67569
67567
|
"loading-more": $(Ze),
|
|
67570
67568
|
"has-more": $(bt),
|
|
67571
|
-
initialized: $(
|
|
67569
|
+
initialized: $(Ln),
|
|
67572
67570
|
"show-empty": "",
|
|
67573
67571
|
onUse: qn,
|
|
67574
67572
|
onShortcut: ur,
|
|
@@ -67627,7 +67625,7 @@ const G7e = ["data-chat-color-mode"], W7e = { class: "chat-app__chat" }, V7e = {
|
|
|
67627
67625
|
], 512)
|
|
67628
67626
|
], 8, G7e));
|
|
67629
67627
|
}
|
|
67630
|
-
}), zEe = /* @__PURE__ */ Xe(e9e, [["__scopeId", "data-v-
|
|
67628
|
+
}), zEe = /* @__PURE__ */ Xe(e9e, [["__scopeId", "data-v-f52721f2"]]), t9e = ["data-chat-color-mode"], n9e = /* @__PURE__ */ Re({
|
|
67631
67629
|
name: "ChatProvider",
|
|
67632
67630
|
__name: "ChatProvider",
|
|
67633
67631
|
props: {
|
|
@@ -71284,7 +71282,7 @@ export {
|
|
|
71284
71282
|
VI as Q,
|
|
71285
71283
|
am as R,
|
|
71286
71284
|
LM as S,
|
|
71287
|
-
|
|
71285
|
+
qi as T,
|
|
71288
71286
|
BEe as U,
|
|
71289
71287
|
h3e as V,
|
|
71290
71288
|
lbe as W,
|
|
@@ -71710,7 +71708,7 @@ export {
|
|
|
71710
71708
|
KK as gp,
|
|
71711
71709
|
Vme as h,
|
|
71712
71710
|
D0 as i,
|
|
71713
|
-
|
|
71711
|
+
ji as j,
|
|
71714
71712
|
gAe as k,
|
|
71715
71713
|
dEe as l,
|
|
71716
71714
|
K2 as m,
|