react-shepherd 4.2.0 → 5.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,4132 @@
1
+ import Yn, { createContext as Yr, useContext as qr } from "react";
2
+ var Rt = { exports: {} }, Ne = {};
3
+ /**
4
+ * @license React
5
+ * react-jsx-runtime.production.min.js
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var gn;
13
+ function Kr() {
14
+ if (gn)
15
+ return Ne;
16
+ gn = 1;
17
+ var e = Yn, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function s(c, l, u) {
19
+ var f, h = {}, d = null, m = null;
20
+ u !== void 0 && (d = "" + u), l.key !== void 0 && (d = "" + l.key), l.ref !== void 0 && (m = l.ref);
21
+ for (f in l)
22
+ r.call(l, f) && !i.hasOwnProperty(f) && (h[f] = l[f]);
23
+ if (c && c.defaultProps)
24
+ for (f in l = c.defaultProps, l)
25
+ h[f] === void 0 && (h[f] = l[f]);
26
+ return { $$typeof: t, type: c, key: d, ref: m, props: h, _owner: o.current };
27
+ }
28
+ return Ne.Fragment = n, Ne.jsx = s, Ne.jsxs = s, Ne;
29
+ }
30
+ var Ve = {};
31
+ /**
32
+ * @license React
33
+ * react-jsx-runtime.development.js
34
+ *
35
+ * Copyright (c) Facebook, Inc. and its affiliates.
36
+ *
37
+ * This source code is licensed under the MIT license found in the
38
+ * LICENSE file in the root directory of this source tree.
39
+ */
40
+ var bn;
41
+ function zr() {
42
+ return bn || (bn = 1, process.env.NODE_ENV !== "production" && function() {
43
+ var e = Yn, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), y = Symbol.iterator, E = "@@iterator";
44
+ function S(a) {
45
+ if (a === null || typeof a != "object")
46
+ return null;
47
+ var p = y && a[y] || a[E];
48
+ return typeof p == "function" ? p : null;
49
+ }
50
+ var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
+ function _(a) {
52
+ {
53
+ for (var p = arguments.length, b = new Array(p > 1 ? p - 1 : 0), x = 1; x < p; x++)
54
+ b[x - 1] = arguments[x];
55
+ C("error", a, b);
56
+ }
57
+ }
58
+ function C(a, p, b) {
59
+ {
60
+ var x = w.ReactDebugCurrentFrame, P = x.getStackAddendum();
61
+ P !== "" && (p += "%s", b = b.concat([P]));
62
+ var k = b.map(function(R) {
63
+ return String(R);
64
+ });
65
+ k.unshift("Warning: " + p), Function.prototype.apply.call(console[a], console, k);
66
+ }
67
+ }
68
+ var v = !1, g = !1, T = !1, N = !1, te = !1, $;
69
+ $ = Symbol.for("react.module.reference");
70
+ function H(a) {
71
+ return !!(typeof a == "string" || typeof a == "function" || a === r || a === i || te || a === o || a === u || a === f || N || a === m || v || g || T || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === h || a.$$typeof === s || a.$$typeof === c || a.$$typeof === l || // This needs to include all possible module reference object
72
+ // types supported by any Flight configuration anywhere since
73
+ // we don't know which Flight build this will end up being used
74
+ // with.
75
+ a.$$typeof === $ || a.getModuleId !== void 0));
76
+ }
77
+ function z(a, p, b) {
78
+ var x = a.displayName;
79
+ if (x)
80
+ return x;
81
+ var P = p.displayName || p.name || "";
82
+ return P !== "" ? b + "(" + P + ")" : b;
83
+ }
84
+ function J(a) {
85
+ return a.displayName || "Context";
86
+ }
87
+ function W(a) {
88
+ if (a == null)
89
+ return null;
90
+ if (typeof a.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
91
+ return a.displayName || a.name || null;
92
+ if (typeof a == "string")
93
+ return a;
94
+ switch (a) {
95
+ case r:
96
+ return "Fragment";
97
+ case n:
98
+ return "Portal";
99
+ case i:
100
+ return "Profiler";
101
+ case o:
102
+ return "StrictMode";
103
+ case u:
104
+ return "Suspense";
105
+ case f:
106
+ return "SuspenseList";
107
+ }
108
+ if (typeof a == "object")
109
+ switch (a.$$typeof) {
110
+ case c:
111
+ var p = a;
112
+ return J(p) + ".Consumer";
113
+ case s:
114
+ var b = a;
115
+ return J(b._context) + ".Provider";
116
+ case l:
117
+ return z(a, a.render, "ForwardRef");
118
+ case h:
119
+ var x = a.displayName || null;
120
+ return x !== null ? x : W(a.type) || "Memo";
121
+ case d: {
122
+ var P = a, k = P._payload, R = P._init;
123
+ try {
124
+ return W(R(k));
125
+ } catch {
126
+ return null;
127
+ }
128
+ }
129
+ }
130
+ return null;
131
+ }
132
+ var M = Object.assign, G = 0, X, Y, se, he, Xe, Zt, Qt;
133
+ function en() {
134
+ }
135
+ en.__reactDisabledLog = !0;
136
+ function wr() {
137
+ {
138
+ if (G === 0) {
139
+ X = console.log, Y = console.info, se = console.warn, he = console.error, Xe = console.group, Zt = console.groupCollapsed, Qt = console.groupEnd;
140
+ var a = {
141
+ configurable: !0,
142
+ enumerable: !0,
143
+ value: en,
144
+ writable: !0
145
+ };
146
+ Object.defineProperties(console, {
147
+ info: a,
148
+ log: a,
149
+ warn: a,
150
+ error: a,
151
+ group: a,
152
+ groupCollapsed: a,
153
+ groupEnd: a
154
+ });
155
+ }
156
+ G++;
157
+ }
158
+ }
159
+ function _r() {
160
+ {
161
+ if (G--, G === 0) {
162
+ var a = {
163
+ configurable: !0,
164
+ enumerable: !0,
165
+ writable: !0
166
+ };
167
+ Object.defineProperties(console, {
168
+ log: M({}, a, {
169
+ value: X
170
+ }),
171
+ info: M({}, a, {
172
+ value: Y
173
+ }),
174
+ warn: M({}, a, {
175
+ value: se
176
+ }),
177
+ error: M({}, a, {
178
+ value: he
179
+ }),
180
+ group: M({}, a, {
181
+ value: Xe
182
+ }),
183
+ groupCollapsed: M({}, a, {
184
+ value: Zt
185
+ }),
186
+ groupEnd: M({}, a, {
187
+ value: Qt
188
+ })
189
+ });
190
+ }
191
+ G < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
+ }
193
+ }
194
+ var mt = w.ReactCurrentDispatcher, gt;
195
+ function Ze(a, p, b) {
196
+ {
197
+ if (gt === void 0)
198
+ try {
199
+ throw Error();
200
+ } catch (P) {
201
+ var x = P.stack.trim().match(/\n( *(at )?)/);
202
+ gt = x && x[1] || "";
203
+ }
204
+ return `
205
+ ` + gt + a;
206
+ }
207
+ }
208
+ var bt = !1, Qe;
209
+ {
210
+ var Er = typeof WeakMap == "function" ? WeakMap : Map;
211
+ Qe = new Er();
212
+ }
213
+ function tn(a, p) {
214
+ if (!a || bt)
215
+ return "";
216
+ {
217
+ var b = Qe.get(a);
218
+ if (b !== void 0)
219
+ return b;
220
+ }
221
+ var x;
222
+ bt = !0;
223
+ var P = Error.prepareStackTrace;
224
+ Error.prepareStackTrace = void 0;
225
+ var k;
226
+ k = mt.current, mt.current = null, wr();
227
+ try {
228
+ if (p) {
229
+ var R = function() {
230
+ throw Error();
231
+ };
232
+ if (Object.defineProperty(R.prototype, "props", {
233
+ set: function() {
234
+ throw Error();
235
+ }
236
+ }), typeof Reflect == "object" && Reflect.construct) {
237
+ try {
238
+ Reflect.construct(R, []);
239
+ } catch (ae) {
240
+ x = ae;
241
+ }
242
+ Reflect.construct(a, [], R);
243
+ } else {
244
+ try {
245
+ R.call();
246
+ } catch (ae) {
247
+ x = ae;
248
+ }
249
+ a.call(R.prototype);
250
+ }
251
+ } else {
252
+ try {
253
+ throw Error();
254
+ } catch (ae) {
255
+ x = ae;
256
+ }
257
+ a();
258
+ }
259
+ } catch (ae) {
260
+ if (ae && x && typeof ae.stack == "string") {
261
+ for (var O = ae.stack.split(`
262
+ `), U = x.stack.split(`
263
+ `), D = O.length - 1, j = U.length - 1; D >= 1 && j >= 0 && O[D] !== U[j]; )
264
+ j--;
265
+ for (; D >= 1 && j >= 0; D--, j--)
266
+ if (O[D] !== U[j]) {
267
+ if (D !== 1 || j !== 1)
268
+ do
269
+ if (D--, j--, j < 0 || O[D] !== U[j]) {
270
+ var Z = `
271
+ ` + O[D].replace(" at new ", " at ");
272
+ return a.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", a.displayName)), typeof a == "function" && Qe.set(a, Z), Z;
273
+ }
274
+ while (D >= 1 && j >= 0);
275
+ break;
276
+ }
277
+ }
278
+ } finally {
279
+ bt = !1, mt.current = k, _r(), Error.prepareStackTrace = P;
280
+ }
281
+ var Pe = a ? a.displayName || a.name : "", mn = Pe ? Ze(Pe) : "";
282
+ return typeof a == "function" && Qe.set(a, mn), mn;
283
+ }
284
+ function xr(a, p, b) {
285
+ return tn(a, !1);
286
+ }
287
+ function Sr(a) {
288
+ var p = a.prototype;
289
+ return !!(p && p.isReactComponent);
290
+ }
291
+ function et(a, p, b) {
292
+ if (a == null)
293
+ return "";
294
+ if (typeof a == "function")
295
+ return tn(a, Sr(a));
296
+ if (typeof a == "string")
297
+ return Ze(a);
298
+ switch (a) {
299
+ case u:
300
+ return Ze("Suspense");
301
+ case f:
302
+ return Ze("SuspenseList");
303
+ }
304
+ if (typeof a == "object")
305
+ switch (a.$$typeof) {
306
+ case l:
307
+ return xr(a.render);
308
+ case h:
309
+ return et(a.type, p, b);
310
+ case d: {
311
+ var x = a, P = x._payload, k = x._init;
312
+ try {
313
+ return et(k(P), p, b);
314
+ } catch {
315
+ }
316
+ }
317
+ }
318
+ return "";
319
+ }
320
+ var tt = Object.prototype.hasOwnProperty, nn = {}, rn = w.ReactDebugCurrentFrame;
321
+ function nt(a) {
322
+ if (a) {
323
+ var p = a._owner, b = et(a.type, a._source, p ? p.type : null);
324
+ rn.setExtraStackFrame(b);
325
+ } else
326
+ rn.setExtraStackFrame(null);
327
+ }
328
+ function Or(a, p, b, x, P) {
329
+ {
330
+ var k = Function.call.bind(tt);
331
+ for (var R in a)
332
+ if (k(a, R)) {
333
+ var O = void 0;
334
+ try {
335
+ if (typeof a[R] != "function") {
336
+ var U = Error((x || "React class") + ": " + b + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
+ throw U.name = "Invariant Violation", U;
338
+ }
339
+ O = a[R](p, R, x, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
+ } catch (D) {
341
+ O = D;
342
+ }
343
+ O && !(O instanceof Error) && (nt(P), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", x || "React class", b, R, typeof O), nt(null)), O instanceof Error && !(O.message in nn) && (nn[O.message] = !0, nt(P), _("Failed %s type: %s", b, O.message), nt(null));
344
+ }
345
+ }
346
+ }
347
+ var Cr = Array.isArray;
348
+ function yt(a) {
349
+ return Cr(a);
350
+ }
351
+ function Tr(a) {
352
+ {
353
+ var p = typeof Symbol == "function" && Symbol.toStringTag, b = p && a[Symbol.toStringTag] || a.constructor.name || "Object";
354
+ return b;
355
+ }
356
+ }
357
+ function Rr(a) {
358
+ try {
359
+ return on(a), !1;
360
+ } catch {
361
+ return !0;
362
+ }
363
+ }
364
+ function on(a) {
365
+ return "" + a;
366
+ }
367
+ function sn(a) {
368
+ if (Rr(a))
369
+ return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tr(a)), on(a);
370
+ }
371
+ var We = w.ReactCurrentOwner, Pr = {
372
+ key: !0,
373
+ ref: !0,
374
+ __self: !0,
375
+ __source: !0
376
+ }, an, cn, vt;
377
+ vt = {};
378
+ function Ir(a) {
379
+ if (tt.call(a, "ref")) {
380
+ var p = Object.getOwnPropertyDescriptor(a, "ref").get;
381
+ if (p && p.isReactWarning)
382
+ return !1;
383
+ }
384
+ return a.ref !== void 0;
385
+ }
386
+ function kr(a) {
387
+ if (tt.call(a, "key")) {
388
+ var p = Object.getOwnPropertyDescriptor(a, "key").get;
389
+ if (p && p.isReactWarning)
390
+ return !1;
391
+ }
392
+ return a.key !== void 0;
393
+ }
394
+ function Ar(a, p) {
395
+ if (typeof a.ref == "string" && We.current && p && We.current.stateNode !== p) {
396
+ var b = W(We.current.type);
397
+ vt[b] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', W(We.current.type), a.ref), vt[b] = !0);
398
+ }
399
+ }
400
+ function Mr(a, p) {
401
+ {
402
+ var b = function() {
403
+ an || (an = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
404
+ };
405
+ b.isReactWarning = !0, Object.defineProperty(a, "key", {
406
+ get: b,
407
+ configurable: !0
408
+ });
409
+ }
410
+ }
411
+ function Dr(a, p) {
412
+ {
413
+ var b = function() {
414
+ cn || (cn = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
415
+ };
416
+ b.isReactWarning = !0, Object.defineProperty(a, "ref", {
417
+ get: b,
418
+ configurable: !0
419
+ });
420
+ }
421
+ }
422
+ var Fr = function(a, p, b, x, P, k, R) {
423
+ var O = {
424
+ // This tag allows us to uniquely identify this as a React Element
425
+ $$typeof: t,
426
+ // Built-in properties that belong on the element
427
+ type: a,
428
+ key: p,
429
+ ref: b,
430
+ props: R,
431
+ // Record the component responsible for creating this element.
432
+ _owner: k
433
+ };
434
+ return O._store = {}, Object.defineProperty(O._store, "validated", {
435
+ configurable: !1,
436
+ enumerable: !1,
437
+ writable: !0,
438
+ value: !1
439
+ }), Object.defineProperty(O, "_self", {
440
+ configurable: !1,
441
+ enumerable: !1,
442
+ writable: !1,
443
+ value: x
444
+ }), Object.defineProperty(O, "_source", {
445
+ configurable: !1,
446
+ enumerable: !1,
447
+ writable: !1,
448
+ value: P
449
+ }), Object.freeze && (Object.freeze(O.props), Object.freeze(O)), O;
450
+ };
451
+ function Lr(a, p, b, x, P) {
452
+ {
453
+ var k, R = {}, O = null, U = null;
454
+ b !== void 0 && (sn(b), O = "" + b), kr(p) && (sn(p.key), O = "" + p.key), Ir(p) && (U = p.ref, Ar(p, P));
455
+ for (k in p)
456
+ tt.call(p, k) && !Pr.hasOwnProperty(k) && (R[k] = p[k]);
457
+ if (a && a.defaultProps) {
458
+ var D = a.defaultProps;
459
+ for (k in D)
460
+ R[k] === void 0 && (R[k] = D[k]);
461
+ }
462
+ if (O || U) {
463
+ var j = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
464
+ O && Mr(R, j), U && Dr(R, j);
465
+ }
466
+ return Fr(a, O, U, P, x, We.current, R);
467
+ }
468
+ }
469
+ var wt = w.ReactCurrentOwner, ln = w.ReactDebugCurrentFrame;
470
+ function Re(a) {
471
+ if (a) {
472
+ var p = a._owner, b = et(a.type, a._source, p ? p.type : null);
473
+ ln.setExtraStackFrame(b);
474
+ } else
475
+ ln.setExtraStackFrame(null);
476
+ }
477
+ var _t;
478
+ _t = !1;
479
+ function Et(a) {
480
+ return typeof a == "object" && a !== null && a.$$typeof === t;
481
+ }
482
+ function un() {
483
+ {
484
+ if (wt.current) {
485
+ var a = W(wt.current.type);
486
+ if (a)
487
+ return `
488
+
489
+ Check the render method of \`` + a + "`.";
490
+ }
491
+ return "";
492
+ }
493
+ }
494
+ function jr(a) {
495
+ {
496
+ if (a !== void 0) {
497
+ var p = a.fileName.replace(/^.*[\\\/]/, ""), b = a.lineNumber;
498
+ return `
499
+
500
+ Check your code at ` + p + ":" + b + ".";
501
+ }
502
+ return "";
503
+ }
504
+ }
505
+ var fn = {};
506
+ function Br(a) {
507
+ {
508
+ var p = un();
509
+ if (!p) {
510
+ var b = typeof a == "string" ? a : a.displayName || a.name;
511
+ b && (p = `
512
+
513
+ Check the top-level render call using <` + b + ">.");
514
+ }
515
+ return p;
516
+ }
517
+ }
518
+ function dn(a, p) {
519
+ {
520
+ if (!a._store || a._store.validated || a.key != null)
521
+ return;
522
+ a._store.validated = !0;
523
+ var b = Br(p);
524
+ if (fn[b])
525
+ return;
526
+ fn[b] = !0;
527
+ var x = "";
528
+ a && a._owner && a._owner !== wt.current && (x = " It was passed a child from " + W(a._owner.type) + "."), Re(a), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, x), Re(null);
529
+ }
530
+ }
531
+ function hn(a, p) {
532
+ {
533
+ if (typeof a != "object")
534
+ return;
535
+ if (yt(a))
536
+ for (var b = 0; b < a.length; b++) {
537
+ var x = a[b];
538
+ Et(x) && dn(x, p);
539
+ }
540
+ else if (Et(a))
541
+ a._store && (a._store.validated = !0);
542
+ else if (a) {
543
+ var P = S(a);
544
+ if (typeof P == "function" && P !== a.entries)
545
+ for (var k = P.call(a), R; !(R = k.next()).done; )
546
+ Et(R.value) && dn(R.value, p);
547
+ }
548
+ }
549
+ }
550
+ function $r(a) {
551
+ {
552
+ var p = a.type;
553
+ if (p == null || typeof p == "string")
554
+ return;
555
+ var b;
556
+ if (typeof p == "function")
557
+ b = p.propTypes;
558
+ else if (typeof p == "object" && (p.$$typeof === l || // Note: Memo only checks outer props here.
559
+ // Inner props are checked in the reconciler.
560
+ p.$$typeof === h))
561
+ b = p.propTypes;
562
+ else
563
+ return;
564
+ if (b) {
565
+ var x = W(p);
566
+ Or(b, a.props, "prop", x, a);
567
+ } else if (p.PropTypes !== void 0 && !_t) {
568
+ _t = !0;
569
+ var P = W(p);
570
+ _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
571
+ }
572
+ typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
573
+ }
574
+ }
575
+ function Wr(a) {
576
+ {
577
+ for (var p = Object.keys(a.props), b = 0; b < p.length; b++) {
578
+ var x = p[b];
579
+ if (x !== "children" && x !== "key") {
580
+ Re(a), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", x), Re(null);
581
+ break;
582
+ }
583
+ }
584
+ a.ref !== null && (Re(a), _("Invalid attribute `ref` supplied to `React.Fragment`."), Re(null));
585
+ }
586
+ }
587
+ function pn(a, p, b, x, P, k) {
588
+ {
589
+ var R = H(a);
590
+ if (!R) {
591
+ var O = "";
592
+ (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (O += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
593
+ var U = jr(P);
594
+ U ? O += U : O += un();
595
+ var D;
596
+ a === null ? D = "null" : yt(a) ? D = "array" : a !== void 0 && a.$$typeof === t ? (D = "<" + (W(a.type) || "Unknown") + " />", O = " Did you accidentally export a JSX literal instead of a component?") : D = typeof a, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, O);
597
+ }
598
+ var j = Lr(a, p, b, P, k);
599
+ if (j == null)
600
+ return j;
601
+ if (R) {
602
+ var Z = p.children;
603
+ if (Z !== void 0)
604
+ if (x)
605
+ if (yt(Z)) {
606
+ for (var Pe = 0; Pe < Z.length; Pe++)
607
+ hn(Z[Pe], a);
608
+ Object.freeze && Object.freeze(Z);
609
+ } else
610
+ _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
611
+ else
612
+ hn(Z, a);
613
+ }
614
+ return a === r ? Wr(j) : $r(j), j;
615
+ }
616
+ }
617
+ function Nr(a, p, b) {
618
+ return pn(a, p, b, !0);
619
+ }
620
+ function Vr(a, p, b) {
621
+ return pn(a, p, b, !1);
622
+ }
623
+ var Ur = Vr, Hr = Nr;
624
+ Ve.Fragment = r, Ve.jsx = Ur, Ve.jsxs = Hr;
625
+ }()), Ve;
626
+ }
627
+ process.env.NODE_ENV === "production" ? Rt.exports = Kr() : Rt.exports = zr();
628
+ var Jr = Rt.exports;
629
+ /*! shepherd.js 12.0.0-alpha.13 */
630
+ function Gr(e) {
631
+ return e instanceof Element;
632
+ }
633
+ function ze(e) {
634
+ return e instanceof HTMLElement;
635
+ }
636
+ function pe(e) {
637
+ return typeof e == "function";
638
+ }
639
+ function Ye(e) {
640
+ return typeof e == "string";
641
+ }
642
+ function V(e) {
643
+ return e === void 0;
644
+ }
645
+ class Nt {
646
+ /**
647
+ * Adds an event listener for the given event string.
648
+ *
649
+ * @param {string} event
650
+ * @param {Function} handler
651
+ * @param ctx
652
+ * @param {boolean} once
653
+ * @returns
654
+ */
655
+ on(t, n, r, o = !1) {
656
+ var i;
657
+ return V(this.bindings) && (this.bindings = {}), V(this.bindings[t]) && (this.bindings[t] = []), (i = this.bindings[t]) == null || i.push({ handler: n, ctx: r, once: o }), this;
658
+ }
659
+ /**
660
+ * Adds an event listener that only fires once for the given event string.
661
+ *
662
+ * @param {string} event
663
+ * @param {Function} handler
664
+ * @param ctx
665
+ * @returns
666
+ */
667
+ once(t, n, r) {
668
+ return this.on(t, n, r, !0);
669
+ }
670
+ /**
671
+ * Removes an event listener for the given event string.
672
+ *
673
+ * @param {string} event
674
+ * @param {Function} handler
675
+ * @returns
676
+ */
677
+ off(t, n) {
678
+ var r;
679
+ return V(this.bindings) || V(this.bindings[t]) ? this : (V(n) ? delete this.bindings[t] : (r = this.bindings[t]) == null || r.forEach((o, i) => {
680
+ var s;
681
+ o.handler === n && ((s = this.bindings[t]) == null || s.splice(i, 1));
682
+ }), this);
683
+ }
684
+ /**
685
+ * Triggers an event listener for the given event string.
686
+ *
687
+ * @param {string} event
688
+ * @returns
689
+ */
690
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
691
+ trigger(t, ...n) {
692
+ var r;
693
+ return !V(this.bindings) && this.bindings[t] && ((r = this.bindings[t]) == null || r.forEach((o, i) => {
694
+ var f;
695
+ const { ctx: s, handler: c, once: l } = o, u = s || this;
696
+ c.apply(u, n), l && ((f = this.bindings[t]) == null || f.splice(i, 1));
697
+ })), this;
698
+ }
699
+ }
700
+ function Ue(e) {
701
+ var t, n;
702
+ function r(i, s) {
703
+ try {
704
+ var c = e[i](s), l = c.value, u = l instanceof qn;
705
+ Promise.resolve(u ? l.v : l).then(function(f) {
706
+ if (u) {
707
+ var h = i === "return" ? "return" : "next";
708
+ if (!l.k || f.done)
709
+ return r(h, f);
710
+ f = e[h](f).value;
711
+ }
712
+ o(c.done ? "return" : "normal", f);
713
+ }, function(f) {
714
+ r("throw", f);
715
+ });
716
+ } catch (f) {
717
+ o("throw", f);
718
+ }
719
+ }
720
+ function o(i, s) {
721
+ switch (i) {
722
+ case "return":
723
+ t.resolve({
724
+ value: s,
725
+ done: !0
726
+ });
727
+ break;
728
+ case "throw":
729
+ t.reject(s);
730
+ break;
731
+ default:
732
+ t.resolve({
733
+ value: s,
734
+ done: !1
735
+ });
736
+ }
737
+ (t = t.next) ? r(t.key, t.arg) : n = null;
738
+ }
739
+ this._invoke = function(i, s) {
740
+ return new Promise(function(c, l) {
741
+ var u = {
742
+ key: i,
743
+ arg: s,
744
+ resolve: c,
745
+ reject: l,
746
+ next: null
747
+ };
748
+ n ? n = n.next = u : (t = n = u, r(i, s));
749
+ });
750
+ }, typeof e.return != "function" && (this.return = void 0);
751
+ }
752
+ Ue.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
753
+ return this;
754
+ }, Ue.prototype.next = function(e) {
755
+ return this._invoke("next", e);
756
+ }, Ue.prototype.throw = function(e) {
757
+ return this._invoke("throw", e);
758
+ }, Ue.prototype.return = function(e) {
759
+ return this._invoke("return", e);
760
+ };
761
+ function qn(e, t) {
762
+ this.v = e, this.k = t;
763
+ }
764
+ function yn(e) {
765
+ return new qn(e, 0);
766
+ }
767
+ function Xr(e) {
768
+ return function() {
769
+ return new Ue(e.apply(this, arguments));
770
+ };
771
+ }
772
+ function B() {
773
+ return B = Object.assign ? Object.assign.bind() : function(e) {
774
+ for (var t = 1; t < arguments.length; t++) {
775
+ var n = arguments[t];
776
+ for (var r in n)
777
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
778
+ }
779
+ return e;
780
+ }, B.apply(this, arguments);
781
+ }
782
+ function Kn(e, t) {
783
+ if (e == null)
784
+ return {};
785
+ var n = {}, r = Object.keys(e), o, i;
786
+ for (i = 0; i < r.length; i++)
787
+ o = r[i], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
788
+ return n;
789
+ }
790
+ const be = {
791
+ defaultMerge: Symbol("deepmerge-ts: default merge"),
792
+ skip: Symbol("deepmerge-ts: skip")
793
+ };
794
+ be.defaultMerge;
795
+ function Zr(e, t) {
796
+ return t;
797
+ }
798
+ function vn(e) {
799
+ return typeof e != "object" || e === null ? 0 : Array.isArray(e) ? 2 : to(e) ? 1 : e instanceof Set ? 3 : e instanceof Map ? 4 : 5;
800
+ }
801
+ function Qr(e) {
802
+ const t = /* @__PURE__ */ new Set();
803
+ for (const n of e)
804
+ for (const r of [...Object.keys(n), ...Object.getOwnPropertySymbols(n)])
805
+ t.add(r);
806
+ return t;
807
+ }
808
+ function eo(e, t) {
809
+ return typeof e == "object" && Object.prototype.propertyIsEnumerable.call(e, t);
810
+ }
811
+ function zn(e) {
812
+ return {
813
+ // eslint-disable-next-line functional/functional-parameters
814
+ *[Symbol.iterator]() {
815
+ for (const t of e)
816
+ for (const n of t)
817
+ yield n;
818
+ }
819
+ };
820
+ }
821
+ const wn = /* @__PURE__ */ new Set(["[object Object]", "[object Module]"]);
822
+ function to(e) {
823
+ if (!wn.has(Object.prototype.toString.call(e)))
824
+ return !1;
825
+ const {
826
+ constructor: t
827
+ } = e;
828
+ if (t === void 0)
829
+ return !0;
830
+ const n = t.prototype;
831
+ return !(n === null || typeof n != "object" || !wn.has(Object.prototype.toString.call(n)) || !n.hasOwnProperty("isPrototypeOf"));
832
+ }
833
+ function no(e, t, n) {
834
+ const r = {};
835
+ for (const o of Qr(e)) {
836
+ const i = [];
837
+ for (const l of e)
838
+ eo(l, o) && i.push(l[o]);
839
+ if (i.length === 0)
840
+ continue;
841
+ const s = t.metaDataUpdater(n, {
842
+ key: o,
843
+ parents: e
844
+ }), c = Gn(i, t, s);
845
+ c !== be.skip && (o === "__proto__" ? Object.defineProperty(r, o, {
846
+ value: c,
847
+ configurable: !0,
848
+ enumerable: !0,
849
+ writable: !0
850
+ }) : r[o] = c);
851
+ }
852
+ return r;
853
+ }
854
+ function ro(e) {
855
+ return e.flat();
856
+ }
857
+ function oo(e) {
858
+ return new Set(zn(e));
859
+ }
860
+ function io(e) {
861
+ return new Map(zn(e));
862
+ }
863
+ function Jn(e) {
864
+ return e.at(-1);
865
+ }
866
+ var xt = /* @__PURE__ */ Object.freeze({
867
+ __proto__: null,
868
+ mergeArrays: ro,
869
+ mergeMaps: io,
870
+ mergeOthers: Jn,
871
+ mergeRecords: no,
872
+ mergeSets: oo
873
+ });
874
+ function Vt(...e) {
875
+ return so({})(...e);
876
+ }
877
+ function so(e, t) {
878
+ const n = ao(e, r);
879
+ function r(...o) {
880
+ return Gn(o, n, t);
881
+ }
882
+ return r;
883
+ }
884
+ function ao(e, t) {
885
+ var n, r;
886
+ return {
887
+ defaultMergeFunctions: xt,
888
+ mergeFunctions: B({}, xt, Object.fromEntries(Object.entries(e).filter(([o, i]) => Object.hasOwn(xt, o)).map(([o, i]) => i === !1 ? [o, Jn] : [o, i]))),
889
+ metaDataUpdater: (n = e.metaDataUpdater) != null ? n : Zr,
890
+ deepmerge: t,
891
+ useImplicitDefaultMerging: (r = e.enableImplicitDefaultMerging) != null ? r : !1,
892
+ actions: be
893
+ };
894
+ }
895
+ function Gn(e, t, n) {
896
+ if (e.length === 0)
897
+ return;
898
+ if (e.length === 1)
899
+ return St(e, t, n);
900
+ const r = vn(e[0]);
901
+ if (r !== 0 && r !== 5) {
902
+ for (let o = 1; o < e.length; o++)
903
+ if (vn(e[o]) !== r)
904
+ return St(e, t, n);
905
+ }
906
+ switch (r) {
907
+ case 1:
908
+ return co(e, t, n);
909
+ case 2:
910
+ return lo(e, t, n);
911
+ case 3:
912
+ return uo(e, t, n);
913
+ case 4:
914
+ return fo(e, t, n);
915
+ default:
916
+ return St(e, t, n);
917
+ }
918
+ }
919
+ function co(e, t, n) {
920
+ const r = t.mergeFunctions.mergeRecords(e, t, n);
921
+ return r === be.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeRecords !== t.defaultMergeFunctions.mergeRecords ? t.defaultMergeFunctions.mergeRecords(e, t, n) : r;
922
+ }
923
+ function lo(e, t, n) {
924
+ const r = t.mergeFunctions.mergeArrays(e, t, n);
925
+ return r === be.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeArrays !== t.defaultMergeFunctions.mergeArrays ? t.defaultMergeFunctions.mergeArrays(e) : r;
926
+ }
927
+ function uo(e, t, n) {
928
+ const r = t.mergeFunctions.mergeSets(e, t, n);
929
+ return r === be.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeSets !== t.defaultMergeFunctions.mergeSets ? t.defaultMergeFunctions.mergeSets(e) : r;
930
+ }
931
+ function fo(e, t, n) {
932
+ const r = t.mergeFunctions.mergeMaps(e, t, n);
933
+ return r === be.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeMaps !== t.defaultMergeFunctions.mergeMaps ? t.defaultMergeFunctions.mergeMaps(e) : r;
934
+ }
935
+ function St(e, t, n) {
936
+ const r = t.mergeFunctions.mergeOthers(e, t, n);
937
+ return r === be.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeOthers !== t.defaultMergeFunctions.mergeOthers ? t.defaultMergeFunctions.mergeOthers(e) : r;
938
+ }
939
+ function Xn(e) {
940
+ const t = Object.getOwnPropertyNames(e.constructor.prototype);
941
+ for (let n = 0; n < t.length; n++) {
942
+ const r = t[n], o = e[r];
943
+ r !== "constructor" && typeof o == "function" && (e[r] = o.bind(e));
944
+ }
945
+ return e;
946
+ }
947
+ function ho(e, t) {
948
+ return (n) => {
949
+ if (e.isOpen()) {
950
+ const r = e.el && n.currentTarget === e.el;
951
+ (!V(t) && n.currentTarget.matches(t) || r) && e.tour.next();
952
+ }
953
+ };
954
+ }
955
+ function po(e) {
956
+ const { event: t, selector: n } = e.options.advanceOn || {};
957
+ if (t) {
958
+ const r = ho(e, n);
959
+ let o = null;
960
+ if (!V(n) && (o = document.querySelector(n), !o))
961
+ return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);
962
+ o ? (o.addEventListener(t, r), e.on("destroy", () => o.removeEventListener(t, r))) : (document.body.addEventListener(t, r, !0), e.on("destroy", () => document.body.removeEventListener(t, r, !0)));
963
+ } else
964
+ return console.error("advanceOn was defined, but no event name was passed.");
965
+ }
966
+ class mo {
967
+ constructor(t) {
968
+ }
969
+ }
970
+ class go {
971
+ constructor(t, n) {
972
+ }
973
+ }
974
+ function Zn(e) {
975
+ return !Ye(e) || e === "" ? "" : e.charAt(e.length - 1) !== "-" ? `${e}-` : e;
976
+ }
977
+ function bo(e) {
978
+ const t = e.options.attachTo || {}, n = Object.assign({}, t);
979
+ if (pe(n.element) && (n.element = n.element.call(e)), Ye(n.element)) {
980
+ try {
981
+ n.element = document.querySelector(n.element);
982
+ } catch {
983
+ }
984
+ n.element || console.error(`The element for this Shepherd step was not found ${t.element}`);
985
+ }
986
+ return n;
987
+ }
988
+ function Qn(e) {
989
+ return e == null ? !0 : !e.element || !e.on;
990
+ }
991
+ function er() {
992
+ let e = Date.now();
993
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
994
+ const n = (e + Math.random() * 16) % 16 | 0;
995
+ return e = Math.floor(e / 16), (t == "x" ? n : n & 3 | 8).toString(16);
996
+ });
997
+ }
998
+ const Fe = Math.min, _e = Math.max, it = Math.round, rt = Math.floor, me = (e) => ({
999
+ x: e,
1000
+ y: e
1001
+ }), yo = {
1002
+ left: "right",
1003
+ right: "left",
1004
+ bottom: "top",
1005
+ top: "bottom"
1006
+ }, vo = {
1007
+ start: "end",
1008
+ end: "start"
1009
+ };
1010
+ function Pt(e, t, n) {
1011
+ return _e(e, Fe(t, n));
1012
+ }
1013
+ function Le(e, t) {
1014
+ return typeof e == "function" ? e(t) : e;
1015
+ }
1016
+ function Oe(e) {
1017
+ return e.split("-")[0];
1018
+ }
1019
+ function lt(e) {
1020
+ return e.split("-")[1];
1021
+ }
1022
+ function Ut(e) {
1023
+ return e === "x" ? "y" : "x";
1024
+ }
1025
+ function Ht(e) {
1026
+ return e === "y" ? "height" : "width";
1027
+ }
1028
+ function ut(e) {
1029
+ return ["top", "bottom"].includes(Oe(e)) ? "y" : "x";
1030
+ }
1031
+ function Yt(e) {
1032
+ return Ut(ut(e));
1033
+ }
1034
+ function wo(e, t, n) {
1035
+ n === void 0 && (n = !1);
1036
+ const r = lt(e), o = Yt(e), i = Ht(o);
1037
+ let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
1038
+ return t.reference[i] > t.floating[i] && (s = st(s)), [s, st(s)];
1039
+ }
1040
+ function _o(e) {
1041
+ const t = st(e);
1042
+ return [It(e), t, It(t)];
1043
+ }
1044
+ function It(e) {
1045
+ return e.replace(/start|end/g, (t) => vo[t]);
1046
+ }
1047
+ function Eo(e, t, n) {
1048
+ const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
1049
+ switch (e) {
1050
+ case "top":
1051
+ case "bottom":
1052
+ return n ? t ? o : r : t ? r : o;
1053
+ case "left":
1054
+ case "right":
1055
+ return t ? i : s;
1056
+ default:
1057
+ return [];
1058
+ }
1059
+ }
1060
+ function xo(e, t, n, r) {
1061
+ const o = lt(e);
1062
+ let i = Eo(Oe(e), n === "start", r);
1063
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(It)))), i;
1064
+ }
1065
+ function st(e) {
1066
+ return e.replace(/left|right|bottom|top/g, (t) => yo[t]);
1067
+ }
1068
+ function So(e) {
1069
+ return B({
1070
+ top: 0,
1071
+ right: 0,
1072
+ bottom: 0,
1073
+ left: 0
1074
+ }, e);
1075
+ }
1076
+ function tr(e) {
1077
+ return typeof e != "number" ? So(e) : {
1078
+ top: e,
1079
+ right: e,
1080
+ bottom: e,
1081
+ left: e
1082
+ };
1083
+ }
1084
+ function at(e) {
1085
+ return B({}, e, {
1086
+ top: e.y,
1087
+ left: e.x,
1088
+ right: e.x + e.width,
1089
+ bottom: e.y + e.height
1090
+ });
1091
+ }
1092
+ const Oo = ["mainAxis", "crossAxis", "fallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment"], Co = ["mainAxis", "crossAxis", "limiter"];
1093
+ function _n(e, t, n) {
1094
+ let {
1095
+ reference: r,
1096
+ floating: o
1097
+ } = e;
1098
+ const i = ut(t), s = Yt(t), c = Ht(s), l = Oe(t), u = i === "y", f = r.x + r.width / 2 - o.width / 2, h = r.y + r.height / 2 - o.height / 2, d = r[c] / 2 - o[c] / 2;
1099
+ let m;
1100
+ switch (l) {
1101
+ case "top":
1102
+ m = {
1103
+ x: f,
1104
+ y: r.y - o.height
1105
+ };
1106
+ break;
1107
+ case "bottom":
1108
+ m = {
1109
+ x: f,
1110
+ y: r.y + r.height
1111
+ };
1112
+ break;
1113
+ case "right":
1114
+ m = {
1115
+ x: r.x + r.width,
1116
+ y: h
1117
+ };
1118
+ break;
1119
+ case "left":
1120
+ m = {
1121
+ x: r.x - o.width,
1122
+ y: h
1123
+ };
1124
+ break;
1125
+ default:
1126
+ m = {
1127
+ x: r.x,
1128
+ y: r.y
1129
+ };
1130
+ }
1131
+ switch (lt(t)) {
1132
+ case "start":
1133
+ m[s] -= d * (n && u ? -1 : 1);
1134
+ break;
1135
+ case "end":
1136
+ m[s] += d * (n && u ? -1 : 1);
1137
+ break;
1138
+ }
1139
+ return m;
1140
+ }
1141
+ const To = async (e, t, n) => {
1142
+ const {
1143
+ placement: r = "bottom",
1144
+ strategy: o = "absolute",
1145
+ middleware: i = [],
1146
+ platform: s
1147
+ } = n, c = i.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(t));
1148
+ let u = await s.getElementRects({
1149
+ reference: e,
1150
+ floating: t,
1151
+ strategy: o
1152
+ }), {
1153
+ x: f,
1154
+ y: h
1155
+ } = _n(u, r, l), d = r, m = {}, y = 0;
1156
+ for (let E = 0; E < c.length; E++) {
1157
+ const {
1158
+ name: S,
1159
+ fn: w
1160
+ } = c[E], {
1161
+ x: _,
1162
+ y: C,
1163
+ data: v,
1164
+ reset: g
1165
+ } = await w({
1166
+ x: f,
1167
+ y: h,
1168
+ initialPlacement: r,
1169
+ placement: d,
1170
+ strategy: o,
1171
+ middlewareData: m,
1172
+ rects: u,
1173
+ platform: s,
1174
+ elements: {
1175
+ reference: e,
1176
+ floating: t
1177
+ }
1178
+ });
1179
+ f = _ ?? f, h = C ?? h, m = B({}, m, {
1180
+ [S]: B({}, m[S], v)
1181
+ }), g && y <= 50 && (y++, typeof g == "object" && (g.placement && (d = g.placement), g.rects && (u = g.rects === !0 ? await s.getElementRects({
1182
+ reference: e,
1183
+ floating: t,
1184
+ strategy: o
1185
+ }) : g.rects), {
1186
+ x: f,
1187
+ y: h
1188
+ } = _n(u, d, l)), E = -1);
1189
+ }
1190
+ return {
1191
+ x: f,
1192
+ y: h,
1193
+ placement: d,
1194
+ strategy: o,
1195
+ middlewareData: m
1196
+ };
1197
+ };
1198
+ async function nr(e, t) {
1199
+ var n;
1200
+ t === void 0 && (t = {});
1201
+ const {
1202
+ x: r,
1203
+ y: o,
1204
+ platform: i,
1205
+ rects: s,
1206
+ elements: c,
1207
+ strategy: l
1208
+ } = e, {
1209
+ boundary: u = "clippingAncestors",
1210
+ rootBoundary: f = "viewport",
1211
+ elementContext: h = "floating",
1212
+ altBoundary: d = !1,
1213
+ padding: m = 0
1214
+ } = Le(t, e), y = tr(m), S = c[d ? h === "floating" ? "reference" : "floating" : h], w = at(await i.getClippingRect({
1215
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(S))) == null || n ? S : S.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
1216
+ boundary: u,
1217
+ rootBoundary: f,
1218
+ strategy: l
1219
+ })), _ = h === "floating" ? B({}, s.floating, {
1220
+ x: r,
1221
+ y: o
1222
+ }) : s.reference, C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), v = await (i.isElement == null ? void 0 : i.isElement(C)) ? await (i.getScale == null ? void 0 : i.getScale(C)) || {
1223
+ x: 1,
1224
+ y: 1
1225
+ } : {
1226
+ x: 1,
1227
+ y: 1
1228
+ }, g = at(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
1229
+ elements: c,
1230
+ rect: _,
1231
+ offsetParent: C,
1232
+ strategy: l
1233
+ }) : _);
1234
+ return {
1235
+ top: (w.top - g.top + y.top) / v.y,
1236
+ bottom: (g.bottom - w.bottom + y.bottom) / v.y,
1237
+ left: (w.left - g.left + y.left) / v.x,
1238
+ right: (g.right - w.right + y.right) / v.x
1239
+ };
1240
+ }
1241
+ const Ro = (e) => ({
1242
+ name: "arrow",
1243
+ options: e,
1244
+ async fn(t) {
1245
+ const {
1246
+ x: n,
1247
+ y: r,
1248
+ placement: o,
1249
+ rects: i,
1250
+ platform: s,
1251
+ elements: c,
1252
+ middlewareData: l
1253
+ } = t, {
1254
+ element: u,
1255
+ padding: f = 0
1256
+ } = Le(e, t) || {};
1257
+ if (u == null)
1258
+ return {};
1259
+ const h = tr(f), d = {
1260
+ x: n,
1261
+ y: r
1262
+ }, m = Yt(o), y = Ht(m), E = await s.getDimensions(u), S = m === "y", w = S ? "top" : "left", _ = S ? "bottom" : "right", C = S ? "clientHeight" : "clientWidth", v = i.reference[y] + i.reference[m] - d[m] - i.floating[y], g = d[m] - i.reference[m], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
1263
+ let N = T ? T[C] : 0;
1264
+ (!N || !await (s.isElement == null ? void 0 : s.isElement(T))) && (N = c.floating[C] || i.floating[y]);
1265
+ const te = v / 2 - g / 2, $ = N / 2 - E[y] / 2 - 1, H = Fe(h[w], $), z = Fe(h[_], $), J = H, W = N - E[y] - z, M = N / 2 - E[y] / 2 + te, G = Pt(J, M, W), X = !l.arrow && lt(o) != null && M !== G && i.reference[y] / 2 - (M < J ? H : z) - E[y] / 2 < 0, Y = X ? M < J ? M - J : M - W : 0;
1266
+ return {
1267
+ [m]: d[m] + Y,
1268
+ data: B({
1269
+ [m]: G,
1270
+ centerOffset: M - G - Y
1271
+ }, X && {
1272
+ alignmentOffset: Y
1273
+ }),
1274
+ reset: X
1275
+ };
1276
+ }
1277
+ }), Po = function(t) {
1278
+ return t === void 0 && (t = {}), {
1279
+ name: "flip",
1280
+ options: t,
1281
+ async fn(n) {
1282
+ var r, o;
1283
+ const {
1284
+ placement: i,
1285
+ middlewareData: s,
1286
+ rects: c,
1287
+ initialPlacement: l,
1288
+ platform: u,
1289
+ elements: f
1290
+ } = n, h = Le(t, n), {
1291
+ mainAxis: d = !0,
1292
+ crossAxis: m = !0,
1293
+ fallbackPlacements: y,
1294
+ fallbackStrategy: E = "bestFit",
1295
+ fallbackAxisSideDirection: S = "none",
1296
+ flipAlignment: w = !0
1297
+ } = h, _ = Kn(h, Oo);
1298
+ if ((r = s.arrow) != null && r.alignmentOffset)
1299
+ return {};
1300
+ const C = Oe(i), v = Oe(l) === l, g = await (u.isRTL == null ? void 0 : u.isRTL(f.floating)), T = y || (v || !w ? [st(l)] : _o(l));
1301
+ !y && S !== "none" && T.push(...xo(l, w, S, g));
1302
+ const N = [l, ...T], te = await nr(n, _), $ = [];
1303
+ let H = ((o = s.flip) == null ? void 0 : o.overflows) || [];
1304
+ if (d && $.push(te[C]), m) {
1305
+ const M = wo(i, c, g);
1306
+ $.push(te[M[0]], te[M[1]]);
1307
+ }
1308
+ if (H = [...H, {
1309
+ placement: i,
1310
+ overflows: $
1311
+ }], !$.every((M) => M <= 0)) {
1312
+ var z, J;
1313
+ const M = (((z = s.flip) == null ? void 0 : z.index) || 0) + 1, G = N[M];
1314
+ if (G)
1315
+ return {
1316
+ data: {
1317
+ index: M,
1318
+ overflows: H
1319
+ },
1320
+ reset: {
1321
+ placement: G
1322
+ }
1323
+ };
1324
+ let X = (J = H.filter((Y) => Y.overflows[0] <= 0).sort((Y, se) => Y.overflows[1] - se.overflows[1])[0]) == null ? void 0 : J.placement;
1325
+ if (!X)
1326
+ switch (E) {
1327
+ case "bestFit": {
1328
+ var W;
1329
+ const Y = (W = H.map((se) => [se.placement, se.overflows.filter((he) => he > 0).reduce((he, Xe) => he + Xe, 0)]).sort((se, he) => se[1] - he[1])[0]) == null ? void 0 : W[0];
1330
+ Y && (X = Y);
1331
+ break;
1332
+ }
1333
+ case "initialPlacement":
1334
+ X = l;
1335
+ break;
1336
+ }
1337
+ if (i !== X)
1338
+ return {
1339
+ reset: {
1340
+ placement: X
1341
+ }
1342
+ };
1343
+ }
1344
+ return {};
1345
+ }
1346
+ };
1347
+ }, Io = function(t) {
1348
+ return t === void 0 && (t = {}), {
1349
+ name: "shift",
1350
+ options: t,
1351
+ async fn(n) {
1352
+ const {
1353
+ x: r,
1354
+ y: o,
1355
+ placement: i
1356
+ } = n, s = Le(t, n), {
1357
+ mainAxis: c = !0,
1358
+ crossAxis: l = !1,
1359
+ limiter: u = {
1360
+ fn: (_) => {
1361
+ let {
1362
+ x: C,
1363
+ y: v
1364
+ } = _;
1365
+ return {
1366
+ x: C,
1367
+ y: v
1368
+ };
1369
+ }
1370
+ }
1371
+ } = s, f = Kn(s, Co), h = {
1372
+ x: r,
1373
+ y: o
1374
+ }, d = await nr(n, f), m = ut(Oe(i)), y = Ut(m);
1375
+ let E = h[y], S = h[m];
1376
+ if (c) {
1377
+ const _ = y === "y" ? "top" : "left", C = y === "y" ? "bottom" : "right", v = E + d[_], g = E - d[C];
1378
+ E = Pt(v, E, g);
1379
+ }
1380
+ if (l) {
1381
+ const _ = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", v = S + d[_], g = S - d[C];
1382
+ S = Pt(v, S, g);
1383
+ }
1384
+ const w = u.fn(B({}, n, {
1385
+ [y]: E,
1386
+ [m]: S
1387
+ }));
1388
+ return B({}, w, {
1389
+ data: {
1390
+ x: w.x - r,
1391
+ y: w.y - o
1392
+ }
1393
+ });
1394
+ }
1395
+ };
1396
+ }, ko = function(t) {
1397
+ return t === void 0 && (t = {}), {
1398
+ options: t,
1399
+ fn(n) {
1400
+ const {
1401
+ x: r,
1402
+ y: o,
1403
+ placement: i,
1404
+ rects: s,
1405
+ middlewareData: c
1406
+ } = n, {
1407
+ offset: l = 0,
1408
+ mainAxis: u = !0,
1409
+ crossAxis: f = !0
1410
+ } = Le(t, n), h = {
1411
+ x: r,
1412
+ y: o
1413
+ }, d = ut(i), m = Ut(d);
1414
+ let y = h[m], E = h[d];
1415
+ const S = Le(l, n), w = typeof S == "number" ? {
1416
+ mainAxis: S,
1417
+ crossAxis: 0
1418
+ } : B({
1419
+ mainAxis: 0,
1420
+ crossAxis: 0
1421
+ }, S);
1422
+ if (u) {
1423
+ const v = m === "y" ? "height" : "width", g = s.reference[m] - s.floating[v] + w.mainAxis, T = s.reference[m] + s.reference[v] - w.mainAxis;
1424
+ y < g ? y = g : y > T && (y = T);
1425
+ }
1426
+ if (f) {
1427
+ var _, C;
1428
+ const v = m === "y" ? "width" : "height", g = ["top", "left"].includes(Oe(i)), T = s.reference[d] - s.floating[v] + (g && ((_ = c.offset) == null ? void 0 : _[d]) || 0) + (g ? 0 : w.crossAxis), N = s.reference[d] + s.reference[v] + (g ? 0 : ((C = c.offset) == null ? void 0 : C[d]) || 0) - (g ? w.crossAxis : 0);
1429
+ E < T ? E = T : E > N && (E = N);
1430
+ }
1431
+ return {
1432
+ [m]: y,
1433
+ [d]: E
1434
+ };
1435
+ }
1436
+ };
1437
+ };
1438
+ function ge(e) {
1439
+ return rr(e) ? (e.nodeName || "").toLowerCase() : "#document";
1440
+ }
1441
+ function q(e) {
1442
+ var t;
1443
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1444
+ }
1445
+ function le(e) {
1446
+ var t;
1447
+ return (t = (rr(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1448
+ }
1449
+ function rr(e) {
1450
+ return e instanceof Node || e instanceof q(e).Node;
1451
+ }
1452
+ function ce(e) {
1453
+ return e instanceof Element || e instanceof q(e).Element;
1454
+ }
1455
+ function oe(e) {
1456
+ return e instanceof HTMLElement || e instanceof q(e).HTMLElement;
1457
+ }
1458
+ function En(e) {
1459
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
1460
+ }
1461
+ function Je(e) {
1462
+ const {
1463
+ overflow: t,
1464
+ overflowX: n,
1465
+ overflowY: r,
1466
+ display: o
1467
+ } = Q(e);
1468
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
1469
+ }
1470
+ function Ao(e) {
1471
+ return ["table", "td", "th"].includes(ge(e));
1472
+ }
1473
+ function qt(e) {
1474
+ const t = Kt(), n = Q(e);
1475
+ return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
1476
+ }
1477
+ function Mo(e) {
1478
+ let t = je(e);
1479
+ for (; oe(t) && !ft(t); ) {
1480
+ if (qt(t))
1481
+ return t;
1482
+ t = je(t);
1483
+ }
1484
+ return null;
1485
+ }
1486
+ function Kt() {
1487
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1488
+ }
1489
+ function ft(e) {
1490
+ return ["html", "body", "#document"].includes(ge(e));
1491
+ }
1492
+ function Q(e) {
1493
+ return q(e).getComputedStyle(e);
1494
+ }
1495
+ function dt(e) {
1496
+ return ce(e) ? {
1497
+ scrollLeft: e.scrollLeft,
1498
+ scrollTop: e.scrollTop
1499
+ } : {
1500
+ scrollLeft: e.pageXOffset,
1501
+ scrollTop: e.pageYOffset
1502
+ };
1503
+ }
1504
+ function je(e) {
1505
+ if (ge(e) === "html")
1506
+ return e;
1507
+ const t = (
1508
+ // Step into the shadow DOM of the parent of a slotted node.
1509
+ e.assignedSlot || // DOM Element detected.
1510
+ e.parentNode || // ShadowRoot detected.
1511
+ En(e) && e.host || // Fallback.
1512
+ le(e)
1513
+ );
1514
+ return En(t) ? t.host : t;
1515
+ }
1516
+ function or(e) {
1517
+ const t = je(e);
1518
+ return ft(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : oe(t) && Je(t) ? t : or(t);
1519
+ }
1520
+ function qe(e, t, n) {
1521
+ var r;
1522
+ t === void 0 && (t = []), n === void 0 && (n = !0);
1523
+ const o = or(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = q(o);
1524
+ return i ? t.concat(s, s.visualViewport || [], Je(o) ? o : [], s.frameElement && n ? qe(s.frameElement) : []) : t.concat(o, qe(o, [], n));
1525
+ }
1526
+ function ir(e) {
1527
+ const t = Q(e);
1528
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1529
+ const o = oe(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = it(n) !== i || it(r) !== s;
1530
+ return c && (n = i, r = s), {
1531
+ width: n,
1532
+ height: r,
1533
+ $: c
1534
+ };
1535
+ }
1536
+ function zt(e) {
1537
+ return ce(e) ? e : e.contextElement;
1538
+ }
1539
+ function Me(e) {
1540
+ const t = zt(e);
1541
+ if (!oe(t))
1542
+ return me(1);
1543
+ const n = t.getBoundingClientRect(), {
1544
+ width: r,
1545
+ height: o,
1546
+ $: i
1547
+ } = ir(t);
1548
+ let s = (i ? it(n.width) : n.width) / r, c = (i ? it(n.height) : n.height) / o;
1549
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1550
+ x: s,
1551
+ y: c
1552
+ };
1553
+ }
1554
+ const Do = /* @__PURE__ */ me(0);
1555
+ function sr(e) {
1556
+ const t = q(e);
1557
+ return !Kt() || !t.visualViewport ? Do : {
1558
+ x: t.visualViewport.offsetLeft,
1559
+ y: t.visualViewport.offsetTop
1560
+ };
1561
+ }
1562
+ function Fo(e, t, n) {
1563
+ return t === void 0 && (t = !1), !n || t && n !== q(e) ? !1 : t;
1564
+ }
1565
+ function Ce(e, t, n, r) {
1566
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1567
+ const o = e.getBoundingClientRect(), i = zt(e);
1568
+ let s = me(1);
1569
+ t && (r ? ce(r) && (s = Me(r)) : s = Me(e));
1570
+ const c = Fo(i, n, r) ? sr(i) : me(0);
1571
+ let l = (o.left + c.x) / s.x, u = (o.top + c.y) / s.y, f = o.width / s.x, h = o.height / s.y;
1572
+ if (i) {
1573
+ const d = q(i), m = r && ce(r) ? q(r) : r;
1574
+ let y = d, E = y.frameElement;
1575
+ for (; E && r && m !== y; ) {
1576
+ const S = Me(E), w = E.getBoundingClientRect(), _ = Q(E), C = w.left + (E.clientLeft + parseFloat(_.paddingLeft)) * S.x, v = w.top + (E.clientTop + parseFloat(_.paddingTop)) * S.y;
1577
+ l *= S.x, u *= S.y, f *= S.x, h *= S.y, l += C, u += v, y = q(E), E = y.frameElement;
1578
+ }
1579
+ }
1580
+ return at({
1581
+ width: f,
1582
+ height: h,
1583
+ x: l,
1584
+ y: u
1585
+ });
1586
+ }
1587
+ const Lo = [":popover-open", ":modal"];
1588
+ function ar(e) {
1589
+ return Lo.some((t) => {
1590
+ try {
1591
+ return e.matches(t);
1592
+ } catch {
1593
+ return !1;
1594
+ }
1595
+ });
1596
+ }
1597
+ function jo(e) {
1598
+ let {
1599
+ elements: t,
1600
+ rect: n,
1601
+ offsetParent: r,
1602
+ strategy: o
1603
+ } = e;
1604
+ const i = o === "fixed", s = le(r), c = t ? ar(t.floating) : !1;
1605
+ if (r === s || c && i)
1606
+ return n;
1607
+ let l = {
1608
+ scrollLeft: 0,
1609
+ scrollTop: 0
1610
+ }, u = me(1);
1611
+ const f = me(0), h = oe(r);
1612
+ if ((h || !h && !i) && ((ge(r) !== "body" || Je(s)) && (l = dt(r)), oe(r))) {
1613
+ const d = Ce(r);
1614
+ u = Me(r), f.x = d.x + r.clientLeft, f.y = d.y + r.clientTop;
1615
+ }
1616
+ return {
1617
+ width: n.width * u.x,
1618
+ height: n.height * u.y,
1619
+ x: n.x * u.x - l.scrollLeft * u.x + f.x,
1620
+ y: n.y * u.y - l.scrollTop * u.y + f.y
1621
+ };
1622
+ }
1623
+ function Bo(e) {
1624
+ return Array.from(e.getClientRects());
1625
+ }
1626
+ function cr(e) {
1627
+ return Ce(le(e)).left + dt(e).scrollLeft;
1628
+ }
1629
+ function $o(e) {
1630
+ const t = le(e), n = dt(e), r = e.ownerDocument.body, o = _e(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = _e(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1631
+ let s = -n.scrollLeft + cr(e);
1632
+ const c = -n.scrollTop;
1633
+ return Q(r).direction === "rtl" && (s += _e(t.clientWidth, r.clientWidth) - o), {
1634
+ width: o,
1635
+ height: i,
1636
+ x: s,
1637
+ y: c
1638
+ };
1639
+ }
1640
+ function Wo(e, t) {
1641
+ const n = q(e), r = le(e), o = n.visualViewport;
1642
+ let i = r.clientWidth, s = r.clientHeight, c = 0, l = 0;
1643
+ if (o) {
1644
+ i = o.width, s = o.height;
1645
+ const u = Kt();
1646
+ (!u || u && t === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
1647
+ }
1648
+ return {
1649
+ width: i,
1650
+ height: s,
1651
+ x: c,
1652
+ y: l
1653
+ };
1654
+ }
1655
+ function No(e, t) {
1656
+ const n = Ce(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = oe(e) ? Me(e) : me(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, l = o * i.x, u = r * i.y;
1657
+ return {
1658
+ width: s,
1659
+ height: c,
1660
+ x: l,
1661
+ y: u
1662
+ };
1663
+ }
1664
+ function xn(e, t, n) {
1665
+ let r;
1666
+ if (t === "viewport")
1667
+ r = Wo(e, n);
1668
+ else if (t === "document")
1669
+ r = $o(le(e));
1670
+ else if (ce(t))
1671
+ r = No(t, n);
1672
+ else {
1673
+ const o = sr(e);
1674
+ r = B({}, t, {
1675
+ x: t.x - o.x,
1676
+ y: t.y - o.y
1677
+ });
1678
+ }
1679
+ return at(r);
1680
+ }
1681
+ function lr(e, t) {
1682
+ const n = je(e);
1683
+ return n === t || !ce(n) || ft(n) ? !1 : Q(n).position === "fixed" || lr(n, t);
1684
+ }
1685
+ function Vo(e, t) {
1686
+ const n = t.get(e);
1687
+ if (n)
1688
+ return n;
1689
+ let r = qe(e, [], !1).filter((c) => ce(c) && ge(c) !== "body"), o = null;
1690
+ const i = Q(e).position === "fixed";
1691
+ let s = i ? je(e) : e;
1692
+ for (; ce(s) && !ft(s); ) {
1693
+ const c = Q(s), l = qt(s);
1694
+ !l && c.position === "fixed" && (o = null), (i ? !l && !o : !l && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Je(s) && !l && lr(e, s)) ? r = r.filter((f) => f !== s) : o = c, s = je(s);
1695
+ }
1696
+ return t.set(e, r), r;
1697
+ }
1698
+ function Uo(e) {
1699
+ let {
1700
+ element: t,
1701
+ boundary: n,
1702
+ rootBoundary: r,
1703
+ strategy: o
1704
+ } = e;
1705
+ const s = [...n === "clippingAncestors" ? Vo(t, this._c) : [].concat(n), r], c = s[0], l = s.reduce((u, f) => {
1706
+ const h = xn(t, f, o);
1707
+ return u.top = _e(h.top, u.top), u.right = Fe(h.right, u.right), u.bottom = Fe(h.bottom, u.bottom), u.left = _e(h.left, u.left), u;
1708
+ }, xn(t, c, o));
1709
+ return {
1710
+ width: l.right - l.left,
1711
+ height: l.bottom - l.top,
1712
+ x: l.left,
1713
+ y: l.top
1714
+ };
1715
+ }
1716
+ function Ho(e) {
1717
+ const {
1718
+ width: t,
1719
+ height: n
1720
+ } = ir(e);
1721
+ return {
1722
+ width: t,
1723
+ height: n
1724
+ };
1725
+ }
1726
+ function Yo(e, t, n) {
1727
+ const r = oe(t), o = le(t), i = n === "fixed", s = Ce(e, !0, i, t);
1728
+ let c = {
1729
+ scrollLeft: 0,
1730
+ scrollTop: 0
1731
+ };
1732
+ const l = me(0);
1733
+ if (r || !r && !i)
1734
+ if ((ge(t) !== "body" || Je(o)) && (c = dt(t)), r) {
1735
+ const h = Ce(t, !0, i, t);
1736
+ l.x = h.x + t.clientLeft, l.y = h.y + t.clientTop;
1737
+ } else
1738
+ o && (l.x = cr(o));
1739
+ const u = s.left + c.scrollLeft - l.x, f = s.top + c.scrollTop - l.y;
1740
+ return {
1741
+ x: u,
1742
+ y: f,
1743
+ width: s.width,
1744
+ height: s.height
1745
+ };
1746
+ }
1747
+ function Sn(e, t) {
1748
+ return !oe(e) || Q(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1749
+ }
1750
+ function ur(e, t) {
1751
+ const n = q(e);
1752
+ if (!oe(e) || ar(e))
1753
+ return n;
1754
+ let r = Sn(e, t);
1755
+ for (; r && Ao(r) && Q(r).position === "static"; )
1756
+ r = Sn(r, t);
1757
+ return r && (ge(r) === "html" || ge(r) === "body" && Q(r).position === "static" && !qt(r)) ? n : r || Mo(e) || n;
1758
+ }
1759
+ const qo = async function(t) {
1760
+ const n = this.getOffsetParent || ur, r = this.getDimensions;
1761
+ return {
1762
+ reference: Yo(t.reference, await n(t.floating), t.strategy),
1763
+ floating: B({
1764
+ x: 0,
1765
+ y: 0
1766
+ }, await r(t.floating))
1767
+ };
1768
+ };
1769
+ function Ko(e) {
1770
+ return Q(e).direction === "rtl";
1771
+ }
1772
+ const zo = {
1773
+ convertOffsetParentRelativeRectToViewportRelativeRect: jo,
1774
+ getDocumentElement: le,
1775
+ getClippingRect: Uo,
1776
+ getOffsetParent: ur,
1777
+ getElementRects: qo,
1778
+ getClientRects: Bo,
1779
+ getDimensions: Ho,
1780
+ getScale: Me,
1781
+ isElement: ce,
1782
+ isRTL: Ko
1783
+ };
1784
+ function Jo(e, t) {
1785
+ let n = null, r;
1786
+ const o = le(e);
1787
+ function i() {
1788
+ var c;
1789
+ clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
1790
+ }
1791
+ function s(c, l) {
1792
+ c === void 0 && (c = !1), l === void 0 && (l = 1), i();
1793
+ const {
1794
+ left: u,
1795
+ top: f,
1796
+ width: h,
1797
+ height: d
1798
+ } = e.getBoundingClientRect();
1799
+ if (c || t(), !h || !d)
1800
+ return;
1801
+ const m = rt(f), y = rt(o.clientWidth - (u + h)), E = rt(o.clientHeight - (f + d)), S = rt(u), _ = {
1802
+ rootMargin: -m + "px " + -y + "px " + -E + "px " + -S + "px",
1803
+ threshold: _e(0, Fe(1, l)) || 1
1804
+ };
1805
+ let C = !0;
1806
+ function v(g) {
1807
+ const T = g[0].intersectionRatio;
1808
+ if (T !== l) {
1809
+ if (!C)
1810
+ return s();
1811
+ T ? s(!1, T) : r = setTimeout(() => {
1812
+ s(!1, 1e-7);
1813
+ }, 100);
1814
+ }
1815
+ C = !1;
1816
+ }
1817
+ try {
1818
+ n = new IntersectionObserver(v, B({}, _, {
1819
+ // Handle <iframe>s
1820
+ root: o.ownerDocument
1821
+ }));
1822
+ } catch {
1823
+ n = new IntersectionObserver(v, _);
1824
+ }
1825
+ n.observe(e);
1826
+ }
1827
+ return s(!0), i;
1828
+ }
1829
+ function Go(e, t, n, r) {
1830
+ r === void 0 && (r = {});
1831
+ const {
1832
+ ancestorScroll: o = !0,
1833
+ ancestorResize: i = !0,
1834
+ elementResize: s = typeof ResizeObserver == "function",
1835
+ layoutShift: c = typeof IntersectionObserver == "function",
1836
+ animationFrame: l = !1
1837
+ } = r, u = zt(e), f = o || i ? [...u ? qe(u) : [], ...qe(t)] : [];
1838
+ f.forEach((w) => {
1839
+ o && w.addEventListener("scroll", n, {
1840
+ passive: !0
1841
+ }), i && w.addEventListener("resize", n);
1842
+ });
1843
+ const h = u && c ? Jo(u, n) : null;
1844
+ let d = -1, m = null;
1845
+ s && (m = new ResizeObserver((w) => {
1846
+ let [_] = w;
1847
+ _ && _.target === u && m && (m.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1848
+ var C;
1849
+ (C = m) == null || C.observe(t);
1850
+ })), n();
1851
+ }), u && !l && m.observe(u), m.observe(t));
1852
+ let y, E = l ? Ce(e) : null;
1853
+ l && S();
1854
+ function S() {
1855
+ const w = Ce(e);
1856
+ E && (w.x !== E.x || w.y !== E.y || w.width !== E.width || w.height !== E.height) && n(), E = w, y = requestAnimationFrame(S);
1857
+ }
1858
+ return n(), () => {
1859
+ var w;
1860
+ f.forEach((_) => {
1861
+ o && _.removeEventListener("scroll", n), i && _.removeEventListener("resize", n);
1862
+ }), h == null || h(), (w = m) == null || w.disconnect(), m = null, l && cancelAnimationFrame(y);
1863
+ };
1864
+ }
1865
+ const Xo = Io, Zo = Po, Qo = Ro, ei = ko, ti = (e, t, n) => {
1866
+ const r = /* @__PURE__ */ new Map(), o = B({
1867
+ platform: zo
1868
+ }, n), i = B({}, o.platform, {
1869
+ _c: r
1870
+ });
1871
+ return To(e, t, B({}, o, {
1872
+ platform: i
1873
+ }));
1874
+ };
1875
+ function ni(e) {
1876
+ e.cleanup && e.cleanup();
1877
+ const t = e._getResolvedAttachToOptions();
1878
+ let n = t.element;
1879
+ const r = ci(t, e), o = Qn(t);
1880
+ return o && (n = document.body, e.shepherdElementComponent.getElement().classList.add("shepherd-centered")), e.cleanup = Go(n, e.el, () => {
1881
+ var i;
1882
+ if (!e.el) {
1883
+ (i = e.cleanup) == null || i.call(e);
1884
+ return;
1885
+ }
1886
+ ii(n, e, r, o);
1887
+ }), e.target = t.element, r;
1888
+ }
1889
+ function ri(e, t) {
1890
+ return {
1891
+ floatingUIOptions: Vt(e.floatingUIOptions || {}, t.floatingUIOptions || {})
1892
+ };
1893
+ }
1894
+ function oi(e) {
1895
+ e.cleanup && e.cleanup(), e.cleanup = null;
1896
+ }
1897
+ function ii(e, t, n, r) {
1898
+ return ti(e, t.el, n).then(si(t, r)).then((o) => new Promise((i) => {
1899
+ setTimeout(() => i(o), 300);
1900
+ })).then((o) => {
1901
+ o != null && o.el && o.el.focus({ preventScroll: !0 });
1902
+ });
1903
+ }
1904
+ function si(e, t) {
1905
+ return ({ x: n, y: r, placement: o, middlewareData: i }) => (e.el && (t ? Object.assign(e.el.style, {
1906
+ position: "fixed",
1907
+ left: "50%",
1908
+ top: "50%",
1909
+ transform: "translate(-50%, -50%)"
1910
+ }) : Object.assign(e.el.style, {
1911
+ position: "absolute",
1912
+ left: `${n}px`,
1913
+ top: `${r}px`
1914
+ }), e.el.dataset.popperPlacement = o, ai(e.el, i)), e);
1915
+ }
1916
+ function ai(e, t) {
1917
+ const n = e.querySelector(".shepherd-arrow");
1918
+ if (ze(n) && t.arrow) {
1919
+ const { x: r, y: o } = t.arrow;
1920
+ Object.assign(n.style, {
1921
+ left: r != null ? `${r}px` : "",
1922
+ top: o != null ? `${o}px` : ""
1923
+ });
1924
+ }
1925
+ }
1926
+ function ci(e, t) {
1927
+ const n = {
1928
+ strategy: "absolute"
1929
+ };
1930
+ n.middleware = [];
1931
+ const r = li(t);
1932
+ return Qn(e) || (n.middleware.push(
1933
+ Zo(),
1934
+ // Replicate PopperJS default behavior.
1935
+ Xo({
1936
+ limiter: ei(),
1937
+ crossAxis: !0
1938
+ })
1939
+ ), r && n.middleware.push(Qo({ element: r })), n.placement = e.on), Vt(t.options.floatingUIOptions || {}, n);
1940
+ }
1941
+ function li(e) {
1942
+ return e.options.arrow && e.el ? e.el.querySelector(".shepherd-arrow") : !1;
1943
+ }
1944
+ function K() {
1945
+ }
1946
+ function ui(e, t) {
1947
+ for (const n in t)
1948
+ e[n] = t[n];
1949
+ return (
1950
+ /** @type {T & S} */
1951
+ e
1952
+ );
1953
+ }
1954
+ function fr(e) {
1955
+ return e();
1956
+ }
1957
+ function On() {
1958
+ return /* @__PURE__ */ Object.create(null);
1959
+ }
1960
+ function Ge(e) {
1961
+ e.forEach(fr);
1962
+ }
1963
+ function Jt(e) {
1964
+ return typeof e == "function";
1965
+ }
1966
+ function ue(e, t) {
1967
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
1968
+ }
1969
+ function fi(e) {
1970
+ return Object.keys(e).length === 0;
1971
+ }
1972
+ function Be(e, t) {
1973
+ e.appendChild(t);
1974
+ }
1975
+ function re(e, t, n) {
1976
+ e.insertBefore(t, n || null);
1977
+ }
1978
+ function ee(e) {
1979
+ e.parentNode && e.parentNode.removeChild(e);
1980
+ }
1981
+ function di(e, t) {
1982
+ for (let n = 0; n < e.length; n += 1)
1983
+ e[n] && e[n].d(t);
1984
+ }
1985
+ function ie(e) {
1986
+ return document.createElement(e);
1987
+ }
1988
+ function Cn(e) {
1989
+ return document.createElementNS("http://www.w3.org/2000/svg", e);
1990
+ }
1991
+ function dr(e) {
1992
+ return document.createTextNode(e);
1993
+ }
1994
+ function ct() {
1995
+ return dr(" ");
1996
+ }
1997
+ function hi() {
1998
+ return dr("");
1999
+ }
2000
+ function ht(e, t, n, r) {
2001
+ return e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r);
2002
+ }
2003
+ function A(e, t, n) {
2004
+ n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
2005
+ }
2006
+ const pi = ["width", "height"];
2007
+ function Tn(e, t) {
2008
+ const n = Object.getOwnPropertyDescriptors(e.__proto__);
2009
+ for (const r in t)
2010
+ t[r] == null ? e.removeAttribute(r) : r === "style" ? e.style.cssText = t[r] : r === "__value" ? e.value = e[r] = t[r] : n[r] && n[r].set && pi.indexOf(r) === -1 ? e[r] = t[r] : A(e, r, t[r]);
2011
+ }
2012
+ function mi(e) {
2013
+ return Array.from(e.childNodes);
2014
+ }
2015
+ function Ie(e, t, n) {
2016
+ e.classList.toggle(t, !!n);
2017
+ }
2018
+ let Ke;
2019
+ function He(e) {
2020
+ Ke = e;
2021
+ }
2022
+ function hr() {
2023
+ if (!Ke)
2024
+ throw new Error("Function called outside component initialization");
2025
+ return Ke;
2026
+ }
2027
+ function gi(e) {
2028
+ hr().$$.on_mount.push(e);
2029
+ }
2030
+ function Gt(e) {
2031
+ hr().$$.after_update.push(e);
2032
+ }
2033
+ const Ae = [], $e = [];
2034
+ let De = [];
2035
+ const Rn = [], bi = /* @__PURE__ */ Promise.resolve();
2036
+ let kt = !1;
2037
+ function yi() {
2038
+ kt || (kt = !0, bi.then(pr));
2039
+ }
2040
+ function At(e) {
2041
+ De.push(e);
2042
+ }
2043
+ const Ot = /* @__PURE__ */ new Set();
2044
+ let ke = 0;
2045
+ function pr() {
2046
+ if (ke !== 0)
2047
+ return;
2048
+ const e = Ke;
2049
+ do {
2050
+ try {
2051
+ for (; ke < Ae.length; ) {
2052
+ const t = Ae[ke];
2053
+ ke++, He(t), vi(t.$$);
2054
+ }
2055
+ } catch (t) {
2056
+ throw Ae.length = 0, ke = 0, t;
2057
+ }
2058
+ for (He(null), Ae.length = 0, ke = 0; $e.length; )
2059
+ $e.pop()();
2060
+ for (let t = 0; t < De.length; t += 1) {
2061
+ const n = De[t];
2062
+ Ot.has(n) || (Ot.add(n), n());
2063
+ }
2064
+ De.length = 0;
2065
+ } while (Ae.length);
2066
+ for (; Rn.length; )
2067
+ Rn.pop()();
2068
+ kt = !1, Ot.clear(), He(e);
2069
+ }
2070
+ function vi(e) {
2071
+ if (e.fragment !== null) {
2072
+ e.update(), Ge(e.before_update);
2073
+ const t = e.dirty;
2074
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(At);
2075
+ }
2076
+ }
2077
+ function wi(e) {
2078
+ const t = [], n = [];
2079
+ De.forEach((r) => e.indexOf(r) === -1 ? t.push(r) : n.push(r)), n.forEach((r) => r()), De = t;
2080
+ }
2081
+ const ot = /* @__PURE__ */ new Set();
2082
+ let we;
2083
+ function Ee() {
2084
+ we = {
2085
+ r: 0,
2086
+ c: [],
2087
+ p: we
2088
+ // parent group
2089
+ };
2090
+ }
2091
+ function xe() {
2092
+ we.r || Ge(we.c), we = we.p;
2093
+ }
2094
+ function I(e, t) {
2095
+ e && e.i && (ot.delete(e), e.i(t));
2096
+ }
2097
+ function L(e, t, n, r) {
2098
+ if (e && e.o) {
2099
+ if (ot.has(e))
2100
+ return;
2101
+ ot.add(e), we.c.push(() => {
2102
+ ot.delete(e), r && (n && e.d(1), r());
2103
+ }), e.o(t);
2104
+ } else
2105
+ r && r();
2106
+ }
2107
+ function Pn(e) {
2108
+ return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
2109
+ }
2110
+ function _i(e, t) {
2111
+ const n = {}, r = {}, o = {
2112
+ $$scope: 1
2113
+ };
2114
+ let i = e.length;
2115
+ for (; i--; ) {
2116
+ const s = e[i], c = t[i];
2117
+ if (c) {
2118
+ for (const l in s)
2119
+ l in c || (r[l] = 1);
2120
+ for (const l in c)
2121
+ o[l] || (n[l] = c[l], o[l] = 1);
2122
+ e[i] = c;
2123
+ } else
2124
+ for (const l in s)
2125
+ o[l] = 1;
2126
+ }
2127
+ for (const s in r)
2128
+ s in n || (n[s] = void 0);
2129
+ return n;
2130
+ }
2131
+ function Te(e) {
2132
+ e && e.c();
2133
+ }
2134
+ function ye(e, t, n) {
2135
+ const {
2136
+ fragment: r,
2137
+ after_update: o
2138
+ } = e.$$;
2139
+ r && r.m(t, n), At(() => {
2140
+ const i = e.$$.on_mount.map(fr).filter(Jt);
2141
+ e.$$.on_destroy ? e.$$.on_destroy.push(...i) : Ge(i), e.$$.on_mount = [];
2142
+ }), o.forEach(At);
2143
+ }
2144
+ function ve(e, t) {
2145
+ const n = e.$$;
2146
+ n.fragment !== null && (wi(n.after_update), Ge(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
2147
+ }
2148
+ function Ei(e, t) {
2149
+ e.$$.dirty[0] === -1 && (Ae.push(e), yi(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
2150
+ }
2151
+ function fe(e, t, n, r, o, i, s = null, c = [-1]) {
2152
+ const l = Ke;
2153
+ He(e);
2154
+ const u = e.$$ = {
2155
+ fragment: null,
2156
+ ctx: [],
2157
+ // state
2158
+ props: i,
2159
+ update: K,
2160
+ not_equal: o,
2161
+ bound: On(),
2162
+ // lifecycle
2163
+ on_mount: [],
2164
+ on_destroy: [],
2165
+ on_disconnect: [],
2166
+ before_update: [],
2167
+ after_update: [],
2168
+ context: new Map(t.context || (l ? l.$$.context : [])),
2169
+ // everything else
2170
+ callbacks: On(),
2171
+ dirty: c,
2172
+ skip_bound: !1,
2173
+ root: t.target || l.$$.root
2174
+ };
2175
+ s && s(u.root);
2176
+ let f = !1;
2177
+ if (u.ctx = n ? n(e, t.props || {}, (h, d, ...m) => {
2178
+ const y = m.length ? m[0] : d;
2179
+ return u.ctx && o(u.ctx[h], u.ctx[h] = y) && (!u.skip_bound && u.bound[h] && u.bound[h](y), f && Ei(e, h)), d;
2180
+ }) : [], u.update(), f = !0, Ge(u.before_update), u.fragment = r ? r(u.ctx) : !1, t.target) {
2181
+ if (t.hydrate) {
2182
+ const h = mi(t.target);
2183
+ u.fragment && u.fragment.l(h), h.forEach(ee);
2184
+ } else
2185
+ u.fragment && u.fragment.c();
2186
+ t.intro && I(e.$$.fragment), ye(e, t.target, t.anchor), pr();
2187
+ }
2188
+ He(l);
2189
+ }
2190
+ class de {
2191
+ constructor() {
2192
+ this.$$ = void 0, this.$$set = void 0;
2193
+ }
2194
+ /** @returns {void} */
2195
+ $destroy() {
2196
+ ve(this, 1), this.$destroy = K;
2197
+ }
2198
+ /**
2199
+ * @template {Extract<keyof Events, string>} K
2200
+ * @param {K} type
2201
+ * @param {((e: Events[K]) => void) | null | undefined} callback
2202
+ * @returns {() => void}
2203
+ */
2204
+ $on(t, n) {
2205
+ if (!Jt(n))
2206
+ return K;
2207
+ const r = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
2208
+ return r.push(n), () => {
2209
+ const o = r.indexOf(n);
2210
+ o !== -1 && r.splice(o, 1);
2211
+ };
2212
+ }
2213
+ /**
2214
+ * @param {Partial<Props>} props
2215
+ * @returns {void}
2216
+ */
2217
+ $set(t) {
2218
+ this.$$set && !fi(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
2219
+ }
2220
+ }
2221
+ const xi = "4";
2222
+ typeof window < "u" && (window.__svelte || (window.__svelte = {
2223
+ v: /* @__PURE__ */ new Set()
2224
+ })).v.add(xi);
2225
+ function Si(e) {
2226
+ let t, n, r, o, i;
2227
+ return {
2228
+ c() {
2229
+ t = ie("button"), A(t, "aria-label", n = /*label*/
2230
+ e[3] ? (
2231
+ /*label*/
2232
+ e[3]
2233
+ ) : null), A(t, "class", r = `${/*classes*/
2234
+ e[1] || ""} shepherd-button ${/*secondary*/
2235
+ e[4] ? "shepherd-button-secondary" : ""}`), t.disabled = /*disabled*/
2236
+ e[2], A(t, "tabindex", "0");
2237
+ },
2238
+ m(s, c) {
2239
+ re(s, t, c), t.innerHTML = /*text*/
2240
+ e[5], o || (i = ht(t, "click", function() {
2241
+ Jt(
2242
+ /*action*/
2243
+ e[0]
2244
+ ) && e[0].apply(this, arguments);
2245
+ }), o = !0);
2246
+ },
2247
+ p(s, [c]) {
2248
+ e = s, c & /*text*/
2249
+ 32 && (t.innerHTML = /*text*/
2250
+ e[5]), c & /*label*/
2251
+ 8 && n !== (n = /*label*/
2252
+ e[3] ? (
2253
+ /*label*/
2254
+ e[3]
2255
+ ) : null) && A(t, "aria-label", n), c & /*classes, secondary*/
2256
+ 18 && r !== (r = `${/*classes*/
2257
+ e[1] || ""} shepherd-button ${/*secondary*/
2258
+ e[4] ? "shepherd-button-secondary" : ""}`) && A(t, "class", r), c & /*disabled*/
2259
+ 4 && (t.disabled = /*disabled*/
2260
+ e[2]);
2261
+ },
2262
+ i: K,
2263
+ o: K,
2264
+ d(s) {
2265
+ s && ee(t), o = !1, i();
2266
+ }
2267
+ };
2268
+ }
2269
+ function Oi(e, t, n) {
2270
+ let {
2271
+ config: r,
2272
+ step: o
2273
+ } = t, i, s, c, l, u, f;
2274
+ function h(d) {
2275
+ return pe(d) ? d = d.call(o) : d;
2276
+ }
2277
+ return e.$$set = (d) => {
2278
+ "config" in d && n(6, r = d.config), "step" in d && n(7, o = d.step);
2279
+ }, e.$$.update = () => {
2280
+ e.$$.dirty & /*config, step*/
2281
+ 192 && (n(0, i = r.action ? r.action.bind(o.tour) : null), n(1, s = r.classes), n(2, c = r.disabled ? h(r.disabled) : !1), n(3, l = r.label ? h(r.label) : null), n(4, u = r.secondary), n(5, f = r.text ? h(r.text) : null));
2282
+ }, [i, s, c, l, u, f, r, o];
2283
+ }
2284
+ class Ci extends de {
2285
+ constructor(t) {
2286
+ super(), fe(this, t, Oi, Si, ue, {
2287
+ config: 6,
2288
+ step: 7
2289
+ });
2290
+ }
2291
+ }
2292
+ function In(e, t, n) {
2293
+ const r = e.slice();
2294
+ return r[2] = t[n], r;
2295
+ }
2296
+ function kn(e) {
2297
+ let t, n, r = Pn(
2298
+ /*buttons*/
2299
+ e[1]
2300
+ ), o = [];
2301
+ for (let s = 0; s < r.length; s += 1)
2302
+ o[s] = An(In(e, r, s));
2303
+ const i = (s) => L(o[s], 1, 1, () => {
2304
+ o[s] = null;
2305
+ });
2306
+ return {
2307
+ c() {
2308
+ for (let s = 0; s < o.length; s += 1)
2309
+ o[s].c();
2310
+ t = hi();
2311
+ },
2312
+ m(s, c) {
2313
+ for (let l = 0; l < o.length; l += 1)
2314
+ o[l] && o[l].m(s, c);
2315
+ re(s, t, c), n = !0;
2316
+ },
2317
+ p(s, c) {
2318
+ if (c & /*buttons, step*/
2319
+ 3) {
2320
+ r = Pn(
2321
+ /*buttons*/
2322
+ s[1]
2323
+ );
2324
+ let l;
2325
+ for (l = 0; l < r.length; l += 1) {
2326
+ const u = In(s, r, l);
2327
+ o[l] ? (o[l].p(u, c), I(o[l], 1)) : (o[l] = An(u), o[l].c(), I(o[l], 1), o[l].m(t.parentNode, t));
2328
+ }
2329
+ for (Ee(), l = r.length; l < o.length; l += 1)
2330
+ i(l);
2331
+ xe();
2332
+ }
2333
+ },
2334
+ i(s) {
2335
+ if (!n) {
2336
+ for (let c = 0; c < r.length; c += 1)
2337
+ I(o[c]);
2338
+ n = !0;
2339
+ }
2340
+ },
2341
+ o(s) {
2342
+ o = o.filter(Boolean);
2343
+ for (let c = 0; c < o.length; c += 1)
2344
+ L(o[c]);
2345
+ n = !1;
2346
+ },
2347
+ d(s) {
2348
+ s && ee(t), di(o, s);
2349
+ }
2350
+ };
2351
+ }
2352
+ function An(e) {
2353
+ let t, n;
2354
+ return t = new Ci({
2355
+ props: {
2356
+ config: (
2357
+ /*config*/
2358
+ e[2]
2359
+ ),
2360
+ step: (
2361
+ /*step*/
2362
+ e[0]
2363
+ )
2364
+ }
2365
+ }), {
2366
+ c() {
2367
+ Te(t.$$.fragment);
2368
+ },
2369
+ m(r, o) {
2370
+ ye(t, r, o), n = !0;
2371
+ },
2372
+ p(r, o) {
2373
+ const i = {};
2374
+ o & /*buttons*/
2375
+ 2 && (i.config = /*config*/
2376
+ r[2]), o & /*step*/
2377
+ 1 && (i.step = /*step*/
2378
+ r[0]), t.$set(i);
2379
+ },
2380
+ i(r) {
2381
+ n || (I(t.$$.fragment, r), n = !0);
2382
+ },
2383
+ o(r) {
2384
+ L(t.$$.fragment, r), n = !1;
2385
+ },
2386
+ d(r) {
2387
+ ve(t, r);
2388
+ }
2389
+ };
2390
+ }
2391
+ function Ti(e) {
2392
+ let t, n, r = (
2393
+ /*buttons*/
2394
+ e[1] && kn(e)
2395
+ );
2396
+ return {
2397
+ c() {
2398
+ t = ie("footer"), r && r.c(), A(t, "class", "shepherd-footer");
2399
+ },
2400
+ m(o, i) {
2401
+ re(o, t, i), r && r.m(t, null), n = !0;
2402
+ },
2403
+ p(o, [i]) {
2404
+ /*buttons*/
2405
+ o[1] ? r ? (r.p(o, i), i & /*buttons*/
2406
+ 2 && I(r, 1)) : (r = kn(o), r.c(), I(r, 1), r.m(t, null)) : r && (Ee(), L(r, 1, 1, () => {
2407
+ r = null;
2408
+ }), xe());
2409
+ },
2410
+ i(o) {
2411
+ n || (I(r), n = !0);
2412
+ },
2413
+ o(o) {
2414
+ L(r), n = !1;
2415
+ },
2416
+ d(o) {
2417
+ o && ee(t), r && r.d();
2418
+ }
2419
+ };
2420
+ }
2421
+ function Ri(e, t, n) {
2422
+ let r, {
2423
+ step: o
2424
+ } = t;
2425
+ return e.$$set = (i) => {
2426
+ "step" in i && n(0, o = i.step);
2427
+ }, e.$$.update = () => {
2428
+ e.$$.dirty & /*step*/
2429
+ 1 && n(1, r = o.options.buttons);
2430
+ }, [o, r];
2431
+ }
2432
+ class Pi extends de {
2433
+ constructor(t) {
2434
+ super(), fe(this, t, Ri, Ti, ue, {
2435
+ step: 0
2436
+ });
2437
+ }
2438
+ }
2439
+ function Ii(e) {
2440
+ let t, n, r, o, i;
2441
+ return {
2442
+ c() {
2443
+ t = ie("button"), n = ie("span"), n.textContent = "×", A(n, "aria-hidden", "true"), A(t, "aria-label", r = /*cancelIcon*/
2444
+ e[0].label ? (
2445
+ /*cancelIcon*/
2446
+ e[0].label
2447
+ ) : "Close Tour"), A(t, "class", "shepherd-cancel-icon"), A(t, "type", "button");
2448
+ },
2449
+ m(s, c) {
2450
+ re(s, t, c), Be(t, n), o || (i = ht(
2451
+ t,
2452
+ "click",
2453
+ /*handleCancelClick*/
2454
+ e[1]
2455
+ ), o = !0);
2456
+ },
2457
+ p(s, [c]) {
2458
+ c & /*cancelIcon*/
2459
+ 1 && r !== (r = /*cancelIcon*/
2460
+ s[0].label ? (
2461
+ /*cancelIcon*/
2462
+ s[0].label
2463
+ ) : "Close Tour") && A(t, "aria-label", r);
2464
+ },
2465
+ i: K,
2466
+ o: K,
2467
+ d(s) {
2468
+ s && ee(t), o = !1, i();
2469
+ }
2470
+ };
2471
+ }
2472
+ function ki(e, t, n) {
2473
+ let {
2474
+ cancelIcon: r,
2475
+ step: o
2476
+ } = t;
2477
+ const i = (s) => {
2478
+ s.preventDefault(), o.cancel();
2479
+ };
2480
+ return e.$$set = (s) => {
2481
+ "cancelIcon" in s && n(0, r = s.cancelIcon), "step" in s && n(2, o = s.step);
2482
+ }, [r, i, o];
2483
+ }
2484
+ class Ai extends de {
2485
+ constructor(t) {
2486
+ super(), fe(this, t, ki, Ii, ue, {
2487
+ cancelIcon: 0,
2488
+ step: 2
2489
+ });
2490
+ }
2491
+ }
2492
+ function Mi(e) {
2493
+ let t;
2494
+ return {
2495
+ c() {
2496
+ t = ie("h3"), A(
2497
+ t,
2498
+ "id",
2499
+ /*labelId*/
2500
+ e[1]
2501
+ ), A(t, "class", "shepherd-title");
2502
+ },
2503
+ m(n, r) {
2504
+ re(n, t, r), e[3](t);
2505
+ },
2506
+ p(n, [r]) {
2507
+ r & /*labelId*/
2508
+ 2 && A(
2509
+ t,
2510
+ "id",
2511
+ /*labelId*/
2512
+ n[1]
2513
+ );
2514
+ },
2515
+ i: K,
2516
+ o: K,
2517
+ d(n) {
2518
+ n && ee(t), e[3](null);
2519
+ }
2520
+ };
2521
+ }
2522
+ function Di(e, t, n) {
2523
+ let {
2524
+ labelId: r,
2525
+ element: o,
2526
+ title: i
2527
+ } = t;
2528
+ Gt(() => {
2529
+ pe(i) && n(2, i = i()), n(0, o.innerHTML = i, o);
2530
+ });
2531
+ function s(c) {
2532
+ $e[c ? "unshift" : "push"](() => {
2533
+ o = c, n(0, o);
2534
+ });
2535
+ }
2536
+ return e.$$set = (c) => {
2537
+ "labelId" in c && n(1, r = c.labelId), "element" in c && n(0, o = c.element), "title" in c && n(2, i = c.title);
2538
+ }, [o, r, i, s];
2539
+ }
2540
+ class Fi extends de {
2541
+ constructor(t) {
2542
+ super(), fe(this, t, Di, Mi, ue, {
2543
+ labelId: 1,
2544
+ element: 0,
2545
+ title: 2
2546
+ });
2547
+ }
2548
+ }
2549
+ function Mn(e) {
2550
+ let t, n;
2551
+ return t = new Fi({
2552
+ props: {
2553
+ labelId: (
2554
+ /*labelId*/
2555
+ e[0]
2556
+ ),
2557
+ title: (
2558
+ /*title*/
2559
+ e[2]
2560
+ )
2561
+ }
2562
+ }), {
2563
+ c() {
2564
+ Te(t.$$.fragment);
2565
+ },
2566
+ m(r, o) {
2567
+ ye(t, r, o), n = !0;
2568
+ },
2569
+ p(r, o) {
2570
+ const i = {};
2571
+ o & /*labelId*/
2572
+ 1 && (i.labelId = /*labelId*/
2573
+ r[0]), o & /*title*/
2574
+ 4 && (i.title = /*title*/
2575
+ r[2]), t.$set(i);
2576
+ },
2577
+ i(r) {
2578
+ n || (I(t.$$.fragment, r), n = !0);
2579
+ },
2580
+ o(r) {
2581
+ L(t.$$.fragment, r), n = !1;
2582
+ },
2583
+ d(r) {
2584
+ ve(t, r);
2585
+ }
2586
+ };
2587
+ }
2588
+ function Dn(e) {
2589
+ let t, n;
2590
+ return t = new Ai({
2591
+ props: {
2592
+ cancelIcon: (
2593
+ /*cancelIcon*/
2594
+ e[3]
2595
+ ),
2596
+ step: (
2597
+ /*step*/
2598
+ e[1]
2599
+ )
2600
+ }
2601
+ }), {
2602
+ c() {
2603
+ Te(t.$$.fragment);
2604
+ },
2605
+ m(r, o) {
2606
+ ye(t, r, o), n = !0;
2607
+ },
2608
+ p(r, o) {
2609
+ const i = {};
2610
+ o & /*cancelIcon*/
2611
+ 8 && (i.cancelIcon = /*cancelIcon*/
2612
+ r[3]), o & /*step*/
2613
+ 2 && (i.step = /*step*/
2614
+ r[1]), t.$set(i);
2615
+ },
2616
+ i(r) {
2617
+ n || (I(t.$$.fragment, r), n = !0);
2618
+ },
2619
+ o(r) {
2620
+ L(t.$$.fragment, r), n = !1;
2621
+ },
2622
+ d(r) {
2623
+ ve(t, r);
2624
+ }
2625
+ };
2626
+ }
2627
+ function Li(e) {
2628
+ let t, n, r, o = (
2629
+ /*title*/
2630
+ e[2] && Mn(e)
2631
+ ), i = (
2632
+ /*cancelIcon*/
2633
+ e[3] && /*cancelIcon*/
2634
+ e[3].enabled && Dn(e)
2635
+ );
2636
+ return {
2637
+ c() {
2638
+ t = ie("header"), o && o.c(), n = ct(), i && i.c(), A(t, "class", "shepherd-header");
2639
+ },
2640
+ m(s, c) {
2641
+ re(s, t, c), o && o.m(t, null), Be(t, n), i && i.m(t, null), r = !0;
2642
+ },
2643
+ p(s, [c]) {
2644
+ /*title*/
2645
+ s[2] ? o ? (o.p(s, c), c & /*title*/
2646
+ 4 && I(o, 1)) : (o = Mn(s), o.c(), I(o, 1), o.m(t, n)) : o && (Ee(), L(o, 1, 1, () => {
2647
+ o = null;
2648
+ }), xe()), /*cancelIcon*/
2649
+ s[3] && /*cancelIcon*/
2650
+ s[3].enabled ? i ? (i.p(s, c), c & /*cancelIcon*/
2651
+ 8 && I(i, 1)) : (i = Dn(s), i.c(), I(i, 1), i.m(t, null)) : i && (Ee(), L(i, 1, 1, () => {
2652
+ i = null;
2653
+ }), xe());
2654
+ },
2655
+ i(s) {
2656
+ r || (I(o), I(i), r = !0);
2657
+ },
2658
+ o(s) {
2659
+ L(o), L(i), r = !1;
2660
+ },
2661
+ d(s) {
2662
+ s && ee(t), o && o.d(), i && i.d();
2663
+ }
2664
+ };
2665
+ }
2666
+ function ji(e, t, n) {
2667
+ let {
2668
+ labelId: r,
2669
+ step: o
2670
+ } = t, i, s;
2671
+ return e.$$set = (c) => {
2672
+ "labelId" in c && n(0, r = c.labelId), "step" in c && n(1, o = c.step);
2673
+ }, e.$$.update = () => {
2674
+ e.$$.dirty & /*step*/
2675
+ 2 && (n(2, i = o.options.title), n(3, s = o.options.cancelIcon));
2676
+ }, [r, o, i, s];
2677
+ }
2678
+ class Bi extends de {
2679
+ constructor(t) {
2680
+ super(), fe(this, t, ji, Li, ue, {
2681
+ labelId: 0,
2682
+ step: 1
2683
+ });
2684
+ }
2685
+ }
2686
+ function $i(e) {
2687
+ let t;
2688
+ return {
2689
+ c() {
2690
+ t = ie("div"), A(t, "class", "shepherd-text"), A(
2691
+ t,
2692
+ "id",
2693
+ /*descriptionId*/
2694
+ e[1]
2695
+ );
2696
+ },
2697
+ m(n, r) {
2698
+ re(n, t, r), e[3](t);
2699
+ },
2700
+ p(n, [r]) {
2701
+ r & /*descriptionId*/
2702
+ 2 && A(
2703
+ t,
2704
+ "id",
2705
+ /*descriptionId*/
2706
+ n[1]
2707
+ );
2708
+ },
2709
+ i: K,
2710
+ o: K,
2711
+ d(n) {
2712
+ n && ee(t), e[3](null);
2713
+ }
2714
+ };
2715
+ }
2716
+ function Wi(e, t, n) {
2717
+ let {
2718
+ descriptionId: r,
2719
+ element: o,
2720
+ step: i
2721
+ } = t;
2722
+ Gt(() => {
2723
+ let {
2724
+ text: c
2725
+ } = i.options;
2726
+ pe(c) && (c = c.call(i)), ze(c) ? o.appendChild(c) : n(0, o.innerHTML = c, o);
2727
+ });
2728
+ function s(c) {
2729
+ $e[c ? "unshift" : "push"](() => {
2730
+ o = c, n(0, o);
2731
+ });
2732
+ }
2733
+ return e.$$set = (c) => {
2734
+ "descriptionId" in c && n(1, r = c.descriptionId), "element" in c && n(0, o = c.element), "step" in c && n(2, i = c.step);
2735
+ }, [o, r, i, s];
2736
+ }
2737
+ class Ni extends de {
2738
+ constructor(t) {
2739
+ super(), fe(this, t, Wi, $i, ue, {
2740
+ descriptionId: 1,
2741
+ element: 0,
2742
+ step: 2
2743
+ });
2744
+ }
2745
+ }
2746
+ function Fn(e) {
2747
+ let t, n;
2748
+ return t = new Bi({
2749
+ props: {
2750
+ labelId: (
2751
+ /*labelId*/
2752
+ e[1]
2753
+ ),
2754
+ step: (
2755
+ /*step*/
2756
+ e[2]
2757
+ )
2758
+ }
2759
+ }), {
2760
+ c() {
2761
+ Te(t.$$.fragment);
2762
+ },
2763
+ m(r, o) {
2764
+ ye(t, r, o), n = !0;
2765
+ },
2766
+ p(r, o) {
2767
+ const i = {};
2768
+ o & /*labelId*/
2769
+ 2 && (i.labelId = /*labelId*/
2770
+ r[1]), o & /*step*/
2771
+ 4 && (i.step = /*step*/
2772
+ r[2]), t.$set(i);
2773
+ },
2774
+ i(r) {
2775
+ n || (I(t.$$.fragment, r), n = !0);
2776
+ },
2777
+ o(r) {
2778
+ L(t.$$.fragment, r), n = !1;
2779
+ },
2780
+ d(r) {
2781
+ ve(t, r);
2782
+ }
2783
+ };
2784
+ }
2785
+ function Ln(e) {
2786
+ let t, n;
2787
+ return t = new Ni({
2788
+ props: {
2789
+ descriptionId: (
2790
+ /*descriptionId*/
2791
+ e[0]
2792
+ ),
2793
+ step: (
2794
+ /*step*/
2795
+ e[2]
2796
+ )
2797
+ }
2798
+ }), {
2799
+ c() {
2800
+ Te(t.$$.fragment);
2801
+ },
2802
+ m(r, o) {
2803
+ ye(t, r, o), n = !0;
2804
+ },
2805
+ p(r, o) {
2806
+ const i = {};
2807
+ o & /*descriptionId*/
2808
+ 1 && (i.descriptionId = /*descriptionId*/
2809
+ r[0]), o & /*step*/
2810
+ 4 && (i.step = /*step*/
2811
+ r[2]), t.$set(i);
2812
+ },
2813
+ i(r) {
2814
+ n || (I(t.$$.fragment, r), n = !0);
2815
+ },
2816
+ o(r) {
2817
+ L(t.$$.fragment, r), n = !1;
2818
+ },
2819
+ d(r) {
2820
+ ve(t, r);
2821
+ }
2822
+ };
2823
+ }
2824
+ function jn(e) {
2825
+ let t, n;
2826
+ return t = new Pi({
2827
+ props: {
2828
+ step: (
2829
+ /*step*/
2830
+ e[2]
2831
+ )
2832
+ }
2833
+ }), {
2834
+ c() {
2835
+ Te(t.$$.fragment);
2836
+ },
2837
+ m(r, o) {
2838
+ ye(t, r, o), n = !0;
2839
+ },
2840
+ p(r, o) {
2841
+ const i = {};
2842
+ o & /*step*/
2843
+ 4 && (i.step = /*step*/
2844
+ r[2]), t.$set(i);
2845
+ },
2846
+ i(r) {
2847
+ n || (I(t.$$.fragment, r), n = !0);
2848
+ },
2849
+ o(r) {
2850
+ L(t.$$.fragment, r), n = !1;
2851
+ },
2852
+ d(r) {
2853
+ ve(t, r);
2854
+ }
2855
+ };
2856
+ }
2857
+ function Vi(e) {
2858
+ let t, n = !V(
2859
+ /*step*/
2860
+ e[2].options.title
2861
+ ) || /*step*/
2862
+ e[2].options.cancelIcon && /*step*/
2863
+ e[2].options.cancelIcon.enabled, r, o = !V(
2864
+ /*step*/
2865
+ e[2].options.text
2866
+ ), i, s = Array.isArray(
2867
+ /*step*/
2868
+ e[2].options.buttons
2869
+ ) && /*step*/
2870
+ e[2].options.buttons.length, c, l = n && Fn(e), u = o && Ln(e), f = s && jn(e);
2871
+ return {
2872
+ c() {
2873
+ t = ie("div"), l && l.c(), r = ct(), u && u.c(), i = ct(), f && f.c(), A(t, "class", "shepherd-content");
2874
+ },
2875
+ m(h, d) {
2876
+ re(h, t, d), l && l.m(t, null), Be(t, r), u && u.m(t, null), Be(t, i), f && f.m(t, null), c = !0;
2877
+ },
2878
+ p(h, [d]) {
2879
+ d & /*step*/
2880
+ 4 && (n = !V(
2881
+ /*step*/
2882
+ h[2].options.title
2883
+ ) || /*step*/
2884
+ h[2].options.cancelIcon && /*step*/
2885
+ h[2].options.cancelIcon.enabled), n ? l ? (l.p(h, d), d & /*step*/
2886
+ 4 && I(l, 1)) : (l = Fn(h), l.c(), I(l, 1), l.m(t, r)) : l && (Ee(), L(l, 1, 1, () => {
2887
+ l = null;
2888
+ }), xe()), d & /*step*/
2889
+ 4 && (o = !V(
2890
+ /*step*/
2891
+ h[2].options.text
2892
+ )), o ? u ? (u.p(h, d), d & /*step*/
2893
+ 4 && I(u, 1)) : (u = Ln(h), u.c(), I(u, 1), u.m(t, i)) : u && (Ee(), L(u, 1, 1, () => {
2894
+ u = null;
2895
+ }), xe()), d & /*step*/
2896
+ 4 && (s = Array.isArray(
2897
+ /*step*/
2898
+ h[2].options.buttons
2899
+ ) && /*step*/
2900
+ h[2].options.buttons.length), s ? f ? (f.p(h, d), d & /*step*/
2901
+ 4 && I(f, 1)) : (f = jn(h), f.c(), I(f, 1), f.m(t, null)) : f && (Ee(), L(f, 1, 1, () => {
2902
+ f = null;
2903
+ }), xe());
2904
+ },
2905
+ i(h) {
2906
+ c || (I(l), I(u), I(f), c = !0);
2907
+ },
2908
+ o(h) {
2909
+ L(l), L(u), L(f), c = !1;
2910
+ },
2911
+ d(h) {
2912
+ h && ee(t), l && l.d(), u && u.d(), f && f.d();
2913
+ }
2914
+ };
2915
+ }
2916
+ function Ui(e, t, n) {
2917
+ let {
2918
+ descriptionId: r,
2919
+ labelId: o,
2920
+ step: i
2921
+ } = t;
2922
+ return e.$$set = (s) => {
2923
+ "descriptionId" in s && n(0, r = s.descriptionId), "labelId" in s && n(1, o = s.labelId), "step" in s && n(2, i = s.step);
2924
+ }, [r, o, i];
2925
+ }
2926
+ class Hi extends de {
2927
+ constructor(t) {
2928
+ super(), fe(this, t, Ui, Vi, ue, {
2929
+ descriptionId: 0,
2930
+ labelId: 1,
2931
+ step: 2
2932
+ });
2933
+ }
2934
+ }
2935
+ function Bn(e) {
2936
+ let t;
2937
+ return {
2938
+ c() {
2939
+ t = ie("div"), A(t, "class", "shepherd-arrow"), A(t, "data-popper-arrow", "");
2940
+ },
2941
+ m(n, r) {
2942
+ re(n, t, r);
2943
+ },
2944
+ d(n) {
2945
+ n && ee(t);
2946
+ }
2947
+ };
2948
+ }
2949
+ function Yi(e) {
2950
+ let t, n, r, o, i, s, c, l, u = (
2951
+ /*step*/
2952
+ e[4].options.arrow && /*step*/
2953
+ e[4].options.attachTo && /*step*/
2954
+ e[4].options.attachTo.element && /*step*/
2955
+ e[4].options.attachTo.on && Bn()
2956
+ );
2957
+ r = new Hi({
2958
+ props: {
2959
+ descriptionId: (
2960
+ /*descriptionId*/
2961
+ e[2]
2962
+ ),
2963
+ labelId: (
2964
+ /*labelId*/
2965
+ e[3]
2966
+ ),
2967
+ step: (
2968
+ /*step*/
2969
+ e[4]
2970
+ )
2971
+ }
2972
+ });
2973
+ let f = [
2974
+ {
2975
+ "aria-describedby": o = V(
2976
+ /*step*/
2977
+ e[4].options.text
2978
+ ) ? null : (
2979
+ /*descriptionId*/
2980
+ e[2]
2981
+ )
2982
+ },
2983
+ {
2984
+ "aria-labelledby": i = /*step*/
2985
+ e[4].options.title ? (
2986
+ /*labelId*/
2987
+ e[3]
2988
+ ) : null
2989
+ },
2990
+ /*dataStepId*/
2991
+ e[1],
2992
+ {
2993
+ role: "dialog"
2994
+ },
2995
+ {
2996
+ tabindex: "0"
2997
+ }
2998
+ ], h = {};
2999
+ for (let d = 0; d < f.length; d += 1)
3000
+ h = ui(h, f[d]);
3001
+ return {
3002
+ c() {
3003
+ t = ie("div"), u && u.c(), n = ct(), Te(r.$$.fragment), Tn(t, h), Ie(
3004
+ t,
3005
+ "shepherd-has-cancel-icon",
3006
+ /*hasCancelIcon*/
3007
+ e[5]
3008
+ ), Ie(
3009
+ t,
3010
+ "shepherd-has-title",
3011
+ /*hasTitle*/
3012
+ e[6]
3013
+ ), Ie(t, "shepherd-element", !0);
3014
+ },
3015
+ m(d, m) {
3016
+ re(d, t, m), u && u.m(t, null), Be(t, n), ye(r, t, null), e[13](t), s = !0, c || (l = ht(
3017
+ t,
3018
+ "keydown",
3019
+ /*handleKeyDown*/
3020
+ e[7]
3021
+ ), c = !0);
3022
+ },
3023
+ p(d, [m]) {
3024
+ /*step*/
3025
+ d[4].options.arrow && /*step*/
3026
+ d[4].options.attachTo && /*step*/
3027
+ d[4].options.attachTo.element && /*step*/
3028
+ d[4].options.attachTo.on ? u || (u = Bn(), u.c(), u.m(t, n)) : u && (u.d(1), u = null);
3029
+ const y = {};
3030
+ m & /*descriptionId*/
3031
+ 4 && (y.descriptionId = /*descriptionId*/
3032
+ d[2]), m & /*labelId*/
3033
+ 8 && (y.labelId = /*labelId*/
3034
+ d[3]), m & /*step*/
3035
+ 16 && (y.step = /*step*/
3036
+ d[4]), r.$set(y), Tn(t, h = _i(f, [(!s || m & /*step, descriptionId*/
3037
+ 20 && o !== (o = V(
3038
+ /*step*/
3039
+ d[4].options.text
3040
+ ) ? null : (
3041
+ /*descriptionId*/
3042
+ d[2]
3043
+ ))) && {
3044
+ "aria-describedby": o
3045
+ }, (!s || m & /*step, labelId*/
3046
+ 24 && i !== (i = /*step*/
3047
+ d[4].options.title ? (
3048
+ /*labelId*/
3049
+ d[3]
3050
+ ) : null)) && {
3051
+ "aria-labelledby": i
3052
+ }, m & /*dataStepId*/
3053
+ 2 && /*dataStepId*/
3054
+ d[1], {
3055
+ role: "dialog"
3056
+ }, {
3057
+ tabindex: "0"
3058
+ }])), Ie(
3059
+ t,
3060
+ "shepherd-has-cancel-icon",
3061
+ /*hasCancelIcon*/
3062
+ d[5]
3063
+ ), Ie(
3064
+ t,
3065
+ "shepherd-has-title",
3066
+ /*hasTitle*/
3067
+ d[6]
3068
+ ), Ie(t, "shepherd-element", !0);
3069
+ },
3070
+ i(d) {
3071
+ s || (I(r.$$.fragment, d), s = !0);
3072
+ },
3073
+ o(d) {
3074
+ L(r.$$.fragment, d), s = !1;
3075
+ },
3076
+ d(d) {
3077
+ d && ee(t), u && u.d(), ve(r), e[13](null), c = !1, l();
3078
+ }
3079
+ };
3080
+ }
3081
+ const qi = 9, Ki = 27, zi = 37, Ji = 39;
3082
+ function $n(e) {
3083
+ return e.split(" ").filter((t) => !!t.length);
3084
+ }
3085
+ function Gi(e, t, n) {
3086
+ let {
3087
+ classPrefix: r,
3088
+ element: o,
3089
+ descriptionId: i,
3090
+ firstFocusableElement: s,
3091
+ focusableElements: c,
3092
+ labelId: l,
3093
+ lastFocusableElement: u,
3094
+ step: f,
3095
+ dataStepId: h
3096
+ } = t, d, m, y;
3097
+ const E = () => o;
3098
+ gi(() => {
3099
+ n(1, h = {
3100
+ [`data-${r}shepherd-step-id`]: f.id
3101
+ }), n(9, c = o.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')), n(8, s = c[0]), n(10, u = c[c.length - 1]);
3102
+ }), Gt(() => {
3103
+ y !== f.options.classes && S();
3104
+ });
3105
+ function S() {
3106
+ w(y), y = f.options.classes, _(y);
3107
+ }
3108
+ function w(g) {
3109
+ if (Ye(g)) {
3110
+ const T = $n(g);
3111
+ T.length && o.classList.remove(...T);
3112
+ }
3113
+ }
3114
+ function _(g) {
3115
+ if (Ye(g)) {
3116
+ const T = $n(g);
3117
+ T.length && o.classList.add(...T);
3118
+ }
3119
+ }
3120
+ const C = (g) => {
3121
+ const {
3122
+ tour: T
3123
+ } = f;
3124
+ switch (g.keyCode) {
3125
+ case qi:
3126
+ if (c.length === 0) {
3127
+ g.preventDefault();
3128
+ break;
3129
+ }
3130
+ g.shiftKey ? (document.activeElement === s || document.activeElement.classList.contains("shepherd-element")) && (g.preventDefault(), u.focus()) : document.activeElement === u && (g.preventDefault(), s.focus());
3131
+ break;
3132
+ case Ki:
3133
+ T.options.exitOnEsc && (g.preventDefault(), g.stopPropagation(), f.cancel());
3134
+ break;
3135
+ case zi:
3136
+ T.options.keyboardNavigation && (g.preventDefault(), g.stopPropagation(), T.back());
3137
+ break;
3138
+ case Ji:
3139
+ T.options.keyboardNavigation && (g.preventDefault(), g.stopPropagation(), T.next());
3140
+ break;
3141
+ }
3142
+ };
3143
+ function v(g) {
3144
+ $e[g ? "unshift" : "push"](() => {
3145
+ o = g, n(0, o);
3146
+ });
3147
+ }
3148
+ return e.$$set = (g) => {
3149
+ "classPrefix" in g && n(11, r = g.classPrefix), "element" in g && n(0, o = g.element), "descriptionId" in g && n(2, i = g.descriptionId), "firstFocusableElement" in g && n(8, s = g.firstFocusableElement), "focusableElements" in g && n(9, c = g.focusableElements), "labelId" in g && n(3, l = g.labelId), "lastFocusableElement" in g && n(10, u = g.lastFocusableElement), "step" in g && n(4, f = g.step), "dataStepId" in g && n(1, h = g.dataStepId);
3150
+ }, e.$$.update = () => {
3151
+ e.$$.dirty & /*step*/
3152
+ 16 && (n(5, d = f.options && f.options.cancelIcon && f.options.cancelIcon.enabled), n(6, m = f.options && f.options.title));
3153
+ }, [o, h, i, l, f, d, m, C, s, c, u, r, E, v];
3154
+ }
3155
+ class Xi extends de {
3156
+ constructor(t) {
3157
+ super(), fe(this, t, Gi, Yi, ue, {
3158
+ classPrefix: 11,
3159
+ element: 0,
3160
+ descriptionId: 2,
3161
+ firstFocusableElement: 8,
3162
+ focusableElements: 9,
3163
+ labelId: 3,
3164
+ lastFocusableElement: 10,
3165
+ step: 4,
3166
+ dataStepId: 1,
3167
+ getElement: 12
3168
+ });
3169
+ }
3170
+ get getElement() {
3171
+ return this.$$.ctx[12];
3172
+ }
3173
+ }
3174
+ class Mt extends Nt {
3175
+ constructor(t, n = {}) {
3176
+ return super(), this.tour = t, this.classPrefix = this.tour.options ? Zn(this.tour.options.classPrefix) : "", this.styles = t.styles, this._resolvedAttachTo = null, Xn(this), this._setOptions(n), this;
3177
+ }
3178
+ /**
3179
+ * Cancel the tour
3180
+ * Triggers the `cancel` event
3181
+ */
3182
+ cancel() {
3183
+ this.tour.cancel(), this.trigger("cancel");
3184
+ }
3185
+ /**
3186
+ * Complete the tour
3187
+ * Triggers the `complete` event
3188
+ */
3189
+ complete() {
3190
+ this.tour.complete(), this.trigger("complete");
3191
+ }
3192
+ /**
3193
+ * Remove the step, delete the step's element, and destroy the FloatingUI instance for the step.
3194
+ * Triggers `destroy` event
3195
+ */
3196
+ destroy() {
3197
+ oi(this), ze(this.el) && (this.el.remove(), this.el = null), this._updateStepTargetOnHide(), this.trigger("destroy");
3198
+ }
3199
+ /**
3200
+ * Returns the tour for the step
3201
+ * @return The tour instance
3202
+ */
3203
+ getTour() {
3204
+ return this.tour;
3205
+ }
3206
+ /**
3207
+ * Hide the step
3208
+ */
3209
+ hide() {
3210
+ this.tour.modal.hide(), this.trigger("before-hide"), this.el && (this.el.hidden = !0), this._updateStepTargetOnHide(), this.trigger("hide");
3211
+ }
3212
+ /**
3213
+ * Resolves attachTo options.
3214
+ * @returns {{}|{element, on}}
3215
+ */
3216
+ _resolveAttachToOptions() {
3217
+ return this._resolvedAttachTo = bo(this), this._resolvedAttachTo;
3218
+ }
3219
+ /**
3220
+ * A selector for resolved attachTo options.
3221
+ * @returns {{}|{element, on}}
3222
+ * @private
3223
+ */
3224
+ _getResolvedAttachToOptions() {
3225
+ return this._resolvedAttachTo === null ? this._resolveAttachToOptions() : this._resolvedAttachTo;
3226
+ }
3227
+ /**
3228
+ * Check if the step is open and visible
3229
+ * @return True if the step is open and visible
3230
+ */
3231
+ isOpen() {
3232
+ return !!(this.el && !this.el.hidden);
3233
+ }
3234
+ /**
3235
+ * Wraps `_show` and ensures `beforeShowPromise` resolves before calling show
3236
+ */
3237
+ show() {
3238
+ return pe(this.options.beforeShowPromise) ? Promise.resolve(this.options.beforeShowPromise()).then(() => this._show()) : Promise.resolve(this._show());
3239
+ }
3240
+ /**
3241
+ * Updates the options of the step.
3242
+ *
3243
+ * @param {StepOptions} options The options for the step
3244
+ */
3245
+ updateStepOptions(t) {
3246
+ Object.assign(this.options, t), this.shepherdElementComponent && this.shepherdElementComponent.$set({ step: this });
3247
+ }
3248
+ /**
3249
+ * Returns the element for the step
3250
+ * @return {HTMLElement|null|undefined} The element instance. undefined if it has never been shown, null if it has been destroyed
3251
+ */
3252
+ getElement() {
3253
+ return this.el;
3254
+ }
3255
+ /**
3256
+ * Returns the target for the step
3257
+ * @return {HTMLElement|null|undefined} The element instance. undefined if it has never been shown, null if query string has not been found
3258
+ */
3259
+ getTarget() {
3260
+ return this.target;
3261
+ }
3262
+ /**
3263
+ * Creates Shepherd element for step based on options
3264
+ *
3265
+ * @return {HTMLElement} The DOM element for the step tooltip
3266
+ * @private
3267
+ */
3268
+ _createTooltipContent() {
3269
+ const t = `${this.id}-description`, n = `${this.id}-label`;
3270
+ return this.shepherdElementComponent = new Xi({
3271
+ target: this.tour.options.stepsContainer || document.body,
3272
+ props: {
3273
+ classPrefix: this.classPrefix,
3274
+ descriptionId: t,
3275
+ labelId: n,
3276
+ step: this,
3277
+ // @ts-expect-error TODO: investigate where styles comes from
3278
+ styles: this.styles
3279
+ }
3280
+ }), this.shepherdElementComponent.getElement();
3281
+ }
3282
+ /**
3283
+ * If a custom scrollToHandler is defined, call that, otherwise do the generic
3284
+ * scrollIntoView call.
3285
+ *
3286
+ * @param {boolean | ScrollIntoViewOptions} scrollToOptions - If true, uses the default `scrollIntoView`,
3287
+ * if an object, passes that object as the params to `scrollIntoView` i.e. `{ behavior: 'smooth', block: 'center' }`
3288
+ * @private
3289
+ */
3290
+ _scrollTo(t) {
3291
+ const { element: n } = this._getResolvedAttachToOptions();
3292
+ pe(this.options.scrollToHandler) ? this.options.scrollToHandler(n) : Gr(n) && typeof n.scrollIntoView == "function" && n.scrollIntoView(t);
3293
+ }
3294
+ /**
3295
+ * _getClassOptions gets all possible classes for the step
3296
+ * @param {StepOptions} stepOptions The step specific options
3297
+ * @returns {string} unique string from array of classes
3298
+ */
3299
+ _getClassOptions(t) {
3300
+ const n = this.tour && this.tour.options && this.tour.options.defaultStepOptions, r = t.classes ? t.classes : "", o = n && n.classes ? n.classes : "", i = [
3301
+ ...r.split(" "),
3302
+ ...o.split(" ")
3303
+ ], s = new Set(i);
3304
+ return Array.from(s).join(" ").trim();
3305
+ }
3306
+ /**
3307
+ * Sets the options for the step, maps `when` to events, sets up buttons
3308
+ * @param options - The options for the step
3309
+ */
3310
+ _setOptions(t = {}) {
3311
+ let n = this.tour && this.tour.options && this.tour.options.defaultStepOptions;
3312
+ n = Vt({}, n || {}), this.options = Object.assign({
3313
+ arrow: !0
3314
+ }, n, t, ri(n, t));
3315
+ const { when: r } = this.options;
3316
+ this.options.classes = this._getClassOptions(t), this.destroy(), this.id = this.options.id || `step-${er()}`, r && Object.keys(r).forEach((o) => {
3317
+ this.on(o, r[o], this);
3318
+ });
3319
+ }
3320
+ /**
3321
+ * Create the element and set up the FloatingUI instance
3322
+ * @private
3323
+ */
3324
+ _setupElements() {
3325
+ V(this.el) || this.destroy(), this.el = this._createTooltipContent(), this.options.advanceOn && po(this), ni(this);
3326
+ }
3327
+ /**
3328
+ * Triggers `before-show`, generates the tooltip DOM content,
3329
+ * sets up a FloatingUI instance for the tooltip, then triggers `show`.
3330
+ * @private
3331
+ */
3332
+ _show() {
3333
+ var r;
3334
+ this.trigger("before-show"), this._resolveAttachToOptions(), this._setupElements(), this.tour.modal || this.tour.setupModal(), (r = this.tour.modal) == null || r.setupForStep(this), this._styleTargetElementForStep(this), this.el && (this.el.hidden = !1), this.options.scrollTo && setTimeout(() => {
3335
+ this._scrollTo(this.options.scrollTo);
3336
+ }), this.el && (this.el.hidden = !1);
3337
+ const t = this.shepherdElementComponent.getElement(), n = this.target || document.body;
3338
+ n.classList.add(`${this.classPrefix}shepherd-enabled`), n.classList.add(`${this.classPrefix}shepherd-target`), t.classList.add("shepherd-enabled"), this.trigger("show");
3339
+ }
3340
+ /**
3341
+ * Modulates the styles of the passed step's target element, based on the step's options and
3342
+ * the tour's `modal` option, to visually emphasize the element
3343
+ *
3344
+ * @param {Step} step The step object that attaches to the element
3345
+ * @private
3346
+ */
3347
+ _styleTargetElementForStep(t) {
3348
+ const n = t.target;
3349
+ n && (t.options.highlightClass && n.classList.add(t.options.highlightClass), n.classList.remove("shepherd-target-click-disabled"), t.options.canClickTarget === !1 && n.classList.add("shepherd-target-click-disabled"));
3350
+ }
3351
+ /**
3352
+ * When a step is hidden, remove the highlightClass and 'shepherd-enabled'
3353
+ * and 'shepherd-target' classes
3354
+ * @private
3355
+ */
3356
+ _updateStepTargetOnHide() {
3357
+ const t = this.target || document.body;
3358
+ this.options.highlightClass && t.classList.remove(this.options.highlightClass), t.classList.remove("shepherd-target-click-disabled", `${this.classPrefix}shepherd-enabled`, `${this.classPrefix}shepherd-target`);
3359
+ }
3360
+ }
3361
+ function Zi(e) {
3362
+ let t = {};
3363
+ if (e.navigator) {
3364
+ const n = e.navigator.userAgent;
3365
+ t = {
3366
+ ...t,
3367
+ $os: es(e),
3368
+ $browser: mr(n, e.navigator.vendor, !!e.opera),
3369
+ $referrer: e.document.referrer,
3370
+ $referring_domain: ns(e.document.referrer),
3371
+ $device: ts(n),
3372
+ $current_url: e.location.href,
3373
+ $host: e.location.host,
3374
+ $pathname: e.location.pathname,
3375
+ $browser_version: Qi(n, e.navigator.vendor, !!e.opera),
3376
+ $screen_height: e.screen.height,
3377
+ $screen_width: e.screen.width,
3378
+ $screen_dpr: e.devicePixelRatio
3379
+ };
3380
+ }
3381
+ return t = {
3382
+ ...t,
3383
+ $lib: "js",
3384
+ // $lib_version: version,
3385
+ $insert_id: Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10),
3386
+ $time: (/* @__PURE__ */ new Date()).getTime() / 1e3
3387
+ // epoch time in seconds
3388
+ }, t;
3389
+ }
3390
+ function F(e, t) {
3391
+ return e.indexOf(t) >= 0;
3392
+ }
3393
+ function mr(e, t, n) {
3394
+ return t = t || "", n || F(e, " OPR/") ? F(e, "Mini") ? "Opera Mini" : "Opera" : /(BlackBerry|PlayBook|BB10)/i.test(e) ? "BlackBerry" : F(e, "IEMobile") || F(e, "WPDesktop") ? "Internet Explorer Mobile" : F(e, "SamsungBrowser/") ? "Samsung Internet" : F(e, "Edge") || F(e, "Edg/") ? "Microsoft Edge" : F(e, "FBIOS") ? "Facebook Mobile" : F(e, "Chrome") ? "Chrome" : F(e, "CriOS") ? "Chrome iOS" : F(e, "UCWEB") || F(e, "UCBrowser") ? "UC Browser" : F(e, "FxiOS") ? "Firefox iOS" : F(t, "Apple") ? F(e, "Mobile") ? "Mobile Safari" : "Safari" : F(e, "Android") ? "Android Mobile" : F(e, "Konqueror") ? "Konqueror" : F(e, "Firefox") ? "Firefox" : F(e, "MSIE") || F(e, "Trident/") ? "Internet Explorer" : F(e, "Gecko") ? "Mozilla" : "";
3395
+ }
3396
+ function Qi(e, t, n) {
3397
+ const r = {
3398
+ "Internet Explorer Mobile": /rv:(\d+(\.\d+)?)/,
3399
+ "Microsoft Edge": /Edge?\/(\d+(\.\d+)?)/,
3400
+ Chrome: /Chrome\/(\d+(\.\d+)?)/,
3401
+ "Chrome iOS": /CriOS\/(\d+(\.\d+)?)/,
3402
+ "UC Browser": /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
3403
+ Safari: /Version\/(\d+(\.\d+)?)/,
3404
+ "Mobile Safari": /Version\/(\d+(\.\d+)?)/,
3405
+ Opera: /(Opera|OPR)\/(\d+(\.\d+)?)/,
3406
+ Firefox: /Firefox\/(\d+(\.\d+)?)/,
3407
+ "Firefox iOS": /FxiOS\/(\d+(\.\d+)?)/,
3408
+ Konqueror: /Konqueror:(\d+(\.\d+)?)/,
3409
+ BlackBerry: /BlackBerry (\d+(\.\d+)?)/,
3410
+ "Android Mobile": /android\s(\d+(\.\d+)?)/,
3411
+ "Samsung Internet": /SamsungBrowser\/(\d+(\.\d+)?)/,
3412
+ "Internet Explorer": /(rv:|MSIE )(\d+(\.\d+)?)/,
3413
+ Mozilla: /rv:(\d+(\.\d+)?)/
3414
+ }, o = mr(e, t, n), i = r[o] || void 0;
3415
+ if (i === void 0)
3416
+ return null;
3417
+ const s = e.match(i);
3418
+ return s ? parseFloat(s[s.length - 2]) : null;
3419
+ }
3420
+ function es(e) {
3421
+ const t = e.navigator.userAgent;
3422
+ return /Windows/i.test(t) ? /Phone/.test(t) || /WPDesktop/.test(t) ? "Windows Phone" : "Windows" : /(iPhone|iPad|iPod)/.test(t) ? "iOS" : /Android/.test(t) ? "Android" : /(BlackBerry|PlayBook|BB10)/i.test(t) ? "BlackBerry" : /Mac/i.test(t) ? "Mac OS X" : /Linux/.test(t) ? "Linux" : /CrOS/.test(t) ? "Chrome OS" : "";
3423
+ }
3424
+ function ts(e) {
3425
+ return /Windows Phone/i.test(e) || /WPDesktop/.test(e) ? "Windows Phone" : /iPad/.test(e) ? "iPad" : /iPod/.test(e) ? "iPod Touch" : /iPhone/.test(e) ? "iPhone" : /(BlackBerry|PlayBook|BB10)/i.test(e) ? "BlackBerry" : /Android/.test(e) ? "Android" : "";
3426
+ }
3427
+ function ns(e) {
3428
+ const t = e.split("/");
3429
+ return t.length >= 3 ? t[2] : "";
3430
+ }
3431
+ function rs(e) {
3432
+ if (e) {
3433
+ const { steps: t } = e;
3434
+ t.forEach((n) => {
3435
+ n.options && n.options.canClickTarget === !1 && n.options.attachTo && ze(n.target) && n.target.classList.remove("shepherd-target-click-disabled");
3436
+ });
3437
+ }
3438
+ }
3439
+ const Dt = (e, t) => t.some((n) => e instanceof n);
3440
+ let Wn, Nn;
3441
+ function os() {
3442
+ return Wn || (Wn = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction]);
3443
+ }
3444
+ function is() {
3445
+ return Nn || (Nn = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey]);
3446
+ }
3447
+ const Ft = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap();
3448
+ function ss(e) {
3449
+ const t = new Promise((n, r) => {
3450
+ const o = () => {
3451
+ e.removeEventListener("success", i), e.removeEventListener("error", s);
3452
+ }, i = () => {
3453
+ n(Se(e.result)), o();
3454
+ }, s = () => {
3455
+ r(e.error), o();
3456
+ };
3457
+ e.addEventListener("success", i), e.addEventListener("error", s);
3458
+ });
3459
+ return pt.set(t, e), t;
3460
+ }
3461
+ function as(e) {
3462
+ if (Ft.has(e))
3463
+ return;
3464
+ const t = new Promise((n, r) => {
3465
+ const o = () => {
3466
+ e.removeEventListener("complete", i), e.removeEventListener("error", s), e.removeEventListener("abort", s);
3467
+ }, i = () => {
3468
+ n(), o();
3469
+ }, s = () => {
3470
+ r(e.error || new DOMException("AbortError", "AbortError")), o();
3471
+ };
3472
+ e.addEventListener("complete", i), e.addEventListener("error", s), e.addEventListener("abort", s);
3473
+ });
3474
+ Ft.set(e, t);
3475
+ }
3476
+ let Lt = {
3477
+ get(e, t, n) {
3478
+ if (e instanceof IDBTransaction) {
3479
+ if (t === "done")
3480
+ return Ft.get(e);
3481
+ if (t === "store")
3482
+ return n.objectStoreNames[1] ? void 0 : n.objectStore(n.objectStoreNames[0]);
3483
+ }
3484
+ return Se(e[t]);
3485
+ },
3486
+ set(e, t, n) {
3487
+ return e[t] = n, !0;
3488
+ },
3489
+ has(e, t) {
3490
+ return e instanceof IDBTransaction && (t === "done" || t === "store") ? !0 : t in e;
3491
+ }
3492
+ };
3493
+ function gr(e) {
3494
+ Lt = e(Lt);
3495
+ }
3496
+ function cs(e) {
3497
+ return is().includes(e) ? function(...t) {
3498
+ return e.apply(jt(this), t), Se(this.request);
3499
+ } : function(...t) {
3500
+ return Se(e.apply(jt(this), t));
3501
+ };
3502
+ }
3503
+ function ls(e) {
3504
+ return typeof e == "function" ? cs(e) : (e instanceof IDBTransaction && as(e), Dt(e, os()) ? new Proxy(e, Lt) : e);
3505
+ }
3506
+ function Se(e) {
3507
+ if (e instanceof IDBRequest)
3508
+ return ss(e);
3509
+ if (Ct.has(e))
3510
+ return Ct.get(e);
3511
+ const t = ls(e);
3512
+ return t !== e && (Ct.set(e, t), pt.set(t, e)), t;
3513
+ }
3514
+ const jt = (e) => pt.get(e);
3515
+ function us(e, t, {
3516
+ blocked: n,
3517
+ upgrade: r,
3518
+ blocking: o,
3519
+ terminated: i
3520
+ } = {}) {
3521
+ const s = indexedDB.open(e, t), c = Se(s);
3522
+ return r && s.addEventListener("upgradeneeded", (l) => {
3523
+ r(Se(s.result), l.oldVersion, l.newVersion, Se(s.transaction), l);
3524
+ }), n && s.addEventListener("blocked", (l) => n(
3525
+ // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
3526
+ l.oldVersion,
3527
+ l.newVersion,
3528
+ l
3529
+ )), c.then((l) => {
3530
+ i && l.addEventListener("close", () => i()), o && l.addEventListener("versionchange", (u) => o(u.oldVersion, u.newVersion, u));
3531
+ }).catch(() => {
3532
+ }), c;
3533
+ }
3534
+ const fs = ["get", "getKey", "getAll", "getAllKeys", "count"], ds = ["put", "add", "delete", "clear"], Tt = /* @__PURE__ */ new Map();
3535
+ function Vn(e, t) {
3536
+ if (!(e instanceof IDBDatabase && !(t in e) && typeof t == "string"))
3537
+ return;
3538
+ if (Tt.get(t))
3539
+ return Tt.get(t);
3540
+ const n = t.replace(/FromIndex$/, ""), r = t !== n, o = ds.includes(n);
3541
+ if (
3542
+ // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
3543
+ !(n in (r ? IDBIndex : IDBObjectStore).prototype) || !(o || fs.includes(n))
3544
+ )
3545
+ return;
3546
+ const i = async function(c, ...l) {
3547
+ const u = this.transaction(c, o ? "readwrite" : "readonly");
3548
+ let f = u.store;
3549
+ return r && (f = f.index(l.shift())), (await Promise.all([f[n](...l), o && u.done]))[0];
3550
+ };
3551
+ return Tt.set(t, i), i;
3552
+ }
3553
+ gr((e) => B({}, e, {
3554
+ get: (t, n, r) => Vn(t, n) || e.get(t, n, r),
3555
+ has: (t, n) => !!Vn(t, n) || e.has(t, n)
3556
+ }));
3557
+ const hs = ["continue", "continuePrimaryKey", "advance"], Un = {}, Bt = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), ps = {
3558
+ get(e, t) {
3559
+ if (!hs.includes(t))
3560
+ return e[t];
3561
+ let n = Un[t];
3562
+ return n || (n = Un[t] = function(...r) {
3563
+ Bt.set(this, br.get(this)[t](...r));
3564
+ }), n;
3565
+ }
3566
+ };
3567
+ function ms() {
3568
+ return $t.apply(this, arguments);
3569
+ }
3570
+ function $t() {
3571
+ return $t = Xr(function* (...e) {
3572
+ let t = this;
3573
+ if (t instanceof IDBCursor || (t = yield yn(t.openCursor(...e))), !t)
3574
+ return;
3575
+ t = t;
3576
+ const n = new Proxy(t, ps);
3577
+ for (br.set(n, t), pt.set(n, jt(t)); t; )
3578
+ yield n, t = yield yn(Bt.get(n) || t.continue()), Bt.delete(n);
3579
+ }), $t.apply(this, arguments);
3580
+ }
3581
+ function Hn(e, t) {
3582
+ return t === Symbol.asyncIterator && Dt(e, [IDBIndex, IDBObjectStore, IDBCursor]) || t === "iterate" && Dt(e, [IDBIndex, IDBObjectStore]);
3583
+ }
3584
+ gr((e) => B({}, e, {
3585
+ get(t, n, r) {
3586
+ return Hn(t, n) ? ms : e.get(t, n, r);
3587
+ },
3588
+ has(t, n) {
3589
+ return Hn(t, n) || e.has(t, n);
3590
+ }
3591
+ }));
3592
+ class gs {
3593
+ constructor(t, n, r) {
3594
+ if (!t)
3595
+ throw new Error("Shepherd Pro: Missing required apiKey option.");
3596
+ if (!n)
3597
+ throw new Error("Shepherd Pro: Missing required apiPath option.");
3598
+ this.apiKey = t, this.apiPath = n, this.properties = r;
3599
+ }
3600
+ /**
3601
+ * Gets a list of the state for all the tours associated with a given apiKey
3602
+ */
3603
+ async getTourState() {
3604
+ try {
3605
+ const t = await fetch(`${this.apiPath}/api/v1/state`, {
3606
+ headers: {
3607
+ Authorization: `ApiKey ${this.apiKey}`,
3608
+ "Content-Type": "application/json"
3609
+ },
3610
+ method: "GET"
3611
+ });
3612
+ if (!t.ok)
3613
+ throw new Error("Could not fetch state for tours 🐑");
3614
+ const { data: n } = await t.json();
3615
+ if (this.tourStateDb = await us("TourState", 1, {
3616
+ upgrade(r) {
3617
+ r.createObjectStore("tours", {
3618
+ keyPath: "uniqueId"
3619
+ });
3620
+ }
3621
+ }), Array.isArray(n) && n.length) {
3622
+ const r = this.tourStateDb.transaction("tours", "readwrite"), o = n.map((i) => r.store.put(i));
3623
+ await Promise.all([...o, r.done]);
3624
+ }
3625
+ } catch (t) {
3626
+ throw new Error("Error fetching data: " + (t instanceof Error ? t.message : "Unknown error"));
3627
+ }
3628
+ }
3629
+ /**
3630
+ * Send events to the ShepherdPro API
3631
+ * @param body The data to send for the event
3632
+ */
3633
+ async sendEvents(t) {
3634
+ t.data.properties = this.properties;
3635
+ try {
3636
+ const n = await fetch(`${this.apiPath}/api/v1/actor`, {
3637
+ headers: {
3638
+ Authorization: `ApiKey ${this.apiKey}`,
3639
+ "Content-Type": "application/json"
3640
+ },
3641
+ method: "POST",
3642
+ body: JSON.stringify(t)
3643
+ });
3644
+ if (!n.ok)
3645
+ throw new Error("Could not create an event 🐑");
3646
+ const { data: r } = await n.json();
3647
+ return r;
3648
+ } catch (n) {
3649
+ throw new Error("Error fetching data: " + (n instanceof Error ? n.message : "Unknown error"));
3650
+ }
3651
+ }
3652
+ }
3653
+ function bs({ width: e, height: t, x: n = 0, y: r = 0, r: o = 0 }) {
3654
+ const { innerWidth: i, innerHeight: s } = window, { topLeft: c = 0, topRight: l = 0, bottomRight: u = 0, bottomLeft: f = 0 } = typeof o == "number" ? { topLeft: o, topRight: o, bottomRight: o, bottomLeft: o } : o;
3655
+ return `M${i},${s}H0V0H${i}V${s}ZM${n + c},${r}a${c},${c},0,0,0-${c},${c}V${t + r - f}a${f},${f},0,0,0,${f},${f}H${e + n - u}a${u},${u},0,0,0,${u}-${u}V${r + l}a${l},${l},0,0,0-${l}-${l}Z`;
3656
+ }
3657
+ function ys(e) {
3658
+ let t, n, r, o, i;
3659
+ return {
3660
+ c() {
3661
+ t = Cn("svg"), n = Cn("path"), A(
3662
+ n,
3663
+ "d",
3664
+ /*pathDefinition*/
3665
+ e[2]
3666
+ ), A(t, "class", r = `${/*modalIsVisible*/
3667
+ e[1] ? "shepherd-modal-is-visible" : ""} shepherd-modal-overlay-container`);
3668
+ },
3669
+ m(s, c) {
3670
+ re(s, t, c), Be(t, n), e[11](t), o || (i = ht(
3671
+ t,
3672
+ "touchmove",
3673
+ /*_preventModalOverlayTouch*/
3674
+ e[3]
3675
+ ), o = !0);
3676
+ },
3677
+ p(s, [c]) {
3678
+ c & /*pathDefinition*/
3679
+ 4 && A(
3680
+ n,
3681
+ "d",
3682
+ /*pathDefinition*/
3683
+ s[2]
3684
+ ), c & /*modalIsVisible*/
3685
+ 2 && r !== (r = `${/*modalIsVisible*/
3686
+ s[1] ? "shepherd-modal-is-visible" : ""} shepherd-modal-overlay-container`) && A(t, "class", r);
3687
+ },
3688
+ i: K,
3689
+ o: K,
3690
+ d(s) {
3691
+ s && ee(t), e[11](null), o = !1, i();
3692
+ }
3693
+ };
3694
+ }
3695
+ function yr(e) {
3696
+ if (!e)
3697
+ return null;
3698
+ const n = e instanceof HTMLElement && window.getComputedStyle(e).overflowY;
3699
+ return n !== "hidden" && n !== "visible" && e.scrollHeight >= e.clientHeight ? e : yr(e.parentElement);
3700
+ }
3701
+ function vs(e) {
3702
+ let t = {
3703
+ top: 0,
3704
+ left: 0
3705
+ };
3706
+ if (!e)
3707
+ return t;
3708
+ let n = e.ownerDocument.defaultView;
3709
+ for (; n !== window.top; ) {
3710
+ var r;
3711
+ const s = (r = n) == null ? void 0 : r.frameElement;
3712
+ if (s) {
3713
+ var o, i;
3714
+ const c = s.getBoundingClientRect();
3715
+ t.top += c.top + ((o = c.scrollTop) != null ? o : 0), t.left += c.left + ((i = c.scrollLeft) != null ? i : 0);
3716
+ }
3717
+ n = n.parent;
3718
+ }
3719
+ return t;
3720
+ }
3721
+ function ws(e, t) {
3722
+ const n = e.getBoundingClientRect();
3723
+ let r = n.y || n.top, o = n.bottom || r + n.height;
3724
+ if (t) {
3725
+ const s = t.getBoundingClientRect(), c = s.y || s.top, l = s.bottom || c + s.height;
3726
+ r = Math.max(r, c), o = Math.min(o, l);
3727
+ }
3728
+ const i = Math.max(o - r, 0);
3729
+ return {
3730
+ y: r,
3731
+ height: i
3732
+ };
3733
+ }
3734
+ function _s(e, t, n) {
3735
+ let {
3736
+ element: r,
3737
+ openingProperties: o
3738
+ } = t, i = !1, s, c;
3739
+ u();
3740
+ const l = () => r;
3741
+ function u() {
3742
+ n(4, o = {
3743
+ width: 0,
3744
+ height: 0,
3745
+ x: 0,
3746
+ y: 0,
3747
+ r: 0
3748
+ });
3749
+ }
3750
+ function f() {
3751
+ n(1, i = !1), w();
3752
+ }
3753
+ function h(v = 0, g = 0, T = 0, N = 0, te, $) {
3754
+ if ($) {
3755
+ const {
3756
+ y: H,
3757
+ height: z
3758
+ } = ws($, te), {
3759
+ x: J,
3760
+ width: W,
3761
+ left: M
3762
+ } = $.getBoundingClientRect();
3763
+ n(4, o = {
3764
+ width: W + v * 2,
3765
+ height: z + v * 2,
3766
+ x: (J || M) + T - v,
3767
+ y: H + N - v,
3768
+ r: g
3769
+ });
3770
+ } else
3771
+ u();
3772
+ }
3773
+ function d(v) {
3774
+ w(), v.tour.options.useModalOverlay ? (_(v), m()) : f();
3775
+ }
3776
+ function m() {
3777
+ n(1, i = !0);
3778
+ }
3779
+ const y = (v) => {
3780
+ v.preventDefault();
3781
+ }, E = (v) => {
3782
+ v.stopPropagation();
3783
+ };
3784
+ function S() {
3785
+ window.addEventListener("touchmove", y, {
3786
+ passive: !1
3787
+ });
3788
+ }
3789
+ function w() {
3790
+ s && (cancelAnimationFrame(s), s = void 0), window.removeEventListener("touchmove", y, {
3791
+ passive: !1
3792
+ });
3793
+ }
3794
+ function _(v) {
3795
+ const {
3796
+ modalOverlayOpeningPadding: g,
3797
+ modalOverlayOpeningRadius: T,
3798
+ modalOverlayOpeningXOffset: N = 0,
3799
+ modalOverlayOpeningYOffset: te = 0
3800
+ } = v.options, $ = vs(v.target), H = yr(v.target), z = () => {
3801
+ s = void 0, h(g, T, N + $.left, te + $.top, H, v.target), s = requestAnimationFrame(z);
3802
+ };
3803
+ z(), S();
3804
+ }
3805
+ function C(v) {
3806
+ $e[v ? "unshift" : "push"](() => {
3807
+ r = v, n(0, r);
3808
+ });
3809
+ }
3810
+ return e.$$set = (v) => {
3811
+ "element" in v && n(0, r = v.element), "openingProperties" in v && n(4, o = v.openingProperties);
3812
+ }, e.$$.update = () => {
3813
+ e.$$.dirty & /*openingProperties*/
3814
+ 16 && n(2, c = bs(o));
3815
+ }, [r, i, c, E, o, l, u, f, h, d, m, C];
3816
+ }
3817
+ class Es extends de {
3818
+ constructor(t) {
3819
+ super(), fe(this, t, _s, ys, ue, {
3820
+ element: 0,
3821
+ openingProperties: 4,
3822
+ getElement: 5,
3823
+ closeModalOpening: 6,
3824
+ hide: 7,
3825
+ positionModal: 8,
3826
+ setupForStep: 9,
3827
+ show: 10
3828
+ });
3829
+ }
3830
+ get getElement() {
3831
+ return this.$$.ctx[5];
3832
+ }
3833
+ get closeModalOpening() {
3834
+ return this.$$.ctx[6];
3835
+ }
3836
+ get hide() {
3837
+ return this.$$.ctx[7];
3838
+ }
3839
+ get positionModal() {
3840
+ return this.$$.ctx[8];
3841
+ }
3842
+ get setupForStep() {
3843
+ return this.$$.ctx[9];
3844
+ }
3845
+ get show() {
3846
+ return this.$$.ctx[10];
3847
+ }
3848
+ }
3849
+ const xs = "https://shepherdpro.com", Wt = "shepherdPro:userId";
3850
+ class Ss extends Nt {
3851
+ constructor() {
3852
+ super(...arguments), this.isProEnabled = !1;
3853
+ }
3854
+ /**
3855
+ * Call init to take full advantage of ShepherdPro functionality
3856
+ * @param {string} apiKey The API key for your ShepherdPro account
3857
+ * @param {string} apiPath
3858
+ * @param {object} properties Extra properties to be passed to Shepherd Pro
3859
+ */
3860
+ async init(t, n, r) {
3861
+ if (!t)
3862
+ throw new Error("Shepherd Pro: Missing required apiKey option.");
3863
+ if (this.apiKey = t, this.apiPath = n ?? xs, this.properties = r ?? {}, this.properties.context = Zi(window), this.apiKey) {
3864
+ this.dataRequester = new gs(this.apiKey, this.apiPath, this.properties), this.isProEnabled = !0;
3865
+ const o = localStorage.getItem(Wt), i = [this.dataRequester.getTourState()];
3866
+ o || i.push(this.createNewActor()), await Promise.all(i);
3867
+ }
3868
+ }
3869
+ async createNewActor() {
3870
+ if (!this.dataRequester)
3871
+ return;
3872
+ const t = await this.dataRequester.sendEvents({
3873
+ data: {
3874
+ currentUserId: null,
3875
+ eventType: "setup"
3876
+ }
3877
+ });
3878
+ localStorage.setItem(Wt, String(t.actorId));
3879
+ }
3880
+ /**
3881
+ * Checks if a given tour's id is enabled
3882
+ * @param tourId A string denoting the id of the tour
3883
+ */
3884
+ async isTourEnabled(t) {
3885
+ var r;
3886
+ if (!this.dataRequester)
3887
+ return;
3888
+ const n = await ((r = this.dataRequester.tourStateDb) == null ? void 0 : r.get("tours", t));
3889
+ return (n == null ? void 0 : n.isActive) ?? !0;
3890
+ }
3891
+ }
3892
+ class Os extends Nt {
3893
+ constructor(t = {}) {
3894
+ super(), this.trackedEvents = ["active", "cancel", "complete", "show"], Xn(this);
3895
+ const n = {
3896
+ exitOnEsc: !0,
3897
+ keyboardNavigation: !0
3898
+ };
3899
+ this.options = Object.assign({}, n, t), this.classPrefix = Zn(this.options.classPrefix), this.steps = [], this.addSteps(this.options.steps), [
3900
+ "active",
3901
+ "cancel",
3902
+ "complete",
3903
+ "inactive",
3904
+ "show",
3905
+ "start"
3906
+ ].map((i) => {
3907
+ ((s) => {
3908
+ this.on(s, (c) => {
3909
+ c = c || {}, c.tour = this, ne.trigger(s, c);
3910
+ });
3911
+ })(i);
3912
+ }), this._setTourID(t.id);
3913
+ const { dataRequester: o } = ne;
3914
+ return o && this.trackedEvents.forEach((i) => this.on(i, (s) => {
3915
+ const { tour: c } = s, { id: l, steps: u } = c;
3916
+ let f;
3917
+ if (i !== "active") {
3918
+ const { step: d } = s;
3919
+ d && (f = u.findIndex((m) => m.id === d.id) + 1);
3920
+ }
3921
+ const h = {
3922
+ currentUserId: localStorage.getItem(Wt),
3923
+ eventType: i,
3924
+ journeyData: {
3925
+ id: l,
3926
+ currentStep: f,
3927
+ numberOfSteps: u.length,
3928
+ tourOptions: c.options
3929
+ }
3930
+ };
3931
+ o.sendEvents({ data: h });
3932
+ })), this;
3933
+ }
3934
+ /**
3935
+ * Adds a new step to the tour
3936
+ * @param {StepOptions} options - An object containing step options or a Step instance
3937
+ * @param {number | undefined} index - The optional index to insert the step at. If undefined, the step
3938
+ * is added to the end of the array.
3939
+ * @return The newly added step
3940
+ */
3941
+ addStep(t, n) {
3942
+ let r = t;
3943
+ return r instanceof Mt ? r.tour = this : r = new Mt(this, r), V(n) ? this.steps.push(r) : this.steps.splice(n, 0, r), r;
3944
+ }
3945
+ /**
3946
+ * Add multiple steps to the tour
3947
+ * @param {Array<StepOptions> | Array<Step> | undefined} steps - The steps to add to the tour
3948
+ */
3949
+ addSteps(t) {
3950
+ return Array.isArray(t) && t.forEach((n) => {
3951
+ this.addStep(n);
3952
+ }), this;
3953
+ }
3954
+ /**
3955
+ * Go to the previous step in the tour
3956
+ */
3957
+ back() {
3958
+ const t = this.steps.indexOf(this.currentStep);
3959
+ this.show(t - 1, !1);
3960
+ }
3961
+ /**
3962
+ * Calls _done() triggering the 'cancel' event
3963
+ * If `confirmCancel` is true, will show a window.confirm before cancelling
3964
+ * If `confirmCancel` is a function, will call it and wait for the return value,
3965
+ * and only cancel when the value returned is true
3966
+ */
3967
+ async cancel() {
3968
+ if (this.options.confirmCancel) {
3969
+ const t = this.options.confirmCancelMessage || "Are you sure you want to stop the tour?";
3970
+ let n;
3971
+ pe(this.options.confirmCancel) ? n = await this.options.confirmCancel() : n = window.confirm(t), n && this._done("cancel");
3972
+ } else
3973
+ this._done("cancel");
3974
+ }
3975
+ /**
3976
+ * Calls _done() triggering the `complete` event
3977
+ */
3978
+ complete() {
3979
+ this._done("complete");
3980
+ }
3981
+ /**
3982
+ * Gets the step from a given id
3983
+ * @param {number | string} id - The id of the step to retrieve
3984
+ * @return The step corresponding to the `id`
3985
+ */
3986
+ getById(t) {
3987
+ return this.steps.find((n) => n.id === t);
3988
+ }
3989
+ /**
3990
+ * Gets the current step
3991
+ */
3992
+ getCurrentStep() {
3993
+ return this.currentStep;
3994
+ }
3995
+ /**
3996
+ * Hide the current step
3997
+ */
3998
+ hide() {
3999
+ const t = this.getCurrentStep();
4000
+ if (t)
4001
+ return t.hide();
4002
+ }
4003
+ /**
4004
+ * Check if the tour is active
4005
+ */
4006
+ isActive() {
4007
+ return ne.activeTour === this;
4008
+ }
4009
+ /**
4010
+ * Go to the next step in the tour
4011
+ * If we are at the end, call `complete`
4012
+ */
4013
+ next() {
4014
+ const t = this.steps.indexOf(this.currentStep);
4015
+ t === this.steps.length - 1 ? this.complete() : this.show(t + 1, !0);
4016
+ }
4017
+ /**
4018
+ * Removes the step from the tour
4019
+ * @param {string} name - The id for the step to remove
4020
+ */
4021
+ removeStep(t) {
4022
+ const n = this.getCurrentStep();
4023
+ this.steps.some((r, o) => {
4024
+ if (r.id === t)
4025
+ return r.isOpen() && r.hide(), r.destroy(), this.steps.splice(o, 1), !0;
4026
+ }), n && n.id === t && (this.currentStep = void 0, this.steps.length ? this.show(0) : this.cancel());
4027
+ }
4028
+ /**
4029
+ * Show a specific step in the tour
4030
+ * @param {number | string} key - The key to look up the step by
4031
+ * @param {boolean} forward - True if we are going forward, false if backward
4032
+ */
4033
+ show(t = 0, n = !0) {
4034
+ const r = Ye(t) ? this.getById(t) : this.steps[t];
4035
+ r && (this._updateStateBeforeShow(), pe(r.options.showOn) && !r.options.showOn() ? this._skipStep(r, n) : (this.trigger("show", {
4036
+ step: r,
4037
+ previous: this.currentStep
4038
+ }), this.currentStep = r, r.show()));
4039
+ }
4040
+ /**
4041
+ * Start the tour
4042
+ */
4043
+ async start() {
4044
+ ne.isProEnabled && !await ne.isTourEnabled(this.options.id) || (this.trigger("start"), this.focusedElBeforeOpen = document.activeElement, this.currentStep = null, this.setupModal(), this._setupActiveTour(), this.next());
4045
+ }
4046
+ /**
4047
+ * Called whenever the tour is cancelled or completed, basically anytime we exit the tour
4048
+ * @param {string} event - The event name to trigger
4049
+ * @private
4050
+ */
4051
+ _done(t) {
4052
+ const n = this.steps.indexOf(this.currentStep);
4053
+ if (Array.isArray(this.steps) && this.steps.forEach((r) => r.destroy()), rs(this), this.trigger(t, { index: n }), ne.activeTour = null, this.trigger("inactive", { tour: this }), this.modal && this.modal.hide(), (t === "cancel" || t === "complete") && this.modal) {
4054
+ const r = document.querySelector(".shepherd-modal-overlay-container");
4055
+ r && r.remove();
4056
+ }
4057
+ ze(this.focusedElBeforeOpen) && this.focusedElBeforeOpen.focus();
4058
+ }
4059
+ /**
4060
+ * Make this tour "active"
4061
+ */
4062
+ _setupActiveTour() {
4063
+ this.trigger("active", { tour: this }), ne.activeTour = this;
4064
+ }
4065
+ /**
4066
+ * setupModal create the modal container and instance
4067
+ */
4068
+ setupModal() {
4069
+ this.modal = new Es({
4070
+ target: this.options.modalContainer || document.body,
4071
+ props: {
4072
+ // @ts-expect-error TODO: investigate where styles comes from
4073
+ styles: this.styles
4074
+ }
4075
+ });
4076
+ }
4077
+ /**
4078
+ * Called when `showOn` evaluates to false, to skip the step or complete the tour if it's the last step
4079
+ * @param {Step} step - The step to skip
4080
+ * @param {boolean} forward - True if we are going forward, false if backward
4081
+ * @private
4082
+ */
4083
+ _skipStep(t, n) {
4084
+ const r = this.steps.indexOf(t);
4085
+ if (r === this.steps.length - 1)
4086
+ this.complete();
4087
+ else {
4088
+ const o = n ? r + 1 : r - 1;
4089
+ this.show(o, n);
4090
+ }
4091
+ }
4092
+ /**
4093
+ * Before showing, hide the current step and if the tour is not
4094
+ * already active, call `this._setupActiveTour`.
4095
+ * @private
4096
+ */
4097
+ _updateStateBeforeShow() {
4098
+ this.currentStep && this.currentStep.hide(), this.isActive() || this._setupActiveTour();
4099
+ }
4100
+ /**
4101
+ * Sets this.id to a provided tourName and id or `${tourName}--${uuid}`
4102
+ * @param {string} optionsId - True if we are going forward, false if backward
4103
+ * @private
4104
+ */
4105
+ _setTourID(t) {
4106
+ const n = this.options.tourName || "tour", r = t || er();
4107
+ this.id = `${n}--${r}`;
4108
+ }
4109
+ }
4110
+ const ne = new Ss(), vr = typeof window > "u";
4111
+ ne.Step = vr ? mo : Mt;
4112
+ ne.Tour = vr ? go : Os;
4113
+ const Xt = Yr(
4114
+ void 0
4115
+ ), Ts = Xt.Consumer, Rs = () => {
4116
+ const e = qr(Xt);
4117
+ if (!e)
4118
+ throw new Error(
4119
+ "useShepherd must be used within a ShepherdJourneyProvider"
4120
+ );
4121
+ const { Shepherd: t } = e;
4122
+ return t;
4123
+ }, Ps = ({
4124
+ apiKey: e,
4125
+ children: t
4126
+ }) => (ne.init(e), /* @__PURE__ */ Jr.jsx(Xt.Provider, { value: { Shepherd: ne }, children: t }));
4127
+ export {
4128
+ Ts as JourneyMethods,
4129
+ Xt as ShepherdJourneyContext,
4130
+ Ps as ShepherdJourneyProvider,
4131
+ Rs as useShepherd
4132
+ };