@fencyai/react 0.1.95 → 0.1.96

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.js CHANGED
@@ -163,7 +163,7 @@ const of = (e) => {
163
163
  return {
164
164
  createStream: async () => {
165
165
  try {
166
- const o = await t.getOrCreateStream(3e4);
166
+ const o = await t.getOrCreateStream(e.fetchClientSecret, 3e4);
167
167
  r(o);
168
168
  const s = `${t.fency.baseUrl}/v1/pub/streams/${o.id}?pk=${t.fency.publishableKey}`;
169
169
  return a.setSourceUrl(s), {
@@ -184,9 +184,10 @@ const of = (e) => {
184
184
  };
185
185
  }, hf = (e) => {
186
186
  const t = ft(), [n, r] = Q([]), [a, i] = Q([]), [o, s] = Q([]), { createStream: l } = _d({
187
+ fetchClientSecret: e.fetchCreateStreamClientSecret,
187
188
  onNewAgentTaskReasoningChunk: (c) => {
188
189
  var d;
189
- (d = e == null ? void 0 : e.onAgentTaskReasoningChunk) == null || d.call(e, c), s((g) => [...g, c]);
190
+ (d = e.onAgentTaskReasoningChunk) == null || d.call(e, c), s((g) => [...g, c]);
190
191
  },
191
192
  onStreamError: (c) => {
192
193
  var d;
@@ -242,6 +243,7 @@ const of = (e) => {
242
243
  }, [o]);
243
244
  const u = ue(
244
245
  async (c) => {
246
+ var g;
245
247
  const d = await l();
246
248
  if (d.type === "success") {
247
249
  r([
@@ -259,25 +261,26 @@ const of = (e) => {
259
261
  doneStreaming: !1
260
262
  }
261
263
  ]);
262
- const g = await Xg({
264
+ const f = await ((g = e == null ? void 0 : e.fetchCreateAgentTaskClientSecret) == null ? void 0 : g.call(e)), m = await Xg({
263
265
  pk: t.fency.publishableKey,
264
266
  baseUrl: t.fency.baseUrl,
267
+ clientSecret: f == null ? void 0 : f.clientSecret,
265
268
  request: {
266
269
  streamId: d.stream.id,
267
270
  queryText: c.queryText
268
271
  }
269
272
  });
270
- if (g.type === "success" && g.agentTask)
271
- return r((f) => [
272
- ...f.filter(
273
- (m) => m.streamId !== d.stream.id
273
+ if (m.type === "success" && m.agentTask)
274
+ return r((y) => [
275
+ ...y.filter(
276
+ (b) => b.streamId !== d.stream.id
274
277
  ),
275
278
  {
276
279
  streamId: d.stream.id,
277
280
  triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
278
281
  data: {
279
- id: g.agentTask.id,
280
- createdAt: g.agentTask.createdAt,
282
+ id: m.agentTask.id,
283
+ createdAt: m.agentTask.createdAt,
281
284
  streamId: d.stream.id
282
285
  },
283
286
  error: null,
@@ -291,18 +294,18 @@ const of = (e) => {
291
294
  ]), {
292
295
  type: "success",
293
296
  streamId: d.stream.id,
294
- agentTaskId: g.agentTask.id
297
+ agentTaskId: m.agentTask.id
295
298
  };
296
- if (g.type === "error")
297
- return r((f) => [
298
- ...f.filter(
299
- (m) => m.streamId !== d.stream.id
299
+ if (m.type === "error")
300
+ return r((y) => [
301
+ ...y.filter(
302
+ (b) => b.streamId !== d.stream.id
300
303
  ),
301
304
  {
302
305
  triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
303
306
  streamId: d.stream.id,
304
307
  prompt: c,
305
- error: g.error,
308
+ error: m.error,
306
309
  response: "",
307
310
  reasoning: "",
308
311
  chunks: [],
@@ -312,21 +315,21 @@ const of = (e) => {
312
315
  }
313
316
  ]), {
314
317
  type: "error",
315
- error: g.error
318
+ error: m.error
316
319
  };
317
320
  {
318
- const f = {
321
+ const y = {
319
322
  message: "No response received",
320
323
  code: "UnknownError"
321
324
  };
322
- return r((m) => [
323
- ...m.filter(
324
- (y) => y.streamId !== d.stream.id
325
+ return r((b) => [
326
+ ...b.filter(
327
+ (S) => S.streamId !== d.stream.id
325
328
  ),
326
329
  {
327
330
  triggeredAt: (/* @__PURE__ */ new Date()).toISOString(),
328
331
  streamId: d.stream.id,
329
- error: f,
332
+ error: y,
330
333
  prompt: c,
331
334
  response: "",
332
335
  reasoning: "",
@@ -337,7 +340,7 @@ const of = (e) => {
337
340
  }
338
341
  ]), {
339
342
  type: "error",
340
- error: f
343
+ error: y
341
344
  };
342
345
  }
343
346
  } else
@@ -704,6 +707,7 @@ function kf() {
704
707
  }
705
708
  const Xv = (e) => {
706
709
  const t = ft(), [n, r] = Q([]), [a, i] = Q([]), [o, s] = Q([]), { createStream: l } = _d({
710
+ fetchClientSecret: e == null ? void 0 : e.fetchCreateStreamClientSecret,
707
711
  onNewChatCompletionStreamChunk: (c) => {
708
712
  var d;
709
713
  (d = e == null ? void 0 : e.onChatCompletionStreamChunk) == null || d.call(e, c), s((g) => [...g, c]);
@@ -2939,17 +2943,17 @@ function Vm(e) {
2939
2943
  if (r++, t.containerState._closeFlow) {
2940
2944
  t.containerState._closeFlow = void 0, a && S();
2941
2945
  const v = t.events.length;
2942
- let _ = v, T;
2946
+ let _ = v, A;
2943
2947
  for (; _--; )
2944
2948
  if (t.events[_][0] === "exit" && t.events[_][1].type === "chunkFlow") {
2945
- T = t.events[_][1].end;
2949
+ A = t.events[_][1].end;
2946
2950
  break;
2947
2951
  }
2948
2952
  b(r);
2949
2953
  let I = v;
2950
2954
  for (; I < t.events.length; )
2951
2955
  t.events[I][1].end = {
2952
- ...T
2956
+ ...A
2953
2957
  }, I++;
2954
2958
  return De(t.events, _ + 1, 0, t.events.slice(v)), t.events.length = I, u(w);
2955
2959
  }
@@ -2998,13 +3002,13 @@ function Vm(e) {
2998
3002
  function y(w, v) {
2999
3003
  const _ = t.sliceStream(w);
3000
3004
  if (v && _.push(null), w.previous = i, i && (i.next = w), i = w, a.defineSkip(w.start), a.write(_), t.parser.lazy[w.start.line]) {
3001
- let T = a.events.length;
3002
- for (; T--; )
3005
+ let A = a.events.length;
3006
+ for (; A--; )
3003
3007
  if (
3004
3008
  // The token starts before the line ending…
3005
- a.events[T][1].start.offset < o && // …and either is not ended yet…
3006
- (!a.events[T][1].end || // …or ends after it.
3007
- a.events[T][1].end.offset > o)
3009
+ a.events[A][1].start.offset < o && // …and either is not ended yet…
3010
+ (!a.events[A][1].end || // …or ends after it.
3011
+ a.events[A][1].end.offset > o)
3008
3012
  )
3009
3013
  return;
3010
3014
  const I = t.events.length;
@@ -3017,11 +3021,11 @@ function Vm(e) {
3017
3021
  }
3018
3022
  M = !0;
3019
3023
  }
3020
- for (b(r), T = I; T < t.events.length; )
3021
- t.events[T][1].end = {
3024
+ for (b(r), A = I; A < t.events.length; )
3025
+ t.events[A][1].end = {
3022
3026
  ...k
3023
- }, T++;
3024
- De(t.events, O + 1, 0, t.events.slice(I)), t.events.length = T;
3027
+ }, A++;
3028
+ De(t.events, O + 1, 0, t.events.slice(I)), t.events.length = A;
3025
3029
  }
3026
3030
  }
3027
3031
  function b(w) {
@@ -3273,67 +3277,67 @@ function rb(e, t, n) {
3273
3277
  };
3274
3278
  let i = 0, o = 0, s;
3275
3279
  return l;
3276
- function l(T) {
3277
- return u(T);
3280
+ function l(A) {
3281
+ return u(A);
3278
3282
  }
3279
- function u(T) {
3283
+ function u(A) {
3280
3284
  const I = r.events[r.events.length - 1];
3281
- return i = I && I[1].type === "linePrefix" ? I[2].sliceSerialize(I[1], !0).length : 0, s = T, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), p(T);
3285
+ return i = I && I[1].type === "linePrefix" ? I[2].sliceSerialize(I[1], !0).length : 0, s = A, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), p(A);
3282
3286
  }
3283
- function p(T) {
3284
- return T === s ? (o++, e.consume(T), p) : o < 3 ? n(T) : (e.exit("codeFencedFenceSequence"), Y(T) ? J(e, c, "whitespace")(T) : c(T));
3287
+ function p(A) {
3288
+ return A === s ? (o++, e.consume(A), p) : o < 3 ? n(A) : (e.exit("codeFencedFenceSequence"), Y(A) ? J(e, c, "whitespace")(A) : c(A));
3285
3289
  }
3286
- function c(T) {
3287
- return T === null || G(T) ? (e.exit("codeFencedFence"), r.interrupt ? t(T) : e.check(pc, m, v)(T)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
3290
+ function c(A) {
3291
+ return A === null || G(A) ? (e.exit("codeFencedFence"), r.interrupt ? t(A) : e.check(pc, m, v)(A)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
3288
3292
  contentType: "string"
3289
- }), d(T));
3293
+ }), d(A));
3290
3294
  }
3291
- function d(T) {
3292
- return T === null || G(T) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), c(T)) : Y(T) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), J(e, g, "whitespace")(T)) : T === 96 && T === s ? n(T) : (e.consume(T), d);
3295
+ function d(A) {
3296
+ return A === null || G(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), c(A)) : Y(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), J(e, g, "whitespace")(A)) : A === 96 && A === s ? n(A) : (e.consume(A), d);
3293
3297
  }
3294
- function g(T) {
3295
- return T === null || G(T) ? c(T) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
3298
+ function g(A) {
3299
+ return A === null || G(A) ? c(A) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
3296
3300
  contentType: "string"
3297
- }), f(T));
3301
+ }), f(A));
3298
3302
  }
3299
- function f(T) {
3300
- return T === null || G(T) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), c(T)) : T === 96 && T === s ? n(T) : (e.consume(T), f);
3303
+ function f(A) {
3304
+ return A === null || G(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), c(A)) : A === 96 && A === s ? n(A) : (e.consume(A), f);
3301
3305
  }
3302
- function m(T) {
3303
- return e.attempt(a, v, y)(T);
3306
+ function m(A) {
3307
+ return e.attempt(a, v, y)(A);
3304
3308
  }
3305
- function y(T) {
3306
- return e.enter("lineEnding"), e.consume(T), e.exit("lineEnding"), b;
3309
+ function y(A) {
3310
+ return e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), b;
3307
3311
  }
3308
- function b(T) {
3309
- return i > 0 && Y(T) ? J(e, S, "linePrefix", i + 1)(T) : S(T);
3312
+ function b(A) {
3313
+ return i > 0 && Y(A) ? J(e, S, "linePrefix", i + 1)(A) : S(A);
3310
3314
  }
3311
- function S(T) {
3312
- return T === null || G(T) ? e.check(pc, m, v)(T) : (e.enter("codeFlowValue"), w(T));
3315
+ function S(A) {
3316
+ return A === null || G(A) ? e.check(pc, m, v)(A) : (e.enter("codeFlowValue"), w(A));
3313
3317
  }
3314
- function w(T) {
3315
- return T === null || G(T) ? (e.exit("codeFlowValue"), S(T)) : (e.consume(T), w);
3318
+ function w(A) {
3319
+ return A === null || G(A) ? (e.exit("codeFlowValue"), S(A)) : (e.consume(A), w);
3316
3320
  }
3317
- function v(T) {
3318
- return e.exit("codeFenced"), t(T);
3321
+ function v(A) {
3322
+ return e.exit("codeFenced"), t(A);
3319
3323
  }
3320
- function _(T, I, O) {
3324
+ function _(A, I, O) {
3321
3325
  let M = 0;
3322
3326
  return k;
3323
3327
  function k(B) {
3324
- return T.enter("lineEnding"), T.consume(B), T.exit("lineEnding"), C;
3328
+ return A.enter("lineEnding"), A.consume(B), A.exit("lineEnding"), C;
3325
3329
  }
3326
3330
  function C(B) {
3327
- return T.enter("codeFencedFence"), Y(B) ? J(T, x, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(B) : x(B);
3331
+ return A.enter("codeFencedFence"), Y(B) ? J(A, x, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(B) : x(B);
3328
3332
  }
3329
3333
  function x(B) {
3330
- return B === s ? (T.enter("codeFencedFenceSequence"), L(B)) : O(B);
3334
+ return B === s ? (A.enter("codeFencedFenceSequence"), L(B)) : O(B);
3331
3335
  }
3332
3336
  function L(B) {
3333
- return B === s ? (M++, T.consume(B), L) : M >= o ? (T.exit("codeFencedFenceSequence"), Y(B) ? J(T, U, "whitespace")(B) : U(B)) : O(B);
3337
+ return B === s ? (M++, A.consume(B), L) : M >= o ? (A.exit("codeFencedFenceSequence"), Y(B) ? J(A, U, "whitespace")(B) : U(B)) : O(B);
3334
3338
  }
3335
3339
  function U(B) {
3336
- return B === null || G(B) ? (T.exit("codeFencedFence"), I(B)) : O(B);
3340
+ return B === null || G(B) ? (A.exit("codeFencedFence"), I(B)) : O(B);
3337
3341
  }
3338
3342
  }
3339
3343
  }
@@ -3978,104 +3982,104 @@ function Lb(e, t, n) {
3978
3982
  const r = this;
3979
3983
  let a, i, o, s, l;
3980
3984
  return u;
3981
- function u(A) {
3982
- return p(A);
3985
+ function u(T) {
3986
+ return p(T);
3983
3987
  }
3984
- function p(A) {
3985
- return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(A), c;
3988
+ function p(T) {
3989
+ return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(T), c;
3986
3990
  }
3987
- function c(A) {
3988
- return A === 33 ? (e.consume(A), d) : A === 47 ? (e.consume(A), i = !0, m) : A === 63 ? (e.consume(A), a = 3, r.interrupt ? t : E) : Te(A) ? (e.consume(A), o = String.fromCharCode(A), y) : n(A);
3991
+ function c(T) {
3992
+ return T === 33 ? (e.consume(T), d) : T === 47 ? (e.consume(T), i = !0, m) : T === 63 ? (e.consume(T), a = 3, r.interrupt ? t : E) : Te(T) ? (e.consume(T), o = String.fromCharCode(T), y) : n(T);
3989
3993
  }
3990
- function d(A) {
3991
- return A === 45 ? (e.consume(A), a = 2, g) : A === 91 ? (e.consume(A), a = 5, s = 0, f) : Te(A) ? (e.consume(A), a = 4, r.interrupt ? t : E) : n(A);
3994
+ function d(T) {
3995
+ return T === 45 ? (e.consume(T), a = 2, g) : T === 91 ? (e.consume(T), a = 5, s = 0, f) : Te(T) ? (e.consume(T), a = 4, r.interrupt ? t : E) : n(T);
3992
3996
  }
3993
- function g(A) {
3994
- return A === 45 ? (e.consume(A), r.interrupt ? t : E) : n(A);
3997
+ function g(T) {
3998
+ return T === 45 ? (e.consume(T), r.interrupt ? t : E) : n(T);
3995
3999
  }
3996
- function f(A) {
4000
+ function f(T) {
3997
4001
  const oe = "CDATA[";
3998
- return A === oe.charCodeAt(s++) ? (e.consume(A), s === oe.length ? r.interrupt ? t : x : f) : n(A);
4002
+ return T === oe.charCodeAt(s++) ? (e.consume(T), s === oe.length ? r.interrupt ? t : x : f) : n(T);
3999
4003
  }
4000
- function m(A) {
4001
- return Te(A) ? (e.consume(A), o = String.fromCharCode(A), y) : n(A);
4004
+ function m(T) {
4005
+ return Te(T) ? (e.consume(T), o = String.fromCharCode(T), y) : n(T);
4002
4006
  }
4003
- function y(A) {
4004
- if (A === null || A === 47 || A === 62 || ae(A)) {
4005
- const oe = A === 47, Ae = o.toLowerCase();
4006
- return !oe && !i && fc.includes(Ae) ? (a = 1, r.interrupt ? t(A) : x(A)) : Ib.includes(o.toLowerCase()) ? (a = 6, oe ? (e.consume(A), b) : r.interrupt ? t(A) : x(A)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(A) : i ? S(A) : w(A));
4007
+ function y(T) {
4008
+ if (T === null || T === 47 || T === 62 || ae(T)) {
4009
+ const oe = T === 47, Ae = o.toLowerCase();
4010
+ return !oe && !i && fc.includes(Ae) ? (a = 1, r.interrupt ? t(T) : x(T)) : Ib.includes(o.toLowerCase()) ? (a = 6, oe ? (e.consume(T), b) : r.interrupt ? t(T) : x(T)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(T) : i ? S(T) : w(T));
4007
4011
  }
4008
- return A === 45 || ye(A) ? (e.consume(A), o += String.fromCharCode(A), y) : n(A);
4012
+ return T === 45 || ye(T) ? (e.consume(T), o += String.fromCharCode(T), y) : n(T);
4009
4013
  }
4010
- function b(A) {
4011
- return A === 62 ? (e.consume(A), r.interrupt ? t : x) : n(A);
4014
+ function b(T) {
4015
+ return T === 62 ? (e.consume(T), r.interrupt ? t : x) : n(T);
4012
4016
  }
4013
- function S(A) {
4014
- return Y(A) ? (e.consume(A), S) : k(A);
4017
+ function S(T) {
4018
+ return Y(T) ? (e.consume(T), S) : k(T);
4015
4019
  }
4016
- function w(A) {
4017
- return A === 47 ? (e.consume(A), k) : A === 58 || A === 95 || Te(A) ? (e.consume(A), v) : Y(A) ? (e.consume(A), w) : k(A);
4020
+ function w(T) {
4021
+ return T === 47 ? (e.consume(T), k) : T === 58 || T === 95 || Te(T) ? (e.consume(T), v) : Y(T) ? (e.consume(T), w) : k(T);
4018
4022
  }
4019
- function v(A) {
4020
- return A === 45 || A === 46 || A === 58 || A === 95 || ye(A) ? (e.consume(A), v) : _(A);
4023
+ function v(T) {
4024
+ return T === 45 || T === 46 || T === 58 || T === 95 || ye(T) ? (e.consume(T), v) : _(T);
4021
4025
  }
4022
- function _(A) {
4023
- return A === 61 ? (e.consume(A), T) : Y(A) ? (e.consume(A), _) : w(A);
4026
+ function _(T) {
4027
+ return T === 61 ? (e.consume(T), A) : Y(T) ? (e.consume(T), _) : w(T);
4024
4028
  }
4025
- function T(A) {
4026
- return A === null || A === 60 || A === 61 || A === 62 || A === 96 ? n(A) : A === 34 || A === 39 ? (e.consume(A), l = A, I) : Y(A) ? (e.consume(A), T) : O(A);
4029
+ function A(T) {
4030
+ return T === null || T === 60 || T === 61 || T === 62 || T === 96 ? n(T) : T === 34 || T === 39 ? (e.consume(T), l = T, I) : Y(T) ? (e.consume(T), A) : O(T);
4027
4031
  }
4028
- function I(A) {
4029
- return A === l ? (e.consume(A), l = null, M) : A === null || G(A) ? n(A) : (e.consume(A), I);
4032
+ function I(T) {
4033
+ return T === l ? (e.consume(T), l = null, M) : T === null || G(T) ? n(T) : (e.consume(T), I);
4030
4034
  }
4031
- function O(A) {
4032
- return A === null || A === 34 || A === 39 || A === 47 || A === 60 || A === 61 || A === 62 || A === 96 || ae(A) ? _(A) : (e.consume(A), O);
4035
+ function O(T) {
4036
+ return T === null || T === 34 || T === 39 || T === 47 || T === 60 || T === 61 || T === 62 || T === 96 || ae(T) ? _(T) : (e.consume(T), O);
4033
4037
  }
4034
- function M(A) {
4035
- return A === 47 || A === 62 || Y(A) ? w(A) : n(A);
4038
+ function M(T) {
4039
+ return T === 47 || T === 62 || Y(T) ? w(T) : n(T);
4036
4040
  }
4037
- function k(A) {
4038
- return A === 62 ? (e.consume(A), C) : n(A);
4041
+ function k(T) {
4042
+ return T === 62 ? (e.consume(T), C) : n(T);
4039
4043
  }
4040
- function C(A) {
4041
- return A === null || G(A) ? x(A) : Y(A) ? (e.consume(A), C) : n(A);
4044
+ function C(T) {
4045
+ return T === null || G(T) ? x(T) : Y(T) ? (e.consume(T), C) : n(T);
4042
4046
  }
4043
- function x(A) {
4044
- return A === 45 && a === 2 ? (e.consume(A), H) : A === 60 && a === 1 ? (e.consume(A), z) : A === 62 && a === 4 ? (e.consume(A), K) : A === 63 && a === 3 ? (e.consume(A), E) : A === 93 && a === 5 ? (e.consume(A), W) : G(A) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(Cb, ne, L)(A)) : A === null || G(A) ? (e.exit("htmlFlowData"), L(A)) : (e.consume(A), x);
4047
+ function x(T) {
4048
+ return T === 45 && a === 2 ? (e.consume(T), H) : T === 60 && a === 1 ? (e.consume(T), z) : T === 62 && a === 4 ? (e.consume(T), K) : T === 63 && a === 3 ? (e.consume(T), E) : T === 93 && a === 5 ? (e.consume(T), W) : G(T) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(Cb, ne, L)(T)) : T === null || G(T) ? (e.exit("htmlFlowData"), L(T)) : (e.consume(T), x);
4045
4049
  }
4046
- function L(A) {
4047
- return e.check(xb, U, ne)(A);
4050
+ function L(T) {
4051
+ return e.check(xb, U, ne)(T);
4048
4052
  }
4049
- function U(A) {
4050
- return e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), B;
4053
+ function U(T) {
4054
+ return e.enter("lineEnding"), e.consume(T), e.exit("lineEnding"), B;
4051
4055
  }
4052
- function B(A) {
4053
- return A === null || G(A) ? L(A) : (e.enter("htmlFlowData"), x(A));
4056
+ function B(T) {
4057
+ return T === null || G(T) ? L(T) : (e.enter("htmlFlowData"), x(T));
4054
4058
  }
4055
- function H(A) {
4056
- return A === 45 ? (e.consume(A), E) : x(A);
4059
+ function H(T) {
4060
+ return T === 45 ? (e.consume(T), E) : x(T);
4057
4061
  }
4058
- function z(A) {
4059
- return A === 47 ? (e.consume(A), o = "", $) : x(A);
4062
+ function z(T) {
4063
+ return T === 47 ? (e.consume(T), o = "", $) : x(T);
4060
4064
  }
4061
- function $(A) {
4062
- if (A === 62) {
4065
+ function $(T) {
4066
+ if (T === 62) {
4063
4067
  const oe = o.toLowerCase();
4064
- return fc.includes(oe) ? (e.consume(A), K) : x(A);
4068
+ return fc.includes(oe) ? (e.consume(T), K) : x(T);
4065
4069
  }
4066
- return Te(A) && o.length < 8 ? (e.consume(A), o += String.fromCharCode(A), $) : x(A);
4070
+ return Te(T) && o.length < 8 ? (e.consume(T), o += String.fromCharCode(T), $) : x(T);
4067
4071
  }
4068
- function W(A) {
4069
- return A === 93 ? (e.consume(A), E) : x(A);
4072
+ function W(T) {
4073
+ return T === 93 ? (e.consume(T), E) : x(T);
4070
4074
  }
4071
- function E(A) {
4072
- return A === 62 ? (e.consume(A), K) : A === 45 && a === 2 ? (e.consume(A), E) : x(A);
4075
+ function E(T) {
4076
+ return T === 62 ? (e.consume(T), K) : T === 45 && a === 2 ? (e.consume(T), E) : x(T);
4073
4077
  }
4074
- function K(A) {
4075
- return A === null || G(A) ? (e.exit("htmlFlowData"), ne(A)) : (e.consume(A), K);
4078
+ function K(T) {
4079
+ return T === null || G(T) ? (e.exit("htmlFlowData"), ne(T)) : (e.consume(T), K);
4076
4080
  }
4077
- function ne(A) {
4078
- return e.exit("htmlFlow"), t(A);
4081
+ function ne(T) {
4082
+ return e.exit("htmlFlow"), t(T);
4079
4083
  }
4080
4084
  }
4081
4085
  function Db(e, t, n) {
@@ -4146,10 +4150,10 @@ function Pb(e, t, n) {
4146
4150
  return E === 62 ? H(E) : w(E);
4147
4151
  }
4148
4152
  function _(E) {
4149
- return Te(E) ? (e.consume(E), T) : n(E);
4153
+ return Te(E) ? (e.consume(E), A) : n(E);
4150
4154
  }
4151
- function T(E) {
4152
- return E === 45 || ye(E) ? (e.consume(E), T) : I(E);
4155
+ function A(E) {
4156
+ return E === 45 || ye(E) ? (e.consume(E), A) : I(E);
4153
4157
  }
4154
4158
  function I(E) {
4155
4159
  return G(E) ? (o = I, z(E)) : Y(E) ? (e.consume(E), I) : H(E);
@@ -4723,11 +4727,11 @@ function kh(e, t, n) {
4723
4727
  let o = [], s = [];
4724
4728
  const l = {
4725
4729
  attempt: I(_),
4726
- check: I(T),
4730
+ check: I(A),
4727
4731
  consume: S,
4728
4732
  enter: w,
4729
4733
  exit: v,
4730
- interrupt: I(T, {
4734
+ interrupt: I(A, {
4731
4735
  interrupt: !0
4732
4736
  })
4733
4737
  }, u = {
@@ -4803,7 +4807,7 @@ function kh(e, t, n) {
4803
4807
  function _(C, x) {
4804
4808
  O(C, x.from);
4805
4809
  }
4806
- function T(C, x) {
4810
+ function A(C, x) {
4807
4811
  x.restore();
4808
4812
  }
4809
4813
  function I(C, x) {
@@ -4833,9 +4837,9 @@ function kh(e, t, n) {
4833
4837
  }
4834
4838
  }
4835
4839
  function ne(te) {
4836
- return z = te, $ = 0, te.length === 0 ? H : A(te[$]);
4840
+ return z = te, $ = 0, te.length === 0 ? H : T(te[$]);
4837
4841
  }
4838
- function A(te) {
4842
+ function T(te) {
4839
4843
  return ke;
4840
4844
  function ke(de) {
4841
4845
  return E = M(), W = te, te.partial || (u.currentConstruct = te), te.name && u.parser.constructs.disable.null.includes(te.name) ? Ae() : te.tokenize.call(
@@ -4853,7 +4857,7 @@ function kh(e, t, n) {
4853
4857
  return C(W, E), B;
4854
4858
  }
4855
4859
  function Ae(te) {
4856
- return E.restore(), ++$ < z.length ? A(z[$]) : H;
4860
+ return E.restore(), ++$ < z.length ? T(z[$]) : H;
4857
4861
  }
4858
4862
  }
4859
4863
  }
@@ -5047,7 +5051,7 @@ function Dh(e) {
5047
5051
  listOrdered: i(yt, c),
5048
5052
  listUnordered: i(yt),
5049
5053
  paragraph: i(Wg),
5050
- reference: A,
5054
+ reference: T,
5051
5055
  referenceString: o,
5052
5056
  resourceDestinationString: o,
5053
5057
  resourceTitleString: o,
@@ -5102,7 +5106,7 @@ function Dh(e) {
5102
5106
  resource: ne,
5103
5107
  setextHeading: l(O),
5104
5108
  setextHeadingLineSequence: I,
5105
- setextHeadingText: T,
5109
+ setextHeadingText: A,
5106
5110
  strong: l(),
5107
5111
  thematicBreak: l()
5108
5112
  }
@@ -5294,7 +5298,7 @@ function Dh(e) {
5294
5298
  F.depth = V;
5295
5299
  }
5296
5300
  }
5297
- function T() {
5301
+ function A() {
5298
5302
  this.data.setextHeadingSlurpLineEnding = !0;
5299
5303
  }
5300
5304
  function I(N) {
@@ -5382,7 +5386,7 @@ function Dh(e) {
5382
5386
  function ne() {
5383
5387
  this.data.inReference = void 0;
5384
5388
  }
5385
- function A() {
5389
+ function T() {
5386
5390
  this.data.referenceType = "collapsed";
5387
5391
  }
5388
5392
  function oe(N) {
@@ -8012,11 +8016,11 @@ function bp(e) {
8012
8016
  }
8013
8017
  function kE(e, t, n, r, a, i, o, s, l) {
8014
8018
  var u, p = bp(e.value), c = [], d = -1, g = 0;
8015
- function f(_, T) {
8019
+ function f(_, A) {
8016
8020
  var I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
8017
8021
  return Un({
8018
8022
  children: _,
8019
- lineNumber: T,
8023
+ lineNumber: A,
8020
8024
  lineNumberStyle: s,
8021
8025
  largestLineNumber: o,
8022
8026
  showInlineLineNumbers: a,
@@ -8027,19 +8031,19 @@ function kE(e, t, n, r, a, i, o, s, l) {
8027
8031
  wrapLines: t
8028
8032
  });
8029
8033
  }
8030
- function m(_, T) {
8031
- if (r && T && a) {
8032
- var I = mp(s, T, o);
8033
- _.unshift(fp(T, I));
8034
+ function m(_, A) {
8035
+ if (r && A && a) {
8036
+ var I = mp(s, A, o);
8037
+ _.unshift(fp(A, I));
8034
8038
  }
8035
8039
  return _;
8036
8040
  }
8037
- function y(_, T) {
8041
+ function y(_, A) {
8038
8042
  var I = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
8039
- return t || I.length > 0 ? f(_, T, I) : m(_, T);
8043
+ return t || I.length > 0 ? f(_, A, I) : m(_, A);
8040
8044
  }
8041
8045
  for (var b = function() {
8042
- var T = p[g], I = T.children[0].value, O = SE(I);
8046
+ var A = p[g], I = A.children[0].value, O = SE(I);
8043
8047
  if (O) {
8044
8048
  var M = I.split(`
8045
8049
  `);
@@ -8052,7 +8056,7 @@ function kE(e, t, n, r, a, i, o, s, l) {
8052
8056
  if (C === 0) {
8053
8057
  var U = p.slice(d + 1, g).concat(Un({
8054
8058
  children: [L],
8055
- className: T.properties.className
8059
+ className: A.properties.className
8056
8060
  })), B = y(U, x);
8057
8061
  c.push(B);
8058
8062
  } else if (C === M.length - 1) {
@@ -8063,15 +8067,15 @@ function kE(e, t, n, r, a, i, o, s, l) {
8063
8067
  if (H) {
8064
8068
  var $ = Un({
8065
8069
  children: [z],
8066
- className: T.properties.className
8070
+ className: A.properties.className
8067
8071
  });
8068
8072
  p.splice(g + 1, 0, $);
8069
8073
  } else {
8070
- var W = [z], E = y(W, x, T.properties.className);
8074
+ var W = [z], E = y(W, x, A.properties.className);
8071
8075
  c.push(E);
8072
8076
  }
8073
8077
  } else {
8074
- var K = [L], ne = y(K, x, T.properties.className);
8078
+ var K = [L], ne = y(K, x, A.properties.className);
8075
8079
  c.push(ne);
8076
8080
  }
8077
8081
  }), d = g;
@@ -8128,10 +8132,10 @@ function RE(e, t) {
8128
8132
  var a, i, o = r.language, s = r.children, l = r.style, u = l === void 0 ? t : l, p = r.customStyle, c = p === void 0 ? {} : p, d = r.codeTagProps, g = d === void 0 ? {
8129
8133
  className: o ? "language-".concat(o) : void 0,
8130
8134
  style: ut(ut({}, u['code[class*="language-"]']), u['code[class*="language-'.concat(o, '"]')])
8131
- } : d, f = r.useInlineStyles, m = f === void 0 ? !0 : f, y = r.showLineNumbers, b = y === void 0 ? !1 : y, S = r.showInlineLineNumbers, w = S === void 0 ? !0 : S, v = r.startingLineNumber, _ = v === void 0 ? 1 : v, T = r.lineNumberContainerStyle, I = r.lineNumberStyle, O = I === void 0 ? {} : I, M = r.wrapLines, k = r.wrapLongLines, C = k === void 0 ? !1 : k, x = r.lineProps, L = x === void 0 ? {} : x, U = r.renderer, B = r.PreTag, H = B === void 0 ? "pre" : B, z = r.CodeTag, $ = z === void 0 ? "code" : z, W = r.code, E = W === void 0 ? (Array.isArray(s) ? s[0] : s) || "" : W, K = r.astGenerator, ne = oE(r, yE);
8135
+ } : d, f = r.useInlineStyles, m = f === void 0 ? !0 : f, y = r.showLineNumbers, b = y === void 0 ? !1 : y, S = r.showInlineLineNumbers, w = S === void 0 ? !0 : S, v = r.startingLineNumber, _ = v === void 0 ? 1 : v, A = r.lineNumberContainerStyle, I = r.lineNumberStyle, O = I === void 0 ? {} : I, M = r.wrapLines, k = r.wrapLongLines, C = k === void 0 ? !1 : k, x = r.lineProps, L = x === void 0 ? {} : x, U = r.renderer, B = r.PreTag, H = B === void 0 ? "pre" : B, z = r.CodeTag, $ = z === void 0 ? "code" : z, W = r.code, E = W === void 0 ? (Array.isArray(s) ? s[0] : s) || "" : W, K = r.astGenerator, ne = oE(r, yE);
8132
8136
  K = K || e;
8133
- var A = b ? /* @__PURE__ */ Ve.createElement(AE, {
8134
- containerStyle: T,
8137
+ var T = b ? /* @__PURE__ */ Ve.createElement(AE, {
8138
+ containerStyle: A,
8135
8139
  codeStyle: g.style || {},
8136
8140
  numberStyle: O,
8137
8141
  startingLineNumber: _,
@@ -8149,7 +8153,7 @@ function RE(e, t) {
8149
8153
  }, g.style) : g.style = ut({
8150
8154
  whiteSpace: "pre"
8151
8155
  }, g.style), !K)
8152
- return /* @__PURE__ */ Ve.createElement(H, te, A, /* @__PURE__ */ Ve.createElement($, g, E));
8156
+ return /* @__PURE__ */ Ve.createElement(H, te, T, /* @__PURE__ */ Ve.createElement($, g, E));
8153
8157
  (M === void 0 && U || C) && (M = !0), U = U || vE;
8154
8158
  var ke = [{
8155
8159
  type: "text",
@@ -8162,7 +8166,7 @@ function RE(e, t) {
8162
8166
  });
8163
8167
  de.language === null && (de.value = ke);
8164
8168
  var ve = (a = (i = E.match(/\n/g)) === null || i === void 0 ? void 0 : i.length) !== null && a !== void 0 ? a : 0, _e = _ + ve, j = kE(de, M, L, b, w, _, _e, O, C);
8165
- return /* @__PURE__ */ Ve.createElement(H, te, /* @__PURE__ */ Ve.createElement($, g, !w && A, U({
8169
+ return /* @__PURE__ */ Ve.createElement(H, te, /* @__PURE__ */ Ve.createElement($, g, !w && T, U({
8166
8170
  rows: j,
8167
8171
  stylesheet: u,
8168
8172
  useInlineStyles: m
@@ -8521,19 +8525,19 @@ function $E(e, t) {
8521
8525
  L === 88 || L === 120 ? (_ = "hexadecimal", v = ++w) : _ = "decimal";
8522
8526
  } else
8523
8527
  _ = "named";
8524
- let T = "", I = "", O = "";
8528
+ let A = "", I = "", O = "";
8525
8529
  const M = _ === "named" ? jc : _ === "decimal" ? Ep : PE;
8526
8530
  for (v--; ++v <= e.length; ) {
8527
8531
  const L = e.charCodeAt(v);
8528
8532
  if (!M(L))
8529
8533
  break;
8530
- O += String.fromCharCode(L), _ === "named" && FE.includes(O) && (T = O, I = ln(O));
8534
+ O += String.fromCharCode(L), _ === "named" && FE.includes(O) && (A = O, I = ln(O));
8531
8535
  }
8532
8536
  let k = e.charCodeAt(v) === 59;
8533
8537
  if (k) {
8534
8538
  v++;
8535
8539
  const L = _ === "named" ? ln(O) : !1;
8536
- L && (T = O, I = L);
8540
+ L && (A = O, I = L);
8537
8541
  }
8538
8542
  let C = 1 + v - S, x = "";
8539
8543
  if (!(!k && n.nonTerminated === !1)) if (!O)
@@ -8541,8 +8545,8 @@ function $E(e, t) {
8541
8545
  else if (_ === "named") {
8542
8546
  if (k && !I)
8543
8547
  m(5, 1);
8544
- else if (T !== O && (v = w + T.length, C = 1 + v - w, k = !1), !k) {
8545
- const L = T ? 1 : 3;
8548
+ else if (A !== O && (v = w + A.length, C = 1 + v - w, k = !1), !k) {
8549
+ const L = A ? 1 : 3;
8546
8550
  if (n.attribute) {
8547
8551
  const U = e.charCodeAt(v);
8548
8552
  U === 61 ? (m(L, C), I = "") : jc(U) ? I = "" : m(L, C);
@@ -8979,14 +8983,14 @@ function Sp(e, t, n, r, a, i) {
8979
8983
  if (d) {
8980
8984
  if (v = Vc(m, b, e, c), !v || v.index >= e.length)
8981
8985
  break;
8982
- var O = v.index, _ = v.index + v[0].length, T = b;
8983
- for (T += y.value.length; O >= T; )
8984
- y = y.next, T += y.value.length;
8985
- if (T -= y.value.length, b = T, y.value instanceof an)
8986
+ var O = v.index, _ = v.index + v[0].length, A = b;
8987
+ for (A += y.value.length; O >= A; )
8988
+ y = y.next, A += y.value.length;
8989
+ if (A -= y.value.length, b = A, y.value instanceof an)
8986
8990
  continue;
8987
- for (var I = y; I !== t.tail && (T < _ || typeof I.value == "string"); I = I.next)
8988
- w++, T += I.value.length;
8989
- w--, S = e.slice(b, T), v.index -= b;
8991
+ for (var I = y; I !== t.tail && (A < _ || typeof I.value == "string"); I = I.next)
8992
+ w++, A += I.value.length;
8993
+ w--, S = e.slice(b, A), v.index -= b;
8990
8994
  } else if (v = Vc(m, 0, S, c), !v)
8991
8995
  continue;
8992
8996
  var O = v.index, M = v[0], k = S.slice(0, O), C = S.slice(O + M.length), x = b + S.length;
@@ -11545,8 +11549,8 @@ jt.aliases = ["cs", "dotnet"];
11545
11549
  function jt(e) {
11546
11550
  e.register(X), function(t) {
11547
11551
  function n(E, K) {
11548
- return E.replace(/<<(\d+)>>/g, function(ne, A) {
11549
- return "(?:" + K[+A] + ")";
11552
+ return E.replace(/<<(\d+)>>/g, function(ne, T) {
11553
+ return "(?:" + K[+T] + ")";
11550
11554
  });
11551
11555
  }
11552
11556
  function r(E, K, ne) {
@@ -11598,7 +11602,7 @@ function jt(e) {
11598
11602
  ), _ = {
11599
11603
  keyword: l,
11600
11604
  punctuation: /[<>()?,.:[\]]/
11601
- }, T = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source, I = /"(?:\\.|[^\\"\r\n])*"/.source, O = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
11605
+ }, A = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source, I = /"(?:\\.|[^\\"\r\n])*"/.source, O = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
11602
11606
  t.languages.csharp = t.languages.extend("clike", {
11603
11607
  string: [
11604
11608
  {
@@ -11808,7 +11812,7 @@ function jt(e) {
11808
11812
  }
11809
11813
  }
11810
11814
  });
11811
- var M = I + "|" + T, k = n(
11815
+ var M = I + "|" + A, k = n(
11812
11816
  /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
11813
11817
  [M]
11814
11818
  ), C = a(
@@ -11915,7 +11919,7 @@ function jt(e) {
11915
11919
  }
11916
11920
  ],
11917
11921
  char: {
11918
- pattern: RegExp(T),
11922
+ pattern: RegExp(A),
11919
11923
  greedy: !0
11920
11924
  }
11921
11925
  }), t.languages.dotnet = t.languages.cs = t.languages.csharp;
@@ -19604,15 +19608,15 @@ function Jo(e) {
19604
19608
  ) !== -1; )
19605
19609
  ;
19606
19610
  return w[k] = M, k;
19607
- }).join(""), _ = u(v, m, y), T = Object.keys(w);
19611
+ }).join(""), _ = u(v, m, y), A = Object.keys(w);
19608
19612
  S = 0;
19609
19613
  function I(O) {
19610
19614
  for (var M = 0; M < O.length; M++) {
19611
- if (S >= T.length)
19615
+ if (S >= A.length)
19612
19616
  return;
19613
19617
  var k = O[M];
19614
19618
  if (typeof k == "string" || typeof k.content == "string") {
19615
- var C = T[S], x = typeof k == "string" ? k : (
19619
+ var C = A[S], x = typeof k == "string" ? k : (
19616
19620
  /** @type {string} */
19617
19621
  k.content
19618
19622
  ), L = x.indexOf(C);
@@ -19663,10 +19667,10 @@ function Jo(e) {
19663
19667
  if (w.type === "template-string") {
19664
19668
  var _ = v[1];
19665
19669
  if (v.length === 3 && typeof _ != "string" && _.type === "embedded-code") {
19666
- var T = g(_), I = _.alias, O = Array.isArray(I) ? I[0] : I, M = t.languages[O];
19670
+ var A = g(_), I = _.alias, O = Array.isArray(I) ? I[0] : I, M = t.languages[O];
19667
19671
  if (!M)
19668
19672
  continue;
19669
- v[1] = c(T, M, O);
19673
+ v[1] = c(A, M, O);
19670
19674
  }
19671
19675
  } else
19672
19676
  m(v);
@@ -29340,11 +29344,11 @@ function rS(e, t, n) {
29340
29344
  input: w.input,
29341
29345
  stack: [...p, u]
29342
29346
  };
29343
- let T = g(...w, _);
29344
- if (typeof T == "string" && (T = T.length > 0 ? { type: "text", value: T } : void 0), T === !1 ? d.lastIndex = v + 1 : (f !== v && S.push({
29347
+ let A = g(...w, _);
29348
+ if (typeof A == "string" && (A = A.length > 0 ? { type: "text", value: A } : void 0), A === !1 ? d.lastIndex = v + 1 : (f !== v && S.push({
29345
29349
  type: "text",
29346
29350
  value: u.value.slice(f, v)
29347
- }), Array.isArray(T) ? S.push(...T) : T && S.push(T), f = v + w[0].length, b = !0), !d.global)
29351
+ }), Array.isArray(A) ? S.push(...A) : A && S.push(A), f = v + w[0].length, b = !0), !d.global)
29348
29352
  break;
29349
29353
  w = d.exec(u.value);
29350
29354
  }
@@ -29679,8 +29683,8 @@ function US(e, t) {
29679
29683
  const S = m[c] || "";
29680
29684
  let w = "", v = "";
29681
29685
  if (n.alignDelimiters !== !1) {
29682
- const _ = l[c] - (y[c] || 0), T = i[c];
29683
- T === 114 ? w = " ".repeat(_) : T === 99 ? _ % 2 ? (w = " ".repeat(_ / 2 + 0.5), v = " ".repeat(_ / 2 - 0.5)) : (w = " ".repeat(_ / 2), v = w) : v = " ".repeat(_);
29686
+ const _ = l[c] - (y[c] || 0), A = i[c];
29687
+ A === 114 ? w = " ".repeat(_) : A === 99 ? _ % 2 ? (w = " ".repeat(_ / 2 + 0.5), v = " ".repeat(_ / 2 - 0.5)) : (w = " ".repeat(_ / 2), v = w) : v = " ".repeat(_);
29684
29688
  }
29685
29689
  n.delimiterStart !== !1 && !c && b.push("|"), n.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
29686
29690
  // empty: there will be a closing space.
@@ -31042,8 +31046,8 @@ function nA(e, t, n) {
31042
31046
  U === "linePrefix") C--;
31043
31047
  else break;
31044
31048
  }
31045
- const x = C > -1 ? r.events[C][1].type : null, L = x === "tableHead" || x === "tableRow" ? T : l;
31046
- return L === T && r.parser.lazy[r.now().line] ? n(k) : L(k);
31049
+ const x = C > -1 ? r.events[C][1].type : null, L = x === "tableHead" || x === "tableRow" ? A : l;
31050
+ return L === A && r.parser.lazy[r.now().line] ? n(k) : L(k);
31047
31051
  }
31048
31052
  function l(k) {
31049
31053
  return e.enter("tableHead"), e.enter("tableRow"), u(k);
@@ -31087,7 +31091,7 @@ function nA(e, t, n) {
31087
31091
  function _(k) {
31088
31092
  return n(k);
31089
31093
  }
31090
- function T(k) {
31094
+ function A(k) {
31091
31095
  return e.enter("tableRow"), I(k);
31092
31096
  }
31093
31097
  function I(k) {
@@ -32122,7 +32126,7 @@ var PA = "DismissableLayer", ua = "dismissableLayer.update", UA = "dismissableLa
32122
32126
  } = e, u = R.useContext(Zp), [p, c] = R.useState(null), d = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = R.useState({}), f = bt(t, (I) => c(I)), m = Array.from(u.layers), [y] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), b = m.indexOf(y), S = p ? m.indexOf(p) : -1, w = u.layersWithOutsidePointerEventsDisabled.size > 0, v = S >= b, _ = GA((I) => {
32123
32127
  const O = I.target, M = [...u.branches].some((k) => k.contains(O));
32124
32128
  !v || M || (a == null || a(I), o == null || o(I), I.defaultPrevented || s == null || s());
32125
- }, d), T = HA((I) => {
32129
+ }, d), A = HA((I) => {
32126
32130
  const O = I.target;
32127
32131
  [...u.branches].some((k) => k.contains(O)) || (i == null || i(I), o == null || o(I), I.defaultPrevented || s == null || s());
32128
32132
  }, d);
@@ -32147,8 +32151,8 @@ var PA = "DismissableLayer", ua = "dismissableLayer.update", UA = "dismissableLa
32147
32151
  pointerEvents: w ? v ? "auto" : "none" : void 0,
32148
32152
  ...e.style
32149
32153
  },
32150
- onFocusCapture: ct(e.onFocusCapture, T.onFocusCapture),
32151
- onBlurCapture: ct(e.onBlurCapture, T.onBlurCapture),
32154
+ onFocusCapture: ct(e.onFocusCapture, A.onFocusCapture),
32155
+ onBlurCapture: ct(e.onBlurCapture, A.onBlurCapture),
32152
32156
  onPointerDownCapture: ct(
32153
32157
  e.onPointerDownCapture,
32154
32158
  _.onPointerDownCapture
@@ -32653,9 +32657,9 @@ const gT = (e) => ({
32653
32657
  const c = ng(p), d = {
32654
32658
  x: n,
32655
32659
  y: r
32656
- }, g = Bu(a), f = Uu(g), m = await o.getDimensions(u), y = g === "y", b = y ? "top" : "left", S = y ? "bottom" : "right", w = y ? "clientHeight" : "clientWidth", v = i.reference[f] + i.reference[g] - d[g] - i.floating[f], _ = d[g] - i.reference[g], T = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(u));
32657
- let I = T ? T[w] : 0;
32658
- (!I || !await (o.isElement == null ? void 0 : o.isElement(T))) && (I = s.floating[w] || i.floating[f]);
32660
+ }, g = Bu(a), f = Uu(g), m = await o.getDimensions(u), y = g === "y", b = y ? "top" : "left", S = y ? "bottom" : "right", w = y ? "clientHeight" : "clientWidth", v = i.reference[f] + i.reference[g] - d[g] - i.floating[f], _ = d[g] - i.reference[g], A = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(u));
32661
+ let I = A ? A[w] : 0;
32662
+ (!I || !await (o.isElement == null ? void 0 : o.isElement(A))) && (I = s.floating[w] || i.floating[f]);
32659
32663
  const O = v / 2 - _ / 2, M = I / 2 - m[f] / 2 - 1, k = pt(c[b], M), C = pt(c[S], M), x = k, L = I - m[f] - C, U = I / 2 - m[f] / 2 + O, B = ca(x, U, L), H = !l.arrow && Kt(a) != null && U !== B && i.reference[f] / 2 - (U < x ? k : C) - m[f] / 2 < 0, z = H ? U < x ? U - x : U - L : 0;
32660
32664
  return {
32661
32665
  [g]: d[g] + z,
@@ -32693,8 +32697,8 @@ const gT = (e) => ({
32693
32697
  } = rt(e, t);
32694
32698
  if ((n = i.arrow) != null && n.alignmentOffset)
32695
32699
  return {};
32696
- const b = at(a), S = qe(s), w = at(s) === s, v = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), _ = d || (w || !m ? [Xn(s)] : oT(s)), T = f !== "none";
32697
- !d && T && _.push(...cT(s, m, f, v));
32700
+ const b = at(a), S = qe(s), w = at(s) === s, v = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), _ = d || (w || !m ? [Xn(s)] : oT(s)), A = f !== "none";
32701
+ !d && A && _.push(...cT(s, m, f, v));
32698
32702
  const I = [s, ..._], O = await pn(t, y), M = [];
32699
32703
  let k = ((r = i.flip) == null ? void 0 : r.overflows) || [];
32700
32704
  if (p && M.push(O[b]), c) {
@@ -32725,7 +32729,7 @@ const gT = (e) => ({
32725
32729
  case "bestFit": {
32726
32730
  var L;
32727
32731
  const z = (L = k.filter(($) => {
32728
- if (T) {
32732
+ if (A) {
32729
32733
  const W = qe($.placement);
32730
32734
  return W === S || // Create a bias to the `y` side axis due to horizontal
32731
32735
  // reading directions favoring greater width.
@@ -32942,8 +32946,8 @@ const hT = function(e) {
32942
32946
  }
32943
32947
  if (u) {
32944
32948
  var b, S;
32945
- const w = d === "y" ? "width" : "height", v = rg.has(at(a)), _ = i.reference[c] - i.floating[w] + (v && ((b = o.offset) == null ? void 0 : b[c]) || 0) + (v ? 0 : y.crossAxis), T = i.reference[c] + i.reference[w] + (v ? 0 : ((S = o.offset) == null ? void 0 : S[c]) || 0) - (v ? y.crossAxis : 0);
32946
- f < _ ? f = _ : f > T && (f = T);
32949
+ const w = d === "y" ? "width" : "height", v = rg.has(at(a)), _ = i.reference[c] - i.floating[w] + (v && ((b = o.offset) == null ? void 0 : b[c]) || 0) + (v ? 0 : y.crossAxis), A = i.reference[c] + i.reference[w] + (v ? 0 : ((S = o.offset) == null ? void 0 : S[c]) || 0) - (v ? y.crossAxis : 0);
32950
+ f < _ ? f = _ : f > A && (f = A);
32947
32951
  }
32948
32952
  return {
32949
32953
  [d]: g,
@@ -32972,9 +32976,9 @@ const hT = function(e) {
32972
32976
  } = i.floating;
32973
32977
  let y, b;
32974
32978
  c === "top" || c === "bottom" ? (y = c, b = d === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (b = c, y = d === "end" ? "top" : "bottom");
32975
- const S = m - p.top - p.bottom, w = f - p.left - p.right, v = pt(m - p[y], S), _ = pt(f - p[b], w), T = !t.middlewareData.shift;
32979
+ const S = m - p.top - p.bottom, w = f - p.left - p.right, v = pt(m - p[y], S), _ = pt(f - p[b], w), A = !t.middlewareData.shift;
32976
32980
  let I = v, O = _;
32977
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = w), (r = t.middlewareData.shift) != null && r.enabled.y && (I = S), T && !d) {
32981
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = w), (r = t.middlewareData.shift) != null && r.enabled.y && (I = S), A && !d) {
32978
32982
  const k = Oe(p.left, 0), C = Oe(p.right, 0), x = Oe(p.top, 0), L = Oe(p.bottom, 0);
32979
32983
  g ? O = f - 2 * (k !== 0 || C !== 0 ? k + C : Oe(p.left, p.right)) : I = m - 2 * (x !== 0 || L !== 0 ? x + L : Oe(p.top, p.bottom));
32980
32984
  }
@@ -33419,8 +33423,8 @@ function VT(e, t) {
33419
33423
  threshold: Oe(0, pt(1, l)) || 1
33420
33424
  };
33421
33425
  let v = !0;
33422
- function _(T) {
33423
- const I = T[0].intersectionRatio;
33426
+ function _(A) {
33427
+ const I = A[0].intersectionRatio;
33424
33428
  if (I !== l) {
33425
33429
  if (!v)
33426
33430
  return o();
@@ -33561,18 +33565,18 @@ function nk(e) {
33561
33565
  }), [d, g] = R.useState(r);
33562
33566
  Qn(d, r) || g(r);
33563
33567
  const [f, m] = R.useState(null), [y, b] = R.useState(null), S = R.useCallback(($) => {
33564
- $ !== T.current && (T.current = $, m($));
33568
+ $ !== A.current && (A.current = $, m($));
33565
33569
  }, []), w = R.useCallback(($) => {
33566
33570
  $ !== I.current && (I.current = $, b($));
33567
- }, []), v = i || f, _ = o || y, T = R.useRef(null), I = R.useRef(null), O = R.useRef(p), M = l != null, k = zr(l), C = zr(a), x = zr(u), L = R.useCallback(() => {
33568
- if (!T.current || !I.current)
33571
+ }, []), v = i || f, _ = o || y, A = R.useRef(null), I = R.useRef(null), O = R.useRef(p), M = l != null, k = zr(l), C = zr(a), x = zr(u), L = R.useCallback(() => {
33572
+ if (!A.current || !I.current)
33569
33573
  return;
33570
33574
  const $ = {
33571
33575
  placement: t,
33572
33576
  strategy: n,
33573
33577
  middleware: d
33574
33578
  };
33575
- C.current && ($.platform = C.current), JT(T.current, I.current, $).then((W) => {
33579
+ C.current && ($.platform = C.current), JT(A.current, I.current, $).then((W) => {
33576
33580
  const E = {
33577
33581
  ...W,
33578
33582
  // The floating element's position may be recomputed while it's closed
@@ -33596,14 +33600,14 @@ function nk(e) {
33596
33600
  $n(() => (U.current = !0, () => {
33597
33601
  U.current = !1;
33598
33602
  }), []), $n(() => {
33599
- if (v && (T.current = v), _ && (I.current = _), v && _) {
33603
+ if (v && (A.current = v), _ && (I.current = _), v && _) {
33600
33604
  if (k.current)
33601
33605
  return k.current(v, _, L);
33602
33606
  L();
33603
33607
  }
33604
33608
  }, [v, _, L, k, M]);
33605
33609
  const B = R.useMemo(() => ({
33606
- reference: T,
33610
+ reference: A,
33607
33611
  floating: I,
33608
33612
  setReference: S,
33609
33613
  setFloating: w
@@ -33754,7 +33758,7 @@ var ju = "PopperContent", [mk, bk] = fg(ju), Sg = R.forwardRef(
33754
33758
  updatePositionStrategy: g = "optimized",
33755
33759
  onPlaced: f,
33756
33760
  ...m
33757
- } = e, y = bg(ju, n), [b, S] = R.useState(null), w = bt(t, (me) => S(me)), [v, _] = R.useState(null), T = gk(v), I = (T == null ? void 0 : T.width) ?? 0, O = (T == null ? void 0 : T.height) ?? 0, M = r + (i !== "center" ? "-" + i : ""), k = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, C = Array.isArray(u) ? u : [u], x = C.length > 0, L = {
33761
+ } = e, y = bg(ju, n), [b, S] = R.useState(null), w = bt(t, (me) => S(me)), [v, _] = R.useState(null), A = gk(v), I = (A == null ? void 0 : A.width) ?? 0, O = (A == null ? void 0 : A.height) ?? 0, M = r + (i !== "center" ? "-" + i : ""), k = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, C = Array.isArray(u) ? u : [u], x = C.length > 0, L = {
33758
33762
  padding: k,
33759
33763
  boundary: C.filter(yk),
33760
33764
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -33793,7 +33797,7 @@ var ju = "PopperContent", [mk, bk] = fg(ju), Sg = R.forwardRef(
33793
33797
  dt(() => {
33794
33798
  z && (K == null || K());
33795
33799
  }, [z, K]);
33796
- const ne = (ke = $.arrow) == null ? void 0 : ke.x, A = (de = $.arrow) == null ? void 0 : de.y, oe = ((ve = $.arrow) == null ? void 0 : ve.centerOffset) !== 0, [Ae, te] = R.useState();
33800
+ const ne = (ke = $.arrow) == null ? void 0 : ke.x, T = (de = $.arrow) == null ? void 0 : de.y, oe = ((ve = $.arrow) == null ? void 0 : ve.centerOffset) !== 0, [Ae, te] = R.useState();
33797
33801
  return dt(() => {
33798
33802
  b && te(window.getComputedStyle(b).zIndex);
33799
33803
  }, [b]), /* @__PURE__ */ P(
@@ -33827,7 +33831,7 @@ var ju = "PopperContent", [mk, bk] = fg(ju), Sg = R.forwardRef(
33827
33831
  placedSide: W,
33828
33832
  onArrowChange: _,
33829
33833
  arrowX: ne,
33830
- arrowY: A,
33834
+ arrowY: T,
33831
33835
  shouldHideArrow: oe,
33832
33836
  children: /* @__PURE__ */ P(
33833
33837
  ot.div,
@@ -34238,12 +34242,12 @@ var Ng = Hk(), jr = function() {
34238
34242
  onScrollCapture: jr,
34239
34243
  onWheelCapture: jr,
34240
34244
  onTouchMoveCapture: jr
34241
- }), a = r[0], i = r[1], o = e.forwardProps, s = e.children, l = e.className, u = e.removeScrollBar, p = e.enabled, c = e.shards, d = e.sideCar, g = e.noRelative, f = e.noIsolation, m = e.inert, y = e.allowPinchZoom, b = e.as, S = b === void 0 ? "div" : b, w = e.gapMode, v = Rg(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), _ = d, T = $k([n, t]), I = We(We({}, v), a);
34245
+ }), a = r[0], i = r[1], o = e.forwardProps, s = e.children, l = e.className, u = e.removeScrollBar, p = e.enabled, c = e.shards, d = e.sideCar, g = e.noRelative, f = e.noIsolation, m = e.inert, y = e.allowPinchZoom, b = e.as, S = b === void 0 ? "div" : b, w = e.gapMode, v = Rg(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), _ = d, A = $k([n, t]), I = We(We({}, v), a);
34242
34246
  return R.createElement(
34243
34247
  R.Fragment,
34244
34248
  null,
34245
34249
  p && R.createElement(_, { sideCar: Ng, removeScrollBar: u, shards: c, noRelative: g, noIsolation: f, inert: m, setCallbacks: i, allowPinchZoom: !!y, lockRef: n, gapMode: w }),
34246
- o ? R.cloneElement(R.Children.only(s), We(We({}, I), { ref: T })) : R.createElement(S, We({}, I, { className: l, ref: T }), s)
34250
+ o ? R.cloneElement(R.Children.only(s), We(We({}, I), { ref: A })) : R.createElement(S, We({}, I, { className: l, ref: A }), s)
34247
34251
  );
34248
34252
  });
34249
34253
  Er.defaultProps = {
@@ -34489,16 +34493,16 @@ function fv(e) {
34489
34493
  var s = R.useCallback(function(m, y) {
34490
34494
  if ("touches" in m && m.touches.length === 2 || m.type === "wheel" && m.ctrlKey)
34491
34495
  return !o.current.allowPinchZoom;
34492
- var b = Mn(m), S = n.current, w = "deltaX" in m ? m.deltaX : S[0] - b[0], v = "deltaY" in m ? m.deltaY : S[1] - b[1], _, T = m.target, I = Math.abs(w) > Math.abs(v) ? "h" : "v";
34493
- if ("touches" in m && I === "h" && T.type === "range")
34496
+ var b = Mn(m), S = n.current, w = "deltaX" in m ? m.deltaX : S[0] - b[0], v = "deltaY" in m ? m.deltaY : S[1] - b[1], _, A = m.target, I = Math.abs(w) > Math.abs(v) ? "h" : "v";
34497
+ if ("touches" in m && I === "h" && A.type === "range")
34494
34498
  return !1;
34495
- var O = window.getSelection(), M = O && O.anchorNode, k = M ? M === T || M.contains(T) : !1;
34499
+ var O = window.getSelection(), M = O && O.anchorNode, k = M ? M === A || M.contains(A) : !1;
34496
34500
  if (k)
34497
34501
  return !1;
34498
- var C = Ad(I, T);
34502
+ var C = Ad(I, A);
34499
34503
  if (!C)
34500
34504
  return !0;
34501
- if (C ? _ = I : (_ = I === "v" ? "h" : "v", C = Ad(I, T)), !C)
34505
+ if (C ? _ = I : (_ = I === "v" ? "h" : "v", C = Ad(I, A)), !C)
34502
34506
  return !1;
34503
34507
  if (!r.current && "changedTouches" in m && (w || v) && (r.current = _), !_)
34504
34508
  return !0;
@@ -34952,7 +34956,7 @@ const xv = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
34952
34956
  memories: s
34953
34957
  }) => {
34954
34958
  var _e;
34955
- const [l, u] = Q(""), [p, c] = Q(""), [d, g] = Q(""), [f, m] = Q(!1), [y, b] = Q(0), [S, w] = Q(0), [v, _] = Q(null), [T, I] = Q(0), [O, M] = Q(null), k = Be(null), C = Be(null), x = Be(!1), [L, U] = Q([]), B = Be(/* @__PURE__ */ new Map()), H = Ft(() => {
34959
+ const [l, u] = Q(""), [p, c] = Q(""), [d, g] = Q(""), [f, m] = Q(!1), [y, b] = Q(0), [S, w] = Q(0), [v, _] = Q(null), [A, I] = Q(0), [O, M] = Q(null), k = Be(null), C = Be(null), x = Be(!1), [L, U] = Q([]), B = Be(/* @__PURE__ */ new Map()), H = Ft(() => {
34956
34960
  const j = /* @__PURE__ */ new Map();
34957
34961
  return B.current.forEach((ee, me) => {
34958
34962
  j.set(me, ee);
@@ -35003,7 +35007,7 @@ const xv = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
35003
35007
  }, [O, t, n]), ge(() => {
35004
35008
  (d !== "" || O !== null) && n(d);
35005
35009
  }, [d, O, n]);
35006
- const { getCaretPosition: K, setCaretPosition: ne, getPlainText: A } = SA(k), { updateContent: oe, haveMentionsChanged: Ae, updateMentionSignature: te } = TA({
35010
+ const { getCaretPosition: K, setCaretPosition: ne, getPlainText: T } = SA(k), { updateContent: oe, haveMentionsChanged: Ae, updateMentionSignature: te } = TA({
35007
35011
  editableRef: k,
35008
35012
  options: H,
35009
35013
  mentionClassName: dn.mention,
@@ -35042,17 +35046,17 @@ const xv = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
35042
35046
  );
35043
35047
  },
35044
35048
  onEnter: () => {
35045
- ke(T);
35049
+ ke(A);
35046
35050
  },
35047
35051
  onEscape: () => {
35048
35052
  O ? M(null) : E();
35049
35053
  }
35050
35054
  }), ve = ue(() => {
35051
35055
  if (x.current) return;
35052
- const j = A(), ee = K();
35056
+ const j = T(), ee = K();
35053
35057
  u(j), e(j), $(j), b(ee), W(j, ee), (Ae(j) || j.trim() === "") && oe(j, !0);
35054
35058
  }, [
35055
- A,
35059
+ T,
35056
35060
  K,
35057
35061
  W,
35058
35062
  e,
@@ -35065,8 +35069,8 @@ const xv = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
35065
35069
  k.current && !k.current.textContent && (te(l), oe(l, !1));
35066
35070
  }, [l, oe, te]), ge(() => {
35067
35071
  if (!k.current) return;
35068
- A() !== l && !x.current && (te(l), oe(l, !0));
35069
- }, [l, A, oe, te]), ma(() => {
35072
+ T() !== l && !x.current && (te(l), oe(l, !0));
35073
+ }, [l, T, oe, te]), ma(() => {
35070
35074
  if (!f || !C.current) {
35071
35075
  _(null);
35072
35076
  return;
@@ -35104,7 +35108,7 @@ const xv = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
35104
35108
  {
35105
35109
  isOpen: f,
35106
35110
  options: z,
35107
- highlightedIndex: T,
35111
+ highlightedIndex: A,
35108
35112
  onSelect: ke,
35109
35113
  caretElement: v,
35110
35114
  query: p,
@@ -35129,38 +35133,42 @@ const xv = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
35129
35133
  }, Qv = ({
35130
35134
  height: e = "100vh",
35131
35135
  fetchListMemoryTypesClientSecret: t,
35132
- fetchListMemoriesClientSecret: n
35136
+ fetchListMemoriesClientSecret: n,
35137
+ fetchCreateAgentTaskClientSecret: r,
35138
+ fetchCreateStreamClientSecret: a
35133
35139
  }) => {
35134
- const { createAgentTask: r, agentTasks: a } = hf({
35135
- onAgentTaskReasoningChunk: (v) => {
35136
- console.log("agent task reasoning chunk", v);
35140
+ const { createAgentTask: i, agentTasks: o } = hf({
35141
+ fetchCreateStreamClientSecret: a,
35142
+ fetchCreateAgentTaskClientSecret: r,
35143
+ onAgentTaskReasoningChunk: (A) => {
35144
+ console.log("agent task reasoning chunk", A);
35137
35145
  }
35138
- }), [i, o] = Q(""), [s, l] = Q(null), [u, p] = Q(null), { listFirstPage: c } = kf(), { listFirstPage: d } = Tf(), [g, f] = Q(
35146
+ }), [s, l] = Q(""), [u, p] = Q(null), [c, d] = Q(null), { listFirstPage: g } = kf(), { listFirstPage: f } = Tf(), [m, y] = Q(
35139
35147
  null
35140
- ), [m, y] = Q(null), [b, S] = Q([]), w = Be(!1);
35148
+ ), [b, S] = Q(null), [w, v] = Q([]), _ = Be(!1);
35141
35149
  return ge(() => {
35142
- const v = a.map((_) => ({
35143
- id: _.streamId,
35144
- markdown: _.reasoning || ""
35150
+ const A = o.map((I) => ({
35151
+ id: I.streamId,
35152
+ markdown: I.reasoning || ""
35145
35153
  }));
35146
- S(v);
35147
- }, [a]), ge(() => {
35148
- w.current || (w.current = !0, c({
35154
+ v(A);
35155
+ }, [o]), ge(() => {
35156
+ _.current || (_.current = !0, g({
35149
35157
  fetchClientSecret: t
35150
- }).then((v) => {
35151
- v.type === "success" && f(v.page.items);
35158
+ }).then((A) => {
35159
+ A.type === "success" && y(A.page.items);
35152
35160
  }));
35153
- }, [c, t]), ge(() => {
35154
- s === null && i === "" || d({
35161
+ }, [g, t]), ge(() => {
35162
+ u === null && s === "" || f({
35155
35163
  fetchClientSecret: n,
35156
- typeId: s ?? void 0,
35157
- memoryIds: u ?? void 0,
35158
- title: i,
35164
+ typeId: u ?? void 0,
35165
+ memoryIds: c ?? void 0,
35166
+ title: s,
35159
35167
  meta: {}
35160
- }).then((v) => {
35161
- v.type === "success" && y(v.page.items);
35168
+ }).then((A) => {
35169
+ A.type === "success" && S(A.page.items);
35162
35170
  });
35163
- }, [s, u, i]), /* @__PURE__ */ Le(
35171
+ }, [u, c, s]), /* @__PURE__ */ Le(
35164
35172
  "div",
35165
35173
  {
35166
35174
  style: {
@@ -35171,27 +35179,27 @@ const xv = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
35171
35179
  overflow: "hidden"
35172
35180
  },
35173
35181
  children: [
35174
- /* @__PURE__ */ P(pA, { messages: b }),
35182
+ /* @__PURE__ */ P(pA, { messages: w }),
35175
35183
  /* @__PURE__ */ P(
35176
35184
  jv,
35177
35185
  {
35178
- memoryTypes: g ?? [],
35179
- memories: m ?? [],
35180
- onMemoryTypeChange: (v) => {
35181
- l(v);
35186
+ memoryTypes: m ?? [],
35187
+ memories: b ?? [],
35188
+ onMemoryTypeChange: (A) => {
35189
+ p(A);
35182
35190
  },
35183
- onTitleQueryChange: (v) => {
35184
- o(v);
35191
+ onTitleQueryChange: (A) => {
35192
+ l(A);
35185
35193
  },
35186
35194
  onChange: () => {
35187
35195
  },
35188
- onMentionChange: (v) => {
35189
- p(v);
35196
+ onMentionChange: (A) => {
35197
+ d(A);
35190
35198
  },
35191
35199
  onChangeMentionPlaceholders: () => {
35192
35200
  },
35193
- onSubmit: (v) => {
35194
- r({ queryText: v });
35201
+ onSubmit: (A) => {
35202
+ i({ queryText: A });
35195
35203
  }
35196
35204
  }
35197
35205
  )
@@ -35211,29 +35219,30 @@ function Jv({ fency: e, children: t }) {
35211
35219
  });
35212
35220
  }, [e]);
35213
35221
  const c = ue(
35214
- async (g = 3e4) => {
35222
+ async (g, f = 3e4) => {
35215
35223
  if (p.current)
35216
35224
  return p.current;
35217
- const f = Date.now();
35218
- if (l && f - l.createdAt < g)
35225
+ const m = Date.now();
35226
+ if (l && m - l.createdAt < f)
35219
35227
  return l.stream;
35220
- const m = (async () => {
35228
+ const y = (async () => {
35221
35229
  if (!n)
35222
35230
  throw new Error("Fency instance not initialized");
35223
- const y = await Jg({
35231
+ const b = await g(), S = await Jg({
35224
35232
  pk: n.publishableKey,
35225
- baseUrl: n.baseUrl
35233
+ baseUrl: n.baseUrl,
35234
+ clientSecret: b == null ? void 0 : b.clientSecret
35226
35235
  });
35227
- if (y.type === "success") {
35228
- const b = {
35229
- stream: y.stream,
35236
+ if (S.type === "success") {
35237
+ const w = {
35238
+ stream: S.stream,
35230
35239
  createdAt: Date.now()
35231
35240
  };
35232
- return u(b), p.current = null, y.stream;
35241
+ return u(w), p.current = null, S.stream;
35233
35242
  } else
35234
35243
  throw p.current = null, new Error("Failed to create stream");
35235
35244
  })();
35236
- return p.current = m, m;
35245
+ return p.current = y, y;
35237
35246
  },
35238
35247
  [n, l]
35239
35248
  );