@rekayasa/erica-bubble 1.1.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3,34 +3,32 @@ import { createContext as t, createElement as n, forwardRef as r, useCallback as
3
3
  import { CopilotChatConfigurationProvider as d, CopilotChatInput as f, CopilotKit as p, CopilotSidebar as m, useAgent as h, useCopilotChatConfiguration as g, useCopilotKit as _, useDefaultRenderTool as v, useInterrupt as y, useRenderTool as b } from "@copilotkit/react-core/v2";
4
4
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
5
5
  import * as w from "echarts";
6
+ import { createRoot as T } from "react-dom/client";
6
7
  //#region \0rolldown/runtime.js
7
- var T = Object.create, E = Object.defineProperty, D = Object.getOwnPropertyDescriptor, O = Object.getOwnPropertyNames, ee = Object.getPrototypeOf, te = Object.prototype.hasOwnProperty, ne = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), re = (e, t) => {
8
+ var E = Object.create, D = Object.defineProperty, O = Object.getOwnPropertyDescriptor, ee = Object.getOwnPropertyNames, te = Object.getPrototypeOf, ne = Object.prototype.hasOwnProperty, k = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), re = (e, t) => {
8
9
  let n = {};
9
- for (var r in e) E(n, r, {
10
+ for (var r in e) D(n, r, {
10
11
  get: e[r],
11
12
  enumerable: !0
12
13
  });
13
- return t || E(n, Symbol.toStringTag, { value: "Module" }), n;
14
+ return t || D(n, Symbol.toStringTag, { value: "Module" }), n;
14
15
  }, ie = (e, t, n, r) => {
15
- if (t && typeof t == "object" || typeof t == "function") for (var i = O(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !te.call(e, s) && s !== n && E(e, s, {
16
+ if (t && typeof t == "object" || typeof t == "function") for (var i = ee(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !ne.call(e, s) && s !== n && D(e, s, {
16
17
  get: ((e) => t[e]).bind(null, s),
17
- enumerable: !(r = D(t, s)) || r.enumerable
18
+ enumerable: !(r = O(t, s)) || r.enumerable
18
19
  });
19
20
  return e;
20
- }, ae = (e, t, n) => (n = e == null ? {} : T(ee(e)), ie(t || !e || !e.__esModule ? E(n, "default", {
21
+ }, ae = (e, t, n) => (n = e == null ? {} : E(te(e)), ie(t || !e || !e.__esModule ? D(n, "default", {
21
22
  value: e,
22
23
  enumerable: !0
23
- }) : n, e)), oe = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
24
- if (typeof require < "u") return require.apply(this, arguments);
25
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
26
- }), se = (e, t, n) => {
24
+ }) : n, e)), oe = (e, t, n) => {
27
25
  typeof n == "string" || n instanceof Blob ? e.append(t, n) : n instanceof Date ? e.append(t, n.toISOString()) : e.append(t, JSON.stringify(n));
28
- }, ce = { bodySerializer: (e) => {
26
+ }, se = { bodySerializer: (e) => {
29
27
  let t = new FormData();
30
28
  return Object.entries(e).forEach(([e, n]) => {
31
- n != null && (Array.isArray(n) ? n.forEach((n) => se(t, e, n)) : se(t, e, n));
29
+ n != null && (Array.isArray(n) ? n.forEach((n) => oe(t, e, n)) : oe(t, e, n));
32
30
  }), t;
33
- } }, le = { bodySerializer: (e) => JSON.stringify(e, (e, t) => typeof t == "bigint" ? t.toString() : t) };
31
+ } }, ce = { bodySerializer: (e) => JSON.stringify(e, (e, t) => typeof t == "bigint" ? t.toString() : t) };
34
32
  Object.entries({
35
33
  $body_: "body",
36
34
  $headers_: "headers",
@@ -39,7 +37,7 @@ Object.entries({
39
37
  });
40
38
  //#endregion
41
39
  //#region src/shared/api/v1/core/serverSentEvents.gen.ts
42
- function ue({ onRequest: e, onSseError: t, onSseEvent: n, responseTransformer: r, responseValidator: i, sseDefaultRetryDelay: a, sseMaxRetryAttempts: o, sseMaxRetryDelay: s, sseSleepFn: c, url: l, ...u }) {
40
+ function le({ onRequest: e, onSseError: t, onSseEvent: n, responseTransformer: r, responseValidator: i, sseDefaultRetryDelay: a, sseMaxRetryAttempts: o, sseMaxRetryDelay: s, sseSleepFn: c, url: l, ...u }) {
43
41
  let d, f = c ?? ((e) => new Promise((t) => setTimeout(t, e)));
44
42
  return { stream: async function* () {
45
43
  let c = a ?? 3e3, p = 0, m = u.signal ?? new AbortController().signal;
@@ -111,30 +109,30 @@ function ue({ onRequest: e, onSseError: t, onSseEvent: n, responseTransformer: r
111
109
  }
112
110
  //#endregion
113
111
  //#region src/shared/api/v1/core/pathSerializer.gen.ts
114
- var de = (e) => {
112
+ var ue = (e) => {
115
113
  switch (e) {
116
114
  case "label": return ".";
117
115
  case "matrix": return ";";
118
116
  case "simple": return ",";
119
117
  default: return "&";
120
118
  }
121
- }, fe = (e) => {
119
+ }, de = (e) => {
122
120
  switch (e) {
123
121
  case "form": return ",";
124
122
  case "pipeDelimited": return "|";
125
123
  case "spaceDelimited": return "%20";
126
124
  default: return ",";
127
125
  }
128
- }, pe = (e) => {
126
+ }, fe = (e) => {
129
127
  switch (e) {
130
128
  case "label": return ".";
131
129
  case "matrix": return ";";
132
130
  case "simple": return ",";
133
131
  default: return "&";
134
132
  }
135
- }, me = ({ allowReserved: e, explode: t, name: n, style: r, value: i }) => {
133
+ }, pe = ({ allowReserved: e, explode: t, name: n, style: r, value: i }) => {
136
134
  if (!t) {
137
- let t = (e ? i : i.map((e) => encodeURIComponent(e))).join(fe(r));
135
+ let t = (e ? i : i.map((e) => encodeURIComponent(e))).join(de(r));
138
136
  switch (r) {
139
137
  case "label": return `.${t}`;
140
138
  case "matrix": return `;${n}=${t}`;
@@ -142,17 +140,17 @@ var de = (e) => {
142
140
  default: return `${n}=${t}`;
143
141
  }
144
142
  }
145
- let a = de(r), o = i.map((t) => r === "label" || r === "simple" ? e ? t : encodeURIComponent(t) : he({
143
+ let a = ue(r), o = i.map((t) => r === "label" || r === "simple" ? e ? t : encodeURIComponent(t) : me({
146
144
  allowReserved: e,
147
145
  name: n,
148
146
  value: t
149
147
  })).join(a);
150
148
  return r === "label" || r === "matrix" ? a + o : o;
151
- }, he = ({ allowReserved: e, name: t, value: n }) => {
149
+ }, me = ({ allowReserved: e, name: t, value: n }) => {
152
150
  if (n == null) return "";
153
151
  if (typeof n == "object") throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
154
152
  return `${t}=${e ? n : encodeURIComponent(n)}`;
155
- }, ge = ({ allowReserved: e, explode: t, name: n, style: r, value: i, valueOnly: a }) => {
153
+ }, he = ({ allowReserved: e, explode: t, name: n, style: r, value: i, valueOnly: a }) => {
156
154
  if (i instanceof Date) return a ? i.toISOString() : `${n}=${i.toISOString()}`;
157
155
  if (r !== "deepObject" && !t) {
158
156
  let t = [];
@@ -171,21 +169,21 @@ var de = (e) => {
171
169
  default: return a;
172
170
  }
173
171
  }
174
- let o = pe(r), s = Object.entries(i).map(([t, i]) => he({
172
+ let o = fe(r), s = Object.entries(i).map(([t, i]) => me({
175
173
  allowReserved: e,
176
174
  name: r === "deepObject" ? `${n}[${t}]` : t,
177
175
  value: i
178
176
  })).join(o);
179
177
  return r === "label" || r === "matrix" ? o + s : s;
180
- }, _e = /\{[^{}]+\}/g, ve = ({ path: e, url: t }) => {
181
- let n = t, r = t.match(_e);
178
+ }, ge = /\{[^{}]+\}/g, _e = ({ path: e, url: t }) => {
179
+ let n = t, r = t.match(ge);
182
180
  if (r) for (let t of r) {
183
181
  let r = !1, i = t.substring(1, t.length - 1), a = "simple";
184
182
  i.endsWith("*") && (r = !0, i = i.substring(0, i.length - 1)), i.startsWith(".") ? (i = i.substring(1), a = "label") : i.startsWith(";") && (i = i.substring(1), a = "matrix");
185
183
  let o = e[i];
186
184
  if (o == null) continue;
187
185
  if (Array.isArray(o)) {
188
- n = n.replace(t, me({
186
+ n = n.replace(t, pe({
189
187
  explode: r,
190
188
  name: i,
191
189
  style: a,
@@ -194,7 +192,7 @@ var de = (e) => {
194
192
  continue;
195
193
  }
196
194
  if (typeof o == "object") {
197
- n = n.replace(t, ge({
195
+ n = n.replace(t, he({
198
196
  explode: r,
199
197
  name: i,
200
198
  style: a,
@@ -204,7 +202,7 @@ var de = (e) => {
204
202
  continue;
205
203
  }
206
204
  if (a === "matrix") {
207
- n = n.replace(t, `;${he({
205
+ n = n.replace(t, `;${me({
208
206
  name: i,
209
207
  value: o
210
208
  })}`);
@@ -214,33 +212,33 @@ var de = (e) => {
214
212
  n = n.replace(t, s);
215
213
  }
216
214
  return n;
217
- }, ye = ({ baseUrl: e, path: t, query: n, querySerializer: r, url: i }) => {
215
+ }, ve = ({ baseUrl: e, path: t, query: n, querySerializer: r, url: i }) => {
218
216
  let a = i.startsWith("/") ? i : `/${i}`, o = (e ?? "") + a;
219
- t && (o = ve({
217
+ t && (o = _e({
220
218
  path: t,
221
219
  url: o
222
220
  }));
223
221
  let s = n ? r(n) : "";
224
222
  return s.startsWith("?") && (s = s.substring(1)), s && (o += `?${s}`), o;
225
223
  };
226
- function be(e) {
224
+ function ye(e) {
227
225
  let t = e.body !== void 0;
228
226
  if (t && e.bodySerializer) return "serializedBody" in e ? e.serializedBody !== void 0 && e.serializedBody !== "" ? e.serializedBody : null : e.body === "" ? null : e.body;
229
227
  if (t) return e.body;
230
228
  }
231
229
  //#endregion
232
230
  //#region src/shared/api/v1/core/auth.gen.ts
233
- var xe = async (e, t) => {
231
+ var be = async (e, t) => {
234
232
  let n = typeof t == "function" ? await t(e) : t;
235
233
  if (n) return e.scheme === "bearer" ? `Bearer ${n}` : e.scheme === "basic" ? `Basic ${btoa(n)}` : n;
236
- }, Se = ({ parameters: e = {}, ...t } = {}) => (n) => {
234
+ }, xe = ({ parameters: e = {}, ...t } = {}) => (n) => {
237
235
  let r = [];
238
236
  if (n && typeof n == "object") for (let i in n) {
239
237
  let a = n[i];
240
238
  if (a == null) continue;
241
239
  let o = e[i] || t;
242
240
  if (Array.isArray(a)) {
243
- let e = me({
241
+ let e = pe({
244
242
  allowReserved: o.allowReserved,
245
243
  explode: !0,
246
244
  name: i,
@@ -250,7 +248,7 @@ var xe = async (e, t) => {
250
248
  });
251
249
  e && r.push(e);
252
250
  } else if (typeof a == "object") {
253
- let e = ge({
251
+ let e = he({
254
252
  allowReserved: o.allowReserved,
255
253
  explode: !0,
256
254
  name: i,
@@ -260,7 +258,7 @@ var xe = async (e, t) => {
260
258
  });
261
259
  e && r.push(e);
262
260
  } else {
263
- let e = he({
261
+ let e = me({
264
262
  allowReserved: o.allowReserved,
265
263
  name: i,
266
264
  value: a
@@ -269,7 +267,7 @@ var xe = async (e, t) => {
269
267
  }
270
268
  }
271
269
  return r.join("&");
272
- }, Ce = (e) => {
270
+ }, Se = (e) => {
273
271
  if (!e) return "stream";
274
272
  let t = e.split(";")[0]?.trim();
275
273
  if (t) {
@@ -283,10 +281,10 @@ var xe = async (e, t) => {
283
281
  ].some((e) => t.startsWith(e))) return "blob";
284
282
  if (t.startsWith("text/")) return "text";
285
283
  }
286
- }, we = (e, t) => t ? !!(e.headers.has(t) || e.query?.[t] || e.headers.get("Cookie")?.includes(`${t}=`)) : !1, Te = async ({ security: e, ...t }) => {
284
+ }, Ce = (e, t) => t ? !!(e.headers.has(t) || e.query?.[t] || e.headers.get("Cookie")?.includes(`${t}=`)) : !1, we = async ({ security: e, ...t }) => {
287
285
  for (let n of e) {
288
- if (we(t, n.name)) continue;
289
- let e = await xe(n, t.auth);
286
+ if (Ce(t, n.name)) continue;
287
+ let e = await be(n, t.auth);
290
288
  if (!e) continue;
291
289
  let r = n.name ?? "Authorization";
292
290
  switch (n.in) {
@@ -301,34 +299,34 @@ var xe = async (e, t) => {
301
299
  break;
302
300
  }
303
301
  }
304
- }, Ee = (e) => ye({
302
+ }, Te = (e) => ve({
305
303
  baseUrl: e.baseUrl,
306
304
  path: e.path,
307
305
  query: e.query,
308
- querySerializer: typeof e.querySerializer == "function" ? e.querySerializer : Se(e.querySerializer),
306
+ querySerializer: typeof e.querySerializer == "function" ? e.querySerializer : xe(e.querySerializer),
309
307
  url: e.url
310
- }), De = (e, t) => {
308
+ }), Ee = (e, t) => {
311
309
  let n = {
312
310
  ...e,
313
311
  ...t
314
312
  };
315
- return n.baseUrl?.endsWith("/") && (n.baseUrl = n.baseUrl.substring(0, n.baseUrl.length - 1)), n.headers = ke(e.headers, t.headers), n;
316
- }, Oe = (e) => {
313
+ return n.baseUrl?.endsWith("/") && (n.baseUrl = n.baseUrl.substring(0, n.baseUrl.length - 1)), n.headers = Oe(e.headers, t.headers), n;
314
+ }, De = (e) => {
317
315
  let t = [];
318
316
  return e.forEach((e, n) => {
319
317
  t.push([n, e]);
320
318
  }), t;
321
- }, ke = (...e) => {
319
+ }, Oe = (...e) => {
322
320
  let t = new Headers();
323
321
  for (let n of e) {
324
322
  if (!n) continue;
325
- let e = n instanceof Headers ? Oe(n) : Object.entries(n);
323
+ let e = n instanceof Headers ? De(n) : Object.entries(n);
326
324
  for (let [n, r] of e) if (r === null) t.delete(n);
327
325
  else if (Array.isArray(r)) for (let e of r) t.append(n, e);
328
326
  else r !== void 0 && t.set(n, typeof r == "object" ? JSON.stringify(r) : r);
329
327
  }
330
328
  return t;
331
- }, Ae = class {
329
+ }, ke = class {
332
330
  fns = [];
333
331
  clear() {
334
332
  this.fns = [];
@@ -351,11 +349,11 @@ var xe = async (e, t) => {
351
349
  use(e) {
352
350
  return this.fns.push(e), this.fns.length - 1;
353
351
  }
354
- }, je = () => ({
355
- error: new Ae(),
356
- request: new Ae(),
357
- response: new Ae()
358
- }), Me = Se({
352
+ }, Ae = () => ({
353
+ error: new ke(),
354
+ request: new ke(),
355
+ response: new ke()
356
+ }), je = xe({
359
357
  allowReserved: !1,
360
358
  array: {
361
359
  explode: !0,
@@ -365,29 +363,29 @@ var xe = async (e, t) => {
365
363
  explode: !0,
366
364
  style: "deepObject"
367
365
  }
368
- }), Ne = { "Content-Type": "application/json" }, Pe = (e = {}) => ({
369
- ...le,
370
- headers: Ne,
366
+ }), Me = { "Content-Type": "application/json" }, Ne = (e = {}) => ({
367
+ ...ce,
368
+ headers: Me,
371
369
  parseAs: "auto",
372
- querySerializer: Me,
370
+ querySerializer: je,
373
371
  ...e
374
- }), Fe = ((e = {}) => {
375
- let t = De(Pe(), e), n = () => ({ ...t }), r = (e) => (t = De(t, e), n()), i = je(), a = async (e) => {
372
+ }), Pe = ((e = {}) => {
373
+ let t = Ee(Ne(), e), n = () => ({ ...t }), r = (e) => (t = Ee(t, e), n()), i = Ae(), a = async (e) => {
376
374
  let n = {
377
375
  ...t,
378
376
  ...e,
379
377
  fetch: e.fetch ?? t.fetch ?? globalThis.fetch,
380
- headers: ke(t.headers, e.headers),
378
+ headers: Oe(t.headers, e.headers),
381
379
  serializedBody: void 0
382
380
  };
383
- n.security && await Te({
381
+ n.security && await we({
384
382
  ...n,
385
383
  security: n.security
386
384
  }), n.requestValidator && await n.requestValidator(n), n.body !== void 0 && n.bodySerializer && (n.serializedBody = n.bodySerializer(n.body)), (n.body === void 0 || n.serializedBody === "") && n.headers.delete("Content-Type");
387
385
  let r = n;
388
386
  return {
389
387
  opts: r,
390
- url: Ee(r)
388
+ url: Te(r)
391
389
  };
392
390
  }, o = async (e) => {
393
391
  let n = e.throwOnError ?? t.throwOnError, r = e.responseStyle ?? t.responseStyle, o, s;
@@ -395,7 +393,7 @@ var xe = async (e, t) => {
395
393
  let { opts: t, url: n } = await a(e), r = {
396
394
  redirect: "follow",
397
395
  ...t,
398
- body: be(t)
396
+ body: ye(t)
399
397
  };
400
398
  o = new Request(n, r);
401
399
  for (let e of i.request.fns) e && (o = await e(o, t));
@@ -407,7 +405,7 @@ var xe = async (e, t) => {
407
405
  response: s
408
406
  };
409
407
  if (s.ok) {
410
- let e = (t.parseAs === "auto" ? Ce(s.headers.get("Content-Type")) : t.parseAs) ?? "json";
408
+ let e = (t.parseAs === "auto" ? Se(s.headers.get("Content-Type")) : t.parseAs) ?? "json";
411
409
  if (s.status === 204 || s.headers.get("Content-Length") === "0") {
412
410
  let n;
413
411
  switch (e) {
@@ -474,7 +472,7 @@ var xe = async (e, t) => {
474
472
  method: e
475
473
  }), c = (e) => async (t) => {
476
474
  let { opts: n, url: r } = await a(t);
477
- return ue({
475
+ return le({
478
476
  ...n,
479
477
  body: n.body,
480
478
  method: e,
@@ -483,12 +481,12 @@ var xe = async (e, t) => {
483
481
  for (let e of i.request.fns) e && (r = await e(r, n));
484
482
  return r;
485
483
  },
486
- serializedBody: be(n),
484
+ serializedBody: ye(n),
487
485
  url: r
488
486
  });
489
487
  };
490
488
  return {
491
- buildUrl: (e) => Ee({
489
+ buildUrl: (e) => Te({
492
490
  ...t,
493
491
  ...e
494
492
  }),
@@ -517,18 +515,18 @@ var xe = async (e, t) => {
517
515
  },
518
516
  trace: s("TRACE")
519
517
  };
520
- })(Pe({ baseUrl: "http://localhost:9000/api/widget" }));
518
+ })(Ne({ baseUrl: "http://localhost:9000/api/widget" }));
521
519
  //#endregion
522
520
  //#region src/shared/api/setup.ts
523
- function Ie(e, t) {
524
- Fe.setConfig({
521
+ function Fe(e, t) {
522
+ Pe.setConfig({
525
523
  baseUrl: e,
526
524
  headers: t ? { Authorization: `Bearer ${t}` } : void 0
527
525
  });
528
526
  }
529
527
  //#endregion
530
528
  //#region ../../node_modules/.pnpm/@tanstack+query-core@5.101.0/node_modules/@tanstack/query-core/build/modern/subscribable.js
531
- var Le = class {
529
+ var Ie = class {
532
530
  constructor() {
533
531
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
534
532
  }
@@ -542,7 +540,7 @@ var Le = class {
542
540
  }
543
541
  onSubscribe() {}
544
542
  onUnsubscribe() {}
545
- }, Re = new class extends Le {
543
+ }, Le = new class extends Ie {
546
544
  #e;
547
545
  #t;
548
546
  #n;
@@ -579,13 +577,13 @@ var Le = class {
579
577
  isFocused() {
580
578
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
581
579
  }
582
- }(), ze = {
580
+ }(), Re = {
583
581
  setTimeout: (e, t) => setTimeout(e, t),
584
582
  clearTimeout: (e) => clearTimeout(e),
585
583
  setInterval: (e, t) => setInterval(e, t),
586
584
  clearInterval: (e) => clearInterval(e)
587
- }, Be = new class {
588
- #e = ze;
585
+ }, ze = new class {
586
+ #e = Re;
589
587
  #t = !1;
590
588
  setTimeoutProvider(e) {
591
589
  process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.", {
@@ -606,26 +604,26 @@ var Le = class {
606
604
  this.#e.clearInterval(e);
607
605
  }
608
606
  }();
609
- function Ve(e) {
607
+ function Be(e) {
610
608
  setTimeout(e, 0);
611
609
  }
612
610
  //#endregion
613
611
  //#region ../../node_modules/.pnpm/@tanstack+query-core@5.101.0/node_modules/@tanstack/query-core/build/modern/utils.js
614
- var He = typeof window > "u" || "Deno" in globalThis;
615
- function k() {}
616
- function Ue(e, t) {
612
+ var Ve = typeof window > "u" || "Deno" in globalThis;
613
+ function A() {}
614
+ function He(e, t) {
617
615
  return typeof e == "function" ? e(t) : e;
618
616
  }
619
- function We(e) {
617
+ function Ue(e) {
620
618
  return typeof e == "number" && e >= 0 && e !== Infinity;
621
619
  }
622
- function Ge(e, t) {
620
+ function We(e, t) {
623
621
  return Math.max(e + (t || 0) - Date.now(), 0);
624
622
  }
625
- function Ke(e, t) {
623
+ function Ge(e, t) {
626
624
  return typeof e == "function" ? e(t) : e;
627
625
  }
628
- function A(e, t) {
626
+ function Ke(e, t) {
629
627
  return typeof e == "function" ? e(t) : e;
630
628
  }
631
629
  function qe(e, t) {
@@ -702,7 +700,7 @@ function rt(e) {
702
700
  }
703
701
  function it(e) {
704
702
  return new Promise((t) => {
705
- Be.setTimeout(t, e);
703
+ ze.setTimeout(t, e);
706
704
  });
707
705
  }
708
706
  function at(e, t, n) {
@@ -742,7 +740,7 @@ function dt(e, t, n) {
742
740
  //#endregion
743
741
  //#region ../../node_modules/.pnpm/@tanstack+query-core@5.101.0/node_modules/@tanstack/query-core/build/modern/environmentManager.js
744
742
  var ft = /* @__PURE__ */ (() => {
745
- let e = () => He;
743
+ let e = () => Ve;
746
744
  return {
747
745
  isServer() {
748
746
  return e();
@@ -776,7 +774,7 @@ function pt() {
776
774
  }
777
775
  //#endregion
778
776
  //#region ../../node_modules/.pnpm/@tanstack+query-core@5.101.0/node_modules/@tanstack/query-core/build/modern/notifyManager.js
779
- var mt = Ve;
777
+ var mt = Be;
780
778
  function ht() {
781
779
  let e = [], t = 0, n = (e) => {
782
780
  e();
@@ -824,7 +822,7 @@ function ht() {
824
822
  }
825
823
  };
826
824
  }
827
- var j = ht(), gt = new class extends Le {
825
+ var j = ht(), gt = new class extends Ie {
828
826
  #e = !0;
829
827
  #t;
830
828
  #n;
@@ -879,7 +877,7 @@ function bt(e) {
879
877
  t = !0;
880
878
  }, c = () => {
881
879
  t = !1;
882
- }, l = () => Re.isFocused() && (e.networkMode === "always" || gt.isOnline()) && e.canRun(), u = () => vt(e.networkMode) && e.canRun(), d = (e) => {
880
+ }, l = () => Le.isFocused() && (e.networkMode === "always" || gt.isOnline()) && e.canRun(), u = () => vt(e.networkMode) && e.canRun(), d = (e) => {
883
881
  a() || (r?.(), i.resolve(e));
884
882
  }, f = (e) => {
885
883
  a() || (r?.(), i.reject(e));
@@ -928,7 +926,7 @@ var xt = class {
928
926
  this.clearGcTimeout();
929
927
  }
930
928
  scheduleGc() {
931
- this.clearGcTimeout(), We(this.gcTime) && (this.#e = Be.setTimeout(() => {
929
+ this.clearGcTimeout(), Ue(this.gcTime) && (this.#e = ze.setTimeout(() => {
932
930
  this.optionalRemove();
933
931
  }, this.gcTime));
934
932
  }
@@ -936,7 +934,7 @@ var xt = class {
936
934
  this.gcTime = Math.max(this.gcTime || 0, e ?? (ft.isServer() ? Infinity : 300 * 1e3));
937
935
  }
938
936
  clearGcTimeout() {
939
- this.#e !== void 0 && (Be.clearTimeout(this.#e), this.#e = void 0);
937
+ this.#e !== void 0 && (ze.clearTimeout(this.#e), this.#e = void 0);
940
938
  }
941
939
  };
942
940
  //#endregion
@@ -1050,7 +1048,7 @@ var Tt = class extends xt {
1050
1048
  }
1051
1049
  cancel(e) {
1052
1050
  let t = this.#a?.promise;
1053
- return this.#a?.cancel(e), t ? t.then(k).catch(k) : Promise.resolve();
1051
+ return this.#a?.cancel(e), t ? t.then(A).catch(A) : Promise.resolve();
1054
1052
  }
1055
1053
  destroy() {
1056
1054
  super.destroy(), this.cancel({ silent: !0 });
@@ -1062,7 +1060,7 @@ var Tt = class extends xt {
1062
1060
  this.destroy(), this.setState(this.resetState);
1063
1061
  }
1064
1062
  isActive() {
1065
- return this.observers.some((e) => A(e.options.enabled, this) !== !1);
1063
+ return this.observers.some((e) => Ke(e.options.enabled, this) !== !1);
1066
1064
  }
1067
1065
  isDisabled() {
1068
1066
  return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === ct || !this.isFetched();
@@ -1071,13 +1069,13 @@ var Tt = class extends xt {
1071
1069
  return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;
1072
1070
  }
1073
1071
  isStatic() {
1074
- return this.getObserversCount() > 0 ? this.observers.some((e) => Ke(e.options.staleTime, this) === "static") : !1;
1072
+ return this.getObserversCount() > 0 ? this.observers.some((e) => Ge(e.options.staleTime, this) === "static") : !1;
1075
1073
  }
1076
1074
  isStale() {
1077
1075
  return this.getObserversCount() > 0 ? this.observers.some((e) => e.getCurrentResult().isStale) : this.state.data === void 0 || this.state.isInvalidated;
1078
1076
  }
1079
1077
  isStaleByTime(e = 0) {
1080
- return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !Ge(this.state.dataUpdatedAt, e);
1078
+ return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !We(this.state.dataUpdatedAt, e);
1081
1079
  }
1082
1080
  onFocus() {
1083
1081
  this.observers.find((e) => e.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#a?.continue();
@@ -1300,7 +1298,7 @@ function Ot(e) {
1300
1298
  }
1301
1299
  //#endregion
1302
1300
  //#region ../../node_modules/.pnpm/@tanstack+query-core@5.101.0/node_modules/@tanstack/query-core/build/modern/queryObserver.js
1303
- var kt = class extends Le {
1301
+ var kt = class extends Ie {
1304
1302
  constructor(e, t) {
1305
1303
  super(), this.options = t, this.#e = e, this.#s = null, this.#o = pt(), this.bindMethods(), this.setOptions(t);
1306
1304
  }
@@ -1339,16 +1337,16 @@ var kt = class extends Le {
1339
1337
  }
1340
1338
  setOptions(e) {
1341
1339
  let t = this.options, n = this.#t;
1342
- if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof A(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
1340
+ if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Ke(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
1343
1341
  this.#S(), this.#t.setOptions(this.options), t._defaulted && !et(this.options, t) && this.#e.getQueryCache().notify({
1344
1342
  type: "observerOptionsUpdated",
1345
1343
  query: this.#t,
1346
1344
  observer: this
1347
1345
  });
1348
1346
  let r = this.hasListeners();
1349
- r && Nt(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || A(this.options.enabled, this.#t) !== A(t.enabled, this.#t) || Ke(this.options.staleTime, this.#t) !== Ke(t.staleTime, this.#t)) && this.#g();
1347
+ r && Nt(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || Ke(this.options.enabled, this.#t) !== Ke(t.enabled, this.#t) || Ge(this.options.staleTime, this.#t) !== Ge(t.staleTime, this.#t)) && this.#g();
1350
1348
  let i = this.#_();
1351
- r && (this.#t !== n || A(this.options.enabled, this.#t) !== A(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
1349
+ r && (this.#t !== n || Ke(this.options.enabled, this.#t) !== Ke(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
1352
1350
  }
1353
1351
  getOptimisticResult(e) {
1354
1352
  let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
@@ -1382,14 +1380,14 @@ var kt = class extends Le {
1382
1380
  #h(e) {
1383
1381
  this.#S();
1384
1382
  let t = this.#t.fetch(this.options, e);
1385
- return e?.throwOnError || (t = t.catch(k)), t;
1383
+ return e?.throwOnError || (t = t.catch(A)), t;
1386
1384
  }
1387
1385
  #g() {
1388
1386
  this.#b();
1389
- let e = Ke(this.options.staleTime, this.#t);
1390
- if (ft.isServer() || this.#r.isStale || !We(e)) return;
1391
- let t = Ge(this.#r.dataUpdatedAt, e) + 1;
1392
- this.#d = Be.setTimeout(() => {
1387
+ let e = Ge(this.options.staleTime, this.#t);
1388
+ if (ft.isServer() || this.#r.isStale || !Ue(e)) return;
1389
+ let t = We(this.#r.dataUpdatedAt, e) + 1;
1390
+ this.#d = ze.setTimeout(() => {
1393
1391
  this.#r.isStale || this.updateResult();
1394
1392
  }, t);
1395
1393
  }
@@ -1397,18 +1395,18 @@ var kt = class extends Le {
1397
1395
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
1398
1396
  }
1399
1397
  #v(e) {
1400
- this.#x(), this.#p = e, !(ft.isServer() || A(this.options.enabled, this.#t) === !1 || !We(this.#p) || this.#p === 0) && (this.#f = Be.setInterval(() => {
1401
- (this.options.refetchIntervalInBackground || Re.isFocused()) && this.#h();
1398
+ this.#x(), this.#p = e, !(ft.isServer() || Ke(this.options.enabled, this.#t) === !1 || !Ue(this.#p) || this.#p === 0) && (this.#f = ze.setInterval(() => {
1399
+ (this.options.refetchIntervalInBackground || Le.isFocused()) && this.#h();
1402
1400
  }, this.#p));
1403
1401
  }
1404
1402
  #y() {
1405
1403
  this.#g(), this.#v(this.#_());
1406
1404
  }
1407
1405
  #b() {
1408
- this.#d !== void 0 && (Be.clearTimeout(this.#d), this.#d = void 0);
1406
+ this.#d !== void 0 && (ze.clearTimeout(this.#d), this.#d = void 0);
1409
1407
  }
1410
1408
  #x() {
1411
- this.#f !== void 0 && (Be.clearInterval(this.#f), this.#f = void 0);
1409
+ this.#f !== void 0 && (ze.clearInterval(this.#f), this.#f = void 0);
1412
1410
  }
1413
1411
  createResult(e, t) {
1414
1412
  let n = this.#t, r = this.options, i = this.#r, a = this.#i, o = this.#a, s = e === n ? this.#n : e.state, { state: c } = e, l = { ...c }, u = !1, d;
@@ -1459,7 +1457,7 @@ var kt = class extends Le {
1459
1457
  isStale: Pt(e, t),
1460
1458
  refetch: this.refetch,
1461
1459
  promise: this.#o,
1462
- isEnabled: A(t.enabled, e) !== !1
1460
+ isEnabled: Ke(t.enabled, e) !== !1
1463
1461
  };
1464
1462
  if (this.options.experimental_prefetchInRender) {
1465
1463
  let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
@@ -1515,23 +1513,23 @@ var kt = class extends Le {
1515
1513
  }
1516
1514
  };
1517
1515
  function At(e, t) {
1518
- return A(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && A(t.retryOnMount, e) === !1);
1516
+ return Ke(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && Ke(t.retryOnMount, e) === !1);
1519
1517
  }
1520
1518
  function jt(e, t) {
1521
1519
  return At(e, t) || e.state.data !== void 0 && Mt(e, t, t.refetchOnMount);
1522
1520
  }
1523
1521
  function Mt(e, t, n) {
1524
- if (A(t.enabled, e) !== !1 && Ke(t.staleTime, e) !== "static") {
1522
+ if (Ke(t.enabled, e) !== !1 && Ge(t.staleTime, e) !== "static") {
1525
1523
  let r = typeof n == "function" ? n(e) : n;
1526
1524
  return r === "always" || r !== !1 && Pt(e, t);
1527
1525
  }
1528
1526
  return !1;
1529
1527
  }
1530
1528
  function Nt(e, t, n, r) {
1531
- return (e !== t || A(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && Pt(e, n);
1529
+ return (e !== t || Ke(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && Pt(e, n);
1532
1530
  }
1533
1531
  function Pt(e, t) {
1534
- return A(t.enabled, e) !== !1 && e.isStaleByTime(Ke(t.staleTime, e));
1532
+ return Ke(t.enabled, e) !== !1 && e.isStaleByTime(Ge(t.staleTime, e));
1535
1533
  }
1536
1534
  function Ft(e, t) {
1537
1535
  return !et(e.getCurrentResult(), t);
@@ -1723,7 +1721,7 @@ function Lt() {
1723
1721
  }
1724
1722
  //#endregion
1725
1723
  //#region ../../node_modules/.pnpm/@tanstack+query-core@5.101.0/node_modules/@tanstack/query-core/build/modern/mutationCache.js
1726
- var Rt = class extends Le {
1724
+ var Rt = class extends Ie {
1727
1725
  constructor(e = {}) {
1728
1726
  super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#n = 0;
1729
1727
  }
@@ -1811,7 +1809,7 @@ var Rt = class extends Le {
1811
1809
  }
1812
1810
  resumePausedMutations() {
1813
1811
  let e = this.getAll().filter((e) => e.state.isPaused);
1814
- return j.batch(() => Promise.all(e.map((e) => e.continue().catch(k))));
1812
+ return j.batch(() => Promise.all(e.map((e) => e.continue().catch(A))));
1815
1813
  }
1816
1814
  };
1817
1815
  function zt(e) {
@@ -1819,7 +1817,7 @@ function zt(e) {
1819
1817
  }
1820
1818
  //#endregion
1821
1819
  //#region ../../node_modules/.pnpm/@tanstack+query-core@5.101.0/node_modules/@tanstack/query-core/build/modern/queryCache.js
1822
- var Bt = class extends Le {
1820
+ var Bt = class extends Ie {
1823
1821
  constructor(e = {}) {
1824
1822
  super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
1825
1823
  }
@@ -1906,7 +1904,7 @@ var Bt = class extends Le {
1906
1904
  this.#e = e.queryCache || new Bt(), this.#t = e.mutationCache || new Rt(), this.#n = e.defaultOptions || {}, this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map(), this.#a = 0;
1907
1905
  }
1908
1906
  mount() {
1909
- this.#a++, this.#a === 1 && (this.#o = Re.subscribe(async (e) => {
1907
+ this.#a++, this.#a === 1 && (this.#o = Le.subscribe(async (e) => {
1910
1908
  e && (await this.resumePausedMutations(), this.#e.onFocus());
1911
1909
  }), this.#s = gt.subscribe(async (e) => {
1912
1910
  e && (await this.resumePausedMutations(), this.#e.onOnline());
@@ -1933,13 +1931,13 @@ var Bt = class extends Le {
1933
1931
  }
1934
1932
  ensureQueryData(e) {
1935
1933
  let t = this.defaultQueryOptions(e), n = this.#e.build(this, t), r = n.state.data;
1936
- return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && n.isStaleByTime(Ke(t.staleTime, n)) && this.prefetchQuery(t), Promise.resolve(r));
1934
+ return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && n.isStaleByTime(Ge(t.staleTime, n)) && this.prefetchQuery(t), Promise.resolve(r));
1937
1935
  }
1938
1936
  getQueriesData(e) {
1939
1937
  return this.#e.findAll(e).map(({ queryKey: e, state: t }) => [e, t.data]);
1940
1938
  }
1941
1939
  setQueryData(e, t, n) {
1942
- let r = this.defaultQueryOptions({ queryKey: e }), i = this.#e.get(r.queryHash)?.state.data, a = Ue(t, i);
1940
+ let r = this.defaultQueryOptions({ queryKey: e }), i = this.#e.get(r.queryHash)?.state.data, a = He(t, i);
1943
1941
  if (a !== void 0) return this.#e.build(this, r).setData(a, {
1944
1942
  ...n,
1945
1943
  manual: !0
@@ -1974,7 +1972,7 @@ var Bt = class extends Le {
1974
1972
  revert: !0,
1975
1973
  ...t
1976
1974
  }, r = j.batch(() => this.#e.findAll(e).map((e) => e.cancel(n)));
1977
- return Promise.all(r).then(k).catch(k);
1975
+ return Promise.all(r).then(A).catch(A);
1978
1976
  }
1979
1977
  invalidateQueries(e, t = {}) {
1980
1978
  return j.batch(() => (this.#e.findAll(e).forEach((e) => {
@@ -1990,24 +1988,24 @@ var Bt = class extends Le {
1990
1988
  cancelRefetch: t.cancelRefetch ?? !0
1991
1989
  }, r = j.batch(() => this.#e.findAll(e).filter((e) => !e.isDisabled() && !e.isStatic()).map((e) => {
1992
1990
  let t = e.fetch(void 0, n);
1993
- return n.throwOnError || (t = t.catch(k)), e.state.fetchStatus === "paused" ? Promise.resolve() : t;
1991
+ return n.throwOnError || (t = t.catch(A)), e.state.fetchStatus === "paused" ? Promise.resolve() : t;
1994
1992
  }));
1995
- return Promise.all(r).then(k);
1993
+ return Promise.all(r).then(A);
1996
1994
  }
1997
1995
  fetchQuery(e) {
1998
1996
  let t = this.defaultQueryOptions(e);
1999
1997
  t.retry === void 0 && (t.retry = !1);
2000
1998
  let n = this.#e.build(this, t);
2001
- return n.isStaleByTime(Ke(t.staleTime, n)) ? n.fetch(t) : Promise.resolve(n.state.data);
1999
+ return n.isStaleByTime(Ge(t.staleTime, n)) ? n.fetch(t) : Promise.resolve(n.state.data);
2002
2000
  }
2003
2001
  prefetchQuery(e) {
2004
- return this.fetchQuery(e).then(k).catch(k);
2002
+ return this.fetchQuery(e).then(A).catch(A);
2005
2003
  }
2006
2004
  fetchInfiniteQuery(e) {
2007
2005
  return e._type = "infinite", this.fetchQuery(e);
2008
2006
  }
2009
2007
  prefetchInfiniteQuery(e) {
2010
- return this.fetchInfiniteQuery(e).then(k).catch(k);
2008
+ return this.fetchInfiniteQuery(e).then(A).catch(A);
2011
2009
  }
2012
2010
  ensureInfiniteQueryData(e) {
2013
2011
  return e._type = "infinite", this.ensureQueryData(e);
@@ -2125,7 +2123,7 @@ function rn(t, n, r) {
2125
2123
  s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, $t(s), Xt(s, a, c), Zt(a);
2126
2124
  let u = !o.getQueryCache().get(s.queryHash), [d] = e.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
2127
2125
  if (e.useSyncExternalStore(e.useCallback((e) => {
2128
- let t = p ? d.subscribe(j.batchCalls(e)) : k;
2126
+ let t = p ? d.subscribe(j.batchCalls(e)) : A;
2129
2127
  return d.updateResult(), t;
2130
2128
  }, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), e.useEffect(() => {
2131
2129
  d.setOptions(s);
@@ -2137,7 +2135,7 @@ function rn(t, n, r) {
2137
2135
  query: c,
2138
2136
  suspense: s.suspense
2139
2137
  })) throw f.error;
2140
- return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !ft.isServer() && en(f, i) && (u ? nn(s, d, a) : c?.promise)?.catch(k).finally(() => {
2138
+ return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !ft.isServer() && en(f, i) && (u ? nn(s, d, a) : c?.promise)?.catch(A).finally(() => {
2141
2139
  d.updateResult();
2142
2140
  }), s.notifyOnChangeProps ? f : d.trackResult(f);
2143
2141
  }
@@ -2148,22 +2146,22 @@ function an(e, t) {
2148
2146
  }
2149
2147
  //#endregion
2150
2148
  //#region src/shared/api/v1/sdk.gen.ts
2151
- var on = (e) => (e?.client ?? Fe).get({
2149
+ var on = (e) => (e?.client ?? Pe).get({
2152
2150
  security: [{
2153
2151
  scheme: "bearer",
2154
2152
  type: "http"
2155
2153
  }],
2156
2154
  url: "/threads",
2157
2155
  ...e
2158
- }), sn = (e) => (e.client ?? Fe).get({
2156
+ }), sn = (e) => (e.client ?? Pe).get({
2159
2157
  security: [{
2160
2158
  scheme: "bearer",
2161
2159
  type: "http"
2162
2160
  }],
2163
2161
  url: "/threads/{threadUid}",
2164
2162
  ...e
2165
- }), cn = (e) => (e.client ?? Fe).post({
2166
- ...ce,
2163
+ }), cn = (e) => (e.client ?? Pe).post({
2164
+ ...se,
2167
2165
  security: [{
2168
2166
  scheme: "bearer",
2169
2167
  type: "http"
@@ -2174,21 +2172,21 @@ var on = (e) => (e?.client ?? Fe).get({
2174
2172
  "Content-Type": null,
2175
2173
  ...e.headers
2176
2174
  }
2177
- }), ln = (e) => (e.client ?? Fe).get({
2175
+ }), ln = (e) => (e.client ?? Pe).get({
2178
2176
  security: [{
2179
2177
  scheme: "bearer",
2180
2178
  type: "http"
2181
2179
  }],
2182
2180
  url: "/attachments/{filename}",
2183
2181
  ...e
2184
- }), un = (e) => (e?.client ?? Fe).get({
2182
+ }), un = (e) => (e?.client ?? Pe).get({
2185
2183
  security: [{
2186
2184
  scheme: "bearer",
2187
2185
  type: "http"
2188
2186
  }],
2189
2187
  url: "/threads/unique-thread-id",
2190
2188
  ...e
2191
- }), dn = (e) => (e.client ?? Fe).post({
2189
+ }), dn = (e) => (e.client ?? Pe).post({
2192
2190
  security: [{
2193
2191
  scheme: "bearer",
2194
2192
  type: "http"
@@ -2199,14 +2197,14 @@ var on = (e) => (e?.client ?? Fe).get({
2199
2197
  "Content-Type": "application/json",
2200
2198
  ...e.headers
2201
2199
  }
2202
- }), fn = (e) => (e.client ?? Fe).delete({
2200
+ }), fn = (e) => (e.client ?? Pe).delete({
2203
2201
  security: [{
2204
2202
  scheme: "bearer",
2205
2203
  type: "http"
2206
2204
  }],
2207
2205
  url: "/chat/sandbox/{threadId}",
2208
2206
  ...e
2209
- }), pn = (e) => (e.client ?? Fe).get({
2207
+ }), pn = (e) => (e.client ?? Pe).get({
2210
2208
  security: [{
2211
2209
  scheme: "bearer",
2212
2210
  type: "http"
@@ -7261,7 +7259,7 @@ function Ll(e) {
7261
7259
  }
7262
7260
  //#endregion
7263
7261
  //#region ../../node_modules/.pnpm/inline-style-parser@0.2.7/node_modules/inline-style-parser/cjs/index.js
7264
- var Rl = /* @__PURE__ */ ne(((e, t) => {
7262
+ var Rl = /* @__PURE__ */ k(((e, t) => {
7265
7263
  var n = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, r = /\n/g, i = /^\s*/, a = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, c = /^[;\s]*/, l = /^\s+|\s+$/g, u = "\n", d = "/", f = "*", p = "", m = "comment", h = "declaration";
7266
7264
  function g(e, t) {
7267
7265
  if (typeof e != "string") throw TypeError("First argument must be a string");
@@ -7345,7 +7343,7 @@ var Rl = /* @__PURE__ */ ne(((e, t) => {
7345
7343
  return e ? e.replace(l, p) : p;
7346
7344
  }
7347
7345
  t.exports = g;
7348
- })), zl = /* @__PURE__ */ ne(((e) => {
7346
+ })), zl = /* @__PURE__ */ k(((e) => {
7349
7347
  var t = e && e.__importDefault || function(e) {
7350
7348
  return e && e.__esModule ? e : { default: e };
7351
7349
  };
@@ -7361,7 +7359,7 @@ var Rl = /* @__PURE__ */ ne(((e, t) => {
7361
7359
  a ? t(n, i, e) : i && (r ||= {}, r[n] = i);
7362
7360
  }), r;
7363
7361
  }
7364
- })), Bl = /* @__PURE__ */ ne(((e) => {
7362
+ })), Bl = /* @__PURE__ */ k(((e) => {
7365
7363
  Object.defineProperty(e, "__esModule", { value: !0 }), e.camelCase = void 0;
7366
7364
  var t = /^--[a-zA-Z0-9_-]+$/, n = /-([a-z])/g, r = /^[^-]+$/, i = /^-(webkit|moz|ms|o|khtml)-/, a = /^-(ms)-/, o = function(e) {
7367
7365
  return !e || r.test(e) || t.test(e);
@@ -7373,7 +7371,7 @@ var Rl = /* @__PURE__ */ ne(((e, t) => {
7373
7371
  e.camelCase = function(e, t) {
7374
7372
  return t === void 0 && (t = {}), o(e) ? e : (e = e.toLowerCase(), e = t.reactCompat ? e.replace(a, c) : e.replace(i, c), e.replace(n, s));
7375
7373
  };
7376
- })), Vl = /* @__PURE__ */ ne(((e, t) => {
7374
+ })), Vl = /* @__PURE__ */ k(((e, t) => {
7377
7375
  var n = (e && e.__importDefault || function(e) {
7378
7376
  return e && e.__esModule ? e : { default: e };
7379
7377
  })(zl()), r = Bl();
@@ -8760,13 +8758,13 @@ function of(e, t, n) {
8760
8758
  return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(t), d;
8761
8759
  }
8762
8760
  function d(s) {
8763
- return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t : se) : q(s) ? (e.consume(s), o = String.fromCharCode(s), g) : n(s);
8761
+ return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t : oe) : q(s) ? (e.consume(s), o = String.fromCharCode(s), g) : n(s);
8764
8762
  }
8765
8763
  function f(a) {
8766
- return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) : q(a) ? (e.consume(a), i = 4, r.interrupt ? t : se) : n(a);
8764
+ return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) : q(a) ? (e.consume(a), i = 4, r.interrupt ? t : oe) : n(a);
8767
8765
  }
8768
8766
  function p(i) {
8769
- return i === 45 ? (e.consume(i), r.interrupt ? t : se) : n(i);
8767
+ return i === 45 ? (e.consume(i), r.interrupt ? t : oe) : n(i);
8770
8768
  }
8771
8769
  function m(i) {
8772
8770
  return i === "CDATA[".charCodeAt(s++) ? (e.consume(i), s === 6 ? r.interrupt ? t : O : m) : n(i);
@@ -8815,10 +8813,10 @@ function of(e, t, n) {
8815
8813
  return t === null || Y(t) ? O(t) : Z(t) ? (e.consume(t), D) : n(t);
8816
8814
  }
8817
8815
  function O(t) {
8818
- return t === 45 && i === 2 ? (e.consume(t), re) : t === 60 && i === 1 ? (e.consume(t), ie) : t === 62 && i === 4 ? (e.consume(t), ce) : t === 63 && i === 3 ? (e.consume(t), se) : t === 93 && i === 5 ? (e.consume(t), oe) : Y(t) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(nf, le, ee)(t)) : t === null || Y(t) ? (e.exit("htmlFlowData"), ee(t)) : (e.consume(t), O);
8816
+ return t === 45 && i === 2 ? (e.consume(t), k) : t === 60 && i === 1 ? (e.consume(t), re) : t === 62 && i === 4 ? (e.consume(t), se) : t === 63 && i === 3 ? (e.consume(t), oe) : t === 93 && i === 5 ? (e.consume(t), ae) : Y(t) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(nf, ce, ee)(t)) : t === null || Y(t) ? (e.exit("htmlFlowData"), ee(t)) : (e.consume(t), O);
8819
8817
  }
8820
8818
  function ee(t) {
8821
- return e.check(rf, te, le)(t);
8819
+ return e.check(rf, te, ce)(t);
8822
8820
  }
8823
8821
  function te(t) {
8824
8822
  return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), ne;
@@ -8826,29 +8824,29 @@ function of(e, t, n) {
8826
8824
  function ne(t) {
8827
8825
  return t === null || Y(t) ? ee(t) : (e.enter("htmlFlowData"), O(t));
8828
8826
  }
8827
+ function k(t) {
8828
+ return t === 45 ? (e.consume(t), oe) : O(t);
8829
+ }
8829
8830
  function re(t) {
8830
- return t === 45 ? (e.consume(t), se) : O(t);
8831
+ return t === 47 ? (e.consume(t), o = "", ie) : O(t);
8831
8832
  }
8832
8833
  function ie(t) {
8833
- return t === 47 ? (e.consume(t), o = "", ae) : O(t);
8834
- }
8835
- function ae(t) {
8836
8834
  if (t === 62) {
8837
8835
  let n = o.toLowerCase();
8838
- return ef.includes(n) ? (e.consume(t), ce) : O(t);
8836
+ return ef.includes(n) ? (e.consume(t), se) : O(t);
8839
8837
  }
8840
- return q(t) && o.length < 8 ? (e.consume(t), o += String.fromCharCode(t), ae) : O(t);
8838
+ return q(t) && o.length < 8 ? (e.consume(t), o += String.fromCharCode(t), ie) : O(t);
8839
+ }
8840
+ function ae(t) {
8841
+ return t === 93 ? (e.consume(t), oe) : O(t);
8841
8842
  }
8842
8843
  function oe(t) {
8843
- return t === 93 ? (e.consume(t), se) : O(t);
8844
+ return t === 62 ? (e.consume(t), se) : t === 45 && i === 2 ? (e.consume(t), oe) : O(t);
8844
8845
  }
8845
8846
  function se(t) {
8846
- return t === 62 ? (e.consume(t), ce) : t === 45 && i === 2 ? (e.consume(t), se) : O(t);
8847
- }
8848
- function ce(t) {
8849
- return t === null || Y(t) ? (e.exit("htmlFlowData"), le(t)) : (e.consume(t), ce);
8847
+ return t === null || Y(t) ? (e.exit("htmlFlowData"), ce(t)) : (e.consume(t), se);
8850
8848
  }
8851
- function le(n) {
8849
+ function ce(n) {
8852
8850
  return e.exit("htmlFlow"), t(n);
8853
8851
  }
8854
8852
  }
@@ -8890,34 +8888,34 @@ function uf(e, t, n) {
8890
8888
  return t === 45 ? (e.consume(t), p) : n(t);
8891
8889
  }
8892
8890
  function d(t) {
8893
- return t === null ? n(t) : t === 45 ? (e.consume(t), f) : Y(t) ? (o = d, ie(t)) : (e.consume(t), d);
8891
+ return t === null ? n(t) : t === 45 ? (e.consume(t), f) : Y(t) ? (o = d, re(t)) : (e.consume(t), d);
8894
8892
  }
8895
8893
  function f(t) {
8896
8894
  return t === 45 ? (e.consume(t), p) : d(t);
8897
8895
  }
8898
8896
  function p(e) {
8899
- return e === 62 ? re(e) : e === 45 ? f(e) : d(e);
8897
+ return e === 62 ? k(e) : e === 45 ? f(e) : d(e);
8900
8898
  }
8901
8899
  function m(t) {
8902
8900
  return t === "CDATA[".charCodeAt(a++) ? (e.consume(t), a === 6 ? h : m) : n(t);
8903
8901
  }
8904
8902
  function h(t) {
8905
- return t === null ? n(t) : t === 93 ? (e.consume(t), g) : Y(t) ? (o = h, ie(t)) : (e.consume(t), h);
8903
+ return t === null ? n(t) : t === 93 ? (e.consume(t), g) : Y(t) ? (o = h, re(t)) : (e.consume(t), h);
8906
8904
  }
8907
8905
  function g(t) {
8908
8906
  return t === 93 ? (e.consume(t), _) : h(t);
8909
8907
  }
8910
8908
  function _(t) {
8911
- return t === 62 ? re(t) : t === 93 ? (e.consume(t), _) : h(t);
8909
+ return t === 62 ? k(t) : t === 93 ? (e.consume(t), _) : h(t);
8912
8910
  }
8913
8911
  function v(t) {
8914
- return t === null || t === 62 ? re(t) : Y(t) ? (o = v, ie(t)) : (e.consume(t), v);
8912
+ return t === null || t === 62 ? k(t) : Y(t) ? (o = v, re(t)) : (e.consume(t), v);
8915
8913
  }
8916
8914
  function y(t) {
8917
- return t === null ? n(t) : t === 63 ? (e.consume(t), b) : Y(t) ? (o = y, ie(t)) : (e.consume(t), y);
8915
+ return t === null ? n(t) : t === 63 ? (e.consume(t), b) : Y(t) ? (o = y, re(t)) : (e.consume(t), y);
8918
8916
  }
8919
8917
  function b(e) {
8920
- return e === 62 ? re(e) : y(e);
8918
+ return e === 62 ? k(e) : y(e);
8921
8919
  }
8922
8920
  function x(t) {
8923
8921
  return q(t) ? (e.consume(t), S) : n(t);
@@ -8926,25 +8924,25 @@ function uf(e, t, n) {
8926
8924
  return t === 45 || J(t) ? (e.consume(t), S) : C(t);
8927
8925
  }
8928
8926
  function C(t) {
8929
- return Y(t) ? (o = C, ie(t)) : Z(t) ? (e.consume(t), C) : re(t);
8927
+ return Y(t) ? (o = C, re(t)) : Z(t) ? (e.consume(t), C) : k(t);
8930
8928
  }
8931
8929
  function w(t) {
8932
8930
  return t === 45 || J(t) ? (e.consume(t), w) : t === 47 || t === 62 || X(t) ? T(t) : n(t);
8933
8931
  }
8934
8932
  function T(t) {
8935
- return t === 47 ? (e.consume(t), re) : t === 58 || t === 95 || q(t) ? (e.consume(t), E) : Y(t) ? (o = T, ie(t)) : Z(t) ? (e.consume(t), T) : re(t);
8933
+ return t === 47 ? (e.consume(t), k) : t === 58 || t === 95 || q(t) ? (e.consume(t), E) : Y(t) ? (o = T, re(t)) : Z(t) ? (e.consume(t), T) : k(t);
8936
8934
  }
8937
8935
  function E(t) {
8938
8936
  return t === 45 || t === 46 || t === 58 || t === 95 || J(t) ? (e.consume(t), E) : D(t);
8939
8937
  }
8940
8938
  function D(t) {
8941
- return t === 61 ? (e.consume(t), O) : Y(t) ? (o = D, ie(t)) : Z(t) ? (e.consume(t), D) : T(t);
8939
+ return t === 61 ? (e.consume(t), O) : Y(t) ? (o = D, re(t)) : Z(t) ? (e.consume(t), D) : T(t);
8942
8940
  }
8943
8941
  function O(t) {
8944
- return t === null || t === 60 || t === 61 || t === 62 || t === 96 ? n(t) : t === 34 || t === 39 ? (e.consume(t), i = t, ee) : Y(t) ? (o = O, ie(t)) : Z(t) ? (e.consume(t), O) : (e.consume(t), te);
8942
+ return t === null || t === 60 || t === 61 || t === 62 || t === 96 ? n(t) : t === 34 || t === 39 ? (e.consume(t), i = t, ee) : Y(t) ? (o = O, re(t)) : Z(t) ? (e.consume(t), O) : (e.consume(t), te);
8945
8943
  }
8946
8944
  function ee(t) {
8947
- return t === i ? (e.consume(t), i = void 0, ne) : t === null ? n(t) : Y(t) ? (o = ee, ie(t)) : (e.consume(t), ee);
8945
+ return t === i ? (e.consume(t), i = void 0, ne) : t === null ? n(t) : Y(t) ? (o = ee, re(t)) : (e.consume(t), ee);
8948
8946
  }
8949
8947
  function te(t) {
8950
8948
  return t === null || t === 34 || t === 39 || t === 60 || t === 61 || t === 96 ? n(t) : t === 47 || t === 62 || X(t) ? T(t) : (e.consume(t), te);
@@ -8952,16 +8950,16 @@ function uf(e, t, n) {
8952
8950
  function ne(e) {
8953
8951
  return e === 47 || e === 62 || X(e) ? T(e) : n(e);
8954
8952
  }
8955
- function re(r) {
8953
+ function k(r) {
8956
8954
  return r === 62 ? (e.consume(r), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(r);
8957
8955
  }
8956
+ function re(t) {
8957
+ return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), ie;
8958
+ }
8958
8959
  function ie(t) {
8959
- return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), ae;
8960
+ return Z(t) ? Q(e, ae, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : ae(t);
8960
8961
  }
8961
8962
  function ae(t) {
8962
- return Z(t) ? Q(e, oe, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : oe(t);
8963
- }
8964
- function oe(t) {
8965
8963
  return e.enter("htmlTextData"), o(t);
8966
8964
  }
8967
8965
  }
@@ -9741,60 +9739,60 @@ function hp(e) {
9741
9739
  "strong"
9742
9740
  ],
9743
9741
  enter: {
9744
- autolink: a(Ee),
9742
+ autolink: a(Te),
9745
9743
  autolinkProtocol: T,
9746
9744
  autolinkEmail: T,
9747
- atxHeading: a(Se),
9748
- blockQuote: a(_e),
9745
+ atxHeading: a(xe),
9746
+ blockQuote: a(ge),
9749
9747
  characterEscape: T,
9750
9748
  characterReference: T,
9751
- codeFenced: a(ve),
9749
+ codeFenced: a(_e),
9752
9750
  codeFencedFenceInfo: o,
9753
9751
  codeFencedFenceMeta: o,
9754
- codeIndented: a(ve, o),
9755
- codeText: a(ye, o),
9752
+ codeIndented: a(_e, o),
9753
+ codeText: a(ve, o),
9756
9754
  codeTextData: T,
9757
9755
  data: T,
9758
9756
  codeFlowValue: T,
9759
- definition: a(be),
9757
+ definition: a(ye),
9760
9758
  definitionDestinationString: o,
9761
9759
  definitionLabelString: o,
9762
9760
  definitionTitleString: o,
9763
- emphasis: a(xe),
9764
- hardBreakEscape: a(Ce),
9765
- hardBreakTrailing: a(Ce),
9766
- htmlFlow: a(we, o),
9761
+ emphasis: a(be),
9762
+ hardBreakEscape: a(Se),
9763
+ hardBreakTrailing: a(Se),
9764
+ htmlFlow: a(Ce, o),
9767
9765
  htmlFlowData: T,
9768
- htmlText: a(we, o),
9766
+ htmlText: a(Ce, o),
9769
9767
  htmlTextData: T,
9770
- image: a(Te),
9768
+ image: a(we),
9771
9769
  label: o,
9772
- link: a(Ee),
9773
- listItem: a(Oe),
9770
+ link: a(Te),
9771
+ listItem: a(De),
9774
9772
  listItemValue: f,
9775
- listOrdered: a(De, d),
9776
- listUnordered: a(De),
9777
- paragraph: a(ke),
9778
- reference: ue,
9773
+ listOrdered: a(Ee, d),
9774
+ listUnordered: a(Ee),
9775
+ paragraph: a(Oe),
9776
+ reference: le,
9779
9777
  referenceString: o,
9780
9778
  resourceDestinationString: o,
9781
9779
  resourceTitleString: o,
9782
- setextHeading: a(Se),
9783
- strong: a(Ae),
9784
- thematicBreak: a(Me)
9780
+ setextHeading: a(xe),
9781
+ strong: a(ke),
9782
+ thematicBreak: a(je)
9785
9783
  },
9786
9784
  exit: {
9787
9785
  atxHeading: c(),
9788
9786
  atxHeadingSequence: x,
9789
9787
  autolink: c(),
9790
- autolinkEmail: ge,
9791
- autolinkProtocol: he,
9788
+ autolinkEmail: he,
9789
+ autolinkProtocol: me,
9792
9790
  blockQuote: c(),
9793
9791
  characterEscapeValue: E,
9794
- characterReferenceMarkerHexadecimal: fe,
9795
- characterReferenceMarkerNumeric: fe,
9796
- characterReferenceValue: pe,
9797
- characterReference: me,
9792
+ characterReferenceMarkerHexadecimal: de,
9793
+ characterReferenceMarkerNumeric: de,
9794
+ characterReferenceValue: fe,
9795
+ characterReference: pe,
9798
9796
  codeFenced: c(g),
9799
9797
  codeFencedFence: h,
9800
9798
  codeFencedFenceInfo: p,
@@ -9815,19 +9813,19 @@ function hp(e) {
9815
9813
  htmlFlowData: E,
9816
9814
  htmlText: c(te),
9817
9815
  htmlTextData: E,
9818
- image: c(ie),
9819
- label: oe,
9820
- labelText: ae,
9816
+ image: c(re),
9817
+ label: ae,
9818
+ labelText: ie,
9821
9819
  lineEnding: D,
9822
- link: c(re),
9820
+ link: c(k),
9823
9821
  listItem: c(),
9824
9822
  listOrdered: c(),
9825
9823
  listUnordered: c(),
9826
9824
  paragraph: c(),
9827
- referenceString: de,
9828
- resourceDestinationString: se,
9829
- resourceTitleString: ce,
9830
- resource: le,
9825
+ referenceString: ue,
9826
+ resourceDestinationString: oe,
9827
+ resourceTitleString: se,
9828
+ resource: ce,
9831
9829
  setextHeading: c(w),
9832
9830
  setextHeadingLineSequence: C,
9833
9831
  setextHeadingText: S,
@@ -10020,7 +10018,7 @@ function hp(e) {
10020
10018
  }
10021
10019
  function T(e) {
10022
10020
  let t = this.stack[this.stack.length - 1].children, n = t[t.length - 1];
10023
- (!n || n.type !== "text") && (n = je(), n.position = {
10021
+ (!n || n.type !== "text") && (n = Ae(), n.position = {
10024
10022
  start: gp(e.start),
10025
10023
  end: void 0
10026
10024
  }, t.push(n)), this.stack.push(n);
@@ -10053,7 +10051,7 @@ function hp(e) {
10053
10051
  let e = this.resume(), t = this.stack[this.stack.length - 1];
10054
10052
  t.value = e;
10055
10053
  }
10056
- function re() {
10054
+ function k() {
10057
10055
  let e = this.stack[this.stack.length - 1];
10058
10056
  if (this.data.inReference) {
10059
10057
  let t = this.data.referenceType || "shortcut";
@@ -10061,7 +10059,7 @@ function hp(e) {
10061
10059
  } else delete e.identifier, delete e.label;
10062
10060
  this.data.referenceType = void 0;
10063
10061
  }
10064
- function ie() {
10062
+ function re() {
10065
10063
  let e = this.stack[this.stack.length - 1];
10066
10064
  if (this.data.inReference) {
10067
10065
  let t = this.data.referenceType || "shortcut";
@@ -10069,62 +10067,62 @@ function hp(e) {
10069
10067
  } else delete e.identifier, delete e.label;
10070
10068
  this.data.referenceType = void 0;
10071
10069
  }
10072
- function ae(e) {
10070
+ function ie(e) {
10073
10071
  let t = this.sliceSerialize(e), n = this.stack[this.stack.length - 2];
10074
10072
  n.label = dp(t), n.identifier = zu(t).toLowerCase();
10075
10073
  }
10076
- function oe() {
10074
+ function ae() {
10077
10075
  let e = this.stack[this.stack.length - 1], t = this.resume(), n = this.stack[this.stack.length - 1];
10078
10076
  this.data.inReference = !0, n.type === "link" ? n.children = e.children : n.alt = t;
10079
10077
  }
10080
- function se() {
10078
+ function oe() {
10081
10079
  let e = this.resume(), t = this.stack[this.stack.length - 1];
10082
10080
  t.url = e;
10083
10081
  }
10084
- function ce() {
10082
+ function se() {
10085
10083
  let e = this.resume(), t = this.stack[this.stack.length - 1];
10086
10084
  t.title = e;
10087
10085
  }
10088
- function le() {
10086
+ function ce() {
10089
10087
  this.data.inReference = void 0;
10090
10088
  }
10091
- function ue() {
10089
+ function le() {
10092
10090
  this.data.referenceType = "collapsed";
10093
10091
  }
10094
- function de(e) {
10092
+ function ue(e) {
10095
10093
  let t = this.resume(), n = this.stack[this.stack.length - 1];
10096
10094
  n.label = t, n.identifier = zu(this.sliceSerialize(e)).toLowerCase(), this.data.referenceType = "full";
10097
10095
  }
10098
- function fe(e) {
10096
+ function de(e) {
10099
10097
  this.data.characterReferenceType = e.type;
10100
10098
  }
10101
- function pe(e) {
10099
+ function fe(e) {
10102
10100
  let t = this.sliceSerialize(e), n = this.data.characterReferenceType, r;
10103
10101
  n ? (r = Ru(t, n === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : r = ju(t);
10104
10102
  let i = this.stack[this.stack.length - 1];
10105
10103
  i.value += r;
10106
10104
  }
10107
- function me(e) {
10105
+ function pe(e) {
10108
10106
  let t = this.stack.pop();
10109
10107
  t.position.end = gp(e.end);
10110
10108
  }
10111
- function he(e) {
10109
+ function me(e) {
10112
10110
  E.call(this, e);
10113
10111
  let t = this.stack[this.stack.length - 1];
10114
10112
  t.url = this.sliceSerialize(e);
10115
10113
  }
10116
- function ge(e) {
10114
+ function he(e) {
10117
10115
  E.call(this, e);
10118
10116
  let t = this.stack[this.stack.length - 1];
10119
10117
  t.url = "mailto:" + this.sliceSerialize(e);
10120
10118
  }
10121
- function _e() {
10119
+ function ge() {
10122
10120
  return {
10123
10121
  type: "blockquote",
10124
10122
  children: []
10125
10123
  };
10126
10124
  }
10127
- function ve() {
10125
+ function _e() {
10128
10126
  return {
10129
10127
  type: "code",
10130
10128
  lang: null,
@@ -10132,13 +10130,13 @@ function hp(e) {
10132
10130
  value: ""
10133
10131
  };
10134
10132
  }
10135
- function ye() {
10133
+ function ve() {
10136
10134
  return {
10137
10135
  type: "inlineCode",
10138
10136
  value: ""
10139
10137
  };
10140
10138
  }
10141
- function be() {
10139
+ function ye() {
10142
10140
  return {
10143
10141
  type: "definition",
10144
10142
  identifier: "",
@@ -10147,29 +10145,29 @@ function hp(e) {
10147
10145
  url: ""
10148
10146
  };
10149
10147
  }
10150
- function xe() {
10148
+ function be() {
10151
10149
  return {
10152
10150
  type: "emphasis",
10153
10151
  children: []
10154
10152
  };
10155
10153
  }
10156
- function Se() {
10154
+ function xe() {
10157
10155
  return {
10158
10156
  type: "heading",
10159
10157
  depth: 0,
10160
10158
  children: []
10161
10159
  };
10162
10160
  }
10163
- function Ce() {
10161
+ function Se() {
10164
10162
  return { type: "break" };
10165
10163
  }
10166
- function we() {
10164
+ function Ce() {
10167
10165
  return {
10168
10166
  type: "html",
10169
10167
  value: ""
10170
10168
  };
10171
10169
  }
10172
- function Te() {
10170
+ function we() {
10173
10171
  return {
10174
10172
  type: "image",
10175
10173
  title: null,
@@ -10177,7 +10175,7 @@ function hp(e) {
10177
10175
  alt: null
10178
10176
  };
10179
10177
  }
10180
- function Ee() {
10178
+ function Te() {
10181
10179
  return {
10182
10180
  type: "link",
10183
10181
  title: null,
@@ -10185,7 +10183,7 @@ function hp(e) {
10185
10183
  children: []
10186
10184
  };
10187
10185
  }
10188
- function De(e) {
10186
+ function Ee(e) {
10189
10187
  return {
10190
10188
  type: "list",
10191
10189
  ordered: e.type === "listOrdered",
@@ -10194,7 +10192,7 @@ function hp(e) {
10194
10192
  children: []
10195
10193
  };
10196
10194
  }
10197
- function Oe(e) {
10195
+ function De(e) {
10198
10196
  return {
10199
10197
  type: "listItem",
10200
10198
  spread: e._spread,
@@ -10202,25 +10200,25 @@ function hp(e) {
10202
10200
  children: []
10203
10201
  };
10204
10202
  }
10205
- function ke() {
10203
+ function Oe() {
10206
10204
  return {
10207
10205
  type: "paragraph",
10208
10206
  children: []
10209
10207
  };
10210
10208
  }
10211
- function Ae() {
10209
+ function ke() {
10212
10210
  return {
10213
10211
  type: "strong",
10214
10212
  children: []
10215
10213
  };
10216
10214
  }
10217
- function je() {
10215
+ function Ae() {
10218
10216
  return {
10219
10217
  type: "text",
10220
10218
  value: ""
10221
10219
  };
10222
10220
  }
10223
- function Me() {
10221
+ function je() {
10224
10222
  return { type: "thematicBreak" };
10225
10223
  }
10226
10224
  }
@@ -11226,7 +11224,7 @@ function Im(e) {
11226
11224
  }
11227
11225
  //#endregion
11228
11226
  //#region ../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js
11229
- var Lm = /* @__PURE__ */ ne(((e, t) => {
11227
+ var Lm = /* @__PURE__ */ k(((e, t) => {
11230
11228
  var n = Object.prototype.hasOwnProperty, r = Object.prototype.toString, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = function(e) {
11231
11229
  return typeof Array.isArray == "function" ? Array.isArray(e) : r.call(e) === "[object Array]";
11232
11230
  }, s = function(e) {
@@ -14825,7 +14823,7 @@ var Xy = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
14825
14823
  d: "m6 6 12 12",
14826
14824
  key: "d8bk6v"
14827
14825
  }]]), ub = { downloadGenerated: async (e, t) => {
14828
- let { data: n } = await Fe.get({
14826
+ let { data: n } = await Pe.get({
14829
14827
  url: `/templates/generated/${encodeURIComponent(e)}/download`,
14830
14828
  parseAs: "blob",
14831
14829
  throwOnError: !0
@@ -14958,29 +14956,8 @@ function pb() {
14958
14956
  }
14959
14957
  //#endregion
14960
14958
  //#region src/lib/resource-api.ts
14961
- var mb = (/* @__PURE__ */ ne(((e) => {
14962
- var t = oe("react-dom");
14963
- if (process.env.NODE_ENV === "production") e.createRoot = t.createRoot, e.hydrateRoot = t.hydrateRoot;
14964
- else {
14965
- var n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
14966
- e.createRoot = function(e, r) {
14967
- n.usingClientEntryPoint = !0;
14968
- try {
14969
- return t.createRoot(e, r);
14970
- } finally {
14971
- n.usingClientEntryPoint = !1;
14972
- }
14973
- }, e.hydrateRoot = function(e, r, i) {
14974
- n.usingClientEntryPoint = !0;
14975
- try {
14976
- return t.hydrateRoot(e, r, i);
14977
- } finally {
14978
- n.usingClientEntryPoint = !1;
14979
- }
14980
- };
14981
- }
14982
- })))(), hb = { search: async (e, t = yn) => {
14983
- let { data: n } = await Fe.get({
14959
+ var mb = { search: async (e, t = yn) => {
14960
+ let { data: n } = await Pe.get({
14984
14961
  security: [{
14985
14962
  scheme: "bearer",
14986
14963
  type: "http"
@@ -14993,11 +14970,11 @@ var mb = (/* @__PURE__ */ ne(((e) => {
14993
14970
  throwOnError: !0
14994
14971
  });
14995
14972
  return n.data ?? [];
14996
- } }, gb = {
14973
+ } }, hb = {
14997
14974
  dataset: "dataset",
14998
14975
  document: "document",
14999
14976
  template: "template"
15000
- }, _b = r(({ items: e, command: t, isLoading: n = !1 }, r) => {
14977
+ }, gb = r(({ items: e, command: t, isLoading: n = !1 }, r) => {
15001
14978
  let [i, a] = u(0), c = l(null);
15002
14979
  return o(() => {
15003
14980
  a(0);
@@ -15033,22 +15010,22 @@ var mb = (/* @__PURE__ */ ne(((e) => {
15033
15010
  children: e.label
15034
15011
  }), e.description && /* @__PURE__ */ S("span", {
15035
15012
  className: ["erica-mention-badge", `erica-mention-badge-${e.description}`].join(" "),
15036
- children: gb[e.description] ?? e.description
15013
+ children: hb[e.description] ?? e.description
15037
15014
  })]
15038
15015
  }, e.id))
15039
15016
  })]
15040
15017
  });
15041
15018
  });
15042
- _b.displayName = "MentionSuggestionList";
15019
+ gb.displayName = "MentionSuggestionList";
15043
15020
  //#endregion
15044
15021
  //#region src/components/ChatEditor.tsx
15045
- function vb(e) {
15046
- return e.nodeType === Node.TEXT_NODE ? e.textContent ?? "" : e instanceof HTMLElement ? e.dataset.resourceUid && e.dataset.resourceType ? `:resource[${e.dataset.resourceLabel ?? e.textContent?.replace(/^@/, "") ?? ""}]{uid="${e.dataset.resourceUid}" type="${e.dataset.resourceType}"}` : e.tagName === "BR" ? "\n" : Array.from(e.childNodes).map(vb).join("") : Array.from(e.childNodes).map(vb).join("");
15022
+ function _b(e) {
15023
+ return e.nodeType === Node.TEXT_NODE ? e.textContent ?? "" : e instanceof HTMLElement ? e.dataset.resourceUid && e.dataset.resourceType ? `:resource[${e.dataset.resourceLabel ?? e.textContent?.replace(/^@/, "") ?? ""}]{uid="${e.dataset.resourceUid}" type="${e.dataset.resourceType}"}` : e.tagName === "BR" ? "\n" : Array.from(e.childNodes).map(_b).join("") : Array.from(e.childNodes).map(_b).join("");
15047
15024
  }
15048
- function yb(e) {
15049
- return Array.from(e.childNodes).map(vb).join("");
15025
+ function vb(e) {
15026
+ return Array.from(e.childNodes).map(_b).join("");
15050
15027
  }
15051
- function bb() {
15028
+ function yb() {
15052
15029
  let e = window.getSelection();
15053
15030
  if (!e || e.rangeCount === 0) return null;
15054
15031
  let t = e.getRangeAt(0);
@@ -15061,13 +15038,13 @@ function bb() {
15061
15038
  query: i[1]
15062
15039
  } : null;
15063
15040
  }
15064
- function xb(e, t) {
15041
+ function bb(e, t) {
15065
15042
  let n = document.createRange();
15066
15043
  n.setStart(e, Math.min(t, e.data.length)), n.collapse(!0);
15067
15044
  let r = window.getSelection();
15068
15045
  r?.removeAllRanges(), r?.addRange(n);
15069
15046
  }
15070
- function Sb({ value: e, onChange: t, onSubmit: n, agentIdentifier: r, placeholder: i = "Ketik pertanyaan Anda di sini..." }) {
15047
+ function xb({ value: e, onChange: t, onSubmit: n, agentIdentifier: r, placeholder: i = "Ketik pertanyaan Anda di sini..." }) {
15071
15048
  let a = l(null), s = l(null), c = l(null), d = l(null), f = l(null), p = l(null), m = l(0), h = l(n), g = l(t), _ = l(r), [v, y] = u(!0);
15072
15049
  o(() => {
15073
15050
  h.current = n;
@@ -15084,29 +15061,29 @@ function Sb({ value: e, onChange: t, onSubmit: n, agentIdentifier: r, placeholde
15084
15061
  function x() {
15085
15062
  let e = a.current;
15086
15063
  if (!e) return;
15087
- let t = yb(e);
15064
+ let t = vb(e);
15088
15065
  y(t.trim().length === 0), g.current(t);
15089
15066
  }
15090
15067
  function w(e, t) {
15091
15068
  let n = f.current;
15092
15069
  if (!n) return;
15093
- s.current || (s.current = document.createElement("div"), s.current.className = "erica-mention-popup", s.current.setAttribute("data-mention-suggestion", ""), document.body.appendChild(s.current), c.current = (0, mb.createRoot)(s.current)), c.current.render(/* @__PURE__ */ S(_b, {
15070
+ s.current || (s.current = document.createElement("div"), s.current.className = "erica-mention-popup", s.current.setAttribute("data-mention-suggestion", ""), document.body.appendChild(s.current), c.current = T(s.current)), c.current.render(/* @__PURE__ */ S(gb, {
15094
15071
  ref: d,
15095
15072
  items: e,
15096
15073
  isLoading: t,
15097
- command: D
15074
+ command: O
15098
15075
  }));
15099
15076
  let r = document.createRange();
15100
15077
  r.setStart(n.node, n.start), r.setEnd(n.node, n.end);
15101
15078
  let i = r.getBoundingClientRect();
15102
15079
  s.current.style.left = `${i.left}px`, s.current.style.bottom = `${window.innerHeight - i.top + 6}px`;
15103
15080
  }
15104
- function T(e) {
15081
+ function E(e) {
15105
15082
  let t = ++m.current;
15106
15083
  w([], !0), p.current && clearTimeout(p.current), p.current = setTimeout(async () => {
15107
15084
  p.current = null;
15108
15085
  try {
15109
- let n = await hb.search(e.query, _.current);
15086
+ let n = await mb.search(e.query, _.current);
15110
15087
  if (t !== m.current) return;
15111
15088
  w(n.filter((e) => [
15112
15089
  "dataset",
@@ -15123,15 +15100,15 @@ function Sb({ value: e, onChange: t, onSubmit: n, agentIdentifier: r, placeholde
15123
15100
  }
15124
15101
  }, 300);
15125
15102
  }
15126
- function E() {
15127
- let e = bb();
15103
+ function D() {
15104
+ let e = yb();
15128
15105
  if (f.current = e, !e) {
15129
15106
  b();
15130
15107
  return;
15131
15108
  }
15132
- T(e);
15109
+ E(e);
15133
15110
  }
15134
- function D(e) {
15111
+ function O(e) {
15135
15112
  let t = f.current;
15136
15113
  if (!t) return;
15137
15114
  let [n, r] = e.id.split(":"), i = t.node, a = i.data.slice(0, t.start), o = i.data.slice(t.end), s = i.parentNode;
@@ -15139,7 +15116,7 @@ function Sb({ value: e, onChange: t, onSubmit: n, agentIdentifier: r, placeholde
15139
15116
  let c = document.createElement("span");
15140
15117
  c.className = "erica-resource-tag erica-editor-resource-tag", c.contentEditable = "false", c.dataset.resourceType = n, c.dataset.resourceUid = r, c.dataset.resourceLabel = e.label, c.textContent = `@${e.label}`;
15141
15118
  let l = document.createTextNode(a), u = document.createTextNode(` ${o}`);
15142
- s.insertBefore(l, i), s.insertBefore(c, i), s.insertBefore(u, i), s.removeChild(i), b(), xb(u, 1), x();
15119
+ s.insertBefore(l, i), s.insertBefore(c, i), s.insertBefore(u, i), s.removeChild(i), b(), bb(u, 1), x();
15143
15120
  }
15144
15121
  return /* @__PURE__ */ C("div", {
15145
15122
  className: "erica-editor-wrap",
@@ -15154,7 +15131,7 @@ function Sb({ value: e, onChange: t, onSubmit: n, agentIdentifier: r, placeholde
15154
15131
  "aria-multiline": "true",
15155
15132
  "data-testid": "chat-editor",
15156
15133
  onInput: () => {
15157
- x(), E();
15134
+ x(), D();
15158
15135
  },
15159
15136
  onKeyDown: (e) => {
15160
15137
  if (s.current) {
@@ -15169,7 +15146,7 @@ function Sb({ value: e, onChange: t, onSubmit: n, agentIdentifier: r, placeholde
15169
15146
  }
15170
15147
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), h.current());
15171
15148
  },
15172
- onKeyUp: E,
15149
+ onKeyUp: D,
15173
15150
  onBlur: () => {
15174
15151
  window.setTimeout(() => {
15175
15152
  document.querySelector("[data-mention-suggestion]:hover") || b();
@@ -15180,7 +15157,7 @@ function Sb({ value: e, onChange: t, onSubmit: n, agentIdentifier: r, placeholde
15180
15157
  }
15181
15158
  //#endregion
15182
15159
  //#region src/components/DocumentAttachmentPicker.tsx
15183
- function Cb({ hasAttachments: e, disabled: t, onFilesSelected: n }) {
15160
+ function Sb({ hasAttachments: e, disabled: t, onFilesSelected: n }) {
15184
15161
  let r = l(null);
15185
15162
  function i(e) {
15186
15163
  let t = Array.from(e.target.files ?? []);
@@ -15215,7 +15192,7 @@ function Cb({ hasAttachments: e, disabled: t, onFilesSelected: n }) {
15215
15192
  }
15216
15193
  //#endregion
15217
15194
  //#region src/components/AgentAwareInput.tsx
15218
- function wb(e) {
15195
+ function Cb(e) {
15219
15196
  let t = a(xn), [n, r] = u(!1), i = l(0);
15220
15197
  if (!t) return /* @__PURE__ */ S(f, { ...e });
15221
15198
  let { attachedFiles: o, addFiles: s, removeFile: c, inputValue: d, setInputValue: p, handleSubmit: m, threadId: h } = t, g = yn;
@@ -15283,7 +15260,7 @@ function wb(e) {
15283
15260
  }),
15284
15261
  /* @__PURE__ */ S("div", {
15285
15262
  className: "erica-aware-input-main",
15286
- children: u === "transcribe" ? a : /* @__PURE__ */ S(Sb, {
15263
+ children: u === "transcribe" ? a : /* @__PURE__ */ S(xb, {
15287
15264
  value: d,
15288
15265
  onChange: p,
15289
15266
  onSubmit: w,
@@ -15294,7 +15271,7 @@ function wb(e) {
15294
15271
  /* @__PURE__ */ C("div", {
15295
15272
  className: "erica-aware-input-toolbar",
15296
15273
  children: [
15297
- /* @__PURE__ */ S(Cb, {
15274
+ /* @__PURE__ */ S(Sb, {
15298
15275
  hasAttachments: o.length > 0,
15299
15276
  disabled: !h,
15300
15277
  onFilesSelected: s
@@ -15310,10 +15287,10 @@ function wb(e) {
15310
15287
  }
15311
15288
  //#endregion
15312
15289
  //#region src/components/ChatMessageSpinner.tsx
15313
- var Tb = (e) => e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2").replace(/[_-]/g, " ").toLowerCase().trim().replace(/\s+/g, " ");
15314
- function Eb() {
15290
+ var wb = (e) => e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2").replace(/[_-]/g, " ").toLowerCase().trim().replace(/\s+/g, " ");
15291
+ function Tb() {
15315
15292
  let e = a(xn), t = "digesting";
15316
- return e?.step && (t = e.step === "ls" ? "listing files" : Tb(e.step)), /* @__PURE__ */ C("div", {
15293
+ return e?.step && (t = e.step === "ls" ? "listing files" : wb(e.step)), /* @__PURE__ */ C("div", {
15317
15294
  className: "chat-message-spinner-container",
15318
15295
  children: [/* @__PURE__ */ S("div", { className: "chat-message-spinner-icon" }), /* @__PURE__ */ C("div", {
15319
15296
  className: "chat-message-spinner-text",
@@ -15339,7 +15316,7 @@ function Eb() {
15339
15316
  }
15340
15317
  //#endregion
15341
15318
  //#region src/components/LoadingMessage.tsx
15342
- function Db({ message: e }) {
15319
+ function Eb({ message: e }) {
15343
15320
  return /* @__PURE__ */ C("div", {
15344
15321
  className: "loading-message-container",
15345
15322
  children: [/* @__PURE__ */ S("div", { className: "loading-message-spinner" }), /* @__PURE__ */ C("div", {
@@ -15366,17 +15343,17 @@ function Db({ message: e }) {
15366
15343
  }
15367
15344
  //#endregion
15368
15345
  //#region src/components/EricaChatHeader.tsx
15369
- function Ob(e) {
15346
+ function Db(e) {
15370
15347
  if (!e) return "";
15371
15348
  let t = e.split(":");
15372
15349
  return (t.length > 1 ? t.slice(1).join(" ") : e).replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
15373
15350
  }
15374
- function kb(e) {
15351
+ function Ob(e) {
15375
15352
  if (!e) return "";
15376
15353
  let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4), r = Math.floor(n / 60), i = Math.floor(r / 24);
15377
15354
  return n < 1 ? "just now" : n < 60 ? `${n}m ago` : r < 24 ? `${r}h ago` : i < 7 ? `${i}d ago` : new Date(e).toLocaleDateString();
15378
15355
  }
15379
- function Ab({ onNewChat: e, onThreadSelect: t }) {
15356
+ function kb({ onNewChat: e, onThreadSelect: t }) {
15380
15357
  let [n, r] = u(!1), i = l(null), a = g(), { data: s = [], isLoading: c } = gn();
15381
15358
  o(() => {
15382
15359
  function e(e) {
@@ -15440,7 +15417,7 @@ function Ab({ onNewChat: e, onThreadSelect: t }) {
15440
15417
  children: "No conversations yet"
15441
15418
  }),
15442
15419
  !c && s.map((e) => {
15443
- let t = Ob(e.agent), n = kb(e.last_run_at ?? e.created_at);
15420
+ let t = Db(e.agent), n = Ob(e.last_run_at ?? e.created_at);
15444
15421
  return /* @__PURE__ */ S("button", {
15445
15422
  onClick: () => d(e.uid),
15446
15423
  className: "erica-thread-item",
@@ -15471,7 +15448,7 @@ function Ab({ onNewChat: e, onThreadSelect: t }) {
15471
15448
  }
15472
15449
  //#endregion
15473
15450
  //#region src/components/AttachmentItem.tsx
15474
- function jb({ attachment: e }) {
15451
+ function Ab({ attachment: e }) {
15475
15452
  let [t, n] = u(!1);
15476
15453
  async function r() {
15477
15454
  n(!0);
@@ -15520,7 +15497,7 @@ function jb({ attachment: e }) {
15520
15497
  }
15521
15498
  //#endregion
15522
15499
  //#region src/components/AttachmentBlock.tsx
15523
- function Mb({ children: e }) {
15500
+ function jb({ children: e }) {
15524
15501
  let t = String(e).trim(), n = [];
15525
15502
  try {
15526
15503
  n = JSON.parse(t);
@@ -15529,12 +15506,12 @@ function Mb({ children: e }) {
15529
15506
  }
15530
15507
  return n.length === 0 ? null : /* @__PURE__ */ S("div", {
15531
15508
  className: "flex flex-wrap gap-1.5 mt-1.5 py-1",
15532
- children: n.map((e, t) => /* @__PURE__ */ S(jb, { attachment: e }, t))
15509
+ children: n.map((e, t) => /* @__PURE__ */ S(Ab, { attachment: e }, t))
15533
15510
  });
15534
15511
  }
15535
15512
  //#endregion
15536
15513
  //#region src/components/ChatToggleGreeting.tsx
15537
- function Nb({ message: e = "Hai! Saya SPP AI, siap membantu Anda!", isOpen: t = !1, initialDelay: n = 1e4 }) {
15514
+ function Mb({ message: e = "Hai! Saya SPP AI, siap membantu Anda!", isOpen: t = !1, initialDelay: n = 1e4 }) {
15538
15515
  let [r, i] = u(!1), [a, s] = u(!1);
15539
15516
  return o(() => {
15540
15517
  let e = setTimeout(() => {
@@ -15558,22 +15535,22 @@ function Nb({ message: e = "Hai! Saya SPP AI, siap membantu Anda!", isOpen: t =
15558
15535
  }
15559
15536
  //#endregion
15560
15537
  //#region ../../node_modules/.pnpm/mdast-util-newline-to-break@2.0.0/node_modules/mdast-util-newline-to-break/lib/index.js
15561
- function Pb(e) {
15562
- Ah(e, [/\r?\n|\r/g, Fb]);
15538
+ function Nb(e) {
15539
+ Ah(e, [/\r?\n|\r/g, Pb]);
15563
15540
  }
15564
- function Fb() {
15541
+ function Pb() {
15565
15542
  return { type: "break" };
15566
15543
  }
15567
15544
  //#endregion
15568
15545
  //#region ../../node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.js
15569
- function Ib() {
15546
+ function Fb() {
15570
15547
  return function(e) {
15571
- Pb(e);
15548
+ Nb(e);
15572
15549
  };
15573
15550
  }
15574
15551
  //#endregion
15575
15552
  //#region src/components/EricaChat.tsx
15576
- var Lb = () => (e) => {
15553
+ var Ib = () => (e) => {
15577
15554
  let t = (e) => {
15578
15555
  [
15579
15556
  "containerDirective",
@@ -15582,19 +15559,19 @@ var Lb = () => (e) => {
15582
15559
  ].includes(e.type) && e.name === "tool_call_content" && (e.data = e.data || {}, e.data.hName = e.name, e.data.hProperties = e.attributes || {}, e.children = []), e.children && e.children.forEach(t);
15583
15560
  };
15584
15561
  t(e);
15585
- }, Rb = () => (e) => {
15562
+ }, Lb = () => (e) => {
15586
15563
  let t = (e) => {
15587
15564
  e.type === "textDirective" && e.name === "resource" && (e.data = e.data || {}, e.data.hName = "resource", e.data.hProperties = e.attributes || {}), e.children && e.children.forEach(t);
15588
15565
  };
15589
15566
  t(e);
15590
15567
  };
15591
- function zb({ runtimeUrl: e, widgetToken: t }) {
15568
+ function Rb({ runtimeUrl: e, widgetToken: t }) {
15592
15569
  let [n, r] = u(void 0), [a, s] = u(!0), [l, f] = u(!1), [h, g] = u(0), [_, v] = u(!0), [y, b] = u(!1), w = c(() => {
15593
15570
  let t = new URL(e), n = t.pathname.split("/").filter(Boolean);
15594
15571
  return n.length > 2 && n.pop(), t.pathname = "/" + n.join("/"), t.toString();
15595
15572
  }, [e]);
15596
15573
  c(() => {
15597
- Ie(w, t);
15574
+ Fe(w, t);
15598
15575
  }, [w, t]);
15599
15576
  let { data: T, isLoading: E } = _n(a, h), { isLoading: D, isSuccess: O } = vn(n || "", l);
15600
15577
  o(() => {
@@ -15615,8 +15592,8 @@ function zb({ runtimeUrl: e, widgetToken: t }) {
15615
15592
  }, []);
15616
15593
  function ne({ threadId: e, isLoadingThreadId: t, isLoadingSandbox: n, isSandboxReady: r, isNewThread: a, handleNewChat: o, handleThreadSelect: s }) {
15617
15594
  let c = "Halo! Saya asisten AI SPP, ada yg bisa saya bantu?";
15618
- t ? c = /* @__PURE__ */ S(Db, { message: "Initializing conversation" }) : a && n ? c = /* @__PURE__ */ S(Db, { message: "Preparing workspace" }) : a && !r && (c = /* @__PURE__ */ S(Db, { message: "Setting up environment" }));
15619
- let l = i(() => /* @__PURE__ */ S(Ab, {
15595
+ t ? c = /* @__PURE__ */ S(Eb, { message: "Initializing conversation" }) : a && n ? c = /* @__PURE__ */ S(Eb, { message: "Preparing workspace" }) : a && !r && (c = /* @__PURE__ */ S(Eb, { message: "Setting up environment" }));
15596
+ let l = i(() => /* @__PURE__ */ S(kb, {
15620
15597
  onNewChat: o,
15621
15598
  onThreadSelect: s
15622
15599
  }), [o, s]);
@@ -15624,7 +15601,7 @@ function zb({ runtimeUrl: e, widgetToken: t }) {
15624
15601
  className: "erica-chat-container",
15625
15602
  children: [
15626
15603
  /* @__PURE__ */ S(pb, {}),
15627
- /* @__PURE__ */ S(Nb, {
15604
+ /* @__PURE__ */ S(Mb, {
15628
15605
  message: "Hai! Saya SPP AI, siap membantu Anda!",
15629
15606
  isOpen: y,
15630
15607
  initialDelay: 1e4
@@ -15638,22 +15615,22 @@ function zb({ runtimeUrl: e, widgetToken: t }) {
15638
15615
  chatDisclaimerText: "AI dapat membuat kesalahan. Harap verifikasi informasi penting."
15639
15616
  },
15640
15617
  threadId: e,
15641
- input: wb,
15618
+ input: Cb,
15642
15619
  messageView: {
15643
- cursor: Eb,
15620
+ cursor: Tb,
15644
15621
  userMessage: { messageRenderer: ({ content: e, className: t }) => /* @__PURE__ */ S("div", {
15645
15622
  className: ["cpk:prose cpk:dark:prose-invert cpk:bg-smi cpk:relative cpk:max-w-[80%] cpk:rounded-[18px] cpk:px-4 cpk:py-1.5 cpk:data-[multiline]:py-3 cpk:inline-block", t].filter(Boolean).join(" "),
15646
15623
  children: /* @__PURE__ */ S(Ch, {
15647
15624
  remarkPlugins: [
15648
- Ib,
15625
+ Fb,
15649
15626
  Dv,
15650
15627
  Hy,
15651
- Rb
15628
+ Lb
15652
15629
  ],
15653
15630
  components: {
15654
15631
  pre: ({ children: e }) => /* @__PURE__ */ S(x, { children: e }),
15655
15632
  code({ children: e, className: t }) {
15656
- return /language-(\w+)/.exec(t || "")?.[1] === "attachments" ? /* @__PURE__ */ S(Mb, { children: e }) : /* @__PURE__ */ S("code", {
15633
+ return /language-(\w+)/.exec(t || "")?.[1] === "attachments" ? /* @__PURE__ */ S(jb, { children: e }) : /* @__PURE__ */ S("code", {
15657
15634
  className: t,
15658
15635
  style: {
15659
15636
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
@@ -15675,10 +15652,10 @@ function zb({ runtimeUrl: e, widgetToken: t }) {
15675
15652
  toolbarVisible: !1,
15676
15653
  markdownRenderer: ({ content: e }) => !e || e.trim() === "" ? /* @__PURE__ */ S(x, {}) : /* @__PURE__ */ S(Ch, {
15677
15654
  remarkPlugins: [
15678
- Ib,
15655
+ Fb,
15679
15656
  Dv,
15680
15657
  Hy,
15681
- Lb
15658
+ Ib
15682
15659
  ],
15683
15660
  components: { tool_call_content: ({ children: e, ...t }) => /* @__PURE__ */ S("div", {
15684
15661
  className: "tool-call-content",
@@ -15717,24 +15694,24 @@ function zb({ runtimeUrl: e, widgetToken: t }) {
15717
15694
  }
15718
15695
  //#endregion
15719
15696
  //#region src/contexts/AccountContext.tsx
15720
- var Bb = t(void 0);
15721
- function Vb({ accountUid: e, children: t }) {
15722
- return /* @__PURE__ */ S(Bb.Provider, {
15697
+ var zb = t(void 0);
15698
+ function Bb({ accountUid: e, children: t }) {
15699
+ return /* @__PURE__ */ S(zb.Provider, {
15723
15700
  value: { accountUid: e },
15724
15701
  children: t
15725
15702
  });
15726
15703
  }
15727
15704
  //#endregion
15728
15705
  //#region src/contexts/EricaProvider.tsx
15729
- var Hb = new Vt({ defaultOptions: { queries: {
15706
+ var Vb = new Vt({ defaultOptions: { queries: {
15730
15707
  refetchOnWindowFocus: !1,
15731
15708
  retry: 1,
15732
15709
  staleTime: 3e4
15733
15710
  } } });
15734
- function Ub({ accountUid: e, children: t }) {
15711
+ function Hb({ accountUid: e, children: t }) {
15735
15712
  return /* @__PURE__ */ S(Wt, {
15736
- client: Hb,
15737
- children: /* @__PURE__ */ S(Vb, {
15713
+ client: Vb,
15714
+ children: /* @__PURE__ */ S(Bb, {
15738
15715
  accountUid: e,
15739
15716
  children: /* @__PURE__ */ S(Zc, { children: t })
15740
15717
  })
@@ -15742,7 +15719,7 @@ function Ub({ accountUid: e, children: t }) {
15742
15719
  }
15743
15720
  //#endregion
15744
15721
  //#region src/components/EricaDrawer.tsx
15745
- function Wb() {
15722
+ function Ub() {
15746
15723
  let { isOpen: e, onClose: t, content: n, title: r } = Qc(), [i, a] = u(!1);
15747
15724
  return o(() => {
15748
15725
  e ? setTimeout(() => a(!0), 10) : a(!1);
@@ -15772,6 +15749,6 @@ function Wb() {
15772
15749
  }) : null;
15773
15750
  }
15774
15751
  //#endregion
15775
- export { Zc as ArtifactProvider, zb as EricaChat, Wb as EricaDrawer, Ub as EricaProvider };
15752
+ export { Zc as ArtifactProvider, Rb as EricaChat, Ub as EricaDrawer, Hb as EricaProvider };
15776
15753
 
15777
15754
  //# sourceMappingURL=index.mjs.map