@jolibox/ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1281 @@
1
+ var J, d, De, H, fe, Me, Oe, Ue, ie, ne, re, W = {}, We = [], tt = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, I = Array.isArray;
2
+ function N(e, t) {
3
+ for (var n in t)
4
+ e[n] = t[n];
5
+ return e;
6
+ }
7
+ function le(e) {
8
+ e && e.parentNode && e.parentNode.removeChild(e);
9
+ }
10
+ function R(e, t, n) {
11
+ var r, o, _, i = {};
12
+ for (_ in t)
13
+ _ == "key" ? r = t[_] : _ == "ref" ? o = t[_] : i[_] = t[_];
14
+ if (arguments.length > 2 && (i.children = arguments.length > 3 ? J.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null)
15
+ for (_ in e.defaultProps)
16
+ i[_] === void 0 && (i[_] = e.defaultProps[_]);
17
+ return G(e, i, r, o, null);
18
+ }
19
+ function G(e, t, n, r, o) {
20
+ var _ = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: o ?? ++De, __i: -1, __u: 0 };
21
+ return o == null && d.vnode != null && d.vnode(_), _;
22
+ }
23
+ function A(e) {
24
+ return e.children;
25
+ }
26
+ function E(e, t) {
27
+ this.props = e, this.context = t;
28
+ }
29
+ function M(e, t) {
30
+ if (t == null)
31
+ return e.__ ? M(e.__, e.__i + 1) : null;
32
+ for (var n; t < e.__k.length; t++)
33
+ if ((n = e.__k[t]) != null && n.__e != null)
34
+ return n.__e;
35
+ return typeof e.type == "function" ? M(e) : null;
36
+ }
37
+ function Le(e) {
38
+ var t, n;
39
+ if ((e = e.__) != null && e.__c != null) {
40
+ for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++)
41
+ if ((n = e.__k[t]) != null && n.__e != null) {
42
+ e.__e = e.__c.base = n.__e;
43
+ break;
44
+ }
45
+ return Le(e);
46
+ }
47
+ }
48
+ function pe(e) {
49
+ (!e.__d && (e.__d = !0) && H.push(e) && !Q.__r++ || fe !== d.debounceRendering) && ((fe = d.debounceRendering) || Me)(Q);
50
+ }
51
+ function Q() {
52
+ for (var e, t, n, r, o, _, i, a = 1; H.length; )
53
+ H.length > a && H.sort(Oe), e = H.shift(), a = H.length, e.__d && (n = void 0, o = (r = (t = e).__v).__e, _ = [], i = [], t.__P && ((n = N({}, r)).__v = r.__v + 1, d.vnode && d.vnode(n), ae(t.__P, n, r, t.__n, t.__P.namespaceURI, 32 & r.__u ? [o] : null, _, o ?? M(r), !!(32 & r.__u), i), n.__v = r.__v, n.__.__k[n.__i] = n, je(_, n, i), n.__e != o && Le(n)));
54
+ Q.__r = 0;
55
+ }
56
+ function Fe(e, t, n, r, o, _, i, a, s, u, p) {
57
+ var l, c, f, x, k, y, v = r && r.__k || We, m = t.length;
58
+ for (s = nt(n, t, v, s, m), l = 0; l < m; l++)
59
+ (f = n.__k[l]) != null && (c = f.__i === -1 ? W : v[f.__i] || W, f.__i = l, y = ae(e, f, c, o, _, i, a, s, u, p), x = f.__e, f.ref && c.ref != f.ref && (c.ref && ue(c.ref, null, f), p.push(f.ref, f.__c || x, f)), k == null && x != null && (k = x), 4 & f.__u || c.__k === f.__k ? s = Ie(f, s, e) : typeof f.type == "function" && y !== void 0 ? s = y : x && (s = x.nextSibling), f.__u &= -7);
60
+ return n.__e = k, s;
61
+ }
62
+ function nt(e, t, n, r, o) {
63
+ var _, i, a, s, u, p = n.length, l = p, c = 0;
64
+ for (e.__k = new Array(o), _ = 0; _ < o; _++)
65
+ (i = t[_]) != null && typeof i != "boolean" && typeof i != "function" ? (s = _ + c, (i = e.__k[_] = typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? G(null, i, null, null, null) : I(i) ? G(A, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? G(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i).__ = e, i.__b = e.__b + 1, a = null, (u = i.__i = rt(i, n, s, l)) !== -1 && (l--, (a = n[u]) && (a.__u |= 2)), a == null || a.__v === null ? (u == -1 && (o > p ? c-- : o < p && c++), typeof i.type != "function" && (i.__u |= 4)) : u != s && (u == s - 1 ? c-- : u == s + 1 ? c++ : (u > s ? c-- : c++, i.__u |= 4))) : e.__k[_] = null;
66
+ if (l)
67
+ for (_ = 0; _ < p; _++)
68
+ (a = n[_]) != null && !(2 & a.__u) && (a.__e == r && (r = M(a)), ze(a, a));
69
+ return r;
70
+ }
71
+ function Ie(e, t, n) {
72
+ var r, o;
73
+ if (typeof e.type == "function") {
74
+ for (r = e.__k, o = 0; r && o < r.length; o++)
75
+ r[o] && (r[o].__ = e, t = Ie(r[o], t, n));
76
+ return t;
77
+ }
78
+ e.__e != t && (t && e.type && !n.contains(t) && (t = M(e)), n.insertBefore(e.__e, t || null), t = e.__e);
79
+ do
80
+ t = t && t.nextSibling;
81
+ while (t != null && t.nodeType == 8);
82
+ return t;
83
+ }
84
+ function Y(e, t) {
85
+ return t = t || [], e == null || typeof e == "boolean" || (I(e) ? e.some(function(n) {
86
+ Y(n, t);
87
+ }) : t.push(e)), t;
88
+ }
89
+ function rt(e, t, n, r) {
90
+ var o, _, i = e.key, a = e.type, s = t[n];
91
+ if (s === null && e.key == null || s && i == s.key && a === s.type && !(2 & s.__u))
92
+ return n;
93
+ if (r > (s != null && !(2 & s.__u) ? 1 : 0))
94
+ for (o = n - 1, _ = n + 1; o >= 0 || _ < t.length; ) {
95
+ if (o >= 0) {
96
+ if ((s = t[o]) && !(2 & s.__u) && i == s.key && a === s.type)
97
+ return o;
98
+ o--;
99
+ }
100
+ if (_ < t.length) {
101
+ if ((s = t[_]) && !(2 & s.__u) && i == s.key && a === s.type)
102
+ return _;
103
+ _++;
104
+ }
105
+ }
106
+ return -1;
107
+ }
108
+ function de(e, t, n) {
109
+ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || tt.test(t) ? n : n + "px";
110
+ }
111
+ function B(e, t, n, r, o) {
112
+ var _;
113
+ e:
114
+ if (t == "style")
115
+ if (typeof n == "string")
116
+ e.style.cssText = n;
117
+ else {
118
+ if (typeof r == "string" && (e.style.cssText = r = ""), r)
119
+ for (t in r)
120
+ n && t in n || de(e.style, t, "");
121
+ if (n)
122
+ for (t in n)
123
+ r && n[t] === r[t] || de(e.style, t, n[t]);
124
+ }
125
+ else if (t[0] == "o" && t[1] == "n")
126
+ _ = t != (t = t.replace(Ue, "$1")), t = t.toLowerCase() in e || t == "onFocusOut" || t == "onFocusIn" ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + _] = n, n ? r ? n.t = r.t : (n.t = ie, e.addEventListener(t, _ ? re : ne, _)) : e.removeEventListener(t, _ ? re : ne, _);
127
+ else {
128
+ if (o == "http://www.w3.org/2000/svg")
129
+ t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
130
+ else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e)
131
+ try {
132
+ e[t] = n ?? "";
133
+ break e;
134
+ } catch {
135
+ }
136
+ typeof n == "function" || (n == null || n === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
137
+ }
138
+ }
139
+ function he(e) {
140
+ return function(t) {
141
+ if (this.l) {
142
+ var n = this.l[t.type + e];
143
+ if (t.u == null)
144
+ t.u = ie++;
145
+ else if (t.u < n.t)
146
+ return;
147
+ return n(d.event ? d.event(t) : t);
148
+ }
149
+ };
150
+ }
151
+ function ae(e, t, n, r, o, _, i, a, s, u) {
152
+ var p, l, c, f, x, k, y, v, m, P, C, T, b, ce, j, O, K, $ = t.type;
153
+ if (t.constructor !== void 0)
154
+ return null;
155
+ 128 & n.__u && (s = !!(32 & n.__u), _ = [a = t.__e = n.__e]), (p = d.__b) && p(t);
156
+ e:
157
+ if (typeof $ == "function")
158
+ try {
159
+ if (v = t.props, m = "prototype" in $ && $.prototype.render, P = (p = $.contextType) && r[p.__c], C = p ? P ? P.props.value : p.__ : r, n.__c ? y = (l = t.__c = n.__c).__ = l.__E : (m ? t.__c = l = new $(v, C) : (t.__c = l = new E(v, C), l.constructor = $, l.render = _t), P && P.sub(l), l.props = v, l.state || (l.state = {}), l.context = C, l.__n = r, c = l.__d = !0, l.__h = [], l._sb = []), m && l.__s == null && (l.__s = l.state), m && $.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = N({}, l.__s)), N(l.__s, $.getDerivedStateFromProps(v, l.__s))), f = l.props, x = l.state, l.__v = t, c)
160
+ m && $.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), m && l.componentDidMount != null && l.__h.push(l.componentDidMount);
161
+ else {
162
+ if (m && $.getDerivedStateFromProps == null && v !== f && l.componentWillReceiveProps != null && l.componentWillReceiveProps(v, C), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(v, l.__s, C) === !1 || t.__v == n.__v)) {
163
+ for (t.__v != n.__v && (l.props = v, l.state = l.__s, l.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(U) {
164
+ U && (U.__ = t);
165
+ }), T = 0; T < l._sb.length; T++)
166
+ l.__h.push(l._sb[T]);
167
+ l._sb = [], l.__h.length && i.push(l);
168
+ break e;
169
+ }
170
+ l.componentWillUpdate != null && l.componentWillUpdate(v, l.__s, C), m && l.componentDidUpdate != null && l.__h.push(function() {
171
+ l.componentDidUpdate(f, x, k);
172
+ });
173
+ }
174
+ if (l.context = C, l.props = v, l.__P = e, l.__e = !1, b = d.__r, ce = 0, m) {
175
+ for (l.state = l.__s, l.__d = !1, b && b(t), p = l.render(l.props, l.state, l.context), j = 0; j < l._sb.length; j++)
176
+ l.__h.push(l._sb[j]);
177
+ l._sb = [];
178
+ } else
179
+ do
180
+ l.__d = !1, b && b(t), p = l.render(l.props, l.state, l.context), l.state = l.__s;
181
+ while (l.__d && ++ce < 25);
182
+ l.state = l.__s, l.getChildContext != null && (r = N(N({}, r), l.getChildContext())), m && !c && l.getSnapshotBeforeUpdate != null && (k = l.getSnapshotBeforeUpdate(f, x)), O = p, p != null && p.type === A && p.key == null && (O = Be(p.props.children)), a = Fe(e, I(O) ? O : [O], t, n, r, o, _, i, a, s, u), l.base = t.__e, t.__u &= -161, l.__h.length && i.push(l), y && (l.__E = l.__ = null);
183
+ } catch (U) {
184
+ if (t.__v = null, s || _ != null)
185
+ if (U.then) {
186
+ for (t.__u |= s ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; )
187
+ a = a.nextSibling;
188
+ _[_.indexOf(a)] = null, t.__e = a;
189
+ } else
190
+ for (K = _.length; K--; )
191
+ le(_[K]);
192
+ else
193
+ t.__e = n.__e, t.__k = n.__k;
194
+ d.__e(U, t, n);
195
+ }
196
+ else
197
+ _ == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : a = t.__e = ot(n.__e, t, n, r, o, _, i, s, u);
198
+ return (p = d.diffed) && p(t), 128 & t.__u ? void 0 : a;
199
+ }
200
+ function je(e, t, n) {
201
+ for (var r = 0; r < n.length; r++)
202
+ ue(n[r], n[++r], n[++r]);
203
+ d.__c && d.__c(t, e), e.some(function(o) {
204
+ try {
205
+ e = o.__h, o.__h = [], e.some(function(_) {
206
+ _.call(o);
207
+ });
208
+ } catch (_) {
209
+ d.__e(_, o.__v);
210
+ }
211
+ });
212
+ }
213
+ function Be(e) {
214
+ return typeof e != "object" || e == null ? e : I(e) ? e.map(Be) : N({}, e);
215
+ }
216
+ function ot(e, t, n, r, o, _, i, a, s) {
217
+ var u, p, l, c, f, x, k, y = n.props, v = t.props, m = t.type;
218
+ if (m == "svg" ? o = "http://www.w3.org/2000/svg" : m == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), _ != null) {
219
+ for (u = 0; u < _.length; u++)
220
+ if ((f = _[u]) && "setAttribute" in f == !!m && (m ? f.localName == m : f.nodeType == 3)) {
221
+ e = f, _[u] = null;
222
+ break;
223
+ }
224
+ }
225
+ if (e == null) {
226
+ if (m == null)
227
+ return document.createTextNode(v);
228
+ e = document.createElementNS(o, m, v.is && v), a && (d.__m && d.__m(t, _), a = !1), _ = null;
229
+ }
230
+ if (m === null)
231
+ y === v || a && e.data === v || (e.data = v);
232
+ else {
233
+ if (_ = _ && J.call(e.childNodes), y = n.props || W, !a && _ != null)
234
+ for (y = {}, u = 0; u < e.attributes.length; u++)
235
+ y[(f = e.attributes[u]).name] = f.value;
236
+ for (u in y)
237
+ if (f = y[u], u != "children") {
238
+ if (u == "dangerouslySetInnerHTML")
239
+ l = f;
240
+ else if (!(u in v)) {
241
+ if (u == "value" && "defaultValue" in v || u == "checked" && "defaultChecked" in v)
242
+ continue;
243
+ B(e, u, null, f, o);
244
+ }
245
+ }
246
+ for (u in v)
247
+ f = v[u], u == "children" ? c = f : u == "dangerouslySetInnerHTML" ? p = f : u == "value" ? x = f : u == "checked" ? k = f : a && typeof f != "function" || y[u] === f || B(e, u, f, y[u], o);
248
+ if (p)
249
+ a || l && (p.__html === l.__html || p.__html === e.innerHTML) || (e.innerHTML = p.__html), t.__k = [];
250
+ else if (l && (e.innerHTML = ""), Fe(t.type === "template" ? e.content : e, I(c) ? c : [c], t, n, r, m == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, _, i, _ ? _[0] : n.__k && M(n, 0), a, s), _ != null)
251
+ for (u = _.length; u--; )
252
+ le(_[u]);
253
+ a || (u = "value", m == "progress" && x == null ? e.removeAttribute("value") : x !== void 0 && (x !== e[u] || m == "progress" && !x || m == "option" && x !== y[u]) && B(e, u, x, y[u], o), u = "checked", k !== void 0 && k !== e[u] && B(e, u, k, y[u], o));
254
+ }
255
+ return e;
256
+ }
257
+ function ue(e, t, n) {
258
+ try {
259
+ if (typeof e == "function") {
260
+ var r = typeof e.__u == "function";
261
+ r && e.__u(), r && t == null || (e.__u = e(t));
262
+ } else
263
+ e.current = t;
264
+ } catch (o) {
265
+ d.__e(o, n);
266
+ }
267
+ }
268
+ function ze(e, t, n) {
269
+ var r, o;
270
+ if (d.unmount && d.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || ue(r, null, t)), (r = e.__c) != null) {
271
+ if (r.componentWillUnmount)
272
+ try {
273
+ r.componentWillUnmount();
274
+ } catch (_) {
275
+ d.__e(_, t);
276
+ }
277
+ r.base = r.__P = null;
278
+ }
279
+ if (r = e.__k)
280
+ for (o = 0; o < r.length; o++)
281
+ r[o] && ze(r[o], t, n || typeof e.type != "function");
282
+ n || le(e.__e), e.__c = e.__ = e.__e = void 0;
283
+ }
284
+ function _t(e, t, n) {
285
+ return this.constructor(e, n);
286
+ }
287
+ function ve(e, t, n) {
288
+ var r, o, _, i;
289
+ t == document && (t = document.documentElement), d.__ && d.__(e, t), o = (r = !1) ? null : t.__k, _ = [], i = [], ae(t, e = t.__k = R(A, null, [e]), o || W, W, t.namespaceURI, o ? null : t.firstChild ? J.call(t.childNodes) : null, _, o ? o.__e : t.firstChild, r, i), je(_, e, i);
290
+ }
291
+ J = We.slice, d = { __e: function(e, t, n, r) {
292
+ for (var o, _, i; t = t.__; )
293
+ if ((o = t.__c) && !o.__)
294
+ try {
295
+ if ((_ = o.constructor) && _.getDerivedStateFromError != null && (o.setState(_.getDerivedStateFromError(e)), i = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), i = o.__d), i)
296
+ return o.__E = o;
297
+ } catch (a) {
298
+ e = a;
299
+ }
300
+ throw e;
301
+ } }, De = 0, E.prototype.setState = function(e, t) {
302
+ var n;
303
+ n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = N({}, this.state), typeof e == "function" && (e = e(N({}, n), this.props)), e && N(n, e), e != null && this.__v && (t && this._sb.push(t), pe(this));
304
+ }, E.prototype.forceUpdate = function(e) {
305
+ this.__v && (this.__e = !0, e && this.__h.push(e), pe(this));
306
+ }, E.prototype.render = A, H = [], Me = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Oe = function(e, t) {
307
+ return e.__v.__b - t.__v.__b;
308
+ }, Q.__r = 0, Ue = /(PointerCapture)$|Capture$/i, ie = 0, ne = he(!1), re = he(!0);
309
+ var L, g, X, me, F = 0, Ge = [], w = d, ye = w.__b, ge = w.__r, xe = w.diffed, be = w.__c, we = w.unmount, ke = w.__;
310
+ function se(e, t) {
311
+ w.__h && w.__h(g, e, F || t), F = 0;
312
+ var n = g.__H || (g.__H = { __: [], __h: [] });
313
+ return e >= n.__.length && n.__.push({}), n.__[e];
314
+ }
315
+ function Ce(e) {
316
+ return F = 1, it(Qe, e);
317
+ }
318
+ function it(e, t, n) {
319
+ var r = se(L++, 2);
320
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Qe(void 0, t), function(a) {
321
+ var s = r.__N ? r.__N[0] : r.__[0], u = r.t(s, a);
322
+ s !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
323
+ }], r.__c = g, !g.__f)) {
324
+ var o = function(a, s, u) {
325
+ if (!r.__c.__H)
326
+ return !0;
327
+ var p = r.__c.__H.__.filter(function(c) {
328
+ return !!c.__c;
329
+ });
330
+ if (p.every(function(c) {
331
+ return !c.__N;
332
+ }))
333
+ return !_ || _.call(this, a, s, u);
334
+ var l = r.__c.props !== a;
335
+ return p.forEach(function(c) {
336
+ if (c.__N) {
337
+ var f = c.__[0];
338
+ c.__ = c.__N, c.__N = void 0, f !== c.__[0] && (l = !0);
339
+ }
340
+ }), _ && _.call(this, a, s, u) || l;
341
+ };
342
+ g.__f = !0;
343
+ var _ = g.shouldComponentUpdate, i = g.componentWillUpdate;
344
+ g.componentWillUpdate = function(a, s, u) {
345
+ if (this.__e) {
346
+ var p = _;
347
+ _ = void 0, o(a, s, u), _ = p;
348
+ }
349
+ i && i.call(this, a, s, u);
350
+ }, g.shouldComponentUpdate = o;
351
+ }
352
+ return r.__N || r.__;
353
+ }
354
+ function q(e, t) {
355
+ var n = se(L++, 3);
356
+ !w.__s && Ve(n.__H, t) && (n.__ = e, n.u = t, g.__H.__h.push(n));
357
+ }
358
+ function Z(e) {
359
+ return F = 5, qe(function() {
360
+ return { current: e };
361
+ }, []);
362
+ }
363
+ function qe(e, t) {
364
+ var n = se(L++, 7);
365
+ return Ve(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
366
+ }
367
+ function S(e, t) {
368
+ return F = 8, qe(function() {
369
+ return e;
370
+ }, t);
371
+ }
372
+ function lt() {
373
+ for (var e; e = Ge.shift(); )
374
+ if (e.__P && e.__H)
375
+ try {
376
+ e.__H.__h.forEach(V), e.__H.__h.forEach(oe), e.__H.__h = [];
377
+ } catch (t) {
378
+ e.__H.__h = [], w.__e(t, e.__v);
379
+ }
380
+ }
381
+ w.__b = function(e) {
382
+ g = null, ye && ye(e);
383
+ }, w.__ = function(e, t) {
384
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), ke && ke(e, t);
385
+ }, w.__r = function(e) {
386
+ ge && ge(e), L = 0;
387
+ var t = (g = e.__c).__H;
388
+ t && (X === g ? (t.__h = [], g.__h = [], t.__.forEach(function(n) {
389
+ n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
390
+ })) : (t.__h.forEach(V), t.__h.forEach(oe), t.__h = [], L = 0)), X = g;
391
+ }, w.diffed = function(e) {
392
+ xe && xe(e);
393
+ var t = e.__c;
394
+ t && t.__H && (t.__H.__h.length && (Ge.push(t) !== 1 && me === w.requestAnimationFrame || ((me = w.requestAnimationFrame) || at)(lt)), t.__H.__.forEach(function(n) {
395
+ n.u && (n.__H = n.u), n.u = void 0;
396
+ })), X = g = null;
397
+ }, w.__c = function(e, t) {
398
+ t.some(function(n) {
399
+ try {
400
+ n.__h.forEach(V), n.__h = n.__h.filter(function(r) {
401
+ return !r.__ || oe(r);
402
+ });
403
+ } catch (r) {
404
+ t.some(function(o) {
405
+ o.__h && (o.__h = []);
406
+ }), t = [], w.__e(r, n.__v);
407
+ }
408
+ }), be && be(e, t);
409
+ }, w.unmount = function(e) {
410
+ we && we(e);
411
+ var t, n = e.__c;
412
+ n && n.__H && (n.__H.__.forEach(function(r) {
413
+ try {
414
+ V(r);
415
+ } catch (o) {
416
+ t = o;
417
+ }
418
+ }), n.__H = void 0, t && w.__e(t, n.__v));
419
+ };
420
+ var $e = typeof requestAnimationFrame == "function";
421
+ function at(e) {
422
+ var t, n = function() {
423
+ clearTimeout(r), $e && cancelAnimationFrame(t), setTimeout(e);
424
+ }, r = setTimeout(n, 100);
425
+ $e && (t = requestAnimationFrame(n));
426
+ }
427
+ function V(e) {
428
+ var t = g, n = e.__c;
429
+ typeof n == "function" && (e.__c = void 0, n()), g = t;
430
+ }
431
+ function oe(e) {
432
+ var t = g;
433
+ e.__c = e.__(), g = t;
434
+ }
435
+ function Ve(e, t) {
436
+ return !e || e.length !== t.length || t.some(function(n, r) {
437
+ return n !== e[r];
438
+ });
439
+ }
440
+ function Qe(e, t) {
441
+ return typeof t == "function" ? t(e) : t;
442
+ }
443
+ function Ye(e, t) {
444
+ for (var n in t)
445
+ e[n] = t[n];
446
+ return e;
447
+ }
448
+ function _e(e, t) {
449
+ for (var n in e)
450
+ if (n !== "__source" && !(n in t))
451
+ return !0;
452
+ for (var r in t)
453
+ if (r !== "__source" && e[r] !== t[r])
454
+ return !0;
455
+ return !1;
456
+ }
457
+ function Se(e, t) {
458
+ this.props = e, this.context = t;
459
+ }
460
+ function ut(e, t) {
461
+ function n(o) {
462
+ var _ = this.props.ref, i = _ == o.ref;
463
+ return !i && _ && (_.call ? _(null) : _.current = null), t ? !t(this.props, o) || !i : _e(this.props, o);
464
+ }
465
+ function r(o) {
466
+ return this.shouldComponentUpdate = n, R(e, o);
467
+ }
468
+ return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
469
+ }
470
+ (Se.prototype = new E()).isPureReactComponent = !0, Se.prototype.shouldComponentUpdate = function(e, t) {
471
+ return _e(this.props, e) || _e(this.state, t);
472
+ };
473
+ var Ne = d.__b;
474
+ d.__b = function(e) {
475
+ e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Ne && Ne(e);
476
+ };
477
+ var st = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
478
+ function ct(e) {
479
+ function t(n) {
480
+ var r = Ye({}, n);
481
+ return delete r.ref, e(r, n.ref || null);
482
+ }
483
+ return t.$$typeof = st, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
484
+ }
485
+ var ft = d.__e;
486
+ d.__e = function(e, t, n, r) {
487
+ if (e.then) {
488
+ for (var o, _ = t; _ = _.__; )
489
+ if ((o = _.__c) && o.__c)
490
+ return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
491
+ }
492
+ ft(e, t, n, r);
493
+ };
494
+ var Ee = d.unmount;
495
+ function Ze(e, t, n) {
496
+ return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
497
+ typeof r.__c == "function" && r.__c();
498
+ }), e.__c.__H = null), (e = Ye({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
499
+ return Ze(r, t, n);
500
+ })), e;
501
+ }
502
+ function Je(e, t, n) {
503
+ return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
504
+ return Je(r, t, n);
505
+ }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
506
+ }
507
+ function ee() {
508
+ this.__u = 0, this.o = null, this.__b = null;
509
+ }
510
+ function Ke(e) {
511
+ var t = e.__.__c;
512
+ return t && t.__a && t.__a(e);
513
+ }
514
+ function z() {
515
+ this.i = null, this.l = null;
516
+ }
517
+ d.unmount = function(e) {
518
+ var t = e.__c;
519
+ t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Ee && Ee(e);
520
+ }, (ee.prototype = new E()).__c = function(e, t) {
521
+ var n = t.__c, r = this;
522
+ r.o == null && (r.o = []), r.o.push(n);
523
+ var o = Ke(r.__v), _ = !1, i = function() {
524
+ _ || (_ = !0, n.__R = null, o ? o(a) : a());
525
+ };
526
+ n.__R = i;
527
+ var a = function() {
528
+ if (!--r.__u) {
529
+ if (r.state.__a) {
530
+ var s = r.state.__a;
531
+ r.__v.__k[0] = Je(s, s.__c.__P, s.__c.__O);
532
+ }
533
+ var u;
534
+ for (r.setState({ __a: r.__b = null }); u = r.o.pop(); )
535
+ u.forceUpdate();
536
+ }
537
+ };
538
+ r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(i, i);
539
+ }, ee.prototype.componentWillUnmount = function() {
540
+ this.o = [];
541
+ }, ee.prototype.render = function(e, t) {
542
+ if (this.__b) {
543
+ if (this.__v.__k) {
544
+ var n = document.createElement("div"), r = this.__v.__k[0].__c;
545
+ this.__v.__k[0] = Ze(this.__b, n, r.__O = r.__P);
546
+ }
547
+ this.__b = null;
548
+ }
549
+ var o = t.__a && R(A, null, e.fallback);
550
+ return o && (o.__u &= -33), [R(A, null, t.__a ? null : e.children), o];
551
+ };
552
+ var Pe = function(e, t, n) {
553
+ if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size))
554
+ for (n = e.i; n; ) {
555
+ for (; n.length > 3; )
556
+ n.pop()();
557
+ if (n[1] < n[0])
558
+ break;
559
+ e.i = n = n[2];
560
+ }
561
+ };
562
+ (z.prototype = new E()).__a = function(e) {
563
+ var t = this, n = Ke(t.__v), r = t.l.get(e);
564
+ return r[0]++, function(o) {
565
+ var _ = function() {
566
+ t.props.revealOrder ? (r.push(o), Pe(t, e, r)) : o();
567
+ };
568
+ n ? n(_) : _();
569
+ };
570
+ }, z.prototype.render = function(e) {
571
+ this.i = null, this.l = /* @__PURE__ */ new Map();
572
+ var t = Y(e.children);
573
+ e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
574
+ for (var n = t.length; n--; )
575
+ this.l.set(t[n], this.i = [1, 0, this.i]);
576
+ return e.children;
577
+ }, z.prototype.componentDidUpdate = z.prototype.componentDidMount = function() {
578
+ var e = this;
579
+ this.l.forEach(function(t, n) {
580
+ Pe(e, n, t);
581
+ });
582
+ };
583
+ var pt = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, dt = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, ht = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, vt = /[A-Z0-9]/g, mt = typeof document < "u", yt = function(e) {
584
+ return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
585
+ };
586
+ E.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
587
+ Object.defineProperty(E.prototype, e, { configurable: !0, get: function() {
588
+ return this["UNSAFE_" + e];
589
+ }, set: function(t) {
590
+ Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
591
+ } });
592
+ });
593
+ var He = d.event;
594
+ function gt() {
595
+ }
596
+ function xt() {
597
+ return this.cancelBubble;
598
+ }
599
+ function bt() {
600
+ return this.defaultPrevented;
601
+ }
602
+ d.event = function(e) {
603
+ return He && (e = He(e)), e.persist = gt, e.isPropagationStopped = xt, e.isDefaultPrevented = bt, e.nativeEvent = e;
604
+ };
605
+ var wt = { enumerable: !1, configurable: !0, get: function() {
606
+ return this.class;
607
+ } }, Re = d.vnode;
608
+ d.vnode = function(e) {
609
+ typeof e.type == "string" && function(t) {
610
+ var n = t.props, r = t.type, o = {}, _ = r.indexOf("-") === -1;
611
+ for (var i in n) {
612
+ var a = n[i];
613
+ if (!(i === "value" && "defaultValue" in n && a == null || mt && i === "children" && r === "noscript" || i === "class" || i === "className")) {
614
+ var s = i.toLowerCase();
615
+ i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : s === "translate" && a === "no" ? a = !1 : s[0] === "o" && s[1] === "n" ? s === "ondoubleclick" ? i = "ondblclick" : s !== "onchange" || r !== "input" && r !== "textarea" || yt(n.type) ? s === "onfocus" ? i = "onfocusin" : s === "onblur" ? i = "onfocusout" : ht.test(i) && (i = s) : s = i = "oninput" : _ && dt.test(i) ? i = i.replace(vt, "-$&").toLowerCase() : a === null && (a = void 0), s === "oninput" && o[i = s] && (i = "oninputCapture"), o[i] = a;
616
+ }
617
+ }
618
+ r == "select" && o.multiple && Array.isArray(o.value) && (o.value = Y(n.children).forEach(function(u) {
619
+ u.props.selected = o.value.indexOf(u.props.value) != -1;
620
+ })), r == "select" && o.defaultValue != null && (o.value = Y(n.children).forEach(function(u) {
621
+ u.props.selected = o.multiple ? o.defaultValue.indexOf(u.props.value) != -1 : o.defaultValue == u.props.value;
622
+ })), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", wt)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
623
+ }(e), e.$$typeof = pt, Re && Re(e);
624
+ };
625
+ var Ae = d.__r;
626
+ d.__r = function(e) {
627
+ Ae && Ae(e), e.__c;
628
+ };
629
+ var Te = d.diffed;
630
+ d.diffed = function(e) {
631
+ Te && Te(e);
632
+ var t = e.props, n = e.__e;
633
+ n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value);
634
+ };
635
+ var kt = 0;
636
+ function h(e, t, n, r, o, _) {
637
+ t || (t = {});
638
+ var i, a, s = t;
639
+ if ("ref" in s)
640
+ for (a in s = {}, t)
641
+ a == "ref" ? i = t[a] : s[a] = t[a];
642
+ var u = { type: e, props: s, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --kt, __i: -1, __u: 0, __source: o, __self: _ };
643
+ if (typeof e == "function" && (i = e.defaultProps))
644
+ for (a in i)
645
+ s[a] === void 0 && (s[a] = i[a]);
646
+ return d.vnode && d.vnode(u), u;
647
+ }
648
+ const te = {
649
+ drawerBackdrop: {
650
+ position: "fixed",
651
+ top: 0,
652
+ left: 0,
653
+ right: 0,
654
+ bottom: 0,
655
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
656
+ display: "flex",
657
+ justifyContent: "center",
658
+ alignItems: "flex-end",
659
+ zIndex: 1e3,
660
+ overflow: "hidden",
661
+ touchAction: "none"
662
+ },
663
+ drawer: {
664
+ backgroundColor: "white",
665
+ borderRadius: "16px 16px 0 0",
666
+ width: "100%",
667
+ maxWidth: "100%",
668
+ overflowY: "auto",
669
+ position: "relative",
670
+ boxShadow: "0 -2px 10px rgba(0, 0, 0, 0.1)",
671
+ display: "flex",
672
+ flexDirection: "column",
673
+ margin: "0 auto"
674
+ },
675
+ drawerContent: {
676
+ flex: 1,
677
+ width: "100%",
678
+ height: "100%",
679
+ overflow: "auto",
680
+ margin: "0 auto"
681
+ }
682
+ }, Ct = `
683
+ @keyframes fadeIn {
684
+ from { opacity: 0; }
685
+ to { opacity: 1; }
686
+ }
687
+
688
+ @keyframes fadeOut {
689
+ from { opacity: 1; }
690
+ to { opacity: 0; }
691
+ }
692
+
693
+ @keyframes slideUp {
694
+ from { transform: translateY(100%); }
695
+ to { transform: translateY(0); }
696
+ }
697
+
698
+ @keyframes slideDown {
699
+ from { transform: translateY(0); }
700
+ to { transform: translateY(100%); }
701
+ }
702
+
703
+ .backdrop-enter {
704
+ animation: fadeIn 0.3s ease forwards;
705
+ }
706
+
707
+ .backdrop-leave {
708
+ animation: fadeOut 0.3s ease forwards;
709
+ }
710
+
711
+ .drawer-enter {
712
+ animation: slideUp 0.3s ease forwards;
713
+ }
714
+
715
+ .drawer-leave {
716
+ animation: slideDown 0.3s ease forwards;
717
+ }
718
+ `, $t = ({
719
+ children: e,
720
+ isOpen: t = !1,
721
+ onClose: n,
722
+ height: r = "50%",
723
+ className: o = "",
724
+ backdropColor: _
725
+ }, i) => {
726
+ const [a, s] = Ce(t), [u, p] = Ce(null), l = Z(null), c = Z(!1);
727
+ q(() => {
728
+ const b = document.createElement("style");
729
+ return b.innerHTML = Ct, document.head.appendChild(b), () => {
730
+ document.head.removeChild(b);
731
+ };
732
+ }, []), q(() => {
733
+ t !== a && !c.current && (s(t), p(t ? "enter" : "leave"));
734
+ }, [t, a]);
735
+ const f = S(() => {
736
+ u === "leave" && (p(null), s(!1), c.current = !1);
737
+ }, [u]), x = S((b) => {
738
+ b.preventDefault(), b.stopPropagation(), b.target === l.current && y();
739
+ }, []), k = S(() => {
740
+ c.current = !1, s(!0), p("enter");
741
+ }, []), y = S(() => {
742
+ c.current = !0, p("leave"), n && n();
743
+ }, [n]), v = S(() => a && !c.current, [a]);
744
+ if (q(() => {
745
+ if (i) {
746
+ const b = {
747
+ show: k,
748
+ hide: y,
749
+ isOpen: v
750
+ };
751
+ typeof i == "function" ? i(b) : i && (i.current = b);
752
+ }
753
+ }, [k, y, v, i]), !a && !u)
754
+ return null;
755
+ const m = {
756
+ ...te.drawer,
757
+ height: typeof r == "number" ? `${r}px` : r,
758
+ backgroundColor: _ || "rgba(255, 255, 255, 1)"
759
+ }, P = {
760
+ ...te.drawerBackdrop
761
+ }, C = u ? `drawer-${u}` : "", T = u ? `backdrop-${u}` : "";
762
+ return h("div", {
763
+ ref: l,
764
+ style: P,
765
+ className: T,
766
+ onClick: x,
767
+ onTouchMove: (b) => b.preventDefault(),
768
+ children: h("div", {
769
+ style: m,
770
+ className: `${C} ${o}`,
771
+ onAnimationEnd: f,
772
+ onTouchMove: (b) => b.stopPropagation(),
773
+ children: h("div", {
774
+ style: te.drawerContent,
775
+ children: e
776
+ })
777
+ })
778
+ });
779
+ }, St = ct($t), Nt = ({
780
+ title: e,
781
+ content: t,
782
+ noHeader: n,
783
+ padding: r = "16px",
784
+ footerButtons: o,
785
+ onClose: _
786
+ }) => {
787
+ const i = {
788
+ container: {
789
+ display: "flex",
790
+ flexDirection: "column",
791
+ height: "100%",
792
+ width: "100%",
793
+ maxWidth: "440px",
794
+ margin: "0 auto"
795
+ },
796
+ header: {
797
+ padding: "16px",
798
+ borderBottom: "1px solid #eee",
799
+ display: "flex",
800
+ justifyContent: "space-between",
801
+ alignItems: "center"
802
+ },
803
+ content: {
804
+ padding: r,
805
+ flex: 1,
806
+ overflow: "auto"
807
+ },
808
+ footer: {
809
+ padding: "16px",
810
+ borderTop: "1px solid #eee",
811
+ display: "flex",
812
+ justifyContent: "flex-end",
813
+ gap: "8px"
814
+ },
815
+ closeButton: {
816
+ background: "none",
817
+ border: "none",
818
+ cursor: "pointer",
819
+ fontSize: "20px"
820
+ },
821
+ button: {
822
+ padding: "8px 16px",
823
+ borderRadius: "4px",
824
+ border: "1px solid #ddd",
825
+ cursor: "pointer"
826
+ }
827
+ };
828
+ return h("div", {
829
+ style: i.container,
830
+ children: [!n && h("div", {
831
+ style: i.header,
832
+ children: [h("h3", {
833
+ children: e
834
+ }), h("button", {
835
+ style: i.closeButton,
836
+ onClick: _,
837
+ children: "×"
838
+ })]
839
+ }), h("div", {
840
+ style: i.content,
841
+ children: t
842
+ }), o && o.length > 0 && h("div", {
843
+ style: i.footer,
844
+ children: o.map((a, s) => h("button", {
845
+ style: {
846
+ ...i.button,
847
+ backgroundColor: a.variant === "primary" ? "#1677ff" : "#fff",
848
+ color: a.variant === "primary" ? "#fff" : "#333"
849
+ },
850
+ onClick: (u) => a.onClick?.(u, {
851
+ hide: _
852
+ }),
853
+ children: a.text
854
+ }, s))
855
+ })]
856
+ });
857
+ }, Et = /* @__PURE__ */ (() => {
858
+ let e = null;
859
+ return () => (e || (e = document.createElement("div"), e.id = `jolibox-ui-modal-container-${Math.random().toString(36).substring(2, 15)}`, document.body.appendChild(e)), e);
860
+ })(), Pt = (e) => {
861
+ const t = Et();
862
+ let n = null, r = !1, o = !1;
863
+ const _ = () => {
864
+ o || (r = !1, e.onClose && e.onClose(), a());
865
+ }, i = () => window.innerWidth > window.innerHeight, a = () => {
866
+ ve(h(St, {
867
+ ref: (u) => {
868
+ n = u;
869
+ },
870
+ isOpen: r,
871
+ onClose: _,
872
+ height: i() ? "90vh" : "50vh",
873
+ backdropColor: e.backdropColor,
874
+ children: h(Nt, {
875
+ ...e,
876
+ onClose: _
877
+ })
878
+ }), t);
879
+ }, s = () => {
880
+ !o && r && a();
881
+ };
882
+ return window.addEventListener("resize", s), a(), {
883
+ show: () => {
884
+ o || (r = !0, a(), setTimeout(() => {
885
+ n && (n.show(), e.onOpen && e.onOpen());
886
+ }, 0));
887
+ },
888
+ hide: () => {
889
+ o || n && n.hide();
890
+ },
891
+ isOpen: () => r,
892
+ destroy: () => {
893
+ o = !0, window.removeEventListener("resize", s), n && n.hide(), setTimeout(() => {
894
+ t.parentNode && (ve(null, t), t.remove());
895
+ }, 300);
896
+ }
897
+ };
898
+ }, Ht = (e, t = {
899
+ threshold: 0.6
900
+ }) => {
901
+ const n = Z(null), r = Z(!1), o = S((_) => {
902
+ const [i] = _;
903
+ i.isIntersecting && !r.current ? (r.current = !0, e()) : i.isIntersecting || (r.current = !1);
904
+ }, [e]);
905
+ return q(() => {
906
+ if (n.current) {
907
+ const _ = new IntersectionObserver(o, t);
908
+ return _.observe(n.current), () => {
909
+ n.current && _.unobserve(n.current);
910
+ };
911
+ }
912
+ }, [o, t]), n;
913
+ };
914
+ function Rt({
915
+ elementTag: e = "Image",
916
+ src: t = "",
917
+ children: n,
918
+ handleExposure: r,
919
+ className: o,
920
+ imgStyle: _,
921
+ ...i
922
+ }) {
923
+ const a = Ht(() => {
924
+ t && r();
925
+ });
926
+ return e === "Image" ? h("div", {
927
+ className: o,
928
+ style: {
929
+ borderRadius: "8px"
930
+ },
931
+ children: R("img", {
932
+ ...i,
933
+ ref: a,
934
+ src: t ?? "",
935
+ style: {
936
+ display: "block",
937
+ width: "100%",
938
+ height: "100%",
939
+ objectFit: "cover",
940
+ maxWidth: "100%",
941
+ maxHeight: "100%",
942
+ borderRadius: "8px",
943
+ ..._ || {}
944
+ }
945
+ })
946
+ }) : h("div", {
947
+ ...i,
948
+ ref: a,
949
+ className: o,
950
+ children: n
951
+ });
952
+ }
953
+ const Xe = ({
954
+ children: e,
955
+ fluid: t = !1,
956
+ className: n = "",
957
+ style: r = {},
958
+ ...o
959
+ }) => {
960
+ const _ = {
961
+ width: "100%",
962
+ marginLeft: "auto",
963
+ marginRight: "auto",
964
+ paddingLeft: "15px",
965
+ paddingRight: "15px",
966
+ boxSizing: "border-box",
967
+ maxWidth: t ? "100%" : void 0,
968
+ ...r
969
+ };
970
+ return h("div", {
971
+ className: n,
972
+ style: _,
973
+ ...o,
974
+ children: e
975
+ });
976
+ }, et = ({
977
+ children: e,
978
+ gutter: t = 0,
979
+ justify: n = "start",
980
+ align: r = "top",
981
+ className: o = "",
982
+ style: _ = {},
983
+ ...i
984
+ }) => {
985
+ const a = {
986
+ start: "flex-start",
987
+ end: "flex-end",
988
+ center: "center",
989
+ "space-around": "space-around",
990
+ "space-between": "space-between"
991
+ }, s = {
992
+ top: "flex-start",
993
+ middle: "center",
994
+ bottom: "flex-end"
995
+ }, u = {
996
+ display: "flex",
997
+ flexWrap: "wrap",
998
+ boxSizing: "border-box",
999
+ justifyContent: a[n],
1000
+ alignItems: s[r],
1001
+ ..._
1002
+ };
1003
+ if (t) {
1004
+ const l = Array.isArray(t) ? t[0] : t, c = Array.isArray(t) ? t[1] : 0;
1005
+ l > 0 && (u.marginLeft = `-${l / 2}px`, u.marginRight = `-${l / 2}px`), c > 0 && (u.marginTop = `-${c / 2}px`, u.marginBottom = `-${c / 2}px`);
1006
+ }
1007
+ const p = t ? At(e, t) : e;
1008
+ return h("div", {
1009
+ className: o,
1010
+ style: u,
1011
+ ...i,
1012
+ children: p
1013
+ });
1014
+ };
1015
+ function At(e, t) {
1016
+ if (!e)
1017
+ return null;
1018
+ const n = Array.isArray(t) ? t[0] : t, r = Array.isArray(t) ? t[1] : 0;
1019
+ return Array.isArray(e) ? e.map((o, _) => o && typeof o == "object" && "type" in o ? R(o.type, {
1020
+ ...o.props,
1021
+ style: {
1022
+ ...o.props.style || {},
1023
+ paddingLeft: n > 0 ? `${n / 2}px` : void 0,
1024
+ paddingRight: n > 0 ? `${n / 2}px` : void 0,
1025
+ paddingTop: r > 0 ? `${r / 2}px` : void 0,
1026
+ paddingBottom: r > 0 ? `${r / 2}px` : void 0
1027
+ },
1028
+ key: o.key || _
1029
+ }) : o) : e && typeof e == "object" && "type" in e ? R(e.type, {
1030
+ ...e.props,
1031
+ style: {
1032
+ ...e.props.style || {},
1033
+ paddingLeft: n > 0 ? `${n / 2}px` : void 0,
1034
+ paddingRight: n > 0 ? `${n / 2}px` : void 0,
1035
+ paddingTop: r > 0 ? `${r / 2}px` : void 0,
1036
+ paddingBottom: r > 0 ? `${r / 2}px` : void 0
1037
+ }
1038
+ }) : e;
1039
+ }
1040
+ const Tt = ({
1041
+ children: e,
1042
+ span: t,
1043
+ offset: n,
1044
+ xs: r,
1045
+ sm: o,
1046
+ md: _,
1047
+ lg: i,
1048
+ xl: a,
1049
+ className: s = "",
1050
+ style: u = {},
1051
+ ...p
1052
+ }) => {
1053
+ const l = {
1054
+ position: "relative",
1055
+ width: "100%",
1056
+ paddingLeft: "15px",
1057
+ paddingRight: "15px",
1058
+ boxSizing: "border-box",
1059
+ ...u
1060
+ };
1061
+ if (t !== void 0) {
1062
+ const c = t / 24 * 100;
1063
+ l.flex = `0 0 ${c}%`, l.maxWidth = `${c}%`;
1064
+ }
1065
+ return n !== void 0 && (l.marginLeft = `${n / 24 * 100}%`), h("div", {
1066
+ className: s,
1067
+ style: l,
1068
+ ...p,
1069
+ children: e
1070
+ });
1071
+ }, Dt = ({
1072
+ game: e,
1073
+ layerName: t,
1074
+ routeMode: n,
1075
+ onGameClick: r
1076
+ }) => {
1077
+ const o = S((i) => {
1078
+ i.preventDefault(), r?.(e);
1079
+ }, [r, e]), _ = S(() => {
1080
+ }, [e, t]);
1081
+ return h(Tt, {
1082
+ span: 8,
1083
+ className: "relative px-[4px] box-border mb-[8px]",
1084
+ style: {
1085
+ marginBottom: "8px"
1086
+ },
1087
+ onClick: o,
1088
+ role: "button",
1089
+ tabIndex: 0,
1090
+ onTouchEnd: o,
1091
+ children: [h("div", {
1092
+ className: "relative w-full mb-[2px] ion-no-margin",
1093
+ children: h(Rt, {
1094
+ src: e.logo ?? e.cover ?? "",
1095
+ className: "w-full h-full absolute top-0 left-0 aspect-square rounded-[8px] object-cover",
1096
+ style: {
1097
+ display: "block",
1098
+ objectFit: "cover"
1099
+ },
1100
+ handleExposure: _
1101
+ })
1102
+ }), h("div", {
1103
+ className: "block text-white max-w-full text-[15px] leading-[1.2] overflow-hidden whitespace-nowrap text-ellipsis font-normal break-words",
1104
+ style: {
1105
+ display: "block",
1106
+ overflow: "hidden",
1107
+ textOverflow: "ellipsis",
1108
+ whiteSpace: "nowrap",
1109
+ wordBreak: "break-word",
1110
+ color: "white",
1111
+ maxWidth: "100%",
1112
+ fontSize: "15px",
1113
+ lineHeight: 1.2,
1114
+ fontWeight: "normal"
1115
+ },
1116
+ children: e.name
1117
+ })]
1118
+ }, e.gameId);
1119
+ }, Mt = ({
1120
+ list: e,
1121
+ routeMode: t,
1122
+ layerName: n,
1123
+ onGameClick: r,
1124
+ ...o
1125
+ }) => h(Xe, {
1126
+ className: "w-full max-w-[440px] mx-auto flex-grow overflow-y-auto",
1127
+ children: h(et, {
1128
+ gutter: 8,
1129
+ className: "flex-wrap",
1130
+ children: e?.map((_) => h(Dt, {
1131
+ game: _,
1132
+ routeMode: t,
1133
+ layerName: n,
1134
+ onGameClick: r
1135
+ }, _.gameId))
1136
+ })
1137
+ }), Ot = ut(Mt);
1138
+ var D = /* @__PURE__ */ ((e) => (e.Dismiss = "DISMISS", e.Quit = "QUIT", e))(D || {});
1139
+ const Ut = (e) => {
1140
+ const {
1141
+ games: t,
1142
+ title: n,
1143
+ buttons: r,
1144
+ onClose: o
1145
+ } = e, _ = S((a) => {
1146
+ o?.({
1147
+ type: a.type === D.Quit ? "quit" : "dismiss"
1148
+ });
1149
+ }, []), i = S((a) => {
1150
+ o?.({
1151
+ type: "navigate",
1152
+ data: {
1153
+ game: a
1154
+ }
1155
+ });
1156
+ }, [o]);
1157
+ return t.length ? h("div", {
1158
+ className: "recommend-panel",
1159
+ style: {
1160
+ backgroundColor: "#1a1a1a",
1161
+ width: "100%",
1162
+ height: "100%"
1163
+ },
1164
+ children: h("div", {
1165
+ className: "container",
1166
+ style: {
1167
+ height: "100%",
1168
+ display: "flex",
1169
+ flexDirection: "column",
1170
+ position: "relative"
1171
+ },
1172
+ children: [h("p", {
1173
+ className: "text-white text-[18px] leading-[24px] text-center py-[20px] px-[10px]",
1174
+ style: {
1175
+ color: "#ffffff",
1176
+ // 对应 text-white
1177
+ fontSize: "18px",
1178
+ // 对应 text-[18px]
1179
+ lineHeight: "24px",
1180
+ // 对应 leading-[24px]
1181
+ textAlign: "center",
1182
+ // 对应 text-center
1183
+ paddingTop: "20px",
1184
+ // 对应 py-[20px]
1185
+ paddingBottom: "20px",
1186
+ // 对应 py-[20px]
1187
+ paddingLeft: "10px",
1188
+ // 对应 px-[10px]
1189
+ paddingRight: "10px"
1190
+ // 对应 px-[10px]
1191
+ },
1192
+ children: n
1193
+ }), h("div", {
1194
+ style: {
1195
+ flex: 1,
1196
+ overflow: "auto",
1197
+ marginBottom: "88px"
1198
+ },
1199
+ children: h(Ot, {
1200
+ list: t || [],
1201
+ routeMode: "REDIRECT",
1202
+ layerName: "RecommendedGuide",
1203
+ onGameClick: i
1204
+ })
1205
+ }), h("div", {
1206
+ className: "pb-[16px] px-[16px] w-full",
1207
+ style: {
1208
+ position: "fixed",
1209
+ bottom: "32px",
1210
+ left: "0",
1211
+ right: "0",
1212
+ width: "100%",
1213
+ maxWidth: "440px",
1214
+ margin: "0 auto",
1215
+ background: "inherit",
1216
+ paddingTop: "16px"
1217
+ },
1218
+ children: h(Xe, {
1219
+ children: h(et, {
1220
+ gutter: 10,
1221
+ children: (r ?? []).map((a, s) => h("div", {
1222
+ style: {
1223
+ flex: "0 0 50%",
1224
+ boxSizing: "border-box"
1225
+ },
1226
+ children: h("button", {
1227
+ style: {
1228
+ width: "100%",
1229
+ height: "40px",
1230
+ borderRadius: "21px",
1231
+ whiteSpace: "nowrap",
1232
+ lineHeight: "40px",
1233
+ paddingLeft: "8px",
1234
+ paddingRight: "8px",
1235
+ border: "1px solid",
1236
+ borderColor: a.type === D.Quit ? "#ffffff30" : "#7817FF",
1237
+ backgroundColor: a.type === D.Quit ? "#ffffff2c" : "#7817FF",
1238
+ color: (a.type === D.Quit, "#fff"),
1239
+ cursor: "pointer",
1240
+ flex: 1,
1241
+ textAlign: "center",
1242
+ fontSize: "14px",
1243
+ fontWeight: "normal",
1244
+ outline: "none",
1245
+ overflow: "hidden",
1246
+ textOverflow: "ellipsis"
1247
+ },
1248
+ className: `h-[40px] rounded-[21px] whitespace-nowrap leading-[40px] px-[8px] border-solid border-[1px] flex-1 bg-[#ffffff2c] ${a.type === D.Quit, "active:border-[#7E41FF] border-[#ffffff30]"}`,
1249
+ onClick: () => _(a),
1250
+ children: a.text
1251
+ })
1252
+ }, s))
1253
+ })
1254
+ })
1255
+ })]
1256
+ })
1257
+ }) : h(A, {});
1258
+ }, Wt = (e) => {
1259
+ const t = Pt({
1260
+ title: e.title,
1261
+ content: h(Ut, {
1262
+ games: e.games,
1263
+ title: e.title,
1264
+ buttons: e.buttons,
1265
+ onClose: e.onClose
1266
+ }),
1267
+ backdropColor: "#1a1a1a",
1268
+ placement: "bottom",
1269
+ noHeader: !0,
1270
+ padding: "0px",
1271
+ onClose: () => {
1272
+ console.log("onClose");
1273
+ },
1274
+ onOpen: e.onOpen
1275
+ });
1276
+ return t.show(), t;
1277
+ };
1278
+ export {
1279
+ Wt as createRecommendModal
1280
+ };
1281
+ //# sourceMappingURL=index.es.js.map