@tenancy.nz/chat-ui 0.1.50 → 0.1.51
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/dist/esm/index.js +395 -399
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -84,10 +84,10 @@ function Hw() {
|
|
|
84
84
|
De.unshift("Warning: " + V), Function.prototype.apply.call(console[R], console, De);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
var
|
|
87
|
+
var T = !1, C = !1, k = !1, O = !1, z = !1, F;
|
|
88
88
|
F = Symbol.for("react.module.reference");
|
|
89
89
|
function I(R) {
|
|
90
|
-
return !!(typeof R == "string" || typeof R == "function" || R === i || R === s || z || R === r || R === u || R === h || O || R === p ||
|
|
90
|
+
return !!(typeof R == "string" || typeof R == "function" || R === i || R === s || z || R === r || R === u || R === h || O || R === p || T || C || k || typeof R == "object" && R !== null && (R.$$typeof === f || R.$$typeof === d || R.$$typeof === o || R.$$typeof === a || R.$$typeof === l || // This needs to include all possible module reference object
|
|
91
91
|
// types supported by any Flight configuration anywhere since
|
|
92
92
|
// we don't know which Flight build this will end up being used
|
|
93
93
|
// with.
|
|
@@ -647,7 +647,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
647
647
|
}()), uc;
|
|
648
648
|
}
|
|
649
649
|
process.env.NODE_ENV === "production" ? pp.exports = $w() : pp.exports = Hw();
|
|
650
|
-
var
|
|
650
|
+
var P = pp.exports;
|
|
651
651
|
class Od extends Error {
|
|
652
652
|
constructor(t) {
|
|
653
653
|
super(t.message);
|
|
@@ -716,8 +716,8 @@ function Ww(n = {}) {
|
|
|
716
716
|
body: b
|
|
717
717
|
});
|
|
718
718
|
if ((g.status === 429 || g.status >= 500) && f < u) {
|
|
719
|
-
const
|
|
720
|
-
await new Promise((C) => setTimeout(C,
|
|
719
|
+
const T = h * Math.pow(2, f - 1);
|
|
720
|
+
await new Promise((C) => setTimeout(C, T));
|
|
721
721
|
continue;
|
|
722
722
|
}
|
|
723
723
|
throw E;
|
|
@@ -793,7 +793,7 @@ function Ww(n = {}) {
|
|
|
793
793
|
});
|
|
794
794
|
},
|
|
795
795
|
async chatStream(o, a, l) {
|
|
796
|
-
var v, b, w, E,
|
|
796
|
+
var v, b, w, E, T, C, k, O, z;
|
|
797
797
|
const u = `${e}/messages`, h = await this.buildAuthHeaders(), d = await fetch(u, {
|
|
798
798
|
method: "POST",
|
|
799
799
|
headers: {
|
|
@@ -840,7 +840,7 @@ function Ww(n = {}) {
|
|
|
840
840
|
(E = a.onComplete) == null || E.call(a, M.usage), m = !0;
|
|
841
841
|
break;
|
|
842
842
|
case "error":
|
|
843
|
-
(
|
|
843
|
+
(T = a.onError) == null || T.call(a, M.message), m = !0;
|
|
844
844
|
break;
|
|
845
845
|
}
|
|
846
846
|
} catch {
|
|
@@ -905,7 +905,7 @@ function Gw(n = 3500) {
|
|
|
905
905
|
return { toasts: e, pushToast: r, removeToast: i, clearToasts: s };
|
|
906
906
|
}
|
|
907
907
|
function Yw({ toasts: n }) {
|
|
908
|
-
return /* @__PURE__ */
|
|
908
|
+
return /* @__PURE__ */ P.jsx("div", { className: "toasts", role: "status", "aria-live": "polite", children: n.map((e) => /* @__PURE__ */ P.jsx("div", { className: `toast ${e.type || ""}`, children: e.message }, e.id)) });
|
|
909
909
|
}
|
|
910
910
|
function Yy(n) {
|
|
911
911
|
return (e) => typeof e === n;
|
|
@@ -1406,12 +1406,12 @@ function N1() {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function T(C) {
|
|
1410
1410
|
return E(C) === u;
|
|
1411
1411
|
}
|
|
1412
1412
|
return Je.AsyncMode = l, Je.ConcurrentMode = u, Je.ContextConsumer = a, Je.ContextProvider = o, Je.Element = e, Je.ForwardRef = h, Je.Fragment = i, Je.Lazy = g, Je.Memo = p, Je.Portal = t, Je.Profiler = s, Je.StrictMode = r, Je.Suspense = d, Je.isAsyncMode = function(C) {
|
|
1413
|
-
return
|
|
1414
|
-
}, Je.isConcurrentMode =
|
|
1413
|
+
return T(C) || E(C) === l;
|
|
1414
|
+
}, Je.isConcurrentMode = T, Je.isContextConsumer = function(C) {
|
|
1415
1415
|
return E(C) === a;
|
|
1416
1416
|
}, Je.isContextProvider = function(C) {
|
|
1417
1417
|
return E(C) === o;
|
|
@@ -1454,7 +1454,7 @@ function D1() {
|
|
|
1454
1454
|
return typeof te == "string" || typeof te == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1455
1455
|
te === i || te === u || te === s || te === r || te === d || te === f || typeof te == "object" && te !== null && (te.$$typeof === g || te.$$typeof === p || te.$$typeof === o || te.$$typeof === a || te.$$typeof === h || te.$$typeof === v || te.$$typeof === b || te.$$typeof === w || te.$$typeof === m);
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function T(te) {
|
|
1458
1458
|
if (typeof te == "object" && te !== null) {
|
|
1459
1459
|
var Et = te.$$typeof;
|
|
1460
1460
|
switch (Et) {
|
|
@@ -1488,45 +1488,45 @@ function D1() {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
var C = l, k = u, O = a, z = o, F = e, I = h, B = i, N = g, H = p, M = t, W = s, L = r, D = d, ie = !1;
|
|
1490
1490
|
function fe(te) {
|
|
1491
|
-
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), S(te) ||
|
|
1491
|
+
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), S(te) || T(te) === l;
|
|
1492
1492
|
}
|
|
1493
1493
|
function S(te) {
|
|
1494
|
-
return
|
|
1494
|
+
return T(te) === u;
|
|
1495
1495
|
}
|
|
1496
1496
|
function U(te) {
|
|
1497
|
-
return
|
|
1497
|
+
return T(te) === a;
|
|
1498
1498
|
}
|
|
1499
1499
|
function ee(te) {
|
|
1500
|
-
return
|
|
1500
|
+
return T(te) === o;
|
|
1501
1501
|
}
|
|
1502
1502
|
function _(te) {
|
|
1503
1503
|
return typeof te == "object" && te !== null && te.$$typeof === e;
|
|
1504
1504
|
}
|
|
1505
1505
|
function Q(te) {
|
|
1506
|
-
return
|
|
1506
|
+
return T(te) === h;
|
|
1507
1507
|
}
|
|
1508
1508
|
function de(te) {
|
|
1509
|
-
return
|
|
1509
|
+
return T(te) === i;
|
|
1510
1510
|
}
|
|
1511
1511
|
function G(te) {
|
|
1512
|
-
return
|
|
1512
|
+
return T(te) === g;
|
|
1513
1513
|
}
|
|
1514
1514
|
function Z(te) {
|
|
1515
|
-
return
|
|
1515
|
+
return T(te) === p;
|
|
1516
1516
|
}
|
|
1517
1517
|
function he(te) {
|
|
1518
|
-
return
|
|
1518
|
+
return T(te) === t;
|
|
1519
1519
|
}
|
|
1520
1520
|
function Ae(te) {
|
|
1521
|
-
return
|
|
1521
|
+
return T(te) === s;
|
|
1522
1522
|
}
|
|
1523
1523
|
function xe(te) {
|
|
1524
|
-
return
|
|
1524
|
+
return T(te) === r;
|
|
1525
1525
|
}
|
|
1526
1526
|
function rt(te) {
|
|
1527
|
-
return
|
|
1527
|
+
return T(te) === d;
|
|
1528
1528
|
}
|
|
1529
|
-
Qe.AsyncMode = C, Qe.ConcurrentMode = k, Qe.ContextConsumer = O, Qe.ContextProvider = z, Qe.Element = F, Qe.ForwardRef = I, Qe.Fragment = B, Qe.Lazy = N, Qe.Memo = H, Qe.Portal = M, Qe.Profiler = W, Qe.StrictMode = L, Qe.Suspense = D, Qe.isAsyncMode = fe, Qe.isConcurrentMode = S, Qe.isContextConsumer = U, Qe.isContextProvider = ee, Qe.isElement = _, Qe.isForwardRef = Q, Qe.isFragment = de, Qe.isLazy = G, Qe.isMemo = Z, Qe.isPortal = he, Qe.isProfiler = Ae, Qe.isStrictMode = xe, Qe.isSuspense = rt, Qe.isValidElementType = E, Qe.typeOf =
|
|
1529
|
+
Qe.AsyncMode = C, Qe.ConcurrentMode = k, Qe.ContextConsumer = O, Qe.ContextProvider = z, Qe.Element = F, Qe.ForwardRef = I, Qe.Fragment = B, Qe.Lazy = N, Qe.Memo = H, Qe.Portal = M, Qe.Profiler = W, Qe.StrictMode = L, Qe.Suspense = D, Qe.isAsyncMode = fe, Qe.isConcurrentMode = S, Qe.isContextConsumer = U, Qe.isContextProvider = ee, Qe.isElement = _, Qe.isForwardRef = Q, Qe.isFragment = de, Qe.isLazy = G, Qe.isMemo = Z, Qe.isPortal = he, Qe.isProfiler = Ae, Qe.isStrictMode = xe, Qe.isSuspense = rt, Qe.isValidElementType = E, Qe.typeOf = T;
|
|
1530
1530
|
}()), Qe;
|
|
1531
1531
|
}
|
|
1532
1532
|
var tb;
|
|
@@ -1679,7 +1679,7 @@ function z1() {
|
|
|
1679
1679
|
symbol: b("symbol"),
|
|
1680
1680
|
any: w(),
|
|
1681
1681
|
arrayOf: E,
|
|
1682
|
-
element:
|
|
1682
|
+
element: T(),
|
|
1683
1683
|
elementType: C(),
|
|
1684
1684
|
instanceOf: k,
|
|
1685
1685
|
node: I(),
|
|
@@ -1754,7 +1754,7 @@ function z1() {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
return v(U);
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function T() {
|
|
1758
1758
|
function S(U, ee, _, Q, de) {
|
|
1759
1759
|
var G = U[ee];
|
|
1760
1760
|
if (!a(G)) {
|
|
@@ -2521,7 +2521,7 @@ function mA(n, e) {
|
|
|
2521
2521
|
if (i !== a || o.length === l + 1)
|
|
2522
2522
|
return n;
|
|
2523
2523
|
i = n.placement.split("-")[0], r = Dd(i);
|
|
2524
|
-
var u = n.offsets.popper, h = n.offsets.reference, d = Math.floor, f = i === "left" && d(u.right) > d(h.left) || i === "right" && d(u.left) < d(h.right) || i === "top" && d(u.bottom) > d(h.top) || i === "bottom" && d(u.top) < d(h.bottom), p = d(u.left) < d(t.left), g = d(u.right) > d(t.right), m = d(u.top) < d(t.top), v = d(u.bottom) > d(t.bottom), b = i === "left" && p || i === "right" && g || i === "top" && m || i === "bottom" && v, w = ["top", "bottom"].indexOf(i) !== -1, E = !!e.flipVariations && (w && s === "start" && p || w && s === "end" && g || !w && s === "start" && m || !w && s === "end" && v),
|
|
2524
|
+
var u = n.offsets.popper, h = n.offsets.reference, d = Math.floor, f = i === "left" && d(u.right) > d(h.left) || i === "right" && d(u.left) < d(h.right) || i === "top" && d(u.bottom) > d(h.top) || i === "bottom" && d(u.top) < d(h.bottom), p = d(u.left) < d(t.left), g = d(u.right) > d(t.right), m = d(u.top) < d(t.top), v = d(u.bottom) > d(t.bottom), b = i === "left" && p || i === "right" && g || i === "top" && m || i === "bottom" && v, w = ["top", "bottom"].indexOf(i) !== -1, E = !!e.flipVariations && (w && s === "start" && p || w && s === "end" && g || !w && s === "start" && m || !w && s === "end" && v), T = !!e.flipVariationsByContent && (w && s === "start" && g || w && s === "end" && p || !w && s === "start" && v || !w && s === "end" && m), C = E || T;
|
|
2525
2525
|
(f || b || C) && (n.flipped = !0, (f || b) && (i = o[l + 1]), C && (s = gA(s)), n.placement = i + (s ? "-" + s : ""), n.offsets.popper = Si({}, n.offsets.popper, c0(n.instance.popper, n.offsets.reference, n.placement)), n = u0(n.instance.modifiers, n, "flip"));
|
|
2526
2526
|
}), n;
|
|
2527
2527
|
}
|
|
@@ -3871,8 +3871,8 @@ var aS = ["arrow", "flip", "offset"], lS = ["position", "top", "right", "bottom"
|
|
|
3871
3871
|
} });
|
|
3872
3872
|
}
|
|
3873
3873
|
if (o) {
|
|
3874
|
-
var
|
|
3875
|
-
new qc(this.target, this.wrapperRef, { placement: p.placement || f, modifiers: { arrow: { enabled: !1 }, offset: { offset: "0, ".concat(
|
|
3874
|
+
var T = $.undefined(p.offset) ? 0 : p.offset;
|
|
3875
|
+
new qc(this.target, this.wrapperRef, { placement: p.placement || f, modifiers: { arrow: { enabled: !1 }, offset: { offset: "0, ".concat(T, "px") }, flip: { enabled: !1 } }, onCreate: function(k) {
|
|
3876
3876
|
r.wrapperPopper = k, r._isMounted && r.setState({ statusWrapper: Ve.IDLE }), u(k, "wrapper"), f !== k.placement && setTimeout(function() {
|
|
3877
3877
|
k.instance.update();
|
|
3878
3878
|
}, 1);
|
|
@@ -3917,8 +3917,8 @@ var aS = ["arrow", "flip", "offset"], lS = ["position", "top", "right", "bottom"
|
|
|
3917
3917
|
var r = this.props.target;
|
|
3918
3918
|
return r ? $.domElement(r) ? r : document.querySelector(r) : this.childRef || this.wrapperRef;
|
|
3919
3919
|
} }, { key: "render", value: function() {
|
|
3920
|
-
var r = this.state, s = r.currentPlacement, o = r.positionWrapper, a = r.status, l = this.props, u = l.children, h = l.component, d = l.content, f = l.disableAnimation, p = l.footer, g = l.hideArrow, m = l.id, v = l.open, b = l.showCloseButton, w = l.style, E = l.target,
|
|
3921
|
-
return o ? k.wrapperInPortal = C : k.wrapperAsChildren = C, /* @__PURE__ */ Se.createElement("span", null, /* @__PURE__ */ Se.createElement(x0, { hasChildren: !!u, id: m, placement: s, setRef: this.setFloaterRef, target: E, zIndex: this.styles.options.zIndex }, /* @__PURE__ */ Se.createElement(k0, { component: h, content: d, disableAnimation: f, footer: p, handleClick: this.handleClick, hideArrow: g || s === "center", open: v, placement: s, positionWrapper: o, setArrowRef: this.setArrowRef, setFloaterRef: this.setFloaterRef, showCloseButton: b, status: a, styles: this.styles, title:
|
|
3920
|
+
var r = this.state, s = r.currentPlacement, o = r.positionWrapper, a = r.status, l = this.props, u = l.children, h = l.component, d = l.content, f = l.disableAnimation, p = l.footer, g = l.hideArrow, m = l.id, v = l.open, b = l.showCloseButton, w = l.style, E = l.target, T = l.title, C = /* @__PURE__ */ Se.createElement(E0, { handleClick: this.handleClick, handleMouseEnter: this.handleMouseEnter, handleMouseLeave: this.handleMouseLeave, setChildRef: this.setChildRef, setWrapperRef: this.setWrapperRef, style: w, styles: this.styles.wrapper }, u), k = {};
|
|
3921
|
+
return o ? k.wrapperInPortal = C : k.wrapperAsChildren = C, /* @__PURE__ */ Se.createElement("span", null, /* @__PURE__ */ Se.createElement(x0, { hasChildren: !!u, id: m, placement: s, setRef: this.setFloaterRef, target: E, zIndex: this.styles.options.zIndex }, /* @__PURE__ */ Se.createElement(k0, { component: h, content: d, disableAnimation: f, footer: p, handleClick: this.handleClick, hideArrow: g || s === "center", open: v, placement: s, positionWrapper: o, setArrowRef: this.setArrowRef, setFloaterRef: this.setFloaterRef, showCloseButton: b, status: a, styles: this.styles, title: T }), k.wrapperInPortal), k.wrapperAsChildren);
|
|
3922
3922
|
} }]), t;
|
|
3923
3923
|
}(Se.Component);
|
|
3924
3924
|
mn(nm, "propTypes", { autoOpen: X.bool, callback: X.func, children: X.node, component: wb(X.oneOfType([X.func, X.element]), function(n) {
|
|
@@ -5122,13 +5122,13 @@ var BS = zS, $S = class extends qe.Component {
|
|
|
5122
5122
|
status: d,
|
|
5123
5123
|
step: f,
|
|
5124
5124
|
store: p
|
|
5125
|
-
} = this.props, { changed: g, changedFrom: m } = Ld(n, this.props), v = a.info(), b = r && t !== et.CLOSE && (l > 0 || t === et.PREV), w = g("action") || g("index") || g("lifecycle") || g("status"), E = m("lifecycle", [Ce.TOOLTIP, Ce.INIT], Ce.INIT),
|
|
5125
|
+
} = this.props, { changed: g, changedFrom: m } = Ld(n, this.props), v = a.info(), b = r && t !== et.CLOSE && (l > 0 || t === et.PREV), w = g("action") || g("index") || g("lifecycle") || g("status"), E = m("lifecycle", [Ce.TOOLTIP, Ce.INIT], Ce.INIT), T = g("action", [
|
|
5126
5126
|
et.NEXT,
|
|
5127
5127
|
et.PREV,
|
|
5128
5128
|
et.SKIP,
|
|
5129
5129
|
et.CLOSE
|
|
5130
5130
|
]), C = s && l === n.index;
|
|
5131
|
-
if (
|
|
5131
|
+
if (T && (E || C) && i({
|
|
5132
5132
|
...v,
|
|
5133
5133
|
index: n.index,
|
|
5134
5134
|
lifecycle: Ce.COMPLETE,
|
|
@@ -5240,7 +5240,7 @@ var BS = zS, $S = class extends qe.Component {
|
|
|
5240
5240
|
componentDidUpdate(n, e) {
|
|
5241
5241
|
if (!gs())
|
|
5242
5242
|
return;
|
|
5243
|
-
const { action: t, controlled: i, index: r, status: s } = this.state, { debug: o, run: a, stepIndex: l, steps: u } = this.props, { stepIndex: h, steps: d } = n, { reset: f, setSteps: p, start: g, stop: m, update: v } = this.store, { changed: b } = Ld(n, this.props), { changed: w, changedFrom: E } = Ld(e, this.state),
|
|
5243
|
+
const { action: t, controlled: i, index: r, status: s } = this.state, { debug: o, run: a, stepIndex: l, steps: u } = this.props, { stepIndex: h, steps: d } = n, { reset: f, setSteps: p, start: g, stop: m, update: v } = this.store, { changed: b } = Ld(n, this.props), { changed: w, changedFrom: E } = Ld(e, this.state), T = Ra(this.props, u[r]), C = !Rn(d, u), k = ce.number(l) && b("stepIndex"), O = os(T.target);
|
|
5244
5244
|
if (C && (_b(u, o) ? p(u) : console.warn("Steps are not valid", u)), b("run") && (a ? g(l) : m()), k) {
|
|
5245
5245
|
let I = ce.number(h) && h < l ? et.NEXT : et.PREV;
|
|
5246
5246
|
t === et.STOP && (I = et.START), [Be.FINISHED, Be.SKIPPED].includes(s) || v({
|
|
@@ -5252,12 +5252,12 @@ var BS = zS, $S = class extends qe.Component {
|
|
|
5252
5252
|
!i && s === Be.RUNNING && r === 0 && !O && (this.store.update({ index: r + 1 }), this.callback({
|
|
5253
5253
|
...this.state,
|
|
5254
5254
|
type: $i.TARGET_NOT_FOUND,
|
|
5255
|
-
step:
|
|
5255
|
+
step: T
|
|
5256
5256
|
}));
|
|
5257
5257
|
const z = {
|
|
5258
5258
|
...this.state,
|
|
5259
5259
|
index: r,
|
|
5260
|
-
step:
|
|
5260
|
+
step: T
|
|
5261
5261
|
};
|
|
5262
5262
|
if (w("action", [
|
|
5263
5263
|
et.NEXT,
|
|
@@ -5335,8 +5335,8 @@ var BS = zS, $S = class extends qe.Component {
|
|
|
5335
5335
|
const { offsets: w, placement: E } = v;
|
|
5336
5336
|
!["bottom"].includes(E) && !p && (m = Math.floor(w.popper.top - a));
|
|
5337
5337
|
} else if (t === Ce.TOOLTIP && b) {
|
|
5338
|
-
const { flipped: w, offsets: E, placement:
|
|
5339
|
-
["top", "right", "left"].includes(
|
|
5338
|
+
const { flipped: w, offsets: E, placement: T } = b;
|
|
5339
|
+
["top", "right", "left"].includes(T) && !w && !p ? m = Math.floor(E.popper.top - a) : m -= h.spotlightPadding;
|
|
5340
5340
|
}
|
|
5341
5341
|
m = m >= 0 ? m : 0, i === Be.RUNNING && bS(m, { element: g, duration: o }).then(
|
|
5342
5342
|
() => {
|
|
@@ -5436,9 +5436,9 @@ function qS() {
|
|
|
5436
5436
|
{
|
|
5437
5437
|
target: ".chat-container",
|
|
5438
5438
|
placement: "center",
|
|
5439
|
-
content: /* @__PURE__ */
|
|
5440
|
-
/* @__PURE__ */
|
|
5441
|
-
/* @__PURE__ */
|
|
5439
|
+
content: /* @__PURE__ */ P.jsxs("div", { children: [
|
|
5440
|
+
/* @__PURE__ */ P.jsx("h3", { style: { margin: "0 0 6px" }, children: "Welcome to DragonflyAI" }),
|
|
5441
|
+
/* @__PURE__ */ P.jsx("p", { style: { margin: 0 }, children: "A quick tour to show you how to ask questions, read answers with sources, and navigate your chats." })
|
|
5442
5442
|
] }),
|
|
5443
5443
|
disableBeacon: !0
|
|
5444
5444
|
},
|
|
@@ -5519,10 +5519,10 @@ function qS() {
|
|
|
5519
5519
|
m.disconnect();
|
|
5520
5520
|
} catch {
|
|
5521
5521
|
}
|
|
5522
|
-
const w = new IntersectionObserver((E,
|
|
5522
|
+
const w = new IntersectionObserver((E, T) => {
|
|
5523
5523
|
if (E.every((k) => k.isIntersecting)) {
|
|
5524
5524
|
try {
|
|
5525
|
-
|
|
5525
|
+
T.disconnect();
|
|
5526
5526
|
} catch {
|
|
5527
5527
|
}
|
|
5528
5528
|
requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
@@ -5562,9 +5562,9 @@ function qS() {
|
|
|
5562
5562
|
}
|
|
5563
5563
|
};
|
|
5564
5564
|
}
|
|
5565
|
-
}, [i, n]), /* @__PURE__ */
|
|
5566
|
-
/* @__PURE__ */
|
|
5567
|
-
n && a && /* @__PURE__ */
|
|
5565
|
+
}, [i, n]), /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
|
|
5566
|
+
/* @__PURE__ */ P.jsx("span", { ref: r, style: { position: "absolute", inset: 0, pointerEvents: "none" }, "aria-hidden": !0 }),
|
|
5567
|
+
n && a && /* @__PURE__ */ P.jsx(
|
|
5568
5568
|
US,
|
|
5569
5569
|
{
|
|
5570
5570
|
steps: s,
|
|
@@ -7520,28 +7520,28 @@ function pE(n) {
|
|
|
7520
7520
|
return a;
|
|
7521
7521
|
function a(E) {
|
|
7522
7522
|
if (i < t.length) {
|
|
7523
|
-
const
|
|
7524
|
-
return e.containerState =
|
|
7523
|
+
const T = t[i];
|
|
7524
|
+
return e.containerState = T[1], n.attempt(T[0].continuation, l, u)(E);
|
|
7525
7525
|
}
|
|
7526
7526
|
return u(E);
|
|
7527
7527
|
}
|
|
7528
7528
|
function l(E) {
|
|
7529
7529
|
if (i++, e.containerState._closeFlow) {
|
|
7530
7530
|
e.containerState._closeFlow = void 0, r && w();
|
|
7531
|
-
const
|
|
7532
|
-
let C =
|
|
7531
|
+
const T = e.events.length;
|
|
7532
|
+
let C = T, k;
|
|
7533
7533
|
for (; C--; )
|
|
7534
7534
|
if (e.events[C][0] === "exit" && e.events[C][1].type === "chunkFlow") {
|
|
7535
7535
|
k = e.events[C][1].end;
|
|
7536
7536
|
break;
|
|
7537
7537
|
}
|
|
7538
7538
|
b(i);
|
|
7539
|
-
let O =
|
|
7539
|
+
let O = T;
|
|
7540
7540
|
for (; O < e.events.length; )
|
|
7541
7541
|
e.events[O][1].end = {
|
|
7542
7542
|
...k
|
|
7543
7543
|
}, O++;
|
|
7544
|
-
return li(e.events, C + 1, 0, e.events.slice(
|
|
7544
|
+
return li(e.events, C + 1, 0, e.events.slice(T)), e.events.length = O, u(E);
|
|
7545
7545
|
}
|
|
7546
7546
|
return a(E);
|
|
7547
7547
|
}
|
|
@@ -7585,9 +7585,9 @@ function pE(n) {
|
|
|
7585
7585
|
}
|
|
7586
7586
|
return ve(E) ? (n.consume(E), v(n.exit("chunkFlow")), i = 0, e.interrupt = void 0, a) : (n.consume(E), m);
|
|
7587
7587
|
}
|
|
7588
|
-
function v(E,
|
|
7588
|
+
function v(E, T) {
|
|
7589
7589
|
const C = e.sliceStream(E);
|
|
7590
|
-
if (
|
|
7590
|
+
if (T && C.push(null), E.previous = s, s && (s.next = E), s = E, r.defineSkip(E.start), r.write(C), e.parser.lazy[E.start.line]) {
|
|
7591
7591
|
let k = r.events.length;
|
|
7592
7592
|
for (; k--; )
|
|
7593
7593
|
if (
|
|
@@ -7615,9 +7615,9 @@ function pE(n) {
|
|
|
7615
7615
|
}
|
|
7616
7616
|
}
|
|
7617
7617
|
function b(E) {
|
|
7618
|
-
let
|
|
7619
|
-
for (;
|
|
7620
|
-
const C = t[
|
|
7618
|
+
let T = t.length;
|
|
7619
|
+
for (; T-- > E; ) {
|
|
7620
|
+
const C = t[T];
|
|
7621
7621
|
e.containerState = C[1], C[0].exit.call(e, n);
|
|
7622
7622
|
}
|
|
7623
7623
|
t.length = E;
|
|
@@ -7874,7 +7874,7 @@ function _E(n, e, t) {
|
|
|
7874
7874
|
return k === a ? (o++, n.consume(k), h) : o < 3 ? t(k) : (n.exit("codeFencedFenceSequence"), He(k) ? Ge(n, d, "whitespace")(k) : d(k));
|
|
7875
7875
|
}
|
|
7876
7876
|
function d(k) {
|
|
7877
|
-
return k === null || ve(k) ? (n.exit("codeFencedFence"), i.interrupt ? e(k) : n.check(Wb, m,
|
|
7877
|
+
return k === null || ve(k) ? (n.exit("codeFencedFence"), i.interrupt ? e(k) : n.check(Wb, m, T)(k)) : (n.enter("codeFencedFenceInfo"), n.enter("chunkString", {
|
|
7878
7878
|
contentType: "string"
|
|
7879
7879
|
}), f(k));
|
|
7880
7880
|
}
|
|
@@ -7890,7 +7890,7 @@ function _E(n, e, t) {
|
|
|
7890
7890
|
return k === null || ve(k) ? (n.exit("chunkString"), n.exit("codeFencedFenceMeta"), d(k)) : k === 96 && k === a ? t(k) : (n.consume(k), g);
|
|
7891
7891
|
}
|
|
7892
7892
|
function m(k) {
|
|
7893
|
-
return n.attempt(r,
|
|
7893
|
+
return n.attempt(r, T, v)(k);
|
|
7894
7894
|
}
|
|
7895
7895
|
function v(k) {
|
|
7896
7896
|
return n.enter("lineEnding"), n.consume(k), n.exit("lineEnding"), b;
|
|
@@ -7899,12 +7899,12 @@ function _E(n, e, t) {
|
|
|
7899
7899
|
return s > 0 && He(k) ? Ge(n, w, "linePrefix", s + 1)(k) : w(k);
|
|
7900
7900
|
}
|
|
7901
7901
|
function w(k) {
|
|
7902
|
-
return k === null || ve(k) ? n.check(Wb, m,
|
|
7902
|
+
return k === null || ve(k) ? n.check(Wb, m, T)(k) : (n.enter("codeFlowValue"), E(k));
|
|
7903
7903
|
}
|
|
7904
7904
|
function E(k) {
|
|
7905
7905
|
return k === null || ve(k) ? (n.exit("codeFlowValue"), w(k)) : (n.consume(k), E);
|
|
7906
7906
|
}
|
|
7907
|
-
function
|
|
7907
|
+
function T(k) {
|
|
7908
7908
|
return n.exit("codeFenced"), e(k);
|
|
7909
7909
|
}
|
|
7910
7910
|
function C(k, O, z) {
|
|
@@ -8604,10 +8604,10 @@ function n_(n, e, t) {
|
|
|
8604
8604
|
return He(_) ? (n.consume(_), w) : I(_);
|
|
8605
8605
|
}
|
|
8606
8606
|
function E(_) {
|
|
8607
|
-
return _ === 47 ? (n.consume(_), I) : _ === 58 || _ === 95 || Pn(_) ? (n.consume(_),
|
|
8607
|
+
return _ === 47 ? (n.consume(_), I) : _ === 58 || _ === 95 || Pn(_) ? (n.consume(_), T) : He(_) ? (n.consume(_), E) : I(_);
|
|
8608
8608
|
}
|
|
8609
|
-
function
|
|
8610
|
-
return _ === 45 || _ === 46 || _ === 58 || _ === 95 || vn(_) ? (n.consume(_),
|
|
8609
|
+
function T(_) {
|
|
8610
|
+
return _ === 45 || _ === 46 || _ === 58 || _ === 95 || vn(_) ? (n.consume(_), T) : C(_);
|
|
8611
8611
|
}
|
|
8612
8612
|
function C(_) {
|
|
8613
8613
|
return _ === 61 ? (n.consume(_), k) : He(_) ? (n.consume(_), C) : E(_);
|
|
@@ -8730,9 +8730,9 @@ function o_(n, e, t) {
|
|
|
8730
8730
|
return S === null || S === 62 ? L(S) : ve(S) ? (o = w, D(S)) : (n.consume(S), w);
|
|
8731
8731
|
}
|
|
8732
8732
|
function E(S) {
|
|
8733
|
-
return S === null ? t(S) : S === 63 ? (n.consume(S),
|
|
8733
|
+
return S === null ? t(S) : S === 63 ? (n.consume(S), T) : ve(S) ? (o = E, D(S)) : (n.consume(S), E);
|
|
8734
8734
|
}
|
|
8735
|
-
function
|
|
8735
|
+
function T(S) {
|
|
8736
8736
|
return S === 62 ? L(S) : E(S);
|
|
8737
8737
|
}
|
|
8738
8738
|
function C(S) {
|
|
@@ -9316,7 +9316,7 @@ function G_(n, e, t) {
|
|
|
9316
9316
|
check: O(k),
|
|
9317
9317
|
consume: w,
|
|
9318
9318
|
enter: E,
|
|
9319
|
-
exit:
|
|
9319
|
+
exit: T,
|
|
9320
9320
|
interrupt: O(k, {
|
|
9321
9321
|
interrupt: !0
|
|
9322
9322
|
})
|
|
@@ -9386,7 +9386,7 @@ function G_(n, e, t) {
|
|
|
9386
9386
|
const H = N || {};
|
|
9387
9387
|
return H.type = B, H.start = g(), u.events.push(["enter", H, u]), a.push(H), H;
|
|
9388
9388
|
}
|
|
9389
|
-
function
|
|
9389
|
+
function T(B) {
|
|
9390
9390
|
const N = a.pop();
|
|
9391
9391
|
return N.end = g(), u.events.push(["exit", N, u]), N;
|
|
9392
9392
|
}
|
|
@@ -9667,7 +9667,7 @@ function iC(n) {
|
|
|
9667
9667
|
codeTextData: I,
|
|
9668
9668
|
data: I,
|
|
9669
9669
|
definition: l(),
|
|
9670
|
-
definitionDestinationString:
|
|
9670
|
+
definitionDestinationString: T,
|
|
9671
9671
|
definitionLabelString: w,
|
|
9672
9672
|
definitionTitleString: E,
|
|
9673
9673
|
emphasis: l(),
|
|
@@ -9873,7 +9873,7 @@ function iC(n) {
|
|
|
9873
9873
|
const j = this.resume(), K = this.stack[this.stack.length - 1];
|
|
9874
9874
|
K.title = j;
|
|
9875
9875
|
}
|
|
9876
|
-
function
|
|
9876
|
+
function T() {
|
|
9877
9877
|
const j = this.resume(), K = this.stack[this.stack.length - 1];
|
|
9878
9878
|
K.url = j;
|
|
9879
9879
|
}
|
|
@@ -12268,11 +12268,11 @@ function ET(n, e) {
|
|
|
12268
12268
|
for (const h of AT)
|
|
12269
12269
|
Object.hasOwn(e, h.from) && ("" + h.from + (h.to ? "use `" + h.to + "` instead" : "remove it") + xT + h.id, void 0);
|
|
12270
12270
|
return bm(n, u), Hk(n, {
|
|
12271
|
-
Fragment:
|
|
12271
|
+
Fragment: P.Fragment,
|
|
12272
12272
|
components: r,
|
|
12273
12273
|
ignoreInvalidStyle: !0,
|
|
12274
|
-
jsx:
|
|
12275
|
-
jsxs:
|
|
12274
|
+
jsx: P.jsx,
|
|
12275
|
+
jsxs: P.jsxs,
|
|
12276
12276
|
passKeys: !0,
|
|
12277
12277
|
passNode: !0
|
|
12278
12278
|
});
|
|
@@ -12345,16 +12345,16 @@ function TT(n, e, t) {
|
|
|
12345
12345
|
f.lastIndex = 0;
|
|
12346
12346
|
let E = f.exec(u.value);
|
|
12347
12347
|
for (; E; ) {
|
|
12348
|
-
const
|
|
12348
|
+
const T = E.index, C = {
|
|
12349
12349
|
index: E.index,
|
|
12350
12350
|
input: E.input,
|
|
12351
12351
|
stack: [...h, u]
|
|
12352
12352
|
};
|
|
12353
12353
|
let k = p(...E, C);
|
|
12354
|
-
if (typeof k == "string" && (k = k.length > 0 ? { type: "text", value: k } : void 0), k === !1 ? f.lastIndex =
|
|
12354
|
+
if (typeof k == "string" && (k = k.length > 0 ? { type: "text", value: k } : void 0), k === !1 ? f.lastIndex = T + 1 : (g !== T && w.push({
|
|
12355
12355
|
type: "text",
|
|
12356
|
-
value: u.value.slice(g,
|
|
12357
|
-
}), Array.isArray(k) ? w.push(...k) : k && w.push(k), g =
|
|
12356
|
+
value: u.value.slice(g, T)
|
|
12357
|
+
}), Array.isArray(k) ? w.push(...k) : k && w.push(k), g = T + E[0].length, b = !0), !f.global)
|
|
12358
12358
|
break;
|
|
12359
12359
|
E = f.exec(u.value);
|
|
12360
12360
|
}
|
|
@@ -12687,14 +12687,14 @@ function cP(n, e) {
|
|
|
12687
12687
|
const b = [];
|
|
12688
12688
|
for (; ++d < u; ) {
|
|
12689
12689
|
const w = m[d] || "";
|
|
12690
|
-
let E = "",
|
|
12690
|
+
let E = "", T = "";
|
|
12691
12691
|
if (t.alignDelimiters !== !1) {
|
|
12692
12692
|
const C = l[d] - (v[d] || 0), k = s[d];
|
|
12693
|
-
k === 114 ? E = " ".repeat(C) : k === 99 ? C % 2 ? (E = " ".repeat(C / 2 + 0.5),
|
|
12693
|
+
k === 114 ? E = " ".repeat(C) : k === 99 ? C % 2 ? (E = " ".repeat(C / 2 + 0.5), T = " ".repeat(C / 2 - 0.5)) : (E = " ".repeat(C / 2), T = E) : T = " ".repeat(C);
|
|
12694
12694
|
}
|
|
12695
12695
|
t.delimiterStart !== !1 && !d && b.push("|"), t.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
|
|
12696
12696
|
// empty: there will be a closing space.
|
|
12697
|
-
!(t.alignDelimiters === !1 && w === "") && (t.delimiterStart !== !1 || d) && b.push(" "), t.alignDelimiters !== !1 && b.push(E), b.push(w), t.alignDelimiters !== !1 && b.push(
|
|
12697
|
+
!(t.alignDelimiters === !1 && w === "") && (t.delimiterStart !== !1 || d) && b.push(" "), t.alignDelimiters !== !1 && b.push(E), b.push(w), t.alignDelimiters !== !1 && b.push(T), t.padding !== !1 && b.push(" "), (t.delimiterEnd !== !1 || d !== u - 1) && b.push("|");
|
|
12698
12698
|
}
|
|
12699
12699
|
g.push(
|
|
12700
12700
|
t.delimiterEnd === !1 ? b.join("").replace(/ +$/, "") : b.join("")
|
|
@@ -14080,7 +14080,7 @@ function CR(n, e, t) {
|
|
|
14080
14080
|
return He(I) ? Ge(n, v, "whitespace")(I) : v(I);
|
|
14081
14081
|
}
|
|
14082
14082
|
function v(I) {
|
|
14083
|
-
return I === 58 ? (s += 1, o = !0, n.enter("tableDelimiterMarker"), n.consume(I), n.exit("tableDelimiterMarker"), b) : I === 45 ? (s += 1, b(I)) : I === null || ve(I) ?
|
|
14083
|
+
return I === 58 ? (s += 1, o = !0, n.enter("tableDelimiterMarker"), n.consume(I), n.exit("tableDelimiterMarker"), b) : I === 45 ? (s += 1, b(I)) : I === null || ve(I) ? T(I) : C(I);
|
|
14084
14084
|
}
|
|
14085
14085
|
function b(I) {
|
|
14086
14086
|
return I === 45 ? (n.enter("tableDelimiterFiller"), w(I)) : C(I);
|
|
@@ -14089,9 +14089,9 @@ function CR(n, e, t) {
|
|
|
14089
14089
|
return I === 45 ? (n.consume(I), w) : I === 58 ? (o = !0, n.exit("tableDelimiterFiller"), n.enter("tableDelimiterMarker"), n.consume(I), n.exit("tableDelimiterMarker"), E) : (n.exit("tableDelimiterFiller"), E(I));
|
|
14090
14090
|
}
|
|
14091
14091
|
function E(I) {
|
|
14092
|
-
return He(I) ? Ge(n,
|
|
14092
|
+
return He(I) ? Ge(n, T, "whitespace")(I) : T(I);
|
|
14093
14093
|
}
|
|
14094
|
-
function
|
|
14094
|
+
function T(I) {
|
|
14095
14095
|
return I === 124 ? g(I) : I === null || ve(I) ? !o || r !== s ? C(I) : (n.exit("tableDelimiterRow"), n.exit("tableHead"), e(I)) : C(I);
|
|
14096
14096
|
}
|
|
14097
14097
|
function C(I) {
|
|
@@ -14241,19 +14241,19 @@ function NR({
|
|
|
14241
14241
|
t ? `Message ID: ${t}` : ""
|
|
14242
14242
|
].filter(Boolean), a = encodeURIComponent(o.join(`
|
|
14243
14243
|
`)), l = `mailto:${r}?subject=${encodeURIComponent(s)}&body=${a}`;
|
|
14244
|
-
return /* @__PURE__ */
|
|
14245
|
-
/* @__PURE__ */
|
|
14246
|
-
/* @__PURE__ */
|
|
14247
|
-
/* @__PURE__ */
|
|
14244
|
+
return /* @__PURE__ */ P.jsx("div", { className: `modal ${n ? "open" : ""}`, onClick: e, role: "dialog", "aria-modal": "true", "aria-labelledby": "disclaimer-title", children: /* @__PURE__ */ P.jsxs("div", { className: "modal-content disclaimer-modal", onClick: (u) => u.stopPropagation(), children: [
|
|
14245
|
+
/* @__PURE__ */ P.jsxs("div", { className: "disclaimer-header", children: [
|
|
14246
|
+
/* @__PURE__ */ P.jsx("h2", { id: "disclaimer-title", className: "disclaimer-title", children: "DragonflyAI is still learning!" }),
|
|
14247
|
+
/* @__PURE__ */ P.jsx("button", { className: "disclaimer-close", onClick: e, "aria-label": "Close", children: "×" })
|
|
14248
14248
|
] }),
|
|
14249
|
-
/* @__PURE__ */
|
|
14249
|
+
/* @__PURE__ */ P.jsx("div", { className: "disclaimer-body", children: /* @__PURE__ */ P.jsxs("p", { children: [
|
|
14250
14250
|
"Some answers might need a second check. We’re monitoring how it performs and refining responses as we go. If you’re unsure about a response, please email ",
|
|
14251
|
-
/* @__PURE__ */
|
|
14251
|
+
/* @__PURE__ */ P.jsx("a", { href: `mailto:${r}`, className: "disclaimer-link", children: r }),
|
|
14252
14252
|
" — we’re happy to help."
|
|
14253
14253
|
] }) }),
|
|
14254
|
-
/* @__PURE__ */
|
|
14255
|
-
/* @__PURE__ */
|
|
14256
|
-
/* @__PURE__ */
|
|
14254
|
+
/* @__PURE__ */ P.jsxs("div", { className: "disclaimer-actions", children: [
|
|
14255
|
+
/* @__PURE__ */ P.jsx("button", { type: "button", className: "btn btn-outline", onClick: e, children: "Cancel" }),
|
|
14256
|
+
/* @__PURE__ */ P.jsx("a", { href: l, className: "btn btn-solid", children: "Email Support" })
|
|
14257
14257
|
] })
|
|
14258
14258
|
] }) });
|
|
14259
14259
|
}
|
|
@@ -14266,13 +14266,13 @@ function DR({
|
|
|
14266
14266
|
supportSubtitle: s = "Share your feedback below."
|
|
14267
14267
|
}) {
|
|
14268
14268
|
const [o, a] = Ze("");
|
|
14269
|
-
return /* @__PURE__ */
|
|
14270
|
-
/* @__PURE__ */
|
|
14271
|
-
/* @__PURE__ */
|
|
14272
|
-
/* @__PURE__ */
|
|
14269
|
+
return /* @__PURE__ */ P.jsx("div", { className: `modal ${n ? "open" : ""}`, onClick: e, role: "dialog", "aria-modal": "true", "aria-labelledby": "feedback-title", children: /* @__PURE__ */ P.jsxs("div", { className: "modal-content feedback-modal", onClick: (l) => l.stopPropagation(), children: [
|
|
14270
|
+
/* @__PURE__ */ P.jsxs("div", { className: "disclaimer-header", children: [
|
|
14271
|
+
/* @__PURE__ */ P.jsx("h2", { id: "feedback-title", className: "disclaimer-title", children: r }),
|
|
14272
|
+
/* @__PURE__ */ P.jsx("button", { className: "disclaimer-close", onClick: e, "aria-label": "Close", children: "×" })
|
|
14273
14273
|
] }),
|
|
14274
|
-
/* @__PURE__ */
|
|
14275
|
-
/* @__PURE__ */
|
|
14274
|
+
/* @__PURE__ */ P.jsx("div", { className: "feedback-subtitle", children: s }),
|
|
14275
|
+
/* @__PURE__ */ P.jsx("div", { className: "feedback-form", children: /* @__PURE__ */ P.jsx(
|
|
14276
14276
|
"textarea",
|
|
14277
14277
|
{
|
|
14278
14278
|
className: "feedback-textarea",
|
|
@@ -14282,9 +14282,9 @@ function DR({
|
|
|
14282
14282
|
rows: 6
|
|
14283
14283
|
}
|
|
14284
14284
|
) }),
|
|
14285
|
-
/* @__PURE__ */
|
|
14286
|
-
/* @__PURE__ */
|
|
14287
|
-
/* @__PURE__ */
|
|
14285
|
+
/* @__PURE__ */ P.jsxs("div", { className: "disclaimer-actions", children: [
|
|
14286
|
+
/* @__PURE__ */ P.jsx("button", { type: "button", className: "btn btn-outline", onClick: e, children: "Cancel" }),
|
|
14287
|
+
/* @__PURE__ */ P.jsx(
|
|
14288
14288
|
"button",
|
|
14289
14289
|
{
|
|
14290
14290
|
type: "button",
|
|
@@ -14321,26 +14321,22 @@ function FR({
|
|
|
14321
14321
|
F.items.push(O), typeof O.page_number == "number" && (F.pageMin = F.pageMin == null ? O.page_number : Math.min(F.pageMin, O.page_number), F.pageMax = F.pageMax == null ? O.page_number : Math.max(F.pageMax, O.page_number));
|
|
14322
14322
|
}
|
|
14323
14323
|
return Array.from(k.values());
|
|
14324
|
-
}, [f]), [g, m] = Se.useState(!1), [v, b] = Se.useState(!1), [w, E] = Se.useState(!1), [
|
|
14325
|
-
return /* @__PURE__ */
|
|
14326
|
-
/* @__PURE__ */
|
|
14327
|
-
/* @__PURE__ */
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
/* @__PURE__ */
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
/* @__PURE__ */
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
/* @__PURE__ */ T.jsx("stop", { offset: "0.69", "stop-color": "#0891AA" }),
|
|
14339
|
-
/* @__PURE__ */ T.jsx("stop", { offset: "1", "stop-color": "#0CC1A3" })
|
|
14340
|
-
] })
|
|
14341
|
-
] })
|
|
14324
|
+
}, [f]), [g, m] = Se.useState(!1), [v, b] = Se.useState(!1), [w, E] = Se.useState(!1), [T, C] = Se.useState("helpful");
|
|
14325
|
+
return /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
|
|
14326
|
+
/* @__PURE__ */ P.jsx("div", { className: "ai-avatar", "aria-hidden": !0, children: /* @__PURE__ */ P.jsxs("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 204.84 234.35", children: [
|
|
14327
|
+
/* @__PURE__ */ P.jsx("defs", { children: /* @__PURE__ */ P.jsxs("linearGradient", { id: "linear-gradient", x1: ".94", y1: "175.77", x2: "203.9", y2: "58.59", gradientUnits: "userSpaceOnUse", children: [
|
|
14328
|
+
/* @__PURE__ */ P.jsx("stop", { offset: "0", "stop-color": "#0cc1a3" }),
|
|
14329
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".29", "stop-color": "#0bbea3" }),
|
|
14330
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".46", "stop-color": "#0bb6a4" }),
|
|
14331
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".6", "stop-color": "#0aa7a7" }),
|
|
14332
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".72", "stop-color": "#0993aa" }),
|
|
14333
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".84", "stop-color": "#0779ae" }),
|
|
14334
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".94", "stop-color": "#0559b3" }),
|
|
14335
|
+
/* @__PURE__ */ P.jsx("stop", { offset: "1", "stop-color": "#0445b7" })
|
|
14336
|
+
] }) }),
|
|
14337
|
+
/* @__PURE__ */ P.jsx("path", { style: { fill: "url(#linear-gradient)" }, class: "cls-1", d: "M93.06,81.64v15.5l-50.83-26.84c-3.44-1.82-7.69-.5-9.51,2.94-1.81,3.44-.5,7.69,2.94,9.51l49.37,26.07-36.58,19.31c-3.44,1.81-4.75,6.07-2.94,9.51,1.26,2.39,3.7,3.75,6.23,3.75,1.11,0,2.23-.26,3.28-.82l38.04-20.08v59.14c0,3.89,3.15,7.04,7.04,7.04s7.04-3.15,7.04-7.04v-59.14l38.04,20.08c1.05.55,2.17.82,3.28.82,2.53,0,4.97-1.36,6.23-3.75,1.81-3.44.5-7.69-2.94-9.51l-36.58-19.31,49.37-26.07c3.44-1.81,4.75-6.07,2.94-9.51-1.81-3.44-6.07-4.75-9.51-2.94l-50.83,26.84v-15.5c0-3.89-3.15-7.04-7.04-7.04s-7.04,3.15-7.04,7.04ZM201.33,56.01L105.94.94c-2.18-1.26-4.86-1.26-7.04,0L3.52,56.01c-2.18,1.26-3.52,3.58-3.52,6.09v110.14c0,2.51,1.34,4.84,3.52,6.09l95.38,55.07c1.09.63,2.3.94,3.52.94s2.43-.31,3.52-.94l95.39-55.07c2.18-1.26,3.52-3.58,3.52-6.09V62.11c0-2.51-1.34-4.84-3.52-6.09ZM190.77,168.19l-88.35,51.01L14.07,168.19v-102.02L102.42,15.16l88.35,51.01v102.02Z" })
|
|
14342
14338
|
] }) }),
|
|
14343
|
-
/* @__PURE__ */
|
|
14339
|
+
/* @__PURE__ */ P.jsx(
|
|
14344
14340
|
NR,
|
|
14345
14341
|
{
|
|
14346
14342
|
open: v,
|
|
@@ -14349,24 +14345,24 @@ function FR({
|
|
|
14349
14345
|
messageText: d
|
|
14350
14346
|
}
|
|
14351
14347
|
),
|
|
14352
|
-
/* @__PURE__ */
|
|
14348
|
+
/* @__PURE__ */ P.jsx(
|
|
14353
14349
|
DR,
|
|
14354
14350
|
{
|
|
14355
14351
|
open: !1,
|
|
14356
14352
|
onClose: () => E(!1),
|
|
14357
|
-
sentiment:
|
|
14353
|
+
sentiment: T === "helpful" ? "helpful" : "not_helpful",
|
|
14358
14354
|
onSubmit: () => E(!1)
|
|
14359
14355
|
}
|
|
14360
14356
|
),
|
|
14361
|
-
/* @__PURE__ */
|
|
14357
|
+
/* @__PURE__ */ P.jsx("div", { className: "msg-content", children: /* @__PURE__ */ P.jsx("div", { className: "bubble bubble-plain", children: /* @__PURE__ */ P.jsx(
|
|
14362
14358
|
my,
|
|
14363
14359
|
{
|
|
14364
14360
|
remarkPlugins: [ky],
|
|
14365
14361
|
components: {
|
|
14366
|
-
ul: ({ node: k, ...O }) => /* @__PURE__ */
|
|
14367
|
-
li: ({ children: k, ...O }) => /* @__PURE__ */
|
|
14368
|
-
/* @__PURE__ */
|
|
14369
|
-
/* @__PURE__ */
|
|
14362
|
+
ul: ({ node: k, ...O }) => /* @__PURE__ */ P.jsx("ul", { className: "md-ul", ...O }),
|
|
14363
|
+
li: ({ children: k, ...O }) => /* @__PURE__ */ P.jsxs("li", { className: "md-li", ...O, children: [
|
|
14364
|
+
/* @__PURE__ */ P.jsx("span", { className: "md-li-bullet", "aria-hidden": !0 }),
|
|
14365
|
+
/* @__PURE__ */ P.jsx("div", { className: "md-li-content", children: k })
|
|
14370
14366
|
] }),
|
|
14371
14367
|
a: ({ href: k, children: O, ...z }) => {
|
|
14372
14368
|
var F;
|
|
@@ -14377,7 +14373,7 @@ function FR({
|
|
|
14377
14373
|
const H = parseInt(N, 10), M = o.sources[H];
|
|
14378
14374
|
if (!M || !M.is_public || !M.original_file_name.endsWith(".pdf")) return null;
|
|
14379
14375
|
const W = `${Bh(M.original_file_name)} ${(F = M.metadata) != null && F.sectionNumber ? `s ${M.metadata.sectionNumber}` : ""} ${B ? ` p.${M.page_number}` : ""}`;
|
|
14380
|
-
return /* @__PURE__ */
|
|
14376
|
+
return /* @__PURE__ */ P.jsxs(
|
|
14381
14377
|
"a",
|
|
14382
14378
|
{
|
|
14383
14379
|
className: "md-link citation-link",
|
|
@@ -14398,11 +14394,11 @@ function FR({
|
|
|
14398
14394
|
role: "link",
|
|
14399
14395
|
title: `Open ${W}`,
|
|
14400
14396
|
children: [
|
|
14401
|
-
/* @__PURE__ */
|
|
14402
|
-
/* @__PURE__ */
|
|
14403
|
-
/* @__PURE__ */
|
|
14404
|
-
/* @__PURE__ */
|
|
14405
|
-
/* @__PURE__ */
|
|
14397
|
+
/* @__PURE__ */ P.jsx("span", { className: "md-link-text", children: String(O).includes("http") ? W : O }),
|
|
14398
|
+
/* @__PURE__ */ P.jsx("span", { className: "md-link-icon", "aria-hidden": !0, children: /* @__PURE__ */ P.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
14399
|
+
/* @__PURE__ */ P.jsx("path", { d: "M14 3h7v7", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
|
|
14400
|
+
/* @__PURE__ */ P.jsx("path", { d: "M10 14l11-11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
|
|
14401
|
+
/* @__PURE__ */ P.jsx("path", { d: "M21 14v7h-7", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" })
|
|
14406
14402
|
] }) })
|
|
14407
14403
|
]
|
|
14408
14404
|
}
|
|
@@ -14410,12 +14406,12 @@ function FR({
|
|
|
14410
14406
|
} catch (I) {
|
|
14411
14407
|
console.warn("Failed to parse citation URL:", k, I);
|
|
14412
14408
|
}
|
|
14413
|
-
return /* @__PURE__ */
|
|
14414
|
-
/* @__PURE__ */
|
|
14415
|
-
/* @__PURE__ */
|
|
14416
|
-
/* @__PURE__ */
|
|
14417
|
-
/* @__PURE__ */
|
|
14418
|
-
/* @__PURE__ */
|
|
14409
|
+
return /* @__PURE__ */ P.jsxs("a", { className: "md-link", ...z, href: k, target: "_blank", rel: "noreferrer", children: [
|
|
14410
|
+
/* @__PURE__ */ P.jsx("span", { className: "md-link-text", children: O }),
|
|
14411
|
+
/* @__PURE__ */ P.jsx("span", { className: "md-link-icon", "aria-hidden": !0, children: /* @__PURE__ */ P.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
14412
|
+
/* @__PURE__ */ P.jsx("path", { d: "M14 3h7v7", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
|
|
14413
|
+
/* @__PURE__ */ P.jsx("path", { d: "M10 14l11-11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
|
|
14414
|
+
/* @__PURE__ */ P.jsx("path", { d: "M21 14v7h-7", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" })
|
|
14419
14415
|
] }) })
|
|
14420
14416
|
] });
|
|
14421
14417
|
}
|
|
@@ -14423,8 +14419,8 @@ function FR({
|
|
|
14423
14419
|
children: d
|
|
14424
14420
|
}
|
|
14425
14421
|
) }) }),
|
|
14426
|
-
/* @__PURE__ */
|
|
14427
|
-
p.length > 0 && /* @__PURE__ */
|
|
14422
|
+
/* @__PURE__ */ P.jsxs("div", { className: "sources-copy", children: [
|
|
14423
|
+
p.length > 0 && /* @__PURE__ */ P.jsxs(
|
|
14428
14424
|
"button",
|
|
14429
14425
|
{
|
|
14430
14426
|
type: "button",
|
|
@@ -14433,27 +14429,27 @@ function FR({
|
|
|
14433
14429
|
"aria-controls": `sources-list-${o.id}`,
|
|
14434
14430
|
onClick: () => m((k) => !k),
|
|
14435
14431
|
children: [
|
|
14436
|
-
/* @__PURE__ */
|
|
14432
|
+
/* @__PURE__ */ P.jsxs("span", { children: [
|
|
14437
14433
|
"Sources (",
|
|
14438
14434
|
p.length,
|
|
14439
14435
|
")"
|
|
14440
14436
|
] }),
|
|
14441
|
-
/* @__PURE__ */
|
|
14437
|
+
/* @__PURE__ */ P.jsx("span", { className: `sources-acc-chevron${g ? " open" : ""}`, "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ P.jsx("path", { d: "M6 9l6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
14442
14438
|
]
|
|
14443
14439
|
}
|
|
14444
14440
|
),
|
|
14445
|
-
o.id && /* @__PURE__ */
|
|
14446
|
-
/* @__PURE__ */
|
|
14447
|
-
/* @__PURE__ */
|
|
14448
|
-
/* @__PURE__ */
|
|
14449
|
-
/* @__PURE__ */
|
|
14441
|
+
o.id && /* @__PURE__ */ P.jsxs("div", { className: "sources-actions", role: "group", "aria-label": "Message actions", children: [
|
|
14442
|
+
/* @__PURE__ */ P.jsxs("button", { className: "btn-copy btn-copy-inline", onClick: () => r == null ? void 0 : r(o.content), children: [
|
|
14443
|
+
/* @__PURE__ */ P.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
|
|
14444
|
+
/* @__PURE__ */ P.jsx("rect", { x: "9", y: "9", width: "10", height: "10", rx: "2", stroke: "currentColor", strokeWidth: "1.6", fill: "none" }),
|
|
14445
|
+
/* @__PURE__ */ P.jsx("rect", { x: "5", y: "5", width: "10", height: "10", rx: "2", stroke: "currentColor", strokeWidth: "1.6", fill: "none" })
|
|
14450
14446
|
] }),
|
|
14451
|
-
/* @__PURE__ */
|
|
14447
|
+
/* @__PURE__ */ P.jsx("span", { children: "Copy" })
|
|
14452
14448
|
] }),
|
|
14453
|
-
/* @__PURE__ */
|
|
14454
|
-
/* @__PURE__ */
|
|
14455
|
-
/* @__PURE__ */
|
|
14456
|
-
/* @__PURE__ */
|
|
14449
|
+
/* @__PURE__ */ P.jsx("span", { className: "sep", "aria-hidden": !0, children: "|" }),
|
|
14450
|
+
/* @__PURE__ */ P.jsx("button", { type: "button", className: "link-btn", onClick: () => b(!0), children: "Disclaimer" }),
|
|
14451
|
+
/* @__PURE__ */ P.jsx("span", { className: "sep", "aria-hidden": !0, children: "|" }),
|
|
14452
|
+
/* @__PURE__ */ P.jsxs(
|
|
14457
14453
|
"button",
|
|
14458
14454
|
{
|
|
14459
14455
|
type: "button",
|
|
@@ -14467,12 +14463,12 @@ function FR({
|
|
|
14467
14463
|
"aria-label": "Helpful",
|
|
14468
14464
|
title: "Helpful",
|
|
14469
14465
|
children: [
|
|
14470
|
-
/* @__PURE__ */
|
|
14471
|
-
/* @__PURE__ */
|
|
14466
|
+
/* @__PURE__ */ P.jsx("svg", { className: "icon-thumb", width: "14", height: "14", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("path", { d: "M2 21h4V9H2v12ZM22 10c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32a1 1 0 0 0-.29-.7L13 1 7.59 6.41A2 2 0 0 0 7 7.83V19a2 2 0 0 0 2 2h7a2 2 0 0 0 1.9-1.37l2.26-6.77c.05-.2.08-.41.08-.62V10Z", fill: "none" }) }),
|
|
14467
|
+
/* @__PURE__ */ P.jsx("span", { children: "Helpful" })
|
|
14472
14468
|
]
|
|
14473
14469
|
}
|
|
14474
14470
|
),
|
|
14475
|
-
/* @__PURE__ */
|
|
14471
|
+
/* @__PURE__ */ P.jsxs(
|
|
14476
14472
|
"button",
|
|
14477
14473
|
{
|
|
14478
14474
|
type: "button",
|
|
@@ -14486,20 +14482,20 @@ function FR({
|
|
|
14486
14482
|
"aria-label": "Not helpful",
|
|
14487
14483
|
title: "Not helpful",
|
|
14488
14484
|
children: [
|
|
14489
|
-
/* @__PURE__ */
|
|
14490
|
-
/* @__PURE__ */
|
|
14485
|
+
/* @__PURE__ */ P.jsx("svg", { className: "icon-thumb", width: "14", height: "14", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("path", { d: "M22 3h-4v12h4V3ZM2 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .26.1.52.29.71L11 23l5.41-5.41c.38-.38.59-.89.59-1.42V5a2 2 0 0 0-2-2H8a2 2 0 0 0-1.9 1.37L3.84 11.14c-.05.2-.08.41-.08.62V14Z", fill: "none" }) }),
|
|
14486
|
+
/* @__PURE__ */ P.jsx("span", { children: "Not Helpful" })
|
|
14491
14487
|
]
|
|
14492
14488
|
}
|
|
14493
14489
|
)
|
|
14494
14490
|
] }),
|
|
14495
|
-
g && p.length > 0 && /* @__PURE__ */
|
|
14491
|
+
g && p.length > 0 && /* @__PURE__ */ P.jsx("ul", { id: `sources-list-${o.id}`, className: "sources-acc-list", children: [...p].sort((k, O) => {
|
|
14496
14492
|
const z = (k.file_type || "").toString(), F = (O.file_type || "").toString();
|
|
14497
14493
|
if (z !== F) return z.localeCompare(F);
|
|
14498
14494
|
const I = Bh(k.original_file_name || ""), B = Bh(O.original_file_name || "");
|
|
14499
14495
|
return I.localeCompare(B);
|
|
14500
14496
|
}).map((k) => {
|
|
14501
14497
|
const O = k.pageMin != null && k.pageMax != null && k.pageMin === k.pageMax, z = k.pageMin == null || k.pageMax == null ? void 0 : O ? `Page ${k.pageMin}` : `Pages ${k.pageMin}–${k.pageMax}`, F = Bh(k.original_file_name || "");
|
|
14502
|
-
return /* @__PURE__ */
|
|
14498
|
+
return /* @__PURE__ */ P.jsx("li", { className: "sources-acc-item", children: /* @__PURE__ */ P.jsxs(
|
|
14503
14499
|
"button",
|
|
14504
14500
|
{
|
|
14505
14501
|
className: "sources-acc-link",
|
|
@@ -14510,8 +14506,8 @@ function FR({
|
|
|
14510
14506
|
i({ filename: k.filename, originalFileName: k.original_file_name, page: B, highlight: (M = (H = I[0]) == null ? void 0 : H.content) == null ? void 0 : M.slice(0, 500), sourcesGroup: I });
|
|
14511
14507
|
},
|
|
14512
14508
|
children: [
|
|
14513
|
-
/* @__PURE__ */
|
|
14514
|
-
z && /* @__PURE__ */
|
|
14509
|
+
/* @__PURE__ */ P.jsx("span", { className: "sources-acc-name", children: F }),
|
|
14510
|
+
z && /* @__PURE__ */ P.jsx("span", { className: "sources-acc-page", children: z })
|
|
14515
14511
|
]
|
|
14516
14512
|
}
|
|
14517
14513
|
) }, k.filename);
|
|
@@ -14528,13 +14524,13 @@ function FR({
|
|
|
14528
14524
|
const f = d[0], p = (f == null ? void 0 : f[0]) || "T", g = (f == null ? void 0 : f[1]) || "P";
|
|
14529
14525
|
return (p + g).toUpperCase();
|
|
14530
14526
|
})();
|
|
14531
|
-
return /* @__PURE__ */
|
|
14527
|
+
return /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
|
|
14532
14528
|
(() => {
|
|
14533
14529
|
var d;
|
|
14534
14530
|
const h = (d = t == null ? void 0 : t.avatarUrl) == null ? void 0 : d.trim();
|
|
14535
|
-
return h ? /* @__PURE__ */
|
|
14531
|
+
return h ? /* @__PURE__ */ P.jsx("img", { className: "user-avatar-img", src: h, alt: (t == null ? void 0 : t.name) || a }) : /* @__PURE__ */ P.jsx("div", { className: "user-avatar", "aria-hidden": !0, children: a });
|
|
14536
14532
|
})(),
|
|
14537
|
-
/* @__PURE__ */
|
|
14533
|
+
/* @__PURE__ */ P.jsx("div", { className: "bubble user-bubble", children: /* @__PURE__ */ P.jsx(my, { remarkPlugins: [ky], components: { a: ({ node: h, ...d }) => /* @__PURE__ */ P.jsx("a", { ...d, target: "_blank", rel: "noreferrer" }) }, children: (((u = o.content) == null ? void 0 : u.trim()) || "").length ? o.content : "_(no content)_" }) })
|
|
14538
14534
|
] });
|
|
14539
14535
|
}
|
|
14540
14536
|
function jR({
|
|
@@ -14542,9 +14538,9 @@ function jR({
|
|
|
14542
14538
|
currentPage: e,
|
|
14543
14539
|
onSelect: t
|
|
14544
14540
|
}) {
|
|
14545
|
-
return /* @__PURE__ */
|
|
14546
|
-
/* @__PURE__ */
|
|
14547
|
-
/* @__PURE__ */
|
|
14541
|
+
return /* @__PURE__ */ P.jsxs("aside", { className: "pdf-sources", "aria-label": "Citations", children: [
|
|
14542
|
+
/* @__PURE__ */ P.jsx("div", { className: "pdf-sources-title", children: "Citations" }),
|
|
14543
|
+
/* @__PURE__ */ P.jsx("ul", { className: "pdf-sources-list", children: n.map((i, r) => /* @__PURE__ */ P.jsx("li", { children: /* @__PURE__ */ P.jsxs(
|
|
14548
14544
|
"button",
|
|
14549
14545
|
{
|
|
14550
14546
|
className: `pdf-source-item${(e || 1) === (i.page_number || 1) ? " active" : ""}`,
|
|
@@ -14552,14 +14548,14 @@ function jR({
|
|
|
14552
14548
|
title: `Go to p.${i.page_number || 1}`,
|
|
14553
14549
|
type: "button",
|
|
14554
14550
|
children: [
|
|
14555
|
-
/* @__PURE__ */
|
|
14556
|
-
/* @__PURE__ */
|
|
14557
|
-
/* @__PURE__ */
|
|
14558
|
-
/* @__PURE__ */
|
|
14551
|
+
/* @__PURE__ */ P.jsx("span", { className: "pdf-source-rank", "aria-hidden": !0, children: r + 1 }),
|
|
14552
|
+
/* @__PURE__ */ P.jsxs("span", { className: "pdf-source-text", children: [
|
|
14553
|
+
/* @__PURE__ */ P.jsx("span", { className: "pdf-source-filename", children: Md(i.original_file_name) }),
|
|
14554
|
+
/* @__PURE__ */ P.jsxs("span", { className: "pdf-source-page", children: [
|
|
14559
14555
|
"p.",
|
|
14560
14556
|
i.page_number || 1
|
|
14561
14557
|
] }),
|
|
14562
|
-
!!i.content && /* @__PURE__ */
|
|
14558
|
+
!!i.content && /* @__PURE__ */ P.jsx("span", { className: "pdf-source-snippet", children: i.content })
|
|
14563
14559
|
] })
|
|
14564
14560
|
]
|
|
14565
14561
|
}
|
|
@@ -17145,7 +17141,7 @@ pu = new WeakMap(), _o = new WeakMap(), gu = new WeakMap(), mu = new WeakMap(),
|
|
|
17145
17141
|
touch1Y: i.screenY
|
|
17146
17142
|
});
|
|
17147
17143
|
}, ox = function(e) {
|
|
17148
|
-
var
|
|
17144
|
+
var T;
|
|
17149
17145
|
if (!c(this, jr) || e.touches.length !== 2)
|
|
17150
17146
|
return;
|
|
17151
17147
|
let [t, i] = e.touches;
|
|
@@ -17169,7 +17165,7 @@ pu = new WeakMap(), _o = new WeakMap(), gu = new WeakMap(), mu = new WeakMap(),
|
|
|
17169
17165
|
return;
|
|
17170
17166
|
}
|
|
17171
17167
|
const E = [(r + o) / 2, (s + a) / 2];
|
|
17172
|
-
(
|
|
17168
|
+
(T = c(this, yu)) == null || T.call(this, E, w, b);
|
|
17173
17169
|
}, Yp = function(e) {
|
|
17174
17170
|
var t;
|
|
17175
17171
|
c(this, _s).abort(), y(this, _s, null), (t = c(this, vu)) == null || t.call(this), c(this, jr) && (e.preventDefault(), y(this, jr, null), y(this, _o, !1));
|
|
@@ -17995,8 +17991,8 @@ To = new WeakMap(), Oi = new WeakMap(), gt = new WeakMap(), il = new WeakMap(),
|
|
|
17995
17991
|
w = !0, m = (L, D) => [0, D / 2], v = (L, D) => [L, D / 2];
|
|
17996
17992
|
break;
|
|
17997
17993
|
}
|
|
17998
|
-
const E = m(a, l),
|
|
17999
|
-
let C = f(...
|
|
17994
|
+
const E = m(a, l), T = v(a, l);
|
|
17995
|
+
let C = f(...T);
|
|
18000
17996
|
const k = Ne._round(s + C[0]), O = Ne._round(o + C[1]);
|
|
18001
17997
|
let z = 1, F = 1, I, B;
|
|
18002
17998
|
if (t.fromKeyboard)
|
|
@@ -18013,8 +18009,8 @@ To = new WeakMap(), Oi = new WeakMap(), gt = new WeakMap(), il = new WeakMap(),
|
|
|
18013
18009
|
}
|
|
18014
18010
|
if ([I, B] = g(I / i, B / r), b) {
|
|
18015
18011
|
const L = Math.hypot(a, l);
|
|
18016
|
-
z = F = Math.max(Math.min(Math.hypot(
|
|
18017
|
-
} else w ? z = Math.max(u, Math.min(1, Math.abs(
|
|
18012
|
+
z = F = Math.max(Math.min(Math.hypot(T[0] - E[0] - I, T[1] - E[1] - B) / L, 1 / a, 1 / l), u / a, h / l);
|
|
18013
|
+
} else w ? z = Math.max(u, Math.min(1, Math.abs(T[0] - E[0] - I))) / a : F = Math.max(h, Math.min(1, Math.abs(T[1] - E[1] - B))) / l;
|
|
18018
18014
|
const N = Ne._round(a * z), H = Ne._round(l * F);
|
|
18019
18015
|
C = f(...v(N, H));
|
|
18020
18016
|
const M = k - C[0], W = O - C[1];
|
|
@@ -18037,8 +18033,8 @@ To = new WeakMap(), Oi = new WeakMap(), gt = new WeakMap(), il = new WeakMap(),
|
|
|
18037
18033
|
if (v === f && b === p)
|
|
18038
18034
|
return;
|
|
18039
18035
|
c(this, Xn) || y(this, Xn, [h, d, f, p]);
|
|
18040
|
-
const w = a(f / 2, p / 2), E = Ne._round(h + w[0]),
|
|
18041
|
-
this.x = E - C[0], this.y =
|
|
18036
|
+
const w = a(f / 2, p / 2), E = Ne._round(h + w[0]), T = Ne._round(d + w[1]), C = a(v / 2, b / 2);
|
|
18037
|
+
this.x = E - C[0], this.y = T - C[1], this.width = v, this.height = b, this.setDims(l * v, u * b), this.fixAndSetPosition(), this._onResizing();
|
|
18042
18038
|
}, hx = function() {
|
|
18043
18039
|
var e;
|
|
18044
18040
|
(e = c(this, gt)) == null || e.toggle(!0), this.parent.togglePointerEvents(!0), A(this, we, ud).call(this);
|
|
@@ -18417,11 +18413,11 @@ class cI {
|
|
|
18417
18413
|
return $e(this, "_loadTestFont", e);
|
|
18418
18414
|
}
|
|
18419
18415
|
_prepareFontLoadEvent(e, t) {
|
|
18420
|
-
function i(
|
|
18421
|
-
return
|
|
18416
|
+
function i(T, C) {
|
|
18417
|
+
return T.charCodeAt(C) << 24 | T.charCodeAt(C + 1) << 16 | T.charCodeAt(C + 2) << 8 | T.charCodeAt(C + 3) & 255;
|
|
18422
18418
|
}
|
|
18423
|
-
function r(
|
|
18424
|
-
const z =
|
|
18419
|
+
function r(T, C, k, O) {
|
|
18420
|
+
const z = T.substring(0, C), F = T.substring(C + k);
|
|
18425
18421
|
return z + O + F;
|
|
18426
18422
|
}
|
|
18427
18423
|
let s, o;
|
|
@@ -18429,16 +18425,16 @@ class cI {
|
|
|
18429
18425
|
a.width = 1, a.height = 1;
|
|
18430
18426
|
const l = a.getContext("2d");
|
|
18431
18427
|
let u = 0;
|
|
18432
|
-
function h(
|
|
18428
|
+
function h(T, C) {
|
|
18433
18429
|
if (++u > 30) {
|
|
18434
18430
|
Me("Load test font never loaded."), C();
|
|
18435
18431
|
return;
|
|
18436
18432
|
}
|
|
18437
|
-
if (l.font = "30px " +
|
|
18433
|
+
if (l.font = "30px " + T, l.fillText(".", 0, 20), l.getImageData(0, 0, 1, 1).data[3] > 0) {
|
|
18438
18434
|
C();
|
|
18439
18435
|
return;
|
|
18440
18436
|
}
|
|
18441
|
-
setTimeout(h.bind(null,
|
|
18437
|
+
setTimeout(h.bind(null, T, C));
|
|
18442
18438
|
}
|
|
18443
18439
|
const d = `lt${Date.now()}${this.loadTestFontId++}`;
|
|
18444
18440
|
let f = this._loadTestFont;
|
|
@@ -18452,9 +18448,9 @@ class cI {
|
|
|
18452
18448
|
this.insertRule(w);
|
|
18453
18449
|
const E = this._document.createElement("div");
|
|
18454
18450
|
E.style.visibility = "hidden", E.style.width = E.style.height = "10px", E.style.position = "absolute", E.style.top = E.style.left = "0px";
|
|
18455
|
-
for (const
|
|
18451
|
+
for (const T of [e.loadedName, d]) {
|
|
18456
18452
|
const C = this._document.createElement("span");
|
|
18457
|
-
C.textContent = "Hi", C.style.fontFamily =
|
|
18453
|
+
C.textContent = "Hi", C.style.fontFamily = T, E.append(C);
|
|
18458
18454
|
}
|
|
18459
18455
|
this._document.body.append(E), h(d, () => {
|
|
18460
18456
|
E.remove(), t.complete();
|
|
@@ -18981,8 +18977,8 @@ class dI extends Ex {
|
|
|
18981
18977
|
A(this, se, Pc).call(this, h, h, h, f), A(this, se, ig).call(this, f);
|
|
18982
18978
|
const p = (m, v) => {
|
|
18983
18979
|
const b = a[m] / 255, w = l[m] / 255, E = new Array(v + 1);
|
|
18984
|
-
for (let
|
|
18985
|
-
E[
|
|
18980
|
+
for (let T = 0; T <= v; T++)
|
|
18981
|
+
E[T] = b + T / v * (w - b);
|
|
18986
18982
|
return E.join(",");
|
|
18987
18983
|
};
|
|
18988
18984
|
return A(this, se, Pc).call(this, p(0, 5), p(1, 5), p(2, 5), f), o.url = A(this, se, La).call(this, d), o.url;
|
|
@@ -19024,8 +19020,8 @@ class dI extends Ex {
|
|
|
19024
19020
|
const [u, h] = [i, r].map(A(this, se, Rc).bind(this));
|
|
19025
19021
|
let d = Math.round(0.2126 * u[0] + 0.7152 * u[1] + 0.0722 * u[2]), f = Math.round(0.2126 * h[0] + 0.7152 * h[1] + 0.0722 * h[2]), [p, g] = [s, o].map(A(this, se, Rc).bind(this));
|
|
19026
19022
|
f < d && ([d, f, p, g] = [f, d, g, p]), c(this, se, Ma).style.color = "";
|
|
19027
|
-
const m = (E,
|
|
19028
|
-
const k = new Array(256), O = (f - d) / C, z = E / 255, F = (
|
|
19023
|
+
const m = (E, T, C) => {
|
|
19024
|
+
const k = new Array(256), O = (f - d) / C, z = E / 255, F = (T - E) / (255 * C);
|
|
19029
19025
|
let I = 0;
|
|
19030
19026
|
for (let B = 0; B <= C; B++) {
|
|
19031
19027
|
const N = Math.round(d + B * O), H = z + B * F;
|
|
@@ -19194,18 +19190,18 @@ function up(n, e, t, i, r, s, o, a) {
|
|
|
19194
19190
|
const p = (l[t] + e.offsetX) * e.scaleX, g = (l[t + 1] + e.offsetY) * e.scaleY, m = (l[i] + e.offsetX) * e.scaleX, v = (l[i + 1] + e.offsetY) * e.scaleY, b = (l[r] + e.offsetX) * e.scaleX, w = (l[r + 1] + e.offsetY) * e.scaleY;
|
|
19195
19191
|
if (g >= w)
|
|
19196
19192
|
return;
|
|
19197
|
-
const E = u[s],
|
|
19193
|
+
const E = u[s], T = u[s + 1], C = u[s + 2], k = u[o], O = u[o + 1], z = u[o + 2], F = u[a], I = u[a + 1], B = u[a + 2], N = Math.round(g), H = Math.round(w);
|
|
19198
19194
|
let M, W, L, D, ie, fe, S, U;
|
|
19199
19195
|
for (let ee = N; ee <= H; ee++) {
|
|
19200
19196
|
if (ee < v) {
|
|
19201
19197
|
const Z = ee < g ? 0 : (g - ee) / (g - v);
|
|
19202
|
-
M = p - (p - m) * Z, W = E - (E - k) * Z, L =
|
|
19198
|
+
M = p - (p - m) * Z, W = E - (E - k) * Z, L = T - (T - O) * Z, D = C - (C - z) * Z;
|
|
19203
19199
|
} else {
|
|
19204
19200
|
let Z;
|
|
19205
19201
|
ee > w ? Z = 1 : v === w ? Z = 0 : Z = (v - ee) / (v - w), M = m - (m - b) * Z, W = k - (k - F) * Z, L = O - (O - I) * Z, D = z - (z - B) * Z;
|
|
19206
19202
|
}
|
|
19207
19203
|
let _;
|
|
19208
|
-
ee < g ? _ = 0 : ee > w ? _ = 1 : _ = (g - ee) / (g - w), ie = p - (p - b) * _, fe = E - (E - F) * _, S =
|
|
19204
|
+
ee < g ? _ = 0 : ee > w ? _ = 1 : _ = (g - ee) / (g - w), ie = p - (p - b) * _, fe = E - (E - F) * _, S = T - (T - I) * _, U = C - (C - B) * _;
|
|
19209
19205
|
const Q = Math.round(Math.min(M, ie)), de = Math.round(Math.max(M, ie));
|
|
19210
19206
|
let G = d * ee + Q * 4;
|
|
19211
19207
|
for (let Z = Q; Z <= de; Z++)
|
|
@@ -19244,15 +19240,15 @@ class vI extends Pm {
|
|
|
19244
19240
|
offsetY: -l,
|
|
19245
19241
|
scaleX: 1 / p,
|
|
19246
19242
|
scaleY: 1 / g
|
|
19247
|
-
}, v = d + 2 * 2, b = f + 2 * 2, w = i.getCanvas("mesh", v, b), E = w.context,
|
|
19243
|
+
}, v = d + 2 * 2, b = f + 2 * 2, w = i.getCanvas("mesh", v, b), E = w.context, T = E.createImageData(d, f);
|
|
19248
19244
|
if (t) {
|
|
19249
|
-
const k =
|
|
19245
|
+
const k = T.data;
|
|
19250
19246
|
for (let O = 0, z = k.length; O < z; O += 4)
|
|
19251
19247
|
k[O] = t[0], k[O + 1] = t[1], k[O + 2] = t[2], k[O + 3] = 255;
|
|
19252
19248
|
}
|
|
19253
19249
|
for (const k of this._figures)
|
|
19254
|
-
yI(
|
|
19255
|
-
return E.putImageData(
|
|
19250
|
+
yI(T, k, m);
|
|
19251
|
+
return E.putImageData(T, 2, 2), {
|
|
19256
19252
|
canvas: w.canvas,
|
|
19257
19253
|
offsetX: a - 2 * p,
|
|
19258
19254
|
offsetY: l - 2 * g,
|
|
@@ -19311,14 +19307,14 @@ const Ry = {
|
|
|
19311
19307
|
} = this;
|
|
19312
19308
|
l = Math.abs(l), u = Math.abs(u), _f("TilingType: " + s);
|
|
19313
19309
|
const h = t[0], d = t[1], f = t[2], p = t[3], g = f - h, m = p - d, v = me.singularValueDecompose2dScale(this.matrix), b = me.singularValueDecompose2dScale(this.baseTransform), w = v[0] * b[0], E = v[1] * b[1];
|
|
19314
|
-
let
|
|
19310
|
+
let T = g, C = m, k = !1, O = !1;
|
|
19315
19311
|
const z = Math.ceil(l * w), F = Math.ceil(u * E), I = Math.ceil(g * w), B = Math.ceil(m * E);
|
|
19316
|
-
z >= I ?
|
|
19317
|
-
const N = this.getSizeAndScale(
|
|
19312
|
+
z >= I ? T = l : k = !0, F >= B ? C = u : O = !0;
|
|
19313
|
+
const N = this.getSizeAndScale(T, this.ctx.canvas.width, w), H = this.getSizeAndScale(C, this.ctx.canvas.height, E), M = e.cachedCanvases.getCanvas("pattern", N.size, H.size), W = M.context, L = a.createCanvasGraphics(W);
|
|
19318
19314
|
if (L.groupLevel = e.groupLevel, this.setFillAndStrokeStyleToContext(L, r, o), W.translate(-N.scale * h, -H.scale * d), L.transform(N.scale, 0, 0, H.scale, 0, 0), W.save(), this.clipBbox(L, h, d, f, p), L.baseTransform = bt(L.ctx), L.executeOperatorList(i), L.endDrawing(), W.restore(), k || O) {
|
|
19319
19315
|
const D = M.canvas;
|
|
19320
|
-
k && (
|
|
19321
|
-
const ie = this.getSizeAndScale(
|
|
19316
|
+
k && (T = l), O && (C = u);
|
|
19317
|
+
const ie = this.getSizeAndScale(T, this.ctx.canvas.width, w), fe = this.getSizeAndScale(C, this.ctx.canvas.height, E), S = ie.size, U = fe.size, ee = e.cachedCanvases.getCanvas("pattern-workaround", S, U), _ = ee.context, Q = k ? Math.floor(g / l) : 0, de = O ? Math.floor(m / u) : 0;
|
|
19322
19318
|
for (let G = 0; G <= Q; G++)
|
|
19323
19319
|
for (let Z = 0; Z <= de; Z++)
|
|
19324
19320
|
_.drawImage(D, S * G, U * Z, S, U, 0, 0, S, U);
|
|
@@ -19464,11 +19460,11 @@ class EI {
|
|
|
19464
19460
|
function Yh(n, e, t, i, r, s, o, a, l, u) {
|
|
19465
19461
|
const [h, d, f, p, g, m] = bt(n);
|
|
19466
19462
|
if (d === 0 && f === 0) {
|
|
19467
|
-
const w = o * h + g, E = Math.round(w),
|
|
19463
|
+
const w = o * h + g, E = Math.round(w), T = a * p + m, C = Math.round(T), k = (o + l) * h + g, O = Math.abs(Math.round(k) - E) || 1, z = (a + u) * p + m, F = Math.abs(Math.round(z) - C) || 1;
|
|
19468
19464
|
return n.setTransform(Math.sign(h), 0, 0, Math.sign(p), E, C), n.drawImage(e, t, i, r, s, 0, 0, O, F), n.setTransform(h, d, f, p, g, m), [O, F];
|
|
19469
19465
|
}
|
|
19470
19466
|
if (h === 0 && p === 0) {
|
|
19471
|
-
const w = a * f + g, E = Math.round(w),
|
|
19467
|
+
const w = a * f + g, E = Math.round(w), T = o * d + m, C = Math.round(T), k = (a + u) * f + g, O = Math.abs(Math.round(k) - E) || 1, z = (o + l) * d + m, F = Math.abs(Math.round(z) - C) || 1;
|
|
19472
19468
|
return n.setTransform(0, Math.sign(d), Math.sign(f), 0, E, C), n.drawImage(e, t, i, r, s, 0, 0, F, O), n.setTransform(h, d, f, p, g, m), [F, O];
|
|
19473
19469
|
}
|
|
19474
19470
|
n.drawImage(e, t, i, r, s, o, a, l, u);
|
|
@@ -19516,14 +19512,14 @@ function _I(n) {
|
|
|
19516
19512
|
continue;
|
|
19517
19513
|
m.moveTo(b % s, a);
|
|
19518
19514
|
const E = b;
|
|
19519
|
-
let
|
|
19515
|
+
let T = o[b];
|
|
19520
19516
|
do {
|
|
19521
|
-
const C = g[
|
|
19517
|
+
const C = g[T];
|
|
19522
19518
|
do
|
|
19523
19519
|
b += C;
|
|
19524
19520
|
while (!o[b]);
|
|
19525
19521
|
const k = o[b];
|
|
19526
|
-
k !== 5 && k !== 10 ? (
|
|
19522
|
+
k !== 5 && k !== 10 ? (T = k, o[b] = 0) : (T = k & 51 * T >> 4, o[b] &= T >> 2 | T << 2), m.lineTo(b % s, b / s | 0), o[b] || --p;
|
|
19527
19523
|
} while (E !== b);
|
|
19528
19524
|
--a;
|
|
19529
19525
|
}
|
|
@@ -19589,7 +19585,7 @@ function Dy(n, e) {
|
|
|
19589
19585
|
const h = e.data, d = a.data;
|
|
19590
19586
|
let f, p, g, m;
|
|
19591
19587
|
if (e.kind === nd.GRAYSCALE_1BPP) {
|
|
19592
|
-
const v = h.byteLength, b = new Uint32Array(d.buffer, 0, d.byteLength >> 2), w = b.length, E = i + 7 >> 3,
|
|
19588
|
+
const v = h.byteLength, b = new Uint32Array(d.buffer, 0, d.byteLength >> 2), w = b.length, E = i + 7 >> 3, T = 4294967295, C = In.isLittleEndian ? 4278190080 : 255;
|
|
19593
19589
|
for (f = 0; f < o; f++) {
|
|
19594
19590
|
for (g = f < s ? Hn : r, u = 0, p = 0; p < g; p++) {
|
|
19595
19591
|
const k = v - l;
|
|
@@ -19597,9 +19593,9 @@ function Dy(n, e) {
|
|
|
19597
19593
|
const z = k > E ? i : k * 8 - 7, F = z & -8;
|
|
19598
19594
|
let I = 0, B = 0;
|
|
19599
19595
|
for (; O < F; O += 8)
|
|
19600
|
-
B = h[l++], b[u++] = B & 128 ?
|
|
19596
|
+
B = h[l++], b[u++] = B & 128 ? T : C, b[u++] = B & 64 ? T : C, b[u++] = B & 32 ? T : C, b[u++] = B & 16 ? T : C, b[u++] = B & 8 ? T : C, b[u++] = B & 4 ? T : C, b[u++] = B & 2 ? T : C, b[u++] = B & 1 ? T : C;
|
|
19601
19597
|
for (; O < z; O++)
|
|
19602
|
-
I === 0 && (B = h[l++], I = 128), b[u++] = B & I ?
|
|
19598
|
+
I === 0 && (B = h[l++], I = 128), b[u++] = B & I ? T : C, I >>= 1;
|
|
19603
19599
|
}
|
|
19604
19600
|
for (; u < w; )
|
|
19605
19601
|
b[u++] = 0;
|
|
@@ -19763,10 +19759,10 @@ const Lm = class Lm {
|
|
|
19763
19759
|
h || (d = this.cachedCanvases.getCanvas("maskCanvas", i, r), Fy(d.context, e));
|
|
19764
19760
|
let f = me.transform(a, [1 / i, 0, 0, -1 / r, 0, 0]);
|
|
19765
19761
|
f = me.transform(f, [1, 0, 0, 1, 0, -r]);
|
|
19766
|
-
const [p, g, m, v] = me.getAxialAlignedBoundingBox([0, 0, i, r], f), b = Math.round(m - p) || 1, w = Math.round(v - g) || 1, E = this.cachedCanvases.getCanvas("fillCanvas", b, w),
|
|
19767
|
-
|
|
19768
|
-
const O = me.transform(Qi(
|
|
19769
|
-
return
|
|
19762
|
+
const [p, g, m, v] = me.getAxialAlignedBoundingBox([0, 0, i, r], f), b = Math.round(m - p) || 1, w = Math.round(v - g) || 1, E = this.cachedCanvases.getCanvas("fillCanvas", b, w), T = E.context, C = p, k = g;
|
|
19763
|
+
T.translate(-C, -k), T.transform(...f), h || (h = this._scaleImage(d.canvas, Qi(T)), h = h.img, l && o && l.set(u, h)), T.imageSmoothingEnabled = jy(bt(T), e.interpolate), Yh(T, h, 0, 0, h.width, h.height, 0, 0, i, r), T.globalCompositeOperation = "source-in";
|
|
19764
|
+
const O = me.transform(Qi(T), [1, 0, 0, 1, -C, -k]);
|
|
19765
|
+
return T.fillStyle = o ? s.getPattern(t, this, O, bn.FILL) : s, T.fillRect(0, 0, i, r), l && !o && (this.cachedCanvases.delete("fillCanvas"), l.set(u, E.canvas)), {
|
|
19770
19766
|
canvas: E.canvas,
|
|
19771
19767
|
offsetX: Math.round(C),
|
|
19772
19768
|
offsetY: Math.round(k)
|
|
@@ -20094,12 +20090,12 @@ const Lm = class Lm {
|
|
|
20094
20090
|
w = bt(s), s.restore(), s.strokeStyle = O;
|
|
20095
20091
|
}
|
|
20096
20092
|
let E = t.lineWidth;
|
|
20097
|
-
const
|
|
20098
|
-
if (
|
|
20093
|
+
const T = t.textMatrixScale;
|
|
20094
|
+
if (T === 0 || E === 0) {
|
|
20099
20095
|
const O = t.textRenderingMode & ln.FILL_STROKE_MASK;
|
|
20100
20096
|
(O === ln.STROKE || O === ln.FILL_STROKE) && (E = this.getSinglePixelWidth());
|
|
20101
20097
|
} else
|
|
20102
|
-
E /=
|
|
20098
|
+
E /= T;
|
|
20103
20099
|
if (o !== 1 && (s.scale(o, o), E /= o), s.lineWidth = E, i.isInvalidPDFjsFont) {
|
|
20104
20100
|
const O = [];
|
|
20105
20101
|
let z = 0;
|
|
@@ -21957,7 +21953,7 @@ function rO(n = {}) {
|
|
|
21957
21953
|
docId: t
|
|
21958
21954
|
} = e, i = n.url ? sO(n.url) : null, r = n.data ? oO(n.data) : null, s = n.httpHeaders || null, o = n.withCredentials === !0, a = n.password ?? null, l = n.range instanceof Bx ? n.range : null, u = Number.isInteger(n.rangeChunkSize) && n.rangeChunkSize > 0 ? n.rangeChunkSize : JI;
|
|
21959
21955
|
let h = n.worker instanceof Va ? n.worker : null;
|
|
21960
|
-
const d = n.verbosity, f = typeof n.docBaseUrl == "string" && !Pf(n.docBaseUrl) ? n.docBaseUrl : null, p = typeof n.cMapUrl == "string" ? n.cMapUrl : null, g = n.cMapPacked !== !1, m = n.CMapReaderFactory || tO, v = typeof n.standardFontDataUrl == "string" ? n.standardFontDataUrl : null, b = n.StandardFontDataFactory || iO, w = n.stopAtErrors !== !0, E = Number.isInteger(n.maxImageSize) && n.maxImageSize > -1 ? n.maxImageSize : -1,
|
|
21956
|
+
const d = n.verbosity, f = typeof n.docBaseUrl == "string" && !Pf(n.docBaseUrl) ? n.docBaseUrl : null, p = typeof n.cMapUrl == "string" ? n.cMapUrl : null, g = n.cMapPacked !== !1, m = n.CMapReaderFactory || tO, v = typeof n.standardFontDataUrl == "string" ? n.standardFontDataUrl : null, b = n.StandardFontDataFactory || iO, w = n.stopAtErrors !== !0, E = Number.isInteger(n.maxImageSize) && n.maxImageSize > -1 ? n.maxImageSize : -1, T = n.isEvalSupported !== !1, C = typeof n.isOffscreenCanvasSupported == "boolean" ? n.isOffscreenCanvasSupported : !yn, k = typeof n.isImageDecoderSupported == "boolean" ? n.isImageDecoderSupported : !yn && (In.platform.isFirefox || !globalThis.chrome), O = Number.isInteger(n.canvasMaxAreaInBytes) ? n.canvasMaxAreaInBytes : -1, z = typeof n.disableFontFace == "boolean" ? n.disableFontFace : yn, F = n.fontExtraProperties === !0, I = n.enableXfa === !0, B = n.ownerDocument || globalThis.document, N = n.disableRange === !0, H = n.disableStream === !0, M = n.disableAutoFetch === !0, W = n.pdfBug === !0, L = n.CanvasFactory || eO, D = n.FilterFactory || nO, ie = n.enableHWA === !0, fe = l ? l.length : n.length ?? NaN, S = typeof n.useSystemFonts == "boolean" ? n.useSystemFonts : !yn && !z, U = typeof n.useWorkerFetch == "boolean" ? n.useWorkerFetch : m === kx && b === Tx && p && v && Ac(p, document.baseURI) && Ac(v, document.baseURI), ee = null;
|
|
21961
21957
|
UR(d);
|
|
21962
21958
|
const _ = {
|
|
21963
21959
|
canvasFactory: new L({
|
|
@@ -21997,7 +21993,7 @@ function rO(n = {}) {
|
|
|
21997
21993
|
maxImageSize: E,
|
|
21998
21994
|
disableFontFace: z,
|
|
21999
21995
|
ignoreErrors: w,
|
|
22000
|
-
isEvalSupported:
|
|
21996
|
+
isEvalSupported: T,
|
|
22001
21997
|
isOffscreenCanvasSupported: C,
|
|
22002
21998
|
isImageDecoderSupported: k,
|
|
22003
21999
|
canvasMaxAreaInBytes: O,
|
|
@@ -22341,8 +22337,8 @@ class lO {
|
|
|
22341
22337
|
printAnnotationStorage: h = null,
|
|
22342
22338
|
isEditing: d = !1
|
|
22343
22339
|
}) {
|
|
22344
|
-
var
|
|
22345
|
-
(
|
|
22340
|
+
var T, C;
|
|
22341
|
+
(T = this._stats) == null || T.time("Overall");
|
|
22346
22342
|
const f = this._transport.getRenderingIntent(i, r, h, d), {
|
|
22347
22343
|
renderingIntent: p,
|
|
22348
22344
|
cacheKey: g
|
|
@@ -23889,7 +23885,7 @@ const Nm = class Nm {
|
|
|
23889
23885
|
const p = h.createElement("clipPath"), g = `clippath_${this.data.id}`;
|
|
23890
23886
|
p.setAttribute("id", g), p.setAttribute("clipPathUnits", "objectBoundingBox"), f.append(p);
|
|
23891
23887
|
for (let m = 2, v = e.length; m < v; m += 8) {
|
|
23892
|
-
const b = e[m], w = e[m + 1], E = e[m + 2],
|
|
23888
|
+
const b = e[m], w = e[m + 1], E = e[m + 2], T = e[m + 3], C = h.createElement("rect"), k = (E - t) / l, O = (s - w) / u, z = (b - E) / l, F = (w - T) / u;
|
|
23893
23889
|
C.setAttribute("x", k), C.setAttribute("y", O), C.setAttribute("width", z), C.setAttribute("height", F), p.append(C), a == null || a.push(`<rect vector-effect="non-scaling-stroke" x="${k}" y="${O}" width="${z}" height="${F}"/>`);
|
|
23894
23890
|
}
|
|
23895
23891
|
c(this, wl) && (a.push("</g></svg>')"), o.backgroundImage = a.join("")), this.container.append(d), this.container.style.clipPath = `url(#${g})`;
|
|
@@ -24408,7 +24404,7 @@ class yO extends Ta {
|
|
|
24408
24404
|
selectionStart: b,
|
|
24409
24405
|
selectionEnd: w
|
|
24410
24406
|
} = m;
|
|
24411
|
-
let E = b,
|
|
24407
|
+
let E = b, T = w;
|
|
24412
24408
|
switch (p.inputType) {
|
|
24413
24409
|
case "deleteWordBackward": {
|
|
24414
24410
|
const k = v.substring(0, b).match(/\w*[^\w]*$/);
|
|
@@ -24417,14 +24413,14 @@ class yO extends Ta {
|
|
|
24417
24413
|
}
|
|
24418
24414
|
case "deleteWordForward": {
|
|
24419
24415
|
const k = v.substring(b).match(/^[^\w]*\w*/);
|
|
24420
|
-
k && (
|
|
24416
|
+
k && (T += k[0].length);
|
|
24421
24417
|
break;
|
|
24422
24418
|
}
|
|
24423
24419
|
case "deleteContentBackward":
|
|
24424
24420
|
b === w && (E -= 1);
|
|
24425
24421
|
break;
|
|
24426
24422
|
case "deleteContentForward":
|
|
24427
|
-
b === w && (
|
|
24423
|
+
b === w && (T += 1);
|
|
24428
24424
|
break;
|
|
24429
24425
|
}
|
|
24430
24426
|
p.preventDefault(), (C = this.linkService.eventBus) == null || C.dispatch("dispatcheventinsandbox", {
|
|
@@ -24436,7 +24432,7 @@ class yO extends Ta {
|
|
|
24436
24432
|
change: g || "",
|
|
24437
24433
|
willCommit: !1,
|
|
24438
24434
|
selStart: E,
|
|
24439
|
-
selEnd:
|
|
24435
|
+
selEnd: T
|
|
24440
24436
|
}
|
|
24441
24437
|
});
|
|
24442
24438
|
}), this._setEventListeners(i, h, [["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"]], (p) => p.target.value);
|
|
@@ -25919,7 +25915,7 @@ const Mr = class Mr {
|
|
|
25919
25915
|
const g = p - c(this, oh), m = g / p, v = m * d, b = m * f;
|
|
25920
25916
|
let w = a, E = l;
|
|
25921
25917
|
a = u, l = h, u += v, h += b, (F = c(this, Ds)) == null || F.push(e, t);
|
|
25922
|
-
const
|
|
25918
|
+
const T = -b / g, C = v / g, k = T * c(this, Rl), O = C * c(this, Rl);
|
|
25923
25919
|
return c(this, ze).set(c(this, ze).subarray(2, 8), 0), c(this, ze).set([u + k, h + O], 4), c(this, ze).set(c(this, ze).subarray(14, 18), 12), c(this, ze).set([u - k, h - O], 16), isNaN(c(this, ze)[6]) ? (c(this, dr).length === 0 && (c(this, ze).set([a + k, l + O], 2), c(this, dr).push(NaN, NaN, NaN, NaN, (a + k - i) / s, (l + O - r) / o), c(this, ze).set([a - k, l - O], 14), c(this, Ni).push(NaN, NaN, NaN, NaN, (a - k - i) / s, (l - O - r) / o)), c(this, ze).set([w, E, a, l, u, h], 6), !this.isEmpty()) : (c(this, ze).set([w, E, a, l, u, h], 6), Math.abs(Math.atan2(E - l, w - a) - Math.atan2(b, v)) < Math.PI / 2 ? ([a, l, u, h] = c(this, ze).subarray(2, 6), c(this, dr).push(NaN, NaN, NaN, NaN, ((a + u) / 2 - i) / s, ((l + h) / 2 - r) / o), [a, l, w, E] = c(this, ze).subarray(14, 18), c(this, Ni).push(NaN, NaN, NaN, NaN, ((w + a) / 2 - i) / s, ((E + l) / 2 - r) / o), !0) : ([w, E, a, l, u, h] = c(this, ze).subarray(0, 6), c(this, dr).push(((w + 5 * a) / 6 - i) / s, ((E + 5 * l) / 6 - r) / o, ((5 * a + u) / 6 - i) / s, ((5 * l + h) / 6 - r) / o, ((a + u) / 2 - i) / s, ((l + h) / 2 - r) / o), [u, h, a, l, w, E] = c(this, ze).subarray(12, 18), c(this, Ni).push(((w + 5 * a) / 6 - i) / s, ((E + 5 * l) / 6 - r) / o, ((5 * a + u) / 6 - i) / s, ((5 * l + h) / 6 - r) / o, ((a + u) / 2 - i) / s, ((l + h) / 2 - r) / o), !0));
|
|
25924
25920
|
}
|
|
25925
25921
|
toSVGPath() {
|
|
@@ -26094,8 +26090,8 @@ class Eg {
|
|
|
26094
26090
|
width: w,
|
|
26095
26091
|
height: E
|
|
26096
26092
|
} of e) {
|
|
26097
|
-
const
|
|
26098
|
-
c(this, Fs).push(z, F), s = Math.min(s,
|
|
26093
|
+
const T = Math.floor((v - t) / u) * u, C = Math.ceil((v + w + t) / u) * u, k = Math.floor((b - t) / u) * u, O = Math.ceil((b + E + t) / u) * u, z = [T, k, O, !0], F = [C, k, O, !1];
|
|
26094
|
+
c(this, Fs).push(z, F), s = Math.min(s, T), o = Math.max(o, C), a = Math.min(a, k), l = Math.max(l, O);
|
|
26099
26095
|
}
|
|
26100
26096
|
const h = o - s + 2 * i, d = l - a + 2 * i, f = s - i, p = a - i, g = c(this, Fs).at(r ? -1 : -2), m = [g[0], g[2]];
|
|
26101
26097
|
for (const v of c(this, Fs)) {
|
|
@@ -26686,7 +26682,7 @@ const Ke = class Ke extends At {
|
|
|
26686
26682
|
const {
|
|
26687
26683
|
data: {
|
|
26688
26684
|
quadPoints: E,
|
|
26689
|
-
rect:
|
|
26685
|
+
rect: T,
|
|
26690
26686
|
rotation: C,
|
|
26691
26687
|
id: k,
|
|
26692
26688
|
color: O,
|
|
@@ -26706,7 +26702,7 @@ const Ke = class Ke extends At {
|
|
|
26706
26702
|
quadPoints: E,
|
|
26707
26703
|
boxes: null,
|
|
26708
26704
|
pageIndex: I - 1,
|
|
26709
|
-
rect:
|
|
26705
|
+
rect: T.slice(0),
|
|
26710
26706
|
rotation: C,
|
|
26711
26707
|
id: k,
|
|
26712
26708
|
deleted: !1,
|
|
@@ -26716,7 +26712,7 @@ const Ke = class Ke extends At {
|
|
|
26716
26712
|
const {
|
|
26717
26713
|
data: {
|
|
26718
26714
|
inkLists: E,
|
|
26719
|
-
rect:
|
|
26715
|
+
rect: T,
|
|
26720
26716
|
rotation: C,
|
|
26721
26717
|
id: k,
|
|
26722
26718
|
color: O,
|
|
@@ -26738,7 +26734,7 @@ const Ke = class Ke extends At {
|
|
|
26738
26734
|
inkLists: E,
|
|
26739
26735
|
boxes: null,
|
|
26740
26736
|
pageIndex: I - 1,
|
|
26741
|
-
rect:
|
|
26737
|
+
rect: T.slice(0),
|
|
26742
26738
|
rotation: C,
|
|
26743
26739
|
id: k,
|
|
26744
26740
|
deleted: !1,
|
|
@@ -26755,22 +26751,22 @@ const Ke = class Ke extends At {
|
|
|
26755
26751
|
const [d, f] = h.pageDimensions, [p, g] = h.pageTranslation;
|
|
26756
26752
|
if (a) {
|
|
26757
26753
|
const E = y(h, Zr, []);
|
|
26758
|
-
for (let
|
|
26754
|
+
for (let T = 0; T < a.length; T += 8)
|
|
26759
26755
|
E.push({
|
|
26760
|
-
x: (a[
|
|
26761
|
-
y: 1 - (a[
|
|
26762
|
-
width: (a[
|
|
26763
|
-
height: (a[
|
|
26756
|
+
x: (a[T] - p) / d,
|
|
26757
|
+
y: 1 - (a[T + 1] - g) / f,
|
|
26758
|
+
width: (a[T + 2] - a[T]) / d,
|
|
26759
|
+
height: (a[T + 1] - a[T + 5]) / f
|
|
26764
26760
|
});
|
|
26765
26761
|
A(m = h, Pe, Ig).call(m), A(v = h, Pe, uo).call(v), h.rotate(h.rotation);
|
|
26766
26762
|
} else if (l) {
|
|
26767
26763
|
y(h, Zt, !0);
|
|
26768
|
-
const E = l[0],
|
|
26764
|
+
const E = l[0], T = {
|
|
26769
26765
|
x: E[0] - p,
|
|
26770
26766
|
y: f - (E[1] - g)
|
|
26771
|
-
}, C = new Cg(
|
|
26767
|
+
}, C = new Cg(T, [0, 0, d, f], 1, c(h, bi) / 2, !0, 1e-3);
|
|
26772
26768
|
for (let z = 0, F = E.length; z < F; z += 2)
|
|
26773
|
-
|
|
26769
|
+
T.x = E[z] - p, T.y = f - (E[z + 1] - g), C.add(T);
|
|
26774
26770
|
const {
|
|
26775
26771
|
id: k,
|
|
26776
26772
|
clipPathId: O
|
|
@@ -27651,19 +27647,19 @@ const Dm = class Dm extends ae {
|
|
|
27651
27647
|
}
|
|
27652
27648
|
serialize([t, i, r, s], o) {
|
|
27653
27649
|
const a = [], l = [], [u, h, d, f] = A(this, rn, Pw).call(this);
|
|
27654
|
-
let p, g, m, v, b, w, E,
|
|
27650
|
+
let p, g, m, v, b, w, E, T, C;
|
|
27655
27651
|
switch (c(this, Wl)) {
|
|
27656
27652
|
case 0:
|
|
27657
|
-
C = ae._rescale, p = t, g = i + s, m = r, v = -s, b = t + u * r, w = i + (1 - h - f) * s, E = t + (u + d) * r,
|
|
27653
|
+
C = ae._rescale, p = t, g = i + s, m = r, v = -s, b = t + u * r, w = i + (1 - h - f) * s, E = t + (u + d) * r, T = i + (1 - h) * s;
|
|
27658
27654
|
break;
|
|
27659
27655
|
case 90:
|
|
27660
|
-
C = ae._rescaleAndSwap, p = t, g = i, m = r, v = s, b = t + h * r, w = i + u * s, E = t + (h + f) * r,
|
|
27656
|
+
C = ae._rescaleAndSwap, p = t, g = i, m = r, v = s, b = t + h * r, w = i + u * s, E = t + (h + f) * r, T = i + (u + d) * s;
|
|
27661
27657
|
break;
|
|
27662
27658
|
case 180:
|
|
27663
|
-
C = ae._rescale, p = t + r, g = i, m = -r, v = s, b = t + (1 - u - d) * r, w = i + h * s, E = t + (1 - u) * r,
|
|
27659
|
+
C = ae._rescale, p = t + r, g = i, m = -r, v = s, b = t + (1 - u - d) * r, w = i + h * s, E = t + (1 - u) * r, T = i + (h + f) * s;
|
|
27664
27660
|
break;
|
|
27665
27661
|
case 270:
|
|
27666
|
-
C = ae._rescaleAndSwap, p = t + r, g = i + s, m = -r, v = -s, b = t + (1 - h - f) * r, w = i + (1 - u - d) * s, E = t + (1 - h) * r,
|
|
27662
|
+
C = ae._rescaleAndSwap, p = t + r, g = i + s, m = -r, v = -s, b = t + (1 - h - f) * r, w = i + (1 - u - d) * s, E = t + (1 - h) * r, T = i + (1 - u) * s;
|
|
27667
27663
|
break;
|
|
27668
27664
|
}
|
|
27669
27665
|
for (const {
|
|
@@ -27674,7 +27670,7 @@ const Dm = class Dm extends ae {
|
|
|
27674
27670
|
return {
|
|
27675
27671
|
lines: a,
|
|
27676
27672
|
points: l,
|
|
27677
|
-
rect: [b, w, E,
|
|
27673
|
+
rect: [b, w, E, T]
|
|
27678
27674
|
};
|
|
27679
27675
|
}
|
|
27680
27676
|
static deserialize(t, i, r, s, o, {
|
|
@@ -27713,20 +27709,20 @@ const Dm = class Dm extends ae {
|
|
|
27713
27709
|
a.push(new Float32Array([NaN, NaN, NaN, NaN, w[0], w[1], NaN, NaN, NaN, NaN, w[2], w[3]]));
|
|
27714
27710
|
continue;
|
|
27715
27711
|
}
|
|
27716
|
-
const
|
|
27717
|
-
a.push(
|
|
27712
|
+
const T = new Float32Array(3 * (E - 2));
|
|
27713
|
+
a.push(T);
|
|
27718
27714
|
let [C, k, O, z] = w.subarray(0, 4);
|
|
27719
|
-
|
|
27715
|
+
T.set([NaN, NaN, NaN, NaN, C, k], 0);
|
|
27720
27716
|
for (let F = 4; F < E; F += 2) {
|
|
27721
27717
|
const I = w[F], B = w[F + 1];
|
|
27722
|
-
|
|
27718
|
+
T.set(ae.createBezierPoints(C, k, O, z, I, B), (F - 2) * 3), [C, k, O, z] = [O, z, I, B];
|
|
27723
27719
|
}
|
|
27724
27720
|
}
|
|
27725
27721
|
}
|
|
27726
27722
|
for (let w = 0, E = a.length; w < E; w++)
|
|
27727
27723
|
d.push({
|
|
27728
|
-
line: v(a[w].map((
|
|
27729
|
-
points: v(l[w].map((
|
|
27724
|
+
line: v(a[w].map((T) => T ?? NaN), f, p, g, m),
|
|
27725
|
+
points: v(l[w].map((T) => T ?? NaN), f, p, g, m)
|
|
27730
27726
|
});
|
|
27731
27727
|
const b = new Dm();
|
|
27732
27728
|
return b.build(d, r, s, 1, u, h, o), b;
|
|
@@ -27807,9 +27803,9 @@ const Dm = class Dm extends ae {
|
|
|
27807
27803
|
const b = t + r / 2 - (u + d / 2), w = i + s / 2 - (h + f / 2);
|
|
27808
27804
|
for (const {
|
|
27809
27805
|
line: E,
|
|
27810
|
-
points:
|
|
27806
|
+
points: T
|
|
27811
27807
|
} of c(this, ii))
|
|
27812
|
-
ae._translate(E, b, w, E), ae._translate(
|
|
27808
|
+
ae._translate(E, b, w, E), ae._translate(T, b, w, T);
|
|
27813
27809
|
return {
|
|
27814
27810
|
root: {
|
|
27815
27811
|
viewBox: this.viewBox
|
|
@@ -28244,8 +28240,8 @@ const Hc = class Hc extends At {
|
|
|
28244
28240
|
v.filter = this._uiManager.hcmFilter;
|
|
28245
28241
|
let b = "white", w = "#cfcfd8";
|
|
28246
28242
|
this._uiManager.hcmFilter !== "none" ? w = "black" : (p = window.matchMedia) != null && p.call(window, "(prefers-color-scheme: dark)").matches && (b = "#8f8f9d", w = "#42414d");
|
|
28247
|
-
const E = 15,
|
|
28248
|
-
O.fillStyle = b, O.fillRect(0, 0,
|
|
28243
|
+
const E = 15, T = E * a.sx, C = E * a.sy, k = new OffscreenCanvas(T * 2, C * 2), O = k.getContext("2d");
|
|
28244
|
+
O.fillStyle = b, O.fillRect(0, 0, T * 2, C * 2), O.fillStyle = w, O.fillRect(0, 0, T, C), O.fillRect(T, C, T, C), v.fillStyle = v.createPattern(k, "repeat"), v.fillRect(0, 0, g, m), v.drawImage(l, 0, 0, l.width, l.height, 0, 0, g, m);
|
|
28249
28245
|
}
|
|
28250
28246
|
let f = null;
|
|
28251
28247
|
if (r) {
|
|
@@ -28285,7 +28281,7 @@ const Hc = class Hc extends At {
|
|
|
28285
28281
|
rotation: b,
|
|
28286
28282
|
id: w,
|
|
28287
28283
|
structParent: E,
|
|
28288
|
-
popupRef:
|
|
28284
|
+
popupRef: T
|
|
28289
28285
|
},
|
|
28290
28286
|
container: C,
|
|
28291
28287
|
parent: {
|
|
@@ -28311,7 +28307,7 @@ const Hc = class Hc extends At {
|
|
|
28311
28307
|
},
|
|
28312
28308
|
isSvg: !1,
|
|
28313
28309
|
structParent: E,
|
|
28314
|
-
popupRef:
|
|
28310
|
+
popupRef: T
|
|
28315
28311
|
};
|
|
28316
28312
|
}
|
|
28317
28313
|
const o = await super.deserialize(t, i, r), {
|
|
@@ -29163,7 +29159,7 @@ function HO() {
|
|
|
29163
29159
|
}
|
|
29164
29160
|
const Wy = /* @__PURE__ */ new Map();
|
|
29165
29161
|
function UO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto", highlights: r, clientId: s, apiKey: o, authToken: a }) {
|
|
29166
|
-
const [l, u] = Ze(0), [h, d] = Ze(!0), [f, p] = Ze(null), [g, m] = Ze(0), v = ut([]), b = ut([]), w = ut(null), E = ut(null),
|
|
29162
|
+
const [l, u] = Ze(0), [h, d] = Ze(!0), [f, p] = Ze(null), [g, m] = Ze(0), v = ut([]), b = ut([]), w = ut(null), E = ut(null), T = ut(!1), C = ut(null), k = ut(null), O = ut(1), z = nn((N) => {
|
|
29167
29163
|
try {
|
|
29168
29164
|
return !N || /^https?:\/\//i.test(N) ? N : new URL(N, window.location.origin).href;
|
|
29169
29165
|
} catch {
|
|
@@ -29182,8 +29178,8 @@ function UO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29182
29178
|
const W = await N.getPage(1), L = (W.rotate + 180) % 360, D = W.getViewport({ scale: 1, rotation: L - 180 }), ie = 0, fe = H.clientWidth, S = Math.max(1, fe - ie);
|
|
29183
29179
|
return Math.max(0.1, S / D.width);
|
|
29184
29180
|
}, []), I = nn(async () => {
|
|
29185
|
-
if (!
|
|
29186
|
-
|
|
29181
|
+
if (!T.current) {
|
|
29182
|
+
T.current = !0;
|
|
29187
29183
|
try {
|
|
29188
29184
|
const N = w.current, H = l, M = E.current;
|
|
29189
29185
|
if (!N || !H || !M) return;
|
|
@@ -29201,7 +29197,7 @@ function UO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29201
29197
|
ie.setAttribute("data-page-index", String(L)), ie.setAttribute("data-page-label", Z);
|
|
29202
29198
|
}
|
|
29203
29199
|
} finally {
|
|
29204
|
-
|
|
29200
|
+
T.current = !1, m((N) => N + 1);
|
|
29205
29201
|
}
|
|
29206
29202
|
}
|
|
29207
29203
|
}, [F, l]), B = nn((N, H) => {
|
|
@@ -29402,7 +29398,7 @@ function UO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29402
29398
|
} catch {
|
|
29403
29399
|
}
|
|
29404
29400
|
}, fe = () => {
|
|
29405
|
-
if (
|
|
29401
|
+
if (T.current) {
|
|
29406
29402
|
requestAnimationFrame(fe);
|
|
29407
29403
|
return;
|
|
29408
29404
|
}
|
|
@@ -29411,10 +29407,10 @@ function UO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29411
29407
|
}, 120);
|
|
29412
29408
|
};
|
|
29413
29409
|
fe();
|
|
29414
|
-
}, [e, l, i, g]), /* @__PURE__ */
|
|
29415
|
-
h && /* @__PURE__ */
|
|
29416
|
-
!h && f && /* @__PURE__ */
|
|
29417
|
-
/* @__PURE__ */
|
|
29410
|
+
}, [e, l, i, g]), /* @__PURE__ */ P.jsxs("div", { className: "simple-pdf-viewer", style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" }, children: [
|
|
29411
|
+
h && /* @__PURE__ */ P.jsx("div", { className: "pdf-blocker", children: /* @__PURE__ */ P.jsx("div", { className: "spinner", "aria-label": "Loading PDF viewer" }) }),
|
|
29412
|
+
!h && f && /* @__PURE__ */ P.jsx("div", { className: "pdf-error", role: "alert", style: { padding: "8px 12px", color: "#b00020" }, children: f }),
|
|
29413
|
+
/* @__PURE__ */ P.jsx("div", { ref: E, className: "simple-pdf-doc", style: { position: "absolute", inset: 0, overflowY: "scroll", overflowX: "hidden", scrollbarGutter: "stable" }, children: Array.from({ length: l }).map((N, H) => /* @__PURE__ */ P.jsx(
|
|
29418
29414
|
"div",
|
|
29419
29415
|
{
|
|
29420
29416
|
ref: (M) => {
|
|
@@ -29428,7 +29424,7 @@ function UO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29428
29424
|
display: "flex",
|
|
29429
29425
|
justifyContent: "center"
|
|
29430
29426
|
},
|
|
29431
|
-
children: /* @__PURE__ */
|
|
29427
|
+
children: /* @__PURE__ */ P.jsx("canvas", { ref: (M) => {
|
|
29432
29428
|
M && (v.current[H] = M);
|
|
29433
29429
|
} })
|
|
29434
29430
|
},
|
|
@@ -29450,8 +29446,8 @@ function WO({
|
|
|
29450
29446
|
onChangePage: h,
|
|
29451
29447
|
onMeta: d
|
|
29452
29448
|
}) {
|
|
29453
|
-
const [f, p] = Ze(!1), g = ut(null), m = ut(null), v = ut(null), [b, w] = Ze(!1), E = async (
|
|
29454
|
-
if (
|
|
29449
|
+
const [f, p] = Ze(!1), g = ut(null), m = ut(null), v = ut(null), [b, w] = Ze(!1), E = async (T) => {
|
|
29450
|
+
if (T.stopPropagation(), !!e)
|
|
29455
29451
|
try {
|
|
29456
29452
|
const C = {};
|
|
29457
29453
|
o && (C["X-Client-Id"] = o), l && (C.Authorization = `Bearer ${l}`), a && (C["x-api-key"] = a);
|
|
@@ -29472,17 +29468,17 @@ function WO({
|
|
|
29472
29468
|
console.error("Download failed:", C), alert(C instanceof Error ? C.message : "Failed to download PDF");
|
|
29473
29469
|
}
|
|
29474
29470
|
};
|
|
29475
|
-
return /* @__PURE__ */
|
|
29471
|
+
return /* @__PURE__ */ P.jsx(
|
|
29476
29472
|
"div",
|
|
29477
29473
|
{
|
|
29478
29474
|
className: `modal ${n && e ? "open" : ""} ${b ? "fullscreen" : ""}`,
|
|
29479
29475
|
onClick: u,
|
|
29480
29476
|
style: b ? { position: "fixed", inset: 0, zIndex: 2e3, background: "rgba(2,6,23,0.6)" } : void 0,
|
|
29481
|
-
children: /* @__PURE__ */
|
|
29477
|
+
children: /* @__PURE__ */ P.jsxs(
|
|
29482
29478
|
"div",
|
|
29483
29479
|
{
|
|
29484
29480
|
className: "modal-content",
|
|
29485
|
-
onClick: (
|
|
29481
|
+
onClick: (T) => T.stopPropagation(),
|
|
29486
29482
|
style: b ? {
|
|
29487
29483
|
position: "fixed",
|
|
29488
29484
|
inset: 0,
|
|
@@ -29496,31 +29492,31 @@ function WO({
|
|
|
29496
29492
|
flexDirection: "column"
|
|
29497
29493
|
} : { maxWidth: "min(1200px, 92vw)", width: "100%", margin: "6vh auto" },
|
|
29498
29494
|
children: [
|
|
29499
|
-
/* @__PURE__ */
|
|
29500
|
-
/* @__PURE__ */
|
|
29501
|
-
/* @__PURE__ */
|
|
29495
|
+
/* @__PURE__ */ P.jsxs("div", { className: "modal-header", style: b ? { display: "flex", alignItems: "center", justifyContent: "space-between" } : void 0, children: [
|
|
29496
|
+
/* @__PURE__ */ P.jsx("div", { className: "modal-title", children: t }),
|
|
29497
|
+
/* @__PURE__ */ P.jsx("button", { className: "modal-close", onClick: u, children: "×" })
|
|
29502
29498
|
] }),
|
|
29503
|
-
/* @__PURE__ */
|
|
29499
|
+
/* @__PURE__ */ P.jsx(
|
|
29504
29500
|
"div",
|
|
29505
29501
|
{
|
|
29506
29502
|
className: `modal-body ${f ? "panning" : ""}`,
|
|
29507
29503
|
ref: g,
|
|
29508
29504
|
style: b ? { flex: 1, minHeight: 0, height: "100%" } : void 0,
|
|
29509
|
-
onMouseDown: (
|
|
29510
|
-
if (
|
|
29505
|
+
onMouseDown: (T) => {
|
|
29506
|
+
if (T.button !== 0 || !T.target.closest(".pdf-stage")) return;
|
|
29511
29507
|
const k = m.current;
|
|
29512
29508
|
k && (p(!0), v.current = {
|
|
29513
|
-
startX:
|
|
29514
|
-
startY:
|
|
29509
|
+
startX: T.clientX,
|
|
29510
|
+
startY: T.clientY,
|
|
29515
29511
|
scrollLeft: k.scrollLeft,
|
|
29516
29512
|
scrollTop: k.scrollTop
|
|
29517
29513
|
});
|
|
29518
29514
|
},
|
|
29519
|
-
onMouseMove: (
|
|
29515
|
+
onMouseMove: (T) => {
|
|
29520
29516
|
if (!f || !v.current) return;
|
|
29521
29517
|
const C = m.current;
|
|
29522
29518
|
if (!C) return;
|
|
29523
|
-
const k =
|
|
29519
|
+
const k = T.clientX - v.current.startX, O = T.clientY - v.current.startY;
|
|
29524
29520
|
C.scrollLeft = v.current.scrollLeft - k, C.scrollTop = v.current.scrollTop - O;
|
|
29525
29521
|
},
|
|
29526
29522
|
onMouseUp: () => {
|
|
@@ -29529,16 +29525,16 @@ function WO({
|
|
|
29529
29525
|
onMouseLeave: () => {
|
|
29530
29526
|
p(!1), v.current = null;
|
|
29531
29527
|
},
|
|
29532
|
-
children: e && /* @__PURE__ */
|
|
29533
|
-
r && r.length > 0 && /* @__PURE__ */
|
|
29528
|
+
children: e && /* @__PURE__ */ P.jsxs("div", { className: "pdf-container", style: b ? { height: "100%", display: "grid", gridTemplateColumns: r && r.length > 0 ? "260px 1fr" : "1fr" } : void 0, children: [
|
|
29529
|
+
r && r.length > 0 && /* @__PURE__ */ P.jsx("div", { className: "pdf-citations", children: /* @__PURE__ */ P.jsx(
|
|
29534
29530
|
jR,
|
|
29535
29531
|
{
|
|
29536
29532
|
sources: r,
|
|
29537
29533
|
currentPage: i,
|
|
29538
|
-
onSelect: (
|
|
29534
|
+
onSelect: (T) => h(T)
|
|
29539
29535
|
}
|
|
29540
29536
|
) }),
|
|
29541
|
-
/* @__PURE__ */
|
|
29537
|
+
/* @__PURE__ */ P.jsx("div", { className: "pdf-content", ref: m, style: b ? { height: "100%", minHeight: 0, overflow: "auto" } : void 0, children: /* @__PURE__ */ P.jsx(
|
|
29542
29538
|
UO,
|
|
29543
29539
|
{
|
|
29544
29540
|
fileUrl: e,
|
|
@@ -29547,18 +29543,18 @@ function WO({
|
|
|
29547
29543
|
clientId: o,
|
|
29548
29544
|
apiKey: a,
|
|
29549
29545
|
authToken: l,
|
|
29550
|
-
highlights: (r || []).map((
|
|
29546
|
+
highlights: (r || []).map((T) => {
|
|
29551
29547
|
var k, O, z;
|
|
29552
29548
|
const C = {
|
|
29553
|
-
page:
|
|
29554
|
-
text:
|
|
29555
|
-
bbox: (k =
|
|
29549
|
+
page: T.page_number || 1,
|
|
29550
|
+
text: T.content || "",
|
|
29551
|
+
bbox: (k = T.metadata) == null ? void 0 : k.bbox
|
|
29556
29552
|
};
|
|
29557
29553
|
return console.log("PdfModal highlight mapping:", {
|
|
29558
|
-
sourceId:
|
|
29559
|
-
hasMetadata: !!
|
|
29560
|
-
hasBbox: !!((O =
|
|
29561
|
-
bbox: (z =
|
|
29554
|
+
sourceId: T.id,
|
|
29555
|
+
hasMetadata: !!T.metadata,
|
|
29556
|
+
hasBbox: !!((O = T.metadata) != null && O.bbox),
|
|
29557
|
+
bbox: (z = T.metadata) == null ? void 0 : z.bbox,
|
|
29562
29558
|
highlight: C
|
|
29563
29559
|
}), C;
|
|
29564
29560
|
})
|
|
@@ -29567,49 +29563,49 @@ function WO({
|
|
|
29567
29563
|
] })
|
|
29568
29564
|
}
|
|
29569
29565
|
),
|
|
29570
|
-
e && /* @__PURE__ */
|
|
29571
|
-
/* @__PURE__ */
|
|
29572
|
-
/* @__PURE__ */
|
|
29566
|
+
e && /* @__PURE__ */ P.jsxs("div", { className: "pdf-toolbar", style: b ? { display: "flex", alignItems: "center", justifyContent: "space-between" } : void 0, children: [
|
|
29567
|
+
/* @__PURE__ */ P.jsxs("div", { className: "pdf-toolbar-left", children: [
|
|
29568
|
+
/* @__PURE__ */ P.jsx(
|
|
29573
29569
|
"button",
|
|
29574
29570
|
{
|
|
29575
29571
|
type: "button",
|
|
29576
29572
|
onClick: () => h(Math.max(1, (i || 1) - 1)),
|
|
29577
29573
|
disabled: (i || 1) <= 1,
|
|
29578
29574
|
className: "pdf-btn",
|
|
29579
|
-
children: /* @__PURE__ */
|
|
29575
|
+
children: /* @__PURE__ */ P.jsx("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("path", { d: "M12 15l-5-5 5-5", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
29580
29576
|
}
|
|
29581
29577
|
),
|
|
29582
|
-
/* @__PURE__ */
|
|
29578
|
+
/* @__PURE__ */ P.jsx(
|
|
29583
29579
|
"button",
|
|
29584
29580
|
{
|
|
29585
29581
|
type: "button",
|
|
29586
29582
|
onClick: () => h(Math.min(s || 1 / 0, (i || 1) + 1)),
|
|
29587
29583
|
disabled: !!s && (i || 1) >= s,
|
|
29588
29584
|
className: "pdf-btn",
|
|
29589
|
-
children: /* @__PURE__ */
|
|
29585
|
+
children: /* @__PURE__ */ P.jsx("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("path", { d: "M8 5l5 5-5 5", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
29590
29586
|
}
|
|
29591
29587
|
)
|
|
29592
29588
|
] }),
|
|
29593
|
-
/* @__PURE__ */
|
|
29589
|
+
/* @__PURE__ */ P.jsxs("div", { className: "pdf-page-label", children: [
|
|
29594
29590
|
"Page ",
|
|
29595
29591
|
i || 1,
|
|
29596
29592
|
s ? ` / ${s}` : ""
|
|
29597
29593
|
] }),
|
|
29598
|
-
/* @__PURE__ */
|
|
29599
|
-
e && /* @__PURE__ */
|
|
29600
|
-
/* @__PURE__ */
|
|
29601
|
-
/* @__PURE__ */
|
|
29594
|
+
/* @__PURE__ */ P.jsxs("div", { className: "pdf-toolbar-right", style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
29595
|
+
e && /* @__PURE__ */ P.jsx("button", { type: "button", className: "pdf-btn", title: "Download PDF", onClick: E, children: /* @__PURE__ */ P.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
|
|
29596
|
+
/* @__PURE__ */ P.jsx("path", { d: "M12 3v10m0 0l4-4m-4 4l-4-4", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
29597
|
+
/* @__PURE__ */ P.jsx("path", { d: "M5 15v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
29602
29598
|
] }) }),
|
|
29603
|
-
/* @__PURE__ */
|
|
29599
|
+
/* @__PURE__ */ P.jsx(
|
|
29604
29600
|
"button",
|
|
29605
29601
|
{
|
|
29606
29602
|
type: "button",
|
|
29607
29603
|
className: "pdf-btn",
|
|
29608
|
-
onClick: (
|
|
29609
|
-
|
|
29604
|
+
onClick: (T) => {
|
|
29605
|
+
T.stopPropagation(), w((C) => !C);
|
|
29610
29606
|
},
|
|
29611
29607
|
title: b ? "Exit Fullscreen" : "Enter Fullscreen",
|
|
29612
|
-
children: b ? /* @__PURE__ */
|
|
29608
|
+
children: b ? /* @__PURE__ */ P.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("path", { d: "M9 9H5V5M15 9h4V5M9 15H5v4M15 15h4v4", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ P.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("path", { d: "M9 5H5v4M19 9V5h-4M9 19H5v-4M19 15v4h-4", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
29613
29609
|
}
|
|
29614
29610
|
)
|
|
29615
29611
|
] })
|
|
@@ -29626,7 +29622,7 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29626
29622
|
gn(() => {
|
|
29627
29623
|
E.current = b;
|
|
29628
29624
|
}, [b]);
|
|
29629
|
-
const [
|
|
29625
|
+
const [T, C] = Ze([]), [k, O] = Ze({}), [z, F] = Ze({ open: !1 }), [I, B] = Ze(null), N = ut(null), H = ut(!0), M = ut(!0), W = ut(0), L = ut(null), D = ut(null), ie = ut(!1), [fe, S] = Ze(!0), [U, ee] = Ze(50), [_, Q] = Ze(!1), [de, G] = Ze(!1), [Z, he] = Ze(null), [Ae, xe] = Ze(!1), [rt, te] = Ze(!0), [Et, st] = Ze(null), $t = ut(null), sn = ut(null), on = ut(null), Vn = ut(void 0), { toasts: lt, pushToast: ct } = Gw(), [ui, Ei] = Ze(null), [to, Er] = Ze(null), no = ut(null);
|
|
29630
29626
|
gn(() => {
|
|
29631
29627
|
const q = (Te) => {
|
|
29632
29628
|
if (!ui) return;
|
|
@@ -29704,7 +29700,7 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29704
29700
|
if (q.preventDefault(), !h.trim() || p) return;
|
|
29705
29701
|
const be = { role: "user", content: h.trim(), createdAt: Date.now() }, Te = [...l, be];
|
|
29706
29702
|
u(Te), d(""), g(!0), H.current = !0, v(null);
|
|
29707
|
-
const ye = !1, tt =
|
|
29703
|
+
const ye = !1, tt = T.length === 0;
|
|
29708
29704
|
let St = "";
|
|
29709
29705
|
const Kt = 500;
|
|
29710
29706
|
let Cr, wn = null;
|
|
@@ -29893,11 +29889,11 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29893
29889
|
const q = ds[ds.length - 1];
|
|
29894
29890
|
return !!(q && q.role === "assistant" && (((be = q.content) == null ? void 0 : be.trim()) || "").length > 0);
|
|
29895
29891
|
}, [ds]);
|
|
29896
|
-
return !rt && !Ae && Nt.length, /* @__PURE__ */
|
|
29897
|
-
/* @__PURE__ */
|
|
29898
|
-
/* @__PURE__ */
|
|
29899
|
-
/* @__PURE__ */
|
|
29900
|
-
/* @__PURE__ */
|
|
29892
|
+
return !rt && !Ae && Nt.length, /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
|
|
29893
|
+
/* @__PURE__ */ P.jsx(qS, {}),
|
|
29894
|
+
/* @__PURE__ */ P.jsxs("div", { className: `chat-container chat-layout${_ ? " drawer-open" : ""}`, children: [
|
|
29895
|
+
/* @__PURE__ */ P.jsxs("aside", { className: "sidebar", role: "complementary", "aria-label": "Conversations", children: [
|
|
29896
|
+
/* @__PURE__ */ P.jsx("div", { className: "sidebar-header", children: /* @__PURE__ */ P.jsxs(
|
|
29901
29897
|
"button",
|
|
29902
29898
|
{
|
|
29903
29899
|
className: "sidebar-new tile",
|
|
@@ -29913,26 +29909,26 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29913
29909
|
}
|
|
29914
29910
|
},
|
|
29915
29911
|
children: [
|
|
29916
|
-
/* @__PURE__ */
|
|
29917
|
-
/* @__PURE__ */
|
|
29912
|
+
/* @__PURE__ */ P.jsx("span", { className: "tile-label", children: "New Chat" }),
|
|
29913
|
+
/* @__PURE__ */ P.jsx("span", { className: "tile-icon", "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ P.jsx("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round" }) }) })
|
|
29918
29914
|
]
|
|
29919
29915
|
}
|
|
29920
29916
|
) }),
|
|
29921
|
-
/* @__PURE__ */
|
|
29922
|
-
de && /* @__PURE__ */
|
|
29923
|
-
/* @__PURE__ */
|
|
29924
|
-
/* @__PURE__ */
|
|
29925
|
-
/* @__PURE__ */
|
|
29917
|
+
/* @__PURE__ */ P.jsxs("div", { className: "thread-list", children: [
|
|
29918
|
+
de && /* @__PURE__ */ P.jsxs("div", { className: "sidebar-loading", role: "status", "aria-live": "polite", children: [
|
|
29919
|
+
/* @__PURE__ */ P.jsx("div", { className: "skeleton skeleton-line w80" }),
|
|
29920
|
+
/* @__PURE__ */ P.jsx("div", { className: "skeleton skeleton-line w100" }),
|
|
29921
|
+
/* @__PURE__ */ P.jsx("div", { className: "skeleton skeleton-line w60" })
|
|
29926
29922
|
] }),
|
|
29927
|
-
Z && !de && /* @__PURE__ */
|
|
29928
|
-
/* @__PURE__ */
|
|
29929
|
-
/* @__PURE__ */
|
|
29923
|
+
Z && !de && /* @__PURE__ */ P.jsxs("div", { className: "sidebar-error", role: "alert", children: [
|
|
29924
|
+
/* @__PURE__ */ P.jsx("div", { className: "sidebar-error-text", children: Z }),
|
|
29925
|
+
/* @__PURE__ */ P.jsx("button", { className: "chip", type: "button", onClick: Ki, "aria-label": "Retry loading conversations", children: "Retry" })
|
|
29930
29926
|
] }),
|
|
29931
|
-
!de && !Z && (!
|
|
29932
|
-
!de && !Z &&
|
|
29933
|
-
/* @__PURE__ */
|
|
29934
|
-
|
|
29935
|
-
/* @__PURE__ */
|
|
29927
|
+
!de && !Z && (!T || T.length === 0) && /* @__PURE__ */ P.jsx("div", { className: "thread-empty", children: "No conversations yet" }),
|
|
29928
|
+
!de && !Z && T && T.length > 0 && /* @__PURE__ */ P.jsxs("div", { className: "thread-group", children: [
|
|
29929
|
+
/* @__PURE__ */ P.jsx("div", { className: "thread-group-title", children: "Conversations" }),
|
|
29930
|
+
T.map((q) => /* @__PURE__ */ P.jsxs("div", { className: `thread-item${b === q.id ? " active" : ""}`, children: [
|
|
29931
|
+
/* @__PURE__ */ P.jsxs(
|
|
29936
29932
|
"button",
|
|
29937
29933
|
{
|
|
29938
29934
|
className: "thread-main",
|
|
@@ -29942,24 +29938,24 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29942
29938
|
title: q.title || "New chat",
|
|
29943
29939
|
"aria-current": b === q.id ? "true" : void 0,
|
|
29944
29940
|
children: [
|
|
29945
|
-
/* @__PURE__ */
|
|
29946
|
-
/* @__PURE__ */
|
|
29947
|
-
/* @__PURE__ */
|
|
29948
|
-
/* @__PURE__ */
|
|
29949
|
-
/* @__PURE__ */
|
|
29941
|
+
/* @__PURE__ */ P.jsx("div", { className: "thread-icon", "aria-hidden": !0, children: /* @__PURE__ */ P.jsxs("svg", { width: "20", height: "22", viewBox: "0 0 14 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
29942
|
+
/* @__PURE__ */ P.jsx("path", { d: "M12.3334 0.416992H1.66671C0.933374 0.416992 0.340041 1.05449 0.340041 1.83366L0.333374 14.5837L3.00004 11.7503H12.3334C13.0667 11.7503 13.6667 11.1128 13.6667 10.3337V1.83366C13.6667 1.05449 13.0667 0.416992 12.3334 0.416992ZM3.00004 5.37532H11V6.79199H3.00004V5.37532ZM8.33337 8.91699H3.00004V7.50032H8.33337V8.91699ZM11 4.66699H3.00004V3.25032H11V4.66699Z", fill: "url(#paint0_linear_1125_1855)" }),
|
|
29943
|
+
/* @__PURE__ */ P.jsx("defs", { children: /* @__PURE__ */ P.jsxs("linearGradient", { id: "paint0_linear_1125_1855", x1: "7.00004", y1: "0.416992", x2: "7.00004", y2: "14.5837", gradientUnits: "userSpaceOnUse", children: [
|
|
29944
|
+
/* @__PURE__ */ P.jsx("stop", { "stop-color": "#0445B7" }),
|
|
29945
|
+
/* @__PURE__ */ P.jsx("stop", { offset: "1", "stop-color": "#0CC1A3" })
|
|
29950
29946
|
] }) })
|
|
29951
29947
|
] }) }),
|
|
29952
|
-
/* @__PURE__ */
|
|
29953
|
-
/* @__PURE__ */
|
|
29948
|
+
/* @__PURE__ */ P.jsxs("div", { className: "thread-text", children: [
|
|
29949
|
+
/* @__PURE__ */ P.jsxs("div", { className: "thread-title", children: [
|
|
29954
29950
|
(q.title || "New chat").slice(0, 36),
|
|
29955
29951
|
(q.title || "").length > 36 ? "…" : ""
|
|
29956
29952
|
] }),
|
|
29957
|
-
/* @__PURE__ */
|
|
29953
|
+
/* @__PURE__ */ P.jsx("div", { className: "thread-date", children: Vw(q.updated_at ? Date.parse(q.updated_at) : Date.now()) })
|
|
29958
29954
|
] })
|
|
29959
29955
|
]
|
|
29960
29956
|
}
|
|
29961
29957
|
),
|
|
29962
|
-
/* @__PURE__ */
|
|
29958
|
+
/* @__PURE__ */ P.jsx("div", { className: "thread-actions", children: /* @__PURE__ */ P.jsx(
|
|
29963
29959
|
"button",
|
|
29964
29960
|
{
|
|
29965
29961
|
type: "button",
|
|
@@ -29970,10 +29966,10 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29970
29966
|
const ye = be.currentTarget.getBoundingClientRect();
|
|
29971
29967
|
Er({ top: ye.bottom + 8, left: ye.right - 160 }), Ei((tt) => tt === q.id ? null : q.id);
|
|
29972
29968
|
},
|
|
29973
|
-
children: /* @__PURE__ */
|
|
29974
|
-
/* @__PURE__ */
|
|
29975
|
-
/* @__PURE__ */
|
|
29976
|
-
/* @__PURE__ */
|
|
29969
|
+
children: /* @__PURE__ */ P.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
|
|
29970
|
+
/* @__PURE__ */ P.jsx("circle", { cx: "12", cy: "5", r: "1.8", fill: "#64748b" }),
|
|
29971
|
+
/* @__PURE__ */ P.jsx("circle", { cx: "12", cy: "12", r: "1.8", fill: "#64748b" }),
|
|
29972
|
+
/* @__PURE__ */ P.jsx("circle", { cx: "12", cy: "19", r: "1.8", fill: "#64748b" })
|
|
29977
29973
|
] })
|
|
29978
29974
|
}
|
|
29979
29975
|
) })
|
|
@@ -29981,57 +29977,57 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29981
29977
|
] })
|
|
29982
29978
|
] })
|
|
29983
29979
|
] }),
|
|
29984
|
-
_ && /* @__PURE__ */
|
|
29985
|
-
/* @__PURE__ */
|
|
29986
|
-
/* @__PURE__ */
|
|
29987
|
-
/* @__PURE__ */
|
|
29988
|
-
(Ae || rt) && /* @__PURE__ */
|
|
29989
|
-
/* @__PURE__ */
|
|
29990
|
-
/* @__PURE__ */
|
|
29980
|
+
_ && /* @__PURE__ */ P.jsx("div", { className: "drawer-backdrop", onClick: () => Q(!1), "aria-hidden": !0 }),
|
|
29981
|
+
/* @__PURE__ */ P.jsxs("section", { className: "messages-main", ref: N, onScroll: _i, children: [
|
|
29982
|
+
/* @__PURE__ */ P.jsx("div", { className: "mobile-bar", children: /* @__PURE__ */ P.jsx("button", { className: "sidebar-toggle", type: "button", onClick: () => Q(!0), "aria-label": "Open conversations", children: /* @__PURE__ */ P.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ P.jsx("path", { d: "M3 6h18M3 12h18M3 18h18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) }) }),
|
|
29983
|
+
/* @__PURE__ */ P.jsxs("div", { className: "messages", children: [
|
|
29984
|
+
(Ae || rt) && /* @__PURE__ */ P.jsx("div", { className: "messages-loading", role: "status", "aria-live": "polite", children: /* @__PURE__ */ P.jsxs("div", { className: "loading-inner", children: [
|
|
29985
|
+
/* @__PURE__ */ P.jsx("span", { className: "spinner", "aria-hidden": !0 }),
|
|
29986
|
+
/* @__PURE__ */ P.jsx("span", { children: "Loading conversation…" })
|
|
29991
29987
|
] }) }),
|
|
29992
|
-
!Ae && Et && /* @__PURE__ */
|
|
29993
|
-
/* @__PURE__ */
|
|
29994
|
-
/* @__PURE__ */
|
|
29995
|
-
b && /* @__PURE__ */
|
|
29996
|
-
/* @__PURE__ */
|
|
29988
|
+
!Ae && Et && /* @__PURE__ */ P.jsx("div", { className: "messages-error", role: "alert", children: /* @__PURE__ */ P.jsxs("div", { className: "messages-error-card", children: [
|
|
29989
|
+
/* @__PURE__ */ P.jsx("div", { className: "messages-error-text", children: Et }),
|
|
29990
|
+
/* @__PURE__ */ P.jsxs("div", { className: "messages-error-actions", children: [
|
|
29991
|
+
b && /* @__PURE__ */ P.jsx("button", { className: "chip", type: "button", onClick: () => an(b), "aria-label": "Retry loading conversation", children: "Retry" }),
|
|
29992
|
+
/* @__PURE__ */ P.jsx("button", { className: "chip", type: "button", onClick: () => st(null), "aria-label": "Dismiss error", children: "Dismiss" })
|
|
29997
29993
|
] })
|
|
29998
29994
|
] }) }),
|
|
29999
|
-
Nt.length === 0 && !Ae && !rt && /* @__PURE__ */
|
|
30000
|
-
/* @__PURE__ */
|
|
30001
|
-
/* @__PURE__ */
|
|
30002
|
-
/* @__PURE__ */
|
|
30003
|
-
/* @__PURE__ */
|
|
30004
|
-
/* @__PURE__ */
|
|
30005
|
-
/* @__PURE__ */
|
|
30006
|
-
/* @__PURE__ */
|
|
30007
|
-
/* @__PURE__ */
|
|
30008
|
-
/* @__PURE__ */
|
|
30009
|
-
/* @__PURE__ */
|
|
29995
|
+
Nt.length === 0 && !Ae && !rt && /* @__PURE__ */ P.jsx("div", { className: "empty-hero", role: "region", "aria-label": "Welcome", children: /* @__PURE__ */ P.jsxs("div", { className: "empty-hero-inner", children: [
|
|
29996
|
+
/* @__PURE__ */ P.jsx("div", { className: "ai-avatar empty-hero-logo", "aria-hidden": !0, children: /* @__PURE__ */ P.jsxs("svg", { width: "64", height: "64", viewBox: "0 0 204.84 234.35", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
29997
|
+
/* @__PURE__ */ P.jsx("defs", { children: /* @__PURE__ */ P.jsxs("linearGradient", { id: "linear-gradient", x1: ".94", y1: "175.77", x2: "203.9", y2: "58.59", gradientUnits: "userSpaceOnUse", children: [
|
|
29998
|
+
/* @__PURE__ */ P.jsx("stop", { offset: "0", "stop-color": "#0cc1a3" }),
|
|
29999
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".29", "stop-color": "#0bbea3" }),
|
|
30000
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".46", "stop-color": "#0bb6a4" }),
|
|
30001
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".6", "stop-color": "#0aa7a7" }),
|
|
30002
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".72", "stop-color": "#0993aa" }),
|
|
30003
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".84", "stop-color": "#0779ae" }),
|
|
30004
|
+
/* @__PURE__ */ P.jsx("stop", { offset: ".94", "stop-color": "#0559b3" }),
|
|
30005
|
+
/* @__PURE__ */ P.jsx("stop", { offset: "1", "stop-color": "#0445b7" })
|
|
30010
30006
|
] }) }),
|
|
30011
|
-
/* @__PURE__ */
|
|
30007
|
+
/* @__PURE__ */ P.jsx("path", { fill: "url(#linear-gradient)", d: "M93.06,81.64v15.5l-50.83-26.84c-3.44-1.82-7.69-.5-9.51,2.94-1.81,3.44-.5,7.69,2.94,9.51l49.37,26.07-36.58,19.31c-3.44,1.81-4.75,6.07-2.94,9.51,1.26,2.39,3.7,3.75,6.23,3.75,1.11,0,2.23-.26,3.28-.82l38.04-20.08v59.14c0,3.89,3.15,7.04,7.04,7.04s7.04-3.15,7.04-7.04v-59.14l38.04,20.08c1.05.55,2.17.82,3.28.82,2.53,0,4.97-1.36,6.23-3.75,1.81-3.44.5-7.69-2.94-9.51l-36.58-19.31,49.37-26.07c3.44-1.81,4.75-6.07,2.94-9.51-1.81-3.44-6.07-4.75-9.51-2.94l-50.83,26.84v-15.5c0-3.89-3.15-7.04-7.04-7.04s-7.04,3.15-7.04,7.04ZM201.33,56.01L105.94.94c-2.18-1.26-4.86-1.26-7.04,0L3.52,56.01c-2.18,1.26-3.52,3.58-3.52,6.09v110.14c0,2.51,1.34,4.84,3.52,6.09l95.38,55.07c1.09.63,2.3.94,3.52.94s2.43-.31,3.52-.94l95.39-55.07c2.18-1.26,3.52-3.58,3.52-6.09V62.11c0-2.51-1.34-4.84-3.52-6.09ZM190.77,168.19l-88.35,51.01L14.07,168.19v-102.02L102.42,15.16l88.35,51.01v102.02Z" })
|
|
30012
30008
|
] }) }),
|
|
30013
|
-
/* @__PURE__ */
|
|
30014
|
-
/* @__PURE__ */
|
|
30015
|
-
/* @__PURE__ */
|
|
30009
|
+
/* @__PURE__ */ P.jsx("h1", { className: "", style: { marginTop: -12 }, children: /* @__PURE__ */ P.jsx("span", { children: "DragonflyAI" }) }),
|
|
30010
|
+
/* @__PURE__ */ P.jsx("p", { style: { fontSize: 18, marginTop: 3, color: "#000" }, children: "AI powered by New Zealand’s largest property management knowledgebase." }),
|
|
30011
|
+
/* @__PURE__ */ P.jsx("hr", { style: {
|
|
30016
30012
|
marginTop: 16,
|
|
30017
30013
|
marginBottom: 16,
|
|
30018
30014
|
border: 0,
|
|
30019
30015
|
height: 1,
|
|
30020
30016
|
background: "linear-gradient(90deg, rgba(12,193,163,0.25), rgba(4,69,183,0.25))"
|
|
30021
30017
|
} }),
|
|
30022
|
-
/* @__PURE__ */
|
|
30023
|
-
/* @__PURE__ */
|
|
30024
|
-
/* @__PURE__ */
|
|
30018
|
+
/* @__PURE__ */ P.jsxs("div", { style: { display: "grid", gap: 6 }, children: [
|
|
30019
|
+
/* @__PURE__ */ P.jsx("div", { style: { fontSize: 16, color: "#0E0044", fontWeight: 600 }, children: "What tenancy issue can I help with?" }),
|
|
30020
|
+
/* @__PURE__ */ P.jsx("div", { style: { fontSize: 14, color: "#475569" }, children: "The more detail you share, the better I can assist." })
|
|
30025
30021
|
] })
|
|
30026
30022
|
] }) }),
|
|
30027
|
-
io > 0 && /* @__PURE__ */
|
|
30023
|
+
io > 0 && /* @__PURE__ */ P.jsx("div", { className: "older-messages", children: /* @__PURE__ */ P.jsxs("button", { className: "chip", type: "button", onClick: () => ee((q) => q + 50), "aria-label": "Show older messages", children: [
|
|
30028
30024
|
"Show older messages (",
|
|
30029
30025
|
io,
|
|
30030
30026
|
")"
|
|
30031
30027
|
] }) }),
|
|
30032
30028
|
ds.map((q, be) => {
|
|
30033
30029
|
var Te;
|
|
30034
|
-
return q.role === "assistant" && !(((Te = q.content) == null ? void 0 : Te.trim()) || "").length ? null : /* @__PURE__ */
|
|
30030
|
+
return q.role === "assistant" && !(((Te = q.content) == null ? void 0 : Te.trim()) || "").length ? null : /* @__PURE__ */ P.jsx("div", { className: `message ${q.role}`, children: /* @__PURE__ */ P.jsx(
|
|
30035
30031
|
FR,
|
|
30036
30032
|
{
|
|
30037
30033
|
message: q,
|
|
@@ -30059,18 +30055,18 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
30059
30055
|
}
|
|
30060
30056
|
) }, be);
|
|
30061
30057
|
}),
|
|
30062
|
-
p && lc && /* @__PURE__ */
|
|
30063
|
-
/* @__PURE__ */
|
|
30064
|
-
/* @__PURE__ */
|
|
30065
|
-
/* @__PURE__ */
|
|
30058
|
+
p && lc && /* @__PURE__ */ P.jsx("div", { className: "message assistant", "aria-live": "polite", "aria-busy": "true", children: /* @__PURE__ */ P.jsx("div", { className: "msg-content", children: /* @__PURE__ */ P.jsxs("div", { className: "bubble bubble-plain bubble-skeleton", children: [
|
|
30059
|
+
/* @__PURE__ */ P.jsx("div", { className: "skeleton skeleton-line w80" }),
|
|
30060
|
+
/* @__PURE__ */ P.jsx("div", { className: "skeleton skeleton-line w100" }),
|
|
30061
|
+
/* @__PURE__ */ P.jsx("div", { className: "skeleton skeleton-line w60" })
|
|
30066
30062
|
] }) }) }),
|
|
30067
|
-
p && /* @__PURE__ */
|
|
30068
|
-
/* @__PURE__ */
|
|
30069
|
-
/* @__PURE__ */
|
|
30063
|
+
p && /* @__PURE__ */ P.jsx("div", { className: "typing-hud", role: "status", "aria-live": "polite", children: /* @__PURE__ */ P.jsxs("div", { className: "typing-hud-inner", children: [
|
|
30064
|
+
/* @__PURE__ */ P.jsx("span", { "aria-hidden": !0, className: "typing-dot" }),
|
|
30065
|
+
/* @__PURE__ */ P.jsx("span", { className: "typing-text", children: "Thinking…" })
|
|
30070
30066
|
] }) })
|
|
30071
30067
|
] }),
|
|
30072
|
-
/* @__PURE__ */
|
|
30073
|
-
/* @__PURE__ */
|
|
30068
|
+
/* @__PURE__ */ P.jsx("form", { ref: L, className: "composer", onSubmit: _r, "aria-busy": p, children: /* @__PURE__ */ P.jsxs("div", { className: "composer-field", children: [
|
|
30069
|
+
/* @__PURE__ */ P.jsx(
|
|
30074
30070
|
"textarea",
|
|
30075
30071
|
{
|
|
30076
30072
|
ref: f,
|
|
@@ -30091,13 +30087,13 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
30091
30087
|
disabled: p
|
|
30092
30088
|
}
|
|
30093
30089
|
),
|
|
30094
|
-
/* @__PURE__ */
|
|
30090
|
+
/* @__PURE__ */ P.jsx("button", { className: "composer-send", "data-testid": "send", type: "submit", disabled: p || !h.trim(), "aria-label": "Send", children: /* @__PURE__ */ P.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ P.jsx("path", { d: "M3 12L21 3L15 21L11 13L3 12Z", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }) }) })
|
|
30095
30091
|
] }) }),
|
|
30096
|
-
m && /* @__PURE__ */
|
|
30092
|
+
m && /* @__PURE__ */ P.jsx("div", { className: "error", children: m })
|
|
30097
30093
|
] }),
|
|
30098
|
-
/* @__PURE__ */
|
|
30094
|
+
/* @__PURE__ */ P.jsx("div", { ref: D, className: "thread-menu-portal", "aria-hidden": !0 }),
|
|
30099
30095
|
ui && to && Gy(
|
|
30100
|
-
/* @__PURE__ */
|
|
30096
|
+
/* @__PURE__ */ P.jsx(
|
|
30101
30097
|
"div",
|
|
30102
30098
|
{
|
|
30103
30099
|
ref: no,
|
|
@@ -30106,7 +30102,7 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
30106
30102
|
style: { position: "fixed", maxWidth: 200, top: to.top, left: Math.max(8, to.left), zIndex: 2e3 },
|
|
30107
30103
|
onMouseDown: (q) => q.stopPropagation(),
|
|
30108
30104
|
onClick: (q) => q.stopPropagation(),
|
|
30109
|
-
children: /* @__PURE__ */
|
|
30105
|
+
children: /* @__PURE__ */ P.jsx(
|
|
30110
30106
|
"button",
|
|
30111
30107
|
{
|
|
30112
30108
|
className: "menu-item danger",
|
|
@@ -30131,7 +30127,7 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
30131
30127
|
D.current || document.body
|
|
30132
30128
|
)
|
|
30133
30129
|
] }),
|
|
30134
|
-
/* @__PURE__ */
|
|
30130
|
+
/* @__PURE__ */ P.jsx(
|
|
30135
30131
|
WO,
|
|
30136
30132
|
{
|
|
30137
30133
|
open: z.open,
|
|
@@ -30148,7 +30144,7 @@ function XO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
30148
30144
|
onMeta: Le
|
|
30149
30145
|
}
|
|
30150
30146
|
),
|
|
30151
|
-
/* @__PURE__ */
|
|
30147
|
+
/* @__PURE__ */ P.jsx(Yw, { toasts: lt })
|
|
30152
30148
|
] });
|
|
30153
30149
|
}
|
|
30154
30150
|
export {
|