@voxket-ai/events-sdk 1.0.22 → 1.0.24
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/dist/api/ApiClient.d.ts +1 -1
- package/dist/events-sdk.js +494 -489
- package/dist/events-sdk.umd.cjs +1 -1
- package/dist/utils/formUtils.d.ts +2 -0
- package/package.json +1 -1
package/dist/events-sdk.js
CHANGED
|
@@ -27,7 +27,7 @@ var g = class {
|
|
|
27
27
|
let e = ((/* @__PURE__ */ Error()).stack?.split("\n")[3] || "").match(/(?:at\s+.*?\s+\()?(?:.*?\/([^/]+?)):(\d+):\d+\)?$/);
|
|
28
28
|
return e ? `[${e[1]}:${e[2]}]` : "";
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, ee = class {
|
|
31
31
|
baseUrl;
|
|
32
32
|
slug;
|
|
33
33
|
logger;
|
|
@@ -183,24 +183,24 @@ var g = class {
|
|
|
183
183
|
throw clearTimeout(o), e?.name === "AbortError" ? Error(`File upload timed out after ${this.timeoutMs / 1e3} seconds`) : e;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
async deleteFile(e, t) {
|
|
187
|
-
let
|
|
188
|
-
|
|
189
|
-
let
|
|
190
|
-
for (let e = 0; e <
|
|
191
|
-
let t =
|
|
186
|
+
async deleteFile(e, t, n) {
|
|
187
|
+
let r = encodeURIComponent(String(e).trim()), i = t || null, a = {};
|
|
188
|
+
i && (a.Authorization = `Bearer ${i}`);
|
|
189
|
+
let o = !i && n ? `?email=${encodeURIComponent(n)}` : "", s = [`/api/portal/${this.slug}/me/upload/${r}/${o}`, `/api/portal/${this.slug}/me/upload/${r}${o}`], c = null;
|
|
190
|
+
for (let e = 0; e < s.length; e++) {
|
|
191
|
+
let t = s[e];
|
|
192
192
|
this.logger.log(`API Call: DELETE ${t}`);
|
|
193
193
|
try {
|
|
194
194
|
return await this.fetchApi(t, {
|
|
195
195
|
method: "DELETE",
|
|
196
|
-
headers:
|
|
196
|
+
headers: a
|
|
197
197
|
});
|
|
198
198
|
} catch (t) {
|
|
199
|
-
if (
|
|
199
|
+
if (c = t, (t?.message?.includes("404") || t?.message?.includes("405")) && e < s.length - 1) continue;
|
|
200
200
|
throw t;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
throw
|
|
203
|
+
throw c;
|
|
204
204
|
}
|
|
205
205
|
async portalUploadFile(e, t) {
|
|
206
206
|
return this.uploadFile(t, e);
|
|
@@ -272,7 +272,7 @@ var g = class {
|
|
|
272
272
|
throw clearTimeout(i), e?.name === "AbortError" ? Error(`Submission update timed out after ${this.timeoutMs / 1e3} seconds`) : e;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
},
|
|
275
|
+
}, _ = class {
|
|
276
276
|
prefix;
|
|
277
277
|
constructor(e) {
|
|
278
278
|
this.prefix = `voxket_${e}_`;
|
|
@@ -304,13 +304,13 @@ var g = class {
|
|
|
304
304
|
clearToken() {
|
|
305
305
|
localStorage.removeItem(`${this.prefix}token`);
|
|
306
306
|
}
|
|
307
|
-
},
|
|
307
|
+
}, v = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
308
308
|
//#endregion
|
|
309
309
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
|
|
310
|
-
function
|
|
310
|
+
function y(e, t, n = []) {
|
|
311
311
|
if (t == null) throw Error("[lucide]: iconNode is required when icon name is used");
|
|
312
312
|
return {
|
|
313
|
-
name:
|
|
313
|
+
name: v(e),
|
|
314
314
|
size: 24,
|
|
315
315
|
node: t,
|
|
316
316
|
...n.length > 0 ? { aliases: n } : {}
|
|
@@ -318,7 +318,7 @@ function b(e, t, n = []) {
|
|
|
318
318
|
}
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
321
|
-
var
|
|
321
|
+
var b = (e) => {
|
|
322
322
|
let t = "", n = !1;
|
|
323
323
|
for (let r of e) {
|
|
324
324
|
if (r === "-" || r === "_" || r <= " ") {
|
|
@@ -328,10 +328,10 @@ var x = (e) => {
|
|
|
328
328
|
t.length === 0 ? t += r.toLowerCase() : t += n ? r.toUpperCase() : r, n = !1;
|
|
329
329
|
}
|
|
330
330
|
return t;
|
|
331
|
-
},
|
|
332
|
-
let t =
|
|
331
|
+
}, x = (e) => {
|
|
332
|
+
let t = b(e);
|
|
333
333
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
334
|
-
},
|
|
334
|
+
}, S = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), C = {
|
|
335
335
|
xmlns: "http://www.w3.org/2000/svg",
|
|
336
336
|
width: 24,
|
|
337
337
|
height: 24,
|
|
@@ -344,22 +344,22 @@ var x = (e) => {
|
|
|
344
344
|
};
|
|
345
345
|
//#endregion
|
|
346
346
|
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
347
|
-
function
|
|
347
|
+
function w(e) {
|
|
348
348
|
return e != null;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ??
|
|
350
|
+
function T(e, t = {}) {
|
|
351
|
+
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ?? C.width, a = e.size ?? e.height ?? C.height, o = e.aliases?.filter((e) => typeof e == "string" && e.trim() !== "").map((e) => `lucide-${e}`) ?? [], s = [...e.name ? [`lucide-${e.name}`] : [], ...o], c = t.className?.split(" ").filter(Boolean) ?? [], l = t.includeDefaultClasses === !1 ? S(...c) : S("lucide", ...s, ...c), u = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? C["stroke-width"]) * Number(e.size ?? e.width ?? C.width) / Number(t.size ?? t.width ?? C.width) : t.strokeWidth ?? C["stroke-width"];
|
|
352
352
|
return [
|
|
353
353
|
"svg",
|
|
354
354
|
{
|
|
355
|
-
...Object.entries(
|
|
355
|
+
...Object.entries(C).reduce((e, [t, n]) => (e[r(t)] = n, e), {}),
|
|
356
356
|
..."color" in t && t.color && { [r("stroke")]: t.color },
|
|
357
|
-
..."size" in t &&
|
|
357
|
+
..."size" in t && w(t.size) && {
|
|
358
358
|
[r("width")]: t.size,
|
|
359
359
|
[r("height")]: t.size
|
|
360
360
|
},
|
|
361
|
-
..."width" in t &&
|
|
362
|
-
..."height" in t &&
|
|
361
|
+
..."width" in t && w(t.width) && { [r("width")]: t.width },
|
|
362
|
+
..."height" in t && w(t.height) && { [r("height")]: t.height },
|
|
363
363
|
[r("stroke-width")]: u,
|
|
364
364
|
...l && { [r("class")]: l },
|
|
365
365
|
[r("viewBox")]: `0 0 ${i} ${a}`,
|
|
@@ -381,8 +381,8 @@ function E(e, t = {}) {
|
|
|
381
381
|
}
|
|
382
382
|
//#endregion
|
|
383
383
|
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
|
|
384
|
-
function
|
|
385
|
-
return
|
|
384
|
+
function E(e, t = {}) {
|
|
385
|
+
return T(e, {
|
|
386
386
|
...t,
|
|
387
387
|
attributeNames: {
|
|
388
388
|
...t.attributeNames,
|
|
@@ -396,44 +396,44 @@ function D(e, t = {}) {
|
|
|
396
396
|
}
|
|
397
397
|
//#endregion
|
|
398
398
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
399
|
-
var
|
|
399
|
+
var te = (e) => {
|
|
400
400
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
401
401
|
return !1;
|
|
402
|
-
},
|
|
402
|
+
}, ne = n({}), D = () => o(ne), re = i(({ color: e, size: t, width: n, height: i, strokeWidth: a, absoluteStrokeWidth: o, nonScalingStroke: s, className: c = "", children: l, iconNode: u = [], icon: d = {
|
|
403
403
|
node: u,
|
|
404
404
|
aliases: [],
|
|
405
405
|
size: 24
|
|
406
406
|
}, ...f }, p) => {
|
|
407
|
-
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke:
|
|
408
|
-
color: e ??
|
|
407
|
+
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke: ee = !1, color: _ = "currentColor", className: v = "" } = D() ?? {}, y = !!l || te(f), [b, x, C = []] = E(d, {
|
|
408
|
+
color: e ?? _,
|
|
409
409
|
width: n ?? t ?? m,
|
|
410
410
|
height: i ?? t ?? m,
|
|
411
411
|
strokeWidth: a ?? h,
|
|
412
412
|
absoluteStrokeWidth: o ?? g,
|
|
413
|
-
nonScalingStroke: s ??
|
|
414
|
-
className:
|
|
415
|
-
hasA11yProp:
|
|
413
|
+
nonScalingStroke: s ?? ee,
|
|
414
|
+
className: S(v, c),
|
|
415
|
+
hasA11yProp: y,
|
|
416
416
|
attributes: f
|
|
417
417
|
});
|
|
418
|
-
return r(
|
|
418
|
+
return r(b, {
|
|
419
419
|
ref: p,
|
|
420
|
-
...
|
|
421
|
-
}, [...
|
|
420
|
+
...x
|
|
421
|
+
}, [...C.map(([e, t]) => r(e, t)), ...Array.isArray(l) ? l : [l]]);
|
|
422
422
|
});
|
|
423
423
|
//#endregion
|
|
424
424
|
//#region node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
425
|
-
function
|
|
426
|
-
let a = typeof e == "string" ?
|
|
425
|
+
function O(e, t = [], n = []) {
|
|
426
|
+
let a = typeof e == "string" ? y(e, t, n) : e, o = i(({ className: e, ...t }, n) => r(re, {
|
|
427
427
|
ref: n,
|
|
428
428
|
icon: a,
|
|
429
429
|
className: e,
|
|
430
430
|
...t
|
|
431
431
|
}));
|
|
432
|
-
return a.name && (o.displayName =
|
|
432
|
+
return a.name && (o.displayName = x(a.name)), o;
|
|
433
433
|
}
|
|
434
434
|
//#endregion
|
|
435
435
|
//#region node_modules/lucide-react/dist/esm/icons/arrow-left.mjs
|
|
436
|
-
var
|
|
436
|
+
var k = {
|
|
437
437
|
name: "arrow-left",
|
|
438
438
|
size: 24,
|
|
439
439
|
node: [["path", {
|
|
@@ -444,8 +444,8 @@ var A = {
|
|
|
444
444
|
key: "x3x0zl"
|
|
445
445
|
}]]
|
|
446
446
|
};
|
|
447
|
-
|
|
448
|
-
var
|
|
447
|
+
k.node;
|
|
448
|
+
var ie = O(k), A = {
|
|
449
449
|
name: "arrow-right",
|
|
450
450
|
size: 24,
|
|
451
451
|
node: [["path", {
|
|
@@ -456,8 +456,8 @@ var re = k(A), j = {
|
|
|
456
456
|
key: "xquz4c"
|
|
457
457
|
}]]
|
|
458
458
|
};
|
|
459
|
-
|
|
460
|
-
var
|
|
459
|
+
A.node;
|
|
460
|
+
var ae = O(A), oe = {
|
|
461
461
|
name: "briefcase",
|
|
462
462
|
size: 24,
|
|
463
463
|
node: [["path", {
|
|
@@ -472,8 +472,8 @@ var ie = k(j), ae = {
|
|
|
472
472
|
key: "i6l2r4"
|
|
473
473
|
}]]
|
|
474
474
|
};
|
|
475
|
-
|
|
476
|
-
var
|
|
475
|
+
oe.node;
|
|
476
|
+
var j = O(oe), se = {
|
|
477
477
|
name: "building-complex",
|
|
478
478
|
size: 24,
|
|
479
479
|
node: [
|
|
@@ -500,8 +500,8 @@ var M = k(ae), oe = {
|
|
|
500
500
|
],
|
|
501
501
|
aliases: ["building-2"]
|
|
502
502
|
};
|
|
503
|
-
|
|
504
|
-
var
|
|
503
|
+
se.node;
|
|
504
|
+
var ce = O(se), le = {
|
|
505
505
|
name: "check",
|
|
506
506
|
size: 24,
|
|
507
507
|
node: [["path", {
|
|
@@ -509,8 +509,8 @@ var se = k(oe), ce = {
|
|
|
509
509
|
key: "1gmf2c"
|
|
510
510
|
}]]
|
|
511
511
|
};
|
|
512
|
-
|
|
513
|
-
var
|
|
512
|
+
le.node;
|
|
513
|
+
var ue = O(le), de = {
|
|
514
514
|
name: "chevron-down",
|
|
515
515
|
size: 24,
|
|
516
516
|
node: [["path", {
|
|
@@ -518,8 +518,8 @@ var le = k(ce), ue = {
|
|
|
518
518
|
key: "qrunsl"
|
|
519
519
|
}]]
|
|
520
520
|
};
|
|
521
|
-
|
|
522
|
-
var
|
|
521
|
+
de.node;
|
|
522
|
+
var fe = O(de), pe = {
|
|
523
523
|
name: "circle-alert",
|
|
524
524
|
size: 24,
|
|
525
525
|
node: [
|
|
@@ -546,8 +546,8 @@ var de = k(ue), fe = {
|
|
|
546
546
|
],
|
|
547
547
|
aliases: ["alert-circle"]
|
|
548
548
|
};
|
|
549
|
-
|
|
550
|
-
var
|
|
549
|
+
pe.node;
|
|
550
|
+
var me = O(pe), M = {
|
|
551
551
|
name: "circle-check-big",
|
|
552
552
|
size: 24,
|
|
553
553
|
node: [["path", {
|
|
@@ -559,8 +559,8 @@ var pe = k(fe), N = {
|
|
|
559
559
|
}]],
|
|
560
560
|
aliases: ["check-circle"]
|
|
561
561
|
};
|
|
562
|
-
|
|
563
|
-
var
|
|
562
|
+
M.node;
|
|
563
|
+
var he = O(M), N = {
|
|
564
564
|
name: "clipboard-list",
|
|
565
565
|
size: 24,
|
|
566
566
|
node: [
|
|
@@ -595,8 +595,8 @@ var me = k(N), P = {
|
|
|
595
595
|
}]
|
|
596
596
|
]
|
|
597
597
|
};
|
|
598
|
-
|
|
599
|
-
var
|
|
598
|
+
N.node;
|
|
599
|
+
var ge = O(N), P = {
|
|
600
600
|
name: "clock",
|
|
601
601
|
size: 24,
|
|
602
602
|
node: [["circle", {
|
|
@@ -609,8 +609,8 @@ var he = k(P), F = {
|
|
|
609
609
|
key: "mmk7yg"
|
|
610
610
|
}]]
|
|
611
611
|
};
|
|
612
|
-
|
|
613
|
-
var
|
|
612
|
+
P.node;
|
|
613
|
+
var F = O(P), I = {
|
|
614
614
|
name: "copy",
|
|
615
615
|
size: 24,
|
|
616
616
|
node: [["rect", {
|
|
@@ -627,7 +627,7 @@ var ge = k(F), I = {
|
|
|
627
627
|
}]]
|
|
628
628
|
};
|
|
629
629
|
I.node;
|
|
630
|
-
var _e =
|
|
630
|
+
var _e = O(I), ve = {
|
|
631
631
|
name: "credit-card",
|
|
632
632
|
size: 24,
|
|
633
633
|
node: [
|
|
@@ -653,7 +653,7 @@ var _e = k(I), ve = {
|
|
|
653
653
|
]
|
|
654
654
|
};
|
|
655
655
|
ve.node;
|
|
656
|
-
var ye =
|
|
656
|
+
var ye = O(ve), L = {
|
|
657
657
|
name: "download",
|
|
658
658
|
size: 24,
|
|
659
659
|
node: [
|
|
@@ -672,7 +672,7 @@ var ye = k(ve), L = {
|
|
|
672
672
|
]
|
|
673
673
|
};
|
|
674
674
|
L.node;
|
|
675
|
-
var be =
|
|
675
|
+
var be = O(L), xe = {
|
|
676
676
|
name: "external-link",
|
|
677
677
|
size: 24,
|
|
678
678
|
node: [
|
|
@@ -691,7 +691,7 @@ var be = k(L), xe = {
|
|
|
691
691
|
]
|
|
692
692
|
};
|
|
693
693
|
xe.node;
|
|
694
|
-
var Se =
|
|
694
|
+
var Se = O(xe), Ce = {
|
|
695
695
|
name: "file-text",
|
|
696
696
|
size: 24,
|
|
697
697
|
node: [
|
|
@@ -718,7 +718,7 @@ var Se = k(xe), Ce = {
|
|
|
718
718
|
]
|
|
719
719
|
};
|
|
720
720
|
Ce.node;
|
|
721
|
-
var we =
|
|
721
|
+
var we = O(Ce), Te = {
|
|
722
722
|
name: "folder-open",
|
|
723
723
|
size: 24,
|
|
724
724
|
node: [["path", {
|
|
@@ -727,7 +727,7 @@ var we = k(Ce), Te = {
|
|
|
727
727
|
}]]
|
|
728
728
|
};
|
|
729
729
|
Te.node;
|
|
730
|
-
var R =
|
|
730
|
+
var R = O(Te), z = {
|
|
731
731
|
name: "graduation-cap",
|
|
732
732
|
size: 24,
|
|
733
733
|
node: [
|
|
@@ -746,7 +746,7 @@ var R = k(Te), z = {
|
|
|
746
746
|
]
|
|
747
747
|
};
|
|
748
748
|
z.node;
|
|
749
|
-
var B =
|
|
749
|
+
var B = O(z), V = {
|
|
750
750
|
name: "id-card",
|
|
751
751
|
size: 24,
|
|
752
752
|
node: [
|
|
@@ -779,7 +779,7 @@ var B = k(z), V = {
|
|
|
779
779
|
]
|
|
780
780
|
};
|
|
781
781
|
V.node;
|
|
782
|
-
var H =
|
|
782
|
+
var H = O(V), U = {
|
|
783
783
|
name: "info",
|
|
784
784
|
size: 24,
|
|
785
785
|
node: [
|
|
@@ -800,7 +800,7 @@ var H = k(V), U = {
|
|
|
800
800
|
]
|
|
801
801
|
};
|
|
802
802
|
U.node;
|
|
803
|
-
var Ee =
|
|
803
|
+
var Ee = O(U), W = {
|
|
804
804
|
name: "key-round",
|
|
805
805
|
size: 24,
|
|
806
806
|
node: [["path", {
|
|
@@ -815,7 +815,7 @@ var Ee = k(U), W = {
|
|
|
815
815
|
}]]
|
|
816
816
|
};
|
|
817
817
|
W.node;
|
|
818
|
-
var G =
|
|
818
|
+
var G = O(W), K = {
|
|
819
819
|
name: "key",
|
|
820
820
|
size: 24,
|
|
821
821
|
node: [
|
|
@@ -836,7 +836,7 @@ var G = k(W), K = {
|
|
|
836
836
|
]
|
|
837
837
|
};
|
|
838
838
|
K.node;
|
|
839
|
-
var De =
|
|
839
|
+
var De = O(K), q = {
|
|
840
840
|
name: "lock",
|
|
841
841
|
size: 24,
|
|
842
842
|
node: [["rect", {
|
|
@@ -853,7 +853,7 @@ var De = k(K), q = {
|
|
|
853
853
|
}]]
|
|
854
854
|
};
|
|
855
855
|
q.node;
|
|
856
|
-
var J =
|
|
856
|
+
var J = O(q), Y = {
|
|
857
857
|
name: "log-in",
|
|
858
858
|
size: 24,
|
|
859
859
|
node: [
|
|
@@ -872,7 +872,7 @@ var J = k(q), Y = {
|
|
|
872
872
|
]
|
|
873
873
|
};
|
|
874
874
|
Y.node;
|
|
875
|
-
var Oe =
|
|
875
|
+
var Oe = O(Y), ke = {
|
|
876
876
|
name: "log-out",
|
|
877
877
|
size: 24,
|
|
878
878
|
node: [
|
|
@@ -891,7 +891,7 @@ var Oe = k(Y), ke = {
|
|
|
891
891
|
]
|
|
892
892
|
};
|
|
893
893
|
ke.node;
|
|
894
|
-
var Ae =
|
|
894
|
+
var Ae = O(ke), je = {
|
|
895
895
|
name: "mail",
|
|
896
896
|
size: 24,
|
|
897
897
|
node: [["path", {
|
|
@@ -907,7 +907,7 @@ var Ae = k(ke), je = {
|
|
|
907
907
|
}]]
|
|
908
908
|
};
|
|
909
909
|
je.node;
|
|
910
|
-
var Me =
|
|
910
|
+
var Me = O(je), Ne = {
|
|
911
911
|
name: "map-pin",
|
|
912
912
|
size: 24,
|
|
913
913
|
node: [["path", {
|
|
@@ -921,7 +921,7 @@ var Me = k(je), Ne = {
|
|
|
921
921
|
}]]
|
|
922
922
|
};
|
|
923
923
|
Ne.node;
|
|
924
|
-
var Pe =
|
|
924
|
+
var Pe = O(Ne), X = {
|
|
925
925
|
name: "maximize-2",
|
|
926
926
|
size: 24,
|
|
927
927
|
node: [
|
|
@@ -944,7 +944,7 @@ var Pe = k(Ne), X = {
|
|
|
944
944
|
]
|
|
945
945
|
};
|
|
946
946
|
X.node;
|
|
947
|
-
var Fe =
|
|
947
|
+
var Fe = O(X), Ie = {
|
|
948
948
|
name: "minimize-2",
|
|
949
949
|
size: 24,
|
|
950
950
|
node: [
|
|
@@ -967,7 +967,7 @@ var Fe = k(X), Ie = {
|
|
|
967
967
|
]
|
|
968
968
|
};
|
|
969
969
|
Ie.node;
|
|
970
|
-
var Le =
|
|
970
|
+
var Le = O(Ie), Z = {
|
|
971
971
|
name: "move",
|
|
972
972
|
size: 24,
|
|
973
973
|
node: [
|
|
@@ -998,7 +998,7 @@ var Le = k(Ie), Z = {
|
|
|
998
998
|
]
|
|
999
999
|
};
|
|
1000
1000
|
Z.node;
|
|
1001
|
-
var Re =
|
|
1001
|
+
var Re = O(Z), Q = {
|
|
1002
1002
|
name: "package-check",
|
|
1003
1003
|
size: 24,
|
|
1004
1004
|
node: [
|
|
@@ -1025,7 +1025,7 @@ var Re = k(Z), Q = {
|
|
|
1025
1025
|
]
|
|
1026
1026
|
};
|
|
1027
1027
|
Q.node;
|
|
1028
|
-
var ze =
|
|
1028
|
+
var ze = O(Q), Be = {
|
|
1029
1029
|
name: "phone",
|
|
1030
1030
|
size: 24,
|
|
1031
1031
|
node: [["path", {
|
|
@@ -1034,7 +1034,7 @@ var ze = k(Q), Be = {
|
|
|
1034
1034
|
}]]
|
|
1035
1035
|
};
|
|
1036
1036
|
Be.node;
|
|
1037
|
-
var Ve =
|
|
1037
|
+
var Ve = O(Be), He = {
|
|
1038
1038
|
name: "receipt",
|
|
1039
1039
|
size: 24,
|
|
1040
1040
|
node: [
|
|
@@ -1053,7 +1053,7 @@ var Ve = k(Be), He = {
|
|
|
1053
1053
|
]
|
|
1054
1054
|
};
|
|
1055
1055
|
He.node;
|
|
1056
|
-
var Ue =
|
|
1056
|
+
var Ue = O(He), We = {
|
|
1057
1057
|
name: "search",
|
|
1058
1058
|
size: 24,
|
|
1059
1059
|
node: [["path", {
|
|
@@ -1067,7 +1067,7 @@ var Ue = k(He), We = {
|
|
|
1067
1067
|
}]]
|
|
1068
1068
|
};
|
|
1069
1069
|
We.node;
|
|
1070
|
-
var Ge =
|
|
1070
|
+
var Ge = O(We), Ke = {
|
|
1071
1071
|
name: "sparkles",
|
|
1072
1072
|
size: 24,
|
|
1073
1073
|
node: [
|
|
@@ -1093,7 +1093,7 @@ var Ge = k(We), Ke = {
|
|
|
1093
1093
|
aliases: ["stars"]
|
|
1094
1094
|
};
|
|
1095
1095
|
Ke.node;
|
|
1096
|
-
var qe =
|
|
1096
|
+
var qe = O(Ke), Je = {
|
|
1097
1097
|
name: "ticket",
|
|
1098
1098
|
size: 24,
|
|
1099
1099
|
node: [
|
|
@@ -1116,7 +1116,7 @@ var qe = k(Ke), Je = {
|
|
|
1116
1116
|
]
|
|
1117
1117
|
};
|
|
1118
1118
|
Je.node;
|
|
1119
|
-
var Ye =
|
|
1119
|
+
var Ye = O(Je), Xe = {
|
|
1120
1120
|
name: "trash",
|
|
1121
1121
|
size: 24,
|
|
1122
1122
|
node: [
|
|
@@ -1144,7 +1144,7 @@ var Ye = k(Je), Xe = {
|
|
|
1144
1144
|
aliases: ["trash-2"]
|
|
1145
1145
|
};
|
|
1146
1146
|
Xe.node;
|
|
1147
|
-
var Ze =
|
|
1147
|
+
var Ze = O(Xe), Qe = {
|
|
1148
1148
|
name: "upload",
|
|
1149
1149
|
size: 24,
|
|
1150
1150
|
node: [
|
|
@@ -1163,7 +1163,7 @@ var Ze = k(Xe), Qe = {
|
|
|
1163
1163
|
]
|
|
1164
1164
|
};
|
|
1165
1165
|
Qe.node;
|
|
1166
|
-
var $e =
|
|
1166
|
+
var $e = O(Qe), et = {
|
|
1167
1167
|
name: "user",
|
|
1168
1168
|
size: 24,
|
|
1169
1169
|
node: [["path", {
|
|
@@ -1177,7 +1177,7 @@ var $e = k(Qe), et = {
|
|
|
1177
1177
|
}]]
|
|
1178
1178
|
};
|
|
1179
1179
|
et.node;
|
|
1180
|
-
var tt =
|
|
1180
|
+
var tt = O(et), nt = {
|
|
1181
1181
|
name: "x",
|
|
1182
1182
|
size: 24,
|
|
1183
1183
|
node: [["path", {
|
|
@@ -1189,11 +1189,33 @@ var tt = k(et), nt = {
|
|
|
1189
1189
|
}]]
|
|
1190
1190
|
};
|
|
1191
1191
|
nt.node;
|
|
1192
|
-
var rt =
|
|
1193
|
-
|
|
1192
|
+
var rt = O(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;
|
|
1193
|
+
function at(e) {
|
|
1194
|
+
let t = e, n = typeof e == "string" ? e : t?.serve_url || t?.url || t?.id || "";
|
|
1195
|
+
return String(n || "").match(it)?.[0] || "";
|
|
1196
|
+
}
|
|
1197
|
+
function ot(e, t) {
|
|
1198
|
+
if (!e) return "";
|
|
1199
|
+
if (/^field_\d+/i.test(e) && t && typeof t == "string") {
|
|
1200
|
+
let e = t.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
1201
|
+
if (e) return e;
|
|
1202
|
+
}
|
|
1203
|
+
return e;
|
|
1204
|
+
}
|
|
1205
|
+
function st(e, t = "") {
|
|
1206
|
+
if (e && typeof e == "string") {
|
|
1207
|
+
let t = e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
1208
|
+
if (t) return t;
|
|
1209
|
+
}
|
|
1210
|
+
return ot(t, e) || t;
|
|
1211
|
+
}
|
|
1212
|
+
//#endregion
|
|
1213
|
+
//#region src/widget/components/DynamicForm.tsx
|
|
1214
|
+
var ct = ({ schema: e, onSubmit: t, onBack: n, theme: r, displayMode: i, isExpanded: a, onToggleExpand: o, onClose: c, onChange: l, initialValues: u, isDark: h = !1, apiClient: g, storage: ee, onError: _, onEvent: v, backgroundStyle: y, ticketType: b, showReviewFields: x = !1 }) => {
|
|
1215
|
+
let [S, C] = d(u || {}), [w, T] = d(null), [E, te] = d(null), [ne, D] = d({}), [re, O] = d({}), [k, A] = d(null), [oe, j] = d(null), [se, ce] = d({}), [le, de] = d({}), [pe, me] = d({}), M = r?.primaryColor || "#c026d3";
|
|
1194
1216
|
s(() => {
|
|
1195
1217
|
if (u && Object.keys(u).length > 0) {
|
|
1196
|
-
|
|
1218
|
+
C((e) => ({
|
|
1197
1219
|
...u,
|
|
1198
1220
|
...e
|
|
1199
1221
|
}));
|
|
@@ -1203,49 +1225,49 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1203
1225
|
let r = u[e.id];
|
|
1204
1226
|
r && (String(r).startsWith("http://") || String(r).startsWith("https://") ? (n[e.id] = String(r), at(r) && (t[e.id] = at(r))) : t[e.id] = String(r));
|
|
1205
1227
|
}
|
|
1206
|
-
}), Object.keys(t).length > 0 &&
|
|
1228
|
+
}), Object.keys(t).length > 0 && D((e) => ({
|
|
1207
1229
|
...t,
|
|
1208
1230
|
...e
|
|
1209
|
-
})), Object.keys(n).length > 0 &&
|
|
1231
|
+
})), Object.keys(n).length > 0 && O((e) => ({
|
|
1210
1232
|
...n,
|
|
1211
1233
|
...e
|
|
1212
1234
|
}));
|
|
1213
1235
|
}
|
|
1214
1236
|
}, [u, e]);
|
|
1215
|
-
let
|
|
1216
|
-
|
|
1237
|
+
let he = (e, t) => {
|
|
1238
|
+
C((n) => {
|
|
1217
1239
|
let r = {
|
|
1218
1240
|
...n,
|
|
1219
1241
|
[e]: t
|
|
1220
1242
|
};
|
|
1221
1243
|
return l?.(r), r;
|
|
1222
1244
|
});
|
|
1223
|
-
},
|
|
1245
|
+
}, N = async (t, n) => {
|
|
1224
1246
|
if (!g) return;
|
|
1225
|
-
|
|
1226
|
-
let r =
|
|
1247
|
+
T(t), A(null), j(null);
|
|
1248
|
+
let r = ee?.getToken?.() || null, i = ne[t], a = (e?.fields || []).find((e) => e.id === t);
|
|
1227
1249
|
try {
|
|
1228
|
-
let e = await g.uploadFile(n, r, r ? null :
|
|
1250
|
+
let e = await g.uploadFile(n, r, r ? null : F(), a?.label), o = e?.data?.asset_id || e?.asset_id, s = e?.data?.serve_url || e?.serve_url;
|
|
1229
1251
|
if (!o && !s) throw Error("Upload response missing asset_id");
|
|
1230
1252
|
let c = String(o || at(s)), u = String(s || "");
|
|
1231
|
-
if (
|
|
1253
|
+
if (D((e) => ({
|
|
1232
1254
|
...e,
|
|
1233
1255
|
[t]: c
|
|
1234
|
-
})), u &&
|
|
1256
|
+
})), u && O((e) => ({
|
|
1235
1257
|
...e,
|
|
1236
1258
|
[t]: u
|
|
1237
|
-
})),
|
|
1259
|
+
})), C((e) => {
|
|
1238
1260
|
let n = {
|
|
1239
1261
|
...e,
|
|
1240
1262
|
[t]: u || c
|
|
1241
1263
|
};
|
|
1242
1264
|
return l?.(n), n;
|
|
1243
|
-
}),
|
|
1265
|
+
}), v?.("file_uploaded", {
|
|
1244
1266
|
fieldId: t,
|
|
1245
1267
|
assetId: c,
|
|
1246
1268
|
serveUrl: u
|
|
1247
1269
|
}), i && i !== c) try {
|
|
1248
|
-
await g.deleteFile(at(i) || i, r),
|
|
1270
|
+
await g.deleteFile(at(i) || i, r, r ? null : F()), v?.("file_deleted", {
|
|
1249
1271
|
fieldId: t,
|
|
1250
1272
|
assetId: i
|
|
1251
1273
|
});
|
|
@@ -1254,35 +1276,35 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1254
1276
|
}
|
|
1255
1277
|
} catch (e) {
|
|
1256
1278
|
let n = e?.message || "File upload failed. Please try again.";
|
|
1257
|
-
|
|
1279
|
+
A(n), j(t), _?.({
|
|
1258
1280
|
type: "file_upload_error",
|
|
1259
1281
|
message: n,
|
|
1260
1282
|
error: e
|
|
1261
1283
|
});
|
|
1262
1284
|
} finally {
|
|
1263
|
-
|
|
1285
|
+
T(null);
|
|
1264
1286
|
}
|
|
1265
|
-
},
|
|
1287
|
+
}, ge = async (e) => {
|
|
1266
1288
|
if (!g) return;
|
|
1267
|
-
let t =
|
|
1268
|
-
|
|
1289
|
+
let t = ee?.getToken?.() || null, n = ne[e] || S[e], r = at(n) || n;
|
|
1290
|
+
te(e), A(null), j(null);
|
|
1269
1291
|
try {
|
|
1270
|
-
r && (await g.deleteFile(r, t),
|
|
1292
|
+
r && (await g.deleteFile(r, t, t ? null : F()), v?.("file_deleted", {
|
|
1271
1293
|
fieldId: e,
|
|
1272
1294
|
assetId: r
|
|
1273
|
-
})),
|
|
1295
|
+
})), D((t) => {
|
|
1274
1296
|
let n = { ...t };
|
|
1275
1297
|
return delete n[e], n;
|
|
1276
|
-
}),
|
|
1298
|
+
}), O((t) => {
|
|
1277
1299
|
let n = { ...t };
|
|
1278
1300
|
return delete n[e], n;
|
|
1279
|
-
}),
|
|
1301
|
+
}), me((t) => {
|
|
1280
1302
|
let n = { ...t };
|
|
1281
1303
|
return delete n[e], n;
|
|
1282
|
-
}),
|
|
1304
|
+
}), de((t) => {
|
|
1283
1305
|
let n = { ...t };
|
|
1284
1306
|
return delete n[e], n;
|
|
1285
|
-
}),
|
|
1307
|
+
}), C((t) => {
|
|
1286
1308
|
let n = {
|
|
1287
1309
|
...t,
|
|
1288
1310
|
[e]: ""
|
|
@@ -1291,43 +1313,43 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1291
1313
|
});
|
|
1292
1314
|
} catch (t) {
|
|
1293
1315
|
let n = t?.message || "Failed to delete file. Please try again.";
|
|
1294
|
-
|
|
1316
|
+
A(n), j(e), _?.({
|
|
1295
1317
|
type: "file_delete_error",
|
|
1296
1318
|
message: n,
|
|
1297
1319
|
error: t
|
|
1298
1320
|
});
|
|
1299
1321
|
} finally {
|
|
1300
|
-
|
|
1322
|
+
te(null);
|
|
1301
1323
|
}
|
|
1302
|
-
},
|
|
1324
|
+
}, P = async (t, n) => {
|
|
1303
1325
|
if (!g || !n.trim()) return;
|
|
1304
|
-
|
|
1305
|
-
let r =
|
|
1326
|
+
T(t), A(null), j(null);
|
|
1327
|
+
let r = ee?.getToken?.() || null, i = ne[t], a = (e?.fields || []).find((e) => e.id === t);
|
|
1306
1328
|
try {
|
|
1307
|
-
let e = await g.submitTextAnswer(n.trim(), r, r ? null :
|
|
1329
|
+
let e = await g.submitTextAnswer(n.trim(), r, r ? null : F(), a?.label), o = e?.data?.asset_id || e?.asset_id;
|
|
1308
1330
|
if (!o) throw Error("Submission response missing asset_id");
|
|
1309
1331
|
let s = String(o);
|
|
1310
|
-
if (
|
|
1332
|
+
if (D((e) => ({
|
|
1311
1333
|
...e,
|
|
1312
1334
|
[t]: s
|
|
1313
|
-
})),
|
|
1335
|
+
})), O((e) => {
|
|
1314
1336
|
let n = { ...e };
|
|
1315
1337
|
return delete n[t], n;
|
|
1316
|
-
}),
|
|
1338
|
+
}), me((e) => ({
|
|
1317
1339
|
...e,
|
|
1318
1340
|
[t]: n.trim()
|
|
1319
|
-
})),
|
|
1341
|
+
})), C((e) => {
|
|
1320
1342
|
let n = {
|
|
1321
1343
|
...e,
|
|
1322
1344
|
[t]: s
|
|
1323
1345
|
};
|
|
1324
1346
|
return l?.(n), n;
|
|
1325
|
-
}),
|
|
1347
|
+
}), v?.("file_uploaded", {
|
|
1326
1348
|
fieldId: t,
|
|
1327
1349
|
assetId: s,
|
|
1328
1350
|
isText: !0
|
|
1329
1351
|
}), i && i !== s) try {
|
|
1330
|
-
await g.deleteFile(at(i) || i, r),
|
|
1352
|
+
await g.deleteFile(at(i) || i, r, r ? null : F()), v?.("file_deleted", {
|
|
1331
1353
|
fieldId: t,
|
|
1332
1354
|
assetId: i
|
|
1333
1355
|
});
|
|
@@ -1336,19 +1358,19 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1336
1358
|
}
|
|
1337
1359
|
} catch (e) {
|
|
1338
1360
|
let n = e?.message || "Could not submit your answer. Please try again.";
|
|
1339
|
-
|
|
1361
|
+
A(n), j(t), _?.({
|
|
1340
1362
|
type: "file_upload_error",
|
|
1341
1363
|
message: n,
|
|
1342
1364
|
error: e
|
|
1343
1365
|
});
|
|
1344
1366
|
} finally {
|
|
1345
|
-
|
|
1367
|
+
T(null);
|
|
1346
1368
|
}
|
|
1347
|
-
},
|
|
1369
|
+
}, F = () => {
|
|
1348
1370
|
let t = (e?.fields || []).find((e) => e.type === "email" || (e.label || e.id || "").toLowerCase().includes("email"));
|
|
1349
|
-
return String(t &&
|
|
1350
|
-
}, I = e?.fields || [], _e = Array.isArray(
|
|
1351
|
-
|
|
1371
|
+
return String(t && S[t.id] || S.email || "").trim();
|
|
1372
|
+
}, I = e?.fields || [], _e = Array.isArray(b?.items) ? b.items.filter((e) => e?.name) : [], ve = _e.filter((e) => e.mode === "optional"), ye = _e.filter((e) => e.mode !== "optional"), L = Array.isArray(S.selected_items) ? S.selected_items : [], be = (e) => {
|
|
1373
|
+
C((t) => {
|
|
1352
1374
|
let n = Array.isArray(t.selected_items) ? t.selected_items : [], r = {
|
|
1353
1375
|
...t,
|
|
1354
1376
|
selected_items: n.includes(e) ? n.filter((t) => t !== e) : [...n, e]
|
|
@@ -1361,7 +1383,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1361
1383
|
let t = (e.label || e.id || "").toLowerCase(), n = e.type;
|
|
1362
1384
|
return n === "email" || t.includes("email") || t.includes("mail") ? "Please enter a valid email address. Your abstract acknowledgement, review updates, and final communication will be sent to this mailbox." : n === "phone" || t.includes("phone") || t.includes("mobile") || t.includes("contact") ? "Please enter a valid mobile number for SMS confirmations and important notifications." : t.includes("council") || t.includes("registration no") || t.includes("mci") ? "Enter your State Medical Council or National Medical Commission registration number." : n === "file" || t.includes("file") || t.includes("upload") || t.includes("bonafide") || t.includes("abstract") ? "Upload your document (PDF, JPG, PNG up to 10MB) for registration review and verification." : t.includes("salutation") || t.includes("title") ? "Choose your professional title or academic prefix." : null;
|
|
1363
1385
|
}, Ce = (e) => {
|
|
1364
|
-
let t =
|
|
1386
|
+
let t = re[e.id] || (S[e.id] && String(S[e.id]).startsWith("http") ? S[e.id] : ""), n = pe[e.id], r = se[e.id] || "file", i = w === e.id || E === e.id, a = le[e.id] || "", o = a.trim() ? a.trim().split(/\s+/).length : 0, s = !!e.word_limit && o > e.word_limit;
|
|
1365
1387
|
return /* @__PURE__ */ p("div", {
|
|
1366
1388
|
className: "space-y-2 mt-2",
|
|
1367
1389
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -1375,9 +1397,9 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1375
1397
|
children: [/* @__PURE__ */ p("div", {
|
|
1376
1398
|
className: "w-10 h-10 rounded-xl flex items-center justify-center shrink-0 border",
|
|
1377
1399
|
style: {
|
|
1378
|
-
backgroundColor: h ? "rgba(255,255,255,0.06)" : `color-mix(in srgb, ${
|
|
1379
|
-
borderColor: h ? "rgba(255,255,255,0.12)" : `color-mix(in srgb, ${
|
|
1380
|
-
color:
|
|
1400
|
+
backgroundColor: h ? "rgba(255,255,255,0.06)" : `color-mix(in srgb, ${M} 10%, white)`,
|
|
1401
|
+
borderColor: h ? "rgba(255,255,255,0.12)" : `color-mix(in srgb, ${M} 25%, white)`,
|
|
1402
|
+
color: M
|
|
1381
1403
|
},
|
|
1382
1404
|
children: /* @__PURE__ */ p(R, { size: 18 })
|
|
1383
1405
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
@@ -1390,14 +1412,14 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1390
1412
|
}), /* @__PURE__ */ p("button", {
|
|
1391
1413
|
type: "button",
|
|
1392
1414
|
disabled: i,
|
|
1393
|
-
onClick: () =>
|
|
1415
|
+
onClick: () => ce((t) => ({
|
|
1394
1416
|
...t,
|
|
1395
1417
|
[e.id]: r === "file" ? "text" : "file"
|
|
1396
1418
|
})),
|
|
1397
1419
|
className: "flex items-center gap-1 text-2xs font-semibold px-2.5 py-1 rounded-lg border cursor-pointer transition-colors hover:opacity-80 disabled:opacity-50 shrink-0",
|
|
1398
1420
|
style: {
|
|
1399
|
-
color:
|
|
1400
|
-
borderColor: `color-mix(in srgb, ${
|
|
1421
|
+
color: M,
|
|
1422
|
+
borderColor: `color-mix(in srgb, ${M} 35%, transparent)`
|
|
1401
1423
|
},
|
|
1402
1424
|
children: r === "file" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(we, { size: 11 }), " Send text only"] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p($e, { size: 11 }), " Send file"] })
|
|
1403
1425
|
})]
|
|
@@ -1414,20 +1436,20 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1414
1436
|
disabled: i,
|
|
1415
1437
|
onChange: (t) => {
|
|
1416
1438
|
let n = t.target.files?.[0];
|
|
1417
|
-
n &&
|
|
1439
|
+
n && N(e.id, n), t.target.value = "";
|
|
1418
1440
|
}
|
|
1419
1441
|
}), /* @__PURE__ */ m("div", {
|
|
1420
1442
|
className: `flex items-center gap-1.5 py-2 px-3.5 rounded-xl text-xs font-semibold border transition-all shadow-2xs ${h ? "border-zinc-700 hover:border-zinc-600 text-zinc-200 bg-zinc-800 hover:bg-zinc-750" : "border-slate-200 hover:border-slate-300 text-slate-700 bg-white hover:bg-slate-50"}`,
|
|
1421
1443
|
children: [/* @__PURE__ */ p($e, {
|
|
1422
1444
|
size: 14,
|
|
1423
|
-
style: { color:
|
|
1424
|
-
}), /* @__PURE__ */ p("span", { children:
|
|
1445
|
+
style: { color: M }
|
|
1446
|
+
}), /* @__PURE__ */ p("span", { children: w === e.id ? "Uploading..." : t ? "Replace File" : "Choose File" })]
|
|
1425
1447
|
})]
|
|
1426
1448
|
}), t && typeof t == "string" && t.trim() !== "" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
|
|
1427
1449
|
type: "button",
|
|
1428
1450
|
onClick: () => window.open(t, "_blank", "noopener,noreferrer"),
|
|
1429
1451
|
className: "flex items-center gap-1.5 py-2 px-3.5 rounded-xl text-xs font-semibold text-white shadow-xs transition-opacity hover:opacity-90 shrink-0 cursor-pointer",
|
|
1430
|
-
style: { backgroundColor:
|
|
1452
|
+
style: { backgroundColor: M },
|
|
1431
1453
|
title: "Open file in new tab",
|
|
1432
1454
|
children: [
|
|
1433
1455
|
/* @__PURE__ */ p(we, { size: 13 }),
|
|
@@ -1436,11 +1458,11 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1436
1458
|
]
|
|
1437
1459
|
}), /* @__PURE__ */ m("button", {
|
|
1438
1460
|
type: "button",
|
|
1439
|
-
disabled:
|
|
1440
|
-
onClick: () =>
|
|
1461
|
+
disabled: E === e.id || w === e.id,
|
|
1462
|
+
onClick: () => ge(e.id),
|
|
1441
1463
|
className: `flex items-center gap-1 py-2 px-3 rounded-xl text-xs font-semibold border transition-colors cursor-pointer ${h ? "border-red-900/60 bg-red-950/50 text-red-400 hover:bg-red-900/60" : "border-red-200 bg-red-50 text-red-600 hover:bg-red-100"}`,
|
|
1442
1464
|
title: "Delete uploaded file",
|
|
1443
|
-
children: [/* @__PURE__ */ p(Ze, { size: 13 }), /* @__PURE__ */ p("span", { children:
|
|
1465
|
+
children: [/* @__PURE__ */ p(Ze, { size: 13 }), /* @__PURE__ */ p("span", { children: E === e.id ? "Deleting..." : "Delete" })]
|
|
1444
1466
|
})] })]
|
|
1445
1467
|
}) : /* @__PURE__ */ m("div", {
|
|
1446
1468
|
className: `mt-3 pt-3 border-t space-y-2 ${h ? "border-zinc-800" : "border-slate-200"}`,
|
|
@@ -1449,7 +1471,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1449
1471
|
rows: 3,
|
|
1450
1472
|
disabled: i || !!n,
|
|
1451
1473
|
value: n ?? a,
|
|
1452
|
-
onChange: (t) =>
|
|
1474
|
+
onChange: (t) => de((n) => ({
|
|
1453
1475
|
...n,
|
|
1454
1476
|
[e.id]: t.target.value
|
|
1455
1477
|
})),
|
|
@@ -1468,22 +1490,22 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1468
1490
|
}) : /* @__PURE__ */ p("span", {}), n ? /* @__PURE__ */ m("button", {
|
|
1469
1491
|
type: "button",
|
|
1470
1492
|
disabled: i,
|
|
1471
|
-
onClick: () =>
|
|
1493
|
+
onClick: () => ge(e.id),
|
|
1472
1494
|
className: `flex items-center gap-1 py-2 px-3 rounded-xl text-xs font-semibold border transition-colors cursor-pointer ${h ? "border-red-900/60 bg-red-950/50 text-red-400 hover:bg-red-900/60" : "border-red-200 bg-red-50 text-red-600 hover:bg-red-100"}`,
|
|
1473
|
-
children: [/* @__PURE__ */ p(Ze, { size: 13 }), /* @__PURE__ */ p("span", { children:
|
|
1495
|
+
children: [/* @__PURE__ */ p(Ze, { size: 13 }), /* @__PURE__ */ p("span", { children: E === e.id ? "Clearing..." : "Clear & Re-enter" })]
|
|
1474
1496
|
}) : /* @__PURE__ */ m("button", {
|
|
1475
1497
|
type: "button",
|
|
1476
1498
|
disabled: i || !a.trim(),
|
|
1477
|
-
onClick: () =>
|
|
1478
|
-
style: { backgroundColor:
|
|
1499
|
+
onClick: () => P(e.id, a),
|
|
1500
|
+
style: { backgroundColor: M },
|
|
1479
1501
|
className: "flex items-center gap-1.5 px-4 py-2 rounded-xl text-xs font-bold text-white shadow-sm hover:opacity-90 transition-all cursor-pointer disabled:opacity-50",
|
|
1480
|
-
children: [/* @__PURE__ */ p($e, { size: 13 }), /* @__PURE__ */ p("span", { children:
|
|
1502
|
+
children: [/* @__PURE__ */ p($e, { size: 13 }), /* @__PURE__ */ p("span", { children: w === e.id ? "Submitting..." : "Submit Text" })]
|
|
1481
1503
|
})]
|
|
1482
1504
|
})]
|
|
1483
1505
|
}),
|
|
1484
1506
|
t && /* @__PURE__ */ m("div", {
|
|
1485
1507
|
className: `mt-2.5 pt-2 border-t text-2xs truncate flex items-center gap-1.5 ${h ? "border-zinc-800 text-zinc-300" : "border-gray-200 text-gray-700 font-medium"}`,
|
|
1486
|
-
children: [/* @__PURE__ */ p(
|
|
1508
|
+
children: [/* @__PURE__ */ p(ue, {
|
|
1487
1509
|
size: 12,
|
|
1488
1510
|
className: "text-emerald-500 shrink-0"
|
|
1489
1511
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -1491,16 +1513,16 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1491
1513
|
children: ["Attached: ", t]
|
|
1492
1514
|
})]
|
|
1493
1515
|
}),
|
|
1494
|
-
|
|
1516
|
+
k && oe === e.id && /* @__PURE__ */ p("div", {
|
|
1495
1517
|
className: "text-xs text-red-500 mt-2 font-medium",
|
|
1496
|
-
children:
|
|
1518
|
+
children: k
|
|
1497
1519
|
})
|
|
1498
1520
|
]
|
|
1499
1521
|
})
|
|
1500
1522
|
});
|
|
1501
1523
|
}, Te = (e) => {
|
|
1502
1524
|
if (!e) return null;
|
|
1503
|
-
let t =
|
|
1525
|
+
let t = S[e.id] ?? "", n = xe(e), r = e.type === "email" || (e.label || "").toLowerCase().includes("email"), i = (e.label || "").toLowerCase().includes("name"), a = `vx-field-${e.id}`, o = `w-full px-4 py-3 text-[15px] font-medium rounded-xl border transition-all focus:outline-none ${h ? "bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]" : "bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]"}`;
|
|
1504
1526
|
return /* @__PURE__ */ m("div", {
|
|
1505
1527
|
part: "field",
|
|
1506
1528
|
className: "px-5 sm:px-8 py-5 sm:py-6",
|
|
@@ -1530,7 +1552,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1530
1552
|
id: a,
|
|
1531
1553
|
required: e.required,
|
|
1532
1554
|
value: t,
|
|
1533
|
-
onChange: (t) =>
|
|
1555
|
+
onChange: (t) => he(e.id, t.target.value),
|
|
1534
1556
|
className: `${o} pr-10 appearance-none cursor-pointer`,
|
|
1535
1557
|
children: [/* @__PURE__ */ p("option", {
|
|
1536
1558
|
value: "",
|
|
@@ -1543,7 +1565,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1543
1565
|
}, e))]
|
|
1544
1566
|
}), /* @__PURE__ */ p("div", {
|
|
1545
1567
|
className: `absolute inset-y-0 right-0 flex items-center pr-3.5 pointer-events-none ${h ? "text-zinc-400" : "text-slate-400"}`,
|
|
1546
|
-
children: /* @__PURE__ */ p(
|
|
1568
|
+
children: /* @__PURE__ */ p(fe, { size: 16 })
|
|
1547
1569
|
})]
|
|
1548
1570
|
}) : e.type === "file" ? Ce(e) : /* @__PURE__ */ p("input", {
|
|
1549
1571
|
part: "input",
|
|
@@ -1552,23 +1574,23 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1552
1574
|
required: e.required,
|
|
1553
1575
|
value: t,
|
|
1554
1576
|
placeholder: e.placeholder || (r ? "Enter your email address" : i ? "Your full name" : `Enter your ${e.label.toLowerCase()}`),
|
|
1555
|
-
onChange: (t) =>
|
|
1577
|
+
onChange: (t) => he(e.id, t.target.value),
|
|
1556
1578
|
className: o
|
|
1557
1579
|
})
|
|
1558
1580
|
]
|
|
1559
1581
|
}, e.id);
|
|
1560
1582
|
}, z = (e) => {
|
|
1561
1583
|
e.preventDefault();
|
|
1562
|
-
for (let e of I) if (e.type === "file" && e.required && !
|
|
1563
|
-
|
|
1584
|
+
for (let e of I) if (e.type === "file" && e.required && !S[e.id]) {
|
|
1585
|
+
A(`Please upload ${e.label || "a file"}`), j(e.id);
|
|
1564
1586
|
return;
|
|
1565
1587
|
}
|
|
1566
|
-
t(
|
|
1567
|
-
}, B =
|
|
1588
|
+
t(S);
|
|
1589
|
+
}, B = b?.type || b?.name || b?.label || (x ? "Abstract Submission Form" : "Registration Form"), V = (e) => [b?.currency, e.toLocaleString()].filter(Boolean).join(" "), H = ve.filter((e) => L.includes(e.name)).reduce((e, t) => e + (Number(t.price) || 0), 0), U = (Number(b?.price) || 0) + H, W = b ? U > 0 ? V(U) : "Free" : null;
|
|
1568
1590
|
return /* @__PURE__ */ m("div", {
|
|
1569
1591
|
part: "form-page",
|
|
1570
1592
|
className: `w-full flex-1 flex flex-col relative ${h ? "bg-zinc-950 text-white" : "bg-slate-50 text-slate-900"}`,
|
|
1571
|
-
style:
|
|
1593
|
+
style: y,
|
|
1572
1594
|
children: [/* @__PURE__ */ p("div", {
|
|
1573
1595
|
part: "form-header",
|
|
1574
1596
|
className: `sticky top-0 z-30 px-4 sm:px-6 py-3 border-b backdrop-blur-xl transition-colors ${h ? "bg-zinc-900/85 border-zinc-800" : "bg-white/85 border-slate-200/80"}`,
|
|
@@ -1579,20 +1601,20 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1579
1601
|
type: "button",
|
|
1580
1602
|
onClick: n,
|
|
1581
1603
|
className: `inline-flex items-center gap-2 text-sm font-semibold rounded-full pl-2.5 pr-4 py-2 border transition-colors cursor-pointer ${h ? "bg-zinc-800 border-zinc-700 hover:bg-zinc-700 text-zinc-200" : "bg-white border-slate-200 hover:bg-slate-50 text-slate-700 shadow-[0_1px_2px_rgba(15,23,42,0.04)]"}`,
|
|
1582
|
-
children: [/* @__PURE__ */ p(
|
|
1604
|
+
children: [/* @__PURE__ */ p(ie, { size: 16 }), /* @__PURE__ */ p("span", { children: "All forms" })]
|
|
1583
1605
|
}), /* @__PURE__ */ m("div", {
|
|
1584
1606
|
className: "flex items-center gap-2 min-w-0",
|
|
1585
|
-
children: [
|
|
1607
|
+
children: [b && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
1586
1608
|
part: "form-type-name",
|
|
1587
1609
|
title: B,
|
|
1588
1610
|
className: `hidden sm:inline-block truncate max-w-[16rem] text-xs font-semibold px-3 py-1.5 rounded-full ${h ? "bg-zinc-800 text-zinc-200" : "bg-slate-100 text-slate-700"}`,
|
|
1589
1611
|
children: B
|
|
1590
|
-
}), !
|
|
1612
|
+
}), !x && /* @__PURE__ */ p("span", {
|
|
1591
1613
|
part: "form-type-price",
|
|
1592
1614
|
className: "shrink-0 text-xs font-bold px-3 py-1.5 rounded-full tabular-nums",
|
|
1593
1615
|
style: {
|
|
1594
|
-
backgroundColor: `color-mix(in srgb, ${
|
|
1595
|
-
color:
|
|
1616
|
+
backgroundColor: `color-mix(in srgb, ${M} 12%, transparent)`,
|
|
1617
|
+
color: M
|
|
1596
1618
|
},
|
|
1597
1619
|
children: W
|
|
1598
1620
|
})] }), i === "popup" && /* @__PURE__ */ m("div", {
|
|
@@ -1622,8 +1644,8 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1622
1644
|
className: "px-1",
|
|
1623
1645
|
children: [/* @__PURE__ */ p("p", {
|
|
1624
1646
|
className: "text-xs font-semibold uppercase tracking-wider",
|
|
1625
|
-
style: { color:
|
|
1626
|
-
children:
|
|
1647
|
+
style: { color: M },
|
|
1648
|
+
children: x ? "Abstract submission" : "Registration form"
|
|
1627
1649
|
}), /* @__PURE__ */ p("h2", {
|
|
1628
1650
|
part: "form-title",
|
|
1629
1651
|
className: `mt-1.5 text-2xl sm:text-3xl font-bold tracking-tight ${h ? "text-white" : "text-slate-900"}`,
|
|
@@ -1633,7 +1655,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1633
1655
|
}),
|
|
1634
1656
|
u && Object.keys(u).length > 0 && /* @__PURE__ */ m("div", {
|
|
1635
1657
|
className: `text-sm px-4 py-3 rounded-2xl flex items-center gap-2.5 ${h ? "bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900" : "bg-emerald-50 text-emerald-800 ring-1 ring-inset ring-emerald-200/80"}`,
|
|
1636
|
-
children: [/* @__PURE__ */ p(
|
|
1658
|
+
children: [/* @__PURE__ */ p(ue, {
|
|
1637
1659
|
size: 16,
|
|
1638
1660
|
className: "shrink-0"
|
|
1639
1661
|
}), /* @__PURE__ */ p("span", {
|
|
@@ -1645,17 +1667,17 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1645
1667
|
part: "notice",
|
|
1646
1668
|
className: "rounded-2xl p-4 flex items-start gap-3",
|
|
1647
1669
|
style: {
|
|
1648
|
-
backgroundColor: `color-mix(in srgb, ${
|
|
1649
|
-
boxShadow: `inset 0 0 0 1px color-mix(in srgb, ${
|
|
1670
|
+
backgroundColor: `color-mix(in srgb, ${M} ${h ? 14 : 7}%, transparent)`,
|
|
1671
|
+
boxShadow: `inset 0 0 0 1px color-mix(in srgb, ${M} 20%, transparent)`
|
|
1650
1672
|
},
|
|
1651
1673
|
children: [/* @__PURE__ */ p("div", {
|
|
1652
1674
|
className: "shrink-0 mt-0.5",
|
|
1653
|
-
style: { color:
|
|
1675
|
+
style: { color: M },
|
|
1654
1676
|
children: /* @__PURE__ */ p(Ee, { size: 18 })
|
|
1655
1677
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h4", {
|
|
1656
1678
|
part: "notice-title",
|
|
1657
1679
|
className: "text-xs font-bold uppercase tracking-wider",
|
|
1658
|
-
style: { color:
|
|
1680
|
+
style: { color: M },
|
|
1659
1681
|
children: "Before you submit"
|
|
1660
1682
|
}), /* @__PURE__ */ m("p", {
|
|
1661
1683
|
className: `text-sm mt-0.5 leading-relaxed ${h ? "text-zinc-300" : "text-slate-600"}`,
|
|
@@ -1674,7 +1696,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1674
1696
|
className: `rounded-3xl border overflow-hidden divide-y ${h ? "bg-zinc-900 border-zinc-800 divide-zinc-800" : "bg-white border-slate-200/80 divide-slate-100 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]"}`,
|
|
1675
1697
|
children: I.map((e) => Te(e))
|
|
1676
1698
|
}),
|
|
1677
|
-
!
|
|
1699
|
+
!x && _e.length > 0 && /* @__PURE__ */ m("div", {
|
|
1678
1700
|
part: "addons-card",
|
|
1679
1701
|
className: `rounded-3xl border overflow-hidden ${h ? "bg-zinc-900 border-zinc-800" : "bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]"}`,
|
|
1680
1702
|
children: [
|
|
@@ -1683,8 +1705,8 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1683
1705
|
children: [/* @__PURE__ */ p("div", {
|
|
1684
1706
|
className: "w-9 h-9 rounded-xl flex items-center justify-center shrink-0",
|
|
1685
1707
|
style: {
|
|
1686
|
-
backgroundColor: `color-mix(in srgb, ${
|
|
1687
|
-
color:
|
|
1708
|
+
backgroundColor: `color-mix(in srgb, ${M} 12%, transparent)`,
|
|
1709
|
+
color: M
|
|
1688
1710
|
},
|
|
1689
1711
|
children: /* @__PURE__ */ p(Ye, { size: 17 })
|
|
1690
1712
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h3", {
|
|
@@ -1705,8 +1727,8 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1705
1727
|
part: t ? "addon addon-selected" : "addon",
|
|
1706
1728
|
className: `p-3.5 rounded-2xl border flex items-center gap-3 cursor-pointer transition-all ${t ? "" : h ? "border-zinc-800 bg-zinc-900 hover:border-zinc-700" : "border-slate-200 bg-white hover:border-slate-300"}`,
|
|
1707
1729
|
style: t ? {
|
|
1708
|
-
borderColor:
|
|
1709
|
-
backgroundColor: `color-mix(in srgb, ${
|
|
1730
|
+
borderColor: M,
|
|
1731
|
+
backgroundColor: `color-mix(in srgb, ${M} ${h ? 16 : 6}%, transparent)`
|
|
1710
1732
|
} : void 0,
|
|
1711
1733
|
children: [
|
|
1712
1734
|
/* @__PURE__ */ p("input", {
|
|
@@ -1714,7 +1736,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1714
1736
|
checked: t,
|
|
1715
1737
|
onChange: () => be(e.name),
|
|
1716
1738
|
className: "w-4 h-4 rounded cursor-pointer shrink-0",
|
|
1717
|
-
style: { accentColor:
|
|
1739
|
+
style: { accentColor: M }
|
|
1718
1740
|
}),
|
|
1719
1741
|
/* @__PURE__ */ p("span", {
|
|
1720
1742
|
className: `flex-1 min-w-0 text-sm font-semibold leading-snug ${h ? "text-white" : "text-slate-900"}`,
|
|
@@ -1722,7 +1744,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1722
1744
|
}),
|
|
1723
1745
|
/* @__PURE__ */ p("span", {
|
|
1724
1746
|
className: "shrink-0 text-[13px] font-bold tabular-nums",
|
|
1725
|
-
style: { color:
|
|
1747
|
+
style: { color: M },
|
|
1726
1748
|
children: Number(e.price) > 0 ? `+ ${V(Number(e.price))}` : "Free"
|
|
1727
1749
|
})
|
|
1728
1750
|
]
|
|
@@ -1731,7 +1753,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1731
1753
|
part: "addon addon-included",
|
|
1732
1754
|
className: `p-3.5 rounded-2xl border flex items-center gap-3 ${h ? "border-zinc-800 bg-zinc-950/60" : "border-slate-200 bg-slate-50"}`,
|
|
1733
1755
|
children: [
|
|
1734
|
-
/* @__PURE__ */ p(
|
|
1756
|
+
/* @__PURE__ */ p(ue, {
|
|
1735
1757
|
size: 16,
|
|
1736
1758
|
className: "text-emerald-500 shrink-0"
|
|
1737
1759
|
}),
|
|
@@ -1753,7 +1775,7 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1753
1775
|
children: "Total payable"
|
|
1754
1776
|
}), /* @__PURE__ */ p("span", {
|
|
1755
1777
|
className: "text-base font-bold tabular-nums",
|
|
1756
|
-
style: { color:
|
|
1778
|
+
style: { color: M },
|
|
1757
1779
|
children: V(U)
|
|
1758
1780
|
})]
|
|
1759
1781
|
})
|
|
@@ -1764,13 +1786,13 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1764
1786
|
children: [/* @__PURE__ */ m("button", {
|
|
1765
1787
|
part: "button button-primary submit-button",
|
|
1766
1788
|
type: "submit",
|
|
1767
|
-
disabled:
|
|
1789
|
+
disabled: w !== null || E !== null,
|
|
1768
1790
|
style: {
|
|
1769
|
-
background: `linear-gradient(135deg, ${
|
|
1770
|
-
boxShadow: `0 12px 28px -12px color-mix(in srgb, ${
|
|
1791
|
+
background: `linear-gradient(135deg, ${M}, color-mix(in srgb, ${M} 80%, black))`,
|
|
1792
|
+
boxShadow: `0 12px 28px -12px color-mix(in srgb, ${M} 70%, transparent)`
|
|
1771
1793
|
},
|
|
1772
1794
|
className: "group w-full h-14 px-8 text-base font-semibold text-white rounded-2xl hover:brightness-110 active:scale-[0.99] transition-all cursor-pointer flex items-center justify-center gap-2.5 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1773
|
-
children: [/* @__PURE__ */ p("span", { children:
|
|
1795
|
+
children: [/* @__PURE__ */ p("span", { children: x ? "Submit Abstract" : "Complete Registration" }), /* @__PURE__ */ p(ae, {
|
|
1774
1796
|
size: 18,
|
|
1775
1797
|
className: "transition-transform group-hover:translate-x-0.5"
|
|
1776
1798
|
})]
|
|
@@ -1783,37 +1805,17 @@ var rt = k(nt), $ = { fontFamily: "var(--vx-font-heading)" }, it = /[0-9a-f]{8}-
|
|
|
1783
1805
|
})
|
|
1784
1806
|
})]
|
|
1785
1807
|
});
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
//#region src/widget/utils/formUtils.ts
|
|
1789
|
-
function st(e, t) {
|
|
1790
|
-
if (!e) return "";
|
|
1791
|
-
if (/^field_\d+/i.test(e) && t && typeof t == "string") {
|
|
1792
|
-
let e = t.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
1793
|
-
if (e) return e;
|
|
1794
|
-
}
|
|
1795
|
-
return e;
|
|
1796
|
-
}
|
|
1797
|
-
function ct(e, t = "") {
|
|
1798
|
-
if (e && typeof e == "string") {
|
|
1799
|
-
let t = e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
1800
|
-
if (t) return t;
|
|
1801
|
-
}
|
|
1802
|
-
return st(t, e) || t;
|
|
1803
|
-
}
|
|
1804
|
-
//#endregion
|
|
1805
|
-
//#region src/widget/components/AttendeePortal.tsx
|
|
1806
|
-
var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1, isWidgetPage: a = !1, onEvent: o, onError: c }) => {
|
|
1807
|
-
let [l, u] = d(() => t.getToken() ? "profile" : "login"), [h, g] = d(!1), [_, v] = d(!1), [y, b] = d(null), [x, S] = d(null), [C, w] = d(null), [T, E] = d(""), [D, ee] = d(""), [te, O] = d(""), [ne, k] = d(""), [A, j] = d(""), [ae, oe] = d(""), [ce, ue] = d(""), [fe, N] = d(!1), [P, he] = d(null), [F, ge] = d({}), [I, _e] = d([]), [ve, L] = d({}), [xe, Ce] = d(null), [Te, z] = d(null), [V, U] = d(null), [Ee, W] = d(!1), [K, q] = d(!1), [Y, ke] = d({}), [je, Ne] = d(!1), [X, Fe] = d(null), [Ie, Le] = d({}), [Z, Re] = d({});
|
|
1808
|
+
}, lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1, isWidgetPage: a = !1, onEvent: o, onError: c }) => {
|
|
1809
|
+
let [l, u] = d(() => t.getToken() ? "profile" : "login"), [h, g] = d(!1), [ee, _] = d(!1), [v, y] = d(null), [b, x] = d(null), [S, C] = d(null), [w, T] = d(""), [E, te] = d(""), [ne, D] = d(""), [re, O] = d(""), [k, A] = d(""), [oe, se] = d(""), [le, de] = d(""), [pe, M] = d(!1), [N, ge] = d(null), [P, F] = d({}), [I, _e] = d([]), [ve, L] = d({}), [xe, Ce] = d(null), [Te, z] = d(null), [V, U] = d(null), [Ee, W] = d(!1), [K, q] = d(!1), [Y, ke] = d({}), [je, Ne] = d(!1), [X, Fe] = d(null), [Ie, Le] = d({}), [Z, Re] = d({});
|
|
1808
1810
|
s(() => {
|
|
1809
1811
|
let e = t.getToken();
|
|
1810
1812
|
e && Q(e);
|
|
1811
1813
|
}, []);
|
|
1812
1814
|
let Q = async (r) => {
|
|
1813
|
-
g(!0),
|
|
1815
|
+
g(!0), x(null);
|
|
1814
1816
|
try {
|
|
1815
1817
|
let i = await e.portalGetProfile(r), a = i?.data || i || {};
|
|
1816
|
-
|
|
1818
|
+
ge(a);
|
|
1817
1819
|
let s = a.registration || {}, c = s.custom_data || {}, l = s.email || a.email || "", d = null;
|
|
1818
1820
|
if (l) try {
|
|
1819
1821
|
let t = await e.getDraftByEmail(l);
|
|
@@ -1829,9 +1831,9 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
1829
1831
|
} catch {}
|
|
1830
1832
|
}
|
|
1831
1833
|
let f = d?.custom_data || {};
|
|
1832
|
-
s.name ?
|
|
1834
|
+
s.name ? D(s.name) : d?.name ? D(d.name) : a.name && D(a.name);
|
|
1833
1835
|
let p = 0, m = {}, h = [...a.editable_fields || []];
|
|
1834
|
-
|
|
1836
|
+
ge({
|
|
1835
1837
|
...a,
|
|
1836
1838
|
editable_fields: h
|
|
1837
1839
|
});
|
|
@@ -1845,9 +1847,9 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
1845
1847
|
...g,
|
|
1846
1848
|
...e
|
|
1847
1849
|
}));
|
|
1848
|
-
let
|
|
1849
|
-
|
|
1850
|
-
let t = e.label || e.name || e.id, n =
|
|
1850
|
+
let ee = s.asset_id || s.photo_id || c.asset_id || c.photo_id || a.asset_id;
|
|
1851
|
+
ee && Ce(String(ee)), h.length > 0 ? h.forEach((e) => {
|
|
1852
|
+
let t = e.label || e.name || e.id, n = ot(e.id, e.label), r = st(e.label, e.id), i = "";
|
|
1851
1853
|
if (t && s[t] !== void 0 && s[t] !== null && s[t] !== "" ? i = s[t] : s[r] !== void 0 && s[r] !== null && s[r] !== "" ? i = s[r] : s[n] !== void 0 && s[n] !== null && s[n] !== "" ? i = s[n] : s[e.id] !== void 0 && s[e.id] !== null && s[e.id] !== "" ? i = s[e.id] : t && c[t] !== void 0 && c[t] !== null && c[t] !== "" ? i = c[t] : c[r] !== void 0 && c[r] !== null && c[r] !== "" ? i = c[r] : c[n] !== void 0 && c[n] !== null && c[n] !== "" ? i = c[n] : c[e.id] !== void 0 && c[e.id] !== null && c[e.id] !== "" && (i = c[e.id]), d) {
|
|
1852
1854
|
let t = d[n] ?? d[e.id] ?? f[n] ?? f[e.id] ?? (e.id === "salutation" ? d.salutation || d.title : void 0) ?? (e.id === "name" ? d.name || d.fullName || d.full_name : void 0) ?? (e.id === "email" ? d.email : void 0) ?? (e.id === "phone" ? d.phone || d.mobile || d.phoneNumber : void 0);
|
|
1853
1855
|
t != null && t !== "" && (i = t, p++);
|
|
@@ -1855,12 +1857,12 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
1855
1857
|
m[e.id] = i;
|
|
1856
1858
|
}) : Object.entries(a).forEach(([e, t]) => {
|
|
1857
1859
|
e.toLowerCase() !== "token" && (m[e] = t);
|
|
1858
|
-
}),
|
|
1859
|
-
let
|
|
1860
|
+
}), F(m), p > 0 && W(!0);
|
|
1861
|
+
let _ = (a.addons?.items || []).filter((e) => e.purchased).map((e) => e.name);
|
|
1860
1862
|
d?.selected_items && Array.isArray(d.selected_items) && d.selected_items.forEach((e) => {
|
|
1861
1863
|
let t = typeof e == "string" ? e : e?.name;
|
|
1862
|
-
t && !
|
|
1863
|
-
}), _e(
|
|
1864
|
+
t && !_.includes(t) && _.push(t);
|
|
1865
|
+
}), _e(_), u("profile"), o?.("attendee_profile_loaded", {
|
|
1864
1866
|
profile: a,
|
|
1865
1867
|
draft: d
|
|
1866
1868
|
});
|
|
@@ -1870,25 +1872,25 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
1870
1872
|
g(!1);
|
|
1871
1873
|
}
|
|
1872
1874
|
}, Be = async (r) => {
|
|
1873
|
-
if (r.preventDefault(), !
|
|
1874
|
-
|
|
1875
|
+
if (r.preventDefault(), !w.trim() || !E) {
|
|
1876
|
+
x("Please enter both your identifier and password.");
|
|
1875
1877
|
return;
|
|
1876
1878
|
}
|
|
1877
|
-
g(!0),
|
|
1879
|
+
g(!0), x(null), C(null);
|
|
1878
1880
|
try {
|
|
1879
1881
|
let n = await e.portalLogin({
|
|
1880
|
-
identifier:
|
|
1881
|
-
password:
|
|
1882
|
+
identifier: w.trim(),
|
|
1883
|
+
password: E
|
|
1882
1884
|
}), r = n?.data?.token || n?.token;
|
|
1883
1885
|
if (!r) throw Error(n?.message || "No authentication token received.");
|
|
1884
|
-
(n?.data?.name || n?.name) &&
|
|
1885
|
-
identifier:
|
|
1886
|
+
(n?.data?.name || n?.name) && D(n.data?.name || n.name), t.setToken(r), o?.("attendee_logged_in", {
|
|
1887
|
+
identifier: w,
|
|
1886
1888
|
response: n
|
|
1887
1889
|
}), await Q(r);
|
|
1888
1890
|
} catch (e) {
|
|
1889
1891
|
n.error("Login failed", e);
|
|
1890
1892
|
let t = e.message || "Login failed. Please check your credentials.";
|
|
1891
|
-
|
|
1893
|
+
x(t), c?.({
|
|
1892
1894
|
type: "login_error",
|
|
1893
1895
|
message: t,
|
|
1894
1896
|
error: e
|
|
@@ -1898,59 +1900,59 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
1898
1900
|
}
|
|
1899
1901
|
}, He = async (t) => {
|
|
1900
1902
|
t.preventDefault();
|
|
1901
|
-
let r = (
|
|
1903
|
+
let r = (re || w).trim();
|
|
1902
1904
|
if (!r) {
|
|
1903
|
-
|
|
1905
|
+
x("Please enter your registration number or email to receive a code.");
|
|
1904
1906
|
return;
|
|
1905
1907
|
}
|
|
1906
|
-
|
|
1908
|
+
M(!0), x(null), C(null);
|
|
1907
1909
|
try {
|
|
1908
|
-
await e.portalRequestPasswordReset(r),
|
|
1910
|
+
await e.portalRequestPasswordReset(r), C("A verification code has been sent to your registered email."), o?.("password_reset_code_requested", { identifier: r }), u("reset");
|
|
1909
1911
|
} catch (e) {
|
|
1910
1912
|
n.error("Failed to send reset code", e);
|
|
1911
1913
|
let t = e.message || "Failed to send code. Please verify your identifier.";
|
|
1912
|
-
|
|
1914
|
+
x(t), c?.({
|
|
1913
1915
|
type: "portal_error",
|
|
1914
1916
|
message: t,
|
|
1915
1917
|
error: e
|
|
1916
1918
|
});
|
|
1917
1919
|
} finally {
|
|
1918
|
-
|
|
1920
|
+
M(!1);
|
|
1919
1921
|
}
|
|
1920
1922
|
}, We = async (r) => {
|
|
1921
1923
|
r.preventDefault();
|
|
1922
|
-
let i = (
|
|
1924
|
+
let i = (re || w).trim();
|
|
1923
1925
|
if (!i) {
|
|
1924
|
-
|
|
1926
|
+
x("Please enter your registration number or email.");
|
|
1925
1927
|
return;
|
|
1926
1928
|
}
|
|
1927
|
-
if (!
|
|
1928
|
-
|
|
1929
|
+
if (!k.trim()) {
|
|
1930
|
+
x("Please enter the verification code sent to your email.");
|
|
1929
1931
|
return;
|
|
1930
1932
|
}
|
|
1931
|
-
if (!
|
|
1932
|
-
|
|
1933
|
+
if (!oe) {
|
|
1934
|
+
x("Please enter a new password.");
|
|
1933
1935
|
return;
|
|
1934
1936
|
}
|
|
1935
|
-
if (
|
|
1936
|
-
|
|
1937
|
+
if (oe !== le) {
|
|
1938
|
+
x("New password and confirm password do not match.");
|
|
1937
1939
|
return;
|
|
1938
1940
|
}
|
|
1939
|
-
g(!0),
|
|
1941
|
+
g(!0), x(null), C(null);
|
|
1940
1942
|
try {
|
|
1941
1943
|
let n = await e.portalConfirmPasswordReset({
|
|
1942
1944
|
identifier: i,
|
|
1943
|
-
code:
|
|
1944
|
-
new_password:
|
|
1945
|
+
code: k.trim(),
|
|
1946
|
+
new_password: oe
|
|
1945
1947
|
}), r = n?.data?.token || n?.token;
|
|
1946
|
-
(n?.data?.name || n?.name) &&
|
|
1948
|
+
(n?.data?.name || n?.name) && D(n.data?.name || n.name), o?.("password_reset_success", {
|
|
1947
1949
|
identifier: i,
|
|
1948
1950
|
response: n
|
|
1949
|
-
}), r ? (t.setToken(r),
|
|
1951
|
+
}), r ? (t.setToken(r), A(""), se(""), de(""), await Q(r)) : (T(i), te(""), A(""), se(""), de(""), u("login"), C("Password updated successfully! Please login with your new password."));
|
|
1950
1952
|
} catch (e) {
|
|
1951
1953
|
n.error("Password reset failed", e);
|
|
1952
1954
|
let t = e.message || "Failed to update password. Please check the code.";
|
|
1953
|
-
|
|
1955
|
+
x(t), c?.({
|
|
1954
1956
|
type: "portal_error",
|
|
1955
1957
|
message: t,
|
|
1956
1958
|
error: e
|
|
@@ -1959,24 +1961,24 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
1959
1961
|
g(!1);
|
|
1960
1962
|
}
|
|
1961
1963
|
}, Ge = () => {
|
|
1962
|
-
t.clearToken(),
|
|
1964
|
+
t.clearToken(), ge(null), F({}), _e([]), L({}), Ce(null), U(null), D(""), te(""), u("login"), C("Logged out successfully."), o?.("attendee_logged_out", {});
|
|
1963
1965
|
}, Ke = async (r, i) => {
|
|
1964
1966
|
let a = t.getToken();
|
|
1965
1967
|
if (!a) {
|
|
1966
|
-
|
|
1968
|
+
x("Session expired. Please log in again.");
|
|
1967
1969
|
return;
|
|
1968
1970
|
}
|
|
1969
|
-
|
|
1971
|
+
y(r), x(null), C(null);
|
|
1970
1972
|
try {
|
|
1971
1973
|
let t = await e.uploadFile(i, a), n = t?.data?.serve_url || t?.serve_url || "", s = t?.data?.asset_id || t?.asset_id;
|
|
1972
1974
|
if (!s && !n) throw Error("Upload response missing asset_id");
|
|
1973
|
-
n &&
|
|
1975
|
+
n && F((e) => ({
|
|
1974
1976
|
...e,
|
|
1975
1977
|
[r]: n
|
|
1976
1978
|
})), s && (L((e) => ({
|
|
1977
1979
|
...e,
|
|
1978
1980
|
[r]: String(s)
|
|
1979
|
-
})), Ce(String(s))),
|
|
1981
|
+
})), Ce(String(s))), C(`File "${i.name}" uploaded successfully!`), o?.("portal_file_uploaded", {
|
|
1980
1982
|
fieldId: r,
|
|
1981
1983
|
serveUrl: n,
|
|
1982
1984
|
assetId: s,
|
|
@@ -1985,37 +1987,37 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
1985
1987
|
} catch (e) {
|
|
1986
1988
|
n.error("File upload failed", e);
|
|
1987
1989
|
let t = e.message || "File upload failed. Please try again.";
|
|
1988
|
-
|
|
1990
|
+
x(t), c?.({
|
|
1989
1991
|
type: "file_upload_error",
|
|
1990
1992
|
message: t,
|
|
1991
1993
|
error: e
|
|
1992
1994
|
});
|
|
1993
1995
|
} finally {
|
|
1994
|
-
|
|
1996
|
+
y(null);
|
|
1995
1997
|
}
|
|
1996
1998
|
}, Je = async (r) => {
|
|
1997
1999
|
let i = t.getToken();
|
|
1998
2000
|
if (!i) {
|
|
1999
|
-
|
|
2001
|
+
x("Session expired. Please log in again.");
|
|
2000
2002
|
return;
|
|
2001
2003
|
}
|
|
2002
|
-
let a =
|
|
2003
|
-
z(r),
|
|
2004
|
+
let a = P[r], s = at(a) || ve[r] || xe;
|
|
2005
|
+
z(r), x(null), C(null);
|
|
2004
2006
|
try {
|
|
2005
2007
|
s && (n.log(`Deleting asset ${s} for field ${r}...`), await e.portalDeleteFile(i, s), n.log(`Asset ${s} deleted successfully.`), o?.("portal_file_deleted", {
|
|
2006
2008
|
assetId: s,
|
|
2007
2009
|
fieldId: r
|
|
2008
|
-
})),
|
|
2010
|
+
})), F((e) => ({
|
|
2009
2011
|
...e,
|
|
2010
2012
|
[r]: ""
|
|
2011
2013
|
})), L((e) => {
|
|
2012
2014
|
let t = { ...e };
|
|
2013
2015
|
return delete t[r], t;
|
|
2014
|
-
}), xe === s && Ce(null),
|
|
2016
|
+
}), xe === s && Ce(null), C("File removed successfully.");
|
|
2015
2017
|
} catch (e) {
|
|
2016
2018
|
n.error("Failed to delete file", e);
|
|
2017
2019
|
let t = e.message || "Failed to delete file. Please try again.";
|
|
2018
|
-
|
|
2020
|
+
x(t), c?.({
|
|
2019
2021
|
type: "file_delete_error",
|
|
2020
2022
|
message: t,
|
|
2021
2023
|
error: e
|
|
@@ -2029,15 +2031,18 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2029
2031
|
r.preventDefault();
|
|
2030
2032
|
let i = t.getToken();
|
|
2031
2033
|
if (!i) {
|
|
2032
|
-
|
|
2034
|
+
x("Session expired. Please log in again.");
|
|
2033
2035
|
return;
|
|
2034
2036
|
}
|
|
2035
|
-
|
|
2037
|
+
_(!0), x(null), C(null);
|
|
2036
2038
|
try {
|
|
2037
|
-
let t =
|
|
2039
|
+
let t = N?.editable_fields || [], n = { ...N?.registration?.custom_data || {} }, r = {};
|
|
2038
2040
|
t.forEach((e) => {
|
|
2039
|
-
let t =
|
|
2040
|
-
e.type === "file"
|
|
2041
|
+
let t = P[e.id], i = e.label || e.name || e.id, a = st(e.label, e.id), o = ot(e.id, e.label);
|
|
2042
|
+
if (e.type === "file") {
|
|
2043
|
+
let s = typeof t == "string" ? t : t?.serve_url || t?.url || "";
|
|
2044
|
+
delete n[i], delete n[a], n[o] = s, r[o] = s, o !== e.id && (r[e.id] = s);
|
|
2045
|
+
} else e.builtin ? (r[o] = t, o !== e.id && (r[e.id] = t)) : (n[o] = t, r[o] = t, o !== e.id && (n[e.id] = t, r[e.id] = t));
|
|
2041
2046
|
}), r.custom_data = n, r.addons = I;
|
|
2042
2047
|
let a = await e.portalUpdateProfile(i, r);
|
|
2043
2048
|
o?.("attendee_profile_updated", {
|
|
@@ -2046,27 +2051,27 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2046
2051
|
});
|
|
2047
2052
|
let s = a?.data?.addon_checkout?.payment_url || a?.addon_checkout?.payment_url || a?.data?.payment_url || a?.payment_url;
|
|
2048
2053
|
if (s && typeof s == "string" && s.trim() !== "") {
|
|
2049
|
-
U(s),
|
|
2054
|
+
U(s), C("Add-ons updated! Opening payment page in a new tab..."), o?.("addon_payment_opened", { payment_url: s }), window.open(s, "_blank", "noopener,noreferrer"), await Q(i);
|
|
2050
2055
|
return;
|
|
2051
2056
|
}
|
|
2052
|
-
|
|
2057
|
+
C("Profile updated successfully!"), await Q(i);
|
|
2053
2058
|
} catch (e) {
|
|
2054
2059
|
n.error("Failed to update profile", e);
|
|
2055
2060
|
let t = e.message || "Failed to update profile. Please try again.";
|
|
2056
|
-
|
|
2061
|
+
x(t), c?.({
|
|
2057
2062
|
type: "profile_update_error",
|
|
2058
2063
|
message: t,
|
|
2059
2064
|
error: e
|
|
2060
2065
|
});
|
|
2061
2066
|
} finally {
|
|
2062
|
-
|
|
2067
|
+
_(!1);
|
|
2063
2068
|
}
|
|
2064
2069
|
}, et = () => {
|
|
2065
|
-
let e =
|
|
2070
|
+
let e = N?.review_submission;
|
|
2066
2071
|
if (!e) return;
|
|
2067
2072
|
let t = e.custom_data || {}, n = {}, r = {};
|
|
2068
2073
|
(e.editable_fields || []).forEach((i) => {
|
|
2069
|
-
i.id === "name" ? n[i.id] = e.name || "" : i.id === "phone" ? n[i.id] = e.phone || "" : i.id === "registration_type" ? n[i.id] = e.registration_type || "" : n[i.id] = t[i.id] ?? t[
|
|
2074
|
+
i.id === "name" ? n[i.id] = e.name || "" : i.id === "phone" ? n[i.id] = e.phone || "" : i.id === "registration_type" ? n[i.id] = e.registration_type || "" : n[i.id] = t[i.id] ?? t[ot(i.id, i.label)] ?? "", i.type === "file" && (r[i.id] = i.current_file?.text || "");
|
|
2070
2075
|
}), ke(n), Re(r), Le({}), q(!0);
|
|
2071
2076
|
}, nt = (e) => {
|
|
2072
2077
|
if (Ie[e.id]) return Ie[e.id];
|
|
@@ -2075,11 +2080,11 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2075
2080
|
}, rt = async (r, i) => {
|
|
2076
2081
|
let a = t.getToken();
|
|
2077
2082
|
if (!a) {
|
|
2078
|
-
|
|
2083
|
+
x("Session expired. Please log in again.");
|
|
2079
2084
|
return;
|
|
2080
2085
|
}
|
|
2081
|
-
let s = (
|
|
2082
|
-
Fe(r),
|
|
2086
|
+
let s = (N?.review_submission?.editable_fields || []).find((e) => e.id === r), l = s?.current_file?.id;
|
|
2087
|
+
Fe(r), x(null), C(null);
|
|
2083
2088
|
try {
|
|
2084
2089
|
if (l) try {
|
|
2085
2090
|
await e.deleteFile(l, a);
|
|
@@ -2091,7 +2096,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2091
2096
|
ke((e) => ({
|
|
2092
2097
|
...e,
|
|
2093
2098
|
[r]: String(c)
|
|
2094
|
-
})),
|
|
2099
|
+
})), C(`File "${i.name}" uploaded successfully!`), o?.("portal_submission_file_uploaded", {
|
|
2095
2100
|
fieldId: r,
|
|
2096
2101
|
assetId: c,
|
|
2097
2102
|
response: t
|
|
@@ -2099,7 +2104,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2099
2104
|
} catch (e) {
|
|
2100
2105
|
n.error("Submission file upload failed", e);
|
|
2101
2106
|
let t = e.message || "File upload failed. Please try again.";
|
|
2102
|
-
|
|
2107
|
+
x(t), c?.({
|
|
2103
2108
|
type: "file_upload_error",
|
|
2104
2109
|
message: t,
|
|
2105
2110
|
error: e
|
|
@@ -2110,15 +2115,15 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2110
2115
|
}, it = async (r) => {
|
|
2111
2116
|
let i = t.getToken();
|
|
2112
2117
|
if (!i) {
|
|
2113
|
-
|
|
2118
|
+
x("Session expired. Please log in again.");
|
|
2114
2119
|
return;
|
|
2115
2120
|
}
|
|
2116
2121
|
let a = (Z[r] || "").trim();
|
|
2117
2122
|
if (a) {
|
|
2118
|
-
Fe(r),
|
|
2123
|
+
Fe(r), x(null), C(null);
|
|
2119
2124
|
try {
|
|
2120
2125
|
let t = await e.portalUpdateSubmission(i, { [r]: { text: a } }), n = t?.data || t;
|
|
2121
|
-
|
|
2126
|
+
ge((e) => ({
|
|
2122
2127
|
...e,
|
|
2123
2128
|
review_submission: n
|
|
2124
2129
|
}));
|
|
@@ -2126,11 +2131,11 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2126
2131
|
s && ke((e) => ({
|
|
2127
2132
|
...e,
|
|
2128
2133
|
[r]: String(s)
|
|
2129
|
-
})),
|
|
2134
|
+
})), C("Text answer saved!"), o?.("portal_submission_text_saved", { fieldId: r });
|
|
2130
2135
|
} catch (e) {
|
|
2131
2136
|
n.error("Submission text answer failed", e);
|
|
2132
2137
|
let t = e.message || "Could not save your answer. Please try again.";
|
|
2133
|
-
|
|
2138
|
+
x(t), c?.({
|
|
2134
2139
|
type: "submission_text_error",
|
|
2135
2140
|
message: t,
|
|
2136
2141
|
error: e
|
|
@@ -2139,27 +2144,27 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2139
2144
|
Fe(null);
|
|
2140
2145
|
}
|
|
2141
2146
|
}
|
|
2142
|
-
},
|
|
2147
|
+
}, ct = async (r) => {
|
|
2143
2148
|
r.preventDefault();
|
|
2144
2149
|
let i = t.getToken();
|
|
2145
2150
|
if (!i) {
|
|
2146
|
-
|
|
2151
|
+
x("Session expired. Please log in again.");
|
|
2147
2152
|
return;
|
|
2148
2153
|
}
|
|
2149
|
-
Ne(!0),
|
|
2154
|
+
Ne(!0), x(null), C(null);
|
|
2150
2155
|
try {
|
|
2151
2156
|
let t = await e.portalUpdateSubmission(i, Y), n = t?.data || t;
|
|
2152
|
-
|
|
2157
|
+
ge((e) => ({
|
|
2153
2158
|
...e,
|
|
2154
2159
|
review_submission: n
|
|
2155
|
-
})), q(!1),
|
|
2160
|
+
})), q(!1), C("Your submission was updated successfully!"), o?.("attendee_submission_updated", {
|
|
2156
2161
|
payload: Y,
|
|
2157
2162
|
response: t
|
|
2158
2163
|
});
|
|
2159
2164
|
} catch (e) {
|
|
2160
2165
|
n.error("Failed to update submission", e);
|
|
2161
2166
|
let t = e.message || "Failed to update submission. Please try again.";
|
|
2162
|
-
|
|
2167
|
+
x(t), c?.({
|
|
2163
2168
|
type: "submission_update_error",
|
|
2164
2169
|
message: t,
|
|
2165
2170
|
error: e
|
|
@@ -2167,7 +2172,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2167
2172
|
} finally {
|
|
2168
2173
|
Ne(!1);
|
|
2169
2174
|
}
|
|
2170
|
-
},
|
|
2175
|
+
}, lt = () => /* @__PURE__ */ m("div", {
|
|
2171
2176
|
className: "absolute inset-0 pointer-events-none overflow-hidden z-0 select-none",
|
|
2172
2177
|
children: [
|
|
2173
2178
|
/* @__PURE__ */ p("div", {
|
|
@@ -2194,7 +2199,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2194
2199
|
}
|
|
2195
2200
|
})
|
|
2196
2201
|
]
|
|
2197
|
-
}),
|
|
2202
|
+
}), ut = (e) => {
|
|
2198
2203
|
let t = (e.label || e.id || "").toLowerCase(), n = e.type;
|
|
2199
2204
|
return n === "email" || t.includes("email") || t.includes("mail") ? /* @__PURE__ */ p(Me, {
|
|
2200
2205
|
size: 13,
|
|
@@ -2212,7 +2217,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2212
2217
|
size: 13,
|
|
2213
2218
|
className: "shrink-0",
|
|
2214
2219
|
style: { color: r }
|
|
2215
|
-
}) : t.includes("designat") || t.includes("role") || t.includes("position") || t.includes("profession") ? /* @__PURE__ */ p(
|
|
2220
|
+
}) : t.includes("designat") || t.includes("role") || t.includes("position") || t.includes("profession") ? /* @__PURE__ */ p(j, {
|
|
2216
2221
|
size: 13,
|
|
2217
2222
|
className: "shrink-0",
|
|
2218
2223
|
style: { color: r }
|
|
@@ -2220,7 +2225,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2220
2225
|
size: 13,
|
|
2221
2226
|
className: "shrink-0",
|
|
2222
2227
|
style: { color: r }
|
|
2223
|
-
}) : t.includes("organi") || t.includes("institute") || t.includes("hospital") || t.includes("company") || t.includes("college") ? /* @__PURE__ */ p(
|
|
2228
|
+
}) : t.includes("organi") || t.includes("institute") || t.includes("hospital") || t.includes("company") || t.includes("college") ? /* @__PURE__ */ p(ce, {
|
|
2224
2229
|
size: 13,
|
|
2225
2230
|
className: "shrink-0",
|
|
2226
2231
|
style: { color: r }
|
|
@@ -2233,9 +2238,9 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2233
2238
|
className: "shrink-0",
|
|
2234
2239
|
style: { color: r }
|
|
2235
2240
|
});
|
|
2236
|
-
},
|
|
2241
|
+
}, dt = (e, t = "w-full", n = []) => {
|
|
2237
2242
|
if (!e) return null;
|
|
2238
|
-
let r = n.includes(e.id) || n.includes(
|
|
2243
|
+
let r = n.includes(e.id) || n.includes(ot(e.id, e.label)), a = P[e.id] ?? "", o = `vx-profile-${e.id}`, s = `w-full h-11 px-3.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${r ? i ? "bg-zinc-800/60 text-zinc-500 border-zinc-800 cursor-not-allowed" : "bg-slate-50 text-slate-500 border-slate-200 cursor-not-allowed" : i ? "bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]" : "bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]"}`;
|
|
2239
2244
|
return /* @__PURE__ */ m("div", {
|
|
2240
2245
|
className: `${t} px-2 mb-4`,
|
|
2241
2246
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -2247,7 +2252,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2247
2252
|
children: [
|
|
2248
2253
|
/* @__PURE__ */ p("span", {
|
|
2249
2254
|
className: i ? "text-zinc-500" : "text-slate-400",
|
|
2250
|
-
children:
|
|
2255
|
+
children: ut(e)
|
|
2251
2256
|
}),
|
|
2252
2257
|
/* @__PURE__ */ p("span", { children: e.label }),
|
|
2253
2258
|
e.required && /* @__PURE__ */ p("span", {
|
|
@@ -2266,8 +2271,8 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2266
2271
|
id: o,
|
|
2267
2272
|
disabled: r,
|
|
2268
2273
|
value: a,
|
|
2269
|
-
onChange: (t) =>
|
|
2270
|
-
...
|
|
2274
|
+
onChange: (t) => F({
|
|
2275
|
+
...P,
|
|
2271
2276
|
[e.id]: t.target.value
|
|
2272
2277
|
}),
|
|
2273
2278
|
className: `${s} pr-9 appearance-none cursor-pointer flex items-center`,
|
|
@@ -2286,24 +2291,24 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2286
2291
|
}, e))]
|
|
2287
2292
|
}), /* @__PURE__ */ p("div", {
|
|
2288
2293
|
className: `absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none ${i ? "text-zinc-400" : "text-slate-400"}`,
|
|
2289
|
-
children: /* @__PURE__ */ p(
|
|
2294
|
+
children: /* @__PURE__ */ p(fe, { size: 15 })
|
|
2290
2295
|
})]
|
|
2291
|
-
}) : e.type === "file" ?
|
|
2296
|
+
}) : e.type === "file" ? ft(e, r, a) : /* @__PURE__ */ p("input", {
|
|
2292
2297
|
part: "input",
|
|
2293
2298
|
id: o,
|
|
2294
2299
|
type: e.type === "phone" ? "tel" : e.type === "email" ? "email" : "text",
|
|
2295
2300
|
disabled: r,
|
|
2296
2301
|
value: a,
|
|
2297
2302
|
placeholder: e.placeholder || `Enter ${e.label.toLowerCase()}`,
|
|
2298
|
-
onChange: (t) =>
|
|
2299
|
-
...
|
|
2303
|
+
onChange: (t) => F({
|
|
2304
|
+
...P,
|
|
2300
2305
|
[e.id]: t.target.value
|
|
2301
2306
|
}),
|
|
2302
2307
|
className: s
|
|
2303
2308
|
})]
|
|
2304
2309
|
}, e.id);
|
|
2305
|
-
},
|
|
2306
|
-
let a =
|
|
2310
|
+
}, ft = (e, t, n) => {
|
|
2311
|
+
let a = v === e.id, o = e.label || e.name || e.id, s = typeof n == "string" ? n : n?.serve_url || n?.url || "", c = typeof n == "string" ? n : n?.file_name || s;
|
|
2307
2312
|
return /* @__PURE__ */ p("div", {
|
|
2308
2313
|
className: "space-y-2",
|
|
2309
2314
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -2355,7 +2360,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2355
2360
|
}),
|
|
2356
2361
|
n && /* @__PURE__ */ m("div", {
|
|
2357
2362
|
className: `mt-2 pt-2 border-t text-2xs truncate flex items-center gap-1.5 ${i ? "border-zinc-800 text-zinc-300" : "border-gray-200 text-gray-700 font-medium"}`,
|
|
2358
|
-
children: [/* @__PURE__ */ p(
|
|
2363
|
+
children: [/* @__PURE__ */ p(ue, {
|
|
2359
2364
|
size: 12,
|
|
2360
2365
|
className: "text-emerald-500 shrink-0"
|
|
2361
2366
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -2390,7 +2395,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2390
2395
|
})
|
|
2391
2396
|
});
|
|
2392
2397
|
};
|
|
2393
|
-
if (l === "profile" && !
|
|
2398
|
+
if (l === "profile" && !N) {
|
|
2394
2399
|
let e = "vx-skeleton rounded-full", t = `rounded-3xl border p-5 sm:p-6 ${i ? "bg-zinc-900 border-zinc-800" : "bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]"}`;
|
|
2395
2400
|
return /* @__PURE__ */ m("div", {
|
|
2396
2401
|
role: "status",
|
|
@@ -2402,7 +2407,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2402
2407
|
className: "sr-only",
|
|
2403
2408
|
children: "Loading your profile…"
|
|
2404
2409
|
}),
|
|
2405
|
-
|
|
2410
|
+
lt(),
|
|
2406
2411
|
/* @__PURE__ */ m("div", {
|
|
2407
2412
|
className: `max-w-3xl mx-auto w-full px-4 sm:px-6 ${a ? "py-8 sm:py-10" : "py-5"} space-y-5 relative z-10`,
|
|
2408
2413
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -2444,7 +2449,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2444
2449
|
});
|
|
2445
2450
|
}
|
|
2446
2451
|
if (l === "profile") {
|
|
2447
|
-
let e =
|
|
2452
|
+
let e = N?.registration || {}, t = N?.editable_fields || [], n = N?.locked_fields || [], o = Array.isArray(N?.payment) ? N.payment : N?.payment ? [N.payment] : [], s = o.filter((e) => e.state !== "not_required"), c = o[0], l = N?.addons?.items || [], u = N?.badge || null, d = N?.review_submission || null, h = ne || "Attendee", g = h.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase()).join("") || "A", _ = `rounded-3xl border p-5 sm:p-6 ${i ? "bg-zinc-900 border-zinc-800 text-white" : "bg-white border-slate-200/80 text-slate-900 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]"}`, y = i ? "text-zinc-400" : "text-slate-500", x = `text-base font-semibold tracking-tight ${i ? "text-white" : "text-slate-900"}`, C = [
|
|
2448
2453
|
{
|
|
2449
2454
|
label: "Registration no.",
|
|
2450
2455
|
value: e.registration_number || "N/A",
|
|
@@ -2466,14 +2471,14 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2466
2471
|
onScroll: a ? void 0 : (e) => {
|
|
2467
2472
|
e.currentTarget.scrollTop !== 0 && (e.currentTarget.scrollTop = 0), e.currentTarget.scrollLeft !== 0 && (e.currentTarget.scrollLeft = 0);
|
|
2468
2473
|
},
|
|
2469
|
-
children: [
|
|
2474
|
+
children: [lt(), /* @__PURE__ */ p("div", {
|
|
2470
2475
|
className: `${a ? "w-full flex-1" : "flex-1 overflow-y-auto min-h-0 overscroll-contain"} relative z-10`,
|
|
2471
2476
|
children: /* @__PURE__ */ m("div", {
|
|
2472
2477
|
className: `max-w-3xl mx-auto w-full px-4 sm:px-6 ${a ? "py-8 sm:py-10" : "py-5"} space-y-5`,
|
|
2473
2478
|
children: [
|
|
2474
2479
|
/* @__PURE__ */ m("div", {
|
|
2475
2480
|
part: "portal-card profile-card",
|
|
2476
|
-
className:
|
|
2481
|
+
className: _,
|
|
2477
2482
|
children: [/* @__PURE__ */ m("div", {
|
|
2478
2483
|
className: "flex items-start justify-between gap-3",
|
|
2479
2484
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -2497,7 +2502,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2497
2502
|
children: e.status
|
|
2498
2503
|
})]
|
|
2499
2504
|
}), /* @__PURE__ */ p("p", {
|
|
2500
|
-
className: `text-[13px] mt-0.5 ${
|
|
2505
|
+
className: `text-[13px] mt-0.5 ${y}`,
|
|
2501
2506
|
children: "Manage your registration and details"
|
|
2502
2507
|
})]
|
|
2503
2508
|
})]
|
|
@@ -2513,8 +2518,8 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2513
2518
|
})]
|
|
2514
2519
|
})]
|
|
2515
2520
|
}), /* @__PURE__ */ p("dl", {
|
|
2516
|
-
className: `mt-5 pt-5 border-t grid grid-cols-2 ${
|
|
2517
|
-
children:
|
|
2521
|
+
className: `mt-5 pt-5 border-t grid grid-cols-2 ${C.length === 3 ? "sm:grid-cols-3" : "sm:grid-cols-2"} gap-4 ${i ? "border-zinc-800" : "border-slate-100"}`,
|
|
2522
|
+
children: C.map((e) => /* @__PURE__ */ m("div", {
|
|
2518
2523
|
className: "min-w-0",
|
|
2519
2524
|
children: [/* @__PURE__ */ p("dt", {
|
|
2520
2525
|
className: `text-[11px] font-semibold uppercase tracking-wider ${i ? "text-zinc-500" : "text-slate-400"}`,
|
|
@@ -2531,32 +2536,32 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2531
2536
|
className: "space-y-5",
|
|
2532
2537
|
children: [
|
|
2533
2538
|
t.length === 0 ? /* @__PURE__ */ p("div", {
|
|
2534
|
-
className: `${
|
|
2539
|
+
className: `${_} text-center text-sm ${y}`,
|
|
2535
2540
|
children: "No editable fields configured."
|
|
2536
2541
|
}) : /* @__PURE__ */ m("div", {
|
|
2537
2542
|
part: "portal-card details-card",
|
|
2538
|
-
className:
|
|
2543
|
+
className: _,
|
|
2539
2544
|
children: [/* @__PURE__ */ m("div", {
|
|
2540
2545
|
className: "flex items-start justify-between gap-3 mb-5",
|
|
2541
2546
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h4", {
|
|
2542
|
-
className:
|
|
2547
|
+
className: x,
|
|
2543
2548
|
style: $,
|
|
2544
2549
|
children: "Your details"
|
|
2545
2550
|
}), /* @__PURE__ */ p("p", {
|
|
2546
|
-
className: `text-[13px] mt-0.5 ${
|
|
2551
|
+
className: `text-[13px] mt-0.5 ${y}`,
|
|
2547
2552
|
children: "Keep your information up to date."
|
|
2548
2553
|
})] }), Ee && /* @__PURE__ */ m("span", {
|
|
2549
2554
|
className: `inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-1 rounded-full shrink-0 ${i ? "bg-emerald-950/60 text-emerald-300" : "bg-emerald-50 text-emerald-700"}`,
|
|
2550
|
-
children: [/* @__PURE__ */ p(
|
|
2555
|
+
children: [/* @__PURE__ */ p(ue, { size: 11 }), " Draft restored"]
|
|
2551
2556
|
})]
|
|
2552
2557
|
}), /* @__PURE__ */ p("div", {
|
|
2553
2558
|
className: "flex flex-wrap -mx-2 -mb-4",
|
|
2554
|
-
children: t.map((e) =>
|
|
2559
|
+
children: t.map((e) => dt(e, e.type === "file" || e.width === "full" ? "w-full" : "w-full md:w-1/2", n))
|
|
2555
2560
|
})]
|
|
2556
2561
|
}),
|
|
2557
2562
|
l.length > 0 && /* @__PURE__ */ m("div", {
|
|
2558
2563
|
part: "portal-card addons-card",
|
|
2559
|
-
className:
|
|
2564
|
+
className: _,
|
|
2560
2565
|
children: [/* @__PURE__ */ p("div", {
|
|
2561
2566
|
className: "flex items-start justify-between gap-3 mb-4",
|
|
2562
2567
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -2569,11 +2574,11 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2569
2574
|
},
|
|
2570
2575
|
children: /* @__PURE__ */ p(Ye, { size: 17 })
|
|
2571
2576
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h4", {
|
|
2572
|
-
className:
|
|
2577
|
+
className: x,
|
|
2573
2578
|
style: $,
|
|
2574
2579
|
children: "Add-ons"
|
|
2575
2580
|
}), /* @__PURE__ */ p("p", {
|
|
2576
|
-
className: `text-[13px] ${
|
|
2581
|
+
className: `text-[13px] ${y}`,
|
|
2577
2582
|
children: "Select items to add to your registration"
|
|
2578
2583
|
})] })]
|
|
2579
2584
|
})
|
|
@@ -2613,7 +2618,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2613
2618
|
}),
|
|
2614
2619
|
t && /* @__PURE__ */ m("span", {
|
|
2615
2620
|
className: `px-2.5 py-1 rounded-full text-[11px] font-semibold flex items-center gap-1 shrink-0 ${i ? "bg-emerald-950/70 text-emerald-300" : "bg-emerald-50 text-emerald-700"}`,
|
|
2616
|
-
children: [/* @__PURE__ */ p(
|
|
2621
|
+
children: [/* @__PURE__ */ p(ue, { size: 12 }), " Purchased"]
|
|
2617
2622
|
})
|
|
2618
2623
|
]
|
|
2619
2624
|
}, e.name);
|
|
@@ -2625,13 +2630,13 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2625
2630
|
children: /* @__PURE__ */ p("button", {
|
|
2626
2631
|
part: "button button-primary submit-button",
|
|
2627
2632
|
type: "submit",
|
|
2628
|
-
disabled:
|
|
2633
|
+
disabled: ee || v !== null,
|
|
2629
2634
|
style: {
|
|
2630
2635
|
background: `linear-gradient(135deg, ${r}, color-mix(in srgb, ${r} 80%, black))`,
|
|
2631
2636
|
boxShadow: `0 10px 24px -12px color-mix(in srgb, ${r} 70%, transparent)`
|
|
2632
2637
|
},
|
|
2633
2638
|
className: "w-full h-12 px-4 text-white text-sm font-semibold rounded-xl hover:brightness-110 active:scale-[0.99] transition-all flex items-center justify-center gap-2 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
|
|
2634
|
-
children:
|
|
2639
|
+
children: ee ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("svg", {
|
|
2635
2640
|
className: "animate-spin h-4 w-4 text-white",
|
|
2636
2641
|
fill: "none",
|
|
2637
2642
|
viewBox: "0 0 24 24",
|
|
@@ -2655,7 +2660,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2655
2660
|
}),
|
|
2656
2661
|
u && /* @__PURE__ */ m("div", {
|
|
2657
2662
|
part: "portal-card badge-card",
|
|
2658
|
-
className:
|
|
2663
|
+
className: _,
|
|
2659
2664
|
children: [
|
|
2660
2665
|
/* @__PURE__ */ m("div", {
|
|
2661
2666
|
className: "flex items-center gap-3 mb-4",
|
|
@@ -2667,11 +2672,11 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2667
2672
|
},
|
|
2668
2673
|
children: /* @__PURE__ */ p(H, { size: 17 })
|
|
2669
2674
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h4", {
|
|
2670
|
-
className:
|
|
2675
|
+
className: x,
|
|
2671
2676
|
style: $,
|
|
2672
2677
|
children: "Your badge"
|
|
2673
2678
|
}), /* @__PURE__ */ p("p", {
|
|
2674
|
-
className: `text-[13px] ${
|
|
2679
|
+
className: `text-[13px] ${y}`,
|
|
2675
2680
|
children: "View or download your event badge."
|
|
2676
2681
|
})] })]
|
|
2677
2682
|
}),
|
|
@@ -2705,7 +2710,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2705
2710
|
}),
|
|
2706
2711
|
s.length > 0 && /* @__PURE__ */ m("div", {
|
|
2707
2712
|
part: "portal-card payments-card",
|
|
2708
|
-
className:
|
|
2713
|
+
className: _,
|
|
2709
2714
|
children: [/* @__PURE__ */ m("div", {
|
|
2710
2715
|
className: "flex items-center gap-3 mb-4",
|
|
2711
2716
|
children: [/* @__PURE__ */ p("div", {
|
|
@@ -2716,11 +2721,11 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2716
2721
|
},
|
|
2717
2722
|
children: /* @__PURE__ */ p(Ue, { size: 17 })
|
|
2718
2723
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h4", {
|
|
2719
|
-
className:
|
|
2724
|
+
className: x,
|
|
2720
2725
|
style: $,
|
|
2721
2726
|
children: "Payments"
|
|
2722
2727
|
}), /* @__PURE__ */ p("p", {
|
|
2723
|
-
className: `text-[13px] ${
|
|
2728
|
+
className: `text-[13px] ${y}`,
|
|
2724
2729
|
children: "Every order on your registration, with receipts."
|
|
2725
2730
|
})] })]
|
|
2726
2731
|
}), /* @__PURE__ */ p("div", {
|
|
@@ -2760,7 +2765,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2760
2765
|
}),
|
|
2761
2766
|
d && /* @__PURE__ */ m("div", {
|
|
2762
2767
|
part: "portal-card submission-card",
|
|
2763
|
-
className:
|
|
2768
|
+
className: _,
|
|
2764
2769
|
children: [
|
|
2765
2770
|
/* @__PURE__ */ m("div", {
|
|
2766
2771
|
className: "flex items-center gap-3 mb-4",
|
|
@@ -2776,11 +2781,11 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2776
2781
|
/* @__PURE__ */ m("div", {
|
|
2777
2782
|
className: "flex-1 min-w-0",
|
|
2778
2783
|
children: [/* @__PURE__ */ p("h4", {
|
|
2779
|
-
className:
|
|
2784
|
+
className: x,
|
|
2780
2785
|
style: $,
|
|
2781
2786
|
children: "Your submission"
|
|
2782
2787
|
}), /* @__PURE__ */ p("p", {
|
|
2783
|
-
className: `text-[13px] ${
|
|
2788
|
+
className: `text-[13px] ${y}`,
|
|
2784
2789
|
children: d.registration_type_label || "Abstract submission"
|
|
2785
2790
|
})]
|
|
2786
2791
|
}),
|
|
@@ -2807,7 +2812,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2807
2812
|
})] })]
|
|
2808
2813
|
}),
|
|
2809
2814
|
K ? /* @__PURE__ */ m("form", {
|
|
2810
|
-
onSubmit:
|
|
2815
|
+
onSubmit: ct,
|
|
2811
2816
|
className: `mt-4 pt-4 border-t space-y-3.5 ${i ? "border-zinc-800" : "border-slate-100"}`,
|
|
2812
2817
|
children: [(d.editable_fields || []).map((e) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
|
|
2813
2818
|
className: `block text-[13px] font-semibold mb-1.5 ${i ? "text-zinc-200" : "text-slate-800"}`,
|
|
@@ -2839,10 +2844,10 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2839
2844
|
let n = t.target.files?.[0];
|
|
2840
2845
|
n && rt(e.id, n);
|
|
2841
2846
|
},
|
|
2842
|
-
className: `w-full text-[13px] ${
|
|
2847
|
+
className: `w-full text-[13px] ${y}`
|
|
2843
2848
|
}),
|
|
2844
2849
|
X === e.id && /* @__PURE__ */ p("p", {
|
|
2845
|
-
className: `mt-1 text-[12.5px] ${
|
|
2850
|
+
className: `mt-1 text-[12.5px] ${y}`,
|
|
2846
2851
|
children: "Uploading…"
|
|
2847
2852
|
})
|
|
2848
2853
|
] }) : /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("textarea", {
|
|
@@ -2926,7 +2931,7 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2926
2931
|
}) : /* @__PURE__ */ m("div", {
|
|
2927
2932
|
className: `mt-4 pt-4 border-t flex items-center justify-between gap-3 flex-wrap ${i ? "border-zinc-800" : "border-slate-100"}`,
|
|
2928
2933
|
children: [/* @__PURE__ */ p("p", {
|
|
2929
|
-
className: `text-[13px] ${
|
|
2934
|
+
className: `text-[13px] ${y}`,
|
|
2930
2935
|
children: d.editable ? "You can still edit your answers until a reviewer picks this up." : "This submission has been assigned to a reviewer and can no longer be edited."
|
|
2931
2936
|
}), d.editable && /* @__PURE__ */ p("button", {
|
|
2932
2937
|
type: "button",
|
|
@@ -2960,28 +2965,28 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2960
2965
|
children: [/* @__PURE__ */ p("span", { children: "Complete payment" }), /* @__PURE__ */ p(Se, { size: 12 })]
|
|
2961
2966
|
})]
|
|
2962
2967
|
}),
|
|
2963
|
-
|
|
2968
|
+
b && /* @__PURE__ */ m("div", {
|
|
2964
2969
|
role: "alert",
|
|
2965
2970
|
className: `p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${i ? "bg-red-950/50 text-red-300 ring-1 ring-inset ring-red-900" : "bg-red-50 text-red-700 ring-1 ring-inset ring-red-200/80"}`,
|
|
2966
|
-
children: [/* @__PURE__ */ p(
|
|
2971
|
+
children: [/* @__PURE__ */ p(me, {
|
|
2967
2972
|
size: 17,
|
|
2968
2973
|
className: "shrink-0 mt-0.5"
|
|
2969
|
-
}), /* @__PURE__ */ p("span", { children:
|
|
2974
|
+
}), /* @__PURE__ */ p("span", { children: b })]
|
|
2970
2975
|
}),
|
|
2971
|
-
|
|
2976
|
+
S && /* @__PURE__ */ m("div", {
|
|
2972
2977
|
role: "status",
|
|
2973
2978
|
className: `p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${i ? "bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900" : "bg-emerald-50 text-emerald-700 ring-1 ring-inset ring-emerald-200/80"}`,
|
|
2974
|
-
children: [/* @__PURE__ */ p(
|
|
2979
|
+
children: [/* @__PURE__ */ p(he, {
|
|
2975
2980
|
size: 17,
|
|
2976
2981
|
className: "shrink-0 mt-0.5"
|
|
2977
|
-
}), /* @__PURE__ */ p("span", { children:
|
|
2982
|
+
}), /* @__PURE__ */ p("span", { children: S })]
|
|
2978
2983
|
})
|
|
2979
2984
|
]
|
|
2980
2985
|
})
|
|
2981
2986
|
})]
|
|
2982
2987
|
});
|
|
2983
2988
|
}
|
|
2984
|
-
let
|
|
2989
|
+
let pt = `w-full h-11 pl-10 pr-3.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${i ? "bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]" : "bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]"}`, mt = /* @__PURE__ */ m("svg", {
|
|
2985
2990
|
className: "animate-spin h-4 w-4 text-white",
|
|
2986
2991
|
fill: "none",
|
|
2987
2992
|
viewBox: "0 0 24 24",
|
|
@@ -2998,9 +3003,9 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
2998
3003
|
fill: "currentColor",
|
|
2999
3004
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
3000
3005
|
})]
|
|
3001
|
-
}),
|
|
3002
|
-
u(e),
|
|
3003
|
-
},
|
|
3006
|
+
}), ht = (e) => {
|
|
3007
|
+
u(e), x(null), C(null);
|
|
3008
|
+
}, gt = ({ id: e, label: t, icon: n, type: r = "text", value: a, onChange: o, placeholder: s, autoComplete: c, aside: l }) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
|
|
3004
3009
|
className: "flex items-center justify-between gap-2 mb-1.5",
|
|
3005
3010
|
children: [/* @__PURE__ */ p("label", {
|
|
3006
3011
|
part: "field-label",
|
|
@@ -3022,23 +3027,23 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
3022
3027
|
autoComplete: c,
|
|
3023
3028
|
onChange: (e) => o(e.target.value),
|
|
3024
3029
|
placeholder: s,
|
|
3025
|
-
className:
|
|
3030
|
+
className: pt
|
|
3026
3031
|
})]
|
|
3027
|
-
})] }),
|
|
3032
|
+
})] }), _t = () => /* @__PURE__ */ m(f, { children: [b && /* @__PURE__ */ m("div", {
|
|
3028
3033
|
role: "alert",
|
|
3029
3034
|
className: `p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${i ? "bg-red-950/50 text-red-300 ring-1 ring-inset ring-red-900" : "bg-red-50 text-red-700 ring-1 ring-inset ring-red-200/80"}`,
|
|
3030
|
-
children: [/* @__PURE__ */ p(
|
|
3035
|
+
children: [/* @__PURE__ */ p(me, {
|
|
3031
3036
|
size: 17,
|
|
3032
3037
|
className: "shrink-0 mt-0.5"
|
|
3033
|
-
}), /* @__PURE__ */ p("span", { children:
|
|
3034
|
-
}),
|
|
3038
|
+
}), /* @__PURE__ */ p("span", { children: b })]
|
|
3039
|
+
}), S && /* @__PURE__ */ m("div", {
|
|
3035
3040
|
role: "status",
|
|
3036
3041
|
className: `p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${i ? "bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900" : "bg-emerald-50 text-emerald-700 ring-1 ring-inset ring-emerald-200/80"}`,
|
|
3037
|
-
children: [/* @__PURE__ */ p(
|
|
3042
|
+
children: [/* @__PURE__ */ p(he, {
|
|
3038
3043
|
size: 17,
|
|
3039
3044
|
className: "shrink-0 mt-0.5"
|
|
3040
|
-
}), /* @__PURE__ */ p("span", { children:
|
|
3041
|
-
})] }),
|
|
3045
|
+
}), /* @__PURE__ */ p("span", { children: S })]
|
|
3046
|
+
})] }), vt = (e, t, n) => /* @__PURE__ */ p("button", {
|
|
3042
3047
|
part: "button button-primary submit-button",
|
|
3043
3048
|
type: "submit",
|
|
3044
3049
|
disabled: e,
|
|
@@ -3047,20 +3052,20 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
3047
3052
|
boxShadow: `0 10px 24px -12px color-mix(in srgb, ${r} 70%, transparent)`
|
|
3048
3053
|
},
|
|
3049
3054
|
className: "group w-full h-11 px-4 text-white text-sm font-semibold rounded-xl hover:brightness-110 active:scale-[0.99] transition-all flex items-center justify-center gap-2 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed",
|
|
3050
|
-
children: e ? /* @__PURE__ */ m(f, { children: [
|
|
3055
|
+
children: e ? /* @__PURE__ */ m(f, { children: [mt, /* @__PURE__ */ p("span", { children: n })] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", { children: t }), /* @__PURE__ */ p(ae, {
|
|
3051
3056
|
size: 16,
|
|
3052
3057
|
className: "transition-transform group-hover:translate-x-0.5"
|
|
3053
3058
|
})] })
|
|
3054
|
-
}),
|
|
3059
|
+
}), yt = ({ icon: e, title: t, subtitle: n, onBack: o, children: s }) => /* @__PURE__ */ m("div", {
|
|
3055
3060
|
className: `flex flex-col ${a ? "w-full flex-1" : "h-full overflow-y-auto"} relative bg-transparent ${i ? "text-white" : "text-slate-900"}`,
|
|
3056
|
-
children: [
|
|
3061
|
+
children: [lt(), /* @__PURE__ */ m("div", {
|
|
3057
3062
|
className: `px-4 sm:px-6 ${a ? "py-8 sm:py-10" : "py-5"} flex-1 max-w-[400px] mx-auto w-full flex flex-col justify-center relative z-10`,
|
|
3058
3063
|
children: [o && /* @__PURE__ */ m("button", {
|
|
3059
3064
|
part: "button button-link back-button",
|
|
3060
3065
|
type: "button",
|
|
3061
3066
|
onClick: o,
|
|
3062
3067
|
className: `self-start inline-flex items-center gap-1.5 mb-4 text-sm font-semibold transition-colors cursor-pointer ${i ? "text-zinc-400 hover:text-white" : "text-slate-500 hover:text-slate-900"}`,
|
|
3063
|
-
children: [/* @__PURE__ */ p(
|
|
3068
|
+
children: [/* @__PURE__ */ p(ie, { size: 16 }), /* @__PURE__ */ p("span", { children: "Back to login" })]
|
|
3064
3069
|
}), /* @__PURE__ */ m("div", {
|
|
3065
3070
|
part: "portal-card",
|
|
3066
3071
|
className: `p-6 sm:p-7 rounded-3xl border space-y-5 ${i ? "bg-zinc-900 border-zinc-800 shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]" : "bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.18)]"}`,
|
|
@@ -3085,33 +3090,33 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
3085
3090
|
children: n
|
|
3086
3091
|
})
|
|
3087
3092
|
] }),
|
|
3088
|
-
|
|
3093
|
+
_t(),
|
|
3089
3094
|
s
|
|
3090
3095
|
]
|
|
3091
3096
|
})]
|
|
3092
3097
|
})]
|
|
3093
|
-
}),
|
|
3094
|
-
return
|
|
3098
|
+
}), bt = "font-semibold hover:underline underline-offset-4 cursor-pointer";
|
|
3099
|
+
return yt(l === "request_code" ? {
|
|
3095
3100
|
icon: Me,
|
|
3096
3101
|
title: "Get verification code",
|
|
3097
3102
|
subtitle: "We will email a verification code to your registered address.",
|
|
3098
|
-
onBack: () =>
|
|
3103
|
+
onBack: () => ht("login"),
|
|
3099
3104
|
children: /* @__PURE__ */ m("form", {
|
|
3100
3105
|
onSubmit: He,
|
|
3101
3106
|
className: "space-y-4",
|
|
3102
3107
|
children: [
|
|
3103
|
-
|
|
3108
|
+
gt({
|
|
3104
3109
|
id: "vx-portal-code-identifier",
|
|
3105
3110
|
label: "Registration number or email",
|
|
3106
3111
|
icon: Me,
|
|
3107
|
-
value:
|
|
3112
|
+
value: re || w,
|
|
3108
3113
|
onChange: (e) => {
|
|
3109
|
-
|
|
3114
|
+
O(e), T(e);
|
|
3110
3115
|
},
|
|
3111
3116
|
placeholder: "e.g. attendee@example.com or REG12345",
|
|
3112
3117
|
autoComplete: "username"
|
|
3113
3118
|
}),
|
|
3114
|
-
|
|
3119
|
+
vt(pe, "Send verification code", "Sending code..."),
|
|
3115
3120
|
/* @__PURE__ */ m("p", {
|
|
3116
3121
|
className: `text-center text-[13px] ${i ? "text-zinc-400" : "text-slate-500"}`,
|
|
3117
3122
|
children: [
|
|
@@ -3119,8 +3124,8 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
3119
3124
|
" ",
|
|
3120
3125
|
/* @__PURE__ */ p("button", {
|
|
3121
3126
|
type: "button",
|
|
3122
|
-
onClick: () =>
|
|
3123
|
-
className:
|
|
3127
|
+
onClick: () => ht("reset"),
|
|
3128
|
+
className: bt,
|
|
3124
3129
|
style: { color: r },
|
|
3125
3130
|
children: "Set your password"
|
|
3126
3131
|
})
|
|
@@ -3132,61 +3137,61 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
3132
3137
|
icon: G,
|
|
3133
3138
|
title: "Set your password",
|
|
3134
3139
|
subtitle: "Enter the code from your email and choose a new password.",
|
|
3135
|
-
onBack: () =>
|
|
3140
|
+
onBack: () => ht("login"),
|
|
3136
3141
|
children: /* @__PURE__ */ m("form", {
|
|
3137
3142
|
onSubmit: We,
|
|
3138
3143
|
className: "space-y-4",
|
|
3139
3144
|
children: [
|
|
3140
|
-
|
|
3145
|
+
gt({
|
|
3141
3146
|
id: "vx-portal-reset-identifier",
|
|
3142
3147
|
label: "Registration number or email",
|
|
3143
3148
|
icon: Me,
|
|
3144
|
-
value:
|
|
3149
|
+
value: re || w,
|
|
3145
3150
|
onChange: (e) => {
|
|
3146
|
-
|
|
3151
|
+
O(e), T(e);
|
|
3147
3152
|
},
|
|
3148
3153
|
placeholder: "e.g. attendee@example.com or REG12345",
|
|
3149
3154
|
autoComplete: "username"
|
|
3150
3155
|
}),
|
|
3151
|
-
|
|
3156
|
+
gt({
|
|
3152
3157
|
id: "vx-portal-reset-code",
|
|
3153
3158
|
label: "Verification code",
|
|
3154
3159
|
icon: De,
|
|
3155
|
-
value:
|
|
3156
|
-
onChange:
|
|
3160
|
+
value: k,
|
|
3161
|
+
onChange: A,
|
|
3157
3162
|
placeholder: "Enter code from email",
|
|
3158
3163
|
autoComplete: "one-time-code",
|
|
3159
3164
|
aside: /* @__PURE__ */ p("button", {
|
|
3160
3165
|
type: "button",
|
|
3161
3166
|
onClick: () => {
|
|
3162
|
-
|
|
3167
|
+
O(re || w), ht("request_code");
|
|
3163
3168
|
},
|
|
3164
3169
|
className: "text-xs font-semibold hover:underline underline-offset-4 cursor-pointer",
|
|
3165
3170
|
style: { color: r },
|
|
3166
3171
|
children: "Get code on email"
|
|
3167
3172
|
})
|
|
3168
3173
|
}),
|
|
3169
|
-
|
|
3174
|
+
gt({
|
|
3170
3175
|
id: "vx-portal-reset-password",
|
|
3171
3176
|
label: "New password",
|
|
3172
3177
|
icon: J,
|
|
3173
3178
|
type: "password",
|
|
3174
|
-
value:
|
|
3175
|
-
onChange:
|
|
3179
|
+
value: oe,
|
|
3180
|
+
onChange: se,
|
|
3176
3181
|
placeholder: "Enter new password",
|
|
3177
3182
|
autoComplete: "new-password"
|
|
3178
3183
|
}),
|
|
3179
|
-
|
|
3184
|
+
gt({
|
|
3180
3185
|
id: "vx-portal-reset-confirm",
|
|
3181
3186
|
label: "Confirm password",
|
|
3182
3187
|
icon: J,
|
|
3183
3188
|
type: "password",
|
|
3184
|
-
value:
|
|
3185
|
-
onChange:
|
|
3189
|
+
value: le,
|
|
3190
|
+
onChange: de,
|
|
3186
3191
|
placeholder: "Re-enter new password",
|
|
3187
3192
|
autoComplete: "new-password"
|
|
3188
3193
|
}),
|
|
3189
|
-
|
|
3194
|
+
vt(h, "Set new password", "Updating password...")
|
|
3190
3195
|
]
|
|
3191
3196
|
})
|
|
3192
3197
|
} : {
|
|
@@ -3197,35 +3202,35 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
3197
3202
|
onSubmit: Be,
|
|
3198
3203
|
className: "space-y-4",
|
|
3199
3204
|
children: [
|
|
3200
|
-
|
|
3205
|
+
gt({
|
|
3201
3206
|
id: "vx-portal-login-identifier",
|
|
3202
3207
|
label: "Email or registration number",
|
|
3203
3208
|
icon: Me,
|
|
3204
|
-
value:
|
|
3205
|
-
onChange:
|
|
3209
|
+
value: w,
|
|
3210
|
+
onChange: T,
|
|
3206
3211
|
placeholder: "Enter email or registration number",
|
|
3207
3212
|
autoComplete: "username"
|
|
3208
3213
|
}),
|
|
3209
|
-
|
|
3214
|
+
gt({
|
|
3210
3215
|
id: "vx-portal-login-password",
|
|
3211
3216
|
label: "Password",
|
|
3212
3217
|
icon: J,
|
|
3213
3218
|
type: "password",
|
|
3214
|
-
value:
|
|
3215
|
-
onChange:
|
|
3219
|
+
value: E,
|
|
3220
|
+
onChange: te,
|
|
3216
3221
|
placeholder: "Enter password",
|
|
3217
3222
|
autoComplete: "current-password",
|
|
3218
3223
|
aside: /* @__PURE__ */ p("button", {
|
|
3219
3224
|
type: "button",
|
|
3220
3225
|
onClick: () => {
|
|
3221
|
-
|
|
3226
|
+
O(w), ht("reset");
|
|
3222
3227
|
},
|
|
3223
3228
|
className: "text-xs font-semibold hover:underline underline-offset-4 cursor-pointer",
|
|
3224
3229
|
style: { color: r },
|
|
3225
3230
|
children: "Forgot password?"
|
|
3226
3231
|
})
|
|
3227
3232
|
}),
|
|
3228
|
-
|
|
3233
|
+
vt(h, "Login", "Logging in..."),
|
|
3229
3234
|
/* @__PURE__ */ m("p", {
|
|
3230
3235
|
className: `pt-4 border-t text-center text-[13px] ${i ? "border-zinc-800 text-zinc-400" : "border-slate-100 text-slate-500"}`,
|
|
3231
3236
|
children: [
|
|
@@ -3234,9 +3239,9 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
3234
3239
|
/* @__PURE__ */ p("button", {
|
|
3235
3240
|
type: "button",
|
|
3236
3241
|
onClick: () => {
|
|
3237
|
-
|
|
3242
|
+
O(w), ht("request_code");
|
|
3238
3243
|
},
|
|
3239
|
-
className:
|
|
3244
|
+
className: bt,
|
|
3240
3245
|
style: { color: r },
|
|
3241
3246
|
children: "Get code"
|
|
3242
3247
|
}),
|
|
@@ -3246,9 +3251,9 @@ var lt = ({ apiClient: e, storage: t, logger: n, primaryColor: r, isDark: i = !1
|
|
|
3246
3251
|
/* @__PURE__ */ p("button", {
|
|
3247
3252
|
type: "button",
|
|
3248
3253
|
onClick: () => {
|
|
3249
|
-
|
|
3254
|
+
O(w), ht("reset");
|
|
3250
3255
|
},
|
|
3251
|
-
className:
|
|
3256
|
+
className: bt,
|
|
3252
3257
|
style: { color: r },
|
|
3253
3258
|
children: "generate password"
|
|
3254
3259
|
})
|
|
@@ -3324,16 +3329,16 @@ var ft = (e) => {
|
|
|
3324
3329
|
s(() => {
|
|
3325
3330
|
t === "attendee" && i(!0);
|
|
3326
3331
|
}, [t]);
|
|
3327
|
-
let [o] = d(() => typeof window < "u" ? new URLSearchParams(window.location.search).get("rn") : null), [c, h] = d(e.displayMode !== "popup" || !!o), [
|
|
3332
|
+
let [o] = d(() => typeof window < "u" ? new URLSearchParams(window.location.search).get("rn") : null), [c, h] = d(e.displayMode !== "popup" || !!o), [v, y] = d(!1), [b, x] = d([]), [S, C] = d(""), [w, T] = d(null), [E, te] = d(null), ne = l(() => E && { fields: E.fields.filter((e) => e.id !== "registration_type") }, [E]), [D, re] = d(!0), [O, k] = d(""), [ie, A] = d(null), [oe, j] = d(!!o), [se, ce] = d(null), [le, de] = d(null), [fe, pe] = d(o), [me, M] = d(!1), [he, N] = d(() => dt(e.position)), [P, I] = d(null), [ve, ye] = d(null), [L, be] = d(!1), [xe, Ce] = d(!1), Te = u(null), R = u(null), z = u(!1);
|
|
3328
3333
|
s(() => {
|
|
3329
|
-
e.position &&
|
|
3334
|
+
e.position && N(dt(e.position));
|
|
3330
3335
|
}, [e.position]);
|
|
3331
|
-
let B = e.themeMode === "dark" || e.theme?.mode === "dark", V = e.theme?.primaryColor || "#2563eb", H = !!e.isAbstract, U = e.headerBannerImage, Ee = e.backgroundImage, W = l(() => new g(e.debug), [e.debug]), G = l(() => new
|
|
3336
|
+
let B = e.themeMode === "dark" || e.theme?.mode === "dark", V = e.theme?.primaryColor || "#2563eb", H = !!e.isAbstract, U = e.headerBannerImage, Ee = e.backgroundImage, W = l(() => new g(e.debug), [e.debug]), G = l(() => new ee(e.baseUrl, e.eventSlug, W, e.timeoutMs ?? 12e4), [
|
|
3332
3337
|
e.baseUrl,
|
|
3333
3338
|
e.eventSlug,
|
|
3334
3339
|
W,
|
|
3335
3340
|
e.timeoutMs
|
|
3336
|
-
]), K = l(() => new
|
|
3341
|
+
]), K = l(() => new _(e.eventSlug), [e.eventSlug]), De = u(e.displayMode), q = u(null), [J, Y] = d(null);
|
|
3337
3342
|
s(() => {
|
|
3338
3343
|
K.getXrefId();
|
|
3339
3344
|
}, [K]), s(() => {
|
|
@@ -3353,22 +3358,22 @@ var ft = (e) => {
|
|
|
3353
3358
|
H
|
|
3354
3359
|
]);
|
|
3355
3360
|
let ke = l(() => {
|
|
3356
|
-
if (!J || !
|
|
3361
|
+
if (!J || !w || String(J.registration_type) !== String(w.id)) return {};
|
|
3357
3362
|
let e = { ...J.custom_data || {} };
|
|
3358
3363
|
if (J.salutation && (e.salutation = J.salutation, e.title = J.salutation), J.name) {
|
|
3359
3364
|
e.name = J.name, e.full_name = J.name, e.fullName = J.name;
|
|
3360
3365
|
let t = J.name.trim().split(/\s+/);
|
|
3361
3366
|
t.length > 0 && !e.first_name && (e.first_name = t[0]), t.length > 1 && !e.last_name && (e.last_name = t.slice(1).join(" "));
|
|
3362
3367
|
}
|
|
3363
|
-
return J.email && (e.email = J.email), J.phone && (e.phone = J.phone, e.mobile = J.phone, e.phoneNumber = J.phone), ((H ?
|
|
3364
|
-
let n =
|
|
3368
|
+
return J.email && (e.email = J.email), J.phone && (e.phone = J.phone, e.mobile = J.phone, e.phoneNumber = J.phone), ((H ? E?.fields : w?.form_schema?.fields) || []).forEach((t) => {
|
|
3369
|
+
let n = ot(t.id, t.label);
|
|
3365
3370
|
e[t.id] === void 0 && e[n] !== void 0 && (e[t.id] = e[n]);
|
|
3366
3371
|
}), e;
|
|
3367
3372
|
}, [
|
|
3368
3373
|
J,
|
|
3369
|
-
|
|
3374
|
+
w,
|
|
3370
3375
|
H,
|
|
3371
|
-
|
|
3376
|
+
E
|
|
3372
3377
|
]);
|
|
3373
3378
|
s(() => () => {
|
|
3374
3379
|
q.current && clearTimeout(q.current);
|
|
@@ -3390,11 +3395,11 @@ var ft = (e) => {
|
|
|
3390
3395
|
"phoneNumber",
|
|
3391
3396
|
"selected_items",
|
|
3392
3397
|
"custom_data"
|
|
3393
|
-
]), r = (H ?
|
|
3398
|
+
]), r = (H ? E?.fields : w?.form_schema?.fields) || [], i = /* @__PURE__ */ new Map();
|
|
3394
3399
|
r.forEach((e) => i.set(e.id, e));
|
|
3395
3400
|
let a = { ...t.custom_data || {} };
|
|
3396
3401
|
for (let [e, r] of Object.entries(t)) if (!n.has(e)) {
|
|
3397
|
-
let t =
|
|
3402
|
+
let t = ot(e, i.get(e)?.label);
|
|
3398
3403
|
a[t] = r;
|
|
3399
3404
|
}
|
|
3400
3405
|
let o = {
|
|
@@ -3403,7 +3408,7 @@ var ft = (e) => {
|
|
|
3403
3408
|
name: t.name || t.fullName || t.full_name || [t.firstName, t.lastName].filter(Boolean).join(" ") || "",
|
|
3404
3409
|
email: t.email || "",
|
|
3405
3410
|
phone: t.phone || t.mobile || t.phoneNumber || "",
|
|
3406
|
-
registration_type:
|
|
3411
|
+
registration_type: w?.id,
|
|
3407
3412
|
custom_data: a,
|
|
3408
3413
|
selected_items: t.selected_items || []
|
|
3409
3414
|
};
|
|
@@ -3416,29 +3421,29 @@ var ft = (e) => {
|
|
|
3416
3421
|
}, [
|
|
3417
3422
|
K,
|
|
3418
3423
|
G,
|
|
3419
|
-
|
|
3424
|
+
w,
|
|
3420
3425
|
e,
|
|
3421
3426
|
W,
|
|
3422
3427
|
H,
|
|
3423
|
-
|
|
3428
|
+
E
|
|
3424
3429
|
]);
|
|
3425
3430
|
s(() => {
|
|
3426
|
-
De.current !== e.displayMode && (De.current = e.displayMode, h(e.displayMode !== "popup"),
|
|
3431
|
+
De.current !== e.displayMode && (De.current = e.displayMode, h(e.displayMode !== "popup"), y(!1));
|
|
3427
3432
|
}, [e.displayMode]), s(() => {
|
|
3428
3433
|
(H ? G.getReviewFormSchema() : G.getFormSchema()).then((t) => {
|
|
3429
|
-
|
|
3434
|
+
x(t?.data?.types || []), H && te({ fields: t?.data?.fields || [] }), (t?.data?.event_name || t?.data?.title || t?.data?.name) && C(t.data.event_name || t.data.title || t.data.name), e.onEvent?.("form_loaded", t?.data);
|
|
3430
3435
|
}).catch((t) => {
|
|
3431
|
-
W.error("Failed to load schema", t),
|
|
3436
|
+
W.error("Failed to load schema", t), x([]);
|
|
3432
3437
|
let n = {
|
|
3433
3438
|
type: "schema_load",
|
|
3434
3439
|
message: t?.message || "Failed to load event schema",
|
|
3435
3440
|
error: t
|
|
3436
3441
|
};
|
|
3437
3442
|
e.onEvent?.("error", n), e.onError?.(n);
|
|
3438
|
-
}).finally(() =>
|
|
3443
|
+
}).finally(() => re(!1));
|
|
3439
3444
|
}, [G, H]);
|
|
3440
3445
|
let je = async (t) => {
|
|
3441
|
-
q.current && clearTimeout(q.current),
|
|
3446
|
+
q.current && clearTimeout(q.current), re(!0), ce(null);
|
|
3442
3447
|
let n = K.getXrefId(), r = /* @__PURE__ */ new Set([
|
|
3443
3448
|
"salutation",
|
|
3444
3449
|
"title",
|
|
@@ -3455,11 +3460,11 @@ var ft = (e) => {
|
|
|
3455
3460
|
"selected_items",
|
|
3456
3461
|
"custom_data",
|
|
3457
3462
|
"xref_id"
|
|
3458
|
-
]), i = (H ?
|
|
3463
|
+
]), i = (H ? E?.fields : w?.form_schema?.fields) || [], a = /* @__PURE__ */ new Map();
|
|
3459
3464
|
i.forEach((e) => a.set(e.id, e));
|
|
3460
3465
|
let o = { ...t.custom_data || {} };
|
|
3461
3466
|
for (let [e, n] of Object.entries(t)) if (!r.has(e)) {
|
|
3462
|
-
let t =
|
|
3467
|
+
let t = ot(e, a.get(e)?.label);
|
|
3463
3468
|
o[t] = n;
|
|
3464
3469
|
}
|
|
3465
3470
|
let s = {
|
|
@@ -3468,7 +3473,7 @@ var ft = (e) => {
|
|
|
3468
3473
|
name: t.name || t.fullName || t.full_name || [t.firstName, t.lastName].filter(Boolean).join(" ") || "",
|
|
3469
3474
|
email: t.email || "",
|
|
3470
3475
|
phone: t.phone || t.mobile || t.phoneNumber || "",
|
|
3471
|
-
registration_type:
|
|
3476
|
+
registration_type: w.id,
|
|
3472
3477
|
custom_data: o,
|
|
3473
3478
|
selected_items: t.selected_items || []
|
|
3474
3479
|
};
|
|
@@ -3476,11 +3481,11 @@ var ft = (e) => {
|
|
|
3476
3481
|
let t = H ? await G.submitReview(s) : await G.submitRegistration(s);
|
|
3477
3482
|
K.updateXrefId(), Y(null);
|
|
3478
3483
|
let n = H ? null : t?.data?.payment_url || t?.payment_url || null;
|
|
3479
|
-
|
|
3484
|
+
de(n);
|
|
3480
3485
|
let r = t?.data?.submission_number || t?.submission_number || t?.data?.registration_number || t?.registration_number || t?.data?.registration?.registration_number || t?.registration?.registration_number || null;
|
|
3481
|
-
|
|
3486
|
+
pe(r ? String(r) : null), M(!1), n && typeof n == "string" && n.trim() !== "" && window.open(n, "_blank", "noopener,noreferrer"), j(!0);
|
|
3482
3487
|
let i = {
|
|
3483
|
-
registrationType:
|
|
3488
|
+
registrationType: w.id,
|
|
3484
3489
|
payload: s,
|
|
3485
3490
|
response: t,
|
|
3486
3491
|
paymentUrl: n
|
|
@@ -3493,12 +3498,12 @@ var ft = (e) => {
|
|
|
3493
3498
|
message: n,
|
|
3494
3499
|
error: t
|
|
3495
3500
|
};
|
|
3496
|
-
e.onEvent?.("error", r), e.onError?.(r),
|
|
3501
|
+
e.onEvent?.("error", r), e.onError?.(r), ce(n);
|
|
3497
3502
|
} finally {
|
|
3498
|
-
|
|
3503
|
+
re(!1);
|
|
3499
3504
|
}
|
|
3500
3505
|
}, Me = () => {
|
|
3501
|
-
if (
|
|
3506
|
+
if (j(!1), ce(null), de(null), pe(null), M(!1), T(null), Y(null), typeof window < "u" && new URLSearchParams(window.location.search).has("rn")) {
|
|
3502
3507
|
let e = new URL(window.location.href);
|
|
3503
3508
|
e.searchParams.delete("rn"), window.history.replaceState(window.history.state, "", e.toString());
|
|
3504
3509
|
}
|
|
@@ -3509,9 +3514,9 @@ var ft = (e) => {
|
|
|
3509
3514
|
startX: e.clientX,
|
|
3510
3515
|
startY: e.clientY,
|
|
3511
3516
|
rect: t,
|
|
3512
|
-
corner:
|
|
3517
|
+
corner: he
|
|
3513
3518
|
}, z.current = !1, be(!0);
|
|
3514
|
-
}, [
|
|
3519
|
+
}, [he]);
|
|
3515
3520
|
s(() => {
|
|
3516
3521
|
if (!L) return;
|
|
3517
3522
|
let t = (e) => {
|
|
@@ -3533,11 +3538,11 @@ var ft = (e) => {
|
|
|
3533
3538
|
I(null);
|
|
3534
3539
|
return;
|
|
3535
3540
|
}
|
|
3536
|
-
let c = n.left + a, l = n.top + o, u = c + n.width / 2, d = l + n.height / 2, f = typeof window < "u" ? window.innerWidth : 1024, p = typeof window < "u" ? window.innerHeight : 768, m = u >= f / 2, h = d >= p / 2, g = h ? m ? "bottom-right" : "bottom-left" : m ? "top-right" : "top-left",
|
|
3541
|
+
let c = n.left + a, l = n.top + o, u = c + n.width / 2, d = l + n.height / 2, f = typeof window < "u" ? window.innerWidth : 1024, p = typeof window < "u" ? window.innerHeight : 768, m = u >= f / 2, h = d >= p / 2, g = h ? m ? "bottom-right" : "bottom-left" : m ? "top-right" : "top-left", ee = m ? f - n.width - 20 : 20, _ = h ? p - n.height - 20 : 20, v = c - ee, y = l - _;
|
|
3537
3542
|
ye({
|
|
3538
|
-
transform: `translate3d(${
|
|
3543
|
+
transform: `translate3d(${v}px, ${y}px, 0)`,
|
|
3539
3544
|
transition: "none"
|
|
3540
|
-
}), I(null),
|
|
3545
|
+
}), I(null), N(g), e.onEvent?.("position_changed", { position: g }), requestAnimationFrame(() => {
|
|
3541
3546
|
requestAnimationFrame(() => {
|
|
3542
3547
|
ye({
|
|
3543
3548
|
transform: "translate3d(0, 0, 0)",
|
|
@@ -3553,16 +3558,16 @@ var ft = (e) => {
|
|
|
3553
3558
|
};
|
|
3554
3559
|
}, [L, e]);
|
|
3555
3560
|
let Pe = async () => {
|
|
3556
|
-
if (
|
|
3561
|
+
if (fe) {
|
|
3557
3562
|
try {
|
|
3558
|
-
await navigator.clipboard.writeText(
|
|
3563
|
+
await navigator.clipboard.writeText(fe);
|
|
3559
3564
|
} catch {
|
|
3560
3565
|
let e = document.createElement("textarea");
|
|
3561
|
-
e.value =
|
|
3566
|
+
e.value = fe, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
3562
3567
|
}
|
|
3563
|
-
|
|
3568
|
+
M(!0), setTimeout(() => M(!1), 2e3);
|
|
3564
3569
|
}
|
|
3565
|
-
}, X = () =>
|
|
3570
|
+
}, X = () => fe ? /* @__PURE__ */ m("div", {
|
|
3566
3571
|
className: "w-full max-w-xs mb-6",
|
|
3567
3572
|
children: [/* @__PURE__ */ p("p", {
|
|
3568
3573
|
className: `text-2xs font-bold uppercase tracking-wider mb-1.5 ${B ? "text-zinc-400" : "text-gray-500"}`,
|
|
@@ -3572,7 +3577,7 @@ var ft = (e) => {
|
|
|
3572
3577
|
className: `flex items-center gap-2 pl-4 pr-1.5 py-1.5 rounded-xl border ${B ? "bg-zinc-900 border-zinc-700" : "bg-gray-50 border-gray-200"}`,
|
|
3573
3578
|
children: [/* @__PURE__ */ p("span", {
|
|
3574
3579
|
className: "flex-1 text-left font-mono font-bold text-base select-all break-all",
|
|
3575
|
-
children:
|
|
3580
|
+
children: fe
|
|
3576
3581
|
}), /* @__PURE__ */ m("button", {
|
|
3577
3582
|
part: "copy-button",
|
|
3578
3583
|
type: "button",
|
|
@@ -3580,15 +3585,15 @@ var ft = (e) => {
|
|
|
3580
3585
|
className: "flex items-center gap-1 px-3 py-1.5 rounded-lg text-xs font-bold text-white shrink-0 cursor-pointer hover:opacity-90 transition-opacity",
|
|
3581
3586
|
style: { backgroundColor: V },
|
|
3582
3587
|
title: "Copy registration number",
|
|
3583
|
-
children: [p(
|
|
3588
|
+
children: [p(me ? ue : _e, { size: 13 }), /* @__PURE__ */ p("span", { children: me ? "Copied" : "Copy" })]
|
|
3584
3589
|
})]
|
|
3585
3590
|
})]
|
|
3586
3591
|
}) : null;
|
|
3587
3592
|
if (!c && e.displayMode === "popup") {
|
|
3588
3593
|
let e = {
|
|
3589
|
-
...ft(
|
|
3590
|
-
...
|
|
3591
|
-
transform: `translate3d(${
|
|
3594
|
+
...ft(he),
|
|
3595
|
+
...P ? {
|
|
3596
|
+
transform: `translate3d(${P.x}px, ${P.y}px, 0) scale(1.05)`,
|
|
3592
3597
|
transition: "none",
|
|
3593
3598
|
userSelect: "none"
|
|
3594
3599
|
} : ve ? {
|
|
@@ -3600,7 +3605,7 @@ var ft = (e) => {
|
|
|
3600
3605
|
ref: Te,
|
|
3601
3606
|
onMouseEnter: () => Ce(!0),
|
|
3602
3607
|
onMouseLeave: () => Ce(!1),
|
|
3603
|
-
className: `fixed ${pt(
|
|
3608
|
+
className: `fixed ${pt(he)} z-50 select-none group`,
|
|
3604
3609
|
style: e,
|
|
3605
3610
|
children: [/* @__PURE__ */ p("div", {
|
|
3606
3611
|
onPointerDown: Ne,
|
|
@@ -3626,9 +3631,9 @@ var ft = (e) => {
|
|
|
3626
3631
|
})]
|
|
3627
3632
|
});
|
|
3628
3633
|
}
|
|
3629
|
-
let Ie = e.displayMode === "fullscreen" || e.displayMode === "popup" &&
|
|
3630
|
-
Ve["--vx-accent"] = V, Ie ? ze += "fixed inset-0 z-[9999] rounded-none overflow-hidden " : e.displayMode === "popup" ? (ze += `fixed ${pt(
|
|
3631
|
-
let He = H ? "Abstract Submission" : t === "registration" ?
|
|
3634
|
+
let Ie = e.displayMode === "fullscreen" || e.displayMode === "popup" && v, Z = e.displayMode === "widget", Q = ut(Ee, B, Z), ze = `${B ? "bg-zinc-950 text-white" : "bg-slate-50 text-slate-900"} flex flex-col transition-all duration-300 ease-in-out `, Be = e.theme?.fontFamily, Ve = !Be || Be === "inherit" ? {} : { fontFamily: `var(--vx-font-family, ${Be})` };
|
|
3635
|
+
Ve["--vx-accent"] = V, Ie ? ze += "fixed inset-0 z-[9999] rounded-none overflow-hidden " : e.displayMode === "popup" ? (ze += `fixed ${pt(he)} z-50 rounded-xl shadow-2xl border ${B ? "border-zinc-800" : "border-gray-200"} overflow-hidden `, Ve.width = e.width || "400px", Ve.height = e.height || "700px", Ve.maxHeight = "90vh", Ve.maxWidth = "calc(100vw - 32px)", Object.assign(Ve, ft(he))) : (ze += "relative w-full min-h-screen border-none shadow-none rounded-none ", Ve.width = "100%", Ve.minHeight = "100vh");
|
|
3636
|
+
let He = H ? "Abstract Submission" : t === "registration" ? S || "Registration" : "Attendee Portal", Ue = O.trim().toLowerCase(), We = Ue ? b.filter((e) => [
|
|
3632
3637
|
e.type,
|
|
3633
3638
|
e.name,
|
|
3634
3639
|
e.category,
|
|
@@ -3637,9 +3642,9 @@ var ft = (e) => {
|
|
|
3637
3642
|
e.price,
|
|
3638
3643
|
e.tax_info,
|
|
3639
3644
|
...Array.isArray(e.items) ? e.items.map((e) => e?.name).filter(Boolean) : []
|
|
3640
|
-
].filter((e) => e != null && e !== "").join(" ").toLowerCase().includes(Ue)) :
|
|
3641
|
-
if (
|
|
3642
|
-
let e =
|
|
3645
|
+
].filter((e) => e != null && e !== "").join(" ").toLowerCase().includes(Ue)) : b, Ke = `max-w-2xl mx-auto w-full rounded-3xl border overflow-hidden ${B ? "bg-zinc-900 border-zinc-800 shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]" : "bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.16)]"}`, Je = () => {
|
|
3646
|
+
if (b.length === 0) return null;
|
|
3647
|
+
let e = b.find((e) => String(e.id) === ie) || (b.length === 1 ? b[0] : null), t = e ? e.type || e.name || e.label : "";
|
|
3643
3648
|
return /* @__PURE__ */ m("div", {
|
|
3644
3649
|
part: "category-panel",
|
|
3645
3650
|
className: Ke,
|
|
@@ -3667,14 +3672,14 @@ var ft = (e) => {
|
|
|
3667
3672
|
role: "radiogroup",
|
|
3668
3673
|
"aria-label": "Submission category",
|
|
3669
3674
|
className: `border-t divide-y ${B ? "border-zinc-800 divide-zinc-800" : "border-slate-100 divide-slate-100"}`,
|
|
3670
|
-
children:
|
|
3675
|
+
children: b.map((t) => {
|
|
3671
3676
|
let n = t.type || t.name || t.label, r = !!e && String(e.id) === String(t.id);
|
|
3672
3677
|
return /* @__PURE__ */ m("button", {
|
|
3673
3678
|
part: r ? "category category-active" : "category",
|
|
3674
3679
|
type: "button",
|
|
3675
3680
|
role: "radio",
|
|
3676
3681
|
"aria-checked": r,
|
|
3677
|
-
onClick: () =>
|
|
3682
|
+
onClick: () => A(String(t.id)),
|
|
3678
3683
|
className: `group w-full flex items-center gap-4 px-5 sm:px-7 py-4 text-left transition-colors cursor-pointer outline-none focus-visible:bg-[color-mix(in_srgb,var(--vx-accent)_8%,transparent)] ${r ? "" : B ? "hover:bg-zinc-800/60" : "hover:bg-slate-50"}`,
|
|
3679
3684
|
style: r ? { backgroundColor: `color-mix(in srgb, ${V} ${B ? 14 : 6}%, transparent)` } : void 0,
|
|
3680
3685
|
children: [
|
|
@@ -3701,7 +3706,7 @@ var ft = (e) => {
|
|
|
3701
3706
|
className: `hidden sm:inline-block text-[10px] font-semibold uppercase tracking-wider px-2.5 py-1 rounded-full shrink-0 ${B ? "bg-zinc-800 text-zinc-300" : "bg-slate-100 text-slate-600"}`,
|
|
3702
3707
|
children: t.category
|
|
3703
3708
|
}),
|
|
3704
|
-
/* @__PURE__ */ p(
|
|
3709
|
+
/* @__PURE__ */ p(ae, {
|
|
3705
3710
|
size: 16,
|
|
3706
3711
|
className: `shrink-0 transition-all ${r ? "translate-x-0.5" : `${B ? "text-zinc-600" : "text-slate-300"} group-hover:translate-x-0.5`}`,
|
|
3707
3712
|
style: r ? { color: V } : void 0
|
|
@@ -3722,13 +3727,13 @@ var ft = (e) => {
|
|
|
3722
3727
|
part: "button button-primary continue-button",
|
|
3723
3728
|
type: "button",
|
|
3724
3729
|
disabled: !e,
|
|
3725
|
-
onClick: () => e &&
|
|
3730
|
+
onClick: () => e && T(e),
|
|
3726
3731
|
style: {
|
|
3727
3732
|
background: `linear-gradient(135deg, ${V}, color-mix(in srgb, ${V} 80%, black))`,
|
|
3728
3733
|
boxShadow: e ? `0 10px 24px -12px color-mix(in srgb, ${V} 70%, transparent)` : void 0
|
|
3729
3734
|
},
|
|
3730
3735
|
className: "group shrink-0 inline-flex items-center justify-center gap-2 h-11 px-5 rounded-xl text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.99] cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:brightness-100",
|
|
3731
|
-
children: [/* @__PURE__ */ p("span", { children: "Continue to submission" }), /* @__PURE__ */ p(
|
|
3736
|
+
children: [/* @__PURE__ */ p("span", { children: "Continue to submission" }), /* @__PURE__ */ p(ae, {
|
|
3732
3737
|
size: 16,
|
|
3733
3738
|
className: "transition-transform group-hover:translate-x-0.5"
|
|
3734
3739
|
})]
|
|
@@ -3867,7 +3872,7 @@ var ft = (e) => {
|
|
|
3867
3872
|
]
|
|
3868
3873
|
});
|
|
3869
3874
|
}, Qe = () => {
|
|
3870
|
-
let e = !!
|
|
3875
|
+
let e = !!w, t = H ? we : Ye, n = e ? H ? "Submitting your abstract" : "Submitting your registration" : "Loading your registration", r = w ? w.type || w.name || w.label : "", i = !H && w && w.price !== void 0 && w.price !== null && w.price !== "" ? Number(w.price) > 0 ? [w.currency, Number(w.price).toLocaleString()].filter(Boolean).join(" ") : "Free" : "";
|
|
3871
3876
|
return /* @__PURE__ */ p("div", {
|
|
3872
3877
|
part: "screen screen-submitting",
|
|
3873
3878
|
role: "status",
|
|
@@ -3951,7 +3956,7 @@ var ft = (e) => {
|
|
|
3951
3956
|
onScroll: (e) => {
|
|
3952
3957
|
Z || (e.currentTarget.scrollTop !== 0 && (e.currentTarget.scrollTop = 0), e.currentTarget.scrollLeft !== 0 && (e.currentTarget.scrollLeft = 0));
|
|
3953
3958
|
},
|
|
3954
|
-
children:
|
|
3959
|
+
children: D && !w && !oe ? Ze() : D ? Qe() : oe ? le ? /* @__PURE__ */ m("div", {
|
|
3955
3960
|
part: "screen screen-payment",
|
|
3956
3961
|
className: `flex flex-col h-full relative overflow-y-auto ${B ? "bg-black text-white" : "bg-white text-gray-900"}`,
|
|
3957
3962
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -3972,10 +3977,10 @@ var ft = (e) => {
|
|
|
3972
3977
|
})] }), /* @__PURE__ */ p("div", {
|
|
3973
3978
|
className: "flex items-center gap-3",
|
|
3974
3979
|
children: e.displayMode === "popup" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
|
|
3975
|
-
onClick: () =>
|
|
3976
|
-
title:
|
|
3980
|
+
onClick: () => y(!v),
|
|
3981
|
+
title: v ? "Minimize" : "Expand",
|
|
3977
3982
|
className: "opacity-80 hover:opacity-100 transition-opacity cursor-pointer",
|
|
3978
|
-
children: p(
|
|
3983
|
+
children: p(v ? Le : Fe, { size: 18 })
|
|
3979
3984
|
}), /* @__PURE__ */ p("button", {
|
|
3980
3985
|
onClick: () => h(!1),
|
|
3981
3986
|
className: "opacity-80 hover:opacity-100 transition-opacity cursor-pointer",
|
|
@@ -4009,7 +4014,7 @@ var ft = (e) => {
|
|
|
4009
4014
|
className: "w-full max-w-xs space-y-3",
|
|
4010
4015
|
children: [/* @__PURE__ */ m("a", {
|
|
4011
4016
|
part: "button button-primary",
|
|
4012
|
-
href:
|
|
4017
|
+
href: le,
|
|
4013
4018
|
target: "_blank",
|
|
4014
4019
|
rel: "noopener noreferrer",
|
|
4015
4020
|
className: "flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg transition-opacity hover:opacity-90 text-white shadow-md w-full",
|
|
@@ -4064,7 +4069,7 @@ var ft = (e) => {
|
|
|
4064
4069
|
children: "Back"
|
|
4065
4070
|
})
|
|
4066
4071
|
]
|
|
4067
|
-
}) :
|
|
4072
|
+
}) : se ? /* @__PURE__ */ m("div", {
|
|
4068
4073
|
part: "screen screen-error",
|
|
4069
4074
|
className: `flex flex-col h-full relative overflow-y-auto ${B ? "bg-black text-white" : "bg-white text-gray-900"}`,
|
|
4070
4075
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -4102,20 +4107,20 @@ var ft = (e) => {
|
|
|
4102
4107
|
/* @__PURE__ */ p("p", {
|
|
4103
4108
|
part: "screen-message",
|
|
4104
4109
|
className: `text-sm mb-6 max-w-xs leading-relaxed ${B ? "text-zinc-300" : "text-gray-600"}`,
|
|
4105
|
-
children:
|
|
4110
|
+
children: se
|
|
4106
4111
|
}),
|
|
4107
4112
|
/* @__PURE__ */ m("div", {
|
|
4108
4113
|
className: "w-full max-w-xs space-y-3",
|
|
4109
4114
|
children: [/* @__PURE__ */ p("button", {
|
|
4110
4115
|
part: "button button-primary",
|
|
4111
|
-
onClick: () =>
|
|
4116
|
+
onClick: () => ce(null),
|
|
4112
4117
|
style: { backgroundColor: V },
|
|
4113
4118
|
className: "flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg transition-opacity hover:opacity-90 text-white shadow-md w-full cursor-pointer",
|
|
4114
4119
|
children: /* @__PURE__ */ p("span", { children: "Try Again" })
|
|
4115
4120
|
}), /* @__PURE__ */ p("button", {
|
|
4116
4121
|
part: "button button-link",
|
|
4117
4122
|
onClick: () => {
|
|
4118
|
-
|
|
4123
|
+
ce(null), T(null);
|
|
4119
4124
|
},
|
|
4120
4125
|
className: `w-full py-2.5 px-4 text-sm font-semibold transition-colors cursor-pointer ${B ? "text-zinc-400 hover:text-white" : "text-gray-500 hover:text-gray-900"}`,
|
|
4121
4126
|
children: H ? "Choose Another Category" : "Choose Another Ticket"
|
|
@@ -4123,14 +4128,14 @@ var ft = (e) => {
|
|
|
4123
4128
|
})
|
|
4124
4129
|
]
|
|
4125
4130
|
})]
|
|
4126
|
-
}) :
|
|
4127
|
-
schema: H ?
|
|
4128
|
-
ticketType:
|
|
4131
|
+
}) : w ? /* @__PURE__ */ p(ct, {
|
|
4132
|
+
schema: H ? ne : w.form_schema,
|
|
4133
|
+
ticketType: w,
|
|
4129
4134
|
theme: e.theme,
|
|
4130
4135
|
displayMode: e.displayMode,
|
|
4131
4136
|
backgroundStyle: Q,
|
|
4132
|
-
isExpanded:
|
|
4133
|
-
onToggleExpand: () =>
|
|
4137
|
+
isExpanded: v,
|
|
4138
|
+
onToggleExpand: () => y(!v),
|
|
4134
4139
|
onClose: () => h(!1),
|
|
4135
4140
|
onSubmit: je,
|
|
4136
4141
|
onChange: Ae,
|
|
@@ -4142,7 +4147,7 @@ var ft = (e) => {
|
|
|
4142
4147
|
onEvent: e.onEvent,
|
|
4143
4148
|
showReviewFields: H,
|
|
4144
4149
|
onBack: () => {
|
|
4145
|
-
q.current && clearTimeout(q.current),
|
|
4150
|
+
q.current && clearTimeout(q.current), T(null);
|
|
4146
4151
|
}
|
|
4147
4152
|
}) : /* @__PURE__ */ m("div", {
|
|
4148
4153
|
part: "page",
|
|
@@ -4213,10 +4218,10 @@ var ft = (e) => {
|
|
|
4213
4218
|
}), /* @__PURE__ */ p("div", {
|
|
4214
4219
|
className: "flex items-center gap-3",
|
|
4215
4220
|
children: e.displayMode === "popup" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
|
|
4216
|
-
onClick: () =>
|
|
4217
|
-
title:
|
|
4221
|
+
onClick: () => y(!v),
|
|
4222
|
+
title: v ? "Minimize" : "Expand",
|
|
4218
4223
|
className: "opacity-80 hover:opacity-100 transition-opacity cursor-pointer p-1",
|
|
4219
|
-
children: p(
|
|
4224
|
+
children: p(v ? Le : Fe, { size: 18 })
|
|
4220
4225
|
}), /* @__PURE__ */ p("button", {
|
|
4221
4226
|
onClick: () => h(!1),
|
|
4222
4227
|
className: "opacity-80 hover:opacity-100 transition-opacity cursor-pointer p-1",
|
|
@@ -4237,7 +4242,7 @@ var ft = (e) => {
|
|
|
4237
4242
|
children: [{
|
|
4238
4243
|
key: "registration",
|
|
4239
4244
|
label: "Registration Forms",
|
|
4240
|
-
Icon:
|
|
4245
|
+
Icon: ge
|
|
4241
4246
|
}, {
|
|
4242
4247
|
key: "attendee",
|
|
4243
4248
|
label: "Attendee Login",
|
|
@@ -4280,10 +4285,10 @@ var ft = (e) => {
|
|
|
4280
4285
|
className: `text-base sm:text-lg font-semibold tracking-tight ${B ? "text-white" : "text-slate-900"}`,
|
|
4281
4286
|
style: $,
|
|
4282
4287
|
children: H ? "Choose a submission category" : "Choose your registration type"
|
|
4283
|
-
}),
|
|
4288
|
+
}), b.length > 0 && /* @__PURE__ */ p("p", {
|
|
4284
4289
|
part: "list-count",
|
|
4285
4290
|
className: `text-xs mt-0.5 ${B ? "text-zinc-400" : "text-slate-500"}`,
|
|
4286
|
-
children: Ue ? `${We.length} of ${
|
|
4291
|
+
children: Ue ? `${We.length} of ${b.length} options` : `${b.length} ${b.length === 1 ? "option" : "options"} available`
|
|
4287
4292
|
})]
|
|
4288
4293
|
}), /* @__PURE__ */ m("div", {
|
|
4289
4294
|
className: "relative w-full sm:w-72",
|
|
@@ -4291,8 +4296,8 @@ var ft = (e) => {
|
|
|
4291
4296
|
/* @__PURE__ */ p("input", {
|
|
4292
4297
|
part: "input search-input",
|
|
4293
4298
|
type: "text",
|
|
4294
|
-
value:
|
|
4295
|
-
onChange: (e) =>
|
|
4299
|
+
value: O,
|
|
4300
|
+
onChange: (e) => k(e.target.value),
|
|
4296
4301
|
placeholder: H ? "Search categories…" : "Search registration types…",
|
|
4297
4302
|
"aria-label": "Search",
|
|
4298
4303
|
className: `w-full h-10 pl-9 pr-8 text-sm rounded-xl border transition-all focus:outline-none focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)] ${B ? "bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500" : "bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 shadow-[0_1px_2px_rgba(15,23,42,0.04)]"}`
|
|
@@ -4304,16 +4309,16 @@ var ft = (e) => {
|
|
|
4304
4309
|
className: "block"
|
|
4305
4310
|
})
|
|
4306
4311
|
}),
|
|
4307
|
-
|
|
4312
|
+
O && /* @__PURE__ */ p("button", {
|
|
4308
4313
|
type: "button",
|
|
4309
|
-
onClick: () =>
|
|
4314
|
+
onClick: () => k(""),
|
|
4310
4315
|
"aria-label": "Clear search",
|
|
4311
4316
|
className: `absolute inset-y-0 right-2.5 flex items-center cursor-pointer ${B ? "text-zinc-500 hover:text-zinc-300" : "text-slate-400 hover:text-slate-600"}`,
|
|
4312
4317
|
children: /* @__PURE__ */ p(rt, { size: 14 })
|
|
4313
4318
|
})
|
|
4314
4319
|
]
|
|
4315
4320
|
})]
|
|
4316
|
-
}),
|
|
4321
|
+
}), b.length === 0 ? null : We.length === 0 ? /* @__PURE__ */ m("div", {
|
|
4317
4322
|
part: "empty-state",
|
|
4318
4323
|
className: `flex flex-col items-center text-center py-16 px-6 rounded-3xl border border-dashed ${B ? "bg-zinc-900/60 border-zinc-800 text-zinc-400" : "bg-white/70 border-slate-300 text-slate-500"}`,
|
|
4319
4324
|
children: [
|
|
@@ -4325,7 +4330,7 @@ var ft = (e) => {
|
|
|
4325
4330
|
className: `text-base font-semibold ${B ? "text-white" : "text-slate-900"}`,
|
|
4326
4331
|
children: [
|
|
4327
4332
|
"No matches for “",
|
|
4328
|
-
|
|
4333
|
+
O.trim(),
|
|
4329
4334
|
"”"
|
|
4330
4335
|
]
|
|
4331
4336
|
}),
|
|
@@ -4335,7 +4340,7 @@ var ft = (e) => {
|
|
|
4335
4340
|
}),
|
|
4336
4341
|
/* @__PURE__ */ p("button", {
|
|
4337
4342
|
part: "button button-secondary",
|
|
4338
|
-
onClick: () =>
|
|
4343
|
+
onClick: () => k(""),
|
|
4339
4344
|
className: `mt-5 px-4 py-2 rounded-full text-sm font-semibold border cursor-pointer transition-colors ${B ? "border-zinc-700 text-zinc-200 hover:bg-zinc-800" : "border-slate-200 bg-white text-slate-700 hover:bg-slate-50"}`,
|
|
4340
4345
|
children: "Clear search"
|
|
4341
4346
|
})
|
|
@@ -4350,9 +4355,9 @@ var ft = (e) => {
|
|
|
4350
4355
|
role: "button",
|
|
4351
4356
|
tabIndex: 0,
|
|
4352
4357
|
"aria-label": `Select ${t}`,
|
|
4353
|
-
onClick: () =>
|
|
4358
|
+
onClick: () => T(e),
|
|
4354
4359
|
onKeyDown: (t) => {
|
|
4355
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
4360
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), T(e));
|
|
4356
4361
|
},
|
|
4357
4362
|
className: `group relative flex flex-col rounded-2xl border p-5 sm:p-6 cursor-pointer transition-all duration-300 hover:-translate-y-1 outline-none focus-visible:ring-4 focus-visible:ring-[color-mix(in_srgb,var(--vx-accent)_25%,transparent)] hover:border-[color-mix(in_srgb,var(--vx-accent)_35%,transparent)] ${B ? "bg-zinc-900 border-zinc-800 hover:shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]" : "bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04)] hover:shadow-[0_24px_48px_-24px_color-mix(in_srgb,var(--vx-accent)_45%,transparent)]"}`,
|
|
4358
4363
|
children: [
|
|
@@ -4379,7 +4384,7 @@ var ft = (e) => {
|
|
|
4379
4384
|
}), e.seats_left && /* @__PURE__ */ m("span", {
|
|
4380
4385
|
part: "card-seats",
|
|
4381
4386
|
className: `text-[10px] font-semibold px-2.5 py-1 rounded-full flex items-center gap-1 ${B ? "bg-amber-950/60 text-amber-300" : "bg-amber-50 text-amber-700"}`,
|
|
4382
|
-
children: [/* @__PURE__ */ p(
|
|
4387
|
+
children: [/* @__PURE__ */ p(F, { size: 10 }), /* @__PURE__ */ p("span", { children: e.seats_left })]
|
|
4383
4388
|
})]
|
|
4384
4389
|
})]
|
|
4385
4390
|
}),
|
|
@@ -4405,7 +4410,7 @@ var ft = (e) => {
|
|
|
4405
4410
|
backgroundColor: `color-mix(in srgb, ${V} 14%, transparent)`,
|
|
4406
4411
|
color: V
|
|
4407
4412
|
},
|
|
4408
|
-
children: /* @__PURE__ */ p(
|
|
4413
|
+
children: /* @__PURE__ */ p(ue, {
|
|
4409
4414
|
size: 10,
|
|
4410
4415
|
strokeWidth: 3
|
|
4411
4416
|
})
|
|
@@ -4443,7 +4448,7 @@ var ft = (e) => {
|
|
|
4443
4448
|
style: { backgroundColor: V },
|
|
4444
4449
|
children: [H ? "Submit" : "Register", /* @__PURE__ */ p("span", {
|
|
4445
4450
|
className: "w-7 h-7 rounded-full bg-white/20 flex items-center justify-center transition-transform duration-300 group-hover:translate-x-0.5",
|
|
4446
|
-
children: /* @__PURE__ */ p(
|
|
4451
|
+
children: /* @__PURE__ */ p(ae, { size: 14 })
|
|
4447
4452
|
})]
|
|
4448
4453
|
})]
|
|
4449
4454
|
})
|