@inploi/plugin-chatbot 3.10.1 → 3.12.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.
@@ -4,8 +4,8 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { NotFoundError, createPlugin } from "@inploi/sdk";
8
- var n$2, l$4, u$3, t$3, i$3, o$4, r$4, f$3, e$3, c$3 = {}, s$3 = [], a$3 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, h$2 = Array.isArray;
7
+ import { createPlugin } from "@inploi/sdk";
8
+ var n$1, l$4, u$3, t$3, i$3, o$4, r$4, f$3, e$3, c$3 = {}, s$3 = [], a$3 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, h$2 = Array.isArray;
9
9
  function v$3(n2, l2) {
10
10
  for (var u2 in l2)
11
11
  n2[u2] = l2[u2];
@@ -19,7 +19,7 @@ function y$3(l2, u2, t2) {
19
19
  var i2, o2, r2, f2 = {};
20
20
  for (r2 in u2)
21
21
  "key" == r2 ? i2 = u2[r2] : "ref" == r2 ? o2 = u2[r2] : f2[r2] = u2[r2];
22
- if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n$2.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps)
22
+ if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n$1.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps)
23
23
  for (r2 in l2.defaultProps)
24
24
  void 0 === f2[r2] && (f2[r2] = l2.defaultProps[r2]);
25
25
  return d$4(l2, f2, i2, o2, null);
