@everymatrix/cashier-pagination 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.
- package/components/CashierPagination-CTEjanNX.js +745 -0
- package/components/CashierPagination-DcUVRfJ-.cjs +3 -0
- package/components/CashierPagination-DfPKulTl.js +782 -0
- package/es2015/cashier-pagination.cjs +1 -0
- package/es2015/cashier-pagination.js +16 -0
- package/esnext/cashier-pagination.js +14 -0
- package/package.json +25 -0
|
@@ -0,0 +1,782 @@
|
|
|
1
|
+
var $t = Object.defineProperty, gt = Object.defineProperties;
|
|
2
|
+
var mt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var X = Object.getOwnPropertySymbols;
|
|
4
|
+
var bt = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var J = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Y = (e, t) => {
|
|
6
|
+
for (var n in t || (t = {}))
|
|
7
|
+
bt.call(t, n) && J(e, n, t[n]);
|
|
8
|
+
if (X)
|
|
9
|
+
for (var n of X(t))
|
|
10
|
+
_t.call(t, n) && J(e, n, t[n]);
|
|
11
|
+
return e;
|
|
12
|
+
}, Z = (e, t) => gt(e, mt(t));
|
|
13
|
+
var k = (e, t, n) => (J(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
14
|
+
var tt = (e, t, n) => new Promise((i, s) => {
|
|
15
|
+
var o = (c) => {
|
|
16
|
+
try {
|
|
17
|
+
r(n.next(c));
|
|
18
|
+
} catch (u) {
|
|
19
|
+
s(u);
|
|
20
|
+
}
|
|
21
|
+
}, l = (c) => {
|
|
22
|
+
try {
|
|
23
|
+
r(n.throw(c));
|
|
24
|
+
} catch (u) {
|
|
25
|
+
s(u);
|
|
26
|
+
}
|
|
27
|
+
}, r = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(o, l);
|
|
28
|
+
r((n = n.apply(e, t)).next());
|
|
29
|
+
});
|
|
30
|
+
function M() {
|
|
31
|
+
}
|
|
32
|
+
function ft(e) {
|
|
33
|
+
return e();
|
|
34
|
+
}
|
|
35
|
+
function et() {
|
|
36
|
+
return /* @__PURE__ */ Object.create(null);
|
|
37
|
+
}
|
|
38
|
+
function V(e) {
|
|
39
|
+
e.forEach(ft);
|
|
40
|
+
}
|
|
41
|
+
function dt(e) {
|
|
42
|
+
return typeof e == "function";
|
|
43
|
+
}
|
|
44
|
+
function pt(e, t) {
|
|
45
|
+
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
|
|
46
|
+
}
|
|
47
|
+
function wt(e) {
|
|
48
|
+
return Object.keys(e).length === 0;
|
|
49
|
+
}
|
|
50
|
+
function w(e, t) {
|
|
51
|
+
e.appendChild(t);
|
|
52
|
+
}
|
|
53
|
+
function yt(e, t, n) {
|
|
54
|
+
const i = kt(e);
|
|
55
|
+
if (!i.getElementById(t)) {
|
|
56
|
+
const s = E("style");
|
|
57
|
+
s.id = t, s.textContent = n, vt(i, s);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function kt(e) {
|
|
61
|
+
if (!e)
|
|
62
|
+
return document;
|
|
63
|
+
const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
|
|
64
|
+
return t && /** @type {ShadowRoot} */
|
|
65
|
+
t.host ? (
|
|
66
|
+
/** @type {ShadowRoot} */
|
|
67
|
+
t
|
|
68
|
+
) : e.ownerDocument;
|
|
69
|
+
}
|
|
70
|
+
function vt(e, t) {
|
|
71
|
+
return w(
|
|
72
|
+
/** @type {Document} */
|
|
73
|
+
e.head || e,
|
|
74
|
+
t
|
|
75
|
+
), t.sheet;
|
|
76
|
+
}
|
|
77
|
+
function L(e, t, n) {
|
|
78
|
+
e.insertBefore(t, n || null);
|
|
79
|
+
}
|
|
80
|
+
function x(e) {
|
|
81
|
+
e.parentNode && e.parentNode.removeChild(e);
|
|
82
|
+
}
|
|
83
|
+
function Et(e, t) {
|
|
84
|
+
for (let n = 0; n < e.length; n += 1)
|
|
85
|
+
e[n] && e[n].d(t);
|
|
86
|
+
}
|
|
87
|
+
function E(e) {
|
|
88
|
+
return document.createElement(e);
|
|
89
|
+
}
|
|
90
|
+
function I(e) {
|
|
91
|
+
return document.createElementNS("http://www.w3.org/2000/svg", e);
|
|
92
|
+
}
|
|
93
|
+
function R(e) {
|
|
94
|
+
return document.createTextNode(e);
|
|
95
|
+
}
|
|
96
|
+
function z() {
|
|
97
|
+
return R(" ");
|
|
98
|
+
}
|
|
99
|
+
function F(e, t, n, i) {
|
|
100
|
+
return e.addEventListener(t, n, i), () => e.removeEventListener(t, n, i);
|
|
101
|
+
}
|
|
102
|
+
function d(e, t, n) {
|
|
103
|
+
n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
|
|
104
|
+
}
|
|
105
|
+
function Ct(e) {
|
|
106
|
+
return Array.from(e.childNodes);
|
|
107
|
+
}
|
|
108
|
+
function at(e, t) {
|
|
109
|
+
t = "" + t, e.data !== t && (e.data = /** @type {string} */
|
|
110
|
+
t);
|
|
111
|
+
}
|
|
112
|
+
function nt(e, t, n) {
|
|
113
|
+
e.classList.toggle(t, !!n);
|
|
114
|
+
}
|
|
115
|
+
function xt(e) {
|
|
116
|
+
const t = {};
|
|
117
|
+
return e.childNodes.forEach(
|
|
118
|
+
/** @param {Element} node */
|
|
119
|
+
(n) => {
|
|
120
|
+
t[n.slot || "default"] = !0;
|
|
121
|
+
}
|
|
122
|
+
), t;
|
|
123
|
+
}
|
|
124
|
+
let H;
|
|
125
|
+
function T(e) {
|
|
126
|
+
H = e;
|
|
127
|
+
}
|
|
128
|
+
function Lt() {
|
|
129
|
+
if (!H)
|
|
130
|
+
throw new Error("Function called outside component initialization");
|
|
131
|
+
return H;
|
|
132
|
+
}
|
|
133
|
+
function jt(e) {
|
|
134
|
+
Lt().$$.on_mount.push(e);
|
|
135
|
+
}
|
|
136
|
+
const O = [], G = [];
|
|
137
|
+
let B = [];
|
|
138
|
+
const it = [], St = /* @__PURE__ */ Promise.resolve();
|
|
139
|
+
let K = !1;
|
|
140
|
+
function At() {
|
|
141
|
+
K || (K = !0, St.then(N));
|
|
142
|
+
}
|
|
143
|
+
function Q(e) {
|
|
144
|
+
B.push(e);
|
|
145
|
+
}
|
|
146
|
+
const q = /* @__PURE__ */ new Set();
|
|
147
|
+
let A = 0;
|
|
148
|
+
function N() {
|
|
149
|
+
if (A !== 0)
|
|
150
|
+
return;
|
|
151
|
+
const e = H;
|
|
152
|
+
do {
|
|
153
|
+
try {
|
|
154
|
+
for (; A < O.length; ) {
|
|
155
|
+
const t = O[A];
|
|
156
|
+
A++, T(t), Ot(t.$$);
|
|
157
|
+
}
|
|
158
|
+
} catch (t) {
|
|
159
|
+
throw O.length = 0, A = 0, t;
|
|
160
|
+
}
|
|
161
|
+
for (T(null), O.length = 0, A = 0; G.length; )
|
|
162
|
+
G.pop()();
|
|
163
|
+
for (let t = 0; t < B.length; t += 1) {
|
|
164
|
+
const n = B[t];
|
|
165
|
+
q.has(n) || (q.add(n), n());
|
|
166
|
+
}
|
|
167
|
+
B.length = 0;
|
|
168
|
+
} while (O.length);
|
|
169
|
+
for (; it.length; )
|
|
170
|
+
it.pop()();
|
|
171
|
+
K = !1, q.clear(), T(e);
|
|
172
|
+
}
|
|
173
|
+
function Ot(e) {
|
|
174
|
+
if (e.fragment !== null) {
|
|
175
|
+
e.update(), V(e.before_update);
|
|
176
|
+
const t = e.dirty;
|
|
177
|
+
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(Q);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function Nt(e) {
|
|
181
|
+
const t = [], n = [];
|
|
182
|
+
B.forEach((i) => e.indexOf(i) === -1 ? t.push(i) : n.push(i)), n.forEach((i) => i()), B = t;
|
|
183
|
+
}
|
|
184
|
+
const Bt = /* @__PURE__ */ new Set();
|
|
185
|
+
function Mt(e, t) {
|
|
186
|
+
e && e.i && (Bt.delete(e), e.i(t));
|
|
187
|
+
}
|
|
188
|
+
function st(e) {
|
|
189
|
+
return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
|
|
190
|
+
}
|
|
191
|
+
function Pt(e, t, n) {
|
|
192
|
+
const { fragment: i, after_update: s } = e.$$;
|
|
193
|
+
i && i.m(t, n), Q(() => {
|
|
194
|
+
const o = e.$$.on_mount.map(ft).filter(dt);
|
|
195
|
+
e.$$.on_destroy ? e.$$.on_destroy.push(...o) : V(o), e.$$.on_mount = [];
|
|
196
|
+
}), s.forEach(Q);
|
|
197
|
+
}
|
|
198
|
+
function Tt(e, t) {
|
|
199
|
+
const n = e.$$;
|
|
200
|
+
n.fragment !== null && (Nt(n.after_update), V(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
201
|
+
}
|
|
202
|
+
function Rt(e, t) {
|
|
203
|
+
e.$$.dirty[0] === -1 && (O.push(e), At(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
|
|
204
|
+
}
|
|
205
|
+
function Ft(e, t, n, i, s, o, l = null, r = [-1]) {
|
|
206
|
+
const c = H;
|
|
207
|
+
T(e);
|
|
208
|
+
const u = e.$$ = {
|
|
209
|
+
fragment: null,
|
|
210
|
+
ctx: [],
|
|
211
|
+
// state
|
|
212
|
+
props: o,
|
|
213
|
+
update: M,
|
|
214
|
+
not_equal: s,
|
|
215
|
+
bound: et(),
|
|
216
|
+
// lifecycle
|
|
217
|
+
on_mount: [],
|
|
218
|
+
on_destroy: [],
|
|
219
|
+
on_disconnect: [],
|
|
220
|
+
before_update: [],
|
|
221
|
+
after_update: [],
|
|
222
|
+
context: new Map(t.context || (c ? c.$$.context : [])),
|
|
223
|
+
// everything else
|
|
224
|
+
callbacks: et(),
|
|
225
|
+
dirty: r,
|
|
226
|
+
skip_bound: !1,
|
|
227
|
+
root: t.target || c.$$.root
|
|
228
|
+
};
|
|
229
|
+
l && l(u.root);
|
|
230
|
+
let g = !1;
|
|
231
|
+
if (u.ctx = n(e, t.props || {}, (b, C, ...y) => {
|
|
232
|
+
const h = y.length ? y[0] : C;
|
|
233
|
+
return u.ctx && s(u.ctx[b], u.ctx[b] = h) && (!u.skip_bound && u.bound[b] && u.bound[b](h), g && Rt(e, b)), C;
|
|
234
|
+
}), u.update(), g = !0, V(u.before_update), u.fragment = i(u.ctx), t.target) {
|
|
235
|
+
if (t.hydrate) {
|
|
236
|
+
const b = Ct(t.target);
|
|
237
|
+
u.fragment && u.fragment.l(b), b.forEach(x);
|
|
238
|
+
} else
|
|
239
|
+
u.fragment && u.fragment.c();
|
|
240
|
+
t.intro && Mt(e.$$.fragment), Pt(e, t.target, t.anchor), N();
|
|
241
|
+
}
|
|
242
|
+
T(c);
|
|
243
|
+
}
|
|
244
|
+
let ht;
|
|
245
|
+
typeof HTMLElement == "function" && (ht = class extends HTMLElement {
|
|
246
|
+
constructor(t, n, i) {
|
|
247
|
+
super();
|
|
248
|
+
/** The Svelte component constructor */
|
|
249
|
+
k(this, "$$ctor");
|
|
250
|
+
/** Slots */
|
|
251
|
+
k(this, "$$s");
|
|
252
|
+
/** The Svelte component instance */
|
|
253
|
+
k(this, "$$c");
|
|
254
|
+
/** Whether or not the custom element is connected */
|
|
255
|
+
k(this, "$$cn", !1);
|
|
256
|
+
/** Component props data */
|
|
257
|
+
k(this, "$$d", {});
|
|
258
|
+
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
259
|
+
k(this, "$$r", !1);
|
|
260
|
+
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
261
|
+
k(this, "$$p_d", {});
|
|
262
|
+
/** @type {Record<string, Function[]>} Event listeners */
|
|
263
|
+
k(this, "$$l", {});
|
|
264
|
+
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
265
|
+
k(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
266
|
+
this.$$ctor = t, this.$$s = n, i && this.attachShadow({ mode: "open" });
|
|
267
|
+
}
|
|
268
|
+
addEventListener(t, n, i) {
|
|
269
|
+
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
|
|
270
|
+
const s = this.$$c.$on(t, n);
|
|
271
|
+
this.$$l_u.set(n, s);
|
|
272
|
+
}
|
|
273
|
+
super.addEventListener(t, n, i);
|
|
274
|
+
}
|
|
275
|
+
removeEventListener(t, n, i) {
|
|
276
|
+
if (super.removeEventListener(t, n, i), this.$$c) {
|
|
277
|
+
const s = this.$$l_u.get(n);
|
|
278
|
+
s && (s(), this.$$l_u.delete(n));
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
connectedCallback() {
|
|
282
|
+
return tt(this, null, function* () {
|
|
283
|
+
if (this.$$cn = !0, !this.$$c) {
|
|
284
|
+
let t = function(o) {
|
|
285
|
+
return () => {
|
|
286
|
+
let l;
|
|
287
|
+
return {
|
|
288
|
+
c: function() {
|
|
289
|
+
l = E("slot"), o !== "default" && d(l, "name", o);
|
|
290
|
+
},
|
|
291
|
+
/**
|
|
292
|
+
* @param {HTMLElement} target
|
|
293
|
+
* @param {HTMLElement} [anchor]
|
|
294
|
+
*/
|
|
295
|
+
m: function(u, g) {
|
|
296
|
+
L(u, l, g);
|
|
297
|
+
},
|
|
298
|
+
d: function(u) {
|
|
299
|
+
u && x(l);
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
if (yield Promise.resolve(), !this.$$cn || this.$$c)
|
|
305
|
+
return;
|
|
306
|
+
const n = {}, i = xt(this);
|
|
307
|
+
for (const o of this.$$s)
|
|
308
|
+
o in i && (n[o] = [t(o)]);
|
|
309
|
+
for (const o of this.attributes) {
|
|
310
|
+
const l = this.$$g_p(o.name);
|
|
311
|
+
l in this.$$d || (this.$$d[l] = D(l, o.value, this.$$p_d, "toProp"));
|
|
312
|
+
}
|
|
313
|
+
for (const o in this.$$p_d)
|
|
314
|
+
!(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
|
|
315
|
+
this.$$c = new this.$$ctor({
|
|
316
|
+
target: this.shadowRoot || this,
|
|
317
|
+
props: Z(Y({}, this.$$d), {
|
|
318
|
+
$$slots: n,
|
|
319
|
+
$$scope: {
|
|
320
|
+
ctx: []
|
|
321
|
+
}
|
|
322
|
+
})
|
|
323
|
+
});
|
|
324
|
+
const s = () => {
|
|
325
|
+
this.$$r = !0;
|
|
326
|
+
for (const o in this.$$p_d)
|
|
327
|
+
if (this.$$d[o] = this.$$c.$$.ctx[this.$$c.$$.props[o]], this.$$p_d[o].reflect) {
|
|
328
|
+
const l = D(
|
|
329
|
+
o,
|
|
330
|
+
this.$$d[o],
|
|
331
|
+
this.$$p_d,
|
|
332
|
+
"toAttribute"
|
|
333
|
+
);
|
|
334
|
+
l == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, l);
|
|
335
|
+
}
|
|
336
|
+
this.$$r = !1;
|
|
337
|
+
};
|
|
338
|
+
this.$$c.$$.after_update.push(s), s();
|
|
339
|
+
for (const o in this.$$l)
|
|
340
|
+
for (const l of this.$$l[o]) {
|
|
341
|
+
const r = this.$$c.$on(o, l);
|
|
342
|
+
this.$$l_u.set(l, r);
|
|
343
|
+
}
|
|
344
|
+
this.$$l = {};
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
349
|
+
// and setting attributes through setAttribute etc, this is helpful
|
|
350
|
+
attributeChangedCallback(t, n, i) {
|
|
351
|
+
var s;
|
|
352
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = D(t, i, this.$$p_d, "toProp"), (s = this.$$c) == null || s.$set({ [t]: this.$$d[t] }));
|
|
353
|
+
}
|
|
354
|
+
disconnectedCallback() {
|
|
355
|
+
this.$$cn = !1, Promise.resolve().then(() => {
|
|
356
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
$$g_p(t) {
|
|
360
|
+
return Object.keys(this.$$p_d).find(
|
|
361
|
+
(n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
|
|
362
|
+
) || t;
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
function D(e, t, n, i) {
|
|
366
|
+
var o;
|
|
367
|
+
const s = (o = n[e]) == null ? void 0 : o.type;
|
|
368
|
+
if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !n[e])
|
|
369
|
+
return t;
|
|
370
|
+
if (i === "toAttribute")
|
|
371
|
+
switch (s) {
|
|
372
|
+
case "Object":
|
|
373
|
+
case "Array":
|
|
374
|
+
return t == null ? null : JSON.stringify(t);
|
|
375
|
+
case "Boolean":
|
|
376
|
+
return t ? "" : null;
|
|
377
|
+
case "Number":
|
|
378
|
+
return t == null ? null : t;
|
|
379
|
+
default:
|
|
380
|
+
return t;
|
|
381
|
+
}
|
|
382
|
+
else
|
|
383
|
+
switch (s) {
|
|
384
|
+
case "Object":
|
|
385
|
+
case "Array":
|
|
386
|
+
return t && JSON.parse(t);
|
|
387
|
+
case "Boolean":
|
|
388
|
+
return t;
|
|
389
|
+
case "Number":
|
|
390
|
+
return t != null ? +t : t;
|
|
391
|
+
default:
|
|
392
|
+
return t;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
function Ht(e, t, n, i, s, o) {
|
|
396
|
+
let l = class extends ht {
|
|
397
|
+
constructor() {
|
|
398
|
+
super(e, n, s), this.$$p_d = t;
|
|
399
|
+
}
|
|
400
|
+
static get observedAttributes() {
|
|
401
|
+
return Object.keys(t).map(
|
|
402
|
+
(r) => (t[r].attribute || r).toLowerCase()
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
return Object.keys(t).forEach((r) => {
|
|
407
|
+
Object.defineProperty(l.prototype, r, {
|
|
408
|
+
get() {
|
|
409
|
+
return this.$$c && r in this.$$c ? this.$$c[r] : this.$$d[r];
|
|
410
|
+
},
|
|
411
|
+
set(c) {
|
|
412
|
+
var u;
|
|
413
|
+
c = D(r, c, t), this.$$d[r] = c, (u = this.$$c) == null || u.$set({ [r]: c });
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
}), i.forEach((r) => {
|
|
417
|
+
Object.defineProperty(l.prototype, r, {
|
|
418
|
+
get() {
|
|
419
|
+
var c;
|
|
420
|
+
return (c = this.$$c) == null ? void 0 : c[r];
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
}), e.element = /** @type {any} */
|
|
424
|
+
l, l;
|
|
425
|
+
}
|
|
426
|
+
class Vt {
|
|
427
|
+
constructor() {
|
|
428
|
+
/**
|
|
429
|
+
* ### PRIVATE API
|
|
430
|
+
*
|
|
431
|
+
* Do not use, may change at any time
|
|
432
|
+
*
|
|
433
|
+
* @type {any}
|
|
434
|
+
*/
|
|
435
|
+
k(this, "$$");
|
|
436
|
+
/**
|
|
437
|
+
* ### PRIVATE API
|
|
438
|
+
*
|
|
439
|
+
* Do not use, may change at any time
|
|
440
|
+
*
|
|
441
|
+
* @type {any}
|
|
442
|
+
*/
|
|
443
|
+
k(this, "$$set");
|
|
444
|
+
}
|
|
445
|
+
/** @returns {void} */
|
|
446
|
+
$destroy() {
|
|
447
|
+
Tt(this, 1), this.$destroy = M;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* @template {Extract<keyof Events, string>} K
|
|
451
|
+
* @param {K} type
|
|
452
|
+
* @param {((e: Events[K]) => void) | null | undefined} callback
|
|
453
|
+
* @returns {() => void}
|
|
454
|
+
*/
|
|
455
|
+
$on(t, n) {
|
|
456
|
+
if (!dt(n))
|
|
457
|
+
return M;
|
|
458
|
+
const i = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
|
|
459
|
+
return i.push(n), () => {
|
|
460
|
+
const s = i.indexOf(n);
|
|
461
|
+
s !== -1 && i.splice(s, 1);
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* @param {Partial<Props>} props
|
|
466
|
+
* @returns {void}
|
|
467
|
+
*/
|
|
468
|
+
$set(t) {
|
|
469
|
+
this.$$set && !wt(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
const Ut = "4";
|
|
473
|
+
typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ut);
|
|
474
|
+
function It(e, t) {
|
|
475
|
+
if (e) {
|
|
476
|
+
const n = document.createElement("style");
|
|
477
|
+
n.innerHTML = t, e.appendChild(n);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
function zt(e, t) {
|
|
481
|
+
const n = new URL(t);
|
|
482
|
+
fetch(n.href).then((i) => i.text()).then((i) => {
|
|
483
|
+
const s = document.createElement("style");
|
|
484
|
+
s.innerHTML = i, e && e.appendChild(s);
|
|
485
|
+
}).catch((i) => {
|
|
486
|
+
console.error("There was an error while trying to load client styling from URL", i);
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
function Dt(e, t, n) {
|
|
490
|
+
if (window.emMessageBus) {
|
|
491
|
+
const i = document.createElement("style");
|
|
492
|
+
window.emMessageBus.subscribe(t, (s) => {
|
|
493
|
+
i.innerHTML = s, e && e.appendChild(i);
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
function Jt(e) {
|
|
498
|
+
yt(e, "svelte-1rkxa9f", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.pagination{display:flex;gap:4px;align-items:center;justify-content:center;flex-wrap:wrap}button{padding:6px;border:1px solid var(--emw--color-grey-10, #F8F8F8);background:transparent;cursor:pointer;border-radius:4px;color:var(--emw--color-grey-10, #111);min-width:30px}button:hover:not(:disabled):not(.selected){border-color:var(--emw--color-grey-105, #E8E9EB)}button:disabled{color:var(--emw--color-grey-105, #E8E9EB);cursor:not-allowed}.nav-btn{display:flex;align-items:center;gap:4px;font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-primary, #4A975C);height:30px;width:30px}.selected{color:var(--emw--color-primary, #4A975C);font-weight:var(--emw--font-weight-bold, 700);border-color:var(--emw--color-primary, #4A975C)}");
|
|
499
|
+
}
|
|
500
|
+
function ot(e, t, n) {
|
|
501
|
+
const i = e.slice();
|
|
502
|
+
return i[15] = t[n], i;
|
|
503
|
+
}
|
|
504
|
+
function lt(e) {
|
|
505
|
+
let t, n, i, s;
|
|
506
|
+
return {
|
|
507
|
+
c() {
|
|
508
|
+
t = E("button"), t.textContent = "1", n = R(`
|
|
509
|
+
...`);
|
|
510
|
+
},
|
|
511
|
+
m(o, l) {
|
|
512
|
+
L(o, t, l), L(o, n, l), i || (s = F(
|
|
513
|
+
t,
|
|
514
|
+
"click",
|
|
515
|
+
/*click_handler_1*/
|
|
516
|
+
e[9]
|
|
517
|
+
), i = !0);
|
|
518
|
+
},
|
|
519
|
+
p: M,
|
|
520
|
+
d(o) {
|
|
521
|
+
o && (x(t), x(n)), i = !1, s();
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
function rt(e) {
|
|
526
|
+
let t, n = (
|
|
527
|
+
/*page*/
|
|
528
|
+
e[15] + ""
|
|
529
|
+
), i, s, o;
|
|
530
|
+
function l() {
|
|
531
|
+
return (
|
|
532
|
+
/*click_handler_2*/
|
|
533
|
+
e[10](
|
|
534
|
+
/*page*/
|
|
535
|
+
e[15]
|
|
536
|
+
)
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
return {
|
|
540
|
+
c() {
|
|
541
|
+
t = E("button"), i = R(n), nt(
|
|
542
|
+
t,
|
|
543
|
+
"selected",
|
|
544
|
+
/*page*/
|
|
545
|
+
e[15] === /*currentPage*/
|
|
546
|
+
e[2]
|
|
547
|
+
);
|
|
548
|
+
},
|
|
549
|
+
m(r, c) {
|
|
550
|
+
L(r, t, c), w(t, i), s || (o = F(t, "click", l), s = !0);
|
|
551
|
+
},
|
|
552
|
+
p(r, c) {
|
|
553
|
+
e = r, c & /*visiblePages*/
|
|
554
|
+
8 && n !== (n = /*page*/
|
|
555
|
+
e[15] + "") && at(i, n), c & /*visiblePages, currentPage*/
|
|
556
|
+
12 && nt(
|
|
557
|
+
t,
|
|
558
|
+
"selected",
|
|
559
|
+
/*page*/
|
|
560
|
+
e[15] === /*currentPage*/
|
|
561
|
+
e[2]
|
|
562
|
+
);
|
|
563
|
+
},
|
|
564
|
+
d(r) {
|
|
565
|
+
r && x(t), s = !1, o();
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
function ct(e) {
|
|
570
|
+
let t, n, i, s, o;
|
|
571
|
+
return {
|
|
572
|
+
c() {
|
|
573
|
+
t = R(`...
|
|
574
|
+
`), n = E("button"), i = R(
|
|
575
|
+
/*totalpages*/
|
|
576
|
+
e[0]
|
|
577
|
+
);
|
|
578
|
+
},
|
|
579
|
+
m(l, r) {
|
|
580
|
+
L(l, t, r), L(l, n, r), w(n, i), s || (o = F(
|
|
581
|
+
n,
|
|
582
|
+
"click",
|
|
583
|
+
/*click_handler_3*/
|
|
584
|
+
e[11]
|
|
585
|
+
), s = !0);
|
|
586
|
+
},
|
|
587
|
+
p(l, r) {
|
|
588
|
+
r & /*totalpages*/
|
|
589
|
+
1 && at(
|
|
590
|
+
i,
|
|
591
|
+
/*totalpages*/
|
|
592
|
+
l[0]
|
|
593
|
+
);
|
|
594
|
+
},
|
|
595
|
+
d(l) {
|
|
596
|
+
l && (x(t), x(n)), s = !1, o();
|
|
597
|
+
}
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
function qt(e) {
|
|
601
|
+
let t, n, i, s, o, l, r, c = !/*visiblePages*/
|
|
602
|
+
e[3].includes(1), u, g, b = !/*visiblePages*/
|
|
603
|
+
e[3].includes(+/*totalpages*/
|
|
604
|
+
e[0]), C, y, h, P, j, a, U, _ = c && lt(e), S = st(
|
|
605
|
+
/*visiblePages*/
|
|
606
|
+
e[3]
|
|
607
|
+
), m = [];
|
|
608
|
+
for (let f = 0; f < S.length; f += 1)
|
|
609
|
+
m[f] = rt(ot(e, S, f));
|
|
610
|
+
let p = b && ct(e);
|
|
611
|
+
return {
|
|
612
|
+
c() {
|
|
613
|
+
t = E("div"), n = E("nav"), i = E("button"), s = I("svg"), o = I("polyline"), r = z(), _ && _.c(), u = z();
|
|
614
|
+
for (let f = 0; f < m.length; f += 1)
|
|
615
|
+
m[f].c();
|
|
616
|
+
g = z(), p && p.c(), C = z(), y = E("button"), h = I("svg"), P = I("polyline"), d(o, "points", "15 18 9 12 15 6"), d(s, "xmlns", "http://www.w3.org/2000/svg"), d(s, "width", "24"), d(s, "height", "24"), d(s, "viewBox", "0 0 24 24"), d(s, "fill", "none"), d(s, "stroke", "currentColor"), d(s, "stroke-width", "2"), d(s, "stroke-linecap", "round"), d(s, "stroke-linejoin", "round"), d(s, "class", "feather feather-chevron-left"), d(i, "class", "nav-btn"), i.disabled = l = /*currentPage*/
|
|
617
|
+
e[2] === 1, d(P, "points", "9 18 15 12 9 6"), d(h, "xmlns", "http://www.w3.org/2000/svg"), d(h, "width", "24"), d(h, "height", "24"), d(h, "viewBox", "0 0 24 24"), d(h, "fill", "none"), d(h, "stroke", "currentColor"), d(h, "stroke-width", "2"), d(h, "stroke-linecap", "round"), d(h, "stroke-linejoin", "round"), d(h, "class", "feather feather-chevron-right"), d(y, "class", "nav-btn"), y.disabled = j = /*currentPage*/
|
|
618
|
+
e[2] === /*totalpages*/
|
|
619
|
+
e[0], d(n, "class", "pagination");
|
|
620
|
+
},
|
|
621
|
+
m(f, v) {
|
|
622
|
+
L(f, t, v), w(t, n), w(n, i), w(i, s), w(s, o), w(n, r), _ && _.m(n, null), w(n, u);
|
|
623
|
+
for (let $ = 0; $ < m.length; $ += 1)
|
|
624
|
+
m[$] && m[$].m(n, null);
|
|
625
|
+
w(n, g), p && p.m(n, null), w(n, C), w(n, y), w(y, h), w(h, P), e[13](t), a || (U = [
|
|
626
|
+
F(
|
|
627
|
+
i,
|
|
628
|
+
"click",
|
|
629
|
+
/*click_handler*/
|
|
630
|
+
e[8]
|
|
631
|
+
),
|
|
632
|
+
F(
|
|
633
|
+
y,
|
|
634
|
+
"click",
|
|
635
|
+
/*click_handler_4*/
|
|
636
|
+
e[12]
|
|
637
|
+
)
|
|
638
|
+
], a = !0);
|
|
639
|
+
},
|
|
640
|
+
p(f, [v]) {
|
|
641
|
+
if (v & /*currentPage*/
|
|
642
|
+
4 && l !== (l = /*currentPage*/
|
|
643
|
+
f[2] === 1) && (i.disabled = l), v & /*visiblePages*/
|
|
644
|
+
8 && (c = !/*visiblePages*/
|
|
645
|
+
f[3].includes(1)), c ? _ ? _.p(f, v) : (_ = lt(f), _.c(), _.m(n, u)) : _ && (_.d(1), _ = null), v & /*visiblePages, currentPage, goToPage*/
|
|
646
|
+
28) {
|
|
647
|
+
S = st(
|
|
648
|
+
/*visiblePages*/
|
|
649
|
+
f[3]
|
|
650
|
+
);
|
|
651
|
+
let $;
|
|
652
|
+
for ($ = 0; $ < S.length; $ += 1) {
|
|
653
|
+
const W = ot(f, S, $);
|
|
654
|
+
m[$] ? m[$].p(W, v) : (m[$] = rt(W), m[$].c(), m[$].m(n, g));
|
|
655
|
+
}
|
|
656
|
+
for (; $ < m.length; $ += 1)
|
|
657
|
+
m[$].d(1);
|
|
658
|
+
m.length = S.length;
|
|
659
|
+
}
|
|
660
|
+
v & /*visiblePages, totalpages*/
|
|
661
|
+
9 && (b = !/*visiblePages*/
|
|
662
|
+
f[3].includes(+/*totalpages*/
|
|
663
|
+
f[0])), b ? p ? p.p(f, v) : (p = ct(f), p.c(), p.m(n, C)) : p && (p.d(1), p = null), v & /*currentPage, totalpages*/
|
|
664
|
+
5 && j !== (j = /*currentPage*/
|
|
665
|
+
f[2] === /*totalpages*/
|
|
666
|
+
f[0]) && (y.disabled = j);
|
|
667
|
+
},
|
|
668
|
+
i: M,
|
|
669
|
+
o: M,
|
|
670
|
+
d(f) {
|
|
671
|
+
f && x(t), _ && _.d(), Et(m, f), p && p.d(), e[13](null), a = !1, V(U);
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
function ut(e, t) {
|
|
676
|
+
const i = [];
|
|
677
|
+
if (t <= 5) {
|
|
678
|
+
for (let l = 1; l <= t; l++)
|
|
679
|
+
i.push(l);
|
|
680
|
+
return i;
|
|
681
|
+
}
|
|
682
|
+
let s = e - 1, o = e + 1;
|
|
683
|
+
s < 1 && (o += 1 - s, s = 1), o > t && (s -= o - t, o = t), s = Math.max(1, s);
|
|
684
|
+
for (let l = s; l <= o; l++)
|
|
685
|
+
i.push(l);
|
|
686
|
+
return i;
|
|
687
|
+
}
|
|
688
|
+
function Gt(e, t, n) {
|
|
689
|
+
let { clientstyling: i = "" } = t, { clientstylingurl: s = "" } = t, { mbsource: o } = t, { totalpages: l = 5 } = t, r, c = 1, u;
|
|
690
|
+
u = ut(c, l), jt(() => () => {
|
|
691
|
+
});
|
|
692
|
+
function g(a) {
|
|
693
|
+
if (a >= 1 && a <= l) {
|
|
694
|
+
n(2, c = a);
|
|
695
|
+
const U = new CustomEvent(
|
|
696
|
+
"pageChange",
|
|
697
|
+
{
|
|
698
|
+
detail: { page: a },
|
|
699
|
+
bubbles: !0,
|
|
700
|
+
composed: !0
|
|
701
|
+
}
|
|
702
|
+
);
|
|
703
|
+
document.dispatchEvent(U);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
const b = () => g(c - 1), C = () => g(1), y = (a) => g(a), h = () => g(+l), P = () => g(c + 1);
|
|
707
|
+
function j(a) {
|
|
708
|
+
G[a ? "unshift" : "push"](() => {
|
|
709
|
+
r = a, n(1, r);
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
return e.$$set = (a) => {
|
|
713
|
+
"clientstyling" in a && n(5, i = a.clientstyling), "clientstylingurl" in a && n(6, s = a.clientstylingurl), "mbsource" in a && n(7, o = a.mbsource), "totalpages" in a && n(0, l = a.totalpages);
|
|
714
|
+
}, e.$$.update = () => {
|
|
715
|
+
e.$$.dirty & /*currentPage, totalpages*/
|
|
716
|
+
5 && n(3, u = ut(c, l)), e.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
717
|
+
34 && i && r && It(r, i), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
718
|
+
66 && s && r && zt(r, s), e.$$.dirty & /*mbsource, customStylingContainer*/
|
|
719
|
+
130 && o && r && Dt(r, `${o}.Style`);
|
|
720
|
+
}, [
|
|
721
|
+
l,
|
|
722
|
+
r,
|
|
723
|
+
c,
|
|
724
|
+
u,
|
|
725
|
+
g,
|
|
726
|
+
i,
|
|
727
|
+
s,
|
|
728
|
+
o,
|
|
729
|
+
b,
|
|
730
|
+
C,
|
|
731
|
+
y,
|
|
732
|
+
h,
|
|
733
|
+
P,
|
|
734
|
+
j
|
|
735
|
+
];
|
|
736
|
+
}
|
|
737
|
+
class Kt extends Vt {
|
|
738
|
+
constructor(t) {
|
|
739
|
+
super(), Ft(
|
|
740
|
+
this,
|
|
741
|
+
t,
|
|
742
|
+
Gt,
|
|
743
|
+
qt,
|
|
744
|
+
pt,
|
|
745
|
+
{
|
|
746
|
+
clientstyling: 5,
|
|
747
|
+
clientstylingurl: 6,
|
|
748
|
+
mbsource: 7,
|
|
749
|
+
totalpages: 0
|
|
750
|
+
},
|
|
751
|
+
Jt
|
|
752
|
+
);
|
|
753
|
+
}
|
|
754
|
+
get clientstyling() {
|
|
755
|
+
return this.$$.ctx[5];
|
|
756
|
+
}
|
|
757
|
+
set clientstyling(t) {
|
|
758
|
+
this.$$set({ clientstyling: t }), N();
|
|
759
|
+
}
|
|
760
|
+
get clientstylingurl() {
|
|
761
|
+
return this.$$.ctx[6];
|
|
762
|
+
}
|
|
763
|
+
set clientstylingurl(t) {
|
|
764
|
+
this.$$set({ clientstylingurl: t }), N();
|
|
765
|
+
}
|
|
766
|
+
get mbsource() {
|
|
767
|
+
return this.$$.ctx[7];
|
|
768
|
+
}
|
|
769
|
+
set mbsource(t) {
|
|
770
|
+
this.$$set({ mbsource: t }), N();
|
|
771
|
+
}
|
|
772
|
+
get totalpages() {
|
|
773
|
+
return this.$$.ctx[0];
|
|
774
|
+
}
|
|
775
|
+
set totalpages(t) {
|
|
776
|
+
this.$$set({ totalpages: t }), N();
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
Ht(Kt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, totalpages: {} }, [], [], !0);
|
|
780
|
+
export {
|
|
781
|
+
Kt as default
|
|
782
|
+
};
|