@superwise.ai/superwise-chatbot-package 1.0.2 → 1.0.4
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/react-chatbot.es.js +753 -594
- package/dist/react-chatbot.umd.js +64 -13
- package/dist/superwise-chatbot-package.css +1 -1
- package/package.json +1 -1
package/dist/react-chatbot.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import ze, { memo as Re, useState as H, useRef as P, useEffect as A, useMemo as je, useCallback as G } from "react";
|
|
2
|
+
var ye = { exports: {} }, ne = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.js
|
|
@@ -9,29 +9,29 @@ var he = { exports: {} }, re = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
} else
|
|
24
|
-
return
|
|
25
|
-
$$typeof:
|
|
26
|
-
type:
|
|
27
|
-
key:
|
|
28
|
-
ref:
|
|
29
|
-
props:
|
|
12
|
+
var Le;
|
|
13
|
+
function De() {
|
|
14
|
+
if (Le) return ne;
|
|
15
|
+
Le = 1;
|
|
16
|
+
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
17
|
+
function a(c, i, s) {
|
|
18
|
+
var p = null;
|
|
19
|
+
if (s !== void 0 && (p = "" + s), i.key !== void 0 && (p = "" + i.key), "key" in i) {
|
|
20
|
+
s = {};
|
|
21
|
+
for (var l in i)
|
|
22
|
+
l !== "key" && (s[l] = i[l]);
|
|
23
|
+
} else s = i;
|
|
24
|
+
return i = s.ref, {
|
|
25
|
+
$$typeof: t,
|
|
26
|
+
type: c,
|
|
27
|
+
key: p,
|
|
28
|
+
ref: i !== void 0 ? i : null,
|
|
29
|
+
props: s
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return ne.Fragment = n, ne.jsx = a, ne.jsxs = a, ne;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var oe = {};
|
|
35
35
|
/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.development.js
|
|
@@ -41,346 +41,351 @@ var ne = {};
|
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
function r
|
|
48
|
-
if (
|
|
49
|
-
if (typeof
|
|
50
|
-
return
|
|
51
|
-
if (typeof
|
|
52
|
-
switch (
|
|
53
|
-
case
|
|
44
|
+
var He;
|
|
45
|
+
function Oe() {
|
|
46
|
+
return He || (He = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
+
function t(r) {
|
|
48
|
+
if (r == null) return null;
|
|
49
|
+
if (typeof r == "function")
|
|
50
|
+
return r.$$typeof === $ ? null : r.displayName || r.name || null;
|
|
51
|
+
if (typeof r == "string") return r;
|
|
52
|
+
switch (r) {
|
|
53
|
+
case L:
|
|
54
54
|
return "Fragment";
|
|
55
|
-
case
|
|
55
|
+
case D:
|
|
56
56
|
return "Profiler";
|
|
57
|
-
case
|
|
57
|
+
case V:
|
|
58
58
|
return "StrictMode";
|
|
59
|
-
case
|
|
59
|
+
case ie:
|
|
60
60
|
return "Suspense";
|
|
61
|
-
case
|
|
61
|
+
case le:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case T:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
|
-
if (typeof
|
|
67
|
-
switch (typeof
|
|
66
|
+
if (typeof r == "object")
|
|
67
|
+
switch (typeof r.tag == "number" && console.error(
|
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
),
|
|
70
|
-
case
|
|
69
|
+
), r.$$typeof) {
|
|
70
|
+
case m:
|
|
71
71
|
return "Portal";
|
|
72
|
-
case z:
|
|
73
|
-
return t.displayName || "Context";
|
|
74
72
|
case W:
|
|
75
|
-
return
|
|
76
|
-
case
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
|
|
73
|
+
return r.displayName || "Context";
|
|
74
|
+
case J:
|
|
75
|
+
return (r._context.displayName || "Context") + ".Consumer";
|
|
76
|
+
case ae:
|
|
77
|
+
var d = r.render;
|
|
78
|
+
return r = r.displayName, r || (r = d.displayName || d.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
|
|
79
|
+
case ce:
|
|
80
|
+
return d = r.displayName || null, d !== null ? d : t(r.type) || "Memo";
|
|
81
|
+
case X:
|
|
82
|
+
d = r._payload, r = r._init;
|
|
83
83
|
try {
|
|
84
|
-
return r(
|
|
84
|
+
return t(r(d));
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
function n(
|
|
91
|
-
return "" +
|
|
90
|
+
function n(r) {
|
|
91
|
+
return "" + r;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function a(r) {
|
|
94
94
|
try {
|
|
95
|
-
n(
|
|
96
|
-
var
|
|
95
|
+
n(r);
|
|
96
|
+
var d = !1;
|
|
97
97
|
} catch {
|
|
98
|
-
|
|
98
|
+
d = !0;
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
return
|
|
104
|
-
|
|
100
|
+
if (d) {
|
|
101
|
+
d = console;
|
|
102
|
+
var v = d.error, E = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
103
|
+
return v.call(
|
|
104
|
+
d,
|
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
-
|
|
107
|
-
), n(
|
|
106
|
+
E
|
|
107
|
+
), n(r);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
if (typeof
|
|
110
|
+
function c(r) {
|
|
111
|
+
if (r === L) return "<>";
|
|
112
|
+
if (typeof r == "object" && r !== null && r.$$typeof === X)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
|
-
var
|
|
116
|
-
return
|
|
115
|
+
var d = t(r);
|
|
116
|
+
return d ? "<" + d + ">" : "<...>";
|
|
117
117
|
} catch {
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
var
|
|
123
|
-
return
|
|
121
|
+
function i() {
|
|
122
|
+
var r = K.A;
|
|
123
|
+
return r === null ? null : r.getOwner();
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function s() {
|
|
126
126
|
return Error("react-stack-top-frame");
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
if (
|
|
130
|
-
var
|
|
131
|
-
if (
|
|
128
|
+
function p(r) {
|
|
129
|
+
if (he.call(r, "key")) {
|
|
130
|
+
var d = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
131
|
+
if (d && d.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return r.key !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
function
|
|
137
|
-
|
|
135
|
+
function l(r, d) {
|
|
136
|
+
function v() {
|
|
137
|
+
N || (N = !0, console.error(
|
|
138
138
|
"%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://react.dev/link/special-props)",
|
|
139
|
-
|
|
139
|
+
d
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
v.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
143
|
+
get: v,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
var
|
|
149
|
-
return
|
|
147
|
+
function w() {
|
|
148
|
+
var r = t(this.type);
|
|
149
|
+
return te[r] || (te[r] = !0, console.error(
|
|
150
150
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
-
)),
|
|
151
|
+
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
var
|
|
155
|
-
return
|
|
156
|
-
$$typeof:
|
|
157
|
-
type:
|
|
158
|
-
key:
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
153
|
+
function C(r, d, v, E, M, re) {
|
|
154
|
+
var S = v.ref;
|
|
155
|
+
return r = {
|
|
156
|
+
$$typeof: u,
|
|
157
|
+
type: r,
|
|
158
|
+
key: d,
|
|
159
|
+
props: v,
|
|
160
|
+
_owner: E
|
|
161
|
+
}, (S !== void 0 ? S : null) !== null ? Object.defineProperty(r, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
|
-
get:
|
|
164
|
-
}) : Object.defineProperty(
|
|
163
|
+
get: w
|
|
164
|
+
}) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
168
|
value: 0
|
|
169
|
-
}), Object.defineProperty(
|
|
169
|
+
}), Object.defineProperty(r, "_debugInfo", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
writable: !0,
|
|
173
173
|
value: null
|
|
174
|
-
}), Object.defineProperty(
|
|
174
|
+
}), Object.defineProperty(r, "_debugStack", {
|
|
175
175
|
configurable: !1,
|
|
176
176
|
enumerable: !1,
|
|
177
177
|
writable: !0,
|
|
178
|
-
value:
|
|
179
|
-
}), Object.defineProperty(
|
|
178
|
+
value: M
|
|
179
|
+
}), Object.defineProperty(r, "_debugTask", {
|
|
180
180
|
configurable: !1,
|
|
181
181
|
enumerable: !1,
|
|
182
182
|
writable: !0,
|
|
183
|
-
value:
|
|
184
|
-
}), Object.freeze && (Object.freeze(
|
|
183
|
+
value: re
|
|
184
|
+
}), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
for (
|
|
192
|
-
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
186
|
+
function h(r, d, v, E, M, re) {
|
|
187
|
+
var S = d.children;
|
|
188
|
+
if (S !== void 0)
|
|
189
|
+
if (E)
|
|
190
|
+
if (de(S)) {
|
|
191
|
+
for (E = 0; E < S.length; E++)
|
|
192
|
+
j(S[E]);
|
|
193
|
+
Object.freeze && Object.freeze(S);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
return
|
|
198
|
+
else j(S);
|
|
199
|
+
if (he.call(d, "key")) {
|
|
200
|
+
S = t(r);
|
|
201
|
+
var R = Object.keys(d).filter(function(_) {
|
|
202
|
+
return _ !== "key";
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
E = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", Y[S + E] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
208
208
|
React keys must be passed directly to JSX without using spread:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
),
|
|
211
|
+
E,
|
|
212
|
+
S,
|
|
213
|
+
R,
|
|
214
|
+
S
|
|
215
|
+
), Y[S + E] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
for (var
|
|
220
|
-
|
|
221
|
-
} else
|
|
222
|
-
return
|
|
223
|
-
|
|
224
|
-
typeof
|
|
225
|
-
),
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
217
|
+
if (S = null, v !== void 0 && (a(v), S = "" + v), p(d) && (a(d.key), S = "" + d.key), "key" in d) {
|
|
218
|
+
v = {};
|
|
219
|
+
for (var Q in d)
|
|
220
|
+
Q !== "key" && (v[Q] = d[Q]);
|
|
221
|
+
} else v = d;
|
|
222
|
+
return S && l(
|
|
223
|
+
v,
|
|
224
|
+
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
225
|
+
), C(
|
|
226
|
+
r,
|
|
227
|
+
S,
|
|
228
|
+
v,
|
|
229
|
+
i(),
|
|
230
|
+
M,
|
|
231
|
+
re
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
234
|
+
function j(r) {
|
|
235
|
+
g(r) ? r._store && (r._store.validated = 1) : typeof r == "object" && r !== null && r.$$typeof === X && (r._payload.status === "fulfilled" ? g(r._payload.value) && r._payload.value._store && (r._payload.value._store.validated = 1) : r._store && (r._store.validated = 1));
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return typeof
|
|
237
|
+
function g(r) {
|
|
238
|
+
return typeof r == "object" && r !== null && r.$$typeof === u;
|
|
239
239
|
}
|
|
240
|
-
var
|
|
240
|
+
var y = ze, u = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), L = Symbol.for("react.fragment"), V = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), W = Symbol.for("react.context"), ae = Symbol.for("react.forward_ref"), ie = Symbol.for("react.suspense"), le = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), X = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), $ = Symbol.for("react.client.reference"), K = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, he = Object.prototype.hasOwnProperty, de = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
|
-
|
|
244
|
-
react_stack_bottom_frame: function(
|
|
245
|
-
return
|
|
243
|
+
y = {
|
|
244
|
+
react_stack_bottom_frame: function(r) {
|
|
245
|
+
return r();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
|
|
253
|
-
var
|
|
254
|
-
return
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
248
|
+
var N, te = {}, pe = y.react_stack_bottom_frame.bind(
|
|
249
|
+
y,
|
|
250
|
+
s
|
|
251
|
+
)(), Z = O(c(s)), Y = {};
|
|
252
|
+
oe.Fragment = L, oe.jsx = function(r, d, v) {
|
|
253
|
+
var E = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
254
|
+
return h(
|
|
255
|
+
r,
|
|
256
|
+
d,
|
|
257
|
+
v,
|
|
258
258
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
E ? Error("react-stack-top-frame") : pe,
|
|
260
|
+
E ? O(c(r)) : Z
|
|
261
261
|
);
|
|
262
|
-
},
|
|
263
|
-
var
|
|
264
|
-
return
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
262
|
+
}, oe.jsxs = function(r, d, v) {
|
|
263
|
+
var E = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
264
|
+
return h(
|
|
265
|
+
r,
|
|
266
|
+
d,
|
|
267
|
+
v,
|
|
268
268
|
!0,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
E ? Error("react-stack-top-frame") : pe,
|
|
270
|
+
E ? O(c(r)) : Z
|
|
271
271
|
);
|
|
272
272
|
};
|
|
273
|
-
}()),
|
|
273
|
+
}()), oe;
|
|
274
274
|
}
|
|
275
|
-
process.env.NODE_ENV === "production" ?
|
|
276
|
-
var e =
|
|
277
|
-
const
|
|
275
|
+
process.env.NODE_ENV === "production" ? ye.exports = De() : ye.exports = Oe();
|
|
276
|
+
var e = ye.exports;
|
|
277
|
+
const Ne = [
|
|
278
278
|
"Parameters:",
|
|
279
279
|
"additional_parameter_company_name:",
|
|
280
280
|
"additional_parameter_company_size:",
|
|
281
281
|
"additional_parameter_user_role:",
|
|
282
282
|
"additional_parameter_use_case:"
|
|
283
|
-
];
|
|
284
|
-
function
|
|
285
|
-
if (typeof
|
|
286
|
-
let n =
|
|
287
|
-
for (const
|
|
283
|
+
], se = "Apologize, I’m unable to respond at the moment. Please try asking your question again or click Contact Sales to get in touch with our team.";
|
|
284
|
+
function Ue(t) {
|
|
285
|
+
if (typeof t != "string" || t.length === 0) return t;
|
|
286
|
+
let n = t;
|
|
287
|
+
for (const a of Ne)
|
|
288
288
|
for (; ; ) {
|
|
289
|
-
const
|
|
290
|
-
if (
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
293
|
-
let
|
|
294
|
-
for (let
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
|
|
298
|
-
else if (
|
|
299
|
-
|
|
289
|
+
const c = n.indexOf(a);
|
|
290
|
+
if (c === -1) break;
|
|
291
|
+
const i = n.indexOf("{", c);
|
|
292
|
+
if (i === -1) break;
|
|
293
|
+
let s = 0, p = -1;
|
|
294
|
+
for (let C = i; C < n.length; C++) {
|
|
295
|
+
const h = n[C];
|
|
296
|
+
if (h === "{")
|
|
297
|
+
s++;
|
|
298
|
+
else if (h === "}" && (s--, s === 0)) {
|
|
299
|
+
p = C;
|
|
300
300
|
break;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
n =
|
|
303
|
+
if (p === -1) break;
|
|
304
|
+
const l = n.slice(0, c).trim(), w = n.slice(p + 1).trim();
|
|
305
|
+
n = l + (w.length > 0 ? " " + w : "");
|
|
306
306
|
}
|
|
307
307
|
return n.includes("Parameters:") && (n = n.split("Parameters:")[0].trim()), n;
|
|
308
308
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
309
|
+
function Be(t) {
|
|
310
|
+
if (typeof t != "string" || t.length === 0) return t;
|
|
311
|
+
const n = t.trim();
|
|
312
|
+
return n.startsWith("Message: ") ? n.slice(9).trim() : n.startsWith("Message : ") ? n.slice(11).trim() : t;
|
|
313
|
+
}
|
|
314
|
+
async function Ze(t, n = [], a = [], c = "", i = "", s = "", p = null) {
|
|
315
|
+
var j, g, y;
|
|
316
|
+
const l = typeof s == "string" && s.trim().length > 0 ? s.trim() : "https://sage-api-ttyw-stage.superwise.ai/api/v1/", w = l.replace(/\/+$/, "").endsWith("/chat") ? l : l.replace(/\/+$/, "") + "/chat", C = Array.isArray(n) ? n.map((u) => ({
|
|
317
|
+
role: u.role,
|
|
318
|
+
message: u.content != null ? u.content : ""
|
|
319
|
+
})) : [], h = {
|
|
320
|
+
user_input: t,
|
|
321
|
+
chat_history: C,
|
|
322
|
+
mql_df: Array.isArray(a) ? a : [],
|
|
323
|
+
agent_id: c,
|
|
324
|
+
discovery_agent_id: i,
|
|
320
325
|
utm_source: "Web",
|
|
321
326
|
utm_medium: "chatbot"
|
|
322
327
|
};
|
|
323
|
-
console.log("Sending payload:",
|
|
328
|
+
console.log("Sending payload:", h);
|
|
324
329
|
try {
|
|
325
|
-
const
|
|
330
|
+
const u = await fetch(w, {
|
|
326
331
|
method: "POST",
|
|
327
332
|
headers: {
|
|
328
333
|
"Content-Type": "application/json",
|
|
329
334
|
Accept: "application/json"
|
|
330
335
|
},
|
|
331
|
-
body: JSON.stringify(
|
|
332
|
-
signal:
|
|
336
|
+
body: JSON.stringify(h),
|
|
337
|
+
signal: p ?? void 0
|
|
333
338
|
});
|
|
334
|
-
if (console.log("Response status:",
|
|
335
|
-
const
|
|
336
|
-
return console.error("API Error Response:",
|
|
339
|
+
if (console.log("Response status:", u.status), console.log("Response headers:", u.headers), !u.ok) {
|
|
340
|
+
const J = await u.text();
|
|
341
|
+
return console.error("API Error Response:", J), { reply: se, mqlDf: [], isError: !0, status: u.status };
|
|
337
342
|
}
|
|
338
|
-
const
|
|
339
|
-
console.log("API Response Data:",
|
|
340
|
-
let
|
|
341
|
-
return
|
|
342
|
-
} catch (
|
|
343
|
-
if (console.error("API call failed:",
|
|
344
|
-
throw
|
|
345
|
-
return
|
|
343
|
+
const m = await u.json();
|
|
344
|
+
console.log("API Response Data:", m);
|
|
345
|
+
let L = "⚠️ No reply from server.", V = [], D = !1;
|
|
346
|
+
return m.chat_response ? L = m.chat_response : m.success && ((j = m.data) != null && j.chat_response) ? L = m.data.chat_response : m.message && (L = m.message), m.mql_df ? V = m.mql_df : (g = m.data) != null && g.mql_df && (V = m.data.mql_df), (m.chat_history_limit_exceeded === !0 || ((y = m.data) == null ? void 0 : y.chat_history_limit_exceeded) === !0) && (D = !0), L = Ue(L), L = Be(L), { reply: L, mqlDf: V, chatHistoryLimitExceeded: D };
|
|
347
|
+
} catch (u) {
|
|
348
|
+
if (console.error("API call failed:", u), u.name === "AbortError")
|
|
349
|
+
throw u;
|
|
350
|
+
return u.name === "TypeError" && u.message.includes("fetch") ? { reply: se, mqlDf: [], isError: !0 } : { reply: se, mqlDf: [], isError: !0 };
|
|
346
351
|
}
|
|
347
352
|
}
|
|
348
|
-
async function
|
|
349
|
-
const
|
|
353
|
+
async function Ye(t, n = null, a = [], c = "") {
|
|
354
|
+
const p = (typeof c == "string" && c.trim().length > 0 ? c.trim() : "https://sage-api-ttyw-stage.superwise.ai/api/v1/").replace(/\/+$/, "").replace(/\/chat\/?$/, "").replace(/\/+$/, "") + "/pdf", l = Array.isArray(t) && t.length > 0 ? t[0] : n || {
|
|
350
355
|
name: "User",
|
|
351
356
|
email: "user@example.com",
|
|
352
357
|
summary: "Chat conversation summary"
|
|
353
|
-
},
|
|
354
|
-
role:
|
|
355
|
-
message:
|
|
356
|
-
})) : [],
|
|
357
|
-
lead_row:
|
|
358
|
-
chat_history:
|
|
358
|
+
}, w = Array.isArray(a) ? a.map((h) => ({
|
|
359
|
+
role: h.role,
|
|
360
|
+
message: h.content != null ? h.content : ""
|
|
361
|
+
})) : [], C = {
|
|
362
|
+
lead_row: l,
|
|
363
|
+
chat_history: w
|
|
359
364
|
};
|
|
360
|
-
console.log("Downloading PDF with payload:",
|
|
365
|
+
console.log("Downloading PDF with payload:", C);
|
|
361
366
|
try {
|
|
362
|
-
const
|
|
367
|
+
const h = await fetch(p, {
|
|
363
368
|
method: "POST",
|
|
364
369
|
headers: {
|
|
365
370
|
"Content-Type": "application/json",
|
|
366
371
|
Accept: "application/pdf"
|
|
367
372
|
},
|
|
368
|
-
body: JSON.stringify(
|
|
373
|
+
body: JSON.stringify(C)
|
|
369
374
|
});
|
|
370
|
-
if (console.log("PDF Response status:",
|
|
371
|
-
const
|
|
372
|
-
throw console.error("PDF API Error Response:",
|
|
375
|
+
if (console.log("PDF Response status:", h.status), !h.ok) {
|
|
376
|
+
const u = await h.text();
|
|
377
|
+
throw console.error("PDF API Error Response:", u), new Error(`PDF API Error ${h.status}: ${u}`);
|
|
373
378
|
}
|
|
374
|
-
const
|
|
375
|
-
return
|
|
376
|
-
} catch (
|
|
377
|
-
throw console.error("PDF download failed:",
|
|
379
|
+
const j = await h.blob(), g = window.URL.createObjectURL(j), y = document.createElement("a");
|
|
380
|
+
return y.href = g, y.download = `chatbot-report-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.pdf`, document.body.appendChild(y), y.click(), document.body.removeChild(y), window.URL.revokeObjectURL(g), !0;
|
|
381
|
+
} catch (h) {
|
|
382
|
+
throw console.error("PDF download failed:", h), h;
|
|
378
383
|
}
|
|
379
384
|
}
|
|
380
|
-
const
|
|
385
|
+
const f = {
|
|
381
386
|
container: {
|
|
382
387
|
position: "fixed",
|
|
383
|
-
bottom: "
|
|
388
|
+
bottom: "20px",
|
|
384
389
|
right: "20px",
|
|
385
390
|
zIndex: 999999,
|
|
386
391
|
fontFamily: "'Inter', sans-serif",
|
|
@@ -397,14 +402,12 @@ const m = {
|
|
|
397
402
|
},
|
|
398
403
|
containerExpanded: {
|
|
399
404
|
position: "fixed",
|
|
400
|
-
top: "
|
|
401
|
-
left: "
|
|
402
|
-
right: "
|
|
403
|
-
bottom: "
|
|
405
|
+
top: "5px",
|
|
406
|
+
left: "10px",
|
|
407
|
+
right: "20px",
|
|
408
|
+
bottom: "20px",
|
|
404
409
|
zIndex: 999999,
|
|
405
410
|
fontFamily: "'Inter', sans-serif",
|
|
406
|
-
width: "100%",
|
|
407
|
-
height: "100%",
|
|
408
411
|
display: "flex",
|
|
409
412
|
flexDirection: "column",
|
|
410
413
|
borderRadius: "0",
|
|
@@ -628,7 +631,7 @@ const m = {
|
|
|
628
631
|
fontWeight: "500",
|
|
629
632
|
margin: 0
|
|
630
633
|
}
|
|
631
|
-
},
|
|
634
|
+
}, qe = `@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');\r
|
|
632
635
|
\r
|
|
633
636
|
.sw-ttyw-chatbot {\r
|
|
634
637
|
--swttyw-primary-color: #000;\r
|
|
@@ -664,6 +667,15 @@ const m = {
|
|
|
664
667
|
opacity: 0.9;\r
|
|
665
668
|
}\r
|
|
666
669
|
\r
|
|
670
|
+
/* Loading (typing) bubble: give it a comfortable min-height so it doesn't look cramped */\r
|
|
671
|
+
.sw-ttyw-chatbot .message-loading .message-content {\r
|
|
672
|
+
min-height: 1.75rem !important;\r
|
|
673
|
+
min-width: 4.5rem !important;\r
|
|
674
|
+
display: flex !important;\r
|
|
675
|
+
align-items: center !important;\r
|
|
676
|
+
padding: 0.25rem 0 0.25rem 0.5rem !important;\r
|
|
677
|
+
} \r
|
|
678
|
+
\r
|
|
667
679
|
.typing {\r
|
|
668
680
|
display: inline-block !important;\r
|
|
669
681
|
width: 0.8rem !important;\r
|
|
@@ -751,6 +763,8 @@ const m = {
|
|
|
751
763
|
.sw-ttyw-contact-cta {\r
|
|
752
764
|
margin: 0px auto;\r
|
|
753
765
|
animation: slideIn 0.3s ease-out;\r
|
|
766
|
+
max-width: 320px;\r
|
|
767
|
+
text-align: center;\r
|
|
754
768
|
}\r
|
|
755
769
|
\r
|
|
756
770
|
.sw-ttyw-cta-button {\r
|
|
@@ -798,6 +812,7 @@ const m = {
|
|
|
798
812
|
flex-wrap: wrap;\r
|
|
799
813
|
gap: 10px;\r
|
|
800
814
|
align-items: center;\r
|
|
815
|
+
justify-content: center;\r
|
|
801
816
|
}\r
|
|
802
817
|
\r
|
|
803
818
|
.sw-ttyw-limit-download-pdf,\r
|
|
@@ -930,6 +945,14 @@ const m = {
|
|
|
930
945
|
overflow-x: hidden;\r
|
|
931
946
|
}\r
|
|
932
947
|
\r
|
|
948
|
+
/* Reduce space taken by <br> in responses (avoid large gaps after paragraphs) */\r
|
|
949
|
+
.sw-ttyw-markdown br {\r
|
|
950
|
+
display: block;\r
|
|
951
|
+
line-height: 0.5;\r
|
|
952
|
+
margin: 0;\r
|
|
953
|
+
padding: 0;\r
|
|
954
|
+
}\r
|
|
955
|
+
\r
|
|
933
956
|
.sw-ttyw-markdown pre,\r
|
|
934
957
|
.sw-ttyw-markdown pre.sw-ttyw-code-block {\r
|
|
935
958
|
margin: 0.5em 0;\r
|
|
@@ -958,12 +981,18 @@ const m = {
|
|
|
958
981
|
}\r
|
|
959
982
|
\r
|
|
960
983
|
.sw-ttyw-markdown ul {\r
|
|
961
|
-
margin: 0.
|
|
984
|
+
margin: 0.35em 0;\r
|
|
962
985
|
padding-left: 1.25em;\r
|
|
963
986
|
list-style: disc;\r
|
|
987
|
+
} \r
|
|
988
|
+
.sw-ttyw-markdown ul ul {\r
|
|
989
|
+
margin: 0.2em 0;\r
|
|
990
|
+
padding-left: 1.25em;\r
|
|
991
|
+
list-style: circle;\r
|
|
964
992
|
}\r
|
|
965
993
|
.sw-ttyw-markdown li {\r
|
|
966
|
-
margin: 0.
|
|
994
|
+
margin: 0.15em 0;\r
|
|
995
|
+
line-height: 1.4;\r
|
|
967
996
|
}\r
|
|
968
997
|
\r
|
|
969
998
|
.sw-ttyw-markdown a {\r
|
|
@@ -986,7 +1015,7 @@ const m = {
|
|
|
986
1015
|
font-weight: 600;\r
|
|
987
1016
|
font-size: 1.05em;\r
|
|
988
1017
|
margin: 0.75em 0 0.35em;\r
|
|
989
|
-
line-height: 1.
|
|
1018
|
+
line-height: 1.0;\r
|
|
990
1019
|
color: inherit;\r
|
|
991
1020
|
}\r
|
|
992
1021
|
.sw-ttyw-markdown .sw-ttyw-text-block:first-child {\r
|
|
@@ -1032,24 +1061,47 @@ const m = {
|
|
|
1032
1061
|
#sw-ttyw-chat-send-message:disabled svg,\r
|
|
1033
1062
|
#sw-ttyw-chat-send-message:disabled path {\r
|
|
1034
1063
|
cursor: not-allowed;\r
|
|
1035
|
-
}`, $e = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='190'%20height='42'%20viewBox='0%200%20190%2042'%20fill='none'%3e%3cpath%20d='M17.2253%2014.2603C17.155%2014.0259%2016.9441%2013.8618%2016.7097%2013.8618H14.6472C14.3894%2013.8618%2014.1785%2014.0259%2014.1316%2014.2603L10.7801%2027.5053C10.7332%2027.6694%2010.7801%2027.8335%2010.8739%2027.9741C10.9676%2028.1148%2011.1317%2028.1851%2011.2957%2028.1851H12.9363C13.1941%2028.1851%2013.4051%2027.9976%2013.4754%2027.7631L14.0613%2025.0673H17.3191L17.905%2027.7631C17.9519%2028.021%2018.1862%2028.1851%2018.444%2028.1851H20.0846C20.2487%2028.1851%2020.4128%2028.1148%2020.5065%2027.9741C20.6003%2027.8335%2020.6471%2027.6694%2020.6003%2027.5053L17.2488%2014.2603H17.2253ZM14.5769%2022.5824L15.655%2017.636L16.7566%2022.5824H14.5769Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M23.8359%2013.8618H22.2656C21.9609%2013.8618%2021.7266%2014.0962%2021.7266%2014.401V27.6459C21.7266%2027.9507%2021.9609%2028.1851%2022.2656%2028.1851H23.8359C24.1406%2028.1851%2024.375%2027.9507%2024.375%2027.6459V14.401C24.375%2014.0962%2024.1406%2013.8618%2023.8359%2013.8618ZM22.2891%2014.0493C22.2422%2014.0493%2022.1953%2014.0493%2022.1484%2014.0728C22.1953%2014.0728%2022.2422%2014.0493%2022.2891%2014.0493Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M36.1401%2029.4041L36.0932%2012.5256C36.0932%2011.3066%2035.4369%2010.1579%2034.3588%209.5484L19.7341%201.15601C18.6794%200.546507%2017.3669%200.546507%2016.2888%201.15601L1.71091%209.61872C0.65624%2010.2282%200%2011.3769%200%2012.5959L0.046874%2029.4744C0.046874%2030.6934%200.703114%2031.8421%201.78122%2032.4516L16.406%2040.844C17.4607%2041.4535%2018.7731%2041.4535%2019.8513%2040.844L34.4291%2032.3813C35.4838%2031.7718%2036.1401%2030.6231%2036.1401%2029.4041ZM11.9998%2031.5608C6.16397%2028.1851%204.17181%2020.7539%207.54676%2014.9167C10.8983%209.07955%2018.3513%207.08694%2024.1871%2010.4626C30.023%2013.8149%2032.0151%2021.2696%2028.6402%2027.1068C25.2887%2032.9439%2017.8357%2034.9365%2011.9998%2031.5608Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M46.3593%2014.19C46.6171%2013.9087%2046.9218%2013.6977%2047.2734%2013.557C47.6249%2013.4164%2048.0468%2013.3461%2048.5155%2013.3461C48.9843%2013.3461%2049.6171%2013.4398%2050.0858%2013.6508C50.5546%2013.8618%2050.9295%2014.1665%2051.2342%2014.5416C51.3983%2014.7526%2051.5623%2014.987%2051.6795%2015.2683C51.8202%2015.5496%2051.9139%2015.8309%2051.9608%2016.1357L55.4295%2015.0574C55.1717%2014.1431%2054.8201%2013.3695%2054.3748%2012.7131C53.9295%2012.0567%2053.3904%2011.4941%2052.7576%2011.0487C52.1952%2010.6502%2051.5623%2010.3689%2050.8358%2010.1813C50.1327%209.99379%2049.3593%209.90002%2048.5624%209.90002C47.7655%209.90002%2046.5937%2010.0407%2045.7734%2010.3454C44.9765%2010.6502%2044.2734%2011.0956%2043.7109%2011.6816C43.125%2012.2443%2042.7031%2012.9241%2042.4219%2013.7211C42.1406%2014.5182%2042%2015.4324%2042%2016.4405C42%2017.4485%2042.1641%2018.5034%2042.5156%2019.277C42.8672%2020.0506%2043.3828%2020.707%2044.0859%2021.2461C44.789%2021.7853%2045.7031%2022.2776%2046.8515%2022.6761L48.8436%2023.4028C49.5702%2023.6842%2050.1561%2023.9655%2050.5546%2024.2702C50.953%2024.5515%2051.2342%2024.8797%2051.3983%2025.2314C51.5623%2025.583%2051.6327%2026.0284%2051.6327%2026.5676C51.6327%2027.1067%2051.5858%2027.4818%2051.4686%2027.8335C51.3749%2028.1851%2051.1874%2028.4899%2050.9764%2028.7712C50.742%2029.0759%2050.4374%2029.2869%2050.0624%2029.4275C49.7108%2029.5682%2049.2889%2029.6385%2048.8202%2029.6385C48.3515%2029.6385%2047.7187%2029.5448%2047.2734%2029.3338C46.8046%2029.1228%2046.4296%2028.818%2046.1249%2028.443C45.9374%2028.232%2045.7734%2027.9976%2045.6562%2027.6928C45.5156%2027.4115%2045.4453%2027.1067%2045.3749%2026.802L41.8594%2027.7866C42.0937%2028.7008%2042.4453%2029.4979%2042.8906%2030.2011C43.3594%2030.9044%2043.8984%2031.467%2044.5546%2031.9359C45.1406%2032.311%2045.7734%2032.5923%2046.4765%2032.8032C47.1796%2033.0142%2047.953%2033.108%2048.7499%2033.108C49.5468%2033.108%2050.742%2032.9439%2051.5389%2032.6626C52.3592%2032.3578%2053.0623%2031.9124%2053.6483%2031.3029C54.1873%2030.7169%2054.6092%2030.0136%2054.9139%2029.1931C55.2185%2028.3726%2055.3592%2027.4349%2055.3592%2026.3566C55.3592%2025.2782%2055.1951%2024.2702%2054.8435%2023.4966C54.492%2022.723%2053.9764%2022.0666%2053.2498%2021.5275C52.5233%2020.9883%2051.5858%2020.496%2050.3905%2020.0506L48.4218%2019.3239C47.6952%2019.0426%2047.1327%2018.7612%2046.7577%2018.4799C46.3593%2018.1752%2046.1015%2017.8704%2045.9609%2017.5188C45.8203%2017.1672%2045.7499%2016.7686%2045.7499%2016.2998C45.7499%2015.8309%2045.7968%2015.4324%2045.914%2015.0808C46.0077%2014.7292%2046.1718%2014.4478%2046.3593%2014.19Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M67.5233%2026.4504C67.5233%2027.1536%2067.4295%2027.7631%2067.242%2028.232C67.0545%2028.7008%2066.7499%2029.0525%2066.3046%2029.3103C65.8593%2029.5682%2065.2733%2029.6854%2064.5468%2029.6854C63.8202%2029.6854%2063.2109%2029.5682%2062.7656%2029.3103C62.3202%2029.0525%2062.0156%2028.7008%2061.8281%2028.232C61.6406%2027.7631%2061.5468%2027.1771%2061.5468%2026.4504V10.1579H57.8672V26.3332C57.8672%2027.6694%2058.1016%2028.8415%2058.5703%2029.8495C59.039%2030.8575%2059.7656%2031.6546%2060.75%2032.2406C61.7343%2032.8267%2063.0234%2033.108%2064.5702%2033.108C66.1171%2033.108%2067.3592%2032.8267%2068.367%2032.2406C69.3748%2031.6546%2070.1014%2030.8575%2070.5467%2029.8261C70.992%2028.7946%2071.2264%2027.6459%2071.2264%2026.3332V10.1579H67.5467V26.4504H67.5233Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M83.7186%2010.9549C82.7811%2010.4158%2081.5858%2010.1579%2080.1562%2010.1579H74.0859V32.8033H77.7656V24.9032H80.1093C81.5624%2024.9032%2082.7577%2024.6453%2083.6952%2024.1296C84.6327%2023.6138%2085.3358%2022.8168%2085.8045%2021.7385C86.2732%2020.6601%2086.5076%2019.2536%2086.5076%2017.5423C86.5076%2015.831%2086.2732%2014.4479%2085.8045%2013.3695C85.3358%2012.2912%2084.6327%2011.4941%2083.6952%2010.9549H83.7186ZM82.4999%2019.9099C82.2889%2020.4726%2081.9843%2020.8711%2081.5858%2021.1289C81.1874%2021.3868%2080.6718%2021.504%2080.0155%2021.504H77.7421V13.6274H80.0155C80.6718%2013.6274%2081.1874%2013.7446%2081.5858%2014.0025C81.9843%2014.2603%2082.2889%2014.6588%2082.4999%2015.2215C82.7108%2015.7841%2082.8046%2016.5577%2082.8046%2017.5423C82.8046%2018.5268%2082.7108%2019.3473%2082.4999%2019.9099Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M88.5938%2032.8267H99.7029V29.3807H92.2734V23.0043H98.4608V19.5817H92.2734V13.6274H99.7029V10.1813H88.5938V32.8267Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M111.797%2023.356C112.711%2022.8402%20113.437%2022.0666%20113.953%2021.0352C114.469%2020.0037%20114.726%2018.7144%20114.726%2017.1672C114.726%2015.62%20114.492%2014.2134%20114.023%2013.2054C113.555%2012.1739%20112.851%2011.4238%20111.961%2010.9315C111.047%2010.4392%20109.922%2010.2048%20108.586%2010.2048H102.023V32.8501H105.703V24.153H108.258L111.094%2032.8501H115.078L111.75%2023.4028C111.75%2023.4028%20111.797%2023.4028%20111.82%2023.3794L111.797%2023.356ZM105.68%2013.6274H108.422C108.961%2013.6274%20109.406%2013.7211%20109.805%2013.9321C110.18%2014.1431%20110.484%2014.4947%20110.695%2015.0105C110.906%2015.5028%20111%2016.2295%20111%2017.1437C111%2018.058%20110.906%2018.8081%20110.695%2019.3239C110.484%2019.8396%20110.203%2020.1912%20109.828%2020.4022C109.453%2020.6132%20109.008%2020.707%20108.469%2020.707H105.703V13.6508L105.68%2013.6274Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M132.234%2027.3412L129.047%2010.1813H125.508L122.344%2027.2474L119.086%2010.1813H115.148L120.328%2032.8267H124.148L127.289%2017.6595L130.406%2032.8267H134.226L139.382%2010.1813H135.492L132.234%2027.3412Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M144.773%2010.1813H141.094V32.8267H144.773V10.1813Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M151.851%2014.19C152.109%2013.9087%20152.414%2013.6977%20152.766%2013.557C153.117%2013.4164%20153.539%2013.3461%20154.008%2013.3461C154.476%2013.3461%20155.109%2013.4398%20155.578%2013.6508C156.047%2013.8618%20156.422%2014.1665%20156.726%2014.5416C156.89%2014.7526%20157.055%2014.987%20157.172%2015.2683C157.312%2015.5496%20157.406%2015.8309%20157.453%2016.1357L160.922%2015.0574C160.664%2014.1431%20160.312%2013.3695%20159.867%2012.7131C159.422%2012.0567%20158.883%2011.4941%20158.25%2011.0487C157.687%2010.6502%20157.055%2010.3689%20156.328%2010.1813C155.625%209.99379%20154.851%209.90002%20154.055%209.90002C153.258%209.90002%20152.086%2010.0407%20151.266%2010.3454C150.469%2010.6502%20149.766%2011.0956%20149.203%2011.6816C148.617%2012.2443%20148.195%2012.9241%20147.914%2013.7211C147.633%2014.5182%20147.492%2015.4324%20147.492%2016.4405C147.492%2017.4485%20147.656%2018.5034%20148.008%2019.277C148.359%2020.0506%20148.875%2020.707%20149.578%2021.2461C150.281%2021.7853%20151.195%2022.2776%20152.344%2022.6761L154.336%2023.4028C155.062%2023.6842%20155.648%2023.9655%20156.047%2024.2702C156.445%2024.5515%20156.726%2024.8797%20156.89%2025.2314C157.055%2025.583%20157.125%2026.0284%20157.125%2026.5676C157.125%2027.1067%20157.078%2027.4818%20156.961%2027.8335C156.867%2028.1851%20156.68%2028.4899%20156.469%2028.7712C156.234%2029.0759%20155.93%2029.2869%20155.555%2029.4275C155.203%2029.5682%20154.781%2029.6385%20154.312%2029.6385C153.844%2029.6385%20153.211%2029.5448%20152.766%2029.3338C152.297%2029.1228%20151.922%2028.818%20151.617%2028.443C151.43%2028.232%20151.266%2027.9976%20151.148%2027.6928C151.008%2027.4115%20150.914%2027.1067%20150.867%2026.802L147.352%2027.7866C147.586%2028.7008%20147.937%2029.4979%20148.383%2030.2011C148.852%2030.9044%20149.391%2031.467%20150.047%2031.9359C150.633%2032.311%20151.266%2032.5923%20151.969%2032.8032C152.672%2033.0142%20153.445%2033.108%20154.242%2033.108C155.039%2033.108%20156.234%2032.9439%20157.031%2032.6626C157.851%2032.3578%20158.555%2031.9124%20159.14%2031.3029C159.68%2030.7169%20160.101%2030.0136%20160.406%2029.1931C160.711%2028.3726%20160.851%2027.4349%20160.851%2026.3566C160.851%2025.2782%20160.687%2024.2702%20160.336%2023.4966C159.984%2022.723%20159.469%2022.0666%20158.742%2021.5275C158.015%2020.9883%20157.078%2020.496%20155.883%2020.0506L153.914%2019.3239C153.187%2019.0426%20152.625%2018.7612%20152.25%2018.4799C151.852%2018.1752%20151.594%2017.8704%20151.453%2017.5188C151.312%2017.1672%20151.242%2016.7686%20151.242%2016.2998C151.242%2015.8309%20151.289%2015.4324%20151.406%2015.0808C151.5%2014.7292%20151.664%2014.4478%20151.851%2014.19Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M174.633%2013.6274V10.1813H163.5V32.8267H174.633V29.3807H167.18V23.0043H173.367V19.5817H167.18V13.6274H174.633Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M179.316%2011.0956V10.1345H183.512V11.0956H181.918V15.8075H180.91V11.0956H179.316Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M184.168%2010.1345H185.41L186.676%2013.9321L187.941%2010.1345H189.184V15.8075H188.269V11.8223L187.098%2015.1511H186.254L185.082%2011.9161V15.831H184.168V10.1579V10.1345Z'%20fill='black'%3e%3c/path%3e%3c/svg%3e";
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1064
|
+
}\r
|
|
1065
|
+
\r
|
|
1066
|
+
.sw-ttyw-jump-latest {\r
|
|
1067
|
+
position: sticky;\r
|
|
1068
|
+
bottom: 12px;\r
|
|
1069
|
+
display: flex;\r
|
|
1070
|
+
justify-content: center;\r
|
|
1071
|
+
margin-top: 8px;\r
|
|
1072
|
+
}\r
|
|
1073
|
+
\r
|
|
1074
|
+
.sw-ttyw-jump-button {\r
|
|
1075
|
+
background: var(--swttyw-primary-color, #000);\r
|
|
1076
|
+
border: 1px solid var(--swttyw-primary-color, #000);\r
|
|
1077
|
+
color: #fff;\r
|
|
1078
|
+
border-radius: 20px;\r
|
|
1079
|
+
padding: 6px 12px;\r
|
|
1080
|
+
font-size: 12px;\r
|
|
1081
|
+
cursor: pointer;\r
|
|
1082
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);\r
|
|
1083
|
+
}\r
|
|
1084
|
+
\r
|
|
1085
|
+
.sw-ttyw-jump-button:hover {\r
|
|
1086
|
+
opacity: 0.9;\r
|
|
1087
|
+
}`, Ge = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='190'%20height='42'%20viewBox='0%200%20190%2042'%20fill='none'%3e%3cpath%20d='M17.2253%2014.2603C17.155%2014.0259%2016.9441%2013.8618%2016.7097%2013.8618H14.6472C14.3894%2013.8618%2014.1785%2014.0259%2014.1316%2014.2603L10.7801%2027.5053C10.7332%2027.6694%2010.7801%2027.8335%2010.8739%2027.9741C10.9676%2028.1148%2011.1317%2028.1851%2011.2957%2028.1851H12.9363C13.1941%2028.1851%2013.4051%2027.9976%2013.4754%2027.7631L14.0613%2025.0673H17.3191L17.905%2027.7631C17.9519%2028.021%2018.1862%2028.1851%2018.444%2028.1851H20.0846C20.2487%2028.1851%2020.4128%2028.1148%2020.5065%2027.9741C20.6003%2027.8335%2020.6471%2027.6694%2020.6003%2027.5053L17.2488%2014.2603H17.2253ZM14.5769%2022.5824L15.655%2017.636L16.7566%2022.5824H14.5769Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M23.8359%2013.8618H22.2656C21.9609%2013.8618%2021.7266%2014.0962%2021.7266%2014.401V27.6459C21.7266%2027.9507%2021.9609%2028.1851%2022.2656%2028.1851H23.8359C24.1406%2028.1851%2024.375%2027.9507%2024.375%2027.6459V14.401C24.375%2014.0962%2024.1406%2013.8618%2023.8359%2013.8618ZM22.2891%2014.0493C22.2422%2014.0493%2022.1953%2014.0493%2022.1484%2014.0728C22.1953%2014.0728%2022.2422%2014.0493%2022.2891%2014.0493Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M36.1401%2029.4041L36.0932%2012.5256C36.0932%2011.3066%2035.4369%2010.1579%2034.3588%209.5484L19.7341%201.15601C18.6794%200.546507%2017.3669%200.546507%2016.2888%201.15601L1.71091%209.61872C0.65624%2010.2282%200%2011.3769%200%2012.5959L0.046874%2029.4744C0.046874%2030.6934%200.703114%2031.8421%201.78122%2032.4516L16.406%2040.844C17.4607%2041.4535%2018.7731%2041.4535%2019.8513%2040.844L34.4291%2032.3813C35.4838%2031.7718%2036.1401%2030.6231%2036.1401%2029.4041ZM11.9998%2031.5608C6.16397%2028.1851%204.17181%2020.7539%207.54676%2014.9167C10.8983%209.07955%2018.3513%207.08694%2024.1871%2010.4626C30.023%2013.8149%2032.0151%2021.2696%2028.6402%2027.1068C25.2887%2032.9439%2017.8357%2034.9365%2011.9998%2031.5608Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M46.3593%2014.19C46.6171%2013.9087%2046.9218%2013.6977%2047.2734%2013.557C47.6249%2013.4164%2048.0468%2013.3461%2048.5155%2013.3461C48.9843%2013.3461%2049.6171%2013.4398%2050.0858%2013.6508C50.5546%2013.8618%2050.9295%2014.1665%2051.2342%2014.5416C51.3983%2014.7526%2051.5623%2014.987%2051.6795%2015.2683C51.8202%2015.5496%2051.9139%2015.8309%2051.9608%2016.1357L55.4295%2015.0574C55.1717%2014.1431%2054.8201%2013.3695%2054.3748%2012.7131C53.9295%2012.0567%2053.3904%2011.4941%2052.7576%2011.0487C52.1952%2010.6502%2051.5623%2010.3689%2050.8358%2010.1813C50.1327%209.99379%2049.3593%209.90002%2048.5624%209.90002C47.7655%209.90002%2046.5937%2010.0407%2045.7734%2010.3454C44.9765%2010.6502%2044.2734%2011.0956%2043.7109%2011.6816C43.125%2012.2443%2042.7031%2012.9241%2042.4219%2013.7211C42.1406%2014.5182%2042%2015.4324%2042%2016.4405C42%2017.4485%2042.1641%2018.5034%2042.5156%2019.277C42.8672%2020.0506%2043.3828%2020.707%2044.0859%2021.2461C44.789%2021.7853%2045.7031%2022.2776%2046.8515%2022.6761L48.8436%2023.4028C49.5702%2023.6842%2050.1561%2023.9655%2050.5546%2024.2702C50.953%2024.5515%2051.2342%2024.8797%2051.3983%2025.2314C51.5623%2025.583%2051.6327%2026.0284%2051.6327%2026.5676C51.6327%2027.1067%2051.5858%2027.4818%2051.4686%2027.8335C51.3749%2028.1851%2051.1874%2028.4899%2050.9764%2028.7712C50.742%2029.0759%2050.4374%2029.2869%2050.0624%2029.4275C49.7108%2029.5682%2049.2889%2029.6385%2048.8202%2029.6385C48.3515%2029.6385%2047.7187%2029.5448%2047.2734%2029.3338C46.8046%2029.1228%2046.4296%2028.818%2046.1249%2028.443C45.9374%2028.232%2045.7734%2027.9976%2045.6562%2027.6928C45.5156%2027.4115%2045.4453%2027.1067%2045.3749%2026.802L41.8594%2027.7866C42.0937%2028.7008%2042.4453%2029.4979%2042.8906%2030.2011C43.3594%2030.9044%2043.8984%2031.467%2044.5546%2031.9359C45.1406%2032.311%2045.7734%2032.5923%2046.4765%2032.8032C47.1796%2033.0142%2047.953%2033.108%2048.7499%2033.108C49.5468%2033.108%2050.742%2032.9439%2051.5389%2032.6626C52.3592%2032.3578%2053.0623%2031.9124%2053.6483%2031.3029C54.1873%2030.7169%2054.6092%2030.0136%2054.9139%2029.1931C55.2185%2028.3726%2055.3592%2027.4349%2055.3592%2026.3566C55.3592%2025.2782%2055.1951%2024.2702%2054.8435%2023.4966C54.492%2022.723%2053.9764%2022.0666%2053.2498%2021.5275C52.5233%2020.9883%2051.5858%2020.496%2050.3905%2020.0506L48.4218%2019.3239C47.6952%2019.0426%2047.1327%2018.7612%2046.7577%2018.4799C46.3593%2018.1752%2046.1015%2017.8704%2045.9609%2017.5188C45.8203%2017.1672%2045.7499%2016.7686%2045.7499%2016.2998C45.7499%2015.8309%2045.7968%2015.4324%2045.914%2015.0808C46.0077%2014.7292%2046.1718%2014.4478%2046.3593%2014.19Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M67.5233%2026.4504C67.5233%2027.1536%2067.4295%2027.7631%2067.242%2028.232C67.0545%2028.7008%2066.7499%2029.0525%2066.3046%2029.3103C65.8593%2029.5682%2065.2733%2029.6854%2064.5468%2029.6854C63.8202%2029.6854%2063.2109%2029.5682%2062.7656%2029.3103C62.3202%2029.0525%2062.0156%2028.7008%2061.8281%2028.232C61.6406%2027.7631%2061.5468%2027.1771%2061.5468%2026.4504V10.1579H57.8672V26.3332C57.8672%2027.6694%2058.1016%2028.8415%2058.5703%2029.8495C59.039%2030.8575%2059.7656%2031.6546%2060.75%2032.2406C61.7343%2032.8267%2063.0234%2033.108%2064.5702%2033.108C66.1171%2033.108%2067.3592%2032.8267%2068.367%2032.2406C69.3748%2031.6546%2070.1014%2030.8575%2070.5467%2029.8261C70.992%2028.7946%2071.2264%2027.6459%2071.2264%2026.3332V10.1579H67.5467V26.4504H67.5233Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M83.7186%2010.9549C82.7811%2010.4158%2081.5858%2010.1579%2080.1562%2010.1579H74.0859V32.8033H77.7656V24.9032H80.1093C81.5624%2024.9032%2082.7577%2024.6453%2083.6952%2024.1296C84.6327%2023.6138%2085.3358%2022.8168%2085.8045%2021.7385C86.2732%2020.6601%2086.5076%2019.2536%2086.5076%2017.5423C86.5076%2015.831%2086.2732%2014.4479%2085.8045%2013.3695C85.3358%2012.2912%2084.6327%2011.4941%2083.6952%2010.9549H83.7186ZM82.4999%2019.9099C82.2889%2020.4726%2081.9843%2020.8711%2081.5858%2021.1289C81.1874%2021.3868%2080.6718%2021.504%2080.0155%2021.504H77.7421V13.6274H80.0155C80.6718%2013.6274%2081.1874%2013.7446%2081.5858%2014.0025C81.9843%2014.2603%2082.2889%2014.6588%2082.4999%2015.2215C82.7108%2015.7841%2082.8046%2016.5577%2082.8046%2017.5423C82.8046%2018.5268%2082.7108%2019.3473%2082.4999%2019.9099Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M88.5938%2032.8267H99.7029V29.3807H92.2734V23.0043H98.4608V19.5817H92.2734V13.6274H99.7029V10.1813H88.5938V32.8267Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M111.797%2023.356C112.711%2022.8402%20113.437%2022.0666%20113.953%2021.0352C114.469%2020.0037%20114.726%2018.7144%20114.726%2017.1672C114.726%2015.62%20114.492%2014.2134%20114.023%2013.2054C113.555%2012.1739%20112.851%2011.4238%20111.961%2010.9315C111.047%2010.4392%20109.922%2010.2048%20108.586%2010.2048H102.023V32.8501H105.703V24.153H108.258L111.094%2032.8501H115.078L111.75%2023.4028C111.75%2023.4028%20111.797%2023.4028%20111.82%2023.3794L111.797%2023.356ZM105.68%2013.6274H108.422C108.961%2013.6274%20109.406%2013.7211%20109.805%2013.9321C110.18%2014.1431%20110.484%2014.4947%20110.695%2015.0105C110.906%2015.5028%20111%2016.2295%20111%2017.1437C111%2018.058%20110.906%2018.8081%20110.695%2019.3239C110.484%2019.8396%20110.203%2020.1912%20109.828%2020.4022C109.453%2020.6132%20109.008%2020.707%20108.469%2020.707H105.703V13.6508L105.68%2013.6274Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M132.234%2027.3412L129.047%2010.1813H125.508L122.344%2027.2474L119.086%2010.1813H115.148L120.328%2032.8267H124.148L127.289%2017.6595L130.406%2032.8267H134.226L139.382%2010.1813H135.492L132.234%2027.3412Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M144.773%2010.1813H141.094V32.8267H144.773V10.1813Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M151.851%2014.19C152.109%2013.9087%20152.414%2013.6977%20152.766%2013.557C153.117%2013.4164%20153.539%2013.3461%20154.008%2013.3461C154.476%2013.3461%20155.109%2013.4398%20155.578%2013.6508C156.047%2013.8618%20156.422%2014.1665%20156.726%2014.5416C156.89%2014.7526%20157.055%2014.987%20157.172%2015.2683C157.312%2015.5496%20157.406%2015.8309%20157.453%2016.1357L160.922%2015.0574C160.664%2014.1431%20160.312%2013.3695%20159.867%2012.7131C159.422%2012.0567%20158.883%2011.4941%20158.25%2011.0487C157.687%2010.6502%20157.055%2010.3689%20156.328%2010.1813C155.625%209.99379%20154.851%209.90002%20154.055%209.90002C153.258%209.90002%20152.086%2010.0407%20151.266%2010.3454C150.469%2010.6502%20149.766%2011.0956%20149.203%2011.6816C148.617%2012.2443%20148.195%2012.9241%20147.914%2013.7211C147.633%2014.5182%20147.492%2015.4324%20147.492%2016.4405C147.492%2017.4485%20147.656%2018.5034%20148.008%2019.277C148.359%2020.0506%20148.875%2020.707%20149.578%2021.2461C150.281%2021.7853%20151.195%2022.2776%20152.344%2022.6761L154.336%2023.4028C155.062%2023.6842%20155.648%2023.9655%20156.047%2024.2702C156.445%2024.5515%20156.726%2024.8797%20156.89%2025.2314C157.055%2025.583%20157.125%2026.0284%20157.125%2026.5676C157.125%2027.1067%20157.078%2027.4818%20156.961%2027.8335C156.867%2028.1851%20156.68%2028.4899%20156.469%2028.7712C156.234%2029.0759%20155.93%2029.2869%20155.555%2029.4275C155.203%2029.5682%20154.781%2029.6385%20154.312%2029.6385C153.844%2029.6385%20153.211%2029.5448%20152.766%2029.3338C152.297%2029.1228%20151.922%2028.818%20151.617%2028.443C151.43%2028.232%20151.266%2027.9976%20151.148%2027.6928C151.008%2027.4115%20150.914%2027.1067%20150.867%2026.802L147.352%2027.7866C147.586%2028.7008%20147.937%2029.4979%20148.383%2030.2011C148.852%2030.9044%20149.391%2031.467%20150.047%2031.9359C150.633%2032.311%20151.266%2032.5923%20151.969%2032.8032C152.672%2033.0142%20153.445%2033.108%20154.242%2033.108C155.039%2033.108%20156.234%2032.9439%20157.031%2032.6626C157.851%2032.3578%20158.555%2031.9124%20159.14%2031.3029C159.68%2030.7169%20160.101%2030.0136%20160.406%2029.1931C160.711%2028.3726%20160.851%2027.4349%20160.851%2026.3566C160.851%2025.2782%20160.687%2024.2702%20160.336%2023.4966C159.984%2022.723%20159.469%2022.0666%20158.742%2021.5275C158.015%2020.9883%20157.078%2020.496%20155.883%2020.0506L153.914%2019.3239C153.187%2019.0426%20152.625%2018.7612%20152.25%2018.4799C151.852%2018.1752%20151.594%2017.8704%20151.453%2017.5188C151.312%2017.1672%20151.242%2016.7686%20151.242%2016.2998C151.242%2015.8309%20151.289%2015.4324%20151.406%2015.0808C151.5%2014.7292%20151.664%2014.4478%20151.851%2014.19Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M174.633%2013.6274V10.1813H163.5V32.8267H174.633V29.3807H167.18V23.0043H173.367V19.5817H167.18V13.6274H174.633Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M179.316%2011.0956V10.1345H183.512V11.0956H181.918V15.8075H180.91V11.0956H179.316Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M184.168%2010.1345H185.41L186.676%2013.9321L187.941%2010.1345H189.184V15.8075H188.269V11.8223L187.098%2015.1511H186.254L185.082%2011.9161V15.831H184.168V10.1579V10.1345Z'%20fill='black'%3e%3c/path%3e%3c/svg%3e";
|
|
1088
|
+
let Je = 0;
|
|
1089
|
+
function _e({ width: t = 20, height: n = 20, style: a }) {
|
|
1090
|
+
const c = P(null);
|
|
1091
|
+
c.current || (c.current = `clip0_avatar_${++Je}`);
|
|
1092
|
+
const i = c.current;
|
|
1093
|
+
return /* @__PURE__ */ e.jsxs("svg", { width: t, height: n, viewBox: "0 0 155 174", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: a, "aria-hidden": !0, children: [
|
|
1094
|
+
/* @__PURE__ */ e.jsxs("g", { clipPath: `url(#${i})`, children: [
|
|
1043
1095
|
/* @__PURE__ */ e.jsx("path", { d: "M73.41 57.8388C73.15 56.8088 72.23 56.0988 71.17 56.0988H62.35C61.29 56.0988 60.37 56.8188 60.11 57.8488L45.8 114.299C45.62 114.999 45.78 115.719 46.22 116.289C46.66 116.859 47.33 117.179 48.05 117.179H55.05C56.13 117.179 57.08 116.419 57.31 115.359L59.83 103.889H73.76L76.29 115.359C76.52 116.409 77.47 117.179 78.55 117.179H85.54C86.26 117.179 86.92 116.849 87.37 116.289C87.81 115.719 87.96 114.999 87.79 114.299L73.44 57.8488L73.41 57.8388ZM62.12 93.3688L66.76 72.2188L71.42 93.3688H62.12Z", fill: "#FF0000" }),
|
|
1044
1096
|
/* @__PURE__ */ e.jsx("path", { d: "M101.69 56.0988H95.01C93.73 56.0988 92.7 57.1388 92.7 58.4088V114.859C92.7 116.139 93.74 117.169 95.01 117.169H101.69C102.97 117.169 104 116.129 104 114.859V58.4088C104 57.1288 102.96 56.0988 101.69 56.0988Z", fill: "#FF0000" }),
|
|
1045
1097
|
/* @__PURE__ */ e.jsx("path", { d: "M154.17 122.419L153.98 50.4588C153.97 45.2188 151.16 40.3788 146.61 37.7688L84.21 1.94879C79.66 -0.661205 74.07 -0.651206 69.54 1.98879L7.30003 38.1288C2.77003 40.7588 -0.00997311 45.6088 2.68877e-05 50.8488L0.190027 122.809C0.200027 128.049 3.01003 132.889 7.56003 135.499L69.97 171.319C74.52 173.929 80.11 173.919 84.64 171.279L146.87 135.139C151.4 132.509 154.19 127.659 154.17 122.409V122.419ZM51.11 131.639C26.26 117.289 17.74 85.5088 32.09 60.6488C46.44 35.7988 78.22 27.2788 103.08 41.6288C127.93 55.9788 136.45 87.7588 122.1 112.619C107.75 137.469 75.97 145.989 51.11 131.639Z", fill: "#FF0000" })
|
|
1046
1098
|
] }),
|
|
1047
|
-
/* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("clipPath", { id:
|
|
1099
|
+
/* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("clipPath", { id: i, children: /* @__PURE__ */ e.jsx("rect", { width: "154.17", height: "173.268", fill: "white" }) }) })
|
|
1048
1100
|
] });
|
|
1049
1101
|
}
|
|
1050
|
-
function
|
|
1051
|
-
const
|
|
1052
|
-
return /* @__PURE__ */ e.jsxs("svg", { width:
|
|
1102
|
+
function Xe({ width: t, height: n = 20, style: a }) {
|
|
1103
|
+
const c = t ?? 4.6875 * n;
|
|
1104
|
+
return /* @__PURE__ */ e.jsxs("svg", { width: c, height: n, viewBox: "0 0 75 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: a, "aria-hidden": !0, children: [
|
|
1053
1105
|
/* @__PURE__ */ e.jsx("path", { d: "M6.82917 5.34411C6.8013 5.25174 6.71768 5.18707 6.62476 5.18707H5.80712C5.70492 5.18707 5.62129 5.25174 5.60271 5.34411L4.27404 10.5635C4.25546 10.6282 4.27404 10.6928 4.31121 10.7483C4.34838 10.8037 4.41341 10.8314 4.47845 10.8314H5.12885C5.23106 10.8314 5.31468 10.7575 5.34255 10.6651L5.57484 9.60278H6.86634L7.09862 10.6651C7.11721 10.7667 7.21012 10.8314 7.31232 10.8314H7.96272C8.02776 10.8314 8.0928 10.8037 8.12997 10.7483C8.16713 10.6928 8.18571 10.6282 8.16713 10.5635L6.83846 5.34411H6.82917ZM5.77925 8.62356L6.20665 6.67437L6.64335 8.62356H5.77925Z", fill: "white" }),
|
|
1054
1106
|
/* @__PURE__ */ e.jsx("path", { d: "M9.44935 5.18707H8.82683C8.70604 5.18707 8.61313 5.27945 8.61313 5.39954V10.6189C8.61313 10.739 8.70604 10.8314 8.82683 10.8314H9.44935C9.57014 10.8314 9.66305 10.739 9.66305 10.6189V5.39954C9.66305 5.27945 9.57014 5.18707 9.44935 5.18707ZM8.83612 5.26097C8.81754 5.26097 8.79896 5.26098 8.78037 5.27021C8.79896 5.27021 8.81754 5.26097 8.83612 5.26097Z", fill: "white" }),
|
|
1055
1107
|
/* @__PURE__ */ e.jsx("path", { d: "M14.3273 11.3118L14.3087 4.66051C14.3087 4.18014 14.0486 3.72748 13.6212 3.4873L7.82334 0.180139C7.40523 -0.0600462 6.88491 -0.0600462 6.45751 0.180139L0.678271 3.51501C0.260159 3.7552 0 4.20785 0 4.68822L0.0185826 11.3395C0.0185826 11.8199 0.278741 12.2725 0.706145 12.5127L6.50396 15.8199C6.92208 16.06 7.44239 16.06 7.8698 15.8199L13.649 12.485C14.0671 12.2448 14.3273 11.7921 14.3273 11.3118ZM4.75719 12.1617C2.44363 10.8314 1.65386 7.903 2.99182 5.60277C4.32049 3.30254 7.27515 2.51732 9.5887 3.84758C11.9023 5.16859 12.692 8.10624 11.3541 10.4065C10.0254 12.7067 7.07074 13.4919 4.75719 12.1617Z", fill: "white" }),
|
|
@@ -1066,81 +1118,122 @@ function ze({ width: r, height: n = 20, style: s }) {
|
|
|
1066
1118
|
/* @__PURE__ */ e.jsx("path", { d: "M73.0116 3.71826H73.5041L74.0058 5.2148L74.5075 3.71826H75V5.95383H74.6376V4.38339L74.173 5.69517H73.8386L73.374 4.42034V5.96306H73.0116V3.7275V3.71826Z", fill: "white" })
|
|
1067
1119
|
] });
|
|
1068
1120
|
}
|
|
1069
|
-
const
|
|
1070
|
-
function
|
|
1071
|
-
if (typeof document > "u" || document.getElementById(
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1121
|
+
const Ie = "superwise-chatbot-package-css";
|
|
1122
|
+
function Ke() {
|
|
1123
|
+
if (typeof document > "u" || document.getElementById(Ie)) return;
|
|
1124
|
+
const t = document.createElement("style");
|
|
1125
|
+
t.id = Ie, t.textContent = qe, document.head.appendChild(t);
|
|
1074
1126
|
}
|
|
1075
|
-
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1127
|
+
Ke();
|
|
1128
|
+
function Qe(t) {
|
|
1129
|
+
return t === "human" ? { ...f.message, ...f.messageSelf } : { ...f.message, ...f.messageOther };
|
|
1078
1130
|
}
|
|
1079
|
-
function
|
|
1080
|
-
return String(
|
|
1131
|
+
function xe(t) {
|
|
1132
|
+
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1081
1133
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return !
|
|
1134
|
+
function ge(t) {
|
|
1135
|
+
return !t.trim() || /^\s*([*\-]|\d+\.)\s+/.test(t) || /\[text\]|\[\/text\]|\]\[text\]/i.test(t) || /\?|!/.test(t) || t.includes("—") || t.includes("–") || /^\s*(Would|Can|May|Could|Should|I |You |We |Let's|Please|Sure|Yes|No)\b/i.test(t) || /\b(your|you|we|me)\b/i.test(t) || /^\s*[A-Z][^.(]*[.?]\s*$/.test(t) || /^\s*#/.test(t) || /^\s*[-*]\s+[A-Z]/.test(t) && !/\.\w+\s*\(|=/.test(t) || /^\s*\d+\.\s+[A-Z][^.(]*$/.test(t) ? !1 : !!(/^\s*[)\]}]\s*$/.test(t) || /^\s*[\w.]+\s*=/.test(t) || /\.\w+\s*\(|\b(print|range|open|str|int|list|dict)\s*\(/.test(t) || /^\s*(def|class|import|from|return|if|else|elif|for|while|try|except|with|async)\b/.test(t) || /^\s{2,}/.test(t) && /[=(){}\[\],:]/.test(t) || /[,(]\s*$|:\s*$/.test(t) || /["'][^"']*["']\s*[:=]/.test(t) && t.length > 10 || /\b\w+\s*\([^)]*\)\s*$/.test(t) && /[=.]\w+\s*\(|import|from\s+\w+/.test(t));
|
|
1084
1136
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const n = [],
|
|
1087
|
-
`),
|
|
1088
|
-
let
|
|
1089
|
-
for (;
|
|
1090
|
-
const
|
|
1091
|
-
if (!
|
|
1092
|
-
|
|
1137
|
+
function et(t) {
|
|
1138
|
+
const n = [], a = t.split(`
|
|
1139
|
+
`), c = [];
|
|
1140
|
+
let i = 0;
|
|
1141
|
+
for (; i < a.length; ) {
|
|
1142
|
+
const s = a[i];
|
|
1143
|
+
if (!ge(s)) {
|
|
1144
|
+
c.push(s), i++;
|
|
1093
1145
|
continue;
|
|
1094
1146
|
}
|
|
1095
|
-
const
|
|
1096
|
-
for (;
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1099
|
-
|
|
1147
|
+
const p = [];
|
|
1148
|
+
for (; i < a.length; ) {
|
|
1149
|
+
const l = ge(a[i]), w = a[i].trim() === "", C = i + 1 < a.length && ge(a[i + 1]);
|
|
1150
|
+
if (l || w && p.length > 0 && C)
|
|
1151
|
+
p.push(a[i]), i++;
|
|
1100
1152
|
else break;
|
|
1101
1153
|
}
|
|
1102
|
-
if (
|
|
1103
|
-
const
|
|
1104
|
-
`).trim(),
|
|
1105
|
-
n.push({ placeholder: `\0CODE_RAW_${
|
|
1106
|
-
} else
|
|
1154
|
+
if (p.length >= 2) {
|
|
1155
|
+
const l = n.length, w = p.join(`
|
|
1156
|
+
`).trim(), C = xe(w);
|
|
1157
|
+
n.push({ placeholder: `\0CODE_RAW_${l}\0`, html: `<pre class="sw-ttyw-code-block"><code>${C}</code></pre>` }), c.push(`\0CODE_RAW_${l}\0`);
|
|
1158
|
+
} else p.length === 1 && c.push(p[0]);
|
|
1107
1159
|
}
|
|
1108
|
-
return { html:
|
|
1160
|
+
return { html: c.join(`
|
|
1109
1161
|
`), codeBlocks: n };
|
|
1110
1162
|
}
|
|
1111
|
-
function
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1163
|
+
function Me(t) {
|
|
1164
|
+
return !t || !String(t).trim() ? "" : String(t).replace(/^### (.*$)/gim, "<h3>$1</h3>").replace(/^## (.*$)/gim, "<h2>$1</h2>").replace(/^# (.*$)/gim, "<h1>$1</h1>").replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\n/g, "<br>");
|
|
1165
|
+
}
|
|
1166
|
+
const Pe = /^\s*([*\-]|\d+\.)\s+(.*)$/;
|
|
1167
|
+
function tt(t) {
|
|
1168
|
+
const n = [];
|
|
1169
|
+
for (const s of t) {
|
|
1170
|
+
const p = s.match(Pe);
|
|
1171
|
+
if (!p) continue;
|
|
1172
|
+
const l = s.match(/^(\s*)/)[1].length, w = p[2];
|
|
1173
|
+
n.push({ indent: l, content: w });
|
|
1174
|
+
}
|
|
1175
|
+
if (n.length === 0) return "";
|
|
1176
|
+
const a = 2, c = [], i = [0];
|
|
1177
|
+
for (let s = 0; s < n.length; s++) {
|
|
1178
|
+
const { indent: p, content: l } = n[s], w = Math.floor(p / a), C = s + 1 < n.length ? Math.floor(n[s + 1].indent / a) : -1;
|
|
1179
|
+
for (; i.length > 1 && w <= i[i.length - 2]; )
|
|
1180
|
+
i.pop(), c.push("</ul></li>");
|
|
1181
|
+
w > i[i.length - 1] ? (i.push(w), c.push("<ul>")) : s > 0 && w <= i[i.length - 1] && c.push("</li>");
|
|
1182
|
+
const h = Me(l);
|
|
1183
|
+
c.push("<li>", h), C <= w && c.push("</li>");
|
|
1184
|
+
}
|
|
1185
|
+
for (; i.length > 1; )
|
|
1186
|
+
i.pop(), c.push("</ul></li>");
|
|
1187
|
+
return "<ul>" + c.join("") + "</ul>";
|
|
1188
|
+
}
|
|
1189
|
+
function Ae(t) {
|
|
1190
|
+
if (!t) return "";
|
|
1191
|
+
let n = String(t);
|
|
1192
|
+
const a = [];
|
|
1193
|
+
n = n.replace(/```\s*(\w*)\s*\n?([\s\S]*?)```/g, (g, y, u) => {
|
|
1194
|
+
const m = a.length, L = xe(u.trim());
|
|
1195
|
+
return a.push(`<pre class="sw-ttyw-code-block"><code class="${y ? `language-${y}` : ""}">${L}</code></pre>`), `\0CODE_FENCED_${m}\0`;
|
|
1196
|
+
}), n = n.replace(/\[code\]([\s\S]*?)\[\/code\]/gi, (g, y) => {
|
|
1197
|
+
const u = a.length, m = xe(y.trim());
|
|
1198
|
+
return a.push(`<pre class="sw-ttyw-code-block"><code>${m}</code></pre>`), `\0CODE_FENCED_${u}\0`;
|
|
1121
1199
|
});
|
|
1122
|
-
const { html:
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1200
|
+
const { html: c, codeBlocks: i } = et(n);
|
|
1201
|
+
n = c, n = n.replace(/\[text\]([\s\S]*?)(?:\[\/text\]|\]\[text\])/gi, '<span class="sw-ttyw-text-block">$1</span>').replace(/\[bold\]([\s\S]*?)\[\/bold\]/gi, "<strong>$1</strong>").replace(/\[italic\]([\s\S]*?)\[\/italic\]/gi, "<em>$1</em>").replace(/bold([\s\S]*?)\/bold/gi, "<strong>$1</strong>").replace(/italic([\s\S]*?)\/italic/gi, "<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replace(/(https?:\/\/[^\s<]+)/g, '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\[([^[\]]+)\]/g, '<span class="sw-ttyw-bracket-label">$1</span>');
|
|
1202
|
+
const s = n.split(`
|
|
1203
|
+
`), p = [];
|
|
1204
|
+
let l = [], w = [];
|
|
1205
|
+
function C() {
|
|
1206
|
+
l.length && (p.push({ type: "list", lines: l }), l = []);
|
|
1207
|
+
}
|
|
1208
|
+
function h() {
|
|
1209
|
+
w.length && (p.push({ type: "content", lines: w }), w = []);
|
|
1210
|
+
}
|
|
1211
|
+
for (let g = 0; g < s.length; g++) {
|
|
1212
|
+
const y = s[g];
|
|
1213
|
+
Pe.test(y) ? (h(), l.push(y)) : (C(), w.push(y));
|
|
1214
|
+
}
|
|
1215
|
+
return C(), h(), n = p.map((g) => g.type === "list" ? tt(g.lines) : Me(g.lines.join(`
|
|
1216
|
+
`))).join(""), a.forEach((g, y) => {
|
|
1217
|
+
n = n.replace(`\0CODE_FENCED_${y}\0`, g);
|
|
1218
|
+
}), i.forEach(({ placeholder: g, html: y }) => {
|
|
1219
|
+
n = n.replace(g, y);
|
|
1220
|
+
}), n = n.replace(/(<br\s*\/?>)\s*$/i, ""), n;
|
|
1128
1221
|
}
|
|
1129
|
-
const
|
|
1130
|
-
const [
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
}, [
|
|
1222
|
+
const rt = 30, nt = 300, ot = Re(function({ text: n, speed: a = 20, onComplete: c }) {
|
|
1223
|
+
const [i, s] = H(""), [p, l] = H(!1), w = P(c);
|
|
1224
|
+
A(() => {
|
|
1225
|
+
w.current = c;
|
|
1226
|
+
}, [c]), A(() => {
|
|
1134
1227
|
if (!n) return;
|
|
1135
|
-
|
|
1136
|
-
const
|
|
1137
|
-
let
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1140
|
-
},
|
|
1141
|
-
return () => clearInterval(
|
|
1142
|
-
}, [n,
|
|
1143
|
-
const
|
|
1228
|
+
s(""), l(!1);
|
|
1229
|
+
const h = n.trim().split(/\s+/), j = Math.min(rt, h.length), g = h.slice(0, j).join(" "), y = Math.min(g.length, nt, n.length);
|
|
1230
|
+
let u = 0;
|
|
1231
|
+
const m = setInterval(() => {
|
|
1232
|
+
u < y ? (s(n.slice(0, u + 1)), u++) : (s(n), l(!0), clearInterval(m), w.current && w.current());
|
|
1233
|
+
}, a);
|
|
1234
|
+
return () => clearInterval(m);
|
|
1235
|
+
}, [n, a]);
|
|
1236
|
+
const C = (h) => h.replace(/(https?:\/\/[^\s<]+)/g, '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\[bold\]([\s\S]*?)\[\/bold\]/gi, "<strong>$1</strong>").replace(/\[italic\]([\s\S]*?)\[\/italic\]/gi, "<em>$1</em>").replace(/bold([\s\S]*?)\/bold/gi, "<strong>$1</strong>").replace(/italic([\s\S]*?)\/italic/gi, "<em>$1</em>").replace(/\[([^[\]]+)\]/g, "<strong>$1</strong>").replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/(?:^|\n)-\s+/g, `
|
|
1144
1237
|
• `).replace(/\n/g, "<br/>").replace(/(\d+\.\s)/g, "<br/>$1").replace(/(\*\s)/g, "<br/>$1");
|
|
1145
1238
|
return /* @__PURE__ */ e.jsx(
|
|
1146
1239
|
"div",
|
|
@@ -1151,18 +1244,18 @@ const Ue = 30, Ze = 300, Be = ve(function({ text: n, speed: s = 20, onComplete:
|
|
|
1151
1244
|
wordBreak: "break-word"
|
|
1152
1245
|
},
|
|
1153
1246
|
dangerouslySetInnerHTML: {
|
|
1154
|
-
__html:
|
|
1247
|
+
__html: p ? Ae(i) : C(i) + '<span class="typing-cursor">|</span>'
|
|
1155
1248
|
}
|
|
1156
1249
|
}
|
|
1157
1250
|
);
|
|
1158
|
-
}),
|
|
1159
|
-
const
|
|
1160
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
1161
|
-
/* @__PURE__ */ e.jsx("div", { className: "message-avatar", style:
|
|
1251
|
+
}), st = Re(function({ msg: n, isTyping: a = !1, onTypingComplete: c }) {
|
|
1252
|
+
const i = n.from === "human" ? "sw-ttyw-message self" : "sw-ttyw-message other";
|
|
1253
|
+
return /* @__PURE__ */ e.jsxs("div", { className: i, style: Qe(n.from), children: [
|
|
1254
|
+
/* @__PURE__ */ e.jsx("div", { className: "message-avatar", style: f.messageAvatar, children: n.from === "human" ? /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "black", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1162
1255
|
/* @__PURE__ */ e.jsx("path", { d: "M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21", fill: "black" }),
|
|
1163
1256
|
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "7", r: "4", fill: "black" })
|
|
1164
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
1165
|
-
/* @__PURE__ */ e.jsx("div", { className: "message-content sw-ttyw-markdown", style:
|
|
1257
|
+
] }) : /* @__PURE__ */ e.jsx(_e, { width: 20, height: 20 }) }),
|
|
1258
|
+
/* @__PURE__ */ e.jsx("div", { className: "message-content sw-ttyw-markdown", style: f.messageContent, children: n.from === "ai" && a ? /* @__PURE__ */ e.jsx(ot, { text: n.text, speed: 20, onComplete: c }) : n.from === "ai" ? /* @__PURE__ */ e.jsx(
|
|
1166
1259
|
"div",
|
|
1167
1260
|
{
|
|
1168
1261
|
style: {
|
|
@@ -1170,7 +1263,7 @@ const Ue = 30, Ze = 300, Be = ve(function({ text: n, speed: s = 20, onComplete:
|
|
|
1170
1263
|
lineHeight: "1.5",
|
|
1171
1264
|
wordBreak: "break-word"
|
|
1172
1265
|
},
|
|
1173
|
-
dangerouslySetInnerHTML: { __html:
|
|
1266
|
+
dangerouslySetInnerHTML: { __html: Ae(n.text) }
|
|
1174
1267
|
}
|
|
1175
1268
|
) : /* @__PURE__ */ e.jsx(
|
|
1176
1269
|
"div",
|
|
@@ -1181,67 +1274,67 @@ const Ue = 30, Ze = 300, Be = ve(function({ text: n, speed: s = 20, onComplete:
|
|
|
1181
1274
|
wordBreak: "break-word"
|
|
1182
1275
|
},
|
|
1183
1276
|
dangerouslySetInnerHTML: {
|
|
1184
|
-
__html: n.text.replace(/\[([
|
|
1277
|
+
__html: n.text.replace(/\[bold\]([\s\S]*?)\[\/bold\]/gi, "<strong>$1</strong>").replace(/\[italic\]([\s\S]*?)\[\/italic\]/gi, "<em>$1</em>").replace(/bold([\s\S]*?)\/bold/gi, "<strong>$1</strong>").replace(/italic([\s\S]*?)\/italic/gi, "<em>$1</em>").replace(/\[([^[\]]+)\]/g, "<strong>$1</strong>").replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/(?:^|\n)-\s+/g, `
|
|
1185
1278
|
• `).replace(/\n/g, "<br/>").replace(/(\d+\.\s)/g, "<br/>$1").replace(/(\*\s)/g, "<br/>$1")
|
|
1186
1279
|
}
|
|
1187
1280
|
}
|
|
1188
1281
|
) })
|
|
1189
1282
|
] });
|
|
1190
|
-
}),
|
|
1283
|
+
}), at = (t = "") => {
|
|
1191
1284
|
const n = (/* @__PURE__ */ new Date()).getHours();
|
|
1192
|
-
let
|
|
1193
|
-
return n >= 5 && n < 12 ?
|
|
1194
|
-
`🌅 Good morning ${
|
|
1195
|
-
`☀️ Morning ${
|
|
1196
|
-
`🌞 Good morning ${
|
|
1197
|
-
`👋 Rise and shine ${
|
|
1198
|
-
`👋 Morning ${
|
|
1199
|
-
] :
|
|
1285
|
+
let a = [];
|
|
1286
|
+
return n >= 5 && n < 12 ? t ? a = [
|
|
1287
|
+
`🌅 Good morning ${t}! I'm an expert on SUPERWISE. Ready to explore the platform together and uncover what's possible?`,
|
|
1288
|
+
`☀️ Morning ${t}! I'm an expert on SUPERWISE. What would you like to discover or optimize today?`,
|
|
1289
|
+
`🌞 Good morning ${t}! I'm an expert on SUPERWISE. Curious about a feature or looking to dive deeper into the platform?`,
|
|
1290
|
+
`👋 Rise and shine ${t}! I'm an expert on SUPERWISE. Let's jump into anything you want to explore.`,
|
|
1291
|
+
`👋 Morning ${t}! I'm an expert on SUPERWISE. How can I guide you through the platform today?`
|
|
1292
|
+
] : a = [
|
|
1200
1293
|
"🌅 Good morning! I'm an expert on SUPERWISE. Ready to explore the platform together and uncover what's possible?",
|
|
1201
1294
|
"☀️ Morning! I'm an expert on SUPERWISE. What would you like to discover or optimize today?",
|
|
1202
1295
|
"🌞 Good morning! I'm an expert on SUPERWISE. Curious about a feature or looking to dive deeper into the platform?",
|
|
1203
1296
|
"👋 Rise and shine! I'm an expert on SUPERWISE. Let's jump into anything you want to explore.",
|
|
1204
1297
|
"👋 Morning! I'm an expert on SUPERWISE. How can I guide you through the platform today?"
|
|
1205
|
-
] : n >= 12 && n < 17 ?
|
|
1206
|
-
`🌞 Good afternoon ${
|
|
1207
|
-
`☀️ Afternoon ${
|
|
1208
|
-
`👋 Good afternoon ${
|
|
1209
|
-
`🌅 Hey there ${
|
|
1210
|
-
`🌅 Afternoon ${
|
|
1211
|
-
] :
|
|
1298
|
+
] : n >= 12 && n < 17 ? t ? a = [
|
|
1299
|
+
`🌞 Good afternoon ${t}! I'm an expert on SUPERWISE. Ready to explore insights, features, or workflows together?`,
|
|
1300
|
+
`☀️ Afternoon ${t}! I'm an expert on SUPERWISE. How may I help you today?`,
|
|
1301
|
+
`👋 Good afternoon ${t}! I'm an expert on SUPERWISE. Looking to learn, optimize, or explore something specific?`,
|
|
1302
|
+
`🌅 Hey there ${t}! SUPERWISE expert here. Ready to help you unlock the capabilities you're curious about.`,
|
|
1303
|
+
`🌅 Afternoon ${t}! I'm an expert on SUPERWISE. How can I support your exploration today?`
|
|
1304
|
+
] : a = [
|
|
1212
1305
|
"🌞 Good afternoon! I'm an expert on SUPERWISE. Ready to explore insights, features, or workflows together?",
|
|
1213
1306
|
"☀️ Afternoon! I'm an expert on SUPERWISE. How may I help you today?",
|
|
1214
1307
|
"👋 Good afternoon! I'm an expert on SUPERWISE. Looking to learn, optimize, or explore something specific?",
|
|
1215
1308
|
"🌅 Hey there! SUPERWISE expert here. Ready to help you unlock the capabilities you're curious about.",
|
|
1216
1309
|
"🌅 Afternoon! I'm an expert on SUPERWISE. How can I support your exploration today?"
|
|
1217
|
-
] : n >= 17 && n < 21 ?
|
|
1218
|
-
`🌆 Good evening ${
|
|
1219
|
-
`🌅 Evening ${
|
|
1220
|
-
`👋 Good evening ${
|
|
1221
|
-
`🌇 Hey there ${
|
|
1222
|
-
`🌇 Evening ${
|
|
1223
|
-
] :
|
|
1310
|
+
] : n >= 17 && n < 21 ? t ? a = [
|
|
1311
|
+
`🌆 Good evening ${t}! I'm a SUPERWISE expert. Ready to explore features or clarify anything you're evaluating?`,
|
|
1312
|
+
`🌅 Evening ${t}! I'm your SUPERWISE expert. What can I help you discover or fine-tune tonight?`,
|
|
1313
|
+
`👋 Good evening ${t}! I'm an expert on SUPERWISE. Interested in exploring capabilities or reviewing how something works?`,
|
|
1314
|
+
`🌇 Hey there ${t}! SUPERWISE expert here. Want to dive into the platform together?`,
|
|
1315
|
+
`🌇 Evening ${t}! I'm an expert on SUPERWISE. How can I assist your learning or discovery today?`
|
|
1316
|
+
] : a = [
|
|
1224
1317
|
"🌆 Good evening! I'm a SUPERWISE expert. Ready to explore features or clarify anything you're evaluating?",
|
|
1225
1318
|
"🌅 Evening! I'm your SUPERWISE expert. What can I help you discover or fine-tune tonight?",
|
|
1226
1319
|
"👋 Good evening! I'm an expert on SUPERWISE. Interested in exploring capabilities or reviewing how something works?",
|
|
1227
1320
|
"🌇 Hey there! SUPERWISE expert here. Want to dive into the platform together?",
|
|
1228
1321
|
"🌇 Evening! I'm an expert on SUPERWISE. How can I assist your learning or discovery today?"
|
|
1229
|
-
] :
|
|
1230
|
-
`🌙 Good evening ${
|
|
1231
|
-
`⭐ Evening ${
|
|
1232
|
-
`👋 Good evening ${
|
|
1233
|
-
`🌃 Hey there ${
|
|
1234
|
-
`🌃 Evening ${
|
|
1235
|
-
] :
|
|
1322
|
+
] : t ? a = [
|
|
1323
|
+
`🌙 Good evening ${t}! I'm a SUPERWISE expert. Ready to guide you through the platform anytime.`,
|
|
1324
|
+
`⭐ Evening ${t}! I'm your SUPERWISE expert. What brings you to Superwise tonight - exploration, questions, or clarity?`,
|
|
1325
|
+
`👋 Good evening ${t}! I'm a SUPERWISE expert. Looking to discover features or understand how something works?`,
|
|
1326
|
+
`🌃 Hey there ${t}! I'm a SUPERWISE expert. Want to explore what the platform offers?`,
|
|
1327
|
+
`🌃 Evening ${t}! SUPERWISE expert here. How can I help simplify or explain things for you today?`
|
|
1328
|
+
] : a = [
|
|
1236
1329
|
"🌙 Good evening! I'm a SUPERWISE expert. Ready to guide you through the platform anytime.",
|
|
1237
1330
|
"⭐ Evening! I'm your SUPERWISE expert. What brings you to Superwise tonight - exploration, questions, or clarity?",
|
|
1238
1331
|
"👋 Good evening! I'm a SUPERWISE expert. Looking to discover features or understand how something works?",
|
|
1239
1332
|
"🌃 Hey there! I'm a SUPERWISE expert. Want to explore what the platform offers?",
|
|
1240
1333
|
"🌃 Evening! SUPERWISE expert here. How can I help simplify or explain things for you today?"
|
|
1241
|
-
],
|
|
1334
|
+
], a[Math.floor(Math.random() * a.length)];
|
|
1242
1335
|
};
|
|
1243
|
-
function
|
|
1244
|
-
const [
|
|
1336
|
+
function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryColor: c = "", apiUrl: i = "" }) {
|
|
1337
|
+
const [s, p] = H(() => {
|
|
1245
1338
|
try {
|
|
1246
1339
|
if (typeof window < "u" && window.localStorage) {
|
|
1247
1340
|
const o = window.localStorage.getItem("chatbot-messages");
|
|
@@ -1250,7 +1343,7 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1250
1343
|
} catch {
|
|
1251
1344
|
}
|
|
1252
1345
|
return [];
|
|
1253
|
-
}), [
|
|
1346
|
+
}), [l, w] = H(() => {
|
|
1254
1347
|
try {
|
|
1255
1348
|
if (typeof window < "u" && window.localStorage) {
|
|
1256
1349
|
const o = window.localStorage.getItem("chatbot-mql_df");
|
|
@@ -1259,140 +1352,182 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1259
1352
|
} catch {
|
|
1260
1353
|
}
|
|
1261
1354
|
return [];
|
|
1262
|
-
}), [
|
|
1263
|
-
if (
|
|
1355
|
+
}), [C, h] = H(""), [j, g] = H(!1), [y, u] = H(!1), [m, L] = H(!1), [V, D] = H(!1), [J, W] = H(/* @__PURE__ */ new Set()), [ae, ie] = H(!1), [le, ce] = H(!1), [X, T] = H(!1), [$, K] = H(!1), [he, de] = H(""), [O, N] = H(""), te = 12e4, pe = "https://superwise.ai/contact/", Z = P(null), Y = P(null), d = (() => {
|
|
1356
|
+
if (c) return c;
|
|
1264
1357
|
if (typeof document < "u" && typeof window < "u") {
|
|
1265
1358
|
const o = document.querySelector("[data-chatbot-color]");
|
|
1266
1359
|
if (o)
|
|
1267
1360
|
return o.getAttribute("data-chatbot-color") || "#000";
|
|
1268
|
-
const
|
|
1269
|
-
if (
|
|
1361
|
+
const b = getComputedStyle(document.documentElement).getPropertyValue("--swttyw-primary-color").trim();
|
|
1362
|
+
if (b) return b;
|
|
1270
1363
|
}
|
|
1271
1364
|
return "#000";
|
|
1272
|
-
})(),
|
|
1273
|
-
if (!
|
|
1274
|
-
const o =
|
|
1365
|
+
})(), v = je(() => {
|
|
1366
|
+
if (!l || l.length === 0) return "";
|
|
1367
|
+
const o = l.find((x) => x.name && x.email);
|
|
1275
1368
|
return o ? `${o.name} (${o.email})` : "";
|
|
1276
|
-
}, [
|
|
1277
|
-
|
|
1278
|
-
}, []),
|
|
1279
|
-
|
|
1280
|
-
}, [
|
|
1281
|
-
|
|
1282
|
-
|
|
1369
|
+
}, [l]), E = P(null), M = P(null), [re, S] = H(!0), R = P(!0), Q = P(s), _ = G(() => {
|
|
1370
|
+
Z.current && (clearTimeout(Z.current), Z.current = null);
|
|
1371
|
+
}, []), Ce = G((o) => {
|
|
1372
|
+
_(), Z.current = setTimeout(o, te);
|
|
1373
|
+
}, [te, _]), fe = je(() => s.map((o) => ({ role: o.from, content: o.text })), [s]), ue = (o) => {
|
|
1374
|
+
N(o), setTimeout(() => {
|
|
1375
|
+
N("");
|
|
1283
1376
|
}, 4e3);
|
|
1284
|
-
},
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1287
|
-
},
|
|
1288
|
-
var
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1377
|
+
}, Ve = (o) => {
|
|
1378
|
+
const x = o.length, b = o.trim();
|
|
1379
|
+
return de(""), N(""), !b || x === 0 ? (ue("Please enter a message before sending."), !1) : new RegExp(/(<([^>]+)>)/gi).test(b) ? (ue("Please avoid using HTML tags or scripts in your message."), !1) : b.length < 2 ? (ue("Please enter a meaningful question (at least 2 characters)."), !1) : b.length > 1e3 ? (ue("Message is too long. Please keep it under 1000 characters."), !1) : (de(""), N(""), !0);
|
|
1380
|
+
}, U = G((o = "auto") => {
|
|
1381
|
+
var b;
|
|
1382
|
+
const x = M.current;
|
|
1383
|
+
x && (x.scrollTop = x.scrollHeight), (b = E.current) == null || b.scrollIntoView({ behavior: o }), R.current = !0, S(!0);
|
|
1291
1384
|
}, []);
|
|
1292
|
-
|
|
1293
|
-
requestAnimationFrame(() =>
|
|
1294
|
-
}, [
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1385
|
+
A(() => {
|
|
1386
|
+
R.current && requestAnimationFrame(() => U("auto"));
|
|
1387
|
+
}, [s, O, X, $, J, j, U]), A(() => {
|
|
1388
|
+
const o = M.current;
|
|
1389
|
+
if (!o || typeof ResizeObserver > "u") return;
|
|
1390
|
+
const x = new ResizeObserver(() => {
|
|
1391
|
+
R.current && U("auto");
|
|
1392
|
+
});
|
|
1393
|
+
return x.observe(o), () => x.disconnect();
|
|
1394
|
+
}, [U]);
|
|
1395
|
+
const we = P(null), be = P(m);
|
|
1396
|
+
A(() => {
|
|
1397
|
+
const o = be.current;
|
|
1398
|
+
if (be.current = m, o && !m) {
|
|
1399
|
+
const x = we.current;
|
|
1400
|
+
x != null ? (we.current = null, requestAnimationFrame(() => {
|
|
1401
|
+
const b = M.current;
|
|
1402
|
+
if (b) {
|
|
1403
|
+
const I = b.scrollHeight - b.clientHeight;
|
|
1404
|
+
b.scrollTop = Math.min(x, Math.max(0, I));
|
|
1405
|
+
const me = b.scrollHeight - b.scrollTop - b.clientHeight <= 40;
|
|
1406
|
+
R.current = me, S(me);
|
|
1407
|
+
}
|
|
1408
|
+
})) : requestAnimationFrame(() => U("auto"));
|
|
1409
|
+
}
|
|
1410
|
+
}, [m, U]);
|
|
1411
|
+
const We = G(() => {
|
|
1412
|
+
const o = M.current;
|
|
1413
|
+
if (!o) return;
|
|
1414
|
+
const I = o.scrollHeight - o.scrollTop - o.clientHeight <= 40;
|
|
1415
|
+
R.current !== I && (R.current = I, S(I));
|
|
1416
|
+
}, []);
|
|
1417
|
+
A(() => {
|
|
1299
1418
|
try {
|
|
1300
|
-
typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-messages", JSON.stringify(
|
|
1419
|
+
typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-messages", JSON.stringify(s));
|
|
1301
1420
|
} catch {
|
|
1302
1421
|
}
|
|
1303
|
-
}, [
|
|
1422
|
+
}, [s]), A(() => {
|
|
1304
1423
|
try {
|
|
1305
|
-
typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-mql_df", JSON.stringify(
|
|
1424
|
+
typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-mql_df", JSON.stringify(l));
|
|
1306
1425
|
} catch {
|
|
1307
1426
|
}
|
|
1308
|
-
}, [
|
|
1309
|
-
|
|
1310
|
-
}, [
|
|
1311
|
-
if (
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1427
|
+
}, [l]), A(() => {
|
|
1428
|
+
Q.current = s;
|
|
1429
|
+
}, [s]), A(() => {
|
|
1430
|
+
if (s.length === 0 && !ae) {
|
|
1431
|
+
const x = { from: "ai", text: at(v) };
|
|
1432
|
+
p([x]), ie(!0), W(/* @__PURE__ */ new Set([0]));
|
|
1314
1433
|
}
|
|
1315
|
-
}, [
|
|
1316
|
-
const
|
|
1317
|
-
var
|
|
1318
|
-
if (
|
|
1319
|
-
const o =
|
|
1320
|
-
if (!o || !
|
|
1434
|
+
}, [s.length, ae, v]), A(() => () => _(), [_]);
|
|
1435
|
+
const ke = G(async () => {
|
|
1436
|
+
var Ee;
|
|
1437
|
+
if (j || $) return;
|
|
1438
|
+
const o = C.trim();
|
|
1439
|
+
if (!o || !Ve(C))
|
|
1321
1440
|
return;
|
|
1322
|
-
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1327
|
-
let
|
|
1328
|
-
if (
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1441
|
+
T(!1), _(), (Ee = Y.current) == null || Ee.abort();
|
|
1442
|
+
const x = new AbortController();
|
|
1443
|
+
Y.current = x;
|
|
1444
|
+
const b = x.signal, I = { from: "human", text: o }, F = Q.current, me = [...F, I];
|
|
1445
|
+
p(me), h(""), g(!0);
|
|
1446
|
+
let Se = o;
|
|
1447
|
+
if (l && l.length > 0 && !le) {
|
|
1448
|
+
const k = F.filter((q) => q.from === "ai").pop();
|
|
1449
|
+
k && k.text && k.text.trim() !== "" && (Se = o + "." + k.text, ce(!0));
|
|
1331
1450
|
}
|
|
1332
|
-
const
|
|
1333
|
-
|
|
1334
|
-
var
|
|
1335
|
-
|
|
1451
|
+
const $e = [...fe, { role: "human", content: o }];
|
|
1452
|
+
Ce(() => {
|
|
1453
|
+
var k;
|
|
1454
|
+
T(!0), (k = Y.current) == null || k.abort(), g(!1);
|
|
1336
1455
|
});
|
|
1337
1456
|
try {
|
|
1338
|
-
const
|
|
1339
|
-
if (
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1342
|
-
const
|
|
1343
|
-
return
|
|
1344
|
-
}), (
|
|
1457
|
+
const k = await Ze(Se, $e, l, n, a, i, b);
|
|
1458
|
+
if (_(), typeof k == "string") {
|
|
1459
|
+
const q = { from: "ai", text: k };
|
|
1460
|
+
p((B) => {
|
|
1461
|
+
const z = [...B, q];
|
|
1462
|
+
return W((ee) => /* @__PURE__ */ new Set([...ee, z.length - 1])), z;
|
|
1463
|
+
}), (k.startsWith("⚠️") || k.startsWith("❌")) && T(!0);
|
|
1345
1464
|
} else {
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1350
|
-
|
|
1465
|
+
if (k != null && k.isError) {
|
|
1466
|
+
T(!0);
|
|
1467
|
+
const B = k.reply || se;
|
|
1468
|
+
p((z) => {
|
|
1469
|
+
const ee = [...z, { from: "ai", text: B }];
|
|
1470
|
+
return W((Fe) => /* @__PURE__ */ new Set([...Fe, ee.length - 1])), ee;
|
|
1471
|
+
});
|
|
1472
|
+
return;
|
|
1473
|
+
}
|
|
1474
|
+
const q = { from: "ai", text: k.reply };
|
|
1475
|
+
p((B) => {
|
|
1476
|
+
const z = [...B, q];
|
|
1477
|
+
return W((ee) => /* @__PURE__ */ new Set([...ee, z.length - 1])), z;
|
|
1478
|
+
}), k.mqlDf && Array.isArray(k.mqlDf) && w(k.mqlDf), k.reply && (k.reply.startsWith("⚠️") || k.reply.startsWith("❌")) && T(!0), k.chatHistoryLimitExceeded && K(!0);
|
|
1351
1479
|
}
|
|
1352
|
-
} catch (
|
|
1353
|
-
if (
|
|
1480
|
+
} catch (k) {
|
|
1481
|
+
if (_(), k.name === "AbortError")
|
|
1354
1482
|
return;
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1483
|
+
T(!0), p((q) => {
|
|
1484
|
+
const B = [
|
|
1485
|
+
...q,
|
|
1486
|
+
{
|
|
1487
|
+
from: "ai",
|
|
1488
|
+
text: se
|
|
1489
|
+
}
|
|
1490
|
+
];
|
|
1491
|
+
return W((z) => /* @__PURE__ */ new Set([...z, B.length - 1])), B;
|
|
1492
|
+
});
|
|
1358
1493
|
} finally {
|
|
1359
|
-
|
|
1494
|
+
g(!1);
|
|
1360
1495
|
}
|
|
1361
|
-
}, [
|
|
1496
|
+
}, [C, n, a, l, le, fe, $, _, Ce]), Te = G(() => {
|
|
1362
1497
|
var o;
|
|
1363
|
-
|
|
1498
|
+
_(), (o = Y.current) == null || o.abort(), T(!1), K(!1), p([]), W(/* @__PURE__ */ new Set()), ie(!1), ce(!1);
|
|
1364
1499
|
try {
|
|
1365
1500
|
typeof window < "u" && window.localStorage && window.localStorage.removeItem("chatbot-messages");
|
|
1366
1501
|
} catch {
|
|
1367
1502
|
}
|
|
1368
|
-
|
|
1369
|
-
}, [
|
|
1370
|
-
var o,
|
|
1371
|
-
if (!
|
|
1503
|
+
u(!1);
|
|
1504
|
+
}, [_]), ve = G(async () => {
|
|
1505
|
+
var o, x, b;
|
|
1506
|
+
if (!l || l.length === 0) {
|
|
1372
1507
|
console.warn("No mql_df data available for PDF download");
|
|
1373
1508
|
return;
|
|
1374
1509
|
}
|
|
1375
1510
|
try {
|
|
1376
|
-
|
|
1377
|
-
const
|
|
1378
|
-
name: ((o =
|
|
1379
|
-
email: ((
|
|
1380
|
-
summary: `Chat conversation with ${
|
|
1511
|
+
g(!0), console.log("mql_df data for lead extraction:", l);
|
|
1512
|
+
const I = {
|
|
1513
|
+
name: ((o = l.find((F) => F.name)) == null ? void 0 : o.name) || "Chat User",
|
|
1514
|
+
email: ((x = l.find((F) => F.email)) == null ? void 0 : x.email) || "user@example.com",
|
|
1515
|
+
summary: `Chat conversation with ${s.length} messages. User asked: "${((b = s.find((F) => F.from === "human")) == null ? void 0 : b.text) || "No user messages"}"`
|
|
1381
1516
|
};
|
|
1382
|
-
console.log("Extracted lead row:",
|
|
1383
|
-
} catch (
|
|
1384
|
-
console.error("Failed to download PDF:",
|
|
1517
|
+
console.log("Extracted lead row:", I), await Ye(l, I, fe, i), console.log("PDF downloaded successfully");
|
|
1518
|
+
} catch (I) {
|
|
1519
|
+
console.error("Failed to download PDF:", I);
|
|
1385
1520
|
} finally {
|
|
1386
|
-
|
|
1521
|
+
g(!1);
|
|
1387
1522
|
}
|
|
1388
|
-
}, [
|
|
1523
|
+
}, [l, s]);
|
|
1389
1524
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
1390
1525
|
"div",
|
|
1391
1526
|
{
|
|
1392
1527
|
className: "sw-ttyw-chatbot",
|
|
1393
1528
|
style: {
|
|
1394
|
-
...
|
|
1395
|
-
"--swttyw-primary-color":
|
|
1529
|
+
...m ? f.containerMinimized : V ? f.containerExpanded : f.container,
|
|
1530
|
+
"--swttyw-primary-color": d,
|
|
1396
1531
|
"--swttyw-avatar-image": "url('')",
|
|
1397
1532
|
"--swttyw-user-avatar-image": "url('')",
|
|
1398
1533
|
"--swttyw-background-color": "#F7F7F7",
|
|
@@ -1401,30 +1536,30 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1401
1536
|
"--swttyw-footer-font-size": "16px",
|
|
1402
1537
|
"--swttyw-user-background-image": "url('')"
|
|
1403
1538
|
},
|
|
1404
|
-
onClick:
|
|
1539
|
+
onClick: m ? () => L(!1) : void 0,
|
|
1405
1540
|
children: [
|
|
1406
|
-
|
|
1541
|
+
m ? (
|
|
1407
1542
|
/* Minimized State - Horizontal Button */
|
|
1408
|
-
/* @__PURE__ */ e.jsxs("div", { style:
|
|
1409
|
-
/* @__PURE__ */ e.jsxs("svg", { style:
|
|
1543
|
+
/* @__PURE__ */ e.jsxs("div", { style: f.minimizedContent, children: [
|
|
1544
|
+
/* @__PURE__ */ e.jsxs("svg", { style: f.chatIcon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1410
1545
|
/* @__PURE__ */ e.jsx("path", { d: "M21 15C21 15.5304 20.7893 16.0391 20.4142 16.4142C20.0391 16.7893 19.5304 17 19 17H7L3 21V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H19C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V15Z", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1411
1546
|
/* @__PURE__ */ e.jsx("path", { d: "M8 9H16", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1412
1547
|
/* @__PURE__ */ e.jsx("path", { d: "M8 13H12", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
1413
1548
|
] }),
|
|
1414
|
-
/* @__PURE__ */ e.jsx("div", { style:
|
|
1549
|
+
/* @__PURE__ */ e.jsx("div", { style: f.minimizedTitle, children: t })
|
|
1415
1550
|
] })
|
|
1416
1551
|
) : (
|
|
1417
1552
|
/* Full State - Header with Controls */
|
|
1418
|
-
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-header", style:
|
|
1419
|
-
/* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-name", style:
|
|
1420
|
-
/* @__PURE__ */ e.jsxs("div", { style:
|
|
1553
|
+
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-header", style: f.header, children: [
|
|
1554
|
+
/* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-name", style: f.name, children: t }),
|
|
1555
|
+
/* @__PURE__ */ e.jsxs("div", { style: f.headerActions, children: [
|
|
1421
1556
|
/* @__PURE__ */ e.jsx(
|
|
1422
1557
|
"button",
|
|
1423
1558
|
{
|
|
1424
|
-
onClick: () =>
|
|
1425
|
-
style:
|
|
1426
|
-
title:
|
|
1427
|
-
children:
|
|
1559
|
+
onClick: () => D((o) => !o),
|
|
1560
|
+
style: f.headerButton,
|
|
1561
|
+
title: V ? "Shrink chat" : "Expand chat",
|
|
1562
|
+
children: V ? /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1428
1563
|
/* @__PURE__ */ e.jsx("path", { d: "M9 4V9H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1429
1564
|
/* @__PURE__ */ e.jsx("path", { d: "M15 4V9H20", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1430
1565
|
/* @__PURE__ */ e.jsx("path", { d: "M9 20V15H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1441,20 +1576,24 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1441
1576
|
"button",
|
|
1442
1577
|
{
|
|
1443
1578
|
onClick: () => {
|
|
1444
|
-
|
|
1579
|
+
if (!m) {
|
|
1580
|
+
const o = M.current;
|
|
1581
|
+
o && (we.current = o.scrollTop), D(!1);
|
|
1582
|
+
}
|
|
1583
|
+
L(!m);
|
|
1445
1584
|
},
|
|
1446
|
-
style:
|
|
1447
|
-
title:
|
|
1585
|
+
style: f.headerButton,
|
|
1586
|
+
title: m ? "Maximize chat" : "Minimize chat",
|
|
1448
1587
|
children: /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e.jsx("path", { d: "M6 9H18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
|
|
1449
1588
|
}
|
|
1450
1589
|
),
|
|
1451
|
-
|
|
1590
|
+
l && l.length > 0 && /* @__PURE__ */ e.jsx(
|
|
1452
1591
|
"button",
|
|
1453
1592
|
{
|
|
1454
|
-
onClick:
|
|
1455
|
-
style:
|
|
1593
|
+
onClick: ve,
|
|
1594
|
+
style: f.headerButton,
|
|
1456
1595
|
title: "Download PDF Report",
|
|
1457
|
-
disabled:
|
|
1596
|
+
disabled: j,
|
|
1458
1597
|
children: /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1459
1598
|
/* @__PURE__ */ e.jsx("path", { d: "M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1460
1599
|
/* @__PURE__ */ e.jsx("path", { d: "M7 10L12 15L17 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1465,8 +1604,8 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1465
1604
|
/* @__PURE__ */ e.jsx(
|
|
1466
1605
|
"button",
|
|
1467
1606
|
{
|
|
1468
|
-
onClick: () =>
|
|
1469
|
-
style:
|
|
1607
|
+
onClick: () => u(!0),
|
|
1608
|
+
style: f.headerButton,
|
|
1470
1609
|
title: "Clear chat",
|
|
1471
1610
|
children: /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1472
1611
|
/* @__PURE__ */ e.jsx("path", { d: "M3 6H5H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1479,140 +1618,160 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1479
1618
|
] })
|
|
1480
1619
|
] })
|
|
1481
1620
|
),
|
|
1482
|
-
!
|
|
1483
|
-
/* @__PURE__ */ e.jsxs(
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
objectFit: "contain"
|
|
1501
|
-
},
|
|
1502
|
-
onError: (o) => {
|
|
1503
|
-
console.log("Logo failed to load, using fallback"), o.target.style.display = "none";
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
) }),
|
|
1507
|
-
a.map((o, k) => /* @__PURE__ */ e.jsx(
|
|
1508
|
-
Ye,
|
|
1509
|
-
{
|
|
1510
|
-
msg: o,
|
|
1511
|
-
isTyping: W.has(k),
|
|
1512
|
-
onTypingComplete: () => {
|
|
1513
|
-
z((S) => {
|
|
1514
|
-
const M = new Set(S);
|
|
1515
|
-
return M.delete(k), M;
|
|
1516
|
-
}), requestAnimationFrame(() => Q("auto"));
|
|
1517
|
-
}
|
|
1518
|
-
},
|
|
1519
|
-
k
|
|
1520
|
-
)),
|
|
1521
|
-
T && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-validation-message", children: [
|
|
1522
|
-
/* @__PURE__ */ e.jsx("span", { className: "error-icon", children: "⚠️" }),
|
|
1523
|
-
/* @__PURE__ */ e.jsx("span", { children: T })
|
|
1524
|
-
] }),
|
|
1525
|
-
Y && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-contact-cta", children: /* @__PURE__ */ e.jsxs(
|
|
1526
|
-
"a",
|
|
1527
|
-
{
|
|
1528
|
-
href: ce,
|
|
1529
|
-
target: "_blank",
|
|
1530
|
-
rel: "noopener noreferrer",
|
|
1531
|
-
className: "sw-ttyw-cta-button",
|
|
1532
|
-
children: [
|
|
1533
|
-
/* @__PURE__ */ e.jsx("span", { className: "sw-ttyw-cta-icon", "aria-hidden": !0, children: "✉" }),
|
|
1534
|
-
"Contact Sales"
|
|
1535
|
-
]
|
|
1536
|
-
}
|
|
1537
|
-
) }),
|
|
1538
|
-
R && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-limit-exceeded", children: [
|
|
1539
|
-
/* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-limit-exceeded-message", children: "Chat history limit reached. Please download your conversation as PDF and clear chat history to continue." }),
|
|
1540
|
-
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-limit-action-buttons", children: [
|
|
1541
|
-
/* @__PURE__ */ e.jsxs(
|
|
1542
|
-
"button",
|
|
1621
|
+
!m && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-section", style: { flexGrow: 1, display: "flex", flexDirection: "column" }, children: [
|
|
1622
|
+
/* @__PURE__ */ e.jsxs(
|
|
1623
|
+
"div",
|
|
1624
|
+
{
|
|
1625
|
+
className: "sw-ttyw-messages",
|
|
1626
|
+
style: f.chatSection,
|
|
1627
|
+
ref: M,
|
|
1628
|
+
onScroll: We,
|
|
1629
|
+
children: [
|
|
1630
|
+
s.length === 0 && !j && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-empty-state", style: {
|
|
1631
|
+
display: "flex",
|
|
1632
|
+
flexDirection: "column",
|
|
1633
|
+
alignItems: "center",
|
|
1634
|
+
justifyContent: "center",
|
|
1635
|
+
height: "100%",
|
|
1636
|
+
position: "relative"
|
|
1637
|
+
}, children: /* @__PURE__ */ e.jsx(
|
|
1638
|
+
"img",
|
|
1543
1639
|
{
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1640
|
+
src: Ge,
|
|
1641
|
+
alt: "Superwise Logo",
|
|
1642
|
+
style: {
|
|
1643
|
+
width: "350px",
|
|
1644
|
+
height: "200px",
|
|
1645
|
+
opacity: 0.8,
|
|
1646
|
+
objectFit: "contain"
|
|
1647
|
+
},
|
|
1648
|
+
onError: (o) => {
|
|
1649
|
+
console.log("Logo failed to load, using fallback"), o.target.style.display = "none";
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
) }),
|
|
1653
|
+
s.map((o, x) => /* @__PURE__ */ e.jsx(
|
|
1654
|
+
st,
|
|
1655
|
+
{
|
|
1656
|
+
msg: o,
|
|
1657
|
+
isTyping: J.has(x),
|
|
1658
|
+
onTypingComplete: () => {
|
|
1659
|
+
W((b) => {
|
|
1660
|
+
const I = new Set(b);
|
|
1661
|
+
return I.delete(x), I;
|
|
1662
|
+
}), requestAnimationFrame(() => U("auto"));
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
x
|
|
1666
|
+
)),
|
|
1667
|
+
O && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-validation-message", children: [
|
|
1668
|
+
/* @__PURE__ */ e.jsx("span", { className: "error-icon", children: "⚠️" }),
|
|
1669
|
+
/* @__PURE__ */ e.jsx("span", { children: O })
|
|
1670
|
+
] }),
|
|
1671
|
+
X && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-contact-cta", children: /* @__PURE__ */ e.jsxs(
|
|
1672
|
+
"a",
|
|
1673
|
+
{
|
|
1674
|
+
href: pe,
|
|
1675
|
+
target: "_blank",
|
|
1676
|
+
rel: "noopener noreferrer",
|
|
1677
|
+
className: "sw-ttyw-cta-button",
|
|
1548
1678
|
children: [
|
|
1549
|
-
/* @__PURE__ */ e.
|
|
1550
|
-
|
|
1551
|
-
/* @__PURE__ */ e.jsx("path", { d: "M7 10L12 15L17 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1552
|
-
/* @__PURE__ */ e.jsx("path", { d: "M12 15V3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1553
|
-
] }),
|
|
1554
|
-
"Download Chat"
|
|
1679
|
+
/* @__PURE__ */ e.jsx("span", { className: "sw-ttyw-cta-icon", "aria-hidden": !0, children: "✉" }),
|
|
1680
|
+
"Contact Sales"
|
|
1555
1681
|
]
|
|
1556
1682
|
}
|
|
1557
|
-
),
|
|
1558
|
-
/* @__PURE__ */ e.jsxs(
|
|
1683
|
+
) }),
|
|
1684
|
+
$ && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-limit-exceeded", children: [
|
|
1685
|
+
/* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-limit-exceeded-message", children: "Chat history limit reached. Please download your conversation as PDF and clear chat history to continue." }),
|
|
1686
|
+
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-limit-action-buttons", children: [
|
|
1687
|
+
/* @__PURE__ */ e.jsxs(
|
|
1688
|
+
"button",
|
|
1689
|
+
{
|
|
1690
|
+
type: "button",
|
|
1691
|
+
className: "sw-ttyw-limit-download-pdf",
|
|
1692
|
+
onClick: ve,
|
|
1693
|
+
disabled: j,
|
|
1694
|
+
children: [
|
|
1695
|
+
/* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
|
|
1696
|
+
/* @__PURE__ */ e.jsx("path", { d: "M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1697
|
+
/* @__PURE__ */ e.jsx("path", { d: "M7 10L12 15L17 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1698
|
+
/* @__PURE__ */ e.jsx("path", { d: "M12 15V3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1699
|
+
] }),
|
|
1700
|
+
"Download Chat"
|
|
1701
|
+
]
|
|
1702
|
+
}
|
|
1703
|
+
),
|
|
1704
|
+
/* @__PURE__ */ e.jsxs(
|
|
1705
|
+
"button",
|
|
1706
|
+
{
|
|
1707
|
+
type: "button",
|
|
1708
|
+
className: "sw-ttyw-limit-clear-history",
|
|
1709
|
+
onClick: () => u(!0),
|
|
1710
|
+
children: [
|
|
1711
|
+
/* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
|
|
1712
|
+
/* @__PURE__ */ e.jsx("path", { d: "M3 6H5H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1713
|
+
/* @__PURE__ */ e.jsx("path", { d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1714
|
+
/* @__PURE__ */ e.jsx("path", { d: "M10 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1715
|
+
/* @__PURE__ */ e.jsx("path", { d: "M14 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1716
|
+
] }),
|
|
1717
|
+
"Clear History"
|
|
1718
|
+
]
|
|
1719
|
+
}
|
|
1720
|
+
)
|
|
1721
|
+
] })
|
|
1722
|
+
] }),
|
|
1723
|
+
j && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-message other message-loading", style: { ...f.message, ...f.messageOther, minHeight: "2.5rem" }, children: [
|
|
1724
|
+
/* @__PURE__ */ e.jsx("div", { className: "message-avatar", style: f.messageAvatar, children: /* @__PURE__ */ e.jsx(_e, { width: 20, height: 20 }) }),
|
|
1725
|
+
/* @__PURE__ */ e.jsxs("div", { className: "message-content", style: f.messageContent, children: [
|
|
1726
|
+
/* @__PURE__ */ e.jsx("div", { className: "typing typing-1" }),
|
|
1727
|
+
/* @__PURE__ */ e.jsx("div", { className: "typing typing-2" }),
|
|
1728
|
+
/* @__PURE__ */ e.jsx("div", { className: "typing typing-3" })
|
|
1729
|
+
] })
|
|
1730
|
+
] }),
|
|
1731
|
+
!re && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-jump-latest", children: /* @__PURE__ */ e.jsx(
|
|
1559
1732
|
"button",
|
|
1560
1733
|
{
|
|
1561
1734
|
type: "button",
|
|
1562
|
-
className: "sw-ttyw-
|
|
1563
|
-
onClick: () =>
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
/* @__PURE__ */ e.jsx("path", { d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1568
|
-
/* @__PURE__ */ e.jsx("path", { d: "M10 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1569
|
-
/* @__PURE__ */ e.jsx("path", { d: "M14 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1570
|
-
] }),
|
|
1571
|
-
"Clear History"
|
|
1572
|
-
]
|
|
1735
|
+
className: "sw-ttyw-jump-button",
|
|
1736
|
+
onClick: () => {
|
|
1737
|
+
U("smooth"), S(!0);
|
|
1738
|
+
},
|
|
1739
|
+
children: "Jump to latest"
|
|
1573
1740
|
}
|
|
1574
|
-
)
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
/* @__PURE__ */ e.jsx("div", { className: "typing typing-1" }),
|
|
1581
|
-
/* @__PURE__ */ e.jsx("div", { className: "typing typing-2" }),
|
|
1582
|
-
/* @__PURE__ */ e.jsx("div", { className: "typing typing-3" })
|
|
1583
|
-
] })
|
|
1584
|
-
] }),
|
|
1585
|
-
/* @__PURE__ */ e.jsx("div", { ref: b })
|
|
1586
|
-
] }),
|
|
1587
|
-
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-section", style: m.inputSection, children: [
|
|
1741
|
+
) }),
|
|
1742
|
+
/* @__PURE__ */ e.jsx("div", { ref: E })
|
|
1743
|
+
]
|
|
1744
|
+
}
|
|
1745
|
+
),
|
|
1746
|
+
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-section", style: f.inputSection, children: [
|
|
1588
1747
|
/* @__PURE__ */ e.jsx(
|
|
1589
1748
|
"textarea",
|
|
1590
1749
|
{
|
|
1591
1750
|
className: "sw-ttyw-input",
|
|
1592
|
-
placeholder:
|
|
1593
|
-
value:
|
|
1751
|
+
placeholder: $ ? "Chat limit reached." : "Please ask question here",
|
|
1752
|
+
value: C,
|
|
1594
1753
|
onChange: (o) => {
|
|
1595
|
-
|
|
1754
|
+
h(o.target.value), O && N("");
|
|
1596
1755
|
},
|
|
1597
1756
|
maxLength: 1e3,
|
|
1598
|
-
disabled:
|
|
1599
|
-
style:
|
|
1600
|
-
onKeyDown: (o) => o.key === "Enter" && !o.shiftKey && (o.preventDefault(),
|
|
1757
|
+
disabled: j || $,
|
|
1758
|
+
style: f.textarea,
|
|
1759
|
+
onKeyDown: (o) => o.key === "Enter" && !o.shiftKey && (o.preventDefault(), ke())
|
|
1601
1760
|
}
|
|
1602
1761
|
),
|
|
1603
|
-
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-content", style:
|
|
1604
|
-
/* @__PURE__ */ e.jsxs("small", { id: "sw-ttyw-chat-textbox-status", style:
|
|
1605
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1762
|
+
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-content", style: f.inputFooter, children: [
|
|
1763
|
+
/* @__PURE__ */ e.jsxs("small", { id: "sw-ttyw-chat-textbox-status", style: f.characterCount, children: [
|
|
1764
|
+
/* @__PURE__ */ e.jsx("span", { children: C.length }),
|
|
1606
1765
|
"/1000"
|
|
1607
1766
|
] }),
|
|
1608
1767
|
/* @__PURE__ */ e.jsx(
|
|
1609
1768
|
"button",
|
|
1610
1769
|
{
|
|
1611
1770
|
id: "sw-ttyw-chat-send-message",
|
|
1612
|
-
onClick:
|
|
1771
|
+
onClick: ke,
|
|
1613
1772
|
"aria-label": "Send message",
|
|
1614
|
-
disabled:
|
|
1615
|
-
style:
|
|
1773
|
+
disabled: j || $,
|
|
1774
|
+
style: f.sendButton,
|
|
1616
1775
|
children: /* @__PURE__ */ e.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000", className: "cwv replaced-svg", children: [
|
|
1617
1776
|
/* @__PURE__ */ e.jsx("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1618
1777
|
/* @__PURE__ */ e.jsx("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })
|
|
@@ -1622,18 +1781,18 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1622
1781
|
] })
|
|
1623
1782
|
] })
|
|
1624
1783
|
] }),
|
|
1625
|
-
|
|
1784
|
+
y && /* @__PURE__ */ e.jsxs("div", { className: "swttyw-modal swttyw-modal-clear-history", style: f.modalOverlay, children: [
|
|
1626
1785
|
/* @__PURE__ */ e.jsx("div", { className: "swtty-modal-header" }),
|
|
1627
|
-
/* @__PURE__ */ e.jsxs("div", { className: "swtty-modal-body", style:
|
|
1786
|
+
/* @__PURE__ */ e.jsxs("div", { className: "swtty-modal-body", style: f.modalBody, children: [
|
|
1628
1787
|
/* @__PURE__ */ e.jsx("div", { className: "swtty-content", children: "Are you sure you want to delete the chat history?" }),
|
|
1629
|
-
/* @__PURE__ */ e.jsxs("div", { className: "swtty-action", style:
|
|
1788
|
+
/* @__PURE__ */ e.jsxs("div", { className: "swtty-action", style: f.modalActions, children: [
|
|
1630
1789
|
/* @__PURE__ */ e.jsx(
|
|
1631
1790
|
"input",
|
|
1632
1791
|
{
|
|
1633
1792
|
type: "button",
|
|
1634
1793
|
className: "swttyw-btn swttyw-btn-primary",
|
|
1635
1794
|
id: "swttyw-btn-clear-history-yes",
|
|
1636
|
-
onClick:
|
|
1795
|
+
onClick: Te,
|
|
1637
1796
|
value: "Yes",
|
|
1638
1797
|
style: {
|
|
1639
1798
|
background: "var(--swttyw-primary-color)",
|
|
@@ -1652,7 +1811,7 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1652
1811
|
type: "button",
|
|
1653
1812
|
className: "swttyw-btn swttyw-btn-primary-inverse",
|
|
1654
1813
|
id: "swttyw-btn-clear-history-no",
|
|
1655
|
-
onClick: () =>
|
|
1814
|
+
onClick: () => u(!1),
|
|
1656
1815
|
value: "No",
|
|
1657
1816
|
style: {
|
|
1658
1817
|
background: "transparent",
|
|
@@ -1669,14 +1828,14 @@ function Je({ title: r = "", agentId: n = "", discoveryAgentId: s = "", primaryC
|
|
|
1669
1828
|
] }),
|
|
1670
1829
|
/* @__PURE__ */ e.jsx("div", { className: "swtty-modal-footer" })
|
|
1671
1830
|
] }),
|
|
1672
|
-
!
|
|
1831
|
+
!m && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-footer", style: f.footer, children: [
|
|
1673
1832
|
"Powered by ",
|
|
1674
|
-
/* @__PURE__ */ e.jsx("a", { href: "https://superwise.ai/", className: "ml-1", target: "_new", rel: "noopener noreferrer", style: { marginLeft: "0.25rem", lineHeight: 0 }, "aria-label": "SUPERWISE®", children: /* @__PURE__ */ e.jsx(
|
|
1833
|
+
/* @__PURE__ */ e.jsx("a", { href: "https://superwise.ai/", className: "ml-1", target: "_new", rel: "noopener noreferrer", style: { marginLeft: "0.25rem", lineHeight: 0 }, "aria-label": "SUPERWISE®", children: /* @__PURE__ */ e.jsx(Xe, { height: 20 }) })
|
|
1675
1834
|
] })
|
|
1676
1835
|
]
|
|
1677
1836
|
}
|
|
1678
1837
|
) });
|
|
1679
1838
|
}
|
|
1680
1839
|
export {
|
|
1681
|
-
|
|
1840
|
+
lt as Chatbot
|
|
1682
1841
|
};
|