@calcom/atoms 1.0.69 → 1.0.71
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/{AddressInput-fp5qF4sP.js → AddressInput-oW1jYLbW.js} +1 -1
- package/dist/{AlbyPriceComponent-WNrzLlXW.js → AlbyPriceComponent-4Tfuuhj0.js} +1 -1
- package/dist/{AppCard-i4bbunNu.js → AppCard--EOFyaO8.js} +1 -1
- package/dist/{AppSettingsInterface-TW9vJOoI.js → AppSettingsInterface-_yOzvufk.js} +1 -1
- package/dist/{AppSettingsInterface-N52rUkrM.js → AppSettingsInterface-dqVEnQ6I.js} +1 -1
- package/dist/{AppSettingsInterface-MRKlt77b.js → AppSettingsInterface-qSduJv1b.js} +1 -1
- package/dist/{Card-nU2Oxfou.js → Card-efUk3GNO.js} +1 -1
- package/dist/{DateRangePicker-zC5DKhrn.js → DateRangePicker-tkR2_S7I.js} +1 -1
- package/dist/{EventTypeAppCardInterface-BV-7vxVF.js → EventTypeAppCardInterface-0Nx9FYGL.js} +4 -4
- package/dist/{EventTypeAppCardInterface-btNTU6vZ.js → EventTypeAppCardInterface-2qDTLaLK.js} +4 -4
- package/dist/{EventTypeAppCardInterface-bcXxch2-.js → EventTypeAppCardInterface-4guqFA_P.js} +3 -3
- package/dist/{EventTypeAppCardInterface-MAn6ziw5.js → EventTypeAppCardInterface-6v-TNkAa.js} +3 -3
- package/dist/{EventTypeAppCardInterface-_m3lSLFr.js → EventTypeAppCardInterface-7R_oLI5n.js} +2 -2
- package/dist/{EventTypeAppCardInterface-BP7Ex_ei.js → EventTypeAppCardInterface-AsaLLeLm.js} +3 -3
- package/dist/{EventTypeAppCardInterface-Mx5nZATt.js → EventTypeAppCardInterface-CrsE0C1m.js} +3 -3
- package/dist/{EventTypeAppCardInterface-fyocINFK.js → EventTypeAppCardInterface-DQxNxQ6q.js} +4 -4
- package/dist/{EventTypeAppCardInterface-dItaOzoi.js → EventTypeAppCardInterface-ENYuJp-q.js} +4 -4
- package/dist/{EventTypeAppCardInterface-cN6WeqoW.js → EventTypeAppCardInterface-JvOifRnW.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DlObORsm.js → EventTypeAppCardInterface-KaecmIYD.js} +4 -4
- package/dist/{EventTypeAppCardInterface-IAezhqal.js → EventTypeAppCardInterface-MgmPQeHW.js} +4 -4
- package/dist/{EventTypeAppCardInterface-uiOS4XaX.js → EventTypeAppCardInterface-PqNK02Xl.js} +3 -3
- package/dist/{EventTypeAppCardInterface-efL7j0sK.js → EventTypeAppCardInterface-SK5vlRQq.js} +3 -3
- package/dist/{EventTypeAppCardInterface-m7ZJO_Gi.js → EventTypeAppCardInterface-T3RAKWd4.js} +3 -3
- package/dist/{EventTypeAppCardInterface-GKvnvUPT.js → EventTypeAppCardInterface-VVekAt4E.js} +4 -4
- package/dist/{EventTypeAppCardInterface-3WEbQqwX.js → EventTypeAppCardInterface-Z4I5pK7s.js} +3 -3
- package/dist/{EventTypeAppCardInterface-QhjVwBbL.js → EventTypeAppCardInterface-d5KqEvnt.js} +2 -2
- package/dist/{EventTypeAppCardInterface--x1bbPB1.js → EventTypeAppCardInterface-ejsl3FEm.js} +3 -3
- package/dist/{EventTypeAppCardInterface-8tmNi_8_.js → EventTypeAppCardInterface-jeOexhMt.js} +3 -3
- package/dist/{EventTypeAppCardInterface-kAd2JbQx.js → EventTypeAppCardInterface-m8qyCE4X.js} +3 -3
- package/dist/{EventTypeAppCardInterface-7RTrZn6I.js → EventTypeAppCardInterface-qVs7SsGQ.js} +4 -4
- package/dist/{EventTypeAppCardInterface-q9yk5DT1.js → EventTypeAppCardInterface-wIbogzGM.js} +3 -3
- package/dist/EventTypeAppCardInterface-x2oFHd3Y.js +23 -0
- package/dist/{EventTypeAppSettingsInterface-K3v6ddWP.js → EventTypeAppSettingsInterface-1CVby8zj.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-XMynhO4N.js → EventTypeAppSettingsInterface-3i2pjW_0.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-TaCrvrDr.js → EventTypeAppSettingsInterface-4HUFCqvb.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-YtGDQGv6.js → EventTypeAppSettingsInterface-JQSEDgUX.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-uhHjJmtM.js → EventTypeAppSettingsInterface-UpIhvGKP.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-zunsXzpl.js → EventTypeAppSettingsInterface-WV4IS06h.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-p7_-Y_Ab.js → EventTypeAppSettingsInterface-XEIl75NM.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-WwyJDARg.js → EventTypeAppSettingsInterface-_WJogMeF.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-nE6SJ25Q.js → EventTypeAppSettingsInterface-bwK9InWS.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-uRbVB2R5.js → EventTypeAppSettingsInterface-oWlc3srG.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-SXE4FAhe.js → EventTypeAppSettingsInterface-xyETGKCQ.js} +1 -1
- package/dist/{InstallAppButton-DEad89iX.js → InstallAppButton-3yN6MK2U.js} +1 -1
- package/dist/{InstallAppButton-oVO4d3PS.js → InstallAppButton-BQyl9hge.js} +1 -1
- package/dist/{InstallAppButton-O9pAEgyM.js → InstallAppButton-a_HOFKtt.js} +1 -1
- package/dist/{InstallAppButton-rZ36q66L.js → InstallAppButton-cub8aavs.js} +1 -1
- package/dist/{PhoneInput-drURqB5k.js → PhoneInput-68Gve8nD.js} +1 -1
- package/dist/StripePaymentForm-2z2L7K26.js +486 -0
- package/dist/cal-atoms.js +4 -4
- package/dist/cal-atoms.umd.cjs +404 -312
- package/dist/{framer-features-4MVDXzUi.js → framer-features-ZUEIy9az.js} +27 -27
- package/dist/{index-QBwBOYLQ.js → index-Oh9i2m7B.js} +1 -1
- package/dist/{index-tjEJ5F1K.js → index-cxDrvoq9.js} +1 -1
- package/dist/{index-_JT8rq0w.js → index-iPxcpUfi.js} +88963 -62247
- package/dist/index-rHR8IK-w.js +256 -0
- package/dist/{index-_cSqrkOk.js → index-x-vO53Qr.js} +4 -4
- package/dist/packages/app-store/_pages/setup/index.d.ts +0 -1
- package/dist/packages/app-store/_pages/setup/index.d.ts.map +1 -1
- package/dist/packages/app-store/_utils/paid-apps.d.ts.map +1 -1
- package/dist/packages/app-store/apps.keys-schemas.generated.d.ts +10 -1
- package/dist/packages/app-store/apps.keys-schemas.generated.d.ts.map +1 -1
- package/dist/packages/app-store/apps.metadata.generated.d.ts +1 -0
- package/dist/packages/app-store/apps.metadata.generated.d.ts.map +1 -1
- package/dist/packages/app-store/closecom/api/_getAdd.d.ts +2 -1
- package/dist/packages/app-store/closecom/api/_getAdd.d.ts.map +1 -1
- package/dist/packages/app-store/closecom/api/add.d.ts.map +1 -1
- package/dist/packages/app-store/closecom/api/{_postAdd.d.ts → callback.d.ts} +1 -2
- package/dist/packages/app-store/closecom/api/callback.d.ts.map +1 -0
- package/dist/packages/app-store/closecom/api/index.d.ts +1 -1
- package/dist/packages/app-store/closecom/api/index.d.ts.map +1 -1
- package/dist/packages/app-store/closecom/config.json.d.ts +2 -1
- package/dist/packages/app-store/closecom/lib/CrmService.d.ts +1 -4
- package/dist/packages/app-store/closecom/lib/CrmService.d.ts.map +1 -1
- package/dist/packages/app-store/closecom/zod.d.ts +10 -1
- package/dist/packages/app-store/closecom/zod.d.ts.map +1 -1
- package/dist/packages/app-store/stripepayment/api/subscription.d.ts.map +1 -1
- package/dist/packages/app-store/stripepayment/lib/PaymentService.d.ts.map +1 -1
- package/dist/packages/features/auth/signup/handlers/calcomHandler.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts.map +1 -1
- package/dist/packages/features/bookings/components/event-meta/Members.d.ts.map +1 -1
- package/dist/packages/features/ee/payments/components/Payment.d.ts +1 -2
- package/dist/packages/features/ee/payments/components/Payment.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/api/scheduleEmailReminders.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/reminders/emailReminderManager.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.d.ts +1 -1
- package/dist/packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.d.ts.map +1 -1
- package/dist/packages/features/insights/components/RoutingFormResponsesTable.d.ts.map +1 -1
- package/dist/packages/features/settings/appDir/SettingsLayoutAppDirClient.d.ts.map +1 -1
- package/dist/packages/lib/CloseCom.d.ts +15 -3
- package/dist/packages/lib/CloseCom.d.ts.map +1 -1
- package/dist/packages/lib/server/repository/booking.d.ts.map +1 -1
- package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts +1 -0
- package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
- package/dist/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.d.ts +10 -1
- package/dist/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.d.ts.map +1 -1
- package/dist/packages/platform/atoms/lib/markdownToSafeHTML.d.ts.map +1 -1
- package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts +2 -0
- package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts.map +1 -1
- package/dist/packages/prisma/seed-app-store.d.ts.map +1 -1
- package/dist/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.d.ts.map +1 -1
- package/dist/{useIsAppEnabled-P8nFP-e-.js → useIsAppEnabled-FnJj-kXT.js} +1 -1
- package/package.json +4 -4
- package/dist/EventTypeAppCardInterface-vL-xcpz3.js +0 -23
- package/dist/StripePaymentForm-vvGA0-jZ.js +0 -1148
- package/dist/index-taPshKtT.js +0 -399
- package/dist/packages/app-store/closecom/api/_postAdd.d.ts.map +0 -1
- package/dist/packages/app-store/closecom/api/_postCheck.d.ts +0 -5
- package/dist/packages/app-store/closecom/api/_postCheck.d.ts.map +0 -1
- package/dist/packages/app-store/closecom/api/check.d.ts +0 -3
- package/dist/packages/app-store/closecom/api/check.d.ts.map +0 -1
- package/dist/packages/app-store/closecom/pages/setup/index.d.ts +0 -2
- package/dist/packages/app-store/closecom/pages/setup/index.d.ts.map +0 -1
- package/dist/packages/features/settings/layouts/SettingsLayout.d.ts +0 -12
- package/dist/packages/features/settings/layouts/SettingsLayout.d.ts.map +0 -1
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { ba as g, aL as Q, aK as v, k as Ce, e as H } from "./index-iPxcpUfi.js";
|
|
2
|
+
import l, { useState as R, useEffect as Z } from "react";
|
|
3
|
+
var B = {};
|
|
4
|
+
Object.defineProperty(B, "__esModule", { value: !0 });
|
|
5
|
+
function L(n) {
|
|
6
|
+
"@babel/helpers - typeof";
|
|
7
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? L = function(e) {
|
|
8
|
+
return typeof e;
|
|
9
|
+
} : L = function(e) {
|
|
10
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
11
|
+
}, L(n);
|
|
12
|
+
}
|
|
13
|
+
var ee = "https://js.stripe.com/v3", Oe = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, G = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", we = function() {
|
|
14
|
+
for (var e = document.querySelectorAll('script[src^="'.concat(ee, '"]')), t = 0; t < e.length; t++) {
|
|
15
|
+
var r = e[t];
|
|
16
|
+
if (Oe.test(r.src))
|
|
17
|
+
return r;
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}, Pe = function(e) {
|
|
21
|
+
var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", r = document.createElement("script");
|
|
22
|
+
r.src = "".concat(ee).concat(t);
|
|
23
|
+
var i = document.head || document.body;
|
|
24
|
+
if (!i)
|
|
25
|
+
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
26
|
+
return i.appendChild(r), r;
|
|
27
|
+
}, je = function(e, t) {
|
|
28
|
+
!e || !e._registerWrapper || e._registerWrapper({
|
|
29
|
+
name: "stripe-js",
|
|
30
|
+
version: "1.35.0",
|
|
31
|
+
startTime: t
|
|
32
|
+
});
|
|
33
|
+
}, x = null, _e = function(e) {
|
|
34
|
+
return x !== null || (x = new Promise(function(t, r) {
|
|
35
|
+
if (typeof window > "u") {
|
|
36
|
+
t(null);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (window.Stripe && e && console.warn(G), window.Stripe) {
|
|
40
|
+
t(window.Stripe);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
var i = we();
|
|
45
|
+
i && e ? console.warn(G) : i || (i = Pe(e)), i.addEventListener("load", function() {
|
|
46
|
+
window.Stripe ? t(window.Stripe) : r(new Error("Stripe.js not available"));
|
|
47
|
+
}), i.addEventListener("error", function() {
|
|
48
|
+
r(new Error("Failed to load Stripe.js"));
|
|
49
|
+
});
|
|
50
|
+
} catch (a) {
|
|
51
|
+
r(a);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
})), x;
|
|
55
|
+
}, xe = function(e, t, r) {
|
|
56
|
+
if (e === null)
|
|
57
|
+
return null;
|
|
58
|
+
var i = e.apply(void 0, t);
|
|
59
|
+
return je(i, r), i;
|
|
60
|
+
}, Le = function(e) {
|
|
61
|
+
var t = `invalid load parameters; expected object of shape
|
|
62
|
+
|
|
63
|
+
{advancedFraudSignals: boolean}
|
|
64
|
+
|
|
65
|
+
but received
|
|
66
|
+
|
|
67
|
+
`.concat(JSON.stringify(e), `
|
|
68
|
+
`);
|
|
69
|
+
if (e === null || L(e) !== "object")
|
|
70
|
+
throw new Error(t);
|
|
71
|
+
if (Object.keys(e).length === 1 && typeof e.advancedFraudSignals == "boolean")
|
|
72
|
+
return e;
|
|
73
|
+
throw new Error(t);
|
|
74
|
+
}, te, ne = !1, re = function() {
|
|
75
|
+
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
76
|
+
t[r] = arguments[r];
|
|
77
|
+
ne = !0;
|
|
78
|
+
var i = Date.now();
|
|
79
|
+
return _e(te).then(function(a) {
|
|
80
|
+
return xe(a, t, i);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
re.setLoadParameters = function(n) {
|
|
84
|
+
if (ne)
|
|
85
|
+
throw new Error("You cannot change load parameters after calling loadStripe");
|
|
86
|
+
te = Le(n);
|
|
87
|
+
};
|
|
88
|
+
B.loadStripe = re;
|
|
89
|
+
var Ae = B;
|
|
90
|
+
const Re = process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY || "";
|
|
91
|
+
let N;
|
|
92
|
+
const Ie = (n) => (N || (N = Ae.loadStripe(
|
|
93
|
+
n || Re
|
|
94
|
+
/* , {
|
|
95
|
+
locale: "es-419" TODO: Handle multiple locales,
|
|
96
|
+
} */
|
|
97
|
+
)), N), ke = Ie;
|
|
98
|
+
function Y(n, e) {
|
|
99
|
+
var t = Object.keys(n);
|
|
100
|
+
if (Object.getOwnPropertySymbols) {
|
|
101
|
+
var r = Object.getOwnPropertySymbols(n);
|
|
102
|
+
e && (r = r.filter(function(i) {
|
|
103
|
+
return Object.getOwnPropertyDescriptor(n, i).enumerable;
|
|
104
|
+
})), t.push.apply(t, r);
|
|
105
|
+
}
|
|
106
|
+
return t;
|
|
107
|
+
}
|
|
108
|
+
function V(n) {
|
|
109
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
110
|
+
var t = arguments[e] != null ? arguments[e] : {};
|
|
111
|
+
e % 2 ? Y(Object(t), !0).forEach(function(r) {
|
|
112
|
+
ae(n, r, t[r]);
|
|
113
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Y(Object(t)).forEach(function(r) {
|
|
114
|
+
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return n;
|
|
118
|
+
}
|
|
119
|
+
function A(n) {
|
|
120
|
+
"@babel/helpers - typeof";
|
|
121
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? A = function(e) {
|
|
122
|
+
return typeof e;
|
|
123
|
+
} : A = function(e) {
|
|
124
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
125
|
+
}, A(n);
|
|
126
|
+
}
|
|
127
|
+
function ae(n, e, t) {
|
|
128
|
+
return e in n ? Object.defineProperty(n, e, {
|
|
129
|
+
value: t,
|
|
130
|
+
enumerable: !0,
|
|
131
|
+
configurable: !0,
|
|
132
|
+
writable: !0
|
|
133
|
+
}) : n[e] = t, n;
|
|
134
|
+
}
|
|
135
|
+
function Ne(n, e) {
|
|
136
|
+
return Te(n) || Be(n, e) || $e(n, e) || Ue();
|
|
137
|
+
}
|
|
138
|
+
function Te(n) {
|
|
139
|
+
if (Array.isArray(n))
|
|
140
|
+
return n;
|
|
141
|
+
}
|
|
142
|
+
function Be(n, e) {
|
|
143
|
+
var t = n && (typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"]);
|
|
144
|
+
if (t != null) {
|
|
145
|
+
var r = [], i = !0, a = !1, f, u;
|
|
146
|
+
try {
|
|
147
|
+
for (t = t.call(n); !(i = (f = t.next()).done) && (r.push(f.value), !(e && r.length === e)); i = !0)
|
|
148
|
+
;
|
|
149
|
+
} catch (o) {
|
|
150
|
+
a = !0, u = o;
|
|
151
|
+
} finally {
|
|
152
|
+
try {
|
|
153
|
+
!i && t.return != null && t.return();
|
|
154
|
+
} finally {
|
|
155
|
+
if (a)
|
|
156
|
+
throw u;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return r;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function $e(n, e) {
|
|
163
|
+
if (n) {
|
|
164
|
+
if (typeof n == "string")
|
|
165
|
+
return X(n, e);
|
|
166
|
+
var t = Object.prototype.toString.call(n).slice(8, -1);
|
|
167
|
+
if (t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set")
|
|
168
|
+
return Array.from(n);
|
|
169
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
170
|
+
return X(n, e);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function X(n, e) {
|
|
174
|
+
(e == null || e > n.length) && (e = n.length);
|
|
175
|
+
for (var t = 0, r = new Array(e); t < e; t++)
|
|
176
|
+
r[t] = n[t];
|
|
177
|
+
return r;
|
|
178
|
+
}
|
|
179
|
+
function Ue() {
|
|
180
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
181
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
182
|
+
}
|
|
183
|
+
var T = function(e) {
|
|
184
|
+
var t = l.useRef(e);
|
|
185
|
+
return l.useEffect(function() {
|
|
186
|
+
t.current = e;
|
|
187
|
+
}, [e]), t.current;
|
|
188
|
+
}, P = function(e) {
|
|
189
|
+
return e !== null && A(e) === "object";
|
|
190
|
+
}, Fe = function(e) {
|
|
191
|
+
return P(e) && typeof e.then == "function";
|
|
192
|
+
}, We = function(e) {
|
|
193
|
+
return P(e) && typeof e.elements == "function" && typeof e.createToken == "function" && typeof e.createPaymentMethod == "function" && typeof e.confirmCardPayment == "function";
|
|
194
|
+
}, z = "[object Object]", De = function n(e, t) {
|
|
195
|
+
if (!P(e) || !P(t))
|
|
196
|
+
return e === t;
|
|
197
|
+
var r = Array.isArray(e), i = Array.isArray(t);
|
|
198
|
+
if (r !== i)
|
|
199
|
+
return !1;
|
|
200
|
+
var a = Object.prototype.toString.call(e) === z, f = Object.prototype.toString.call(t) === z;
|
|
201
|
+
if (a !== f)
|
|
202
|
+
return !1;
|
|
203
|
+
if (!a && !r)
|
|
204
|
+
return e === t;
|
|
205
|
+
var u = Object.keys(e), o = Object.keys(t);
|
|
206
|
+
if (u.length !== o.length)
|
|
207
|
+
return !1;
|
|
208
|
+
for (var s = {}, d = 0; d < u.length; d += 1)
|
|
209
|
+
s[u[d]] = !0;
|
|
210
|
+
for (var S = 0; S < o.length; S += 1)
|
|
211
|
+
s[o[S]] = !0;
|
|
212
|
+
var c = Object.keys(s);
|
|
213
|
+
if (c.length !== u.length)
|
|
214
|
+
return !1;
|
|
215
|
+
var b = e, C = t, O = function(_) {
|
|
216
|
+
return n(b[_], C[_]);
|
|
217
|
+
};
|
|
218
|
+
return c.every(O);
|
|
219
|
+
}, oe = function(e, t, r) {
|
|
220
|
+
return P(e) ? Object.keys(e).reduce(function(i, a) {
|
|
221
|
+
var f = !P(t) || !De(e[a], t[a]);
|
|
222
|
+
return r.includes(a) ? (f && console.warn("Unsupported prop change: options.".concat(a, " is not a mutable property.")), i) : f ? V(V({}, i || {}), {}, ae({}, a, e[a])) : i;
|
|
223
|
+
}, null) : null;
|
|
224
|
+
}, qe = "Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.", J = function(e) {
|
|
225
|
+
if (e === null || We(e))
|
|
226
|
+
return e;
|
|
227
|
+
throw new Error(qe);
|
|
228
|
+
}, Me = function(e) {
|
|
229
|
+
if (Fe(e))
|
|
230
|
+
return {
|
|
231
|
+
tag: "async",
|
|
232
|
+
stripePromise: Promise.resolve(e).then(J)
|
|
233
|
+
};
|
|
234
|
+
var t = J(e);
|
|
235
|
+
return t === null ? {
|
|
236
|
+
tag: "empty"
|
|
237
|
+
} : {
|
|
238
|
+
tag: "sync",
|
|
239
|
+
stripe: t
|
|
240
|
+
};
|
|
241
|
+
}, $ = /* @__PURE__ */ l.createContext(null);
|
|
242
|
+
$.displayName = "ElementsContext";
|
|
243
|
+
var Ke = function(e, t) {
|
|
244
|
+
if (!e)
|
|
245
|
+
throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t, " in an <Elements> provider."));
|
|
246
|
+
return e;
|
|
247
|
+
}, ie = function(e) {
|
|
248
|
+
var t = e.stripe, r = e.options, i = e.children, a = l.useMemo(function() {
|
|
249
|
+
return Me(t);
|
|
250
|
+
}, [t]), f = l.useState(function() {
|
|
251
|
+
return {
|
|
252
|
+
stripe: a.tag === "sync" ? a.stripe : null,
|
|
253
|
+
elements: a.tag === "sync" ? a.stripe.elements(r) : null
|
|
254
|
+
};
|
|
255
|
+
}), u = Ne(f, 2), o = u[0], s = u[1];
|
|
256
|
+
l.useEffect(function() {
|
|
257
|
+
var c = !0, b = function(O) {
|
|
258
|
+
s(function(j) {
|
|
259
|
+
return j.stripe ? j : {
|
|
260
|
+
stripe: O,
|
|
261
|
+
elements: O.elements(r)
|
|
262
|
+
};
|
|
263
|
+
});
|
|
264
|
+
};
|
|
265
|
+
return a.tag === "async" && !o.stripe ? a.stripePromise.then(function(C) {
|
|
266
|
+
C && c && b(C);
|
|
267
|
+
}) : a.tag === "sync" && !o.stripe && b(a.stripe), function() {
|
|
268
|
+
c = !1;
|
|
269
|
+
};
|
|
270
|
+
}, [a, o, r]);
|
|
271
|
+
var d = T(t);
|
|
272
|
+
l.useEffect(function() {
|
|
273
|
+
d !== null && d !== t && console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.");
|
|
274
|
+
}, [d, t]);
|
|
275
|
+
var S = T(r);
|
|
276
|
+
return l.useEffect(function() {
|
|
277
|
+
if (o.elements) {
|
|
278
|
+
var c = oe(r, S, ["clientSecret", "fonts"]);
|
|
279
|
+
c && o.elements.update(c);
|
|
280
|
+
}
|
|
281
|
+
}, [r, S, o.elements]), l.useEffect(function() {
|
|
282
|
+
var c = o.stripe;
|
|
283
|
+
!c || !c._registerWrapper || !c.registerAppInfo || (c._registerWrapper({
|
|
284
|
+
name: "react-stripe-js",
|
|
285
|
+
version: "1.10.0"
|
|
286
|
+
}), c.registerAppInfo({
|
|
287
|
+
name: "react-stripe-js",
|
|
288
|
+
version: "1.10.0",
|
|
289
|
+
url: "https://stripe.com/docs/stripe-js/react"
|
|
290
|
+
}));
|
|
291
|
+
}, [o.stripe]), /* @__PURE__ */ l.createElement($.Provider, {
|
|
292
|
+
value: o
|
|
293
|
+
}, i);
|
|
294
|
+
};
|
|
295
|
+
ie.propTypes = {
|
|
296
|
+
stripe: g.any,
|
|
297
|
+
options: g.object
|
|
298
|
+
};
|
|
299
|
+
var I = function(e) {
|
|
300
|
+
var t = l.useContext($);
|
|
301
|
+
return Ke(t, e);
|
|
302
|
+
}, He = function() {
|
|
303
|
+
var e = I("calls useElements()"), t = e.elements;
|
|
304
|
+
return t;
|
|
305
|
+
}, Ge = function() {
|
|
306
|
+
var e = I("calls useStripe()"), t = e.stripe;
|
|
307
|
+
return t;
|
|
308
|
+
};
|
|
309
|
+
g.func.isRequired;
|
|
310
|
+
var h = function(e) {
|
|
311
|
+
var t = l.useRef(e);
|
|
312
|
+
return l.useEffect(function() {
|
|
313
|
+
t.current = e;
|
|
314
|
+
}, [e]), function() {
|
|
315
|
+
t.current && t.current.apply(t, arguments);
|
|
316
|
+
};
|
|
317
|
+
}, E = function() {
|
|
318
|
+
}, Ye = function(e) {
|
|
319
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
320
|
+
}, p = function(e, t) {
|
|
321
|
+
var r = "".concat(Ye(e), "Element"), i = function(o) {
|
|
322
|
+
var s = o.id, d = o.className, S = o.options, c = S === void 0 ? {} : S, b = o.onBlur, C = b === void 0 ? E : b, O = o.onFocus, j = O === void 0 ? E : O, _ = o.onReady, se = _ === void 0 ? E : _, U = o.onChange, ce = U === void 0 ? E : U, F = o.onEscape, ue = F === void 0 ? E : F, W = o.onClick, le = W === void 0 ? E : W, D = o.onLoadError, fe = D === void 0 ? E : D, q = o.onLoaderStart, de = q === void 0 ? E : q, pe = I("mounts <".concat(r, ">")), M = pe.elements, w = l.useRef(null), k = l.useRef(null), me = h(se), ve = h(C), ye = h(j), ge = h(le), Se = h(ce), be = h(ue), he = h(fe), Ee = h(de);
|
|
323
|
+
l.useLayoutEffect(function() {
|
|
324
|
+
if (w.current == null && M && k.current != null) {
|
|
325
|
+
var y = M.create(e, c);
|
|
326
|
+
w.current = y, y.mount(k.current), y.on("ready", function() {
|
|
327
|
+
return me(y);
|
|
328
|
+
}), y.on("change", Se), y.on("blur", ve), y.on("focus", ye), y.on("escape", be), y.on("loaderror", he), y.on("loaderstart", Ee), y.on("click", ge);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
var K = T(c);
|
|
332
|
+
return l.useEffect(function() {
|
|
333
|
+
if (w.current) {
|
|
334
|
+
var y = oe(c, K, ["paymentRequest"]);
|
|
335
|
+
y && w.current.update(y);
|
|
336
|
+
}
|
|
337
|
+
}, [c, K]), l.useLayoutEffect(function() {
|
|
338
|
+
return function() {
|
|
339
|
+
w.current && (w.current.destroy(), w.current = null);
|
|
340
|
+
};
|
|
341
|
+
}, []), /* @__PURE__ */ l.createElement("div", {
|
|
342
|
+
id: s,
|
|
343
|
+
className: d,
|
|
344
|
+
ref: k
|
|
345
|
+
});
|
|
346
|
+
}, a = function(o) {
|
|
347
|
+
I("mounts <".concat(r, ">"));
|
|
348
|
+
var s = o.id, d = o.className;
|
|
349
|
+
return /* @__PURE__ */ l.createElement("div", {
|
|
350
|
+
id: s,
|
|
351
|
+
className: d
|
|
352
|
+
});
|
|
353
|
+
}, f = t ? a : i;
|
|
354
|
+
return f.propTypes = {
|
|
355
|
+
id: g.string,
|
|
356
|
+
className: g.string,
|
|
357
|
+
onChange: g.func,
|
|
358
|
+
onBlur: g.func,
|
|
359
|
+
onFocus: g.func,
|
|
360
|
+
onReady: g.func,
|
|
361
|
+
onClick: g.func,
|
|
362
|
+
onLoadError: g.func,
|
|
363
|
+
onLoaderStart: g.func,
|
|
364
|
+
options: g.object
|
|
365
|
+
}, f.displayName = r, f.__elementType = e, f;
|
|
366
|
+
}, m = typeof window > "u";
|
|
367
|
+
p("auBankAccount", m);
|
|
368
|
+
p("card", m);
|
|
369
|
+
p("cardNumber", m);
|
|
370
|
+
p("cardExpiry", m);
|
|
371
|
+
p("cardCvc", m);
|
|
372
|
+
p("fpxBank", m);
|
|
373
|
+
p("iban", m);
|
|
374
|
+
p("idealBank", m);
|
|
375
|
+
p("p24Bank", m);
|
|
376
|
+
p("epsBank", m);
|
|
377
|
+
var Ve = p("payment", m);
|
|
378
|
+
p("paymentRequestButton", m);
|
|
379
|
+
p("linkAuthentication", m);
|
|
380
|
+
p("shippingAddress", m);
|
|
381
|
+
p("affirmMessage", m);
|
|
382
|
+
p("afterpayClearpayMessage", m);
|
|
383
|
+
const Xe = (n) => {
|
|
384
|
+
const { t: e, i18n: t } = Q(), { paymentOption: r, elements: i, state: a, onPaymentElementChange: f } = n, [u, o] = R(!1), [s, d] = R(r !== "HOLD"), S = u || !s || ["processing", "error"].includes(a.status), c = {
|
|
385
|
+
layout: "accordion"
|
|
386
|
+
};
|
|
387
|
+
return Z(() => {
|
|
388
|
+
i == null || i.update({ locale: t.language });
|
|
389
|
+
}, [i, t.language]), /* @__PURE__ */ v.jsxs("form", { id: "payment-form", className: "bg-subtle mt-4 rounded-md p-6", onSubmit: n.onSubmit, children: [
|
|
390
|
+
/* @__PURE__ */ v.jsx("div", { children: /* @__PURE__ */ v.jsx(Ve, { options: c, onChange: (b) => f() }) }),
|
|
391
|
+
r === "HOLD" && /* @__PURE__ */ v.jsx("div", { className: "bg-info mb-5 mt-2 rounded-md p-3", children: /* @__PURE__ */ v.jsx(
|
|
392
|
+
Ce,
|
|
393
|
+
{
|
|
394
|
+
description: e("acknowledge_booking_no_show_fee", {
|
|
395
|
+
amount: n.payment.amount / 100,
|
|
396
|
+
formatParams: { amount: { currency: n.payment.currency } }
|
|
397
|
+
}),
|
|
398
|
+
onChange: (b) => d(b.target.checked),
|
|
399
|
+
descriptionClassName: "text-info font-semibold"
|
|
400
|
+
}
|
|
401
|
+
) }),
|
|
402
|
+
/* @__PURE__ */ v.jsxs("div", { className: "mt-2 flex justify-end space-x-2", children: [
|
|
403
|
+
/* @__PURE__ */ v.jsx(
|
|
404
|
+
H,
|
|
405
|
+
{
|
|
406
|
+
color: "minimal",
|
|
407
|
+
disabled: S,
|
|
408
|
+
id: "cancel",
|
|
409
|
+
type: "button",
|
|
410
|
+
loading: u,
|
|
411
|
+
onClick: () => {
|
|
412
|
+
o(!0), n.onCancel();
|
|
413
|
+
},
|
|
414
|
+
children: /* @__PURE__ */ v.jsx("span", { id: "button-text", children: e("cancel") })
|
|
415
|
+
}
|
|
416
|
+
),
|
|
417
|
+
/* @__PURE__ */ v.jsx(
|
|
418
|
+
H,
|
|
419
|
+
{
|
|
420
|
+
type: "submit",
|
|
421
|
+
disabled: S,
|
|
422
|
+
loading: a.status === "processing",
|
|
423
|
+
id: "submit",
|
|
424
|
+
color: "secondary",
|
|
425
|
+
children: /* @__PURE__ */ v.jsx("span", { id: "button-text", children: a.status === "processing" ? /* @__PURE__ */ v.jsx("div", { className: "spinner", id: "spinner" }) : e(r === "HOLD" ? "submit_card" : "pay_now") })
|
|
426
|
+
}
|
|
427
|
+
)
|
|
428
|
+
] }),
|
|
429
|
+
a.status === "error" && /* @__PURE__ */ v.jsx("div", { className: "mt-4 text-center text-red-900 dark:text-gray-300", role: "alert", children: a.error.message })
|
|
430
|
+
] });
|
|
431
|
+
}, ze = (n) => {
|
|
432
|
+
const { t: e } = Q(), t = He(), r = n.payment.paymentOption, i = n.booking.attendees[0].email, a = Ge(), [f, u] = R({ status: "idle" });
|
|
433
|
+
return /* @__PURE__ */ v.jsx(
|
|
434
|
+
Xe,
|
|
435
|
+
{
|
|
436
|
+
...n,
|
|
437
|
+
elements: t,
|
|
438
|
+
paymentOption: r,
|
|
439
|
+
state: f,
|
|
440
|
+
onSubmit: async (o) => {
|
|
441
|
+
var d;
|
|
442
|
+
if (o.preventDefault(), !a || !t)
|
|
443
|
+
return;
|
|
444
|
+
u({ status: "processing" });
|
|
445
|
+
let s;
|
|
446
|
+
n.booking.uid, r === "HOLD" && "setupIntent" in n.payment.data ? (s = await a.confirmSetup({
|
|
447
|
+
elements: t,
|
|
448
|
+
redirect: "if_required"
|
|
449
|
+
}), s.setupIntent && (s.setupIntent.id, s.setupIntent.client_secret, s.setupIntent.status)) : r === "ON_BOOKING" && (s = await a.confirmPayment({
|
|
450
|
+
elements: t,
|
|
451
|
+
redirect: "if_required"
|
|
452
|
+
}), s.paymentIntent && (s.paymentIntent.id, s.paymentIntent.client_secret, s.paymentIntent.status)), s != null && s.error ? u({
|
|
453
|
+
status: "error",
|
|
454
|
+
error: new Error(`Payment failed: ${s.error.message}`)
|
|
455
|
+
}) : (u({ status: "idle" }), (d = n.onPaymentSuccess) == null || d.call(n, n), n.location && (n.location.includes("integration") ? e("web_conferencing_details_to_follow") : n.location));
|
|
456
|
+
},
|
|
457
|
+
onCancel: () => {
|
|
458
|
+
var o;
|
|
459
|
+
(o = n.onPaymentCancellation) == null || o.call(n, n);
|
|
460
|
+
},
|
|
461
|
+
onPaymentElementChange: () => {
|
|
462
|
+
u({ status: "idle" });
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
}, Ze = (n) => {
|
|
467
|
+
const e = ke(n.payment.data.stripe_publishable_key), [t, r] = R("stripe");
|
|
468
|
+
return Z(() => {
|
|
469
|
+
document.documentElement.classList.contains("dark") && r("night");
|
|
470
|
+
}, []), /* @__PURE__ */ v.jsx(
|
|
471
|
+
ie,
|
|
472
|
+
{
|
|
473
|
+
stripe: e,
|
|
474
|
+
options: {
|
|
475
|
+
clientSecret: n.clientSecret,
|
|
476
|
+
appearance: {
|
|
477
|
+
theme: t
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
children: /* @__PURE__ */ v.jsx(ze, { ...n })
|
|
481
|
+
}
|
|
482
|
+
);
|
|
483
|
+
};
|
|
484
|
+
export {
|
|
485
|
+
Ze as default
|
|
486
|
+
};
|
package/dist/cal-atoms.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bD as a, bE as n, bR as t, bB as b, bY as o, b_ as l, bQ as r, c0 as C, bX as i, bZ as d, bC as u, bP as c, c1 as S, bW as g, b$ as m, bT as p, bF as v, bM as y, bN as E, bL as T, bG as B, bS as k, bJ as A, bK as P, bH as f, b8 as D, bO as I, bU as x, bI as F, bV as G } from "./index-iPxcpUfi.js";
|
|
2
2
|
export {
|
|
3
3
|
a as AvailabilitySettings,
|
|
4
4
|
n as Booker,
|
|
@@ -25,9 +25,9 @@ export {
|
|
|
25
25
|
A as useEvent,
|
|
26
26
|
P as useEventTypeById,
|
|
27
27
|
f as useEventTypes,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
D as useIsPlatform,
|
|
29
|
+
I as useMe,
|
|
30
|
+
x as useRemoveSelectedCalendar,
|
|
31
31
|
F as useTeamEventTypes,
|
|
32
32
|
G as useTeams
|
|
33
33
|
};
|