@@ -217,7 +217,7 @@ function N$2(l2, u2, t2, i2, o2, r2, f2, e2, s2) {
217
217
  if (null === k2)
218
218
  d2 === _2 || e2 && l2.data === _2 || (l2.data = _2);
219
219
  else {
220
- if (r2 = r2 && n$2.call(l2.childNodes), v2 = (d2 = t2.props || c$3).dangerouslySetInnerHTML, y2 = _2.dangerouslySetInnerHTML, !e2) {
220
+ if (r2 = r2 && n$1.call(l2.childNodes), v2 = (d2 = t2.props || c$3).dangerouslySetInnerHTML, y2 = _2.dangerouslySetInnerHTML, !e2) {
221
221
  if (null != r2)
222
222
  for (d2 = {}, b2 = 0; b2 < l2.attributes.length; b2++)
223
223
  d2[l2.attributes[b2].name] = l2.attributes[b2].value;
@@ -260,7 +260,7 @@ function B$3(n2, l2, u2) {
260
260
  }
261
261
  function D$1(u2, t2, i2) {
262
262
  var o2, r2, f2, e2;
263
- l$4.__ && l$4.__(u2, t2), r2 = (o2 = "function" == typeof i2) ? null : i2 && i2.__k || t2.__k, f2 = [], e2 = [], L$1(t2, u2 = (!o2 && i2 || t2).__k = y$3(k$3, null, [u2]), r2 || c$3, c$3, void 0 !== t2.ownerSVGElement, !o2 && i2 ? [i2] : r2 ? null : t2.firstChild ? n$2.call(t2.childNodes) : null, f2, !o2 && i2 ? i2 : r2 ? r2.__e : t2.firstChild, o2, e2), M$1(f2, u2, e2);
263
+ l$4.__ && l$4.__(u2, t2), r2 = (o2 = "function" == typeof i2) ? null : i2 && i2.__k || t2.__k, f2 = [], e2 = [], L$1(t2, u2 = (!o2 && i2 || t2).__k = y$3(k$3, null, [u2]), r2 || c$3, c$3, void 0 !== t2.ownerSVGElement, !o2 && i2 ? [i2] : r2 ? null : t2.firstChild ? n$1.call(t2.childNodes) : null, f2, !o2 && i2 ? i2 : r2 ? r2.__e : t2.firstChild, o2, e2), M$1(f2, u2, e2);
264
264
  }
265
265
  function E$3(n2, l2) {
266
266
  D$1(n2, l2, E$3);
@@ -269,7 +269,7 @@ function F$2(l2, u2, t2) {
269
269
  var i2, o2, r2, f2, e2 = v$3({}, l2.props);
270
270
  for (r2 in l2.type && l2.type.defaultProps && (f2 = l2.type.defaultProps), u2)
271
271
  "key" == r2 ? i2 = u2[r2] : "ref" == r2 ? o2 = u2[r2] : e2[r2] = void 0 === u2[r2] && void 0 !== f2 ? f2[r2] : u2[r2];
272
- return arguments.length > 2 && (e2.children = arguments.length > 3 ? n$2.call(arguments, 2) : t2), d$4(l2.type, e2, i2 || l2.key, o2 || l2.ref, null);
272
+ return arguments.length > 2 && (e2.children = arguments.length > 3 ? n$1.call(arguments, 2) : t2), d$4(l2.type, e2, i2 || l2.key, o2 || l2.ref, null);
273
273
  }
274
274
  function G$1(n2, l2) {
275
275
  var u2 = { __c: l2 = "__cC" + e$3++, __: n2, Consumer: function(n3, l3) {
@@ -292,7 +292,7 @@ function G$1(n2, l2) {
292
292
  } };
293
293
  return u2.Provider.__ = u2.Consumer.contextType = u2;
294
294
  }
295
- n$2 = s$3.slice, l$4 = { __e: function(n2, l2, u2, t2) {
295
+ n$1 = s$3.slice, l$4 = { __e: function(n2, l2, u2, t2) {
296
296
  for (var i2, o2, r2; l2 = l2.__; )
297
297
  if ((i2 = l2.__c) && !i2.__)
298
298
  try {
@@ -312,731 +312,507 @@ n$2 = s$3.slice, l$4 = { __e: function(n2, l2, u2, t2) {
312
312
  }, b$3.prototype.render = k$3, i$3 = [], r$4 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$3 = function(n2, l2) {
313
313
  return n2.__v.__b - l2.__v.__b;
314
314
  }, x$4.__r = 0, e$3 = 0;
315
- var t$2, r$3, u$2, i$2, o$3 = 0, f$2 = [], c$2 = [], e$2 = l$4.__b, a$2 = l$4.__r, v$2 = l$4.diffed, l$3 = l$4.__c, m$2 = l$4.unmount;
316
- function d$3(t2, u2) {
317
- l$4.__h && l$4.__h(r$3, t2, o$3 || u2), o$3 = 0;
318
- var i2 = r$3.__H || (r$3.__H = { __: [], __h: [] });
319
- return t2 >= i2.__.length && i2.__.push({ __V: c$2 }), i2.__[t2];
320
- }
321
- function h$1(n2) {
322
- return o$3 = 1, s$2(B$2, n2);
323
- }
324
- function s$2(n2, u2, i2) {
325
- var o2 = d$3(t$2++, 2);
326
- if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : B$2(void 0, u2), function(n3) {
327
- var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3);
328
- t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
329
- }], o2.__c = r$3, !r$3.u)) {
330
- var f2 = function(n3, t2, r2) {
331
- if (!o2.__c.__H)
332
- return true;
333
- var u3 = o2.__c.__H.__.filter(function(n4) {
334
- return n4.__c;
335
- });
336
- if (u3.every(function(n4) {
337
- return !n4.__N;
338
- }))
339
- return !c2 || c2.call(this, n3, t2, r2);
340
- var i3 = false;
341
- return u3.forEach(function(n4) {
342
- if (n4.__N) {
343
- var t3 = n4.__[0];
344
- n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = true);
345
- }
346
- }), !(!i3 && o2.__c.props === n3) && (!c2 || c2.call(this, n3, t2, r2));
347
- };
348
- r$3.u = true;
349
- var c2 = r$3.shouldComponentUpdate, e2 = r$3.componentWillUpdate;
350
- r$3.componentWillUpdate = function(n3, t2, r2) {
351
- if (this.__e) {
352
- var u3 = c2;
353
- c2 = void 0, f2(n3, t2, r2), c2 = u3;
354
- }
355
- e2 && e2.call(this, n3, t2, r2);
356
- }, r$3.shouldComponentUpdate = f2;
315
+ var ValiError = class extends Error {
316
+ /**
317
+ * Creates a Valibot error with useful information.
318
+ *
319
+ * @param issues The error issues.
320
+ */
321
+ constructor(issues) {
322
+ super(issues[0].message);
323
+ __publicField(this, "issues");
324
+ this.name = "ValiError";
325
+ this.issues = issues;
357
326
  }
358
- return o2.__N || o2.__;
359
- }
360
- function p$3(u2, i2) {
361
- var o2 = d$3(t$2++, 3);
362
- !l$4.__s && z$1(o2.__H, i2) && (o2.__ = u2, o2.i = i2, r$3.__H.__h.push(o2));
327
+ };
328
+ function coerce(schema, action) {
329
+ return {
330
+ ...schema,
331
+ _parse(input, info) {
332
+ return schema._parse(action(input), info);
333
+ }
334
+ };
363
335
  }
364
- function y$2(u2, i2) {
365
- var o2 = d$3(t$2++, 4);
366
- !l$4.__s && z$1(o2.__H, i2) && (o2.__ = u2, o2.i = i2, r$3.__h.push(o2));
336
+ function getIssues(issues) {
337
+ return { issues };
367
338
  }
368
- function _$4(n2) {
369
- return o$3 = 5, F$1(function() {
370
- return { current: n2 };
371
- }, []);
339
+ function getOutput(output) {
340
+ return { output };
372
341
  }
373
- function A$2(n2, t2, r2) {
374
- o$3 = 6, y$2(function() {
375
- return "function" == typeof n2 ? (n2(t2()), function() {
376
- return n2(null);
377
- }) : n2 ? (n2.current = t2(), function() {
378
- return n2.current = null;
379
- }) : void 0;
380
- }, null == r2 ? r2 : r2.concat(n2));
342
+ function getIssue(info, issue) {
343
+ return {
344
+ reason: info == null ? void 0 : info.reason,
345
+ validation: issue.validation,
346
+ origin: (info == null ? void 0 : info.origin) || "value",
347
+ message: issue.message,
348
+ input: issue.input,
349
+ path: issue.path,
350
+ abortEarly: info == null ? void 0 : info.abortEarly,
351
+ abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
352
+ skipPipe: info == null ? void 0 : info.skipPipe
353
+ };
381
354
  }
382
- function F$1(n2, r2) {
383
- var u2 = d$3(t$2++, 7);
384
- return z$1(u2.__H, r2) ? (u2.__V = n2(), u2.i = r2, u2.__h = n2, u2.__V) : u2.__;
355
+ function getPipeInfo(info, reason) {
356
+ return {
357
+ reason,
358
+ origin: info == null ? void 0 : info.origin,
359
+ abortEarly: info == null ? void 0 : info.abortEarly,
360
+ abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
361
+ skipPipe: info == null ? void 0 : info.skipPipe
362
+ };
385
363
  }
386
- function T$2(n2, t2) {
387
- return o$3 = 8, F$1(function() {
388
- return n2;
389
- }, t2);
364
+ function executePipe(input, pipe2, parseInfo, reason) {
365
+ if (!pipe2 || !pipe2.length || (parseInfo == null ? void 0 : parseInfo.skipPipe)) {
366
+ return getOutput(input);
367
+ }
368
+ let pipeInfo;
369
+ let issues;
370
+ let output = input;
371
+ for (const action of pipe2) {
372
+ const result = action._parse(output);
373
+ if (result.issues) {
374
+ pipeInfo = pipeInfo || getPipeInfo(parseInfo, reason);
375
+ for (const issueInfo of result.issues) {
376
+ const issue = getIssue(pipeInfo, issueInfo);
377
+ issues ? issues.push(issue) : issues = [issue];
378
+ }
379
+ if (pipeInfo.abortEarly || pipeInfo.abortPipeEarly) {
380
+ break;
381
+ }
382
+ } else {
383
+ output = result.output;
384
+ }
385
+ }
386
+ return issues ? getIssues(issues) : getOutput(output);
390
387
  }
391
- function q$1(n2) {
392
- var u2 = r$3.context[n2.__c], i2 = d$3(t$2++, 9);
393
- return i2.c = n2, u2 ? (null == i2.__ && (i2.__ = true, u2.sub(r$3)), u2.props.value) : n2.__;
388
+ function getDefaultArgs(arg1, arg2) {
389
+ return Array.isArray(arg1) ? [void 0, arg1] : [arg1, arg2];
394
390
  }
395
- function x$3(t2, r2) {
396
- l$4.useDebugValue && l$4.useDebugValue(r2 ? r2(t2) : t2);
391
+ function getErrorMessage(message) {
392
+ return typeof message === "function" ? message() : message;
397
393
  }
398
- function P$2(n2) {
399
- var u2 = d$3(t$2++, 10), i2 = h$1();
400
- return u2.__ = n2, r$3.componentDidCatch || (r$3.componentDidCatch = function(n3, t2) {
401
- u2.__ && u2.__(n3, t2), i2[1](n3);
402
- }), [i2[0], function() {
403
- i2[1](void 0);
404
- }];
394
+ function getPipeIssues(validation, message, input, requirement) {
395
+ return getIssues([
396
+ {
397
+ validation,
398
+ message: getErrorMessage(message),
399
+ input,
400
+ requirement
401
+ }
402
+ ]);
405
403
  }
406
- function V$1() {
407
- var n2 = d$3(t$2++, 11);
408
- if (!n2.__) {
409
- for (var u2 = r$3.__v; null !== u2 && !u2.__m && null !== u2.__; )
410
- u2 = u2.__;
411
- var i2 = u2.__m || (u2.__m = [0, 0]);
412
- n2.__ = "P" + i2[0] + "-" + i2[1]++;
404
+ function getRestAndDefaultArgs(arg1, arg2, arg3) {
405
+ if (!arg1 || typeof arg1 === "object" && !Array.isArray(arg1)) {
406
+ const [error2, pipe22] = getDefaultArgs(arg2, arg3);
407
+ return [arg1, error2, pipe22];
413
408
  }
414
- return n2.__;
409
+ const [error, pipe2] = getDefaultArgs(
410
+ arg1,
411
+ arg2
412
+ );
413
+ return [void 0, error, pipe2];
415
414
  }
416
- function b$2() {
417
- for (var t2; t2 = f$2.shift(); )
418
- if (t2.__P && t2.__H)
419
- try {
420
- t2.__H.__h.forEach(k$2), t2.__H.__h.forEach(w$3), t2.__H.__h = [];
421
- } catch (r2) {
422
- t2.__H.__h = [], l$4.__e(r2, t2.__v);
415
+ function getSchemaIssues(info, reason, validation, message, input, issues) {
416
+ return {
417
+ issues: [
418
+ {
419
+ reason,
420
+ validation,
421
+ origin: (info == null ? void 0 : info.origin) || "value",
422
+ message: getErrorMessage(message),
423
+ input,
424
+ issues,
425
+ abortEarly: info == null ? void 0 : info.abortEarly,
426
+ abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
427
+ skipPipe: info == null ? void 0 : info.skipPipe
423
428
  }
429
+ ]
430
+ };
424
431
  }
425
- l$4.__b = function(n2) {
426
- r$3 = null, e$2 && e$2(n2);
427
- }, l$4.__r = function(n2) {
428
- a$2 && a$2(n2), t$2 = 0;
429
- var i2 = (r$3 = n2.__c).__H;
430
- i2 && (u$2 === r$3 ? (i2.__h = [], r$3.__h = [], i2.__.forEach(function(n3) {
431
- n3.__N && (n3.__ = n3.__N), n3.__V = c$2, n3.__N = n3.i = void 0;
432
- })) : (i2.__h.forEach(k$2), i2.__h.forEach(w$3), i2.__h = [], t$2 = 0)), u$2 = r$3;
433
- }, l$4.diffed = function(t2) {
434
- v$2 && v$2(t2);
435
- var o2 = t2.__c;
436
- o2 && o2.__H && (o2.__H.__h.length && (1 !== f$2.push(o2) && i$2 === l$4.requestAnimationFrame || ((i$2 = l$4.requestAnimationFrame) || j$2)(b$2)), o2.__H.__.forEach(function(n2) {
437
- n2.i && (n2.__H = n2.i), n2.__V !== c$2 && (n2.__ = n2.__V), n2.i = void 0, n2.__V = c$2;
438
- })), u$2 = r$3 = null;
439
- }, l$4.__c = function(t2, r2) {
440
- r2.some(function(t3) {
441
- try {
442
- t3.__h.forEach(k$2), t3.__h = t3.__h.filter(function(n2) {
443
- return !n2.__ || w$3(n2);
444
- });
445
- } catch (u2) {
446
- r2.some(function(n2) {
447
- n2.__h && (n2.__h = []);
448
- }), r2 = [], l$4.__e(u2, t3.__v);
449
- }
450
- }), l$3 && l$3(t2, r2);
451
- }, l$4.unmount = function(t2) {
452
- m$2 && m$2(t2);
453
- var r2, u2 = t2.__c;
454
- u2 && u2.__H && (u2.__H.__.forEach(function(n2) {
455
- try {
456
- k$2(n2);
457
- } catch (n3) {
458
- r2 = n3;
432
+ function any(pipe2) {
433
+ return {
434
+ type: "any",
435
+ async: false,
436
+ pipe: pipe2,
437
+ _parse(input, info) {
438
+ return executePipe(input, this.pipe, info, "any");
459
439
  }
460
- }), u2.__H = void 0, r2 && l$4.__e(r2, u2.__v));
461
- };
462
- var g$3 = "function" == typeof requestAnimationFrame;
463
- function j$2(n2) {
464
- var t2, r2 = function() {
465
- clearTimeout(u2), g$3 && cancelAnimationFrame(t2), setTimeout(n2);
466
- }, u2 = setTimeout(r2, 100);
467
- g$3 && (t2 = requestAnimationFrame(r2));
468
- }
469
- function k$2(n2) {
470
- var t2 = r$3, u2 = n2.__c;
471
- "function" == typeof u2 && (n2.__c = void 0, u2()), r$3 = t2;
440
+ };
472
441
  }
473
- function w$3(n2) {
474
- var t2 = r$3;
475
- n2.__c = n2.__(), r$3 = t2;
476
- }
477
- function z$1(n2, t2) {
478
- return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) {
479
- return t3 !== n2[r2];
480
- });
481
- }
482
- function B$2(n2, t2) {
483
- return "function" == typeof t2 ? t2(n2) : t2;
484
- }
485
- function i$1() {
486
- throw new Error("Cycle detected");
487
- }
488
- var t$1 = Symbol.for("preact-signals");
489
- function r$2() {
490
- if (!(v$1 > 1)) {
491
- var i2, t2 = false;
492
- while (void 0 !== f$1) {
493
- var r2 = f$1;
494
- f$1 = void 0;
495
- e$1++;
496
- while (void 0 !== r2) {
497
- var n2 = r2.o;
498
- r2.o = void 0;
499
- r2.f &= -3;
500
- if (!(8 & r2.f) && l$2(r2))
501
- try {
502
- r2.c();
503
- } catch (r3) {
504
- if (!t2) {
505
- i2 = r3;
506
- t2 = true;
442
+ function array(item, arg2, arg3) {
443
+ const [message = "Invalid type", pipe2] = getDefaultArgs(arg2, arg3);
444
+ return {
445
+ type: "array",
446
+ async: false,
447
+ item,
448
+ message,
449
+ pipe: pipe2,
450
+ _parse(input, info) {
451
+ if (!Array.isArray(input)) {
452
+ return getSchemaIssues(info, "type", "array", this.message, input);
453
+ }
454
+ let issues;
455
+ const output = [];
456
+ for (let key = 0; key < input.length; key++) {
457
+ const value2 = input[key];
458
+ const result = this.item._parse(value2, info);
459
+ if (result.issues) {
460
+ const pathItem = {
461
+ type: "array",
462
+ input,
463
+ key,
464
+ value: value2
465
+ };
466
+ for (const issue of result.issues) {
467
+ if (issue.path) {
468
+ issue.path.unshift(pathItem);
469
+ } else {
470
+ issue.path = [pathItem];
507
471
  }
472
+ issues == null ? void 0 : issues.push(issue);
508
473
  }
509
- r2 = n2;
474
+ if (!issues) {
475
+ issues = result.issues;
476
+ }
477
+ if (info == null ? void 0 : info.abortEarly) {
478
+ break;
479
+ }
480
+ } else {
481
+ output.push(result.output);
482
+ }
510
483
  }
484
+ return issues ? getIssues(issues) : executePipe(output, this.pipe, info, "array");
511
485
  }
512
- e$1 = 0;
513
- v$1--;
514
- if (t2)
515
- throw i2;
516
- } else
517
- v$1--;
486
+ };
518
487
  }
519
- function n$1(i2) {
520
- if (v$1 > 0)
521
- return i2();
522
- v$1++;
523
- try {
524
- return i2();
525
- } finally {
526
- r$2();
527
- }
488
+ function boolean(arg1, arg2) {
489
+ const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
490
+ return {
491
+ type: "boolean",
492
+ async: false,
493
+ message,
494
+ pipe: pipe2,
495
+ _parse(input, info) {
496
+ if (typeof input !== "boolean") {
497
+ return getSchemaIssues(info, "type", "boolean", this.message, input);
498
+ }
499
+ return executePipe(input, this.pipe, info, "boolean");
500
+ }
501
+ };
528
502
  }
529
- var o$2 = void 0;
530
- var f$1 = void 0, v$1 = 0, e$1 = 0, u$1 = 0;
531
- function c$1(i2) {
532
- if (void 0 !== o$2) {
533
- var t2 = i2.n;
534
- if (void 0 === t2 || t2.t !== o$2) {
535
- t2 = { i: 0, S: i2, p: o$2.s, n: void 0, t: o$2, e: void 0, x: void 0, r: t2 };
536
- if (void 0 !== o$2.s)
537
- o$2.s.n = t2;
538
- o$2.s = t2;
539
- i2.n = t2;
540
- if (32 & o$2.f)
541
- i2.S(t2);
542
- return t2;
543
- } else if (-1 === t2.i) {
544
- t2.i = 0;
545
- if (void 0 !== t2.n) {
546
- t2.n.p = t2.p;
547
- if (void 0 !== t2.p)
548
- t2.p.n = t2.n;
549
- t2.p = o$2.s;
550
- t2.n = void 0;
551
- o$2.s.n = t2;
552
- o$2.s = t2;
503
+ function number$1(arg1, arg2) {
504
+ const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
505
+ return {
506
+ type: "number",
507
+ async: false,
508
+ message,
509
+ pipe: pipe2,
510
+ _parse(input, info) {
511
+ if (typeof input !== "number" || isNaN(input)) {
512
+ return getSchemaIssues(info, "type", "number", this.message, input);
553
513
  }
554
- return t2;
514
+ return executePipe(input, this.pipe, info, "number");
555
515
  }
556
- }
516
+ };
557
517
  }
558
- function d$2(i2) {
559
- this.v = i2;
560
- this.i = 0;
561
- this.n = void 0;
562
- this.t = void 0;
518
+ function object(entries, arg2, arg3, arg4) {
519
+ const [rest, message = "Invalid type", pipe2] = getRestAndDefaultArgs(arg2, arg3, arg4);
520
+ let cachedEntries;
521
+ return {
522
+ type: "object",
523
+ async: false,
524
+ entries,
525
+ rest,
526
+ message,
527
+ pipe: pipe2,
528
+ _parse(input, info) {
529
+ if (!input || typeof input !== "object") {
530
+ return getSchemaIssues(info, "type", "object", this.message, input);
531
+ }
532
+ cachedEntries = cachedEntries || Object.entries(this.entries);
533
+ let issues;
534
+ const output = {};
535
+ for (const [key, schema] of cachedEntries) {
536
+ const value2 = input[key];
537
+ const result = schema._parse(value2, info);
538
+ if (result.issues) {
539
+ const pathItem = {
540
+ type: "object",
541
+ input,
542
+ key,
543
+ value: value2
544
+ };
545
+ for (const issue of result.issues) {
546
+ if (issue.path) {
547
+ issue.path.unshift(pathItem);
548
+ } else {
549
+ issue.path = [pathItem];
550
+ }
551
+ issues == null ? void 0 : issues.push(issue);
552
+ }
553
+ if (!issues) {
554
+ issues = result.issues;
555
+ }
556
+ if (info == null ? void 0 : info.abortEarly) {
557
+ break;
558
+ }
559
+ } else if (result.output !== void 0 || key in input) {
560
+ output[key] = result.output;
561
+ }
562
+ }
563
+ if (this.rest && !((info == null ? void 0 : info.abortEarly) && issues)) {
564
+ for (const key in input) {
565
+ if (!(key in this.entries)) {
566
+ const value2 = input[key];
567
+ const result = this.rest._parse(value2, info);
568
+ if (result.issues) {
569
+ const pathItem = {
570
+ type: "object",
571
+ input,
572
+ key,
573
+ value: value2
574
+ };
575
+ for (const issue of result.issues) {
576
+ if (issue.path) {
577
+ issue.path.unshift(pathItem);
578
+ } else {
579
+ issue.path = [pathItem];
580
+ }
581
+ issues == null ? void 0 : issues.push(issue);
582
+ }
583
+ if (!issues) {
584
+ issues = result.issues;
585
+ }
586
+ if (info == null ? void 0 : info.abortEarly) {
587
+ break;
588
+ }
589
+ } else {
590
+ output[key] = result.output;
591
+ }
592
+ }
593
+ }
594
+ }
595
+ return issues ? getIssues(issues) : executePipe(
596
+ output,
597
+ this.pipe,
598
+ info,
599
+ "object"
600
+ );
601
+ }
602
+ };
563
603
  }
564
- d$2.prototype.brand = t$1;
565
- d$2.prototype.h = function() {
566
- return true;
567
- };
568
- d$2.prototype.S = function(i2) {
569
- if (this.t !== i2 && void 0 === i2.e) {
570
- i2.x = this.t;
571
- if (void 0 !== this.t)
572
- this.t.e = i2;
573
- this.t = i2;
574
- }
575
- };
576
- d$2.prototype.U = function(i2) {
577
- if (void 0 !== this.t) {
578
- var t2 = i2.e, r2 = i2.x;
579
- if (void 0 !== t2) {
580
- t2.x = r2;
581
- i2.e = void 0;
604
+ function picklist(options, message = "Invalid type") {
605
+ return {
606
+ type: "picklist",
607
+ async: false,
608
+ options,
609
+ message,
610
+ _parse(input, info) {
611
+ if (!this.options.includes(input)) {
612
+ return getSchemaIssues(info, "type", "picklist", this.message, input);
613
+ }
614
+ return getOutput(input);
582
615
  }
583
- if (void 0 !== r2) {
584
- r2.e = t2;
585
- i2.x = void 0;
616
+ };
617
+ }
618
+ function string(arg1, arg2) {
619
+ const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
620
+ return {
621
+ type: "string",
622
+ async: false,
623
+ message,
624
+ pipe: pipe2,
625
+ _parse(input, info) {
626
+ if (typeof input !== "string") {
627
+ return getSchemaIssues(info, "type", "string", this.message, input);
628
+ }
629
+ return executePipe(input, this.pipe, info, "string");
586
630
  }
587
- if (i2 === this.t)
588
- this.t = r2;
631
+ };
632
+ }
633
+ function getRecordArgs(arg1, arg2, arg3, arg4) {
634
+ if (typeof arg2 === "object" && !Array.isArray(arg2)) {
635
+ const [message2, pipe22] = getDefaultArgs(arg3, arg4);
636
+ return [arg1, arg2, message2, pipe22];
589
637
  }
590
- };
591
- d$2.prototype.subscribe = function(i2) {
592
- var t2 = this;
593
- return O$2(function() {
594
- var r2 = t2.value, n2 = 32 & this.f;
595
- this.f &= -33;
596
- try {
597
- i2(r2);
598
- } finally {
599
- this.f |= n2;
600
- }
601
- });
602
- };
603
- d$2.prototype.valueOf = function() {
604
- return this.value;
605
- };
606
- d$2.prototype.toString = function() {
607
- return this.value + "";
608
- };
609
- d$2.prototype.toJSON = function() {
610
- return this.value;
611
- };
612
- d$2.prototype.peek = function() {
613
- return this.v;
614
- };
615
- Object.defineProperty(d$2.prototype, "value", { get: function() {
616
- var i2 = c$1(this);
617
- if (void 0 !== i2)
618
- i2.i = this.i;
619
- return this.v;
620
- }, set: function(t2) {
621
- if (o$2 instanceof _$3)
622
- !function() {
623
- throw new Error("Computed cannot have side-effects");
624
- }();
625
- if (t2 !== this.v) {
626
- if (e$1 > 100)
627
- i$1();
628
- this.v = t2;
629
- this.i++;
630
- u$1++;
631
- v$1++;
632
- try {
633
- for (var n2 = this.t; void 0 !== n2; n2 = n2.x)
634
- n2.t.N();
635
- } finally {
636
- r$2();
637
- }
638
- }
639
- } });
640
- function a$1(i2) {
641
- return new d$2(i2);
642
- }
643
- function l$2(i2) {
644
- for (var t2 = i2.s; void 0 !== t2; t2 = t2.n)
645
- if (t2.S.i !== t2.i || !t2.S.h() || t2.S.i !== t2.i)
646
- return true;
647
- return false;
638
+ const [message, pipe2] = getDefaultArgs(
639
+ arg2,
640
+ arg3
641
+ );
642
+ return [string(), arg1, message, pipe2];
648
643
  }
649
- function y$1(i2) {
650
- for (var t2 = i2.s; void 0 !== t2; t2 = t2.n) {
651
- var r2 = t2.S.n;
652
- if (void 0 !== r2)
653
- t2.r = r2;
654
- t2.S.n = t2;
655
- t2.i = -1;
656
- if (void 0 === t2.n) {
657
- i2.s = t2;
658
- break;
644
+ var BLOCKED_KEYS = ["__proto__", "prototype", "constructor"];
645
+ function record(arg1, arg2, arg3, arg4) {
646
+ const [key, value2, message = "Invalid type", pipe2] = getRecordArgs(arg1, arg2, arg3, arg4);
647
+ return {
648
+ type: "record",
649
+ async: false,
650
+ key,
651
+ value: value2,
652
+ message,
653
+ pipe: pipe2,
654
+ _parse(input, info) {
655
+ if (!input || typeof input !== "object") {
656
+ return getSchemaIssues(info, "type", "record", this.message, input);
657
+ }
658
+ let issues;
659
+ const output = {};
660
+ for (const [inputKey, inputValue] of Object.entries(input)) {
661
+ if (!BLOCKED_KEYS.includes(inputKey)) {
662
+ let pathItem;
663
+ const keyResult = this.key._parse(inputKey, {
664
+ origin: "key",
665
+ abortEarly: info == null ? void 0 : info.abortEarly,
666
+ abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
667
+ skipPipe: info == null ? void 0 : info.skipPipe
668
+ });
669
+ if (keyResult.issues) {
670
+ pathItem = {
671
+ type: "record",
672
+ input,
673
+ key: inputKey,
674
+ value: inputValue
675
+ };
676
+ for (const issue of keyResult.issues) {
677
+ issue.path = [pathItem];
678
+ issues == null ? void 0 : issues.push(issue);
679
+ }
680
+ if (!issues) {
681
+ issues = keyResult.issues;
682
+ }
683
+ if (info == null ? void 0 : info.abortEarly) {
684
+ break;
685
+ }
686
+ }
687
+ const valueResult = this.value._parse(inputValue, info);
688
+ if (valueResult.issues) {
689
+ pathItem = pathItem || {
690
+ type: "record",
691
+ input,
692
+ key: inputKey,
693
+ value: inputValue
694
+ };
695
+ for (const issue of valueResult.issues) {
696
+ if (issue.path) {
697
+ issue.path.unshift(pathItem);
698
+ } else {
699
+ issue.path = [pathItem];
700
+ }
701
+ issues == null ? void 0 : issues.push(issue);
702
+ }
703
+ if (!issues) {
704
+ issues = valueResult.issues;
705
+ }
706
+ if (info == null ? void 0 : info.abortEarly) {
707
+ break;
708
+ }
709
+ }
710
+ if (!keyResult.issues && !valueResult.issues) {
711
+ output[keyResult.output] = valueResult.output;
712
+ }
713
+ }
714
+ }
715
+ return issues ? getIssues(issues) : executePipe(
716
+ output,
717
+ this.pipe,
718
+ info,
719
+ "record"
720
+ );
659
721
  }
660
- }
722
+ };
661
723
  }
662
- function w$2(i2) {
663
- var t2 = i2.s, r2 = void 0;
664
- while (void 0 !== t2) {
665
- var n2 = t2.p;
666
- if (-1 === t2.i) {
667
- t2.S.U(t2);
668
- if (void 0 !== n2)
669
- n2.n = t2.n;
670
- if (void 0 !== t2.n)
671
- t2.n.p = n2;
672
- } else
673
- r2 = t2;
674
- t2.S.n = t2.r;
675
- if (void 0 !== t2.r)
676
- t2.r = void 0;
677
- t2 = n2;
724
+ function parse$1(schema, input, info) {
725
+ const result = schema._parse(input, info);
726
+ if (result.issues) {
727
+ throw new ValiError(result.issues);
678
728
  }
679
- i2.s = r2;
680
- }
681
- function _$3(i2) {
682
- d$2.call(this, void 0);
683
- this.x = i2;
684
- this.s = void 0;
685
- this.g = u$1 - 1;
686
- this.f = 4;
729
+ return result.output;
687
730
  }
688
- (_$3.prototype = new d$2()).h = function() {
689
- this.f &= -3;
690
- if (1 & this.f)
691
- return false;
692
- if (32 == (36 & this.f))
693
- return true;
694
- this.f &= -5;
695
- if (this.g === u$1)
696
- return true;
697
- this.g = u$1;
698
- this.f |= 1;
699
- if (this.i > 0 && !l$2(this)) {
700
- this.f &= -2;
701
- return true;
731
+ async function parseAsync(schema, input, info) {
732
+ const result = await schema._parse(input, info);
733
+ if (result.issues) {
734
+ throw new ValiError(result.issues);
702
735
  }
703
- var i2 = o$2;
704
- try {
705
- y$1(this);
706
- o$2 = this;
707
- var t2 = this.x();
708
- if (16 & this.f || this.v !== t2 || 0 === this.i) {
709
- this.v = t2;
710
- this.f &= -17;
711
- this.i++;
736
+ return result.output;
737
+ }
738
+ function transform(schema, action, arg1) {
739
+ return {
740
+ ...schema,
741
+ _parse(input, info) {
742
+ const result = schema._parse(input, info);
743
+ if (result.issues) {
744
+ return result;
745
+ }
746
+ const output = action(result.output);
747
+ if (arg1 && !Array.isArray(arg1)) {
748
+ return arg1._parse(output, info);
749
+ }
750
+ return executePipe(output, arg1, info, typeof output);
712
751
  }
713
- } catch (i3) {
714
- this.v = i3;
715
- this.f |= 16;
716
- this.i++;
717
- }
718
- o$2 = i2;
719
- w$2(this);
720
- this.f &= -2;
721
- return true;
722
- };
723
- _$3.prototype.S = function(i2) {
724
- if (void 0 === this.t) {
725
- this.f |= 36;
726
- for (var t2 = this.s; void 0 !== t2; t2 = t2.n)
727
- t2.S.S(t2);
728
- }
729
- d$2.prototype.S.call(this, i2);
730
- };
731
- _$3.prototype.U = function(i2) {
732
- if (void 0 !== this.t) {
733
- d$2.prototype.U.call(this, i2);
734
- if (void 0 === this.t) {
735
- this.f &= -33;
736
- for (var t2 = this.s; void 0 !== t2; t2 = t2.n)
737
- t2.S.U(t2);
752
+ };
753
+ }
754
+ var EMAIL_REGEX = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;
755
+ function email(message = "Invalid email") {
756
+ return {
757
+ type: "email",
758
+ async: false,
759
+ message,
760
+ requirement: EMAIL_REGEX,
761
+ _parse(input) {
762
+ return !this.requirement.test(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
738
763
  }
739
- }
740
- };
741
- _$3.prototype.N = function() {
742
- if (!(2 & this.f)) {
743
- this.f |= 6;
744
- for (var i2 = this.t; void 0 !== i2; i2 = i2.x)
745
- i2.t.N();
746
- }
747
- };
748
- _$3.prototype.peek = function() {
749
- if (!this.h())
750
- i$1();
751
- if (16 & this.f)
752
- throw this.v;
753
- return this.v;
754
- };
755
- Object.defineProperty(_$3.prototype, "value", { get: function() {
756
- if (1 & this.f)
757
- i$1();
758
- var t2 = c$1(this);
759
- this.h();
760
- if (void 0 !== t2)
761
- t2.i = this.i;
762
- if (16 & this.f)
763
- throw this.v;
764
- return this.v;
765
- } });
766
- function p$2(i2) {
767
- return new _$3(i2);
764
+ };
768
765
  }
769
- function g$2(i2) {
770
- var t2 = i2.u;
771
- i2.u = void 0;
772
- if ("function" == typeof t2) {
773
- v$1++;
774
- var n2 = o$2;
775
- o$2 = void 0;
776
- try {
777
- t2();
778
- } catch (t3) {
779
- i2.f &= -2;
780
- i2.f |= 8;
781
- b$1(i2);
782
- throw t3;
783
- } finally {
784
- o$2 = n2;
785
- r$2();
766
+ function maxLength(requirement, message = "Invalid length") {
767
+ return {
768
+ type: "max_length",
769
+ async: false,
770
+ message,
771
+ requirement,
772
+ _parse(input) {
773
+ return input.length > this.requirement ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
786
774
  }
787
- }
775
+ };
788
776
  }
789
- function b$1(i2) {
790
- for (var t2 = i2.s; void 0 !== t2; t2 = t2.n)
791
- t2.S.U(t2);
792
- i2.x = void 0;
793
- i2.s = void 0;
794
- g$2(i2);
795
- }
796
- function x$2(i2) {
797
- if (o$2 !== this)
798
- throw new Error("Out-of-order effect");
799
- w$2(this);
800
- o$2 = i2;
801
- this.f &= -2;
802
- if (8 & this.f)
803
- b$1(this);
804
- r$2();
805
- }
806
- function E$2(i2) {
807
- this.x = i2;
808
- this.u = void 0;
809
- this.s = void 0;
810
- this.o = void 0;
811
- this.f = 32;
812
- }
813
- E$2.prototype.c = function() {
814
- var i2 = this.S();
815
- try {
816
- if (8 & this.f)
817
- return;
818
- if (void 0 === this.x)
819
- return;
820
- var t2 = this.x();
821
- if ("function" == typeof t2)
822
- this.u = t2;
823
- } finally {
824
- i2();
825
- }
826
- };
827
- E$2.prototype.S = function() {
828
- if (1 & this.f)
829
- i$1();
830
- this.f |= 1;
831
- this.f &= -9;
832
- g$2(this);
833
- y$1(this);
834
- v$1++;
835
- var t2 = o$2;
836
- o$2 = this;
837
- return x$2.bind(this, t2);
838
- };
839
- E$2.prototype.N = function() {
840
- if (!(2 & this.f)) {
841
- this.f |= 2;
842
- this.o = f$1;
843
- f$1 = this;
844
- }
845
- };
846
- E$2.prototype.d = function() {
847
- this.f |= 8;
848
- if (!(1 & this.f))
849
- b$1(this);
850
- };
851
- function O$2(i2) {
852
- var t2 = new E$2(i2);
853
- try {
854
- t2.c();
855
- } catch (i3) {
856
- t2.d();
857
- throw i3;
858
- }
859
- return t2.d.bind(t2);
860
- }
861
- var s$1;
862
- function l$1(n2, i2) {
863
- l$4[n2] = i2.bind(null, l$4[n2] || function() {
864
- });
865
- }
866
- function d$1(n2) {
867
- if (s$1)
868
- s$1();
869
- s$1 = n2 && n2.S();
870
- }
871
- function p$1(n2) {
872
- var r2 = this, f2 = n2.data, o2 = useSignal(f2);
873
- o2.value = f2;
874
- var e2 = F$1(function() {
875
- var n3 = r2.__v;
876
- while (n3 = n3.__)
877
- if (n3.__c) {
878
- n3.__c.__$f |= 4;
879
- break;
880
- }
881
- r2.__$u.c = function() {
882
- var n4;
883
- if (!t$3(e2.peek()) && 3 === (null == (n4 = r2.base) ? void 0 : n4.nodeType))
884
- r2.base.data = e2.peek();
885
- else {
886
- r2.__$f |= 1;
887
- r2.setState({});
888
- }
889
- };
890
- return p$2(function() {
891
- var n4 = o2.value.value;
892
- return 0 === n4 ? 0 : true === n4 ? "" : n4 || "";
893
- });
894
- }, []);
895
- return e2.value;
896
- }
897
- p$1.displayName = "_st";
898
- Object.defineProperties(d$2.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value: p$1 }, props: { configurable: true, get: function() {
899
- return { data: this };
900
- } }, __b: { configurable: true, value: 1 } });
901
- l$1("__b", function(n2, r2) {
902
- if ("string" == typeof r2.type) {
903
- var i2, t2 = r2.props;
904
- for (var f2 in t2)
905
- if ("children" !== f2) {
906
- var o2 = t2[f2];
907
- if (o2 instanceof d$2) {
908
- if (!i2)
909
- r2.__np = i2 = {};
910
- i2[f2] = o2;
911
- t2[f2] = o2.peek();
912
- }
913
- }
914
- }
915
- n2(r2);
916
- });
917
- l$1("__r", function(n2, r2) {
918
- d$1();
919
- var i2, t2 = r2.__c;
920
- if (t2) {
921
- t2.__$f &= -2;
922
- if (void 0 === (i2 = t2.__$u))
923
- t2.__$u = i2 = function(n3) {
924
- var r3;
925
- O$2(function() {
926
- r3 = this;
927
- });
928
- r3.c = function() {
929
- t2.__$f |= 1;
930
- t2.setState({});
931
- };
932
- return r3;
933
- }();
934
- }
935
- d$1(i2);
936
- n2(r2);
937
- });
938
- l$1("__e", function(n2, r2, i2, t2) {
939
- d$1();
940
- n2(r2, i2, t2);
941
- });
942
- l$1("diffed", function(n2, r2) {
943
- d$1();
944
- var i2;
945
- if ("string" == typeof r2.type && (i2 = r2.__e)) {
946
- var t2 = r2.__np, f2 = r2.props;
947
- if (t2) {
948
- var o2 = i2.U;
949
- if (o2)
950
- for (var e2 in o2) {
951
- var u2 = o2[e2];
952
- if (void 0 !== u2 && !(e2 in t2)) {
953
- u2.d();
954
- o2[e2] = void 0;
955
- }
956
- }
957
- else
958
- i2.U = o2 = {};
959
- for (var a2 in t2) {
960
- var c2 = o2[a2], s2 = t2[a2];
961
- if (void 0 === c2) {
962
- c2 = _$2(i2, a2, s2, f2);
963
- o2[a2] = c2;
964
- } else
965
- c2.o(s2, f2);
966
- }
967
- }
968
- }
969
- n2(r2);
970
- });
971
- function _$2(n2, r2, i2, t2) {
972
- var f2 = r2 in n2 && void 0 === n2.ownerSVGElement, o2 = a$1(i2);
973
- return { o: function(n3, r3) {
974
- o2.value = n3;
975
- t2 = r3;
976
- }, d: O$2(function() {
977
- var i3 = o2.value.value;
978
- if (t2[r2] !== i3) {
979
- t2[r2] = i3;
980
- if (f2)
981
- n2[r2] = i3;
982
- else if (i3)
983
- n2.setAttribute(r2, i3);
984
- else
985
- n2.removeAttribute(r2);
777
+ function minLength(requirement, message = "Invalid length") {
778
+ return {
779
+ type: "min_length",
780
+ async: false,
781
+ message,
782
+ requirement,
783
+ _parse(input) {
784
+ return input.length < this.requirement ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
986
785
  }
987
- }) };
786
+ };
988
787
  }
989
- l$1("unmount", function(n2, r2) {
990
- if ("string" == typeof r2.type) {
991
- var i2 = r2.__e;
992
- if (i2) {
993
- var t2 = i2.U;
994
- if (t2) {
995
- i2.U = void 0;
996
- for (var f2 in t2) {
997
- var o2 = t2[f2];
998
- if (o2)
999
- o2.d();
1000
- }
1001
- }
788
+ function regex(requirement, message = "Invalid regex") {
789
+ return {
790
+ type: "regex",
791
+ async: false,
792
+ message,
793
+ requirement,
794
+ _parse(input) {
795
+ return !this.requirement.test(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
1002
796
  }
1003
- } else {
1004
- var e2 = r2.__c;
1005
- if (e2) {
1006
- var u2 = e2.__$u;
1007
- if (u2) {
1008
- e2.__$u = void 0;
1009
- u2.d();
797
+ };
798
+ }
799
+ function url(message = "Invalid URL") {
800
+ return {
801
+ type: "url",
802
+ async: false,
803
+ message,
804
+ requirement(input) {
805
+ try {
806
+ new URL(input);
807
+ return true;
808
+ } catch {
809
+ return false;
1010
810
  }
811
+ },
812
+ _parse(input) {
813
+ return !this.requirement(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
1011
814
  }
1012
- }
1013
- n2(r2);
1014
- });
1015
- l$1("__h", function(n2, r2, i2, t2) {
1016
- if (t2 < 3 || 9 === t2)
1017
- r2.__$f |= 2;
1018
- n2(r2, i2, t2);
1019
- });
1020
- b$3.prototype.shouldComponentUpdate = function(n2, r2) {
1021
- var i2 = this.__$u;
1022
- if (!(i2 && void 0 !== i2.s || 4 & this.__$f))
1023
- return true;
1024
- if (3 & this.__$f)
1025
- return true;
1026
- for (var t2 in r2)
1027
- return true;
1028
- for (var f2 in n2)
1029
- if ("__source" !== f2 && n2[f2] !== this.props[f2])
1030
- return true;
1031
- for (var o2 in this.props)
1032
- if (!(o2 in n2))
1033
- return true;
1034
- return false;
1035
- };
1036
- function useSignal(n2) {
1037
- return F$1(function() {
1038
- return a$1(n2);
1039
- }, []);
815
+ };
1040
816
  }
1041
817
  var exhaustive = (value) => {
1042
818
  throw new Error(`Unhandled discriminated union member: ${JSON.stringify(value)}`);
@@ -1064,37 +840,207 @@ function _extends() {
1064
840
  };
1065
841
  return _extends.apply(this, arguments);
1066
842
  }
1067
- function g$1(n2, t2) {
1068
- for (var e2 in t2)
1069
- n2[e2] = t2[e2];
1070
- return n2;
1071
- }
1072
- function C(n2, t2) {
1073
- for (var e2 in n2)
1074
- if ("__source" !== e2 && !(e2 in t2))
1075
- return true;
1076
- for (var r2 in t2)
1077
- if ("__source" !== r2 && n2[r2] !== t2[r2])
1078
- return true;
1079
- return false;
1080
- }
1081
- function E$1(n2, t2) {
1082
- return n2 === t2 && (0 !== n2 || 1 / n2 == 1 / t2) || n2 != n2 && t2 != t2;
843
+ var t$2, r$3, u$2, i$2, o$3 = 0, f$2 = [], c$2 = [], e$2 = l$4.__b, a$2 = l$4.__r, v$2 = l$4.diffed, l$3 = l$4.__c, m$2 = l$4.unmount;
844
+ function d$3(t2, u2) {
845
+ l$4.__h && l$4.__h(r$3, t2, o$3 || u2), o$3 = 0;
846
+ var i2 = r$3.__H || (r$3.__H = { __: [], __h: [] });
847
+ return t2 >= i2.__.length && i2.__.push({ __V: c$2 }), i2.__[t2];
1083
848
  }
1084
- function w$1(n2) {
1085
- this.props = n2;
849
+ function h$1(n2) {
850
+ return o$3 = 1, s$2(B$2, n2);
1086
851
  }
1087
- function x$1(n2, e2) {
1088
- function r2(n3) {
1089
- var t2 = this.props.ref, r3 = t2 == n3.ref;
1090
- return !r3 && t2 && (t2.call ? t2(null) : t2.current = null), e2 ? !e2(this.props, n3) || !r3 : C(this.props, n3);
1091
- }
1092
- function u2(e3) {
1093
- return this.shouldComponentUpdate = r2, y$3(n2, e3);
1094
- }
852
+ function s$2(n2, u2, i2) {
853
+ var o2 = d$3(t$2++, 2);
854
+ if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : B$2(void 0, u2), function(n3) {
855
+ var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3);
856
+ t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
857
+ }], o2.__c = r$3, !r$3.u)) {
858
+ var f2 = function(n3, t2, r2) {
859
+ if (!o2.__c.__H)
860
+ return true;
861
+ var u3 = o2.__c.__H.__.filter(function(n4) {
862
+ return n4.__c;
863
+ });
864
+ if (u3.every(function(n4) {
865
+ return !n4.__N;
866
+ }))
867
+ return !c2 || c2.call(this, n3, t2, r2);
868
+ var i3 = false;
869
+ return u3.forEach(function(n4) {
870
+ if (n4.__N) {
871
+ var t3 = n4.__[0];
872
+ n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = true);
873
+ }
874
+ }), !(!i3 && o2.__c.props === n3) && (!c2 || c2.call(this, n3, t2, r2));
875
+ };
876
+ r$3.u = true;
877
+ var c2 = r$3.shouldComponentUpdate, e2 = r$3.componentWillUpdate;
878
+ r$3.componentWillUpdate = function(n3, t2, r2) {
879
+ if (this.__e) {
880
+ var u3 = c2;
881
+ c2 = void 0, f2(n3, t2, r2), c2 = u3;
882
+ }
883
+ e2 && e2.call(this, n3, t2, r2);
884
+ }, r$3.shouldComponentUpdate = f2;
885
+ }
886
+ return o2.__N || o2.__;
887
+ }
888
+ function p$3(u2, i2) {
889
+ var o2 = d$3(t$2++, 3);
890
+ !l$4.__s && z$1(o2.__H, i2) && (o2.__ = u2, o2.i = i2, r$3.__H.__h.push(o2));
891
+ }
892
+ function y$2(u2, i2) {
893
+ var o2 = d$3(t$2++, 4);
894
+ !l$4.__s && z$1(o2.__H, i2) && (o2.__ = u2, o2.i = i2, r$3.__h.push(o2));
895
+ }
896
+ function _$4(n2) {
897
+ return o$3 = 5, F$1(function() {
898
+ return { current: n2 };
899
+ }, []);
900
+ }
901
+ function A$2(n2, t2, r2) {
902
+ o$3 = 6, y$2(function() {
903
+ return "function" == typeof n2 ? (n2(t2()), function() {
904
+ return n2(null);
905
+ }) : n2 ? (n2.current = t2(), function() {
906
+ return n2.current = null;
907
+ }) : void 0;
908
+ }, null == r2 ? r2 : r2.concat(n2));
909
+ }
910
+ function F$1(n2, r2) {
911
+ var u2 = d$3(t$2++, 7);
912
+ return z$1(u2.__H, r2) ? (u2.__V = n2(), u2.i = r2, u2.__h = n2, u2.__V) : u2.__;
913
+ }
914
+ function T$2(n2, t2) {
915
+ return o$3 = 8, F$1(function() {
916
+ return n2;
917
+ }, t2);
918
+ }
919
+ function q$1(n2) {
920
+ var u2 = r$3.context[n2.__c], i2 = d$3(t$2++, 9);
921
+ return i2.c = n2, u2 ? (null == i2.__ && (i2.__ = true, u2.sub(r$3)), u2.props.value) : n2.__;
922
+ }
923
+ function x$3(t2, r2) {
924
+ l$4.useDebugValue && l$4.useDebugValue(r2 ? r2(t2) : t2);
925
+ }
926
+ function P$2(n2) {
927
+ var u2 = d$3(t$2++, 10), i2 = h$1();
928
+ return u2.__ = n2, r$3.componentDidCatch || (r$3.componentDidCatch = function(n3, t2) {
929
+ u2.__ && u2.__(n3, t2), i2[1](n3);
930
+ }), [i2[0], function() {
931
+ i2[1](void 0);
932
+ }];
933
+ }
934
+ function V$1() {
935
+ var n2 = d$3(t$2++, 11);
936
+ if (!n2.__) {
937
+ for (var u2 = r$3.__v; null !== u2 && !u2.__m && null !== u2.__; )
938
+ u2 = u2.__;
939
+ var i2 = u2.__m || (u2.__m = [0, 0]);
940
+ n2.__ = "P" + i2[0] + "-" + i2[1]++;
941
+ }
942
+ return n2.__;
943
+ }
944
+ function b$2() {
945
+ for (var t2; t2 = f$2.shift(); )
946
+ if (t2.__P && t2.__H)
947
+ try {
948
+ t2.__H.__h.forEach(k$2), t2.__H.__h.forEach(w$3), t2.__H.__h = [];
949
+ } catch (r2) {
950
+ t2.__H.__h = [], l$4.__e(r2, t2.__v);
951
+ }
952
+ }
953
+ l$4.__b = function(n2) {
954
+ r$3 = null, e$2 && e$2(n2);
955
+ }, l$4.__r = function(n2) {
956
+ a$2 && a$2(n2), t$2 = 0;
957
+ var i2 = (r$3 = n2.__c).__H;
958
+ i2 && (u$2 === r$3 ? (i2.__h = [], r$3.__h = [], i2.__.forEach(function(n3) {
959
+ n3.__N && (n3.__ = n3.__N), n3.__V = c$2, n3.__N = n3.i = void 0;
960
+ })) : (i2.__h.forEach(k$2), i2.__h.forEach(w$3), i2.__h = [], t$2 = 0)), u$2 = r$3;
961
+ }, l$4.diffed = function(t2) {
962
+ v$2 && v$2(t2);
963
+ var o2 = t2.__c;
964
+ o2 && o2.__H && (o2.__H.__h.length && (1 !== f$2.push(o2) && i$2 === l$4.requestAnimationFrame || ((i$2 = l$4.requestAnimationFrame) || j$2)(b$2)), o2.__H.__.forEach(function(n2) {
965
+ n2.i && (n2.__H = n2.i), n2.__V !== c$2 && (n2.__ = n2.__V), n2.i = void 0, n2.__V = c$2;
966
+ })), u$2 = r$3 = null;
967
+ }, l$4.__c = function(t2, r2) {
968
+ r2.some(function(t3) {
969
+ try {
970
+ t3.__h.forEach(k$2), t3.__h = t3.__h.filter(function(n2) {
971
+ return !n2.__ || w$3(n2);
972
+ });
973
+ } catch (u2) {
974
+ r2.some(function(n2) {
975
+ n2.__h && (n2.__h = []);
976
+ }), r2 = [], l$4.__e(u2, t3.__v);
977
+ }
978
+ }), l$3 && l$3(t2, r2);
979
+ }, l$4.unmount = function(t2) {
980
+ m$2 && m$2(t2);
981
+ var r2, u2 = t2.__c;
982
+ u2 && u2.__H && (u2.__H.__.forEach(function(n2) {
983
+ try {
984
+ k$2(n2);
985
+ } catch (n3) {
986
+ r2 = n3;
987
+ }
988
+ }), u2.__H = void 0, r2 && l$4.__e(r2, u2.__v));
989
+ };
990
+ var g$3 = "function" == typeof requestAnimationFrame;
991
+ function j$2(n2) {
992
+ var t2, r2 = function() {
993
+ clearTimeout(u2), g$3 && cancelAnimationFrame(t2), setTimeout(n2);
994
+ }, u2 = setTimeout(r2, 100);
995
+ g$3 && (t2 = requestAnimationFrame(r2));
996
+ }
997
+ function k$2(n2) {
998
+ var t2 = r$3, u2 = n2.__c;
999
+ "function" == typeof u2 && (n2.__c = void 0, u2()), r$3 = t2;
1000
+ }
1001
+ function w$3(n2) {
1002
+ var t2 = r$3;
1003
+ n2.__c = n2.__(), r$3 = t2;
1004
+ }
1005
+ function z$1(n2, t2) {
1006
+ return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) {
1007
+ return t3 !== n2[r2];
1008
+ });
1009
+ }
1010
+ function B$2(n2, t2) {
1011
+ return "function" == typeof t2 ? t2(n2) : t2;
1012
+ }
1013
+ function g$2(n2, t2) {
1014
+ for (var e2 in t2)
1015
+ n2[e2] = t2[e2];
1016
+ return n2;
1017
+ }
1018
+ function C(n2, t2) {
1019
+ for (var e2 in n2)
1020
+ if ("__source" !== e2 && !(e2 in t2))
1021
+ return true;
1022
+ for (var r2 in t2)
1023
+ if ("__source" !== r2 && n2[r2] !== t2[r2])
1024
+ return true;
1025
+ return false;
1026
+ }
1027
+ function E$2(n2, t2) {
1028
+ return n2 === t2 && (0 !== n2 || 1 / n2 == 1 / t2) || n2 != n2 && t2 != t2;
1029
+ }
1030
+ function w$2(n2) {
1031
+ this.props = n2;
1032
+ }
1033
+ function x$2(n2, e2) {
1034
+ function r2(n3) {
1035
+ var t2 = this.props.ref, r3 = t2 == n3.ref;
1036
+ return !r3 && t2 && (t2.call ? t2(null) : t2.current = null), e2 ? !e2(this.props, n3) || !r3 : C(this.props, n3);
1037
+ }
1038
+ function u2(e3) {
1039
+ return this.shouldComponentUpdate = r2, y$3(n2, e3);
1040
+ }
1095
1041
  return u2.displayName = "Memo(" + (n2.displayName || n2.name) + ")", u2.prototype.isReactComponent = true, u2.__f = true, u2;
1096
1042
  }
1097
- (w$1.prototype = new b$3()).isPureReactComponent = true, w$1.prototype.shouldComponentUpdate = function(n2, t2) {
1043
+ (w$2.prototype = new b$3()).isPureReactComponent = true, w$2.prototype.shouldComponentUpdate = function(n2, t2) {
1098
1044
  return C(this.props, n2) || C(this.state, t2);
1099
1045
  };
1100
1046
  var R = l$4.__b;
@@ -1104,14 +1050,14 @@ l$4.__b = function(n2) {
1104
1050
  var N$1 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
1105
1051
  function k$1(n2) {
1106
1052
  function t2(t3) {
1107
- var e2 = g$1({}, t3);
1053
+ var e2 = g$2({}, t3);
1108
1054
  return delete e2.ref, n2(e2, t3.ref || null);
1109
1055
  }
1110
1056
  return t2.$$typeof = N$1, t2.render = t2, t2.prototype.isReactComponent = t2.__f = true, t2.displayName = "ForwardRef(" + (n2.displayName || n2.name) + ")", t2;
1111
1057
  }
1112
1058
  var A$1 = function(n2, t2) {
1113
1059
  return null == n2 ? null : S$1(S$1(n2).map(t2));
1114
- }, O$1 = { map: A$1, forEach: A$1, count: function(n2) {
1060
+ }, O$2 = { map: A$1, forEach: A$1, count: function(n2) {
1115
1061
  return n2 ? S$1(n2).length : 0;
1116
1062
  }, only: function(n2) {
1117
1063
  var t2 = S$1(n2);
@@ -1131,7 +1077,7 @@ var I = l$4.unmount;
1131
1077
  function L(n2, t2, e2) {
1132
1078
  return n2 && (n2.__c && n2.__c.__H && (n2.__c.__H.__.forEach(function(n3) {
1133
1079
  "function" == typeof n3.__c && n3.__c();
1134
- }), n2.__c.__H = null), null != (n2 = g$1({}, n2)).__c && (n2.__c.__P === e2 && (n2.__c.__P = t2), n2.__c = null), n2.__k = n2.__k && n2.__k.map(function(n3) {
1080
+ }), n2.__c.__H = null), null != (n2 = g$2({}, n2)).__c && (n2.__c.__P === e2 && (n2.__c.__P = t2), n2.__c = null), n2.__k = n2.__k && n2.__k.map(function(n3) {
1135
1081
  return L(n3, t2, e2);
1136
1082
  })), n2;
1137
1083
  }
@@ -1346,20 +1292,20 @@ var Sn = y$2;
1346
1292
  function gn(n2, t2) {
1347
1293
  var e2 = t2(), r2 = h$1({ h: { __: e2, v: t2 } }), u2 = r2[0].h, o2 = r2[1];
1348
1294
  return y$2(function() {
1349
- u2.__ = e2, u2.v = t2, E$1(u2.__, t2()) || o2({ h: u2 });
1295
+ u2.__ = e2, u2.v = t2, E$2(u2.__, t2()) || o2({ h: u2 });
1350
1296
  }, [n2, e2, t2]), p$3(function() {
1351
- return E$1(u2.__, u2.v()) || o2({ h: u2 }), n2(function() {
1352
- E$1(u2.__, u2.v()) || o2({ h: u2 });
1297
+ return E$2(u2.__, u2.v()) || o2({ h: u2 }), n2(function() {
1298
+ E$2(u2.__, u2.v()) || o2({ h: u2 });
1353
1299
  });
1354
1300
  }, [n2]), e2;
1355
1301
  }
1356
- var Cn = { useState: h$1, useId: V$1, useReducer: s$2, useEffect: p$3, useLayoutEffect: y$2, useInsertionEffect: Sn, useTransition: bn, useDeferredValue: _n, useSyncExternalStore: gn, startTransition: yn, useRef: _$4, useImperativeHandle: A$2, useMemo: F$1, useCallback: T$2, useContext: q$1, useDebugValue: x$3, version: "17.0.2", Children: O$1, render: G, hydrate: J, unmountComponentAtNode: hn, createPortal: z, createElement: y$3, createContext: G$1, createFactory: fn, cloneElement: sn, createRef: _$5, Fragment: k$3, isValidElement: an, findDOMNode: vn, Component: b$3, PureComponent: w$1, memo: x$1, forwardRef: k$1, flushSync: pn, unstable_batchedUpdates: dn, StrictMode: mn, Suspense: D, SuspenseList: V, lazy: M, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ln };
1302
+ var Cn = { useState: h$1, useId: V$1, useReducer: s$2, useEffect: p$3, useLayoutEffect: y$2, useInsertionEffect: Sn, useTransition: bn, useDeferredValue: _n, useSyncExternalStore: gn, startTransition: yn, useRef: _$4, useImperativeHandle: A$2, useMemo: F$1, useCallback: T$2, useContext: q$1, useDebugValue: x$3, version: "17.0.2", Children: O$2, render: G, hydrate: J, unmountComponentAtNode: hn, createPortal: z, createElement: y$3, createContext: G$1, createFactory: fn, cloneElement: sn, createRef: _$5, Fragment: k$3, isValidElement: an, findDOMNode: vn, Component: b$3, PureComponent: w$2, memo: x$2, forwardRef: k$1, flushSync: pn, unstable_batchedUpdates: dn, StrictMode: mn, Suspense: D, SuspenseList: V, lazy: M, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ln };
1357
1303
  const $2AODx$react = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1358
1304
  __proto__: null,
1359
- Children: O$1,
1305
+ Children: O$2,
1360
1306
  Component: b$3,
1361
1307
  Fragment: k$3,
1362
- PureComponent: w$1,
1308
+ PureComponent: w$2,
1363
1309
  StrictMode: mn,
1364
1310
  Suspense: D,
1365
1311
  SuspenseList: V,
@@ -1377,7 +1323,7 @@ const $2AODx$react = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
1377
1323
  hydrate: J,
1378
1324
  isValidElement: an,
1379
1325
  lazy: M,
1380
- memo: x$1,
1326
+ memo: x$2,
1381
1327
  render: G,
1382
1328
  startTransition: yn,
1383
1329
  unmountComponentAtNode: hn,
@@ -1591,14 +1537,14 @@ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
1591
1537
  }
1592
1538
  const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ k$1((props, forwardedRef) => {
1593
1539
  const { children, ...slotProps } = props;
1594
- const childrenArray = O$1.toArray(children);
1540
+ const childrenArray = O$2.toArray(children);
1595
1541
  const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
1596
1542
  if (slottable) {
1597
1543
  const newElement = slottable.props.children;
1598
1544
  const newChildren = childrenArray.map((child) => {
1599
1545
  if (child === slottable) {
1600
- if (O$1.count(newElement) > 1)
1601
- return O$1.only(null);
1546
+ if (O$2.count(newElement) > 1)
1547
+ return O$2.only(null);
1602
1548
  return /* @__PURE__ */ an(newElement) ? newElement.props.children : null;
1603
1549
  } else
1604
1550
  return child;
@@ -1619,7 +1565,7 @@ const $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ k$1((props, forwardedRef
1619
1565
  ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
1620
1566
  ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
1621
1567
  });
1622
- return O$1.count(children) > 1 ? O$1.only(null) : null;
1568
+ return O$2.count(children) > 1 ? O$2.only(null) : null;
1623
1569
  });
1624
1570
  $5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
1625
1571
  const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children }) => {
@@ -2184,7 +2130,7 @@ const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props) => {
2184
2130
  const presence = $921a889cee6df7e8$var$usePresence(present);
2185
2131
  const child = typeof children === "function" ? children({
2186
2132
  present: presence.isPresent
2187
- }) : O$1.only(children);
2133
+ }) : O$2.only(children);
2188
2134
  const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
2189
2135
  const forceMount = typeof children === "function";
2190
2136
  return forceMount || presence.isPresent ? /* @__PURE__ */ sn(child, {
@@ -2510,7 +2456,7 @@ var RemoveScroll = k$1(function(props, parentRef) {
2510
2456
  k$3,
2511
2457
  null,
2512
2458
  enabled && y$3(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref }),
2513
- forwardProps ? sn(O$1.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : y$3(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
2459
+ forwardProps ? sn(O$2.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : y$3(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
2514
2460
  );
2515
2461
  });
2516
2462
  RemoveScroll.defaultProps = {
@@ -2602,7 +2548,7 @@ var zeroGap = {
2602
2548
  right: 0,
2603
2549
  gap: 0
2604
2550
  };
2605
- var parse$1 = function(x2) {
2551
+ var parse = function(x2) {
2606
2552
  return parseInt(x2 || "", 10) || 0;
2607
2553
  };
2608
2554
  var getOffset = function(gapMode) {
@@ -2610,7 +2556,7 @@ var getOffset = function(gapMode) {
2610
2556
  var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
2611
2557
  var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
2612
2558
  var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
2613
- return [parse$1(left), parse$1(top), parse$1(right)];
2559
+ return [parse(left), parse(top), parse(right)];
2614
2560
  };
2615
2561
  var getGapWidth = function(gapMode) {
2616
2562
  if (gapMode === void 0) {
@@ -3538,17 +3484,17 @@ const getValueAsType = (value, type) => {
3538
3484
  return type && typeof value === "number" ? type.transform(value) : value;
3539
3485
  };
3540
3486
  const clamp = (min, max, v2) => Math.min(Math.max(v2, min), max);
3541
- const number$1 = {
3487
+ const number = {
3542
3488
  test: (v2) => typeof v2 === "number",
3543
3489
  parse: parseFloat,
3544
3490
  transform: (v2) => v2
3545
3491
  };
3546
3492
  const alpha = {
3547
- ...number$1,
3493
+ ...number,
3548
3494
  transform: (v2) => clamp(0, 1, v2)
3549
3495
  };
3550
3496
  const scale = {
3551
- ...number$1,
3497
+ ...number,
3552
3498
  default: 1
3553
3499
  };
3554
3500
  const sanitize = (v2) => Math.round(v2 * 1e5) / 1e5;
@@ -3574,7 +3520,7 @@ const progressPercentage = {
3574
3520
  transform: (v2) => percent.transform(v2 * 100)
3575
3521
  };
3576
3522
  const int = {
3577
- ...number$1,
3523
+ ...number,
3578
3524
  transform: Math.round
3579
3525
  };
3580
3526
  const numberValueTypes = {
@@ -4722,7 +4668,7 @@ const splitColor = (aName, bName, cName) => (v2) => {
4722
4668
  };
4723
4669
  const clampRgbUnit = (v2) => clamp(0, 255, v2);
4724
4670
  const rgbUnit = {
4725
- ...number$1,
4671
+ ...number,
4726
4672
  transform: (v2) => Math.round(clampRgbUnit(v2))
4727
4673
  };
4728
4674
  const rgba = {
@@ -4868,7 +4814,7 @@ const numberTokeniser = {
4868
4814
  regex: floatRegex,
4869
4815
  countKey: "Numbers",
4870
4816
  token: "${n}",
4871
- parse: number$1.parse
4817
+ parse: number.parse
4872
4818
  };
4873
4819
  function tokenise(info, { regex: regex2, countKey, token, parse: parse2 }) {
4874
4820
  const matches = info.tokenised.match(regex2);
@@ -6187,7 +6133,7 @@ const auto = {
6187
6133
  test: (v2) => v2 === "auto",
6188
6134
  parse: (v2) => v2
6189
6135
  };
6190
- const dimensionValueTypes = [number$1, px, percent, degrees, vw, vh, auto];
6136
+ const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];
6191
6137
  const findDimensionValueType = (v2) => dimensionValueTypes.find(testValueType(v2));
6192
6138
  const valueTypes = [...dimensionValueTypes, color, complex];
6193
6139
  const findValueType = (v2) => valueTypes.find(testValueType(v2));
@@ -6689,7 +6635,7 @@ const isPositionalKey = (key) => positionalKeys.has(key);
6689
6635
  const hasPositionalKey = (target) => {
6690
6636
  return Object.keys(target).some(isPositionalKey);
6691
6637
  };
6692
- const isNumOrPxType = (v2) => v2 === number$1 || v2 === px;
6638
+ const isNumOrPxType = (v2) => v2 === number || v2 === px;
6693
6639
  const getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(", ")[pos]);
6694
6640
  const getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform: transform2 }) => {
6695
6641
  if (transform2 === "none" || !transform2)
@@ -7509,7 +7455,7 @@ function updateChildLookup(children, allChildren) {
7509
7455
  }
7510
7456
  function onlyElements(children) {
7511
7457
  const filtered = [];
7512
- O$1.forEach(children, (child) => {
7458
+ O$2.forEach(children, (child) => {
7513
7459
  if (an(child))
7514
7460
  filtered.push(child);
7515
7461
  });
@@ -7620,13 +7566,13 @@ const domAnimation = {
7620
7566
  ...animations,
7621
7567
  ...gestureAnimations
7622
7568
  };
7623
- const t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r$1 = (t2) => Boolean(t2 && "object" == typeof t2), i = (e2) => e2 && !!e2[t], s = (n2, o2, c2) => {
7624
- if (i(n2)) {
7625
- const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(o2);
7569
+ const t$1 = Symbol.for("@ts-pattern/matcher"), e$1 = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r$2 = (t2) => Boolean(t2 && "object" == typeof t2), i$1 = (e2) => e2 && !!e2[t$1], s$1 = (n2, o2, c2) => {
7570
+ if (i$1(n2)) {
7571
+ const e2 = n2[t$1](), { matched: r2, selections: i2 } = e2.match(o2);
7626
7572
  return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
7627
7573
  }
7628
- if (r$1(n2)) {
7629
- if (!r$1(o2))
7574
+ if (r$2(n2)) {
7575
+ if (!r$2(o2))
7630
7576
  return false;
7631
7577
  if (Array.isArray(n2)) {
7632
7578
  if (!Array.isArray(o2))
@@ -7634,7 +7580,7 @@ const t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVaria
7634
7580
  let t2 = [], r2 = [], a2 = [];
7635
7581
  for (const s2 of n2.keys()) {
7636
7582
  const o3 = n2[s2];
7637
- i(o3) && o3[e] ? a2.push(o3) : a2.length ? r2.push(o3) : t2.push(o3);
7583
+ i$1(o3) && o3[e$1] ? a2.push(o3) : a2.length ? r2.push(o3) : t2.push(o3);
7638
7584
  }
7639
7585
  if (a2.length) {
7640
7586
  if (a2.length > 1)
@@ -7642,124 +7588,124 @@ const t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVaria
7642
7588
  if (o2.length < t2.length + r2.length)
7643
7589
  return false;
7644
7590
  const e2 = o2.slice(0, t2.length), n3 = 0 === r2.length ? [] : o2.slice(-r2.length), i2 = o2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
7645
- return t2.every((t3, n4) => s(t3, e2[n4], c2)) && r2.every((t3, e3) => s(t3, n3[e3], c2)) && (0 === a2.length || s(a2[0], i2, c2));
7591
+ return t2.every((t3, n4) => s$1(t3, e2[n4], c2)) && r2.every((t3, e3) => s$1(t3, n3[e3], c2)) && (0 === a2.length || s$1(a2[0], i2, c2));
7646
7592
  }
7647
- return n2.length === o2.length && n2.every((t3, e2) => s(t3, o2[e2], c2));
7593
+ return n2.length === o2.length && n2.every((t3, e2) => s$1(t3, o2[e2], c2));
7648
7594
  }
7649
7595
  return Object.keys(n2).every((e2) => {
7650
7596
  const r2 = n2[e2];
7651
- return (e2 in o2 || i(a2 = r2) && "optional" === a2[t]().matcherType) && s(r2, o2[e2], c2);
7597
+ return (e2 in o2 || i$1(a2 = r2) && "optional" === a2[t$1]().matcherType) && s$1(r2, o2[e2], c2);
7652
7598
  var a2;
7653
7599
  });
7654
7600
  }
7655
7601
  return Object.is(o2, n2);
7656
- }, o$1 = (e2) => {
7602
+ }, o$2 = (e2) => {
7657
7603
  var n2, s2, a2;
7658
- return r$1(e2) ? i(e2) ? null != (n2 = null == (s2 = (a2 = e2[t]()).getSelectionKeys) ? void 0 : s2.call(a2)) ? n2 : [] : Array.isArray(e2) ? c(e2, o$1) : c(Object.values(e2), o$1) : [];
7659
- }, c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
7660
- function a(...t2) {
7604
+ return r$2(e2) ? i$1(e2) ? null != (n2 = null == (s2 = (a2 = e2[t$1]()).getSelectionKeys) ? void 0 : s2.call(a2)) ? n2 : [] : Array.isArray(e2) ? c$1(e2, o$2) : c$1(Object.values(e2), o$2) : [];
7605
+ }, c$1 = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
7606
+ function a$1(...t2) {
7661
7607
  if (1 === t2.length) {
7662
7608
  const [e2] = t2;
7663
- return (t3) => s(e2, t3, () => {
7609
+ return (t3) => s$1(e2, t3, () => {
7664
7610
  });
7665
7611
  }
7666
7612
  if (2 === t2.length) {
7667
7613
  const [e2, n2] = t2;
7668
- return s(e2, n2, () => {
7614
+ return s$1(e2, n2, () => {
7669
7615
  });
7670
7616
  }
7671
7617
  throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t2.length}.`);
7672
7618
  }
7673
- function u(t2) {
7674
- return Object.assign(t2, { optional: () => l(t2), and: (e2) => m(t2, e2), or: (e2) => y(t2, e2), select: (e2) => void 0 === e2 ? p(t2) : p(e2, t2) });
7619
+ function u$1(t2) {
7620
+ return Object.assign(t2, { optional: () => l$2(t2), and: (e2) => m(t2, e2), or: (e2) => y$1(t2, e2), select: (e2) => void 0 === e2 ? p$2(t2) : p$2(e2, t2) });
7675
7621
  }
7676
7622
  function h(t2) {
7677
7623
  return Object.assign(((t3) => Object.assign(t3, { *[Symbol.iterator]() {
7678
- yield Object.assign(t3, { [e]: true });
7679
- } }))(t2), { optional: () => h(l(t2)), select: (e2) => h(void 0 === e2 ? p(t2) : p(e2, t2)) });
7624
+ yield Object.assign(t3, { [e$1]: true });
7625
+ } }))(t2), { optional: () => h(l$2(t2)), select: (e2) => h(void 0 === e2 ? p$2(t2) : p$2(e2, t2)) });
7680
7626
  }
7681
- function l(e2) {
7682
- return u({ [t]: () => ({ match: (t2) => {
7627
+ function l$2(e2) {
7628
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7683
7629
  let n2 = {};
7684
7630
  const r2 = (t3, e3) => {
7685
7631
  n2[t3] = e3;
7686
7632
  };
7687
- return void 0 === t2 ? (o$1(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s(e2, t2, r2), selections: n2 };
7688
- }, getSelectionKeys: () => o$1(e2), matcherType: "optional" }) });
7633
+ return void 0 === t2 ? (o$2(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s$1(e2, t2, r2), selections: n2 };
7634
+ }, getSelectionKeys: () => o$2(e2), matcherType: "optional" }) });
7689
7635
  }
7690
- const f = (t2, e2) => {
7636
+ const f$1 = (t2, e2) => {
7691
7637
  for (const n2 of t2)
7692
7638
  if (!e2(n2))
7693
7639
  return false;
7694
7640
  return true;
7695
- }, g = (t2, e2) => {
7641
+ }, g$1 = (t2, e2) => {
7696
7642
  for (const [n2, r2] of t2.entries())
7697
7643
  if (!e2(r2, n2))
7698
7644
  return false;
7699
7645
  return true;
7700
7646
  };
7701
7647
  function m(...e2) {
7702
- return u({ [t]: () => ({ match: (t2) => {
7648
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7703
7649
  let n2 = {};
7704
7650
  const r2 = (t3, e3) => {
7705
7651
  n2[t3] = e3;
7706
7652
  };
7707
- return { matched: e2.every((e3) => s(e3, t2, r2)), selections: n2 };
7708
- }, getSelectionKeys: () => c(e2, o$1), matcherType: "and" }) });
7653
+ return { matched: e2.every((e3) => s$1(e3, t2, r2)), selections: n2 };
7654
+ }, getSelectionKeys: () => c$1(e2, o$2), matcherType: "and" }) });
7709
7655
  }
7710
- function y(...e2) {
7711
- return u({ [t]: () => ({ match: (t2) => {
7656
+ function y$1(...e2) {
7657
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7712
7658
  let n2 = {};
7713
7659
  const r2 = (t3, e3) => {
7714
7660
  n2[t3] = e3;
7715
7661
  };
7716
- return c(e2, o$1).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s(e3, t2, r2)), selections: n2 };
7717
- }, getSelectionKeys: () => c(e2, o$1), matcherType: "or" }) });
7662
+ return c$1(e2, o$2).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s$1(e3, t2, r2)), selections: n2 };
7663
+ }, getSelectionKeys: () => c$1(e2, o$2), matcherType: "or" }) });
7718
7664
  }
7719
- function d(e2) {
7720
- return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
7665
+ function d$2(e2) {
7666
+ return { [t$1]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
7721
7667
  }
7722
- function p(...e2) {
7668
+ function p$2(...e2) {
7723
7669
  const r2 = "string" == typeof e2[0] ? e2[0] : void 0, i2 = 2 === e2.length ? e2[1] : "string" == typeof e2[0] ? void 0 : e2[0];
7724
- return u({ [t]: () => ({ match: (t2) => {
7670
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7725
7671
  let e3 = { [null != r2 ? r2 : n]: t2 };
7726
- return { matched: void 0 === i2 || s(i2, t2, (t3, n2) => {
7672
+ return { matched: void 0 === i2 || s$1(i2, t2, (t3, n2) => {
7727
7673
  e3[t3] = n2;
7728
7674
  }), selections: e3 };
7729
- }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : o$1(i2)) }) });
7675
+ }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : o$2(i2)) }) });
7730
7676
  }
7731
- function v(t2) {
7677
+ function v$1(t2) {
7732
7678
  return "number" == typeof t2;
7733
7679
  }
7734
- function b(t2) {
7680
+ function b$1(t2) {
7735
7681
  return "string" == typeof t2;
7736
7682
  }
7737
- function w(t2) {
7683
+ function w$1(t2) {
7738
7684
  return "bigint" == typeof t2;
7739
7685
  }
7740
- const S = u(d(function(t2) {
7686
+ const S = u$1(d$2(function(t2) {
7741
7687
  return true;
7742
- })), O = S, j = (t2) => Object.assign(u(t2), { startsWith: (e2) => {
7743
- return j(m(t2, (n2 = e2, d((t3) => b(t3) && t3.startsWith(n2)))));
7688
+ })), O$1 = S, j = (t2) => Object.assign(u$1(t2), { startsWith: (e2) => {
7689
+ return j(m(t2, (n2 = e2, d$2((t3) => b$1(t3) && t3.startsWith(n2)))));
7744
7690
  var n2;
7745
7691
  }, endsWith: (e2) => {
7746
- return j(m(t2, (n2 = e2, d((t3) => b(t3) && t3.endsWith(n2)))));
7692
+ return j(m(t2, (n2 = e2, d$2((t3) => b$1(t3) && t3.endsWith(n2)))));
7747
7693
  var n2;
7748
- }, minLength: (e2) => j(m(t2, ((t3) => d((e3) => b(e3) && e3.length >= t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => d((e3) => b(e3) && e3.length <= t3))(e2))), includes: (e2) => {
7749
- return j(m(t2, (n2 = e2, d((t3) => b(t3) && t3.includes(n2)))));
7694
+ }, minLength: (e2) => j(m(t2, ((t3) => d$2((e3) => b$1(e3) && e3.length >= t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => d$2((e3) => b$1(e3) && e3.length <= t3))(e2))), includes: (e2) => {
7695
+ return j(m(t2, (n2 = e2, d$2((t3) => b$1(t3) && t3.includes(n2)))));
7750
7696
  var n2;
7751
7697
  }, regex: (e2) => {
7752
- return j(m(t2, (n2 = e2, d((t3) => b(t3) && Boolean(t3.match(n2))))));
7698
+ return j(m(t2, (n2 = e2, d$2((t3) => b$1(t3) && Boolean(t3.match(n2))))));
7753
7699
  var n2;
7754
- } }), E = j(d(b)), K = (t2) => Object.assign(u(t2), { between: (e2, n2) => K(m(t2, ((t3, e3) => d((n3) => v(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => K(m(t2, ((t3) => d((e3) => v(e3) && e3 < t3))(e2))), gt: (e2) => K(m(t2, ((t3) => d((e3) => v(e3) && e3 > t3))(e2))), lte: (e2) => K(m(t2, ((t3) => d((e3) => v(e3) && e3 <= t3))(e2))), gte: (e2) => K(m(t2, ((t3) => d((e3) => v(e3) && e3 >= t3))(e2))), int: () => K(m(t2, d((t3) => v(t3) && Number.isInteger(t3)))), finite: () => K(m(t2, d((t3) => v(t3) && Number.isFinite(t3)))), positive: () => K(m(t2, d((t3) => v(t3) && t3 > 0))), negative: () => K(m(t2, d((t3) => v(t3) && t3 < 0))) }), A = K(d(v)), x = (t2) => Object.assign(u(t2), { between: (e2, n2) => x(m(t2, ((t3, e3) => d((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => x(m(t2, ((t3) => d((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => x(m(t2, ((t3) => d((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => x(m(t2, ((t3) => d((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => x(m(t2, ((t3) => d((e3) => w(e3) && e3 >= t3))(e2))), positive: () => x(m(t2, d((t3) => w(t3) && t3 > 0))), negative: () => x(m(t2, d((t3) => w(t3) && t3 < 0))) }), P = x(d(w)), T = u(d(function(t2) {
7700
+ } }), E$1 = j(d$2(b$1)), K = (t2) => Object.assign(u$1(t2), { between: (e2, n2) => K(m(t2, ((t3, e3) => d$2((n3) => v$1(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => K(m(t2, ((t3) => d$2((e3) => v$1(e3) && e3 < t3))(e2))), gt: (e2) => K(m(t2, ((t3) => d$2((e3) => v$1(e3) && e3 > t3))(e2))), lte: (e2) => K(m(t2, ((t3) => d$2((e3) => v$1(e3) && e3 <= t3))(e2))), gte: (e2) => K(m(t2, ((t3) => d$2((e3) => v$1(e3) && e3 >= t3))(e2))), int: () => K(m(t2, d$2((t3) => v$1(t3) && Number.isInteger(t3)))), finite: () => K(m(t2, d$2((t3) => v$1(t3) && Number.isFinite(t3)))), positive: () => K(m(t2, d$2((t3) => v$1(t3) && t3 > 0))), negative: () => K(m(t2, d$2((t3) => v$1(t3) && t3 < 0))) }), A = K(d$2(v$1)), x$1 = (t2) => Object.assign(u$1(t2), { between: (e2, n2) => x$1(m(t2, ((t3, e3) => d$2((n3) => w$1(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => x$1(m(t2, ((t3) => d$2((e3) => w$1(e3) && e3 < t3))(e2))), gt: (e2) => x$1(m(t2, ((t3) => d$2((e3) => w$1(e3) && e3 > t3))(e2))), lte: (e2) => x$1(m(t2, ((t3) => d$2((e3) => w$1(e3) && e3 <= t3))(e2))), gte: (e2) => x$1(m(t2, ((t3) => d$2((e3) => w$1(e3) && e3 >= t3))(e2))), positive: () => x$1(m(t2, d$2((t3) => w$1(t3) && t3 > 0))), negative: () => x$1(m(t2, d$2((t3) => w$1(t3) && t3 < 0))) }), P = x$1(d$2(w$1)), T = u$1(d$2(function(t2) {
7755
7701
  return "boolean" == typeof t2;
7756
- })), k = u(d(function(t2) {
7702
+ })), k = u$1(d$2(function(t2) {
7757
7703
  return "symbol" == typeof t2;
7758
- })), B = u(d(function(t2) {
7704
+ })), B = u$1(d$2(function(t2) {
7759
7705
  return null == t2;
7760
7706
  }));
7761
- var _$1 = { __proto__: null, matcher: t, optional: l, array: function(...e2) {
7762
- return h({ [t]: () => ({ match: (t2) => {
7707
+ var _$3 = { __proto__: null, matcher: t$1, optional: l$2, array: function(...e2) {
7708
+ return h({ [t$1]: () => ({ match: (t2) => {
7763
7709
  if (!Array.isArray(t2))
7764
7710
  return { matched: false };
7765
7711
  if (0 === e2.length)
@@ -7767,16 +7713,16 @@ var _$1 = { __proto__: null, matcher: t, optional: l, array: function(...e2) {
7767
7713
  const n2 = e2[0];
7768
7714
  let r2 = {};
7769
7715
  if (0 === t2.length)
7770
- return o$1(n2).forEach((t3) => {
7716
+ return o$2(n2).forEach((t3) => {
7771
7717
  r2[t3] = [];
7772
7718
  }), { matched: true, selections: r2 };
7773
7719
  const i2 = (t3, e3) => {
7774
7720
  r2[t3] = (r2[t3] || []).concat([e3]);
7775
7721
  };
7776
- return { matched: t2.every((t3) => s(n2, t3, i2)), selections: r2 };
7777
- }, getSelectionKeys: () => 0 === e2.length ? [] : o$1(e2[0]) }) });
7722
+ return { matched: t2.every((t3) => s$1(n2, t3, i2)), selections: r2 };
7723
+ }, getSelectionKeys: () => 0 === e2.length ? [] : o$2(e2[0]) }) });
7778
7724
  }, set: function(...e2) {
7779
- return u({ [t]: () => ({ match: (t2) => {
7725
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7780
7726
  if (!(t2 instanceof Set))
7781
7727
  return { matched: false };
7782
7728
  let n2 = {};
@@ -7787,10 +7733,10 @@ var _$1 = { __proto__: null, matcher: t, optional: l, array: function(...e2) {
7787
7733
  const r2 = (t3, e3) => {
7788
7734
  n2[t3] = (n2[t3] || []).concat([e3]);
7789
7735
  }, i2 = e2[0];
7790
- return { matched: f(t2, (t3) => s(i2, t3, r2)), selections: n2 };
7791
- }, getSelectionKeys: () => 0 === e2.length ? [] : o$1(e2[0]) }) });
7736
+ return { matched: f$1(t2, (t3) => s$1(i2, t3, r2)), selections: n2 };
7737
+ }, getSelectionKeys: () => 0 === e2.length ? [] : o$2(e2[0]) }) });
7792
7738
  }, map: function(...e2) {
7793
- return u({ [t]: () => ({ match: (t2) => {
7739
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7794
7740
  if (!(t2 instanceof Map))
7795
7741
  return { matched: false };
7796
7742
  let n2 = {};
@@ -7805,20 +7751,20 @@ var _$1 = { __proto__: null, matcher: t, optional: l, array: function(...e2) {
7805
7751
  if (1 === e2.length)
7806
7752
  throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null == (i2 = e2[0]) ? void 0 : i2.toString()}`);
7807
7753
  const [o2, c2] = e2;
7808
- return { matched: g(t2, (t3, e3) => {
7809
- const n3 = s(o2, e3, r2), i3 = s(c2, t3, r2);
7754
+ return { matched: g$1(t2, (t3, e3) => {
7755
+ const n3 = s$1(o2, e3, r2), i3 = s$1(c2, t3, r2);
7810
7756
  return n3 && i3;
7811
7757
  }), selections: n2 };
7812
- }, getSelectionKeys: () => 0 === e2.length ? [] : [...o$1(e2[0]), ...o$1(e2[1])] }) });
7813
- }, intersection: m, union: y, not: function(e2) {
7814
- return u({ [t]: () => ({ match: (t2) => ({ matched: !s(e2, t2, () => {
7758
+ }, getSelectionKeys: () => 0 === e2.length ? [] : [...o$2(e2[0]), ...o$2(e2[1])] }) });
7759
+ }, intersection: m, union: y$1, not: function(e2) {
7760
+ return u$1({ [t$1]: () => ({ match: (t2) => ({ matched: !s$1(e2, t2, () => {
7815
7761
  }) }), getSelectionKeys: () => [], matcherType: "not" }) });
7816
- }, when: d, select: p, any: S, _: O, string: E, number: A, bigint: P, boolean: T, symbol: k, nullish: B, instanceOf: function(t2) {
7817
- return u(d(function(t3) {
7762
+ }, when: d$2, select: p$2, any: S, _: O$1, string: E$1, number: A, bigint: P, boolean: T, symbol: k, nullish: B, instanceOf: function(t2) {
7763
+ return u$1(d$2(function(t3) {
7818
7764
  return (e2) => e2 instanceof t3;
7819
7765
  }(t2)));
7820
7766
  }, shape: function(t2) {
7821
- return u(d(a(t2)));
7767
+ return u$1(d$2(a$1(t2)));
7822
7768
  } };
7823
7769
  const W = { matched: false, value: void 0 };
7824
7770
  function N(t2) {
@@ -7837,7 +7783,7 @@ class $ {
7837
7783
  let o2 = false, c2 = {};
7838
7784
  const a2 = (t3, e3) => {
7839
7785
  o2 = true, c2[t3] = e3;
7840
- }, u2 = !r2.some((t3) => s(t3, this.input, a2)) || i2 && !Boolean(i2(this.input)) ? W : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
7786
+ }, u2 = !r2.some((t3) => s$1(t3, this.input, a2)) || i2 && !Boolean(i2(this.input)) ? W : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
7841
7787
  return new $(this.input, u2);
7842
7788
  }
7843
7789
  when(t2, e2) {
@@ -7875,1138 +7821,1426 @@ const ERROR_MESSAGES = {
7875
7821
  no_submissions: "Application ended without any fields submitted",
7876
7822
  invalid_state: "Invalid state"
7877
7823
  };
7878
- function promisifyRequest(request) {
7879
- return new Promise((resolve, reject) => {
7880
- request.oncomplete = request.onsuccess = () => resolve(request.result);
7881
- request.onabort = request.onerror = () => reject(request.error);
7882
- });
7883
- }
7884
- function createStore(dbName, storeName) {
7885
- const request = indexedDB.open(dbName);
7886
- request.onupgradeneeded = () => request.result.createObjectStore(storeName);
7887
- const dbp = promisifyRequest(request);
7888
- return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
7889
- }
7890
- let defaultGetStoreFunc;
7891
- function defaultGetStore() {
7892
- if (!defaultGetStoreFunc) {
7893
- defaultGetStoreFunc = createStore("keyval-store", "keyval");
7894
- }
7895
- return defaultGetStoreFunc;
7896
- }
7897
- function get(key, customStore = defaultGetStore()) {
7898
- return customStore("readonly", (store2) => promisifyRequest(store2.get(key)));
7899
- }
7900
- function set(key, value, customStore = defaultGetStore()) {
7901
- return customStore("readwrite", (store2) => {
7902
- store2.put(value, key);
7903
- return promisifyRequest(store2.transaction);
7904
- });
7824
+ function i() {
7825
+ throw new Error("Cycle detected");
7905
7826
  }
7906
- const store = typeof window === "undefined" ? void 0 : createStore("inploi", "applications");
7907
- const idb = {
7908
- getApplicationData: async (application2) => {
7909
- const key = getCacheKey(application2);
7910
- return await get(key, store);
7911
- },
7912
- setApplicationData: async (params) => {
7913
- const key = getCacheKey(params.application);
7914
- return await set(key, params.data, store);
7915
- }
7916
- };
7917
- const getCacheKey = (application2) => [application2.job.id, application2.flow.id, application2.flow.version].join("/");
7918
- const viewState = a$1("maximised");
7919
- const inputHeight = a$1(53);
7920
- const currentApplication = a$1({
7921
- state: "idle"
7922
- });
7923
- const updateApplicationData = (updateFn) => {
7924
- const {
7925
- state,
7926
- application: application2
7927
- } = currentApplication.value;
7928
- if (state !== "loaded")
7929
- return;
7930
- invariant$1(application2, "No application to update");
7931
- const newData = updateFn(application2.data);
7932
- const newApplication = {
7933
- ...application2,
7934
- data: newData
7935
- };
7936
- currentApplication.value = {
7937
- state,
7938
- application: newApplication
7939
- };
7940
- idb.setApplicationData({
7941
- application: application2,
7942
- data: newData
7943
- });
7944
- };
7945
- const application = {
7946
- current$: currentApplication,
7947
- start: async (application2) => {
7948
- const data = await idb.getApplicationData(application2) ?? createNewApplicationData();
7949
- currentApplication.value = {
7950
- state: "loaded",
7951
- application: {
7952
- ...application2,
7953
- data,
7954
- startedAt: /* @__PURE__ */ new Date()
7955
- }
7956
- };
7957
- idb.setApplicationData({
7958
- application: application2,
7959
- data
7960
- });
7961
- },
7962
- cancel: () => {
7963
- currentApplication.value = {
7964
- state: "idle"
7965
- };
7966
- },
7967
- markAsFinished: () => updateApplicationData((data) => ({
7968
- ...data,
7969
- isFinished: true
7970
- })),
7971
- setCurrentNodeId: (currentNodeId) => updateApplicationData((data) => ({
7972
- ...data,
7973
- currentNodeId
7974
- })),
7975
- restart: () => {
7976
- const {
7977
- state,
7978
- application: application2
7979
- } = currentApplication.value;
7980
- if (state !== "loaded")
7981
- throw new Error("Application cannot be restarted: not in valid state");
7982
- const data = createNewApplicationData();
7983
- currentApplication.value = {
7984
- state,
7985
- application: {
7986
- ...application2,
7987
- data,
7988
- startedAt: /* @__PURE__ */ new Date()
7827
+ var t = Symbol.for("preact-signals");
7828
+ function r$1() {
7829
+ if (!(v > 1)) {
7830
+ var i2, t2 = false;
7831
+ while (void 0 !== f) {
7832
+ var r2 = f;
7833
+ f = void 0;
7834
+ e++;
7835
+ while (void 0 !== r2) {
7836
+ var n2 = r2.o;
7837
+ r2.o = void 0;
7838
+ r2.f &= -3;
7839
+ if (!(8 & r2.f) && l$1(r2))
7840
+ try {
7841
+ r2.c();
7842
+ } catch (r3) {
7843
+ if (!t2) {
7844
+ i2 = r3;
7845
+ t2 = true;
7846
+ }
7847
+ }
7848
+ r2 = n2;
7989
7849
  }
7990
- };
7991
- idb.setApplicationData({
7992
- application: application2,
7993
- data
7994
- });
7995
- },
7996
- addMessage: (message, groupId) => {
7997
- const newMessage = {
7998
- ...message,
7999
- groupId
8000
- };
8001
- return updateApplicationData((data) => ({
8002
- ...data,
8003
- messages: [...data.messages, newMessage]
8004
- }));
8005
- },
8006
- /** Removes from the last message backwards, all the messages that have the groupId passed, until it reaches one that doesn't */
8007
- removeLastGroupMessagesById: (groupId) => {
8008
- var _a;
8009
- const {
8010
- state,
8011
- application: application2
8012
- } = currentApplication.value;
8013
- invariant$1(state === "loaded", "Application not loaded");
8014
- const messages = [...application2.data.messages];
8015
- let i2 = messages.length - 1;
8016
- while (i2 >= 0 && messages[i2] && ((_a = messages[i2]) == null ? void 0 : _a.groupId) === groupId) {
8017
- messages.pop();
8018
- i2--;
8019
- }
8020
- application2.data.messages = messages;
8021
- idb.setApplicationData({
8022
- application: application2,
8023
- data: application2.data
8024
- });
8025
- },
8026
- setSubmission: (fieldKey, submission) => updateApplicationData((data) => {
8027
- const newSubmissions = {
8028
- ...data.submissions
8029
- };
8030
- if (submission === null) {
8031
- delete newSubmissions[fieldKey];
8032
- } else {
8033
- newSubmissions[fieldKey] = submission;
8034
7850
  }
8035
- return {
8036
- ...data,
8037
- submissions: newSubmissions
8038
- };
8039
- }),
8040
- setInput: (input) => updateApplicationData((data) => ({
8041
- ...data,
8042
- currentInput: input
8043
- }))
8044
- };
8045
- const genRandomId = () => typeof crypto !== "undefined" && "randomUUID" in crypto ? crypto.randomUUID() : Math.random().toString(36).slice(2);
8046
- const createNewApplicationData = () => ({
8047
- messages: [],
8048
- submissions: {},
8049
- currentNodeId: null,
8050
- isFinished: false,
8051
- sequence: 0,
8052
- flowSessionId: genRandomId()
8053
- });
8054
- var _ = 0;
8055
- function o(o2, e2, n2, t2, f2, l2) {
8056
- var s2, u2, a2 = {};
8057
- for (u2 in e2)
8058
- "ref" == u2 ? s2 = e2[u2] : a2[u2] = e2[u2];
8059
- var i2 = { type: o2, props: a2, key: n2, ref: s2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --_, __source: f2, __self: l2 };
8060
- if ("function" == typeof o2 && (s2 = o2.defaultProps))
8061
- for (u2 in s2)
8062
- void 0 === a2[u2] && (a2[u2] = s2[u2]);
8063
- return l$4.vnode && l$4.vnode(i2), i2;
8064
- }
8065
- const ChatError = ({
8066
- message
8067
- }) => {
8068
- return o("div", {
8069
- class: "flex flex-grow flex-col items-center justify-center",
8070
- children: [o("svg", {
8071
- class: "text-error-9 h-16 w-16",
8072
- fill: "none",
8073
- xmlns: "http://www.w3.org/2000/svg",
8074
- "stroke-width": "2",
8075
- stroke: "currentColor",
8076
- "stroke-linecap": "round",
8077
- viewBox: "0 0 96 96",
8078
- children: [o("path", {
8079
- d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",
8080
- fill: "#fff"
8081
- }), o("path", {
8082
- d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"
8083
- }), o("line", {
8084
- x1: "36.7",
8085
- y1: "39.3",
8086
- x2: "44.8",
8087
- y2: "47.4"
8088
- }), o("line", {
8089
- x1: "52.2",
8090
- y1: "39.3",
8091
- x2: "60.3",
8092
- y2: "47.4"
8093
- }), o("line", {
8094
- x1: "44.7",
8095
- y1: "39.2",
8096
- x2: "36.6",
8097
- y2: "47.3"
8098
- }), o("line", {
8099
- x1: "60.2",
8100
- y1: "39.2",
8101
- x2: "52.1",
8102
- y2: "47.3"
8103
- }), o("path", {
8104
- d: "M38 56h19"
8105
- })]
8106
- }), o("div", {
8107
- class: "flex flex-col gap-2 text-center",
8108
- children: [o("p", {
8109
- class: "text-error-11 font-bold",
8110
- children: "Something unexpected happened"
8111
- }), message && o("p", {
8112
- class: "text-neutral-9 text-sm",
8113
- children: message
8114
- })]
8115
- })]
8116
- });
8117
- };
8118
- const LoadingIndicator = (props) => o("svg", {
8119
- role: "img",
8120
- viewBox: "0 0 24 24",
8121
- ...props,
8122
- children: [o("title", {
8123
- children: "Loading"
8124
- }), o("style", {
8125
- children: `#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}`
8126
- }), o("g", {
8127
- id: "s1",
8128
- transform: "translate(12,0)",
8129
- children: o("g", {
8130
- id: "s2",
8131
- transform: "scale(0,0)",
8132
- children: o("circle", {
8133
- r: "6.5",
8134
- transform: "translate(0,0)",
8135
- fill: "currentColor"
8136
- })
8137
- })
8138
- }), o("g", {
8139
- id: "s3",
8140
- transform: "translate(12,12)",
8141
- children: o("g", {
8142
- id: "s4",
8143
- transform: "scale(1,1)",
8144
- children: o("circle", {
8145
- r: "6.5",
8146
- transform: "translate(0,0)",
8147
- fill: "currentColor"
8148
- })
8149
- })
8150
- }), o("g", {
8151
- id: "s5",
8152
- transform: "translate(12,0)",
8153
- children: o("g", {
8154
- id: "s6",
8155
- transform: "scale(0,0)",
8156
- children: o("path", {
8157
- d: "M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",
8158
- transform: "translate(-6.5,-6.5)",
8159
- "clip-rule": "evenodd",
8160
- fill: "currentColor",
8161
- "fill-rule": "evenodd"
8162
- })
8163
- })
8164
- }), o("g", {
8165
- id: "s7",
8166
- transform: "translate(12,0)",
8167
- children: o("g", {
8168
- id: "s8",
8169
- transform: "scale(0,0)",
8170
- children: o("path", {
8171
- d: "M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",
8172
- transform: "translate(-6.5,-9.25)",
8173
- fill: "currentColor"
8174
- })
8175
- })
8176
- })]
8177
- });
8178
- const ChatLoading = () => o("div", {
8179
- class: "flex flex-grow flex-col items-center justify-center",
8180
- children: o(LoadingIndicator, {
8181
- class: "text-neutral-6 h-8 w-8"
8182
- })
8183
- });
8184
- function r(e2) {
8185
- var t2, f2, n2 = "";
8186
- if ("string" == typeof e2 || "number" == typeof e2)
8187
- n2 += e2;
8188
- else if ("object" == typeof e2)
8189
- if (Array.isArray(e2))
8190
- for (t2 = 0; t2 < e2.length; t2++)
8191
- e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
8192
- else
8193
- for (t2 in e2)
8194
- e2[t2] && (n2 && (n2 += " "), n2 += t2);
8195
- return n2;
8196
- }
8197
- function clsx() {
8198
- for (var e2, t2, f2 = 0, n2 = ""; f2 < arguments.length; )
8199
- (e2 = arguments[f2++]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
8200
- return n2;
7851
+ e = 0;
7852
+ v--;
7853
+ if (t2)
7854
+ throw i2;
7855
+ } else
7856
+ v--;
8201
7857
  }
8202
- const StatusbarIconButton = ({
8203
- class: className,
8204
- children,
8205
- ...props
8206
- }) => {
8207
- return o("button", {
8208
- class: clsx("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all", className),
8209
- ...props,
8210
- children: o("svg", {
8211
- class: "block",
8212
- width: "16",
8213
- height: "16",
8214
- viewBox: "0 0 16 16",
8215
- fill: "none",
8216
- stroke: "currentColor",
8217
- "stroke-width": "1.5",
8218
- "stroke-linecap": "round",
8219
- xmlns: "http://www.w3.org/2000/svg",
8220
- children
8221
- })
8222
- });
8223
- };
8224
- const StatusBar = ({
8225
- children
8226
- }) => {
8227
- const view = viewState.value;
8228
- return o("header", {
8229
- class: "ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto flex h-[var(--header-height)] items-center gap-2 ring-1 backdrop-blur-md backdrop-saturate-150",
8230
- children: [o("p", {
8231
- id: "chatbot-status-bar",
8232
- class: "sr-only",
8233
- children
8234
- }), o("button", {
8235
- tabIndex: -1,
8236
- "aria-hidden": true,
8237
- onClick: () => {
8238
- if (view === "minimised") {
8239
- viewState.value = "maximised";
8240
- } else {
8241
- viewState.value = "minimised";
8242
- }
8243
- },
8244
- class: "h-full flex-grow overflow-hidden px-4 py-1",
8245
- children: o("p", {
8246
- "aria-hidden": true,
8247
- class: "text-neutral-12 truncate text-sm font-bold tracking-tight",
8248
- children
8249
- })
8250
- }), o("div", {
8251
- class: "flex flex-shrink-0 items-center gap-3 p-1.5",
8252
- children: viewState.value === "minimised" ? o(k$3, {
8253
- children: [o(StatusbarIconButton, {
8254
- "aria-label": "Maximise job application",
8255
- onClick: () => viewState.value = "maximised",
8256
- children: o("path", {
8257
- d: "M12.5 9.5L8 5L3.5 9.5"
8258
- })
8259
- }, "minmax"), o(StatusbarIconButton, {
8260
- "aria-label": "Close application",
8261
- onClick: application.cancel,
8262
- children: o("path", {
8263
- d: "M12.5 6.5L8 11L3.5 6.5"
8264
- })
8265
- }, "close")]
8266
- }) : o(k$3, {
8267
- children: [application.current$.value.state === "loaded" && o(StatusbarIconButton, {
8268
- "aria-label": "Restart",
8269
- onClick: () => {
8270
- application.restart();
8271
- },
8272
- children: [o("path", {
8273
- d: "M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"
8274
- }), o("path", {
8275
- d: "M8 7L10 4.5L8 2.5"
8276
- })]
8277
- }, "restart"), o(StatusbarIconButton, {
8278
- "aria-label": "Minimise application",
8279
- onClick: () => viewState.value = "minimised",
8280
- children: o("path", {
8281
- d: "M12.5 6.5L8 11L3.5 6.5"
8282
- })
8283
- }, "minmax")]
8284
- })
8285
- })]
8286
- });
8287
- };
8288
- const JobApplicationContent = M(() => import("./job-application-content-89f9de3b.js").then((module) => module.JobApplicationContent));
8289
- const MotionProvider = ({
8290
- children
8291
- }) => {
8292
- return o(LazyMotion, {
8293
- features: domAnimation,
8294
- children
8295
- });
8296
- };
8297
- const chatbotVariants = {
8298
- closed: {
8299
- y: "calc(100% + 1rem)",
8300
- height: HEADER_HEIGHT
8301
- },
8302
- maximised: {
8303
- y: 0,
8304
- height: "75vh"
8305
- },
8306
- minimised: {
8307
- y: 0,
8308
- height: HEADER_HEIGHT
8309
- }
8310
- };
8311
- const Chatbot = ({
8312
- logger,
8313
- apiClient,
8314
- analytics
8315
- }) => {
8316
- const {
8317
- state,
8318
- application: currentApplication2,
8319
- error
8320
- } = application.current$.value;
8321
- const view = viewState.value;
8322
- const isApplying = state !== "idle" && view === "maximised";
8323
- const drawerRef = _$4(null);
8324
- return o(MotionProvider, {
8325
- children: o($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, {
8326
- open: isApplying,
8327
- modal: isApplying,
8328
- children: o(AnimatePresence, {
8329
- children: [o($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, {
8330
- forceMount: true,
8331
- asChild: true,
8332
- children: isApplying && o(m$1.div, {
8333
- initial: {
8334
- opacity: 0
8335
- },
8336
- animate: {
8337
- opacity: 1
8338
- },
8339
- exit: {
8340
- opacity: 0
8341
- },
8342
- class: "bg-overlay fixed inset-0"
8343
- })
8344
- }, "bg"), o($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, {
8345
- forceMount: true,
8346
- asChild: true,
8347
- children: o(m$1.div, {
8348
- ref: drawerRef,
8349
- "aria-modal": "true",
8350
- role: "dialog",
8351
- "aria-labelledby": "chatbot-status-bar",
8352
- variants: chatbotVariants,
8353
- initial: "closed",
8354
- animate: N({
8355
- state,
8356
- view
8357
- }).with({
8358
- state: "idle"
8359
- }, () => "closed").with({
8360
- state: _$1.union("loaded", "error", "loading")
8361
- }, ({
8362
- view: view2
8363
- }) => view2).exhaustive(),
8364
- exit: "closed",
8365
- style: {
8366
- "--header-height": `${HEADER_HEIGHT}px`
8367
- },
8368
- class: "selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",
8369
- children: o("div", {
8370
- class: "outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",
8371
- children: [o(StatusBar, {
8372
- children: currentApplication2 ? `Applying for “${currentApplication2.job.title}” at ${currentApplication2.company.name}` : "inploi chatbot: " + state
8373
- }), (() => {
8374
- switch (state) {
8375
- case "idle":
8376
- return null;
8377
- case "loading":
8378
- return o(ChatLoading, {}, "loading");
8379
- case "loaded":
8380
- if (view !== "maximised")
8381
- return null;
8382
- return o(D, {
8383
- fallback: o(ChatLoading, {}, "loading"),
8384
- children: o(JobApplicationContent, {
8385
- analytics,
8386
- currentApplication: currentApplication2,
8387
- apiClient,
8388
- logger
8389
- })
8390
- });
8391
- case "error":
8392
- return o(ChatError, {
8393
- message: error
8394
- });
8395
- default:
8396
- exhaustive(state);
8397
- }
8398
- })()]
8399
- })
8400
- }, "content")
8401
- })]
8402
- })
8403
- })
8404
- });
8405
- };
8406
- function flatten$1(arg1) {
8407
- return (Array.isArray(arg1) ? arg1 : arg1.issues).reduce(
8408
- (flatErrors, issue) => {
8409
- if (issue.path) {
8410
- if (issue.path.every(
8411
- ({ key }) => typeof key === "string" || typeof key === "number"
8412
- )) {
8413
- const path = issue.path.map(({ key }) => key).join(".");
8414
- if (flatErrors.nested[path]) {
8415
- flatErrors.nested[path].push(issue.message);
8416
- } else {
8417
- flatErrors.nested[path] = [issue.message];
8418
- }
8419
- }
8420
- } else {
8421
- if (flatErrors.root) {
8422
- flatErrors.root.push(issue.message);
8423
- } else {
8424
- flatErrors.root = [issue.message];
8425
- }
7858
+ var o$1 = void 0;
7859
+ var f = void 0, v = 0, e = 0, u = 0;
7860
+ function c(i2) {
7861
+ if (void 0 !== o$1) {
7862
+ var t2 = i2.n;
7863
+ if (void 0 === t2 || t2.t !== o$1) {
7864
+ t2 = { i: 0, S: i2, p: o$1.s, n: void 0, t: o$1, e: void 0, x: void 0, r: t2 };
7865
+ if (void 0 !== o$1.s)
7866
+ o$1.s.n = t2;
7867
+ o$1.s = t2;
7868
+ i2.n = t2;
7869
+ if (32 & o$1.f)
7870
+ i2.S(t2);
7871
+ return t2;
7872
+ } else if (-1 === t2.i) {
7873
+ t2.i = 0;
7874
+ if (void 0 !== t2.n) {
7875
+ t2.n.p = t2.p;
7876
+ if (void 0 !== t2.p)
7877
+ t2.p.n = t2.n;
7878
+ t2.p = o$1.s;
7879
+ t2.n = void 0;
7880
+ o$1.s.n = t2;
7881
+ o$1.s = t2;
8426
7882
  }
8427
- return flatErrors;
8428
- },
8429
- { nested: {} }
8430
- );
7883
+ return t2;
7884
+ }
7885
+ }
8431
7886
  }
8432
- var ValiError = class extends Error {
8433
- /**
8434
- * Creates a Valibot error with useful information.
8435
- *
8436
- * @param issues The error issues.
8437
- */
8438
- constructor(issues) {
8439
- super(issues[0].message);
8440
- __publicField(this, "issues");
8441
- this.name = "ValiError";
8442
- this.issues = issues;
7887
+ function d$1(i2) {
7888
+ this.v = i2;
7889
+ this.i = 0;
7890
+ this.n = void 0;
7891
+ this.t = void 0;
7892
+ }
7893
+ d$1.prototype.brand = t;
7894
+ d$1.prototype.h = function() {
7895
+ return true;
7896
+ };
7897
+ d$1.prototype.S = function(i2) {
7898
+ if (this.t !== i2 && void 0 === i2.e) {
7899
+ i2.x = this.t;
7900
+ if (void 0 !== this.t)
7901
+ this.t.e = i2;
7902
+ this.t = i2;
8443
7903
  }
8444
7904
  };
8445
- function coerce(schema, action) {
8446
- return {
8447
- ...schema,
8448
- _parse(input, info) {
8449
- return schema._parse(action(input), info);
7905
+ d$1.prototype.U = function(i2) {
7906
+ if (void 0 !== this.t) {
7907
+ var t2 = i2.e, r2 = i2.x;
7908
+ if (void 0 !== t2) {
7909
+ t2.x = r2;
7910
+ i2.e = void 0;
8450
7911
  }
8451
- };
7912
+ if (void 0 !== r2) {
7913
+ r2.e = t2;
7914
+ i2.x = void 0;
7915
+ }
7916
+ if (i2 === this.t)
7917
+ this.t = r2;
7918
+ }
7919
+ };
7920
+ d$1.prototype.subscribe = function(i2) {
7921
+ var t2 = this;
7922
+ return O(function() {
7923
+ var r2 = t2.value, n2 = 32 & this.f;
7924
+ this.f &= -33;
7925
+ try {
7926
+ i2(r2);
7927
+ } finally {
7928
+ this.f |= n2;
7929
+ }
7930
+ });
7931
+ };
7932
+ d$1.prototype.valueOf = function() {
7933
+ return this.value;
7934
+ };
7935
+ d$1.prototype.toString = function() {
7936
+ return this.value + "";
7937
+ };
7938
+ d$1.prototype.toJSON = function() {
7939
+ return this.value;
7940
+ };
7941
+ d$1.prototype.peek = function() {
7942
+ return this.v;
7943
+ };
7944
+ Object.defineProperty(d$1.prototype, "value", { get: function() {
7945
+ var i2 = c(this);
7946
+ if (void 0 !== i2)
7947
+ i2.i = this.i;
7948
+ return this.v;
7949
+ }, set: function(t2) {
7950
+ if (o$1 instanceof _$2)
7951
+ !function() {
7952
+ throw new Error("Computed cannot have side-effects");
7953
+ }();
7954
+ if (t2 !== this.v) {
7955
+ if (e > 100)
7956
+ i();
7957
+ this.v = t2;
7958
+ this.i++;
7959
+ u++;
7960
+ v++;
7961
+ try {
7962
+ for (var n2 = this.t; void 0 !== n2; n2 = n2.x)
7963
+ n2.t.N();
7964
+ } finally {
7965
+ r$1();
7966
+ }
7967
+ }
7968
+ } });
7969
+ function a(i2) {
7970
+ return new d$1(i2);
8452
7971
  }
8453
- function getIssues(issues) {
8454
- return { issues };
7972
+ function l$1(i2) {
7973
+ for (var t2 = i2.s; void 0 !== t2; t2 = t2.n)
7974
+ if (t2.S.i !== t2.i || !t2.S.h() || t2.S.i !== t2.i)
7975
+ return true;
7976
+ return false;
8455
7977
  }
8456
- function getOutput(output) {
8457
- return { output };
7978
+ function y(i2) {
7979
+ for (var t2 = i2.s; void 0 !== t2; t2 = t2.n) {
7980
+ var r2 = t2.S.n;
7981
+ if (void 0 !== r2)
7982
+ t2.r = r2;
7983
+ t2.S.n = t2;
7984
+ t2.i = -1;
7985
+ if (void 0 === t2.n) {
7986
+ i2.s = t2;
7987
+ break;
7988
+ }
7989
+ }
8458
7990
  }
8459
- function getIssue(info, issue) {
8460
- return {
8461
- reason: info == null ? void 0 : info.reason,
8462
- validation: issue.validation,
8463
- origin: (info == null ? void 0 : info.origin) || "value",
8464
- message: issue.message,
8465
- input: issue.input,
8466
- path: issue.path,
8467
- abortEarly: info == null ? void 0 : info.abortEarly,
8468
- abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
8469
- skipPipe: info == null ? void 0 : info.skipPipe
8470
- };
7991
+ function w(i2) {
7992
+ var t2 = i2.s, r2 = void 0;
7993
+ while (void 0 !== t2) {
7994
+ var n2 = t2.p;
7995
+ if (-1 === t2.i) {
7996
+ t2.S.U(t2);
7997
+ if (void 0 !== n2)
7998
+ n2.n = t2.n;
7999
+ if (void 0 !== t2.n)
8000
+ t2.n.p = n2;
8001
+ } else
8002
+ r2 = t2;
8003
+ t2.S.n = t2.r;
8004
+ if (void 0 !== t2.r)
8005
+ t2.r = void 0;
8006
+ t2 = n2;
8007
+ }
8008
+ i2.s = r2;
8471
8009
  }
8472
- function getPipeInfo(info, reason) {
8473
- return {
8474
- reason,
8475
- origin: info == null ? void 0 : info.origin,
8476
- abortEarly: info == null ? void 0 : info.abortEarly,
8477
- abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
8478
- skipPipe: info == null ? void 0 : info.skipPipe
8479
- };
8010
+ function _$2(i2) {
8011
+ d$1.call(this, void 0);
8012
+ this.x = i2;
8013
+ this.s = void 0;
8014
+ this.g = u - 1;
8015
+ this.f = 4;
8480
8016
  }
8481
- function executePipe(input, pipe2, parseInfo, reason) {
8482
- if (!pipe2 || !pipe2.length || (parseInfo == null ? void 0 : parseInfo.skipPipe)) {
8483
- return getOutput(input);
8017
+ (_$2.prototype = new d$1()).h = function() {
8018
+ this.f &= -3;
8019
+ if (1 & this.f)
8020
+ return false;
8021
+ if (32 == (36 & this.f))
8022
+ return true;
8023
+ this.f &= -5;
8024
+ if (this.g === u)
8025
+ return true;
8026
+ this.g = u;
8027
+ this.f |= 1;
8028
+ if (this.i > 0 && !l$1(this)) {
8029
+ this.f &= -2;
8030
+ return true;
8484
8031
  }
8485
- let pipeInfo;
8486
- let issues;
8487
- let output = input;
8488
- for (const action of pipe2) {
8489
- const result = action._parse(output);
8490
- if (result.issues) {
8491
- pipeInfo = pipeInfo || getPipeInfo(parseInfo, reason);
8492
- for (const issueInfo of result.issues) {
8493
- const issue = getIssue(pipeInfo, issueInfo);
8494
- issues ? issues.push(issue) : issues = [issue];
8495
- }
8496
- if (pipeInfo.abortEarly || pipeInfo.abortPipeEarly) {
8497
- break;
8498
- }
8499
- } else {
8500
- output = result.output;
8032
+ var i2 = o$1;
8033
+ try {
8034
+ y(this);
8035
+ o$1 = this;
8036
+ var t2 = this.x();
8037
+ if (16 & this.f || this.v !== t2 || 0 === this.i) {
8038
+ this.v = t2;
8039
+ this.f &= -17;
8040
+ this.i++;
8501
8041
  }
8042
+ } catch (i3) {
8043
+ this.v = i3;
8044
+ this.f |= 16;
8045
+ this.i++;
8502
8046
  }
8503
- return issues ? getIssues(issues) : getOutput(output);
8504
- }
8505
- function getDefaultArgs(arg1, arg2) {
8506
- return Array.isArray(arg1) ? [void 0, arg1] : [arg1, arg2];
8507
- }
8508
- function getErrorMessage(message) {
8509
- return typeof message === "function" ? message() : message;
8510
- }
8511
- function getPipeIssues(validation, message, input, requirement) {
8512
- return getIssues([
8513
- {
8514
- validation,
8515
- message: getErrorMessage(message),
8516
- input,
8517
- requirement
8047
+ o$1 = i2;
8048
+ w(this);
8049
+ this.f &= -2;
8050
+ return true;
8051
+ };
8052
+ _$2.prototype.S = function(i2) {
8053
+ if (void 0 === this.t) {
8054
+ this.f |= 36;
8055
+ for (var t2 = this.s; void 0 !== t2; t2 = t2.n)
8056
+ t2.S.S(t2);
8057
+ }
8058
+ d$1.prototype.S.call(this, i2);
8059
+ };
8060
+ _$2.prototype.U = function(i2) {
8061
+ if (void 0 !== this.t) {
8062
+ d$1.prototype.U.call(this, i2);
8063
+ if (void 0 === this.t) {
8064
+ this.f &= -33;
8065
+ for (var t2 = this.s; void 0 !== t2; t2 = t2.n)
8066
+ t2.S.U(t2);
8518
8067
  }
8519
- ]);
8068
+ }
8069
+ };
8070
+ _$2.prototype.N = function() {
8071
+ if (!(2 & this.f)) {
8072
+ this.f |= 6;
8073
+ for (var i2 = this.t; void 0 !== i2; i2 = i2.x)
8074
+ i2.t.N();
8075
+ }
8076
+ };
8077
+ _$2.prototype.peek = function() {
8078
+ if (!this.h())
8079
+ i();
8080
+ if (16 & this.f)
8081
+ throw this.v;
8082
+ return this.v;
8083
+ };
8084
+ Object.defineProperty(_$2.prototype, "value", { get: function() {
8085
+ if (1 & this.f)
8086
+ i();
8087
+ var t2 = c(this);
8088
+ this.h();
8089
+ if (void 0 !== t2)
8090
+ t2.i = this.i;
8091
+ if (16 & this.f)
8092
+ throw this.v;
8093
+ return this.v;
8094
+ } });
8095
+ function p$1(i2) {
8096
+ return new _$2(i2);
8520
8097
  }
8521
- function getRestAndDefaultArgs(arg1, arg2, arg3) {
8522
- if (!arg1 || typeof arg1 === "object" && !Array.isArray(arg1)) {
8523
- const [error2, pipe22] = getDefaultArgs(arg2, arg3);
8524
- return [arg1, error2, pipe22];
8098
+ function g(i2) {
8099
+ var t2 = i2.u;
8100
+ i2.u = void 0;
8101
+ if ("function" == typeof t2) {
8102
+ v++;
8103
+ var n2 = o$1;
8104
+ o$1 = void 0;
8105
+ try {
8106
+ t2();
8107
+ } catch (t3) {
8108
+ i2.f &= -2;
8109
+ i2.f |= 8;
8110
+ b(i2);
8111
+ throw t3;
8112
+ } finally {
8113
+ o$1 = n2;
8114
+ r$1();
8115
+ }
8525
8116
  }
8526
- const [error, pipe2] = getDefaultArgs(
8527
- arg1,
8528
- arg2
8529
- );
8530
- return [void 0, error, pipe2];
8531
8117
  }
8532
- function getSchemaIssues(info, reason, validation, message, input, issues) {
8533
- return {
8534
- issues: [
8535
- {
8536
- reason,
8537
- validation,
8538
- origin: (info == null ? void 0 : info.origin) || "value",
8539
- message: getErrorMessage(message),
8540
- input,
8541
- issues,
8542
- abortEarly: info == null ? void 0 : info.abortEarly,
8543
- abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
8544
- skipPipe: info == null ? void 0 : info.skipPipe
8545
- }
8546
- ]
8547
- };
8118
+ function b(i2) {
8119
+ for (var t2 = i2.s; void 0 !== t2; t2 = t2.n)
8120
+ t2.S.U(t2);
8121
+ i2.x = void 0;
8122
+ i2.s = void 0;
8123
+ g(i2);
8548
8124
  }
8549
- function getDefault(schema) {
8550
- return typeof schema.default === "function" ? schema.default() : schema.default;
8125
+ function x(i2) {
8126
+ if (o$1 !== this)
8127
+ throw new Error("Out-of-order effect");
8128
+ w(this);
8129
+ o$1 = i2;
8130
+ this.f &= -2;
8131
+ if (8 & this.f)
8132
+ b(this);
8133
+ r$1();
8551
8134
  }
8552
- function any(pipe2) {
8553
- return {
8554
- type: "any",
8555
- async: false,
8556
- pipe: pipe2,
8557
- _parse(input, info) {
8558
- return executePipe(input, this.pipe, info, "any");
8559
- }
8560
- };
8135
+ function E(i2) {
8136
+ this.x = i2;
8137
+ this.u = void 0;
8138
+ this.s = void 0;
8139
+ this.o = void 0;
8140
+ this.f = 32;
8561
8141
  }
8562
- function array(item, arg2, arg3) {
8563
- const [message = "Invalid type", pipe2] = getDefaultArgs(arg2, arg3);
8564
- return {
8565
- type: "array",
8566
- async: false,
8567
- item,
8568
- message,
8569
- pipe: pipe2,
8570
- _parse(input, info) {
8571
- if (!Array.isArray(input)) {
8572
- return getSchemaIssues(info, "type", "array", this.message, input);
8573
- }
8574
- let issues;
8575
- const output = [];
8576
- for (let key = 0; key < input.length; key++) {
8577
- const value2 = input[key];
8578
- const result = this.item._parse(value2, info);
8579
- if (result.issues) {
8580
- const pathItem = {
8581
- type: "array",
8582
- input,
8583
- key,
8584
- value: value2
8585
- };
8586
- for (const issue of result.issues) {
8587
- if (issue.path) {
8588
- issue.path.unshift(pathItem);
8589
- } else {
8590
- issue.path = [pathItem];
8591
- }
8592
- issues == null ? void 0 : issues.push(issue);
8593
- }
8594
- if (!issues) {
8595
- issues = result.issues;
8596
- }
8597
- if (info == null ? void 0 : info.abortEarly) {
8598
- break;
8599
- }
8600
- } else {
8601
- output.push(result.output);
8602
- }
8603
- }
8604
- return issues ? getIssues(issues) : executePipe(output, this.pipe, info, "array");
8605
- }
8606
- };
8142
+ E.prototype.c = function() {
8143
+ var i2 = this.S();
8144
+ try {
8145
+ if (8 & this.f)
8146
+ return;
8147
+ if (void 0 === this.x)
8148
+ return;
8149
+ var t2 = this.x();
8150
+ if ("function" == typeof t2)
8151
+ this.u = t2;
8152
+ } finally {
8153
+ i2();
8154
+ }
8155
+ };
8156
+ E.prototype.S = function() {
8157
+ if (1 & this.f)
8158
+ i();
8159
+ this.f |= 1;
8160
+ this.f &= -9;
8161
+ g(this);
8162
+ y(this);
8163
+ v++;
8164
+ var t2 = o$1;
8165
+ o$1 = this;
8166
+ return x.bind(this, t2);
8167
+ };
8168
+ E.prototype.N = function() {
8169
+ if (!(2 & this.f)) {
8170
+ this.f |= 2;
8171
+ this.o = f;
8172
+ f = this;
8173
+ }
8174
+ };
8175
+ E.prototype.d = function() {
8176
+ this.f |= 8;
8177
+ if (!(1 & this.f))
8178
+ b(this);
8179
+ };
8180
+ function O(i2) {
8181
+ var t2 = new E(i2);
8182
+ try {
8183
+ t2.c();
8184
+ } catch (i3) {
8185
+ t2.d();
8186
+ throw i3;
8187
+ }
8188
+ return t2.d.bind(t2);
8607
8189
  }
8608
- function boolean(arg1, arg2) {
8609
- const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
8610
- return {
8611
- type: "boolean",
8612
- async: false,
8613
- message,
8614
- pipe: pipe2,
8615
- _parse(input, info) {
8616
- if (typeof input !== "boolean") {
8617
- return getSchemaIssues(info, "type", "boolean", this.message, input);
8618
- }
8619
- return executePipe(input, this.pipe, info, "boolean");
8620
- }
8621
- };
8190
+ var s;
8191
+ function l(n2, i2) {
8192
+ l$4[n2] = i2.bind(null, l$4[n2] || function() {
8193
+ });
8622
8194
  }
8623
- function number(arg1, arg2) {
8624
- const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
8625
- return {
8626
- type: "number",
8627
- async: false,
8628
- message,
8629
- pipe: pipe2,
8630
- _parse(input, info) {
8631
- if (typeof input !== "number" || isNaN(input)) {
8632
- return getSchemaIssues(info, "type", "number", this.message, input);
8633
- }
8634
- return executePipe(input, this.pipe, info, "number");
8635
- }
8636
- };
8195
+ function d(n2) {
8196
+ if (s)
8197
+ s();
8198
+ s = n2 && n2.S();
8637
8199
  }
8638
- function object(entries, arg2, arg3, arg4) {
8639
- const [rest, message = "Invalid type", pipe2] = getRestAndDefaultArgs(arg2, arg3, arg4);
8640
- let cachedEntries;
8641
- return {
8642
- type: "object",
8643
- async: false,
8644
- entries,
8645
- rest,
8646
- message,
8647
- pipe: pipe2,
8648
- _parse(input, info) {
8649
- if (!input || typeof input !== "object") {
8650
- return getSchemaIssues(info, "type", "object", this.message, input);
8200
+ function p(n2) {
8201
+ var r2 = this, f2 = n2.data, o2 = useSignal(f2);
8202
+ o2.value = f2;
8203
+ var e2 = F$1(function() {
8204
+ var n3 = r2.__v;
8205
+ while (n3 = n3.__)
8206
+ if (n3.__c) {
8207
+ n3.__c.__$f |= 4;
8208
+ break;
8651
8209
  }
8652
- cachedEntries = cachedEntries || Object.entries(this.entries);
8653
- let issues;
8654
- const output = {};
8655
- for (const [key, schema] of cachedEntries) {
8656
- const value2 = input[key];
8657
- const result = schema._parse(value2, info);
8658
- if (result.issues) {
8659
- const pathItem = {
8660
- type: "object",
8661
- input,
8662
- key,
8663
- value: value2
8664
- };
8665
- for (const issue of result.issues) {
8666
- if (issue.path) {
8667
- issue.path.unshift(pathItem);
8668
- } else {
8669
- issue.path = [pathItem];
8670
- }
8671
- issues == null ? void 0 : issues.push(issue);
8672
- }
8673
- if (!issues) {
8674
- issues = result.issues;
8675
- }
8676
- if (info == null ? void 0 : info.abortEarly) {
8677
- break;
8678
- }
8679
- } else if (result.output !== void 0 || key in input) {
8680
- output[key] = result.output;
8210
+ r2.__$u.c = function() {
8211
+ var n4;
8212
+ if (!t$3(e2.peek()) && 3 === (null == (n4 = r2.base) ? void 0 : n4.nodeType))
8213
+ r2.base.data = e2.peek();
8214
+ else {
8215
+ r2.__$f |= 1;
8216
+ r2.setState({});
8217
+ }
8218
+ };
8219
+ return p$1(function() {
8220
+ var n4 = o2.value.value;
8221
+ return 0 === n4 ? 0 : true === n4 ? "" : n4 || "";
8222
+ });
8223
+ }, []);
8224
+ return e2.value;
8225
+ }
8226
+ p.displayName = "_st";
8227
+ Object.defineProperties(d$1.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value: p }, props: { configurable: true, get: function() {
8228
+ return { data: this };
8229
+ } }, __b: { configurable: true, value: 1 } });
8230
+ l("__b", function(n2, r2) {
8231
+ if ("string" == typeof r2.type) {
8232
+ var i2, t2 = r2.props;
8233
+ for (var f2 in t2)
8234
+ if ("children" !== f2) {
8235
+ var o2 = t2[f2];
8236
+ if (o2 instanceof d$1) {
8237
+ if (!i2)
8238
+ r2.__np = i2 = {};
8239
+ i2[f2] = o2;
8240
+ t2[f2] = o2.peek();
8681
8241
  }
8682
8242
  }
8683
- if (this.rest && !((info == null ? void 0 : info.abortEarly) && issues)) {
8684
- for (const key in input) {
8685
- if (!(key in this.entries)) {
8686
- const value2 = input[key];
8687
- const result = this.rest._parse(value2, info);
8688
- if (result.issues) {
8689
- const pathItem = {
8690
- type: "object",
8691
- input,
8692
- key,
8693
- value: value2
8694
- };
8695
- for (const issue of result.issues) {
8696
- if (issue.path) {
8697
- issue.path.unshift(pathItem);
8698
- } else {
8699
- issue.path = [pathItem];
8700
- }
8701
- issues == null ? void 0 : issues.push(issue);
8702
- }
8703
- if (!issues) {
8704
- issues = result.issues;
8705
- }
8706
- if (info == null ? void 0 : info.abortEarly) {
8707
- break;
8708
- }
8709
- } else {
8710
- output[key] = result.output;
8711
- }
8243
+ }
8244
+ n2(r2);
8245
+ });
8246
+ l("__r", function(n2, r2) {
8247
+ d();
8248
+ var i2, t2 = r2.__c;
8249
+ if (t2) {
8250
+ t2.__$f &= -2;
8251
+ if (void 0 === (i2 = t2.__$u))
8252
+ t2.__$u = i2 = function(n3) {
8253
+ var r3;
8254
+ O(function() {
8255
+ r3 = this;
8256
+ });
8257
+ r3.c = function() {
8258
+ t2.__$f |= 1;
8259
+ t2.setState({});
8260
+ };
8261
+ return r3;
8262
+ }();
8263
+ }
8264
+ d(i2);
8265
+ n2(r2);
8266
+ });
8267
+ l("__e", function(n2, r2, i2, t2) {
8268
+ d();
8269
+ n2(r2, i2, t2);
8270
+ });
8271
+ l("diffed", function(n2, r2) {
8272
+ d();
8273
+ var i2;
8274
+ if ("string" == typeof r2.type && (i2 = r2.__e)) {
8275
+ var t2 = r2.__np, f2 = r2.props;
8276
+ if (t2) {
8277
+ var o2 = i2.U;
8278
+ if (o2)
8279
+ for (var e2 in o2) {
8280
+ var u2 = o2[e2];
8281
+ if (void 0 !== u2 && !(e2 in t2)) {
8282
+ u2.d();
8283
+ o2[e2] = void 0;
8712
8284
  }
8713
8285
  }
8286
+ else
8287
+ i2.U = o2 = {};
8288
+ for (var a2 in t2) {
8289
+ var c2 = o2[a2], s2 = t2[a2];
8290
+ if (void 0 === c2) {
8291
+ c2 = _$1(i2, a2, s2, f2);
8292
+ o2[a2] = c2;
8293
+ } else
8294
+ c2.o(s2, f2);
8714
8295
  }
8715
- return issues ? getIssues(issues) : executePipe(
8716
- output,
8717
- this.pipe,
8718
- info,
8719
- "object"
8720
- );
8721
8296
  }
8722
- };
8723
- }
8724
- function optional(wrapped, default_) {
8725
- return {
8726
- type: "optional",
8727
- async: false,
8728
- wrapped,
8729
- default: default_,
8730
- _parse(input, info) {
8731
- if (input === void 0) {
8732
- const override = getDefault(this);
8733
- if (override === void 0) {
8734
- return getOutput(input);
8735
- }
8736
- input = override;
8737
- }
8738
- return this.wrapped._parse(input, info);
8297
+ }
8298
+ n2(r2);
8299
+ });
8300
+ function _$1(n2, r2, i2, t2) {
8301
+ var f2 = r2 in n2 && void 0 === n2.ownerSVGElement, o2 = a(i2);
8302
+ return { o: function(n3, r3) {
8303
+ o2.value = n3;
8304
+ t2 = r3;
8305
+ }, d: O(function() {
8306
+ var i3 = o2.value.value;
8307
+ if (t2[r2] !== i3) {
8308
+ t2[r2] = i3;
8309
+ if (f2)
8310
+ n2[r2] = i3;
8311
+ else if (i3)
8312
+ n2.setAttribute(r2, i3);
8313
+ else
8314
+ n2.removeAttribute(r2);
8739
8315
  }
8740
- };
8316
+ }) };
8741
8317
  }
8742
- function picklist(options, message = "Invalid type") {
8743
- return {
8744
- type: "picklist",
8745
- async: false,
8746
- options,
8747
- message,
8748
- _parse(input, info) {
8749
- if (!this.options.includes(input)) {
8750
- return getSchemaIssues(info, "type", "picklist", this.message, input);
8318
+ l("unmount", function(n2, r2) {
8319
+ if ("string" == typeof r2.type) {
8320
+ var i2 = r2.__e;
8321
+ if (i2) {
8322
+ var t2 = i2.U;
8323
+ if (t2) {
8324
+ i2.U = void 0;
8325
+ for (var f2 in t2) {
8326
+ var o2 = t2[f2];
8327
+ if (o2)
8328
+ o2.d();
8329
+ }
8751
8330
  }
8752
- return getOutput(input);
8753
8331
  }
8754
- };
8755
- }
8756
- function string(arg1, arg2) {
8757
- const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
8758
- return {
8759
- type: "string",
8760
- async: false,
8761
- message,
8762
- pipe: pipe2,
8763
- _parse(input, info) {
8764
- if (typeof input !== "string") {
8765
- return getSchemaIssues(info, "type", "string", this.message, input);
8332
+ } else {
8333
+ var e2 = r2.__c;
8334
+ if (e2) {
8335
+ var u2 = e2.__$u;
8336
+ if (u2) {
8337
+ e2.__$u = void 0;
8338
+ u2.d();
8766
8339
  }
8767
- return executePipe(input, this.pipe, info, "string");
8768
8340
  }
8769
- };
8770
- }
8771
- function getRecordArgs(arg1, arg2, arg3, arg4) {
8772
- if (typeof arg2 === "object" && !Array.isArray(arg2)) {
8773
- const [message2, pipe22] = getDefaultArgs(arg3, arg4);
8774
- return [arg1, arg2, message2, pipe22];
8775
8341
  }
8776
- const [message, pipe2] = getDefaultArgs(
8777
- arg2,
8778
- arg3
8779
- );
8780
- return [string(), arg1, message, pipe2];
8342
+ n2(r2);
8343
+ });
8344
+ l("__h", function(n2, r2, i2, t2) {
8345
+ if (t2 < 3 || 9 === t2)
8346
+ r2.__$f |= 2;
8347
+ n2(r2, i2, t2);
8348
+ });
8349
+ b$3.prototype.shouldComponentUpdate = function(n2, r2) {
8350
+ var i2 = this.__$u;
8351
+ if (!(i2 && void 0 !== i2.s || 4 & this.__$f))
8352
+ return true;
8353
+ if (3 & this.__$f)
8354
+ return true;
8355
+ for (var t2 in r2)
8356
+ return true;
8357
+ for (var f2 in n2)
8358
+ if ("__source" !== f2 && n2[f2] !== this.props[f2])
8359
+ return true;
8360
+ for (var o2 in this.props)
8361
+ if (!(o2 in n2))
8362
+ return true;
8363
+ return false;
8364
+ };
8365
+ function useSignal(n2) {
8366
+ return F$1(function() {
8367
+ return a(n2);
8368
+ }, []);
8781
8369
  }
8782
- var BLOCKED_KEYS = ["__proto__", "prototype", "constructor"];
8783
- function record(arg1, arg2, arg3, arg4) {
8784
- const [key, value2, message = "Invalid type", pipe2] = getRecordArgs(arg1, arg2, arg3, arg4);
8785
- return {
8786
- type: "record",
8787
- async: false,
8788
- key,
8789
- value: value2,
8790
- message,
8791
- pipe: pipe2,
8792
- _parse(input, info) {
8793
- if (!input || typeof input !== "object") {
8794
- return getSchemaIssues(info, "type", "record", this.message, input);
8795
- }
8796
- let issues;
8797
- const output = {};
8798
- for (const [inputKey, inputValue] of Object.entries(input)) {
8799
- if (!BLOCKED_KEYS.includes(inputKey)) {
8800
- let pathItem;
8801
- const keyResult = this.key._parse(inputKey, {
8802
- origin: "key",
8803
- abortEarly: info == null ? void 0 : info.abortEarly,
8804
- abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
8805
- skipPipe: info == null ? void 0 : info.skipPipe
8806
- });
8807
- if (keyResult.issues) {
8808
- pathItem = {
8809
- type: "record",
8810
- input,
8811
- key: inputKey,
8812
- value: inputValue
8813
- };
8814
- for (const issue of keyResult.issues) {
8815
- issue.path = [pathItem];
8816
- issues == null ? void 0 : issues.push(issue);
8817
- }
8818
- if (!issues) {
8819
- issues = keyResult.issues;
8820
- }
8821
- if (info == null ? void 0 : info.abortEarly) {
8822
- break;
8823
- }
8824
- }
8825
- const valueResult = this.value._parse(inputValue, info);
8826
- if (valueResult.issues) {
8827
- pathItem = pathItem || {
8828
- type: "record",
8829
- input,
8830
- key: inputKey,
8831
- value: inputValue
8832
- };
8833
- for (const issue of valueResult.issues) {
8834
- if (issue.path) {
8835
- issue.path.unshift(pathItem);
8836
- } else {
8837
- issue.path = [pathItem];
8838
- }
8839
- issues == null ? void 0 : issues.push(issue);
8840
- }
8841
- if (!issues) {
8842
- issues = valueResult.issues;
8843
- }
8844
- if (info == null ? void 0 : info.abortEarly) {
8845
- break;
8846
- }
8847
- }
8848
- if (!keyResult.issues && !valueResult.issues) {
8849
- output[keyResult.output] = valueResult.output;
8850
- }
8851
- }
8852
- }
8853
- return issues ? getIssues(issues) : executePipe(
8854
- output,
8855
- this.pipe,
8856
- info,
8857
- "record"
8858
- );
8859
- }
8860
- };
8370
+ const instanceOfAny = (object2, constructors) => constructors.some((c2) => object2 instanceof c2);
8371
+ let idbProxyableTypes;
8372
+ let cursorAdvanceMethods;
8373
+ function getIdbProxyableTypes() {
8374
+ return idbProxyableTypes || (idbProxyableTypes = [
8375
+ IDBDatabase,
8376
+ IDBObjectStore,
8377
+ IDBIndex,
8378
+ IDBCursor,
8379
+ IDBTransaction
8380
+ ]);
8861
8381
  }
8862
- function parse(schema, input, info) {
8863
- const result = schema._parse(input, info);
8864
- if (result.issues) {
8865
- throw new ValiError(result.issues);
8866
- }
8867
- return result.output;
8382
+ function getCursorAdvanceMethods() {
8383
+ return cursorAdvanceMethods || (cursorAdvanceMethods = [
8384
+ IDBCursor.prototype.advance,
8385
+ IDBCursor.prototype.continue,
8386
+ IDBCursor.prototype.continuePrimaryKey
8387
+ ]);
8868
8388
  }
8869
- async function parseAsync(schema, input, info) {
8870
- const result = await schema._parse(input, info);
8871
- if (result.issues) {
8872
- throw new ValiError(result.issues);
8873
- }
8874
- return result.output;
8389
+ const transactionDoneMap = /* @__PURE__ */ new WeakMap();
8390
+ const transformCache = /* @__PURE__ */ new WeakMap();
8391
+ const reverseTransformCache = /* @__PURE__ */ new WeakMap();
8392
+ function promisifyRequest(request) {
8393
+ const promise = new Promise((resolve, reject) => {
8394
+ const unlisten = () => {
8395
+ request.removeEventListener("success", success);
8396
+ request.removeEventListener("error", error);
8397
+ };
8398
+ const success = () => {
8399
+ resolve(wrap(request.result));
8400
+ unlisten();
8401
+ };
8402
+ const error = () => {
8403
+ reject(request.error);
8404
+ unlisten();
8405
+ };
8406
+ request.addEventListener("success", success);
8407
+ request.addEventListener("error", error);
8408
+ });
8409
+ reverseTransformCache.set(promise, request);
8410
+ return promise;
8875
8411
  }
8876
- function transform(schema, action, arg1) {
8877
- return {
8878
- ...schema,
8879
- _parse(input, info) {
8880
- const result = schema._parse(input, info);
8881
- if (result.issues) {
8882
- return result;
8883
- }
8884
- const output = action(result.output);
8885
- if (arg1 && !Array.isArray(arg1)) {
8886
- return arg1._parse(output, info);
8412
+ function cacheDonePromiseForTransaction(tx) {
8413
+ if (transactionDoneMap.has(tx))
8414
+ return;
8415
+ const done = new Promise((resolve, reject) => {
8416
+ const unlisten = () => {
8417
+ tx.removeEventListener("complete", complete);
8418
+ tx.removeEventListener("error", error);
8419
+ tx.removeEventListener("abort", error);
8420
+ };
8421
+ const complete = () => {
8422
+ resolve();
8423
+ unlisten();
8424
+ };
8425
+ const error = () => {
8426
+ reject(tx.error || new DOMException("AbortError", "AbortError"));
8427
+ unlisten();
8428
+ };
8429
+ tx.addEventListener("complete", complete);
8430
+ tx.addEventListener("error", error);
8431
+ tx.addEventListener("abort", error);
8432
+ });
8433
+ transactionDoneMap.set(tx, done);
8434
+ }
8435
+ let idbProxyTraps = {
8436
+ get(target, prop, receiver) {
8437
+ if (target instanceof IDBTransaction) {
8438
+ if (prop === "done")
8439
+ return transactionDoneMap.get(target);
8440
+ if (prop === "store") {
8441
+ return receiver.objectStoreNames[1] ? void 0 : receiver.objectStore(receiver.objectStoreNames[0]);
8887
8442
  }
8888
- return executePipe(output, arg1, info, typeof output);
8889
8443
  }
8444
+ return wrap(target[prop]);
8445
+ },
8446
+ set(target, prop, value) {
8447
+ target[prop] = value;
8448
+ return true;
8449
+ },
8450
+ has(target, prop) {
8451
+ if (target instanceof IDBTransaction && (prop === "done" || prop === "store")) {
8452
+ return true;
8453
+ }
8454
+ return prop in target;
8455
+ }
8456
+ };
8457
+ function replaceTraps(callback) {
8458
+ idbProxyTraps = callback(idbProxyTraps);
8459
+ }
8460
+ function wrapFunction(func) {
8461
+ if (getCursorAdvanceMethods().includes(func)) {
8462
+ return function(...args) {
8463
+ func.apply(unwrap(this), args);
8464
+ return wrap(this.request);
8465
+ };
8466
+ }
8467
+ return function(...args) {
8468
+ return wrap(func.apply(unwrap(this), args));
8890
8469
  };
8891
8470
  }
8892
- var EMAIL_REGEX = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;
8893
- function email(message = "Invalid email") {
8894
- return {
8895
- type: "email",
8896
- async: false,
8897
- message,
8898
- requirement: EMAIL_REGEX,
8899
- _parse(input) {
8900
- return !this.requirement.test(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
8901
- }
8471
+ function transformCachableValue(value) {
8472
+ if (typeof value === "function")
8473
+ return wrapFunction(value);
8474
+ if (value instanceof IDBTransaction)
8475
+ cacheDonePromiseForTransaction(value);
8476
+ if (instanceOfAny(value, getIdbProxyableTypes()))
8477
+ return new Proxy(value, idbProxyTraps);
8478
+ return value;
8479
+ }
8480
+ function wrap(value) {
8481
+ if (value instanceof IDBRequest)
8482
+ return promisifyRequest(value);
8483
+ if (transformCache.has(value))
8484
+ return transformCache.get(value);
8485
+ const newValue = transformCachableValue(value);
8486
+ if (newValue !== value) {
8487
+ transformCache.set(value, newValue);
8488
+ reverseTransformCache.set(newValue, value);
8489
+ }
8490
+ return newValue;
8491
+ }
8492
+ const unwrap = (value) => reverseTransformCache.get(value);
8493
+ function openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {
8494
+ const request = indexedDB.open(name, version);
8495
+ const openPromise = wrap(request);
8496
+ if (upgrade) {
8497
+ request.addEventListener("upgradeneeded", (event) => {
8498
+ upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);
8499
+ });
8500
+ }
8501
+ if (blocked) {
8502
+ request.addEventListener("blocked", (event) => blocked(
8503
+ // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
8504
+ event.oldVersion,
8505
+ event.newVersion,
8506
+ event
8507
+ ));
8508
+ }
8509
+ openPromise.then((db2) => {
8510
+ if (terminated)
8511
+ db2.addEventListener("close", () => terminated());
8512
+ if (blocking) {
8513
+ db2.addEventListener("versionchange", (event) => blocking(event.oldVersion, event.newVersion, event));
8514
+ }
8515
+ }).catch(() => {
8516
+ });
8517
+ return openPromise;
8518
+ }
8519
+ const readMethods = ["get", "getKey", "getAll", "getAllKeys", "count"];
8520
+ const writeMethods = ["put", "add", "delete", "clear"];
8521
+ const cachedMethods = /* @__PURE__ */ new Map();
8522
+ function getMethod(target, prop) {
8523
+ if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === "string")) {
8524
+ return;
8525
+ }
8526
+ if (cachedMethods.get(prop))
8527
+ return cachedMethods.get(prop);
8528
+ const targetFuncName = prop.replace(/FromIndex$/, "");
8529
+ const useIndex = prop !== targetFuncName;
8530
+ const isWrite = writeMethods.includes(targetFuncName);
8531
+ if (
8532
+ // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
8533
+ !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))
8534
+ ) {
8535
+ return;
8536
+ }
8537
+ const method = async function(storeName, ...args) {
8538
+ const tx = this.transaction(storeName, isWrite ? "readwrite" : "readonly");
8539
+ let target2 = tx.store;
8540
+ if (useIndex)
8541
+ target2 = target2.index(args.shift());
8542
+ return (await Promise.all([
8543
+ target2[targetFuncName](...args),
8544
+ isWrite && tx.done
8545
+ ]))[0];
8902
8546
  };
8547
+ cachedMethods.set(prop, method);
8548
+ return method;
8903
8549
  }
8904
- function maxLength(requirement, message = "Invalid length") {
8905
- return {
8906
- type: "max_length",
8907
- async: false,
8908
- message,
8909
- requirement,
8910
- _parse(input) {
8911
- return input.length > this.requirement ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
8550
+ replaceTraps((oldTraps) => ({
8551
+ ...oldTraps,
8552
+ get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),
8553
+ has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)
8554
+ }));
8555
+ const advanceMethodProps = ["continue", "continuePrimaryKey", "advance"];
8556
+ const methodMap = {};
8557
+ const advanceResults = /* @__PURE__ */ new WeakMap();
8558
+ const ittrProxiedCursorToOriginalProxy = /* @__PURE__ */ new WeakMap();
8559
+ const cursorIteratorTraps = {
8560
+ get(target, prop) {
8561
+ if (!advanceMethodProps.includes(prop))
8562
+ return target[prop];
8563
+ let cachedFunc = methodMap[prop];
8564
+ if (!cachedFunc) {
8565
+ cachedFunc = methodMap[prop] = function(...args) {
8566
+ advanceResults.set(this, ittrProxiedCursorToOriginalProxy.get(this)[prop](...args));
8567
+ };
8912
8568
  }
8569
+ return cachedFunc;
8570
+ }
8571
+ };
8572
+ async function* iterate(...args) {
8573
+ let cursor = this;
8574
+ if (!(cursor instanceof IDBCursor)) {
8575
+ cursor = await cursor.openCursor(...args);
8576
+ }
8577
+ if (!cursor)
8578
+ return;
8579
+ cursor = cursor;
8580
+ const proxiedCursor = new Proxy(cursor, cursorIteratorTraps);
8581
+ ittrProxiedCursorToOriginalProxy.set(proxiedCursor, cursor);
8582
+ reverseTransformCache.set(proxiedCursor, unwrap(cursor));
8583
+ while (cursor) {
8584
+ yield proxiedCursor;
8585
+ cursor = await (advanceResults.get(proxiedCursor) || cursor.continue());
8586
+ advanceResults.delete(proxiedCursor);
8587
+ }
8588
+ }
8589
+ function isIteratorProp(target, prop) {
8590
+ return prop === Symbol.asyncIterator && instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor]) || prop === "iterate" && instanceOfAny(target, [IDBIndex, IDBObjectStore]);
8591
+ }
8592
+ replaceTraps((oldTraps) => ({
8593
+ ...oldTraps,
8594
+ get(target, prop, receiver) {
8595
+ if (isIteratorProp(target, prop))
8596
+ return iterate;
8597
+ return oldTraps.get(target, prop, receiver);
8598
+ },
8599
+ has(target, prop) {
8600
+ return isIteratorProp(target, prop) || oldTraps.has(target, prop);
8601
+ }
8602
+ }));
8603
+ const kbToReadableSize = (kb) => N(kb).with(_$3.number.lte(1e3), () => `${Math.round(kb)}KB`).with(_$3.number.lt(1e3 * 10), () => `${(kb / 1e3).toFixed(1)}MB`).otherwise(() => `${Math.round(kb / 1e3)}MB`);
8604
+ const getHeadOrThrow = (nodes) => {
8605
+ const head = nodes.find((n2) => n2.isHead);
8606
+ if (!head)
8607
+ throw new Error("No head node found");
8608
+ return head;
8609
+ };
8610
+ const getFlowSubmissionsPayload = (submissions) => {
8611
+ const payload = Object.entries(submissions).reduce((acc, [key, submission]) => {
8612
+ acc[key] = submission.value;
8613
+ return acc;
8614
+ }, {});
8615
+ return payload;
8616
+ };
8617
+ const isSubmissionOfType = (type) => (submission) => {
8618
+ if (!submission)
8619
+ return false;
8620
+ return submission.type === type;
8621
+ };
8622
+ class AbortedError extends Error {
8623
+ constructor() {
8624
+ super("Aborted");
8625
+ }
8626
+ }
8627
+ function debounce(func, timeout = 300) {
8628
+ let timer = void 0;
8629
+ return (...args) => {
8630
+ clearTimeout(timer);
8631
+ timer = setTimeout(() => {
8632
+ func.apply(this, args);
8633
+ }, timeout);
8913
8634
  };
8914
8635
  }
8915
- function minLength(requirement, message = "Invalid length") {
8916
- return {
8917
- type: "min_length",
8918
- async: false,
8919
- message,
8920
- requirement,
8921
- _parse(input) {
8922
- return input.length < this.requirement ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
8636
+ const db = typeof window === "undefined" ? void 0 : openDB("inploi-chatbot", 2, {
8637
+ upgrade(db2) {
8638
+ try {
8639
+ db2.deleteObjectStore("state");
8640
+ } catch {
8923
8641
  }
8642
+ db2.createObjectStore("state");
8643
+ }
8644
+ });
8645
+ const idb = {
8646
+ getStateData: async (flow, flowKeys) => {
8647
+ var _a;
8648
+ const key = getCacheKey({
8649
+ ...flow,
8650
+ flowKeys
8651
+ });
8652
+ return (_a = await db) == null ? void 0 : _a.get("state", key);
8653
+ },
8654
+ setStateData: debounce(async (params) => {
8655
+ var _a;
8656
+ const key = getCacheKey(params);
8657
+ return (_a = await db) == null ? void 0 : _a.put("state", params.data, key);
8658
+ }, 1e3)
8659
+ };
8660
+ const getChatbotFlowProgress = (nodes, node, onCalculate, stepsMade = 0) => {
8661
+ if (!node.nextId) {
8662
+ onCalculate(node.id, {
8663
+ stepsMade,
8664
+ remainingSteps: 0
8665
+ });
8666
+ return {
8667
+ stepsMade,
8668
+ remainingSteps: 0
8669
+ };
8670
+ }
8671
+ const nextNode = nodes.find((newNode) => newNode.id === node.nextId);
8672
+ if (nextNode === void 0) {
8673
+ return {
8674
+ stepsMade,
8675
+ remainingSteps: 0
8676
+ };
8677
+ }
8678
+ const branchId = node.type === "if-block" ? node.branchId : void 0;
8679
+ const branchNode = nodes.find((node2) => node2.id === branchId);
8680
+ const increment = node.type.includes("question") ? 1 : 0;
8681
+ if (branchNode) {
8682
+ const remainingSteps2 = increment + Math.max(getChatbotFlowProgress(nodes, nextNode, onCalculate, stepsMade + increment).remainingSteps, getChatbotFlowProgress(nodes, branchNode, onCalculate, stepsMade + increment).remainingSteps);
8683
+ onCalculate(node.id, {
8684
+ stepsMade,
8685
+ remainingSteps: remainingSteps2
8686
+ });
8687
+ return {
8688
+ stepsMade,
8689
+ remainingSteps: remainingSteps2
8690
+ };
8691
+ }
8692
+ const remainingSteps = increment + getChatbotFlowProgress(nodes, nextNode, onCalculate, stepsMade + increment).remainingSteps;
8693
+ onCalculate(node.id, {
8694
+ stepsMade,
8695
+ remainingSteps
8696
+ });
8697
+ return {
8698
+ stepsMade,
8699
+ remainingSteps
8700
+ };
8701
+ };
8702
+ const getNodesProgress = (nodes) => {
8703
+ const nodeIdToProgress = {};
8704
+ const firstNode = nodes.find((node) => node.isHead);
8705
+ if (!firstNode)
8706
+ return nodeIdToProgress;
8707
+ getChatbotFlowProgress(nodes, firstNode, (nodeId, progress2) => {
8708
+ nodeIdToProgress[nodeId] = progress2;
8709
+ });
8710
+ return nodeIdToProgress;
8711
+ };
8712
+ const getCacheKey = (flow) => [...flow.flowKeys, flow.id, flow.version].join("/");
8713
+ const currentFlow = a({
8714
+ state: "idle"
8715
+ });
8716
+ const updateFlowState = (updateFn) => {
8717
+ const {
8718
+ state,
8719
+ flow
8720
+ } = currentFlow.value;
8721
+ if (state !== "loaded")
8722
+ return;
8723
+ invariant$1(flow, "No flow to update");
8724
+ const newData = updateFn(flow.data);
8725
+ flow.data = newData;
8726
+ currentFlow.value = {
8727
+ state,
8728
+ flow
8924
8729
  };
8730
+ idb.setStateData(flow);
8731
+ };
8732
+ const store = {
8733
+ current$: currentFlow,
8734
+ viewState$: a("maximised"),
8735
+ inputHeight$: a(53),
8736
+ startFlow: async ({
8737
+ flow,
8738
+ context,
8739
+ flowKeys,
8740
+ title
8741
+ }) => {
8742
+ const data = await idb.getStateData(flow, flowKeys) ?? initialiseFlowStateData();
8743
+ const startedFlow = {
8744
+ data,
8745
+ startedAt: /* @__PURE__ */ new Date(),
8746
+ nodeIdToProgress: getNodesProgress(flow.nodes),
8747
+ flowKeys,
8748
+ id: flow.id,
8749
+ version: flow.version,
8750
+ nodes: flow.nodes,
8751
+ context,
8752
+ title
8753
+ };
8754
+ currentFlow.value = {
8755
+ state: "loaded",
8756
+ flow: startedFlow
8757
+ };
8758
+ idb.setStateData(startedFlow);
8759
+ },
8760
+ cancelCurrentFlow: () => {
8761
+ currentFlow.value = {
8762
+ state: "idle"
8763
+ };
8764
+ },
8765
+ markAsFinished: () => updateFlowState((data) => ({
8766
+ ...data,
8767
+ isFinished: true
8768
+ })),
8769
+ setCurrentNodeId: (currentNodeId) => updateFlowState((data) => {
8770
+ data.nodeHistory.push(currentNodeId);
8771
+ return data;
8772
+ }),
8773
+ restart: () => {
8774
+ const {
8775
+ state,
8776
+ flow
8777
+ } = currentFlow.value;
8778
+ if (state !== "loaded")
8779
+ throw new Error("Flow cannot be restarted: not in valid state");
8780
+ const data = initialiseFlowStateData();
8781
+ currentFlow.value = {
8782
+ state,
8783
+ flow: {
8784
+ ...flow,
8785
+ data,
8786
+ startedAt: /* @__PURE__ */ new Date()
8787
+ }
8788
+ };
8789
+ idb.setStateData(flow);
8790
+ },
8791
+ addMessage: (message, groupId) => {
8792
+ const newMessage = {
8793
+ ...message,
8794
+ groupId
8795
+ };
8796
+ return updateFlowState((data) => {
8797
+ data.messages.push(newMessage);
8798
+ return data;
8799
+ });
8800
+ },
8801
+ /** Removes messages from nodeId, all the messages that have the groupId passed, until it reaches one that doesn't */
8802
+ removeMessagesSentByNodeIds: (nodeIds) => {
8803
+ const {
8804
+ state,
8805
+ flow
8806
+ } = currentFlow.value;
8807
+ invariant$1(state === "loaded", "Application not loaded");
8808
+ const messages = flow.data.messages.filter((message) => !message.groupId || !nodeIds.includes(message.groupId));
8809
+ flow.data.messages = messages;
8810
+ idb.setStateData(flow);
8811
+ },
8812
+ setSubmission: (fieldKey, submission) => updateFlowState((data) => {
8813
+ if (submission === null) {
8814
+ delete data.submissions[fieldKey];
8815
+ } else {
8816
+ data.submissions[fieldKey] = submission;
8817
+ }
8818
+ return data;
8819
+ }),
8820
+ setInput: (input) => updateFlowState((data) => ({
8821
+ ...data,
8822
+ currentInput: input ?? null
8823
+ }))
8824
+ };
8825
+ const genRandomId = () => typeof crypto !== "undefined" && "randomUUID" in crypto ? crypto.randomUUID() : Math.random().toString(36).slice(2);
8826
+ const initialiseFlowStateData = () => ({
8827
+ messages: [],
8828
+ submissions: {},
8829
+ currentInput: null,
8830
+ nodeHistory: [],
8831
+ isFinished: false,
8832
+ sequence: 0,
8833
+ flowSessionId: genRandomId()
8834
+ });
8835
+ var _ = 0;
8836
+ function o(o2, e2, n2, t2, f2, l2) {
8837
+ var s2, u2, a2 = {};
8838
+ for (u2 in e2)
8839
+ "ref" == u2 ? s2 = e2[u2] : a2[u2] = e2[u2];
8840
+ var i2 = { type: o2, props: a2, key: n2, ref: s2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --_, __source: f2, __self: l2 };
8841
+ if ("function" == typeof o2 && (s2 = o2.defaultProps))
8842
+ for (u2 in s2)
8843
+ void 0 === a2[u2] && (a2[u2] = s2[u2]);
8844
+ return l$4.vnode && l$4.vnode(i2), i2;
8845
+ }
8846
+ const ChatError = ({
8847
+ message
8848
+ }) => {
8849
+ return o("div", {
8850
+ class: "flex flex-grow flex-col items-center justify-center",
8851
+ children: [o("svg", {
8852
+ class: "text-error-9 h-16 w-16",
8853
+ fill: "none",
8854
+ xmlns: "http://www.w3.org/2000/svg",
8855
+ "stroke-width": "2",
8856
+ stroke: "currentColor",
8857
+ "stroke-linecap": "round",
8858
+ viewBox: "0 0 96 96",
8859
+ children: [o("path", {
8860
+ d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",
8861
+ fill: "#fff"
8862
+ }), o("path", {
8863
+ d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"
8864
+ }), o("line", {
8865
+ x1: "36.7",
8866
+ y1: "39.3",
8867
+ x2: "44.8",
8868
+ y2: "47.4"
8869
+ }), o("line", {
8870
+ x1: "52.2",
8871
+ y1: "39.3",
8872
+ x2: "60.3",
8873
+ y2: "47.4"
8874
+ }), o("line", {
8875
+ x1: "44.7",
8876
+ y1: "39.2",
8877
+ x2: "36.6",
8878
+ y2: "47.3"
8879
+ }), o("line", {
8880
+ x1: "60.2",
8881
+ y1: "39.2",
8882
+ x2: "52.1",
8883
+ y2: "47.3"
8884
+ }), o("path", {
8885
+ d: "M38 56h19"
8886
+ })]
8887
+ }), o("div", {
8888
+ class: "flex flex-col gap-2 text-center",
8889
+ children: [o("p", {
8890
+ class: "text-error-11 font-bold",
8891
+ children: "Something unexpected happened"
8892
+ }), message && o("p", {
8893
+ class: "text-neutral-9 text-sm",
8894
+ children: message
8895
+ })]
8896
+ })]
8897
+ });
8898
+ };
8899
+ const LoadingIndicator = (props) => o("svg", {
8900
+ role: "img",
8901
+ viewBox: "0 0 24 24",
8902
+ ...props,
8903
+ children: [o("title", {
8904
+ children: "Loading"
8905
+ }), o("style", {
8906
+ children: `#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}`
8907
+ }), o("g", {
8908
+ id: "s1",
8909
+ transform: "translate(12,0)",
8910
+ children: o("g", {
8911
+ id: "s2",
8912
+ transform: "scale(0,0)",
8913
+ children: o("circle", {
8914
+ r: "6.5",
8915
+ transform: "translate(0,0)",
8916
+ fill: "currentColor"
8917
+ })
8918
+ })
8919
+ }), o("g", {
8920
+ id: "s3",
8921
+ transform: "translate(12,12)",
8922
+ children: o("g", {
8923
+ id: "s4",
8924
+ transform: "scale(1,1)",
8925
+ children: o("circle", {
8926
+ r: "6.5",
8927
+ transform: "translate(0,0)",
8928
+ fill: "currentColor"
8929
+ })
8930
+ })
8931
+ }), o("g", {
8932
+ id: "s5",
8933
+ transform: "translate(12,0)",
8934
+ children: o("g", {
8935
+ id: "s6",
8936
+ transform: "scale(0,0)",
8937
+ children: o("path", {
8938
+ d: "M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",
8939
+ transform: "translate(-6.5,-6.5)",
8940
+ "clip-rule": "evenodd",
8941
+ fill: "currentColor",
8942
+ "fill-rule": "evenodd"
8943
+ })
8944
+ })
8945
+ }), o("g", {
8946
+ id: "s7",
8947
+ transform: "translate(12,0)",
8948
+ children: o("g", {
8949
+ id: "s8",
8950
+ transform: "scale(0,0)",
8951
+ children: o("path", {
8952
+ d: "M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",
8953
+ transform: "translate(-6.5,-9.25)",
8954
+ fill: "currentColor"
8955
+ })
8956
+ })
8957
+ })]
8958
+ });
8959
+ const ChatLoading = () => o("div", {
8960
+ class: "flex flex-grow flex-col items-center justify-center",
8961
+ children: o(LoadingIndicator, {
8962
+ class: "text-neutral-6 h-8 w-8"
8963
+ })
8964
+ });
8965
+ function r(e2) {
8966
+ var t2, f2, n2 = "";
8967
+ if ("string" == typeof e2 || "number" == typeof e2)
8968
+ n2 += e2;
8969
+ else if ("object" == typeof e2)
8970
+ if (Array.isArray(e2))
8971
+ for (t2 = 0; t2 < e2.length; t2++)
8972
+ e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
8973
+ else
8974
+ for (t2 in e2)
8975
+ e2[t2] && (n2 && (n2 += " "), n2 += t2);
8976
+ return n2;
8925
8977
  }
8926
- function regex(requirement, message = "Invalid regex") {
8927
- return {
8928
- type: "regex",
8929
- async: false,
8930
- message,
8931
- requirement,
8932
- _parse(input) {
8933
- return !this.requirement.test(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
8934
- }
8935
- };
8978
+ function clsx() {
8979
+ for (var e2, t2, f2 = 0, n2 = ""; f2 < arguments.length; )
8980
+ (e2 = arguments[f2++]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
8981
+ return n2;
8936
8982
  }
8937
- function url(message = "Invalid URL") {
8938
- return {
8939
- type: "url",
8940
- async: false,
8941
- message,
8942
- requirement(input) {
8943
- try {
8944
- new URL(input);
8945
- return true;
8946
- } catch {
8947
- return false;
8948
- }
8983
+ const optimisticProgress = (progress2) => {
8984
+ const prefilled = 0.1;
8985
+ const unitProgress = progress2 / 100;
8986
+ const concavity = 1.3;
8987
+ if (progress2 < 0)
8988
+ return "0%";
8989
+ if (progress2 > 100)
8990
+ return "100%";
8991
+ return `${Math.round((1 - (1 - prefilled) * Math.pow(1 - unitProgress, concavity)) * 100)}%`;
8992
+ };
8993
+ const StatusbarIconButton = ({
8994
+ class: className,
8995
+ children,
8996
+ ...props
8997
+ }) => {
8998
+ return o("button", {
8999
+ class: clsx("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all", className),
9000
+ ...props,
9001
+ children: o("svg", {
9002
+ class: "block",
9003
+ width: "16",
9004
+ height: "16",
9005
+ viewBox: "0 0 16 16",
9006
+ fill: "none",
9007
+ stroke: "currentColor",
9008
+ "stroke-width": "1.5",
9009
+ "stroke-linecap": "round",
9010
+ xmlns: "http://www.w3.org/2000/svg",
9011
+ children
9012
+ })
9013
+ });
9014
+ };
9015
+ const ProgressBar = () => {
9016
+ if (store.current$.value.state !== "loaded")
9017
+ return null;
9018
+ const nodeIdToProgress = store.current$.value.flow.nodeIdToProgress;
9019
+ const currentNodeId = store.current$.value.flow.data.nodeHistory.at(-1);
9020
+ if (currentNodeId === void 0)
9021
+ return null;
9022
+ const currentProgress = nodeIdToProgress[currentNodeId];
9023
+ if (currentProgress === void 0)
9024
+ return null;
9025
+ const percentage = 100 * (currentProgress.stepsMade / (currentProgress.remainingSteps + currentProgress.stepsMade));
9026
+ return o("div", {
9027
+ style: {
9028
+ width: optimisticProgress(percentage)
8949
9029
  },
8950
- _parse(input) {
8951
- return !this.requirement(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
8952
- }
8953
- };
8954
- }
8955
- const ApplicationSchema = object({
8956
- job: object({
8957
- id: coerce(string(), String),
8958
- title: string()
8959
- }),
9030
+ class: "bg-accent-9 h-[2px] transition-all duration-1000"
9031
+ });
9032
+ };
9033
+ const StatusBar = ({
9034
+ children
9035
+ }) => {
9036
+ const view = store.viewState$;
9037
+ return o(k$3, {
9038
+ children: o("header", {
9039
+ class: "ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",
9040
+ children: [o("div", {
9041
+ class: "flex h-[var(--header-height)] gap-2",
9042
+ children: [o("p", {
9043
+ id: "chatbot-status-bar",
9044
+ class: "sr-only",
9045
+ children
9046
+ }), o("button", {
9047
+ tabIndex: -1,
9048
+ "aria-hidden": true,
9049
+ onClick: () => {
9050
+ if (view.value === "minimised") {
9051
+ view.value = "maximised";
9052
+ } else {
9053
+ view.value = "minimised";
9054
+ }
9055
+ },
9056
+ class: "h-full flex-grow overflow-hidden px-4 py-1",
9057
+ children: o("p", {
9058
+ "aria-hidden": true,
9059
+ class: "text-neutral-12 truncate text-sm font-bold tracking-tight",
9060
+ children
9061
+ })
9062
+ }), o("div", {
9063
+ class: "flex flex-shrink-0 items-center gap-3 p-1.5",
9064
+ children: view.value === "minimised" ? o(k$3, {
9065
+ children: [o(StatusbarIconButton, {
9066
+ "aria-label": "Maximise job application",
9067
+ onClick: () => view.value = "maximised",
9068
+ children: o("path", {
9069
+ d: "M12.5 9.5L8 5L3.5 9.5"
9070
+ })
9071
+ }, "minmax"), o(StatusbarIconButton, {
9072
+ "aria-label": "Close application",
9073
+ onClick: store.cancelCurrentFlow,
9074
+ children: o("path", {
9075
+ d: "M12.5 6.5L8 11L3.5 6.5"
9076
+ })
9077
+ }, "close")]
9078
+ }) : o(k$3, {
9079
+ children: [store.current$.value.state === "loaded" && o(StatusbarIconButton, {
9080
+ "aria-label": "Restart",
9081
+ onClick: () => {
9082
+ store.restart();
9083
+ },
9084
+ children: [o("path", {
9085
+ d: "M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"
9086
+ }), o("path", {
9087
+ d: "M8 7L10 4.5L8 2.5"
9088
+ })]
9089
+ }, "restart"), o(StatusbarIconButton, {
9090
+ "aria-label": "Minimise application",
9091
+ onClick: () => view.value = "minimised",
9092
+ children: o("path", {
9093
+ d: "M12.5 6.5L8 11L3.5 6.5"
9094
+ })
9095
+ }, "minmax")]
9096
+ })
9097
+ })]
9098
+ }), o(ProgressBar, {})]
9099
+ })
9100
+ });
9101
+ };
9102
+ const ChatbotBody = M(() => import("./chatbot-body-04c70e40.js").then((module) => module.ChatbotBody));
9103
+ const MotionProvider = ({
9104
+ children
9105
+ }) => {
9106
+ return o(LazyMotion, {
9107
+ features: domAnimation,
9108
+ children
9109
+ });
9110
+ };
9111
+ const chatbotVariants = {
9112
+ closed: {
9113
+ y: "calc(100% + 1rem)",
9114
+ height: HEADER_HEIGHT
9115
+ },
9116
+ maximised: {
9117
+ y: 0,
9118
+ height: "75vh"
9119
+ },
9120
+ minimised: {
9121
+ y: 0,
9122
+ height: HEADER_HEIGHT
9123
+ }
9124
+ };
9125
+ const Chatbot = ({
9126
+ logger,
9127
+ apiClient,
9128
+ analytics
9129
+ }) => {
9130
+ const {
9131
+ state,
9132
+ flow,
9133
+ error
9134
+ } = store.current$.value;
9135
+ const view = store.viewState$.value;
9136
+ const isApplying = state !== "idle" && view === "maximised";
9137
+ const drawerRef = _$4(null);
9138
+ return o(MotionProvider, {
9139
+ children: o($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, {
9140
+ open: isApplying,
9141
+ modal: isApplying,
9142
+ children: o(AnimatePresence, {
9143
+ children: [o($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, {
9144
+ forceMount: true,
9145
+ asChild: true,
9146
+ children: isApplying && o(m$1.div, {
9147
+ initial: {
9148
+ opacity: 0
9149
+ },
9150
+ animate: {
9151
+ opacity: 1
9152
+ },
9153
+ exit: {
9154
+ opacity: 0
9155
+ },
9156
+ class: "bg-overlay fixed inset-0"
9157
+ })
9158
+ }, "bg"), o($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, {
9159
+ forceMount: true,
9160
+ asChild: true,
9161
+ children: o(m$1.div, {
9162
+ ref: drawerRef,
9163
+ "aria-modal": "true",
9164
+ role: "dialog",
9165
+ "aria-labelledby": "chatbot-status-bar",
9166
+ variants: chatbotVariants,
9167
+ initial: "closed",
9168
+ animate: N({
9169
+ state,
9170
+ view
9171
+ }).with({
9172
+ state: "idle"
9173
+ }, () => "closed").with({
9174
+ state: _$3.union("loaded", "error", "loading")
9175
+ }, ({
9176
+ view: view2
9177
+ }) => view2).exhaustive(),
9178
+ exit: "closed",
9179
+ style: {
9180
+ "--header-height": `${HEADER_HEIGHT}px`
9181
+ },
9182
+ class: "selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",
9183
+ children: o("div", {
9184
+ class: "outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",
9185
+ children: [o(StatusBar, {
9186
+ children: flow == null ? void 0 : flow.title
9187
+ }), (() => {
9188
+ if (view !== "maximised")
9189
+ return null;
9190
+ switch (state) {
9191
+ case "idle":
9192
+ return null;
9193
+ case "loading":
9194
+ return o(ChatLoading, {}, "loading");
9195
+ case "loaded":
9196
+ return o(D, {
9197
+ fallback: o(ChatLoading, {}, "loading"),
9198
+ children: o(ChatbotBody, {
9199
+ analytics,
9200
+ apiClient,
9201
+ logger
9202
+ })
9203
+ });
9204
+ case "error":
9205
+ return o(ChatError, {
9206
+ message: error
9207
+ });
9208
+ default:
9209
+ exhaustive(state);
9210
+ }
9211
+ })()]
9212
+ })
9213
+ }, "content")
9214
+ })]
9215
+ })
9216
+ })
9217
+ });
9218
+ };
9219
+ const FlowSchema = object({
9220
+ id: coerce(string(), String),
9221
+ version: number$1(),
9222
+ nodes: array(any())
9223
+ });
9224
+ const FlowByIdPayloadSchema = object({
9225
+ flow: FlowSchema
9226
+ });
9227
+ const FlowByJobPayloadSchema = object({
8960
9228
  company: object({
8961
- name: string(),
8962
- logo: optional(string())
9229
+ name: string()
8963
9230
  }),
8964
- flow: object({
9231
+ flow: FlowSchema,
9232
+ job: object({
8965
9233
  id: coerce(string(), String),
8966
- version: number(),
8967
- nodes: array(any())
9234
+ title: string()
8968
9235
  })
8969
9236
  });
8970
- async function getApplicationData({
8971
- jobId,
8972
- apiClient,
8973
- logger
8974
- }) {
8975
- try {
8976
- const rawData = await apiClient.fetch(`/flow/job/${jobId}`);
8977
- return {
8978
- ok: true,
8979
- value: parse(ApplicationSchema, rawData)
8980
- };
8981
- } catch (e2) {
8982
- if (e2 instanceof ValiError) {
8983
- logger.error(flatten$1(e2).nested);
8984
- return {
8985
- ok: false,
8986
- error: "API error: Invalid application data received"
8987
- };
8988
- }
8989
- if (e2 instanceof NotFoundError) {
8990
- return {
8991
- ok: false,
8992
- error: "Application flow not found."
8993
- };
8994
- }
8995
- if (e2 instanceof Error) {
8996
- logger.error(e2);
8997
- return {
8998
- ok: false,
8999
- error: e2.message
9000
- };
9001
- }
9002
- logger.error(e2);
9003
- return {
9004
- ok: false,
9005
- error: "Unknown error"
9006
- };
9007
- }
9008
- }
9009
- const tailwind = "#isdk {\n position: relative;\n z-index: 99999;\n font-size: 16px;\n font-family: sans-serif;\n\n /* Lowest colour */\n --i-lowest: 0 0% 100%;\n\n /** Error colours */\n --i-e-1: 340 100% 99%;\n --i-e-2: 353 100% 98%;\n --i-e-3: 351 91% 96%;\n --i-e-4: 351 100% 93%;\n --i-e-5: 350 100% 90%;\n --i-e-6: 351 80% 86%;\n --i-e-7: 349 68% 81%;\n --i-e-8: 348 61% 74%;\n --i-e-9: 348 75% 59%;\n --i-e-10: 347 70% 55%;\n --i-e-11: 345 70% 47%;\n --i-e-12: 344 63% 24%;\n --tw-content: '';\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n Segoe UI,\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n Open Sans,\n Helvetica Neue,\n sans-serif;\n}\n\n #isdk * {\n box-sizing: border-box;\n border-style: solid;\n border-width: 0;\n -webkit-tap-highlight-color: transparent;\n }\n\n #isdk ::before,\n #isdk ::after {\n box-sizing: border-box;\n }\n\n #isdk :is(ul, ol) {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n #isdk :is(p) {\n margin: 0;\n padding: 0;\n }\n\n #isdk :is(li) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n #isdk :is(button) {\n margin: 0;\n padding: 0;\n border: unset;\n background: unset;\n text-align: unset;\n }\n\n #isdk *, #isdk ::before, #isdk ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n #isdk ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n #isdk .container {\n width: 100%;\n}\n\n @media (min-width: 640px) {\n\n #isdk .container {\n max-width: 640px;\n }\n}\n\n @media (min-width: 768px) {\n\n #isdk .container {\n max-width: 768px;\n }\n}\n\n @media (min-width: 1024px) {\n\n #isdk .container {\n max-width: 1024px;\n }\n}\n\n @media (min-width: 1280px) {\n\n #isdk .container {\n max-width: 1280px;\n }\n}\n\n @media (min-width: 1536px) {\n\n #isdk .container {\n max-width: 1536px;\n }\n}\n\n #isdk .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n #isdk .visible {\n visibility: visible;\n}\n\n #isdk .collapse {\n visibility: collapse;\n}\n\n #isdk .static {\n position: static;\n}\n\n #isdk .fixed {\n position: fixed;\n}\n\n #isdk .absolute {\n position: absolute;\n}\n\n #isdk .relative {\n position: relative;\n}\n\n #isdk .sticky {\n position: sticky;\n}\n\n #isdk .inset-0 {\n inset: 0px;\n}\n\n #isdk .bottom-0 {\n bottom: 0px;\n}\n\n #isdk .bottom-2 {\n bottom: 0.5rem;\n}\n\n #isdk .left-0 {\n left: 0px;\n}\n\n #isdk .left-2 {\n left: 0.5rem;\n}\n\n #isdk .right-0 {\n right: 0px;\n}\n\n #isdk .right-2 {\n right: 0.5rem;\n}\n\n #isdk .top-0 {\n top: 0px;\n}\n\n #isdk .isolate {\n isolation: isolate;\n}\n\n #isdk .z-20 {\n z-index: 20;\n}\n\n #isdk .mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n #isdk .mb-1 {\n margin-bottom: 0.25rem;\n}\n\n #isdk .ml-auto {\n margin-left: auto;\n}\n\n #isdk .block {\n display: block;\n}\n\n #isdk .inline-block {\n display: inline-block;\n}\n\n #isdk .inline {\n display: inline;\n}\n\n #isdk .flex {\n display: flex;\n}\n\n #isdk .inline-flex {\n display: inline-flex;\n}\n\n #isdk .table {\n display: table;\n}\n\n #isdk .table-row {\n display: table-row;\n}\n\n #isdk .flow-root {\n display: flow-root;\n}\n\n #isdk .grid {\n display: grid;\n}\n\n #isdk .inline-grid {\n display: inline-grid;\n}\n\n #isdk .contents {\n display: contents;\n}\n\n #isdk .list-item {\n display: list-item;\n}\n\n #isdk .\\!hidden {\n display: none !important;\n}\n\n #isdk .hidden {\n display: none;\n}\n\n #isdk .h-1 {\n height: 0.25rem;\n}\n\n #isdk .h-1\\.5 {\n height: 0.375rem;\n}\n\n #isdk .h-16 {\n height: 4rem;\n}\n\n #isdk .h-4 {\n height: 1rem;\n}\n\n #isdk .h-48 {\n height: 12rem;\n}\n\n #isdk .h-8 {\n height: 2rem;\n}\n\n #isdk .h-\\[var\\(--header-height\\)\\] {\n height: var(--header-height);\n}\n\n #isdk .h-full {\n height: 100%;\n}\n\n #isdk .max-h-full {\n max-height: 100%;\n}\n\n #isdk .min-h-\\[36px\\] {\n min-height: 36px;\n}\n\n #isdk .w-1 {\n width: 0.25rem;\n}\n\n #isdk .w-1\\.5 {\n width: 0.375rem;\n}\n\n #isdk .w-16 {\n width: 4rem;\n}\n\n #isdk .w-4 {\n width: 1rem;\n}\n\n #isdk .w-8 {\n width: 2rem;\n}\n\n #isdk .w-full {\n width: 100%;\n}\n\n #isdk .min-w-0 {\n min-width: 0px;\n}\n\n #isdk .min-w-\\[2rem\\] {\n min-width: 2rem;\n}\n\n #isdk .max-w-\\[450px\\] {\n max-width: 450px;\n}\n\n #isdk .max-w-\\[min\\(100\\%\\2c 24rem\\)\\] {\n max-width: min(100%,24rem);\n}\n\n #isdk .max-w-full {\n max-width: 100%;\n}\n\n #isdk .flex-1 {\n flex: 1 1 0%;\n}\n\n #isdk .flex-none {\n flex: none;\n}\n\n #isdk .flex-shrink {\n flex-shrink: 1;\n}\n\n #isdk .flex-shrink-0 {\n flex-shrink: 0;\n}\n\n #isdk .shrink {\n flex-shrink: 1;\n}\n\n #isdk .flex-grow {\n flex-grow: 1;\n}\n\n #isdk .grow {\n flex-grow: 1;\n}\n\n #isdk .border-collapse {\n border-collapse: collapse;\n}\n\n #isdk .translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .translate-y-8 {\n --tw-translate-y: 2rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .scale-0 {\n --tw-scale-x: 0;\n --tw-scale-y: 0;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n @keyframes bounce {\n\n 0%, 100% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n #isdk .animate-bounce {\n animation: bounce 1s infinite;\n}\n\n #isdk .cursor-pointer {\n cursor: pointer;\n}\n\n #isdk .select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n #isdk .resize {\n resize: both;\n}\n\n #isdk .flex-col {\n flex-direction: column;\n}\n\n #isdk .flex-wrap {\n flex-wrap: wrap;\n}\n\n #isdk .items-center {\n align-items: center;\n}\n\n #isdk .justify-end {\n justify-content: flex-end;\n}\n\n #isdk .justify-center {\n justify-content: center;\n}\n\n #isdk .gap-0 {\n gap: 0px;\n}\n\n #isdk .gap-1 {\n gap: 0.25rem;\n}\n\n #isdk .gap-1\\.5 {\n gap: 0.375rem;\n}\n\n #isdk .gap-2 {\n gap: 0.5rem;\n}\n\n #isdk .gap-3 {\n gap: 0.75rem;\n}\n\n #isdk .gap-4 {\n gap: 1rem;\n}\n\n #isdk .gap-px {\n gap: 1px;\n}\n\n #isdk .overflow-hidden {\n overflow: hidden;\n}\n\n #isdk .overflow-y-auto {\n overflow-y: auto;\n}\n\n #isdk .overflow-y-scroll {\n overflow-y: scroll;\n}\n\n #isdk .truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n #isdk .break-words {\n overflow-wrap: break-word;\n}\n\n #isdk .rounded {\n border-radius: 0.25rem;\n}\n\n #isdk .rounded-2xl {\n border-radius: 1rem;\n}\n\n #isdk .rounded-3xl {\n border-radius: 1.5rem;\n}\n\n #isdk .rounded-\\[18px\\] {\n border-radius: 18px;\n}\n\n #isdk .rounded-full {\n border-radius: 9999px;\n}\n\n #isdk .rounded-lg {\n border-radius: 0.5rem;\n}\n\n #isdk .rounded-md {\n border-radius: 0.375rem;\n}\n\n #isdk .rounded-xl {\n border-radius: 0.75rem;\n}\n\n #isdk .rounded-b-3xl {\n border-bottom-right-radius: 1.5rem;\n border-bottom-left-radius: 1.5rem;\n}\n\n #isdk .rounded-bl-md {\n border-bottom-left-radius: 0.375rem;\n}\n\n #isdk .rounded-br-md {\n border-bottom-right-radius: 0.375rem;\n}\n\n #isdk .border {\n border-width: 1px;\n}\n\n #isdk .border-t {\n border-top-width: 1px;\n}\n\n #isdk .border-dashed {\n border-style: dashed;\n}\n\n #isdk .border-divider {\n border-color: var(--i-color-divider);\n}\n\n #isdk .border-neutral-8 {\n border-color: var(--i-color-n-8);\n}\n\n #isdk .bg-accent-1 {\n background-color: var(--i-color-a-1);\n}\n\n #isdk .bg-accent-3 {\n background-color: var(--i-color-a-3);\n}\n\n #isdk .bg-accent-9 {\n background-color: var(--i-color-a-9);\n}\n\n #isdk .bg-bubble-weak-bg {\n background-color: var(--i-bubble-weak-bg);\n}\n\n #isdk .bg-lowest {\n background-color: var(--i-color-lowest);\n}\n\n #isdk .bg-neutral-1 {\n background-color: var(--i-color-n-1);\n}\n\n #isdk .bg-neutral-2 {\n background-color: var(--i-color-n-2);\n}\n\n #isdk .bg-overlay {\n background-color: var(--i-overlay-bg);\n}\n\n #isdk .bg-statusbar {\n background-color: var(--i-status-bar-bg);\n}\n\n #isdk .bg-transparent {\n background-color: transparent;\n}\n\n #isdk .p-1 {\n padding: 0.25rem;\n}\n\n #isdk .p-1\\.5 {\n padding: 0.375rem;\n}\n\n #isdk .p-2 {\n padding: 0.5rem;\n}\n\n #isdk .p-2\\.5 {\n padding: 0.625rem;\n}\n\n #isdk .p-4 {\n padding: 1rem;\n}\n\n #isdk .px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n #isdk .px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n #isdk .px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n\n #isdk .px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n #isdk .px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n #isdk .py-0 {\n padding-top: 0px;\n padding-bottom: 0px;\n}\n\n #isdk .py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n\n #isdk .py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n #isdk .py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n #isdk .py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n\n #isdk .py-\\[6px\\] {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n\n #isdk .pb-2 {\n padding-bottom: 0.5rem;\n}\n\n #isdk .pb-6 {\n padding-bottom: 1.5rem;\n}\n\n #isdk .pl-2 {\n padding-left: 0.5rem;\n}\n\n #isdk .pl-4 {\n padding-left: 1rem;\n}\n\n #isdk .pr-1 {\n padding-right: 0.25rem;\n}\n\n #isdk .pr-2 {\n padding-right: 0.5rem;\n}\n\n #isdk .pr-2\\.5 {\n padding-right: 0.625rem;\n}\n\n #isdk .pr-3 {\n padding-right: 0.75rem;\n}\n\n #isdk .pr-4 {\n padding-right: 1rem;\n}\n\n #isdk .pt-5 {\n padding-top: 1.25rem;\n}\n\n #isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\] {\n padding-top: calc(var(--header-height) + 1rem);\n}\n\n #isdk .text-center {\n text-align: center;\n}\n\n #isdk .text-justify {\n text-align: justify;\n}\n\n #isdk .text-\\[10px\\] {\n font-size: 10px;\n}\n\n #isdk .text-\\[11px\\] {\n font-size: 11px;\n}\n\n #isdk .text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n #isdk .text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n #isdk .text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n #isdk .font-bold {\n font-weight: 700;\n}\n\n #isdk .uppercase {\n text-transform: uppercase;\n}\n\n #isdk .lowercase {\n text-transform: lowercase;\n}\n\n #isdk .capitalize {\n text-transform: capitalize;\n}\n\n #isdk .italic {\n font-style: italic;\n}\n\n #isdk .ordinal {\n --tw-ordinal: ordinal;\n font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);\n}\n\n #isdk .leading-snug {\n line-height: 1.375;\n}\n\n #isdk .tracking-\\[-0\\.01em\\] {\n letter-spacing: -0.01em;\n}\n\n #isdk .tracking-tight {\n letter-spacing: -0.025em;\n}\n\n #isdk .tracking-wide {\n letter-spacing: 0.025em;\n}\n\n #isdk .tracking-widest {\n letter-spacing: 0.1em;\n}\n\n #isdk .text-\\[\\#4CAF50\\] {\n --tw-text-opacity: 1;\n color: rgb(76 175 80 / var(--tw-text-opacity));\n}\n\n #isdk .text-\\[\\#FFC107\\] {\n --tw-text-opacity: 1;\n color: rgb(255 193 7 / var(--tw-text-opacity));\n}\n\n #isdk .text-accent-11 {\n color: var(--i-color-a-11);\n}\n\n #isdk .text-accent-12 {\n color: var(--i-color-a-12);\n}\n\n #isdk .text-accent-9 {\n color: var(--i-color-a-9);\n}\n\n #isdk .text-error-11 {\n color: var(--i-color-e-11);\n}\n\n #isdk .text-error-9 {\n color: var(--i-color-e-9);\n}\n\n #isdk .text-interactive-copy {\n color: var(--i-interactive-copy);\n}\n\n #isdk .text-neutral-10 {\n color: var(--i-color-n-10);\n}\n\n #isdk .text-neutral-11 {\n color: var(--i-color-n-11);\n}\n\n #isdk .text-neutral-12 {\n color: var(--i-color-n-12);\n}\n\n #isdk .text-neutral-6 {\n color: var(--i-color-n-6);\n}\n\n #isdk .text-neutral-8 {\n color: var(--i-color-n-8);\n}\n\n #isdk .text-neutral-9 {\n color: var(--i-color-n-9);\n}\n\n #isdk .text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n #isdk .underline {\n text-decoration-line: underline;\n}\n\n #isdk .no-underline {\n text-decoration-line: none;\n}\n\n #isdk .underline-offset-2 {\n text-underline-offset: 2px;\n}\n\n #isdk .caret-accent-9 {\n caret-color: var(--i-color-a-9);\n}\n\n #isdk .opacity-0 {\n opacity: 0;\n}\n\n #isdk .opacity-100 {\n opacity: 1;\n}\n\n #isdk .shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-surface-md {\n --tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / 0.03), 0px 6px 4px 0px oklch(0% 0 0 / 0.02), 0px 6px 4px 0px oklch(0% 0 0 / 0.01);\n --tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-surface-sm {\n --tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / 0.03), 0px 4px 4px 0px oklch(0% 0 0 / 0.02);\n --tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-bubble-strong-shadow {\n --tw-shadow-color: var(--i-bubble-strong-shadow);\n --tw-shadow: var(--tw-shadow-colored);\n}\n\n #isdk .outline {\n outline-style: solid;\n}\n\n #isdk .outline-1 {\n outline-width: 1px;\n}\n\n #isdk .outline-2 {\n outline-width: 2px;\n}\n\n #isdk .outline-accent-4 {\n outline-color: var(--i-color-a-4);\n}\n\n #isdk .outline-bubble-weak {\n outline-color: var(--i-bubble-weak-outline);\n}\n\n #isdk .outline-divider {\n outline-color: var(--i-color-divider);\n}\n\n #isdk .outline-neutral-3 {\n outline-color: var(--i-color-n-3);\n}\n\n #isdk .outline-neutral-6 {\n outline-color: var(--i-color-n-6);\n}\n\n #isdk .ring-0 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-accent-6 {\n --tw-ring-color: var(--i-color-a-6);\n}\n\n #isdk .ring-divider {\n --tw-ring-color: var(--i-color-divider);\n}\n\n #isdk .ring-lowest {\n --tw-ring-color: var(--i-color-lowest);\n}\n\n #isdk .ring-transparent {\n --tw-ring-color: transparent;\n}\n\n #isdk .blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .drop-shadow {\n --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\] {\n --tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .grayscale {\n --tw-grayscale: grayscale(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .invert {\n --tw-invert: invert(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .sepia {\n --tw-sepia: sepia(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .backdrop-blur-md {\n --tw-backdrop-blur: blur(12px);\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .backdrop-saturate-150 {\n --tw-backdrop-saturate: saturate(1.5);\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .backdrop-filter {\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n #isdk .transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n #isdk .ease-expo-out {\n transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n #isdk .ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n #isdk .text-wrap-balance {\n text-wrap: balance;\n}\n\n #isdk .fr {\n outline: none;\n}\n\n #isdk .fr:focus {\n outline: none;\n}\n\n #isdk .fr:focus-visible {\n outline: none;\n --tw-ring-offset-width: 1px;\n --tw-ring-offset-color: var(--i-color-lowest);\n --tw-ring-opacity: 1;\n --tw-ring-color: var(--i-color-a-9);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .gutter-stable {\n scrollbar-gutter: stable;\n}\n\n #isdk .hide-scrollbars::-webkit-scrollbar {\n display: none;\n}\n\n #isdk .hide-scrollbars {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n #isdk .touch-hitbox::before {\n content: '';\n position: absolute;\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-height: 44px;\n min-width: 44px;\n z-index: 9999;\n}\n\n #isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\] {\n a-z-a--z0-9-_: .$@?;\n}\n\n #isdk .\\[text-wrap\\:pretty\\] {\n text-wrap: pretty;\n}\n\n #isdk .selection\\:bg-accent-4 *::-moz-selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-accent-4 *::selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-transparent *::-moz-selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:bg-transparent *::selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:text-accent-12 *::-moz-selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:text-accent-12 *::selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:bg-accent-4::-moz-selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-accent-4::selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-transparent::-moz-selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:bg-transparent::selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:text-accent-12::-moz-selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:text-accent-12::selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .placeholder\\:text-neutral-10::-moz-placeholder {\n color: var(--i-color-n-10);\n}\n\n #isdk .placeholder\\:text-neutral-10::placeholder {\n color: var(--i-color-n-10);\n}\n\n #isdk .hover\\:bg-interactive-bg-hover:hover {\n background-color: var(--i-interactive-bg-hover);\n}\n\n #isdk .hover\\:text-interactive-copy-hover:hover {\n color: var(--i-interactive-copy-hover);\n}\n\n #isdk .hover\\:ring-accent-8:hover {\n --tw-ring-color: var(--i-color-a-8);\n}\n\n #isdk .focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n #isdk .focus-visible\\:outline-accent-7:focus-visible {\n outline-color: var(--i-color-a-7);\n}\n\n #isdk .focus-visible\\:ring-4:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .focus-visible\\:ring-offset-2:focus-visible {\n --tw-ring-offset-width: 2px;\n}\n\n #isdk .active\\:bg-accent-10:active {\n background-color: var(--i-color-a-10);\n}\n\n #isdk .active\\:bg-accent-2:active {\n background-color: var(--i-color-a-2);\n}\n\n #isdk .active\\:bg-interactive-bg-active:active {\n background-color: var(--i-interactive-bg-active);\n}\n\n #isdk .active\\:text-accent-10:active {\n color: var(--i-color-a-10);\n}\n\n #isdk .active\\:text-accent-11:active {\n color: var(--i-color-a-11);\n}\n\n #isdk .active\\:text-interactive-copy-active:active {\n color: var(--i-interactive-copy-active);\n}\n\n #isdk .active\\:outline-neutral-10:active {\n outline-color: var(--i-color-n-10);\n}\n\n #isdk .active\\:ring-accent-7:active {\n --tw-ring-color: var(--i-color-a-7);\n}\n\n #isdk .disabled\\:cursor-not-allowed:disabled {\n cursor: not-allowed;\n}\n\n #isdk .disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n\n #isdk .peer:checked ~ .peer-checked\\:bg-accent-2 {\n background-color: var(--i-color-a-2);\n}\n\n #isdk .peer:checked ~ .peer-checked\\:text-accent-9 {\n color: var(--i-color-a-9);\n}\n\n #isdk .peer:checked ~ .peer-checked\\:outline-accent-7 {\n outline-color: var(--i-color-a-7);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-4 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-accent-7 {\n --tw-ring-color: var(--i-color-a-7);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-offset-2 {\n --tw-ring-offset-width: 2px;\n}\n\n @media (pointer: coarse) {\n\n #isdk .pointer-coarse\\:touch-hitbox\\:\\:before::before {\n content: '';\n position: absolute;\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-height: 44px;\n min-width: 44px;\n z-index: 9999;\n }\n}\n";
9237
+ const StartFlowSchema = object({
9238
+ flow: FlowSchema,
9239
+ title: string(),
9240
+ flowKeys: array(string()),
9241
+ context: record(string(), any())
9242
+ });
9243
+ const tailwind = "#isdk {\n position: relative;\n z-index: 99999;\n font-size: 16px;\n font-family: sans-serif;\n\n /* Lowest colour */\n --i-lowest: 0 0% 100%;\n\n /** Error colours */\n --i-e-1: 340 100% 99%;\n --i-e-2: 353 100% 98%;\n --i-e-3: 351 91% 96%;\n --i-e-4: 351 100% 93%;\n --i-e-5: 350 100% 90%;\n --i-e-6: 351 80% 86%;\n --i-e-7: 349 68% 81%;\n --i-e-8: 348 61% 74%;\n --i-e-9: 348 75% 59%;\n --i-e-10: 347 70% 55%;\n --i-e-11: 345 70% 47%;\n --i-e-12: 344 63% 24%;\n --tw-content: '';\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n Segoe UI,\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n Open Sans,\n Helvetica Neue,\n sans-serif;\n}\n\n #isdk * {\n font-weight: inherit;\n font-style: inherit;\n box-sizing: border-box;\n font-family: inherit;\n border-style: solid;\n border-width: 0;\n -webkit-tap-highlight-color: transparent;\n }\n\n #isdk ::before,\n #isdk ::after {\n box-sizing: border-box;\n }\n\n #isdk :is(ul, ol) {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n #isdk :is(p) {\n margin: 0;\n padding: 0;\n }\n\n #isdk :is(li) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n #isdk :is(button) {\n margin: 0;\n padding: 0;\n border: unset;\n background: unset;\n text-align: unset;\n }\n\n #isdk *, #isdk ::before, #isdk ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n #isdk ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n #isdk .container {\n width: 100%;\n}\n\n @media (min-width: 640px) {\n\n #isdk .container {\n max-width: 640px;\n }\n}\n\n @media (min-width: 768px) {\n\n #isdk .container {\n max-width: 768px;\n }\n}\n\n @media (min-width: 1024px) {\n\n #isdk .container {\n max-width: 1024px;\n }\n}\n\n @media (min-width: 1280px) {\n\n #isdk .container {\n max-width: 1280px;\n }\n}\n\n @media (min-width: 1536px) {\n\n #isdk .container {\n max-width: 1536px;\n }\n}\n\n #isdk .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n #isdk .visible {\n visibility: visible;\n}\n\n #isdk .collapse {\n visibility: collapse;\n}\n\n #isdk .static {\n position: static;\n}\n\n #isdk .fixed {\n position: fixed;\n}\n\n #isdk .absolute {\n position: absolute;\n}\n\n #isdk .relative {\n position: relative;\n}\n\n #isdk .sticky {\n position: sticky;\n}\n\n #isdk .inset-0 {\n inset: 0px;\n}\n\n #isdk .bottom-0 {\n bottom: 0px;\n}\n\n #isdk .bottom-2 {\n bottom: 0.5rem;\n}\n\n #isdk .bottom-\\[2px\\] {\n bottom: 2px;\n}\n\n #isdk .left-0 {\n left: 0px;\n}\n\n #isdk .left-2 {\n left: 0.5rem;\n}\n\n #isdk .right-0 {\n right: 0px;\n}\n\n #isdk .right-2 {\n right: 0.5rem;\n}\n\n #isdk .top-0 {\n top: 0px;\n}\n\n #isdk .top-\\[-2px\\] {\n top: -2px;\n}\n\n #isdk .isolate {\n isolation: isolate;\n}\n\n #isdk .z-20 {\n z-index: 20;\n}\n\n #isdk .mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n #isdk .mb-1 {\n margin-bottom: 0.25rem;\n}\n\n #isdk .ml-auto {\n margin-left: auto;\n}\n\n #isdk .block {\n display: block;\n}\n\n #isdk .inline-block {\n display: inline-block;\n}\n\n #isdk .inline {\n display: inline;\n}\n\n #isdk .flex {\n display: flex;\n}\n\n #isdk .inline-flex {\n display: inline-flex;\n}\n\n #isdk .table {\n display: table;\n}\n\n #isdk .table-row {\n display: table-row;\n}\n\n #isdk .flow-root {\n display: flow-root;\n}\n\n #isdk .grid {\n display: grid;\n}\n\n #isdk .inline-grid {\n display: inline-grid;\n}\n\n #isdk .contents {\n display: contents;\n}\n\n #isdk .list-item {\n display: list-item;\n}\n\n #isdk .\\!hidden {\n display: none !important;\n}\n\n #isdk .hidden {\n display: none;\n}\n\n #isdk .h-1 {\n height: 0.25rem;\n}\n\n #isdk .h-1\\.5 {\n height: 0.375rem;\n}\n\n #isdk .h-16 {\n height: 4rem;\n}\n\n #isdk .h-4 {\n height: 1rem;\n}\n\n #isdk .h-48 {\n height: 12rem;\n}\n\n #isdk .h-8 {\n height: 2rem;\n}\n\n #isdk .h-\\[2px\\] {\n height: 2px;\n}\n\n #isdk .h-\\[var\\(--header-height\\)\\] {\n height: var(--header-height);\n}\n\n #isdk .h-full {\n height: 100%;\n}\n\n #isdk .max-h-full {\n max-height: 100%;\n}\n\n #isdk .min-h-\\[36px\\] {\n min-height: 36px;\n}\n\n #isdk .w-1 {\n width: 0.25rem;\n}\n\n #isdk .w-1\\.5 {\n width: 0.375rem;\n}\n\n #isdk .w-16 {\n width: 4rem;\n}\n\n #isdk .w-4 {\n width: 1rem;\n}\n\n #isdk .w-8 {\n width: 2rem;\n}\n\n #isdk .w-full {\n width: 100%;\n}\n\n #isdk .min-w-0 {\n min-width: 0px;\n}\n\n #isdk .min-w-\\[2rem\\] {\n min-width: 2rem;\n}\n\n #isdk .max-w-\\[450px\\] {\n max-width: 450px;\n}\n\n #isdk .max-w-\\[min\\(100\\%\\2c 24rem\\)\\] {\n max-width: min(100%,24rem);\n}\n\n #isdk .max-w-full {\n max-width: 100%;\n}\n\n #isdk .flex-1 {\n flex: 1 1 0%;\n}\n\n #isdk .flex-none {\n flex: none;\n}\n\n #isdk .flex-shrink {\n flex-shrink: 1;\n}\n\n #isdk .flex-shrink-0 {\n flex-shrink: 0;\n}\n\n #isdk .shrink {\n flex-shrink: 1;\n}\n\n #isdk .flex-grow {\n flex-grow: 1;\n}\n\n #isdk .grow {\n flex-grow: 1;\n}\n\n #isdk .border-collapse {\n border-collapse: collapse;\n}\n\n #isdk .translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .translate-y-8 {\n --tw-translate-y: 2rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .scale-0 {\n --tw-scale-x: 0;\n --tw-scale-y: 0;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n @keyframes bounce {\n\n 0%, 100% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n #isdk .animate-bounce {\n animation: bounce 1s infinite;\n}\n\n #isdk .cursor-pointer {\n cursor: pointer;\n}\n\n #isdk .select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n #isdk .resize {\n resize: both;\n}\n\n #isdk .flex-col {\n flex-direction: column;\n}\n\n #isdk .flex-wrap {\n flex-wrap: wrap;\n}\n\n #isdk .items-center {\n align-items: center;\n}\n\n #isdk .justify-end {\n justify-content: flex-end;\n}\n\n #isdk .justify-center {\n justify-content: center;\n}\n\n #isdk .gap-0 {\n gap: 0px;\n}\n\n #isdk .gap-1 {\n gap: 0.25rem;\n}\n\n #isdk .gap-1\\.5 {\n gap: 0.375rem;\n}\n\n #isdk .gap-2 {\n gap: 0.5rem;\n}\n\n #isdk .gap-3 {\n gap: 0.75rem;\n}\n\n #isdk .gap-4 {\n gap: 1rem;\n}\n\n #isdk .gap-px {\n gap: 1px;\n}\n\n #isdk .overflow-hidden {\n overflow: hidden;\n}\n\n #isdk .overflow-y-auto {\n overflow-y: auto;\n}\n\n #isdk .overflow-y-scroll {\n overflow-y: scroll;\n}\n\n #isdk .truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n #isdk .break-words {\n overflow-wrap: break-word;\n}\n\n #isdk .rounded {\n border-radius: 0.25rem;\n}\n\n #isdk .rounded-2xl {\n border-radius: 1rem;\n}\n\n #isdk .rounded-3xl {\n border-radius: 1.5rem;\n}\n\n #isdk .rounded-\\[18px\\] {\n border-radius: 18px;\n}\n\n #isdk .rounded-full {\n border-radius: 9999px;\n}\n\n #isdk .rounded-lg {\n border-radius: 0.5rem;\n}\n\n #isdk .rounded-md {\n border-radius: 0.375rem;\n}\n\n #isdk .rounded-xl {\n border-radius: 0.75rem;\n}\n\n #isdk .rounded-b-3xl {\n border-bottom-right-radius: 1.5rem;\n border-bottom-left-radius: 1.5rem;\n}\n\n #isdk .rounded-bl-md {\n border-bottom-left-radius: 0.375rem;\n}\n\n #isdk .rounded-br-md {\n border-bottom-right-radius: 0.375rem;\n}\n\n #isdk .border {\n border-width: 1px;\n}\n\n #isdk .border-t {\n border-top-width: 1px;\n}\n\n #isdk .border-solid {\n border-style: solid;\n}\n\n #isdk .border-dashed {\n border-style: dashed;\n}\n\n #isdk .border-accent-9 {\n border-color: var(--i-color-a-9);\n}\n\n #isdk .border-divider {\n border-color: var(--i-color-divider);\n}\n\n #isdk .border-neutral-8 {\n border-color: var(--i-color-n-8);\n}\n\n #isdk .bg-accent-1 {\n background-color: var(--i-color-a-1);\n}\n\n #isdk .bg-accent-3 {\n background-color: var(--i-color-a-3);\n}\n\n #isdk .bg-accent-9 {\n background-color: var(--i-color-a-9);\n}\n\n #isdk .bg-bubble-weak-bg {\n background-color: var(--i-bubble-weak-bg);\n}\n\n #isdk .bg-lowest {\n background-color: var(--i-color-lowest);\n}\n\n #isdk .bg-neutral-1 {\n background-color: var(--i-color-n-1);\n}\n\n #isdk .bg-neutral-2 {\n background-color: var(--i-color-n-2);\n}\n\n #isdk .bg-overlay {\n background-color: var(--i-overlay-bg);\n}\n\n #isdk .bg-statusbar {\n background-color: var(--i-status-bar-bg);\n}\n\n #isdk .bg-transparent {\n background-color: transparent;\n}\n\n #isdk .p-1 {\n padding: 0.25rem;\n}\n\n #isdk .p-1\\.5 {\n padding: 0.375rem;\n}\n\n #isdk .p-2 {\n padding: 0.5rem;\n}\n\n #isdk .p-2\\.5 {\n padding: 0.625rem;\n}\n\n #isdk .p-4 {\n padding: 1rem;\n}\n\n #isdk .px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n #isdk .px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n #isdk .px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n\n #isdk .px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n #isdk .px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n #isdk .px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n #isdk .py-0 {\n padding-top: 0px;\n padding-bottom: 0px;\n}\n\n #isdk .py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n\n #isdk .py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n #isdk .py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n #isdk .py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n\n #isdk .py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n\n #isdk .py-\\[6px\\] {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n\n #isdk .pb-2 {\n padding-bottom: 0.5rem;\n}\n\n #isdk .pb-6 {\n padding-bottom: 1.5rem;\n}\n\n #isdk .pl-2 {\n padding-left: 0.5rem;\n}\n\n #isdk .pl-4 {\n padding-left: 1rem;\n}\n\n #isdk .pr-1 {\n padding-right: 0.25rem;\n}\n\n #isdk .pr-2 {\n padding-right: 0.5rem;\n}\n\n #isdk .pr-2\\.5 {\n padding-right: 0.625rem;\n}\n\n #isdk .pr-3 {\n padding-right: 0.75rem;\n}\n\n #isdk .pr-4 {\n padding-right: 1rem;\n}\n\n #isdk .pt-5 {\n padding-top: 1.25rem;\n}\n\n #isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\] {\n padding-top: calc(var(--header-height) + 1rem);\n}\n\n #isdk .text-center {\n text-align: center;\n}\n\n #isdk .text-right {\n text-align: right;\n}\n\n #isdk .text-justify {\n text-align: justify;\n}\n\n #isdk .text-\\[10px\\] {\n font-size: 10px;\n}\n\n #isdk .text-\\[11px\\] {\n font-size: 11px;\n}\n\n #isdk .text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n #isdk .text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n #isdk .text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n #isdk .font-bold {\n font-weight: 700;\n}\n\n #isdk .font-medium {\n font-weight: 500;\n}\n\n #isdk .uppercase {\n text-transform: uppercase;\n}\n\n #isdk .lowercase {\n text-transform: lowercase;\n}\n\n #isdk .capitalize {\n text-transform: capitalize;\n}\n\n #isdk .italic {\n font-style: italic;\n}\n\n #isdk .ordinal {\n --tw-ordinal: ordinal;\n font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);\n}\n\n #isdk .leading-snug {\n line-height: 1.375;\n}\n\n #isdk .tracking-\\[-0\\.01em\\] {\n letter-spacing: -0.01em;\n}\n\n #isdk .tracking-tight {\n letter-spacing: -0.025em;\n}\n\n #isdk .tracking-wide {\n letter-spacing: 0.025em;\n}\n\n #isdk .tracking-widest {\n letter-spacing: 0.1em;\n}\n\n #isdk .text-\\[\\#4CAF50\\] {\n --tw-text-opacity: 1;\n color: rgb(76 175 80 / var(--tw-text-opacity));\n}\n\n #isdk .text-\\[\\#FFC107\\] {\n --tw-text-opacity: 1;\n color: rgb(255 193 7 / var(--tw-text-opacity));\n}\n\n #isdk .text-accent-11 {\n color: var(--i-color-a-11);\n}\n\n #isdk .text-accent-12 {\n color: var(--i-color-a-12);\n}\n\n #isdk .text-accent-9 {\n color: var(--i-color-a-9);\n}\n\n #isdk .text-error-11 {\n color: var(--i-color-e-11);\n}\n\n #isdk .text-error-9 {\n color: var(--i-color-e-9);\n}\n\n #isdk .text-interactive-copy {\n color: var(--i-interactive-copy);\n}\n\n #isdk .text-neutral-10 {\n color: var(--i-color-n-10);\n}\n\n #isdk .text-neutral-11 {\n color: var(--i-color-n-11);\n}\n\n #isdk .text-neutral-12 {\n color: var(--i-color-n-12);\n}\n\n #isdk .text-neutral-6 {\n color: var(--i-color-n-6);\n}\n\n #isdk .text-neutral-8 {\n color: var(--i-color-n-8);\n}\n\n #isdk .text-neutral-9 {\n color: var(--i-color-n-9);\n}\n\n #isdk .text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n #isdk .underline {\n text-decoration-line: underline;\n}\n\n #isdk .no-underline {\n text-decoration-line: none;\n}\n\n #isdk .underline-offset-2 {\n text-underline-offset: 2px;\n}\n\n #isdk .caret-accent-9 {\n caret-color: var(--i-color-a-9);\n}\n\n #isdk .opacity-0 {\n opacity: 0;\n}\n\n #isdk .opacity-100 {\n opacity: 1;\n}\n\n #isdk .shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-\\[inset_0px_-6px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\2c inset_0px_1px_1px_oklch\\(100_0_0\\/\\.3\\)\\] {\n --tw-shadow: inset 0px -6px 2px -1px oklch(100 0 0/.45),inset 0px 1px 1px oklch(100 0 0/.3);\n --tw-shadow-colored: inset 0px -6px 2px -1px var(--tw-shadow-color), inset 0px 1px 1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-surface-md {\n --tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / 0.03), 0px 6px 4px 0px oklch(0% 0 0 / 0.02), 0px 6px 4px 0px oklch(0% 0 0 / 0.01);\n --tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-surface-sm {\n --tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / 0.03), 0px 4px 4px 0px oklch(0% 0 0 / 0.02);\n --tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-bubble-strong-shadow {\n --tw-shadow-color: var(--i-bubble-strong-shadow);\n --tw-shadow: var(--tw-shadow-colored);\n}\n\n #isdk .outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n #isdk .outline {\n outline-style: solid;\n}\n\n #isdk .outline-1 {\n outline-width: 1px;\n}\n\n #isdk .outline-2 {\n outline-width: 2px;\n}\n\n #isdk .outline-accent-4 {\n outline-color: var(--i-color-a-4);\n}\n\n #isdk .outline-bubble-weak {\n outline-color: var(--i-bubble-weak-outline);\n}\n\n #isdk .outline-divider {\n outline-color: var(--i-color-divider);\n}\n\n #isdk .outline-neutral-3 {\n outline-color: var(--i-color-n-3);\n}\n\n #isdk .outline-neutral-6 {\n outline-color: var(--i-color-n-6);\n}\n\n #isdk .ring-0 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-accent-6 {\n --tw-ring-color: var(--i-color-a-6);\n}\n\n #isdk .ring-divider {\n --tw-ring-color: var(--i-color-divider);\n}\n\n #isdk .ring-lowest {\n --tw-ring-color: var(--i-color-lowest);\n}\n\n #isdk .ring-transparent {\n --tw-ring-color: transparent;\n}\n\n #isdk .ring-offset-\\[1\\.5px\\] {\n --tw-ring-offset-width: 1.5px;\n}\n\n #isdk .ring-offset-neutral-1 {\n --tw-ring-offset-color: var(--i-color-n-1);\n}\n\n #isdk .blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .drop-shadow {\n --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\] {\n --tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .grayscale {\n --tw-grayscale: grayscale(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .invert {\n --tw-invert: invert(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .sepia {\n --tw-sepia: sepia(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .backdrop-blur-md {\n --tw-backdrop-blur: blur(12px);\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .backdrop-saturate-150 {\n --tw-backdrop-saturate: saturate(1.5);\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .backdrop-filter {\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n #isdk .transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n #isdk .duration-1000 {\n transition-duration: 1000ms;\n}\n\n #isdk .duration-300 {\n transition-duration: 300ms;\n}\n\n #isdk .ease-expo-out {\n transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n #isdk .ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n #isdk .text-wrap-balance {\n text-wrap: balance;\n}\n\n #isdk .fr {\n outline: none;\n}\n\n #isdk .fr:focus {\n outline: none;\n}\n\n #isdk .fr:focus-visible {\n outline: none;\n --tw-ring-offset-width: 1px;\n --tw-ring-offset-color: var(--i-color-lowest);\n --tw-ring-opacity: 1;\n --tw-ring-color: var(--i-color-a-9);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .gutter-stable {\n scrollbar-gutter: stable;\n}\n\n #isdk .hide-scrollbars::-webkit-scrollbar {\n display: none;\n}\n\n #isdk .hide-scrollbars {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n #isdk .touch-hitbox::before {\n content: '';\n position: absolute;\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-height: 44px;\n min-width: 44px;\n z-index: 9999;\n}\n\n #isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\] {\n a-z-a--z0-9-_: .$@?;\n}\n\n #isdk .\\[text-wrap\\:pretty\\] {\n text-wrap: pretty;\n}\n\n #isdk .selection\\:bg-accent-4 *::-moz-selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-accent-4 *::selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-transparent *::-moz-selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:bg-transparent *::selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:text-accent-12 *::-moz-selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:text-accent-12 *::selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:bg-accent-4::-moz-selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-accent-4::selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-transparent::-moz-selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:bg-transparent::selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:text-accent-12::-moz-selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:text-accent-12::selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .placeholder\\:text-neutral-10::-moz-placeholder {\n color: var(--i-color-n-10);\n}\n\n #isdk .placeholder\\:text-neutral-10::placeholder {\n color: var(--i-color-n-10);\n}\n\n #isdk .hover\\:border-accent-10:hover {\n border-color: var(--i-color-a-10);\n}\n\n #isdk .hover\\:bg-accent-10:hover {\n background-color: var(--i-color-a-10);\n}\n\n #isdk .hover\\:bg-interactive-bg-hover:hover {\n background-color: var(--i-interactive-bg-hover);\n}\n\n #isdk .hover\\:text-interactive-copy-hover:hover {\n color: var(--i-interactive-copy-hover);\n}\n\n #isdk .hover\\:text-neutral-12:hover {\n color: var(--i-color-n-12);\n}\n\n #isdk .hover\\:ring-accent-8:hover {\n --tw-ring-color: var(--i-color-a-8);\n}\n\n #isdk .focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n #isdk .focus-visible\\:outline-2:focus-visible {\n outline-width: 2px;\n}\n\n #isdk .focus-visible\\:outline-accent-7:focus-visible {\n outline-color: var(--i-color-a-7);\n}\n\n #isdk .focus-visible\\:outline-accent-8:focus-visible {\n outline-color: var(--i-color-a-8);\n}\n\n #isdk .focus-visible\\:ring-4:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .focus-visible\\:ring-offset-2:focus-visible {\n --tw-ring-offset-width: 2px;\n}\n\n #isdk .active\\:border-submit-bg-active:active {\n border-color: var(--i-submit-button-bg-active);\n}\n\n #isdk .active\\:bg-accent-10:active {\n background-color: var(--i-color-a-10);\n}\n\n #isdk .active\\:bg-accent-2:active {\n background-color: var(--i-color-a-2);\n}\n\n #isdk .active\\:bg-interactive-bg-active:active {\n background-color: var(--i-interactive-bg-active);\n}\n\n #isdk .active\\:bg-submit-bg-active:active {\n background-color: var(--i-submit-button-bg-active);\n}\n\n #isdk .active\\:text-accent-10:active {\n color: var(--i-color-a-10);\n}\n\n #isdk .active\\:text-accent-11:active {\n color: var(--i-color-a-11);\n}\n\n #isdk .active\\:text-interactive-copy-active:active {\n color: var(--i-interactive-copy-active);\n}\n\n #isdk .active\\:shadow-\\[inset_0px_0px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\2c inset_0px_3px_1px_\\.5px_oklch\\(0_0_0\\/\\.08\\)\\]:active {\n --tw-shadow: inset 0px 0px 2px -1px oklch(100 0 0/.45),inset 0px 3px 1px .5px oklch(0 0 0/.08);\n --tw-shadow-colored: inset 0px 0px 2px -1px var(--tw-shadow-color), inset 0px 3px 1px .5px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .active\\:outline-neutral-10:active {\n outline-color: var(--i-color-n-10);\n}\n\n #isdk .active\\:ring-2:active {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .active\\:ring-accent-7:active {\n --tw-ring-color: var(--i-color-a-7);\n}\n\n #isdk .active\\:ring-offset-2:active {\n --tw-ring-offset-width: 2px;\n}\n\n #isdk .disabled\\:cursor-not-allowed:disabled {\n cursor: not-allowed;\n}\n\n #isdk .disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n\n #isdk .group:active .group-active\\:bottom-0 {\n bottom: 0px;\n}\n\n #isdk .group:active .group-active\\:top-0 {\n top: 0px;\n}\n\n #isdk .peer:checked ~ .peer-checked\\:bg-accent-2 {\n background-color: var(--i-color-a-2);\n}\n\n #isdk .peer:checked ~ .peer-checked\\:text-accent-9 {\n color: var(--i-color-a-9);\n}\n\n #isdk .peer:checked ~ .peer-checked\\:outline-accent-7 {\n outline-color: var(--i-color-a-7);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-4 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-accent-7 {\n --tw-ring-color: var(--i-color-a-7);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-offset-2 {\n --tw-ring-offset-width: 2px;\n}\n\n @media (pointer: coarse) {\n\n #isdk .pointer-coarse\\:touch-hitbox\\:\\:before::before {\n content: '';\n position: absolute;\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-height: 44px;\n min-width: 44px;\n z-index: 9999;\n }\n}\n";
9010
9244
  const createChatbotDomManager = () => {
9011
9245
  return {
9012
9246
  getOrCreateChatbotElement: () => {
@@ -9032,7 +9266,7 @@ var OKLCH_PRESETS = {
9032
9266
  "7": [80.5, 0.08],
9033
9267
  "8": [74, 0.11],
9034
9268
  "9": [60, 0.22],
9035
- "10": [60.5, 0.2],
9269
+ "10": [56, 0.23],
9036
9270
  "11": [50, 0.19],
9037
9271
  "12": [25, 0.18]
9038
9272
  },
@@ -9230,6 +9464,9 @@ const tokens = designTokens().core(({
9230
9464
  "bg-button": transparent,
9231
9465
  "bg-button-hover": withOpacity("n-10", 0.4),
9232
9466
  "bg-button-active": withOpacity("n-10", 0.5)
9467
+ },
9468
+ "submit-button": {
9469
+ "bg-active": core(theme.mode === "dark" ? "color.a-9" : "color.a-10")
9233
9470
  }
9234
9471
  };
9235
9472
  });
@@ -9272,7 +9509,7 @@ const chatbotPlugin = ({
9272
9509
  prepared = true;
9273
9510
  };
9274
9511
  return {
9275
- /** Optionally eagerly renders the interface ahead of application requests. */
9512
+ /** Optionally eagerly renders the interface ahead of needing the chatbot. */
9276
9513
  prepare: async () => {
9277
9514
  if (typeof window === "undefined")
9278
9515
  return;
@@ -9282,86 +9519,112 @@ const chatbotPlugin = ({
9282
9519
  renderAndPrepare();
9283
9520
  logger.info("Chatbot plugin prepared");
9284
9521
  } catch (error) {
9285
- console.error(error);
9286
9522
  logger.error("Error preparing chatbot plugin", error);
9287
9523
  }
9288
9524
  },
9289
- startApplication: async ({
9290
- jobId
9291
- }) => {
9525
+ /** Fetches a flow by job ID.
9526
+ * @param jobId - The job ID to fetch the flow for. This is the job ID according to the **ATS**, and not the inploi job ID.
9527
+ */
9528
+ fetchFlowByJobId: async (jobId) => apiClient.fetch(`/flow/job/${jobId}`).then((res) => {
9529
+ const data = parse$1(FlowByJobPayloadSchema, res);
9530
+ return {
9531
+ context: {
9532
+ job_id: data.job.id,
9533
+ flow_id: data.flow.id
9534
+ },
9535
+ flow: data.flow,
9536
+ title: `Applying for “${data.job.title}”`,
9537
+ flowKeys: [data.job.id]
9538
+ };
9539
+ }),
9540
+ fetchFlowById: async (flowId) => apiClient.fetch(`/flow/${flowId}`).then((res) => {
9541
+ const data = parse$1(FlowByIdPayloadSchema, res);
9542
+ return {
9543
+ flow: data.flow,
9544
+ context: {
9545
+ flow_id: data.flow.id
9546
+ },
9547
+ title: "Chatbot",
9548
+ flowKeys: []
9549
+ };
9550
+ }),
9551
+ open: async (params) => {
9292
9552
  if (typeof window === "undefined")
9293
9553
  return;
9294
9554
  try {
9295
- application.cancel();
9296
- n$1(() => {
9297
- viewState.value = "maximised";
9298
- application.current$.value = {
9555
+ store.cancelCurrentFlow();
9556
+ store.viewState$.value = "maximised";
9557
+ if (params instanceof Promise) {
9558
+ store.current$.value = {
9299
9559
  state: "loading"
9300
9560
  };
9301
- });
9302
- getApplicationData({
9303
- jobId,
9304
- apiClient,
9305
- logger
9306
- }).then(async (res) => {
9307
- if (res.ok) {
9308
- application.start(res.value);
9309
- } else {
9310
- application.current$.value = {
9561
+ params.then(async (params2) => {
9562
+ const parsedParams = parse$1(StartFlowSchema, params2);
9563
+ store.startFlow(parsedParams);
9564
+ }).catch((error) => {
9565
+ const message = error instanceof Error ? error.message : "An error occurred";
9566
+ store.current$.value = {
9311
9567
  state: "error",
9312
- error: res.error
9568
+ error: message
9313
9569
  };
9314
- }
9315
- });
9316
- if (!prepared)
9317
- renderAndPrepare();
9570
+ });
9571
+ } else {
9572
+ store.startFlow(params);
9573
+ }
9318
9574
  } catch (error) {
9319
- console.error(error);
9320
- logger.error("Error starting application", error);
9575
+ logger.error("Error starting flow", error);
9321
9576
  }
9322
9577
  },
9323
- closeApplication: async () => {
9578
+ /** @deprecated - Please use `open` instead. */
9579
+ startApplication: void 0,
9580
+ /** @deprecated - Please use `close` instead */
9581
+ closeApplication: void 0,
9582
+ close: async () => {
9324
9583
  if (typeof window === "undefined")
9325
9584
  return;
9326
- logger.info("Closing application from an external source");
9327
- application.cancel();
9585
+ store.cancelCurrentFlow();
9586
+ logger.info("Closed flow from an external source");
9328
9587
  }
9329
9588
  };
9330
9589
  });
9331
9590
  export {
9332
- AnimatePresence as A,
9333
- chatbotPlugin as B,
9591
+ AbortedError as A,
9592
+ url as B,
9334
9593
  Cn as C,
9335
- ERROR_MESSAGES as E,
9594
+ regex as D,
9595
+ m$1 as E,
9336
9596
  F$1 as F,
9597
+ AnimatePresence as G,
9598
+ ERROR_MESSAGES as H,
9599
+ chatbotPlugin as I,
9337
9600
  N,
9338
9601
  T$2 as T,
9339
9602
  ValiError as V,
9340
- _$1 as _,
9341
- _$4 as a,
9342
- parse as b,
9603
+ _$3 as _,
9604
+ getFlowSubmissionsPayload as a,
9605
+ a as b,
9343
9606
  clsx as c,
9344
- picklist as d,
9345
- application as e,
9346
- h$1 as f,
9347
- parseAsync as g,
9607
+ _$4 as d,
9608
+ parse$1 as e,
9609
+ picklist as f,
9610
+ getHeadOrThrow as g,
9348
9611
  hasProp as h,
9349
9612
  invariant$1 as i,
9350
- object as j,
9351
- k$3 as k,
9352
- minLength as l,
9353
- maxLength as m,
9354
- boolean as n,
9613
+ h$1 as j,
9614
+ kbToReadableSize as k,
9615
+ k$3 as l,
9616
+ isSubmissionOfType as m,
9617
+ parseAsync as n,
9355
9618
  o,
9356
9619
  p$3 as p,
9357
- email as q,
9358
- record as r,
9359
- string as s,
9620
+ object as q,
9621
+ maxLength as r,
9622
+ store as s,
9360
9623
  transform as t,
9361
- url as u,
9362
- regex as v,
9363
- inputHeight as w,
9364
- m$1 as x,
9624
+ minLength as u,
9625
+ record as v,
9626
+ boolean as w,
9627
+ string as x,
9365
9628
  y$2 as y,
9366
- viewState as z
9629
+ email as z
9367
9630
  };