Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thisway/next

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thisway/next - npm Package Compare versions

Comparing version 0.10.1 to 0.11.0-beta.0

lib/highlight.d.ts

2293

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 st = (o, t, e) => (lo(o, typeof t != "symbol" ? t + "" : t, e), e);
import * as Me from "svelte";
import { onMount as co, onDestroy as Le, createEventDispatcher as po } from "svelte";
import { isValidNumber as Dt, toPx as at, isElement as Re, isTextInputElement as Be, deltaTransform as Zt, transformX as Xt, transformY as zt, defaults as ae, NOOP_TRANSFORM as ho, pick$ as F, clamp as Ft, finite as le, animationFrameThrottle as ce, resizeObserver as Ve, reverseX as pe, reverseY as he, getElementsBounding as fo, getFrameElement as uo, EMPTY_SIZE as wo } from "@thisway/utils";
import { get as O, writable as wt, derived as L, readable as gt } from "svelte/store";
import { PRIMARY_COLOR_WHITE as Fe, PRIMARY_COLOR_BLACK as De, PRIMARY_COLOR_BLUE as go, EMPTY_POINT as _o, POSITION_AUTO as Kt, ORIENTATIONS as fe, ALIGNMENTS as vo, NO_ELEMENT as pt, ORIENTATIONS_TO_START_END as mo, ORIENTATIONS_Y as yo, popoverDefaultValues as bo, highlightDefaultValues as $o, LAYOUT_MODE_1 as xt, LAYOUT_MODE_3 as He } from "@thisway/base";
var nt = (o, t, e) => (lo(o, typeof t != "symbol" ? t + "" : t, e), e);
import * as Ae 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";
export * from "@thisway/base";
import { SvelteComponent as Et, init as At, safe_not_equal as Nt, append_styles as jt, space as et, empty as Wt, insert as j, noop as vt, detach as W, component_subscribe as I, svg_element as Ht, attr as P, set_style as Y, append as K, listen as It, element as U, action_destroyer as je, is_function as We, binding_callbacks as Ye, construct_svelte_component as de, create_component as kt, mount_component as Tt, group_outros as lt, transition_out as R, destroy_component as St, check_outros as ct, transition_in as S, run_all as Co, text as Mt, set_data as Lt, compute_slots as xo, create_slot as mt, update_slot_base as yt, get_all_dirty_from_scope as bt, get_slot_changes as $t } from "svelte/internal";
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 "svelte/internal/disclose-version";
import { getHighlightOptions as ko, NO_ELEMENT as To, CLICK_MASK_ACTION_NEXT as So, CLICK_MASK_ACTION_CLOSE as Oo, getRenderIndex as Po } from "@thisway/next";
import { tweened as Ot } from "svelte/motion";
import { cubicOut as Pt } from "svelte/easing";
import { buildScrollFrames as Eo, computeFrameActions as Ao, transformNestedBounding as No } from "@thisway/scroll";
const rt = (o) => Symbol(o), H = (o) => {
const t = Me.getContext(o);
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";
function it(o) {
return Symbol(o);
}
function W(o) {
const t = Ae.getContext(o);
if (!t)
throw new Error(`Context ${o.description} not exist`);
return t;
}, Hs = (o, t) => {
Me.setContext(o, t);
}, Ge = (o) => new Map(o), Rt = rt("Tour"), Jt = rt("Options"), Ke = rt("ElementBounding"), Qt = rt("PopoverContainer"), Xe = rt("PopoverSize"), te = rt("TotalStepCount"), ee = rt("PopoverPosition"), oe = rt("Delegate"), Io = rt("ForeignView"), se = rt("RenderState"), Yt = rt("StepOptions");
class Mo {
}
function Kr(o, t) {
Ae.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 {
constructor(t) {
st(this, "store");
nt(this, "store");
this.store = t;

@@ -35,3 +39,3 @@ }

getAllSteps(t = !1) {
return t ? O(this.store.steps$) : O(this.store.effectiveSteps$);
return t ? S(this.store.steps$) : S(this.store.effectiveSteps$);
}

@@ -43,3 +47,3 @@ /**

getActiveStep() {
return { step: O(this.store.activeStep$), index: O(this.store.activeIndex$) };
return { step: S(this.store.activeStep$), index: S(this.store.activeIndex$) };
}

@@ -56,14 +60,14 @@ // public getStep(id: string): Step | undefined {

const { effectiveSteps$: t } = this.store;
return O(t)[0];
return S(t)[0];
}
getLastStep() {
const { effectiveSteps$: t } = this.store;
return O(t).at(-1);
return S(t).at(-1);
}
goPrevStep() {
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, s = O(t);
if (!Dt(s) || s < 1)
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, r = S(t);
if (!Dt(r) || r < 1)
return;
const i = O(e)[s - 1];
this.goStep(i.id);
const n = S(e)[r - 1];
this.goStep(n.id);
}

@@ -86,44 +90,44 @@ goNextStep() {

isActive() {
return O(this.store.activeStep$) !== void 0;
return S(this.store.activeStep$) !== void 0;
}
getNextStepId() {
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, s = O(t), i = O(e);
if (!(!Dt(s) || s === i.length - 1))
return i[s + 1].id;
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, r = S(t), n = S(e);
if (!(!Dt(r) || r === n.length - 1))
return n[r + 1].id;
}
}
function Ut([o, t]) {
function Xt([o, t]) {
if (t == null || o.length === 0)
return;
const e = o.findIndex((s) => s.id === t);
const e = o.findIndex((r) => r.id === t);
if (!(e < 0))
return e;
}
const Lo = (o, t) => {
const e = wt(o), s = wt(t), i = L(e, (l) => l.filter((p) => !p.isHidden)), r = L([e, s], Ut), n = L([i, s], Ut), a = L([e, r], ([l, p]) => p != null ? l[p] : void 0);
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);
return {
steps$: e,
activeStepId$: s,
effectiveSteps$: i,
activeIndex$: r,
effectiveIndex$: n,
activeStep$: a
activeStepId$: r,
effectiveSteps$: n,
activeIndex$: s,
effectiveIndex$: i,
activeStep$: l
};
};
function Ct() {
function Ot() {
}
function ze(o) {
function Ke(o) {
return o.container || document.body;
}
const re = (o) => {
const t = ze(o), e = t.clientWidth, s = t.clientHeight;
const Lt = (o) => {
const t = Ke(o), e = Math.min(t.clientWidth, window.innerWidth), r = Math.min(t.clientHeight, window.innerHeight);
return {
width: e,
height: s
height: r
};
}, Ro = ({ x: o, y: t, ...e }) => Object.assign(e, {
left: at(o),
top: at(t)
}, jo = ({ x: o, y: t, ...e }) => Object.assign(e, {
left: lt(o),
top: lt(t)
});
function Ue(o) {
function Xe(o) {
for (const t of o)

@@ -136,21 +140,21 @@ try {

}
function qe(o) {
function Ue(o) {
return !!o && "ownerDocument" in o;
}
function ie(o, t) {
function Ut(o, t) {
o.signal.addEventListener("abort", t);
}
function _t(o, t, e) {
function Wo(o, t, e) {
if (!o)
return Ct;
const s = {
return Ot;
const r = {
passive: !0,
capture: !0
};
return o.addEventListener(t, e, s), () => {
o.removeEventListener(t, e, s);
return o.addEventListener(t, e, r), () => {
o.removeEventListener(t, e, r);
};
}
function Bo(o) {
if (!(qe(o.target) && Re(o.target) && Be(o.target))) {
function Yo(o) {
if (!(Ue(o.target) && Ie(o.target) && Me(o.target))) {
if (o.key === "ArrowRight")

@@ -162,53 +166,89 @@ return "next";

}
function ne(o, t) {
const e = Zt(t), s = Xt(o, 0, e), i = zt(0, o, e);
return [s, i];
function oe(o, t) {
const e = Le(t), r = ho(o, 0, e), n = fo(0, o, e);
return [r, n];
}
const Vo = (o, t, e, s) => {
const { x: i, y: r, padding: n, borderWidth: a } = o;
let [l, p] = ne(n, s);
t && (l += a, p += a);
const c = a * 2, b = i - l + c, u = r - p, _ = o.width + (l - c) * 2, h = o.height + (p - c) * 2, w = e.width, v = e.height;
return `M${w},0L0,0L0,${v}L${w},${v}L${w},0ZM${b},${u}h${_}a${c},${c} 0 0 1 ${c},${c}v${h}a${c},${c} 0 0 1 -${c},${c}h-${_}a${c},${c} 0 0 1 -${c},-${c}v-${h}a${c},${c} 0 0 1 ${c},-${c}z`;
}, Ze = (o, t = o) => o === Fe ? De : t, Fo = (o, t, e) => {
const s = ae({ ...t }, o);
return e ? ae({ ...e }, s) : s;
}, Do = () => {
const { effectiveSteps$: o } = H(Rt).store, t = H(se);
return L([o, t], ([e, { step: s }]) => Ut([e, s == null ? void 0 : s.id]));
}, Je = () => H(Yt).popover, js = () => H(Yt).highlight, Ho = (o) => {
const t = (o == null ? void 0 : o.primaryColor) || go, e = (o == null ? void 0 : o.textColor) || Ze(t, Fe), s = (o == null ? void 0 : o.descColor) || De;
function qe(o, t) {
const { borderWidth: e, padding: r, showBorder: n } = o;
let [s, i] = oe(r, t);
return n && (s += e, i += e), [s, i];
}
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 r = re({ ...t }, o);
return e ? re({ ...e }, r) : r;
}, Xo = () => {
const { effectiveSteps$: o } = W(Mt).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;
return {
primaryColor: t,
textColor: e,
descColor: s
descColor: r
};
}, Qe = () => H(Yt).theme, to = (o, t) => {
}, Je = () => W(Wt).theme, Qe = (o, t) => {
const { effectiveSteps$: e } = o;
return L([t, e], ([s, i]) => Dt(s) ? i.at(s + 1) : void 0);
}, { assign: ue } = Object, eo = (o, t) => (ue(o.style, t), {
return I([t, e], ([r, n]) => Dt(r) ? n.at(r + 1) : void 0);
}, { assign: he } = Object, to = (o, t) => (he(o.style, t), {
update(e) {
ue(o.style, e);
he(o.style, e);
}
});
function jo(o, t) {
let { x: e, y: s, width: i, height: r } = o;
e = Xt(e, s, t), s = zt(e, s, t);
const n = Zt(t);
return i = Xt(i, 0, n), r = zt(0, r, n), {
x: e,
y: s,
width: i,
height: r
};
}), eo = Be(uo);
function qo() {
const o = pe(Io), t = pe(Mo), e = We();
let r;
return I([o, e], ([n, { borderWidth: s, padding: i, showBorder: l }], a) => {
const c = {
x: 0,
y: 0,
width: 0,
height: 0,
borderWidth: s,
padding: i,
showBorder: l
};
if (!n || ft(n)) {
const y = Lt(t), u = r ? S(r) : {
x: y.width / 2,
y: y.height / 2,
width: 0,
height: 0,
borderWidth: 0,
padding: 0
};
c.x = u.x + u.width / 2, c.y = u.y + u.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(
{
x: c.x + c.width / 2,
y: c.y + c.height / 2,
width: 0,
height: 0,
borderWidth: 0,
padding: 0,
showBorder: l
},
{
duration: 300,
easing: kt
}
));
const w = r.subscribe(a);
return r.set(c), () => {
w();
};
});
}
const oo = gt(ho);
function Wo(o) {
jt(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 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 we(o) {
let t, e, s, i;
function fe(o) {
let t, e, r, n;
return {
c() {
t = Ht("svg"), e = Ht("path"), P(
t = Rt("svg"), e = Rt("path"), T(
e,

@@ -218,3 +258,3 @@ "d",

o[2]
), Y(e, "fill", "black"), Y(
), G(e, "fill", "black"), G(
e,

@@ -224,6 +264,6 @@ "opacity",

o[3]
), P(t, "class", "thisway-mask"), P(t, "role", "presentation"), P(t, "width", "100%"), P(t, "height", "100%");
), T(t, "class", "thisway-mask"), T(t, "role", "presentation"), T(t, "width", "100%"), T(t, "height", "100%");
},
m(r, n) {
j(r, t, n), K(t, e), o[19](t), s || (i = It(
m(s, i) {
D(s, t, i), U(t, e), o[19](t), r || (n = At(
t,

@@ -233,32 +273,32 @@ "click",

o[18]
), s = !0);
), r = !0);
},
p(r, n) {
n & /*$maskCommand$*/
4 && P(
p(s, i) {
i & /*$maskCommand$*/
4 && T(
e,
"d",
/*$maskCommand$*/
r[2]
), n & /*$opacity$*/
8 && Y(
s[2]
), i & /*$opacity$*/
8 && G(
e,
"opacity",
/*$opacity$*/
r[3]
s[3]
);
},
d(r) {
r && W(t), o[19](null), s = !1, i();
d(s) {
s && R(t), o[19](null), r = !1, n();
}
};
}
function ge(o) {
let t, e, s, i, r = (
function ue(o) {
let t, e, r, n, s = (
/*$showHeartbeat$*/
o[8] && _e()
o[8] && de()
);
return {
c() {
t = U("div"), r && r.c(), P(t, "class", "thisway-highlight"), Y(
t = Z("div"), s && s.c(), T(t, "class", "thisway-highlight"), G(
t,

@@ -268,3 +308,3 @@ "--thisway-highlight-border-width",

o[5]
), Y(
), G(
t,

@@ -276,4 +316,4 @@ "--thisway-highlight-border-color",

},
m(n, a) {
j(n, t, a), r && r.m(t, null), s || (i = je(e = eo.call(
m(i, l) {
D(i, t, l), s && s.m(t, null), r || (n = Re(e = to.call(
null,

@@ -283,157 +323,120 @@ t,

o[7]
)), s = !0);
)), r = !0);
},
p(n, a) {
p(i, l) {
/*$showHeartbeat$*/
n[8] ? r || (r = _e(), r.c(), r.m(t, null)) : r && (r.d(1), r = null), e && We(e.update) && a & /*$borderBoundingStyle$*/
i[8] ? s || (s = de(), s.c(), s.m(t, null)) : s && (s.d(1), s = null), e && Fe(e.update) && l & /*$borderBoundingStyle$*/
128 && e.update.call(
null,
/*$borderBoundingStyle$*/
n[7]
), a & /*$borderWidthPx$*/
32 && Y(
i[7]
), l & /*$borderWidthPx$*/
32 && G(
t,
"--thisway-highlight-border-width",
/*$borderWidthPx$*/
n[5]
), a & /*$borderColor$*/
64 && Y(
i[5]
), l & /*$borderColor$*/
64 && G(
t,
"--thisway-highlight-border-color",
/*$borderColor$*/
n[6]
i[6]
);
},
d(n) {
n && W(t), r && r.d(), s = !1, i();
d(i) {
i && R(t), s && s.d(), r = !1, n();
}
};
}
function _e(o) {
function de(o) {
let t;
return {
c() {
t = U("div"), P(t, "class", "thisway-highlight-pulse");
t = Z("div"), T(t, "class", "thisway-highlight-pulse");
},
m(e, s) {
j(e, t, s);
m(e, r) {
D(e, t, r);
},
d(e) {
e && W(t);
e && R(t);
}
};
}
function Yo(o) {
let t, e, s = (
function Zo(o) {
let t, e, r = (
/*$showMask$*/
o[0] && we(o)
), i = (
o[0] && fe(o)
), n = (
/*$showBorder$*/
o[4] && ge(o)
o[4] && ue(o)
);
return {
c() {
s && s.c(), t = et(), i && i.c(), e = Wt();
r && r.c(), t = st(), n && n.c(), e = jt();
},
m(r, n) {
s && s.m(r, n), j(r, t, n), i && i.m(r, n), j(r, e, n);
m(s, i) {
r && r.m(s, i), D(s, t, i), n && n.m(s, i), D(s, e, i);
},
p(r, [n]) {
p(s, [i]) {
/*$showMask$*/
r[0] ? s ? s.p(r, n) : (s = we(r), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), /*$showBorder$*/
r[4] ? i ? i.p(r, n) : (i = ge(r), i.c(), i.m(e.parentNode, e)) : i && (i.d(1), i = null);
s[0] ? r ? r.p(s, i) : (r = fe(s), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null), /*$showBorder$*/
s[4] ? n ? n.p(s, i) : (n = ue(s), n.c(), n.m(e.parentNode, e)) : n && (n.d(1), n = null);
},
i: vt,
o: vt,
d(r) {
r && (W(t), W(e)), s && s.d(r), i && i.d(r);
i: wt,
o: wt,
d(s) {
s && (R(t), R(e)), r && r.d(s), n && n.d(s);
}
};
}
function Go(o, t, e) {
let s, i, r, n, a, l, p, c, b;
const u = H(Rt), _ = H(Ke), h = H(oe), w = Qe(), v = ko(), $ = F(v, "showMask");
I(o, $, (y) => e(0, s = y));
const m = F(v, "showBorder");
I(o, m, (y) => e(4, a = y));
const T = F(v, "showHeartbeat"), x = F(v, "padding"), B = F(v, "maskOpacity");
I(o, B, (y) => e(3, n = y));
const M = F(v, "borderWidth");
let N, k = wt(void 0);
I(o, k, (y) => e(1, i = y));
const C = h.transform$ ?? oo, E = L([_, M, x], ([y, V, z], J) => {
const X = y ? O(y) : void 0, D = {
x: 0,
y: 0,
width: 0,
height: 0,
borderWidth: V,
padding: z
};
if (!X || X === To) {
const ft = re(h), d = N ? O(N) : {
x: ft.width / 2,
y: ft.height / 2,
width: 0,
height: 0,
borderWidth: 0,
padding: 0
};
D.x = d.x + d.width / 2, D.y = d.y + d.height / 2, D.borderWidth = 0, D.padding = 0;
} else
D.x = X.x, D.y = X.y, D.width = X.width, D.height = X.height;
N || (N = Ot(
{
x: D.x + D.width / 2,
y: D.y + D.height / 2,
width: 0,
height: 0,
borderWidth: 0,
padding: 0
},
{ duration: 300, easing: Pt }
));
const dt = N.subscribe(J);
return N.set(D), () => {
dt();
};
}), f = L([E, m, $, k], ([y, V, z, J], X) => {
if (!y || !z || !J)
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)
return;
const D = Vo(y, V, J.getBoundingClientRect(), O(C));
X(D);
const Y = Go(m, Lt(_), S(L));
et(Y);
});
I(o, f, (y) => e(2, r = y));
const A = L(E, (y, V) => {
if (!y)
A(o, K, (m) => e(2, s = m));
const B = I(E, (m, V) => {
if (!m)
return;
const { x: z, y: J, borderWidth: X, padding: D, width: dt, height: ft } = y, [d, Q] = ne(D, O(C));
const { x: Q, y: et, borderWidth: Y, padding: F, width: z, height: ot } = m, [X, q] = oe(F, S(L));
V({
left: at(z - X - d),
top: at(J - X - Q),
width: at(dt),
height: at(ft),
padding: `${at(Q)} ${at(d)}`
left: lt(Q - Y - X),
top: lt(et - Y - q),
width: lt(z),
height: lt(ot),
padding: `${lt(q)} ${lt(X)}`
});
});
I(o, A, (y) => e(7, c = y));
const q = L(E, (y) => at(y == null ? void 0 : y.borderWidth));
I(o, q, (y) => e(5, l = y));
const it = L([v, w], ([y, V]) => {
if (y != null && y.borderColor)
return y.borderColor;
const { primaryColor: z } = V;
return Ze(z);
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);
});
I(o, it, (y) => e(6, p = y));
const Z = L([T, E], ([y, V]) => !!(y && (V != null && V.width) && (V != null && V.height)));
I(o, Z, (y) => e(8, b = y));
const ht = () => {
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 = O(v)) == null ? void 0 : V.clickMask) {
case Oo: {
switch ((V = S(g)) == null ? void 0 : V.clickMask) {
case Bo: {
u.onClose();
break;
}
case So: {
case Lo: {
u.goNextStep();

@@ -444,139 +447,158 @@ break;

};
function ot(y) {
Ye[y ? "unshift" : "push"](() => {
i = y, k.set(i);
function J(m) {
je[m ? "unshift" : "push"](() => {
n = m, x.set(n);
});
}
return [
r,
n,
s,
i,
r,
n,
l,
a,
l,
p,
c,
w,
y,
v,
b,
$,
m,
P,
x,
K,
B,
k,
f,
A,
q,
it,
Z,
ht,
ot
N,
O,
p,
C,
J
];
}
class Ko extends Et {
class Qo extends St {
constructor(t) {
super(), At(this, t, Go, Yo, Nt, {}, Wo);
super(), Pt(this, t, Jo, Zo, Et, {}, zo);
}
}
const ve = 0.05, so = (o) => {
if (!o || o === Kt)
return [Kt, void 0];
if (Array.isArray(o))
return o;
const t = o.split("_");
return t.length === 1 && fe.includes(t[0]) ? [t[0], "CENTER"] : t.length === 2 && fe.includes(t[0]) && vo.includes(t[1]) ? t : [Kt, void 0];
}, Xo = (o, t, e, s, i, r) => {
if (e === "OVER" || e === "SCREEN")
return e;
const n = o.x + o.width, a = o.y + o.height, p = o.y - t.height - i >= 0, b = r.height - (a + t.height) - i >= 0, _ = o.x - t.width - s >= 0, w = r.width - (n + t.width) - s >= 0;
if (e === "BOTTOM" && b)
const we = 0.05;
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)
return "BOTTOM";
if (e === "LEFT" && _)
if (o === "LEFT" && _)
return "LEFT";
if (e === "TOP" && p)
if (o === "TOP" && c)
return "TOP";
if (e === "RIGHT" && w)
if (o === "RIGHT" && g)
return "RIGHT";
const v = r.width * ve, $ = r.height * ve;
return o.y < $ && b ? "BOTTOM" : r.width - n < v && _ ? "LEFT" : r.height - a < $ && p ? "TOP" : o.x < v && w ? "RIGHT" : b ? "BOTTOM" : _ ? "LEFT" : p ? "TOP" : w ? "RIGHT" : "SCREEN";
const v = s.width * we, b = s.height * we;
if (t.y < b && y)
return "BOTTOM";
if (s.width - i < v && _)
return "LEFT";
if (s.height - l < b && c)
return "TOP";
if (t.x < v && g)
return "RIGHT";
if (y)
return "BOTTOM";
if (_)
return "LEFT";
if (c)
return "TOP";
if (g)
return "RIGHT";
}
function tr(...o) {
const t = o[0];
return t === "SCREEN" || t === "OVER" ? t : oo(...o) ?? "OVER";
}
const ro = (o) => {
if (!o || o === Gt)
return [Gt, void 0];
if (Array.isArray(o))
return o;
const t = o.split("_");
return t.length === 1 && ae.includes(t[0]) ? [t[0], "CENTER"] : t.length === 2 && ae.includes(t[0]) && Oo.includes(t[1]) ? t : [Gt, void 0];
}, qt = {
..._o,
...To,
visibility: "hidden"
}, zo = (o, t, e, s) => o < e ? e - o : t > s ? t - s : 0, me = (o = "CENTER", t, e, s, i, r) => {
if (!s)
}, er = (o, t, e, r) => o < e ? e - o : t > r ? t - r : 0, ge = (o = "CENTER", t, e, r, n, s) => {
if (!r)
return { adjustAlignment: "CENTER", value: 0 };
const n = {
START: t - r,
CENTER: (t + e - s) / 2,
END: e - s + r
}, l = ((p, c, b) => {
const i = {
START: t - s,
CENTER: (t + e - r) / 2,
END: e - r + s
}, a = ((c, w, y) => {
let u;
for (const _ of p) {
const h = n[_], w = zo(h, h + s, c, b);
if (w > 0)
u ? w < u.overflowPx && (u = { adjustAlignment: _, overflowPx: w }) : u = { adjustAlignment: _, overflowPx: w };
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 };
else
return { adjustAlignment: _, value: h };
return { adjustAlignment: _, value: f };
}
return {
adjustAlignment: (u == null ? void 0 : u.adjustAlignment) || o,
value: n[(u == null ? void 0 : u.adjustAlignment) || o],
value: i[(u == null ? void 0 : u.adjustAlignment) || o],
overflowPx: u == null ? void 0 : u.overflowPx
};
})(
[o, ...["CENTER", "START", "END"].filter((p) => p !== o)],
[o, ...["CENTER", "START", "END"].filter((c) => c !== o)],
0,
i
n
);
if (l.overflowPx && l.overflowPx > 0) {
let p = 0;
l.adjustAlignment === "START" ? p = l.overflowPx : l.adjustAlignment === "END" && (p = 0 - l.overflowPx), l.value = l.value + p;
if (a.overflowPx && a.overflowPx > 0) {
let c = 0;
a.adjustAlignment === "START" ? c = a.overflowPx : a.adjustAlignment === "END" && (c = 0 - a.overflowPx), a.value = a.value + c;
}
return l;
}, Uo = (o, t, e, s, i, r, n, a) => {
const l = {
return a;
}, or = (o, t, e, r, n, s, i, l) => {
const a = {
...qt,
visibility: "visible"
};
let p, c, b;
if (!e || e === pt || o === "SCREEN")
c = (r.height - s.height) / 2, b = (r.width - s.width) / 2;
let c, w, y;
if (!e || ft(e) || o === "SCREEN")
w = (s.height - r.height) / 2, y = (s.width - r.width) / 2;
else {
const u = e.x + e.width, _ = e.y + e.height, h = () => {
const m = me(
const u = e.x + e.width, _ = e.y + e.height, f = () => {
const $ = ge(
t,
e.x,
u,
r.width,
s.width,
r.width,
n
i
);
b = m.value, p = m.adjustAlignment;
}, w = () => {
const m = me(
y = $.value, c = $.adjustAlignment;
}, g = () => {
const $ = ge(
t,
e.y,
_,
r.height,
s.height,
r.height,
a
l
);
c = m.value, p = m.adjustAlignment;
}, v = r.height - s.height, $ = r.width - s.width;
w = $.value, c = $.adjustAlignment;
}, v = s.height - r.height, b = s.width - r.width;
switch (o) {
case "OVER": {
c = e.y + (e.height - s.height) / 2, b = e.x + (e.width - s.width) / 2;
w = e.y + (e.height - r.height) / 2, y = e.x + (e.width - r.width) / 2;
break;
}
case "TOP": {
c = Ft(e.y - s.height - a, 0, v), h();
w = Ht(e.y - r.height - l, 0, v), f();
break;
}
case "BOTTOM": {
c = Ft(_ + a, i, v), h();
w = Ht(_ + l, n, v), f();
break;
}
case "LEFT": {
b = Ft(e.x - s.width - n, 0, $), w();
y = Ht(e.x - r.width - i, 0, b), g();
break;
}
case "RIGHT": {
b = Ft(u + n, i, $), w();
y = Ht(u + i, n, b), g();
break;

@@ -586,33 +608,33 @@ }

}
return l.x = le(b), l.y = le(c), { style: l, alignment: p || "CENTER" };
}, qo = (o, t) => {
let e, s;
return ({ step: i }, r, n, a) => {
if (n.width === 0 || n.height === 0 || !r)
return a.x = se(y), a.y = se(w), { style: a, alignment: c || "CENTER" };
}, rr = (o, t) => {
let e, r;
return ({ step: n }, s, i, l) => {
if (i.width === 0 || i.height === 0 || !s)
return;
const l = O(t.popover), p = l.offset, c = so(l.position), b = O(t.highlight), { padding: u, borderWidth: _ } = b, h = O(r), w = i == null ? void 0 : i.id, v = c[0], $ = c[1], m = re(o), [T, x] = ne(u, a), B = T + p + _, M = x + p + _, N = h === pt ? "SCREEN" : Xo(h, n, v, B, M, m), { style: k, alignment: C } = Uo(
N,
$ === e ? s : $,
h,
n,
p,
m,
B,
M
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,
s,
i,
c,
b,
x,
L
);
return e = $, s = C, {
orientation: N,
alignment: C,
stepId: w,
stepOrientation: v,
style: k
return e = v, r = B, {
orientation: E,
alignment: B,
stepId: f,
stepOrientation: g,
style: K
};
};
};
function Zo(o) {
jt(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 Jo(o) {
let t, e, s, i, r, n, a, l, p, c, b;
e = new Ko({});
function nr(o) {
let t, e, r, n, s, i, l, a, c, w, y;
e = new Qo({});
var u = (

@@ -622,14 +644,14 @@ /*$popoverComponent$*/

);
function _(h, w) {
function _(f, g) {
return {};
}
return u && (r = de(u, _()), r.$on(
return u && (s = ce(u, _()), s.$on(
"close",
/*onClose*/
o[18]
), r.$on(
), s.$on(
"previous",
/*onPrev*/
o[16]
), r.$on(
), s.$on(
"next",

@@ -640,5 +662,5 @@ /*onNext*/

c() {
t = U("div"), kt(e.$$.fragment), s = et(), i = U("div"), r && kt(r.$$.fragment), P(i, "class", n = "thisway-popover__container " + /*$popoverClassName$*/
o[6]), P(t, "class", l = "thisway " + /*$className$*/
o[2]), Y(
t = Z("div"), $t(e.$$.fragment), r = st(), n = Z("div"), s && $t(s.$$.fragment), T(n, "class", i = "thisway-popover__container " + /*$popoverClassName$*/
o[6]), T(t, "class", a = "thisway " + /*$className$*/
o[2]), G(
t,

@@ -648,3 +670,3 @@ "position",

o[0]
), Y(
), G(
t,

@@ -654,3 +676,3 @@ "display",

o[3] ? "block" : "none"
), Y(
), G(
t,

@@ -660,3 +682,3 @@ "z-index",

o[4]
), Y(
), G(
t,

@@ -666,3 +688,3 @@ "--thisway-color-primary",

o[5].primaryColor
), Y(
), G(
t,

@@ -672,3 +694,3 @@ "--thisway-color-text",

o[5].textColor
), Y(
), G(
t,

@@ -680,5 +702,5 @@ "--thisway-color-desc",

},
m(h, w) {
j(h, t, w), Tt(e, t, null), K(t, s), K(t, i), r && Tt(r, i, null), o[20](i), p = !0, c || (b = [
It(
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(
window,

@@ -689,210 +711,210 @@ "keydown",

),
je(a = eo.call(
Re(l = to.call(
null,
i,
n,
/*$popoverStyle$*/
o[7]
))
], c = !0);
], w = !0);
},
p(h, w) {
if (w[0] & /*$popoverComponent$*/
p(f, g) {
if (g[0] & /*$popoverComponent$*/
256 && u !== (u = /*$popoverComponent$*/
h[8])) {
if (r) {
lt();
const v = r;
R(v.$$.fragment, 1, 0, () => {
St(v, 1);
}), ct();
f[8])) {
if (s) {
ct();
const v = s;
M(v.$$.fragment, 1, 0, () => {
xt(v, 1);
}), pt();
}
u ? (r = de(u, _()), r.$on(
u ? (s = ce(u, _()), s.$on(
"close",
/*onClose*/
h[18]
), r.$on(
f[18]
), s.$on(
"previous",
/*onPrev*/
h[16]
), r.$on(
f[16]
), s.$on(
"next",
/*onNext*/
h[17]
), kt(r.$$.fragment), S(r.$$.fragment, 1), Tt(r, i, null)) : r = null;
f[17]
), $t(s.$$.fragment), k(s.$$.fragment, 1), Ct(s, n, null)) : s = null;
}
(!p || w[0] & /*$popoverClassName$*/
64 && n !== (n = "thisway-popover__container " + /*$popoverClassName$*/
h[6])) && P(i, "class", n), a && We(a.update) && w[0] & /*$popoverStyle$*/
128 && a.update.call(
(!c || g[0] & /*$popoverClassName$*/
64 && i !== (i = "thisway-popover__container " + /*$popoverClassName$*/
f[6])) && T(n, "class", i), l && Fe(l.update) && g[0] & /*$popoverStyle$*/
128 && l.update.call(
null,
/*$popoverStyle$*/
h[7]
), (!p || w[0] & /*$className$*/
4 && l !== (l = "thisway " + /*$className$*/
h[2])) && P(t, "class", l), w[0] & /*position*/
1 && Y(
f[7]
), (!c || g[0] & /*$className$*/
4 && a !== (a = "thisway " + /*$className$*/
f[2])) && T(t, "class", a), g[0] & /*position*/
1 && G(
t,
"position",
/*position*/
h[0]
), w[0] & /*$step$*/
8 && Y(
f[0]
), g[0] & /*$step$*/
8 && G(
t,
"display",
/*$step$*/
h[3] ? "block" : "none"
), w[0] & /*$zIndex$*/
16 && Y(
f[3] ? "block" : "none"
), g[0] & /*$zIndex$*/
16 && G(
t,
"z-index",
/*$zIndex$*/
h[4]
), w[0] & /*$theme$*/
32 && Y(
f[4]
), g[0] & /*$theme$*/
32 && G(
t,
"--thisway-color-primary",
/*$theme$*/
h[5].primaryColor
), w[0] & /*$theme$*/
32 && Y(
f[5].primaryColor
), g[0] & /*$theme$*/
32 && G(
t,
"--thisway-color-text",
/*$theme$*/
h[5].textColor
), w[0] & /*$theme$*/
32 && Y(
f[5].textColor
), g[0] & /*$theme$*/
32 && G(
t,
"--thisway-color-desc",
/*$theme$*/
h[5].descColor
f[5].descColor
);
},
i(h) {
p || (S(e.$$.fragment, h), r && S(r.$$.fragment, h), p = !0);
i(f) {
c || (k(e.$$.fragment, f), s && k(s.$$.fragment, f), c = !0);
},
o(h) {
R(e.$$.fragment, h), r && R(r.$$.fragment, h), p = !1;
o(f) {
M(e.$$.fragment, f), s && M(s.$$.fragment, f), c = !1;
},
d(h) {
h && W(t), St(e), r && St(r), o[20](null), c = !1, Co(b);
d(f) {
f && R(t), xt(e), s && xt(s), o[20](null), w = !1, Ao(y);
}
};
}
function Qo(o, t, e) {
let s, i, r, n, a, l, p, { position: c = "fixed" } = t, b;
const u = H(Jt), _ = H(Qt), h = H(oe), w = Je(), v = H(Xe), $ = H(se), m = F($, "step");
I(o, m, (g) => e(3, i = g));
const T = F($, "index"), x = L([m, u], ([g, G]) => {
if (g)
return h.getPopoverComponent(g, G);
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]) => {
if (d)
return f.getPopoverComponent(d, H);
});
I(o, x, (g) => e(8, p = g));
const B = F(u, "zIndex", 1e4);
I(o, B, (g) => e(4, r = g));
const M = F(u, "className", "");
I(o, M, (g) => e(2, s = g));
const N = F(w, "className", "");
I(o, N, (g) => e(6, a = g));
const k = H(ee), C = F(k, "style");
let E, f, A, q = -1;
const it = () => {
const g = O(m);
return !(g != null && g.survey || g != null && g.media);
}, Z = () => it() ? void 0 : "MoveIn", ht = (g, G, nt) => {
const tt = nt ? g.width : -G.width, Gt = (g.height - G.height) / 2;
return { x: tt, y: Gt };
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($);
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;
return { x: rt, y: Yt };
};
let ot = !0;
const y = L(
C,
(g, G) => {
const nt = O($).index;
if (!g) {
G(qt);
let et = !0;
const Y = I(
N,
(d, H) => {
const at = S(b).index;
if (!d) {
H(qt);
return;
}
const tt = re(h), Gt = O(v), Bt = { x: g.x, y: g.y };
let io = Z();
if (q === -1 || q < nt ? ot = !0 : q > nt && (ot = !1), io) {
const ut = ht(tt, Gt, ot), Vt = Math.max(Math.abs(Bt.x - ut.x), Math.abs(Bt.y - ut.y)) / 1e3 * 600;
!f || q !== O(T) ? f = Ot(ut, { duration: Vt, easing: Pt }) : ut.y !== O(f).y && (f = Ot(
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(
{
x: O(f).x,
x: S(p).x,
y: ut.y
},
{ duration: Vt, easing: Pt }
)), A = f;
{ duration: Vt, easing: kt }
)), C = p;
} else
E || (G(g), E = Ot(Bt, { duration: 300, easing: Pt })), A = E;
const no = A.subscribe(({ x: ut, y: Vt }) => {
G({ ...g, x: ut, y: Vt });
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 });
});
return A.set(Bt), q = nt, no;
return C.set(Bt), J = at, io;
},
qt
), V = L(y, (g) => {
const G = Ro(g);
return O(w).showPopover === !1 && it() && (G.visibility = "hidden"), G;
), F = I(Y, (d) => {
const H = jo(d);
return S(g).showPopover === !1 && m() && (H.visibility = "hidden"), H;
});
I(o, V, (g) => e(7, l = g));
const z = Qe();
I(o, z, (g) => e(5, n = g));
const J = H(Rt), { onPrev: X, onNext: D, onClose: dt } = J, ft = (g) => {
if (!J.isActive() || O(u).keyboardControl === !1)
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)
return;
const G = h.onKeydown ? h.onKeydown(g) : Bo(g);
J.applyAction(G);
}, d = L($, ({ element: g }, G) => {
if (!g || g === pt || O(u).interactive === !1 || O(w).position === "SCREEN")
return Ct;
const nt = g.ownerDocument.defaultView;
return _t(nt, "click", (tt) => {
G(tt), !(tt.target === document.body || !qe(tt.target) || !Re(tt.target) || Be(tt.target) || !g.contains(tt.target)) && D();
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 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();
});
}).subscribe(Ct);
}).subscribe(Ot);
co(() => {
_.set(b);
}), Le(() => {
_.set(void 0), d();
_.set(y);
}), Ne(() => {
_.set(void 0), h();
});
function Q(g) {
Ye[g ? "unshift" : "push"](() => {
b = g, e(1, b);
function tt(d) {
je[d ? "unshift" : "push"](() => {
y = d, e(1, y);
});
}
return o.$$set = (g) => {
"position" in g && e(0, c = g.position);
return o.$$set = (d) => {
"position" in d && e(0, w = d.position);
}, [
c,
b,
w,
y,
r,
n,
s,
i,
r,
n,
l,
a,
l,
p,
m,
c,
$,
x,
B,
M,
N,
V,
L,
E,
K,
F,
z,
X,
D,
dt,
ft,
Q
q,
yt,
ht,
tt
];
}
class ts extends Et {
class ar extends St {
constructor(t) {
super(), At(this, t, Qo, Jo, Nt, { position: 0 }, Zo, [-1, -1]);
super(), Pt(this, t, ir, nr, Et, { position: 0 }, sr, [-1, -1]);
}
}
async function es(o, t) {
async function lr(o, t) {
o.length !== 0 && await Promise.all(
o.map(({ el: e, top: s, left: i }) => e.scrollTop == s && e.scrollLeft == i ? Promise.resolve() : new Promise((r) => {
const n = Math.max(Math.abs(s - e.scrollTop), Math.abs(i - e.scrollLeft)), a = Ot(
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(
{

@@ -903,15 +925,15 @@ x: e.scrollLeft,

{
duration: Math.min(n, 200),
duration: Math.min(i, 200),
// 300ms maximum
easing: Pt
easing: kt
}
), l = a.subscribe(({ x: c, y: b }) => {
e.scrollLeft = c, e.scrollTop = b, c === i && b === s && p();
), a = l.subscribe(({ x: w, y }) => {
e.scrollLeft = w, e.scrollTop = y, w === n && y === r && c();
});
function p() {
l(), r();
function c() {
a(), s();
}
ie(t, p), a.set({
x: i,
y: s
Ut(t, c), l.set({
x: n,
y: r
});

@@ -921,99 +943,114 @@ }))

}
function os(o, t, e, s, i, r, n) {
const a = (o == null ? void 0 : o.scrollOffset) || {}, l = e ? mo[e] : "nearest", p = s ? s.toLocaleLowerCase() : "nearest", { padding: c, borderWidth: b } = r, u = (i.offset < 10 ? 10 : i.offset) + b, _ = {
left: u + (a.left || 0),
right: u + (a.right || 0),
top: u + (a.top || 0),
bottom: u + (a.bottom || 0)
function cr(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);
return {
elementBounding$: I(
[o, t, s, l],
([
u,
_,
f
/* 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);
});
Ut($, L);
}), () => {
$.abort();
};
async function P() {
let x = [], L = [];
const E = !v || ft(v) ? [] : b != null && b.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, $);
}
return Be(i, (Y) => {
if (!v)
return;
let F;
const z = vo(() => {
if ($.signal.aborted)
return;
if (ft(v)) {
F = void 0, Y(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)
];
z(), Ut($, () => {
Xe(ot);
});
});
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)
};
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
};
}
}
}
),
placement$: a
};
let h = "nearest", w = "nearest";
e && e !== "OVER" && (yo.includes(e) ? (h = l, w = p, _[e.toLocaleLowerCase()] += (t == null ? void 0 : t.height) || 0) : (h = p, w = l, _[e.toLocaleLowerCase()] += (t == null ? void 0 : t.width) || 0));
const v = Zt(n);
return _.left = pe(_.left, 0, v) + c, _.right = pe(_.right, 0, v) + c, _.top = he(0, _.top, v) + c, _.bottom = he(0, _.bottom, v) + c, {
scrollMode: "if-needed",
block: h,
inline: w,
offset: _
};
}
async function ss(o, t, e, s, i, r, n, a, l) {
let p = [], c = [];
const { highlight: b, popover: u } = s, _ = O(b), h = O(u), w = so(h.position), v = w[0], $ = w[1];
if (o !== pt) {
({ elements: p, iframes: c } = Eo(o, !0, r));
const m = os(
t,
e,
v,
$,
h,
_,
i
), T = Ao(p, c, o, m);
await es(T, l);
}
return gt(a && gt(a), (m) => {
if (!o)
return;
const T = [];
let x = Ct;
if (o === pt || v === "SCREEN") {
x = ce(() => {
l.signal.aborted || m(gt(pt));
});
for (const B of c) {
const { contentWindow: M } = B;
M && T.push(_t(window, "resize", x));
}
} else {
const B = t != null && t.onlyHighlightChildren ? Array.from(o.children) : [o], M = () => jo(No(fo(B), c), i);
let N;
x = ce(() => {
if (l.signal.aborted)
return;
const k = M(), C = k.width === 0 || k.height === 0;
N && k.width === N.width && k.height === N.height && (C || k.x === N.x && k.y === N.y) || (N = k, m(C ? gt(pt) : gt(k)));
}), T.push(
...B.map((k) => Ve(k, () => {
const C = k.getBoundingClientRect();
C.width === 0 && C.height === 0 || x();
}))
);
for (const k of c) {
const { contentWindow: C } = k;
C && T.push(_t(C.window, "resize", x), _t(C.window, "scroll", x));
}
}
T.push(
_t(window, "resize", x),
_t(window, "scroll", x),
n.subscribe(x)
), x(), ie(l, () => {
Ue(T);
});
});
}
const rs = (o, t) => {
const pr = (o, t) => {
let e;
const { activeStep$: s, activeIndex$: i } = o;
return L(
s,
(r, n) => {
const a = O(i);
if (!r || !Dt(a))
const { activeStep$: r, activeIndex$: n } = o;
return I(
r,
(s, i) => {
const l = S(n);
if (!s || !Dt(l))
return;
n({
i({
element: void 0,
step: r,
index: a
step: s,
index: l
});
const l = new AbortController();
return t.waitForElement(r, l).then((p) => {
l.signal.aborted || (n({
element: p ?? pt,
step: r,
index: a
}), t.afterStepChanged && t.afterStepChanged(r.id, e == null ? void 0 : e.id));
const a = new AbortController();
return t.waitForElement(s, a).then((c) => {
a.signal.aborted || (i({
element: c ?? Kt,
step: s,
index: l
}), t.afterStepChanged && t.afterStepChanged(s.id, e == null ? void 0 : e.id));
}), () => {
e = r, l.abort();
e = s, a.abort();
};

@@ -1027,26 +1064,26 @@ },

);
}, is = (o) => L(o, (t, e) => t ? Ve(t, () => {
}, hr = (o) => I(o, (t, e) => t ? xo(t, () => {
e(t.getBoundingClientRect());
}) : (e(wo), Ct));
class ns extends Mo {
constructor(e, s, i, r) {
}) : (e(Co), Ot));
class fr extends Ro {
constructor(e, r, n, s) {
super(e);
st(this, "subscriptions", []);
st(this, "view");
st(this, "delegate");
st(this, "updatePositionSignal$", wt(0));
st(this, "renderState$");
st(this, "onPrev", () => {
nt(this, "subscriptions", []);
nt(this, "view");
nt(this, "delegate");
nt(this, "updatePositionSignal$", dt(0));
nt(this, "renderState$");
nt(this, "onPrev", () => {
this.goPrevStep();
});
st(this, "onNext", async () => {
var s, i;
const e = O(to(this.store, this.store.effectiveIndex$));
nt(this, "onNext", async () => {
var r, n;
const e = S(Qe(this.store, this.store.effectiveIndex$));
if (e) {
const r = (s = this.getActiveStep().step) == null ? void 0 : s.id;
const s = (r = this.getActiveStep().step) == null ? void 0 : r.id;
if (this.delegate.beforeStepChange) {
const n = new AbortController();
if (await this.delegate.beforeStepChange(e.id, r, n).catch(() => {
n.abort();
}), n.signal.aborted || ((i = this.getActiveStep().step) == null ? void 0 : i.id) !== r)
const i = new AbortController();
if (await this.delegate.beforeStepChange(e.id, s, i).catch(() => {
i.abort();
}), i.signal.aborted || ((n = this.getActiveStep().step) == null ? void 0 : n.id) !== s)
return;

@@ -1058,54 +1095,24 @@ }

});
st(this, "onClose", () => {
nt(this, "onClose", () => {
this.delegate.onClose ? this.delegate.onClose() : this.dispose();
});
this.delegate = s;
const n = ze(s), a = [], l = rs(e, s);
this.renderState$ = l;
const p = F(l, "step"), c = as(r, p), b = {
popover: c("popover", bo),
highlight: c("highlight", $o),
theme: L(c("theme", {}), Ho)
}, u = wt(void 0), _ = is(u);
let h;
const w = s.transform$ ?? oo, v = F(b.popover, "position"), $ = wt(void 0), m = qo(s, b), T = L(
[l, _, w, v],
([
M,
N,
k
/* position */
], C) => {
const { element: E, step: f } = M;
if (!E || !f)
return Ct;
const A = new AbortController();
return ss(
E,
f,
N,
b,
k,
uo(s.window),
this.updatePositionSignal$,
h,
A
).then((q) => {
const it = q.subscribe((Z) => {
const ht = Z && O(Z);
C(Z), h = ht;
const ot = m(M, Z, N, k);
ot && $.set(ot);
});
ie(A, it);
}), () => {
A.abort();
};
}
), x = s.getTotalCount(e), B = Ge(i);
B.set(Rt, this).set(Ke, T).set(Jt, r).set(Qt, u).set(Xe, _).set(te, x).set(oe, s).set(se, l).set(Yt, b).set(ee, $), this.subscriptions = a, this.view = new ts({
target: n,
context: B,
this.delegate = r;
const i = Ke(r), l = [], a = pr(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(
a,
_,
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({
target: i,
context: b,
props: {
position: n.tagName.toLowerCase() === "body" ? "fixed" : "absolute"
position: i.tagName.toLowerCase() === "body" ? "fixed" : "absolute"
}

@@ -1134,82 +1141,82 @@ });

getCurrentElement() {
const { element: e } = O(this.renderState$);
return e === pt ? void 0 : e;
const { element: e } = S(this.renderState$);
return ft(e) ? void 0 : e;
}
dispose() {
var e;
Ue(this.subscriptions), (e = this.view) == null || e.$destroy();
Xe(this.subscriptions), (e = this.view) == null || e.$destroy();
}
}
function as(o, t) {
return (e, s) => {
const i = F(o, e), r = F(t, e);
return L([i, r], (n) => Fo(s, ...n));
function ur(o, t) {
return (e, r) => {
const n = j(o, e), s = j(t, e);
return I([n, s], (i) => Ko(r, ...i));
};
}
function ls(o) {
jt(o, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}");
function dr(o) {
Ft(o, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}");
}
function cs(o) {
function wr(o) {
let t, e;
return {
c() {
t = U("div"), e = Mt(
t = Z("div"), e = Nt(
/*$progress$*/
o[0]
), P(t, "class", "thisway-progress");
), T(t, "class", "thisway-progress");
},
m(s, i) {
j(s, t, i), K(t, e);
m(r, n) {
D(r, t, n), U(t, e);
},
p(s, [i]) {
i & /*$progress$*/
1 && Lt(
p(r, [n]) {
n & /*$progress$*/
1 && It(
e,
/*$progress$*/
s[0]
r[0]
);
},
i: vt,
o: vt,
d(s) {
s && W(t);
i: wt,
o: wt,
d(r) {
r && R(t);
}
};
}
function ps(o, t, e) {
let s;
const i = H(te), r = Po(), n = L([r, i], ([a, l]) => l > 1 ? `${a + 1}/${l}` : "");
return I(o, n, (a) => e(0, s = a)), [s, n];
function gr(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];
}
class ro extends Et {
class so extends St {
constructor(t) {
super(), At(this, t, ps, cs, Nt, {}, ls);
super(), Pt(this, t, gr, wr, Et, {}, dr);
}
}
function hs(o) {
jt(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 _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}");
}
const fs = (o) => ({}), ye = (o) => ({}), ds = (o) => ({}), be = (o) => ({}), us = (o) => ({}), $e = (o) => ({}), ws = (o) => ({}), Ce = (o) => ({}), gs = (o) => ({}), xe = (o) => ({});
function ke(o) {
let t, e, s, i, r, n, a, l, p, c, b, u, _, h, w, v, $ = (
const vr = (o) => ({}), _e = (o) => ({}), mr = (o) => ({}), ve = (o) => ({}), yr = (o) => ({}), me = (o) => ({}), br = (o) => ({}), ye = (o) => ({}), $r = (o) => ({}), be = (o) => ({});
function $e(o) {
let t, e, r, n, s, i, l, a, c, w, y, u, _, f, g, v, b = (
/*$showCloseButton$*/
o[6] && Te(o)
), m = (
o[6] && Ce(o)
), $ = (
/*$$slots*/
(o[28].title || /*$title$*/
o[1]) && Se(o)
), T = (
o[1]) && xe(o)
), P = (
/*$$slots*/
(o[28].description || /*$description$*/
o[2]) && Oe(o)
o[2]) && ke(o)
), x = (
/*$layout$*/
o[4] !== xt && /*$showProgress$*/
o[7] && Pe()
o[4] !== bt && /*$showProgress$*/
o[7] && Te()
);
const B = (
const L = (
/*#slots*/
o[30].default
), M = mt(
B,
), E = gt(
L,
o,

@@ -1219,24 +1226,24 @@ /*$$scope*/

null
), N = (
), K = (
/*#slots*/
o[30].footer
), k = mt(
N,
), B = gt(
K,
o,
/*$$scope*/
o[29],
$e
me
);
let C = (
let N = (
/*$layout$*/
o[4] === xt && /*$showProgress$*/
o[7] && Ee()
), E = (
o[4] === bt && /*$showProgress$*/
o[7] && Oe()
), O = (
/*$showCtrlBtns$*/
o[8] && Ae(o)
o[8] && Se(o)
);
return {
c() {
t = U("div"), e = U("div"), i = et(), $ && $.c(), r = et(), m && m.c(), n = et(), T && T.c(), a = et(), x && x.c(), l = et(), M && M.c(), p = et(), c = U("div"), k && k.c(), b = et(), C && C.c(), u = et(), _ = U("div"), h = et(), E && E.c(), P(e, "class", s = "thisway-popover__arrow " + /*$arrowClass$*/
o[5]), P(_, "class", "thisway-stretch"), P(c, "class", "thisway-popover-footer"), P(t, "class", w = "thisway-popover " + /*$popoverClass$*/
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$*/
o[3] + " thisway-popover__" + /*$layout$*/

@@ -1246,94 +1253,94 @@ o[4] + " " + /*cssClassName*/

},
m(f, A) {
j(f, t, A), K(t, e), K(t, i), $ && $.m(t, null), K(t, r), m && m.m(t, null), K(t, n), T && T.m(t, null), K(t, a), x && x.m(t, null), K(t, l), M && M.m(t, null), K(t, p), K(t, c), k && k.m(c, null), K(c, b), C && C.m(c, null), K(c, u), K(c, _), K(c, h), E && E.m(c, null), v = !0;
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;
},
p(f, A) {
(!v || A[0] & /*$arrowClass$*/
32 && s !== (s = "thisway-popover__arrow " + /*$arrowClass$*/
f[5])) && P(e, "class", s), /*$showCloseButton$*/
f[6] ? $ ? $.p(f, A) : ($ = Te(f), $.c(), $.m(t, r)) : $ && ($.d(1), $ = null), /*$$slots*/
f[28].title || /*$title$*/
f[1] ? m ? (m.p(f, A), A[0] & /*$$slots, $title$*/
268435458 && S(m, 1)) : (m = Se(f), m.c(), S(m, 1), m.m(t, n)) : m && (lt(), R(m, 1, 1, () => {
m = null;
}), ct()), /*$$slots*/
f[28].description || /*$description$*/
f[2] ? T ? (T.p(f, A), A[0] & /*$$slots, $description$*/
268435460 && S(T, 1)) : (T = Oe(f), T.c(), S(T, 1), T.m(t, a)) : T && (lt(), R(T, 1, 1, () => {
T = null;
}), ct()), /*$layout$*/
f[4] !== xt && /*$showProgress$*/
f[7] ? x ? A[0] & /*$layout$, $showProgress$*/
144 && S(x, 1) : (x = Pe(), x.c(), S(x, 1), x.m(t, l)) : x && (lt(), R(x, 1, 1, () => {
p(p, C) {
(!v || C[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[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, () => {
$ = null;
}), pt()), /*$$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;
}), ct()), M && M.p && (!v || A[0] & /*$$scope*/
536870912) && yt(
M,
B,
f,
}), pt()), E && E.p && (!v || C[0] & /*$$scope*/
536870912) && _t(
E,
L,
p,
/*$$scope*/
f[29],
v ? $t(
B,
p[29],
v ? mt(
L,
/*$$scope*/
f[29],
A,
p[29],
C,
null
) : bt(
) : vt(
/*$$scope*/
f[29]
p[29]
),
null
), k && k.p && (!v || A[0] & /*$$scope*/
536870912) && yt(
k,
N,
f,
), B && B.p && (!v || C[0] & /*$$scope*/
536870912) && _t(
B,
K,
p,
/*$$scope*/
f[29],
v ? $t(
N,
p[29],
v ? mt(
K,
/*$$scope*/
f[29],
A,
us
) : bt(
p[29],
C,
yr
) : vt(
/*$$scope*/
f[29]
p[29]
),
$e
me
), /*$layout$*/
f[4] === xt && /*$showProgress$*/
f[7] ? C ? A[0] & /*$layout$, $showProgress$*/
144 && S(C, 1) : (C = Ee(), C.c(), S(C, 1), C.m(c, u)) : C && (lt(), R(C, 1, 1, () => {
C = null;
}), ct()), /*$showCtrlBtns$*/
f[8] ? E ? (E.p(f, A), A[0] & /*$showCtrlBtns$*/
256 && S(E, 1)) : (E = Ae(f), E.c(), S(E, 1), E.m(c, null)) : E && (lt(), R(E, 1, 1, () => {
E = null;
}), ct()), (!v || A[0] & /*$popoverClass$, $layout$, cssClassName*/
25 && w !== (w = "thisway-popover " + /*$popoverClass$*/
f[3] + " thisway-popover__" + /*$layout$*/
f[4] + " " + /*cssClassName*/
f[0])) && P(t, "class", w);
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[3] + " thisway-popover__" + /*$layout$*/
p[4] + " " + /*cssClassName*/
p[0])) && T(t, "class", g);
},
i(f) {
v || (S(m), S(T), S(x), S(M, f), S(k, f), S(C), S(E), v = !0);
i(p) {
v || (k($), k(P), k(x), k(E, p), k(B, p), k(N), k(O), v = !0);
},
o(f) {
R(m), R(T), R(x), R(M, f), R(k, f), R(C), R(E), v = !1;
o(p) {
M($), M(P), M(x), M(E, p), M(B, p), M(N), M(O), v = !1;
},
d(f) {
f && W(t), $ && $.d(), m && m.d(), T && T.d(), x && x.d(), M && M.d(f), k && k.d(f), C && C.d(), E && E.d();
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();
}
};
}
function Te(o) {
let t, e, s;
function Ce(o) {
let t, e, r;
return {
c() {
t = U("button"), t.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 10.586l-4.293-4.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293a1 1 0 0 0-1.414-1.414L12 10.586z"></path></svg>', P(t, "class", "thisway-popover-close");
t = Z("button"), t.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 10.586l-4.293-4.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293a1 1 0 0 0-1.414-1.414L12 10.586z"></path></svg>', T(t, "class", "thisway-popover-close");
},
m(i, r) {
j(i, t, r), e || (s = It(
m(n, s) {
D(n, t, s), e || (r = At(
t,

@@ -1345,65 +1352,65 @@ "click",

},
p: vt,
d(i) {
i && W(t), e = !1, s();
p: wt,
d(n) {
n && R(t), e = !1, r();
}
};
}
function Se(o) {
function xe(o) {
let t, e;
const s = (
const r = (
/*#slots*/
o[30].title
), i = mt(
s,
), n = gt(
r,
o,
/*$$scope*/
o[29],
xe
), r = i || _s(o);
be
), s = n || Cr(o);
return {
c() {
t = U("header"), r && r.c(), P(t, "class", "thisway-popover-title");
t = Z("header"), s && s.c(), T(t, "class", "thisway-popover-title");
},
m(n, a) {
j(n, t, a), r && r.m(t, null), e = !0;
m(i, l) {
D(i, t, l), s && s.m(t, null), e = !0;
},
p(n, a) {
i ? i.p && (!e || a[0] & /*$$scope*/
536870912) && yt(
p(i, l) {
n ? n.p && (!e || l[0] & /*$$scope*/
536870912) && _t(
n,
r,
i,
s,
n,
/*$$scope*/
n[29],
e ? $t(
s,
i[29],
e ? mt(
r,
/*$$scope*/
n[29],
a,
gs
) : bt(
i[29],
l,
$r
) : vt(
/*$$scope*/
n[29]
i[29]
),
xe
) : r && r.p && (!e || a[0] & /*$title$*/
2) && r.p(n, e ? a : [-1, -1]);
be
) : s && s.p && (!e || l[0] & /*$title$*/
2) && s.p(i, e ? l : [-1, -1]);
},
i(n) {
e || (S(r, n), e = !0);
i(i) {
e || (k(s, i), e = !0);
},
o(n) {
R(r, n), e = !1;
o(i) {
M(s, i), e = !1;
},
d(n) {
n && W(t), r && r.d(n);
d(i) {
i && R(t), s && s.d(i);
}
};
}
function _s(o) {
function Cr(o) {
let t;
return {
c() {
t = Mt(
t = Nt(
/*$title$*/

@@ -1413,8 +1420,8 @@ o[1]

},
m(e, s) {
j(e, t, s);
m(e, r) {
D(e, t, r);
},
p(e, s) {
s[0] & /*$title$*/
2 && Lt(
p(e, r) {
r[0] & /*$title$*/
2 && It(
t,

@@ -1426,63 +1433,63 @@ /*$title$*/

d(e) {
e && W(t);
e && R(t);
}
};
}
function Oe(o) {
function ke(o) {
let t, e;
const s = (
const r = (
/*#slots*/
o[30].description
), i = mt(
s,
), n = gt(
r,
o,
/*$$scope*/
o[29],
Ce
), r = i || vs(o);
ye
), s = n || xr(o);
return {
c() {
t = U("div"), r && r.c(), P(t, "class", "thisway-popover-description");
t = Z("div"), s && s.c(), T(t, "class", "thisway-popover-description");
},
m(n, a) {
j(n, t, a), r && r.m(t, null), e = !0;
m(i, l) {
D(i, t, l), s && s.m(t, null), e = !0;
},
p(n, a) {
i ? i.p && (!e || a[0] & /*$$scope*/
536870912) && yt(
p(i, l) {
n ? n.p && (!e || l[0] & /*$$scope*/
536870912) && _t(
n,
r,
i,
s,
n,
/*$$scope*/
n[29],
e ? $t(
s,
i[29],
e ? mt(
r,
/*$$scope*/
n[29],
a,
ws
) : bt(
i[29],
l,
br
) : vt(
/*$$scope*/
n[29]
i[29]
),
Ce
) : r && r.p && (!e || a[0] & /*$description$*/
4) && r.p(n, e ? a : [-1, -1]);
ye
) : s && s.p && (!e || l[0] & /*$description$*/
4) && s.p(i, e ? l : [-1, -1]);
},
i(n) {
e || (S(r, n), e = !0);
i(i) {
e || (k(s, i), e = !0);
},
o(n) {
R(r, n), e = !1;
o(i) {
M(s, i), e = !1;
},
d(n) {
n && W(t), r && r.d(n);
d(i) {
i && R(t), s && s.d(i);
}
};
}
function vs(o) {
function xr(o) {
let t;
return {
c() {
t = Mt(
t = Nt(
/*$description$*/

@@ -1492,8 +1499,8 @@ o[2]

},
m(e, s) {
j(e, t, s);
m(e, r) {
D(e, t, r);
},
p(e, s) {
s[0] & /*$description$*/
4 && Lt(
p(e, r) {
r[0] & /*$description$*/
4 && It(
t,

@@ -1505,101 +1512,101 @@ /*$description$*/

d(e) {
e && W(t);
e && R(t);
}
};
}
function Pe(o) {
function Te(o) {
let t, e;
return t = new ro({}), {
return t = new so({}), {
c() {
kt(t.$$.fragment);
$t(t.$$.fragment);
},
m(s, i) {
Tt(t, s, i), e = !0;
m(r, n) {
Ct(t, r, n), e = !0;
},
i(s) {
e || (S(t.$$.fragment, s), e = !0);
i(r) {
e || (k(t.$$.fragment, r), e = !0);
},
o(s) {
R(t.$$.fragment, s), e = !1;
o(r) {
M(t.$$.fragment, r), e = !1;
},
d(s) {
St(t, s);
d(r) {
xt(t, r);
}
};
}
function Ee(o) {
function Oe(o) {
let t, e;
return t = new ro({}), {
return t = new so({}), {
c() {
kt(t.$$.fragment);
$t(t.$$.fragment);
},
m(s, i) {
Tt(t, s, i), e = !0;
m(r, n) {
Ct(t, r, n), e = !0;
},
i(s) {
e || (S(t.$$.fragment, s), e = !0);
i(r) {
e || (k(t.$$.fragment, r), e = !0);
},
o(s) {
R(t.$$.fragment, s), e = !1;
o(r) {
M(t.$$.fragment, r), e = !1;
},
d(s) {
St(t, s);
d(r) {
xt(t, r);
}
};
}
function Ae(o) {
let t, e, s, i = (
function Se(o) {
let t, e, r, n = (
/*$previousButtonVisible$*/
o[9] && Ne(o)
), r = (
o[9] && Pe(o)
), s = (
/*$hasSteps$*/
o[11] && Ie(o)
o[11] && Ee(o)
);
return {
c() {
i && i.c(), t = et(), r && r.c(), e = Wt();
n && n.c(), t = st(), s && s.c(), e = jt();
},
m(n, a) {
i && i.m(n, a), j(n, t, a), r && r.m(n, a), j(n, e, a), s = !0;
m(i, l) {
n && n.m(i, l), D(i, t, l), s && s.m(i, l), D(i, e, l), r = !0;
},
p(n, a) {
p(i, l) {
/*$previousButtonVisible$*/
n[9] ? i ? (i.p(n, a), a[0] & /*$previousButtonVisible$*/
512 && S(i, 1)) : (i = Ne(n), i.c(), S(i, 1), i.m(t.parentNode, t)) : i && (lt(), R(i, 1, 1, () => {
i = null;
}), ct()), /*$hasSteps$*/
n[11] ? r ? (r.p(n, a), a[0] & /*$hasSteps$*/
2048 && S(r, 1)) : (r = Ie(n), r.c(), S(r, 1), r.m(e.parentNode, e)) : r && (lt(), R(r, 1, 1, () => {
r = null;
}), ct());
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, () => {
n = null;
}), pt()), /*$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, () => {
s = null;
}), pt());
},
i(n) {
s || (S(i), S(r), s = !0);
i(i) {
r || (k(n), k(s), r = !0);
},
o(n) {
R(i), R(r), s = !1;
o(i) {
M(n), M(s), r = !1;
},
d(n) {
n && (W(t), W(e)), i && i.d(n), r && r.d(n);
d(i) {
i && (R(t), R(e)), n && n.d(i), s && s.d(i);
}
};
}
function Ne(o) {
let t, e, s, i;
const r = (
function Pe(o) {
let t, e, r, n;
const s = (
/*#slots*/
o[30].prevText
), n = mt(
r,
), i = gt(
s,
o,
/*$$scope*/
o[29],
be
), a = n || bs(o);
ve
), l = i || Or(o);
return {
c() {
t = U("button"), a && a.c(), P(t, "class", "thisway-popover-prev");
t = Z("button"), l && l.c(), T(t, "class", "thisway-popover-prev");
},
m(l, p) {
j(l, t, p), a && a.m(t, null), e = !0, s || (i = It(
m(a, c) {
D(a, t, c), l && l.m(t, null), e = !0, r || (n = At(
t,

@@ -1609,57 +1616,57 @@ "click",

o[26]
), s = !0);
), r = !0);
},
p(l, p) {
n ? n.p && (!e || p[0] & /*$$scope*/
536870912) && yt(
n,
r,
l,
p(a, c) {
i ? i.p && (!e || c[0] & /*$$scope*/
536870912) && _t(
i,
s,
a,
/*$$scope*/
l[29],
e ? $t(
r,
a[29],
e ? mt(
s,
/*$$scope*/
l[29],
p,
ds
) : bt(
a[29],
c,
mr
) : vt(
/*$$scope*/
l[29]
a[29]
),
be
) : a && a.p && (!e || p[0] & /*$previousText$, $layout$*/
1040) && a.p(l, e ? p : [-1, -1]);
ve
) : l && l.p && (!e || c[0] & /*$previousText$, $layout$*/
1040) && l.p(a, e ? c : [-1, -1]);
},
i(l) {
e || (S(a, l), e = !0);
i(a) {
e || (k(l, a), e = !0);
},
o(l) {
R(a, l), e = !1;
o(a) {
M(l, a), e = !1;
},
d(l) {
l && W(t), a && a.d(l), s = !1, i();
d(a) {
a && R(t), l && l.d(a), r = !1, n();
}
};
}
function ms(o) {
function kr(o) {
let t, e;
return {
c() {
t = Ht("svg"), e = Ht("path"), P(e, "d", "M19 12H6M12 5l-7 7 7 7"), Y(t, "pointer-events", "none"), P(t, "width", "20"), P(t, "height", "14"), P(t, "xmlns", "http://www.w3.org/2000/svg"), P(t, "viewBox", "0 0 24 24"), P(t, "fill", "none"), P(t, "stroke", "currentColor"), P(t, "stroke-width", "2"), P(t, "stroke-linecap", "round"), P(t, "stroke-linejoin", "round");
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");
},
m(s, i) {
j(s, t, i), K(t, e);
m(r, n) {
D(r, t, n), U(t, e);
},
p: vt,
d(s) {
s && W(t);
p: wt,
d(r) {
r && R(t);
}
};
}
function ys(o) {
function Tr(o) {
let t;
return {
c() {
t = Mt(
t = Nt(
/*$previousText$*/

@@ -1669,8 +1676,8 @@ o[10]

},
m(e, s) {
j(e, t, s);
m(e, r) {
D(e, t, r);
},
p(e, s) {
s[0] & /*$previousText$*/
1024 && Lt(
p(e, r) {
r[0] & /*$previousText$*/
1024 && It(
t,

@@ -1682,48 +1689,48 @@ /*$previousText$*/

d(e) {
e && W(t);
e && R(t);
}
};
}
function bs(o) {
function Or(o) {
let t;
function e(r, n) {
function e(s, i) {
return (
/*$layout$*/
r[4] !== He ? ys : ms
s[4] !== De ? Tr : kr
);
}
let s = e(o), i = s(o);
let r = e(o), n = r(o);
return {
c() {
i.c(), t = Wt();
n.c(), t = jt();
},
m(r, n) {
i.m(r, n), j(r, t, n);
m(s, i) {
n.m(s, i), D(s, t, i);
},
p(r, n) {
s === (s = e(r)) && i ? i.p(r, n) : (i.d(1), i = s(r), i && (i.c(), i.m(t.parentNode, t)));
p(s, i) {
r === (r = e(s)) && n ? n.p(s, i) : (n.d(1), n = r(s), n && (n.c(), n.m(t.parentNode, t)));
},
d(r) {
r && W(t), i.d(r);
d(s) {
s && R(t), n.d(s);
}
};
}
function Ie(o) {
let t, e, s, i;
const r = (
function Ee(o) {
let t, e, r, n;
const s = (
/*#slots*/
o[30].nextText
), n = mt(
r,
), i = gt(
s,
o,
/*$$scope*/
o[29],
ye
), a = n || $s(o);
_e
), l = i || Sr(o);
return {
c() {
t = U("button"), a && a.c(), P(t, "class", "thisway-popover-next");
t = Z("button"), l && l.c(), T(t, "class", "thisway-popover-next");
},
m(l, p) {
j(l, t, p), a && a.m(t, null), e = !0, s || (i = It(
m(a, c) {
D(a, t, c), l && l.m(t, null), e = !0, r || (n = At(
t,

@@ -1733,42 +1740,42 @@ "click",

o[27]
), s = !0);
), r = !0);
},
p(l, p) {
n ? n.p && (!e || p[0] & /*$$scope*/
536870912) && yt(
n,
r,
l,
p(a, c) {
i ? i.p && (!e || c[0] & /*$$scope*/
536870912) && _t(
i,
s,
a,
/*$$scope*/
l[29],
e ? $t(
r,
a[29],
e ? mt(
s,
/*$$scope*/
l[29],
p,
fs
) : bt(
a[29],
c,
vr
) : vt(
/*$$scope*/
l[29]
a[29]
),
ye
) : a && a.p && (!e || p[0] & /*$nextButtonText$*/
4096) && a.p(l, e ? p : [-1, -1]);
_e
) : l && l.p && (!e || c[0] & /*$nextButtonText$*/
4096) && l.p(a, e ? c : [-1, -1]);
},
i(l) {
e || (S(a, l), e = !0);
i(a) {
e || (k(l, a), e = !0);
},
o(l) {
R(a, l), e = !1;
o(a) {
M(l, a), e = !1;
},
d(l) {
l && W(t), a && a.d(l), s = !1, i();
d(a) {
a && R(t), l && l.d(a), r = !1, n();
}
};
}
function $s(o) {
function Sr(o) {
let t;
return {
c() {
t = Mt(
t = Nt(
/*$nextButtonText$*/

@@ -1778,8 +1785,8 @@ o[12]

},
m(e, s) {
j(e, t, s);
m(e, r) {
D(e, t, r);
},
p(e, s) {
s[0] & /*$nextButtonText$*/
4096 && Lt(
p(e, r) {
r[0] & /*$nextButtonText$*/
4096 && It(
t,

@@ -1791,8 +1798,8 @@ /*$nextButtonText$*/

d(e) {
e && W(t);
e && R(t);
}
};
}
function Cs(o) {
let t, e, s = (
function Pr(o) {
let t, e, r = (
/*$title$*/

@@ -1802,137 +1809,137 @@ (o[1] || /*$description$*/

o[28].title || /*$$slots*/
o[28].description) && ke(o)
o[28].description) && $e(o)
);
return {
c() {
s && s.c(), t = Wt();
r && r.c(), t = jt();
},
m(i, r) {
s && s.m(i, r), j(i, t, r), e = !0;
m(n, s) {
r && r.m(n, s), D(n, t, s), e = !0;
},
p(i, r) {
p(n, s) {
/*$title$*/
i[1] || /*$description$*/
i[2] || /*$$slots*/
i[28].title || /*$$slots*/
i[28].description ? s ? (s.p(i, r), r[0] & /*$title$, $description$, $$slots*/
268435462 && S(s, 1)) : (s = ke(i), s.c(), S(s, 1), s.m(t.parentNode, t)) : s && (lt(), R(s, 1, 1, () => {
s = null;
}), ct());
n[1] || /*$description$*/
n[2] || /*$$slots*/
n[28].title || /*$$slots*/
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, () => {
r = null;
}), pt());
},
i(i) {
e || (S(s), e = !0);
i(n) {
e || (k(r), e = !0);
},
o(i) {
R(s), e = !1;
o(n) {
M(r), e = !1;
},
d(i) {
i && W(t), s && s.d(i);
d(n) {
n && R(t), r && r.d(n);
}
};
}
function xs(o, t, e) {
let s, i, r, n, a, l, p, c, b, u, _, h, { $$slots: w = {}, $$scope: v } = t;
const $ = xo(w);
let { cssClassName: m = "" } = t;
const T = po(), x = H(Rt), B = Do(), M = H(te), N = H(ee), k = H(Jt), C = L(N, (d) => {
var Q;
return `thisway-popover-${(Q = d == null ? void 0 : d.orientation) == null ? void 0 : Q.toLowerCase()}`;
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);
let { cssClassName: $ = "" } = t;
const P = po(), x = W(Mt), L = Xo(), E = W(Jt), K = W(Qt), B = W(zt), N = I(K, (h) => {
var tt;
return `thisway-popover-${(tt = h == null ? void 0 : h.orientation) == null ? void 0 : tt.toLowerCase()}`;
});
I(o, C, (d) => e(3, r = d));
const E = L(N, (d) => `thisway-popover__arrow-${d == null ? void 0 : d.alignment.toLowerCase()}`);
I(o, E, (d) => e(5, a = d));
const f = Je(), A = L(M, (d) => d > 1);
I(o, A, (d) => e(11, _ = d));
const q = L([A, B], ([d, Q]) => d && (Q || 0) > 0);
I(o, q, (d) => e(9, b = d));
const it = F(f, "title");
I(o, it, (d) => e(1, s = d));
const Z = F(f, "description");
I(o, Z, (d) => e(2, i = d));
const ht = F(f, "showCloseBtn");
I(o, ht, (d) => e(6, l = d));
const ot = F(f, "showCtrlBtns");
I(o, ot, (d) => e(8, c = d));
const y = F(f, "showProgress", !0);
I(o, y, (d) => e(7, p = d));
const V = F(f, "prevBtnText");
I(o, V, (d) => e(10, u = d));
const z = F(k, "layout", xt);
I(o, z, (d) => e(4, n = d));
const J = to(x.store, B), X = L([f, J, B, z], ([d, Q, g, G]) => {
var nt;
if (g === 0)
return d.startBtnText;
if (Q)
if (G === He) {
const tt = ((nt = Q.popover) == null ? void 0 : nt.title) ?? "";
return `${d.nextBtnText} ${tt}`;
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]) => {
var at;
if (d === 0)
return h.startBtnText;
if (tt)
if (H === De) {
const rt = ((at = tt.popover) == null ? void 0 : at.title) ?? "";
return `${h.nextBtnText} ${rt}`;
} else
return d.nextBtnText;
return h.nextBtnText;
else
return d.doneBtnText;
return h.doneBtnText;
});
I(o, X, (d) => e(12, h = d));
const D = () => T("close"), dt = () => T("previous"), ft = () => T("next");
return o.$$set = (d) => {
"cssClassName" in d && e(0, m = d.cssClassName), "$$scope" in d && e(29, v = d.$$scope);
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);
}, [
m,
$,
r,
n,
s,
i,
r,
n,
l,
a,
l,
p,
c,
b,
w,
y,
u,
_,
h,
f,
N,
O,
C,
E,
A,
q,
it,
Z,
ht,
ot,
y,
J,
m,
V,
Q,
et,
Y,
F,
z,
X,
D,
dt,
ft,
$,
q,
yt,
ht,
b,
v,
w
g
];
}
class ks extends Et {
class Ar extends St {
constructor(t) {
super(), At(this, t, xs, Cs, Nt, { cssClassName: 0 }, hs, [-1, -1]);
super(), Pt(this, t, Er, Pr, Et, { cssClassName: 0 }, _r, [-1, -1]);
}
}
class Ts {
class Nr {
constructor(t) {
st(this, "options$");
nt(this, "options$");
this.options$ = t;
}
getTotalCount(t) {
return L(t.effectiveSteps$, (e) => e.length);
return I(t.effectiveSteps$, (e) => e.length);
}
async waitForElement(t) {
return document.querySelector(t.element);
return t.element ? document.querySelector(t.element) : void 0;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getPopoverComponent(t, e) {
return ks;
return Ar;
}
}
class Ss extends ns {
class Ir extends fr {
constructor(t) {
const { steps: e } = t, s = wt(t), i = new Ts(s);
for (const r of [
const { steps: e } = t, r = dt(t), n = new Nr(r);
for (const s of [
"beforeStepChange",

@@ -1945,15 +1952,15 @@ "waitForElement",

]) {
if (!Object.hasOwn(t, r))
if (!Object.hasOwn(t, s))
continue;
const n = t[r];
typeof n == "function" && (i[r] = n);
const i = t[s];
typeof i == "function" && (n[s] = i);
}
super(Lo(Os(e), void 0), i, Ge(), s);
super(Fo(Mr(e), void 0), n, Ye(), r);
}
}
const Os = (o) => {
const Mr = (o) => {
let t = o.length;
const e = /* @__PURE__ */ new Set(), s = (r) => typeof r == "string" || Number.isFinite(r) && !e.has(r), i = (r) => {
if (!e.has(r))
return e.add(r), r;
const e = /* @__PURE__ */ new Set(), r = (s) => typeof s == "string" || Number.isFinite(s) && !e.has(s), n = (s) => {
if (!e.has(s))
return e.add(s), s;
for (; e.has(t); )

@@ -1963,13 +1970,13 @@ t++;

};
for (const r of o)
s(r.id) && e.add(r.id);
return o.map((r, n) => {
const a = s(r.id) ? r.id : i(n);
for (const s of o)
r(s.id) && e.add(s.id);
return o.map((s, i) => {
const l = r(s.id) ? s.id : n(i);
return {
...r,
id: a
...s,
id: l
};
});
}, Ws = (o) => {
const t = new Ss({
}, Ur = (o) => {
const t = new Ir({
steps: [

@@ -1984,49 +1991,49 @@ {

};
function Ps(o) {
const t = H(Qt), { onMount: e, onDestroy: s } = H(Io), i = t.subscribe((r) => {
r ? e(r) : s();
function Lr(o) {
const t = W(Zt), { onMount: e, onDestroy: r } = W(Do), n = t.subscribe((s) => {
s ? e(s) : r();
});
return Le(() => {
i(), s();
return Ne(() => {
n(), r();
}), [];
}
class Ys extends Et {
class qr extends St {
constructor(t) {
super(), At(this, t, Ps, null, Nt, {});
super(), Pt(this, t, Lr, null, Et, {});
}
}
export {
oe as DelegateContext,
Ke as ElementBoundingContext,
Io as ForeignViewContext,
Ys as ForeignViewHost,
Jt as OptionsContext,
ee as PlacementContext,
ks as PopoverCard,
Qt as PopoverContainerContext,
Xe as PopoverSizeContext,
se as RenderStateContext,
Yt as StepOptionsContext,
Mo as StepsController,
Ss as ThisWay,
Ts as ThisWayDefaultDelegate,
te as TotalStepCountContext,
ns as Tour,
Rt as TourContext,
Ge as createContexts,
Lo as createStepsStore,
Bo as defaultKeydownAction,
rt as defineContext,
Ut as findStepIndex,
H as getContext,
js as getHighlightOptions,
to as getNextStep,
Je as getPopoverOptions,
Do as getRenderIndex,
Qe as getTheme,
Ws as highlight,
Fo as mergeStepOption,
Ho as normalizeTheme,
so as parsePlacement,
Hs as setContext
te as DelegateContext,
Ho as ElementBoundingContext,
Do as ForeignViewContext,
qr as ForeignViewHost,
zt as OptionsContext,
Qt as PlacementContext,
Ar as PopoverCard,
Zt as PopoverContainerContext,
Ge as PopoverSizeContext,
ee as RenderStateContext,
Wt as StepOptionsContext,
Ro as StepsController,
Ir as ThisWay,
Nr as ThisWayDefaultDelegate,
Jt as TotalStepCountContext,
fr as Tour,
Mt as TourContext,
Ye as createContexts,
Fo as createStepsStore,
Yo as defaultKeydownAction,
it as defineContext,
Xt as findStepIndex,
W as getContext,
Xr as getHighlightOptions,
Qe as getNextStep,
Ze as getPopoverOptions,
Xo as getRenderIndex,
Je as getTheme,
Ur as highlight,
Ko as mergeStepOption,
Uo as normalizeTheme,
ro as parsePlacement,
Kr as setContext
};

@@ -7,7 +7,6 @@ import type { HighlightOptionsWithDefaultValues, IComputePlacementState, IForeignViewContext, ITourDelegate, NoElement, PopoverOptionsWithDefaultValues, Rect, Step, ThemeOptions, TourOptions } from '@thisway/base';

readonly phantomData: T;
readonly contextTypeBrand: unique symbol;
};
export declare const defineContext: <T>(name: string) => ContextType<T>;
export declare const getContext: <T extends object>(context: ContextType<T>) => T;
export declare const setContext: <T>(context: ContextType<T>, value: T) => void;
export declare function defineContext<T>(name: string): ContextType<T>;
export declare function getContext<T>(context: ContextType<T>): T;
export declare function setContext<T>(context: ContextType<T>, value: T): void;
export interface ITourContexts extends Map<unknown, unknown> {

@@ -21,3 +20,3 @@ readonly contextsBrand: unique symbol;

export declare const OptionsContext: ContextType<Readable<TourOptions>>;
export declare const ElementBoundingContext: ContextType<Readable<Readable<typeof import("@thisway/base").NO_ELEMENT | Rect> | undefined>>;
export declare const ElementBoundingContext: ContextType<Readable<NoElement | Rect | undefined>>;
export declare const PopoverContainerContext: ContextType<Writable<HTMLElement | undefined>>;

@@ -24,0 +23,0 @@ export declare const PopoverSizeContext: ContextType<Readable<Size>>;

@@ -1,5 +0,9 @@

import type { NoElement, Rect, Step } from '@thisway/base';
import { type Size, type Transform } from '@thisway/utils';
/// <reference types="svelte" />
import { type IComputePlacementState, type ITourDelegate } from '@thisway/base';
import { type Size } from '@thisway/utils';
import { type Readable } from 'svelte/store';
import type { IStepOptionsContext } from './context';
export declare function focusElement(element: Element | NoElement, step: Step, popoverSize: Size, stepOptionsContext: IStepOptionsContext, transform: Readonly<Transform>, boundary: Element | null | undefined, updatePositionSignal$: Readable<number>, previousValue: Rect | NoElement | undefined, abortController: AbortController): Promise<Readable<Readable<Rect | NoElement> | undefined>>;
import type { IStepOptionsContext, RenderState } from './context';
export declare function observeElement(renderState$: Readable<RenderState>, popoverSize$: Readable<Size>, delegate: ITourDelegate, stepOptionsContext: IStepOptionsContext, updatePositionSignal$: Readable<number>): {
elementBounding$: Readable<unknown>;
placement$: import("svelte/store").Writable<IComputePlacementState | undefined>;
};

@@ -1,8 +0,9 @@

import type { Rect } from '@thisway/base';
import { type Size, type Transform } from '@thisway/utils';
export type HighlightRect = Rect & {
borderWidth: number;
padding: number;
};
export declare function calculateHighlightPadding(padding: number, transform: Readonly<Transform>): [number, number];
export declare const calculateMaskCommand: (bounding: HighlightRect, showBorder: boolean, viewportSize: Size, transform: readonly [number, number, number, number, number, number]) => string;
import type { HighlightOptionsWithDefaultValues } from '@thisway/base';
export interface HighlightOffsetOptions extends Pick<HighlightOptionsWithDefaultValues, 'padding' | 'borderWidth' | 'showBorder'> {
}
export interface HighlightRect extends Required<DOMRectInit>, HighlightOffsetOptions {
}
export declare function computeHighlightPadding(padding: number, transform: Readonly<Transform>): [number, number];
export declare function computeHighlightOffset(highlightOption: HighlightOffsetOptions, transform: Readonly<Transform>): number[];
export declare const calculateMaskCommand: (bounding: HighlightRect, viewportSize: Size, transform: readonly [number, number, number, number, number, number]) => string;

@@ -1,8 +0,5 @@

import type { Alignment, IComputePlacementState, ITourDelegate, NoElement, Orientation, PopoverPlacement, PopoverPosition, PopoverPositionParsed, Rect } from '@thisway/base';
import { NO_ELEMENT } from '@thisway/base';
import { type Alignment, type IComputePlacementState, type ITourDelegate, type NoElement, type Orientation, type PopoverPlacement, type PopoverPosition, type PopoverPositionParsed, type Rect } from '@thisway/base';
import { type Size } from '@thisway/utils';
import type { Readable } from 'svelte/store';
import { type IStepOptionsContext, type RenderState } from './context';
export declare const parsePlacement: (position: PopoverPosition | PopoverPositionParsed | string | undefined) => PopoverPositionParsed;
export declare const getOrientation: (elementRect: Rect, popoverRect: Size, preferredOrientation: Orientation | undefined, offsetX: number, offsetY: number, viewport: Size) => Orientation;
export declare const EMPTY_POPOVER_PLACEMENT: PopoverPlacement;

@@ -24,2 +21,2 @@ /**

};
export declare const makeComputePlacement: (delegate: ITourDelegate, stepOptionsContext: IStepOptionsContext) => ({ step }: RenderState, elementBounding$: Readable<typeof NO_ELEMENT | Rect> | undefined, popoverSize: Size, transform: readonly [number, number, number, number, number, number]) => IComputePlacementState | undefined;
export declare const makeComputePlacement: (delegate: ITourDelegate, stepOptionsContext: IStepOptionsContext) => ({ step }: RenderState, elementRect: Rect | NoElement | undefined, popoverSize: Size, transform: readonly [number, number, number, number, number, number]) => IComputePlacementState | undefined;

@@ -5,5 +5,2 @@ /**

/// <reference types="svelte" />
import { type Rect } from '@thisway/base';
import { type Transform } from '@thisway/utils';
export declare function transformRect(rect: Rect, transform: Readonly<Transform>): Rect;
export declare const NOOP_TRANSFORM$: import("svelte/store").Readable<readonly [number, number, number, number, number, number]>;
{
"name": "@thisway/next",
"version": "0.10.1",
"version": "0.11.0-beta.0",
"type": "module",
"dependencies": {
"@thisway/base": "^0.8.0",
"@thisway/scroll": "^0.2.0",
"@thisway/utils": "^0.4.0",
"@thisway/base": "^0.9.0-beta.0",
"@thisway/utils": "^0.5.0-beta.0",
"svelte": "^4.2.1"

@@ -10,0 +9,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc