@getmicdrop/venue-calendar 4.3.8 → 4.3.9
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/{ArrowLeftIcon-DvIbVly-.js → ArrowLeftIcon-B6RmtBIh.js} +1 -1
- package/dist/{Badge-vsC_L__r.js → Badge-DsuBHDo4.js} +1 -2
- package/dist/{BlockPlaceholder-BMD1gnmE.js → BlockPlaceholder-BvArmbbO.js} +2 -2
- package/dist/{Button-Cm6xkipe.js → Button-CxQO7vwF.js} +88 -63
- package/dist/{Calendar-CPD8dS_i.js → Calendar-Dei3Ahdk.js} +93 -94
- package/dist/{CalendarFoundryView-BY1uJgYA.js → CalendarFoundryView-Df10CTZS.js} +5398 -5389
- package/dist/{CalendarIcon-CCgHZAu4.js → CalendarIcon-DJh5V_U9.js} +1 -1
- package/dist/CartView-DPzvlZwV.js +2245 -0
- package/dist/Checkout-CZGmzTDh.js +983 -0
- package/dist/{Checkout-Ddcw2_8F.js → Checkout-CaamQTXi.js} +368 -368
- package/dist/{CheckoutTimer-CgGCv_jP.js → CheckoutTimer-BubF7ziC.js} +15 -15
- package/dist/{ChevronDownIcon-gELqaIeP.js → ChevronDownIcon-MTzda9yz.js} +1 -1
- package/dist/{ClockIcon-C4MxWMqH.js → ClockIcon-Dit8R1GZ.js} +1 -1
- package/dist/{CloseIcon-D3NjpzeW.js → CloseIcon-XqvbBmiA.js} +1 -1
- package/dist/{CollectionView-C55yLTPR.js → CollectionView-B_rrXaQH.js} +17 -17
- package/dist/CropImage-mVbYhD9Y.js +527 -0
- package/dist/{Event-ClxgC-gP.js → Event-WtVZMQfA.js} +585 -585
- package/dist/{EventPage-ziJYmBIZ.js → EventPage-B14U0-Hm.js} +132 -131
- package/dist/{Heading-D7TEStkb.js → Heading-PKl9dm72.js} +3 -4
- package/dist/{Image-CjM21MQP.js → Image-BWo4QBld.js} +12 -13
- package/dist/{Input-CIRGYHTC.js → Input-Bl1wqeUH.js} +2 -2
- package/dist/{MailIcon-iy7T12Hz.js → MailIcon-DQTusrr4.js} +1 -1
- package/dist/{Modal-wQSo-C1f.js → Modal-CDIhIlu-.js} +2 -2
- package/dist/ModalFooter-DwkZn9ls.js +471 -0
- package/dist/ModalHeader-BSsyLaXY.js +18 -0
- package/dist/{PasswordInput-Cj8i4djG.js → PasswordInput-CnjRiZJ7.js} +2 -2
- package/dist/{ScarcityBadge-DbUVeqpx.js → ScarcityBadge-B4e3Z_Oz.js} +24 -24
- package/dist/{SeriesPage-doki-1XH.js → SeriesPage-DszQMCy9.js} +5 -5
- package/dist/{Spinner-Dua8H4Z1.js → Spinner-BRgBJYJn.js} +2 -2
- package/dist/{Success-DZOYl6St.js → Success-BYVtvNeO.js} +106 -106
- package/dist/{TagIcon-CCyZd0sm.js → TagIcon-BAZxGlbC.js} +1 -1
- package/dist/{ViewTicketsEmbed-CF2Aq-qy.js → ViewTicketsEmbed-BHDAkYuv.js} +97 -97
- package/dist/{WarningCircleIcon-BuVhRrHd.js → WarningCircleIcon-SBK0lpqR.js} +1 -1
- package/dist/{WarningTriIcon-0hefhcdZ.js → WarningTriIcon-Bj3xpe3S.js} +1 -1
- package/dist/{__SKIP_PATHS__-Dyw31EsB.js → __SKIP_PATHS__-B3-kZeYN.js} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +239 -237
- package/dist/{api-QG8CoGcM.js → api-CTiZ6rza.js} +113 -111
- package/dist/{browser-viCaCwoW.js → browser-CziWLQ0z.js} +1 -1
- package/dist/{constants-q-jR2-bz.js → constants-rFRS1lF-.js} +1 -1
- package/dist/{copyToClipboard-C7KGa7gG.js → copyToClipboard-C5D-wCS_.js} +1 -1
- package/dist/{defaultLabels-BdLGAc3u.js → defaultLabels-CpurXn7c.js} +336 -361
- package/dist/{event-CyPf2sZS.js → event-d06xVg2P.js} +1 -1
- package/dist/{event-transform-DQmD2u_S.js → event-transform-BjPTqPq1.js} +23 -23
- package/dist/{eventStatusStream-BFOvtJyO.js → eventStatusStream-BhQUTdOZ.js} +2 -2
- package/dist/{href-CbfSre4l.js → href-DMLDnIDe.js} +3 -3
- package/dist/{i18n-D54CGXK2.js → i18n--3wPB7-n.js} +2 -2
- package/dist/{i18n-CSftOFAS.js → i18n-CASpRf85.js} +135 -135
- package/dist/imageOptimizer-D8g9XVns.js +141 -0
- package/dist/{labels-0dEJldQX.js → labels-IV_I9087.js} +1 -1
- package/dist/modalManager.svelte-Cz_6x1Qd.js +37 -0
- package/dist/{order-totals-Ci_p6SG6.js → order-totals-Buq9HeZa.js} +33 -33
- package/dist/{orders-Bat2EL64.js → orders-BK47iONR.js} +2 -2
- package/dist/{phoneUtils-Cm9iv40N.js → phoneUtils-YjT5IJ25.js} +1 -1
- package/dist/{pixels-Ha6vOCaS.js → pixels-DjK-0XYz.js} +3 -3
- package/dist/{promo-DWzTN7u9.js → promo-DkM9sLly.js} +1 -1
- package/dist/{serverTotals-BBlkfqMf.js → serverTotals-CvJBYArq.js} +1 -1
- package/dist/{shareCopyFeedback.svelte-CW0Yy9Oz.js → shareCopyFeedback.svelte-oxKGmiOe.js} +65 -65
- package/dist/{showcase-state-options-CxRQ-phi.js → showcase-state-options-x_9iSBsd.js} +1 -1
- package/dist/{to-event-card-props-BIl0qQs0.js → to-event-card-props-9y7sVBi_.js} +49 -49
- package/dist/{utils-ChgG4jiQ.js → utils-D80jLqKH.js} +3 -3
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +986 -986
- package/dist/venue-calendar.iife.js +57 -57
- package/dist/venue-calendar.umd.js +52 -52
- package/package.json +2 -2
- package/dist/CartView-DVugxQ3D.js +0 -2245
- package/dist/Checkout-D7KSikhw.js +0 -980
- package/dist/CropImage-CxLcNArr.js +0 -445
- package/dist/ModalFooter-DlRXuHQz.js +0 -301
- package/dist/imageOptimizer-BwLwBMI6.js +0 -112
- package/dist/modalManager.svelte-Dnv5jhxp.js +0 -53
- package/dist/portal-DqxEuE-7.js +0 -166
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/de.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/es.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/id.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/it.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/de.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/es.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/fr.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/id.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/it.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/ja.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/ko.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/nl.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/pl.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/tr.js +0 -0
- /package/dist/locales/{4.3.8 → 4.3.9}/main/zh.js +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./
|
|
1
|
+
import { t as e } from "./ClockIcon-Dit8R1GZ.js";
|
|
2
|
+
import { D as t, b as n, h as r } from "./defaultLabels-CpurXn7c.js";
|
|
3
3
|
import { t as i } from "./Text-CqjLjIF8.js";
|
|
4
|
-
import { t as a } from "./labels-
|
|
4
|
+
import { t as a } from "./labels-IV_I9087.js";
|
|
5
5
|
import "svelte/internal/disclose-version";
|
|
6
6
|
import * as o from "svelte/internal/client";
|
|
7
7
|
//#region src/lib/utils/event-ended.ts
|
|
8
|
-
function s(
|
|
9
|
-
if (!
|
|
10
|
-
let a =
|
|
11
|
-
return a ?
|
|
8
|
+
function s(e, i = t()) {
|
|
9
|
+
if (!e) return !1;
|
|
10
|
+
let a = n(e.endDateTime || e.startDateTime);
|
|
11
|
+
return a ? r(a, i) < 0 : !1;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/lib/public-calendar-flow/CheckoutTimer.svelte
|
|
15
15
|
var c = o.from_html("<div><!> <!></div>");
|
|
16
|
-
function l(
|
|
17
|
-
o.push(
|
|
18
|
-
let
|
|
19
|
-
let e = Math.floor(
|
|
20
|
-
return `${e.toString().padStart(2, "0")}:${
|
|
21
|
-
})()), l = o.derived(() =>
|
|
16
|
+
function l(t, n) {
|
|
17
|
+
o.push(n, !0);
|
|
18
|
+
let r = o.prop(n, "labels", 3, a), s = o.derived(() => (() => {
|
|
19
|
+
let e = Math.floor(n.seconds / 60), t = n.seconds % 60;
|
|
20
|
+
return `${e.toString().padStart(2, "0")}:${t.toString().padStart(2, "0")}`;
|
|
21
|
+
})()), l = o.derived(() => n.isUrgent ? r().completeSoon || "Complete soon" : r().reservationHeld || "Reservation held");
|
|
22
22
|
var u = c();
|
|
23
23
|
let d;
|
|
24
24
|
var f = o.child(u);
|
|
25
|
-
|
|
25
|
+
e(f, {
|
|
26
26
|
size: "16",
|
|
27
27
|
class: "shrink-0"
|
|
28
28
|
});
|
|
@@ -37,7 +37,7 @@ function l(e, t) {
|
|
|
37
37
|
o.template_effect(() => o.set_text(n, `${o.get(l) ?? ""} · ${o.get(s) ?? ""}`)), o.append(e, n);
|
|
38
38
|
},
|
|
39
39
|
$$slots: { default: !0 }
|
|
40
|
-
}), o.reset(u), o.template_effect(() => d = o.set_class(u, 1, "timer-display text-color-secondary svelte-8jbi4g", null, d, { urgent:
|
|
40
|
+
}), o.reset(u), o.template_effect(() => d = o.set_class(u, 1, "timer-display text-color-secondary svelte-8jbi4g", null, d, { urgent: n.isUrgent })), o.append(t, u), o.pop();
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
export { s as n, l as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as e } from "./constants-
|
|
1
|
+
import { J as e } from "./constants-rFRS1lF-.js";
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as t from "svelte/internal/client";
|
|
4
4
|
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/ChevronDownIcon.svelte
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as e } from "./constants-
|
|
1
|
+
import { J as e } from "./constants-rFRS1lF-.js";
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as t from "svelte/internal/client";
|
|
4
4
|
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/ClockIcon.svelte
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as e } from "./constants-
|
|
1
|
+
import { J as e } from "./constants-rFRS1lF-.js";
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as t from "svelte/internal/client";
|
|
4
4
|
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/CalendarOutline.svelte
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { x as e } from "./Button-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as o } from "./__SKIP_PATHS__-
|
|
7
|
-
import { t as s } from "./PasswordInput-
|
|
8
|
-
import { p as c } from "./api-
|
|
1
|
+
import { x as e } from "./Button-CxQO7vwF.js";
|
|
2
|
+
import { t } from "./Event-WtVZMQfA.js";
|
|
3
|
+
import { r as n } from "./shareCopyFeedback.svelte-oxKGmiOe.js";
|
|
4
|
+
import { n as r } from "./ScarcityBadge-B4e3Z_Oz.js";
|
|
5
|
+
import { i, t as a } from "./defaultLabels-CpurXn7c.js";
|
|
6
|
+
import { t as o } from "./__SKIP_PATHS__-B3-kZeYN.js";
|
|
7
|
+
import { t as s } from "./PasswordInput-CnjRiZJ7.js";
|
|
8
|
+
import { p as c } from "./api-CTiZ6rza.js";
|
|
9
9
|
import { i as l, n as u, t as d } from "./gate-password-cache-oOcDm9Ki.js";
|
|
10
10
|
import "svelte/internal/disclose-version";
|
|
11
11
|
import * as f from "svelte/internal/client";
|
|
@@ -16,7 +16,7 @@ function v(v, y) {
|
|
|
16
16
|
f.push(y, !0), e("CollectionView"), f.prop(y, "organizationId", 3, "");
|
|
17
17
|
let b = f.prop(y, "onNavigateToEvent", 3, void 0), x = f.prop(y, "password", 3, void 0);
|
|
18
18
|
f.prop(y, "displayMode", 3, "gallery"), f.prop(y, "showViewSwitcher", 3, !0);
|
|
19
|
-
let S = f.prop(y, "labels", 3,
|
|
19
|
+
let S = f.prop(y, "labels", 3, a), C = f.prop(y, "locale", 3, void 0), w = f.state(null), T = f.state(!0), E = f.state(null), D = f.state(!1), O = f.state(!1), k = f.state(""), A = f.state(!1), j = f.derived(() => f.get(w) ? n(f.get(w)) : null), M = 0;
|
|
20
20
|
async function N(e, t = !1) {
|
|
21
21
|
if (!f.get(D)) return;
|
|
22
22
|
let n = ++M;
|
|
@@ -54,7 +54,7 @@ function v(v, y) {
|
|
|
54
54
|
e.preventDefault(), f.get(k).trim() && N(f.get(k));
|
|
55
55
|
}
|
|
56
56
|
function F(e) {
|
|
57
|
-
b() && e.id ? b()(Number(e.id), e.slug) :
|
|
57
|
+
b() && e.id ? b()(Number(e.id), e.slug) : r(o("/[id]/[slug]", {
|
|
58
58
|
id: String(e.id),
|
|
59
59
|
slug: String(e.slug)
|
|
60
60
|
}));
|
|
@@ -70,9 +70,9 @@ function v(v, y) {
|
|
|
70
70
|
var t = h(), n = f.child(t), r = f.child(n, !0);
|
|
71
71
|
f.reset(n), f.reset(t), f.template_effect(() => f.set_text(r, S().loadingCollection || "Loading collection...")), f.append(e, t);
|
|
72
72
|
}, z = (e) => {
|
|
73
|
-
var
|
|
74
|
-
f.reset(
|
|
75
|
-
var o = f.sibling(
|
|
73
|
+
var t = g(), n = f.child(t), r = f.child(n), a = f.child(r, !0);
|
|
74
|
+
f.reset(r);
|
|
75
|
+
var o = f.sibling(r, 2), c = f.child(o, !0);
|
|
76
76
|
f.reset(o);
|
|
77
77
|
var l = f.sibling(o, 2), u = f.child(l);
|
|
78
78
|
{
|
|
@@ -93,7 +93,7 @@ function v(v, y) {
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
var d = f.sibling(u, 2);
|
|
96
|
-
|
|
96
|
+
i(d, {
|
|
97
97
|
variant: "default",
|
|
98
98
|
type: "submit",
|
|
99
99
|
children: (e, t) => {
|
|
@@ -102,14 +102,14 @@ function v(v, y) {
|
|
|
102
102
|
f.template_effect(() => f.set_text(n, S().viewCollection || "View collection")), f.append(e, n);
|
|
103
103
|
},
|
|
104
104
|
$$slots: { default: !0 }
|
|
105
|
-
}), f.reset(l), f.reset(
|
|
105
|
+
}), f.reset(l), f.reset(n), f.reset(t), f.template_effect(() => {
|
|
106
106
|
f.set_text(a, S().collectionPrivateTitle || "This collection is private"), f.set_text(c, S().collectionPrivateDescription || "Please enter the password to view this collection");
|
|
107
|
-
}), f.event("submit", l, P), f.append(e,
|
|
107
|
+
}), f.event("submit", l, P), f.append(e, t);
|
|
108
108
|
}, B = (e) => {
|
|
109
109
|
var t = _(), n = f.child(t), r = f.child(n);
|
|
110
110
|
f.reset(n), f.reset(t), f.template_effect(() => f.set_text(r, `${(S().errorPrefix || "Error:") ?? ""} ${f.get(E) ?? ""}`)), f.append(e, t);
|
|
111
111
|
}, V = (e) => {
|
|
112
|
-
|
|
112
|
+
t(e, {
|
|
113
113
|
get event() {
|
|
114
114
|
return f.get(j);
|
|
115
115
|
},
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { C as e, T as t, b as n, t as r, v as i, x as a } from "./Button-CxQO7vwF.js";
|
|
2
|
+
import { t as o } from "./CloseOutline-qpVa62mu.js";
|
|
3
|
+
import { a as s, i as c, o as l, r as u, t as d } from "./imageOptimizer-D8g9XVns.js";
|
|
4
|
+
import { a as f, i as p, n as m, o as h, r as g, t as _ } from "./ModalFooter-DwkZn9ls.js";
|
|
5
|
+
import { t as v } from "./ModalHeader-BSsyLaXY.js";
|
|
6
|
+
import "svelte/internal/disclose-version";
|
|
7
|
+
import * as y from "svelte/internal/client";
|
|
8
|
+
import { MediaQuery as b } from "svelte/reactivity";
|
|
9
|
+
import { onDestroy as x, onMount as S } from "svelte";
|
|
10
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/MinusOutline.svelte
|
|
11
|
+
var C = y.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"2\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M19.5 12h-15\"></path></svg>");
|
|
12
|
+
function w(e, t) {
|
|
13
|
+
let n = y.prop(t, "size", 3, "24"), r = y.prop(t, "color", 3, "currentColor"), i = y.prop(t, "class", 3, "");
|
|
14
|
+
var a = C();
|
|
15
|
+
y.template_effect(() => {
|
|
16
|
+
y.set_class(a, 0, y.clsx(i())), y.set_attribute(a, "width", n()), y.set_attribute(a, "height", n()), y.set_attribute(a, "stroke", r());
|
|
17
|
+
}), y.append(e, a);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Modal/ModalClose.svelte
|
|
21
|
+
function T(n, i) {
|
|
22
|
+
y.push(i, !0);
|
|
23
|
+
let a = { close: "Close" }, s = y.prop(i, "disabled", 3, !1), c = y.prop(i, "labels", 19, () => ({})), l = h(), u = y.derived(() => e(a, c()));
|
|
24
|
+
{
|
|
25
|
+
let e = y.derived(() => t(i.class));
|
|
26
|
+
r(n, {
|
|
27
|
+
variant: "icon",
|
|
28
|
+
size: "xs",
|
|
29
|
+
get disabled() {
|
|
30
|
+
return s();
|
|
31
|
+
},
|
|
32
|
+
get class() {
|
|
33
|
+
return y.get(e);
|
|
34
|
+
},
|
|
35
|
+
get "aria-label"() {
|
|
36
|
+
return y.get(u).close;
|
|
37
|
+
},
|
|
38
|
+
onclick: () => l.resetModal(),
|
|
39
|
+
children: (e, t) => {
|
|
40
|
+
o(e, { class: "w-3 h-3" });
|
|
41
|
+
},
|
|
42
|
+
$$slots: { default: !0 }
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
y.pop();
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region node_modules/svelte-easy-crop/dist/helpers.js
|
|
49
|
+
function E(e, t, n) {
|
|
50
|
+
return e >= t * n ? {
|
|
51
|
+
width: t * n,
|
|
52
|
+
height: t
|
|
53
|
+
} : {
|
|
54
|
+
width: e,
|
|
55
|
+
height: e / n
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function D(e, t, n, r) {
|
|
59
|
+
return {
|
|
60
|
+
x: O(e.x, t.width, n.width, r),
|
|
61
|
+
y: O(e.y, t.height, n.height, r)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function O(e, t, n, r) {
|
|
65
|
+
let i = Math.abs(t * r / 2 - n / 2);
|
|
66
|
+
return Math.min(i, Math.max(e, -i));
|
|
67
|
+
}
|
|
68
|
+
function k(e, t) {
|
|
69
|
+
return Math.sqrt((e.y - t.y) ** 2 + (e.x - t.x) ** 2);
|
|
70
|
+
}
|
|
71
|
+
function A(e, t, n, r, i, a = !0) {
|
|
72
|
+
let o = a ? j : M, s = {
|
|
73
|
+
x: o(100, ((t.width - n.width / i) / 2 - e.x / i) / t.width * 100),
|
|
74
|
+
y: o(100, ((t.height - n.height / i) / 2 - e.y / i) / t.height * 100),
|
|
75
|
+
width: o(100, n.width / t.width * 100 / i),
|
|
76
|
+
height: o(100, n.height / t.height * 100 / i)
|
|
77
|
+
}, c = o(t.naturalWidth, s.width * t.naturalWidth / 100, !0), l = o(t.naturalHeight, s.height * t.naturalHeight / 100, !0), u = t.naturalWidth >= t.naturalHeight * r ? {
|
|
78
|
+
width: Math.round(l * r),
|
|
79
|
+
height: l
|
|
80
|
+
} : {
|
|
81
|
+
width: c,
|
|
82
|
+
height: Math.round(c / r)
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
croppedAreaPercentages: s,
|
|
86
|
+
croppedAreaPixels: {
|
|
87
|
+
...u,
|
|
88
|
+
x: o(t.naturalWidth - u.width, s.x * t.naturalWidth / 100, !0),
|
|
89
|
+
y: o(t.naturalHeight - u.height, s.y * t.naturalHeight / 100, !0)
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function j(e, t, n = !1) {
|
|
94
|
+
return Math.min(e, Math.max(0, n ? Math.round(t) : t));
|
|
95
|
+
}
|
|
96
|
+
function M(e, t) {
|
|
97
|
+
return t;
|
|
98
|
+
}
|
|
99
|
+
function N(e, t) {
|
|
100
|
+
return {
|
|
101
|
+
x: (t.x + e.x) / 2,
|
|
102
|
+
y: (t.y + e.y) / 2
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region node_modules/svelte-easy-crop/dist/Cropper.svelte
|
|
107
|
+
var P = y.from_html("<div data-testid=\"cropper\"></div>"), F = y.from_html("<div class=\"svelte-easy-crop-container svelte-1yetlj5\" role=\"button\" data-testid=\"container\"><img class=\"svelte-easy-crop-image svelte-1yetlj5\" alt=\"\"/> <!></div>");
|
|
108
|
+
function I(e, t) {
|
|
109
|
+
y.push(t, !0);
|
|
110
|
+
let n = y.prop(t, "crop", 31, () => y.proxy({
|
|
111
|
+
x: 0,
|
|
112
|
+
y: 0
|
|
113
|
+
})), r = y.prop(t, "zoom", 15, 1), i = y.prop(t, "minZoom", 11, 1), a = y.prop(t, "maxZoom", 11, 3), o = y.prop(t, "aspect", 3, 4 / 3), s = y.prop(t, "cropSize", 3, null), c = y.prop(t, "cropShape", 3, "rect"), l = y.prop(t, "showGrid", 3, !0), u = y.prop(t, "zoomSpeed", 3, 1), d = y.prop(t, "crossOrigin", 3, null), f = y.prop(t, "restrictPosition", 3, !0), p = y.prop(t, "tabindex", 3, void 0), m = y.state(null), h = y.state(y.proxy({
|
|
114
|
+
width: 0,
|
|
115
|
+
height: 0,
|
|
116
|
+
naturalWidth: 0,
|
|
117
|
+
naturalHeight: 0
|
|
118
|
+
})), g = y.state(null), _ = y.state(null), v = y.state(null), b = y.state(y.proxy({
|
|
119
|
+
x: 0,
|
|
120
|
+
y: 0
|
|
121
|
+
})), C = y.state(y.proxy({
|
|
122
|
+
x: 0,
|
|
123
|
+
y: 0
|
|
124
|
+
})), w = y.state(0), T = y.state(null), O = y.state(null);
|
|
125
|
+
S(() => {
|
|
126
|
+
y.get(v) && y.get(v).complete && I(), y.get(g) && (y.get(g).addEventListener("gesturestart", j), y.get(g).addEventListener("gesturechange", j));
|
|
127
|
+
}), x(() => {
|
|
128
|
+
y.get(g) && (y.get(g).removeEventListener("gesturestart", j), y.get(g).removeEventListener("gesturechange", j)), M();
|
|
129
|
+
});
|
|
130
|
+
let j = (e) => e.preventDefault(), M = () => {
|
|
131
|
+
typeof document < "u" && (document.removeEventListener("mousemove", H), document.removeEventListener("mouseup", q), document.removeEventListener("touchmove", W), document.removeEventListener("touchend", q));
|
|
132
|
+
}, I = () => {
|
|
133
|
+
R(), Z();
|
|
134
|
+
}, L = () => s() ? s().width / s().height : o(), R = () => {
|
|
135
|
+
y.get(v) && (y.set(h, {
|
|
136
|
+
width: y.get(v).width,
|
|
137
|
+
height: y.get(v).height,
|
|
138
|
+
naturalWidth: y.get(v).naturalWidth,
|
|
139
|
+
naturalHeight: y.get(v).naturalHeight
|
|
140
|
+
}, !0), y.set(m, s() ? s() : E(y.get(v).width, y.get(v).height, o()), !0)), y.get(g) && y.set(_, y.get(g).getBoundingClientRect(), !0);
|
|
141
|
+
}, z = (e) => ({
|
|
142
|
+
x: Number(e.clientX),
|
|
143
|
+
y: Number(e.clientY)
|
|
144
|
+
}), B = (e) => ({
|
|
145
|
+
x: Number(e.clientX),
|
|
146
|
+
y: Number(e.clientY)
|
|
147
|
+
}), V = (e) => {
|
|
148
|
+
e.preventDefault(), document.addEventListener("mousemove", H), document.addEventListener("mouseup", q), G(z(e));
|
|
149
|
+
}, H = (e) => K(z(e)), U = (e) => {
|
|
150
|
+
e.preventDefault(), document.addEventListener("touchmove", W, { passive: !1 }), document.addEventListener("touchend", q), e.touches.length === 2 ? J(e) : e.touches.length === 1 && G(B(e.touches[0]));
|
|
151
|
+
}, W = (e) => {
|
|
152
|
+
e.preventDefault(), e.touches.length === 2 ? ee(e) : e.touches.length === 1 && K(B(e.touches[0]));
|
|
153
|
+
}, G = ({ x: e, y: t }) => {
|
|
154
|
+
y.set(b, {
|
|
155
|
+
x: e,
|
|
156
|
+
y: t
|
|
157
|
+
}, !0), y.set(C, {
|
|
158
|
+
x: n().x,
|
|
159
|
+
y: n().y
|
|
160
|
+
}, !0);
|
|
161
|
+
}, K = ({ x: e, y: t }) => {
|
|
162
|
+
y.get(T) && window.cancelAnimationFrame(y.get(T)), y.set(T, window.requestAnimationFrame(() => {
|
|
163
|
+
if (e === void 0 || t === void 0 || !y.get(m)) return;
|
|
164
|
+
let i = e - y.get(b).x, a = t - y.get(b).y, o = {
|
|
165
|
+
x: y.get(C).x + i,
|
|
166
|
+
y: y.get(C).y + a
|
|
167
|
+
};
|
|
168
|
+
n(f() ? D(o, y.get(h), y.get(m), r()) : o);
|
|
169
|
+
}), !0);
|
|
170
|
+
}, q = () => {
|
|
171
|
+
M(), Z();
|
|
172
|
+
}, J = (e) => {
|
|
173
|
+
let t = B(e.touches[0]), n = B(e.touches[1]);
|
|
174
|
+
y.set(w, k(t, n), !0), G(N(t, n));
|
|
175
|
+
}, ee = (e) => {
|
|
176
|
+
let t = B(e.touches[0]), n = B(e.touches[1]), i = N(t, n);
|
|
177
|
+
K(i), y.get(O) && window.cancelAnimationFrame(y.get(O)), y.set(O, window.requestAnimationFrame(() => {
|
|
178
|
+
let e = k(t, n), a = r() * (e / y.get(w));
|
|
179
|
+
X(a, i), y.set(w, e, !0);
|
|
180
|
+
}), !0);
|
|
181
|
+
}, Y = (e) => {
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
let t = z(e), n = r() - e.deltaY * u() / 200;
|
|
184
|
+
X(n, t);
|
|
185
|
+
}, te = ({ x: e, y: t }) => {
|
|
186
|
+
if (!y.get(_)) throw Error("The Cropper is not mounted");
|
|
187
|
+
return {
|
|
188
|
+
x: y.get(_).width / 2 - (e - y.get(_).left),
|
|
189
|
+
y: y.get(_).height / 2 - (t - y.get(_).top)
|
|
190
|
+
};
|
|
191
|
+
}, ne = ({ x: e, y: t }) => ({
|
|
192
|
+
x: (e + n().x) / r(),
|
|
193
|
+
y: (t + n().y) / r()
|
|
194
|
+
}), X = (e, t) => {
|
|
195
|
+
if (!y.get(m)) return;
|
|
196
|
+
let o = te(t), s = ne(o);
|
|
197
|
+
r(Math.min(a(), Math.max(e, i())));
|
|
198
|
+
let c = {
|
|
199
|
+
x: s.x * r() - o.x,
|
|
200
|
+
y: s.y * r() - o.y
|
|
201
|
+
};
|
|
202
|
+
n(f() ? D(c, y.get(h), y.get(m), r()) : c);
|
|
203
|
+
}, Z = () => {
|
|
204
|
+
if (!y.get(m) || y.get(m).width === 0) return;
|
|
205
|
+
let { croppedAreaPercentages: e, croppedAreaPixels: i } = A(f() ? D(n(), y.get(h), y.get(m), r()) : n(), y.get(h), y.get(m), L(), r(), f());
|
|
206
|
+
t.oncropcomplete?.({
|
|
207
|
+
percent: e,
|
|
208
|
+
pixels: i
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
y.user_effect(() => {
|
|
212
|
+
y.get(v) && y.set(m, s() ? s() : E(y.get(v).width, y.get(v).height, o()), !0);
|
|
213
|
+
}), y.user_effect(() => {
|
|
214
|
+
r() && Z();
|
|
215
|
+
});
|
|
216
|
+
let re = (e) => {
|
|
217
|
+
y.user_effect(() => (e.addEventListener("touchstart", U), e.addEventListener("mousedown", V), e.addEventListener("wheel", Y, { passive: !1 }), () => {
|
|
218
|
+
e.removeEventListener("touchstart", U), e.removeEventListener("mousedown", V), e.removeEventListener("wheel", Y);
|
|
219
|
+
}));
|
|
220
|
+
};
|
|
221
|
+
var Q = F();
|
|
222
|
+
y.event("resize", y.window, R);
|
|
223
|
+
var $ = y.child(Q);
|
|
224
|
+
y.bind_this($, (e) => y.set(v, e), () => y.get(v));
|
|
225
|
+
var ie = y.sibling($, 2), ae = (e) => {
|
|
226
|
+
var t = P();
|
|
227
|
+
let n;
|
|
228
|
+
y.template_effect(() => {
|
|
229
|
+
n = y.set_class(t, 1, "svelte-easy-crop-area svelte-1yetlj5", null, n, {
|
|
230
|
+
"svelte-easy-crop-round": c() === "round",
|
|
231
|
+
"svelte-easy-crop-grid": l()
|
|
232
|
+
}), y.set_style(t, `width: ${y.get(m).width ?? ""}px; height: ${y.get(m).height ?? ""}px;`);
|
|
233
|
+
}), y.append(e, t);
|
|
234
|
+
};
|
|
235
|
+
y.if(ie, (e) => {
|
|
236
|
+
y.get(m) && e(ae);
|
|
237
|
+
}), y.reset(Q), y.bind_this(Q, (e) => y.set(g, e), () => y.get(g)), y.action(Q, (e) => re?.(e)), y.template_effect(() => {
|
|
238
|
+
y.set_attribute(Q, "tabindex", p()), y.set_attribute($, "src", t.image), y.set_style($, `transform: translate(${n().x ?? ""}px, ${n().y ?? ""}px) scale(${r() ?? ""});`), y.set_attribute($, "crossorigin", d());
|
|
239
|
+
}), y.event("load", $, I), y.replay_events($), y.append(e, Q), y.pop();
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region node_modules/svelte-easy-crop/dist/index.js
|
|
243
|
+
var L = I, R = y.from_html("<div class=\"absolute inset-0 flex items-center justify-center bg-bg-tertiary z-sticky\"><span> </span></div>"), z = y.from_html("<div><!> <!></div> <div class=\"flex-1 space-y-4\"><p> </p> <div class=\"flex items-center justify-center gap-3 max-w-xs mx-auto\"><!> <input type=\"range\" min=\"1\" max=\"3\" step=\"0.1\" class=\"flex-1 w-full h-2 bg-bg-tertiary rounded-lg appearance-none cursor-pointer accent-primary\" data-purpose=\"ui-only\"/> <!></div></div>", 1), B = y.from_html("<!> <!>", 1), V = y.from_html("<div class=\"flex gap-3\"><!></div>"), H = y.from_html("<div class=\"flex flex-col gap-4 landscape:flex-row landscape:items-center landscape:gap-6\"><!></div>"), U = y.from_html("<!> <!> <!>", 1);
|
|
244
|
+
function W(t, o) {
|
|
245
|
+
y.push(o, !0);
|
|
246
|
+
let h = (e, t = y.noop) => {
|
|
247
|
+
var n = z(), a = y.first_child(n), o = y.child(a), s = (e) => {
|
|
248
|
+
var t = R(), n = y.child(t), r = y.child(n, !0);
|
|
249
|
+
y.reset(n), y.reset(t), y.template_effect(() => {
|
|
250
|
+
y.set_class(n, 1, y.clsx(i.smMuted)), y.set_text(r, y.get(N).loading);
|
|
251
|
+
}), y.append(e, t);
|
|
252
|
+
};
|
|
253
|
+
y.if(o, (e) => {
|
|
254
|
+
y.get(W) && e(s);
|
|
255
|
+
}), L(y.sibling(o, 2), {
|
|
256
|
+
get image() {
|
|
257
|
+
return O();
|
|
258
|
+
},
|
|
259
|
+
aspect: 1,
|
|
260
|
+
minZoom: 1,
|
|
261
|
+
maxZoom: 3,
|
|
262
|
+
showGrid: !0,
|
|
263
|
+
oncropcomplete: K,
|
|
264
|
+
get crop() {
|
|
265
|
+
return y.get(P);
|
|
266
|
+
},
|
|
267
|
+
set crop(e) {
|
|
268
|
+
y.set(P, e, !0);
|
|
269
|
+
},
|
|
270
|
+
get zoom() {
|
|
271
|
+
return y.get(F);
|
|
272
|
+
},
|
|
273
|
+
set zoom(e) {
|
|
274
|
+
y.set(F, e, !0);
|
|
275
|
+
}
|
|
276
|
+
}), y.reset(a);
|
|
277
|
+
var c = y.sibling(a, 2), u = y.child(c), d = y.child(u, !0);
|
|
278
|
+
y.reset(u);
|
|
279
|
+
var f = y.sibling(u, 2), p = y.child(f);
|
|
280
|
+
r(p, {
|
|
281
|
+
variant: "outline",
|
|
282
|
+
size: "sm",
|
|
283
|
+
class: "rounded-full! w-9! h-9! p-0! shrink-0",
|
|
284
|
+
onclick: () => y.set(F, Math.max(1, y.get(F) - .2), !0),
|
|
285
|
+
get "aria-label"() {
|
|
286
|
+
return y.get(N).zoomOut;
|
|
287
|
+
},
|
|
288
|
+
children: (e, t) => {
|
|
289
|
+
w(e, { class: "w-4 h-4" });
|
|
290
|
+
},
|
|
291
|
+
$$slots: { default: !0 }
|
|
292
|
+
});
|
|
293
|
+
var m = y.sibling(p, 2);
|
|
294
|
+
y.remove_input_defaults(m);
|
|
295
|
+
var h = y.sibling(m, 2);
|
|
296
|
+
r(h, {
|
|
297
|
+
variant: "outline",
|
|
298
|
+
size: "sm",
|
|
299
|
+
class: "rounded-full! w-9! h-9! p-0! shrink-0",
|
|
300
|
+
onclick: () => y.set(F, Math.min(3, y.get(F) + .2), !0),
|
|
301
|
+
get "aria-label"() {
|
|
302
|
+
return y.get(N).zoomIn;
|
|
303
|
+
},
|
|
304
|
+
children: (e, t) => {
|
|
305
|
+
l(e, { class: "w-4 h-4" });
|
|
306
|
+
},
|
|
307
|
+
$$slots: { default: !0 }
|
|
308
|
+
}), y.reset(f), y.reset(c), y.template_effect(() => {
|
|
309
|
+
y.set_class(a, 1, y.clsx(t())), y.set_class(u, 1, `${i.smMuted} text-center`), y.set_text(d, y.get(N).dragToPosition), y.set_attribute(m, "aria-label", y.get(N).zoomLevel);
|
|
310
|
+
}), y.bind_value(m, () => y.get(F), (e) => y.set(F, e)), y.append(e, n);
|
|
311
|
+
}, x = (e, t = y.noop) => {
|
|
312
|
+
var n = B(), i = y.first_child(n);
|
|
313
|
+
{
|
|
314
|
+
let e = y.derived(() => y.get(G) || k());
|
|
315
|
+
r(i, {
|
|
316
|
+
type: "button",
|
|
317
|
+
variant: "alternative",
|
|
318
|
+
size: "md",
|
|
319
|
+
get class() {
|
|
320
|
+
return t();
|
|
321
|
+
},
|
|
322
|
+
onclick: J,
|
|
323
|
+
get disabled() {
|
|
324
|
+
return y.get(e);
|
|
325
|
+
},
|
|
326
|
+
children: (e, t) => {
|
|
327
|
+
y.next();
|
|
328
|
+
var n = y.text();
|
|
329
|
+
y.template_effect(() => y.set_text(n, y.get(N).cancel)), y.append(e, n);
|
|
330
|
+
},
|
|
331
|
+
$$slots: { default: !0 }
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
var a = y.sibling(i, 2);
|
|
335
|
+
{
|
|
336
|
+
let e = y.derived(() => y.get(W) || y.get(G) || k());
|
|
337
|
+
r(a, {
|
|
338
|
+
type: "button",
|
|
339
|
+
size: "md",
|
|
340
|
+
get class() {
|
|
341
|
+
return t();
|
|
342
|
+
},
|
|
343
|
+
onclick: q,
|
|
344
|
+
get disabled() {
|
|
345
|
+
return y.get(e);
|
|
346
|
+
},
|
|
347
|
+
children: (e, t) => {
|
|
348
|
+
var n = y.comment(), r = y.first_child(n), i = (e) => {
|
|
349
|
+
var t = y.text();
|
|
350
|
+
y.template_effect(() => y.set_text(t, y.get(N).uploading)), y.append(e, t);
|
|
351
|
+
}, a = (e) => {
|
|
352
|
+
var t = y.text();
|
|
353
|
+
y.template_effect(() => y.set_text(t, y.get(N).save)), y.append(e, t);
|
|
354
|
+
};
|
|
355
|
+
y.if(r, (e) => {
|
|
356
|
+
y.get(G) || k() ? e(i) : e(a, -1);
|
|
357
|
+
}), y.append(e, n);
|
|
358
|
+
},
|
|
359
|
+
$$slots: { default: !0 }
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
y.append(e, n);
|
|
363
|
+
}, S = a("CropImage"), C = new b("(max-width: 767px), (max-height: 500px)", !1), E = {
|
|
364
|
+
cropImageTitle: "Crop image",
|
|
365
|
+
loading: "Loading...",
|
|
366
|
+
dragToPosition: "Drag to position. Pinch or use slider to zoom.",
|
|
367
|
+
cancel: "Cancel",
|
|
368
|
+
uploading: "Uploading...",
|
|
369
|
+
save: "Save",
|
|
370
|
+
closeModal: "Close modal",
|
|
371
|
+
zoomOut: "Zoom out",
|
|
372
|
+
zoomIn: "Zoom in",
|
|
373
|
+
zoomLevel: "Zoom level"
|
|
374
|
+
}, D = y.prop(o, "showModal", 15, !1), O = y.prop(o, "imageSrc", 15, ""), k = y.prop(o, "isUploadingImage", 3, !1), A = y.prop(o, "labels", 19, () => ({}));
|
|
375
|
+
o.onSave && !o.onsave && n("CropImage: prop \"onSave\" is deprecated. Use \"onsave\" instead."), o.onCancel && !o.oncancel && n("CropImage: prop \"onCancel\" is deprecated. Use \"oncancel\" instead.");
|
|
376
|
+
let j = y.derived(() => o.onsave ?? o.onSave ?? (() => {})), M = y.derived(() => o.oncancel ?? o.onCancel ?? (() => {})), N = y.derived(() => e(E, A())), P = y.state(y.proxy({
|
|
377
|
+
x: 0,
|
|
378
|
+
y: 0
|
|
379
|
+
})), F = y.state(1), I = y.state(null), W = y.state(!0), G = y.state(!1);
|
|
380
|
+
y.user_effect(() => {
|
|
381
|
+
D() && O() && (y.set(P, {
|
|
382
|
+
x: 0,
|
|
383
|
+
y: 0
|
|
384
|
+
}, !0), y.set(F, 1), y.set(I, null), y.set(W, !0), y.set(G, !1));
|
|
385
|
+
});
|
|
386
|
+
function K(e) {
|
|
387
|
+
y.set(I, e.pixels, !0), y.set(W, !1);
|
|
388
|
+
}
|
|
389
|
+
async function q() {
|
|
390
|
+
if (!(!y.get(I) || y.get(G))) {
|
|
391
|
+
y.set(G, !0);
|
|
392
|
+
try {
|
|
393
|
+
let e = await ee(O(), y.get(I));
|
|
394
|
+
y.get(j)(e);
|
|
395
|
+
} catch (e) {
|
|
396
|
+
y.set(G, !1), S.error("Crop failed:", e);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function J() {
|
|
401
|
+
D(!1), O(""), y.set(P, {
|
|
402
|
+
x: 0,
|
|
403
|
+
y: 0
|
|
404
|
+
}, !0), y.set(F, 1), y.set(I, null), y.set(G, !1), y.get(M)();
|
|
405
|
+
}
|
|
406
|
+
async function ee(e, t) {
|
|
407
|
+
let n = await d(e), r = document.createElement("canvas"), i = r.getContext("2d"), a = 1e3;
|
|
408
|
+
r.width = a, r.height = a, i.imageSmoothingEnabled = !0, i.imageSmoothingQuality = "high", i.drawImage(n, t.x, t.y, t.width, t.height, 0, 0, a, a);
|
|
409
|
+
let o = u(), s = o ? "image/webp" : "image/jpeg", c = o ? .8 : .85, l = o ? "webp" : "jpg";
|
|
410
|
+
return new Promise((e) => {
|
|
411
|
+
r.toBlob((t) => {
|
|
412
|
+
e(new File([t], `cropped-image.${l}`, { type: s }));
|
|
413
|
+
}, s, c);
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
var Y = y.comment(), te = y.first_child(Y), ne = (e) => {
|
|
417
|
+
s(e, {
|
|
418
|
+
get open() {
|
|
419
|
+
return D();
|
|
420
|
+
},
|
|
421
|
+
get title() {
|
|
422
|
+
return y.get(N).cropImageTitle;
|
|
423
|
+
},
|
|
424
|
+
alwaysSheet: !0,
|
|
425
|
+
get "data-testid"() {
|
|
426
|
+
return o["data-testid"];
|
|
427
|
+
},
|
|
428
|
+
onclose: () => {
|
|
429
|
+
!y.get(G) && !k() && J();
|
|
430
|
+
},
|
|
431
|
+
actions: (e) => {
|
|
432
|
+
var t = V(), n = y.child(t);
|
|
433
|
+
x(n, () => "flex-1"), y.reset(t), y.append(e, t);
|
|
434
|
+
},
|
|
435
|
+
children: (e, t) => {
|
|
436
|
+
var n = H(), r = y.child(n);
|
|
437
|
+
h(r, () => "relative w-full max-w-[50dvh] landscape:max-w-[35dvh] shrink-0 mx-auto aspect-square bg-bg-secondary rounded-lg overflow-hidden"), y.reset(n), y.append(e, n);
|
|
438
|
+
},
|
|
439
|
+
$$slots: {
|
|
440
|
+
actions: !0,
|
|
441
|
+
default: !0
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
}, X = (e) => {
|
|
445
|
+
{
|
|
446
|
+
let t = y.derived(() => y.get(G) || k());
|
|
447
|
+
f(e, {
|
|
448
|
+
get open() {
|
|
449
|
+
return D();
|
|
450
|
+
},
|
|
451
|
+
variant: "dialog",
|
|
452
|
+
get persistent() {
|
|
453
|
+
return y.get(t);
|
|
454
|
+
},
|
|
455
|
+
get "data-testid"() {
|
|
456
|
+
return o["data-testid"];
|
|
457
|
+
},
|
|
458
|
+
oncancel: J,
|
|
459
|
+
children: (e, t) => {
|
|
460
|
+
var n = B(), r = y.first_child(n);
|
|
461
|
+
p(r, {});
|
|
462
|
+
var a = y.sibling(r, 2);
|
|
463
|
+
g(a, {
|
|
464
|
+
class: "max-w-lg",
|
|
465
|
+
children: (e, t) => {
|
|
466
|
+
var n = U(), r = y.first_child(n);
|
|
467
|
+
v(r, {
|
|
468
|
+
class: "flex items-center justify-between gap-3 border-b border-border pb-4",
|
|
469
|
+
children: (e, t) => {
|
|
470
|
+
var n = B(), r = y.first_child(n);
|
|
471
|
+
c(r, {
|
|
472
|
+
get class() {
|
|
473
|
+
return i.h2;
|
|
474
|
+
},
|
|
475
|
+
children: (e, t) => {
|
|
476
|
+
y.next();
|
|
477
|
+
var n = y.text();
|
|
478
|
+
y.template_effect(() => y.set_text(n, y.get(N).cropImageTitle)), y.append(e, n);
|
|
479
|
+
},
|
|
480
|
+
$$slots: { default: !0 }
|
|
481
|
+
});
|
|
482
|
+
var a = y.sibling(r, 2);
|
|
483
|
+
{
|
|
484
|
+
let e = y.derived(() => y.get(G) || k()), t = y.derived(() => ({ close: y.get(N).closeModal }));
|
|
485
|
+
T(a, {
|
|
486
|
+
get disabled() {
|
|
487
|
+
return y.get(e);
|
|
488
|
+
},
|
|
489
|
+
get labels() {
|
|
490
|
+
return y.get(t);
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
y.append(e, n);
|
|
495
|
+
},
|
|
496
|
+
$$slots: { default: !0 }
|
|
497
|
+
});
|
|
498
|
+
var a = y.sibling(r, 2);
|
|
499
|
+
m(a, {
|
|
500
|
+
class: "space-y-4",
|
|
501
|
+
children: (e, t) => {
|
|
502
|
+
h(e, () => "relative w-full aspect-square sm:aspect-[4/3] max-h-80 sm:max-h-96 bg-bg-secondary rounded-lg overflow-hidden");
|
|
503
|
+
},
|
|
504
|
+
$$slots: { default: !0 }
|
|
505
|
+
});
|
|
506
|
+
var o = y.sibling(a, 2);
|
|
507
|
+
_(o, {
|
|
508
|
+
class: "border-t border-border pt-4",
|
|
509
|
+
children: (e, t) => {
|
|
510
|
+
x(e, () => "");
|
|
511
|
+
},
|
|
512
|
+
$$slots: { default: !0 }
|
|
513
|
+
}), y.append(e, n);
|
|
514
|
+
},
|
|
515
|
+
$$slots: { default: !0 }
|
|
516
|
+
}), y.append(e, n);
|
|
517
|
+
},
|
|
518
|
+
$$slots: { default: !0 }
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
y.if(te, (e) => {
|
|
523
|
+
C.current ? e(ne) : e(X, -1);
|
|
524
|
+
}), y.append(t, Y), y.pop();
|
|
525
|
+
}
|
|
526
|
+
//#endregion
|
|
527
|
+
export { W as default };
|