@appcues/web-sdk 7.24.0 → 7.24.3

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.
@@ -71,12 +71,12 @@ var y = _.Start, b = _.Stop, x = _.Raise, S = _.Send, C = _.Cancel, w = _.NullEv
71
71
  _.After, _.DoneState;
72
72
  var E = _.Log, D = _.Init, O = _.Invoke;
73
73
  _.ErrorExecution;
74
- var k = _.ErrorPlatform, A = _.ErrorCustom, j = _.Update, M = _.Choose, N = _.Pure, P = {}, F = "xstate.guard", I;
75
- function ee(e, t, n) {
74
+ var k = _.ErrorPlatform, A = _.ErrorCustom, j = _.Update, M = _.Choose, N = _.Pure, P = {}, ee = "xstate.guard", F;
75
+ function I(e, t, n) {
76
76
  n === void 0 && (n = ".");
77
77
  var r = B(e, n), i = B(t, n);
78
78
  return G(i) ? G(r) ? i === r : !1 : G(r) ? r in i : Object.keys(r).every(function(e) {
79
- return e in i ? ee(r[e], i[e]) : !1;
79
+ return e in i ? I(r[e], i[e]) : !1;
80
80
  });
81
81
  }
82
82
  function L(e) {
@@ -287,11 +287,11 @@ function G(e) {
287
287
  }
288
288
  function ge(e, t) {
289
289
  if (e) return G(e) ? {
290
- type: F,
290
+ type: ee,
291
291
  name: e,
292
292
  predicate: t ? t[e] : void 0
293
293
  } : W(e) ? {
294
- type: F,
294
+ type: ee,
295
295
  name: e.name,
296
296
  predicate: e
297
297
  } : e;
@@ -303,32 +303,32 @@ function _e(e) {
303
303
  return !1;
304
304
  }
305
305
  }
306
- var ve = /* @__PURE__ */ function() {
306
+ var K = /* @__PURE__ */ function() {
307
307
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
308
308
  }();
309
- I = {}, I[ve] = function() {
309
+ F = {}, F[K] = function() {
310
310
  return this;
311
- }, I[Symbol.observable] = function() {
311
+ }, F[Symbol.observable] = function() {
312
312
  return this;
313
313
  };
314
- function ye(e) {
314
+ function ve(e) {
315
315
  return !!e && "__xstatenode" in e;
316
316
  }
317
- function K(e) {
317
+ function q(e) {
318
318
  return !!e && typeof e.send == "function";
319
319
  }
320
- var be = /* @__PURE__ */ function() {
320
+ var ye = /* @__PURE__ */ function() {
321
321
  var e = 0;
322
322
  return function() {
323
323
  return e++, e.toString(16);
324
324
  };
325
325
  }();
326
- function xe(e, t) {
326
+ function be(e, t) {
327
327
  return G(e) || typeof e == "number" ? f({ type: e }, t) : e;
328
328
  }
329
- function q(e, t) {
329
+ function J(e, t) {
330
330
  if (!G(e) && "$$type" in e && e.$$type === "scxml") return e;
331
- var n = xe(e);
331
+ var n = be(e);
332
332
  return f({
333
333
  name: n.type,
334
334
  data: n,
@@ -336,18 +336,18 @@ function q(e, t) {
336
336
  type: "external"
337
337
  }, t);
338
338
  }
339
- function Se(e, t) {
339
+ function xe(e, t) {
340
340
  return oe(t).map(function(t) {
341
- return t === void 0 || typeof t == "string" || ye(t) ? {
341
+ return t === void 0 || typeof t == "string" || ve(t) ? {
342
342
  target: t,
343
343
  event: e
344
344
  } : f(f({}, t), { event: e });
345
345
  });
346
346
  }
347
- function Ce(e) {
347
+ function Se(e) {
348
348
  if (!(e === void 0 || e === "")) return U(e);
349
349
  }
350
- function we(e, t, n, r, i) {
350
+ function Ce(e, t, n, r, i) {
351
351
  var a = e.options.guards, o = {
352
352
  state: i,
353
353
  cond: t,
@@ -358,10 +358,10 @@ function we(e, t, n, r, i) {
358
358
  if (!s) throw Error(`Guard '${t.type}' is not implemented on machine '${e.id}'.`);
359
359
  return s(n, r.data, o);
360
360
  }
361
- function Te(e) {
361
+ function we(e) {
362
362
  return typeof e == "string" ? { type: e } : e;
363
363
  }
364
- function Ee(e, t, n) {
364
+ function Te(e, t, n) {
365
365
  if (typeof e == "object") return e;
366
366
  var r = function() {};
367
367
  return {
@@ -370,17 +370,17 @@ function Ee(e, t, n) {
370
370
  complete: n || r
371
371
  };
372
372
  }
373
- function De(e, t) {
373
+ function Ee(e, t) {
374
374
  return `${e}:invocation[${t}]`;
375
375
  }
376
- var Oe = /* @__PURE__ */ q({ type: D });
377
- function ke(e, t) {
376
+ var De = /* @__PURE__ */ J({ type: D });
377
+ function Oe(e, t) {
378
378
  return t && t[e] || void 0;
379
379
  }
380
- function Ae(e, t) {
380
+ function ke(e, t) {
381
381
  var n;
382
382
  if (G(e) || typeof e == "number") {
383
- var r = ke(e, t);
383
+ var r = Oe(e, t);
384
384
  n = W(r) ? {
385
385
  type: e,
386
386
  exec: r
@@ -393,7 +393,7 @@ function Ae(e, t) {
393
393
  exec: e
394
394
  };
395
395
  else {
396
- var r = ke(e.type, t);
396
+ var r = Oe(e.type, t);
397
397
  if (W(r)) n = f(f({}, e), { exec: r });
398
398
  else if (r) {
399
399
  var i = r.type || e.type;
@@ -402,38 +402,38 @@ function Ae(e, t) {
402
402
  }
403
403
  return n;
404
404
  }
405
- var je = function(e, t) {
405
+ var Ae = function(e, t) {
406
406
  return e ? (he(e) ? e : [e]).map(function(e) {
407
- return Ae(e, t);
407
+ return ke(e, t);
408
408
  }) : [];
409
409
  };
410
- function Me(e) {
411
- var t = Ae(e);
410
+ function je(e) {
411
+ var t = ke(e);
412
412
  return f(f({ id: G(e) ? e : t.id }, t), { type: t.type });
413
413
  }
414
- function Ne(e) {
414
+ function Me(e) {
415
415
  return G(e) ? {
416
416
  type: x,
417
417
  event: e
418
- } : Fe(e, { to: v.Internal });
418
+ } : Pe(e, { to: v.Internal });
419
419
  }
420
- function Pe(e) {
420
+ function Ne(e) {
421
421
  return {
422
422
  type: x,
423
- _event: q(e.event)
423
+ _event: J(e.event)
424
424
  };
425
425
  }
426
- function Fe(e, t) {
426
+ function Pe(e, t) {
427
427
  return {
428
428
  to: t ? t.to : void 0,
429
429
  type: S,
430
- event: W(e) ? e : xe(e),
430
+ event: W(e) ? e : be(e),
431
431
  delay: t ? t.delay : void 0,
432
432
  id: t && t.id !== void 0 ? t.id : W(e) ? e.name : L(e)
433
433
  };
434
434
  }
435
- function Ie(e, t, n, r) {
436
- var i = { _event: n }, a = q(W(e.event) ? e.event(t, n.data, i) : e.event), o;
435
+ function Fe(e, t, n, r) {
436
+ var i = { _event: n }, a = J(W(e.event) ? e.event(t, n.data, i) : e.event), o;
437
437
  if (G(e.delay)) {
438
438
  var s = r && r[e.delay];
439
439
  o = W(s) ? s(t, n.data, i) : s;
@@ -446,51 +446,51 @@ function Ie(e, t, n, r) {
446
446
  delay: o
447
447
  });
448
448
  }
449
- function Le(e, t) {
450
- return Fe(e, f(f({}, t), { to: v.Parent }));
449
+ function Ie(e, t) {
450
+ return Pe(e, f(f({}, t), { to: v.Parent }));
451
451
  }
452
- var Re = function(e, t, n) {
452
+ var Le = function(e, t, n) {
453
453
  return f(f({}, e), { value: G(e.expr) ? e.expr : e.expr(t, n.data, { _event: n }) });
454
- }, ze = function(e) {
454
+ }, Re = function(e) {
455
455
  return {
456
456
  type: C,
457
457
  sendId: e
458
458
  };
459
459
  };
460
- function Be(e) {
461
- var t = Me(e);
460
+ function ze(e) {
461
+ var t = je(e);
462
462
  return {
463
463
  type: _.Start,
464
464
  activity: t,
465
465
  exec: void 0
466
466
  };
467
467
  }
468
- function Ve(e) {
469
- var t = W(e) ? e : Me(e);
468
+ function Be(e) {
469
+ var t = W(e) ? e : je(e);
470
470
  return {
471
471
  type: _.Stop,
472
472
  activity: t,
473
473
  exec: void 0
474
474
  };
475
475
  }
476
- function He(e, t, n) {
476
+ function Ve(e, t, n) {
477
477
  var r = W(e.activity) ? e.activity(t, n.data) : e.activity, i = typeof r == "string" ? { id: r } : r;
478
478
  return {
479
479
  type: _.Stop,
480
480
  activity: i
481
481
  };
482
482
  }
483
- var Ue = function(e) {
483
+ var He = function(e) {
484
484
  return {
485
485
  type: T,
486
486
  assignment: e
487
487
  };
488
488
  };
489
- function We(e, t) {
489
+ function Ue(e, t) {
490
490
  var n = t ? `#${t}` : "";
491
491
  return `${_.After}(${e})${n}`;
492
492
  }
493
- function Ge(e, t) {
493
+ function We(e, t) {
494
494
  var n = `${_.DoneState}.${e}`, r = {
495
495
  type: n,
496
496
  data: t
@@ -499,7 +499,7 @@ function Ge(e, t) {
499
499
  return n;
500
500
  }, r;
501
501
  }
502
- function Ke(e, t) {
502
+ function Ge(e, t) {
503
503
  var n = `${_.DoneInvoke}.${e}`, r = {
504
504
  type: n,
505
505
  data: t
@@ -508,7 +508,7 @@ function Ke(e, t) {
508
508
  return n;
509
509
  }, r;
510
510
  }
511
- function qe(e, t) {
511
+ function Ke(e, t) {
512
512
  var n = `${_.ErrorPlatform}.${e}`, r = {
513
513
  type: n,
514
514
  data: t
@@ -517,52 +517,52 @@ function qe(e, t) {
517
517
  return n;
518
518
  }, r;
519
519
  }
520
- function Je(e) {
520
+ function qe(e) {
521
521
  return {
522
522
  type: _.Pure,
523
523
  get: e
524
524
  };
525
525
  }
526
- function Ye(e, t) {
527
- return Fe(function(e, t) {
526
+ function Je(e, t) {
527
+ return Pe(function(e, t) {
528
528
  return t;
529
529
  }, f(f({}, t), { to: e }));
530
530
  }
531
- function Xe(e) {
531
+ function Ye(e) {
532
532
  return {
533
533
  type: _.Choose,
534
534
  conds: e
535
535
  };
536
536
  }
537
- function Ze(e, t, n, r, i, a) {
537
+ function Xe(e, t, n, r, i, a) {
538
538
  a === void 0 && (a = !1);
539
539
  var o = h(a ? [[], i] : de(i, function(e) {
540
540
  return e.type === T;
541
541
  }), 2), s = o[0], c = o[1], l = s.length ? me(n, r, s, t) : n, u = a ? [n] : void 0;
542
542
  return [H(c.map(function(n) {
543
543
  switch (n.type) {
544
- case x: return Pe(n);
545
- case S: return Ie(n, l, r, e.options.delays);
546
- case E: return Re(n, l, r);
544
+ case x: return Ne(n);
545
+ case S: return Fe(n, l, r, e.options.delays);
546
+ case E: return Le(n, l, r);
547
547
  case M:
548
548
  var i = n.conds.find(function(n) {
549
549
  var i = ge(n.cond, e.options.guards);
550
- return !i || we(e, i, l, r, t);
550
+ return !i || Ce(e, i, l, r, t);
551
551
  })?.actions;
552
552
  if (!i) return [];
553
- var o = h(Ze(e, t, l, r, je(U(i), e.options.actions), a), 2), s = o[0];
553
+ var o = h(Xe(e, t, l, r, Ae(U(i), e.options.actions), a), 2), s = o[0];
554
554
  return l = o[1], u?.push(l), s;
555
555
  case N:
556
556
  var i = n.get(l, r.data);
557
557
  if (!i) return [];
558
- var c = h(Ze(e, t, l, r, je(U(i), e.options.actions), a), 2), d = c[0];
558
+ var c = h(Xe(e, t, l, r, Ae(U(i), e.options.actions), a), 2), d = c[0];
559
559
  return l = c[1], u?.push(l), d;
560
- case b: return He(n, l, r);
560
+ case b: return Ve(n, l, r);
561
561
  case T:
562
562
  l = me(l, r, [n], t), u?.push(l);
563
563
  break;
564
564
  default:
565
- var p = Ae(n, e.options.actions), m = p.exec;
565
+ var p = ke(n, e.options.actions), m = p.exec;
566
566
  if (m && u) {
567
567
  var _ = u.length - 1;
568
568
  p = f(f({}, p), { exec: function(e) {
@@ -576,14 +576,14 @@ function Ze(e, t, n, r, i, a) {
576
576
  return !!e;
577
577
  })), l];
578
578
  }
579
- var Qe = [], $e = function(e, t) {
580
- Qe.push(e);
579
+ var Ze = [], Qe = function(e, t) {
580
+ Ze.push(e);
581
581
  var n = t(e);
582
- return Qe.pop(), n;
583
- }, et = function(e) {
584
- return e(Qe[Qe.length - 1]);
582
+ return Ze.pop(), n;
583
+ }, $e = function(e) {
584
+ return e(Ze[Ze.length - 1]);
585
585
  };
586
- function tt(e) {
586
+ function et(e) {
587
587
  var t;
588
588
  return t = {
589
589
  id: e,
@@ -595,18 +595,18 @@ function tt(e) {
595
595
  toJSON: function() {
596
596
  return { id: e };
597
597
  }
598
- }, t[ve] = function() {
598
+ }, t[K] = function() {
599
599
  return this;
600
600
  }, t;
601
601
  }
602
- function nt(e, t, n, r) {
603
- var i = Te(e.src), a = t?.options.services?.[i.type], o = e.data ? se(e.data, n, r) : void 0, s = a ? rt(a, e.id, o) : tt(e.id);
602
+ function tt(e, t, n, r) {
603
+ var i = we(e.src), a = t?.options.services?.[i.type], o = e.data ? se(e.data, n, r) : void 0, s = a ? nt(a, e.id, o) : et(e.id);
604
604
  return s.meta = e, s;
605
605
  }
606
- function rt(e, t, n) {
607
- var r = tt(t);
608
- if (r.deferred = !0, ye(e)) {
609
- var i = r.state = $e(void 0, function() {
606
+ function nt(e, t, n) {
607
+ var r = et(t);
608
+ if (r.deferred = !0, ve(e)) {
609
+ var i = r.state = Qe(void 0, function() {
610
610
  return (n ? e.withContext(n) : e).initialState;
611
611
  });
612
612
  r.getSnapshot = function() {
@@ -615,17 +615,17 @@ function rt(e, t, n) {
615
615
  }
616
616
  return r;
617
617
  }
618
- function it(e) {
618
+ function rt(e) {
619
619
  try {
620
620
  return typeof e.send == "function";
621
621
  } catch {
622
622
  return !1;
623
623
  }
624
624
  }
625
- function at(e) {
626
- return it(e) && "id" in e;
625
+ function it(e) {
626
+ return rt(e) && "id" in e;
627
627
  }
628
- function ot(e) {
628
+ function at(e) {
629
629
  var t;
630
630
  return f((t = {
631
631
  subscribe: function() {
@@ -633,26 +633,26 @@ function ot(e) {
633
633
  },
634
634
  id: "anonymous",
635
635
  getSnapshot: function() {}
636
- }, t[ve] = function() {
636
+ }, t[K] = function() {
637
637
  return this;
638
638
  }, t), e);
639
639
  }
640
- var st = function(e) {
640
+ var ot = function(e) {
641
641
  return e.type === "atomic" || e.type === "final";
642
642
  };
643
- function ct(e) {
643
+ function st(e) {
644
644
  return Object.keys(e.states).map(function(t) {
645
645
  return e.states[t];
646
646
  }).filter(function(e) {
647
647
  return e.type !== "history";
648
648
  });
649
649
  }
650
- function lt(e) {
650
+ function ct(e) {
651
651
  var t = [e];
652
- return st(e) ? t : t.concat(H(ct(e).map(lt)));
652
+ return ot(e) ? t : t.concat(H(st(e).map(ct)));
653
653
  }
654
- function ut(e, t) {
655
- var n, r, i, a, o, s, c, l, u = ft(new Set(e)), d = new Set(t);
654
+ function lt(e, t) {
655
+ var n, r, i, a, o, s, c, l, u = dt(new Set(e)), d = new Set(t);
656
656
  try {
657
657
  for (var f = m(d), p = f.next(); !p.done; p = f.next()) for (var h = p.value, g = h.parent; g && !d.has(g);) d.add(g), g = g.parent;
658
658
  } catch (e) {
@@ -664,7 +664,7 @@ function ut(e, t) {
664
664
  if (n) throw n.error;
665
665
  }
666
666
  }
667
- var _ = ft(d);
667
+ var _ = dt(d);
668
668
  try {
669
669
  for (var v = m(d), y = v.next(); !y.done; y = v.next()) {
670
670
  var h = y.value;
@@ -674,7 +674,7 @@ function ut(e, t) {
674
674
  return d.add(e);
675
675
  });
676
676
  else if (h.type === "parallel") try {
677
- for (var b = (o = void 0, m(ct(h))), x = b.next(); !x.done; x = b.next()) {
677
+ for (var b = (o = void 0, m(st(h))), x = b.next(); !x.done; x = b.next()) {
678
678
  var S = x.value;
679
679
  d.has(S) || (d.add(S), u.get(S) ? u.get(S).forEach(function(e) {
680
680
  return d.add(e);
@@ -714,21 +714,21 @@ function ut(e, t) {
714
714
  }
715
715
  return d;
716
716
  }
717
- function dt(e, t) {
717
+ function ut(e, t) {
718
718
  var n = t.get(e);
719
719
  if (!n) return {};
720
720
  if (e.type === "compound") {
721
721
  var r = n[0];
722
722
  if (r) {
723
- if (st(r)) return r.key;
723
+ if (ot(r)) return r.key;
724
724
  } else return {};
725
725
  }
726
726
  var i = {};
727
727
  return n.forEach(function(e) {
728
- i[e.key] = dt(e, t);
728
+ i[e.key] = ut(e, t);
729
729
  }), i;
730
730
  }
731
- function ft(e) {
731
+ function dt(e) {
732
732
  var t, n, r = /* @__PURE__ */ new Map();
733
733
  try {
734
734
  for (var i = m(e), a = i.next(); !a.done; a = i.next()) {
@@ -746,49 +746,49 @@ function ft(e) {
746
746
  }
747
747
  return r;
748
748
  }
749
- function pt(e, t) {
750
- return dt(e, ft(ut([e], t)));
749
+ function ft(e, t) {
750
+ return ut(e, dt(lt([e], t)));
751
751
  }
752
- function mt(e, t) {
752
+ function pt(e, t) {
753
753
  return Array.isArray(e) ? e.some(function(e) {
754
754
  return e === t;
755
755
  }) : e instanceof Set ? e.has(t) : !1;
756
756
  }
757
- function ht(e) {
757
+ function mt(e) {
758
758
  return g([], h(new Set(H(g([], h(e.map(function(e) {
759
759
  return e.ownEvents;
760
760
  })), !1)))), !1);
761
761
  }
762
- function gt(e, t) {
763
- return t.type === "compound" ? ct(t).some(function(t) {
764
- return t.type === "final" && mt(e, t);
765
- }) : t.type === "parallel" ? ct(t).every(function(t) {
766
- return gt(e, t);
762
+ function ht(e, t) {
763
+ return t.type === "compound" ? st(t).some(function(t) {
764
+ return t.type === "final" && pt(e, t);
765
+ }) : t.type === "parallel" ? st(t).every(function(t) {
766
+ return ht(e, t);
767
767
  }) : !1;
768
768
  }
769
- function _t(e) {
769
+ function gt(e) {
770
770
  return e === void 0 && (e = []), e.reduce(function(e, t) {
771
771
  return t.meta !== void 0 && (e[t.id] = t.meta), e;
772
772
  }, {});
773
773
  }
774
- function vt(e) {
774
+ function _t(e) {
775
775
  return new Set(H(e.map(function(e) {
776
776
  return e.tags;
777
777
  })));
778
778
  }
779
- function yt(e, t) {
779
+ function vt(e, t) {
780
780
  if (e === t) return !0;
781
781
  if (e === void 0 || t === void 0) return !1;
782
782
  if (G(e) || G(t)) return e === t;
783
783
  var n = Object.keys(e), r = Object.keys(t);
784
784
  return n.length === r.length && n.every(function(n) {
785
- return yt(e[n], t[n]);
785
+ return vt(e[n], t[n]);
786
786
  });
787
787
  }
788
- function bt(e) {
788
+ function yt(e) {
789
789
  return typeof e != "object" || !e ? !1 : "value" in e && "_event" in e;
790
790
  }
791
- function xt(e, t) {
791
+ function bt(e, t) {
792
792
  var n = e.exec;
793
793
  return f(f({}, e), { exec: n === void 0 ? void 0 : function() {
794
794
  return n(t.context, t.event, {
@@ -798,11 +798,11 @@ function xt(e, t) {
798
798
  });
799
799
  } });
800
800
  }
801
- var St = /* @__PURE__ */ function() {
801
+ var xt = /* @__PURE__ */ function() {
802
802
  function e(e) {
803
803
  var t = this;
804
- this.actions = [], this.activities = P, this.meta = {}, this.events = [], this.value = e.value, this.context = e.context, this._event = e._event, this._sessionid = e._sessionid, this.event = this._event.data, this.historyValue = e.historyValue, this.history = e.history, this.actions = e.actions || [], this.activities = e.activities || P, this.meta = _t(e.configuration), this.events = e.events || [], this.matches = this.matches.bind(this), this.toStrings = this.toStrings.bind(this), this.configuration = e.configuration, this.transitions = e.transitions, this.children = e.children, this.done = !!e.done, this.tags = (Array.isArray(e.tags) ? new Set(e.tags) : e.tags) ?? /* @__PURE__ */ new Set(), this.machine = e.machine, Object.defineProperty(this, "nextEvents", { get: function() {
805
- return ht(t.configuration);
804
+ this.actions = [], this.activities = P, this.meta = {}, this.events = [], this.value = e.value, this.context = e.context, this._event = e._event, this._sessionid = e._sessionid, this.event = this._event.data, this.historyValue = e.historyValue, this.history = e.history, this.actions = e.actions || [], this.activities = e.activities || P, this.meta = gt(e.configuration), this.events = e.events || [], this.matches = this.matches.bind(this), this.toStrings = this.toStrings.bind(this), this.configuration = e.configuration, this.transitions = e.transitions, this.children = e.children, this.done = !!e.done, this.tags = (Array.isArray(e.tags) ? new Set(e.tags) : e.tags) ?? /* @__PURE__ */ new Set(), this.machine = e.machine, Object.defineProperty(this, "nextEvents", { get: function() {
805
+ return mt(t.configuration);
806
806
  } });
807
807
  }
808
808
  return e.from = function(t, n) {
@@ -823,7 +823,7 @@ var St = /* @__PURE__ */ function() {
823
823
  }) : new e({
824
824
  value: t,
825
825
  context: n,
826
- _event: Oe,
826
+ _event: De,
827
827
  _sessionid: null,
828
828
  historyValue: void 0,
829
829
  history: void 0,
@@ -840,7 +840,7 @@ var St = /* @__PURE__ */ function() {
840
840
  }, e.inert = function(t, n) {
841
841
  if (t instanceof e) {
842
842
  if (!t.actions.length) return t;
843
- var r = Oe;
843
+ var r = De;
844
844
  return new e({
845
845
  value: t.value,
846
846
  context: n,
@@ -875,7 +875,7 @@ var St = /* @__PURE__ */ function() {
875
875
  "machine"
876
876
  ])), { tags: Array.from(t) });
877
877
  }, e.prototype.matches = function(e) {
878
- return ee(e, this.value);
878
+ return I(e, this.value);
879
879
  }, e.prototype.hasTag = function(e) {
880
880
  return this.tags.has(e);
881
881
  }, e.prototype.can = function(e) {
@@ -885,9 +885,9 @@ var St = /* @__PURE__ */ function() {
885
885
  return e.target !== void 0 || e.actions.length;
886
886
  });
887
887
  }, e;
888
- }(), Ct = { deferEvents: !1 }, wt = /* @__PURE__ */ function() {
888
+ }(), St = { deferEvents: !1 }, Ct = /* @__PURE__ */ function() {
889
889
  function e(e) {
890
- this.processingEvent = !1, this.queue = [], this.initialized = !1, this.options = f(f({}, Ct), e);
890
+ this.processingEvent = !1, this.queue = [], this.initialized = !1, this.options = f(f({}, St), e);
891
891
  }
892
892
  return e.prototype.initialize = function(e) {
893
893
  if (this.initialized = !0, e) {
@@ -919,37 +919,37 @@ var St = /* @__PURE__ */ function() {
919
919
  this.processingEvent = !1;
920
920
  }
921
921
  }, e;
922
- }(), Tt = /* @__PURE__ */ new Map(), Et = 0, Dt = {
922
+ }(), wt = /* @__PURE__ */ new Map(), Tt = 0, Et = {
923
923
  bookId: function() {
924
- return `x:${Et++}`;
924
+ return `x:${Tt++}`;
925
925
  },
926
926
  register: function(e, t) {
927
- return Tt.set(e, t), e;
927
+ return wt.set(e, t), e;
928
928
  },
929
929
  get: function(e) {
930
- return Tt.get(e);
930
+ return wt.get(e);
931
931
  },
932
932
  free: function(e) {
933
- Tt.delete(e);
933
+ wt.delete(e);
934
934
  }
935
935
  };
936
- function Ot() {
936
+ function Dt() {
937
937
  if (typeof globalThis < "u") return globalThis;
938
938
  if (typeof self < "u") return self;
939
939
  if (typeof window < "u") return window;
940
940
  if (typeof global < "u") return global;
941
941
  }
942
- function kt() {
943
- var e = Ot();
942
+ function Ot() {
943
+ var e = Dt();
944
944
  if (e && "__xstate__" in e) return e.__xstate__;
945
945
  }
946
- function At(e) {
947
- if (Ot()) {
948
- var t = kt();
946
+ function kt(e) {
947
+ if (Dt()) {
948
+ var t = Ot();
949
949
  t && t.register(e);
950
950
  }
951
951
  }
952
- function jt(e, t) {
952
+ function At(e, t) {
953
953
  t === void 0 && (t = {});
954
954
  var n = e.initialState, r = /* @__PURE__ */ new Set(), i = [], a = !1, o = function() {
955
955
  if (!a) {
@@ -961,7 +961,7 @@ function jt(e, t) {
961
961
  }
962
962
  a = !1;
963
963
  }
964
- }, s = ot({
964
+ }, s = at({
965
965
  id: t.id,
966
966
  send: function(e) {
967
967
  i.push(e), o();
@@ -970,7 +970,7 @@ function jt(e, t) {
970
970
  return n;
971
971
  },
972
972
  subscribe: function(e, t, i) {
973
- var a = Ee(e, t, i);
973
+ var a = Te(e, t, i);
974
974
  return r.add(a), a.next(n), { unsubscribe: function() {
975
975
  r.delete(a);
976
976
  } };
@@ -983,21 +983,21 @@ function jt(e, t) {
983
983
  };
984
984
  return n = e.start ? e.start(c) : n, s;
985
985
  }
986
- var Mt = {
986
+ var jt = {
987
987
  sync: !1,
988
988
  autoForward: !1
989
- }, J;
989
+ }, Y;
990
990
  (function(e) {
991
991
  e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
992
- })(J ||= {});
993
- var Nt = /* @__PURE__ */ function() {
992
+ })(Y ||= {});
993
+ var Mt = /* @__PURE__ */ function() {
994
994
  function e(t, n) {
995
995
  var r = this;
996
- n === void 0 && (n = e.defaultOptions), this.machine = t, this.delayedEventsMap = {}, this.listeners = /* @__PURE__ */ new Set(), this.contextListeners = /* @__PURE__ */ new Set(), this.stopListeners = /* @__PURE__ */ new Set(), this.doneListeners = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Set(), this.sendListeners = /* @__PURE__ */ new Set(), this.initialized = !1, this.status = J.NotStarted, this.children = /* @__PURE__ */ new Map(), this.forwardTo = /* @__PURE__ */ new Set(), this.init = this.start, this.send = function(e, t) {
996
+ n === void 0 && (n = e.defaultOptions), this.machine = t, this.delayedEventsMap = {}, this.listeners = /* @__PURE__ */ new Set(), this.contextListeners = /* @__PURE__ */ new Set(), this.stopListeners = /* @__PURE__ */ new Set(), this.doneListeners = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Set(), this.sendListeners = /* @__PURE__ */ new Set(), this.initialized = !1, this.status = Y.NotStarted, this.children = /* @__PURE__ */ new Map(), this.forwardTo = /* @__PURE__ */ new Set(), this.init = this.start, this.send = function(e, t) {
997
997
  if (he(e)) return r.batch(e), r.state;
998
- var n = q(xe(e, t));
999
- if (r.status === J.Stopped) return r.state;
1000
- if (r.status !== J.Running && !r.options.deferEvents) throw Error(`Event "${n.name}" was sent to uninitialized service "${r.machine.id}". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
998
+ var n = J(be(e, t));
999
+ if (r.status === Y.Stopped) return r.state;
1000
+ if (r.status !== Y.Running && !r.options.deferEvents) throw Error(`Event "${n.name}" was sent to uninitialized service "${r.machine.id}". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
1001
1001
  Event: ${JSON.stringify(n.data)}`);
1002
1002
  return r.scheduler.schedule(function() {
1003
1003
  r.forward(n);
@@ -1005,23 +1005,23 @@ Event: ${JSON.stringify(n.data)}`);
1005
1005
  r.update(e, n);
1006
1006
  }), r._state;
1007
1007
  }, this.sendTo = function(e, t) {
1008
- var n = r.parent && (t === v.Parent || r.parent.id === t), i = n ? r.parent : G(t) ? r.children.get(t) || Dt.get(t) : K(t) ? t : void 0;
1008
+ var n = r.parent && (t === v.Parent || r.parent.id === t), i = n ? r.parent : G(t) ? r.children.get(t) || Et.get(t) : q(t) ? t : void 0;
1009
1009
  if (!i) {
1010
1010
  if (!n) throw Error(`Unable to send event to child '${t}' from service '${r.id}'.`);
1011
1011
  return;
1012
1012
  }
1013
1013
  "machine" in i ? i.send(f(f({}, e), {
1014
- name: e.name === A ? `${qe(r.id)}` : e.name,
1014
+ name: e.name === A ? `${Ke(r.id)}` : e.name,
1015
1015
  origin: r.sessionId
1016
1016
  })) : i.send(e.data);
1017
1017
  };
1018
1018
  var i = f(f({}, e.defaultOptions), n), a = i.clock, o = i.logger, s = i.parent, c = i.id, l = c === void 0 ? t.id : c;
1019
- this.id = l, this.logger = o, this.clock = a, this.parent = s, this.options = i, this.scheduler = new wt({ deferEvents: this.options.deferEvents }), this.sessionId = Dt.bookId();
1019
+ this.id = l, this.logger = o, this.clock = a, this.parent = s, this.options = i, this.scheduler = new Ct({ deferEvents: this.options.deferEvents }), this.sessionId = Et.bookId();
1020
1020
  }
1021
1021
  return Object.defineProperty(e.prototype, "initialState", {
1022
1022
  get: function() {
1023
1023
  var e = this;
1024
- return this._initialState ? this._initialState : $e(this, function() {
1024
+ return this._initialState ? this._initialState : Qe(this, function() {
1025
1025
  return e._initialState = e.machine.initialState, e._initialState;
1026
1026
  });
1027
1027
  },
@@ -1095,7 +1095,7 @@ Event: ${JSON.stringify(n.data)}`);
1095
1095
  if (o) throw o.error;
1096
1096
  }
1097
1097
  }
1098
- var b = gt(e.configuration || [], this.machine);
1098
+ var b = ht(e.configuration || [], this.machine);
1099
1099
  if (this.state.configuration && b) {
1100
1100
  var x = e.configuration.find(function(e) {
1101
1101
  return e.type === "final" && e.parent === u.machine;
@@ -1103,7 +1103,7 @@ Event: ${JSON.stringify(n.data)}`);
1103
1103
  try {
1104
1104
  for (var C = m(this.doneListeners), w = C.next(); !w.done; w = C.next()) {
1105
1105
  var p = w.value;
1106
- p(Ke(this.id, S));
1106
+ p(Ge(this.id, S));
1107
1107
  }
1108
1108
  } catch (e) {
1109
1109
  c = { error: e };
@@ -1117,12 +1117,12 @@ Event: ${JSON.stringify(n.data)}`);
1117
1117
  this.stop();
1118
1118
  }
1119
1119
  }, e.prototype.onTransition = function(e) {
1120
- return this.listeners.add(e), this.status === J.Running && e(this.state, this.state.event), this;
1120
+ return this.listeners.add(e), this.status === Y.Running && e(this.state, this.state.event), this;
1121
1121
  }, e.prototype.subscribe = function(e, t, n) {
1122
1122
  var r = this;
1123
1123
  if (!e) return { unsubscribe: function() {} };
1124
1124
  var i, a = n;
1125
- return typeof e == "function" ? i = e : (i = e.next.bind(e), a = e.complete.bind(e)), this.listeners.add(i), this.status !== J.NotStarted && i(this.state), a && (this.status === J.Stopped ? a() : this.onDone(a)), { unsubscribe: function() {
1125
+ return typeof e == "function" ? i = e : (i = e.next.bind(e), a = e.complete.bind(e)), this.listeners.add(i), this.status !== Y.NotStarted && i(this.state), a && (this.status === Y.Stopped ? a() : this.onDone(a)), { unsubscribe: function() {
1126
1126
  i && r.listeners.delete(i), a && r.doneListeners.delete(a);
1127
1127
  } };
1128
1128
  }, e.prototype.onEvent = function(e) {
@@ -1139,13 +1139,13 @@ Event: ${JSON.stringify(n.data)}`);
1139
1139
  return this.listeners.delete(e), this.eventListeners.delete(e), this.sendListeners.delete(e), this.stopListeners.delete(e), this.doneListeners.delete(e), this.contextListeners.delete(e), this;
1140
1140
  }, e.prototype.start = function(e) {
1141
1141
  var t = this;
1142
- if (this.status === J.Running) return this;
1143
- this.machine._init(), Dt.register(this.sessionId, this), this.initialized = !0, this.status = J.Running;
1144
- var n = e === void 0 ? this.initialState : $e(this, function() {
1145
- return bt(e) ? t.machine.resolveState(e) : t.machine.resolveState(St.from(e, t.machine.context));
1142
+ if (this.status === Y.Running) return this;
1143
+ this.machine._init(), Et.register(this.sessionId, this), this.initialized = !0, this.status = Y.Running;
1144
+ var n = e === void 0 ? this.initialState : Qe(this, function() {
1145
+ return yt(e) ? t.machine.resolveState(e) : t.machine.resolveState(xt.from(e, t.machine.context));
1146
1146
  });
1147
1147
  return this.options.devTools && this.attachDev(), this.scheduler.initialize(function() {
1148
- t.update(n, Oe);
1148
+ t.update(n, De);
1149
1149
  }), this;
1150
1150
  }, e.prototype.stop = function() {
1151
1151
  var e, t, n, r, i, a, o, s, c, l, u = this;
@@ -1241,17 +1241,17 @@ Event: ${JSON.stringify(n.data)}`);
1241
1241
  if (c) throw c.error;
1242
1242
  }
1243
1243
  }
1244
- return this.scheduler.clear(), this.scheduler = new wt({ deferEvents: this.options.deferEvents }), this.initialized = !1, this.status = J.Stopped, this._initialState = void 0, Dt.free(this.sessionId), this;
1244
+ return this.scheduler.clear(), this.scheduler = new Ct({ deferEvents: this.options.deferEvents }), this.initialized = !1, this.status = Y.Stopped, this._initialState = void 0, Et.free(this.sessionId), this;
1245
1245
  }, e.prototype.batch = function(e) {
1246
1246
  var t = this;
1247
- if (!(this.status === J.NotStarted && this.options.deferEvents) && this.status !== J.Running) throw Error(`${e.length} event(s) were sent to uninitialized service "${this.machine.id}". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.`);
1247
+ if (!(this.status === Y.NotStarted && this.options.deferEvents) && this.status !== Y.Running) throw Error(`${e.length} event(s) were sent to uninitialized service "${this.machine.id}". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.`);
1248
1248
  this.scheduler.schedule(function() {
1249
1249
  var n, r, i = t.state, a = !1, o = [], s = function(e) {
1250
- var n = q(e);
1251
- t.forward(n), i = $e(t, function() {
1250
+ var n = J(e);
1251
+ t.forward(n), i = Qe(t, function() {
1252
1252
  return t.machine.transition(i, n);
1253
1253
  }), o.push.apply(o, g([], h(i.actions.map(function(e) {
1254
- return xt(e, i);
1254
+ return bt(e, i);
1255
1255
  })), !1)), a ||= !!i.changed;
1256
1256
  };
1257
1257
  try {
@@ -1268,16 +1268,16 @@ Event: ${JSON.stringify(n.data)}`);
1268
1268
  if (n) throw n.error;
1269
1269
  }
1270
1270
  }
1271
- i.changed = a, i.actions = o, t.update(i, q(e[e.length - 1]));
1271
+ i.changed = a, i.actions = o, t.update(i, J(e[e.length - 1]));
1272
1272
  });
1273
1273
  }, e.prototype.sender = function(e) {
1274
1274
  return this.send.bind(this, e);
1275
1275
  }, e.prototype.nextState = function(e) {
1276
- var t = this, n = q(e);
1276
+ var t = this, n = J(e);
1277
1277
  if (n.name.indexOf(k) === 0 && !this.state.nextEvents.some(function(e) {
1278
1278
  return e.indexOf(k) === 0;
1279
1279
  })) throw n.data.data;
1280
- return $e(this, function() {
1280
+ return Qe(this, function() {
1281
1281
  return t.machine.transition(t.state, n);
1282
1282
  });
1283
1283
  }, e.prototype.forward = function(e) {
@@ -1306,7 +1306,7 @@ Event: ${JSON.stringify(n.data)}`);
1306
1306
  this.clock.clearTimeout(this.delayedEventsMap[e]), delete this.delayedEventsMap[e];
1307
1307
  }, e.prototype.exec = function(e, t, n) {
1308
1308
  n === void 0 && (n = this.machine.options.actions);
1309
- var r = t.context, i = t._event, a = e.exec || ke(e.type, n), o = W(a) ? a : a ? a.exec : e.exec;
1309
+ var r = t.context, i = t._event, a = e.exec || Oe(e.type, n), o = W(a) ? a : a ? a.exec : e.exec;
1310
1310
  if (o) try {
1311
1311
  return o(r, i.data, {
1312
1312
  action: e,
@@ -1331,11 +1331,11 @@ Event: ${JSON.stringify(n.data)}`);
1331
1331
  this.cancel(e.sendId);
1332
1332
  break;
1333
1333
  case y:
1334
- if (this.status !== J.Running) return;
1334
+ if (this.status !== Y.Running) return;
1335
1335
  var c = e.activity;
1336
1336
  if (!this.state.activities[c.id || c.type]) break;
1337
1337
  if (c.type === _.Invoke) {
1338
- var l = Te(c.src), u = this.machine.options.services ? this.machine.options.services[l.type] : void 0, d = c.id, f = c.data, p = "autoForward" in c ? c.autoForward : !!c.forward;
1338
+ var l = we(c.src), u = this.machine.options.services ? this.machine.options.services[l.type] : void 0, d = c.id, f = c.data, p = "autoForward" in c ? c.autoForward : !!c.forward;
1339
1339
  if (!u) return;
1340
1340
  var m = f ? se(f, r, i) : void 0;
1341
1341
  if (typeof u == "string") return;
@@ -1346,7 +1346,7 @@ Event: ${JSON.stringify(n.data)}`);
1346
1346
  }) : u;
1347
1347
  if (!h) return;
1348
1348
  var g = void 0;
1349
- ye(h) && (h = m ? h.withContext(m) : h, g = { autoForward: p }), this.spawn(h, d, g);
1349
+ ve(h) && (h = m ? h.withContext(m) : h, g = { autoForward: p }), this.spawn(h, d, g);
1350
1350
  } else this.spawnActivity(c);
1351
1351
  break;
1352
1352
  case b:
@@ -1367,9 +1367,9 @@ Event: ${JSON.stringify(n.data)}`);
1367
1367
  }, e.prototype.spawn = function(e, t, n) {
1368
1368
  if (le(e)) return this.spawnPromise(Promise.resolve(e), t);
1369
1369
  if (W(e)) return this.spawnCallback(e, t);
1370
- if (at(e)) return this.spawnActor(e, t);
1370
+ if (it(e)) return this.spawnActor(e, t);
1371
1371
  if (_e(e)) return this.spawnObservable(e, t);
1372
- if (ye(e)) return this.spawnMachine(e, f(f({}, n), { id: t }));
1372
+ if (ve(e)) return this.spawnMachine(e, f(f({}, n), { id: t }));
1373
1373
  if (ue(e)) return this.spawnBehavior(e, t);
1374
1374
  throw Error(`Unable to spawn entity "${t}" of type "${typeof e}".`);
1375
1375
  }, e.prototype.spawnMachine = function(t, n) {
@@ -1378,7 +1378,7 @@ Event: ${JSON.stringify(n.data)}`);
1378
1378
  var i = new e(t, f(f({}, this.options), {
1379
1379
  parent: this,
1380
1380
  id: n.id || t.id
1381
- })), a = f(f({}, Mt), n);
1381
+ })), a = f(f({}, jt), n);
1382
1382
  a.sync && i.onTransition(function(e) {
1383
1383
  r.send(j, {
1384
1384
  state: e,
@@ -1387,10 +1387,10 @@ Event: ${JSON.stringify(n.data)}`);
1387
1387
  });
1388
1388
  var o = i;
1389
1389
  return this.children.set(i.id, o), a.autoForward && this.forwardTo.add(i.id), i.onDone(function(e) {
1390
- r.removeChild(i.id), r.send(q(e, { origin: i.id }));
1390
+ r.removeChild(i.id), r.send(J(e, { origin: i.id }));
1391
1391
  }).start(), o;
1392
1392
  }, e.prototype.spawnBehavior = function(e, t) {
1393
- var n = jt(e, {
1393
+ var n = At(e, {
1394
1394
  id: t,
1395
1395
  parent: this
1396
1396
  });
@@ -1398,13 +1398,13 @@ Event: ${JSON.stringify(n.data)}`);
1398
1398
  }, e.prototype.spawnPromise = function(e, t) {
1399
1399
  var n, r = this, i = !1, a;
1400
1400
  e.then(function(e) {
1401
- i || (a = e, r.removeChild(t), r.send(q(Ke(t, e), { origin: t })));
1401
+ i || (a = e, r.removeChild(t), r.send(J(Ge(t, e), { origin: t })));
1402
1402
  }, function(e) {
1403
1403
  if (!i) {
1404
1404
  r.removeChild(t);
1405
- var n = qe(t, e);
1405
+ var n = Ke(t, e);
1406
1406
  try {
1407
- r.send(q(n, { origin: t }));
1407
+ r.send(J(n, { origin: t }));
1408
1408
  } catch {
1409
1409
  r.devTools && r.devTools.send(n, r.state), r.machine.strict && r.stop();
1410
1410
  }
@@ -1414,7 +1414,7 @@ Event: ${JSON.stringify(n.data)}`);
1414
1414
  id: t,
1415
1415
  send: function() {},
1416
1416
  subscribe: function(t, n, r) {
1417
- var i = Ee(t, n, r), a = !1;
1417
+ var i = Te(t, n, r), a = !1;
1418
1418
  return e.then(function(e) {
1419
1419
  a || (i.next(e), !a && i.complete());
1420
1420
  }, function(e) {
@@ -1432,7 +1432,7 @@ Event: ${JSON.stringify(n.data)}`);
1432
1432
  getSnapshot: function() {
1433
1433
  return a;
1434
1434
  }
1435
- }, n[ve] = function() {
1435
+ }, n[K] = function() {
1436
1436
  return this;
1437
1437
  }, n);
1438
1438
  return this.children.set(t, o), o;
@@ -1440,14 +1440,14 @@ Event: ${JSON.stringify(n.data)}`);
1440
1440
  var n, r = this, i = !1, a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s, c = function(e) {
1441
1441
  s = e, o.forEach(function(t) {
1442
1442
  return t(e);
1443
- }), !i && r.send(q(e, { origin: t }));
1443
+ }), !i && r.send(J(e, { origin: t }));
1444
1444
  }, l;
1445
1445
  try {
1446
1446
  l = e(c, function(e) {
1447
1447
  a.add(e);
1448
1448
  });
1449
1449
  } catch (e) {
1450
- this.send(qe(t, e));
1450
+ this.send(Ke(t, e));
1451
1451
  }
1452
1452
  if (le(l)) return this.spawnPromise(l, t);
1453
1453
  var u = (n = {
@@ -1458,7 +1458,7 @@ Event: ${JSON.stringify(n.data)}`);
1458
1458
  });
1459
1459
  },
1460
1460
  subscribe: function(e) {
1461
- var t = Ee(e);
1461
+ var t = Te(e);
1462
1462
  return o.add(t.next), { unsubscribe: function() {
1463
1463
  o.delete(t.next);
1464
1464
  } };
@@ -1472,17 +1472,17 @@ Event: ${JSON.stringify(n.data)}`);
1472
1472
  getSnapshot: function() {
1473
1473
  return s;
1474
1474
  }
1475
- }, n[ve] = function() {
1475
+ }, n[K] = function() {
1476
1476
  return this;
1477
1477
  }, n);
1478
1478
  return this.children.set(t, u), u;
1479
1479
  }, e.prototype.spawnObservable = function(e, t) {
1480
1480
  var n, r = this, i, a = e.subscribe(function(e) {
1481
- i = e, r.send(q(e, { origin: t }));
1481
+ i = e, r.send(J(e, { origin: t }));
1482
1482
  }, function(e) {
1483
- r.removeChild(t), r.send(q(qe(t, e), { origin: t }));
1483
+ r.removeChild(t), r.send(J(Ke(t, e), { origin: t }));
1484
1484
  }, function() {
1485
- r.removeChild(t), r.send(q(Ke(t), { origin: t }));
1485
+ r.removeChild(t), r.send(J(Ge(t), { origin: t }));
1486
1486
  }), o = (n = {
1487
1487
  id: t,
1488
1488
  send: function() {},
@@ -1498,7 +1498,7 @@ Event: ${JSON.stringify(n.data)}`);
1498
1498
  toJSON: function() {
1499
1499
  return { id: t };
1500
1500
  }
1501
- }, n[ve] = function() {
1501
+ }, n[K] = function() {
1502
1502
  return this;
1503
1503
  }, n);
1504
1504
  return this.children.set(t, o), o;
@@ -1523,11 +1523,11 @@ Event: ${JSON.stringify(n.data)}`);
1523
1523
  toJSON: function() {
1524
1524
  return { id: e };
1525
1525
  }
1526
- }, n[ve] = function() {
1526
+ }, n[K] = function() {
1527
1527
  return this;
1528
1528
  }, n));
1529
1529
  }, e.prototype.attachDev = function() {
1530
- var e = Ot();
1530
+ var e = Dt();
1531
1531
  if (this.options.devTools && e) {
1532
1532
  if (e.__REDUX_DEVTOOLS_EXTENSION__) {
1533
1533
  var t = typeof this.options.devTools == "object" ? this.options.devTools : void 0;
@@ -1546,14 +1546,14 @@ Event: ${JSON.stringify(n.data)}`);
1546
1546
  skip: !1
1547
1547
  }, t ? t.features : void 0) }), this.machine), this.devTools.init(this.state);
1548
1548
  }
1549
- At(this);
1549
+ kt(this);
1550
1550
  }
1551
1551
  }, e.prototype.toJSON = function() {
1552
1552
  return { id: this.id };
1553
- }, e.prototype[ve] = function() {
1553
+ }, e.prototype[K] = function() {
1554
1554
  return this;
1555
1555
  }, e.prototype.getSnapshot = function() {
1556
- return this.status === J.NotStarted ? this.initialState : this._state;
1556
+ return this.status === Y.NotStarted ? this.initialState : this._state;
1557
1557
  }, e.defaultOptions = {
1558
1558
  execute: !0,
1559
1559
  deferEvents: !0,
@@ -1567,20 +1567,20 @@ Event: ${JSON.stringify(n.data)}`);
1567
1567
  },
1568
1568
  logger: /* @__PURE__ */ console.log.bind(console),
1569
1569
  devTools: !1
1570
- }, e.interpret = It, e;
1571
- }(), Pt = function(e) {
1572
- return G(e) ? f(f({}, Mt), { name: e }) : f(f(f({}, Mt), { name: be() }), e);
1570
+ }, e.interpret = Ft, e;
1571
+ }(), Nt = function(e) {
1572
+ return G(e) ? f(f({}, jt), { name: e }) : f(f(f({}, jt), { name: ye() }), e);
1573
1573
  };
1574
- function Ft(e, t) {
1575
- var n = Pt(t);
1576
- return et(function(t) {
1577
- return t ? t.spawn(e, n.name, n) : rt(e, n.name);
1574
+ function Pt(e, t) {
1575
+ var n = Nt(t);
1576
+ return $e(function(t) {
1577
+ return t ? t.spawn(e, n.name, n) : nt(e, n.name);
1578
1578
  });
1579
1579
  }
1580
- function It(e, t) {
1581
- return new Nt(e, t);
1580
+ function Ft(e, t) {
1581
+ return new Mt(e, t);
1582
1582
  }
1583
- function Lt(e) {
1583
+ function It(e) {
1584
1584
  if (typeof e == "string") {
1585
1585
  var t = { type: e };
1586
1586
  return t.toString = function() {
@@ -1589,17 +1589,17 @@ function Lt(e) {
1589
1589
  }
1590
1590
  return e;
1591
1591
  }
1592
- function Rt(e) {
1592
+ function Lt(e) {
1593
1593
  return f(f({ type: O }, e), { toJSON: function() {
1594
1594
  return e.onDone, e.onError, f(f({}, p(e, ["onDone", "onError"])), {
1595
1595
  type: O,
1596
- src: Lt(e.src)
1596
+ src: It(e.src)
1597
1597
  });
1598
1598
  } });
1599
1599
  }
1600
- var zt = "", Bt = "#", Vt = "*", Ht = {}, Ut = function(e) {
1601
- return e[0] === Bt;
1602
- }, Wt = function() {
1600
+ var Rt = "", zt = "#", Bt = "*", Vt = {}, Ht = function(e) {
1601
+ return e[0] === zt;
1602
+ }, Ut = function() {
1603
1603
  return {
1604
1604
  actions: {},
1605
1605
  guards: {},
@@ -1607,7 +1607,7 @@ var zt = "", Bt = "#", Vt = "*", Ht = {}, Ut = function(e) {
1607
1607
  activities: {},
1608
1608
  delays: {}
1609
1609
  };
1610
- }, Gt = /* @__PURE__ */ function() {
1610
+ }, Wt = /* @__PURE__ */ function() {
1611
1611
  function e(t, n, r, i) {
1612
1612
  var a = this;
1613
1613
  r === void 0 && (r = "context" in t ? t.context : void 0), this.config = t, this._context = r, this.order = -1, this.__xstatenode = !0, this.__cache = {
@@ -1619,19 +1619,19 @@ var zt = "", Bt = "#", Vt = "*", Ht = {}, Ut = function(e) {
1619
1619
  transitions: void 0,
1620
1620
  candidates: {},
1621
1621
  delayedTransitions: void 0
1622
- }, this.idMap = {}, this.tags = [], this.options = Object.assign(Wt(), n), this.parent = i?.parent, this.key = this.config.key || i?.key || this.config.id || "(machine)", this.machine = this.parent ? this.parent.machine : this, this.path = this.parent ? this.parent.path.concat(this.key) : [], this.delimiter = this.config.delimiter || (this.parent ? this.parent.delimiter : "."), this.id = this.config.id || g([this.machine.key], h(this.path), !1).join(this.delimiter), this.version = this.parent ? this.parent.version : this.config.version, this.type = this.config.type || (this.config.parallel ? "parallel" : this.config.states && Object.keys(this.config.states).length ? "compound" : this.config.history ? "history" : "atomic"), this.schema = this.parent ? this.machine.schema : this.config.schema ?? {}, this.description = this.config.description, this.initial = this.config.initial, this.states = this.config.states ? ne(this.config.states, function(t, n) {
1622
+ }, this.idMap = {}, this.tags = [], this.options = Object.assign(Ut(), n), this.parent = i?.parent, this.key = this.config.key || i?.key || this.config.id || "(machine)", this.machine = this.parent ? this.parent.machine : this, this.path = this.parent ? this.parent.path.concat(this.key) : [], this.delimiter = this.config.delimiter || (this.parent ? this.parent.delimiter : "."), this.id = this.config.id || g([this.machine.key], h(this.path), !1).join(this.delimiter), this.version = this.parent ? this.parent.version : this.config.version, this.type = this.config.type || (this.config.parallel ? "parallel" : this.config.states && Object.keys(this.config.states).length ? "compound" : this.config.history ? "history" : "atomic"), this.schema = this.parent ? this.machine.schema : this.config.schema ?? {}, this.description = this.config.description, this.initial = this.config.initial, this.states = this.config.states ? ne(this.config.states, function(t, n) {
1623
1623
  var r, i = new e(t, {}, void 0, {
1624
1624
  parent: a,
1625
1625
  key: n
1626
1626
  });
1627
1627
  return Object.assign(a.idMap, f((r = {}, r[i.id] = i, r), i.idMap)), i;
1628
- }) : Ht;
1628
+ }) : Vt;
1629
1629
  var o = 0;
1630
1630
  function s(e) {
1631
1631
  var t, n;
1632
1632
  e.order = o++;
1633
1633
  try {
1634
- for (var r = m(ct(e)), i = r.next(); !i.done; i = r.next()) {
1634
+ for (var r = m(st(e)), i = r.next(); !i.done; i = r.next()) {
1635
1635
  var a = i.value;
1636
1636
  s(a);
1637
1637
  }
@@ -1646,38 +1646,38 @@ var zt = "", Bt = "#", Vt = "*", Ht = {}, Ut = function(e) {
1646
1646
  }
1647
1647
  }
1648
1648
  s(this), this.history = this.config.history === !0 ? "shallow" : this.config.history || !1, this._transient = !!this.config.always || (this.config.on ? Array.isArray(this.config.on) ? this.config.on.some(function(e) {
1649
- return e.event === zt;
1650
- }) : zt in this.config.on : !1), this.strict = !!this.config.strict, this.onEntry = U(this.config.entry || this.config.onEntry).map(function(e) {
1651
- return Ae(e);
1649
+ return e.event === Rt;
1650
+ }) : Rt in this.config.on : !1), this.strict = !!this.config.strict, this.onEntry = U(this.config.entry || this.config.onEntry).map(function(e) {
1651
+ return ke(e);
1652
1652
  }), this.onExit = U(this.config.exit || this.config.onExit).map(function(e) {
1653
- return Ae(e);
1653
+ return ke(e);
1654
1654
  }), this.meta = this.config.meta, this.doneData = this.type === "final" ? this.config.data : void 0, this.invoke = U(this.config.invoke).map(function(e, t) {
1655
1655
  var n, r;
1656
- if (ye(e)) {
1657
- var i = De(a.id, t);
1658
- return a.machine.options.services = f((n = {}, n[i] = e, n), a.machine.options.services), Rt({
1656
+ if (ve(e)) {
1657
+ var i = Ee(a.id, t);
1658
+ return a.machine.options.services = f((n = {}, n[i] = e, n), a.machine.options.services), Lt({
1659
1659
  src: i,
1660
1660
  id: i
1661
1661
  });
1662
1662
  } else if (G(e.src)) {
1663
- var i = e.id || De(a.id, t);
1664
- return Rt(f(f({}, e), {
1663
+ var i = e.id || Ee(a.id, t);
1664
+ return Lt(f(f({}, e), {
1665
1665
  id: i,
1666
1666
  src: e.src
1667
1667
  }));
1668
- } else if (ye(e.src) || W(e.src)) {
1669
- var i = e.id || De(a.id, t);
1670
- return a.machine.options.services = f((r = {}, r[i] = e.src, r), a.machine.options.services), Rt(f(f({ id: i }, e), { src: i }));
1668
+ } else if (ve(e.src) || W(e.src)) {
1669
+ var i = e.id || Ee(a.id, t);
1670
+ return a.machine.options.services = f((r = {}, r[i] = e.src, r), a.machine.options.services), Lt(f(f({ id: i }, e), { src: i }));
1671
1671
  } else {
1672
1672
  var o = e.src;
1673
- return Rt(f(f({ id: De(a.id, t) }, e), { src: o }));
1673
+ return Lt(f(f({ id: Ee(a.id, t) }, e), { src: o }));
1674
1674
  }
1675
1675
  }), this.activities = U(this.config.activities).concat(this.invoke).map(function(e) {
1676
- return Me(e);
1676
+ return je(e);
1677
1677
  }), this.transition = this.transition.bind(this), this.tags = U(this.config.tags);
1678
1678
  }
1679
1679
  return e.prototype._init = function() {
1680
- this.__cache.transitions || lt(this).forEach(function(e) {
1680
+ this.__cache.transitions || ct(this).forEach(function(e) {
1681
1681
  return e.on;
1682
1682
  });
1683
1683
  }, e.prototype.withConfig = function(t, n) {
@@ -1751,17 +1751,17 @@ var zt = "", Bt = "#", Vt = "*", Ht = {}, Ut = function(e) {
1751
1751
  configurable: !0
1752
1752
  }), e.prototype.getCandidates = function(e) {
1753
1753
  if (this.__cache.candidates[e]) return this.__cache.candidates[e];
1754
- var t = e === zt, n = this.transitions.filter(function(n) {
1754
+ var t = e === Rt, n = this.transitions.filter(function(n) {
1755
1755
  var r = n.eventType === e;
1756
- return t ? r : r || n.eventType === Vt;
1756
+ return t ? r : r || n.eventType === Bt;
1757
1757
  });
1758
1758
  return this.__cache.candidates[e] = n, n;
1759
1759
  }, e.prototype.getDelayedTransitions = function() {
1760
1760
  var e = this, t = this.config.after;
1761
1761
  if (!t) return [];
1762
1762
  var n = function(t, n) {
1763
- var r = We(W(t) ? `${e.id}:delay[${n}]` : t, e.id);
1764
- return e.onEntry.push(Fe(r, { delay: t })), e.onExit.push(ze(r)), r;
1763
+ var r = Ue(W(t) ? `${e.id}:delay[${n}]` : t, e.id);
1764
+ return e.onEntry.push(Pe(r, { delay: t })), e.onExit.push(Re(r)), r;
1765
1765
  };
1766
1766
  return (he(t) ? t.map(function(e, t) {
1767
1767
  var r = n(e.delay, t);
@@ -1781,7 +1781,7 @@ var zt = "", Bt = "#", Vt = "*", Ht = {}, Ut = function(e) {
1781
1781
  }, e.prototype.getStateNodes = function(e) {
1782
1782
  var t, n = this;
1783
1783
  if (!e) return [];
1784
- var r = e instanceof St ? e.value : B(e, this.delimiter);
1784
+ var r = e instanceof xt ? e.value : B(e, this.delimiter);
1785
1785
  if (G(r)) {
1786
1786
  var i = this.getStateNode(r).initial;
1787
1787
  return i === void 0 ? [this, this.states[r]] : this.getStateNodes((t = {}, t[r] = i, t));
@@ -1794,12 +1794,12 @@ var zt = "", Bt = "#", Vt = "*", Ht = {}, Ut = function(e) {
1794
1794
  var t = L(e);
1795
1795
  return this.events.includes(t);
1796
1796
  }, e.prototype.resolveState = function(e) {
1797
- var t = e instanceof St ? e : St.create(e), n = Array.from(ut([], this.getStateNodes(t.value)));
1798
- return new St(f(f({}, t), {
1797
+ var t = e instanceof xt ? e : xt.create(e), n = Array.from(lt([], this.getStateNodes(t.value)));
1798
+ return new xt(f(f({}, t), {
1799
1799
  value: this.resolve(t.value),
1800
1800
  configuration: n,
1801
- done: gt(n, this),
1802
- tags: vt(n),
1801
+ done: ht(n, this),
1802
+ tags: _t(n),
1803
1803
  machine: this.machine
1804
1804
  }));
1805
1805
  }, e.prototype.transitionLeafNode = function(e, t, n) {
@@ -1855,14 +1855,14 @@ var zt = "", Bt = "#", Vt = "*", Ht = {}, Ut = function(e) {
1855
1855
  }, e.prototype._transition = function(e, t, n) {
1856
1856
  return G(e) ? this.transitionLeafNode(e, t, n) : Object.keys(e).length === 1 ? this.transitionCompoundNode(e, t, n) : this.transitionParallelNode(e, t, n);
1857
1857
  }, e.prototype.getTransitionData = function(e, t) {
1858
- return this._transition(e.value, e, q(t));
1858
+ return this._transition(e.value, e, J(t));
1859
1859
  }, e.prototype.next = function(e, t) {
1860
1860
  var n, r, i = this, a = t.name, o = [], s = [], c;
1861
1861
  try {
1862
1862
  for (var l = m(this.getCandidates(a)), u = l.next(); !u.done; u = l.next()) {
1863
- var d = u.value, f = d.cond, p = d.in, _ = e.context, v = p ? G(p) && Ut(p) ? e.matches(B(this.getStateNodeById(p).path, this.delimiter)) : ee(B(p, this.delimiter), re(this.path.slice(0, -2))(e.value)) : !0, y = !1;
1863
+ var d = u.value, f = d.cond, p = d.in, _ = e.context, v = p ? G(p) && Ht(p) ? e.matches(B(this.getStateNodeById(p).path, this.delimiter)) : I(B(p, this.delimiter), re(this.path.slice(0, -2))(e.value)) : !0, y = !1;
1864
1864
  try {
1865
- y = !f || we(this.machine, f, _, t, e);
1865
+ y = !f || Ce(this.machine, f, _, t, e);
1866
1866
  } catch (e) {
1867
1867
  throw Error(`Unable to evaluate guard '${f.name || f.type}' in transition for event '${a}' in state node '${this.id}':
1868
1868
  ${e.message}`);
@@ -1916,11 +1916,11 @@ ${e.message}`);
1916
1916
  }
1917
1917
  return !0;
1918
1918
  }, e.prototype.getActions = function(e, t, n, r) {
1919
- var i, a, o, s, c = ut([], r ? this.getStateNodes(r.value) : [this]), l = e.configuration.length ? ut(c, e.configuration) : c;
1919
+ var i, a, o, s, c = lt([], r ? this.getStateNodes(r.value) : [this]), l = e.configuration.length ? lt(c, e.configuration) : c;
1920
1920
  try {
1921
1921
  for (var u = m(l), d = u.next(); !d.done; d = u.next()) {
1922
1922
  var f = d.value;
1923
- mt(c, f) || e.entrySet.push(f);
1923
+ pt(c, f) || e.entrySet.push(f);
1924
1924
  }
1925
1925
  } catch (e) {
1926
1926
  i = { error: e };
@@ -1934,7 +1934,7 @@ ${e.message}`);
1934
1934
  try {
1935
1935
  for (var p = m(c), _ = p.next(); !_.done; _ = p.next()) {
1936
1936
  var f = _.value;
1937
- (!mt(l, f) || mt(e.exitSet, f.parent)) && e.exitSet.push(f);
1937
+ (!pt(l, f) || pt(e.exitSet, f.parent)) && e.exitSet.push(f);
1938
1938
  }
1939
1939
  } catch (e) {
1940
1940
  o = { error: e };
@@ -1950,11 +1950,11 @@ ${e.message}`);
1950
1950
  if (r.type !== "final") return i;
1951
1951
  var a = r.parent;
1952
1952
  if (!a.parent) return i;
1953
- i.push(Ge(r.id, r.doneData), Ge(a.id, r.doneData ? se(r.doneData, t, n) : void 0));
1953
+ i.push(We(r.id, r.doneData), We(a.id, r.doneData ? se(r.doneData, t, n) : void 0));
1954
1954
  var o = a.parent;
1955
- return o.type === "parallel" && ct(o).every(function(t) {
1956
- return gt(e.configuration, t);
1957
- }) && i.push(Ge(o.id)), i;
1955
+ return o.type === "parallel" && st(o).every(function(t) {
1956
+ return ht(e.configuration, t);
1957
+ }) && i.push(We(o.id)), i;
1958
1958
  }));
1959
1959
  e.exitSet.sort(function(e, t) {
1960
1960
  return t.order - e.order;
@@ -1963,21 +1963,21 @@ ${e.message}`);
1963
1963
  });
1964
1964
  var y = new Set(e.entrySet), b = new Set(e.exitSet), x = h([H(Array.from(y).map(function(e) {
1965
1965
  return g(g([], h(e.activities.map(function(e) {
1966
- return Be(e);
1966
+ return ze(e);
1967
1967
  })), !1), h(e.onEntry), !1);
1968
- })).concat(v.map(Ne)), H(Array.from(b).map(function(e) {
1968
+ })).concat(v.map(Me)), H(Array.from(b).map(function(e) {
1969
1969
  return g(g([], h(e.onExit), !1), h(e.activities.map(function(e) {
1970
- return Ve(e);
1970
+ return Be(e);
1971
1971
  })), !1);
1972
1972
  }))], 2), S = x[0], C = x[1];
1973
- return je(C.concat(e.actions).concat(S), this.machine.options.actions);
1973
+ return Ae(C.concat(e.actions).concat(S), this.machine.options.actions);
1974
1974
  }, e.prototype.transition = function(e, t, n) {
1975
1975
  e === void 0 && (e = this.initialState);
1976
- var r = q(t), i;
1977
- if (e instanceof St) i = n === void 0 ? e : this.resolveState(St.from(e, n));
1976
+ var r = J(t), i;
1977
+ if (e instanceof xt) i = n === void 0 ? e : this.resolveState(xt.from(e, n));
1978
1978
  else {
1979
1979
  var a = G(e) ? this.resolve(te(this.getResolvedPath(e))) : this.resolve(e), o = n ?? this.machine.context;
1980
- i = this.resolveState(St.from(a, o));
1980
+ i = this.resolveState(xt.from(a, o));
1981
1981
  }
1982
1982
  if (this.strict && !this.events.includes(r.name) && !ce(r.name)) throw Error(`Machine '${this.id}' does not accept event '${r.name}'`);
1983
1983
  var s = this._transition(i.value, i, r) || {
@@ -1987,15 +1987,15 @@ ${e.message}`);
1987
1987
  exitSet: [],
1988
1988
  source: i,
1989
1989
  actions: []
1990
- }, c = ut([], this.getStateNodes(i.value));
1991
- return s.configuration = g([], h(s.configuration.length ? ut(c, s.configuration) : c), !1), this.resolveTransition(s, i, i.context, r);
1990
+ }, c = lt([], this.getStateNodes(i.value));
1991
+ return s.configuration = g([], h(s.configuration.length ? lt(c, s.configuration) : c), !1), this.resolveTransition(s, i, i.context, r);
1992
1992
  }, e.prototype.resolveRaisedTransition = function(e, t, n) {
1993
1993
  var r, i = e.actions;
1994
1994
  return e = this.transition(e, t), e._event = n, e.event = n.data, (r = e.actions).unshift.apply(r, g([], h(i), !1)), e;
1995
1995
  }, e.prototype.resolveTransition = function(e, t, n, r) {
1996
1996
  var i, a, o = this;
1997
- r === void 0 && (r = Oe);
1998
- var s = e.configuration, c = !t || e.transitions.length > 0, l = c ? pt(this.machine, s) : void 0, u = t ? t.historyValue ? t.historyValue : e.source ? this.machine.historyValue(t.value) : void 0 : void 0, d = this.getActions(e, n, r, t), p = t ? f({}, t.activities) : {};
1997
+ r === void 0 && (r = De);
1998
+ var s = e.configuration, c = !t || e.transitions.length > 0, l = c ? ft(this.machine, s) : void 0, u = t ? t.historyValue ? t.historyValue : e.source ? this.machine.historyValue(t.value) : void 0 : void 0, d = this.getActions(e, n, r, t), p = t ? f({}, t.activities) : {};
1999
1999
  try {
2000
2000
  for (var g = m(d), _ = g.next(); !_.done; _ = g.next()) {
2001
2001
  var C = _.value;
@@ -2010,13 +2010,13 @@ ${e.message}`);
2010
2010
  if (i) throw i.error;
2011
2011
  }
2012
2012
  }
2013
- var T = h(Ze(this, t, n, r, d, this.machine.config.preserveActionOrder), 2), E = T[0], D = T[1], k = h(de(E, function(e) {
2013
+ var T = h(Xe(this, t, n, r, d, this.machine.config.preserveActionOrder), 2), E = T[0], D = T[1], k = h(de(E, function(e) {
2014
2014
  return e.type === x || e.type === S && e.to === v.Internal;
2015
2015
  }), 2), A = k[0], M = k[1], N = E.filter(function(e) {
2016
2016
  return e.type === y && e.activity?.type === O;
2017
2017
  }).reduce(function(e, t) {
2018
- return e[t.activity.id] = nt(t.activity, o.machine, D, r), e;
2019
- }, t ? f({}, t.children) : {}), P = c ? e.configuration : t ? t.configuration : [], F = gt(P, this), I = new St({
2018
+ return e[t.activity.id] = tt(t.activity, o.machine, D, r), e;
2019
+ }, t ? f({}, t.children) : {}), P = c ? e.configuration : t ? t.configuration : [], ee = ht(P, this), F = new xt({
2020
2020
  value: l || t.value,
2021
2021
  context: D,
2022
2022
  _event: r,
@@ -2029,38 +2029,38 @@ ${e.message}`);
2029
2029
  configuration: P,
2030
2030
  transitions: e.transitions,
2031
2031
  children: N,
2032
- done: F,
2033
- tags: vt(P),
2032
+ done: ee,
2033
+ tags: _t(P),
2034
2034
  machine: this
2035
- }), ee = n !== D;
2036
- I.changed = r.name === j || ee;
2037
- var L = I.history;
2035
+ }), I = n !== D;
2036
+ F.changed = r.name === j || I;
2037
+ var L = F.history;
2038
2038
  L && delete L.history;
2039
- var R = !F && (this._transient || s.some(function(e) {
2039
+ var R = !ee && (this._transient || s.some(function(e) {
2040
2040
  return e._transient;
2041
2041
  }));
2042
- if (!c && (!R || r.name === zt)) return I;
2043
- var z = I;
2044
- if (!F) for (R && (z = this.resolveRaisedTransition(z, { type: w }, r)); A.length;) {
2042
+ if (!c && (!R || r.name === Rt)) return F;
2043
+ var z = F;
2044
+ if (!ee) for (R && (z = this.resolveRaisedTransition(z, { type: w }, r)); A.length;) {
2045
2045
  var B = A.shift();
2046
2046
  z = this.resolveRaisedTransition(z, B._event, r);
2047
2047
  }
2048
- var te = z.changed || (L ? !!z.actions.length || ee || typeof L.value != typeof z.value || !yt(z.value, L.value) : void 0);
2048
+ var te = z.changed || (L ? !!z.actions.length || I || typeof L.value != typeof z.value || !vt(z.value, L.value) : void 0);
2049
2049
  return z.changed = te, z.history = L, z;
2050
2050
  }, e.prototype.getStateNode = function(e) {
2051
- if (Ut(e)) return this.machine.getStateNodeById(e);
2051
+ if (Ht(e)) return this.machine.getStateNodeById(e);
2052
2052
  if (!this.states) throw Error(`Unable to retrieve child state '${e}' from '${this.id}'; no child states exist.`);
2053
2053
  var t = this.states[e];
2054
2054
  if (!t) throw Error(`Child state '${e}' does not exist on '${this.id}'`);
2055
2055
  return t;
2056
2056
  }, e.prototype.getStateNodeById = function(e) {
2057
- var t = Ut(e) ? e.slice(Bt.length) : e;
2057
+ var t = Ht(e) ? e.slice(zt.length) : e;
2058
2058
  if (t === this.id) return this;
2059
2059
  var n = this.machine.idMap[t];
2060
2060
  if (!n) throw Error(`Child state node '#${t}' does not exist on machine '${this.id}'`);
2061
2061
  return n;
2062
2062
  }, e.prototype.getStateNodeByPath = function(e) {
2063
- if (typeof e == "string" && Ut(e)) try {
2063
+ if (typeof e == "string" && Ht(e)) try {
2064
2064
  return this.getStateNodeById(e.slice(1));
2065
2065
  } catch {}
2066
2066
  for (var t = R(e, this.delimiter).slice(), n = this; t.length;) {
@@ -2071,10 +2071,10 @@ ${e.message}`);
2071
2071
  return n;
2072
2072
  }, e.prototype.resolve = function(e) {
2073
2073
  var t, n = this;
2074
- if (!e) return this.initialStateValue || Ht;
2074
+ if (!e) return this.initialStateValue || Vt;
2075
2075
  switch (this.type) {
2076
2076
  case "parallel": return ne(this.initialStateValue, function(t, r) {
2077
- return t ? n.getStateNode(r).resolve(e[r] || t) : Ht;
2077
+ return t ? n.getStateNode(r).resolve(e[r] || t) : Vt;
2078
2078
  });
2079
2079
  case "compound":
2080
2080
  if (G(e)) {
@@ -2082,13 +2082,13 @@ ${e.message}`);
2082
2082
  return r.type === "parallel" || r.type === "compound" ? (t = {}, t[e] = r.initialStateValue, t) : e;
2083
2083
  }
2084
2084
  return Object.keys(e).length ? ne(e, function(e, t) {
2085
- return e ? n.getStateNode(t).resolve(e) : Ht;
2085
+ return e ? n.getStateNode(t).resolve(e) : Vt;
2086
2086
  }) : this.initialStateValue || {};
2087
- default: return e || Ht;
2087
+ default: return e || Vt;
2088
2088
  }
2089
2089
  }, e.prototype.getResolvedPath = function(e) {
2090
- if (Ut(e)) {
2091
- var t = this.machine.idMap[e.slice(Bt.length)];
2090
+ if (Ht(e)) {
2091
+ var t = this.machine.idMap[e.slice(zt.length)];
2092
2092
  if (!t) throw Error(`Unable to find state node '${e}'`);
2093
2093
  return t.path;
2094
2094
  }
@@ -2099,13 +2099,13 @@ ${e.message}`);
2099
2099
  if (this.__cache.initialStateValue) return this.__cache.initialStateValue;
2100
2100
  var t;
2101
2101
  if (this.type === "parallel") t = V(this.states, function(e) {
2102
- return e.initialStateValue || Ht;
2102
+ return e.initialStateValue || Vt;
2103
2103
  }, function(e) {
2104
2104
  return e.type !== "history";
2105
2105
  });
2106
2106
  else if (this.initial !== void 0) {
2107
2107
  if (!this.states[this.initial]) throw Error(`Initial state '${this.initial}' not found on '${this.key}'`);
2108
- t = st(this.states[this.initial]) ? this.initial : (e = {}, e[this.initial] = this.states[this.initial].initialStateValue, e);
2108
+ t = ot(this.states[this.initial]) ? this.initial : (e = {}, e[this.initial] = this.states[this.initial].initialStateValue, e);
2109
2109
  } else t = {};
2110
2110
  return this.__cache.initialStateValue = t, this.__cache.initialStateValue;
2111
2111
  },
@@ -2135,7 +2135,7 @@ ${e.message}`);
2135
2135
  var e;
2136
2136
  if (this.type === "history") {
2137
2137
  var t = this.config;
2138
- e = G(t.target) && Ut(t.target) ? te(this.machine.getStateNodeById(t.target).path.slice(this.path.length - 1)) : t.target;
2138
+ e = G(t.target) && Ht(t.target) ? te(this.machine.getStateNodeById(t.target).path.slice(this.path.length - 1)) : t.target;
2139
2139
  }
2140
2140
  return e;
2141
2141
  },
@@ -2146,7 +2146,7 @@ ${e.message}`);
2146
2146
  }, Object.defineProperty(e.prototype, "initialStateNodes", {
2147
2147
  get: function() {
2148
2148
  var e = this;
2149
- return st(this) || this.type === "compound" && !this.initial ? [this] : H(ae(this.initialStateValue).map(function(t) {
2149
+ return ot(this) || this.type === "compound" && !this.initial ? [this] : H(ae(this.initialStateValue).map(function(t) {
2150
2150
  return e.getFromRelativePath(t);
2151
2151
  }));
2152
2152
  },
@@ -2257,10 +2257,10 @@ ${e.message}`);
2257
2257
  else return t.getStateNodeByPath(r);
2258
2258
  });
2259
2259
  }, e.prototype.formatTransition = function(e) {
2260
- var t = this, n = Ce(e.target), r = "internal" in e ? e.internal : n ? n.some(function(e) {
2260
+ var t = this, n = Se(e.target), r = "internal" in e ? e.internal : n ? n.some(function(e) {
2261
2261
  return G(e) && e[0] === t.delimiter;
2262
2262
  }) : !0, i = this.machine.options.guards, a = this.resolveTarget(n), o = f(f({}, e), {
2263
- actions: je(U(e.actions)),
2263
+ actions: Ae(U(e.actions)),
2264
2264
  cond: ge(e.cond, i),
2265
2265
  target: a,
2266
2266
  source: this,
@@ -2281,14 +2281,14 @@ ${e.message}`);
2281
2281
  if (!this.config.on) r = [];
2282
2282
  else if (Array.isArray(this.config.on)) r = this.config.on;
2283
2283
  else {
2284
- var i = this.config.on, a = Vt, o = i[a], s = o === void 0 ? [] : o, c = p(i, [typeof a == "symbol" ? a : a + ""]);
2284
+ var i = this.config.on, a = Bt, o = i[a], s = o === void 0 ? [] : o, c = p(i, [typeof a == "symbol" ? a : a + ""]);
2285
2285
  r = H(Object.keys(c).map(function(e) {
2286
- return Se(e, c[e]);
2287
- }).concat(Se(Vt, s)));
2286
+ return xe(e, c[e]);
2287
+ }).concat(xe(Bt, s)));
2288
2288
  }
2289
- var l = this.config.always ? Se("", this.config.always) : [], u = this.config.onDone ? Se(String(Ge(this.id)), this.config.onDone) : [], d = H(this.invoke.map(function(e) {
2289
+ var l = this.config.always ? xe("", this.config.always) : [], u = this.config.onDone ? xe(String(We(this.id)), this.config.onDone) : [], d = H(this.invoke.map(function(e) {
2290
2290
  var t = [];
2291
- return e.onDone && t.push.apply(t, g([], h(Se(String(Ke(e.id)), e.onDone)), !1)), e.onError && t.push.apply(t, g([], h(Se(String(qe(e.id)), e.onError)), !1)), t;
2291
+ return e.onDone && t.push.apply(t, g([], h(xe(String(Ge(e.id)), e.onDone)), !1)), e.onError && t.push.apply(t, g([], h(xe(String(Ke(e.id)), e.onError)), !1)), t;
2292
2292
  })), f = this.after, _ = H(g(g(g(g([], h(u), !1), h(d), !1), h(r), !1), h(l), !1).map(function(e) {
2293
2293
  return U(e).map(function(e) {
2294
2294
  return n.formatTransition(e);
@@ -2311,10 +2311,10 @@ ${e.message}`);
2311
2311
  return _;
2312
2312
  }, e;
2313
2313
  }();
2314
- function Kt(e, t) {
2315
- return new Gt(e, t);
2314
+ function Gt(e, t) {
2315
+ return new Wt(e, t);
2316
2316
  }
2317
- var Y = Ue, qt = Fe, X = Le, Jt = Ye;
2317
+ var X = He, Kt = Pe, qt = Ie, Jt = Je;
2318
2318
  function Yt(e) {
2319
2319
  return Object.prototype.toString.call(e) === "[object Object]";
2320
2320
  }
@@ -2551,8 +2551,8 @@ function _n(e, t, n) {
2551
2551
  return pn(r);
2552
2552
  }
2553
2553
  var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
2554
- var n = 200, r = "__lodash_hash_undefined__", i = 1, a = 2, o = 9007199254740991, s = "[object Arguments]", c = "[object Array]", l = "[object AsyncFunction]", u = "[object Boolean]", d = "[object Date]", f = "[object Error]", p = "[object Function]", m = "[object GeneratorFunction]", h = "[object Map]", g = "[object Number]", _ = "[object Null]", v = "[object Object]", y = "[object Promise]", b = "[object Proxy]", x = "[object RegExp]", S = "[object Set]", C = "[object String]", w = "[object Symbol]", T = "[object Undefined]", E = "[object WeakMap]", D = "[object ArrayBuffer]", O = "[object DataView]", k = "[object Float32Array]", A = "[object Float64Array]", j = "[object Int8Array]", M = "[object Int16Array]", N = "[object Int32Array]", P = "[object Uint8Array]", F = "[object Uint8ClampedArray]", I = "[object Uint16Array]", ee = "[object Uint32Array]", L = /[\\^$.*+?()[\]{}|]/g, R = /^\[object .+?Constructor\]$/, z = /^(?:0|[1-9]\d*)$/, B = {};
2555
- B[k] = B[A] = B[j] = B[M] = B[N] = B[P] = B[F] = B[I] = B[ee] = !0, B[s] = B[c] = B[D] = B[u] = B[O] = B[d] = B[f] = B[p] = B[h] = B[g] = B[v] = B[x] = B[S] = B[C] = B[E] = !1;
2554
+ var n = 200, r = "__lodash_hash_undefined__", i = 1, a = 2, o = 9007199254740991, s = "[object Arguments]", c = "[object Array]", l = "[object AsyncFunction]", u = "[object Boolean]", d = "[object Date]", f = "[object Error]", p = "[object Function]", m = "[object GeneratorFunction]", h = "[object Map]", g = "[object Number]", _ = "[object Null]", v = "[object Object]", y = "[object Promise]", b = "[object Proxy]", x = "[object RegExp]", S = "[object Set]", C = "[object String]", w = "[object Symbol]", T = "[object Undefined]", E = "[object WeakMap]", D = "[object ArrayBuffer]", O = "[object DataView]", k = "[object Float32Array]", A = "[object Float64Array]", j = "[object Int8Array]", M = "[object Int16Array]", N = "[object Int32Array]", P = "[object Uint8Array]", ee = "[object Uint8ClampedArray]", F = "[object Uint16Array]", I = "[object Uint32Array]", L = /[\\^$.*+?()[\]{}|]/g, R = /^\[object .+?Constructor\]$/, z = /^(?:0|[1-9]\d*)$/, B = {};
2555
+ B[k] = B[A] = B[j] = B[M] = B[N] = B[P] = B[ee] = B[F] = B[I] = !0, B[s] = B[c] = B[D] = B[u] = B[O] = B[d] = B[f] = B[p] = B[h] = B[g] = B[v] = B[x] = B[S] = B[C] = B[E] = !1;
2556
2556
  var te = typeof global == "object" && global && global.Object === Object && global, ne = typeof self == "object" && self && self.Object === Object && self, V = te || ne || Function("return this")(), re = typeof e == "object" && e && !e.nodeType && e, ie = re && typeof t == "object" && t && !t.nodeType && t, ae = ie && ie.exports === re, H = ae && te.process, oe = function() {
2557
2557
  try {
2558
2558
  return H && H.binding && H.binding("util");
@@ -2605,192 +2605,192 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
2605
2605
  n[++t] = e;
2606
2606
  }), n;
2607
2607
  }
2608
- var G = Array.prototype, ge = Function.prototype, _e = Object.prototype, ve = V["__core-js_shared__"], ye = ge.toString, K = _e.hasOwnProperty, be = function() {
2609
- var e = /[^.]+$/.exec(ve && ve.keys && ve.keys.IE_PROTO || "");
2608
+ var G = Array.prototype, ge = Function.prototype, _e = Object.prototype, K = V["__core-js_shared__"], ve = ge.toString, q = _e.hasOwnProperty, ye = function() {
2609
+ var e = /[^.]+$/.exec(K && K.keys && K.keys.IE_PROTO || "");
2610
2610
  return e ? "Symbol(src)_1." + e : "";
2611
- }(), xe = _e.toString, q = RegExp("^" + ye.call(K).replace(L, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Se = ae ? V.Buffer : void 0, Ce = V.Symbol, we = V.Uint8Array, Te = _e.propertyIsEnumerable, Ee = G.splice, De = Ce ? Ce.toStringTag : void 0, Oe = Object.getOwnPropertySymbols, ke = Se ? Se.isBuffer : void 0, Ae = he(Object.keys, Object), je = Mt(V, "DataView"), Me = Mt(V, "Map"), Ne = Mt(V, "Promise"), Pe = Mt(V, "Set"), Fe = Mt(V, "WeakMap"), Ie = Mt(Object, "create"), Le = Bt(je), Re = Bt(Me), ze = Bt(Ne), Be = Bt(Pe), Ve = Bt(Fe), He = Ce ? Ce.prototype : void 0, Ue = He ? He.valueOf : void 0;
2612
- function We(e) {
2611
+ }(), be = _e.toString, J = RegExp("^" + ve.call(q).replace(L, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), xe = ae ? V.Buffer : void 0, Se = V.Symbol, Ce = V.Uint8Array, we = _e.propertyIsEnumerable, Te = G.splice, Ee = Se ? Se.toStringTag : void 0, De = Object.getOwnPropertySymbols, Oe = xe ? xe.isBuffer : void 0, ke = he(Object.keys, Object), Ae = jt(V, "DataView"), je = jt(V, "Map"), Me = jt(V, "Promise"), Ne = jt(V, "Set"), Pe = jt(V, "WeakMap"), Fe = jt(Object, "create"), Ie = zt(Ae), Le = zt(je), Re = zt(Me), ze = zt(Ne), Be = zt(Pe), Ve = Se ? Se.prototype : void 0, He = Ve ? Ve.valueOf : void 0;
2612
+ function Ue(e) {
2613
2613
  var t = -1, n = e == null ? 0 : e.length;
2614
2614
  for (this.clear(); ++t < n;) {
2615
2615
  var r = e[t];
2616
2616
  this.set(r[0], r[1]);
2617
2617
  }
2618
2618
  }
2619
- function Ge() {
2620
- this.__data__ = Ie ? Ie(null) : {}, this.size = 0;
2619
+ function We() {
2620
+ this.__data__ = Fe ? Fe(null) : {}, this.size = 0;
2621
2621
  }
2622
- function Ke(e) {
2622
+ function Ge(e) {
2623
2623
  var t = this.has(e) && delete this.__data__[e];
2624
2624
  return this.size -= +!!t, t;
2625
2625
  }
2626
- function qe(e) {
2626
+ function Ke(e) {
2627
2627
  var t = this.__data__;
2628
- if (Ie) {
2628
+ if (Fe) {
2629
2629
  var n = t[e];
2630
2630
  return n === r ? void 0 : n;
2631
2631
  }
2632
- return K.call(t, e) ? t[e] : void 0;
2632
+ return q.call(t, e) ? t[e] : void 0;
2633
2633
  }
2634
- function Je(e) {
2634
+ function qe(e) {
2635
2635
  var t = this.__data__;
2636
- return Ie ? t[e] !== void 0 : K.call(t, e);
2636
+ return Fe ? t[e] !== void 0 : q.call(t, e);
2637
2637
  }
2638
- function Ye(e, t) {
2638
+ function Je(e, t) {
2639
2639
  var n = this.__data__;
2640
- return this.size += +!this.has(e), n[e] = Ie && t === void 0 ? r : t, this;
2640
+ return this.size += +!this.has(e), n[e] = Fe && t === void 0 ? r : t, this;
2641
2641
  }
2642
- We.prototype.clear = Ge, We.prototype.delete = Ke, We.prototype.get = qe, We.prototype.has = Je, We.prototype.set = Ye;
2643
- function Xe(e) {
2642
+ Ue.prototype.clear = We, Ue.prototype.delete = Ge, Ue.prototype.get = Ke, Ue.prototype.has = qe, Ue.prototype.set = Je;
2643
+ function Ye(e) {
2644
2644
  var t = -1, n = e == null ? 0 : e.length;
2645
2645
  for (this.clear(); ++t < n;) {
2646
2646
  var r = e[t];
2647
2647
  this.set(r[0], r[1]);
2648
2648
  }
2649
2649
  }
2650
- function Ze() {
2650
+ function Xe() {
2651
2651
  this.__data__ = [], this.size = 0;
2652
2652
  }
2653
- function Qe(e) {
2654
- var t = this.__data__, n = vt(t, e);
2655
- return n < 0 ? !1 : (n == t.length - 1 ? t.pop() : Ee.call(t, n, 1), --this.size, !0);
2653
+ function Ze(e) {
2654
+ var t = this.__data__, n = _t(t, e);
2655
+ return n < 0 ? !1 : (n == t.length - 1 ? t.pop() : Te.call(t, n, 1), --this.size, !0);
2656
2656
  }
2657
- function $e(e) {
2658
- var t = this.__data__, n = vt(t, e);
2657
+ function Qe(e) {
2658
+ var t = this.__data__, n = _t(t, e);
2659
2659
  return n < 0 ? void 0 : t[n][1];
2660
2660
  }
2661
- function et(e) {
2662
- return vt(this.__data__, e) > -1;
2661
+ function $e(e) {
2662
+ return _t(this.__data__, e) > -1;
2663
2663
  }
2664
- function tt(e, t) {
2665
- var n = this.__data__, r = vt(n, e);
2664
+ function et(e, t) {
2665
+ var n = this.__data__, r = _t(n, e);
2666
2666
  return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
2667
2667
  }
2668
- Xe.prototype.clear = Ze, Xe.prototype.delete = Qe, Xe.prototype.get = $e, Xe.prototype.has = et, Xe.prototype.set = tt;
2669
- function nt(e) {
2668
+ Ye.prototype.clear = Xe, Ye.prototype.delete = Ze, Ye.prototype.get = Qe, Ye.prototype.has = $e, Ye.prototype.set = et;
2669
+ function tt(e) {
2670
2670
  var t = -1, n = e == null ? 0 : e.length;
2671
2671
  for (this.clear(); ++t < n;) {
2672
2672
  var r = e[t];
2673
2673
  this.set(r[0], r[1]);
2674
2674
  }
2675
2675
  }
2676
- function rt() {
2676
+ function nt() {
2677
2677
  this.size = 0, this.__data__ = {
2678
- hash: new We(),
2679
- map: new (Me || Xe)(),
2680
- string: new We()
2678
+ hash: new Ue(),
2679
+ map: new (je || Ye)(),
2680
+ string: new Ue()
2681
2681
  };
2682
2682
  }
2683
- function it(e) {
2684
- var t = jt(this, e).delete(e);
2683
+ function rt(e) {
2684
+ var t = At(this, e).delete(e);
2685
2685
  return this.size -= +!!t, t;
2686
2686
  }
2687
- function at(e) {
2688
- return jt(this, e).get(e);
2687
+ function it(e) {
2688
+ return At(this, e).get(e);
2689
2689
  }
2690
- function ot(e) {
2691
- return jt(this, e).has(e);
2690
+ function at(e) {
2691
+ return At(this, e).has(e);
2692
2692
  }
2693
- function st(e, t) {
2694
- var n = jt(this, e), r = n.size;
2693
+ function ot(e, t) {
2694
+ var n = At(this, e), r = n.size;
2695
2695
  return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
2696
2696
  }
2697
- nt.prototype.clear = rt, nt.prototype.delete = it, nt.prototype.get = at, nt.prototype.has = ot, nt.prototype.set = st;
2698
- function ct(e) {
2697
+ tt.prototype.clear = nt, tt.prototype.delete = rt, tt.prototype.get = it, tt.prototype.has = at, tt.prototype.set = ot;
2698
+ function st(e) {
2699
2699
  var t = -1, n = e == null ? 0 : e.length;
2700
- for (this.__data__ = new nt(); ++t < n;) this.add(e[t]);
2700
+ for (this.__data__ = new tt(); ++t < n;) this.add(e[t]);
2701
2701
  }
2702
- function lt(e) {
2702
+ function ct(e) {
2703
2703
  return this.__data__.set(e, r), this;
2704
2704
  }
2705
- function ut(e) {
2705
+ function lt(e) {
2706
2706
  return this.__data__.has(e);
2707
2707
  }
2708
- ct.prototype.add = ct.prototype.push = lt, ct.prototype.has = ut;
2709
- function dt(e) {
2710
- var t = this.__data__ = new Xe(e);
2708
+ st.prototype.add = st.prototype.push = ct, st.prototype.has = lt;
2709
+ function ut(e) {
2710
+ var t = this.__data__ = new Ye(e);
2711
2711
  this.size = t.size;
2712
2712
  }
2713
- function ft() {
2714
- this.__data__ = new Xe(), this.size = 0;
2713
+ function dt() {
2714
+ this.__data__ = new Ye(), this.size = 0;
2715
2715
  }
2716
- function pt(e) {
2716
+ function ft(e) {
2717
2717
  var t = this.__data__, n = t.delete(e);
2718
2718
  return this.size = t.size, n;
2719
2719
  }
2720
- function mt(e) {
2720
+ function pt(e) {
2721
2721
  return this.__data__.get(e);
2722
2722
  }
2723
- function ht(e) {
2723
+ function mt(e) {
2724
2724
  return this.__data__.has(e);
2725
2725
  }
2726
- function gt(e, t) {
2726
+ function ht(e, t) {
2727
2727
  var r = this.__data__;
2728
- if (r instanceof Xe) {
2728
+ if (r instanceof Ye) {
2729
2729
  var i = r.__data__;
2730
- if (!Me || i.length < n - 1) return i.push([e, t]), this.size = ++r.size, this;
2731
- r = this.__data__ = new nt(i);
2730
+ if (!je || i.length < n - 1) return i.push([e, t]), this.size = ++r.size, this;
2731
+ r = this.__data__ = new tt(i);
2732
2732
  }
2733
2733
  return r.set(e, t), this.size = r.size, this;
2734
2734
  }
2735
- dt.prototype.clear = ft, dt.prototype.delete = pt, dt.prototype.get = mt, dt.prototype.has = ht, dt.prototype.set = gt;
2736
- function _t(e, t) {
2737
- var n = Ut(e), r = !n && Ht(e), i = !n && !r && Gt(e), a = !n && !r && !i && Yt(e), o = n || r || i || a, s = o ? ue(e.length, String) : [], c = s.length;
2738
- for (var l in e) (t || K.call(e, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || Ft(l, c))) && s.push(l);
2735
+ ut.prototype.clear = dt, ut.prototype.delete = ft, ut.prototype.get = pt, ut.prototype.has = mt, ut.prototype.set = ht;
2736
+ function gt(e, t) {
2737
+ var n = Ht(e), r = !n && Vt(e), i = !n && !r && Wt(e), a = !n && !r && !i && Yt(e), o = n || r || i || a, s = o ? ue(e.length, String) : [], c = s.length;
2738
+ for (var l in e) (t || q.call(e, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || Pt(l, c))) && s.push(l);
2739
2739
  return s;
2740
2740
  }
2741
- function vt(e, t) {
2742
- for (var n = e.length; n--;) if (Vt(e[n][0], t)) return n;
2741
+ function _t(e, t) {
2742
+ for (var n = e.length; n--;) if (Bt(e[n][0], t)) return n;
2743
2743
  return -1;
2744
2744
  }
2745
- function yt(e, t, n) {
2745
+ function vt(e, t, n) {
2746
2746
  var r = t(e);
2747
- return Ut(e) ? r : ce(r, n(e));
2747
+ return Ht(e) ? r : ce(r, n(e));
2748
2748
  }
2749
- function bt(e) {
2750
- return e == null ? e === void 0 ? T : _ : De && De in Object(e) ? J(e) : zt(e);
2749
+ function yt(e) {
2750
+ return e == null ? e === void 0 ? T : _ : Ee && Ee in Object(e) ? Y(e) : Rt(e);
2751
2751
  }
2752
- function xt(e) {
2753
- return Jt(e) && bt(e) == s;
2752
+ function bt(e) {
2753
+ return Jt(e) && yt(e) == s;
2754
2754
  }
2755
- function St(e, t, n, r, i) {
2756
- return e === t ? !0 : e == null || t == null || !Jt(e) && !Jt(t) ? e !== e && t !== t : Ct(e, t, n, r, St, i);
2755
+ function xt(e, t, n, r, i) {
2756
+ return e === t ? !0 : e == null || t == null || !Jt(e) && !Jt(t) ? e !== e && t !== t : St(e, t, n, r, xt, i);
2757
2757
  }
2758
- function Ct(e, t, n, r, a, o) {
2759
- var l = Ut(e), u = Ut(t), d = l ? c : Pt(e), f = u ? c : Pt(t);
2758
+ function St(e, t, n, r, a, o) {
2759
+ var l = Ht(e), u = Ht(t), d = l ? c : Nt(e), f = u ? c : Nt(t);
2760
2760
  d = d == s ? v : d, f = f == s ? v : f;
2761
2761
  var p = d == v, m = f == v, h = d == f;
2762
- if (h && Gt(e)) {
2763
- if (!Gt(t)) return !1;
2762
+ if (h && Wt(e)) {
2763
+ if (!Wt(t)) return !1;
2764
2764
  l = !0, p = !1;
2765
2765
  }
2766
- if (h && !p) return o ||= new dt(), l || Yt(e) ? Dt(e, t, n, r, a, o) : Ot(e, t, d, n, r, a, o);
2766
+ if (h && !p) return o ||= new ut(), l || Yt(e) ? Et(e, t, n, r, a, o) : Dt(e, t, d, n, r, a, o);
2767
2767
  if (!(n & i)) {
2768
- var g = p && K.call(e, "__wrapped__"), _ = m && K.call(t, "__wrapped__");
2768
+ var g = p && q.call(e, "__wrapped__"), _ = m && q.call(t, "__wrapped__");
2769
2769
  if (g || _) {
2770
2770
  var y = g ? e.value() : e, b = _ ? t.value() : t;
2771
- return o ||= new dt(), a(y, b, n, r, o);
2771
+ return o ||= new ut(), a(y, b, n, r, o);
2772
2772
  }
2773
2773
  }
2774
- return h ? (o ||= new dt(), kt(e, t, n, r, a, o)) : !1;
2774
+ return h ? (o ||= new ut(), Ot(e, t, n, r, a, o)) : !1;
2775
+ }
2776
+ function Ct(e) {
2777
+ return !qt(e) || It(e) ? !1 : (X(e) ? J : R).test(zt(e));
2775
2778
  }
2776
2779
  function wt(e) {
2777
- return !X(e) || Lt(e) ? !1 : (Y(e) ? q : R).test(Bt(e));
2780
+ return Jt(e) && Kt(e.length) && !!B[yt(e)];
2778
2781
  }
2779
2782
  function Tt(e) {
2780
- return Jt(e) && qt(e.length) && !!B[bt(e)];
2781
- }
2782
- function Et(e) {
2783
- if (!Rt(e)) return Ae(e);
2783
+ if (!Lt(e)) return ke(e);
2784
2784
  var t = [];
2785
- for (var n in Object(e)) K.call(e, n) && n != "constructor" && t.push(n);
2785
+ for (var n in Object(e)) q.call(e, n) && n != "constructor" && t.push(n);
2786
2786
  return t;
2787
2787
  }
2788
- function Dt(e, t, n, r, o, s) {
2788
+ function Et(e, t, n, r, o, s) {
2789
2789
  var c = n & i, l = e.length, u = t.length;
2790
2790
  if (l != u && !(c && u > l)) return !1;
2791
2791
  var d = s.get(e);
2792
2792
  if (d && s.get(t)) return d == t;
2793
- var f = -1, p = !0, m = n & a ? new ct() : void 0;
2793
+ var f = -1, p = !0, m = n & a ? new st() : void 0;
2794
2794
  for (s.set(e, t), s.set(t, e); ++f < l;) {
2795
2795
  var h = e[f], g = t[f];
2796
2796
  if (r) var _ = c ? r(g, h, f, t, e, s) : r(h, g, f, e, t, s);
@@ -2813,15 +2813,15 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
2813
2813
  }
2814
2814
  return s.delete(e), s.delete(t), p;
2815
2815
  }
2816
- function Ot(e, t, n, r, o, s, c) {
2816
+ function Dt(e, t, n, r, o, s, c) {
2817
2817
  switch (n) {
2818
2818
  case O:
2819
2819
  if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1;
2820
2820
  e = e.buffer, t = t.buffer;
2821
- case D: return !(e.byteLength != t.byteLength || !s(new we(e), new we(t)));
2821
+ case D: return !(e.byteLength != t.byteLength || !s(new Ce(e), new Ce(t)));
2822
2822
  case u:
2823
2823
  case d:
2824
- case g: return Vt(+e, +t);
2824
+ case g: return Bt(+e, +t);
2825
2825
  case f: return e.name == t.name && e.message == t.message;
2826
2826
  case x:
2827
2827
  case C: return e == t + "";
@@ -2832,18 +2832,18 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
2832
2832
  var m = c.get(e);
2833
2833
  if (m) return m == t;
2834
2834
  r |= a, c.set(e, t);
2835
- var _ = Dt(l(e), l(t), r, o, s, c);
2835
+ var _ = Et(l(e), l(t), r, o, s, c);
2836
2836
  return c.delete(e), _;
2837
- case w: if (Ue) return Ue.call(e) == Ue.call(t);
2837
+ case w: if (He) return He.call(e) == He.call(t);
2838
2838
  }
2839
2839
  return !1;
2840
2840
  }
2841
- function kt(e, t, n, r, a, o) {
2842
- var s = n & i, c = At(e), l = c.length;
2843
- if (l != At(t).length && !s) return !1;
2841
+ function Ot(e, t, n, r, a, o) {
2842
+ var s = n & i, c = kt(e), l = c.length;
2843
+ if (l != kt(t).length && !s) return !1;
2844
2844
  for (var u = l; u--;) {
2845
2845
  var d = c[u];
2846
- if (!(s ? d in t : K.call(t, d))) return !1;
2846
+ if (!(s ? d in t : q.call(t, d))) return !1;
2847
2847
  }
2848
2848
  var f = o.get(e);
2849
2849
  if (f && o.get(t)) return f == t;
@@ -2865,63 +2865,63 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
2865
2865
  }
2866
2866
  return o.delete(e), o.delete(t), p;
2867
2867
  }
2868
- function At(e) {
2869
- return yt(e, Xt, Nt);
2868
+ function kt(e) {
2869
+ return vt(e, Xt, Mt);
2870
2870
  }
2871
- function jt(e, t) {
2871
+ function At(e, t) {
2872
2872
  var n = e.__data__;
2873
- return It(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
2873
+ return Ft(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
2874
2874
  }
2875
- function Mt(e, t) {
2875
+ function jt(e, t) {
2876
2876
  var n = pe(e, t);
2877
- return wt(n) ? n : void 0;
2877
+ return Ct(n) ? n : void 0;
2878
2878
  }
2879
- function J(e) {
2880
- var t = K.call(e, De), n = e[De];
2879
+ function Y(e) {
2880
+ var t = q.call(e, Ee), n = e[Ee];
2881
2881
  try {
2882
- e[De] = void 0;
2882
+ e[Ee] = void 0;
2883
2883
  var r = !0;
2884
2884
  } catch {}
2885
- var i = xe.call(e);
2886
- return r && (t ? e[De] = n : delete e[De]), i;
2885
+ var i = be.call(e);
2886
+ return r && (t ? e[Ee] = n : delete e[Ee]), i;
2887
2887
  }
2888
- var Nt = Oe ? function(e) {
2889
- return e == null ? [] : (e = Object(e), se(Oe(e), function(t) {
2890
- return Te.call(e, t);
2888
+ var Mt = De ? function(e) {
2889
+ return e == null ? [] : (e = Object(e), se(De(e), function(t) {
2890
+ return we.call(e, t);
2891
2891
  }));
2892
- } : Zt, Pt = bt;
2893
- (je && Pt(new je(/* @__PURE__ */ new ArrayBuffer(1))) != O || Me && Pt(new Me()) != h || Ne && Pt(Ne.resolve()) != y || Pe && Pt(new Pe()) != S || Fe && Pt(new Fe()) != E) && (Pt = function(e) {
2894
- var t = bt(e), n = t == v ? e.constructor : void 0, r = n ? Bt(n) : "";
2892
+ } : Zt, Nt = yt;
2893
+ (Ae && Nt(new Ae(/* @__PURE__ */ new ArrayBuffer(1))) != O || je && Nt(new je()) != h || Me && Nt(Me.resolve()) != y || Ne && Nt(new Ne()) != S || Pe && Nt(new Pe()) != E) && (Nt = function(e) {
2894
+ var t = yt(e), n = t == v ? e.constructor : void 0, r = n ? zt(n) : "";
2895
2895
  if (r) switch (r) {
2896
- case Le: return O;
2897
- case Re: return h;
2898
- case ze: return y;
2899
- case Be: return S;
2900
- case Ve: return E;
2896
+ case Ie: return O;
2897
+ case Le: return h;
2898
+ case Re: return y;
2899
+ case ze: return S;
2900
+ case Be: return E;
2901
2901
  }
2902
2902
  return t;
2903
2903
  });
2904
- function Ft(e, t) {
2904
+ function Pt(e, t) {
2905
2905
  return t ??= o, !!t && (typeof e == "number" || z.test(e)) && e > -1 && e % 1 == 0 && e < t;
2906
2906
  }
2907
- function It(e) {
2907
+ function Ft(e) {
2908
2908
  var t = typeof e;
2909
2909
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
2910
2910
  }
2911
- function Lt(e) {
2912
- return !!be && be in e;
2911
+ function It(e) {
2912
+ return !!ye && ye in e;
2913
2913
  }
2914
- function Rt(e) {
2914
+ function Lt(e) {
2915
2915
  var t = e && e.constructor;
2916
2916
  return e === (typeof t == "function" && t.prototype || _e);
2917
2917
  }
2918
- function zt(e) {
2919
- return xe.call(e);
2918
+ function Rt(e) {
2919
+ return be.call(e);
2920
2920
  }
2921
- function Bt(e) {
2921
+ function zt(e) {
2922
2922
  if (e != null) {
2923
2923
  try {
2924
- return ye.call(e);
2924
+ return ve.call(e);
2925
2925
  } catch {}
2926
2926
  try {
2927
2927
  return e + "";
@@ -2929,39 +2929,39 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
2929
2929
  }
2930
2930
  return "";
2931
2931
  }
2932
- function Vt(e, t) {
2932
+ function Bt(e, t) {
2933
2933
  return e === t || e !== e && t !== t;
2934
2934
  }
2935
- var Ht = xt(function() {
2935
+ var Vt = bt(function() {
2936
2936
  return arguments;
2937
- }()) ? xt : function(e) {
2938
- return Jt(e) && K.call(e, "callee") && !Te.call(e, "callee");
2939
- }, Ut = Array.isArray;
2940
- function Wt(e) {
2941
- return e != null && qt(e.length) && !Y(e);
2937
+ }()) ? bt : function(e) {
2938
+ return Jt(e) && q.call(e, "callee") && !we.call(e, "callee");
2939
+ }, Ht = Array.isArray;
2940
+ function Ut(e) {
2941
+ return e != null && Kt(e.length) && !X(e);
2942
2942
  }
2943
- var Gt = ke || Qt;
2944
- function Kt(e, t) {
2945
- return St(e, t);
2943
+ var Wt = Oe || Qt;
2944
+ function Gt(e, t) {
2945
+ return xt(e, t);
2946
2946
  }
2947
- function Y(e) {
2948
- if (!X(e)) return !1;
2949
- var t = bt(e);
2947
+ function X(e) {
2948
+ if (!qt(e)) return !1;
2949
+ var t = yt(e);
2950
2950
  return t == p || t == m || t == l || t == b;
2951
2951
  }
2952
- function qt(e) {
2952
+ function Kt(e) {
2953
2953
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= o;
2954
2954
  }
2955
- function X(e) {
2955
+ function qt(e) {
2956
2956
  var t = typeof e;
2957
2957
  return e != null && (t == "object" || t == "function");
2958
2958
  }
2959
2959
  function Jt(e) {
2960
2960
  return typeof e == "object" && !!e;
2961
2961
  }
2962
- var Yt = U ? de(U) : Tt;
2962
+ var Yt = U ? de(U) : wt;
2963
2963
  function Xt(e) {
2964
- return Wt(e) ? _t(e) : Et(e);
2964
+ return Ut(e) ? gt(e) : Tt(e);
2965
2965
  }
2966
2966
  function Zt() {
2967
2967
  return [];
@@ -2969,11 +2969,12 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
2969
2969
  function Qt() {
2970
2970
  return !1;
2971
2971
  }
2972
- t.exports = Kt;
2972
+ t.exports = Gt;
2973
2973
  })))(), 1), yn = "EXPERIENCE_STARTED", bn = "SHOW", xn = "STOP_EXPERIENCE", Sn = {
2974
2974
  NAVIGATION: "navigation",
2975
2975
  COMPLETED: "completed",
2976
- DISMISSED: "dismissed"
2976
+ DISMISSED: "dismissed",
2977
+ ERROR: "error"
2977
2978
  }, Cn = "EXTENDED_EVENT", wn = "START_STEP", Tn = "STOP_STEP", En = "UPDATE_STEP", Dn = "SET_STEP_CONTAINER_TARGET", On = "UPDATE_STEP_CONTENT", kn = "RECOVER_STEP", An = "AUTO_RECOVER_STEP", jn = "PARENT_RECOVER_STEP", Mn = "ERROR", Nn = "STEP_INTERACTION", Pn = "STEP_SEEN", Fn = "UPDATE_ROOT_STYLE", In = "RELOAD", Ln = "STEP_STOPPED", Rn = "EXPERIENCE_DISMISSED", zn = "EXPERIENCE_SNOOZED", Bn = "FORWARD_TO_PARENT", Vn = "TRANSITION_TO_END", Hn = "ACTIONS_STARTED", Un = "ACTIONS_FINISHED", Wn = "experience.begin", Gn = "experience.end", Kn = "step.prebegin", qn = "step.begin", Jn = "step.prerender", Yn = "step.postrender", Xn = "step.end", Zn = "step.error", Qn = "step.container_change", $n = "RUN_HOOKS", er = "RUN_HOOKS_DONE", tr = "START_THEME_REMOVAL_LISTENER", nr = "STOP_THEME_REMOVAL_LISTENER", rr = "GLOBAL_CONTAINER_REMOVED", ir = "STEP_CONTAINER_REMOVED", ar = "appcues-experience-container", or = "APPCUES-EXPERIENCE-CONTAINER", sr = "APPCUES-EXPERIENCE-CONTAINER-BUILDER", cr = "data-appcues-container-id", lr = "RUN_TRAITS_DONE", ur = "RUN_TRAITS_ERROR", dr = "BIND_ACTIONS_ERROR", fr = (() => {
2978
2979
  let e = /* @__PURE__ */ new Map(), t = (t) => {
2979
2980
  let { observerInstance: n } = e.get(t);
@@ -3120,7 +3121,7 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3120
3121
  }, Ar = ({ getRoot: e }) => {
3121
3122
  let t = e();
3122
3123
  t.parentElement && t.remove();
3123
- }, jr = ({ getRoot: e }) => Xe([{
3124
+ }, jr = ({ getRoot: e }) => Ye([{
3124
3125
  cond: "hasCustomContainer",
3125
3126
  actions: [() => {
3126
3127
  Ar({ getRoot: e });
@@ -3152,7 +3153,7 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3152
3153
  getWindowReference: t
3153
3154
  }));
3154
3155
  });
3155
- }, Pr = qt(tr, { to: "themeRemovalService" }), Fr = qt(nr, { to: "themeRemovalService" }), Ir = /* @__PURE__ */ s(((e, t) => {
3156
+ }, Pr = Kt(tr, { to: "themeRemovalService" }), Fr = Kt(nr, { to: "themeRemovalService" }), Ir = /* @__PURE__ */ s(((e, t) => {
3156
3157
  (function() {
3157
3158
  function e(e, t, n) {
3158
3159
  return e.call.apply(e.bind, arguments);
@@ -3330,10 +3331,10 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3330
3331
  function P(e) {
3331
3332
  return "display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:" + S(e.c) + ";" + ("font-style:" + w(e) + ";font-weight:" + (e.f + "00") + ";");
3332
3333
  }
3333
- function F(e, t, n, r, i, a) {
3334
+ function ee(e, t, n, r, i, a) {
3334
3335
  this.g = e, this.j = t, this.a = r, this.c = n, this.f = i || 3e3, this.h = a || void 0;
3335
3336
  }
3336
- F.prototype.start = function() {
3337
+ ee.prototype.start = function() {
3337
3338
  var e = this.c.o.document, t = this, n = i(), r = new Promise(function(r, a) {
3338
3339
  function o() {
3339
3340
  i() - n >= t.f ? a() : e.fonts.load(x(t.a), t.h).then(function(e) {
@@ -3352,10 +3353,10 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3352
3353
  t.j(t.a);
3353
3354
  });
3354
3355
  };
3355
- function I(e, t, n, r, i, a, o) {
3356
+ function F(e, t, n, r, i, a, o) {
3356
3357
  this.v = e, this.B = t, this.c = n, this.a = r, this.s = o || "BESbswy", this.f = {}, this.w = i || 3e3, this.u = a || null, this.m = this.j = this.h = this.g = null, this.g = new M(this.c, this.s), this.h = new M(this.c, this.s), this.j = new M(this.c, this.s), this.m = new M(this.c, this.s), e = new b(this.a.c + ",serif", C(this.a)), e = P(e), this.g.a.style.cssText = e, e = new b(this.a.c + ",sans-serif", C(this.a)), e = P(e), this.h.a.style.cssText = e, e = new b("serif", C(this.a)), e = P(e), this.j.a.style.cssText = e, e = new b("sans-serif", C(this.a)), e = P(e), this.m.a.style.cssText = e, N(this.g), N(this.h), N(this.j), N(this.m);
3357
3358
  }
3358
- var ee = {
3359
+ var I = {
3359
3360
  D: "serif",
3360
3361
  C: "sans-serif"
3361
3362
  }, L = null;
@@ -3366,11 +3367,11 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3366
3367
  }
3367
3368
  return L;
3368
3369
  }
3369
- I.prototype.start = function() {
3370
+ F.prototype.start = function() {
3370
3371
  this.f.serif = this.j.a.offsetWidth, this.f["sans-serif"] = this.m.a.offsetWidth, this.A = i(), B(this);
3371
3372
  };
3372
3373
  function z(e, t, n) {
3373
- for (var r in ee) if (ee.hasOwnProperty(r) && t === e.f[ee[r]] && n === e.f[ee[r]]) return !0;
3374
+ for (var r in I) if (I.hasOwnProperty(r) && t === e.f[I[r]] && n === e.f[I[r]]) return !0;
3374
3375
  return !1;
3375
3376
  }
3376
3377
  function B(e) {
@@ -3425,7 +3426,7 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3425
3426
  var m = /Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent), h = /OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent) && /Apple/.exec(window.navigator.vendor);
3426
3427
  re = m ? 42 < parseInt(m[1], 10) : !h;
3427
3428
  } else re = !1;
3428
- p = re ? new F(r(t.g, t), r(t.h, t), t.c, d, t.s, f) : new I(r(t.g, t), r(t.h, t), t.c, d, t.s, e, f), l.push(p);
3429
+ p = re ? new ee(r(t.g, t), r(t.h, t), t.c, d, t.s, f) : new F(r(t.g, t), r(t.h, t), t.c, d, t.s, e, f), l.push(p);
3429
3430
  }
3430
3431
  for (c = 0; c < l.length; c++) l[c].start();
3431
3432
  }
@@ -3575,10 +3576,10 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3575
3576
  e(a.a, a.c, _e);
3576
3577
  });
3577
3578
  };
3578
- function ve(e, t) {
3579
+ function K(e, t) {
3579
3580
  this.c = e, this.a = t;
3580
3581
  }
3581
- ve.prototype.load = function(e) {
3582
+ K.prototype.load = function(e) {
3582
3583
  var t = this.a.id, n = this.c.o;
3583
3584
  t ? m(this.c, (this.a.api || "https://use.typekit.net") + "/" + t + ".js", function(t) {
3584
3585
  if (t) e([]);
@@ -3596,10 +3597,10 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3596
3597
  }
3597
3598
  }, 2e3) : e([]);
3598
3599
  };
3599
- function ye(e, t) {
3600
+ function ve(e, t) {
3600
3601
  this.c = e, this.f = t, this.a = [];
3601
3602
  }
3602
- ye.prototype.load = function(e) {
3603
+ ve.prototype.load = function(e) {
3603
3604
  var t = this.f.id, n = this.c.o, r = this;
3604
3605
  t ? (n.__webfontfontdeckmodule__ ||= {}, n.__webfontfontdeckmodule__[t] = function(t, n) {
3605
3606
  for (var i = 0, a = n.fonts.length; i < a; ++i) {
@@ -3611,20 +3612,20 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
3611
3612
  t && e([]);
3612
3613
  })) : e([]);
3613
3614
  };
3614
- var K = new ae(window);
3615
- K.a.c.custom = function(e, t) {
3615
+ var q = new ae(window);
3616
+ q.a.c.custom = function(e, t) {
3616
3617
  return new se(t, e);
3617
- }, K.a.c.fontdeck = function(e, t) {
3618
- return new ye(t, e);
3619
- }, K.a.c.monotype = function(e, t) {
3620
- return new U(t, e);
3621
- }, K.a.c.typekit = function(e, t) {
3618
+ }, q.a.c.fontdeck = function(e, t) {
3622
3619
  return new ve(t, e);
3623
- }, K.a.c.google = function(e, t) {
3620
+ }, q.a.c.monotype = function(e, t) {
3621
+ return new U(t, e);
3622
+ }, q.a.c.typekit = function(e, t) {
3623
+ return new K(t, e);
3624
+ }, q.a.c.google = function(e, t) {
3624
3625
  return new ge(t, e);
3625
3626
  };
3626
- var be = { load: r(K.load, K) };
3627
- t !== void 0 && t.exports ? t.exports = be : (window.WebFont = be, window.WebFontConfig && K.load(window.WebFontConfig));
3627
+ var ye = { load: r(q.load, q) };
3628
+ t !== void 0 && t.exports ? t.exports = ye : (window.WebFont = ye, window.WebFontConfig && q.load(window.WebFontConfig));
3628
3629
  })();
3629
3630
  })), Lr = /* @__PURE__ */ s(((e, t) => {
3630
3631
  function n(e, t) {
@@ -3715,21 +3716,22 @@ var qr = (0, zr.default)((e, t) => {
3715
3716
  Jr(r?.json?.typekitId ?? i, r?.json), Yr(r?.css, t, e), Yr(n, t, e);
3716
3717
  }, Zr = async (e, t) => {
3717
3718
  await Xr(e), t && e.shadowRoot.querySelectorAll(`.theme-${t}`).forEach((e) => e.remove());
3718
- }, Qr = Y({ step: ({ step: e }, t) => ({
3719
+ }, Qr = X({ step: ({ step: e }, t) => ({
3719
3720
  ...e,
3720
3721
  virtualizedContent: t.virtualizedContent
3721
- }) }), $r = (e) => Y({ step: (t, n) => ({
3722
+ }) }), $r = (e) => X({ step: (t, n) => ({
3722
3723
  stepConfig: n.stepConfig,
3723
3724
  virtualizedContent: e(n.stepConfig)
3724
- }) }), ei = Y({
3725
+ }) }), ei = X({
3725
3726
  experience: (e, t) => t.experience,
3726
3727
  step: ({ step: e }, t) => ({
3727
3728
  ...e,
3728
3729
  ...t.stepConfig
3729
3730
  })
3730
- }), ti = X(yn), ni = X(({ step: e }) => ({
3731
+ }), ti = qt(yn), ni = qt(({ step: e, stopReason: t }) => ({
3731
3732
  type: Ln,
3732
- id: e.id
3733
+ id: e.id,
3734
+ reason: t
3733
3735
  })), ri = (e, { styles: t, getRoot: n }) => {
3734
3736
  let r = n();
3735
3737
  r && Object.entries(t).forEach(([e, t]) => {
@@ -3740,7 +3742,7 @@ var qr = (0, zr.default)((e, t) => {
3740
3742
  if (r || !n) return;
3741
3743
  let a = e("getWindowReference")().document.documentElement.querySelector(`#${vr(i)}`), o = a.getAttribute("themeId");
3742
3744
  a?.setAttribute("themeId", n), Zr(a, o);
3743
- }, ai = (e) => Y({ step: ({ step: t }) => {
3745
+ }, ai = (e) => X({ step: ({ step: t }) => {
3744
3746
  if (t.type !== "tooltip" || t.contentType === "application/json") return t;
3745
3747
  let n = Object.entries(t.actions).filter(([, e]) => e.find((e) => e.on === "click")).map(([e]) => e), r = t.traits.filter(({ config: e }) => e.targetId).map(({ config: e }) => e.targetId);
3746
3748
  return {
@@ -3750,13 +3752,13 @@ var qr = (0, zr.default)((e, t) => {
3750
3752
  focusableEls: r
3751
3753
  })
3752
3754
  };
3753
- } }), oi = Xe([{
3755
+ } }), oi = Ye([{
3754
3756
  cond: (e, t) => t.errorEvent?.type === ir,
3755
- actions: [Ne({
3757
+ actions: [Me({
3756
3758
  type: An,
3757
3759
  isAutoRecoverEvent: !0
3758
3760
  })]
3759
- }]), si = Y({ actionsRunning: !0 }), ci = Y({ actionsRunning: !1 }), li = (e, t) => {
3761
+ }]), si = X({ actionsRunning: !0 }), ci = X({ actionsRunning: !1 }), li = (e, t) => {
3760
3762
  let n = t.changedExperienceTraits && t.changedExperienceTraits.changedTraits.length > 0, r = t.changedExperienceTraits && (t.changedExperienceTraits.addedTraits.length > 0 || t.changedExperienceTraits.removedTraits.length > 0), i = t.changedStepTraits && t.changedStepTraits.changedTraits.length > 0, a = t.changedStepTraits && (t.changedStepTraits.addedTraits.length > 0 || t.changedStepTraits.removedTraits.length > 0);
3761
3763
  return r || a ? !1 : !!(n || i);
3762
3764
  }, ui = "There is already a key registered with this name", di = "Key name should be string and callback a valid function", fi = () => {
@@ -3771,16 +3773,16 @@ var qr = (0, zr.default)((e, t) => {
3771
3773
  }, pi = ({ getTrait: e, trait: t, ...n }) => {
3772
3774
  let r = e(t.type);
3773
3775
  r && r(n, t.config ?? {});
3774
- }, { getCallback: mi, registerCallback: Q } = fi(), hi = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += "-" : e += "_", e), ""), gi = ({ experience: e, callback: t, step: n, findId: r, getContainer: i, getWindowReference: a }) => {
3775
- let o = (e, { forwardToParent: r = !1 } = {}) => {
3776
- let o = ({ type: e, ...n }) => t(r ? {
3776
+ }, { getCallback: mi, registerCallback: Q } = fi(), hi = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += "-" : e += "_", e), ""), gi = ({ experience: e, callback: t, step: n, findId: r, getContainer: i, getWindowReference: a, sendToExperience: o }) => {
3777
+ let s = (e, { forwardToParent: r = !1 } = {}) => {
3778
+ let s = ({ type: e, ...n }) => t(r ? {
3777
3779
  ...n,
3778
3780
  eventType: e,
3779
3781
  type: Bn
3780
3782
  } : {
3781
3783
  type: e,
3782
3784
  ...n
3783
- });
3785
+ }), c = (e) => r && o ? o(e) : s(e);
3784
3786
  return {
3785
3787
  querySelector: (e) => Tr(e, {
3786
3788
  step: n,
@@ -3788,76 +3790,78 @@ var qr = (0, zr.default)((e, t) => {
3788
3790
  stepContainer: i(),
3789
3791
  getWindowReference: a
3790
3792
  }),
3791
- start: () => o({
3793
+ start: () => c({
3792
3794
  type: wn,
3793
3795
  id: e.id
3794
3796
  }),
3795
- stop: (t) => {
3796
- o({
3797
+ stop: (t, n) => {
3798
+ c({
3797
3799
  type: Tn,
3798
3800
  id: e.id,
3799
- onStopped: t
3801
+ onStopped: t,
3802
+ reason: n
3800
3803
  });
3801
3804
  },
3802
3805
  setStepContainerTarget: (t) => {
3803
- o({
3806
+ s({
3804
3807
  type: Dn,
3805
3808
  id: e.id,
3806
3809
  container: t
3807
3810
  });
3808
3811
  },
3809
3812
  recover: ({ errorId: t }) => {
3810
- o({
3813
+ s({
3811
3814
  type: kn,
3812
3815
  id: e.id,
3813
3816
  errorId: t
3814
3817
  });
3815
3818
  },
3816
- dismissExperience: () => o({ type: Rn }),
3817
- snoozeExperience: () => o({ type: zn }),
3818
- seen: () => o({
3819
+ dismissExperience: () => s({ type: Rn }),
3820
+ snoozeExperience: () => s({ type: zn }),
3821
+ seen: () => s({
3819
3822
  type: Pn,
3820
3823
  id: e.id
3821
3824
  }),
3822
3825
  getConfig: () => e,
3823
- interaction: (t, n) => o({
3826
+ interaction: (t, n) => s({
3824
3827
  type: Nn,
3825
3828
  id: e.id,
3826
3829
  interactionType: t,
3827
3830
  interactionData: n
3828
3831
  }),
3829
- extendedEvent: (t, n) => o({
3832
+ extendedEvent: (t, n) => s({
3830
3833
  type: Cn,
3831
3834
  id: e.id,
3832
3835
  name: t,
3833
3836
  ...n
3834
3837
  })
3835
3838
  };
3836
- }, s = e.steps.map((e) => o(e, { forwardToParent: !!n }));
3839
+ }, c = e.steps.map((e) => s(e, { forwardToParent: !!n }));
3837
3840
  return n ? {
3838
3841
  getRootNodeId: () => r(n.virtualizedContent),
3839
- steps: s,
3840
- step: o(n, { forwardToParent: !1 })
3842
+ steps: c,
3843
+ step: s(n, { forwardToParent: !1 })
3841
3844
  } : {
3842
3845
  getRootNodeId: () => r(n.virtualizedContent),
3843
- steps: s
3846
+ steps: c
3844
3847
  };
3845
3848
  }, _i = ({ experience: e, step: t, overrideStyle: n, getContainer: r, getRoot: i, callback: a, get: o, getAction: s = () => null, handleNavigation: c }) => {
3846
- let { findId: l } = o("vNodeHandlers"), u = o("getWindowReference"), d = gi({
3849
+ let { findId: l } = o("vNodeHandlers"), u = o("getWindowReference"), d = o("getExperienceSend"), f = gi({
3847
3850
  experience: e,
3848
3851
  step: t,
3849
3852
  callback: a,
3850
3853
  findId: l,
3851
3854
  getContainer: r,
3852
- getWindowReference: u
3853
- }), f = (e) => {
3855
+ getWindowReference: u,
3856
+ sendToExperience: typeof d == "function" ? d(e.id) : void 0
3857
+ }), p = (e) => {
3854
3858
  let t = hi();
3855
3859
  return console.info("error reported:", e), a({
3856
3860
  type: Mn,
3857
3861
  message: e,
3858
3862
  errorId: t
3859
3863
  }), t;
3860
- }, p = () => a(xn), m = () => e.id, h = {
3864
+ }, m = () => a(xn), h = () => e.id, g = {
3861
3865
  getContainer: r,
3862
3866
  querySelector: (e) => Tr(e, {
3863
3867
  step: t,
@@ -3865,7 +3869,7 @@ var qr = (0, zr.default)((e, t) => {
3865
3869
  stepContainer: r(),
3866
3870
  getWindowReference: u
3867
3871
  }),
3868
- reportError: f,
3872
+ reportError: p,
3869
3873
  onElementInserted: (e) => xr({
3870
3874
  ...e,
3871
3875
  getWindowReference: u
@@ -3874,9 +3878,9 @@ var qr = (0, zr.default)((e, t) => {
3874
3878
  ...e,
3875
3879
  getWindowReference: u
3876
3880
  }),
3877
- ...d,
3878
- stopExperience: p,
3879
- getExperienceId: m,
3881
+ ...f,
3882
+ stopExperience: m,
3883
+ getExperienceId: h,
3880
3884
  getWindowReference: u,
3881
3885
  sendEvent: o("sendEvent"),
3882
3886
  sendCustomEvent: o("sendCustomEvent"),
@@ -3910,8 +3914,8 @@ var qr = (0, zr.default)((e, t) => {
3910
3914
  getRoot: i
3911
3915
  });
3912
3916
  },
3913
- ...h
3914
- } : h;
3917
+ ...g
3918
+ } : g;
3915
3919
  }, vi = "formData.", yi = "a, button, video, input, textarea, select, form", bi = (e, t) => {
3916
3920
  if (t.startsWith(vi)) {
3917
3921
  let n = t.replace(vi, "");
@@ -4098,7 +4102,7 @@ var qr = (0, zr.default)((e, t) => {
4098
4102
  return {
4099
4103
  createOverrideCallback: n,
4100
4104
  getOverrides: r,
4101
- applyOverrides: Y(({ step: t }) => ({ step: {
4105
+ applyOverrides: X(({ step: t }) => ({ step: {
4102
4106
  ...t,
4103
4107
  virtualizedContent: e(t.virtualizedContent, r)
4104
4108
  } })),
@@ -4658,8 +4662,8 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
4658
4662
  isCoreEvent: !0,
4659
4663
  localeName: e.context?.localeName || "default",
4660
4664
  localeId: e.context?.localeId || "default",
4661
- campaignId: e.campaignId ?? null,
4662
- tacticId: e.tacticId ?? null,
4665
+ ...e.campaignId != null && { campaignId: e.campaignId },
4666
+ ...e.tacticId != null && { tacticId: e.tacticId },
4663
4667
  timestamp: Date.now(),
4664
4668
  version: e.version,
4665
4669
  name: yo(n),
@@ -4735,7 +4739,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
4735
4739
  ...a,
4736
4740
  errorId: n
4737
4741
  });
4738
- }, f = Y((e, { type: t, name: n = "" }) => {
4742
+ }, f = X((e, { type: t, name: n = "" }) => {
4739
4743
  let r = t === "EXTENDED_EVENT" ? n : t;
4740
4744
  return { blockedEvents: {
4741
4745
  ...e.blockedEvents,
@@ -4763,7 +4767,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
4763
4767
  isEventEnabled: So
4764
4768
  }
4765
4769
  };
4766
- }, wo = Kt({
4770
+ }, wo = Gt({
4767
4771
  initial: "waitingForAsyncEvents",
4768
4772
  context: { runHooksDone: !1 },
4769
4773
  states: {
@@ -4772,21 +4776,21 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
4772
4776
  ERROR: "error",
4773
4777
  RUN_HOOKS_DONE: {
4774
4778
  target: "",
4775
- actions: Y({ runHooksDone: !0 })
4779
+ actions: X({ runHooksDone: !0 })
4776
4780
  }
4777
4781
  } },
4778
4782
  update_step: {
4779
4783
  always: [{
4780
4784
  target: "done",
4781
4785
  cond: (e) => e.runHooksDone,
4782
- actions: [X("RERENDER")]
4786
+ actions: [qt("RERENDER")]
4783
4787
  }],
4784
4788
  on: {
4785
4789
  UPDATE_STEP: "",
4786
4790
  ERROR: "error",
4787
4791
  RUN_HOOKS_DONE: {
4788
4792
  target: "done",
4789
- actions: [Y({ runHooksDone: !0 }), X("RERENDER")]
4793
+ actions: [X({ runHooksDone: !0 }), qt("RERENDER")]
4790
4794
  }
4791
4795
  }
4792
4796
  },
@@ -4794,20 +4798,20 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
4794
4798
  always: [{
4795
4799
  target: "done",
4796
4800
  cond: (e) => e.runHooksDone,
4797
- actions: [X("FORCE_ERROR")]
4801
+ actions: [qt("FORCE_ERROR")]
4798
4802
  }],
4799
4803
  on: {
4800
4804
  UPDATE_STEP: "",
4801
4805
  ERROR: "",
4802
4806
  RUN_HOOKS_DONE: {
4803
4807
  target: "done",
4804
- actions: [Y({ runHooksDone: !0 }), X("FORCE_ERROR")]
4808
+ actions: [X({ runHooksDone: !0 }), qt("FORCE_ERROR")]
4805
4809
  }
4806
4810
  }
4807
4811
  },
4808
4812
  done: { type: "final" }
4809
4813
  }
4810
- }), To = Kt({
4814
+ }), To = Gt({
4811
4815
  initial: "waitingForAsyncEvents",
4812
4816
  context: { runHooksDone: !1 },
4813
4817
  states: {
@@ -4815,18 +4819,18 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
4815
4819
  RECOVER_STEP: "recover_step",
4816
4820
  RUN_HOOKS_DONE: {
4817
4821
  target: "",
4818
- actions: Y({ runHooksDone: !0 })
4822
+ actions: X({ runHooksDone: !0 })
4819
4823
  }
4820
4824
  } },
4821
4825
  recover_step: {
4822
4826
  always: [{
4823
4827
  target: "done",
4824
4828
  cond: (e) => e.runHooksDone,
4825
- actions: [X("FORCE_RECOVER")]
4829
+ actions: [qt("FORCE_RECOVER")]
4826
4830
  }],
4827
4831
  on: { RUN_HOOKS_DONE: {
4828
4832
  target: "done",
4829
- actions: [Y({ runHooksDone: !0 }), X("FORCE_RECOVER")]
4833
+ actions: [X({ runHooksDone: !0 }), qt("FORCE_RECOVER")]
4830
4834
  } }
4831
4835
  },
4832
4836
  done: { type: "final" }
@@ -4859,20 +4863,20 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
4859
4863
  actions: ["saveStopReason", "addStoppedCallback"]
4860
4864
  }],
4861
4865
  PARENT_RECOVER_STEP: {
4862
- actions: ["stepRecovered"],
4866
+ actions: ["stepRecovered", "clearStepErrorEmitted"],
4863
4867
  target: "rendering",
4864
4868
  internal: !0
4865
4869
  },
4866
4870
  EXPERIENCE_DISMISSED: {
4867
4871
  target: "",
4868
- actions: ["experienceDismissed", X({
4872
+ actions: ["experienceDismissed", qt({
4869
4873
  type: xn,
4870
4874
  reason: Sn.DISMISSED
4871
4875
  })]
4872
4876
  },
4873
4877
  EXPERIENCE_SNOOZED: {
4874
4878
  target: "",
4875
- actions: ["experienceSnoozed", X({
4879
+ actions: ["experienceSnoozed", qt({
4876
4880
  type: xn,
4877
4881
  reason: Sn.DISMISSED
4878
4882
  })]
@@ -4922,9 +4926,9 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
4922
4926
  cond: "didContentChanged"
4923
4927
  }
4924
4928
  ],
4925
- [xn]: { actions: [X(xn)] },
4929
+ [xn]: { actions: [qt(xn)] },
4926
4930
  FORWARD_TO_PARENT: [{
4927
- actions: [X((e, { eventType: t, ...n }) => ({
4931
+ actions: [qt((e, { eventType: t, ...n }) => ({
4928
4932
  ...n,
4929
4933
  type: t
4930
4934
  }))],
@@ -5025,7 +5029,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5025
5029
  ERROR: {
5026
5030
  target: "error",
5027
5031
  internal: !0,
5028
- actions: "stepError"
5032
+ actions: "reportStepErrorOnce"
5029
5033
  },
5030
5034
  RUN_HOOKS_DONE: {
5031
5035
  target: "begin",
@@ -5039,7 +5043,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5039
5043
  ERROR: {
5040
5044
  target: "error",
5041
5045
  internal: !0,
5042
- actions: "stepError"
5046
+ actions: "reportStepErrorOnce"
5043
5047
  },
5044
5048
  RUN_HOOKS_DONE: {
5045
5049
  target: "rendering",
@@ -5088,7 +5092,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5088
5092
  target: "",
5089
5093
  actions: [
5090
5094
  Jt("postRenderAsyncEventsHandler"),
5091
- "stepError",
5095
+ "reportStepErrorOnce",
5092
5096
  "markErrorReported"
5093
5097
  ]
5094
5098
  },
@@ -5163,16 +5167,20 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5163
5167
  },
5164
5168
  FORCE_RECOVER: {
5165
5169
  target: "pre_begin",
5166
- actions: ["resetRender", "stepRecovered"]
5170
+ actions: [
5171
+ "resetRender",
5172
+ "stepRecovered",
5173
+ "clearStepErrorEmitted"
5174
+ ]
5167
5175
  },
5168
5176
  AUTO_RECOVER_STEP: {
5169
5177
  target: "pre_begin",
5170
- actions: "resetRender",
5178
+ actions: ["resetRender", "clearStepErrorEmitted"],
5171
5179
  cond: "isAutoRecoverEvent"
5172
5180
  }
5173
5181
  }
5174
5182
  },
5175
- destroyed: { entry: ["stepError", "unmount"] },
5183
+ destroyed: { entry: ["reportStepErrorOnce", "unmount"] },
5176
5184
  waitingPendingActions: { on: { ACTIONS_FINISHED: {
5177
5185
  target: "running_end_hooks",
5178
5186
  actions: "setActionsFinished"
@@ -5188,19 +5196,19 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5188
5196
  }), { addHook: T, runStepPreBeginHooks: E, runStepBeginHooks: D, runStepPreRenderHooks: O, runStepPostRenderHooks: k, runStepEndHooks: A, runStepErrorHooks: j, removeStepHooks: M, runStepContainerChangeHooks: N } = t({
5189
5197
  step: e,
5190
5198
  overrideStyle: m
5191
- }), P = Ei({ addHook: T }), F = Ti({
5199
+ }), P = Ei({ addHook: T }), ee = Ti({
5192
5200
  overrideStyle: m,
5193
5201
  getContainer: S,
5194
5202
  getRoot: w
5195
- }, i), I = n({
5203
+ }, i), F = n({
5196
5204
  overrideStyle: m,
5197
5205
  getContainer: S,
5198
5206
  getRoot: w
5199
- }, i), ee = Nr({
5207
+ }, i), I = Nr({
5200
5208
  getRoot: w,
5201
5209
  getWindowReference: h
5202
5210
  }), L = ii(i), R = Co(i), z = (e) => e.contentType === "text/html" ? o(vo(_o(e.content))) : s(e.content);
5203
- return Kt({
5211
+ return Gt({
5204
5212
  ...Eo,
5205
5213
  context: {
5206
5214
  id: `step-machine-${e.id}`,
@@ -5213,6 +5221,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5213
5221
  blockedEvents: {},
5214
5222
  pendingStepSeen: !1,
5215
5223
  errorReported: !1,
5224
+ stepErrorEmitted: !1,
5216
5225
  actionsRunning: !1,
5217
5226
  experienceInstanceId: a,
5218
5227
  stopReason: null,
@@ -5236,7 +5245,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5236
5245
  runStepErrorHooks: j,
5237
5246
  runStepContainerChangeHooks: N,
5238
5247
  updateStepContext: ei,
5239
- rebindActions: qt((e) => ({
5248
+ rebindActions: Kt((e) => ({
5240
5249
  type: lr,
5241
5250
  step: e.step,
5242
5251
  experience: e.experience
@@ -5253,31 +5262,37 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5253
5262
  notifyStepStopped: ni,
5254
5263
  ...R.stepActions,
5255
5264
  blockEvent: R.helpers.blockEvent,
5256
- queueStepSeen: Y({ pendingStepSeen: !0 }),
5257
- markErrorReported: Y({ errorReported: !0 }),
5258
- commitPendingStepSeen: Y((e) => (e.pendingStepSeen && !e.errorReported && R.stepActions.stepSeen(e), { pendingStepSeen: !1 })),
5265
+ queueStepSeen: X({ pendingStepSeen: !0 }),
5266
+ markErrorReported: X({ errorReported: !0 }),
5267
+ markStepErrorEmitted: X({ stepErrorEmitted: !0 }),
5268
+ clearStepErrorEmitted: X({ stepErrorEmitted: !1 }),
5269
+ reportStepErrorOnce: Ye([{
5270
+ cond: (e) => !e.stepErrorEmitted,
5271
+ actions: ["stepError", "markStepErrorEmitted"]
5272
+ }]),
5273
+ commitPendingStepSeen: X((e) => (e.pendingStepSeen && !e.errorReported && R.stepActions.stepSeen(e), { pendingStepSeen: !1 })),
5259
5274
  autoRecover: oi,
5260
5275
  setActionsRunning: si,
5261
5276
  setActionsFinished: ci,
5262
- saveStopReason: Y({ stopReason: (e, t) => t.reason }),
5263
- addStoppedCallback: Y({ stoppedCallbacks: (e, t) => t.onStopped ? [...e.stoppedCallbacks, t.onStopped] : e.stoppedCallbacks }),
5277
+ saveStopReason: X({ stopReason: (e, t) => t.reason }),
5278
+ addStoppedCallback: X({ stoppedCallbacks: (e, t) => t.onStopped ? [...e.stoppedCallbacks, t.onStopped] : e.stoppedCallbacks }),
5264
5279
  callStoppedCallbacks: (e) => e.stoppedCallbacks.forEach((e) => {
5265
5280
  try {
5266
5281
  e();
5267
5282
  } catch {}
5268
5283
  }),
5269
- deferTransitionToEnd: qt({ type: Vn }, { delay: 0 }),
5270
- saveChangedStepTraits: Y({ changedStepTraits: (e, t) => t.changedStepTraits ?? null }),
5271
- clearChangedStepTraits: Y({ changedStepTraits: () => null }),
5272
- saveChangedExperienceTraits: Y({ changedExperienceTraits: (e, t) => t.changedExperienceTraits ?? null }),
5273
- clearChangedExperienceTraits: Y({ changedExperienceTraits: () => null })
5284
+ deferTransitionToEnd: Kt({ type: Vn }, { delay: 0 }),
5285
+ saveChangedStepTraits: X({ changedStepTraits: (e, t) => t.changedStepTraits ?? null }),
5286
+ clearChangedStepTraits: X({ changedStepTraits: () => null }),
5287
+ saveChangedExperienceTraits: X({ changedExperienceTraits: (e, t) => t.changedExperienceTraits ?? null }),
5288
+ clearChangedExperienceTraits: X({ changedExperienceTraits: () => null })
5274
5289
  },
5275
5290
  services: {
5276
5291
  runStepTraits: P,
5277
5292
  render: v,
5278
- hooksService: I,
5279
- actionsService: F,
5280
- themeRemovalService: ee
5293
+ hooksService: F,
5294
+ actionsService: ee,
5295
+ themeRemovalService: I
5281
5296
  },
5282
5297
  guards: {
5283
5298
  hasCustomContainer: C,
@@ -5294,10 +5309,10 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5294
5309
  isHooksDoneEventErrorType: (e, t) => t.hookType === Zn,
5295
5310
  isHooksDoneEventEndType: (e, t) => t.hookType === Xn,
5296
5311
  hasPendingActions: (e) => e.actionsRunning,
5297
- shouldFireStepCompletedEvent: (e, t) => t.hookType === "step.end" && e.blockedEvents.STEP_SEEN && e.stopReason !== Sn.NAVIGATION && e.stopReason !== Sn.DISMISSED
5312
+ shouldFireStepCompletedEvent: (e, t) => t.hookType === "step.end" && e.blockedEvents.STEP_SEEN && e.stopReason !== Sn.NAVIGATION && e.stopReason !== Sn.DISMISSED && e.stopReason !== Sn.ERROR
5298
5313
  }
5299
5314
  });
5300
- }, Oo = ({ createStepHooks: e, createHooksService: t, get: n }) => Y({ stepMachines: ({ experience: r, experienceInstanceId: i }) => {
5315
+ }, Oo = ({ createStepHooks: e, createHooksService: t, get: n }) => X({ stepMachines: ({ experience: r, experienceInstanceId: i }) => {
5301
5316
  let a = {
5302
5317
  experience: r,
5303
5318
  experienceInstanceId: i,
@@ -5305,8 +5320,8 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5305
5320
  createHooksService: t,
5306
5321
  get: n
5307
5322
  };
5308
- return r.steps.reduce((e, t) => (e[`${t.id}`] = Ft(Do(t, a), `step-machine - ${t.id}`), e), {});
5309
- } }), ko = ({ createStepHooks: e, createHooksService: t, get: n }) => Y({ stepMachines: ({ experience: r, stepMachines: i }, a) => {
5323
+ return r.steps.reduce((e, t) => (e[`${t.id}`] = Pt(Do(t, a), `step-machine - ${t.id}`), e), {});
5324
+ } }), ko = ({ createStepHooks: e, createHooksService: t, get: n }) => X({ stepMachines: ({ experience: r, stepMachines: i }, a) => {
5310
5325
  let o = {
5311
5326
  experience: r,
5312
5327
  createStepHooks: e,
@@ -5315,7 +5330,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5315
5330
  }, s = r.steps.find((e) => e.id === a.id);
5316
5331
  return s ? {
5317
5332
  ...i,
5318
- [`${a.id}`]: Ft(Do(s, o), `step-machine - ${a.id}`)
5333
+ [`${a.id}`]: Pt(Do(s, o), `step-machine - ${a.id}`)
5319
5334
  } : i;
5320
5335
  } }), Ao = (e) => (t, { id: n, ...r }) => {
5321
5336
  t.stepMachines[n]?.send({
@@ -5351,7 +5366,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5351
5366
  return !t || t.type !== e.type ? !1 : !(0, vn.default)(t.config || {}, e.config || {});
5352
5367
  })
5353
5368
  };
5354
- }, zo = Y((e, t) => {
5369
+ }, zo = X((e, t) => {
5355
5370
  let n = Ro(e.experience.traits, t.experience.traits);
5356
5371
  return Object.entries(e.stepMachines).forEach(([r, i]) => {
5357
5372
  let a = e.experience.steps.find((e) => e.id === r), o = t.experience.steps.find((e) => e.id === r);
@@ -5369,7 +5384,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5369
5384
  Object.values(e.stepMachines).forEach((e) => {
5370
5385
  e.send({ type: ir });
5371
5386
  });
5372
- }, Vo = Y({ experienceInstanceId: () => gn() }), Ho = Y({ stepMachines: (e, t) => Object.entries(e.stepMachines).reduce((e, [n, r]) => (n !== t.id && (e[n] = r), e), {}) }), Uo = Y({ experience: ({ experience: e }, t) => {
5387
+ }, Vo = X({ experienceInstanceId: () => gn() }), Ho = X({ stepMachines: (e, t) => Object.entries(e.stepMachines).reduce((e, [n, r]) => (n !== t.id && (e[n] = r), e), {}) }), Uo = X({ experience: ({ experience: e }, t) => {
5373
5388
  let n = e.steps.findIndex((e) => e.id === t.id);
5374
5389
  return n === -1 ? e : dn(e, `steps.${n}.traits`, (e) => e.filter(({ once: e = !1 }) => !e));
5375
5390
  } }), Wo = ({ addHook: e }) => ({ experience: t }) => (n) => {
@@ -5394,7 +5409,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5394
5409
  callback: r,
5395
5410
  traitId: i
5396
5411
  }]);
5397
- }, Ko = (e, t) => qt((n, r) => {
5412
+ }, Ko = (e, t) => Kt((n, r) => {
5398
5413
  let i = t, a = r.changedExperienceTraits ?? n.changedExperienceTraits;
5399
5414
  a && (i = {
5400
5415
  ...i,
@@ -5411,7 +5426,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5411
5426
  step: n.step,
5412
5427
  ...i
5413
5428
  };
5414
- }, { to: "hooksService" }), qo = Ko(Wn), Jo = Ko(Gn), Yo = Ko(Kn), Xo = Ko(qn), Zo = Ko(Jn), Qo = Ko(Yn), $o = Ko(Xn), es = Je((e, t) => Ko(Zn, { errorEvent: t })), ts = Ko(Qn), ns = () => {
5429
+ }, { to: "hooksService" }), qo = Ko(Wn), Jo = Ko(Gn), Yo = Ko(Kn), Xo = Ko(qn), Zo = Ko(Jn), Qo = Ko(Yn), $o = Ko(Xn), es = qe((e, t) => Ko(Zn, { errorEvent: t })), ts = Ko(Qn), ns = () => {
5415
5430
  let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
5416
5431
  return {
5417
5432
  addHook: Go(() => e, (t, n) => e.set(t, n)),
@@ -5557,18 +5572,26 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5557
5572
  target: "",
5558
5573
  actions: ["reloadSteps"]
5559
5574
  },
5560
- STEP_STOPPED: [{
5561
- target: "end-final",
5562
- cond: "areAllStepsStopped",
5563
- actions: [
5564
- "experienceCompleted",
5565
- "removeGlobalThemeComponent",
5566
- "runExperienceEndHooks"
5567
- ]
5568
- }, {
5569
- target: "",
5570
- actions: ["cleanStepMachines", "cleanRunOnceTraits"]
5571
- }]
5575
+ STEP_STOPPED: [
5576
+ {
5577
+ target: "end-final",
5578
+ cond: "areAllStepsStoppedFromError",
5579
+ actions: ["removeGlobalThemeComponent", "runExperienceEndHooks"]
5580
+ },
5581
+ {
5582
+ target: "end-final",
5583
+ cond: "areAllStepsStopped",
5584
+ actions: [
5585
+ "experienceCompleted",
5586
+ "removeGlobalThemeComponent",
5587
+ "runExperienceEndHooks"
5588
+ ]
5589
+ },
5590
+ {
5591
+ target: "",
5592
+ actions: ["cleanStepMachines", "cleanRunOnceTraits"]
5593
+ }
5594
+ ]
5572
5595
  },
5573
5596
  entry: [
5574
5597
  "createGlobalThemeComponent",
@@ -5600,7 +5623,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5600
5623
  createHooksService: i,
5601
5624
  get: t
5602
5625
  }), u = Wo({ addHook: n }), d = Co(t), f = Or(t), p = kr(t), m = Mr(t);
5603
- return Kt({
5626
+ return Gt({
5604
5627
  ...rs,
5605
5628
  context: {
5606
5629
  experience: e,
@@ -5639,6 +5662,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
5639
5662
  guards: {
5640
5663
  isEventEnabled: d.helpers.isEventEnabled,
5641
5664
  areAllStepsStopped: (e) => Object.values(e.stepMachines).every((e) => e.state.done),
5665
+ areAllStepsStoppedFromError: (e, t) => t.reason === Sn.ERROR && Object.values(e.stepMachines).every((e) => e.state.done),
5642
5666
  doesStepInstanceExist: (e, t) => e.stepMachines?.[t.id] !== void 0,
5643
5667
  shouldFireCompletedEvent: (e, t) => t.reason !== Sn.NAVIGATION && t.reason !== Sn.DISMISSED
5644
5668
  }
@@ -6894,13 +6918,13 @@ var Al = {
6894
6918
  this.set(r[0], r[1]);
6895
6919
  }
6896
6920
  }
6897
- function F() {
6921
+ function ee() {
6898
6922
  this.__data__ = N ? N(null) : {};
6899
6923
  }
6900
- function I(e) {
6924
+ function F(e) {
6901
6925
  return this.has(e) && delete this.__data__[e];
6902
6926
  }
6903
- function ee(e) {
6927
+ function I(e) {
6904
6928
  var t = this.__data__;
6905
6929
  if (N) {
6906
6930
  var n = t[e];
@@ -6916,7 +6940,7 @@ var Al = {
6916
6940
  var n = this.__data__;
6917
6941
  return n[e] = N && t === void 0 ? r : t, this;
6918
6942
  }
6919
- P.prototype.clear = F, P.prototype.delete = I, P.prototype.get = ee, P.prototype.has = L, P.prototype.set = R;
6943
+ P.prototype.clear = ee, P.prototype.delete = F, P.prototype.get = I, P.prototype.has = L, P.prototype.set = R;
6920
6944
  function z(e) {
6921
6945
  var t = -1, n = e ? e.length : 0;
6922
6946
  for (this.clear(); ++t < n;) {
@@ -6982,11 +7006,11 @@ var Al = {
6982
7006
  }
6983
7007
  ce.prototype.add = ce.prototype.push = le, ce.prototype.has = ue;
6984
7008
  function de(e, t) {
6985
- for (var n = e.length; n--;) if (ye(e[n][0], t)) return n;
7009
+ for (var n = e.length; n--;) if (ve(e[n][0], t)) return n;
6986
7010
  return -1;
6987
7011
  }
6988
7012
  function fe(e) {
6989
- return !be(e) || ge(e) ? !1 : (K(e) || y(e) ? k : c).test(_e(e));
7013
+ return !ye(e) || ge(e) ? !1 : (q(e) || y(e) ? k : c).test(_e(e));
6990
7014
  }
6991
7015
  function pe(e, t, r) {
6992
7016
  var i = -1, a = f, o = e.length, s = !0, c = [], l = c;
@@ -7007,7 +7031,7 @@ var Al = {
7007
7031
  }
7008
7032
  var me = M && 1 / b(new M([, -0]))[1] == i ? function(e) {
7009
7033
  return new M(e);
7010
- } : xe;
7034
+ } : be;
7011
7035
  function he(e, t) {
7012
7036
  var n = e.__data__;
7013
7037
  return G(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
@@ -7034,22 +7058,22 @@ var Al = {
7034
7058
  }
7035
7059
  return "";
7036
7060
  }
7037
- function ve(e) {
7061
+ function K(e) {
7038
7062
  return e && e.length ? pe(e) : [];
7039
7063
  }
7040
- function ye(e, t) {
7064
+ function ve(e, t) {
7041
7065
  return e === t || e !== e && t !== t;
7042
7066
  }
7043
- function K(e) {
7044
- var t = be(e) ? O.call(e) : "";
7067
+ function q(e) {
7068
+ var t = ye(e) ? O.call(e) : "";
7045
7069
  return t == a || t == o;
7046
7070
  }
7047
- function be(e) {
7071
+ function ye(e) {
7048
7072
  var t = typeof e;
7049
7073
  return !!e && (t == "object" || t == "function");
7050
7074
  }
7051
- function xe() {}
7052
- t.exports = ve;
7075
+ function be() {}
7076
+ t.exports = K;
7053
7077
  })), zl = /* @__PURE__ */ u(Ll(), 1), Bl = /* @__PURE__ */ u(Rl(), 1), Vl = (e, t, n, r) => {
7054
7078
  let i = `-${15 / 2}px`, { staticSide: a, rotation: o, shadowOpacity: s } = {
7055
7079
  top: {
@@ -7218,7 +7242,7 @@ var Yl = (e, t) => {
7218
7242
  return this;
7219
7243
  }
7220
7244
  };
7221
- } }), iu = "@appcues/overlay", au = {
7245
+ } }), iu = "@appcues/overlay", au = 500, ou = "top 200ms, left 200ms, right 200ms, bottom 200ms", su = {
7222
7246
  top: "top",
7223
7247
  "top-left": "top-start",
7224
7248
  "top-right": "top-end",
@@ -7232,7 +7256,7 @@ var Yl = (e, t) => {
7232
7256
  "left-bottom": "left-end",
7233
7257
  "left-top": "left-start",
7234
7258
  center: "top-start"
7235
- }, ou = (e) => {
7259
+ }, cu = (e) => {
7236
7260
  let t, n, r, i = [], a, o = () => {}, s;
7237
7261
  function c() {
7238
7262
  e();
@@ -7259,11 +7283,11 @@ var Yl = (e, t) => {
7259
7283
  };
7260
7284
  };
7261
7285
  Q(iu, ({ addHook: e, registerAction: t }) => {
7262
- let n, r, i, a = !1, o = !1, s, c, l, u, d, f, p, m, h = !1, g = "absolute", _, v;
7263
- e("step.begin", ({ onElementInserted: e, onElementRemoved: t, querySelector: y, reportError: b, step: x, updateStyle: S, getWindowReference: C, getTraitConfig: w, getContainer: T }) => {
7264
- let { traits: E } = x.getConfig(), { arrowId: D = "arrow", target: O, rootId: k, placement: A = "auto", distance: j, skidding: M, placementUnit: N = "pixels", shouldAutoCalculateZIndex: P = !0 } = w(), F = Hl(O.selector, E), I = E.find((e) => e.type === "@appcues/toggle")?.config?.startHidden ?? !0;
7265
- I || S(k, { position: "absolute" }), d = () => {
7266
- let e = x.querySelector(`#${k}`), t = x.querySelector(`#${D}`), n = eu(y(O.selector), O.filters);
7286
+ let n, r, i, a = !1, o = null, s = !1, c, l, u, d, f, p, m, h, g = !1, _ = "absolute", v, y;
7287
+ e("step.begin", ({ onElementInserted: e, onElementRemoved: t, querySelector: b, reportError: x, step: S, updateStyle: C, getWindowReference: w, getTraitConfig: T, getContainer: E }) => {
7288
+ let { traits: D } = S.getConfig(), { arrowId: O = "arrow", target: k, rootId: A, placement: j = "auto", distance: M, skidding: N, placementUnit: P = "pixels", shouldAutoCalculateZIndex: ee = !0 } = T(), F = Hl(k.selector, D), I = D.find((e) => e.type === "@appcues/toggle")?.config?.startHidden ?? !0;
7289
+ I || C(A, { position: "absolute" }), f = () => {
7290
+ let e = S.querySelector(`#${A}`), t = S.querySelector(`#${O}`), n = eu(b(k.selector), k.filters);
7267
7291
  return {
7268
7292
  matchingElements: n,
7269
7293
  targetEl: n[0],
@@ -7271,75 +7295,77 @@ Q(iu, ({ addHook: e, registerAction: t }) => {
7271
7295
  arrowEl: t[0]
7272
7296
  };
7273
7297
  };
7274
- let ee = async () => {
7275
- let { targetEl: e, rootEl: t, arrowEl: n } = d();
7298
+ let L = async () => {
7299
+ let { targetEl: e, rootEl: t, arrowEl: n } = f();
7276
7300
  if (!a && e && t) {
7277
7301
  a = !0;
7278
- let r = Wl({
7279
- placement: A,
7302
+ let r = Date.now();
7303
+ o === null && (o = r);
7304
+ let i = r - o > au, s = Wl({
7305
+ placement: j,
7280
7306
  targetEl: e,
7281
- distance: j,
7282
- skidding: M,
7283
- placementUnit: N
7284
- }), i = [jl(({ placement: e }) => ({
7285
- ...r,
7286
- crossAxis: n && /start|end/gm.test(e) ? Ul(M, e) : r.crossAxis
7307
+ distance: M,
7308
+ skidding: N,
7309
+ placementUnit: P
7310
+ }), c = [jl(({ placement: e }) => ({
7311
+ ...s,
7312
+ crossAxis: n && /start|end/gm.test(e) ? Ul(N, e) : s.crossAxis
7287
7313
  }))];
7288
- A === "auto" && i.push(Nl(), Ml({ crossAxis: !0 })), n && i.push(Fl({
7314
+ j === "auto" && c.push(Nl(), Ml({ crossAxis: !0 })), n && c.push(Fl({
7289
7315
  element: n,
7290
7316
  padding: 10
7291
7317
  }));
7292
- let o = C(), s = nu(e, o), c = F != null && tu(F.config.target.selector), l = s ? ru(e, o) : e;
7293
- !s && !c && i.push(Pl());
7294
- let { middlewareData: u, strategy: d, x: f, y: _, placement: v } = await Il(l, t, {
7295
- middleware: i,
7296
- placement: au[A] ?? "auto",
7297
- strategy: g
7298
- }), { referenceHidden: y } = u.hide ?? { referenceHidden: !1 };
7318
+ let l = w(), u = nu(e, l), d = F != null && tu(F.config.target.selector), f = u ? ru(e, l) : e;
7319
+ !u && !d && c.push(Pl());
7320
+ let { middlewareData: p, strategy: v, x: y, y: b, placement: x } = await Il(f, t, {
7321
+ middleware: c,
7322
+ placement: su[j] ?? "auto",
7323
+ strategy: _
7324
+ }), { referenceHidden: S } = p.hide ?? { referenceHidden: !1 };
7299
7325
  if (n) {
7300
- let { x: e, y: t } = u.arrow;
7301
- S(D, {
7302
- ...Vl(v, e, t),
7303
- transition: "top 200ms, left 200ms, right 200ms, bottom 200ms"
7326
+ let { x: e, y: t } = p.arrow;
7327
+ C(O, {
7328
+ ...Vl(x, e, t),
7329
+ transition: i ? ou : "none"
7304
7330
  });
7305
7331
  }
7306
- let b = Xl({
7332
+ let T = Xl({
7307
7333
  targetEl: e,
7308
7334
  rootStyle: {
7309
- left: `${f}px`,
7310
- position: d,
7311
- top: `${_}px`
7335
+ left: `${y}px`,
7336
+ position: v,
7337
+ top: `${b}px`
7312
7338
  },
7313
- shouldAutoCalculateZIndex: P,
7314
- getWindowReference: C
7339
+ shouldAutoCalculateZIndex: ee,
7340
+ getWindowReference: w
7315
7341
  });
7316
- e.style.visibility === "hidden" && (b.visibility = "hidden", m = e.style.visibility), y && t.style.visibility !== "hidden" && (p = t.style.visibility, h = !0, b.visibility = "hidden"), !y && h && (b.visibility = p ?? "visible", h = !1), !y && e.style.visibility !== "hidden" && e.style.visibility !== "" && m === "hidden" && (b.visibility = "visible"), A === "center" && (b.transform = "translate(-50%, 50%)"), b.transition = "top 200ms, left 200ms, right 200ms, bottom 200ms", S(k, b);
7342
+ e.style.visibility === "hidden" && (T.visibility = "hidden", h = e.style.visibility), S && t.style.visibility !== "hidden" && (m = t.style.visibility, g = !0, T.visibility = "hidden"), !S && g && (T.visibility = m ?? "visible", g = !1), !S && e.style.visibility !== "hidden" && e.style.visibility !== "" && h === "hidden" && (T.visibility = "visible"), j === "center" && (T.transform = "translate(-50%, 50%)"), T.transition = i ? ou : "none", C(A, T);
7317
7343
  }
7318
7344
  };
7319
- _ = () => {
7320
- a = !1, ee();
7321
- }, f = ou(_);
7322
- let L = () => eu(y(O.selector), O.filters), R = () => {
7323
- if (!F) return L();
7345
+ v = () => {
7346
+ a = !1, L();
7347
+ }, p = cu(v);
7348
+ let R = () => eu(b(k.selector), k.filters), z = () => {
7349
+ if (!F) return R();
7324
7350
  let { selector: e, filters: t } = F.config.target;
7325
- return eu(y(e), t);
7326
- }, z = () => F ? F.config.target.selector : O.selector;
7351
+ return eu(b(e), t);
7352
+ }, B = () => F ? F.config.target.selector : k.selector;
7327
7353
  r = () => {
7328
- s &&= (s(), void 0), s = e({
7329
- getTarget: R,
7354
+ c &&= (c(), void 0), c = e({
7355
+ getTarget: z,
7330
7356
  onInserted: async () => {
7331
- a = !1, o = !1, F && await new Promise((e) => {
7357
+ a = !1, s = !1, F && await new Promise((e) => {
7332
7358
  setTimeout(e, 0);
7333
- }), await n() && (o = !0);
7359
+ }), await n() && (s = !0);
7334
7360
  }
7335
7361
  });
7336
7362
  }, i = () => {
7337
- if (l &&= (l(), void 0), !u) return;
7338
- let t = u, n = v, r = !1, i = [], s = () => {
7363
+ if (u &&= (u(), void 0), !d) return;
7364
+ let t = d, n = y, r = !1, i = [], o = () => {
7339
7365
  i.forEach((e) => e()), i = [];
7340
7366
  }, c = () => {
7341
- r = !0, a = !1, o = !1, s(), l = void 0, x.recover({ errorId: n });
7342
- }, d = () => {
7367
+ r = !0, a = !1, s = !1, o(), u = void 0, S.recover({ errorId: n });
7368
+ }, l = () => {
7343
7369
  r || t().length !== 1 || c();
7344
7370
  };
7345
7371
  if (t().length === 1) {
@@ -7348,61 +7374,61 @@ Q(iu, ({ addHook: e, registerAction: t }) => {
7348
7374
  }
7349
7375
  i.push(e({
7350
7376
  getTarget: t,
7351
- onInserted: d
7377
+ onInserted: l
7352
7378
  }));
7353
- let f = () => d(), p = C().document;
7379
+ let f = () => l(), p = w().document;
7354
7380
  i.push(fr(p.body, f));
7355
- let m = T?.();
7356
- m && m !== p.body && i.push(fr(m, f)), l = s;
7381
+ let m = E?.();
7382
+ m && m !== p.body && i.push(fr(m, f)), u = o;
7357
7383
  }, n = async () => {
7358
- s && s(), c && c(), l &&= (l(), void 0);
7359
- let { matchingElements: e, rootEl: n } = d(), i = e.length === 1, o = e.length > 1, m = R(), _ = m.length === 1, y = m.length > 1, w = () => {
7360
- F || (c = t({
7361
- getTarget: L,
7384
+ c && c(), l && l(), u &&= (u(), void 0);
7385
+ let { matchingElements: e, rootEl: n } = f(), i = e.length === 1, o = e.length > 1, s = z(), h = s.length === 1, v = s.length > 1, b = () => {
7386
+ F || (l = t({
7387
+ getTarget: R,
7362
7388
  onRemoved: () => {
7363
- a = !1, v = b(`Target got removed => ${O.selector}`), u = L, f.remove();
7389
+ a = !1, y = x(`Target got removed => ${k.selector}`), d = R, p.remove();
7364
7390
  }
7365
7391
  }));
7366
7392
  };
7367
- if (i && !n) return v = b(`Could not find root element #${k} for overlay positioning.`), u = () => x.querySelector(`#${k}`), !1;
7368
- if (o) return v = b(`Found ${e.length} elements for selector ${O.selector}.`), u = L, !1;
7369
- if (y) return v = b(`Found ${m.length} elements for selector ${z()}.`), u = R, !1;
7370
- if (!i || !_) {
7371
- let e = z();
7372
- return m.length === 0 && tu(e) ? r() : (v = b(`Could not find element for selector ${e}.`), u = R), !1;
7393
+ if (i && !n) return y = x(`Could not find root element #${A} for overlay positioning.`), d = () => S.querySelector(`#${A}`), !1;
7394
+ if (o) return y = x(`Found ${e.length} elements for selector ${k.selector}.`), d = R, !1;
7395
+ if (v) return y = x(`Found ${s.length} elements for selector ${B()}.`), d = z, !1;
7396
+ if (!i || !h) {
7397
+ let e = B();
7398
+ return s.length === 0 && tu(e) ? r() : (y = x(`Could not find element for selector ${e}.`), d = z), !1;
7373
7399
  }
7374
7400
  if (i) {
7375
- let t = F ? m : null;
7401
+ let t = F ? s : null;
7376
7402
  if (I) {
7377
- if (nu(e[0], C())) g = "absolute";
7403
+ if (nu(e[0], w())) _ = "absolute";
7378
7404
  else {
7379
- let n = t != null && t[0] != null ? Gl(t[0].parentElement, C) : !1;
7380
- g = Gl(e[0]?.parentElement, C) || n ? "fixed" : "absolute";
7405
+ let n = t != null && t[0] != null ? Gl(t[0].parentElement, w) : !1;
7406
+ _ = Gl(e[0]?.parentElement, w) || n ? "fixed" : "absolute";
7381
7407
  }
7382
- S(k, { position: g });
7408
+ C(A, { position: _ });
7383
7409
  }
7384
- return await ee(), (nu(e[0], C()) || F != null && tu(F.config.target.selector)) && !h && S(k, { visibility: p ?? "visible" }), w(), u = void 0, f.setElements(e[0], n, t ? t[0] : null).start(), !0;
7410
+ return await L(), (nu(e[0], w()) || F != null && tu(F.config.target.selector)) && !g && C(A, { visibility: m ?? "visible" }), b(), d = void 0, p.setElements(e[0], n, t ? t[0] : null).start(), !0;
7385
7411
  }
7386
7412
  return !1;
7387
7413
  };
7388
7414
  }), e("step.postrender", async () => {
7389
- o || await n() && (o = !0);
7415
+ s || await n() && (s = !0);
7390
7416
  }), e("step.end", () => {
7391
- s && s(), c && c(), l &&= (l(), void 0), f.remove(), a = !1, o = !1;
7417
+ c && c(), l && l(), u &&= (u(), void 0), p.remove(), a = !1, s = !1, o = null;
7392
7418
  }), e("step.error", () => {
7393
- a = !1, o = !1, i && i();
7419
+ a = !1, s = !1, o = null, i && i();
7394
7420
  });
7395
7421
  }), Q("@appcues/persistent", ({ addHook: e }) => {
7396
7422
  e("experience.begin", ({ steps: e }) => {
7397
7423
  e.map((e) => e.start());
7398
7424
  });
7399
7425
  });
7400
- var su = {
7426
+ var lu = {
7401
7427
  left: "beforebegin",
7402
7428
  "inner-left": "afterbegin",
7403
7429
  right: "afterend",
7404
7430
  "inner-right": "beforeend"
7405
- }, cu = "@appcues/inline", lu = "appcues-hide", uu = `.${lu} { display: none !important; }`, du = ({ distanceUnit: e, yOffset: t, xOffset: n, targetEl: r }) => {
7431
+ }, uu = "@appcues/inline", du = "appcues-hide", fu = `.${du} { display: none !important; }`, pu = ({ distanceUnit: e, yOffset: t, xOffset: n, targetEl: r }) => {
7406
7432
  if (e !== "%" || !r) return {
7407
7433
  x: `${n}px`,
7408
7434
  y: `${t}px`
@@ -7413,13 +7439,13 @@ var su = {
7413
7439
  y: `${a * t / 100}px`
7414
7440
  };
7415
7441
  };
7416
- function fu({ addHook: e }) {
7442
+ function mu({ addHook: e }) {
7417
7443
  let t, n, r, i = [], a = [], o = null, s = null, c = (e) => {
7418
7444
  if (o) return;
7419
7445
  let { document: t } = e();
7420
- o = t.createElement("style"), o.textContent = uu, t.head.append(o);
7446
+ o = t.createElement("style"), o.textContent = fu, t.head.append(o);
7421
7447
  }, l = () => {
7422
- i.forEach((e) => e.classList.remove(lu)), i = [], a.forEach((e) => {
7448
+ i.forEach((e) => e.classList.remove(du)), i = [], a.forEach((e) => {
7423
7449
  let t = e.firstChild;
7424
7450
  t && e.replaceWith(t);
7425
7451
  }), a = [], o &&= (o.remove(), null);
@@ -7433,14 +7459,14 @@ function fu({ addHook: e }) {
7433
7459
  c(m);
7434
7460
  let { document: e } = m();
7435
7461
  Array.from(t.childNodes).forEach((t) => {
7436
- if (t.nodeType === Node.ELEMENT_NODE) t.classList.add(lu), i.push(t);
7462
+ if (t.nodeType === Node.ELEMENT_NODE) t.classList.add(du), i.push(t);
7437
7463
  else if (t.nodeType === Node.TEXT_NODE && t.textContent.trim()) {
7438
7464
  let n = e.createElement("span");
7439
- n.classList.add(lu), t.replaceWith(n), n.append(t), a.push(n);
7465
+ n.classList.add(du), t.replaceWith(n), n.append(t), a.push(n);
7440
7466
  }
7441
7467
  });
7442
7468
  } else for (; t.firstChild;) t.firstChild.remove();
7443
- if (t.insertAdjacentElement(su[g], n) == null) {
7469
+ if (t.insertAdjacentElement(lu[g], n) == null) {
7444
7470
  u(`can't insert inline container on the ${g}`);
7445
7471
  return;
7446
7472
  }
@@ -7458,7 +7484,7 @@ function fu({ addHook: e }) {
7458
7484
  let e = {
7459
7485
  display: C,
7460
7486
  verticalAlign: _
7461
- }, { x: t, y: n } = du({
7487
+ }, { x: t, y: n } = pu({
7462
7488
  distanceUnit: x,
7463
7489
  xOffset: y,
7464
7490
  yOffset: b,
@@ -7490,23 +7516,23 @@ function fu({ addHook: e }) {
7490
7516
  t && t(), n && n(), s &&= (s.remove(), null), l();
7491
7517
  });
7492
7518
  }
7493
- Q(cu, fu);
7494
- var pu = (e, t, n) => {
7519
+ Q(uu, mu);
7520
+ var hu = (e, t, n) => {
7495
7521
  let { height: r, width: i, left: a, top: o } = e.getBoundingClientRect();
7496
7522
  return Math.floor(Math.hypot(t - (a + i / 2), n - (o + r / 2)) / 2);
7497
- }, mu = (e, t) => {
7523
+ }, gu = (e, t) => {
7498
7524
  let { height: n, width: r } = e.getBoundingClientRect(), i = Math.floor(Math.hypot(n, r) / 4);
7499
7525
  return Math.max(t, 0) + i;
7500
- }, hu = (e) => e.key === "Escape", gu = (e, t) => ![...e.composedPath()].filter((e) => e.nodeType === Node.ELEMENT_NODE).some((e) => e?.contains?.(t) ?? !1), _u = (e, t) => ({
7526
+ }, _u = (e) => e.key === "Escape", vu = (e, t) => ![...e.composedPath()].filter((e) => e.nodeType === Node.ELEMENT_NODE).some((e) => e?.contains?.(t) ?? !1), yu = (e, t) => ({
7501
7527
  remove: () => {
7502
7528
  e.removeEventListener("keydown", t), e.removeEventListener("click", t, !0);
7503
7529
  },
7504
7530
  start: () => {
7505
7531
  e.addEventListener("click", t, !0), e.addEventListener("keydown", t);
7506
7532
  }
7507
- }), vu = (e, t, n) => t.length === 0 ? (n("Element not found"), !1) : t.length > 1 ? (n(`More than one element found with id: ${e}`), !1) : !0, yu = "@appcues/toggle.style", bu = ({ targetId: e, styles: t = {} }, { updateStyle: n }) => {
7533
+ }), bu = (e, t, n) => t.length === 0 ? (n("Element not found"), !1) : t.length > 1 ? (n(`More than one element found with id: ${e}`), !1) : !0, xu = "@appcues/toggle.style", Su = ({ targetId: e, styles: t = {} }, { updateStyle: n }) => {
7508
7534
  n(e, t);
7509
- }, xu = { [yu]: bu };
7535
+ }, Cu = { [xu]: Su };
7510
7536
  Q("@appcues/toggle", ({ addHook: e, registerAction: t }, { startHidden: n = !0, targetId: r, transition: i, closeOnClickOutside: a = !0, closeRadius: o }) => {
7511
7537
  let s, c, l, u = !1, d = [], f = null, p = [], m = () => {
7512
7538
  d.forEach((e) => e.remove()), d = [];
@@ -7524,7 +7550,7 @@ Q("@appcues/toggle", ({ addHook: e, registerAction: t }, { startHidden: n = !0,
7524
7550
  });
7525
7551
  let h = ({ on: e } = {}, t) => {
7526
7552
  let { reportError: n, step: c, updateStyle: l, getWindowReference: d } = t, f = d().document;
7527
- if (!vu(r, c.querySelector(`#${r}`), n)) return;
7553
+ if (!bu(r, c.querySelector(`#${r}`), n)) return;
7528
7554
  a && m();
7529
7555
  let h = {};
7530
7556
  i || (h.visibility = "hidden", h["pointer-events"] = "none"), l(r, {
@@ -7537,32 +7563,32 @@ Q("@appcues/toggle", ({ addHook: e, registerAction: t }, { startHidden: n = !0,
7537
7563
  });
7538
7564
  }, i.duration * 1e3), o && u && (Ql(f, "mousemove", s), p.forEach((e) => {
7539
7565
  e.contentDocument?.body && Ql(e.contentDocument.body, "mousemove", s);
7540
- }), u = !1), e?.close?.forEach((e) => xu[e.type](e.config, t));
7566
+ }), u = !1), e?.close?.forEach((e) => Cu[e.type](e.config, t));
7541
7567
  }, g = ({ on: e } = {}, t) => {
7542
7568
  let { reportError: n, step: m, updateStyle: g, getWindowReference: _ } = t, v = _().document, y = m.querySelector(`#${r}`);
7543
- if (!vu(r, y, n)) return;
7569
+ if (!bu(r, y, n)) return;
7544
7570
  let b = {};
7545
7571
  if (i && (b.transition = `opacity ${i.duration}s ${i.easing}`), g(r, {
7546
7572
  ...b,
7547
7573
  visibility: "visible",
7548
7574
  opacity: "1",
7549
7575
  "pointer-events": "auto"
7550
- }), e?.open?.forEach((e) => xu[e.type](e.config, t)), a && d.length === 0) {
7576
+ }), e?.open?.forEach((e) => Cu[e.type](e.config, t)), a && d.length === 0) {
7551
7577
  let n = m.querySelector(":first-child")[0];
7552
7578
  l = (n) => {
7553
- (hu(n) || gu(n, y[0])) && h({ on: e }, t);
7579
+ (_u(n) || vu(n, y[0])) && h({ on: e }, t);
7554
7580
  };
7555
- let r = p.map((e) => e.contentDocument?.body ? _u(e.contentDocument.body, l) : null).filter(Boolean);
7556
- d.push(_u(v, l), _u(n, l), ...r), d.forEach((e) => e.start());
7581
+ let r = p.map((e) => e.contentDocument?.body ? yu(e.contentDocument.body, l) : null).filter(Boolean);
7582
+ d.push(yu(v, l), yu(n, l), ...r), d.forEach((e) => e.start());
7557
7583
  }
7558
7584
  if (f || (c = (n) => {
7559
7585
  if (n.type === "keydown" && !["Enter", " "].includes(n.key)) return;
7560
7586
  let r = [...n.composedPath()];
7561
7587
  ["a", "button"].includes(r[0].tagName.toLowerCase()) && h({ on: e }, t);
7562
- }, f = _u(y[0], c), f.start()), o && !u) {
7563
- let t = mu(y[0], o);
7588
+ }, f = yu(y[0], c), f.start()), o && !u) {
7589
+ let t = gu(y[0], o);
7564
7590
  s = (0, zl.default)((r) => {
7565
- pu(y[0], r.clientX, r.clientY) > t && h({ on: e }, {
7591
+ hu(y[0], r.clientX, r.clientY) > t && h({ on: e }, {
7566
7592
  reportError: n,
7567
7593
  step: m,
7568
7594
  updateStyle: g,
@@ -7575,14 +7601,14 @@ Q("@appcues/toggle", ({ addHook: e, registerAction: t }, { startHidden: n = !0,
7575
7601
  };
7576
7602
  t("run", ({ on: e } = {}, t) => {
7577
7603
  let { step: n, reportError: i, getWindowReference: a } = t, o = n.querySelector(`#${r}`);
7578
- if (vu(r, o, i)) {
7604
+ if (bu(r, o, i)) {
7579
7605
  if (a().getComputedStyle(o[0]).visibility === "hidden") {
7580
7606
  g({ on: e }, t);
7581
7607
  return;
7582
7608
  }
7583
7609
  h({ on: e }, t);
7584
7610
  }
7585
- }), t("open", g), t("close", h), t("style", bu);
7611
+ }), t("open", g), t("close", h), t("style", Su);
7586
7612
  }), Q("@appcues/coreEvents", ({ registerAction: e }) => {
7587
7613
  e("step_seen", (e, { step: t }) => {
7588
7614
  t.seen();
@@ -7596,7 +7622,7 @@ Q("@appcues/toggle", ({ addHook: e, registerAction: t }, { startHidden: n = !0,
7596
7622
  t.snoozeExperience();
7597
7623
  });
7598
7624
  });
7599
- var Su = (e, t = {}, n = () => window) => {
7625
+ var wu = (e, t = {}, n = () => window) => {
7600
7626
  let r = t, i = [], a = n().document, o = (e) => {
7601
7627
  let { el: t, callbackFn: n } = e.detail;
7602
7628
  i.push([t, n]), t[n].apply(e.target, [r]);
@@ -7619,14 +7645,14 @@ var Su = (e, t = {}, n = () => window) => {
7619
7645
  Q("@appcues/store", ({ addHook: e, registerAction: t }, { id: n, initialState: r = {} }) => {
7620
7646
  let i;
7621
7647
  e("step.begin", ({ getWindowReference: e }) => {
7622
- i = Su(n, r, e);
7648
+ i = wu(n, r, e);
7623
7649
  }), e("step.end", () => {
7624
7650
  i && i.destroy();
7625
7651
  }), t("setState", ({ stateKey: e }, t, n) => {
7626
7652
  i && i.setState({ [e]: n?.detail });
7627
7653
  });
7628
7654
  });
7629
- var Cu = {
7655
+ var Tu = {
7630
7656
  slide_in_down: [{
7631
7657
  transform: "translate3d(0, -100%, 0)",
7632
7658
  visibility: "visible"
@@ -7654,15 +7680,15 @@ var Cu = {
7654
7680
  { transform: "scale3d(1.05, 1.05, 1.05)" },
7655
7681
  { transform: "scale3d(1, 1, 1)" }
7656
7682
  ]
7657
- }, wu = "@appcues/animate", Tu = 500, Eu = "none", Du = "button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])", Ou = (e) => {
7683
+ }, Eu = "@appcues/animate", Du = 500, Ou = "none", ku = "button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])", Au = (e) => {
7658
7684
  let t = e?.activeElement;
7659
7685
  for (; t?.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
7660
7686
  return t;
7661
- }, ku = /* @__PURE__ */ new WeakMap(), Au = (e) => {
7662
- let t = Cu[e?.effect] || e?.keyframes, n = Array.isArray(t) ? t[t.length - 1] : null;
7687
+ }, ju = /* @__PURE__ */ new WeakMap(), Mu = (e) => {
7688
+ let t = Tu[e?.effect] || e?.keyframes, n = Array.isArray(t) ? t[t.length - 1] : null;
7663
7689
  return n ? Number(n.opacity) === 0 || n.visibility === "hidden" || n.display === "none" : !1;
7664
- }, ju = (e, t) => new Promise((n) => {
7665
- let { keyframes: r, duration: i = Tu, iterations: a, effect: o, fill: s = Eu, easing: c = "linear", composite: l } = t, u = Cu[o] || r, d = {
7690
+ }, Nu = (e, t) => new Promise((n) => {
7691
+ let { keyframes: r, duration: i = Du, iterations: a, effect: o, fill: s = Ou, easing: c = "linear", composite: l } = t, u = Tu[o] || r, d = {
7666
7692
  duration: i,
7667
7693
  iterations: a,
7668
7694
  fill: s,
@@ -7676,25 +7702,31 @@ var Cu = {
7676
7702
  let f = e.animate(u, d);
7677
7703
  f?.addEventListener ? f.addEventListener("finish", n, { once: !0 }) : n();
7678
7704
  });
7679
- Q(wu, ({ addHook: e, registerAction: t }, n) => {
7680
- n.phase === "exit" ? e("step.end", ({ querySelector: e }) => {
7705
+ Q(Eu, ({ addHook: e, registerAction: t }, n) => {
7706
+ if (n.phase === "exit") e("step.end", ({ querySelector: e }) => {
7681
7707
  let { target: t } = n;
7682
7708
  if (!t) return;
7683
7709
  let r = e(t.selector);
7684
- if (r.length !== 0) return ju(r[0], n);
7685
- }) : e("step.postrender", ({ querySelector: e }) => {
7686
- let { target: t } = n;
7687
- if (!t) return;
7688
- let r = e(t.selector);
7689
- r.length !== 0 && ju(r[0], n);
7690
- }), t("toggle", ({ toggleGroupId: e, target: t, animations: n, autoFocus: r = !0 }, { querySelector: i, getWindowReference: a }) => {
7710
+ if (r.length !== 0) return Nu(r[0], n);
7711
+ });
7712
+ else {
7713
+ let t = !1;
7714
+ e("step.postrender", ({ querySelector: e }) => {
7715
+ if (t) return;
7716
+ let { target: r } = n;
7717
+ if (!r) return;
7718
+ let i = e(r.selector);
7719
+ i.length !== 0 && (t = !0, Nu(i[0], n));
7720
+ });
7721
+ }
7722
+ t("toggle", ({ toggleGroupId: e, target: t, animations: n, autoFocus: r = !0 }, { querySelector: i, getWindowReference: a }) => {
7691
7723
  let o = i(t.selector);
7692
7724
  if (o.length === 0) return;
7693
7725
  let [s] = o, c = s.getAttribute(e) === n[0].id ? n[1] : n[0];
7694
7726
  if (!c) return;
7695
- let l = Au(c);
7727
+ let l = Mu(c);
7696
7728
  l || (s.inert = !1);
7697
- let u = r ? Ou(a?.()?.document) : null, d = ju(s, c);
7729
+ let u = r ? Au(a?.()?.document) : null, d = Nu(s, c);
7698
7730
  c.id && s.setAttribute(e, c.id);
7699
7731
  let f = () => c.id != null && s.getAttribute(e) !== c.id;
7700
7732
  if (!r) {
@@ -7705,9 +7737,9 @@ Q(wu, ({ addHook: e, registerAction: t }, n) => {
7705
7737
  }
7706
7738
  d.then(() => {
7707
7739
  if (!f()) if (l) {
7708
- let e = ku.get(s);
7709
- e?.isConnected && e.focus({ preventScroll: !0 }), ku.delete(s), s.inert = !0;
7710
- } else u && ku.set(s, u), (s.querySelector(Du) ?? s).focus({ preventScroll: !0 });
7740
+ let e = ju.get(s);
7741
+ e?.isConnected && e.focus({ preventScroll: !0 }), ju.delete(s), s.inert = !0;
7742
+ } else u && ju.set(s, u), (s.querySelector(ku) ?? s).focus({ preventScroll: !0 });
7711
7743
  });
7712
7744
  }), t("run", async (e, t) => {
7713
7745
  let { querySelector: n, getAction: r } = t, { toggleGroupId: i, target: a, animation: o, ignoreToggleGroup: s = !1, onFinish: c = [] } = e;
@@ -7715,17 +7747,17 @@ Q(wu, ({ addHook: e, registerAction: t }, n) => {
7715
7747
  let l = n(a.selector);
7716
7748
  if (l.length === 0) return;
7717
7749
  let u = l[0], d = u.getAttribute(i);
7718
- (!d || d === o.id) && !s || (await ju(u, o ?? e), c.forEach((e) => {
7750
+ (!d || d === o.id) && !s || (await Nu(u, o ?? e), c.forEach((e) => {
7719
7751
  r(e.type)(e?.config ?? {}, t);
7720
7752
  }), s || u.setAttribute(i, o.id));
7721
7753
  });
7722
7754
  });
7723
- var Mu = {
7755
+ var Pu = {
7724
7756
  pixels: "px",
7725
7757
  percentage: "%"
7726
7758
  };
7727
- function Nu(e, t, n, r) {
7728
- let i = Mu[n] || "px";
7759
+ function Fu(e, t, n, r) {
7760
+ let i = Pu[n] || "px";
7729
7761
  switch (e) {
7730
7762
  case "left": return {
7731
7763
  left: 0,
@@ -7744,8 +7776,8 @@ function Nu(e, t, n, r) {
7744
7776
  };
7745
7777
  }
7746
7778
  }
7747
- function Pu(e, t, n, r) {
7748
- let i = Mu[n] || "px";
7779
+ function Iu(e, t, n, r) {
7780
+ let i = Pu[n] || "px";
7749
7781
  switch (e) {
7750
7782
  case "top": return {
7751
7783
  top: 0,
@@ -7768,7 +7800,7 @@ Q("@appcues/floating", ({ addHook: e }) => {
7768
7800
  e("step.begin", ({ getTraitConfig: e, updateStyle: t, updateRootStyle: n }) => {
7769
7801
  let { target: r, strategy: i = "fixed", xOffset: a = 0, yOffset: o = 0, xPosition: s = "left", yPosition: c = "top", placementUnit: l = "pixels", unsetOppositeDirection: u = !1, applyToRoot: d = !1 } = e(), f = {
7770
7802
  position: i,
7771
- ...[Nu(s, a, l, u), Pu(c, o, l, u)].reduce((e, t) => {
7803
+ ...[Fu(s, a, l, u), Iu(c, o, l, u)].reduce((e, t) => {
7772
7804
  let { transform: n, ...r } = t;
7773
7805
  return n && (e.transform = e.transform ? `${e.transform} ${n}` : n), {
7774
7806
  ...e,
@@ -7783,18 +7815,18 @@ Q("@appcues/floating", ({ addHook: e }) => {
7783
7815
  t(r.selector, f);
7784
7816
  });
7785
7817
  });
7786
- var Fu = "@appcues/dismissible";
7787
- function Iu(e) {
7818
+ var Lu = "@appcues/dismissible";
7819
+ function Ru(e) {
7788
7820
  return `_experience_dismissed_${e}`;
7789
7821
  }
7790
- Q(Fu, ({ addHook: e, registerAction: t }, { strategy: n = "permanent" }) => {
7822
+ Q(Lu, ({ addHook: e, registerAction: t }, { strategy: n = "permanent" }) => {
7791
7823
  function r(e, t) {
7792
- return n === "session" ? t().sessionStorage.getItem(Iu(e)) === "1" : !1;
7824
+ return n === "session" ? t().sessionStorage.getItem(Ru(e)) === "1" : !1;
7793
7825
  }
7794
7826
  e("experience.begin", ({ stopExperience: e, getExperienceId: t, getWindowReference: n }) => {
7795
7827
  r(t(), n) && e();
7796
7828
  }), t("dismiss", (e, { stopExperience: t, updateUserProfile: r, getExperienceId: i, getWindowReference: a }) => {
7797
- let o = Iu(i());
7829
+ let o = Ru(i());
7798
7830
  n === "session" ? a().sessionStorage.setItem(o, "1") : n === "permanent" && r({ [o]: "permanently_dismissed" }), t();
7799
7831
  });
7800
7832
  }), Q("@appcues/experienceStyle", ({ addHook: e }) => {
@@ -7806,36 +7838,36 @@ Q(Fu, ({ addHook: e, registerAction: t }, { strategy: n = "permanent" }) => {
7806
7838
  e(Object.keys(t()).reduce((e, t) => (e[t] = null, e), {}), { forceUpdate: !0 });
7807
7839
  });
7808
7840
  });
7809
- var Lu = "@appcues/rootStyle", Ru = ({ getTraitConfig: e, updateRootStyle: t }) => {
7841
+ var zu = "@appcues/rootStyle", Bu = ({ getTraitConfig: e, updateRootStyle: t }) => {
7810
7842
  let { forceUpdate: n = !1, ...r } = e();
7811
7843
  t(r, { forceUpdate: n });
7812
7844
  };
7813
- function zu({ addHook: e }) {
7814
- e("step.begin", Ru), e("step.container_change", Ru);
7845
+ function Vu({ addHook: e }) {
7846
+ e("step.begin", Bu), e("step.container_change", Bu);
7815
7847
  }
7816
- Q(Lu, zu);
7817
- var Bu = "appcues:launchpad_close", Vu = "appcues:launchpad_search", Hu = "appcues:launchpad_search_error", Uu = "appcues:launchpad_search_response", Wu = function(e, t) {
7848
+ Q(zu, Vu);
7849
+ var Hu = "appcues:launchpad_close", Uu = "appcues:launchpad_search", Wu = "appcues:launchpad_search_error", Gu = "appcues:launchpad_search_response", Ku = function(e, t) {
7818
7850
  return window.addEventListener(e, t), function() {
7819
7851
  return window.removeEventListener(e, t);
7820
7852
  };
7821
- }, Gu = function(e) {
7822
- return Wu(Bu, e);
7823
- }, Ku = function(e, t, n) {
7824
- var r = new CustomEvent(Vu, { detail: {
7853
+ }, qu = function(e) {
7854
+ return Ku(Hu, e);
7855
+ }, Ju = function(e, t, n) {
7856
+ var r = new CustomEvent(Uu, { detail: {
7825
7857
  integrationId: e,
7826
7858
  query: t,
7827
7859
  experienceId: n
7828
7860
  } });
7829
7861
  window.dispatchEvent(r);
7830
- }, qu = function(e, t) {
7831
- return Wu(`${Uu}:${e}`, t);
7832
- }, Ju = function(e, t) {
7833
- return Wu(`${Hu}:${e}`, t);
7862
+ }, Yu = function(e, t) {
7863
+ return Ku(`${Gu}:${e}`, t);
7864
+ }, Xu = function(e, t) {
7865
+ return Ku(`${Wu}:${e}`, t);
7834
7866
  };
7835
7867
  Q("@appcues/sdk-middleware-events", ({ addHook: e }, { onLaunchpadClose: t }) => {
7836
7868
  let n;
7837
7869
  e("step.begin", (e) => {
7838
- n = Gu(() => {
7870
+ n = qu(() => {
7839
7871
  t.forEach((t) => {
7840
7872
  e.getAction(t.type)?.(t.config, e);
7841
7873
  });
@@ -7844,82 +7876,82 @@ Q("@appcues/sdk-middleware-events", ({ addHook: e }, { onLaunchpadClose: t }) =>
7844
7876
  n?.();
7845
7877
  });
7846
7878
  });
7847
- var Yu = "@appcues/knowledge-base-integration", Xu = (e, { querySelector: t, reportError: n }) => {
7879
+ var Zu = "@appcues/knowledge-base-integration", Qu = (e, { querySelector: t, reportError: n }) => {
7848
7880
  let r = t(e), i = r.length > 1, a = r.length === 0;
7849
7881
  return i && n("The target element is duplicated, please provide a more specific selector"), a && n("The target element is not found"), r[0];
7850
7882
  };
7851
- Q(Yu, ({ addHook: e, registerAction: t }, n) => {
7883
+ Q(Zu, ({ addHook: e, registerAction: t }, n) => {
7852
7884
  let { integrationConnected: r = !1 } = n, i, a, o, s, c, l = () => {
7853
7885
  r && a?.prev();
7854
7886
  }, u = (e) => {
7855
7887
  if (!r) return;
7856
7888
  let { integrationId: t } = n, { inputValue: l } = e.detail;
7857
- o.setAttribute("searchTerm", l), o.setAttribute("state", "loading"), i.setAttribute("loading", !0), s && (s.scrollTop = 0), a?.next(), Ku(t, l, c);
7889
+ o.setAttribute("searchTerm", l), o.setAttribute("state", "loading"), i.setAttribute("loading", !0), s && (s.scrollTop = 0), a?.next(), Ju(t, l, c);
7858
7890
  };
7859
7891
  e("step.begin", ({ getExperienceId: e }) => {
7860
- c = e(), qu(c, (e) => {
7892
+ c = e(), Yu(c, (e) => {
7861
7893
  let t = e.detail, n = t.results?.length === 0 ? "empty" : "showing_results";
7862
7894
  o.setAttribute("state", n), o.setAttribute("results", JSON.stringify(t.results)), i.setAttribute("loading", !1);
7863
- }), Ju(c, () => {
7895
+ }), Xu(c, () => {
7864
7896
  o.setAttribute("state", "error"), i.setAttribute("loading", !1);
7865
7897
  });
7866
7898
  }), e("step.end", () => {
7867
7899
  i?.removeEventListener("onSearch", u), i?.removeEventListener("onCancel", l);
7868
7900
  }), t("bindListeners", (e, t) => {
7869
7901
  let { navigation: r } = n;
7870
- (!a || !i) && (a = Xu(r.selector, t), i = Xu("appcues-search-header", t), o = Xu("appcues-search-results", t), s = Xu("#launchpad-container", t), i?.addEventListener("onSearch", u), i?.addEventListener("onCancel", l));
7902
+ (!a || !i) && (a = Qu(r.selector, t), i = Qu("appcues-search-header", t), o = Qu("appcues-search-results", t), s = Qu("#launchpad-container", t), i?.addEventListener("onSearch", u), i?.addEventListener("onCancel", l));
7871
7903
  });
7872
7904
  });
7873
- var Zu = "@appcues/sequential", Qu = (e, t) => e.findIndex((e) => e.getConfig()?.id === t);
7874
- Q(Zu, ({ addHook: e, registerAction: t }) => {
7875
- let n;
7905
+ var $u = "@appcues/sequential", ed = (e, t) => e.findIndex((e) => e.getConfig()?.id === t);
7906
+ Q($u, ({ addHook: e, registerAction: t }) => {
7907
+ let n, r = "forward", i = (e, { steps: t }, i) => {
7908
+ r = "backward", n !== 0 && t[n].stop(() => {
7909
+ --n, t[n].start();
7910
+ }, i);
7911
+ }, a = (e, { steps: t }, i) => {
7912
+ if (r = "forward", n === t.length - 1) {
7913
+ t[n].stop(void 0, i);
7914
+ return;
7915
+ }
7916
+ t[n].stop(() => {
7917
+ n += 1, t[n].start();
7918
+ }, i);
7919
+ };
7876
7920
  e("experience.begin", ({ steps: e, getTraitConfig: t, reportError: r }) => {
7877
7921
  let { startStepId: i } = t() ?? {};
7878
7922
  if (i) {
7879
- let t = Qu(e, i);
7923
+ let t = ed(e, i);
7880
7924
  t === -1 && r(`startStepId "${i}" did not match any step; starting at 0`), n = t === -1 ? 0 : t;
7881
7925
  } else n = 0;
7882
7926
  e[n].start();
7883
- }), t("next", (e, { steps: t }) => {
7884
- if (n === t.length - 1) {
7885
- t[n].stop();
7886
- return;
7887
- }
7888
- t[n].stop(() => {
7889
- n += 1, t[n].start();
7890
- });
7891
- }), t("prev", (e, { steps: t }) => {
7892
- n !== 0 && t[n].stop(() => {
7893
- --n, t[n].start();
7894
- });
7895
- }), t("goTo", (e, { step: t, steps: r }) => {
7896
- let i = Qu(r, e.stepId);
7897
- i !== -1 && t.stop(() => {
7898
- n = i, r[n].start();
7899
- });
7900
- });
7927
+ }), t("next", a), t("prev", i), t("goTo", (e, { step: t, steps: i }, a) => {
7928
+ let o = ed(i, e.stepId);
7929
+ o !== -1 && (r = "forward", t.stop(() => {
7930
+ n = o, i[n].start();
7931
+ }, a));
7932
+ }), t("skip", (e, t, n) => r === "backward" ? i(e, t, n) : a(e, t, n));
7901
7933
  });
7902
- var $u = "@appcues/delay", ed = 3e5;
7903
- Q($u, ({ addHook: e }, t) => {
7934
+ var td = "@appcues/delay", nd = 3e5;
7935
+ Q(td, ({ addHook: e }, t) => {
7904
7936
  let n = null;
7905
7937
  e("step.begin", () => {
7906
7938
  let e = t?.duration;
7907
7939
  if (!e) return;
7908
- let r = Math.min(e, ed);
7909
- return r !== e && console.warn(`[@appcues/delay] duration ${e}ms exceeds the 5-minute maximum (${ed}ms) and has been capped.`), new Promise((e) => {
7940
+ let r = Math.min(e, nd);
7941
+ return r !== e && console.warn(`[@appcues/delay] duration ${e}ms exceeds the 5-minute maximum (${nd}ms) and has been capped.`), new Promise((e) => {
7910
7942
  n = setTimeout(e, r);
7911
7943
  });
7912
7944
  }), e("step.end", () => {
7913
7945
  n !== null && (clearTimeout(n), n = null);
7914
7946
  });
7915
7947
  });
7916
- var td = "appcues-cutout-backdrop", nd = "appcues-custom-backdrop", rd = "apc-spotlight", id = "\n :where(dialog) { all: unset; }\n", ad = "\n ::backdrop { backdrop-filter: var(--backdrop-blur); background-color: var(--backdrop-color); }\n", od = ({ backdropBlur: e, backdropColor: t }) => ({
7948
+ var rd = "appcues-cutout-backdrop", id = "appcues-custom-backdrop", ad = "apc-spotlight", od = "\n :where(dialog) { all: unset; }\n", sd = "\n ::backdrop { backdrop-filter: var(--backdrop-blur); background-color: var(--backdrop-color); }\n", cd = ({ backdropBlur: e, backdropColor: t }) => ({
7917
7949
  ...e && { "--backdrop-blur": e },
7918
7950
  ...t && { "--backdrop-color": t }
7919
- }), sd = ({ getWindowReference: e, backdropZIndex: t, backdropBlur: n, backdropColor: r }) => {
7951
+ }), ld = ({ getWindowReference: e, backdropZIndex: t, backdropBlur: n, backdropColor: r }) => {
7920
7952
  if (e().document.querySelector("#appcues-custom-backdrop")) return null;
7921
7953
  let i = e().document.createElement("div");
7922
- return i.id = nd, i.style.cssText = `
7954
+ return i.id = id, i.style.cssText = `
7923
7955
  z-index: ${t};
7924
7956
  position: fixed;
7925
7957
  inset: 0;
@@ -7927,10 +7959,10 @@ var td = "appcues-cutout-backdrop", nd = "appcues-custom-backdrop", rd = "apc-sp
7927
7959
  background-color: ${r};
7928
7960
  pointer-events: none;
7929
7961
  `, i;
7930
- }, cd = /* @__PURE__ */ c({
7931
- build: () => pd,
7932
- update: () => md
7933
- }), ld = 1500, ud = .67, dd = (e) => {
7962
+ }, ud = /* @__PURE__ */ c({
7963
+ build: () => hd,
7964
+ update: () => gd
7965
+ }), dd = 1500, fd = .67, pd = (e) => {
7934
7966
  Object.assign(e.style, {
7935
7967
  position: "fixed",
7936
7968
  top: "0",
@@ -7940,32 +7972,32 @@ var td = "appcues-cutout-backdrop", nd = "appcues-custom-backdrop", rd = "apc-sp
7940
7972
  overflow: "hidden",
7941
7973
  pointerEvents: "none"
7942
7974
  });
7943
- }, fd = (e, t) => {
7975
+ }, md = (e, t) => {
7944
7976
  let { top: n, left: r, width: i, height: a } = t;
7945
7977
  Object.assign(e.style, {
7946
7978
  position: "absolute",
7947
- top: `${n - ld}px`,
7948
- left: `${r - ld}px`,
7949
- height: `${a ? a + 2 * ld : 0}px`,
7950
- width: `${i ? i + 2 * ld : 0}px`,
7979
+ top: `${n - dd}px`,
7980
+ left: `${r - dd}px`,
7981
+ height: `${a ? a + 2 * dd : 0}px`,
7982
+ width: `${i ? i + 2 * dd : 0}px`,
7951
7983
  boxSizing: "border-box",
7952
- border: `${ld}px solid transparent`,
7984
+ border: `${dd}px solid transparent`,
7953
7985
  pointerEvents: "none",
7954
- borderImage: `radial-gradient(transparent 2%, rgba(0,0,0,${ud}) 28%) 49% 49% 49% 49%`,
7955
- boxShadow: `0 0 0 2500px rgba(0,0,0,${ud})`
7986
+ borderImage: `radial-gradient(transparent 2%, rgba(0,0,0,${fd}) 28%) 49% 49% 49% 49%`,
7987
+ boxShadow: `0 0 0 2500px rgba(0,0,0,${fd})`
7956
7988
  });
7957
- }, pd = ({ document: e, rect: t, zIndex: n }) => {
7989
+ }, hd = ({ document: e, rect: t, zIndex: n }) => {
7958
7990
  let r = e.createElement("div");
7959
- r.id = td, dd(r), r.style.zIndex = n;
7991
+ r.id = rd, pd(r), r.style.zIndex = n;
7960
7992
  let i = e.createElement("div");
7961
- return i.className = rd, fd(i, t), r.append(i), r;
7962
- }, md = ({ container: e, rect: t }) => {
7993
+ return i.className = ad, md(i, t), r.append(i), r;
7994
+ }, gd = ({ container: e, rect: t }) => {
7963
7995
  let n = e.firstElementChild;
7964
- n && fd(n, t);
7965
- }, hd = /* @__PURE__ */ c({
7966
- build: () => xd,
7967
- update: () => Sd
7968
- }), gd = .5, _d = (e) => {
7996
+ n && md(n, t);
7997
+ }, _d = /* @__PURE__ */ c({
7998
+ build: () => Cd,
7999
+ update: () => wd
8000
+ }), vd = .5, yd = (e) => {
7969
8001
  Object.assign(e.style, {
7970
8002
  position: "fixed",
7971
8003
  top: "0",
@@ -7974,7 +8006,7 @@ var td = "appcues-cutout-backdrop", nd = "appcues-custom-backdrop", rd = "apc-sp
7974
8006
  height: "100vh",
7975
8007
  pointerEvents: "none"
7976
8008
  });
7977
- }, vd = (e, t, n) => {
8009
+ }, bd = (e, t, n) => {
7978
8010
  let { top: r, left: i, width: a, height: o } = n;
7979
8011
  Object.assign(e.style, {
7980
8012
  position: "absolute",
@@ -7988,45 +8020,45 @@ var td = "appcues-cutout-backdrop", nd = "appcues-custom-backdrop", rd = "apc-sp
7988
8020
  position: "relative",
7989
8021
  width: `${a}px`,
7990
8022
  height: `${o}px`,
7991
- boxShadow: `0px 0px 0px 2000px rgba(0,0,0,${gd})`,
8023
+ boxShadow: `0px 0px 0px 2000px rgba(0,0,0,${vd})`,
7992
8024
  borderRadius: "0px",
7993
8025
  pointerEvents: "none"
7994
8026
  });
7995
- }, yd = (e, t, n, r, i) => {
8027
+ }, xd = (e, t, n, r, i) => {
7996
8028
  Object.assign(e.style, {
7997
8029
  position: "absolute",
7998
8030
  top: `${t}px`,
7999
8031
  left: `${n}px`,
8000
8032
  width: `${r}px`,
8001
8033
  height: `${i}px`,
8002
- background: `rgba(0,0,0,${gd})`,
8034
+ background: `rgba(0,0,0,${vd})`,
8003
8035
  pointerEvents: "all"
8004
8036
  });
8005
- }, bd = ([e, t, n, r], i, a) => {
8037
+ }, Sd = ([e, t, n, r], i, a) => {
8006
8038
  let { top: o, left: s, right: c, bottom: l, width: u } = i, d = a.innerWidth, f = a.innerHeight;
8007
- yd(e, 0, s, u, Math.max(0, o)), yd(t, 0, c, Math.max(0, d - c), f), yd(n, l, s, u, Math.max(0, f - l)), yd(r, 0, 0, Math.max(0, s), f);
8008
- }, xd = ({ document: e, win: t, rect: n, zIndex: r }) => {
8039
+ xd(e, 0, s, u, Math.max(0, o)), xd(t, 0, c, Math.max(0, d - c), f), xd(n, l, s, u, Math.max(0, f - l)), xd(r, 0, 0, Math.max(0, s), f);
8040
+ }, Cd = ({ document: e, win: t, rect: n, zIndex: r }) => {
8009
8041
  let i = e.createElement("div");
8010
- i.id = td, _d(i), i.style.zIndex = r;
8042
+ i.id = rd, yd(i), i.style.zIndex = r;
8011
8043
  let a = e.createElement("div"), o = e.createElement("div");
8012
- return o.className = rd, vd(a, o, n), a.append(o), i.append(a), bd([
8044
+ return o.className = ad, bd(a, o, n), a.append(o), i.append(a), Sd([
8013
8045
  "top",
8014
8046
  "right",
8015
8047
  "bottom",
8016
8048
  "left"
8017
8049
  ].map((t) => {
8018
8050
  let n = e.createElement("div");
8019
- return n.className = rd, n.setAttribute("aria-label", `${t}-panel`), i.append(n), n;
8051
+ return n.className = ad, n.setAttribute("aria-label", `${t}-panel`), i.append(n), n;
8020
8052
  }), n, t), i;
8021
- }, Sd = ({ container: e, win: t, rect: n }) => {
8053
+ }, wd = ({ container: e, win: t, rect: n }) => {
8022
8054
  let r = e.children[0], i = r?.firstElementChild;
8023
- r && i && vd(r, i, n);
8055
+ r && i && bd(r, i, n);
8024
8056
  let a = [...e.children].slice(1);
8025
- a.length === 4 && bd(a, n, t);
8026
- }, Cd = {
8027
- soft: cd,
8028
- hard: hd
8029
- }, wd = (e) => e in Cd, Td = ({ getWindowReference: e, target: t, backdropType: n, zIndex: r }) => {
8057
+ a.length === 4 && Sd(a, n, t);
8058
+ }, Td = {
8059
+ soft: ud,
8060
+ hard: _d
8061
+ }, Ed = (e) => e in Td, Dd = ({ getWindowReference: e, target: t, backdropType: n, zIndex: r }) => {
8030
8062
  let i = e(), a;
8031
8063
  try {
8032
8064
  a = i.document.querySelector(t);
@@ -8040,8 +8072,8 @@ var td = "appcues-cutout-backdrop", nd = "appcues-custom-backdrop", rd = "apc-sp
8040
8072
  rect: o,
8041
8073
  zIndex: r
8042
8074
  };
8043
- return Cd[n].build(s);
8044
- }, Ed = ({ container: e, getWindowReference: t, target: n, backdropType: r }) => {
8075
+ return Td[n].build(s);
8076
+ }, Od = ({ container: e, getWindowReference: t, target: n, backdropType: r }) => {
8045
8077
  let i = t(), a;
8046
8078
  try {
8047
8079
  a = i.document.querySelector(n);
@@ -8050,21 +8082,21 @@ var td = "appcues-cutout-backdrop", nd = "appcues-custom-backdrop", rd = "apc-sp
8050
8082
  }
8051
8083
  if (!a || !e) return;
8052
8084
  let o = a.getBoundingClientRect();
8053
- Cd[r].update({
8085
+ Td[r].update({
8054
8086
  container: e,
8055
8087
  win: i,
8056
8088
  rect: o
8057
8089
  });
8058
- }, Dd = new Set([or, sr]), Od = (e) => e.id === "appcues-cutout-backdrop" || Dd.has(e.tagName), kd = (e, t) => {
8090
+ }, kd = new Set([or, sr]), Ad = (e) => e.id === "appcues-cutout-backdrop" || kd.has(e.tagName), jd = (e, t) => {
8059
8091
  if (!t) return null;
8060
8092
  try {
8061
8093
  return e.querySelector(t);
8062
8094
  } catch {
8063
8095
  return null;
8064
8096
  }
8065
- }, Ad = (e, { targetSelector: t } = {}) => {
8066
- let { body: n } = e.document, r = /* @__PURE__ */ new Set(), i = kd(n, t);
8067
- for (let e of n.children) !Od(e) && !e.inert && !e.contains(i) && (e.inert = !0, r.add(e));
8097
+ }, Md = (e, { targetSelector: t } = {}) => {
8098
+ let { body: n } = e.document, r = /* @__PURE__ */ new Set(), i = jd(n, t);
8099
+ for (let e of n.children) !Ad(e) && !e.inert && !e.contains(i) && (e.inert = !0, r.add(e));
8068
8100
  return () => {
8069
8101
  for (let e of r) e.inert = !1;
8070
8102
  };
@@ -8083,7 +8115,7 @@ Q("@appcues/dialog", ({ addHook: e }, t) => {
8083
8115
  if (n === !0 && !i && !a) {
8084
8116
  let t = ({ getTraitConfig: e, updateRootStyle: t }) => {
8085
8117
  let { variables: n } = e();
8086
- t(od(n || {}), { forceUpdate: !0 });
8118
+ t(cd(n || {}), { forceUpdate: !0 });
8087
8119
  };
8088
8120
  e("step.begin", t), e("step.container_change", t);
8089
8121
  }
@@ -8092,12 +8124,12 @@ Q("@appcues/dialog", ({ addHook: e }, t) => {
8092
8124
  [f] = e.querySelector("dialog") ?? [];
8093
8125
  let j = t();
8094
8126
  if (f) {
8095
- S === !0 && C ? (p?.remove(), p = sd({
8127
+ S === !0 && C ? (p?.remove(), p = ld({
8096
8128
  getWindowReference: t,
8097
8129
  backdropZIndex: O,
8098
8130
  backdropBlur: k,
8099
8131
  backdropColor: A
8100
- }), p && j.document.body.append(p)) : (p?.remove(), p = void 0), S === !0 && !C && !w ? v("backdrop", ad, j) : (d.backdrop?.remove(), d.backdrop = null), v("dialog", id, j), f.style.zIndex = D, f.removeAttribute("autofocus");
8132
+ }), p && j.document.body.append(p)) : (p?.remove(), p = void 0), S === !0 && !C && !w ? v("backdrop", sd, j) : (d.backdrop?.remove(), d.backdrop = null), v("dialog", od, j), f.style.zIndex = D, f.removeAttribute("autofocus");
8101
8133
  let e = S === !0 && !C && !w ? "showModal" : "show";
8102
8134
  if (e === "show" && !w) return;
8103
8135
  let n = e === "show" ? {
@@ -8106,17 +8138,17 @@ Q("@appcues/dialog", ({ addHook: e }, t) => {
8106
8138
  } : null, r = f.open;
8107
8139
  f[e](), n && (j.scrollX !== n.x || j.scrollY !== n.y) && j.scrollTo(n.x, n.y), e === "show" && T && !r && f.focus({ preventScroll: !0 });
8108
8140
  }
8109
- y(), _?.(), m?.remove(), m = void 0, w && wd(S) && (h = t(), m = Td({
8141
+ y(), _?.(), m?.remove(), m = void 0, w && Ed(S) && (h = t(), m = Dd({
8110
8142
  getWindowReference: t,
8111
8143
  target: w,
8112
8144
  backdropType: S,
8113
8145
  zIndex: (D ?? 2) - 1
8114
- }), m && (h.document.body.append(m), g = () => Ed({
8146
+ }), m && (h.document.body.append(m), g = () => Od({
8115
8147
  container: m,
8116
8148
  getWindowReference: t,
8117
8149
  target: w,
8118
8150
  backdropType: S
8119
- }), h.addEventListener("scroll", g, !0), h.addEventListener("resize", g), S === "hard" && (_ = Ad(h, { targetSelector: w }))));
8151
+ }), h.addEventListener("scroll", g, !0), h.addEventListener("resize", g), S === "hard" && (_ = Md(h, { targetSelector: w }))));
8120
8152
  }), e("step.end", () => {
8121
8153
  f?.close(), d.backdrop?.remove(), d.dialog?.remove(), p?.remove(), m?.remove(), y(), _?.();
8122
8154
  });
@@ -8162,7 +8194,22 @@ Q("@appcues/dialog", ({ addHook: e }, t) => {
8162
8194
  t = !1;
8163
8195
  });
8164
8196
  });
8165
- var jd = (e) => class extends e.HTMLElement {
8197
+ var Nd = "@appcues/advance-on-error", Pd = 3e5, Fd = "@appcues/sequential.next", Id = "@appcues/sequential.skip", Ld = (e) => e === Fd ? Id : e;
8198
+ Q(Nd, ({ addHook: e }, t) => {
8199
+ let n = null, r = () => {
8200
+ n !== null && (clearTimeout(n), n = null);
8201
+ };
8202
+ e("step.error", (e) => {
8203
+ r();
8204
+ let { getAction: i } = e, a = Number(t?.duration ?? 500), o = Number.isFinite(a) ? a : 500, s = t?.action;
8205
+ s?.type && (n = setTimeout(() => {
8206
+ n = null;
8207
+ let t = i(Ld(s.type));
8208
+ t && t(s.config ?? {}, e, Sn.ERROR);
8209
+ }, Math.min(Math.max(o, 0), Pd)));
8210
+ }), e("step.prebegin", r), e("step.end", r);
8211
+ });
8212
+ var Rd = (e) => class extends e.HTMLElement {
8166
8213
  constructor() {
8167
8214
  super();
8168
8215
  let t = this.ownerDocument || e.document;
@@ -8175,19 +8222,19 @@ var jd = (e) => class extends e.HTMLElement {
8175
8222
  async connectedCallback() {
8176
8223
  this.shadowRoot.append(this.hideContentStyles), this.shadowRoot.append(...this.childNodes), this.getAttribute("themeId") && await Xr(this), this.shadowRoot.prepend(this.webComponentStyles), this.hideContentStyles.remove();
8177
8224
  }
8178
- }, Md = /* @__PURE__ */ new WeakMap(), Nd = (e = () => window) => {
8225
+ }, zd = /* @__PURE__ */ new WeakMap(), Bd = (e = () => window) => {
8179
8226
  let t = e();
8180
- if (Md.has(t)) return Md.get(t);
8227
+ if (zd.has(t)) return zd.get(t);
8181
8228
  if (!t.customElements.get("appcues-experience-container")) {
8182
- let e = jd(t);
8229
+ let e = Rd(t);
8183
8230
  t.customElements.define(ar, e);
8184
8231
  }
8185
8232
  let n = t.customElements.whenDefined(ar);
8186
- return Md.set(t, n), n;
8187
- }, Pd = !1;
8188
- function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t = () => {}, sendCustomEvent: n = () => {}, showFlow: r = () => {}, updateUserProfile: i = () => {}, handleNavigation: a = () => {}, createRenderListener: o = ss, vNodeHandlers: s = ms, accessibilityHandlers: c = Os, getWindowReference: l = () => window, apiOverrides: u = {} } = {}) {
8233
+ return zd.set(t, n), n;
8234
+ }, Vd = !1;
8235
+ function Hd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t = () => {}, sendCustomEvent: n = () => {}, showFlow: r = () => {}, updateUserProfile: i = () => {}, handleNavigation: a = () => {}, createRenderListener: o = ss, vNodeHandlers: s = ms, accessibilityHandlers: c = Os, getWindowReference: l = () => window, apiOverrides: u = {} } = {}) {
8189
8236
  Ur(u);
8190
- let d = /* @__PURE__ */ new Map(), f = {
8237
+ let d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = {
8191
8238
  sendEvent: t,
8192
8239
  sendCustomEvent: n,
8193
8240
  showFlow: r,
@@ -8197,10 +8244,13 @@ function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t =
8197
8244
  vNodeHandlers: s,
8198
8245
  accessibilityHandlers: c,
8199
8246
  getWindowReference: l,
8200
- apiOverrides: u
8201
- }, p = (e) => e ? f?.[e] ? f[e] : () => {
8247
+ apiOverrides: u,
8248
+ getExperienceSend: (e) => f.get(e)
8249
+ }, m = (e) => e ? p?.[e] ? p[e] : () => {
8202
8250
  throw Error(`can't find external dependency called ${e}`);
8203
- } : f, m = ({ reason: t = Sn.NAVIGATION } = {}) => {
8251
+ } : p, h = (e, t) => {
8252
+ f.set(e, (e) => t.send(e));
8253
+ }, g = ({ reason: t = Sn.NAVIGATION } = {}) => {
8204
8254
  e.forEach((e) => {
8205
8255
  e.experienceService.send({
8206
8256
  type: xn,
@@ -8208,26 +8258,26 @@ function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t =
8208
8258
  }), e.experienceService.subscribe((t) => {
8209
8259
  t.matches("end-final") && e.experienceService.stop();
8210
8260
  });
8211
- }), e.clear();
8212
- }, h = (t, { reason: n = Sn.NAVIGATION } = {}) => {
8261
+ }), e.clear(), f.clear();
8262
+ }, _ = (t, { reason: n = Sn.NAVIGATION } = {}) => {
8213
8263
  e.has(t) && (e.get(t).experienceService.send({
8214
8264
  type: xn,
8215
8265
  reason: n
8216
- }), e.delete(t));
8266
+ }), e.delete(t), f.delete(t));
8217
8267
  };
8218
8268
  return {
8219
8269
  registerAction: Si,
8220
8270
  registerTrait: Q,
8221
8271
  show: async (t) => {
8222
- Nd(l), await l().customElements.whenDefined(ar);
8272
+ Bd(l), await l().customElements.whenDefined(ar);
8223
8273
  let n = dn(dn(t, "traits", (e) => (e ?? []).map((e, t) => ({
8224
8274
  ...e,
8225
8275
  id: e.id || `${e.type}:${t}`
8226
8276
  }))), "steps", (e) => (e ?? []).map((e) => dn(e, "traits", (e) => (e ?? []).map((e, t) => ({
8227
8277
  ...e,
8228
8278
  id: e.id || `${e.type}:${t}`
8229
- }))))), r = e.get(t.id)?.experienceService ?? It(is(n, p), { devTools: Pd }).start();
8230
- r.send({
8279
+ }))))), r = e.get(t.id)?.experienceService ?? Ft(is(n, m), { devTools: Vd }).start();
8280
+ h(t.id, r), r.send({
8231
8281
  type: bn,
8232
8282
  experience: n
8233
8283
  }), e.set(t.id, {
@@ -8235,12 +8285,12 @@ function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t =
8235
8285
  experience: n
8236
8286
  });
8237
8287
  },
8238
- stopAll: m,
8239
- stop: h,
8288
+ stopAll: g,
8289
+ stop: _,
8240
8290
  pause: (t) => {
8241
8291
  if (d.get(t)) return;
8242
8292
  let n = e.get(t);
8243
- n && (h(t), d.set(t, {
8293
+ n && (_(t), d.set(t, {
8244
8294
  experienceService: n.experienceService,
8245
8295
  experience: n.experience
8246
8296
  }));
@@ -8250,11 +8300,11 @@ function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t =
8250
8300
  n && (n.experienceService.send({ type: bn }), e.set(t, {
8251
8301
  experienceService: n.experienceService,
8252
8302
  experience: n.experience
8253
- }), d.delete(t));
8303
+ }), h(t, n.experienceService), d.delete(t));
8254
8304
  },
8255
8305
  getRunningExperiences: () => [...e].map(([, { experience: e }]) => e),
8256
8306
  isExperiencePaused: (e) => d.has(e)
8257
8307
  };
8258
8308
  }
8259
8309
  //#endregion
8260
- export { Fd as default };
8310
+ export { Hd as default };