@sesamy/sesamy-components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,1255 @@
|
|
|
1
|
+
var Xe = Object.defineProperty;
|
|
2
|
+
var Ze = (t, e, n) => e in t ? Xe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var E = (t, e, n) => Ze(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
function L() {
|
|
5
|
+
}
|
|
6
|
+
function A(t, e) {
|
|
7
|
+
for (const n in e) t[n] = e[n];
|
|
8
|
+
return (
|
|
9
|
+
/** @type {T & S} */
|
|
10
|
+
t
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function Be(t) {
|
|
14
|
+
return t();
|
|
15
|
+
}
|
|
16
|
+
function Ee() {
|
|
17
|
+
return /* @__PURE__ */ Object.create(null);
|
|
18
|
+
}
|
|
19
|
+
function F(t) {
|
|
20
|
+
t.forEach(Be);
|
|
21
|
+
}
|
|
22
|
+
function Te(t) {
|
|
23
|
+
return typeof t == "function";
|
|
24
|
+
}
|
|
25
|
+
function U(t, e) {
|
|
26
|
+
return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
|
|
27
|
+
}
|
|
28
|
+
let X;
|
|
29
|
+
function Ie(t, e) {
|
|
30
|
+
return t === e ? !0 : (X || (X = document.createElement("a")), X.href = e, t === X.href);
|
|
31
|
+
}
|
|
32
|
+
function et(t) {
|
|
33
|
+
return Object.keys(t).length === 0;
|
|
34
|
+
}
|
|
35
|
+
function ze(t, e, n, s) {
|
|
36
|
+
if (t) {
|
|
37
|
+
const l = De(t, e, n, s);
|
|
38
|
+
return t[0](l);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function De(t, e, n, s) {
|
|
42
|
+
return t[1] && s ? A(n.ctx.slice(), t[1](s(e))) : n.ctx;
|
|
43
|
+
}
|
|
44
|
+
function Fe(t, e, n, s) {
|
|
45
|
+
if (t[2] && s) {
|
|
46
|
+
const l = t[2](s(n));
|
|
47
|
+
if (e.dirty === void 0)
|
|
48
|
+
return l;
|
|
49
|
+
if (typeof l == "object") {
|
|
50
|
+
const i = [], o = Math.max(e.dirty.length, l.length);
|
|
51
|
+
for (let r = 0; r < o; r += 1)
|
|
52
|
+
i[r] = e.dirty[r] | l[r];
|
|
53
|
+
return i;
|
|
54
|
+
}
|
|
55
|
+
return e.dirty | l;
|
|
56
|
+
}
|
|
57
|
+
return e.dirty;
|
|
58
|
+
}
|
|
59
|
+
function He(t, e, n, s, l, i) {
|
|
60
|
+
if (l) {
|
|
61
|
+
const o = De(e, n, s, i);
|
|
62
|
+
t.p(o, l);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function Re(t) {
|
|
66
|
+
if (t.ctx.length > 32) {
|
|
67
|
+
const e = [], n = t.ctx.length / 32;
|
|
68
|
+
for (let s = 0; s < n; s++)
|
|
69
|
+
e[s] = -1;
|
|
70
|
+
return e;
|
|
71
|
+
}
|
|
72
|
+
return -1;
|
|
73
|
+
}
|
|
74
|
+
function te(t) {
|
|
75
|
+
const e = {};
|
|
76
|
+
for (const n in t) n[0] !== "$" && (e[n] = t[n]);
|
|
77
|
+
return e;
|
|
78
|
+
}
|
|
79
|
+
function xe(t, e) {
|
|
80
|
+
const n = {};
|
|
81
|
+
e = new Set(e);
|
|
82
|
+
for (const s in t) !e.has(s) && s[0] !== "$" && (n[s] = t[s]);
|
|
83
|
+
return n;
|
|
84
|
+
}
|
|
85
|
+
function g(t, e) {
|
|
86
|
+
t.appendChild(e);
|
|
87
|
+
}
|
|
88
|
+
function tt(t, e, n) {
|
|
89
|
+
const s = nt(t);
|
|
90
|
+
if (!s.getElementById(e)) {
|
|
91
|
+
const l = m("style");
|
|
92
|
+
l.id = e, l.textContent = n, st(s, l);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function nt(t) {
|
|
96
|
+
if (!t) return document;
|
|
97
|
+
const e = t.getRootNode ? t.getRootNode() : t.ownerDocument;
|
|
98
|
+
return e && /** @type {ShadowRoot} */
|
|
99
|
+
e.host ? (
|
|
100
|
+
/** @type {ShadowRoot} */
|
|
101
|
+
e
|
|
102
|
+
) : t.ownerDocument;
|
|
103
|
+
}
|
|
104
|
+
function st(t, e) {
|
|
105
|
+
return g(
|
|
106
|
+
/** @type {Document} */
|
|
107
|
+
t.head || t,
|
|
108
|
+
e
|
|
109
|
+
), e.sheet;
|
|
110
|
+
}
|
|
111
|
+
function N(t, e, n) {
|
|
112
|
+
t.insertBefore(e, n || null);
|
|
113
|
+
}
|
|
114
|
+
function x(t) {
|
|
115
|
+
t.parentNode && t.parentNode.removeChild(t);
|
|
116
|
+
}
|
|
117
|
+
function ae(t, e) {
|
|
118
|
+
for (let n = 0; n < t.length; n += 1)
|
|
119
|
+
t[n] && t[n].d(e);
|
|
120
|
+
}
|
|
121
|
+
function m(t) {
|
|
122
|
+
return document.createElement(t);
|
|
123
|
+
}
|
|
124
|
+
function Ke(t) {
|
|
125
|
+
return document.createElementNS("http://www.w3.org/2000/svg", t);
|
|
126
|
+
}
|
|
127
|
+
function Ue(t) {
|
|
128
|
+
return document.createTextNode(t);
|
|
129
|
+
}
|
|
130
|
+
function w() {
|
|
131
|
+
return Ue(" ");
|
|
132
|
+
}
|
|
133
|
+
function _e() {
|
|
134
|
+
return Ue("");
|
|
135
|
+
}
|
|
136
|
+
function ne(t, e, n, s) {
|
|
137
|
+
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n, s);
|
|
138
|
+
}
|
|
139
|
+
function _(t, e, n) {
|
|
140
|
+
n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
|
|
141
|
+
}
|
|
142
|
+
function se(t, e) {
|
|
143
|
+
for (const n in e)
|
|
144
|
+
_(t, n, e[n]);
|
|
145
|
+
}
|
|
146
|
+
function lt(t) {
|
|
147
|
+
let e;
|
|
148
|
+
return {
|
|
149
|
+
/* push */
|
|
150
|
+
p(...n) {
|
|
151
|
+
e = n, e.forEach((s) => t.push(s));
|
|
152
|
+
},
|
|
153
|
+
/* remove */
|
|
154
|
+
r() {
|
|
155
|
+
e.forEach((n) => t.splice(t.indexOf(n), 1));
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function it(t) {
|
|
160
|
+
return Array.from(t.childNodes);
|
|
161
|
+
}
|
|
162
|
+
function Ne(t, e) {
|
|
163
|
+
t.value = e ?? "";
|
|
164
|
+
}
|
|
165
|
+
function ot(t) {
|
|
166
|
+
const e = {};
|
|
167
|
+
return t.childNodes.forEach(
|
|
168
|
+
/** @param {Element} node */
|
|
169
|
+
(n) => {
|
|
170
|
+
e[n.slot || "default"] = !0;
|
|
171
|
+
}
|
|
172
|
+
), e;
|
|
173
|
+
}
|
|
174
|
+
let ge;
|
|
175
|
+
function K(t) {
|
|
176
|
+
ge = t;
|
|
177
|
+
}
|
|
178
|
+
const T = [], Le = [];
|
|
179
|
+
let z = [];
|
|
180
|
+
const Ce = [], rt = /* @__PURE__ */ Promise.resolve();
|
|
181
|
+
let de = !1;
|
|
182
|
+
function ct() {
|
|
183
|
+
de || (de = !0, rt.then(Ve));
|
|
184
|
+
}
|
|
185
|
+
function he(t) {
|
|
186
|
+
z.push(t);
|
|
187
|
+
}
|
|
188
|
+
const ue = /* @__PURE__ */ new Set();
|
|
189
|
+
let B = 0;
|
|
190
|
+
function Ve() {
|
|
191
|
+
if (B !== 0)
|
|
192
|
+
return;
|
|
193
|
+
const t = ge;
|
|
194
|
+
do {
|
|
195
|
+
try {
|
|
196
|
+
for (; B < T.length; ) {
|
|
197
|
+
const e = T[B];
|
|
198
|
+
B++, K(e), ut(e.$$);
|
|
199
|
+
}
|
|
200
|
+
} catch (e) {
|
|
201
|
+
throw T.length = 0, B = 0, e;
|
|
202
|
+
}
|
|
203
|
+
for (K(null), T.length = 0, B = 0; Le.length; ) Le.pop()();
|
|
204
|
+
for (let e = 0; e < z.length; e += 1) {
|
|
205
|
+
const n = z[e];
|
|
206
|
+
ue.has(n) || (ue.add(n), n());
|
|
207
|
+
}
|
|
208
|
+
z.length = 0;
|
|
209
|
+
} while (T.length);
|
|
210
|
+
for (; Ce.length; )
|
|
211
|
+
Ce.pop()();
|
|
212
|
+
de = !1, ue.clear(), K(t);
|
|
213
|
+
}
|
|
214
|
+
function ut(t) {
|
|
215
|
+
if (t.fragment !== null) {
|
|
216
|
+
t.update(), F(t.before_update);
|
|
217
|
+
const e = t.dirty;
|
|
218
|
+
t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(he);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
function ft(t) {
|
|
222
|
+
const e = [], n = [];
|
|
223
|
+
z.forEach((s) => t.indexOf(s) === -1 ? e.push(s) : n.push(s)), n.forEach((s) => s()), z = e;
|
|
224
|
+
}
|
|
225
|
+
const Z = /* @__PURE__ */ new Set();
|
|
226
|
+
let P;
|
|
227
|
+
function at() {
|
|
228
|
+
P = {
|
|
229
|
+
r: 0,
|
|
230
|
+
c: [],
|
|
231
|
+
p: P
|
|
232
|
+
// parent group
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function dt() {
|
|
236
|
+
P.r || F(P.c), P = P.p;
|
|
237
|
+
}
|
|
238
|
+
function j(t, e) {
|
|
239
|
+
t && t.i && (Z.delete(t), t.i(e));
|
|
240
|
+
}
|
|
241
|
+
function D(t, e, n, s) {
|
|
242
|
+
if (t && t.o) {
|
|
243
|
+
if (Z.has(t)) return;
|
|
244
|
+
Z.add(t), P.c.push(() => {
|
|
245
|
+
Z.delete(t), s && (n && t.d(1), s());
|
|
246
|
+
}), t.o(e);
|
|
247
|
+
} else s && s();
|
|
248
|
+
}
|
|
249
|
+
function I(t) {
|
|
250
|
+
return (t == null ? void 0 : t.length) !== void 0 ? t : Array.from(t);
|
|
251
|
+
}
|
|
252
|
+
function me(t, e) {
|
|
253
|
+
const n = {}, s = {}, l = { $$scope: 1 };
|
|
254
|
+
let i = t.length;
|
|
255
|
+
for (; i--; ) {
|
|
256
|
+
const o = t[i], r = e[i];
|
|
257
|
+
if (r) {
|
|
258
|
+
for (const u in o)
|
|
259
|
+
u in r || (s[u] = 1);
|
|
260
|
+
for (const u in r)
|
|
261
|
+
l[u] || (n[u] = r[u], l[u] = 1);
|
|
262
|
+
t[i] = r;
|
|
263
|
+
} else
|
|
264
|
+
for (const u in o)
|
|
265
|
+
l[u] = 1;
|
|
266
|
+
}
|
|
267
|
+
for (const o in s)
|
|
268
|
+
o in n || (n[o] = void 0);
|
|
269
|
+
return n;
|
|
270
|
+
}
|
|
271
|
+
function ht(t) {
|
|
272
|
+
return typeof t == "object" && t !== null ? t : {};
|
|
273
|
+
}
|
|
274
|
+
function Je(t) {
|
|
275
|
+
t && t.c();
|
|
276
|
+
}
|
|
277
|
+
function $e(t, e, n) {
|
|
278
|
+
const { fragment: s, after_update: l } = t.$$;
|
|
279
|
+
s && s.m(e, n), he(() => {
|
|
280
|
+
const i = t.$$.on_mount.map(Be).filter(Te);
|
|
281
|
+
t.$$.on_destroy ? t.$$.on_destroy.push(...i) : F(i), t.$$.on_mount = [];
|
|
282
|
+
}), l.forEach(he);
|
|
283
|
+
}
|
|
284
|
+
function be(t, e) {
|
|
285
|
+
const n = t.$$;
|
|
286
|
+
n.fragment !== null && (ft(n.after_update), F(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
287
|
+
}
|
|
288
|
+
function _t(t, e) {
|
|
289
|
+
t.$$.dirty[0] === -1 && (T.push(t), ct(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
290
|
+
}
|
|
291
|
+
function le(t, e, n, s, l, i, o = null, r = [-1]) {
|
|
292
|
+
const u = ge;
|
|
293
|
+
K(t);
|
|
294
|
+
const a = t.$$ = {
|
|
295
|
+
fragment: null,
|
|
296
|
+
ctx: [],
|
|
297
|
+
// state
|
|
298
|
+
props: i,
|
|
299
|
+
update: L,
|
|
300
|
+
not_equal: l,
|
|
301
|
+
bound: Ee(),
|
|
302
|
+
// lifecycle
|
|
303
|
+
on_mount: [],
|
|
304
|
+
on_destroy: [],
|
|
305
|
+
on_disconnect: [],
|
|
306
|
+
before_update: [],
|
|
307
|
+
after_update: [],
|
|
308
|
+
context: new Map(e.context || (u ? u.$$.context : [])),
|
|
309
|
+
// everything else
|
|
310
|
+
callbacks: Ee(),
|
|
311
|
+
dirty: r,
|
|
312
|
+
skip_bound: !1,
|
|
313
|
+
root: e.target || u.$$.root
|
|
314
|
+
};
|
|
315
|
+
o && o(a.root);
|
|
316
|
+
let v = !1;
|
|
317
|
+
if (a.ctx = n ? n(t, e.props || {}, ($, c, ...p) => {
|
|
318
|
+
const f = p.length ? p[0] : c;
|
|
319
|
+
return a.ctx && l(a.ctx[$], a.ctx[$] = f) && (!a.skip_bound && a.bound[$] && a.bound[$](f), v && _t(t, $)), c;
|
|
320
|
+
}) : [], a.update(), v = !0, F(a.before_update), a.fragment = s ? s(a.ctx) : !1, e.target) {
|
|
321
|
+
if (e.hydrate) {
|
|
322
|
+
const $ = it(e.target);
|
|
323
|
+
a.fragment && a.fragment.l($), $.forEach(x);
|
|
324
|
+
} else
|
|
325
|
+
a.fragment && a.fragment.c();
|
|
326
|
+
e.intro && j(t.$$.fragment), $e(t, e.target, e.anchor), Ve();
|
|
327
|
+
}
|
|
328
|
+
K(u);
|
|
329
|
+
}
|
|
330
|
+
let Ge;
|
|
331
|
+
typeof HTMLElement == "function" && (Ge = class extends HTMLElement {
|
|
332
|
+
constructor(e, n, s) {
|
|
333
|
+
super();
|
|
334
|
+
/** The Svelte component constructor */
|
|
335
|
+
E(this, "$$ctor");
|
|
336
|
+
/** Slots */
|
|
337
|
+
E(this, "$$s");
|
|
338
|
+
/** The Svelte component instance */
|
|
339
|
+
E(this, "$$c");
|
|
340
|
+
/** Whether or not the custom element is connected */
|
|
341
|
+
E(this, "$$cn", !1);
|
|
342
|
+
/** Component props data */
|
|
343
|
+
E(this, "$$d", {});
|
|
344
|
+
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
345
|
+
E(this, "$$r", !1);
|
|
346
|
+
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
347
|
+
E(this, "$$p_d", {});
|
|
348
|
+
/** @type {Record<string, Function[]>} Event listeners */
|
|
349
|
+
E(this, "$$l", {});
|
|
350
|
+
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
351
|
+
E(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
352
|
+
this.$$ctor = e, this.$$s = n, s && this.attachShadow({ mode: "open" });
|
|
353
|
+
}
|
|
354
|
+
addEventListener(e, n, s) {
|
|
355
|
+
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(n), this.$$c) {
|
|
356
|
+
const l = this.$$c.$on(e, n);
|
|
357
|
+
this.$$l_u.set(n, l);
|
|
358
|
+
}
|
|
359
|
+
super.addEventListener(e, n, s);
|
|
360
|
+
}
|
|
361
|
+
removeEventListener(e, n, s) {
|
|
362
|
+
if (super.removeEventListener(e, n, s), this.$$c) {
|
|
363
|
+
const l = this.$$l_u.get(n);
|
|
364
|
+
l && (l(), this.$$l_u.delete(n));
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
async connectedCallback() {
|
|
368
|
+
if (this.$$cn = !0, !this.$$c) {
|
|
369
|
+
let e = function(i) {
|
|
370
|
+
return () => {
|
|
371
|
+
let o;
|
|
372
|
+
return {
|
|
373
|
+
c: function() {
|
|
374
|
+
o = m("slot"), i !== "default" && _(o, "name", i);
|
|
375
|
+
},
|
|
376
|
+
/**
|
|
377
|
+
* @param {HTMLElement} target
|
|
378
|
+
* @param {HTMLElement} [anchor]
|
|
379
|
+
*/
|
|
380
|
+
m: function(a, v) {
|
|
381
|
+
N(a, o, v);
|
|
382
|
+
},
|
|
383
|
+
d: function(a) {
|
|
384
|
+
a && x(o);
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
390
|
+
return;
|
|
391
|
+
const n = {}, s = ot(this);
|
|
392
|
+
for (const i of this.$$s)
|
|
393
|
+
i in s && (n[i] = [e(i)]);
|
|
394
|
+
for (const i of this.attributes) {
|
|
395
|
+
const o = this.$$g_p(i.name);
|
|
396
|
+
o in this.$$d || (this.$$d[o] = ee(o, i.value, this.$$p_d, "toProp"));
|
|
397
|
+
}
|
|
398
|
+
for (const i in this.$$p_d)
|
|
399
|
+
!(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
400
|
+
this.$$c = new this.$$ctor({
|
|
401
|
+
target: this.shadowRoot || this,
|
|
402
|
+
props: {
|
|
403
|
+
...this.$$d,
|
|
404
|
+
$$slots: n,
|
|
405
|
+
$$scope: {
|
|
406
|
+
ctx: []
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
const l = () => {
|
|
411
|
+
this.$$r = !0;
|
|
412
|
+
for (const i in this.$$p_d)
|
|
413
|
+
if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
|
|
414
|
+
const o = ee(
|
|
415
|
+
i,
|
|
416
|
+
this.$$d[i],
|
|
417
|
+
this.$$p_d,
|
|
418
|
+
"toAttribute"
|
|
419
|
+
);
|
|
420
|
+
o == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, o);
|
|
421
|
+
}
|
|
422
|
+
this.$$r = !1;
|
|
423
|
+
};
|
|
424
|
+
this.$$c.$$.after_update.push(l), l();
|
|
425
|
+
for (const i in this.$$l)
|
|
426
|
+
for (const o of this.$$l[i]) {
|
|
427
|
+
const r = this.$$c.$on(i, o);
|
|
428
|
+
this.$$l_u.set(o, r);
|
|
429
|
+
}
|
|
430
|
+
this.$$l = {};
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
434
|
+
// and setting attributes through setAttribute etc, this is helpful
|
|
435
|
+
attributeChangedCallback(e, n, s) {
|
|
436
|
+
var l;
|
|
437
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = ee(e, s, this.$$p_d, "toProp"), (l = this.$$c) == null || l.$set({ [e]: this.$$d[e] }));
|
|
438
|
+
}
|
|
439
|
+
disconnectedCallback() {
|
|
440
|
+
this.$$cn = !1, Promise.resolve().then(() => {
|
|
441
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
$$g_p(e) {
|
|
445
|
+
return Object.keys(this.$$p_d).find(
|
|
446
|
+
(n) => this.$$p_d[n].attribute === e || !this.$$p_d[n].attribute && n.toLowerCase() === e
|
|
447
|
+
) || e;
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
function ee(t, e, n, s) {
|
|
451
|
+
var i;
|
|
452
|
+
const l = (i = n[t]) == null ? void 0 : i.type;
|
|
453
|
+
if (e = l === "Boolean" && typeof e != "boolean" ? e != null : e, !s || !n[t])
|
|
454
|
+
return e;
|
|
455
|
+
if (s === "toAttribute")
|
|
456
|
+
switch (l) {
|
|
457
|
+
case "Object":
|
|
458
|
+
case "Array":
|
|
459
|
+
return e == null ? null : JSON.stringify(e);
|
|
460
|
+
case "Boolean":
|
|
461
|
+
return e ? "" : null;
|
|
462
|
+
case "Number":
|
|
463
|
+
return e ?? null;
|
|
464
|
+
default:
|
|
465
|
+
return e;
|
|
466
|
+
}
|
|
467
|
+
else
|
|
468
|
+
switch (l) {
|
|
469
|
+
case "Object":
|
|
470
|
+
case "Array":
|
|
471
|
+
return e && JSON.parse(e);
|
|
472
|
+
case "Boolean":
|
|
473
|
+
return e;
|
|
474
|
+
case "Number":
|
|
475
|
+
return e != null ? +e : e;
|
|
476
|
+
default:
|
|
477
|
+
return e;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
function Ye(t, e, n, s, l, i) {
|
|
481
|
+
let o = class extends Ge {
|
|
482
|
+
constructor() {
|
|
483
|
+
super(t, n, l), this.$$p_d = e;
|
|
484
|
+
}
|
|
485
|
+
static get observedAttributes() {
|
|
486
|
+
return Object.keys(e).map(
|
|
487
|
+
(r) => (e[r].attribute || r).toLowerCase()
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
return Object.keys(e).forEach((r) => {
|
|
492
|
+
Object.defineProperty(o.prototype, r, {
|
|
493
|
+
get() {
|
|
494
|
+
return this.$$c && r in this.$$c ? this.$$c[r] : this.$$d[r];
|
|
495
|
+
},
|
|
496
|
+
set(u) {
|
|
497
|
+
var a;
|
|
498
|
+
u = ee(r, u, e), this.$$d[r] = u, (a = this.$$c) == null || a.$set({ [r]: u });
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
}), s.forEach((r) => {
|
|
502
|
+
Object.defineProperty(o.prototype, r, {
|
|
503
|
+
get() {
|
|
504
|
+
var u;
|
|
505
|
+
return (u = this.$$c) == null ? void 0 : u[r];
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
}), t.element = /** @type {any} */
|
|
509
|
+
o, o;
|
|
510
|
+
}
|
|
511
|
+
class ie {
|
|
512
|
+
constructor() {
|
|
513
|
+
/**
|
|
514
|
+
* ### PRIVATE API
|
|
515
|
+
*
|
|
516
|
+
* Do not use, may change at any time
|
|
517
|
+
*
|
|
518
|
+
* @type {any}
|
|
519
|
+
*/
|
|
520
|
+
E(this, "$$");
|
|
521
|
+
/**
|
|
522
|
+
* ### PRIVATE API
|
|
523
|
+
*
|
|
524
|
+
* Do not use, may change at any time
|
|
525
|
+
*
|
|
526
|
+
* @type {any}
|
|
527
|
+
*/
|
|
528
|
+
E(this, "$$set");
|
|
529
|
+
}
|
|
530
|
+
/** @returns {void} */
|
|
531
|
+
$destroy() {
|
|
532
|
+
be(this, 1), this.$destroy = L;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* @template {Extract<keyof Events, string>} K
|
|
536
|
+
* @param {K} type
|
|
537
|
+
* @param {((e: Events[K]) => void) | null | undefined} callback
|
|
538
|
+
* @returns {() => void}
|
|
539
|
+
*/
|
|
540
|
+
$on(e, n) {
|
|
541
|
+
if (!Te(n))
|
|
542
|
+
return L;
|
|
543
|
+
const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
544
|
+
return s.push(n), () => {
|
|
545
|
+
const l = s.indexOf(n);
|
|
546
|
+
l !== -1 && s.splice(l, 1);
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* @param {Partial<Props>} props
|
|
551
|
+
* @returns {void}
|
|
552
|
+
*/
|
|
553
|
+
$set(e) {
|
|
554
|
+
this.$$set && !et(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
const gt = "4";
|
|
558
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(gt);
|
|
559
|
+
function mt(t) {
|
|
560
|
+
tt(t, "svelte-1nq6lsq", ".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}");
|
|
561
|
+
}
|
|
562
|
+
function $t(t) {
|
|
563
|
+
let e, n, s;
|
|
564
|
+
return {
|
|
565
|
+
c() {
|
|
566
|
+
e = m("button"), e.textContent = "Login", _(e, "class", "login-btn svelte-1nq6lsq"), _(e, "aria-label", "Log in");
|
|
567
|
+
},
|
|
568
|
+
m(l, i) {
|
|
569
|
+
N(l, e, i), n || (s = ne(
|
|
570
|
+
e,
|
|
571
|
+
"click",
|
|
572
|
+
/*login*/
|
|
573
|
+
t[2]
|
|
574
|
+
), n = !0);
|
|
575
|
+
},
|
|
576
|
+
p: L,
|
|
577
|
+
d(l) {
|
|
578
|
+
l && x(e), n = !1, s();
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
function bt(t) {
|
|
583
|
+
let e, n, s, l, i;
|
|
584
|
+
return {
|
|
585
|
+
c() {
|
|
586
|
+
e = m("button"), n = m("img"), Ie(n.src, s = kt) || _(n, "src", s), _(n, "alt", "User Avatar"), _(n, "class", "svelte-1nq6lsq"), _(e, "class", "avatar-btn svelte-1nq6lsq"), _(e, "aria-label", "Log out");
|
|
587
|
+
},
|
|
588
|
+
m(o, r) {
|
|
589
|
+
N(o, e, r), g(e, n), l || (i = ne(
|
|
590
|
+
e,
|
|
591
|
+
"click",
|
|
592
|
+
/*logout*/
|
|
593
|
+
t[3]
|
|
594
|
+
), l = !0);
|
|
595
|
+
},
|
|
596
|
+
p: L,
|
|
597
|
+
d(o) {
|
|
598
|
+
o && x(e), l = !1, i();
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
function pt(t) {
|
|
603
|
+
let e;
|
|
604
|
+
return {
|
|
605
|
+
c() {
|
|
606
|
+
e = m("button"), e.innerHTML = "", _(e, "class", "loading-btn svelte-1nq6lsq"), _(e, "aria-busy", "true"), _(e, "aria-label", "Logging in");
|
|
607
|
+
},
|
|
608
|
+
m(n, s) {
|
|
609
|
+
N(n, e, s);
|
|
610
|
+
},
|
|
611
|
+
p: L,
|
|
612
|
+
d(n) {
|
|
613
|
+
n && x(e);
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
function vt(t) {
|
|
618
|
+
let e;
|
|
619
|
+
function n(i, o) {
|
|
620
|
+
return (
|
|
621
|
+
/*loading*/
|
|
622
|
+
i[0] ? pt : (
|
|
623
|
+
/*loggedIn*/
|
|
624
|
+
i[1] ? bt : $t
|
|
625
|
+
)
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
let s = n(t), l = s(t);
|
|
629
|
+
return {
|
|
630
|
+
c() {
|
|
631
|
+
l.c(), e = _e();
|
|
632
|
+
},
|
|
633
|
+
m(i, o) {
|
|
634
|
+
l.m(i, o), N(i, e, o);
|
|
635
|
+
},
|
|
636
|
+
p(i, [o]) {
|
|
637
|
+
s === (s = n(i)) && l ? l.p(i, o) : (l.d(1), l = s(i), l && (l.c(), l.m(e.parentNode, e)));
|
|
638
|
+
},
|
|
639
|
+
i: L,
|
|
640
|
+
o: L,
|
|
641
|
+
d(i) {
|
|
642
|
+
i && x(e), l.d(i);
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
let kt = "https://via.placeholder.com/50";
|
|
647
|
+
function yt(t, e, n) {
|
|
648
|
+
let s = !1, l = !1;
|
|
649
|
+
const i = async () => {
|
|
650
|
+
n(0, s = !0), await new Promise((u) => setTimeout(u, 2e3)), n(0, s = !1), n(1, l = !0);
|
|
651
|
+
}, o = () => {
|
|
652
|
+
n(1, l = !1);
|
|
653
|
+
};
|
|
654
|
+
return l = l, [s, l, i, o];
|
|
655
|
+
}
|
|
656
|
+
class qt extends ie {
|
|
657
|
+
constructor(e) {
|
|
658
|
+
super(), le(this, e, yt, vt, U, {}, mt);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
customElements.define("sesamy-login", Ye(qt, {}, [], [], !0));
|
|
662
|
+
/**
|
|
663
|
+
* @license lucide-svelte v0.445.0 - ISC
|
|
664
|
+
*
|
|
665
|
+
* This source code is licensed under the ISC license.
|
|
666
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
667
|
+
*/
|
|
668
|
+
const Se = {
|
|
669
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
670
|
+
width: 24,
|
|
671
|
+
height: 24,
|
|
672
|
+
viewBox: "0 0 24 24",
|
|
673
|
+
fill: "none",
|
|
674
|
+
stroke: "currentColor",
|
|
675
|
+
"stroke-width": 2,
|
|
676
|
+
"stroke-linecap": "round",
|
|
677
|
+
"stroke-linejoin": "round"
|
|
678
|
+
};
|
|
679
|
+
function je(t, e, n) {
|
|
680
|
+
const s = t.slice();
|
|
681
|
+
return s[11] = e[n][0], s[12] = e[n][1], s;
|
|
682
|
+
}
|
|
683
|
+
function fe(t) {
|
|
684
|
+
let e, n = [
|
|
685
|
+
/*attrs*/
|
|
686
|
+
t[12]
|
|
687
|
+
], s = {};
|
|
688
|
+
for (let l = 0; l < n.length; l += 1)
|
|
689
|
+
s = A(s, n[l]);
|
|
690
|
+
return {
|
|
691
|
+
c() {
|
|
692
|
+
e = Ke(
|
|
693
|
+
/*tag*/
|
|
694
|
+
t[11]
|
|
695
|
+
), se(e, s);
|
|
696
|
+
},
|
|
697
|
+
m(l, i) {
|
|
698
|
+
N(l, e, i);
|
|
699
|
+
},
|
|
700
|
+
p(l, i) {
|
|
701
|
+
se(e, s = me(n, [i & /*iconNode*/
|
|
702
|
+
32 && /*attrs*/
|
|
703
|
+
l[12]]));
|
|
704
|
+
},
|
|
705
|
+
d(l) {
|
|
706
|
+
l && x(e);
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
function Ae(t) {
|
|
711
|
+
let e = (
|
|
712
|
+
/*tag*/
|
|
713
|
+
t[11]
|
|
714
|
+
), n, s = (
|
|
715
|
+
/*tag*/
|
|
716
|
+
t[11] && fe(t)
|
|
717
|
+
);
|
|
718
|
+
return {
|
|
719
|
+
c() {
|
|
720
|
+
s && s.c(), n = _e();
|
|
721
|
+
},
|
|
722
|
+
m(l, i) {
|
|
723
|
+
s && s.m(l, i), N(l, n, i);
|
|
724
|
+
},
|
|
725
|
+
p(l, i) {
|
|
726
|
+
/*tag*/
|
|
727
|
+
l[11] ? e ? U(
|
|
728
|
+
e,
|
|
729
|
+
/*tag*/
|
|
730
|
+
l[11]
|
|
731
|
+
) ? (s.d(1), s = fe(l), e = /*tag*/
|
|
732
|
+
l[11], s.c(), s.m(n.parentNode, n)) : s.p(l, i) : (s = fe(l), e = /*tag*/
|
|
733
|
+
l[11], s.c(), s.m(n.parentNode, n)) : e && (s.d(1), s = null, e = /*tag*/
|
|
734
|
+
l[11]);
|
|
735
|
+
},
|
|
736
|
+
d(l) {
|
|
737
|
+
l && x(n), s && s.d(l);
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
function wt(t) {
|
|
742
|
+
let e, n, s, l, i, o = I(
|
|
743
|
+
/*iconNode*/
|
|
744
|
+
t[5]
|
|
745
|
+
), r = [];
|
|
746
|
+
for (let c = 0; c < o.length; c += 1)
|
|
747
|
+
r[c] = Ae(je(t, o, c));
|
|
748
|
+
const u = (
|
|
749
|
+
/*#slots*/
|
|
750
|
+
t[10].default
|
|
751
|
+
), a = ze(
|
|
752
|
+
u,
|
|
753
|
+
t,
|
|
754
|
+
/*$$scope*/
|
|
755
|
+
t[9],
|
|
756
|
+
null
|
|
757
|
+
);
|
|
758
|
+
let v = [
|
|
759
|
+
Se,
|
|
760
|
+
/*$$restProps*/
|
|
761
|
+
t[7],
|
|
762
|
+
{ width: (
|
|
763
|
+
/*size*/
|
|
764
|
+
t[2]
|
|
765
|
+
) },
|
|
766
|
+
{ height: (
|
|
767
|
+
/*size*/
|
|
768
|
+
t[2]
|
|
769
|
+
) },
|
|
770
|
+
{ stroke: (
|
|
771
|
+
/*color*/
|
|
772
|
+
t[1]
|
|
773
|
+
) },
|
|
774
|
+
{
|
|
775
|
+
"stroke-width": s = /*absoluteStrokeWidth*/
|
|
776
|
+
t[4] ? Number(
|
|
777
|
+
/*strokeWidth*/
|
|
778
|
+
t[3]
|
|
779
|
+
) * 24 / Number(
|
|
780
|
+
/*size*/
|
|
781
|
+
t[2]
|
|
782
|
+
) : (
|
|
783
|
+
/*strokeWidth*/
|
|
784
|
+
t[3]
|
|
785
|
+
)
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
class: l = /*mergeClasses*/
|
|
789
|
+
t[6](
|
|
790
|
+
"lucide-icon",
|
|
791
|
+
"lucide",
|
|
792
|
+
/*name*/
|
|
793
|
+
t[0] ? `lucide-${/*name*/
|
|
794
|
+
t[0]}` : "",
|
|
795
|
+
/*$$props*/
|
|
796
|
+
t[8].class
|
|
797
|
+
)
|
|
798
|
+
}
|
|
799
|
+
], $ = {};
|
|
800
|
+
for (let c = 0; c < v.length; c += 1)
|
|
801
|
+
$ = A($, v[c]);
|
|
802
|
+
return {
|
|
803
|
+
c() {
|
|
804
|
+
e = Ke("svg");
|
|
805
|
+
for (let c = 0; c < r.length; c += 1)
|
|
806
|
+
r[c].c();
|
|
807
|
+
n = _e(), a && a.c(), se(e, $);
|
|
808
|
+
},
|
|
809
|
+
m(c, p) {
|
|
810
|
+
N(c, e, p);
|
|
811
|
+
for (let f = 0; f < r.length; f += 1)
|
|
812
|
+
r[f] && r[f].m(e, null);
|
|
813
|
+
g(e, n), a && a.m(e, null), i = !0;
|
|
814
|
+
},
|
|
815
|
+
p(c, [p]) {
|
|
816
|
+
if (p & /*iconNode*/
|
|
817
|
+
32) {
|
|
818
|
+
o = I(
|
|
819
|
+
/*iconNode*/
|
|
820
|
+
c[5]
|
|
821
|
+
);
|
|
822
|
+
let f;
|
|
823
|
+
for (f = 0; f < o.length; f += 1) {
|
|
824
|
+
const C = je(c, o, f);
|
|
825
|
+
r[f] ? r[f].p(C, p) : (r[f] = Ae(C), r[f].c(), r[f].m(e, n));
|
|
826
|
+
}
|
|
827
|
+
for (; f < r.length; f += 1)
|
|
828
|
+
r[f].d(1);
|
|
829
|
+
r.length = o.length;
|
|
830
|
+
}
|
|
831
|
+
a && a.p && (!i || p & /*$$scope*/
|
|
832
|
+
512) && He(
|
|
833
|
+
a,
|
|
834
|
+
u,
|
|
835
|
+
c,
|
|
836
|
+
/*$$scope*/
|
|
837
|
+
c[9],
|
|
838
|
+
i ? Fe(
|
|
839
|
+
u,
|
|
840
|
+
/*$$scope*/
|
|
841
|
+
c[9],
|
|
842
|
+
p,
|
|
843
|
+
null
|
|
844
|
+
) : Re(
|
|
845
|
+
/*$$scope*/
|
|
846
|
+
c[9]
|
|
847
|
+
),
|
|
848
|
+
null
|
|
849
|
+
), se(e, $ = me(v, [
|
|
850
|
+
Se,
|
|
851
|
+
p & /*$$restProps*/
|
|
852
|
+
128 && /*$$restProps*/
|
|
853
|
+
c[7],
|
|
854
|
+
(!i || p & /*size*/
|
|
855
|
+
4) && { width: (
|
|
856
|
+
/*size*/
|
|
857
|
+
c[2]
|
|
858
|
+
) },
|
|
859
|
+
(!i || p & /*size*/
|
|
860
|
+
4) && { height: (
|
|
861
|
+
/*size*/
|
|
862
|
+
c[2]
|
|
863
|
+
) },
|
|
864
|
+
(!i || p & /*color*/
|
|
865
|
+
2) && { stroke: (
|
|
866
|
+
/*color*/
|
|
867
|
+
c[1]
|
|
868
|
+
) },
|
|
869
|
+
(!i || p & /*absoluteStrokeWidth, strokeWidth, size*/
|
|
870
|
+
28 && s !== (s = /*absoluteStrokeWidth*/
|
|
871
|
+
c[4] ? Number(
|
|
872
|
+
/*strokeWidth*/
|
|
873
|
+
c[3]
|
|
874
|
+
) * 24 / Number(
|
|
875
|
+
/*size*/
|
|
876
|
+
c[2]
|
|
877
|
+
) : (
|
|
878
|
+
/*strokeWidth*/
|
|
879
|
+
c[3]
|
|
880
|
+
))) && { "stroke-width": s },
|
|
881
|
+
(!i || p & /*name, $$props*/
|
|
882
|
+
257 && l !== (l = /*mergeClasses*/
|
|
883
|
+
c[6](
|
|
884
|
+
"lucide-icon",
|
|
885
|
+
"lucide",
|
|
886
|
+
/*name*/
|
|
887
|
+
c[0] ? `lucide-${/*name*/
|
|
888
|
+
c[0]}` : "",
|
|
889
|
+
/*$$props*/
|
|
890
|
+
c[8].class
|
|
891
|
+
))) && { class: l }
|
|
892
|
+
]));
|
|
893
|
+
},
|
|
894
|
+
i(c) {
|
|
895
|
+
i || (j(a, c), i = !0);
|
|
896
|
+
},
|
|
897
|
+
o(c) {
|
|
898
|
+
D(a, c), i = !1;
|
|
899
|
+
},
|
|
900
|
+
d(c) {
|
|
901
|
+
c && x(e), ae(r, c), a && a.d(c);
|
|
902
|
+
}
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
function Et(t, e, n) {
|
|
906
|
+
const s = ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"];
|
|
907
|
+
let l = xe(e, s), { $$slots: i = {}, $$scope: o } = e, { name: r = void 0 } = e, { color: u = "currentColor" } = e, { size: a = 24 } = e, { strokeWidth: v = 2 } = e, { absoluteStrokeWidth: $ = !1 } = e, { iconNode: c = [] } = e;
|
|
908
|
+
const p = (...f) => f.filter((C, M, V) => !!C && V.indexOf(C) === M).join(" ");
|
|
909
|
+
return t.$$set = (f) => {
|
|
910
|
+
n(8, e = A(A({}, e), te(f))), n(7, l = xe(e, s)), "name" in f && n(0, r = f.name), "color" in f && n(1, u = f.color), "size" in f && n(2, a = f.size), "strokeWidth" in f && n(3, v = f.strokeWidth), "absoluteStrokeWidth" in f && n(4, $ = f.absoluteStrokeWidth), "iconNode" in f && n(5, c = f.iconNode), "$$scope" in f && n(9, o = f.$$scope);
|
|
911
|
+
}, e = te(e), [
|
|
912
|
+
r,
|
|
913
|
+
u,
|
|
914
|
+
a,
|
|
915
|
+
v,
|
|
916
|
+
$,
|
|
917
|
+
c,
|
|
918
|
+
p,
|
|
919
|
+
l,
|
|
920
|
+
e,
|
|
921
|
+
o,
|
|
922
|
+
i
|
|
923
|
+
];
|
|
924
|
+
}
|
|
925
|
+
class xt extends ie {
|
|
926
|
+
constructor(e) {
|
|
927
|
+
super(), le(this, e, Et, wt, U, {
|
|
928
|
+
name: 0,
|
|
929
|
+
color: 1,
|
|
930
|
+
size: 2,
|
|
931
|
+
strokeWidth: 3,
|
|
932
|
+
absoluteStrokeWidth: 4,
|
|
933
|
+
iconNode: 5
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
function Nt(t) {
|
|
938
|
+
let e;
|
|
939
|
+
const n = (
|
|
940
|
+
/*#slots*/
|
|
941
|
+
t[2].default
|
|
942
|
+
), s = ze(
|
|
943
|
+
n,
|
|
944
|
+
t,
|
|
945
|
+
/*$$scope*/
|
|
946
|
+
t[3],
|
|
947
|
+
null
|
|
948
|
+
);
|
|
949
|
+
return {
|
|
950
|
+
c() {
|
|
951
|
+
s && s.c();
|
|
952
|
+
},
|
|
953
|
+
m(l, i) {
|
|
954
|
+
s && s.m(l, i), e = !0;
|
|
955
|
+
},
|
|
956
|
+
p(l, i) {
|
|
957
|
+
s && s.p && (!e || i & /*$$scope*/
|
|
958
|
+
8) && He(
|
|
959
|
+
s,
|
|
960
|
+
n,
|
|
961
|
+
l,
|
|
962
|
+
/*$$scope*/
|
|
963
|
+
l[3],
|
|
964
|
+
e ? Fe(
|
|
965
|
+
n,
|
|
966
|
+
/*$$scope*/
|
|
967
|
+
l[3],
|
|
968
|
+
i,
|
|
969
|
+
null
|
|
970
|
+
) : Re(
|
|
971
|
+
/*$$scope*/
|
|
972
|
+
l[3]
|
|
973
|
+
),
|
|
974
|
+
null
|
|
975
|
+
);
|
|
976
|
+
},
|
|
977
|
+
i(l) {
|
|
978
|
+
e || (j(s, l), e = !0);
|
|
979
|
+
},
|
|
980
|
+
o(l) {
|
|
981
|
+
D(s, l), e = !1;
|
|
982
|
+
},
|
|
983
|
+
d(l) {
|
|
984
|
+
s && s.d(l);
|
|
985
|
+
}
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
function Lt(t) {
|
|
989
|
+
let e, n;
|
|
990
|
+
const s = [
|
|
991
|
+
{ name: "circle-check" },
|
|
992
|
+
/*$$props*/
|
|
993
|
+
t[1],
|
|
994
|
+
{ iconNode: (
|
|
995
|
+
/*iconNode*/
|
|
996
|
+
t[0]
|
|
997
|
+
) }
|
|
998
|
+
];
|
|
999
|
+
let l = {
|
|
1000
|
+
$$slots: { default: [Nt] },
|
|
1001
|
+
$$scope: { ctx: t }
|
|
1002
|
+
};
|
|
1003
|
+
for (let i = 0; i < s.length; i += 1)
|
|
1004
|
+
l = A(l, s[i]);
|
|
1005
|
+
return e = new xt({ props: l }), {
|
|
1006
|
+
c() {
|
|
1007
|
+
Je(e.$$.fragment);
|
|
1008
|
+
},
|
|
1009
|
+
m(i, o) {
|
|
1010
|
+
$e(e, i, o), n = !0;
|
|
1011
|
+
},
|
|
1012
|
+
p(i, [o]) {
|
|
1013
|
+
const r = o & /*$$props, iconNode*/
|
|
1014
|
+
3 ? me(s, [
|
|
1015
|
+
s[0],
|
|
1016
|
+
o & /*$$props*/
|
|
1017
|
+
2 && ht(
|
|
1018
|
+
/*$$props*/
|
|
1019
|
+
i[1]
|
|
1020
|
+
),
|
|
1021
|
+
o & /*iconNode*/
|
|
1022
|
+
1 && { iconNode: (
|
|
1023
|
+
/*iconNode*/
|
|
1024
|
+
i[0]
|
|
1025
|
+
) }
|
|
1026
|
+
]) : {};
|
|
1027
|
+
o & /*$$scope*/
|
|
1028
|
+
8 && (r.$$scope = { dirty: o, ctx: i }), e.$set(r);
|
|
1029
|
+
},
|
|
1030
|
+
i(i) {
|
|
1031
|
+
n || (j(e.$$.fragment, i), n = !0);
|
|
1032
|
+
},
|
|
1033
|
+
o(i) {
|
|
1034
|
+
D(e.$$.fragment, i), n = !1;
|
|
1035
|
+
},
|
|
1036
|
+
d(i) {
|
|
1037
|
+
be(e, i);
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1040
|
+
}
|
|
1041
|
+
function Ct(t, e, n) {
|
|
1042
|
+
let { $$slots: s = {}, $$scope: l } = e;
|
|
1043
|
+
const i = [
|
|
1044
|
+
["circle", { cx: "12", cy: "12", r: "10" }],
|
|
1045
|
+
["path", { d: "m9 12 2 2 4-4" }]
|
|
1046
|
+
];
|
|
1047
|
+
return t.$$set = (o) => {
|
|
1048
|
+
n(1, e = A(A({}, e), te(o))), "$$scope" in o && n(3, l = o.$$scope);
|
|
1049
|
+
}, e = te(e), [i, e, s, l];
|
|
1050
|
+
}
|
|
1051
|
+
class St extends ie {
|
|
1052
|
+
constructor(e) {
|
|
1053
|
+
super(), le(this, e, Ct, Lt, U, {});
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
function Oe(t, e, n) {
|
|
1057
|
+
const s = t.slice();
|
|
1058
|
+
return s[6] = e[n], s;
|
|
1059
|
+
}
|
|
1060
|
+
function Pe(t, e, n) {
|
|
1061
|
+
const s = t.slice();
|
|
1062
|
+
return s[9] = e[n], s;
|
|
1063
|
+
}
|
|
1064
|
+
function Me(t) {
|
|
1065
|
+
let e, n, s, l, i, o;
|
|
1066
|
+
return n = new St({
|
|
1067
|
+
props: { class: "text-green-500 mr-2", size: 20 }
|
|
1068
|
+
}), {
|
|
1069
|
+
c() {
|
|
1070
|
+
e = m("li"), Je(n.$$.fragment), s = w(), l = m("span"), l.textContent = `${/*feature*/
|
|
1071
|
+
t[9]}`, i = w(), _(e, "class", "flex items-center");
|
|
1072
|
+
},
|
|
1073
|
+
m(r, u) {
|
|
1074
|
+
N(r, e, u), $e(n, e, null), g(e, s), g(e, l), g(e, i), o = !0;
|
|
1075
|
+
},
|
|
1076
|
+
p: L,
|
|
1077
|
+
i(r) {
|
|
1078
|
+
o || (j(n.$$.fragment, r), o = !0);
|
|
1079
|
+
},
|
|
1080
|
+
o(r) {
|
|
1081
|
+
D(n.$$.fragment, r), o = !1;
|
|
1082
|
+
},
|
|
1083
|
+
d(r) {
|
|
1084
|
+
r && x(e), be(n);
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
function We(t) {
|
|
1089
|
+
let e, n;
|
|
1090
|
+
return {
|
|
1091
|
+
c() {
|
|
1092
|
+
e = m("img"), Ie(e.src, n = "/api/placeholder/40/25") || _(e, "src", n), _(
|
|
1093
|
+
e,
|
|
1094
|
+
"alt",
|
|
1095
|
+
/*method*/
|
|
1096
|
+
t[6]
|
|
1097
|
+
), _(e, "class", "h-6");
|
|
1098
|
+
},
|
|
1099
|
+
m(s, l) {
|
|
1100
|
+
N(s, e, l);
|
|
1101
|
+
},
|
|
1102
|
+
p: L,
|
|
1103
|
+
d(s) {
|
|
1104
|
+
s && x(e);
|
|
1105
|
+
}
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1108
|
+
function jt(t) {
|
|
1109
|
+
let e, n, s, l, i, o, r, u, a, v, $, c, p, f, C, M, V, S, q, pe, oe, ve, J, ke, G, ye, Y, qe, H, Q, re, ce, we, O = I(
|
|
1110
|
+
/*features*/
|
|
1111
|
+
t[1]
|
|
1112
|
+
), b = [];
|
|
1113
|
+
for (let h = 0; h < O.length; h += 1)
|
|
1114
|
+
b[h] = Me(Pe(t, O, h));
|
|
1115
|
+
const Qe = (h) => D(b[h], 1, 1, () => {
|
|
1116
|
+
b[h] = null;
|
|
1117
|
+
});
|
|
1118
|
+
let W = I(
|
|
1119
|
+
/*paymentMethods*/
|
|
1120
|
+
t[2]
|
|
1121
|
+
), y = [];
|
|
1122
|
+
for (let h = 0; h < W.length; h += 1)
|
|
1123
|
+
y[h] = We(Oe(t, W, h));
|
|
1124
|
+
return re = lt(
|
|
1125
|
+
/*$$binding_groups*/
|
|
1126
|
+
t[4][0]
|
|
1127
|
+
), {
|
|
1128
|
+
c() {
|
|
1129
|
+
e = m("div"), n = m("div"), n.textContent = "Redan prenumerant? Logga in", s = w(), l = m("h1"), l.textContent = "FOKUS", i = w(), o = m("h2"), o.textContent = "Läs Fokus Digital i 6 månader för bara 79 kr!", r = w(), u = m("ul");
|
|
1130
|
+
for (let h = 0; h < b.length; h += 1)
|
|
1131
|
+
b[h].c();
|
|
1132
|
+
a = w(), v = m("div"), $ = m("label"), c = m("input"), p = w(), f = m("div"), f.innerHTML = '<div class="font-semibold">Fokus Digital i 6 månader för 79kr!</div> <div class="text-sm text-gray-600">Efter kampanjperioden 149 kr/mån. Ingen bindningstid!</div>', C = w(), M = m("div"), M.textContent = "79 SEK/6 mån", V = w(), S = m("label"), q = m("input"), pe = w(), oe = m("div"), oe.innerHTML = '<div class="font-semibold">Fokus Digital i ett år för 995kr</div> <div class="text-sm text-gray-600">Du sparar 793 kr. Prenumerationen förnyas automatiskt årsvis.</div>', ve = w(), J = m("div"), J.textContent = "995 SEK/år", ke = w(), G = m("button"), G.textContent = "Fortsätt", ye = w(), Y = m("div"), Y.textContent = "Säker SSL-krypterad betalning", qe = w(), H = m("div");
|
|
1133
|
+
for (let h = 0; h < y.length; h += 1)
|
|
1134
|
+
y[h].c();
|
|
1135
|
+
_(n, "class", "text-right text-sm text-red-500 mb-4"), _(l, "class", "text-4xl font-bold text-red-500 mb-4"), _(o, "class", "text-xl font-semibold mb-6"), _(u, "class", "space-y-2 mb-6"), _(c, "type", "radio"), _(c, "name", "subscription"), c.__value = "sixMonths", Ne(c, c.__value), _(c, "class", "mr-3"), _(M, "class", "ml-auto font-semibold"), _($, "class", "flex items-center p-4 border rounded-lg"), _(q, "type", "radio"), _(q, "name", "subscription"), q.__value = "oneYear", Ne(q, q.__value), _(q, "class", "mr-3"), _(J, "class", "ml-auto font-semibold"), _(S, "class", "flex items-center p-4 border rounded-lg"), _(v, "class", "space-y-4 mb-6"), _(G, "class", "w-full bg-red-500 text-white py-3 rounded-lg font-semibold"), _(Y, "class", "text-center text-sm text-gray-600 mt-4"), _(H, "class", "flex justify-center space-x-2 mt-2"), _(e, "class", "max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"), re.p(c, q);
|
|
1136
|
+
},
|
|
1137
|
+
m(h, k) {
|
|
1138
|
+
N(h, e, k), g(e, n), g(e, s), g(e, l), g(e, i), g(e, o), g(e, r), g(e, u);
|
|
1139
|
+
for (let d = 0; d < b.length; d += 1)
|
|
1140
|
+
b[d] && b[d].m(u, null);
|
|
1141
|
+
g(e, a), g(e, v), g(v, $), g($, c), c.checked = c.__value === /*selectedPlan*/
|
|
1142
|
+
t[0], g($, p), g($, f), g($, C), g($, M), g(v, V), g(v, S), g(S, q), q.checked = q.__value === /*selectedPlan*/
|
|
1143
|
+
t[0], g(S, pe), g(S, oe), g(S, ve), g(S, J), g(e, ke), g(e, G), g(e, ye), g(e, Y), g(e, qe), g(e, H);
|
|
1144
|
+
for (let d = 0; d < y.length; d += 1)
|
|
1145
|
+
y[d] && y[d].m(H, null);
|
|
1146
|
+
Q = !0, ce || (we = [
|
|
1147
|
+
ne(
|
|
1148
|
+
c,
|
|
1149
|
+
"change",
|
|
1150
|
+
/*input0_change_handler*/
|
|
1151
|
+
t[3]
|
|
1152
|
+
),
|
|
1153
|
+
ne(
|
|
1154
|
+
q,
|
|
1155
|
+
"change",
|
|
1156
|
+
/*input1_change_handler*/
|
|
1157
|
+
t[5]
|
|
1158
|
+
)
|
|
1159
|
+
], ce = !0);
|
|
1160
|
+
},
|
|
1161
|
+
p(h, [k]) {
|
|
1162
|
+
if (k & /*features*/
|
|
1163
|
+
2) {
|
|
1164
|
+
O = I(
|
|
1165
|
+
/*features*/
|
|
1166
|
+
h[1]
|
|
1167
|
+
);
|
|
1168
|
+
let d;
|
|
1169
|
+
for (d = 0; d < O.length; d += 1) {
|
|
1170
|
+
const R = Pe(h, O, d);
|
|
1171
|
+
b[d] ? (b[d].p(R, k), j(b[d], 1)) : (b[d] = Me(R), b[d].c(), j(b[d], 1), b[d].m(u, null));
|
|
1172
|
+
}
|
|
1173
|
+
for (at(), d = O.length; d < b.length; d += 1)
|
|
1174
|
+
Qe(d);
|
|
1175
|
+
dt();
|
|
1176
|
+
}
|
|
1177
|
+
if (k & /*selectedPlan*/
|
|
1178
|
+
1 && (c.checked = c.__value === /*selectedPlan*/
|
|
1179
|
+
h[0]), k & /*selectedPlan*/
|
|
1180
|
+
1 && (q.checked = q.__value === /*selectedPlan*/
|
|
1181
|
+
h[0]), k & /*paymentMethods*/
|
|
1182
|
+
4) {
|
|
1183
|
+
W = I(
|
|
1184
|
+
/*paymentMethods*/
|
|
1185
|
+
h[2]
|
|
1186
|
+
);
|
|
1187
|
+
let d;
|
|
1188
|
+
for (d = 0; d < W.length; d += 1) {
|
|
1189
|
+
const R = Oe(h, W, d);
|
|
1190
|
+
y[d] ? y[d].p(R, k) : (y[d] = We(R), y[d].c(), y[d].m(H, null));
|
|
1191
|
+
}
|
|
1192
|
+
for (; d < y.length; d += 1)
|
|
1193
|
+
y[d].d(1);
|
|
1194
|
+
y.length = W.length;
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
i(h) {
|
|
1198
|
+
if (!Q) {
|
|
1199
|
+
for (let k = 0; k < O.length; k += 1)
|
|
1200
|
+
j(b[k]);
|
|
1201
|
+
Q = !0;
|
|
1202
|
+
}
|
|
1203
|
+
},
|
|
1204
|
+
o(h) {
|
|
1205
|
+
b = b.filter(Boolean);
|
|
1206
|
+
for (let k = 0; k < b.length; k += 1)
|
|
1207
|
+
D(b[k]);
|
|
1208
|
+
Q = !1;
|
|
1209
|
+
},
|
|
1210
|
+
d(h) {
|
|
1211
|
+
h && x(e), ae(b, h), ae(y, h), re.r(), ce = !1, F(we);
|
|
1212
|
+
}
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
function At(t, e, n) {
|
|
1216
|
+
let s = "sixMonths";
|
|
1217
|
+
const l = [
|
|
1218
|
+
"Allt material på Fokus.se",
|
|
1219
|
+
"Tillgång till e-tidning",
|
|
1220
|
+
"Tillgång till våra podcasts",
|
|
1221
|
+
"Nyhetsbrev"
|
|
1222
|
+
], i = [
|
|
1223
|
+
"Visa",
|
|
1224
|
+
"American Express",
|
|
1225
|
+
"Mastercard",
|
|
1226
|
+
"Klarna",
|
|
1227
|
+
"Google Pay",
|
|
1228
|
+
"Apple Pay",
|
|
1229
|
+
"Swish"
|
|
1230
|
+
], o = [[]];
|
|
1231
|
+
function r() {
|
|
1232
|
+
s = this.__value, n(0, s);
|
|
1233
|
+
}
|
|
1234
|
+
function u() {
|
|
1235
|
+
s = this.__value, n(0, s);
|
|
1236
|
+
}
|
|
1237
|
+
return [
|
|
1238
|
+
s,
|
|
1239
|
+
l,
|
|
1240
|
+
i,
|
|
1241
|
+
r,
|
|
1242
|
+
o,
|
|
1243
|
+
u
|
|
1244
|
+
];
|
|
1245
|
+
}
|
|
1246
|
+
class Ot extends ie {
|
|
1247
|
+
constructor(e) {
|
|
1248
|
+
super(), le(this, e, At, jt, U, {});
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
customElements.define("sesamy-paywall", Ye(Ot, {}, [], [], !0));
|
|
1252
|
+
export {
|
|
1253
|
+
qt as Login,
|
|
1254
|
+
Ot as Paywall
|
|
1255
|
+
};
|