@thisway/next
Advanced tools
Comparing version 0.11.0-beta.0 to 0.11.0
1288
index.js
var ao = Object.defineProperty; | ||
var lo = (o, t, e) => t in o ? ao(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e; | ||
var nt = (o, t, e) => (lo(o, typeof t != "symbol" ? t + "" : t, e), e); | ||
import * as Ae from "svelte"; | ||
import * as Ee from "svelte"; | ||
import { onMount as co, onDestroy as Ne, createEventDispatcher as po } from "svelte"; | ||
import { isValidNumber as Dt, toPx as lt, isElement as Ie, isTextInputElement as Me, deltaTransform as Le, transformX as ho, transformY as fo, defaults as re, NOOP_TRANSFORM as uo, pick$ as j, clamp as Ht, finite as se, getFrameElement as wo, buildScrollHierarchy as go, computeFrameScrollActions as _o, animationFrameThrottle as vo, observeElementBounding as mo, reverseX as ne, reverseY as ie, transformDOMRect as yo, transformNestedBounding as bo, getElementsBounding as $o, EMPTY_SIZE as Co, resizeObserver as xo } from "@thisway/utils"; | ||
import { get as S, writable as dt, derived as I, readable as Be } from "svelte/store"; | ||
import { PRIMARY_COLOR_WHITE as Ve, PRIMARY_COLOR_BLACK as He, PRIMARY_COLOR_BLUE as ko, isNoElement as ft, EMPTY_POINT as To, POSITION_AUTO as Gt, ORIENTATIONS as ae, ALIGNMENTS as Oo, NO_ELEMENT as Kt, ORIENTATIONS_TO_START_END as le, ORIENTATIONS_Y as So, popoverDefaultValues as Po, highlightDefaultValues as Eo, LAYOUT_MODE_1 as bt, LAYOUT_MODE_3 as De } from "@thisway/base"; | ||
import { isValidNumber as Dt, toPx as ct, isElement as Ie, isTextInputElement as Me, deltaTransform as Le, transformX as ho, transformY as fo, defaults as re, NOOP_TRANSFORM as uo, pick$ as j, clamp as gt, finite as se, buildScrollHierarchy as wo, getFrameElement as go, computeFrameScrollActions as _o, animationFrameThrottle as vo, observeElementBounding as mo, reverseX as ne, reverseY as ie, transformDOMRect as yo, transformNestedBounding as bo, getElementsBounding as $o, EMPTY_SIZE as Co, resizeObserver as xo } from "@thisway/utils"; | ||
import { get as O, writable as wt, derived as I, readable as Be } from "svelte/store"; | ||
import { PRIMARY_COLOR_WHITE as He, PRIMARY_COLOR_BLACK as Ve, PRIMARY_COLOR_BLUE as ko, isNoElement as ut, EMPTY_POINT as To, POSITION_AUTO as Gt, ORIENTATIONS as ae, ALIGNMENTS as Oo, NO_ELEMENT as Kt, ORIENTATIONS_TO_START_END as le, popoverDefaultValues as So, highlightDefaultValues as Po, LAYOUT_MODE_1 as $t, LAYOUT_MODE_3 as De } from "@thisway/base"; | ||
export * from "@thisway/base"; | ||
import { SvelteComponent as St, init as Pt, safe_not_equal as Et, append_styles as Ft, space as st, empty as jt, insert as D, noop as wt, detach as R, component_subscribe as A, svg_element as Rt, attr as T, set_style as G, append as U, listen as At, element as Z, action_destroyer as Re, is_function as Fe, binding_callbacks as je, construct_svelte_component as ce, create_component as $t, mount_component as Ct, group_outros as ct, transition_out as M, destroy_component as xt, check_outros as pt, transition_in as k, run_all as Ao, text as Nt, set_data as It, compute_slots as No, create_slot as gt, update_slot_base as _t, get_all_dirty_from_scope as vt, get_slot_changes as mt } from "svelte/internal"; | ||
import { SvelteComponent as Pt, init as At, safe_not_equal as Et, append_styles as Rt, space as st, empty as jt, insert as D, noop as _t, detach as F, component_subscribe as N, svg_element as Ft, attr as T, set_style as Y, append as X, listen as Nt, element as Z, action_destroyer as Fe, is_function as Re, binding_callbacks as je, construct_svelte_component as ce, create_component as Ct, mount_component as xt, group_outros as pt, transition_out as M, destroy_component as kt, check_outros as ht, transition_in as x, run_all as Ao, text as It, set_data as Mt, compute_slots as Eo, create_slot as vt, update_slot_base as mt, get_all_dirty_from_scope as yt, get_slot_changes as bt } from "svelte/internal"; | ||
import "svelte/internal/disclose-version"; | ||
import { getContext as pe, ElementBoundingContext as Io, DelegateContext as Mo, getHighlightOptions as We, CLICK_MASK_ACTION_NEXT as Lo, CLICK_MASK_ACTION_CLOSE as Bo, getRenderIndex as Vo } from "@thisway/next"; | ||
import { cubicOut as kt } from "svelte/easing"; | ||
import { tweened as Tt } from "svelte/motion"; | ||
import { getContext as pe, ElementBoundingContext as No, DelegateContext as Io, getHighlightOptions as We, CLICK_MASK_ACTION_NEXT as Mo, CLICK_MASK_ACTION_CLOSE as Lo, getRenderIndex as Bo } from "@thisway/next"; | ||
import { cubicOut as Tt } from "svelte/easing"; | ||
import { tweened as Ot } from "svelte/motion"; | ||
function it(o) { | ||
@@ -19,3 +19,3 @@ return Symbol(o); | ||
function W(o) { | ||
const t = Ae.getContext(o); | ||
const t = Ee.getContext(o); | ||
if (!t) | ||
@@ -25,7 +25,7 @@ throw new Error(`Context ${o.description} not exist`); | ||
} | ||
function Kr(o, t) { | ||
Ae.setContext(o, t); | ||
function Gr(o, t) { | ||
Ee.setContext(o, t); | ||
} | ||
const Ye = (o) => new Map(o), Mt = it("Tour"), zt = it("Options"), Ho = it("ElementBounding"), Zt = it("PopoverContainer"), Ge = it("PopoverSize"), Jt = it("TotalStepCount"), Qt = it("PopoverPosition"), te = it("Delegate"), Do = it("ForeignView"), ee = it("RenderState"), Wt = it("StepOptions"); | ||
class Ro { | ||
const Ye = (o) => new Map(o), Lt = it("Tour"), zt = it("Options"), Ho = it("ElementBounding"), Zt = it("PopoverContainer"), Ge = it("PopoverSize"), Jt = it("TotalStepCount"), Qt = it("PopoverPosition"), te = it("Delegate"), Vo = it("ForeignView"), ee = it("RenderState"), Wt = it("StepOptions"); | ||
class Do { | ||
constructor(t) { | ||
@@ -41,3 +41,3 @@ nt(this, "store"); | ||
getAllSteps(t = !1) { | ||
return t ? S(this.store.steps$) : S(this.store.effectiveSteps$); | ||
return t ? O(this.store.steps$) : O(this.store.effectiveSteps$); | ||
} | ||
@@ -49,3 +49,3 @@ /** | ||
getActiveStep() { | ||
return { step: S(this.store.activeStep$), index: S(this.store.activeIndex$) }; | ||
return { step: O(this.store.activeStep$), index: O(this.store.activeIndex$) }; | ||
} | ||
@@ -62,13 +62,13 @@ // public getStep(id: string): Step | undefined { | ||
const { effectiveSteps$: t } = this.store; | ||
return S(t)[0]; | ||
return O(t)[0]; | ||
} | ||
getLastStep() { | ||
const { effectiveSteps$: t } = this.store; | ||
return S(t).at(-1); | ||
return O(t).at(-1); | ||
} | ||
goPrevStep() { | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, r = S(t); | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, r = O(t); | ||
if (!Dt(r) || r < 1) | ||
return; | ||
const n = S(e)[r - 1]; | ||
const n = O(e)[r - 1]; | ||
this.goStep(n.id); | ||
@@ -92,6 +92,6 @@ } | ||
isActive() { | ||
return S(this.store.activeStep$) !== void 0; | ||
return O(this.store.activeStep$) !== void 0; | ||
} | ||
getNextStepId() { | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, r = S(t), n = S(e); | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, r = O(t), n = O(e); | ||
if (!(!Dt(r) || r === n.length - 1)) | ||
@@ -109,3 +109,3 @@ return n[r + 1].id; | ||
const Fo = (o, t) => { | ||
const e = dt(o), r = dt(t), n = I(e, (a) => a.filter((c) => !c.isHidden)), s = I([e, r], Xt), i = I([n, r], Xt), l = I([e, s], ([a, c]) => c != null ? a[c] : void 0); | ||
const e = wt(o), r = wt(t), n = I(e, (a) => a.filter((c) => !c.isHidden)), s = I([e, r], Xt), i = I([n, r], Xt), l = I([e, s], ([a, c]) => c != null ? a[c] : void 0); | ||
return { | ||
@@ -120,3 +120,3 @@ steps$: e, | ||
}; | ||
function Ot() { | ||
function St() { | ||
} | ||
@@ -126,3 +126,3 @@ function Ke(o) { | ||
} | ||
const Lt = (o) => { | ||
const Bt = (o) => { | ||
const t = Ke(o), e = Math.min(t.clientWidth, window.innerWidth), r = Math.min(t.clientHeight, window.innerHeight); | ||
@@ -133,5 +133,5 @@ return { | ||
}; | ||
}, jo = ({ x: o, y: t, ...e }) => Object.assign(e, { | ||
left: lt(o), | ||
top: lt(t) | ||
}, Ro = ({ x: o, y: t, ...e }) => Object.assign(e, { | ||
left: ct(o), | ||
top: ct(t) | ||
}); | ||
@@ -152,5 +152,5 @@ function Xe(o) { | ||
} | ||
function Wo(o, t, e) { | ||
function jo(o, t, e) { | ||
if (!o) | ||
return Ot; | ||
return St; | ||
const r = { | ||
@@ -164,3 +164,3 @@ passive: !0, | ||
} | ||
function Yo(o) { | ||
function Wo(o) { | ||
if (!(Ue(o.target) && Ie(o.target) && Me(o.target))) { | ||
@@ -182,13 +182,13 @@ if (o.key === "ArrowRight") | ||
} | ||
const Go = (o, t, e) => { | ||
const { x: r, y: n, borderWidth: s } = o, [i, l] = qe(o, e), a = s * 2, c = r - i + a, w = n - l, y = o.width + (i - a) * 2, u = o.height + (l - a) * 2, _ = t.width, f = t.height; | ||
return `M${_},0L0,0L0,${f}L${_},${f}L${_},0ZM${c},${w}h${y}a${a},${a} 0 0 1 ${a},${a}v${u}a${a},${a} 0 0 1 -${a},${a}h-${y}a${a},${a} 0 0 1 -${a},-${a}v-${u}a${a},${a} 0 0 1 ${a},-${a}z`; | ||
}, ze = (o, t = o) => o === Ve ? He : t, Ko = (o, t, e) => { | ||
const Yo = (o, t, e) => { | ||
const { x: r, y: n, borderWidth: s } = o, [i, l] = qe(o, e), a = s * 2, c = r - i + a, g = n - l, _ = o.width + (i - a) * 2, h = o.height + (l - a) * 2, m = t.width, u = t.height; | ||
return `M${m},0L0,0L0,${u}L${m},${u}L${m},0ZM${c},${g}h${_}a${a},${a} 0 0 1 ${a},${a}v${h}a${a},${a} 0 0 1 -${a},${a}h-${_}a${a},${a} 0 0 1 -${a},-${a}v-${h}a${a},${a} 0 0 1 ${a},-${a}z`; | ||
}, ze = (o, t = o) => o === He ? Ve : t, Go = (o, t, e) => { | ||
const r = re({ ...t }, o); | ||
return e ? re({ ...e }, r) : r; | ||
}, Xo = () => { | ||
const { effectiveSteps$: o } = W(Mt).store, t = W(ee); | ||
}, Ko = () => { | ||
const { effectiveSteps$: o } = W(Lt).store, t = W(ee); | ||
return I([o, t], ([e, { step: r }]) => Xt([e, r == null ? void 0 : r.id])); | ||
}, Ze = () => W(Wt).popover, Xr = () => W(Wt).highlight, Uo = (o) => { | ||
const t = (o == null ? void 0 : o.primaryColor) || ko, e = (o == null ? void 0 : o.textColor) || ze(t, Ve), r = (o == null ? void 0 : o.descColor) || He; | ||
}, Ze = () => W(Wt).popover, Kr = () => W(Wt).highlight, Xo = (o) => { | ||
const t = (o == null ? void 0 : o.primaryColor) || ko, e = (o == null ? void 0 : o.textColor) || ze(t, He), r = (o == null ? void 0 : o.descColor) || Ve; | ||
return { | ||
@@ -207,4 +207,4 @@ primaryColor: t, | ||
}), eo = Be(uo); | ||
function qo() { | ||
const o = pe(Io), t = pe(Mo), e = We(); | ||
function Uo() { | ||
const o = pe(No), t = pe(Io), e = We(); | ||
let r; | ||
@@ -221,6 +221,6 @@ return I([o, e], ([n, { borderWidth: s, padding: i, showBorder: l }], a) => { | ||
}; | ||
if (!n || ft(n)) { | ||
const y = Lt(t), u = r ? S(r) : { | ||
x: y.width / 2, | ||
y: y.height / 2, | ||
if (!n || ut(n)) { | ||
const _ = Bt(t), h = r ? O(r) : { | ||
x: _.width / 2, | ||
y: _.height / 2, | ||
width: 0, | ||
@@ -231,6 +231,6 @@ height: 0, | ||
}; | ||
c.x = u.x + u.width / 2, c.y = u.y + u.height / 2, c.borderWidth = 0, c.padding = 0; | ||
c.x = h.x + h.width / 2, c.y = h.y + h.height / 2, c.borderWidth = 0, c.padding = 0; | ||
} else | ||
c.x = n.x, c.y = n.y, c.width = n.width, c.height = n.height; | ||
r || (r = Tt( | ||
r || (r = Ot( | ||
{ | ||
@@ -247,13 +247,13 @@ x: c.x + c.width / 2, | ||
duration: 300, | ||
easing: kt | ||
easing: Tt | ||
} | ||
)); | ||
const w = r.subscribe(a); | ||
const g = r.subscribe(a); | ||
return r.set(c), () => { | ||
w(); | ||
g(); | ||
}; | ||
}); | ||
} | ||
function zo(o) { | ||
Ft(o, "svelte-1ge2xpm", ".thisway-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:block}.thisway-mask path{pointer-events:auto}.thisway-highlight{position:absolute;overflow:visible;pointer-events:none;border-style:solid;border-color:var(--thisway-highlight-border-color);box-sizing:content-box;border-width:var(--thisway-highlight-border-width);border-radius:calc(var(--thisway-highlight-border-width) * 2)}.thisway-highlight-pulse{position:absolute;animation:hotspot-pulse 1.5s infinite;opacity:0.4;width:100%;height:100%;top:0;left:0;box-sizing:content-box;padding:var(--thisway-highlight-border-width);border-radius:calc(var(--thisway-highlight-border-width) * 2);transform:translate(calc(var(--thisway-highlight-border-width) * -1), calc(var(--thisway-highlight-border-width) * -1))}@keyframes hotspot-pulse{0%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}50%{box-shadow:0 0 0 10px var(--thisway-highlight-border-color, #3082ed)}100%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}}"); | ||
function qo(o) { | ||
Rt(o, "svelte-1ge2xpm", ".thisway-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:block}.thisway-mask path{pointer-events:auto}.thisway-highlight{position:absolute;overflow:visible;pointer-events:none;border-style:solid;border-color:var(--thisway-highlight-border-color);box-sizing:content-box;border-width:var(--thisway-highlight-border-width);border-radius:calc(var(--thisway-highlight-border-width) * 2)}.thisway-highlight-pulse{position:absolute;animation:hotspot-pulse 1.5s infinite;opacity:0.4;width:100%;height:100%;top:0;left:0;box-sizing:content-box;padding:var(--thisway-highlight-border-width);border-radius:calc(var(--thisway-highlight-border-width) * 2);transform:translate(calc(var(--thisway-highlight-border-width) * -1), calc(var(--thisway-highlight-border-width) * -1))}@keyframes hotspot-pulse{0%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}50%{box-shadow:0 0 0 10px var(--thisway-highlight-border-color, #3082ed)}100%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}}"); | ||
} | ||
@@ -264,3 +264,3 @@ function fe(o) { | ||
c() { | ||
t = Rt("svg"), e = Rt("path"), T( | ||
t = Ft("svg"), e = Ft("path"), T( | ||
e, | ||
@@ -270,3 +270,3 @@ "d", | ||
o[2] | ||
), G(e, "fill", "black"), G( | ||
), Y(e, "fill", "black"), Y( | ||
e, | ||
@@ -279,3 +279,3 @@ "opacity", | ||
m(s, i) { | ||
D(s, t, i), U(t, e), o[19](t), r || (n = At( | ||
D(s, t, i), X(t, e), o[19](t), r || (n = Nt( | ||
t, | ||
@@ -295,3 +295,3 @@ "click", | ||
), i & /*$opacity$*/ | ||
8 && G( | ||
8 && Y( | ||
e, | ||
@@ -304,3 +304,3 @@ "opacity", | ||
d(s) { | ||
s && R(t), o[19](null), r = !1, n(); | ||
s && F(t), o[19](null), r = !1, n(); | ||
} | ||
@@ -316,3 +316,3 @@ }; | ||
c() { | ||
t = Z("div"), s && s.c(), T(t, "class", "thisway-highlight"), G( | ||
t = Z("div"), s && s.c(), T(t, "class", "thisway-highlight"), Y( | ||
t, | ||
@@ -322,3 +322,3 @@ "--thisway-highlight-border-width", | ||
o[5] | ||
), G( | ||
), Y( | ||
t, | ||
@@ -331,3 +331,3 @@ "--thisway-highlight-border-color", | ||
m(i, l) { | ||
D(i, t, l), s && s.m(t, null), r || (n = Re(e = to.call( | ||
D(i, t, l), s && s.m(t, null), r || (n = Fe(e = to.call( | ||
null, | ||
@@ -341,3 +341,3 @@ t, | ||
/*$showHeartbeat$*/ | ||
i[8] ? s || (s = de(), s.c(), s.m(t, null)) : s && (s.d(1), s = null), e && Fe(e.update) && l & /*$borderBoundingStyle$*/ | ||
i[8] ? s || (s = de(), s.c(), s.m(t, null)) : s && (s.d(1), s = null), e && Re(e.update) && l & /*$borderBoundingStyle$*/ | ||
128 && e.update.call( | ||
@@ -348,3 +348,3 @@ null, | ||
), l & /*$borderWidthPx$*/ | ||
32 && G( | ||
32 && Y( | ||
t, | ||
@@ -355,3 +355,3 @@ "--thisway-highlight-border-width", | ||
), l & /*$borderColor$*/ | ||
64 && G( | ||
64 && Y( | ||
t, | ||
@@ -364,3 +364,3 @@ "--thisway-highlight-border-color", | ||
d(i) { | ||
i && R(t), s && s.d(), r = !1, n(); | ||
i && F(t), s && s.d(), r = !1, n(); | ||
} | ||
@@ -379,7 +379,7 @@ }; | ||
d(e) { | ||
e && R(t); | ||
e && F(t); | ||
} | ||
}; | ||
} | ||
function Zo(o) { | ||
function zo(o) { | ||
let t, e, r = ( | ||
@@ -404,59 +404,59 @@ /*$showMask$*/ | ||
}, | ||
i: wt, | ||
o: wt, | ||
i: _t, | ||
o: _t, | ||
d(s) { | ||
s && (R(t), R(e)), r && r.d(s), n && n.d(s); | ||
s && (F(t), F(e)), r && r.d(s), n && n.d(s); | ||
} | ||
}; | ||
} | ||
function Jo(o, t, e) { | ||
let r, n, s, i, l, a, c, w, y; | ||
const u = W(Mt), _ = W(te), f = Je(), g = We(), v = j(g, "showMask"); | ||
A(o, v, (m) => e(0, r = m)); | ||
const b = j(g, "showBorder"); | ||
A(o, b, (m) => e(4, l = m)); | ||
const $ = j(g, "showHeartbeat"), P = j(g, "maskOpacity"); | ||
A(o, P, (m) => e(3, i = m)); | ||
let x = dt(); | ||
A(o, x, (m) => e(1, n = m)); | ||
const L = _.transform$ ?? eo, E = qo(), K = I([E, v, x], ([m, V, Q], et) => { | ||
if (!m || !V || !Q) | ||
function Zo(o, t, e) { | ||
let r, n, s, i, l, a, c, g, _; | ||
const h = W(Lt), m = W(te), u = Je(), f = We(), y = j(f, "showMask"); | ||
N(o, y, (v) => e(0, r = v)); | ||
const b = j(f, "showBorder"); | ||
N(o, b, (v) => e(4, l = v)); | ||
const $ = j(f, "showHeartbeat"), k = j(f, "maskOpacity"); | ||
N(o, k, (v) => e(3, i = v)); | ||
let C = wt(); | ||
N(o, C, (v) => e(1, n = v)); | ||
const B = m.transform$ ?? eo, A = Uo(), U = I([A, y, C], ([v, H, ot], R) => { | ||
if (!v || !H || !ot) | ||
return; | ||
const Y = Go(m, Lt(_), S(L)); | ||
et(Y); | ||
const V = Yo(v, Bt(m), O(B)); | ||
R(V); | ||
}); | ||
A(o, K, (m) => e(2, s = m)); | ||
const B = I(E, (m, V) => { | ||
if (!m) | ||
N(o, U, (v) => e(2, s = v)); | ||
const L = I(A, (v, H) => { | ||
if (!v) | ||
return; | ||
const { x: Q, y: et, borderWidth: Y, padding: F, width: z, height: ot } = m, [X, q] = oe(F, S(L)); | ||
V({ | ||
left: lt(Q - Y - X), | ||
top: lt(et - Y - q), | ||
width: lt(z), | ||
height: lt(ot), | ||
padding: `${lt(q)} ${lt(X)}` | ||
const { x: ot, y: R, borderWidth: V, padding: J, width: Q, height: G } = v, [q, lt] = oe(J, O(B)); | ||
H({ | ||
left: ct(ot - V - q), | ||
top: ct(R - V - lt), | ||
width: ct(Q), | ||
height: ct(G), | ||
padding: `${ct(lt)} ${ct(q)}` | ||
}); | ||
}); | ||
A(o, B, (m) => e(7, w = m)); | ||
const N = I(E, (m) => lt(m == null ? void 0 : m.borderWidth)); | ||
A(o, N, (m) => e(5, a = m)); | ||
const O = I([g, f], ([m, V]) => { | ||
if (m != null && m.borderColor) | ||
return m.borderColor; | ||
const { primaryColor: Q } = V; | ||
return ze(Q); | ||
N(o, L, (v) => e(7, g = v)); | ||
const E = I(A, (v) => ct(v == null ? void 0 : v.borderWidth)); | ||
N(o, E, (v) => e(5, a = v)); | ||
const S = I([f, u], ([v, H]) => { | ||
if (v != null && v.borderColor) | ||
return v.borderColor; | ||
const { primaryColor: ot } = H; | ||
return ze(ot); | ||
}); | ||
A(o, O, (m) => e(6, c = m)); | ||
const p = I([$, E], ([m, V]) => !!(m && (V != null && V.width) && (V != null && V.height))); | ||
A(o, p, (m) => e(8, y = m)); | ||
const C = () => { | ||
var V; | ||
switch ((V = S(g)) == null ? void 0 : V.clickMask) { | ||
case Bo: { | ||
u.onClose(); | ||
N(o, S, (v) => e(6, c = v)); | ||
const p = I([$, A], ([v, H]) => !!(v && (H != null && H.width) && (H != null && H.height))); | ||
N(o, p, (v) => e(8, _ = v)); | ||
const P = () => { | ||
var H; | ||
switch ((H = O(f)) == null ? void 0 : H.clickMask) { | ||
case Lo: { | ||
h.onClose(); | ||
break; | ||
} | ||
case Lo: { | ||
u.goNextStep(); | ||
case Mo: { | ||
h.goNextStep(); | ||
break; | ||
@@ -466,5 +466,5 @@ } | ||
}; | ||
function J(m) { | ||
je[m ? "unshift" : "push"](() => { | ||
n = m, x.set(n); | ||
function et(v) { | ||
je[v ? "unshift" : "push"](() => { | ||
n = v, C.set(n); | ||
}); | ||
@@ -480,20 +480,20 @@ } | ||
c, | ||
w, | ||
g, | ||
_, | ||
y, | ||
v, | ||
b, | ||
k, | ||
C, | ||
U, | ||
L, | ||
E, | ||
S, | ||
p, | ||
P, | ||
x, | ||
K, | ||
B, | ||
N, | ||
O, | ||
p, | ||
C, | ||
J | ||
et | ||
]; | ||
} | ||
class Qo extends St { | ||
class Jo extends Pt { | ||
constructor(t) { | ||
super(), Pt(this, t, Jo, Zo, Et, {}, zo); | ||
super(), At(this, t, Zo, zo, Et, {}, qo); | ||
} | ||
@@ -503,30 +503,30 @@ } | ||
function oo(o, t, e, r, n, s) { | ||
const i = t.x + t.width, l = t.y + t.height, c = t.y - e.height - n >= 0, y = s.height - (l + e.height) - n >= 0, _ = t.x - e.width - r >= 0, g = s.width - (i + e.width) - r >= 0; | ||
if (o === "BOTTOM" && y) | ||
const i = t.x + t.width, l = t.y + t.height, c = t.y - e.height - n >= 0, _ = s.height - (l + e.height) - n >= 0, m = t.x - e.width - r >= 0, f = s.width - (i + e.width) - r >= 0; | ||
if (o === "BOTTOM" && _) | ||
return "BOTTOM"; | ||
if (o === "LEFT" && _) | ||
if (o === "LEFT" && m) | ||
return "LEFT"; | ||
if (o === "TOP" && c) | ||
return "TOP"; | ||
if (o === "RIGHT" && g) | ||
if (o === "RIGHT" && f) | ||
return "RIGHT"; | ||
const v = s.width * we, b = s.height * we; | ||
if (t.y < b && y) | ||
const y = s.width * we, b = s.height * we; | ||
if (t.y < b && _) | ||
return "BOTTOM"; | ||
if (s.width - i < v && _) | ||
if (s.width - i < y && m) | ||
return "LEFT"; | ||
if (s.height - l < b && c) | ||
return "TOP"; | ||
if (t.x < v && g) | ||
if (t.x < y && f) | ||
return "RIGHT"; | ||
if (y) | ||
if (_) | ||
return "BOTTOM"; | ||
if (_) | ||
if (m) | ||
return "LEFT"; | ||
if (c) | ||
return "TOP"; | ||
if (g) | ||
if (f) | ||
return "RIGHT"; | ||
} | ||
function tr(...o) { | ||
function Qo(...o) { | ||
const t = o[0]; | ||
@@ -545,3 +545,3 @@ return t === "SCREEN" || t === "OVER" ? t : oo(...o) ?? "OVER"; | ||
visibility: "hidden" | ||
}, er = (o, t, e, r) => o < e ? e - o : t > r ? t - r : 0, ge = (o = "CENTER", t, e, r, n, s) => { | ||
}, tr = (o, t, e, r) => o < e ? e - o : t > r ? t - r : 0, ge = (o = "CENTER", t, e, r, n, s) => { | ||
if (!r) | ||
@@ -553,15 +553,15 @@ return { adjustAlignment: "CENTER", value: 0 }; | ||
END: e - r + s | ||
}, a = ((c, w, y) => { | ||
let u; | ||
for (const _ of c) { | ||
const f = i[_], g = er(f, f + r, w, y); | ||
if (g > 0) | ||
u ? g < u.overflowPx && (u = { adjustAlignment: _, overflowPx: g }) : u = { adjustAlignment: _, overflowPx: g }; | ||
}, a = ((c, g, _) => { | ||
let h; | ||
for (const m of c) { | ||
const u = i[m], f = tr(u, u + r, g, _); | ||
if (f > 0) | ||
h ? f < h.overflowPx && (h = { adjustAlignment: m, overflowPx: f }) : h = { adjustAlignment: m, overflowPx: f }; | ||
else | ||
return { adjustAlignment: _, value: f }; | ||
return { adjustAlignment: m, value: u }; | ||
} | ||
return { | ||
adjustAlignment: (u == null ? void 0 : u.adjustAlignment) || o, | ||
value: i[(u == null ? void 0 : u.adjustAlignment) || o], | ||
overflowPx: u == null ? void 0 : u.overflowPx | ||
adjustAlignment: (h == null ? void 0 : h.adjustAlignment) || o, | ||
value: i[(h == null ? void 0 : h.adjustAlignment) || o], | ||
overflowPx: h == null ? void 0 : h.overflowPx | ||
}; | ||
@@ -578,3 +578,3 @@ })( | ||
return a; | ||
}, or = (o, t, e, r, n, s, i, l) => { | ||
}, er = (o, t, e, r, n, s, i, l) => { | ||
const a = { | ||
@@ -584,11 +584,11 @@ ...qt, | ||
}; | ||
let c, w, y; | ||
if (!e || ft(e) || o === "SCREEN") | ||
w = (s.height - r.height) / 2, y = (s.width - r.width) / 2; | ||
let c, g, _; | ||
if (!e || ut(e) || o === "SCREEN") | ||
g = (s.height - r.height) / 2, _ = (s.width - r.width) / 2; | ||
else { | ||
const u = e.x + e.width, _ = e.y + e.height, f = () => { | ||
const h = e.x + e.width, m = e.y + e.height, u = s.height - r.height, f = s.width - r.width, y = () => { | ||
const $ = ge( | ||
t, | ||
e.x, | ||
u, | ||
h, | ||
r.width, | ||
@@ -598,8 +598,8 @@ s.width, | ||
); | ||
y = $.value, c = $.adjustAlignment; | ||
}, g = () => { | ||
_ = gt($.value, 0, f), c = $.adjustAlignment; | ||
}, b = () => { | ||
const $ = ge( | ||
t, | ||
e.y, | ||
_, | ||
m, | ||
r.height, | ||
@@ -609,23 +609,23 @@ s.height, | ||
); | ||
w = $.value, c = $.adjustAlignment; | ||
}, v = s.height - r.height, b = s.width - r.width; | ||
g = gt($.value, 0, u), c = $.adjustAlignment; | ||
}; | ||
switch (o) { | ||
case "OVER": { | ||
w = e.y + (e.height - r.height) / 2, y = e.x + (e.width - r.width) / 2; | ||
g = e.y + (e.height - r.height) / 2, _ = e.x + (e.width - r.width) / 2; | ||
break; | ||
} | ||
case "TOP": { | ||
w = Ht(e.y - r.height - l, 0, v), f(); | ||
g = gt(e.y - r.height - l, 0, u), y(); | ||
break; | ||
} | ||
case "BOTTOM": { | ||
w = Ht(_ + l, n, v), f(); | ||
g = gt(m + l, n, u), y(); | ||
break; | ||
} | ||
case "LEFT": { | ||
y = Ht(e.x - r.width - i, 0, b), g(); | ||
_ = gt(e.x - r.width - i, 0, f), b(); | ||
break; | ||
} | ||
case "RIGHT": { | ||
y = Ht(u + i, n, b), g(); | ||
_ = gt(h + i, n, f), b(); | ||
break; | ||
@@ -635,4 +635,4 @@ } | ||
} | ||
return a.x = se(y), a.y = se(w), { style: a, alignment: c || "CENTER" }; | ||
}, rr = (o, t) => { | ||
return a.x = se(_), a.y = se(g), { style: a, alignment: c || "CENTER" }; | ||
}, or = (o, t) => { | ||
let e, r; | ||
@@ -642,5 +642,5 @@ return ({ step: n }, s, i, l) => { | ||
return; | ||
const a = S(t.popover), c = a.offset, w = ro(a.position), y = S(t.highlight), { padding: u, borderWidth: _ } = y, f = n == null ? void 0 : n.id, g = w[0], v = w[1], b = Lt(o), [$, P] = oe(u, l), x = $ + c + _, L = P + c + _, E = ft(s) ? "SCREEN" : tr(g, s, i, x, L, b), { style: K, alignment: B } = or( | ||
E, | ||
v === e ? r : v, | ||
const a = O(t.popover), c = a.offset, g = ro(a.position), _ = O(t.highlight), { padding: h, borderWidth: m } = _, u = n == null ? void 0 : n.id, f = g[0], y = g[1], b = Bt(o), [$, k] = oe(h, l), C = $ + c + m, B = k + c + m, A = ut(s) ? "SCREEN" : Qo(f, s, i, C, B, b), { style: U, alignment: L } = er( | ||
A, | ||
y === e ? r : y, | ||
s, | ||
@@ -650,28 +650,28 @@ i, | ||
b, | ||
x, | ||
L | ||
C, | ||
B | ||
); | ||
return e = v, r = B, { | ||
orientation: E, | ||
alignment: B, | ||
stepId: f, | ||
stepOrientation: g, | ||
style: K | ||
return e = y, r = L, { | ||
orientation: A, | ||
alignment: L, | ||
stepId: u, | ||
stepOrientation: f, | ||
style: U | ||
}; | ||
}; | ||
}; | ||
function rr(o) { | ||
Rt(o, "svelte-1cl9mhv", ".thisway{--thisway-default-shadow:0 1px 10px rgba(0, 0, 0, 0.4);width:100%;height:100%;top:0;right:0;bottom:0;left:0;max-width:100%;max-height:100%;pointer-events:none}.thisway-popover__container{position:absolute;pointer-events:auto}"); | ||
} | ||
function sr(o) { | ||
Ft(o, "svelte-1cl9mhv", ".thisway{--thisway-default-shadow:0 1px 10px rgba(0, 0, 0, 0.4);width:100%;height:100%;top:0;right:0;bottom:0;left:0;max-width:100%;max-height:100%;pointer-events:none}.thisway-popover__container{position:absolute;pointer-events:auto}"); | ||
} | ||
function nr(o) { | ||
let t, e, r, n, s, i, l, a, c, w, y; | ||
e = new Qo({}); | ||
var u = ( | ||
let t, e, r, n, s, i, l, a, c, g, _; | ||
e = new Jo({}); | ||
var h = ( | ||
/*$popoverComponent$*/ | ||
o[8] | ||
); | ||
function _(f, g) { | ||
function m(u, f) { | ||
return {}; | ||
} | ||
return u && (s = ce(u, _()), s.$on( | ||
return h && (s = ce(h, m()), s.$on( | ||
"close", | ||
@@ -690,5 +690,5 @@ /*onClose*/ | ||
c() { | ||
t = Z("div"), $t(e.$$.fragment), r = st(), n = Z("div"), s && $t(s.$$.fragment), T(n, "class", i = "thisway-popover__container " + /*$popoverClassName$*/ | ||
t = Z("div"), Ct(e.$$.fragment), r = st(), n = Z("div"), s && Ct(s.$$.fragment), T(n, "class", i = "thisway-popover__container " + /*$popoverClassName$*/ | ||
o[6]), T(t, "class", a = "thisway " + /*$className$*/ | ||
o[2]), G( | ||
o[2]), Y( | ||
t, | ||
@@ -698,3 +698,3 @@ "position", | ||
o[0] | ||
), G( | ||
), Y( | ||
t, | ||
@@ -704,3 +704,3 @@ "display", | ||
o[3] ? "block" : "none" | ||
), G( | ||
), Y( | ||
t, | ||
@@ -710,3 +710,3 @@ "z-index", | ||
o[4] | ||
), G( | ||
), Y( | ||
t, | ||
@@ -716,3 +716,3 @@ "--thisway-color-primary", | ||
o[5].primaryColor | ||
), G( | ||
), Y( | ||
t, | ||
@@ -722,3 +722,3 @@ "--thisway-color-text", | ||
o[5].textColor | ||
), G( | ||
), Y( | ||
t, | ||
@@ -730,5 +730,5 @@ "--thisway-color-desc", | ||
}, | ||
m(f, g) { | ||
D(f, t, g), Ct(e, t, null), U(t, r), U(t, n), s && Ct(s, n, null), o[20](n), c = !0, w || (y = [ | ||
At( | ||
m(u, f) { | ||
D(u, t, f), xt(e, t, null), X(t, r), X(t, n), s && xt(s, n, null), o[20](n), c = !0, g || (_ = [ | ||
Nt( | ||
window, | ||
@@ -739,3 +739,3 @@ "keydown", | ||
), | ||
Re(l = to.call( | ||
Fe(l = to.call( | ||
null, | ||
@@ -746,174 +746,174 @@ n, | ||
)) | ||
], w = !0); | ||
], g = !0); | ||
}, | ||
p(f, g) { | ||
if (g[0] & /*$popoverComponent$*/ | ||
256 && u !== (u = /*$popoverComponent$*/ | ||
f[8])) { | ||
p(u, f) { | ||
if (f[0] & /*$popoverComponent$*/ | ||
256 && h !== (h = /*$popoverComponent$*/ | ||
u[8])) { | ||
if (s) { | ||
ct(); | ||
const v = s; | ||
M(v.$$.fragment, 1, 0, () => { | ||
xt(v, 1); | ||
}), pt(); | ||
pt(); | ||
const y = s; | ||
M(y.$$.fragment, 1, 0, () => { | ||
kt(y, 1); | ||
}), ht(); | ||
} | ||
u ? (s = ce(u, _()), s.$on( | ||
h ? (s = ce(h, m()), s.$on( | ||
"close", | ||
/*onClose*/ | ||
f[18] | ||
u[18] | ||
), s.$on( | ||
"previous", | ||
/*onPrev*/ | ||
f[16] | ||
u[16] | ||
), s.$on( | ||
"next", | ||
/*onNext*/ | ||
f[17] | ||
), $t(s.$$.fragment), k(s.$$.fragment, 1), Ct(s, n, null)) : s = null; | ||
u[17] | ||
), Ct(s.$$.fragment), x(s.$$.fragment, 1), xt(s, n, null)) : s = null; | ||
} | ||
(!c || g[0] & /*$popoverClassName$*/ | ||
(!c || f[0] & /*$popoverClassName$*/ | ||
64 && i !== (i = "thisway-popover__container " + /*$popoverClassName$*/ | ||
f[6])) && T(n, "class", i), l && Fe(l.update) && g[0] & /*$popoverStyle$*/ | ||
u[6])) && T(n, "class", i), l && Re(l.update) && f[0] & /*$popoverStyle$*/ | ||
128 && l.update.call( | ||
null, | ||
/*$popoverStyle$*/ | ||
f[7] | ||
), (!c || g[0] & /*$className$*/ | ||
u[7] | ||
), (!c || f[0] & /*$className$*/ | ||
4 && a !== (a = "thisway " + /*$className$*/ | ||
f[2])) && T(t, "class", a), g[0] & /*position*/ | ||
1 && G( | ||
u[2])) && T(t, "class", a), f[0] & /*position*/ | ||
1 && Y( | ||
t, | ||
"position", | ||
/*position*/ | ||
f[0] | ||
), g[0] & /*$step$*/ | ||
8 && G( | ||
u[0] | ||
), f[0] & /*$step$*/ | ||
8 && Y( | ||
t, | ||
"display", | ||
/*$step$*/ | ||
f[3] ? "block" : "none" | ||
), g[0] & /*$zIndex$*/ | ||
16 && G( | ||
u[3] ? "block" : "none" | ||
), f[0] & /*$zIndex$*/ | ||
16 && Y( | ||
t, | ||
"z-index", | ||
/*$zIndex$*/ | ||
f[4] | ||
), g[0] & /*$theme$*/ | ||
32 && G( | ||
u[4] | ||
), f[0] & /*$theme$*/ | ||
32 && Y( | ||
t, | ||
"--thisway-color-primary", | ||
/*$theme$*/ | ||
f[5].primaryColor | ||
), g[0] & /*$theme$*/ | ||
32 && G( | ||
u[5].primaryColor | ||
), f[0] & /*$theme$*/ | ||
32 && Y( | ||
t, | ||
"--thisway-color-text", | ||
/*$theme$*/ | ||
f[5].textColor | ||
), g[0] & /*$theme$*/ | ||
32 && G( | ||
u[5].textColor | ||
), f[0] & /*$theme$*/ | ||
32 && Y( | ||
t, | ||
"--thisway-color-desc", | ||
/*$theme$*/ | ||
f[5].descColor | ||
u[5].descColor | ||
); | ||
}, | ||
i(f) { | ||
c || (k(e.$$.fragment, f), s && k(s.$$.fragment, f), c = !0); | ||
i(u) { | ||
c || (x(e.$$.fragment, u), s && x(s.$$.fragment, u), c = !0); | ||
}, | ||
o(f) { | ||
M(e.$$.fragment, f), s && M(s.$$.fragment, f), c = !1; | ||
o(u) { | ||
M(e.$$.fragment, u), s && M(s.$$.fragment, u), c = !1; | ||
}, | ||
d(f) { | ||
f && R(t), xt(e), s && xt(s), o[20](null), w = !1, Ao(y); | ||
d(u) { | ||
u && F(t), kt(e), s && kt(s), o[20](null), g = !1, Ao(_); | ||
} | ||
}; | ||
} | ||
function ir(o, t, e) { | ||
let r, n, s, i, l, a, c, { position: w = "fixed" } = t, y; | ||
const u = W(zt), _ = W(Zt), f = W(te), g = Ze(), v = W(Ge), b = W(ee), $ = j(b, "step"); | ||
A(o, $, (d) => e(3, n = d)); | ||
const P = j(b, "index"), x = I([$, u], ([d, H]) => { | ||
function nr(o, t, e) { | ||
let r, n, s, i, l, a, c, { position: g = "fixed" } = t, _; | ||
const h = W(zt), m = W(Zt), u = W(te), f = Ze(), y = W(Ge), b = W(ee), $ = j(b, "step"); | ||
N(o, $, (d) => e(3, n = d)); | ||
const k = j(b, "index"), C = I([$, h], ([d, K]) => { | ||
if (d) | ||
return f.getPopoverComponent(d, H); | ||
return u.getPopoverComponent(d, K); | ||
}); | ||
A(o, x, (d) => e(8, c = d)); | ||
const L = j(u, "zIndex", 1e4); | ||
A(o, L, (d) => e(4, s = d)); | ||
const E = j(u, "className", ""); | ||
A(o, E, (d) => e(2, r = d)); | ||
const K = j(g, "className", ""); | ||
A(o, K, (d) => e(6, l = d)); | ||
const B = W(Qt), N = j(B, "style"); | ||
let O, p, C, J = -1; | ||
const m = () => { | ||
const d = S($); | ||
N(o, C, (d) => e(8, c = d)); | ||
const B = j(h, "zIndex", 1e4); | ||
N(o, B, (d) => e(4, s = d)); | ||
const A = j(h, "className", ""); | ||
N(o, A, (d) => e(2, r = d)); | ||
const U = j(f, "className", ""); | ||
N(o, U, (d) => e(6, l = d)); | ||
const L = W(Qt), E = j(L, "style"); | ||
let S, p, P, et = -1; | ||
const v = () => { | ||
const d = O($); | ||
return !(d != null && d.survey || d != null && d.media); | ||
}, V = () => m() ? void 0 : "MoveIn", Q = (d, H, at) => { | ||
const rt = at ? d.width : -H.width, Yt = (d.height - H.height) / 2; | ||
}, H = () => v() ? void 0 : "MoveIn", ot = (d, K, at) => { | ||
const rt = at ? d.width : -K.width, Yt = (d.height - K.height) / 2; | ||
return { x: rt, y: Yt }; | ||
}; | ||
let et = !0; | ||
const Y = I( | ||
N, | ||
(d, H) => { | ||
const at = S(b).index; | ||
let R = !0; | ||
const V = I( | ||
E, | ||
(d, K) => { | ||
const at = O(b).index; | ||
if (!d) { | ||
H(qt); | ||
K(qt); | ||
return; | ||
} | ||
const rt = Lt(f), Yt = S(v), Bt = { x: d.x, y: d.y }; | ||
let no = V(); | ||
if (J === -1 || J < at ? et = !0 : J > at && (et = !1), no) { | ||
const ut = Q(rt, Yt, et), Vt = Math.max(Math.abs(Bt.x - ut.x), Math.abs(Bt.y - ut.y)) / 1e3 * 600; | ||
!p || J !== S(P) ? p = Tt(ut, { duration: Vt, easing: kt }) : ut.y !== S(p).y && (p = Tt( | ||
const rt = Bt(u), Yt = O(y), Ht = { x: d.x, y: d.y }; | ||
let no = H(); | ||
if (et === -1 || et < at ? R = !0 : et > at && (R = !1), no) { | ||
const dt = ot(rt, Yt, R), Vt = Math.max(Math.abs(Ht.x - dt.x), Math.abs(Ht.y - dt.y)) / 1e3 * 600; | ||
!p || et !== O(k) ? p = Ot(dt, { duration: Vt, easing: Tt }) : dt.y !== O(p).y && (p = Ot( | ||
{ | ||
x: S(p).x, | ||
y: ut.y | ||
x: O(p).x, | ||
y: dt.y | ||
}, | ||
{ duration: Vt, easing: kt } | ||
)), C = p; | ||
{ duration: Vt, easing: Tt } | ||
)), P = p; | ||
} else | ||
O || (H(d), O = Tt(Bt, { duration: 300, easing: kt })), C = O; | ||
const io = C.subscribe(({ x: ut, y: Vt }) => { | ||
H({ ...d, x: ut, y: Vt }); | ||
S || (K(d), S = Ot(Ht, { duration: 300, easing: Tt })), P = S; | ||
const io = P.subscribe(({ x: dt, y: Vt }) => { | ||
K({ ...d, x: dt, y: Vt }); | ||
}); | ||
return C.set(Bt), J = at, io; | ||
return P.set(Ht), et = at, io; | ||
}, | ||
qt | ||
), F = I(Y, (d) => { | ||
const H = jo(d); | ||
return S(g).showPopover === !1 && m() && (H.visibility = "hidden"), H; | ||
), J = I(V, (d) => { | ||
const K = Ro(d); | ||
return O(f).showPopover === !1 && v() && (K.visibility = "hidden"), K; | ||
}); | ||
A(o, F, (d) => e(7, a = d)); | ||
const z = Je(); | ||
A(o, z, (d) => e(5, i = d)); | ||
const ot = W(Mt), { onPrev: X, onNext: q, onClose: yt } = ot, ht = (d) => { | ||
if (!ot.isActive() || S(u).keyboardControl === !1) | ||
N(o, J, (d) => e(7, a = d)); | ||
const Q = Je(); | ||
N(o, Q, (d) => e(5, i = d)); | ||
const G = W(Lt), { onPrev: q, onNext: lt, onClose: ft } = G, z = (d) => { | ||
if (!G.isActive() || O(h).keyboardControl === !1) | ||
return; | ||
const H = f.onKeydown ? f.onKeydown(d) : Yo(d); | ||
ot.applyAction(H); | ||
}, h = I(b, ({ element: d }, H) => { | ||
if (!d || ft(d) || S(u).interactive === !1 || S(g).position === "SCREEN") | ||
return Ot; | ||
const K = u.onKeydown ? u.onKeydown(d) : Wo(d); | ||
G.applyAction(K); | ||
}, w = I(b, ({ element: d }, K) => { | ||
if (!d || ut(d) || O(h).interactive === !1 || O(f).position === "SCREEN") | ||
return St; | ||
const at = d.ownerDocument.defaultView; | ||
return Wo(at, "click", (rt) => { | ||
H(rt), !(rt.target === document.body || !Ue(rt.target) || !Ie(rt.target) || Me(rt.target) || !d.contains(rt.target)) && q(); | ||
return jo(at, "click", (rt) => { | ||
K(rt), !(rt.target === document.body || !Ue(rt.target) || !Ie(rt.target) || Me(rt.target) || !d.contains(rt.target)) && lt(); | ||
}); | ||
}).subscribe(Ot); | ||
}).subscribe(St); | ||
co(() => { | ||
_.set(y); | ||
m.set(_); | ||
}), Ne(() => { | ||
_.set(void 0), h(); | ||
m.set(void 0), w(); | ||
}); | ||
function tt(d) { | ||
je[d ? "unshift" : "push"](() => { | ||
y = d, e(1, y); | ||
_ = d, e(1, _); | ||
}); | ||
} | ||
return o.$$set = (d) => { | ||
"position" in d && e(0, w = d.position); | ||
"position" in d && e(0, g = d.position); | ||
}, [ | ||
w, | ||
y, | ||
g, | ||
_, | ||
r, | ||
@@ -927,24 +927,24 @@ n, | ||
$, | ||
x, | ||
L, | ||
E, | ||
K, | ||
F, | ||
C, | ||
B, | ||
A, | ||
U, | ||
J, | ||
Q, | ||
q, | ||
lt, | ||
ft, | ||
z, | ||
X, | ||
q, | ||
yt, | ||
ht, | ||
tt | ||
]; | ||
} | ||
class ar extends St { | ||
class ir extends Pt { | ||
constructor(t) { | ||
super(), Pt(this, t, ir, nr, Et, { position: 0 }, sr, [-1, -1]); | ||
super(), At(this, t, nr, sr, Et, { position: 0 }, rr, [-1, -1]); | ||
} | ||
} | ||
async function lr(o, t) { | ||
async function ar(o, t) { | ||
o.length !== 0 && await Promise.all( | ||
o.map(({ el: e, top: r, left: n }) => e.scrollTop == r && e.scrollLeft == n ? Promise.resolve() : new Promise((s) => { | ||
const i = Math.max(Math.abs(r - e.scrollTop), Math.abs(n - e.scrollLeft)), l = Tt( | ||
const i = Math.max(Math.abs(r - e.scrollTop), Math.abs(n - e.scrollLeft)), l = Ot( | ||
{ | ||
@@ -957,6 +957,6 @@ x: e.scrollLeft, | ||
// 300ms maximum | ||
easing: kt | ||
easing: Tt | ||
} | ||
), a = l.subscribe(({ x: w, y }) => { | ||
e.scrollLeft = w, e.scrollTop = y, w === n && y === r && c(); | ||
), a = l.subscribe(({ x: g, y: _ }) => { | ||
e.scrollLeft = g, e.scrollTop = _, g === n && _ === r && c(); | ||
}); | ||
@@ -973,6 +973,6 @@ function c() { | ||
} | ||
function cr(o, t, e, r, n) { | ||
function lr(o, t, e, r, n) { | ||
const s = e.transform$ ?? eo; | ||
let i; | ||
const l = j(r.popover, "position"), a = dt(void 0), c = rr(e, r), w = wo(e.window); | ||
const l = j(r.popover, "position"), a = wt(void 0), c = or(e, r); | ||
return { | ||
@@ -982,75 +982,89 @@ elementBounding$: I( | ||
([ | ||
u, | ||
_, | ||
f | ||
h, | ||
m | ||
/* position */ | ||
], g) => { | ||
const { element: v, step: b } = u; | ||
if (!v || !b) | ||
return Ot; | ||
const $ = new AbortController(); | ||
return P().then((x) => { | ||
const L = x.subscribe((E) => { | ||
g(E), i = E; | ||
const K = c(u, E, _, f); | ||
K && a.set(K); | ||
], u) => { | ||
const { element: f, step: y } = _; | ||
if (!f || !y) | ||
return St; | ||
const b = new AbortController(); | ||
return $().then((k) => { | ||
const C = k.subscribe((B) => { | ||
u(B), i = B; | ||
const A = c(_, B, h, m); | ||
A && a.set(A); | ||
}); | ||
Ut($, L); | ||
Ut(b, C); | ||
}), () => { | ||
$.abort(); | ||
b.abort(); | ||
}; | ||
async function P() { | ||
let x = [], L = []; | ||
const E = !v || ft(v) ? [] : b != null && b.onlyHighlightChildren ? ( | ||
async function $() { | ||
let k = [], C = []; | ||
const B = !f || ut(f) ? [] : y != null && y.onlyHighlightChildren ? ( | ||
// eslint-disable-next-line unicorn/prefer-spread | ||
Array.from(v.children) | ||
) : [v], { highlight: K, popover: B } = r, N = S(K), O = S(B), p = ro(O.position), C = p[0], J = p[1], [m, V] = qe(N, f), Q = () => yo(bo($o(E), L), f); | ||
if (v && !ft(v)) { | ||
[x, L] = go(v, !0, w); | ||
const Y = et(), F = _o(x, L, v, Y); | ||
await lr(F, $); | ||
Array.from(f.children) | ||
) : [f], { highlight: A, popover: U } = r, L = O(A), E = O(U), S = ro(E.position), p = S[0], P = S[1], [et, v] = qe(L, m), H = () => yo(bo($o(B), C), m); | ||
if (f && !ut(f)) { | ||
[k, C] = wo(f, !0, go(e.window)); | ||
const R = ot(), V = _o(k, C, f, R); | ||
await ar(V, b); | ||
} | ||
return Be(i, (Y) => { | ||
if (!v) | ||
return Be(i, (R) => { | ||
if (!f) | ||
return; | ||
let F; | ||
const z = vo(() => { | ||
if ($.signal.aborted) | ||
let V; | ||
const J = vo(() => { | ||
if (b.signal.aborted) | ||
return; | ||
if (ft(v)) { | ||
F = void 0, Y(Kt); | ||
if (ut(f)) { | ||
V = void 0, R(Kt); | ||
return; | ||
} | ||
const X = Q(), q = X.width === 0 || X.height === 0; | ||
F && X.width === F.width && X.height === F.height && (q || X.x === F.x && X.y === F.y) || (F = X, Y(q ? Kt : X)); | ||
}), ot = [ | ||
mo(E, L, z), | ||
n.subscribe(z) | ||
const G = H(), q = G.width === 0 || G.height === 0; | ||
V && G.width === V.width && G.height === V.height && (q || G.x === V.x && G.y === V.y) || (V = G, R(q ? Kt : G)); | ||
}), Q = [ | ||
mo(B, C, J), | ||
n.subscribe(J) | ||
]; | ||
z(), Ut($, () => { | ||
Xe(ot); | ||
J(), Ut(b, () => { | ||
Xe(Q); | ||
}); | ||
}); | ||
function et() { | ||
const Y = (b == null ? void 0 : b.scrollOffset) || {}, F = oo( | ||
C, | ||
Q(), | ||
_, | ||
m, | ||
V, | ||
Lt(e) | ||
), z = F ? "if-needed" : "always", ot = F ? le[F] : le[C], X = J ? J.toLocaleLowerCase() : "nearest", { padding: q, borderWidth: yt } = N, ht = (O.offset < 10 ? 10 : O.offset) + yt, h = { | ||
left: ht + (Y.left || 0), | ||
right: ht + (Y.right || 0), | ||
top: ht + (Y.top || 0), | ||
bottom: ht + (Y.bottom || 0) | ||
function ot() { | ||
const R = (y == null ? void 0 : y.scrollOffset) || {}, V = oo( | ||
p, | ||
H(), | ||
h, | ||
et, | ||
v, | ||
Bt(e) | ||
), J = V ? "if-needed" : "always", Q = V ? le[V] : le[p], G = P ? P.toLocaleLowerCase() : "nearest", { padding: q, borderWidth: lt } = L, ft = (E.offset < 10 ? 10 : E.offset) + lt, z = { | ||
left: ft + (R.left || 0), | ||
right: ft + (R.right || 0), | ||
top: ft + (R.top || 0), | ||
bottom: ft + (R.bottom || 0) | ||
}; | ||
let tt = "nearest", d = "nearest"; | ||
C && C !== "OVER" && (So.includes(C) ? (tt = ot, d = X, h[C.toLowerCase()] += (_ == null ? void 0 : _.height) || 0) : (tt = X, d = ot, h[C.toLowerCase()] += (_ == null ? void 0 : _.width) || 0)); | ||
const H = Le(f); | ||
return h.left = ne(h.left, 0, H) + q, h.right = ne(h.right, 0, H) + q, h.top = ie(0, h.top, H) + q, h.bottom = ie(0, h.bottom, H) + q, { | ||
scrollMode: z, | ||
block: tt, | ||
inline: d, | ||
offset: h | ||
let w = "nearest", tt = "nearest"; | ||
switch (p) { | ||
case "AUTO": | ||
case "TOP": | ||
case "BOTTOM": { | ||
w = Q, tt = G; | ||
const K = p === "AUTO" ? "bottom" : p.toLowerCase(); | ||
z[K] += (h == null ? void 0 : h.height) || 0; | ||
break; | ||
} | ||
case "LEFT": | ||
case "RIGHT": { | ||
w = G, tt = Q, z[p.toLowerCase()] += (h == null ? void 0 : h.width) || 0; | ||
break; | ||
} | ||
} | ||
const d = Le(m); | ||
return z.left = ne(z.left, 0, d) + q, z.right = ne(z.right, 0, d) + q, z.top = ie(0, z.top, d) + q, z.bottom = ie(0, z.bottom, d) + q, { | ||
scrollMode: J, | ||
block: w, | ||
inline: tt, | ||
offset: z | ||
}; | ||
@@ -1064,3 +1078,3 @@ } | ||
} | ||
const pr = (o, t) => { | ||
const cr = (o, t) => { | ||
let e; | ||
@@ -1071,3 +1085,3 @@ const { activeStep$: r, activeIndex$: n } = o; | ||
(s, i) => { | ||
const l = S(n); | ||
const l = O(n); | ||
if (!s || !Dt(l)) | ||
@@ -1097,6 +1111,6 @@ return; | ||
); | ||
}, hr = (o) => I(o, (t, e) => t ? xo(t, () => { | ||
}, pr = (o) => I(o, (t, e) => t ? xo(t, () => { | ||
e(t.getBoundingClientRect()); | ||
}) : (e(Co), Ot)); | ||
class fr extends Ro { | ||
}) : (e(Co), St)); | ||
class hr extends Do { | ||
constructor(e, r, n, s) { | ||
@@ -1107,3 +1121,3 @@ super(e); | ||
nt(this, "delegate"); | ||
nt(this, "updatePositionSignal$", dt(0)); | ||
nt(this, "updatePositionSignal$", wt(0)); | ||
nt(this, "renderState$"); | ||
@@ -1115,3 +1129,3 @@ nt(this, "onPrev", () => { | ||
var r, n; | ||
const e = S(Qe(this.store, this.store.effectiveIndex$)); | ||
const e = O(Qe(this.store, this.store.effectiveIndex$)); | ||
if (e) { | ||
@@ -1134,16 +1148,16 @@ const s = (r = this.getActiveStep().step) == null ? void 0 : r.id; | ||
this.delegate = r; | ||
const i = Ke(r), l = [], a = pr(e, r); | ||
const i = Ke(r), l = [], a = cr(e, r); | ||
this.renderState$ = a; | ||
const c = j(a, "step"), w = ur(s, c), y = { | ||
popover: w("popover", Po), | ||
highlight: w("highlight", Eo), | ||
theme: I(w("theme", {}), Uo) | ||
}, u = dt(void 0), _ = hr(u), { elementBounding$: f, placement$: g } = cr( | ||
const c = j(a, "step"), g = fr(s, c), _ = { | ||
popover: g("popover", So), | ||
highlight: g("highlight", Po), | ||
theme: I(g("theme", {}), Xo) | ||
}, h = wt(void 0), m = pr(h), { elementBounding$: u, placement$: f } = lr( | ||
a, | ||
m, | ||
r, | ||
_, | ||
r, | ||
y, | ||
this.updatePositionSignal$ | ||
), v = r.getTotalCount(e), b = Ye(n); | ||
b.set(Mt, this).set(Ho, f).set(zt, s).set(Zt, u).set(Ge, _).set(Jt, v).set(te, r).set(ee, a).set(Wt, y).set(Qt, g), this.subscriptions = l, this.view = new ar({ | ||
), y = r.getTotalCount(e), b = Ye(n); | ||
b.set(Lt, this).set(Ho, u).set(zt, s).set(Zt, h).set(Ge, m).set(Jt, y).set(te, r).set(ee, a).set(Wt, _).set(Qt, f), this.subscriptions = l, this.view = new ir({ | ||
target: i, | ||
@@ -1176,4 +1190,4 @@ context: b, | ||
getCurrentElement() { | ||
const { element: e } = S(this.renderState$); | ||
return ft(e) ? void 0 : e; | ||
const { element: e } = O(this.renderState$); | ||
return ut(e) ? void 0 : e; | ||
} | ||
@@ -1185,16 +1199,16 @@ dispose() { | ||
} | ||
function ur(o, t) { | ||
function fr(o, t) { | ||
return (e, r) => { | ||
const n = j(o, e), s = j(t, e); | ||
return I([n, s], (i) => Ko(r, ...i)); | ||
return I([n, s], (i) => Go(r, ...i)); | ||
}; | ||
} | ||
function ur(o) { | ||
Rt(o, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}"); | ||
} | ||
function dr(o) { | ||
Ft(o, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}"); | ||
} | ||
function wr(o) { | ||
let t, e; | ||
return { | ||
c() { | ||
t = Z("div"), e = Nt( | ||
t = Z("div"), e = It( | ||
/*$progress$*/ | ||
@@ -1205,7 +1219,7 @@ o[0] | ||
m(r, n) { | ||
D(r, t, n), U(t, e); | ||
D(r, t, n), X(t, e); | ||
}, | ||
p(r, [n]) { | ||
n & /*$progress$*/ | ||
1 && It( | ||
1 && Mt( | ||
e, | ||
@@ -1216,25 +1230,25 @@ /*$progress$*/ | ||
}, | ||
i: wt, | ||
o: wt, | ||
i: _t, | ||
o: _t, | ||
d(r) { | ||
r && R(t); | ||
r && F(t); | ||
} | ||
}; | ||
} | ||
function gr(o, t, e) { | ||
function wr(o, t, e) { | ||
let r; | ||
const n = W(Jt), s = Vo(), i = I([s, n], ([l, a]) => a > 1 ? `${l + 1}/${a}` : ""); | ||
return A(o, i, (l) => e(0, r = l)), [r, i]; | ||
const n = W(Jt), s = Bo(), i = I([s, n], ([l, a]) => a > 1 ? `${l + 1}/${a}` : ""); | ||
return N(o, i, (l) => e(0, r = l)), [r, i]; | ||
} | ||
class so extends St { | ||
class so extends Pt { | ||
constructor(t) { | ||
super(), Pt(this, t, gr, wr, Et, {}, dr); | ||
super(), At(this, t, wr, dr, Et, {}, ur); | ||
} | ||
} | ||
function _r(o) { | ||
Ft(o, "svelte-yaniy4", "@keyframes reduction{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}.thisway-stretch{margin:auto}.thisway-popover{animation:reduction 200ms linear;display:flex;flex-direction:column;padding:16px;max-width:280px;min-width:280px;border-radius:10px;overflow:visible;background-color:var(--thisway-color-primary);color:var(--thisway-color-text);position:relative;box-shadow:var(--thisway-default-shadow);box-sizing:border-box}.thisway-popover.thisway-popover__mode-1 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text)}.thisway-popover.thisway-popover__mode-1 .thisway-progress{margin-right:auto}.thisway-popover.thisway-popover__mode-2 .thisway-popover-title{order:2}.thisway-popover.thisway-popover__mode-2 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);order:3}.thisway-popover.thisway-popover__mode-2 .thisway-popover-footer{order:4;justify-content:flex-end}.thisway-popover.thisway-popover__mode-2 .thisway-popover-close{top:14px;right:14px}.thisway-popover.thisway-popover__mode-2 .thisway-progress{font-size:20px;order:1}.thisway-popover.thisway-popover__mode-3{padding-top:0;background:linear-gradient(to bottom, var(--thisway-color-primary) 40px, var(--thisway-color-text) 40px)}.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-end,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3 .thisway-popover-title{line-height:40px;height:40px;font-size:18px;order:1;background-color:var(--thisway-color-primary)}.thisway-popover.thisway-popover__mode-3 .thisway-popover-description{color:#333333;order:3}.thisway-popover.thisway-popover__mode-3 .thisway-popover-footer{order:4}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary);flex:0 0 30px;height:30px;border-radius:50%;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev svg{display:inline-block;margin:4px 0 0;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-next{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text);max-width:210px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.thisway-popover.thisway-popover__mode-3 .thisway-popover-close{top:8px;right:10px}.thisway-popover.thisway-popover__mode-3 .thisway-progress{color:#999;margin:10px 0 5px;order:2}.thisway-popover-title{font-size:18px;font-style:normal;font-weight:500;line-height:24px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}@supports (-webkit-line-clamp: 2){.thisway-popover-title{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.thisway-popover-description{margin-top:5px;margin-bottom:0;white-space:pre-line;font-size:14px;line-height:20px;font-style:normal;word-wrap:break-word}.thisway-popover-description a{text-decoration:underline}.thisway-popover-footer{margin-top:10px;display:flex;align-items:center}.thisway-popover-footer button{text-decoration:none;cursor:pointer;outline:0;height:30px;border-radius:50px;padding:0 18px;font-size:13px;line-height:20px}.thisway-popover-footer button:not(:last-child){margin-right:10px}.thisway-popover-top .thisway-popover__arrow{bottom:0;transform:translate(-50%, 50%) rotate(45deg)}.thisway-popover-bottom .thisway-popover__arrow{top:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover-left .thisway-popover__arrow{right:0;transform:translate(50%, -50%) rotate(45deg)}.thisway-popover-right .thisway-popover__arrow{left:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover__arrow{position:absolute;width:10px;height:10px;display:block;background-color:var(--thisway-color-primary)}.thisway-popover-right .thisway-popover__arrow-start,.thisway-popover-left .thisway-popover__arrow-start{top:20px}.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover-left .thisway-popover__arrow-center{top:50%}.thisway-popover-right .thisway-popover__arrow-end,.thisway-popover-left .thisway-popover__arrow-end{bottom:10px}.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover-bottom .thisway-popover__arrow-start{left:20px}.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover-bottom .thisway-popover__arrow-center{left:50%}.thisway-popover-top .thisway-popover__arrow-end,.thisway-popover-bottom .thisway-popover__arrow-end{right:10px}.thisway-popover-screen .thisway-popover__arrow,.thisway-popover-over .thisway-popover__arrow{display:none}.thisway-popover-prev{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text)}.thisway-popover-next{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary)}.thisway-popover-close{width:24px;height:24px;position:absolute;opacity:0.8;display:flex;align-items:center;justify-content:center;padding:0;border:none;color:var(--thisway-color-text);background-color:transparent;top:8px;right:8px;z-index:1}.thisway-popover-close:hover{opacity:1;border:none}"); | ||
function gr(o) { | ||
Rt(o, "svelte-yaniy4", "@keyframes reduction{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}.thisway-stretch{margin:auto}.thisway-popover{animation:reduction 200ms linear;display:flex;flex-direction:column;padding:16px;max-width:280px;min-width:280px;border-radius:10px;overflow:visible;background-color:var(--thisway-color-primary);color:var(--thisway-color-text);position:relative;box-shadow:var(--thisway-default-shadow);box-sizing:border-box}.thisway-popover.thisway-popover__mode-1 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text)}.thisway-popover.thisway-popover__mode-1 .thisway-progress{margin-right:auto}.thisway-popover.thisway-popover__mode-2 .thisway-popover-title{order:2}.thisway-popover.thisway-popover__mode-2 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);order:3}.thisway-popover.thisway-popover__mode-2 .thisway-popover-footer{order:4;justify-content:flex-end}.thisway-popover.thisway-popover__mode-2 .thisway-popover-close{top:14px;right:14px}.thisway-popover.thisway-popover__mode-2 .thisway-progress{font-size:20px;order:1}.thisway-popover.thisway-popover__mode-3{padding-top:0;background:linear-gradient(to bottom, var(--thisway-color-primary) 40px, var(--thisway-color-text) 40px)}.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-end,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3 .thisway-popover-title{line-height:40px;height:40px;font-size:18px;order:1;background-color:var(--thisway-color-primary)}.thisway-popover.thisway-popover__mode-3 .thisway-popover-description{color:#333333;order:3}.thisway-popover.thisway-popover__mode-3 .thisway-popover-footer{order:4}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary);flex:0 0 30px;height:30px;border-radius:50%;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev svg{display:inline-block;margin:4px 0 0;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-next{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text);max-width:210px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.thisway-popover.thisway-popover__mode-3 .thisway-popover-close{top:8px;right:10px}.thisway-popover.thisway-popover__mode-3 .thisway-progress{color:#999;margin:10px 0 5px;order:2}.thisway-popover-title{font-size:18px;font-style:normal;font-weight:500;line-height:24px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}@supports (-webkit-line-clamp: 2){.thisway-popover-title{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.thisway-popover-description{margin-top:5px;margin-bottom:0;white-space:pre-line;font-size:14px;line-height:20px;font-style:normal;word-wrap:break-word}.thisway-popover-description a{text-decoration:underline}.thisway-popover-footer{margin-top:10px;display:flex;align-items:center}.thisway-popover-footer button{text-decoration:none;cursor:pointer;outline:0;height:30px;border-radius:50px;padding:0 18px;font-size:13px;line-height:20px}.thisway-popover-footer button:not(:last-child){margin-right:10px}.thisway-popover-top .thisway-popover__arrow{bottom:0;transform:translate(-50%, 50%) rotate(45deg)}.thisway-popover-bottom .thisway-popover__arrow{top:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover-left .thisway-popover__arrow{right:0;transform:translate(50%, -50%) rotate(45deg)}.thisway-popover-right .thisway-popover__arrow{left:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover__arrow{position:absolute;width:10px;height:10px;display:block;background-color:var(--thisway-color-primary)}.thisway-popover-right .thisway-popover__arrow-start,.thisway-popover-left .thisway-popover__arrow-start{top:20px}.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover-left .thisway-popover__arrow-center{top:50%}.thisway-popover-right .thisway-popover__arrow-end,.thisway-popover-left .thisway-popover__arrow-end{bottom:10px}.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover-bottom .thisway-popover__arrow-start{left:20px}.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover-bottom .thisway-popover__arrow-center{left:50%}.thisway-popover-top .thisway-popover__arrow-end,.thisway-popover-bottom .thisway-popover__arrow-end{right:10px}.thisway-popover-screen .thisway-popover__arrow,.thisway-popover-over .thisway-popover__arrow{display:none}.thisway-popover-prev{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text)}.thisway-popover-next{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary)}.thisway-popover-close{width:24px;height:24px;position:absolute;opacity:0.8;display:flex;align-items:center;justify-content:center;padding:0;border:none;color:var(--thisway-color-text);background-color:transparent;top:8px;right:8px;z-index:1}.thisway-popover-close:hover{opacity:1;border:none}"); | ||
} | ||
const vr = (o) => ({}), _e = (o) => ({}), mr = (o) => ({}), ve = (o) => ({}), yr = (o) => ({}), me = (o) => ({}), br = (o) => ({}), ye = (o) => ({}), $r = (o) => ({}), be = (o) => ({}); | ||
const _r = (o) => ({}), _e = (o) => ({}), vr = (o) => ({}), ve = (o) => ({}), mr = (o) => ({}), me = (o) => ({}), yr = (o) => ({}), ye = (o) => ({}), br = (o) => ({}), be = (o) => ({}); | ||
function $e(o) { | ||
let t, e, r, n, s, i, l, a, c, w, y, u, _, f, g, v, b = ( | ||
let t, e, r, n, s, i, l, a, c, g, _, h, m, u, f, y, b = ( | ||
/*$showCloseButton$*/ | ||
@@ -1246,16 +1260,16 @@ o[6] && Ce(o) | ||
o[1]) && xe(o) | ||
), P = ( | ||
), k = ( | ||
/*$$slots*/ | ||
(o[28].description || /*$description$*/ | ||
o[2]) && ke(o) | ||
), x = ( | ||
), C = ( | ||
/*$layout$*/ | ||
o[4] !== bt && /*$showProgress$*/ | ||
o[4] !== $t && /*$showProgress$*/ | ||
o[7] && Te() | ||
); | ||
const L = ( | ||
const B = ( | ||
/*#slots*/ | ||
o[30].default | ||
), E = gt( | ||
L, | ||
), A = vt( | ||
B, | ||
o, | ||
@@ -1265,7 +1279,7 @@ /*$$scope*/ | ||
null | ||
), K = ( | ||
), U = ( | ||
/*#slots*/ | ||
o[30].footer | ||
), B = gt( | ||
K, | ||
), L = vt( | ||
U, | ||
o, | ||
@@ -1276,7 +1290,7 @@ /*$$scope*/ | ||
); | ||
let N = ( | ||
let E = ( | ||
/*$layout$*/ | ||
o[4] === bt && /*$showProgress$*/ | ||
o[4] === $t && /*$showProgress$*/ | ||
o[7] && Oe() | ||
), O = ( | ||
), S = ( | ||
/*$showCtrlBtns$*/ | ||
@@ -1287,4 +1301,4 @@ o[8] && Se(o) | ||
c() { | ||
t = Z("div"), e = Z("div"), n = st(), b && b.c(), s = st(), $ && $.c(), i = st(), P && P.c(), l = st(), x && x.c(), a = st(), E && E.c(), c = st(), w = Z("div"), B && B.c(), y = st(), N && N.c(), u = st(), _ = Z("div"), f = st(), O && O.c(), T(e, "class", r = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
o[5]), T(_, "class", "thisway-stretch"), T(w, "class", "thisway-popover-footer"), T(t, "class", g = "thisway-popover " + /*$popoverClass$*/ | ||
t = Z("div"), e = Z("div"), n = st(), b && b.c(), s = st(), $ && $.c(), i = st(), k && k.c(), l = st(), C && C.c(), a = st(), A && A.c(), c = st(), g = Z("div"), L && L.c(), _ = st(), E && E.c(), h = st(), m = Z("div"), u = st(), S && S.c(), T(e, "class", r = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
o[5]), T(m, "class", "thisway-stretch"), T(g, "class", "thisway-popover-footer"), T(t, "class", f = "thisway-popover " + /*$popoverClass$*/ | ||
o[3] + " thisway-popover__" + /*$layout$*/ | ||
@@ -1294,38 +1308,38 @@ o[4] + " " + /*cssClassName*/ | ||
}, | ||
m(p, C) { | ||
D(p, t, C), U(t, e), U(t, n), b && b.m(t, null), U(t, s), $ && $.m(t, null), U(t, i), P && P.m(t, null), U(t, l), x && x.m(t, null), U(t, a), E && E.m(t, null), U(t, c), U(t, w), B && B.m(w, null), U(w, y), N && N.m(w, null), U(w, u), U(w, _), U(w, f), O && O.m(w, null), v = !0; | ||
m(p, P) { | ||
D(p, t, P), X(t, e), X(t, n), b && b.m(t, null), X(t, s), $ && $.m(t, null), X(t, i), k && k.m(t, null), X(t, l), C && C.m(t, null), X(t, a), A && A.m(t, null), X(t, c), X(t, g), L && L.m(g, null), X(g, _), E && E.m(g, null), X(g, h), X(g, m), X(g, u), S && S.m(g, null), y = !0; | ||
}, | ||
p(p, C) { | ||
(!v || C[0] & /*$arrowClass$*/ | ||
p(p, P) { | ||
(!y || P[0] & /*$arrowClass$*/ | ||
32 && r !== (r = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
p[5])) && T(e, "class", r), /*$showCloseButton$*/ | ||
p[6] ? b ? b.p(p, C) : (b = Ce(p), b.c(), b.m(t, s)) : b && (b.d(1), b = null), /*$$slots*/ | ||
p[6] ? b ? b.p(p, P) : (b = Ce(p), b.c(), b.m(t, s)) : b && (b.d(1), b = null), /*$$slots*/ | ||
p[28].title || /*$title$*/ | ||
p[1] ? $ ? ($.p(p, C), C[0] & /*$$slots, $title$*/ | ||
268435458 && k($, 1)) : ($ = xe(p), $.c(), k($, 1), $.m(t, i)) : $ && (ct(), M($, 1, 1, () => { | ||
p[1] ? $ ? ($.p(p, P), P[0] & /*$$slots, $title$*/ | ||
268435458 && x($, 1)) : ($ = xe(p), $.c(), x($, 1), $.m(t, i)) : $ && (pt(), M($, 1, 1, () => { | ||
$ = null; | ||
}), pt()), /*$$slots*/ | ||
}), ht()), /*$$slots*/ | ||
p[28].description || /*$description$*/ | ||
p[2] ? P ? (P.p(p, C), C[0] & /*$$slots, $description$*/ | ||
268435460 && k(P, 1)) : (P = ke(p), P.c(), k(P, 1), P.m(t, l)) : P && (ct(), M(P, 1, 1, () => { | ||
P = null; | ||
}), pt()), /*$layout$*/ | ||
p[4] !== bt && /*$showProgress$*/ | ||
p[7] ? x ? C[0] & /*$layout$, $showProgress$*/ | ||
144 && k(x, 1) : (x = Te(), x.c(), k(x, 1), x.m(t, a)) : x && (ct(), M(x, 1, 1, () => { | ||
x = null; | ||
}), pt()), E && E.p && (!v || C[0] & /*$$scope*/ | ||
536870912) && _t( | ||
E, | ||
L, | ||
p[2] ? k ? (k.p(p, P), P[0] & /*$$slots, $description$*/ | ||
268435460 && x(k, 1)) : (k = ke(p), k.c(), x(k, 1), k.m(t, l)) : k && (pt(), M(k, 1, 1, () => { | ||
k = null; | ||
}), ht()), /*$layout$*/ | ||
p[4] !== $t && /*$showProgress$*/ | ||
p[7] ? C ? P[0] & /*$layout$, $showProgress$*/ | ||
144 && x(C, 1) : (C = Te(), C.c(), x(C, 1), C.m(t, a)) : C && (pt(), M(C, 1, 1, () => { | ||
C = null; | ||
}), ht()), A && A.p && (!y || P[0] & /*$$scope*/ | ||
536870912) && mt( | ||
A, | ||
B, | ||
p, | ||
/*$$scope*/ | ||
p[29], | ||
v ? mt( | ||
L, | ||
y ? bt( | ||
B, | ||
/*$$scope*/ | ||
p[29], | ||
C, | ||
P, | ||
null | ||
) : vt( | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1335,16 +1349,16 @@ p[29] | ||
null | ||
), B && B.p && (!v || C[0] & /*$$scope*/ | ||
536870912) && _t( | ||
B, | ||
K, | ||
), L && L.p && (!y || P[0] & /*$$scope*/ | ||
536870912) && mt( | ||
L, | ||
U, | ||
p, | ||
/*$$scope*/ | ||
p[29], | ||
v ? mt( | ||
K, | ||
y ? bt( | ||
U, | ||
/*$$scope*/ | ||
p[29], | ||
C, | ||
yr | ||
) : vt( | ||
P, | ||
mr | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1355,24 +1369,24 @@ p[29] | ||
), /*$layout$*/ | ||
p[4] === bt && /*$showProgress$*/ | ||
p[7] ? N ? C[0] & /*$layout$, $showProgress$*/ | ||
144 && k(N, 1) : (N = Oe(), N.c(), k(N, 1), N.m(w, u)) : N && (ct(), M(N, 1, 1, () => { | ||
N = null; | ||
}), pt()), /*$showCtrlBtns$*/ | ||
p[8] ? O ? (O.p(p, C), C[0] & /*$showCtrlBtns$*/ | ||
256 && k(O, 1)) : (O = Se(p), O.c(), k(O, 1), O.m(w, null)) : O && (ct(), M(O, 1, 1, () => { | ||
O = null; | ||
}), pt()), (!v || C[0] & /*$popoverClass$, $layout$, cssClassName*/ | ||
25 && g !== (g = "thisway-popover " + /*$popoverClass$*/ | ||
p[4] === $t && /*$showProgress$*/ | ||
p[7] ? E ? P[0] & /*$layout$, $showProgress$*/ | ||
144 && x(E, 1) : (E = Oe(), E.c(), x(E, 1), E.m(g, h)) : E && (pt(), M(E, 1, 1, () => { | ||
E = null; | ||
}), ht()), /*$showCtrlBtns$*/ | ||
p[8] ? S ? (S.p(p, P), P[0] & /*$showCtrlBtns$*/ | ||
256 && x(S, 1)) : (S = Se(p), S.c(), x(S, 1), S.m(g, null)) : S && (pt(), M(S, 1, 1, () => { | ||
S = null; | ||
}), ht()), (!y || P[0] & /*$popoverClass$, $layout$, cssClassName*/ | ||
25 && f !== (f = "thisway-popover " + /*$popoverClass$*/ | ||
p[3] + " thisway-popover__" + /*$layout$*/ | ||
p[4] + " " + /*cssClassName*/ | ||
p[0])) && T(t, "class", g); | ||
p[0])) && T(t, "class", f); | ||
}, | ||
i(p) { | ||
v || (k($), k(P), k(x), k(E, p), k(B, p), k(N), k(O), v = !0); | ||
y || (x($), x(k), x(C), x(A, p), x(L, p), x(E), x(S), y = !0); | ||
}, | ||
o(p) { | ||
M($), M(P), M(x), M(E, p), M(B, p), M(N), M(O), v = !1; | ||
M($), M(k), M(C), M(A, p), M(L, p), M(E), M(S), y = !1; | ||
}, | ||
d(p) { | ||
p && R(t), b && b.d(), $ && $.d(), P && P.d(), x && x.d(), E && E.d(p), B && B.d(p), N && N.d(), O && O.d(); | ||
p && F(t), b && b.d(), $ && $.d(), k && k.d(), C && C.d(), A && A.d(p), L && L.d(p), E && E.d(), S && S.d(); | ||
} | ||
@@ -1388,3 +1402,3 @@ }; | ||
m(n, s) { | ||
D(n, t, s), e || (r = At( | ||
D(n, t, s), e || (r = Nt( | ||
t, | ||
@@ -1396,5 +1410,5 @@ "click", | ||
}, | ||
p: wt, | ||
p: _t, | ||
d(n) { | ||
n && R(t), e = !1, r(); | ||
n && F(t), e = !1, r(); | ||
} | ||
@@ -1408,3 +1422,3 @@ }; | ||
o[30].title | ||
), n = gt( | ||
), n = vt( | ||
r, | ||
@@ -1415,3 +1429,3 @@ o, | ||
be | ||
), s = n || Cr(o); | ||
), s = n || $r(o); | ||
return { | ||
@@ -1426,3 +1440,3 @@ c() { | ||
n ? n.p && (!e || l[0] & /*$$scope*/ | ||
536870912) && _t( | ||
536870912) && mt( | ||
n, | ||
@@ -1433,3 +1447,3 @@ r, | ||
i[29], | ||
e ? mt( | ||
e ? bt( | ||
r, | ||
@@ -1439,4 +1453,4 @@ /*$$scope*/ | ||
l, | ||
$r | ||
) : vt( | ||
br | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1450,3 +1464,3 @@ i[29] | ||
i(i) { | ||
e || (k(s, i), e = !0); | ||
e || (x(s, i), e = !0); | ||
}, | ||
@@ -1457,11 +1471,11 @@ o(i) { | ||
d(i) { | ||
i && R(t), s && s.d(i); | ||
i && F(t), s && s.d(i); | ||
} | ||
}; | ||
} | ||
function Cr(o) { | ||
function $r(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = Nt( | ||
t = It( | ||
/*$title$*/ | ||
@@ -1476,3 +1490,3 @@ o[1] | ||
r[0] & /*$title$*/ | ||
2 && It( | ||
2 && Mt( | ||
t, | ||
@@ -1484,3 +1498,3 @@ /*$title$*/ | ||
d(e) { | ||
e && R(t); | ||
e && F(t); | ||
} | ||
@@ -1494,3 +1508,3 @@ }; | ||
o[30].description | ||
), n = gt( | ||
), n = vt( | ||
r, | ||
@@ -1501,3 +1515,3 @@ o, | ||
ye | ||
), s = n || xr(o); | ||
), s = n || Cr(o); | ||
return { | ||
@@ -1512,3 +1526,3 @@ c() { | ||
n ? n.p && (!e || l[0] & /*$$scope*/ | ||
536870912) && _t( | ||
536870912) && mt( | ||
n, | ||
@@ -1519,3 +1533,3 @@ r, | ||
i[29], | ||
e ? mt( | ||
e ? bt( | ||
r, | ||
@@ -1525,4 +1539,4 @@ /*$$scope*/ | ||
l, | ||
br | ||
) : vt( | ||
yr | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1536,3 +1550,3 @@ i[29] | ||
i(i) { | ||
e || (k(s, i), e = !0); | ||
e || (x(s, i), e = !0); | ||
}, | ||
@@ -1543,11 +1557,11 @@ o(i) { | ||
d(i) { | ||
i && R(t), s && s.d(i); | ||
i && F(t), s && s.d(i); | ||
} | ||
}; | ||
} | ||
function xr(o) { | ||
function Cr(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = Nt( | ||
t = It( | ||
/*$description$*/ | ||
@@ -1562,3 +1576,3 @@ o[2] | ||
r[0] & /*$description$*/ | ||
4 && It( | ||
4 && Mt( | ||
t, | ||
@@ -1570,3 +1584,3 @@ /*$description$*/ | ||
d(e) { | ||
e && R(t); | ||
e && F(t); | ||
} | ||
@@ -1579,9 +1593,9 @@ }; | ||
c() { | ||
$t(t.$$.fragment); | ||
Ct(t.$$.fragment); | ||
}, | ||
m(r, n) { | ||
Ct(t, r, n), e = !0; | ||
xt(t, r, n), e = !0; | ||
}, | ||
i(r) { | ||
e || (k(t.$$.fragment, r), e = !0); | ||
e || (x(t.$$.fragment, r), e = !0); | ||
}, | ||
@@ -1592,3 +1606,3 @@ o(r) { | ||
d(r) { | ||
xt(t, r); | ||
kt(t, r); | ||
} | ||
@@ -1601,9 +1615,9 @@ }; | ||
c() { | ||
$t(t.$$.fragment); | ||
Ct(t.$$.fragment); | ||
}, | ||
m(r, n) { | ||
Ct(t, r, n), e = !0; | ||
xt(t, r, n), e = !0; | ||
}, | ||
i(r) { | ||
e || (k(t.$$.fragment, r), e = !0); | ||
e || (x(t.$$.fragment, r), e = !0); | ||
}, | ||
@@ -1614,3 +1628,3 @@ o(r) { | ||
d(r) { | ||
xt(t, r); | ||
kt(t, r); | ||
} | ||
@@ -1625,3 +1639,3 @@ }; | ||
/*$hasSteps$*/ | ||
o[11] && Ee(o) | ||
o[11] && Ae(o) | ||
); | ||
@@ -1638,12 +1652,12 @@ return { | ||
i[9] ? n ? (n.p(i, l), l[0] & /*$previousButtonVisible$*/ | ||
512 && k(n, 1)) : (n = Pe(i), n.c(), k(n, 1), n.m(t.parentNode, t)) : n && (ct(), M(n, 1, 1, () => { | ||
512 && x(n, 1)) : (n = Pe(i), n.c(), x(n, 1), n.m(t.parentNode, t)) : n && (pt(), M(n, 1, 1, () => { | ||
n = null; | ||
}), pt()), /*$hasSteps$*/ | ||
}), ht()), /*$hasSteps$*/ | ||
i[11] ? s ? (s.p(i, l), l[0] & /*$hasSteps$*/ | ||
2048 && k(s, 1)) : (s = Ee(i), s.c(), k(s, 1), s.m(e.parentNode, e)) : s && (ct(), M(s, 1, 1, () => { | ||
2048 && x(s, 1)) : (s = Ae(i), s.c(), x(s, 1), s.m(e.parentNode, e)) : s && (pt(), M(s, 1, 1, () => { | ||
s = null; | ||
}), pt()); | ||
}), ht()); | ||
}, | ||
i(i) { | ||
r || (k(n), k(s), r = !0); | ||
r || (x(n), x(s), r = !0); | ||
}, | ||
@@ -1654,3 +1668,3 @@ o(i) { | ||
d(i) { | ||
i && (R(t), R(e)), n && n.d(i), s && s.d(i); | ||
i && (F(t), F(e)), n && n.d(i), s && s.d(i); | ||
} | ||
@@ -1664,3 +1678,3 @@ }; | ||
o[30].prevText | ||
), i = gt( | ||
), i = vt( | ||
s, | ||
@@ -1671,3 +1685,3 @@ o, | ||
ve | ||
), l = i || Or(o); | ||
), l = i || Tr(o); | ||
return { | ||
@@ -1678,3 +1692,3 @@ c() { | ||
m(a, c) { | ||
D(a, t, c), l && l.m(t, null), e = !0, r || (n = At( | ||
D(a, t, c), l && l.m(t, null), e = !0, r || (n = Nt( | ||
t, | ||
@@ -1688,3 +1702,3 @@ "click", | ||
i ? i.p && (!e || c[0] & /*$$scope*/ | ||
536870912) && _t( | ||
536870912) && mt( | ||
i, | ||
@@ -1695,3 +1709,3 @@ s, | ||
a[29], | ||
e ? mt( | ||
e ? bt( | ||
s, | ||
@@ -1701,4 +1715,4 @@ /*$$scope*/ | ||
c, | ||
mr | ||
) : vt( | ||
vr | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1712,3 +1726,3 @@ a[29] | ||
i(a) { | ||
e || (k(l, a), e = !0); | ||
e || (x(l, a), e = !0); | ||
}, | ||
@@ -1719,26 +1733,26 @@ o(a) { | ||
d(a) { | ||
a && R(t), l && l.d(a), r = !1, n(); | ||
a && F(t), l && l.d(a), r = !1, n(); | ||
} | ||
}; | ||
} | ||
function kr(o) { | ||
function xr(o) { | ||
let t, e; | ||
return { | ||
c() { | ||
t = Rt("svg"), e = Rt("path"), T(e, "d", "M19 12H6M12 5l-7 7 7 7"), G(t, "pointer-events", "none"), T(t, "width", "20"), T(t, "height", "14"), T(t, "xmlns", "http://www.w3.org/2000/svg"), T(t, "viewBox", "0 0 24 24"), T(t, "fill", "none"), T(t, "stroke", "currentColor"), T(t, "stroke-width", "2"), T(t, "stroke-linecap", "round"), T(t, "stroke-linejoin", "round"); | ||
t = Ft("svg"), e = Ft("path"), T(e, "d", "M19 12H6M12 5l-7 7 7 7"), Y(t, "pointer-events", "none"), T(t, "width", "20"), T(t, "height", "14"), T(t, "xmlns", "http://www.w3.org/2000/svg"), T(t, "viewBox", "0 0 24 24"), T(t, "fill", "none"), T(t, "stroke", "currentColor"), T(t, "stroke-width", "2"), T(t, "stroke-linecap", "round"), T(t, "stroke-linejoin", "round"); | ||
}, | ||
m(r, n) { | ||
D(r, t, n), U(t, e); | ||
D(r, t, n), X(t, e); | ||
}, | ||
p: wt, | ||
p: _t, | ||
d(r) { | ||
r && R(t); | ||
r && F(t); | ||
} | ||
}; | ||
} | ||
function Tr(o) { | ||
function kr(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = Nt( | ||
t = It( | ||
/*$previousText$*/ | ||
@@ -1753,3 +1767,3 @@ o[10] | ||
r[0] & /*$previousText$*/ | ||
1024 && It( | ||
1024 && Mt( | ||
t, | ||
@@ -1761,7 +1775,7 @@ /*$previousText$*/ | ||
d(e) { | ||
e && R(t); | ||
e && F(t); | ||
} | ||
}; | ||
} | ||
function Or(o) { | ||
function Tr(o) { | ||
let t; | ||
@@ -1771,3 +1785,3 @@ function e(s, i) { | ||
/*$layout$*/ | ||
s[4] !== De ? Tr : kr | ||
s[4] !== De ? kr : xr | ||
); | ||
@@ -1787,7 +1801,7 @@ } | ||
d(s) { | ||
s && R(t), n.d(s); | ||
s && F(t), n.d(s); | ||
} | ||
}; | ||
} | ||
function Ee(o) { | ||
function Ae(o) { | ||
let t, e, r, n; | ||
@@ -1797,3 +1811,3 @@ const s = ( | ||
o[30].nextText | ||
), i = gt( | ||
), i = vt( | ||
s, | ||
@@ -1804,3 +1818,3 @@ o, | ||
_e | ||
), l = i || Sr(o); | ||
), l = i || Or(o); | ||
return { | ||
@@ -1811,3 +1825,3 @@ c() { | ||
m(a, c) { | ||
D(a, t, c), l && l.m(t, null), e = !0, r || (n = At( | ||
D(a, t, c), l && l.m(t, null), e = !0, r || (n = Nt( | ||
t, | ||
@@ -1821,3 +1835,3 @@ "click", | ||
i ? i.p && (!e || c[0] & /*$$scope*/ | ||
536870912) && _t( | ||
536870912) && mt( | ||
i, | ||
@@ -1828,3 +1842,3 @@ s, | ||
a[29], | ||
e ? mt( | ||
e ? bt( | ||
s, | ||
@@ -1834,4 +1848,4 @@ /*$$scope*/ | ||
c, | ||
vr | ||
) : vt( | ||
_r | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1845,3 +1859,3 @@ a[29] | ||
i(a) { | ||
e || (k(l, a), e = !0); | ||
e || (x(l, a), e = !0); | ||
}, | ||
@@ -1852,11 +1866,11 @@ o(a) { | ||
d(a) { | ||
a && R(t), l && l.d(a), r = !1, n(); | ||
a && F(t), l && l.d(a), r = !1, n(); | ||
} | ||
}; | ||
} | ||
function Sr(o) { | ||
function Or(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = Nt( | ||
t = It( | ||
/*$nextButtonText$*/ | ||
@@ -1871,3 +1885,3 @@ o[12] | ||
r[0] & /*$nextButtonText$*/ | ||
4096 && It( | ||
4096 && Mt( | ||
t, | ||
@@ -1879,7 +1893,7 @@ /*$nextButtonText$*/ | ||
d(e) { | ||
e && R(t); | ||
e && F(t); | ||
} | ||
}; | ||
} | ||
function Pr(o) { | ||
function Sr(o) { | ||
let t, e, r = ( | ||
@@ -1905,8 +1919,8 @@ /*$title$*/ | ||
n[28].description ? r ? (r.p(n, s), s[0] & /*$title$, $description$, $$slots*/ | ||
268435462 && k(r, 1)) : (r = $e(n), r.c(), k(r, 1), r.m(t.parentNode, t)) : r && (ct(), M(r, 1, 1, () => { | ||
268435462 && x(r, 1)) : (r = $e(n), r.c(), x(r, 1), r.m(t.parentNode, t)) : r && (pt(), M(r, 1, 1, () => { | ||
r = null; | ||
}), pt()); | ||
}), ht()); | ||
}, | ||
i(n) { | ||
e || (k(r), e = !0); | ||
e || (x(r), e = !0); | ||
}, | ||
@@ -1917,52 +1931,52 @@ o(n) { | ||
d(n) { | ||
n && R(t), r && r.d(n); | ||
n && F(t), r && r.d(n); | ||
} | ||
}; | ||
} | ||
function Er(o, t, e) { | ||
let r, n, s, i, l, a, c, w, y, u, _, f, { $$slots: g = {}, $$scope: v } = t; | ||
const b = No(g); | ||
function Pr(o, t, e) { | ||
let r, n, s, i, l, a, c, g, _, h, m, u, { $$slots: f = {}, $$scope: y } = t; | ||
const b = Eo(f); | ||
let { cssClassName: $ = "" } = t; | ||
const P = po(), x = W(Mt), L = Xo(), E = W(Jt), K = W(Qt), B = W(zt), N = I(K, (h) => { | ||
const k = po(), C = W(Lt), B = Ko(), A = W(Jt), U = W(Qt), L = W(zt), E = I(U, (w) => { | ||
var tt; | ||
return `thisway-popover-${(tt = h == null ? void 0 : h.orientation) == null ? void 0 : tt.toLowerCase()}`; | ||
return `thisway-popover-${(tt = w == null ? void 0 : w.orientation) == null ? void 0 : tt.toLowerCase()}`; | ||
}); | ||
A(o, N, (h) => e(3, s = h)); | ||
const O = I(K, (h) => `thisway-popover__arrow-${h == null ? void 0 : h.alignment.toLowerCase()}`); | ||
A(o, O, (h) => e(5, l = h)); | ||
const p = Ze(), C = I(E, (h) => h > 1); | ||
A(o, C, (h) => e(11, _ = h)); | ||
const J = I([C, L], ([h, tt]) => h && (tt || 0) > 0); | ||
A(o, J, (h) => e(9, y = h)); | ||
const m = j(p, "title"); | ||
A(o, m, (h) => e(1, r = h)); | ||
const V = j(p, "description"); | ||
A(o, V, (h) => e(2, n = h)); | ||
const Q = j(p, "showCloseBtn"); | ||
A(o, Q, (h) => e(6, a = h)); | ||
const et = j(p, "showCtrlBtns"); | ||
A(o, et, (h) => e(8, w = h)); | ||
const Y = j(p, "showProgress", !0); | ||
A(o, Y, (h) => e(7, c = h)); | ||
const F = j(p, "prevBtnText"); | ||
A(o, F, (h) => e(10, u = h)); | ||
const z = j(B, "layout", bt); | ||
A(o, z, (h) => e(4, i = h)); | ||
const ot = Qe(x.store, L), X = I([p, ot, L, z], ([h, tt, d, H]) => { | ||
N(o, E, (w) => e(3, s = w)); | ||
const S = I(U, (w) => `thisway-popover__arrow-${w == null ? void 0 : w.alignment.toLowerCase()}`); | ||
N(o, S, (w) => e(5, l = w)); | ||
const p = Ze(), P = I(A, (w) => w > 1); | ||
N(o, P, (w) => e(11, m = w)); | ||
const et = I([P, B], ([w, tt]) => w && (tt || 0) > 0); | ||
N(o, et, (w) => e(9, _ = w)); | ||
const v = j(p, "title"); | ||
N(o, v, (w) => e(1, r = w)); | ||
const H = j(p, "description"); | ||
N(o, H, (w) => e(2, n = w)); | ||
const ot = j(p, "showCloseBtn"); | ||
N(o, ot, (w) => e(6, a = w)); | ||
const R = j(p, "showCtrlBtns"); | ||
N(o, R, (w) => e(8, g = w)); | ||
const V = j(p, "showProgress", !0); | ||
N(o, V, (w) => e(7, c = w)); | ||
const J = j(p, "prevBtnText"); | ||
N(o, J, (w) => e(10, h = w)); | ||
const Q = j(L, "layout", $t); | ||
N(o, Q, (w) => e(4, i = w)); | ||
const G = Qe(C.store, B), q = I([p, G, B, Q], ([w, tt, d, K]) => { | ||
var at; | ||
if (d === 0) | ||
return h.startBtnText; | ||
return w.startBtnText; | ||
if (tt) | ||
if (H === De) { | ||
if (K === De) { | ||
const rt = ((at = tt.popover) == null ? void 0 : at.title) ?? ""; | ||
return `${h.nextBtnText} ${rt}`; | ||
return `${w.nextBtnText} ${rt}`; | ||
} else | ||
return h.nextBtnText; | ||
return w.nextBtnText; | ||
else | ||
return h.doneBtnText; | ||
return w.doneBtnText; | ||
}); | ||
A(o, X, (h) => e(12, f = h)); | ||
const q = () => P("close"), yt = () => P("previous"), ht = () => P("next"); | ||
return o.$$set = (h) => { | ||
"cssClassName" in h && e(0, $ = h.cssClassName), "$$scope" in h && e(29, v = h.$$scope); | ||
N(o, q, (w) => e(12, u = w)); | ||
const lt = () => k("close"), ft = () => k("previous"), z = () => k("next"); | ||
return o.$$set = (w) => { | ||
"cssClassName" in w && e(0, $ = w.cssClassName), "$$scope" in w && e(29, y = w.$$scope); | ||
}, [ | ||
@@ -1977,33 +1991,33 @@ $, | ||
c, | ||
w, | ||
y, | ||
u, | ||
g, | ||
_, | ||
f, | ||
N, | ||
O, | ||
C, | ||
J, | ||
h, | ||
m, | ||
u, | ||
E, | ||
S, | ||
P, | ||
et, | ||
v, | ||
H, | ||
ot, | ||
R, | ||
V, | ||
J, | ||
Q, | ||
et, | ||
Y, | ||
F, | ||
q, | ||
lt, | ||
ft, | ||
z, | ||
X, | ||
q, | ||
yt, | ||
ht, | ||
b, | ||
v, | ||
g | ||
y, | ||
f | ||
]; | ||
} | ||
class Ar extends St { | ||
class Ar extends Pt { | ||
constructor(t) { | ||
super(), Pt(this, t, Er, Pr, Et, { cssClassName: 0 }, _r, [-1, -1]); | ||
super(), At(this, t, Pr, Sr, Et, { cssClassName: 0 }, gr, [-1, -1]); | ||
} | ||
} | ||
class Nr { | ||
class Er { | ||
constructor(t) { | ||
@@ -2024,5 +2038,5 @@ nt(this, "options$"); | ||
} | ||
class Ir extends fr { | ||
class Nr extends hr { | ||
constructor(t) { | ||
const { steps: e } = t, r = dt(t), n = new Nr(r); | ||
const { steps: e } = t, r = wt(t), n = new Er(r); | ||
for (const s of [ | ||
@@ -2041,6 +2055,6 @@ "beforeStepChange", | ||
} | ||
super(Fo(Mr(e), void 0), n, Ye(), r); | ||
super(Fo(Ir(e), void 0), n, Ye(), r); | ||
} | ||
} | ||
const Mr = (o) => { | ||
const Ir = (o) => { | ||
let t = o.length; | ||
@@ -2063,4 +2077,4 @@ const e = /* @__PURE__ */ new Set(), r = (s) => typeof s == "string" || Number.isFinite(s) && !e.has(s), n = (s) => { | ||
}); | ||
}, Ur = (o) => { | ||
const t = new Ir({ | ||
}, Xr = (o) => { | ||
const t = new Nr({ | ||
steps: [ | ||
@@ -2075,4 +2089,4 @@ { | ||
}; | ||
function Lr(o) { | ||
const t = W(Zt), { onMount: e, onDestroy: r } = W(Do), n = t.subscribe((s) => { | ||
function Mr(o) { | ||
const t = W(Zt), { onMount: e, onDestroy: r } = W(Vo), n = t.subscribe((s) => { | ||
s ? e(s) : r(); | ||
@@ -2084,5 +2098,5 @@ }); | ||
} | ||
class qr extends St { | ||
class Ur extends Pt { | ||
constructor(t) { | ||
super(), Pt(this, t, Lr, null, Et, {}); | ||
super(), At(this, t, Mr, null, Et, {}); | ||
} | ||
@@ -2093,4 +2107,4 @@ } | ||
Ho as ElementBoundingContext, | ||
Do as ForeignViewContext, | ||
qr as ForeignViewHost, | ||
Vo as ForeignViewContext, | ||
Ur as ForeignViewHost, | ||
zt as OptionsContext, | ||
@@ -2103,24 +2117,24 @@ Qt as PlacementContext, | ||
Wt as StepOptionsContext, | ||
Ro as StepsController, | ||
Ir as ThisWay, | ||
Nr as ThisWayDefaultDelegate, | ||
Do as StepsController, | ||
Nr as ThisWay, | ||
Er as ThisWayDefaultDelegate, | ||
Jt as TotalStepCountContext, | ||
fr as Tour, | ||
Mt as TourContext, | ||
hr as Tour, | ||
Lt as TourContext, | ||
Ye as createContexts, | ||
Fo as createStepsStore, | ||
Yo as defaultKeydownAction, | ||
Wo as defaultKeydownAction, | ||
it as defineContext, | ||
Xt as findStepIndex, | ||
W as getContext, | ||
Xr as getHighlightOptions, | ||
Kr as getHighlightOptions, | ||
Qe as getNextStep, | ||
Ze as getPopoverOptions, | ||
Xo as getRenderIndex, | ||
Ko as getRenderIndex, | ||
Je as getTheme, | ||
Ur as highlight, | ||
Ko as mergeStepOption, | ||
Uo as normalizeTheme, | ||
Xr as highlight, | ||
Go as mergeStepOption, | ||
Xo as normalizeTheme, | ||
ro as parsePlacement, | ||
Kr as setContext | ||
Gr as setContext | ||
}; |
{ | ||
"name": "@thisway/next", | ||
"version": "0.11.0-beta.0", | ||
"version": "0.11.0", | ||
"type": "module", | ||
"dependencies": { | ||
"@thisway/base": "^0.9.0-beta.0", | ||
"@thisway/utils": "^0.5.0-beta.0", | ||
"@thisway/base": "^0.9.0", | ||
"@thisway/utils": "^0.5.0", | ||
"svelte": "^4.2.1" | ||
@@ -9,0 +9,0 @@ }, |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
111377
2424
0
Updated@thisway/base@^0.9.0
Updated@thisway/utils@^0.5.0