@getmicdrop/venue-calendar 4.3.9 → 4.3.11
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-B6RmtBIh.js → ArrowLeftIcon-BYu_Qbkb.js} +1 -1
- package/dist/{Badge-DsuBHDo4.js → Badge-DCHGGod2.js} +8 -9
- package/dist/{BlockPlaceholder-BvArmbbO.js → BlockPlaceholder-BoPMt_9Z.js} +2 -2
- package/dist/{Button-CxQO7vwF.js → Button-vmWb6wKc.js} +52 -23
- package/dist/{Calendar-Dei3Ahdk.js → Calendar-D11ctjrD.js} +286 -260
- package/dist/{CalendarFoundryView-Df10CTZS.js → CalendarFoundryView-DKhpjxnV.js} +4254 -4257
- package/dist/{CalendarIcon-DJh5V_U9.js → CalendarIcon-C8-UVSje.js} +1 -1
- package/dist/CartView-IqOekmQg.js +2245 -0
- package/dist/{Checkout-CZGmzTDh.js → Checkout-ByQsDGg3.js} +339 -317
- package/dist/Checkout-C0lQ0AwV.js +1846 -0
- package/dist/{CheckoutTimer-BubF7ziC.js → CheckoutTimer-B0E9KnHc.js} +3 -3
- package/dist/{ChevronDownIcon-MTzda9yz.js → ChevronDownIcon-C1uJ2yvz.js} +1 -1
- package/dist/{ClockIcon-Dit8R1GZ.js → ClockIcon-Dk9q65sX.js} +1 -1
- package/dist/{CloseIcon-XqvbBmiA.js → CloseIcon-CyR73vpD.js} +1 -1
- package/dist/{CollectionView-B_rrXaQH.js → CollectionView-B-CNyf9Z.js} +8 -8
- package/dist/{CropImage-mVbYhD9Y.js → CropImage-4WcoXkHt.js} +163 -153
- package/dist/{Event-WtVZMQfA.js → Event-B4x0sGkc.js} +1002 -730
- package/dist/{EventPage-B14U0-Hm.js → EventPage--xwhM503.js} +244 -237
- package/dist/{Heading-PKl9dm72.js → Heading-Br1Yqnvg.js} +1 -1
- package/dist/{Image-BWo4QBld.js → Image-M5RaWbKU.js} +1 -1
- package/dist/{Input-Bl1wqeUH.js → Input-Bk8lP6TX.js} +53 -53
- package/dist/{MailIcon-DQTusrr4.js → MailIcon-Ic2SruY-.js} +1 -1
- package/dist/{Modal-CDIhIlu-.js → Modal-CLeZUJ_i.js} +2 -2
- package/dist/{ModalFooter-DwkZn9ls.js → ModalFooter-CSoG_uic.js} +47 -48
- package/dist/{ModalHeader-BSsyLaXY.js → ModalHeader-DpKxDJT_.js} +2 -2
- package/dist/{PasswordInput-CnjRiZJ7.js → PasswordInput-BHj_lokg.js} +2 -2
- package/dist/{shareCopyFeedback.svelte-oxKGmiOe.js → RecommendationsRail-8AVZ0aLE.js} +204 -89
- package/dist/{ScarcityBadge-B4e3Z_Oz.js → ScarcityBadge-DakRfDx4.js} +11 -11
- package/dist/{SeriesPage-DszQMCy9.js → SeriesPage-BaOeDNb6.js} +5 -5
- package/dist/{Spinner-BRgBJYJn.js → Spinner-a1KCKWxZ.js} +2 -2
- package/dist/{Success-BYVtvNeO.js → Success-BtUgc4H7.js} +277 -244
- package/dist/{TagIcon-BAZxGlbC.js → TagIcon-BiYfs6T7.js} +1 -1
- package/dist/{ViewTicketsEmbed-BHDAkYuv.js → ViewTicketsEmbed-Lxg7n02-.js} +30 -30
- package/dist/{WarningCircleIcon-SBK0lpqR.js → WarningCircleIcon-AuYbQdPU.js} +1 -1
- package/dist/{WarningTriIcon-Bj3xpe3S.js → WarningTriIcon-BzI-tSDG.js} +1 -1
- package/dist/{__SKIP_PATHS__-B3-kZeYN.js → __SKIP_PATHS__-B3OPLTzA.js} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +1 -1
- package/dist/{api-CTiZ6rza.js → api-C1M2t6HU.js} +5 -5
- package/dist/{browser-CziWLQ0z.js → browser-DrfMvEfn.js} +7 -7
- package/dist/{labels-IV_I9087.js → constants-YG4UeBdR.js} +17 -4
- package/dist/{copyToClipboard-C5D-wCS_.js → copyToClipboard-3SejVveg.js} +1 -1
- package/dist/{de-K0-gFyNH.js → de-CzupmMIa.js} +14 -1
- package/dist/{defaultLabels-CpurXn7c.js → defaultLabels-CXCsTwix.js} +16 -16
- package/dist/{es-DsZSuXW4.js → es-B-vQxM9Z.js} +14 -1
- package/dist/{event-d06xVg2P.js → event-DAjJ01GM.js} +1 -1
- package/dist/{event-transform-BjPTqPq1.js → event-transform-DNqGTQhp.js} +47 -46
- package/dist/{eventStatusStream-BhQUTdOZ.js → eventStatusStream-CLLN-Rvf.js} +2 -2
- package/dist/{fr-BmHldIKE.js → fr-B2g-kG7i.js} +14 -1
- package/dist/{href-DMLDnIDe.js → href-DuxMJt4c.js} +3 -3
- package/dist/{i18n-CASpRf85.js → i18n-Ct9Bo-Vp.js} +158 -108
- package/dist/{i18n--3wPB7-n.js → i18n-KdVjJUV5.js} +2 -2
- package/dist/{id-CBHA4B6C.js → id-Dgu5-FC6.js} +14 -1
- package/dist/{imageOptimizer-D8g9XVns.js → imageOptimizer-Ba8P7ZEJ.js} +12 -13
- package/dist/{it-CK6ravjO.js → it-C580sMYp.js} +14 -1
- package/dist/{ja-COO0Ibrr.js → ja-DLki4zXU.js} +14 -1
- package/dist/{ko-D8YqNrZs.js → ko-BUcfb1Gi.js} +14 -1
- package/dist/locales/4.3.11/flow/de.js +1 -0
- package/dist/locales/4.3.11/flow/es.js +1 -0
- package/dist/locales/4.3.11/flow/fr.js +1 -0
- package/dist/locales/4.3.11/flow/id.js +1 -0
- package/dist/locales/4.3.11/flow/it.js +1 -0
- package/dist/locales/4.3.11/flow/ja.js +1 -0
- package/dist/locales/4.3.11/flow/ko.js +1 -0
- package/dist/locales/4.3.11/flow/nl.js +1 -0
- package/dist/locales/4.3.11/flow/pl.js +1 -0
- package/dist/locales/4.3.11/flow/pt-br.js +1 -0
- package/dist/locales/4.3.11/flow/tr.js +1 -0
- package/dist/locales/4.3.11/flow/zh.js +1 -0
- package/dist/{nl-Bk3DPD7e.js → nl-CivAQA0D.js} +14 -1
- package/dist/order-totals-DyVkHVqG.js +151 -0
- package/dist/{orders-BK47iONR.js → orders-rH0WZYOW.js} +18 -18
- package/dist/{phoneUtils-YjT5IJ25.js → phoneUtils-BFrVEwkQ.js} +1 -1
- package/dist/{pixels-DjK-0XYz.js → pixels-mdd6C3Bk.js} +3 -3
- package/dist/{pl-CPmO94ic.js → pl-C5VwFH2B.js} +14 -1
- package/dist/{promo-DkM9sLly.js → promo-CTRn_F4t.js} +1 -1
- package/dist/{pt-br-Ch6NFhW6.js → pt-br-B0w9dhVB.js} +14 -1
- package/dist/{constants-rFRS1lF-.js → scarcity-Ccj5RlrR.js} +2 -5
- package/dist/{serverTotals-CvJBYArq.js → serverTotals-Dk3z9sIA.js} +1 -1
- package/dist/{showcase-state-options-x_9iSBsd.js → showcase-state-options-8-egiV5-.js} +1 -1
- package/dist/{to-event-card-props-9y7sVBi_.js → to-event-card-props-a4k6D100.js} +9 -9
- package/dist/{tr-CXnalLJT.js → tr-LGkP5gpA.js} +14 -1
- package/dist/{utils-D80jLqKH.js → utils-BseYYrbn.js} +82 -78
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +89 -91
- package/dist/venue-calendar.iife.js +48 -49
- package/dist/venue-calendar.umd.js +43 -44
- package/dist/{zh-CM2J1Py4.js → zh-D2ZAdq3T.js} +14 -1
- package/package.json +2 -2
- package/dist/CartView-DPzvlZwV.js +0 -2245
- package/dist/Checkout-CaamQTXi.js +0 -1846
- package/dist/keyboard-fiZFqeNA.js +0 -29
- package/dist/locales/4.3.9/flow/de.js +0 -1
- package/dist/locales/4.3.9/flow/es.js +0 -1
- package/dist/locales/4.3.9/flow/fr.js +0 -1
- package/dist/locales/4.3.9/flow/id.js +0 -1
- package/dist/locales/4.3.9/flow/it.js +0 -1
- package/dist/locales/4.3.9/flow/ja.js +0 -1
- package/dist/locales/4.3.9/flow/ko.js +0 -1
- package/dist/locales/4.3.9/flow/nl.js +0 -1
- package/dist/locales/4.3.9/flow/pl.js +0 -1
- package/dist/locales/4.3.9/flow/pt-br.js +0 -1
- package/dist/locales/4.3.9/flow/tr.js +0 -1
- package/dist/locales/4.3.9/flow/zh.js +0 -1
- package/dist/order-totals-Buq9HeZa.js +0 -131
- /package/dist/locales/{4.3.9 → 4.3.11}/main/de.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/es.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/fr.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/id.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/it.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/ja.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/ko.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/nl.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/pl.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/tr.js +0 -0
- /package/dist/locales/{4.3.9 → 4.3.11}/main/zh.js +0 -0
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as e, C as t, E as n, O as r, T as i, t as a } from "./Button-vmWb6wKc.js";
|
|
2
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-
|
|
4
|
-
import { a as f, i as p, n as m, o as h, r as g, t as _ } from "./ModalFooter-
|
|
5
|
-
import { t as v } from "./ModalHeader-
|
|
3
|
+
import { a as s, i as c, o as l, r as u, t as d } from "./imageOptimizer-Ba8P7ZEJ.js";
|
|
4
|
+
import { a as f, i as p, n as m, o as h, r as g, t as _ } from "./ModalFooter-CSoG_uic.js";
|
|
5
|
+
import { t as v } from "./ModalHeader-DpKxDJT_.js";
|
|
6
6
|
import "svelte/internal/disclose-version";
|
|
7
7
|
import * as y from "svelte/internal/client";
|
|
8
8
|
import { MediaQuery as b } from "svelte/reactivity";
|
|
9
|
-
import { onDestroy as x, onMount as
|
|
9
|
+
import { onDestroy as x, onMount as ee } from "svelte";
|
|
10
10
|
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/MinusOutline.svelte
|
|
11
|
-
var
|
|
12
|
-
function
|
|
11
|
+
var S = 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 C(e, t) {
|
|
13
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 =
|
|
14
|
+
var a = S();
|
|
15
15
|
y.template_effect(() => {
|
|
16
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
17
|
}), y.append(e, a);
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Modal/ModalClose.svelte
|
|
21
|
-
function
|
|
22
|
-
y.push(
|
|
23
|
-
let
|
|
21
|
+
function w(t, n) {
|
|
22
|
+
y.push(n, !0);
|
|
23
|
+
let i = { close: "Close" }, s = y.prop(n, "disabled", 3, !1), c = y.prop(n, "labels", 19, () => ({})), l = h(), u = y.derived(() => r(i, c()));
|
|
24
24
|
{
|
|
25
|
-
let
|
|
26
|
-
|
|
25
|
+
let r = y.derived(() => e(n.class));
|
|
26
|
+
a(t, {
|
|
27
27
|
variant: "icon",
|
|
28
28
|
size: "xs",
|
|
29
29
|
get disabled() {
|
|
30
30
|
return s();
|
|
31
31
|
},
|
|
32
32
|
get class() {
|
|
33
|
-
return y.get(
|
|
33
|
+
return y.get(r);
|
|
34
34
|
},
|
|
35
35
|
get "aria-label"() {
|
|
36
36
|
return y.get(u).close;
|
|
@@ -46,7 +46,7 @@ function T(n, i) {
|
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region node_modules/svelte-easy-crop/dist/helpers.js
|
|
49
|
-
function
|
|
49
|
+
function T(e, t, n) {
|
|
50
50
|
return e >= t * n ? {
|
|
51
51
|
width: t * n,
|
|
52
52
|
height: t
|
|
@@ -55,21 +55,21 @@ function E(e, t, n) {
|
|
|
55
55
|
height: e / n
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function E(e, t, n, r) {
|
|
59
59
|
return {
|
|
60
|
-
x:
|
|
61
|
-
y:
|
|
60
|
+
x: D(e.x, t.width, n.width, r),
|
|
61
|
+
y: D(e.y, t.height, n.height, r)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function D(e, t, n, r) {
|
|
65
65
|
let i = Math.abs(t * r / 2 - n / 2);
|
|
66
66
|
return Math.min(i, Math.max(e, -i));
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function O(e, t) {
|
|
69
69
|
return Math.sqrt((e.y - t.y) ** 2 + (e.x - t.x) ** 2);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
let o = a ?
|
|
71
|
+
function k(e, t, n, r, i, a = !0) {
|
|
72
|
+
let o = a ? A : j, s = {
|
|
73
73
|
x: o(100, ((t.width - n.width / i) / 2 - e.x / i) / t.width * 100),
|
|
74
74
|
y: o(100, ((t.height - n.height / i) / 2 - e.y / i) / t.height * 100),
|
|
75
75
|
width: o(100, n.width / t.width * 100 / i),
|
|
@@ -90,13 +90,13 @@ function A(e, t, n, r, i, a = !0) {
|
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function A(e, t, n = !1) {
|
|
94
94
|
return Math.min(e, Math.max(0, n ? Math.round(t) : t));
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function j(e, t) {
|
|
97
97
|
return t;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function M(e, t) {
|
|
100
100
|
return {
|
|
101
101
|
x: (t.x + e.x) / 2,
|
|
102
102
|
y: (t.y + e.y) / 2
|
|
@@ -104,8 +104,8 @@ function N(e, t) {
|
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region node_modules/svelte-easy-crop/dist/Cropper.svelte
|
|
107
|
-
var
|
|
108
|
-
function
|
|
107
|
+
var N = y.from_html("<div data-testid=\"cropper\"></div>"), P = 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 F(e, t) {
|
|
109
109
|
y.push(t, !0);
|
|
110
110
|
let n = y.prop(t, "crop", 31, () => y.proxy({
|
|
111
111
|
x: 0,
|
|
@@ -118,71 +118,71 @@ function I(e, t) {
|
|
|
118
118
|
})), g = y.state(null), _ = y.state(null), v = y.state(null), b = y.state(y.proxy({
|
|
119
119
|
x: 0,
|
|
120
120
|
y: 0
|
|
121
|
-
})),
|
|
121
|
+
})), S = y.state(y.proxy({
|
|
122
122
|
x: 0,
|
|
123
123
|
y: 0
|
|
124
|
-
})),
|
|
125
|
-
|
|
126
|
-
y.get(v) && y.get(v).complete &&
|
|
124
|
+
})), C = y.state(0), w = y.state(null), D = y.state(null);
|
|
125
|
+
ee(() => {
|
|
126
|
+
y.get(v) && y.get(v).complete && F(), y.get(g) && (y.get(g).addEventListener("gesturestart", A), y.get(g).addEventListener("gesturechange", A));
|
|
127
127
|
}), x(() => {
|
|
128
|
-
y.get(g) && (y.get(g).removeEventListener("gesturestart",
|
|
128
|
+
y.get(g) && (y.get(g).removeEventListener("gesturestart", A), y.get(g).removeEventListener("gesturechange", A)), j();
|
|
129
129
|
});
|
|
130
|
-
let
|
|
131
|
-
typeof document < "u" && (document.removeEventListener("mousemove",
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
},
|
|
130
|
+
let A = (e) => e.preventDefault(), j = () => {
|
|
131
|
+
typeof document < "u" && (document.removeEventListener("mousemove", V), document.removeEventListener("mouseup", K), document.removeEventListener("touchmove", U), document.removeEventListener("touchend", K));
|
|
132
|
+
}, F = () => {
|
|
133
|
+
L(), Z();
|
|
134
|
+
}, I = () => s() ? s().width / s().height : o(), L = () => {
|
|
135
135
|
y.get(v) && (y.set(h, {
|
|
136
136
|
width: y.get(v).width,
|
|
137
137
|
height: y.get(v).height,
|
|
138
138
|
naturalWidth: y.get(v).naturalWidth,
|
|
139
139
|
naturalHeight: y.get(v).naturalHeight
|
|
140
|
-
}, !0), y.set(m, s() ? s() :
|
|
141
|
-
},
|
|
140
|
+
}, !0), y.set(m, s() ? s() : T(y.get(v).width, y.get(v).height, o()), !0)), y.get(g) && y.set(_, y.get(g).getBoundingClientRect(), !0);
|
|
141
|
+
}, R = (e) => ({
|
|
142
142
|
x: Number(e.clientX),
|
|
143
143
|
y: Number(e.clientY)
|
|
144
|
-
}),
|
|
144
|
+
}), z = (e) => ({
|
|
145
145
|
x: Number(e.clientX),
|
|
146
146
|
y: Number(e.clientY)
|
|
147
|
-
}),
|
|
148
|
-
e.preventDefault(), document.addEventListener("mousemove",
|
|
149
|
-
},
|
|
150
|
-
e.preventDefault(), document.addEventListener("touchmove",
|
|
151
|
-
},
|
|
152
|
-
e.preventDefault(), e.touches.length === 2 ?
|
|
153
|
-
},
|
|
147
|
+
}), B = (e) => {
|
|
148
|
+
e.preventDefault(), document.addEventListener("mousemove", V), document.addEventListener("mouseup", K), W(R(e));
|
|
149
|
+
}, V = (e) => G(R(e)), H = (e) => {
|
|
150
|
+
e.preventDefault(), document.addEventListener("touchmove", U, { passive: !1 }), document.addEventListener("touchend", K), e.touches.length === 2 ? q(e) : e.touches.length === 1 && W(z(e.touches[0]));
|
|
151
|
+
}, U = (e) => {
|
|
152
|
+
e.preventDefault(), e.touches.length === 2 ? te(e) : e.touches.length === 1 && G(z(e.touches[0]));
|
|
153
|
+
}, W = ({ x: e, y: t }) => {
|
|
154
154
|
y.set(b, {
|
|
155
155
|
x: e,
|
|
156
156
|
y: t
|
|
157
|
-
}, !0), y.set(
|
|
157
|
+
}, !0), y.set(S, {
|
|
158
158
|
x: n().x,
|
|
159
159
|
y: n().y
|
|
160
160
|
}, !0);
|
|
161
|
-
},
|
|
162
|
-
y.get(
|
|
161
|
+
}, G = ({ x: e, y: t }) => {
|
|
162
|
+
y.get(w) && window.cancelAnimationFrame(y.get(w)), y.set(w, window.requestAnimationFrame(() => {
|
|
163
163
|
if (e === void 0 || t === void 0 || !y.get(m)) return;
|
|
164
164
|
let i = e - y.get(b).x, a = t - y.get(b).y, o = {
|
|
165
|
-
x: y.get(
|
|
166
|
-
y: y.get(
|
|
165
|
+
x: y.get(S).x + i,
|
|
166
|
+
y: y.get(S).y + a
|
|
167
167
|
};
|
|
168
|
-
n(f() ?
|
|
168
|
+
n(f() ? E(o, y.get(h), y.get(m), r()) : o);
|
|
169
169
|
}), !0);
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
let t =
|
|
174
|
-
y.set(
|
|
175
|
-
},
|
|
176
|
-
let t =
|
|
177
|
-
|
|
178
|
-
let e =
|
|
179
|
-
X(a, i), y.set(
|
|
170
|
+
}, K = () => {
|
|
171
|
+
j(), Z();
|
|
172
|
+
}, q = (e) => {
|
|
173
|
+
let t = z(e.touches[0]), n = z(e.touches[1]);
|
|
174
|
+
y.set(C, O(t, n), !0), W(M(t, n));
|
|
175
|
+
}, te = (e) => {
|
|
176
|
+
let t = z(e.touches[0]), n = z(e.touches[1]), i = M(t, n);
|
|
177
|
+
G(i), y.get(D) && window.cancelAnimationFrame(y.get(D)), y.set(D, window.requestAnimationFrame(() => {
|
|
178
|
+
let e = O(t, n), a = r() * (e / y.get(C));
|
|
179
|
+
X(a, i), y.set(C, e, !0);
|
|
180
180
|
}), !0);
|
|
181
|
-
},
|
|
181
|
+
}, J = (e) => {
|
|
182
182
|
e.preventDefault();
|
|
183
|
-
let t =
|
|
183
|
+
let t = R(e), n = r() - e.deltaY * u() / 200;
|
|
184
184
|
X(n, t);
|
|
185
|
-
},
|
|
185
|
+
}, Y = ({ x: e, y: t }) => {
|
|
186
186
|
if (!y.get(_)) throw Error("The Cropper is not mounted");
|
|
187
187
|
return {
|
|
188
188
|
x: y.get(_).width / 2 - (e - y.get(_).left),
|
|
@@ -193,37 +193,37 @@ function I(e, t) {
|
|
|
193
193
|
y: (t + n().y) / r()
|
|
194
194
|
}), X = (e, t) => {
|
|
195
195
|
if (!y.get(m)) return;
|
|
196
|
-
let o =
|
|
196
|
+
let o = Y(t), s = ne(o);
|
|
197
197
|
r(Math.min(a(), Math.max(e, i())));
|
|
198
198
|
let c = {
|
|
199
199
|
x: s.x * r() - o.x,
|
|
200
200
|
y: s.y * r() - o.y
|
|
201
201
|
};
|
|
202
|
-
n(f() ?
|
|
202
|
+
n(f() ? E(c, y.get(h), y.get(m), r()) : c);
|
|
203
203
|
}, Z = () => {
|
|
204
204
|
if (!y.get(m) || y.get(m).width === 0) return;
|
|
205
|
-
let { croppedAreaPercentages: e, croppedAreaPixels: i } =
|
|
205
|
+
let { croppedAreaPercentages: e, croppedAreaPixels: i } = k(f() ? E(n(), y.get(h), y.get(m), r()) : n(), y.get(h), y.get(m), I(), r(), f());
|
|
206
206
|
t.oncropcomplete?.({
|
|
207
207
|
percent: e,
|
|
208
208
|
pixels: i
|
|
209
209
|
});
|
|
210
210
|
};
|
|
211
211
|
y.user_effect(() => {
|
|
212
|
-
y.get(v) && y.set(m, s() ? s() :
|
|
212
|
+
y.get(v) && y.set(m, s() ? s() : T(y.get(v).width, y.get(v).height, o()), !0);
|
|
213
213
|
}), y.user_effect(() => {
|
|
214
214
|
r() && Z();
|
|
215
215
|
});
|
|
216
216
|
let re = (e) => {
|
|
217
|
-
y.user_effect(() => (e.addEventListener("touchstart",
|
|
218
|
-
e.removeEventListener("touchstart",
|
|
217
|
+
y.user_effect(() => (e.addEventListener("touchstart", H), e.addEventListener("mousedown", B), e.addEventListener("wheel", J, { passive: !1 }), () => {
|
|
218
|
+
e.removeEventListener("touchstart", H), e.removeEventListener("mousedown", B), e.removeEventListener("wheel", J);
|
|
219
219
|
}));
|
|
220
220
|
};
|
|
221
|
-
var Q =
|
|
222
|
-
y.event("resize", y.window,
|
|
221
|
+
var Q = P();
|
|
222
|
+
y.event("resize", y.window, L);
|
|
223
223
|
var $ = y.child(Q);
|
|
224
224
|
y.bind_this($, (e) => y.set(v, e), () => y.get(v));
|
|
225
225
|
var ie = y.sibling($, 2), ae = (e) => {
|
|
226
|
-
var t =
|
|
226
|
+
var t = N();
|
|
227
227
|
let n;
|
|
228
228
|
y.template_effect(() => {
|
|
229
229
|
n = y.set_class(t, 1, "svelte-easy-crop-area svelte-1yetlj5", null, n, {
|
|
@@ -236,31 +236,31 @@ function I(e, t) {
|
|
|
236
236
|
y.get(m) && e(ae);
|
|
237
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
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", $,
|
|
239
|
+
}), y.event("load", $, F), y.replay_events($), y.append(e, Q), y.pop();
|
|
240
240
|
}
|
|
241
241
|
//#endregion
|
|
242
242
|
//#region node_modules/svelte-easy-crop/dist/index.js
|
|
243
|
-
var
|
|
244
|
-
function W(
|
|
243
|
+
var I = F, L = y.from_html("<div class=\"absolute inset-0 flex items-center justify-center bg-bg-tertiary z-sticky\"><span> </span></div>"), R = y.from_html("<p> </p>"), 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(e, o) {
|
|
245
245
|
y.push(o, !0);
|
|
246
|
-
let h = (e,
|
|
247
|
-
var
|
|
248
|
-
var
|
|
249
|
-
y.reset(
|
|
250
|
-
y.set_class(
|
|
251
|
-
}), y.append(e,
|
|
246
|
+
let h = (e, n = y.noop) => {
|
|
247
|
+
var r = z(), i = y.first_child(r), o = y.child(i), s = (e) => {
|
|
248
|
+
var n = L(), r = y.child(n), i = y.child(r, !0);
|
|
249
|
+
y.reset(r), y.reset(n), y.template_effect(() => {
|
|
250
|
+
y.set_class(r, 1, y.clsx(t.smMuted)), y.set_text(i, y.get(N).loading);
|
|
251
|
+
}), y.append(e, n);
|
|
252
252
|
};
|
|
253
253
|
y.if(o, (e) => {
|
|
254
|
-
y.get(
|
|
255
|
-
}),
|
|
254
|
+
y.get(G) && e(s);
|
|
255
|
+
}), I(y.sibling(o, 2), {
|
|
256
256
|
get image() {
|
|
257
|
-
return
|
|
257
|
+
return D();
|
|
258
258
|
},
|
|
259
259
|
aspect: 1,
|
|
260
260
|
minZoom: 1,
|
|
261
261
|
maxZoom: 3,
|
|
262
262
|
showGrid: !0,
|
|
263
|
-
oncropcomplete:
|
|
263
|
+
oncropcomplete: te,
|
|
264
264
|
get crop() {
|
|
265
265
|
return y.get(P);
|
|
266
266
|
},
|
|
@@ -273,11 +273,11 @@ function W(t, o) {
|
|
|
273
273
|
set zoom(e) {
|
|
274
274
|
y.set(F, e, !0);
|
|
275
275
|
}
|
|
276
|
-
}), y.reset(
|
|
277
|
-
var c = y.sibling(
|
|
276
|
+
}), y.reset(i);
|
|
277
|
+
var c = y.sibling(i, 2), u = y.child(c), d = y.child(u, !0);
|
|
278
278
|
y.reset(u);
|
|
279
279
|
var f = y.sibling(u, 2), p = y.child(f);
|
|
280
|
-
|
|
280
|
+
a(p, {
|
|
281
281
|
variant: "outline",
|
|
282
282
|
size: "sm",
|
|
283
283
|
class: "rounded-full! w-9! h-9! p-0! shrink-0",
|
|
@@ -286,14 +286,14 @@ function W(t, o) {
|
|
|
286
286
|
return y.get(N).zoomOut;
|
|
287
287
|
},
|
|
288
288
|
children: (e, t) => {
|
|
289
|
-
|
|
289
|
+
C(e, { class: "w-4 h-4" });
|
|
290
290
|
},
|
|
291
291
|
$$slots: { default: !0 }
|
|
292
292
|
});
|
|
293
293
|
var m = y.sibling(p, 2);
|
|
294
294
|
y.remove_input_defaults(m);
|
|
295
295
|
var h = y.sibling(m, 2);
|
|
296
|
-
|
|
296
|
+
a(h, {
|
|
297
297
|
variant: "outline",
|
|
298
298
|
size: "sm",
|
|
299
299
|
class: "rounded-full! w-9! h-9! p-0! shrink-0",
|
|
@@ -305,21 +305,30 @@ function W(t, o) {
|
|
|
305
305
|
l(e, { class: "w-4 h-4" });
|
|
306
306
|
},
|
|
307
307
|
$$slots: { default: !0 }
|
|
308
|
-
}), y.reset(f)
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
}), y.reset(f);
|
|
309
|
+
var g = y.sibling(f, 2), _ = (e) => {
|
|
310
|
+
var n = R(), r = y.child(n, !0);
|
|
311
|
+
y.reset(n), y.template_effect(() => {
|
|
312
|
+
y.set_class(n, 1, `${t.body} text-accent-danger text-center`), y.set_text(r, k());
|
|
313
|
+
}), y.append(e, n);
|
|
314
|
+
};
|
|
315
|
+
y.if(g, (e) => {
|
|
316
|
+
k() && e(_);
|
|
317
|
+
}), y.reset(c), y.template_effect(() => {
|
|
318
|
+
y.set_class(i, 1, y.clsx(n())), y.set_class(u, 1, `${t.smMuted} text-center`), y.set_text(d, y.get(N).dragToPosition), y.set_attribute(m, "aria-label", y.get(N).zoomLevel);
|
|
319
|
+
}), y.bind_value(m, () => y.get(F), (e) => y.set(F, e)), y.append(e, r);
|
|
311
320
|
}, x = (e, t = y.noop) => {
|
|
312
|
-
var n = B(),
|
|
321
|
+
var n = B(), r = y.first_child(n);
|
|
313
322
|
{
|
|
314
|
-
let e = y.derived(() => y.get(
|
|
315
|
-
r
|
|
323
|
+
let e = y.derived(() => y.get(K) || O());
|
|
324
|
+
a(r, {
|
|
316
325
|
type: "button",
|
|
317
326
|
variant: "alternative",
|
|
318
327
|
size: "md",
|
|
319
328
|
get class() {
|
|
320
329
|
return t();
|
|
321
330
|
},
|
|
322
|
-
onclick:
|
|
331
|
+
onclick: Y,
|
|
323
332
|
get disabled() {
|
|
324
333
|
return y.get(e);
|
|
325
334
|
},
|
|
@@ -331,16 +340,16 @@ function W(t, o) {
|
|
|
331
340
|
$$slots: { default: !0 }
|
|
332
341
|
});
|
|
333
342
|
}
|
|
334
|
-
var
|
|
343
|
+
var i = y.sibling(r, 2);
|
|
335
344
|
{
|
|
336
|
-
let e = y.derived(() => y.get(
|
|
337
|
-
|
|
345
|
+
let e = y.derived(() => y.get(G) || y.get(K) || O());
|
|
346
|
+
a(i, {
|
|
338
347
|
type: "button",
|
|
339
348
|
size: "md",
|
|
340
349
|
get class() {
|
|
341
350
|
return t();
|
|
342
351
|
},
|
|
343
|
-
onclick:
|
|
352
|
+
onclick: J,
|
|
344
353
|
get disabled() {
|
|
345
354
|
return y.get(e);
|
|
346
355
|
},
|
|
@@ -353,14 +362,14 @@ function W(t, o) {
|
|
|
353
362
|
y.template_effect(() => y.set_text(t, y.get(N).save)), y.append(e, t);
|
|
354
363
|
};
|
|
355
364
|
y.if(r, (e) => {
|
|
356
|
-
y.get(
|
|
365
|
+
y.get(K) || O() ? e(i) : e(a, -1);
|
|
357
366
|
}), y.append(e, n);
|
|
358
367
|
},
|
|
359
368
|
$$slots: { default: !0 }
|
|
360
369
|
});
|
|
361
370
|
}
|
|
362
371
|
y.append(e, n);
|
|
363
|
-
},
|
|
372
|
+
}, ee = n("CropImage"), S = new b("(max-width: 767px), (max-height: 500px)", !1), T = {
|
|
364
373
|
cropImageTitle: "Crop image",
|
|
365
374
|
loading: "Loading...",
|
|
366
375
|
dragToPosition: "Drag to position. Pinch or use slider to zoom.",
|
|
@@ -370,40 +379,41 @@ function W(t, o) {
|
|
|
370
379
|
closeModal: "Close modal",
|
|
371
380
|
zoomOut: "Zoom out",
|
|
372
381
|
zoomIn: "Zoom in",
|
|
373
|
-
zoomLevel: "Zoom level"
|
|
374
|
-
|
|
375
|
-
o
|
|
376
|
-
|
|
382
|
+
zoomLevel: "Zoom level",
|
|
383
|
+
cropFailed: "Couldn't read that photo. Please try a different one."
|
|
384
|
+
}, E = y.prop(o, "showModal", 15, !1), D = y.prop(o, "imageSrc", 15, ""), O = y.prop(o, "isUploadingImage", 3, !1), k = y.prop(o, "error", 15, ""), A = y.prop(o, "labels", 19, () => ({}));
|
|
385
|
+
o.onSave && !o.onsave && i("CropImage: prop \"onSave\" is deprecated. Use \"onsave\" instead."), o.onCancel && !o.oncancel && i("CropImage: prop \"onCancel\" is deprecated. Use \"oncancel\" instead.");
|
|
386
|
+
let j = y.derived(() => o.onsave ?? o.onSave ?? (() => {})), M = y.derived(() => o.oncancel ?? o.onCancel ?? (() => {})), N = y.derived(() => r(T, A())), P = y.state(y.proxy({
|
|
377
387
|
x: 0,
|
|
378
388
|
y: 0
|
|
379
|
-
})), F = y.state(1),
|
|
389
|
+
})), F = y.state(1), W = y.state(null), G = y.state(!0), K = y.state(!1), q = D();
|
|
380
390
|
y.user_effect(() => {
|
|
381
|
-
|
|
391
|
+
E() && D() && (y.set(P, {
|
|
382
392
|
x: 0,
|
|
383
393
|
y: 0
|
|
384
|
-
}, !0), y.set(F, 1), y.set(
|
|
394
|
+
}, !0), y.set(F, 1), y.set(W, null), y.set(G, !0), y.set(K, !1), D() !== q && (q = D(), k("")));
|
|
385
395
|
});
|
|
386
|
-
function
|
|
387
|
-
y.set(
|
|
396
|
+
function te(e) {
|
|
397
|
+
y.set(W, e.pixels, !0), y.set(G, !1);
|
|
388
398
|
}
|
|
389
|
-
async function
|
|
390
|
-
if (!(!y.get(
|
|
391
|
-
y.set(
|
|
399
|
+
async function J() {
|
|
400
|
+
if (!(!y.get(W) || y.get(K))) {
|
|
401
|
+
y.set(K, !0), k("");
|
|
392
402
|
try {
|
|
393
|
-
let e = await
|
|
403
|
+
let e = await ne(D(), y.get(W));
|
|
394
404
|
y.get(j)(e);
|
|
395
405
|
} catch (e) {
|
|
396
|
-
y.set(
|
|
406
|
+
y.set(K, !1), k(y.get(N).cropFailed), ee.error("Crop failed:", e);
|
|
397
407
|
}
|
|
398
408
|
}
|
|
399
409
|
}
|
|
400
|
-
function
|
|
401
|
-
|
|
410
|
+
function Y() {
|
|
411
|
+
E(!1), D(""), y.set(P, {
|
|
402
412
|
x: 0,
|
|
403
413
|
y: 0
|
|
404
|
-
}, !0), y.set(F, 1), y.set(
|
|
414
|
+
}, !0), y.set(F, 1), y.set(W, null), y.set(K, !1), k(""), y.get(M)();
|
|
405
415
|
}
|
|
406
|
-
async function
|
|
416
|
+
async function ne(e, t) {
|
|
407
417
|
let n = await d(e), r = document.createElement("canvas"), i = r.getContext("2d"), a = 1e3;
|
|
408
418
|
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
419
|
let o = u(), s = o ? "image/webp" : "image/jpeg", c = o ? .8 : .85, l = o ? "webp" : "jpg";
|
|
@@ -413,10 +423,10 @@ function W(t, o) {
|
|
|
413
423
|
}, s, c);
|
|
414
424
|
});
|
|
415
425
|
}
|
|
416
|
-
var
|
|
426
|
+
var X = y.comment(), Z = y.first_child(X), re = (e) => {
|
|
417
427
|
s(e, {
|
|
418
428
|
get open() {
|
|
419
|
-
return
|
|
429
|
+
return E();
|
|
420
430
|
},
|
|
421
431
|
get title() {
|
|
422
432
|
return y.get(N).cropImageTitle;
|
|
@@ -426,7 +436,7 @@ function W(t, o) {
|
|
|
426
436
|
return o["data-testid"];
|
|
427
437
|
},
|
|
428
438
|
onclose: () => {
|
|
429
|
-
!y.get(
|
|
439
|
+
!y.get(K) && !O() && Y();
|
|
430
440
|
},
|
|
431
441
|
actions: (e) => {
|
|
432
442
|
var t = V(), n = y.child(t);
|
|
@@ -441,36 +451,36 @@ function W(t, o) {
|
|
|
441
451
|
default: !0
|
|
442
452
|
}
|
|
443
453
|
});
|
|
444
|
-
},
|
|
454
|
+
}, Q = (e) => {
|
|
445
455
|
{
|
|
446
|
-
let
|
|
456
|
+
let n = y.derived(() => y.get(K) || O());
|
|
447
457
|
f(e, {
|
|
448
458
|
get open() {
|
|
449
|
-
return
|
|
459
|
+
return E();
|
|
450
460
|
},
|
|
451
461
|
variant: "dialog",
|
|
452
462
|
get persistent() {
|
|
453
|
-
return y.get(
|
|
463
|
+
return y.get(n);
|
|
454
464
|
},
|
|
455
465
|
get "data-testid"() {
|
|
456
466
|
return o["data-testid"];
|
|
457
467
|
},
|
|
458
|
-
oncancel:
|
|
459
|
-
children: (e,
|
|
460
|
-
var
|
|
461
|
-
p(
|
|
462
|
-
var a = y.sibling(
|
|
468
|
+
oncancel: Y,
|
|
469
|
+
children: (e, n) => {
|
|
470
|
+
var r = B(), i = y.first_child(r);
|
|
471
|
+
p(i, {});
|
|
472
|
+
var a = y.sibling(i, 2);
|
|
463
473
|
g(a, {
|
|
464
474
|
class: "max-w-lg",
|
|
465
|
-
children: (e,
|
|
466
|
-
var
|
|
467
|
-
v(
|
|
475
|
+
children: (e, n) => {
|
|
476
|
+
var r = U(), i = y.first_child(r);
|
|
477
|
+
v(i, {
|
|
468
478
|
class: "flex items-center justify-between gap-3 border-b border-border pb-4",
|
|
469
|
-
children: (e,
|
|
470
|
-
var
|
|
471
|
-
c(
|
|
479
|
+
children: (e, n) => {
|
|
480
|
+
var r = B(), i = y.first_child(r);
|
|
481
|
+
c(i, {
|
|
472
482
|
get class() {
|
|
473
|
-
return
|
|
483
|
+
return t.h2;
|
|
474
484
|
},
|
|
475
485
|
children: (e, t) => {
|
|
476
486
|
y.next();
|
|
@@ -479,10 +489,10 @@ function W(t, o) {
|
|
|
479
489
|
},
|
|
480
490
|
$$slots: { default: !0 }
|
|
481
491
|
});
|
|
482
|
-
var a = y.sibling(
|
|
492
|
+
var a = y.sibling(i, 2);
|
|
483
493
|
{
|
|
484
|
-
let e = y.derived(() => y.get(
|
|
485
|
-
|
|
494
|
+
let e = y.derived(() => y.get(K) || O()), t = y.derived(() => ({ close: y.get(N).closeModal }));
|
|
495
|
+
w(a, {
|
|
486
496
|
get disabled() {
|
|
487
497
|
return y.get(e);
|
|
488
498
|
},
|
|
@@ -491,11 +501,11 @@ function W(t, o) {
|
|
|
491
501
|
}
|
|
492
502
|
});
|
|
493
503
|
}
|
|
494
|
-
y.append(e,
|
|
504
|
+
y.append(e, r);
|
|
495
505
|
},
|
|
496
506
|
$$slots: { default: !0 }
|
|
497
507
|
});
|
|
498
|
-
var a = y.sibling(
|
|
508
|
+
var a = y.sibling(i, 2);
|
|
499
509
|
m(a, {
|
|
500
510
|
class: "space-y-4",
|
|
501
511
|
children: (e, t) => {
|
|
@@ -510,18 +520,18 @@ function W(t, o) {
|
|
|
510
520
|
x(e, () => "");
|
|
511
521
|
},
|
|
512
522
|
$$slots: { default: !0 }
|
|
513
|
-
}), y.append(e,
|
|
523
|
+
}), y.append(e, r);
|
|
514
524
|
},
|
|
515
525
|
$$slots: { default: !0 }
|
|
516
|
-
}), y.append(e,
|
|
526
|
+
}), y.append(e, r);
|
|
517
527
|
},
|
|
518
528
|
$$slots: { default: !0 }
|
|
519
529
|
});
|
|
520
530
|
}
|
|
521
531
|
};
|
|
522
|
-
y.if(
|
|
523
|
-
|
|
524
|
-
}), y.append(
|
|
532
|
+
y.if(Z, (e) => {
|
|
533
|
+
S.current ? e(re) : e(Q, -1);
|
|
534
|
+
}), y.append(e, X), y.pop();
|
|
525
535
|
}
|
|
526
536
|
//#endregion
|
|
527
537
|
export { W as default };
|