@capitol.ai/summary
Version:
Library of JS components from Capitol AI
1,156 lines (1,154 loc) • 57.5 kB
JavaScript
import T1, { useState as B, useEffect as me } from "react";
var Y = { exports: {} }, $ = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var N1;
function he() {
if (N1) return $;
N1 = 1;
var n = T1, i = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, f = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
function c(p, x, g) {
var v, y = {}, w = null, N = null;
g !== void 0 && (w = "" + g), x.key !== void 0 && (w = "" + x.key), x.ref !== void 0 && (N = x.ref);
for (v in x) s.call(x, v) && !h.hasOwnProperty(v) && (y[v] = x[v]);
if (p && p.defaultProps) for (v in x = p.defaultProps, x) y[v] === void 0 && (y[v] = x[v]);
return { $$typeof: i, type: p, key: w, ref: N, props: y, _owner: f.current };
}
return $.Fragment = o, $.jsx = c, $.jsxs = c, $;
}
var D = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var L1;
function ve() {
return L1 || (L1 = 1, process.env.NODE_ENV !== "production" && function() {
var n = T1, i = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), p = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), N = Symbol.for("react.offscreen"), F = Symbol.iterator, U = "@@iterator";
function q(e) {
if (e === null || typeof e != "object")
return null;
var t = F && e[F] || e[U];
return typeof t == "function" ? t : null;
}
var H = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function _(e) {
{
for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), l = 1; l < t; l++)
a[l - 1] = arguments[l];
P1("error", e, a);
}
}
function P1(e, t, a) {
{
var l = H.ReactDebugCurrentFrame, m = l.getStackAddendum();
m !== "" && (t += "%s", a = a.concat([m]));
var C = a.map(function(d) {
return String(d);
});
C.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, C);
}
}
var V1 = !1, M1 = !1, $1 = !1, D1 = !1, F1 = !1, a1;
a1 = Symbol.for("react.module.reference");
function A1(e) {
return !!(typeof e == "string" || typeof e == "function" || e === s || e === h || F1 || e === f || e === g || e === v || D1 || e === N || V1 || M1 || $1 || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === y || e.$$typeof === c || e.$$typeof === p || e.$$typeof === x || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
e.$$typeof === a1 || e.getModuleId !== void 0));
}
function Z1(e, t, a) {
var l = e.displayName;
if (l)
return l;
var m = t.displayName || t.name || "";
return m !== "" ? a + "(" + m + ")" : a;
}
function n1(e) {
return e.displayName || "Context";
}
function L(e) {
if (e == null)
return null;
if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
return e.displayName || e.name || null;
if (typeof e == "string")
return e;
switch (e) {
case s:
return "Fragment";
case o:
return "Portal";
case h:
return "Profiler";
case f:
return "StrictMode";
case g:
return "Suspense";
case v:
return "SuspenseList";
}
if (typeof e == "object")
switch (e.$$typeof) {
case p:
var t = e;
return n1(t) + ".Consumer";
case c:
var a = e;
return n1(a._context) + ".Provider";
case x:
return Z1(e, e.render, "ForwardRef");
case y:
var l = e.displayName || null;
return l !== null ? l : L(e.type) || "Memo";
case w: {
var m = e, C = m._payload, d = m._init;
try {
return L(d(C));
} catch {
return null;
}
}
}
return null;
}
var S = Object.assign, V = 0, i1, s1, l1, o1, c1, u1, d1;
function f1() {
}
f1.__reactDisabledLog = !0;
function W1() {
{
if (V === 0) {
i1 = console.log, s1 = console.info, l1 = console.warn, o1 = console.error, c1 = console.group, u1 = console.groupCollapsed, d1 = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: f1,
writable: !0
};
Object.defineProperties(console, {
info: e,
log: e,
warn: e,
error: e,
group: e,
groupCollapsed: e,
groupEnd: e
});
}
V++;
}
}
function I1() {
{
if (V--, V === 0) {
var e = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: S({}, e, {
value: i1
}),
info: S({}, e, {
value: s1
}),
warn: S({}, e, {
value: l1
}),
error: S({}, e, {
value: o1
}),
group: S({}, e, {
value: c1
}),
groupCollapsed: S({}, e, {
value: u1
}),
groupEnd: S({}, e, {
value: d1
})
});
}
V < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var z = H.ReactCurrentDispatcher, J;
function A(e, t, a) {
{
if (J === void 0)
try {
throw Error();
} catch (m) {
var l = m.stack.trim().match(/\n( *(at )?)/);
J = l && l[1] || "";
}
return `
` + J + e;
}
}
var K = !1, Z;
{
var Y1 = typeof WeakMap == "function" ? WeakMap : Map;
Z = new Y1();
}
function p1(e, t) {
if (!e || K)
return "";
{
var a = Z.get(e);
if (a !== void 0)
return a;
}
var l;
K = !0;
var m = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var C;
C = z.current, z.current = null, W1();
try {
if (t) {
var d = function() {
throw Error();
};
if (Object.defineProperty(d.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(d, []);
} catch (R) {
l = R;
}
Reflect.construct(e, [], d);
} else {
try {
d.call();
} catch (R) {
l = R;
}
e.call(d.prototype);
}
} else {
try {
throw Error();
} catch (R) {
l = R;
}
e();
}
} catch (R) {
if (R && l && typeof R.stack == "string") {
for (var u = R.stack.split(`
`), E = l.stack.split(`
`), b = u.length - 1, j = E.length - 1; b >= 1 && j >= 0 && u[b] !== E[j]; )
j--;
for (; b >= 1 && j >= 0; b--, j--)
if (u[b] !== E[j]) {
if (b !== 1 || j !== 1)
do
if (b--, j--, j < 0 || u[b] !== E[j]) {
var k = `
` + u[b].replace(" at new ", " at ");
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, k), k;
}
while (b >= 1 && j >= 0);
break;
}
}
} finally {
K = !1, z.current = C, I1(), Error.prepareStackTrace = m;
}
var P = e ? e.displayName || e.name : "", T = P ? A(P) : "";
return typeof e == "function" && Z.set(e, T), T;
}
function B1(e, t, a) {
return p1(e, !1);
}
function U1(e) {
var t = e.prototype;
return !!(t && t.isReactComponent);
}
function W(e, t, a) {
if (e == null)
return "";
if (typeof e == "function")
return p1(e, U1(e));
if (typeof e == "string")
return A(e);
switch (e) {
case g:
return A("Suspense");
case v:
return A("SuspenseList");
}
if (typeof e == "object")
switch (e.$$typeof) {
case x:
return B1(e.render);
case y:
return W(e.type, t, a);
case w: {
var l = e, m = l._payload, C = l._init;
try {
return W(C(m), t, a);
} catch {
}
}
}
return "";
}
var M = Object.prototype.hasOwnProperty, x1 = {}, m1 = H.ReactDebugCurrentFrame;
function I(e) {
if (e) {
var t = e._owner, a = W(e.type, e._source, t ? t.type : null);
m1.setExtraStackFrame(a);
} else
m1.setExtraStackFrame(null);
}
function q1(e, t, a, l, m) {
{
var C = Function.call.bind(M);
for (var d in e)
if (C(e, d)) {
var u = void 0;
try {
if (typeof e[d] != "function") {
var E = Error((l || "React class") + ": " + a + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw E.name = "Invariant Violation", E;
}
u = e[d](t, d, l, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (b) {
u = b;
}
u && !(u instanceof Error) && (I(m), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", a, d, typeof u), I(null)), u instanceof Error && !(u.message in x1) && (x1[u.message] = !0, I(m), _("Failed %s type: %s", a, u.message), I(null));
}
}
}
var z1 = Array.isArray;
function G(e) {
return z1(e);
}
function J1(e) {
{
var t = typeof Symbol == "function" && Symbol.toStringTag, a = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
return a;
}
}
function K1(e) {
try {
return h1(e), !1;
} catch {
return !0;
}
}
function h1(e) {
return "" + e;
}
function v1(e) {
if (K1(e))
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", J1(e)), h1(e);
}
var C1 = H.ReactCurrentOwner, G1 = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, g1, b1;
function X1(e) {
if (M.call(e, "ref")) {
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
if (t && t.isReactWarning)
return !1;
}
return e.ref !== void 0;
}
function Q1(e) {
if (M.call(e, "key")) {
var t = Object.getOwnPropertyDescriptor(e, "key").get;
if (t && t.isReactWarning)
return !1;
}
return e.key !== void 0;
}
function ee(e, t) {
typeof e.ref == "string" && C1.current;
}
function re(e, t) {
{
var a = function() {
g1 || (g1 = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
};
a.isReactWarning = !0, Object.defineProperty(e, "key", {
get: a,
configurable: !0
});
}
}
function te(e, t) {
{
var a = function() {
b1 || (b1 = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
};
a.isReactWarning = !0, Object.defineProperty(e, "ref", {
get: a,
configurable: !0
});
}
}
var ae = function(e, t, a, l, m, C, d) {
var u = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: i,
// Built-in properties that belong on the element
type: e,
key: t,
ref: a,
props: d,
// Record the component responsible for creating this element.
_owner: C
};
return u._store = {}, Object.defineProperty(u._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(u, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: l
}), Object.defineProperty(u, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: m
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
};
function ne(e, t, a, l, m) {
{
var C, d = {}, u = null, E = null;
a !== void 0 && (v1(a), u = "" + a), Q1(t) && (v1(t.key), u = "" + t.key), X1(t) && (E = t.ref, ee(t, m));
for (C in t)
M.call(t, C) && !G1.hasOwnProperty(C) && (d[C] = t[C]);
if (e && e.defaultProps) {
var b = e.defaultProps;
for (C in b)
d[C] === void 0 && (d[C] = b[C]);
}
if (u || E) {
var j = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
u && re(d, j), E && te(d, j);
}
return ae(e, u, E, m, l, C1.current, d);
}
}
var X = H.ReactCurrentOwner, j1 = H.ReactDebugCurrentFrame;
function O(e) {
if (e) {
var t = e._owner, a = W(e.type, e._source, t ? t.type : null);
j1.setExtraStackFrame(a);
} else
j1.setExtraStackFrame(null);
}
var Q;
Q = !1;
function e1(e) {
return typeof e == "object" && e !== null && e.$$typeof === i;
}
function y1() {
{
if (X.current) {
var e = L(X.current.type);
if (e)
return `
Check the render method of \`` + e + "`.";
}
return "";
}
}
function ie(e) {
return "";
}
var w1 = {};
function se(e) {
{
var t = y1();
if (!t) {
var a = typeof e == "string" ? e : e.displayName || e.name;
a && (t = `
Check the top-level render call using <` + a + ">.");
}
return t;
}
}
function _1(e, t) {
{
if (!e._store || e._store.validated || e.key != null)
return;
e._store.validated = !0;
var a = se(t);
if (w1[a])
return;
w1[a] = !0;
var l = "";
e && e._owner && e._owner !== X.current && (l = " It was passed a child from " + L(e._owner.type) + "."), O(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, l), O(null);
}
}
function E1(e, t) {
{
if (typeof e != "object")
return;
if (G(e))
for (var a = 0; a < e.length; a++) {
var l = e[a];
e1(l) && _1(l, t);
}
else if (e1(e))
e._store && (e._store.validated = !0);
else if (e) {
var m = q(e);
if (typeof m == "function" && m !== e.entries)
for (var C = m.call(e), d; !(d = C.next()).done; )
e1(d.value) && _1(d.value, t);
}
}
}
function le(e) {
{
var t = e.type;
if (t == null || typeof t == "string")
return;
var a;
if (typeof t == "function")
a = t.propTypes;
else if (typeof t == "object" && (t.$$typeof === x || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
t.$$typeof === y))
a = t.propTypes;
else
return;
if (a) {
var l = L(t);
q1(a, e.props, "prop", l, e);
} else if (t.PropTypes !== void 0 && !Q) {
Q = !0;
var m = L(t);
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
}
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function oe(e) {
{
for (var t = Object.keys(e.props), a = 0; a < t.length; a++) {
var l = t[a];
if (l !== "children" && l !== "key") {
O(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), O(null);
break;
}
}
e.ref !== null && (O(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), O(null));
}
}
var R1 = {};
function k1(e, t, a, l, m, C) {
{
var d = A1(e);
if (!d) {
var u = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var E = ie();
E ? u += E : u += y1();
var b;
e === null ? b = "null" : G(e) ? b = "array" : e !== void 0 && e.$$typeof === i ? (b = "<" + (L(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, u);
}
var j = ne(e, t, a, m, C);
if (j == null)
return j;
if (d) {
var k = t.children;
if (k !== void 0)
if (l)
if (G(k)) {
for (var P = 0; P < k.length; P++)
E1(k[P], e);
Object.freeze && Object.freeze(k);
} else
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
E1(k, e);
}
if (M.call(t, "key")) {
var T = L(e), R = Object.keys(t).filter(function(xe) {
return xe !== "key";
}), r1 = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
if (!R1[T + r1]) {
var pe = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
_(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`, r1, T, pe, T), R1[T + r1] = !0;
}
}
return e === s ? oe(j) : le(j), j;
}
}
function ce(e, t, a) {
return k1(e, t, a, !0);
}
function ue(e, t, a) {
return k1(e, t, a, !1);
}
var de = ue, fe = ce;
D.Fragment = s, D.jsx = de, D.jsxs = fe;
}()), D;
}
var S1;
function Ce() {
return S1 || (S1 = 1, process.env.NODE_ENV === "production" ? Y.exports = he() : Y.exports = ve()), Y.exports;
}
var r = Ce();
const H1 = () => /* @__PURE__ */ r.jsx(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
width: "20",
height: "20",
viewBox: "0 0 20 20",
fill: "none",
children: /* @__PURE__ */ r.jsx(
"path",
{
d: "M8.75036 10.0001H4.16702M4.09648 10.243L2.15071 16.0552C1.99785 16.5119 1.92142 16.7402 1.97627 16.8808C2.0239 17.0029 2.1262 17.0954 2.25244 17.1307C2.3978 17.1712 2.61736 17.0724 3.05647 16.8748L16.9827 10.608C17.4113 10.4151 17.6256 10.3187 17.6918 10.1847C17.7494 10.0684 17.7494 9.93179 17.6918 9.8154C17.6256 9.68143 17.4113 9.585 16.9827 9.39212L3.05161 3.12317C2.61383 2.92617 2.39493 2.82767 2.24971 2.86807C2.1236 2.90317 2.0213 2.99549 1.97351 3.11736C1.91847 3.25769 1.99408 3.4855 2.14531 3.94113L4.09702 9.82134C4.12299 9.8996 4.13598 9.93873 4.14111 9.97874C4.14565 10.0143 4.14561 10.0502 4.14097 10.0857C4.13574 10.1257 4.12265 10.1648 4.09648 10.243Z",
stroke: "currentColor",
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}
)
}
), ge = ({
accentColor: n = "#1C76F3",
onSubmitPrompt: i,
disabled: o = !1
}) => /* @__PURE__ */ r.jsx(
"button",
{
className: "submitButton",
style: n ? { background: n } : {},
onClick: i,
disabled: o,
"aria-label": "Submit prompt",
children: /* @__PURE__ */ r.jsx(H1, {})
}
), be = ({ setPrompt: n, prompt: i }) => /* @__PURE__ */ r.jsx(
"textarea",
{
suppressContentEditableWarning: !0,
role: "textbox",
id: "capitolai-summary__prompt",
className: "border-2 rounded-lg p-4 mt-4 whitespace-pre-wrap",
style: { minHeight: "200px" },
contentEditable: !0,
onKeyUp: (o) => {
let s = o.currentTarget.lastElementChild;
s && s.tagName === "BR" && s.remove();
},
onInput: (o) => {
const s = o.target.value;
n(s);
},
value: i
}
), je = ({
placeholderText: n,
minHeight: i,
setPrompt: o,
onSubmitPrompt: s,
isEditable: f = !0,
onChange: h
}) => /* @__PURE__ */ r.jsx(
"div",
{
suppressContentEditableWarning: !0,
role: "textbox",
id: "capitolai-summary__prompt",
placeholder: n,
className: "contentEditable",
style: i ? { minHeight: `${i}px` } : {},
contentEditable: f,
onKeyUp: (c) => {
let p = c.currentTarget.lastElementChild;
p && p.tagName === "BR" && p.remove();
},
onKeyDown: (c) => {
c.key === "Enter" && (c.preventDefault(), s());
},
onInput: (c) => {
const p = c.currentTarget.textContent || "";
o(p), h && h(p);
},
"aria-placeholder": n
}
), O1 = ({
placeholderText: n = "Enter prompt",
minHeight: i,
accentColor: o,
onSubmit: s = () => {
},
onChange: f = () => {
},
disabled: h = !1,
enableFormatPrompt: c = !1,
defaultFormatPrompt: p = ""
}) => {
const [x, g] = B(""), [v, y] = B(p), w = () => {
if (c && v && v.length > 0 ? s(x, v) : s(x), g(""), typeof document < "u") {
const N = document.getElementById("capitolai-summary__prompt");
N && (N.textContent = "");
}
};
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
/* @__PURE__ */ r.jsxs("div", { className: "promptContainer", id: "capitolai-summary__prompt-container", children: [
/* @__PURE__ */ r.jsx("div", { className: "promptWrapper", children: /* @__PURE__ */ r.jsx(
je,
{
placeholderText: n,
minHeight: i,
setPrompt: g,
onSubmitPrompt: w,
isEditable: !h,
onChange: f
}
) }),
/* @__PURE__ */ r.jsx("div", { className: "buttonWrapper", children: /* @__PURE__ */ r.jsx(
ge,
{
onSubmitPrompt: w,
accentColor: o,
disabled: h
}
) })
] }),
c && /* @__PURE__ */ r.jsx(be, { setPrompt: y, prompt: v })
] });
}, Ve = ({ onSubmit: n }) => /* @__PURE__ */ r.jsxs("div", { className: "fancyPromptContainer", "data-testid": "fancy-prompt-container", children: [
/* @__PURE__ */ r.jsx(
O1,
{
placeholderText: "Ask a question",
minHeight: 100,
accentColor: "#d02523",
onSubmit: n
}
),
/* @__PURE__ */ r.jsx("div", { className: "fancyPromptFooter", "data-testid": "fancy-prompt-footer", children: "TODO" })
] }), ye = ({ prompt: n, onClickHandler: i }) => /* @__PURE__ */ r.jsxs(
"div",
{
className: "rounded-lg border-2 border-gray-200 py-2 px-4 flex items-center hover:bg-stone-100 cursor-pointer capitolai-summary__prompt-suggestion",
onClick: () => {
i(n);
},
children: [
/* @__PURE__ */ r.jsx("div", { className: "flex-1 text-[13px] ", children: n }),
/* @__PURE__ */ r.jsx("div", { className: "stroke-gray-500 pl-2", children: /* @__PURE__ */ r.jsx(H1, {}) })
]
}
), we = ({
prompts: n = [],
onClickHandler: i = () => {
},
title: o = "Suggestions"
}) => n.length === 0 ? null : /* @__PURE__ */ r.jsxs("div", { className: "capitolai-summary__prompt-suggestions-container", children: [
/* @__PURE__ */ r.jsx("div", { className: "font-bold text-xl pb-4", children: o }),
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-1 justify-between gap-2 sm:grid-cols-2", children: n.map((s, f) => /* @__PURE__ */ r.jsx(
ye,
{
prompt: s,
onClickHandler: i
},
f
)) })
] }), _e = ({
currentPage: n,
totalPages: i,
onPageChange: o,
maxVisiblePages: s = 5
}) => {
if (i <= 1) return null;
const f = () => {
const h = Math.floor(s / 2);
let c = Math.max(1, n - h), p = Math.min(i, c + s - 1);
return p - c + 1 < s && (c = Math.max(1, p - s + 1)), Array.from(
{ length: p - c + 1 },
(x, g) => c + g
);
};
return /* @__PURE__ */ r.jsxs("div", { className: "flex justify-center items-center space-x-2 mt-6", children: [
/* @__PURE__ */ r.jsx(
"button",
{
onClick: () => o(n - 1),
disabled: n === 1,
className: `px-3 py-1 rounded ${n === 1 ? "bg-gray-200 text-gray-500 cursor-not-allowed" : "bg-white text-gray-700 hover:bg-gray-100"}`,
children: "Previous"
}
),
f().map((h) => /* @__PURE__ */ r.jsx(
"button",
{
onClick: () => o(h),
className: `px-3 py-1 rounded ${n === h ? "bg-blue-500 text-white" : "bg-white text-gray-700 hover:bg-gray-100"}`,
children: h
},
h
)),
/* @__PURE__ */ r.jsx(
"button",
{
onClick: () => o(n + 1),
disabled: n === i,
className: `px-3 py-1 rounded ${n === i ? "bg-gray-200 text-gray-500 cursor-not-allowed" : "bg-white text-gray-700 hover:bg-gray-100"}`,
children: "Next"
}
)
] });
}, Ee = ({ source: n, index: i, isMasonryLayout: o = !1 }) => {
function s(g) {
return new URL(g).hostname;
}
const f = s(n.url), h = f, c = f, p = n == null ? void 0 : n.title, x = n == null ? void 0 : n.image;
return /* @__PURE__ */ r.jsxs(
"div",
{
className: `group p-4 rounded-lg flex cursor-pointer ${o ? "bg-stone-100 hover:bg-stone-200" : "hover:bg-neutral-100"}`,
children: [
/* @__PURE__ */ r.jsxs(
"div",
{
onClick: () => {
typeof window < "u" && window.open(n.url, "_blank");
},
className: "flex-1",
children: [
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
/* @__PURE__ */ r.jsx("div", { className: "w-5 h-5 min-w-5 bg-gray-300 rounded-full flex items-center justify-center text-xs", children: i + 1 }),
/* @__PURE__ */ r.jsx(
"img",
{
style: { marginLeft: "-4px" },
className: "w-5 h-5 bg-gray-400 rounded-full flex items-center justify-center",
src: `https://www.google.com/s2/favicons?sz=18&domain=${f}`
}
),
/* @__PURE__ */ r.jsx("div", { className: "pl-2 uppercase text-gray-500 font-medium text-[11px] line-clamp-1 break-all", children: h })
] }),
!o && /* @__PURE__ */ r.jsx("div", { className: "font-bold text-[19px] mt-2 line-clamp-1 break-all group-hover:underline py-1", children: c }),
/* @__PURE__ */ r.jsx(
"div",
{
className: o ? "text-[13px] pt-2 font-bold group-hover:underline line-clamp-3" : "text-[15px] text-gray-500 line-clamp-3",
children: p
}
)
]
},
`source-${i}`
),
o ? null : x ? /* @__PURE__ */ r.jsx("img", { className: "w-[174px] h-[116px] ml-12 object-cover", src: x }) : /* @__PURE__ */ r.jsx("div", { className: "w-[174px] h-[116px] ml-12" })
]
}
);
}, Re = ({
sources: n = [],
itemsPerPage: i = 4,
layout: o = "default"
}) => {
const [s, f] = B(1), h = Math.ceil(n.length / i), c = (s - 1) * i, p = c + i, x = n.slice(c, p), g = o === "masonry";
switch (o) {
case "compact":
return /* @__PURE__ */ r.jsxs("div", { className: "inline-flex items-center gap-2 px-3 py-2 bg-[rgba(36,35,41,0.06)] rounded-full", children: [
/* @__PURE__ */ r.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ r.jsxs("span", { className: "text-[13px] font-normal text-[rgba(36,35,41,0.8)]", children: [
n.length,
" Source",
n.length !== 1 ? "s" : ""
] }) }),
/* @__PURE__ */ r.jsx("div", { className: "flex -space-x-1.5", children: n.map((v, y) => {
const w = new URL(v.url).hostname;
return /* @__PURE__ */ r.jsxs(
"div",
{
onClick: () => {
typeof window < "u" && window.open(v.url, "_blank");
},
className: "group relative w-5 h-5 rounded-full bg-[#E7E7E7] border border-white shadow-[0px_1px_5px_-1px_rgba(0,0,0,0.12),0px_2px_2px_-2px_rgba(0,0,0,0.14),0px_3px_1px_-3px_rgba(0,0,0,0.2)] overflow-visible cursor-pointer hover:scale-110 hover:z-20 transition-transform duration-200",
children: [
/* @__PURE__ */ r.jsx(
"img",
{
src: `https://www.google.com/s2/favicons?sz=32&domain=${w}`,
alt: `${w} favicon`,
className: "w-full h-full object-cover"
}
),
/* @__PURE__ */ r.jsxs("div", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-gray-700 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity duration-200 whitespace-nowrap pointer-events-none z-30", children: [
v.url,
/* @__PURE__ */ r.jsx("div", { className: "absolute bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2 rotate-45 w-2 h-2 bg-gray-700" })
] })
]
},
v.url
);
}) })
] });
case "masonry":
case "default":
default:
return /* @__PURE__ */ r.jsxs("div", { children: [
/* @__PURE__ */ r.jsx(
"div",
{
className: `font-bold text-xl ${g ? "pb-6" : "pb-12"} `,
children: `${n.length} source${n.length > 0 ? "s" : ""}`
}
),
/* @__PURE__ */ r.jsx(
"div",
{
className: `grid grid-cols-1 justify-between ${g ? "gap-2 sm:grid-cols-2" : "gap-6"}`,
children: x.map((v, y) => /* @__PURE__ */ r.jsx(
Ee,
{
source: v,
index: y,
isMasonryLayout: g
},
y
))
}
),
/* @__PURE__ */ r.jsx(
_e,
{
currentPage: s,
totalPages: h,
onPageChange: f
}
)
] });
}
}, ke = () => /* @__PURE__ */ r.jsxs(
"svg",
{
width: "176",
height: "20",
viewBox: "0 0 176 20",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
children: [
/* @__PURE__ */ r.jsxs("g", { clipPath: "url(#clip0_270_2440)", children: [
/* @__PURE__ */ r.jsx(
"path",
{
d: "M94.2067 8.50363L98.6659 4.16017L97.7328 3.28223L92.3408 6.73234L91.0281 0.571426H89.7157V7.70268C89.7157 7.91834 89.6365 8.11857 89.4626 8.288C89.2886 8.4574 89.0991 8.53443 88.8618 8.53443H81.5405V9.8128L87.8657 11.0912L83.4064 15.4347L84.3392 16.3434L89.7316 12.8933L91.0439 19.0542H92.3566V11.9229C92.3566 11.7073 92.4355 11.5071 92.6095 11.3377C92.7834 11.1682 92.9732 11.0912 93.2105 11.0912H100.532V9.8128L94.2383 8.51903H94.2067V8.50363Z",
fill: "#1D76F3"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M121.5 14.526C120.282 14.526 119.539 14.0023 119.539 13.1706C119.539 12.3389 119.681 12.1233 121.104 12.0616L124.204 11.923C124.172 13.5865 123.176 14.526 121.532 14.4952L121.5 14.526ZM122.132 6.71703C119.713 6.71703 118.242 7.8568 118.163 9.75128V9.88991H120.061V9.75128C120.092 8.81174 120.82 8.28808 122.164 8.28808C123.508 8.28808 124.235 8.87337 124.235 10.0901V10.429L121.136 10.5676C118.353 10.6754 117.752 12.0616 117.752 13.2168C117.752 15.0189 119.175 16.1433 121.389 16.1433C123.603 16.1433 123.571 15.7582 124.22 14.9265V15.8968H126.007V10.198C126.007 7.93383 124.647 6.71703 122.116 6.71703H122.132Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M134.561 11.4301C134.561 13.34 133.454 14.4952 131.636 14.4952C129.817 14.4952 128.711 13.3092 128.711 11.4301C128.711 9.55106 129.817 8.33426 131.636 8.33426C133.454 8.33426 134.561 9.52026 134.561 11.4301ZM131.921 6.71703C130.561 6.71703 129.533 7.16369 128.853 8.01083H128.821C128.821 8.04163 128.821 6.96346 128.821 6.96346H126.971V19.0081H128.821V14.7724H128.853C129.501 15.6504 130.561 16.097 131.921 16.097C134.166 16.097 136.427 14.6338 136.427 11.3993C136.427 8.16486 134.182 6.70163 131.921 6.70163V6.71703Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M145.567 8.59606V6.99421H143.037V4.63766H141.187V6.96341H137.297V15.8659H139.147V8.59606H141.187V13.2629C141.187 15.0342 142.073 15.9122 143.907 15.9122H145.583V14.3103H143.037V8.64226H145.583L145.552 8.58066L145.567 8.59606Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M150.675 14.5105C148.888 14.5105 147.75 13.3245 147.75 11.4454C147.75 9.56634 148.857 8.34954 150.675 8.34954C152.494 8.34954 153.569 9.53554 153.569 11.4454C153.569 13.3553 152.462 14.5413 150.675 14.5105ZM150.675 6.71691C147.781 6.71691 145.916 8.5652 145.916 11.4146C145.916 14.264 147.781 16.1123 150.675 16.1123C153.569 16.1123 155.435 14.264 155.435 11.4146C155.435 8.5652 153.585 6.68611 150.675 6.68611V6.71691Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx("path", { d: "M158.17 3.66745H156.32V15.9123H158.17V3.66745Z", fill: "black" }),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M117.309 11.1375V10.9989H115.459C115.317 13.0782 114.067 14.295 111.965 14.449H111.569C108.928 14.449 107.22 12.6315 107.22 9.81291C107.22 6.99428 108.928 5.17682 111.569 5.17682H111.965C114.067 5.31545 115.317 6.56302 115.459 8.62694H117.309V8.48831C117.309 7.30234 116.851 6.13177 116.06 5.22302C115.269 4.34508 114.162 3.729 112.945 3.55957H112.913C112.708 3.52877 112.518 3.49797 112.312 3.48257C112.091 3.48257 111.854 3.45177 111.601 3.45177C107.821 3.45177 105.276 6.02394 105.276 9.81291C105.276 13.6019 107.806 16.1741 111.601 16.1741C115.396 16.1741 112.091 16.1741 112.312 16.1433C112.534 16.1433 112.708 16.1125 112.913 16.0663C114.131 15.8968 115.238 15.3269 116.028 14.4028C116.851 13.5249 117.309 12.3543 117.309 11.1683V11.1375Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx("path", { d: "M139.7 3.35925H137.313V5.5156H139.7V3.35925Z", fill: "black" }),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M167.974 5.50021L169.508 10.4751H166.472L168.006 5.50021H167.974ZM166.598 3.65192L162.93 15.3577V15.8813H164.827L165.966 12.2002H170.061L171.2 15.8813H173.097V15.4039L169.429 3.63652H166.583L166.598 3.65192Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M175.865 3.65192H173.936V15.9122H175.865V3.65192Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M5.9415 5.60591C5.4196 5.35174 4.83751 5.23445 4.15504 5.23445H0V15.5379H1.56567V11.2953H4.15504C4.83751 11.2953 5.4196 11.178 5.9415 10.9239C6.46339 10.6697 6.84476 10.3178 7.12577 9.84854C7.40678 9.37931 7.54729 8.85142 7.54729 8.26488C7.54729 7.67834 7.40678 7.13091 7.12577 6.68122C6.84476 6.23157 6.46339 5.87962 5.9415 5.62545V5.60591ZM5.74077 9.12514C5.5802 9.37931 5.35938 9.57482 5.0583 9.71168C4.75722 9.84854 4.41599 9.92674 4.01453 9.92674H1.58574V6.52482H4.01453C4.61671 6.52482 5.07836 6.68122 5.43969 6.99405C5.80099 7.30688 5.98165 7.71745 5.98165 8.22579C5.98165 8.73411 5.90134 8.87097 5.74077 9.12514Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M13.4688 8.47989C12.8866 8.14752 12.2042 7.99112 11.4615 7.99112C10.7188 7.99112 10.0564 8.14752 9.45422 8.47989C8.85204 8.81226 8.39036 9.26195 8.06922 9.84849C7.74805 10.435 7.56738 11.0802 7.56738 11.8231C7.56738 12.5661 7.72798 13.2113 8.06922 13.7978C8.41045 14.3844 8.8721 14.8341 9.45422 15.1664C10.0363 15.4988 10.6987 15.6552 11.4414 15.6552C12.1841 15.6552 12.8465 15.4988 13.4487 15.1664C14.0308 14.8341 14.4925 14.3844 14.8337 13.7978C15.1749 13.2113 15.3355 12.5661 15.3355 11.8231C15.3355 11.0802 15.1749 10.435 14.8337 9.84849C14.4925 9.26195 14.0308 8.81226 13.4487 8.47989H13.4688ZM13.549 13.1526C13.3483 13.5437 13.0673 13.8565 12.6859 14.0715C12.3246 14.2866 11.9031 14.4039 11.4414 14.4039C10.9797 14.4039 10.5783 14.2866 10.217 14.0715C9.85568 13.8565 9.57466 13.5437 9.37393 13.1526C9.17321 12.7616 9.07283 12.3119 9.07283 11.8036C9.07283 11.2953 9.17321 10.8651 9.37393 10.4741C9.57466 10.0831 9.85568 9.77026 10.217 9.5552C10.5783 9.34015 10.9797 9.22283 11.4414 9.22283C11.9031 9.22283 12.3246 9.34015 12.6859 9.5552C13.0472 9.77026 13.3282 10.0831 13.549 10.4741C13.7498 10.8651 13.8501 11.3148 13.8501 11.8036C13.8501 12.2924 13.7498 12.7421 13.549 13.1526Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M25.8333 8.10846L23.9666 13.6219L22.0998 8.10846H20.6947L18.828 13.6219L16.9412 8.10846H15.3755L18.0652 15.5184H19.5105L21.3571 10.1809L23.2239 15.5184H24.649L27.3588 8.10846H25.8333Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M33.1397 8.519C32.5777 8.16706 31.8954 7.99112 31.1324 7.99112C30.3698 7.99112 29.7675 8.14752 29.2055 8.47989C28.6435 8.81226 28.1818 9.26195 27.8606 9.84849C27.5395 10.435 27.3789 11.0802 27.3789 11.8231C27.3789 12.5661 27.5395 13.2113 27.8606 13.7978C28.1818 14.3844 28.6435 14.8341 29.2256 15.1664C29.8077 15.4988 30.49 15.6552 31.2327 15.6552C31.9755 15.6552 32.3568 15.5574 32.8387 15.3424C33.3204 15.1273 33.722 14.8341 34.0229 14.443C34.3239 14.052 34.5248 13.6219 34.6049 13.1526H33.1198C33.0194 13.5437 32.7986 13.8565 32.4574 14.0911C32.116 14.3257 31.6945 14.443 31.1726 14.443C30.6508 14.443 30.3096 14.3453 29.9482 14.1302C29.5869 13.9151 29.326 13.6219 29.1252 13.2113C28.9646 12.8789 28.8844 12.4879 28.8442 12.0578H34.6451C34.7457 11.3148 34.6451 10.6305 34.3843 10.0049C34.1033 9.37926 33.7017 8.89046 33.1198 8.53855L33.1397 8.519ZM28.9245 10.9238C28.9646 10.7087 29.0249 10.5132 29.1051 10.3373C29.2858 9.94623 29.5467 9.65298 29.8881 9.45746C30.2293 9.26195 30.6305 9.16418 31.1125 9.16418C31.5941 9.16418 31.8552 9.24238 32.1764 9.37926C32.4973 9.53566 32.7182 9.73118 32.8989 10.0049C33.0593 10.2786 33.1599 10.5719 33.1599 10.9238H28.9245Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M40.4062 8.12798C40.1856 8.03021 39.9046 7.99112 39.5432 7.99112C39.1818 7.99112 38.5998 8.1084 38.1783 8.36258C37.7365 8.61675 37.4153 8.92958 37.2147 9.34015V8.12798H35.7292V15.5379H37.2147V12.6052C37.2147 11.9013 37.315 11.3148 37.4957 10.826C37.6963 10.3373 37.9372 9.96578 38.2786 9.71163C38.5998 9.45746 38.9811 9.34015 39.3824 9.34015C39.784 9.34015 39.7239 9.34015 39.8843 9.37926C40.0451 9.39881 40.2255 9.45746 40.4062 9.53566V8.14752V8.12798Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M46.0664 8.519C45.5044 8.16706 44.8221 7.99112 44.0594 7.99112C43.2965 7.99112 42.6943 8.14752 42.1322 8.47989C41.5702 8.81226 41.1085 9.26195 40.7876 9.84849C40.4664 10.435 40.3057 11.0802 40.3057 11.8231C40.3057 12.5661 40.4664 13.2113 40.7876 13.7978C41.1085 14.3844 41.5702 14.8341 42.1525 15.1664C42.7345 15.4988 43.417 15.6552 44.1598 15.6552C44.9025 15.6552 45.2838 15.5574 45.7655 15.3424C46.2471 15.1273 46.6487 14.8341 46.9497 14.443C47.2509 14.052 47.4516 13.6219 47.5319 13.1526H46.0465C45.9462 13.5437 45.7253 13.8565 45.3841 14.0911C45.043 14.3257 44.6215 14.443 44.0993 14.443C43.5775 14.443 43.2364 14.3453 42.875 14.1302C42.5139 13.9151 42.2528 13.6219 42.0522 13.2113C41.8914 12.8789 41.811 12.4879 41.7712 12.0578H47.5721C47.6724 11.3148 47.5721 10.6305 47.311 10.0049C47.0503 9.37926 46.6288 8.89046 46.0465 8.53855L46.0664 8.519ZM41.8512 10.9238C41.8914 10.7087 41.9516 10.5132 42.0319 10.3373C42.2126 9.94623 42.4737 9.65298 42.8148 9.45746C43.156 9.26195 43.5576 9.16418 44.0392 9.16418C44.5209 9.16418 44.7819 9.24238 45.1031 9.37926C45.4243 9.53566 45.6449 9.73118 45.8256 10.0049C45.9864 10.2786 46.0867 10.5719 46.0867 10.9238H41.8512Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M54.5174 9.22289C54.3165 8.83186 53.9754 8.53861 53.4937 8.32355C53.032 8.10846 52.5102 7.99118 51.9681 7.99118C51.426 7.99118 50.563 8.14758 49.981 8.46041C49.3988 8.77321 48.9573 9.22289 48.656 9.78989C48.3348 10.3764 48.1943 11.0411 48.1943 11.8037C48.1943 12.5661 48.3551 13.2309 48.656 13.8174C48.9772 14.404 49.4187 14.8341 49.981 15.1469C50.563 15.4597 51.2054 15.6161 51.9681 15.6161C52.7307 15.6161 53.0118 15.4988 53.4937 15.2838C53.9554 15.0492 54.2965 14.7559 54.5174 14.3649V15.4988H56.0228V5.07803H54.5174V9.20335V9.22289ZM54.1962 13.1527C53.9953 13.5437 53.7143 13.837 53.333 14.0716C52.9716 14.3062 52.55 14.404 52.0886 14.404C51.6269 14.404 51.2054 14.2867 50.844 14.0716C50.4826 13.8565 50.2016 13.5437 49.981 13.1527C49.7801 12.7617 49.6798 12.312 49.6798 11.8037C49.6798 11.2953 49.7801 10.8652 49.981 10.4742C50.1817 10.0831 50.4627 9.77032 50.844 9.55526C51.2054 9.34021 51.6269 9.22289 52.0886 9.22289C52.55 9.22289 52.9716 9.34021 53.333 9.55526C53.6943 9.77032 53.9753 10.0831 54.1962 10.4742C54.3969 10.8652 54.4972 11.3149 54.4972 11.8037C54.4972 12.2924 54.3969 12.7421 54.1962 13.1331V13.1527Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M67.1428 10.4545C66.8216 10.2004 66.4602 10.044 66.0788 9.9462C66.3598 9.868 66.6209 9.7116 66.8617 9.49654C67.1026 9.28146 67.3032 9.02731 67.4437 8.73403C67.5842 8.4212 67.6646 8.1084 67.6646 7.75648C67.6646 7.26768 67.544 6.818 67.2833 6.427C67.0222 6.03597 66.6611 5.74268 66.2193 5.52763C65.7576 5.31257 65.2358 5.2148 64.6538 5.2148H60.4785V15.5183H64.6937C65.3564 15.5183 65.9583 15.3815 66.5004 15.1273C67.0424 14.8731 67.4437 14.5212 67.745 14.0715C68.0459 13.6219 68.2067 13.1135 68.2067 12.527C68.2067 11.9404 68.1061 11.7254 67.9257 11.3735C67.7247 11.002 67.4839 10.7087 67.1627 10.4545H67.1428ZM62.0443 6.52474H64.4529C64.7741 6.52474 65.0551 6.5834 65.3162 6.72026C65.5769 6.85711 65.7779 7.01351 65.9184 7.22857C66.0788 7.44365 66.139 7.69783 66.139 7.97154C66.139 8.24526 66.0589 8.47986 65.9184 8.71448C65.7779 8.94908 65.557 9.10551 65.3162 9.22283C65.0551 9.34011 64.7741 9.39877 64.4529 9.39877H62.0443V6.52474ZM66.3598 13.3481C66.1792 13.6219 65.9383 13.8174 65.6171 13.9738C65.2959 14.1302 64.9548 14.2084 64.5532 14.2084H62.0643V10.7087H64.5532C64.9548 10.7087 65.3162 10.7869 65.6171 10.9238C65.9383 11.0606 66.1792 11.2757 66.3598 11.5494C66.5405 11.8231 66.6409 12.1164 66.6409 12.4488C66.6409 12.7811 66.5605 13.0744 66.3598 13.3481Z",
fill: "black"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M74.1279 8.10846L71.9804 13.6219L69.8326 8.10846H68.2468L71.2174 15.4793L70.0734 18.1969H71.619L75.6737 8.10846H74.1279Z",
fill: "black"
}
)
] }),
/* @__PURE__ */ r.jsx("defs", { children: /* @__PURE__ */ r.jsx("clipPath", { id: "clip0_270_2440", children: /* @__PURE__ */ r.jsx("rect", { width: "176", height: "20", fill: "white" }) }) })
]
}
), Ne = () => /* @__PURE__ */ r.jsxs(
"svg",
{
width: "32",
height: "32",
viewBox: "0 0 32 32",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
children: [
/* @__PURE__ */ r.jsx("rect", { width: "32", height: "32", rx: "16", fill: "#A8CE85" }),
/* @__PURE__ */ r.jsxs("g", { clipPath: "url(#clip0_270_2437)", children: [
/* @__PURE__ */ r.jsx(
"path",
{
d: "M11.4167 16.8333L12.0705 18.1408C12.2917 18.5832 12.4023 18.8045 12.5501 18.9962C12.6812 19.1663 12.8338 19.3188 13.0039 19.45C13.1956 19.5978 13.4168 19.7084 13.8593 19.9296L15.1667 20.5833L13.8593 21.237C13.4168 21.4583 13.1956 21.5689 13.0039 21.7167C12.8338 21.8478 12.6812 22.0003 12.5501 22.1705C12.4023 22.3622 12.2917 22.5834 12.0705 23.0259L11.4167 24.3333L10.763 23.0259C10.5418 22.5834 10.4312 22.3622 10.2834 22.1705C10.1523 22.0003 9.99974 21.8478 9.82962 21.7167C9.6379 21.5689 9.41666 21.4583 8.97418 21.237L7.66675 20.5833L8.97418 19.9296C9.41666 19.7084 9.6379 19.5978 9.82962 19.45C9.99974 19.3188 10.1523 19.1663 10.2834 18.9962C10.4312 18.8045 10.5418 18.5832 10.763 18.1408L11.4167 16.8333Z",
stroke: "white",
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}
),
/* @__PURE__ */ r.jsx(
"path",
{
d: "M18.5001 7.66666L19.4823 10.2203C19.7173 10.8314 19.8348 11.1369 20.0175 11.3939C20.1795 11.6216 20.3785 11.8206 20.6062 11.9826C20.8632 12.1653 21.1687 12.2828 21.7797 12.5178L24.3334 13.5L21.7797 14.4822C21.1687 14.7172 20.8632 14.8347 20.6062 15.0174C20.3785 15.1794 20.1795 15.3784 20.0175 15.6061C19.8348 15.8631 19.7173 16.1686 19.4823 16.7796L18.5001 19.3333L17.5179 16.7796C17.2829 16.1686 17.1654 15.8631 16.9827 15.6061C16.8207 15.3784 16.6217 15.1794 16.394 15.0174C16.137 14.8347 15.8315 14.7172 15.2204 14.4822L12.6667 13.5L15.2204 12.5178C15.8315 12.2828 16.137 12.1653 16.3939 11.9826C16.6217 11.8206 16.8207 11.6216 16.9827 11.3939C17.1654 11.1369 17.2829 10.8314 17.5179 10.2203L18.5001 7.66666Z",
stroke: "white",
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}
)
] }),
/* @__PURE__ */ r.jsx("defs", { children: /* @__PURE__ */ r.jsx("clipPath", { id: "clip0_270_2437", children: /* @__PURE__ */ r.jsx("rect", { width: "20", height: "20", fill: "white", transform: "translate(6 6)" }) }) })
]
}
), t1 = ({ children: n }) => {
const [i, o] = B(null);
return me(() => {
typeof window < "u" && typeof document < "u" && import("./index-CA67oEBP.js").then((s) => o(() => s.default));
}, []), i ? /* @__PURE__ */ r.jsx(i, { children: n }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: n });
}, Le = ({
prompt: n,
title: i,
summary: o,
className: s,
summaryId: f,
useMarkdown: h = !1
}) => /* @__PURE__ */ r.jsxs("div", { id: f, "data-testid": f, className: `${s}`, children: [
/* @__PURE__ */ r.jsxs("div", { className: "mb-10 text-[42px] font-bold", children: [
'"',
n,
'"'
] }),
/* @__PURE__ */ r.jsxs(
"div",
{
className: "flex p-6 flex-col items-start gap-5 rounded-lg border border-gray-300 bg-white",
children: [
/* @__PURE__ */ r.jsxs("div", { className: "flex justify-between w-full gap-2 items-center", children: [
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center w-full gap-2", children: [
/* @__PURE__ */ r.jsx("div", { className: "flex justify-cent