@box/box-ai-content-answers 0.97.4 → 0.99.0
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/esm/index.js +6 -4
- package/esm/lib/components/answer/answer.js +286 -281
- package/esm/lib/components/footer/footer.js +35 -35
- package/esm/lib/constants.js +10 -0
- package/package.json +6 -6
- package/styles/answer.css +1 -1
- package/types/index.d.ts +1 -0
- package/types/lib/constants.d.ts +7 -0
- package/types/lib/types.d.ts +2 -0
package/esm/index.js
CHANGED
|
@@ -3,14 +3,16 @@ import { AnswerContent as n } from "./lib/components/answer/answer-content.js";
|
|
|
3
3
|
import { withApiWrapper as R } from "./lib/components/api-wrapper/api-wrapper.js";
|
|
4
4
|
import { C as s } from "../chunks/clear-conversation-button.js";
|
|
5
5
|
import { IntelligenceModal as A } from "./lib/components/modal/modal.js";
|
|
6
|
-
import { A as
|
|
6
|
+
import { A as f, C as m, R as C } from "../chunks/types.js";
|
|
7
|
+
import { APP_MODE as T } from "./lib/constants.js";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
f as ANSWER_ERROR,
|
|
10
|
+
T as APP_MODE,
|
|
9
11
|
n as AnswerContent,
|
|
10
12
|
e as BoxAiContentAnswers,
|
|
11
|
-
|
|
13
|
+
m as CONTENT_ERROR,
|
|
12
14
|
s as ClearConversationButton,
|
|
13
15
|
A as IntelligenceModal,
|
|
14
|
-
|
|
16
|
+
C as REQUEST_STATE,
|
|
15
17
|
R as withApiWrapper
|
|
16
18
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as z } from "../../../../chunks/markdown.js";
|
|
2
2
|
import { useBreakpoint as ut, Breakpoint as lt, Text as ft } from "@box/blueprint-web";
|
|
3
|
-
import { AlertTriangle as
|
|
4
|
-
import { Gray65 as
|
|
5
|
-
import
|
|
6
|
-
import * as
|
|
3
|
+
import { AlertTriangle as dt } from "@box/blueprint-web-assets/icons/Line";
|
|
4
|
+
import { Gray65 as pt, Size4 as Lr } from "@box/blueprint-web-assets/tokens/tokens";
|
|
5
|
+
import xr from "clsx";
|
|
6
|
+
import * as rr from "react";
|
|
7
7
|
import { useIntl as $t } from "react-intl";
|
|
8
|
-
import { A as
|
|
9
|
-
import { MediaContainer as
|
|
10
|
-
import { AnswerContent as
|
|
8
|
+
import { A as d } from "../../../../chunks/types.js";
|
|
9
|
+
import { MediaContainer as kr } from "../common/media-container.js";
|
|
10
|
+
import { AnswerContent as yt } from "./answer-content.js";
|
|
11
11
|
import { CopyButton as ht } from "./copy-button.js";
|
|
12
12
|
import { InlineError as St } from "./inline-error.js";
|
|
13
13
|
import { ThumbButtons as gt } from "./thumb-buttons.js";
|
|
14
|
-
import
|
|
14
|
+
import U from "./messages.js";
|
|
15
15
|
import { References as mt } from "./references.js";
|
|
16
|
-
import { jsxs as D, jsx as
|
|
16
|
+
import { jsxs as D, jsx as l } from "react/jsx-runtime";
|
|
17
17
|
import '../../../../styles/answer.css';var C = function(r) {
|
|
18
18
|
return r && r.Math === Math && r;
|
|
19
|
-
},
|
|
19
|
+
}, p = (
|
|
20
20
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
21
21
|
C(typeof globalThis == "object" && globalThis) || C(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
22
|
-
C(typeof self == "object" && self) || C(typeof
|
|
22
|
+
C(typeof self == "object" && self) || C(typeof z == "object" && z) || C(typeof z == "object" && z) || // eslint-disable-next-line no-new-func -- fallback
|
|
23
23
|
/* @__PURE__ */ function() {
|
|
24
24
|
return this;
|
|
25
25
|
}() || Function("return this")()
|
|
26
|
-
),
|
|
26
|
+
), Ir = {}, S = function(r) {
|
|
27
27
|
try {
|
|
28
28
|
return !!r();
|
|
29
29
|
} catch {
|
|
@@ -33,59 +33,59 @@ import '../../../../styles/answer.css';var C = function(r) {
|
|
|
33
33
|
return Object.defineProperty({}, 1, { get: function() {
|
|
34
34
|
return 7;
|
|
35
35
|
} })[1] !== 7;
|
|
36
|
-
}), Ot = S,
|
|
36
|
+
}), Ot = S, ye = !Ot(function() {
|
|
37
37
|
var r = (function() {
|
|
38
38
|
}).bind();
|
|
39
39
|
return typeof r != "function" || r.hasOwnProperty("prototype");
|
|
40
|
-
}),
|
|
41
|
-
return
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
var t =
|
|
40
|
+
}), It = ye, G = Function.prototype.call, R = It ? G.bind(G) : function() {
|
|
41
|
+
return G.apply(G, arguments);
|
|
42
|
+
}, he = {}, Se = {}.propertyIsEnumerable, ge = Object.getOwnPropertyDescriptor, Et = ge && !Se.call({ 1: 2 }, 1);
|
|
43
|
+
he.f = Et ? function(e) {
|
|
44
|
+
var t = ge(this, e);
|
|
45
45
|
return !!t && t.enumerable;
|
|
46
|
-
} :
|
|
47
|
-
var
|
|
46
|
+
} : Se;
|
|
47
|
+
var me = function(r, e) {
|
|
48
48
|
return {
|
|
49
49
|
enumerable: !(r & 1),
|
|
50
50
|
configurable: !(r & 2),
|
|
51
51
|
writable: !(r & 4),
|
|
52
52
|
value: e
|
|
53
53
|
};
|
|
54
|
-
},
|
|
54
|
+
}, be = ye, Oe = Function.prototype, hr = Oe.call, wt = be && Oe.bind.bind(hr, hr), s = be ? wt : function(r) {
|
|
55
55
|
return function() {
|
|
56
56
|
return hr.apply(r, arguments);
|
|
57
57
|
};
|
|
58
|
-
},
|
|
58
|
+
}, Ie = s, Pt = Ie({}.toString), Tt = Ie("".slice), _t = function(r) {
|
|
59
59
|
return Tt(Pt(r), 8, -1);
|
|
60
60
|
}, Rt = s, jt = S, Nt = _t, er = Object, Dt = Rt("".split), Ct = jt(function() {
|
|
61
61
|
return !er("z").propertyIsEnumerable(0);
|
|
62
62
|
}) ? function(r) {
|
|
63
63
|
return Nt(r) === "String" ? Dt(r, "") : er(r);
|
|
64
|
-
} : er,
|
|
64
|
+
} : er, Ee = function(r) {
|
|
65
65
|
return r == null;
|
|
66
|
-
}, Mt =
|
|
67
|
-
if (Mt(r)) throw new
|
|
66
|
+
}, Mt = Ee, At = TypeError, we = function(r) {
|
|
67
|
+
if (Mt(r)) throw new At("Can't call method on " + r);
|
|
68
68
|
return r;
|
|
69
|
-
},
|
|
70
|
-
return
|
|
71
|
-
}, tr = typeof document == "object" && document.all,
|
|
69
|
+
}, Ft = Ct, Bt = we, Er = function(r) {
|
|
70
|
+
return Ft(Bt(r));
|
|
71
|
+
}, tr = typeof document == "object" && document.all, $ = typeof tr > "u" && tr !== void 0 ? function(r) {
|
|
72
72
|
return typeof r == "function" || r === tr;
|
|
73
73
|
} : function(r) {
|
|
74
74
|
return typeof r == "function";
|
|
75
|
-
}, Lt =
|
|
75
|
+
}, Lt = $, A = function(r) {
|
|
76
76
|
return typeof r == "object" ? r !== null : Lt(r);
|
|
77
|
-
}, ar =
|
|
77
|
+
}, ar = p, xt = $, kt = function(r) {
|
|
78
78
|
return xt(r) ? r : void 0;
|
|
79
|
-
},
|
|
79
|
+
}, wr = function(r, e) {
|
|
80
80
|
return arguments.length < 2 ? kt(ar[r]) : ar[r] && ar[r][e];
|
|
81
|
-
}, zt = s, Ut = zt({}.isPrototypeOf), Gt = typeof navigator < "u" && String(navigator.userAgent) || "",
|
|
82
|
-
|
|
83
|
-
!
|
|
84
|
-
var Kt =
|
|
81
|
+
}, zt = s, Ut = zt({}.isPrototypeOf), Gt = typeof navigator < "u" && String(navigator.userAgent) || "", Pe = p, nr = Gt, zr = Pe.process, Ur = Pe.Deno, Gr = zr && zr.versions || Ur && Ur.version, Kr = Gr && Gr.v8, u, q;
|
|
82
|
+
Kr && (u = Kr.split("."), q = u[0] > 0 && u[0] < 4 ? 1 : +(u[0] + u[1]));
|
|
83
|
+
!q && nr && (u = nr.match(/Edge\/(\d+)/), (!u || u[1] >= 74) && (u = nr.match(/Chrome\/(\d+)/), u && (q = +u[1])));
|
|
84
|
+
var Kt = q, Hr = Kt, Ht = S, Vt = p, Wt = Vt.String, Te = !!Object.getOwnPropertySymbols && !Ht(function() {
|
|
85
85
|
var r = Symbol("symbol detection");
|
|
86
86
|
return !Wt(r) || !(Object(r) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
87
|
-
!Symbol.sham &&
|
|
88
|
-
}), Yt =
|
|
87
|
+
!Symbol.sham && Hr && Hr < 41;
|
|
88
|
+
}), Yt = Te, _e = Yt && !Symbol.sham && typeof Symbol.iterator == "symbol", qt = wr, Xt = $, Zt = Ut, Jt = _e, Qt = Object, Re = Jt ? function(r) {
|
|
89
89
|
return typeof r == "symbol";
|
|
90
90
|
} : function(r) {
|
|
91
91
|
var e = qt("Symbol");
|
|
@@ -96,114 +96,114 @@ var Kt = W, Kr = Kt, Ht = S, Vt = y, Wt = Vt.String, Pe = !!Object.getOwnPropert
|
|
|
96
96
|
} catch {
|
|
97
97
|
return "Object";
|
|
98
98
|
}
|
|
99
|
-
}, ta =
|
|
99
|
+
}, ta = $, aa = ea, na = TypeError, Pr = function(r) {
|
|
100
100
|
if (ta(r)) return r;
|
|
101
101
|
throw new na(aa(r) + " is not a function");
|
|
102
|
-
}, oa = Pr, ia =
|
|
102
|
+
}, oa = Pr, ia = Ee, je = function(r, e) {
|
|
103
103
|
var t = r[e];
|
|
104
104
|
return ia(t) ? void 0 : oa(t);
|
|
105
|
-
}, or = R, ir =
|
|
105
|
+
}, or = R, ir = $, cr = A, ca = TypeError, sa = function(r, e) {
|
|
106
106
|
var t, a;
|
|
107
|
-
if (e === "string" && ir(t = r.toString) && !
|
|
108
|
-
throw new
|
|
109
|
-
},
|
|
107
|
+
if (e === "string" && ir(t = r.toString) && !cr(a = or(t, r)) || ir(t = r.valueOf) && !cr(a = or(t, r)) || e !== "string" && ir(t = r.toString) && !cr(a = or(t, r))) return a;
|
|
108
|
+
throw new ca("Can't convert object to primitive value");
|
|
109
|
+
}, Ne = { exports: {} }, Vr = p, va = Object.defineProperty, Tr = function(r, e) {
|
|
110
110
|
try {
|
|
111
|
-
|
|
111
|
+
va(Vr, r, { value: e, configurable: !0, writable: !0 });
|
|
112
112
|
} catch {
|
|
113
|
-
|
|
113
|
+
Vr[r] = e;
|
|
114
114
|
}
|
|
115
115
|
return e;
|
|
116
|
-
}, ua =
|
|
117
|
-
(
|
|
116
|
+
}, ua = p, la = Tr, Wr = "__core-js_shared__", Yr = Ne.exports = ua[Wr] || la(Wr, {});
|
|
117
|
+
(Yr.versions || (Yr.versions = [])).push({
|
|
118
118
|
version: "3.36.1",
|
|
119
119
|
mode: "global",
|
|
120
120
|
copyright: "© 2014-2024 Denis Pushkarev (zloirock.ru)",
|
|
121
121
|
license: "https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",
|
|
122
122
|
source: "https://github.com/zloirock/core-js"
|
|
123
123
|
});
|
|
124
|
-
var _r =
|
|
125
|
-
return
|
|
126
|
-
}, fa =
|
|
127
|
-
return
|
|
128
|
-
}, $a = s,
|
|
129
|
-
return ha(
|
|
130
|
-
}, Sa = s, ga = 0, ma = Math.random(), ba = Sa(1 .toString),
|
|
124
|
+
var _r = Ne.exports, qr = _r, De = function(r, e) {
|
|
125
|
+
return qr[r] || (qr[r] = e || {});
|
|
126
|
+
}, fa = we, da = Object, pa = function(r) {
|
|
127
|
+
return da(fa(r));
|
|
128
|
+
}, $a = s, ya = pa, ha = $a({}.hasOwnProperty), b = Object.hasOwn || function(e, t) {
|
|
129
|
+
return ha(ya(e), t);
|
|
130
|
+
}, Sa = s, ga = 0, ma = Math.random(), ba = Sa(1 .toString), Ce = function(r) {
|
|
131
131
|
return "Symbol(" + (r === void 0 ? "" : r) + ")_" + ba(++ga + ma, 36);
|
|
132
|
-
}, Oa =
|
|
133
|
-
return
|
|
134
|
-
}, Ra = R,
|
|
135
|
-
if (!
|
|
132
|
+
}, Oa = p, Ia = De, Xr = b, Ea = Ce, wa = Te, Pa = _e, _ = Oa.Symbol, sr = Ia("wks"), Ta = Pa ? _.for || _ : _ && _.withoutSetter || Ea, _a = function(r) {
|
|
133
|
+
return Xr(sr, r) || (sr[r] = wa && Xr(_, r) ? _[r] : Ta("Symbol." + r)), sr[r];
|
|
134
|
+
}, Ra = R, Zr = A, Jr = Re, ja = je, Na = sa, Da = _a, Ca = TypeError, Ma = Da("toPrimitive"), Aa = function(r, e) {
|
|
135
|
+
if (!Zr(r) || Jr(r)) return r;
|
|
136
136
|
var t = ja(r, Ma), a;
|
|
137
137
|
if (t) {
|
|
138
|
-
if (e === void 0 && (e = "default"), a = Ra(t, r, e), !
|
|
138
|
+
if (e === void 0 && (e = "default"), a = Ra(t, r, e), !Zr(a) || Jr(a)) return a;
|
|
139
139
|
throw new Ca("Can't convert object to primitive value");
|
|
140
140
|
}
|
|
141
141
|
return e === void 0 && (e = "number"), Na(r, e);
|
|
142
|
-
},
|
|
143
|
-
var e =
|
|
142
|
+
}, Fa = Aa, Ba = Re, Me = function(r) {
|
|
143
|
+
var e = Fa(r, "string");
|
|
144
144
|
return Ba(e) ? e : e + "";
|
|
145
|
-
}, La =
|
|
145
|
+
}, La = p, Qr = A, Sr = La.document, xa = Qr(Sr) && Qr(Sr.createElement), ka = function(r) {
|
|
146
146
|
return xa ? Sr.createElement(r) : {};
|
|
147
|
-
}, za = m, Ua = S, Ga = ka,
|
|
147
|
+
}, za = m, Ua = S, Ga = ka, Ae = !za && !Ua(function() {
|
|
148
148
|
return Object.defineProperty(Ga("div"), "a", {
|
|
149
149
|
get: function() {
|
|
150
150
|
return 7;
|
|
151
151
|
}
|
|
152
152
|
}).a !== 7;
|
|
153
|
-
}), Ka = m, Ha = R, Va =
|
|
154
|
-
|
|
153
|
+
}), Ka = m, Ha = R, Va = he, Wa = me, Ya = Er, qa = Me, Xa = b, Za = Ae, re = Object.getOwnPropertyDescriptor;
|
|
154
|
+
Ir.f = Ka ? re : function(e, t) {
|
|
155
155
|
if (e = Ya(e), t = qa(t), Za) try {
|
|
156
|
-
return
|
|
156
|
+
return re(e, t);
|
|
157
157
|
} catch {
|
|
158
158
|
}
|
|
159
159
|
if (Xa(e, t)) return Wa(!Ha(Va.f, e, t), e[t]);
|
|
160
160
|
};
|
|
161
|
-
var
|
|
161
|
+
var J = {}, Ja = m, Qa = S, rn = Ja && Qa(function() {
|
|
162
162
|
return Object.defineProperty(function() {
|
|
163
163
|
}, "prototype", {
|
|
164
164
|
value: 42,
|
|
165
165
|
writable: !1
|
|
166
166
|
}).prototype !== 42;
|
|
167
|
-
}), en =
|
|
167
|
+
}), en = A, tn = String, an = TypeError, Q = function(r) {
|
|
168
168
|
if (en(r)) return r;
|
|
169
169
|
throw new an(tn(r) + " is not an object");
|
|
170
|
-
}, nn = m, on =
|
|
171
|
-
|
|
172
|
-
if (
|
|
173
|
-
var n =
|
|
170
|
+
}, nn = m, on = Ae, cn = rn, K = Q, ee = Me, sn = TypeError, vr = Object.defineProperty, vn = Object.getOwnPropertyDescriptor, ur = "enumerable", lr = "configurable", fr = "writable";
|
|
171
|
+
J.f = nn ? cn ? function(e, t, a) {
|
|
172
|
+
if (K(e), t = ee(t), K(a), typeof e == "function" && t === "prototype" && "value" in a && fr in a && !a[fr]) {
|
|
173
|
+
var n = vn(e, t);
|
|
174
174
|
n && n[fr] && (e[t] = a.value, a = {
|
|
175
175
|
configurable: lr in a ? a[lr] : n[lr],
|
|
176
176
|
enumerable: ur in a ? a[ur] : n[ur],
|
|
177
177
|
writable: !1
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
return
|
|
181
|
-
} :
|
|
182
|
-
if (
|
|
183
|
-
return
|
|
180
|
+
return vr(e, t, a);
|
|
181
|
+
} : vr : function(e, t, a) {
|
|
182
|
+
if (K(e), t = ee(t), K(a), on) try {
|
|
183
|
+
return vr(e, t, a);
|
|
184
184
|
} catch {
|
|
185
185
|
}
|
|
186
186
|
if ("get" in a || "set" in a) throw new sn("Accessors not supported");
|
|
187
187
|
return "value" in a && (e[t] = a.value), e;
|
|
188
188
|
};
|
|
189
|
-
var un = m, ln =
|
|
189
|
+
var un = m, ln = J, fn = me, Fe = un ? function(r, e, t) {
|
|
190
190
|
return ln.f(r, e, fn(1, t));
|
|
191
191
|
} : function(r, e, t) {
|
|
192
192
|
return r[e] = t, r;
|
|
193
|
-
},
|
|
194
|
-
}).name === "something",
|
|
193
|
+
}, Be = { exports: {} }, gr = m, dn = b, Le = Function.prototype, pn = gr && Object.getOwnPropertyDescriptor, Rr = dn(Le, "name"), $n = Rr && (function() {
|
|
194
|
+
}).name === "something", yn = Rr && (!gr || gr && pn(Le, "name").configurable), hn = {
|
|
195
195
|
EXISTS: Rr,
|
|
196
196
|
PROPER: $n,
|
|
197
|
-
CONFIGURABLE:
|
|
198
|
-
}, Sn = s, gn =
|
|
197
|
+
CONFIGURABLE: yn
|
|
198
|
+
}, Sn = s, gn = $, mr = _r, mn = Sn(Function.toString);
|
|
199
199
|
gn(mr.inspectSource) || (mr.inspectSource = function(r) {
|
|
200
200
|
return mn(r);
|
|
201
201
|
});
|
|
202
|
-
var bn = mr.inspectSource, On =
|
|
203
|
-
return
|
|
204
|
-
},
|
|
205
|
-
return
|
|
206
|
-
},
|
|
202
|
+
var bn = mr.inspectSource, On = p, In = $, te = On.WeakMap, En = In(te) && /native code/.test(String(te)), wn = De, Pn = Ce, ae = wn("keys"), Tn = function(r) {
|
|
203
|
+
return ae[r] || (ae[r] = Pn(r));
|
|
204
|
+
}, xe = {}, _n = En, ke = p, Rn = A, jn = Fe, dr = b, pr = _r, Nn = Tn, Dn = xe, ne = "Object already initialized", br = ke.TypeError, Cn = ke.WeakMap, X, M, Z, Mn = function(r) {
|
|
205
|
+
return Z(r) ? M(r) : X(r, {});
|
|
206
|
+
}, An = function(r) {
|
|
207
207
|
return function(e) {
|
|
208
208
|
var t;
|
|
209
209
|
if (!Rn(e) || (t = M(e)).type !== r)
|
|
@@ -211,49 +211,49 @@ var bn = mr.inspectSource, On = y, wn = d, ee = On.WeakMap, In = wn(ee) && /nati
|
|
|
211
211
|
return t;
|
|
212
212
|
};
|
|
213
213
|
};
|
|
214
|
-
if (_n ||
|
|
215
|
-
var
|
|
216
|
-
|
|
217
|
-
if (
|
|
218
|
-
return e.facade = r,
|
|
214
|
+
if (_n || pr.state) {
|
|
215
|
+
var f = pr.state || (pr.state = new Cn());
|
|
216
|
+
f.get = f.get, f.has = f.has, f.set = f.set, X = function(r, e) {
|
|
217
|
+
if (f.has(r)) throw new br(ne);
|
|
218
|
+
return e.facade = r, f.set(r, e), e;
|
|
219
219
|
}, M = function(r) {
|
|
220
|
-
return
|
|
221
|
-
},
|
|
222
|
-
return
|
|
220
|
+
return f.get(r) || {};
|
|
221
|
+
}, Z = function(r) {
|
|
222
|
+
return f.has(r);
|
|
223
223
|
};
|
|
224
224
|
} else {
|
|
225
225
|
var T = Nn("state");
|
|
226
|
-
Dn[T] = !0,
|
|
227
|
-
if (
|
|
226
|
+
Dn[T] = !0, X = function(r, e) {
|
|
227
|
+
if (dr(r, T)) throw new br(ne);
|
|
228
228
|
return e.facade = r, jn(r, T, e), e;
|
|
229
229
|
}, M = function(r) {
|
|
230
|
-
return
|
|
231
|
-
},
|
|
232
|
-
return
|
|
230
|
+
return dr(r, T) ? r[T] : {};
|
|
231
|
+
}, Z = function(r) {
|
|
232
|
+
return dr(r, T);
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
var
|
|
236
|
-
set:
|
|
235
|
+
var Fn = {
|
|
236
|
+
set: X,
|
|
237
237
|
get: M,
|
|
238
|
-
has:
|
|
238
|
+
has: Z,
|
|
239
239
|
enforce: Mn,
|
|
240
|
-
getterFor:
|
|
241
|
-
}, jr = s, Bn = S, Ln =
|
|
242
|
-
return
|
|
240
|
+
getterFor: An
|
|
241
|
+
}, jr = s, Bn = S, Ln = $, H = b, Or = m, xn = hn.CONFIGURABLE, kn = bn, ze = Fn, zn = ze.enforce, Un = ze.get, oe = String, Y = Object.defineProperty, Gn = jr("".slice), Kn = jr("".replace), Hn = jr([].join), Vn = Or && !Bn(function() {
|
|
242
|
+
return Y(function() {
|
|
243
243
|
}, "length", { value: 8 }).length !== 8;
|
|
244
|
-
}), Wn = String(String).split("String"), Yn =
|
|
245
|
-
Gn(
|
|
244
|
+
}), Wn = String(String).split("String"), Yn = Be.exports = function(r, e, t) {
|
|
245
|
+
Gn(oe(e), 0, 7) === "Symbol(" && (e = "[" + Kn(oe(e), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), t && t.getter && (e = "get " + e), t && t.setter && (e = "set " + e), (!H(r, "name") || xn && r.name !== e) && (Or ? Y(r, "name", { value: e, configurable: !0 }) : r.name = e), Vn && t && H(t, "arity") && r.length !== t.arity && Y(r, "length", { value: t.arity });
|
|
246
246
|
try {
|
|
247
|
-
t &&
|
|
247
|
+
t && H(t, "constructor") && t.constructor ? Or && Y(r, "prototype", { writable: !1 }) : r.prototype && (r.prototype = void 0);
|
|
248
248
|
} catch {
|
|
249
249
|
}
|
|
250
250
|
var a = zn(r);
|
|
251
|
-
return
|
|
251
|
+
return H(a, "source") || (a.source = Hn(Wn, typeof e == "string" ? e : "")), r;
|
|
252
252
|
};
|
|
253
253
|
Function.prototype.toString = Yn(function() {
|
|
254
254
|
return Ln(this) && Un(this).source || kn(this);
|
|
255
255
|
}, "toString");
|
|
256
|
-
var qn =
|
|
256
|
+
var qn = Be.exports, Xn = $, Zn = J, Jn = qn, Qn = Tr, ro = function(r, e, t, a) {
|
|
257
257
|
a || (a = {});
|
|
258
258
|
var n = a.enumerable, o = a.name !== void 0 ? a.name : e;
|
|
259
259
|
if (Xn(t) && Jn(t, o, a), a.global)
|
|
@@ -271,28 +271,28 @@ var qn = Ae.exports, Xn = d, Zn = X, Jn = qn, Qn = Tr, ro = function(r, e, t, a)
|
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
return r;
|
|
274
|
-
},
|
|
274
|
+
}, Ue = {}, eo = Math.ceil, to = Math.floor, ao = Math.trunc || function(e) {
|
|
275
275
|
var t = +e;
|
|
276
276
|
return (t > 0 ? to : eo)(t);
|
|
277
277
|
}, no = ao, Nr = function(r) {
|
|
278
278
|
var e = +r;
|
|
279
279
|
return e !== e || e === 0 ? 0 : no(e);
|
|
280
|
-
}, oo = Nr, io = Math.max,
|
|
280
|
+
}, oo = Nr, io = Math.max, co = Math.min, so = function(r, e) {
|
|
281
281
|
var t = oo(r);
|
|
282
|
-
return t < 0 ? io(t + e, 0) :
|
|
283
|
-
},
|
|
284
|
-
var e =
|
|
282
|
+
return t < 0 ? io(t + e, 0) : co(t, e);
|
|
283
|
+
}, vo = Nr, uo = Math.min, lo = function(r) {
|
|
284
|
+
var e = vo(r);
|
|
285
285
|
return e > 0 ? uo(e, 9007199254740991) : 0;
|
|
286
|
-
}, fo = lo,
|
|
286
|
+
}, fo = lo, po = function(r) {
|
|
287
287
|
return fo(r.length);
|
|
288
|
-
}, $o =
|
|
288
|
+
}, $o = Er, yo = so, ho = po, ie = function(r) {
|
|
289
289
|
return function(e, t, a) {
|
|
290
290
|
var n = $o(e), o = ho(n);
|
|
291
291
|
if (o === 0) return !r && -1;
|
|
292
|
-
var i =
|
|
292
|
+
var i = yo(a, o), c;
|
|
293
293
|
if (r && t !== t) {
|
|
294
294
|
for (; o > i; )
|
|
295
|
-
if (
|
|
295
|
+
if (c = n[i++], c !== c) return !0;
|
|
296
296
|
} else for (; o > i; i++)
|
|
297
297
|
if ((r || i in n) && n[i] === t) return r || i || 0;
|
|
298
298
|
return !r && -1;
|
|
@@ -300,16 +300,16 @@ var qn = Ae.exports, Xn = d, Zn = X, Jn = qn, Qn = Tr, ro = function(r, e, t, a)
|
|
|
300
300
|
}, So = {
|
|
301
301
|
// `Array.prototype.includes` method
|
|
302
302
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
303
|
-
includes:
|
|
303
|
+
includes: ie(!0),
|
|
304
304
|
// `Array.prototype.indexOf` method
|
|
305
305
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
306
|
-
indexOf:
|
|
307
|
-
}, go = s, $r = b, mo =
|
|
306
|
+
indexOf: ie(!1)
|
|
307
|
+
}, go = s, $r = b, mo = Er, bo = So.indexOf, Oo = xe, ce = go([].push), Io = function(r, e) {
|
|
308
308
|
var t = mo(r), a = 0, n = [], o;
|
|
309
|
-
for (o in t) !$r(Oo, o) && $r(t, o) &&
|
|
310
|
-
for (; e.length > a; ) $r(t, o = e[a++]) && (~bo(n, o) ||
|
|
309
|
+
for (o in t) !$r(Oo, o) && $r(t, o) && ce(n, o);
|
|
310
|
+
for (; e.length > a; ) $r(t, o = e[a++]) && (~bo(n, o) || ce(n, o));
|
|
311
311
|
return n;
|
|
312
|
-
},
|
|
312
|
+
}, Eo = [
|
|
313
313
|
"constructor",
|
|
314
314
|
"hasOwnProperty",
|
|
315
315
|
"isPrototypeOf",
|
|
@@ -317,92 +317,92 @@ var qn = Ae.exports, Xn = d, Zn = X, Jn = qn, Qn = Tr, ro = function(r, e, t, a)
|
|
|
317
317
|
"toLocaleString",
|
|
318
318
|
"toString",
|
|
319
319
|
"valueOf"
|
|
320
|
-
],
|
|
321
|
-
|
|
322
|
-
return
|
|
320
|
+
], wo = Io, Po = Eo, To = Po.concat("length", "prototype");
|
|
321
|
+
Ue.f = Object.getOwnPropertyNames || function(e) {
|
|
322
|
+
return wo(e, To);
|
|
323
323
|
};
|
|
324
|
-
var
|
|
325
|
-
|
|
326
|
-
var _o =
|
|
324
|
+
var Ge = {};
|
|
325
|
+
Ge.f = Object.getOwnPropertySymbols;
|
|
326
|
+
var _o = wr, Ro = s, jo = Ue, No = Ge, Do = Q, Co = Ro([].concat), Mo = _o("Reflect", "ownKeys") || function(e) {
|
|
327
327
|
var t = jo.f(Do(e)), a = No.f;
|
|
328
328
|
return a ? Co(t, a(e)) : t;
|
|
329
|
-
},
|
|
330
|
-
for (var a =
|
|
331
|
-
var
|
|
332
|
-
!
|
|
329
|
+
}, se = b, Ao = Mo, Fo = Ir, Bo = J, Lo = function(r, e, t) {
|
|
330
|
+
for (var a = Ao(e), n = Bo.f, o = Fo.f, i = 0; i < a.length; i++) {
|
|
331
|
+
var c = a[i];
|
|
332
|
+
!se(r, c) && !(t && se(t, c)) && n(r, c, o(e, c));
|
|
333
333
|
}
|
|
334
|
-
}, xo = S, ko =
|
|
334
|
+
}, xo = S, ko = $, zo = /#|\.prototype\./, F = function(r, e) {
|
|
335
335
|
var t = Go[Uo(r)];
|
|
336
336
|
return t === Ho ? !0 : t === Ko ? !1 : ko(e) ? xo(e) : !!e;
|
|
337
|
-
}, Uo =
|
|
337
|
+
}, Uo = F.normalize = function(r) {
|
|
338
338
|
return String(r).replace(zo, ".").toLowerCase();
|
|
339
|
-
}, Go =
|
|
340
|
-
var t = r.target, a = r.global, n = r.stat, o, i,
|
|
341
|
-
if (a ? i =
|
|
342
|
-
if (g = e[
|
|
343
|
-
if (typeof g == typeof
|
|
344
|
-
Zo(g,
|
|
339
|
+
}, Go = F.data = {}, Ko = F.NATIVE = "N", Ho = F.POLYFILL = "P", Vo = F, V = p, Wo = Ir.f, Yo = Fe, qo = ro, Xo = Tr, Zo = Lo, Jo = Vo, O = function(r, e) {
|
|
340
|
+
var t = r.target, a = r.global, n = r.stat, o, i, c, h, g, j;
|
|
341
|
+
if (a ? i = V : n ? i = V[t] || Xo(t, {}) : i = V[t] && V[t].prototype, i) for (c in e) {
|
|
342
|
+
if (g = e[c], r.dontCallGetSet ? (j = Wo(i, c), h = j && j.value) : h = i[c], o = Jo(a ? c : t + (n ? "." : "#") + c, r.forced), !o && h !== void 0) {
|
|
343
|
+
if (typeof g == typeof h) continue;
|
|
344
|
+
Zo(g, h);
|
|
345
345
|
}
|
|
346
|
-
(r.sham ||
|
|
346
|
+
(r.sham || h && h.sham) && Yo(g, "sham", !0), qo(i, c, g, r);
|
|
347
347
|
}
|
|
348
|
-
},
|
|
348
|
+
}, yr = s, W = Set.prototype, y = {
|
|
349
349
|
// eslint-disable-next-line es/no-set -- safe
|
|
350
350
|
Set,
|
|
351
|
-
add:
|
|
352
|
-
has:
|
|
353
|
-
remove:
|
|
354
|
-
proto:
|
|
355
|
-
}, Qo =
|
|
351
|
+
add: yr(W.add),
|
|
352
|
+
has: yr(W.has),
|
|
353
|
+
remove: yr(W.delete),
|
|
354
|
+
proto: W
|
|
355
|
+
}, Qo = y.has, I = function(r) {
|
|
356
356
|
return Qo(r), r;
|
|
357
|
-
}, ri = R,
|
|
357
|
+
}, ri = R, E = function(r, e, t) {
|
|
358
358
|
for (var a = t ? r : r.iterator, n = r.next, o, i; !(o = ri(n, a)).done; )
|
|
359
359
|
if (i = e(o.value), i !== void 0) return i;
|
|
360
|
-
},
|
|
361
|
-
return t ? ei({ iterator:
|
|
362
|
-
},
|
|
360
|
+
}, Ke = s, ei = E, He = y, ti = He.Set, Ve = He.proto, ai = Ke(Ve.forEach), We = Ke(Ve.keys), ni = We(new ti()).next, B = function(r, e, t) {
|
|
361
|
+
return t ? ei({ iterator: We(r), next: ni }, e) : ai(r, e);
|
|
362
|
+
}, Ye = y, oi = B, ii = Ye.Set, ci = Ye.add, Dr = function(r) {
|
|
363
363
|
var e = new ii();
|
|
364
364
|
return oi(r, function(t) {
|
|
365
|
-
|
|
365
|
+
ci(e, t);
|
|
366
366
|
}), e;
|
|
367
|
-
}, si = s,
|
|
367
|
+
}, si = s, vi = Pr, ui = function(r, e, t) {
|
|
368
368
|
try {
|
|
369
|
-
return si(
|
|
369
|
+
return si(vi(Object.getOwnPropertyDescriptor(r, e)[t]));
|
|
370
370
|
} catch {
|
|
371
371
|
}
|
|
372
|
-
}, li = ui, fi =
|
|
372
|
+
}, li = ui, fi = y, L = li(fi.proto, "size", "get") || function(r) {
|
|
373
373
|
return r.size;
|
|
374
|
-
},
|
|
374
|
+
}, di = function(r) {
|
|
375
375
|
return {
|
|
376
376
|
iterator: r,
|
|
377
377
|
next: r.next,
|
|
378
378
|
done: !1
|
|
379
379
|
};
|
|
380
|
-
},
|
|
381
|
-
this.set = r, this.size = Si(e, 0), this.has =
|
|
380
|
+
}, ve = Pr, qe = Q, ue = R, pi = Nr, $i = di, le = "Invalid size", yi = RangeError, hi = TypeError, Si = Math.max, Xe = function(r, e) {
|
|
381
|
+
this.set = r, this.size = Si(e, 0), this.has = ve(r.has), this.keys = ve(r.keys);
|
|
382
382
|
};
|
|
383
|
-
|
|
383
|
+
Xe.prototype = {
|
|
384
384
|
getIterator: function() {
|
|
385
|
-
return $i(
|
|
385
|
+
return $i(qe(ue(this.keys, this.set)));
|
|
386
386
|
},
|
|
387
387
|
includes: function(r) {
|
|
388
|
-
return
|
|
388
|
+
return ue(this.has, this.set, r);
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
|
-
var
|
|
392
|
-
|
|
391
|
+
var w = function(r) {
|
|
392
|
+
qe(r);
|
|
393
393
|
var e = +r.size;
|
|
394
|
-
if (e !== e) throw new hi(
|
|
395
|
-
var t =
|
|
396
|
-
if (t < 0) throw new
|
|
397
|
-
return new
|
|
398
|
-
}, gi =
|
|
394
|
+
if (e !== e) throw new hi(le);
|
|
395
|
+
var t = pi(e);
|
|
396
|
+
if (t < 0) throw new yi(le);
|
|
397
|
+
return new Xe(r, t);
|
|
398
|
+
}, gi = I, Ze = y, mi = Dr, bi = L, Oi = w, Ii = B, Ei = E, wi = Ze.has, fe = Ze.remove, Pi = function(e) {
|
|
399
399
|
var t = gi(this), a = Oi(e), n = mi(t);
|
|
400
|
-
return bi(t) <= a.size ?
|
|
401
|
-
a.includes(o) &&
|
|
402
|
-
}) :
|
|
403
|
-
|
|
400
|
+
return bi(t) <= a.size ? Ii(t, function(o) {
|
|
401
|
+
a.includes(o) && fe(n, o);
|
|
402
|
+
}) : Ei(a.getIterator(), function(o) {
|
|
403
|
+
wi(t, o) && fe(n, o);
|
|
404
404
|
}), n;
|
|
405
|
-
}, Ti =
|
|
405
|
+
}, Ti = wr, de = function(r) {
|
|
406
406
|
return {
|
|
407
407
|
size: r,
|
|
408
408
|
has: function() {
|
|
@@ -419,9 +419,9 @@ var E = function(r) {
|
|
|
419
419
|
}, P = function(r) {
|
|
420
420
|
var e = Ti("Set");
|
|
421
421
|
try {
|
|
422
|
-
new e()[r](
|
|
422
|
+
new e()[r](de(0));
|
|
423
423
|
try {
|
|
424
|
-
return new e()[r](
|
|
424
|
+
return new e()[r](de(-1)), !1;
|
|
425
425
|
} catch {
|
|
426
426
|
return !0;
|
|
427
427
|
}
|
|
@@ -432,12 +432,12 @@ var E = function(r) {
|
|
|
432
432
|
_i({ target: "Set", proto: !0, real: !0, forced: !ji("difference") }, {
|
|
433
433
|
difference: Ri
|
|
434
434
|
});
|
|
435
|
-
var Ni =
|
|
436
|
-
var t = Ni(this), a = Ci(e), n = new
|
|
437
|
-
return Di(t) > a.size ?
|
|
438
|
-
Bi(t, o) &&
|
|
435
|
+
var Ni = I, Cr = y, Di = L, Ci = w, Mi = B, Ai = E, Fi = Cr.Set, pe = Cr.add, Bi = Cr.has, Li = function(e) {
|
|
436
|
+
var t = Ni(this), a = Ci(e), n = new Fi();
|
|
437
|
+
return Di(t) > a.size ? Ai(a.getIterator(), function(o) {
|
|
438
|
+
Bi(t, o) && pe(n, o);
|
|
439
439
|
}) : Mi(t, function(o) {
|
|
440
|
-
a.includes(o) &&
|
|
440
|
+
a.includes(o) && pe(n, o);
|
|
441
441
|
}), n;
|
|
442
442
|
}, xi = O, ki = S, zi = Li, Ui = P, Gi = !Ui("intersection") || ki(function() {
|
|
443
443
|
return String(Array.from((/* @__PURE__ */ new Set([1, 2, 3])).intersection(/* @__PURE__ */ new Set([3, 2])))) !== "3,2";
|
|
@@ -445,9 +445,9 @@ var Ni = w, Cr = $, Di = L, Ci = E, Mi = B, Fi = I, Ai = Cr.Set, ye = Cr.add, Bi
|
|
|
445
445
|
xi({ target: "Set", proto: !0, real: !0, forced: Gi }, {
|
|
446
446
|
intersection: zi
|
|
447
447
|
});
|
|
448
|
-
var Ki = R,
|
|
448
|
+
var Ki = R, $e = Q, Hi = je, Je = function(r, e, t) {
|
|
449
449
|
var a, n;
|
|
450
|
-
|
|
450
|
+
$e(r);
|
|
451
451
|
try {
|
|
452
452
|
if (a = Hi(r, "return"), !a) {
|
|
453
453
|
if (e === "throw") throw t;
|
|
@@ -459,8 +459,8 @@ var Ki = R, de = Z, Hi = Re, Ze = function(r, e, t) {
|
|
|
459
459
|
}
|
|
460
460
|
if (e === "throw") throw t;
|
|
461
461
|
if (n) throw a;
|
|
462
|
-
return
|
|
463
|
-
}, Vi =
|
|
462
|
+
return $e(a), t;
|
|
463
|
+
}, Vi = I, Wi = y.has, Yi = L, qi = w, Xi = B, Zi = E, Ji = Je, Qi = function(e) {
|
|
464
464
|
var t = Vi(this), a = qi(e);
|
|
465
465
|
if (Yi(t) <= a.size) return Xi(t, function(o) {
|
|
466
466
|
if (a.includes(o)) return !1;
|
|
@@ -469,61 +469,62 @@ var Ki = R, de = Z, Hi = Re, Ze = function(r, e, t) {
|
|
|
469
469
|
return Zi(n, function(o) {
|
|
470
470
|
if (Wi(t, o)) return Ji(n, "normal", !1);
|
|
471
471
|
}) !== !1;
|
|
472
|
-
},
|
|
473
|
-
|
|
474
|
-
isDisjointFrom:
|
|
472
|
+
}, rc = O, ec = Qi, tc = P;
|
|
473
|
+
rc({ target: "Set", proto: !0, real: !0, forced: !tc("isDisjointFrom") }, {
|
|
474
|
+
isDisjointFrom: ec
|
|
475
475
|
});
|
|
476
|
-
var
|
|
477
|
-
var t =
|
|
478
|
-
return
|
|
476
|
+
var ac = I, nc = L, oc = B, ic = w, cc = function(e) {
|
|
477
|
+
var t = ac(this), a = ic(e);
|
|
478
|
+
return nc(t) > a.size ? !1 : oc(t, function(n) {
|
|
479
479
|
if (!a.includes(n)) return !1;
|
|
480
480
|
}, !0) !== !1;
|
|
481
|
-
},
|
|
482
|
-
|
|
483
|
-
isSubsetOf:
|
|
481
|
+
}, sc = O, vc = cc, uc = P;
|
|
482
|
+
sc({ target: "Set", proto: !0, real: !0, forced: !uc("isSubsetOf") }, {
|
|
483
|
+
isSubsetOf: vc
|
|
484
484
|
});
|
|
485
|
-
var
|
|
486
|
-
var t =
|
|
487
|
-
if (
|
|
485
|
+
var lc = I, fc = y.has, dc = L, pc = w, $c = E, yc = Je, hc = function(e) {
|
|
486
|
+
var t = lc(this), a = pc(e);
|
|
487
|
+
if (dc(t) < a.size) return !1;
|
|
488
488
|
var n = a.getIterator();
|
|
489
|
-
return $
|
|
490
|
-
if (!
|
|
489
|
+
return $c(n, function(o) {
|
|
490
|
+
if (!fc(t, o)) return yc(n, "normal", !1);
|
|
491
491
|
}) !== !1;
|
|
492
|
-
},
|
|
493
|
-
|
|
494
|
-
isSupersetOf:
|
|
492
|
+
}, Sc = O, gc = hc, mc = P;
|
|
493
|
+
Sc({ target: "Set", proto: !0, real: !0, forced: !mc("isSupersetOf") }, {
|
|
494
|
+
isSupersetOf: gc
|
|
495
495
|
});
|
|
496
|
-
var
|
|
497
|
-
var t =
|
|
498
|
-
return
|
|
499
|
-
|
|
496
|
+
var bc = I, Mr = y, Oc = Dr, Ic = w, Ec = E, wc = Mr.add, Pc = Mr.has, Tc = Mr.remove, _c = function(e) {
|
|
497
|
+
var t = bc(this), a = Ic(e).getIterator(), n = Oc(t);
|
|
498
|
+
return Ec(a, function(o) {
|
|
499
|
+
Pc(t, o) ? Tc(n, o) : wc(n, o);
|
|
500
500
|
}), n;
|
|
501
|
-
},
|
|
502
|
-
|
|
503
|
-
symmetricDifference:
|
|
501
|
+
}, Rc = O, jc = _c, Nc = P;
|
|
502
|
+
Rc({ target: "Set", proto: !0, real: !0, forced: !Nc("symmetricDifference") }, {
|
|
503
|
+
symmetricDifference: jc
|
|
504
504
|
});
|
|
505
|
-
var
|
|
506
|
-
var t =
|
|
507
|
-
return
|
|
508
|
-
|
|
505
|
+
var Dc = I, Cc = y.add, Mc = Dr, Ac = w, Fc = E, Bc = function(e) {
|
|
506
|
+
var t = Dc(this), a = Ac(e).getIterator(), n = Mc(t);
|
|
507
|
+
return Fc(a, function(o) {
|
|
508
|
+
Cc(n, o);
|
|
509
509
|
}), n;
|
|
510
|
-
},
|
|
511
|
-
|
|
512
|
-
union:
|
|
510
|
+
}, Lc = O, xc = Bc, kc = P;
|
|
511
|
+
Lc({ target: "Set", proto: !0, real: !0, forced: !kc("union") }, {
|
|
512
|
+
union: xc
|
|
513
513
|
});
|
|
514
|
-
const
|
|
515
|
-
answer:
|
|
516
|
-
alertIcon:
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
514
|
+
const zc = "_answer_128c0_1", Uc = "_alertIcon_128c0_5", Gc = "_loadingIndicator_128c0_8", Kc = "_error_128c0_13", Hc = "_footer_128c0_17", Vc = "_copyButtonContainer_128c0_23", Wc = "_feedbackButtonsContainer_128c0_24", Yc = "_shouldHaveMarginTop_128c0_28", qc = "_shouldUseAnimation_128c0_31", Xc = "_shouldAnimateHeight_128c0_35", Zc = "_footerButtons_128c0_39", Jc = "_iconAvatar_128c0_45", v = {
|
|
515
|
+
answer: zc,
|
|
516
|
+
alertIcon: Uc,
|
|
517
|
+
loadingIndicator: Gc,
|
|
518
|
+
error: Kc,
|
|
519
|
+
footer: Hc,
|
|
520
|
+
copyButtonContainer: Vc,
|
|
521
|
+
feedbackButtonsContainer: Wc,
|
|
522
|
+
shouldHaveMarginTop: Yc,
|
|
523
|
+
shouldUseAnimation: qc,
|
|
524
|
+
shouldAnimateHeight: Xc,
|
|
525
|
+
footerButtons: Zc,
|
|
526
|
+
iconAvatar: Jc
|
|
527
|
+
}, Qc = /* @__PURE__ */ new Set([d.RATE_LIMITING, d.NO_CONTENT, d.PRECONDITION_FAILED, d.GENERAL, d.AGENT_NOT_FOUND]), $s = /* @__PURE__ */ rr.memo(({
|
|
527
528
|
answer: r,
|
|
528
529
|
citations: e,
|
|
529
530
|
error: t,
|
|
@@ -531,90 +532,94 @@ const zv = "_answer_ohwyy_1", Uv = "_alertIcon_ohwyy_5", Gv = "_error_ohwyy_8",
|
|
|
531
532
|
hostAppName: n,
|
|
532
533
|
feedbackValue: o,
|
|
533
534
|
isCitationsEnabled: i = !1,
|
|
534
|
-
isCompleted:
|
|
535
|
-
isFeedbackEnabled:
|
|
535
|
+
isCompleted: c = !1,
|
|
536
|
+
isFeedbackEnabled: h = !1,
|
|
536
537
|
isLoading: g = !1,
|
|
537
538
|
isMarkdownEnabled: j = !1,
|
|
538
|
-
items:
|
|
539
|
-
onCitationClick:
|
|
540
|
-
onAnswerCopy:
|
|
539
|
+
items: Qe = [],
|
|
540
|
+
onCitationClick: rt,
|
|
541
|
+
onAnswerCopy: et,
|
|
541
542
|
recordAction: x,
|
|
542
|
-
useAnimation:
|
|
543
|
+
useAnimation: tt = !0,
|
|
543
544
|
variant: N = "modal",
|
|
544
|
-
setAnswerFeedback:
|
|
545
|
-
questionId:
|
|
545
|
+
setAnswerFeedback: at,
|
|
546
|
+
questionId: nt
|
|
546
547
|
}) => {
|
|
547
|
-
const
|
|
548
|
-
formatMessage:
|
|
549
|
-
} = $t(),
|
|
550
|
-
lt.Small,
|
|
551
|
-
setTimeout(() => it(
|
|
552
|
-
}, [
|
|
553
|
-
const
|
|
554
|
-
className:
|
|
555
|
-
color:
|
|
548
|
+
const Ar = Qc.has(t), Fr = g && !r && !t, [ot, it] = rr.useState(c), {
|
|
549
|
+
formatMessage: k
|
|
550
|
+
} = $t(), ct = ut();
|
|
551
|
+
lt.Small, rr.useEffect(() => {
|
|
552
|
+
setTimeout(() => it(c), 0);
|
|
553
|
+
}, [c]);
|
|
554
|
+
const Br = () => /* @__PURE__ */ l(dt, {
|
|
555
|
+
className: v.alertIcon,
|
|
556
|
+
color: pt,
|
|
556
557
|
"data-testid": "content-answers-error-alert-icon",
|
|
557
|
-
height:
|
|
558
|
+
height: Lr,
|
|
558
559
|
role: "presentation",
|
|
559
|
-
width:
|
|
560
|
+
width: Lr
|
|
560
561
|
}), st = () => /* @__PURE__ */ D(ft, {
|
|
561
562
|
as: "p",
|
|
562
|
-
className:
|
|
563
|
+
className: v.error,
|
|
563
564
|
color: "textOnLightSecondary",
|
|
564
565
|
"data-testid": "content-answers-error",
|
|
565
566
|
variant: "caption",
|
|
566
|
-
children: [t ===
|
|
567
|
-
}),
|
|
568
|
-
className:
|
|
569
|
-
children: [
|
|
570
|
-
className:
|
|
571
|
-
children: /* @__PURE__ */
|
|
567
|
+
children: [t === d.RESPONSE_INTERRUPTED && k(U.responseInterruptedError), t === d.RESPONSE_FAILED && k(U.responseFailedError), t === d.RESPONSE_STOPPED && k(U.responseStoppedError), t !== d.RESPONSE_STOPPED && Br()]
|
|
568
|
+
}), vt = () => t !== d.RESPONSE_STOPPED ? /* @__PURE__ */ D("div", {
|
|
569
|
+
className: xr(v.footerButtons, "footer-buttons-container"),
|
|
570
|
+
children: [h ? /* @__PURE__ */ l("div", {
|
|
571
|
+
className: v.feedbackButtonsContainer,
|
|
572
|
+
children: /* @__PURE__ */ l(gt, {
|
|
572
573
|
feedbackValue: o,
|
|
573
574
|
hostAppName: n,
|
|
574
|
-
items:
|
|
575
|
-
questionId:
|
|
575
|
+
items: Qe,
|
|
576
|
+
questionId: nt,
|
|
576
577
|
recordAction: x,
|
|
577
|
-
setAnswerFeedback:
|
|
578
|
+
setAnswerFeedback: at,
|
|
578
579
|
variant: N
|
|
579
580
|
})
|
|
580
|
-
}) : null, /* @__PURE__ */
|
|
581
|
-
className:
|
|
582
|
-
children: /* @__PURE__ */
|
|
581
|
+
}) : null, /* @__PURE__ */ l("div", {
|
|
582
|
+
className: v.copyButtonContainer,
|
|
583
|
+
children: /* @__PURE__ */ l(ht, {
|
|
583
584
|
answer: r,
|
|
584
|
-
onAnswerCopy:
|
|
585
|
+
onAnswerCopy: et,
|
|
585
586
|
recordAction: x
|
|
586
587
|
})
|
|
587
588
|
})]
|
|
588
|
-
}) : r ? null :
|
|
589
|
+
}) : r ? null : Br();
|
|
589
590
|
return /* @__PURE__ */ D("div", {
|
|
590
591
|
"aria-live": "polite",
|
|
591
|
-
className:
|
|
592
|
+
className: v.answer,
|
|
592
593
|
"data-testid": "content-answers-answer",
|
|
593
|
-
children: [
|
|
594
|
+
children: [Fr && /* @__PURE__ */ l("img", {
|
|
595
|
+
alt: k(U.loadingAnswer),
|
|
596
|
+
className: v.loadingIndicator,
|
|
597
|
+
src: "https://cdn01.boxcdn.net/app-assets/product-adoption/preview-box-ai/loading-indicator.gif"
|
|
598
|
+
}), !Ar && !Fr && /* @__PURE__ */ l(kr, {
|
|
594
599
|
className: "answer",
|
|
595
600
|
variant: N,
|
|
596
|
-
children: /* @__PURE__ */ D(
|
|
601
|
+
children: /* @__PURE__ */ D(kr.Content, {
|
|
597
602
|
isUsedInsideSidebar: N === "sidebar",
|
|
598
603
|
variant: "answer",
|
|
599
|
-
children: [/* @__PURE__ */
|
|
604
|
+
children: [/* @__PURE__ */ l(yt, {
|
|
600
605
|
answer: r,
|
|
601
606
|
isMarkdownEnabled: j,
|
|
602
607
|
variant: N
|
|
603
|
-
}),
|
|
604
|
-
className:
|
|
605
|
-
[
|
|
606
|
-
[
|
|
607
|
-
[
|
|
608
|
+
}), c && /* @__PURE__ */ D("div", {
|
|
609
|
+
className: xr(v.footer, {
|
|
610
|
+
[v.shouldHaveMarginTop]: r,
|
|
611
|
+
[v.shouldAnimateHeight]: ot,
|
|
612
|
+
[v.shouldUseAnimation]: tt
|
|
608
613
|
}),
|
|
609
614
|
"data-testid": "content-answers-answer-footer",
|
|
610
|
-
children: [t && st(), i && !t && /* @__PURE__ */
|
|
615
|
+
children: [t && st(), i && !t && /* @__PURE__ */ l(mt, {
|
|
611
616
|
citations: e,
|
|
612
|
-
onCitationClick:
|
|
617
|
+
onCitationClick: rt,
|
|
613
618
|
recordAction: x
|
|
614
|
-
}),
|
|
619
|
+
}), vt()]
|
|
615
620
|
})]
|
|
616
621
|
})
|
|
617
|
-
}),
|
|
622
|
+
}), Ar && /* @__PURE__ */ l(St, {
|
|
618
623
|
contentType: a,
|
|
619
624
|
error: t,
|
|
620
625
|
recordAction: x,
|
|
@@ -623,6 +628,6 @@ const zv = "_answer_ohwyy_1", Uv = "_alertIcon_ohwyy_5", Gv = "_error_ohwyy_8",
|
|
|
623
628
|
});
|
|
624
629
|
});
|
|
625
630
|
export {
|
|
626
|
-
|
|
627
|
-
|
|
631
|
+
$s as Answer,
|
|
632
|
+
$s as default
|
|
628
633
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import W from "clsx";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import { useIntl as z } from "react-intl";
|
|
4
|
-
import { useBreakpoint as V, Breakpoint as Y, TextArea as $, Tooltip as
|
|
5
|
-
import { ArrowUp as
|
|
6
|
-
import { useAgents as
|
|
7
|
-
import { useAgents as
|
|
4
|
+
import { useBreakpoint as V, Breakpoint as Y, TextArea as $, Tooltip as g, Button as q } from "@box/blueprint-web";
|
|
5
|
+
import { ArrowUp as J } from "@box/blueprint-web-assets/icons/Fill";
|
|
6
|
+
import { useAgents as Q } from "@box/box-ai-agent-selector";
|
|
7
|
+
import { useAgents as Z } from "../../contexts/AgentsContext.js";
|
|
8
8
|
import { FooterActions as P } from "./footer-actions.js";
|
|
9
9
|
import { getAIAgentConfig as N } from "../common/agentUtils.js";
|
|
10
10
|
import { isDebugModeTrigger as tt, isEnterTrigger as at } from "../common/keyInputUtils.js";
|
|
11
|
-
import { TEXT_AREA as
|
|
11
|
+
import { TEXT_AREA as o, INPUT_TARGET_ID as rt } from "./constants.js";
|
|
12
12
|
import u from "./messages.js";
|
|
13
13
|
import { LOGGER_BASE_CONFIG as O, LOGGER_ACTION_CLICK as et, LOGGER_ACTION_KEYPRESS as st } from "../common/constants.js";
|
|
14
|
-
import { jsxs as
|
|
15
|
-
import '../../../../styles/footer.css';const
|
|
16
|
-
questionInput:
|
|
17
|
-
avatar:
|
|
14
|
+
import { jsxs as R, jsx as b } from "react/jsx-runtime";
|
|
15
|
+
import '../../../../styles/footer.css';const ot = "_questionInput_169rs_1", it = "_avatar_169rs_26", nt = "_submitButton_169rs_29", mt = "_textArea_169rs_45", ut = "_error_169rs_68", ct = "_sidebar_169rs_71", lt = "_submitButtonTooltip_169rs_79", T = {
|
|
16
|
+
questionInput: ot,
|
|
17
|
+
avatar: it,
|
|
18
18
|
submitButton: nt,
|
|
19
19
|
textArea: mt,
|
|
20
20
|
error: ut,
|
|
@@ -22,32 +22,32 @@ import '../../../../styles/footer.css';const it = "_questionInput_169rs_1", ot =
|
|
|
22
22
|
submitButtonTooltip: lt
|
|
23
23
|
}, vt = ({
|
|
24
24
|
askSuggestedQuestion: C,
|
|
25
|
-
enableDebugMode:
|
|
25
|
+
enableDebugMode: h = !1,
|
|
26
26
|
hasRequestInProgress: e,
|
|
27
27
|
isAgentSelectorEnabled: f,
|
|
28
28
|
isAIStudioAgentSelectorEnabled: p,
|
|
29
|
-
isDebugModeShown:
|
|
30
|
-
isStopResponseEnabled:
|
|
31
|
-
isStreamingEnabled:
|
|
29
|
+
isDebugModeShown: x,
|
|
30
|
+
isStopResponseEnabled: X,
|
|
31
|
+
isStreamingEnabled: I,
|
|
32
32
|
lastQuestion: A,
|
|
33
33
|
onRetryQuestion: E,
|
|
34
|
-
onStopQuestion:
|
|
34
|
+
onStopQuestion: w,
|
|
35
35
|
recordAction: s,
|
|
36
36
|
sendQuestion: L,
|
|
37
37
|
setAskSuggestedQuestion: M,
|
|
38
|
-
toggleDebugMode:
|
|
39
|
-
variant:
|
|
38
|
+
toggleDebugMode: i,
|
|
39
|
+
variant: H = "modal"
|
|
40
40
|
}) => {
|
|
41
|
-
const v =
|
|
41
|
+
const v = H === "sidebar", n = z(), y = V(), a = /* @__PURE__ */ r.createRef(), K = y <= Y.Medium && !v ? o.MAX_ROWS_MOBILE : o.MAX_ROWS, [c, B] = r.useState(!0), [F, G] = r.useState(!1), {
|
|
42
42
|
selectedAgent: _
|
|
43
|
-
} =
|
|
43
|
+
} = Z(), {
|
|
44
44
|
selectedAgent: d
|
|
45
|
-
} =
|
|
45
|
+
} = Q(), k = r.useCallback(() => {
|
|
46
46
|
a.current && a.current.focus();
|
|
47
47
|
}, [a]), j = r.useCallback(() => {
|
|
48
48
|
var m;
|
|
49
49
|
let t = ((m = a.current) == null ? void 0 : m.value) ?? "";
|
|
50
|
-
a.current && t.length >
|
|
50
|
+
a.current && t.length > o.MAX_LENGTH && (a.current.value = t.slice(0, o.MAX_LENGTH), t = a.current.value), G(t.length >= o.MAX_LENGTH), B(t.trim().length === 0);
|
|
51
51
|
}, [a]), l = r.useCallback(() => {
|
|
52
52
|
if (k(), !e && a.current) {
|
|
53
53
|
const t = {
|
|
@@ -57,21 +57,21 @@ import '../../../../styles/footer.css';const it = "_questionInput_169rs_1", ot =
|
|
|
57
57
|
const m = N(f, _, p, d);
|
|
58
58
|
L(t, m), a.current.value = "", B(!0), G(!1);
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
x && i && i();
|
|
61
61
|
}
|
|
62
|
-
}, [d, k, e, a, p, f,
|
|
62
|
+
}, [d, k, e, a, p, f, x, _, L, i]), D = r.useCallback((t) => {
|
|
63
63
|
t.preventDefault(), !e && !c && s && s({
|
|
64
64
|
...O,
|
|
65
65
|
action: et,
|
|
66
66
|
target: "ask"
|
|
67
67
|
}), l();
|
|
68
68
|
}, [e, c, s, l]), S = r.useCallback((t) => {
|
|
69
|
-
|
|
69
|
+
h && i && tt(t) && i(), at(t) && (t.preventDefault(), !e && !c && s && s({
|
|
70
70
|
...O,
|
|
71
71
|
action: st,
|
|
72
72
|
target: "ask"
|
|
73
73
|
}), l());
|
|
74
|
-
}, [
|
|
74
|
+
}, [h, e, c, s, l, i]), U = r.useCallback((t) => {
|
|
75
75
|
const m = N(f, _, p, d);
|
|
76
76
|
E(t, m);
|
|
77
77
|
}, [d, p, f, E, _]);
|
|
@@ -79,15 +79,15 @@ import '../../../../styles/footer.css';const it = "_questionInput_169rs_1", ot =
|
|
|
79
79
|
queueMicrotask(k);
|
|
80
80
|
}, []), r.useEffect(() => {
|
|
81
81
|
C && a.current && !e && M && (a.current.value = C, l(), M(null));
|
|
82
|
-
}, [C]), /* @__PURE__ */
|
|
82
|
+
}, [C]), /* @__PURE__ */ R("div", {
|
|
83
83
|
children: [A && /* @__PURE__ */ b(P, {
|
|
84
|
-
isStopResponseEnabled:
|
|
85
|
-
isStreamingEnabled:
|
|
84
|
+
isStopResponseEnabled: X,
|
|
85
|
+
isStreamingEnabled: I,
|
|
86
86
|
lastQuestion: A,
|
|
87
87
|
onRetryQuestion: U,
|
|
88
|
-
onStopQuestion:
|
|
88
|
+
onStopQuestion: w,
|
|
89
89
|
recordAction: s
|
|
90
|
-
}), /* @__PURE__ */
|
|
90
|
+
}), /* @__PURE__ */ R("div", {
|
|
91
91
|
className: W(T.questionInput, v && T.sidebar),
|
|
92
92
|
children: [/* @__PURE__ */ b($, {
|
|
93
93
|
ref: a,
|
|
@@ -95,26 +95,26 @@ import '../../../../styles/footer.css';const it = "_questionInput_169rs_1", ot =
|
|
|
95
95
|
"data-target-id": rt,
|
|
96
96
|
"data-testid": "content-answers-question-input",
|
|
97
97
|
error: F && n.formatMessage(u.maxCharactersReachedError, {
|
|
98
|
-
characterLimit:
|
|
98
|
+
characterLimit: o.MAX_LENGTH
|
|
99
99
|
}),
|
|
100
100
|
hideLabel: !0,
|
|
101
101
|
label: n.formatMessage(u.askQuestionPlaceholder),
|
|
102
|
-
maxLength:
|
|
102
|
+
maxLength: o.MAX_LENGTH,
|
|
103
103
|
maxRows: K,
|
|
104
104
|
onChange: j,
|
|
105
105
|
onKeyDown: S,
|
|
106
106
|
placeholder: n.formatMessage(u.askQuestionPlaceholder)
|
|
107
|
-
}), /* @__PURE__ */ b(
|
|
107
|
+
}), /* @__PURE__ */ b(g, {
|
|
108
108
|
content: n.formatMessage(u.ask),
|
|
109
109
|
"data-testid": "ask-tooltip",
|
|
110
110
|
variant: "standard",
|
|
111
|
-
children: /* @__PURE__ */ b(
|
|
111
|
+
children: /* @__PURE__ */ b(q, {
|
|
112
112
|
"aria-label": n.formatMessage(u.ask),
|
|
113
113
|
className: T.submitButton,
|
|
114
114
|
"data-testid": "content-answers-submit-button",
|
|
115
115
|
disabled: c || e,
|
|
116
|
-
icon:
|
|
117
|
-
loading:
|
|
116
|
+
icon: J,
|
|
117
|
+
loading: !1,
|
|
118
118
|
loadingAriaLabel: n.formatMessage(u.askDisabledTooltip),
|
|
119
119
|
onClick: D,
|
|
120
120
|
size: "large",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/box-ai-content-answers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.99.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@box/blueprint-web": "^7.8.0",
|
|
6
6
|
"@box/blueprint-web-assets": "^4.16.0",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@box/babel-plugin-target-attributes": "1.3.0",
|
|
19
|
-
"@box/blueprint-web": "^9.18.
|
|
20
|
-
"@box/blueprint-web-assets": "^4.
|
|
21
|
-
"@box/box-ai-agent-selector": "^0.
|
|
22
|
-
"@box/item-icon": "^0.9.
|
|
19
|
+
"@box/blueprint-web": "^9.18.5",
|
|
20
|
+
"@box/blueprint-web-assets": "^4.34.0",
|
|
21
|
+
"@box/box-ai-agent-selector": "^0.27.0",
|
|
22
|
+
"@box/item-icon": "^0.9.87",
|
|
23
23
|
"@box/storybook-utils": "^0.8.3",
|
|
24
24
|
"@testing-library/react": "^15.0.6",
|
|
25
25
|
"react": "^18.3.0",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"**/*.css"
|
|
58
58
|
],
|
|
59
59
|
"license": "SEE LICENSE IN LICENSE",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "4186e6a642af66984f1fb57cad2b9188d4b8f89a"
|
|
61
61
|
}
|
package/styles/answer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._answer_128c0_1{white-space:pre-wrap;border:none}._answer_128c0_1 ._alertIcon_128c0_5{margin-left:.5rem}._answer_128c0_1 ._loadingIndicator_128c0_8{width:2rem;height:2rem;margin-left:1rem}._answer_128c0_1 ._error_128c0_13{display:flex;align-items:center}._answer_128c0_1 ._footer_128c0_17{display:flex;align-items:center;justify-content:space-between;height:1.5rem}._answer_128c0_1 ._footer_128c0_17 ._copyButtonContainer_128c0_23,._answer_128c0_1 ._footer_128c0_17 ._feedbackButtonsContainer_128c0_24{opacity:0;transition:opacity .3s}._answer_128c0_1 ._footer_128c0_17._shouldHaveMarginTop_128c0_28{margin-top:.75rem}._answer_128c0_1 ._footer_128c0_17._shouldUseAnimation_128c0_31{max-height:0;overflow-y:hidden}._answer_128c0_1 ._footer_128c0_17._shouldUseAnimation_128c0_31._shouldAnimateHeight_128c0_35{max-height:200px;transition:max-height 1s ease-in}._answer_128c0_1 ._footer_128c0_17 ._footerButtons_128c0_39,._answer_128c0_1 ._footer_128c0_17 ._feedbackButtonsContainer_128c0_24{display:flex;gap:.25rem;margin-inline-start:auto}._answer_128c0_1 ._iconAvatar_128c0_45{display:flex;align-items:center;justify-content:center;width:var(--size-8);height:var(--size-8);border-radius:50%}@media (max-width: 374px){._answer_128c0_1 ._iconAvatar_128c0_45{width:var(--size-6);height:var(--size-6)}}._answer_128c0_1:hover ._copyButtonContainer_128c0_23,._answer_128c0_1:hover ._feedbackButtonsContainer_128c0_24,._answer_128c0_1 ._copyButtonContainer_128c0_23:focus-within,._answer_128c0_1 ._feedbackButtonsContainer_128c0_24:focus-within{opacity:1}._answer_128c0_1:hover ._copyButtonContainer_128c0_23>button,._answer_128c0_1:hover ._feedbackButtonsContainer_128c0_24>button,._answer_128c0_1 ._copyButtonContainer_128c0_23:focus-within>button,._answer_128c0_1 ._feedbackButtonsContainer_128c0_24:focus-within>button{outline-offset:-2px}
|
package/types/index.d.ts
CHANGED
package/types/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AgentType as AIStudioAgentType } from '@box/box-ai-agent-selector';
|
|
2
2
|
import { LOGGER_ACTION_CLICK, LOGGER_ACTION_KEYPRESS, LOGGER_ACTION_PROGRAMMATIC } from './components/common/constants';
|
|
3
|
+
import { APP_MODE } from './constants';
|
|
3
4
|
export declare enum ANSWER_ERROR {
|
|
4
5
|
GENERAL = "general",
|
|
5
6
|
RATE_LIMITING = "rate_limiting",
|
|
@@ -205,3 +206,4 @@ export type EventLogOptions = {
|
|
|
205
206
|
origin: string;
|
|
206
207
|
sendTrace?: boolean;
|
|
207
208
|
};
|
|
209
|
+
export type appModeType = typeof APP_MODE.PREVIEW_MODAL | typeof APP_MODE.PREVIEW_SIDEBAR | typeof APP_MODE.ITEM_LIST_MODAL | typeof APP_MODE.HUBS_MODAL | typeof APP_MODE.NOTES_MODAL;
|