@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.
Files changed (115) hide show
  1. package/dist/{AddressInput-fp5qF4sP.js → AddressInput-oW1jYLbW.js} +1 -1
  2. package/dist/{AlbyPriceComponent-WNrzLlXW.js → AlbyPriceComponent-4Tfuuhj0.js} +1 -1
  3. package/dist/{AppCard-i4bbunNu.js → AppCard--EOFyaO8.js} +1 -1
  4. package/dist/{AppSettingsInterface-TW9vJOoI.js → AppSettingsInterface-_yOzvufk.js} +1 -1
  5. package/dist/{AppSettingsInterface-N52rUkrM.js → AppSettingsInterface-dqVEnQ6I.js} +1 -1
  6. package/dist/{AppSettingsInterface-MRKlt77b.js → AppSettingsInterface-qSduJv1b.js} +1 -1
  7. package/dist/{Card-nU2Oxfou.js → Card-efUk3GNO.js} +1 -1
  8. package/dist/{DateRangePicker-zC5DKhrn.js → DateRangePicker-tkR2_S7I.js} +1 -1
  9. package/dist/{EventTypeAppCardInterface-BV-7vxVF.js → EventTypeAppCardInterface-0Nx9FYGL.js} +4 -4
  10. package/dist/{EventTypeAppCardInterface-btNTU6vZ.js → EventTypeAppCardInterface-2qDTLaLK.js} +4 -4
  11. package/dist/{EventTypeAppCardInterface-bcXxch2-.js → EventTypeAppCardInterface-4guqFA_P.js} +3 -3
  12. package/dist/{EventTypeAppCardInterface-MAn6ziw5.js → EventTypeAppCardInterface-6v-TNkAa.js} +3 -3
  13. package/dist/{EventTypeAppCardInterface-_m3lSLFr.js → EventTypeAppCardInterface-7R_oLI5n.js} +2 -2
  14. package/dist/{EventTypeAppCardInterface-BP7Ex_ei.js → EventTypeAppCardInterface-AsaLLeLm.js} +3 -3
  15. package/dist/{EventTypeAppCardInterface-Mx5nZATt.js → EventTypeAppCardInterface-CrsE0C1m.js} +3 -3
  16. package/dist/{EventTypeAppCardInterface-fyocINFK.js → EventTypeAppCardInterface-DQxNxQ6q.js} +4 -4
  17. package/dist/{EventTypeAppCardInterface-dItaOzoi.js → EventTypeAppCardInterface-ENYuJp-q.js} +4 -4
  18. package/dist/{EventTypeAppCardInterface-cN6WeqoW.js → EventTypeAppCardInterface-JvOifRnW.js} +4 -4
  19. package/dist/{EventTypeAppCardInterface-DlObORsm.js → EventTypeAppCardInterface-KaecmIYD.js} +4 -4
  20. package/dist/{EventTypeAppCardInterface-IAezhqal.js → EventTypeAppCardInterface-MgmPQeHW.js} +4 -4
  21. package/dist/{EventTypeAppCardInterface-uiOS4XaX.js → EventTypeAppCardInterface-PqNK02Xl.js} +3 -3
  22. package/dist/{EventTypeAppCardInterface-efL7j0sK.js → EventTypeAppCardInterface-SK5vlRQq.js} +3 -3
  23. package/dist/{EventTypeAppCardInterface-m7ZJO_Gi.js → EventTypeAppCardInterface-T3RAKWd4.js} +3 -3
  24. package/dist/{EventTypeAppCardInterface-GKvnvUPT.js → EventTypeAppCardInterface-VVekAt4E.js} +4 -4
  25. package/dist/{EventTypeAppCardInterface-3WEbQqwX.js → EventTypeAppCardInterface-Z4I5pK7s.js} +3 -3
  26. package/dist/{EventTypeAppCardInterface-QhjVwBbL.js → EventTypeAppCardInterface-d5KqEvnt.js} +2 -2
  27. package/dist/{EventTypeAppCardInterface--x1bbPB1.js → EventTypeAppCardInterface-ejsl3FEm.js} +3 -3
  28. package/dist/{EventTypeAppCardInterface-8tmNi_8_.js → EventTypeAppCardInterface-jeOexhMt.js} +3 -3
  29. package/dist/{EventTypeAppCardInterface-kAd2JbQx.js → EventTypeAppCardInterface-m8qyCE4X.js} +3 -3
  30. package/dist/{EventTypeAppCardInterface-7RTrZn6I.js → EventTypeAppCardInterface-qVs7SsGQ.js} +4 -4
  31. package/dist/{EventTypeAppCardInterface-q9yk5DT1.js → EventTypeAppCardInterface-wIbogzGM.js} +3 -3
  32. package/dist/EventTypeAppCardInterface-x2oFHd3Y.js +23 -0
  33. package/dist/{EventTypeAppSettingsInterface-K3v6ddWP.js → EventTypeAppSettingsInterface-1CVby8zj.js} +1 -1
  34. package/dist/{EventTypeAppSettingsInterface-XMynhO4N.js → EventTypeAppSettingsInterface-3i2pjW_0.js} +1 -1
  35. package/dist/{EventTypeAppSettingsInterface-TaCrvrDr.js → EventTypeAppSettingsInterface-4HUFCqvb.js} +1 -1
  36. package/dist/{EventTypeAppSettingsInterface-YtGDQGv6.js → EventTypeAppSettingsInterface-JQSEDgUX.js} +1 -1
  37. package/dist/{EventTypeAppSettingsInterface-uhHjJmtM.js → EventTypeAppSettingsInterface-UpIhvGKP.js} +1 -1
  38. package/dist/{EventTypeAppSettingsInterface-zunsXzpl.js → EventTypeAppSettingsInterface-WV4IS06h.js} +1 -1
  39. package/dist/{EventTypeAppSettingsInterface-p7_-Y_Ab.js → EventTypeAppSettingsInterface-XEIl75NM.js} +1 -1
  40. package/dist/{EventTypeAppSettingsInterface-WwyJDARg.js → EventTypeAppSettingsInterface-_WJogMeF.js} +1 -1
  41. package/dist/{EventTypeAppSettingsInterface-nE6SJ25Q.js → EventTypeAppSettingsInterface-bwK9InWS.js} +1 -1
  42. package/dist/{EventTypeAppSettingsInterface-uRbVB2R5.js → EventTypeAppSettingsInterface-oWlc3srG.js} +1 -1
  43. package/dist/{EventTypeAppSettingsInterface-SXE4FAhe.js → EventTypeAppSettingsInterface-xyETGKCQ.js} +1 -1
  44. package/dist/{InstallAppButton-DEad89iX.js → InstallAppButton-3yN6MK2U.js} +1 -1
  45. package/dist/{InstallAppButton-oVO4d3PS.js → InstallAppButton-BQyl9hge.js} +1 -1
  46. package/dist/{InstallAppButton-O9pAEgyM.js → InstallAppButton-a_HOFKtt.js} +1 -1
  47. package/dist/{InstallAppButton-rZ36q66L.js → InstallAppButton-cub8aavs.js} +1 -1
  48. package/dist/{PhoneInput-drURqB5k.js → PhoneInput-68Gve8nD.js} +1 -1
  49. package/dist/StripePaymentForm-2z2L7K26.js +486 -0
  50. package/dist/cal-atoms.js +4 -4
  51. package/dist/cal-atoms.umd.cjs +404 -312
  52. package/dist/{framer-features-4MVDXzUi.js → framer-features-ZUEIy9az.js} +27 -27
  53. package/dist/{index-QBwBOYLQ.js → index-Oh9i2m7B.js} +1 -1
  54. package/dist/{index-tjEJ5F1K.js → index-cxDrvoq9.js} +1 -1
  55. package/dist/{index-_JT8rq0w.js → index-iPxcpUfi.js} +88963 -62247
  56. package/dist/index-rHR8IK-w.js +256 -0
  57. package/dist/{index-_cSqrkOk.js → index-x-vO53Qr.js} +4 -4
  58. package/dist/packages/app-store/_pages/setup/index.d.ts +0 -1
  59. package/dist/packages/app-store/_pages/setup/index.d.ts.map +1 -1
  60. package/dist/packages/app-store/_utils/paid-apps.d.ts.map +1 -1
  61. package/dist/packages/app-store/apps.keys-schemas.generated.d.ts +10 -1
  62. package/dist/packages/app-store/apps.keys-schemas.generated.d.ts.map +1 -1
  63. package/dist/packages/app-store/apps.metadata.generated.d.ts +1 -0
  64. package/dist/packages/app-store/apps.metadata.generated.d.ts.map +1 -1
  65. package/dist/packages/app-store/closecom/api/_getAdd.d.ts +2 -1
  66. package/dist/packages/app-store/closecom/api/_getAdd.d.ts.map +1 -1
  67. package/dist/packages/app-store/closecom/api/add.d.ts.map +1 -1
  68. package/dist/packages/app-store/closecom/api/{_postAdd.d.ts → callback.d.ts} +1 -2
  69. package/dist/packages/app-store/closecom/api/callback.d.ts.map +1 -0
  70. package/dist/packages/app-store/closecom/api/index.d.ts +1 -1
  71. package/dist/packages/app-store/closecom/api/index.d.ts.map +1 -1
  72. package/dist/packages/app-store/closecom/config.json.d.ts +2 -1
  73. package/dist/packages/app-store/closecom/lib/CrmService.d.ts +1 -4
  74. package/dist/packages/app-store/closecom/lib/CrmService.d.ts.map +1 -1
  75. package/dist/packages/app-store/closecom/zod.d.ts +10 -1
  76. package/dist/packages/app-store/closecom/zod.d.ts.map +1 -1
  77. package/dist/packages/app-store/stripepayment/api/subscription.d.ts.map +1 -1
  78. package/dist/packages/app-store/stripepayment/lib/PaymentService.d.ts.map +1 -1
  79. package/dist/packages/features/auth/signup/handlers/calcomHandler.d.ts.map +1 -1
  80. package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts.map +1 -1
  81. package/dist/packages/features/bookings/components/event-meta/Members.d.ts.map +1 -1
  82. package/dist/packages/features/ee/payments/components/Payment.d.ts +1 -2
  83. package/dist/packages/features/ee/payments/components/Payment.d.ts.map +1 -1
  84. package/dist/packages/features/ee/workflows/api/scheduleEmailReminders.d.ts.map +1 -1
  85. package/dist/packages/features/ee/workflows/lib/reminders/emailReminderManager.d.ts.map +1 -1
  86. package/dist/packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.d.ts +1 -1
  87. package/dist/packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.d.ts.map +1 -1
  88. package/dist/packages/features/insights/components/RoutingFormResponsesTable.d.ts.map +1 -1
  89. package/dist/packages/features/settings/appDir/SettingsLayoutAppDirClient.d.ts.map +1 -1
  90. package/dist/packages/lib/CloseCom.d.ts +15 -3
  91. package/dist/packages/lib/CloseCom.d.ts.map +1 -1
  92. package/dist/packages/lib/server/repository/booking.d.ts.map +1 -1
  93. package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts +1 -0
  94. package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
  95. package/dist/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.d.ts +10 -1
  96. package/dist/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.d.ts.map +1 -1
  97. package/dist/packages/platform/atoms/lib/markdownToSafeHTML.d.ts.map +1 -1
  98. package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts +2 -0
  99. package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts.map +1 -1
  100. package/dist/packages/prisma/seed-app-store.d.ts.map +1 -1
  101. package/dist/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.d.ts.map +1 -1
  102. package/dist/{useIsAppEnabled-P8nFP-e-.js → useIsAppEnabled-FnJj-kXT.js} +1 -1
  103. package/package.json +4 -4
  104. package/dist/EventTypeAppCardInterface-vL-xcpz3.js +0 -23
  105. package/dist/StripePaymentForm-vvGA0-jZ.js +0 -1148
  106. package/dist/index-taPshKtT.js +0 -399
  107. package/dist/packages/app-store/closecom/api/_postAdd.d.ts.map +0 -1
  108. package/dist/packages/app-store/closecom/api/_postCheck.d.ts +0 -5
  109. package/dist/packages/app-store/closecom/api/_postCheck.d.ts.map +0 -1
  110. package/dist/packages/app-store/closecom/api/check.d.ts +0 -3
  111. package/dist/packages/app-store/closecom/api/check.d.ts.map +0 -1
  112. package/dist/packages/app-store/closecom/pages/setup/index.d.ts +0 -2
  113. package/dist/packages/app-store/closecom/pages/setup/index.d.ts.map +0 -1
  114. package/dist/packages/features/settings/layouts/SettingsLayout.d.ts +0 -12
  115. package/dist/packages/features/settings/layouts/SettingsLayout.d.ts.map +0 -1
@@ -1,1148 +0,0 @@
1
- import { b9 as Qe, aL as Fe, aK as D, k as er, e as Ce } from "./index-_JT8rq0w.js";
2
- import k, { useState as le, useEffect as Ue } from "react";
3
- var Te = {};
4
- Object.defineProperty(Te, "__esModule", { value: !0 });
5
- function ue(r) {
6
- "@babel/helpers - typeof";
7
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ue = function(e) {
8
- return typeof e;
9
- } : ue = function(e) {
10
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
11
- }, ue(r);
12
- }
13
- var Be = "https://js.stripe.com/v3", rr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, xe = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", tr = function() {
14
- for (var e = document.querySelectorAll('script[src^="'.concat(Be, '"]')), t = 0; t < e.length; t++) {
15
- var n = e[t];
16
- if (rr.test(n.src))
17
- return n;
18
- }
19
- return null;
20
- }, nr = function(e) {
21
- var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
22
- n.src = "".concat(Be).concat(t);
23
- var u = document.head || document.body;
24
- if (!u)
25
- throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
26
- return u.appendChild(n), n;
27
- }, or = function(e, t) {
28
- !e || !e._registerWrapper || e._registerWrapper({
29
- name: "stripe-js",
30
- version: "1.35.0",
31
- startTime: t
32
- });
33
- }, se = null, ar = function(e) {
34
- return se !== null || (se = new Promise(function(t, n) {
35
- if (typeof window > "u") {
36
- t(null);
37
- return;
38
- }
39
- if (window.Stripe && e && console.warn(xe), window.Stripe) {
40
- t(window.Stripe);
41
- return;
42
- }
43
- try {
44
- var u = tr();
45
- u && e ? console.warn(xe) : u || (u = nr(e)), u.addEventListener("load", function() {
46
- window.Stripe ? t(window.Stripe) : n(new Error("Stripe.js not available"));
47
- }), u.addEventListener("error", function() {
48
- n(new Error("Failed to load Stripe.js"));
49
- });
50
- } catch (a) {
51
- n(a);
52
- return;
53
- }
54
- })), se;
55
- }, ir = function(e, t, n) {
56
- if (e === null)
57
- return null;
58
- var u = e.apply(void 0, t);
59
- return or(u, n), u;
60
- }, sr = 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 || ue(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
- }, ze, He = !1, Ke = function() {
75
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
76
- t[n] = arguments[n];
77
- He = !0;
78
- var u = Date.now();
79
- return ar(ze).then(function(a) {
80
- return ir(a, t, u);
81
- });
82
- };
83
- Ke.setLoadParameters = function(r) {
84
- if (He)
85
- throw new Error("You cannot change load parameters after calling loadStripe");
86
- ze = sr(r);
87
- };
88
- Te.loadStripe = Ke;
89
- var cr = Te;
90
- const ur = process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY || "";
91
- let pe;
92
- const fr = (r) => (pe || (pe = cr.loadStripe(
93
- r || ur
94
- /* , {
95
- locale: "es-419" TODO: Handle multiple locales,
96
- } */
97
- )), pe), lr = fr;
98
- var ge = { exports: {} }, ye, we;
99
- function Oe() {
100
- if (we)
101
- return ye;
102
- we = 1;
103
- var r = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
104
- return ye = r, ye;
105
- }
106
- var ve, Re;
107
- function dr() {
108
- if (Re)
109
- return ve;
110
- Re = 1;
111
- var r = Oe();
112
- function e() {
113
- }
114
- function t() {
115
- }
116
- return t.resetWarningCache = e, ve = function() {
117
- function n(v, l, f, d, y, h) {
118
- if (h !== r) {
119
- var b = new Error(
120
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
121
- );
122
- throw b.name = "Invariant Violation", b;
123
- }
124
- }
125
- n.isRequired = n;
126
- function u() {
127
- return n;
128
- }
129
- var a = {
130
- array: n,
131
- bigint: n,
132
- bool: n,
133
- func: n,
134
- number: n,
135
- object: n,
136
- string: n,
137
- symbol: n,
138
- any: n,
139
- arrayOf: u,
140
- element: n,
141
- elementType: n,
142
- instanceOf: u,
143
- node: n,
144
- objectOf: u,
145
- oneOf: u,
146
- oneOfType: u,
147
- shape: u,
148
- exact: u,
149
- checkPropTypes: t,
150
- resetWarningCache: e
151
- };
152
- return a.PropTypes = a, a;
153
- }, ve;
154
- }
155
- var ce = { exports: {} }, C = {};
156
- /** @license React v16.13.1
157
- * react-is.development.js
158
- *
159
- * Copyright (c) Facebook, Inc. and its affiliates.
160
- *
161
- * This source code is licensed under the MIT license found in the
162
- * LICENSE file in the root directory of this source tree.
163
- */
164
- var je;
165
- function pr() {
166
- return je || (je = 1, process.env.NODE_ENV !== "production" && function() {
167
- var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, u = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, v = r ? Symbol.for("react.provider") : 60109, l = r ? Symbol.for("react.context") : 60110, f = r ? Symbol.for("react.async_mode") : 60111, d = r ? Symbol.for("react.concurrent_mode") : 60111, y = r ? Symbol.for("react.forward_ref") : 60112, h = r ? Symbol.for("react.suspense") : 60113, b = r ? Symbol.for("react.suspense_list") : 60120, R = r ? Symbol.for("react.memo") : 60115, A = r ? Symbol.for("react.lazy") : 60116, _ = r ? Symbol.for("react.block") : 60121, j = r ? Symbol.for("react.fundamental") : 60117, L = r ? Symbol.for("react.responder") : 60118, G = r ? Symbol.for("react.scope") : 60119;
168
- function I(s) {
169
- return typeof s == "string" || typeof s == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
170
- s === n || s === d || s === a || s === u || s === h || s === b || typeof s == "object" && s !== null && (s.$$typeof === A || s.$$typeof === R || s.$$typeof === v || s.$$typeof === l || s.$$typeof === y || s.$$typeof === j || s.$$typeof === L || s.$$typeof === G || s.$$typeof === _);
171
- }
172
- function $(s) {
173
- if (typeof s == "object" && s !== null) {
174
- var U = s.$$typeof;
175
- switch (U) {
176
- case e:
177
- var ie = s.type;
178
- switch (ie) {
179
- case f:
180
- case d:
181
- case n:
182
- case a:
183
- case u:
184
- case h:
185
- return ie;
186
- default:
187
- var _e = ie && ie.$$typeof;
188
- switch (_e) {
189
- case l:
190
- case y:
191
- case A:
192
- case R:
193
- case v:
194
- return _e;
195
- default:
196
- return U;
197
- }
198
- }
199
- case t:
200
- return U;
201
- }
202
- }
203
- }
204
- var i = f, B = d, X = l, re = v, Z = e, te = y, J = n, ne = A, oe = R, z = t, F = a, W = u, H = h, Q = !1;
205
- function ae(s) {
206
- return Q || (Q = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), o(s) || $(s) === f;
207
- }
208
- function o(s) {
209
- return $(s) === d;
210
- }
211
- function c(s) {
212
- return $(s) === l;
213
- }
214
- function g(s) {
215
- return $(s) === v;
216
- }
217
- function E(s) {
218
- return typeof s == "object" && s !== null && s.$$typeof === e;
219
- }
220
- function m(s) {
221
- return $(s) === y;
222
- }
223
- function T(s) {
224
- return $(s) === n;
225
- }
226
- function p(s) {
227
- return $(s) === A;
228
- }
229
- function S(s) {
230
- return $(s) === R;
231
- }
232
- function O(s) {
233
- return $(s) === t;
234
- }
235
- function w(s) {
236
- return $(s) === a;
237
- }
238
- function P(s) {
239
- return $(s) === u;
240
- }
241
- function Y(s) {
242
- return $(s) === h;
243
- }
244
- C.AsyncMode = i, C.ConcurrentMode = B, C.ContextConsumer = X, C.ContextProvider = re, C.Element = Z, C.ForwardRef = te, C.Fragment = J, C.Lazy = ne, C.Memo = oe, C.Portal = z, C.Profiler = F, C.StrictMode = W, C.Suspense = H, C.isAsyncMode = ae, C.isConcurrentMode = o, C.isContextConsumer = c, C.isContextProvider = g, C.isElement = E, C.isForwardRef = m, C.isFragment = T, C.isLazy = p, C.isMemo = S, C.isPortal = O, C.isProfiler = w, C.isStrictMode = P, C.isSuspense = Y, C.isValidElementType = I, C.typeOf = $;
245
- }()), C;
246
- }
247
- var x = {};
248
- /** @license React v16.13.1
249
- * react-is.production.min.js
250
- *
251
- * Copyright (c) Facebook, Inc. and its affiliates.
252
- *
253
- * This source code is licensed under the MIT license found in the
254
- * LICENSE file in the root directory of this source tree.
255
- */
256
- var Ae;
257
- function yr() {
258
- if (Ae)
259
- return x;
260
- Ae = 1;
261
- var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, u = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, v = r ? Symbol.for("react.provider") : 60109, l = r ? Symbol.for("react.context") : 60110, f = r ? Symbol.for("react.async_mode") : 60111, d = r ? Symbol.for("react.concurrent_mode") : 60111, y = r ? Symbol.for("react.forward_ref") : 60112, h = r ? Symbol.for("react.suspense") : 60113, b = r ? Symbol.for("react.suspense_list") : 60120, R = r ? Symbol.for("react.memo") : 60115, A = r ? Symbol.for("react.lazy") : 60116, _ = r ? Symbol.for("react.block") : 60121, j = r ? Symbol.for("react.fundamental") : 60117, L = r ? Symbol.for("react.responder") : 60118, G = r ? Symbol.for("react.scope") : 60119;
262
- function I(i) {
263
- if (typeof i == "object" && i !== null) {
264
- var B = i.$$typeof;
265
- switch (B) {
266
- case e:
267
- switch (i = i.type, i) {
268
- case f:
269
- case d:
270
- case n:
271
- case a:
272
- case u:
273
- case h:
274
- return i;
275
- default:
276
- switch (i = i && i.$$typeof, i) {
277
- case l:
278
- case y:
279
- case A:
280
- case R:
281
- case v:
282
- return i;
283
- default:
284
- return B;
285
- }
286
- }
287
- case t:
288
- return B;
289
- }
290
- }
291
- }
292
- function $(i) {
293
- return I(i) === d;
294
- }
295
- return x.AsyncMode = f, x.ConcurrentMode = d, x.ContextConsumer = l, x.ContextProvider = v, x.Element = e, x.ForwardRef = y, x.Fragment = n, x.Lazy = A, x.Memo = R, x.Portal = t, x.Profiler = a, x.StrictMode = u, x.Suspense = h, x.isAsyncMode = function(i) {
296
- return $(i) || I(i) === f;
297
- }, x.isConcurrentMode = $, x.isContextConsumer = function(i) {
298
- return I(i) === l;
299
- }, x.isContextProvider = function(i) {
300
- return I(i) === v;
301
- }, x.isElement = function(i) {
302
- return typeof i == "object" && i !== null && i.$$typeof === e;
303
- }, x.isForwardRef = function(i) {
304
- return I(i) === y;
305
- }, x.isFragment = function(i) {
306
- return I(i) === n;
307
- }, x.isLazy = function(i) {
308
- return I(i) === A;
309
- }, x.isMemo = function(i) {
310
- return I(i) === R;
311
- }, x.isPortal = function(i) {
312
- return I(i) === t;
313
- }, x.isProfiler = function(i) {
314
- return I(i) === a;
315
- }, x.isStrictMode = function(i) {
316
- return I(i) === u;
317
- }, x.isSuspense = function(i) {
318
- return I(i) === h;
319
- }, x.isValidElementType = function(i) {
320
- return typeof i == "string" || typeof i == "function" || i === n || i === d || i === a || i === u || i === h || i === b || typeof i == "object" && i !== null && (i.$$typeof === A || i.$$typeof === R || i.$$typeof === v || i.$$typeof === l || i.$$typeof === y || i.$$typeof === j || i.$$typeof === L || i.$$typeof === G || i.$$typeof === _);
321
- }, x.typeOf = I, x;
322
- }
323
- var Ie;
324
- function Ve() {
325
- return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? ce.exports = yr() : ce.exports = pr()), ce.exports;
326
- }
327
- /*
328
- object-assign
329
- (c) Sindre Sorhus
330
- @license MIT
331
- */
332
- var me, $e;
333
- function vr() {
334
- if ($e)
335
- return me;
336
- $e = 1;
337
- var r = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
338
- function n(a) {
339
- if (a == null)
340
- throw new TypeError("Object.assign cannot be called with null or undefined");
341
- return Object(a);
342
- }
343
- function u() {
344
- try {
345
- if (!Object.assign)
346
- return !1;
347
- var a = new String("abc");
348
- if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
349
- return !1;
350
- for (var v = {}, l = 0; l < 10; l++)
351
- v["_" + String.fromCharCode(l)] = l;
352
- var f = Object.getOwnPropertyNames(v).map(function(y) {
353
- return v[y];
354
- });
355
- if (f.join("") !== "0123456789")
356
- return !1;
357
- var d = {};
358
- return "abcdefghijklmnopqrst".split("").forEach(function(y) {
359
- d[y] = y;
360
- }), Object.keys(Object.assign({}, d)).join("") === "abcdefghijklmnopqrst";
361
- } catch {
362
- return !1;
363
- }
364
- }
365
- return me = u() ? Object.assign : function(a, v) {
366
- for (var l, f = n(a), d, y = 1; y < arguments.length; y++) {
367
- l = Object(arguments[y]);
368
- for (var h in l)
369
- e.call(l, h) && (f[h] = l[h]);
370
- if (r) {
371
- d = r(l);
372
- for (var b = 0; b < d.length; b++)
373
- t.call(l, d[b]) && (f[d[b]] = l[d[b]]);
374
- }
375
- }
376
- return f;
377
- }, me;
378
- }
379
- var be, ke;
380
- function Ge() {
381
- return ke || (ke = 1, be = Function.call.bind(Object.prototype.hasOwnProperty)), be;
382
- }
383
- var he, Le;
384
- function mr() {
385
- if (Le)
386
- return he;
387
- Le = 1;
388
- var r = function() {
389
- };
390
- if (process.env.NODE_ENV !== "production") {
391
- var e = Oe(), t = {}, n = Ge();
392
- r = function(a) {
393
- var v = "Warning: " + a;
394
- typeof console < "u" && console.error(v);
395
- try {
396
- throw new Error(v);
397
- } catch {
398
- }
399
- };
400
- }
401
- function u(a, v, l, f, d) {
402
- if (process.env.NODE_ENV !== "production") {
403
- for (var y in a)
404
- if (n(a, y)) {
405
- var h;
406
- try {
407
- if (typeof a[y] != "function") {
408
- var b = Error(
409
- (f || "React class") + ": " + l + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
410
- );
411
- throw b.name = "Invariant Violation", b;
412
- }
413
- h = a[y](v, y, f, l, null, e);
414
- } catch (A) {
415
- h = A;
416
- }
417
- if (h && !(h instanceof Error) && r(
418
- (f || "React class") + ": type specification of " + l + " `" + y + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
419
- ), h instanceof Error && !(h.message in t)) {
420
- t[h.message] = !0;
421
- var R = d ? d() : "";
422
- r(
423
- "Failed " + l + " type: " + h.message + (R ?? "")
424
- );
425
- }
426
- }
427
- }
428
- }
429
- return u.resetWarningCache = function() {
430
- process.env.NODE_ENV !== "production" && (t = {});
431
- }, he = u, he;
432
- }
433
- var Ee, Me;
434
- function br() {
435
- if (Me)
436
- return Ee;
437
- Me = 1;
438
- var r = Ve(), e = vr(), t = Oe(), n = Ge(), u = mr(), a = function() {
439
- };
440
- process.env.NODE_ENV !== "production" && (a = function(l) {
441
- var f = "Warning: " + l;
442
- typeof console < "u" && console.error(f);
443
- try {
444
- throw new Error(f);
445
- } catch {
446
- }
447
- });
448
- function v() {
449
- return null;
450
- }
451
- return Ee = function(l, f) {
452
- var d = typeof Symbol == "function" && Symbol.iterator, y = "@@iterator";
453
- function h(o) {
454
- var c = o && (d && o[d] || o[y]);
455
- if (typeof c == "function")
456
- return c;
457
- }
458
- var b = "<<anonymous>>", R = {
459
- array: L("array"),
460
- bigint: L("bigint"),
461
- bool: L("boolean"),
462
- func: L("function"),
463
- number: L("number"),
464
- object: L("object"),
465
- string: L("string"),
466
- symbol: L("symbol"),
467
- any: G(),
468
- arrayOf: I,
469
- element: $(),
470
- elementType: i(),
471
- instanceOf: B,
472
- node: te(),
473
- objectOf: re,
474
- oneOf: X,
475
- oneOfType: Z,
476
- shape: ne,
477
- exact: oe
478
- };
479
- function A(o, c) {
480
- return o === c ? o !== 0 || 1 / o === 1 / c : o !== o && c !== c;
481
- }
482
- function _(o, c) {
483
- this.message = o, this.data = c && typeof c == "object" ? c : {}, this.stack = "";
484
- }
485
- _.prototype = Error.prototype;
486
- function j(o) {
487
- if (process.env.NODE_ENV !== "production")
488
- var c = {}, g = 0;
489
- function E(T, p, S, O, w, P, Y) {
490
- if (O = O || b, P = P || S, Y !== t) {
491
- if (f) {
492
- var s = new Error(
493
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
494
- );
495
- throw s.name = "Invariant Violation", s;
496
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
497
- var U = O + ":" + S;
498
- !c[U] && // Avoid spamming the console because they are often not actionable except for lib authors
499
- g < 3 && (a(
500
- "You are manually calling a React.PropTypes validation function for the `" + P + "` prop on `" + O + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
501
- ), c[U] = !0, g++);
502
- }
503
- }
504
- return p[S] == null ? T ? p[S] === null ? new _("The " + w + " `" + P + "` is marked as required " + ("in `" + O + "`, but its value is `null`.")) : new _("The " + w + " `" + P + "` is marked as required in " + ("`" + O + "`, but its value is `undefined`.")) : null : o(p, S, O, w, P);
505
- }
506
- var m = E.bind(null, !1);
507
- return m.isRequired = E.bind(null, !0), m;
508
- }
509
- function L(o) {
510
- function c(g, E, m, T, p, S) {
511
- var O = g[E], w = W(O);
512
- if (w !== o) {
513
- var P = H(O);
514
- return new _(
515
- "Invalid " + T + " `" + p + "` of type " + ("`" + P + "` supplied to `" + m + "`, expected ") + ("`" + o + "`."),
516
- { expectedType: o }
517
- );
518
- }
519
- return null;
520
- }
521
- return j(c);
522
- }
523
- function G() {
524
- return j(v);
525
- }
526
- function I(o) {
527
- function c(g, E, m, T, p) {
528
- if (typeof o != "function")
529
- return new _("Property `" + p + "` of component `" + m + "` has invalid PropType notation inside arrayOf.");
530
- var S = g[E];
531
- if (!Array.isArray(S)) {
532
- var O = W(S);
533
- return new _("Invalid " + T + " `" + p + "` of type " + ("`" + O + "` supplied to `" + m + "`, expected an array."));
534
- }
535
- for (var w = 0; w < S.length; w++) {
536
- var P = o(S, w, m, T, p + "[" + w + "]", t);
537
- if (P instanceof Error)
538
- return P;
539
- }
540
- return null;
541
- }
542
- return j(c);
543
- }
544
- function $() {
545
- function o(c, g, E, m, T) {
546
- var p = c[g];
547
- if (!l(p)) {
548
- var S = W(p);
549
- return new _("Invalid " + m + " `" + T + "` of type " + ("`" + S + "` supplied to `" + E + "`, expected a single ReactElement."));
550
- }
551
- return null;
552
- }
553
- return j(o);
554
- }
555
- function i() {
556
- function o(c, g, E, m, T) {
557
- var p = c[g];
558
- if (!r.isValidElementType(p)) {
559
- var S = W(p);
560
- return new _("Invalid " + m + " `" + T + "` of type " + ("`" + S + "` supplied to `" + E + "`, expected a single ReactElement type."));
561
- }
562
- return null;
563
- }
564
- return j(o);
565
- }
566
- function B(o) {
567
- function c(g, E, m, T, p) {
568
- if (!(g[E] instanceof o)) {
569
- var S = o.name || b, O = ae(g[E]);
570
- return new _("Invalid " + T + " `" + p + "` of type " + ("`" + O + "` supplied to `" + m + "`, expected ") + ("instance of `" + S + "`."));
571
- }
572
- return null;
573
- }
574
- return j(c);
575
- }
576
- function X(o) {
577
- if (!Array.isArray(o))
578
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
579
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
580
- ) : a("Invalid argument supplied to oneOf, expected an array.")), v;
581
- function c(g, E, m, T, p) {
582
- for (var S = g[E], O = 0; O < o.length; O++)
583
- if (A(S, o[O]))
584
- return null;
585
- var w = JSON.stringify(o, function(Y, s) {
586
- var U = H(s);
587
- return U === "symbol" ? String(s) : s;
588
- });
589
- return new _("Invalid " + T + " `" + p + "` of value `" + String(S) + "` " + ("supplied to `" + m + "`, expected one of " + w + "."));
590
- }
591
- return j(c);
592
- }
593
- function re(o) {
594
- function c(g, E, m, T, p) {
595
- if (typeof o != "function")
596
- return new _("Property `" + p + "` of component `" + m + "` has invalid PropType notation inside objectOf.");
597
- var S = g[E], O = W(S);
598
- if (O !== "object")
599
- return new _("Invalid " + T + " `" + p + "` of type " + ("`" + O + "` supplied to `" + m + "`, expected an object."));
600
- for (var w in S)
601
- if (n(S, w)) {
602
- var P = o(S, w, m, T, p + "." + w, t);
603
- if (P instanceof Error)
604
- return P;
605
- }
606
- return null;
607
- }
608
- return j(c);
609
- }
610
- function Z(o) {
611
- if (!Array.isArray(o))
612
- return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), v;
613
- for (var c = 0; c < o.length; c++) {
614
- var g = o[c];
615
- if (typeof g != "function")
616
- return a(
617
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Q(g) + " at index " + c + "."
618
- ), v;
619
- }
620
- function E(m, T, p, S, O) {
621
- for (var w = [], P = 0; P < o.length; P++) {
622
- var Y = o[P], s = Y(m, T, p, S, O, t);
623
- if (s == null)
624
- return null;
625
- s.data && n(s.data, "expectedType") && w.push(s.data.expectedType);
626
- }
627
- var U = w.length > 0 ? ", expected one of type [" + w.join(", ") + "]" : "";
628
- return new _("Invalid " + S + " `" + O + "` supplied to " + ("`" + p + "`" + U + "."));
629
- }
630
- return j(E);
631
- }
632
- function te() {
633
- function o(c, g, E, m, T) {
634
- return z(c[g]) ? null : new _("Invalid " + m + " `" + T + "` supplied to " + ("`" + E + "`, expected a ReactNode."));
635
- }
636
- return j(o);
637
- }
638
- function J(o, c, g, E, m) {
639
- return new _(
640
- (o || "React class") + ": " + c + " type `" + g + "." + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + m + "`."
641
- );
642
- }
643
- function ne(o) {
644
- function c(g, E, m, T, p) {
645
- var S = g[E], O = W(S);
646
- if (O !== "object")
647
- return new _("Invalid " + T + " `" + p + "` of type `" + O + "` " + ("supplied to `" + m + "`, expected `object`."));
648
- for (var w in o) {
649
- var P = o[w];
650
- if (typeof P != "function")
651
- return J(m, T, p, w, H(P));
652
- var Y = P(S, w, m, T, p + "." + w, t);
653
- if (Y)
654
- return Y;
655
- }
656
- return null;
657
- }
658
- return j(c);
659
- }
660
- function oe(o) {
661
- function c(g, E, m, T, p) {
662
- var S = g[E], O = W(S);
663
- if (O !== "object")
664
- return new _("Invalid " + T + " `" + p + "` of type `" + O + "` " + ("supplied to `" + m + "`, expected `object`."));
665
- var w = e({}, g[E], o);
666
- for (var P in w) {
667
- var Y = o[P];
668
- if (n(o, P) && typeof Y != "function")
669
- return J(m, T, p, P, H(Y));
670
- if (!Y)
671
- return new _(
672
- "Invalid " + T + " `" + p + "` key `" + P + "` supplied to `" + m + "`.\nBad object: " + JSON.stringify(g[E], null, " ") + `
673
- Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
674
- );
675
- var s = Y(S, P, m, T, p + "." + P, t);
676
- if (s)
677
- return s;
678
- }
679
- return null;
680
- }
681
- return j(c);
682
- }
683
- function z(o) {
684
- switch (typeof o) {
685
- case "number":
686
- case "string":
687
- case "undefined":
688
- return !0;
689
- case "boolean":
690
- return !o;
691
- case "object":
692
- if (Array.isArray(o))
693
- return o.every(z);
694
- if (o === null || l(o))
695
- return !0;
696
- var c = h(o);
697
- if (c) {
698
- var g = c.call(o), E;
699
- if (c !== o.entries) {
700
- for (; !(E = g.next()).done; )
701
- if (!z(E.value))
702
- return !1;
703
- } else
704
- for (; !(E = g.next()).done; ) {
705
- var m = E.value;
706
- if (m && !z(m[1]))
707
- return !1;
708
- }
709
- } else
710
- return !1;
711
- return !0;
712
- default:
713
- return !1;
714
- }
715
- }
716
- function F(o, c) {
717
- return o === "symbol" ? !0 : c ? c["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && c instanceof Symbol : !1;
718
- }
719
- function W(o) {
720
- var c = typeof o;
721
- return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : F(c, o) ? "symbol" : c;
722
- }
723
- function H(o) {
724
- if (typeof o > "u" || o === null)
725
- return "" + o;
726
- var c = W(o);
727
- if (c === "object") {
728
- if (o instanceof Date)
729
- return "date";
730
- if (o instanceof RegExp)
731
- return "regexp";
732
- }
733
- return c;
734
- }
735
- function Q(o) {
736
- var c = H(o);
737
- switch (c) {
738
- case "array":
739
- case "object":
740
- return "an " + c;
741
- case "boolean":
742
- case "date":
743
- case "regexp":
744
- return "a " + c;
745
- default:
746
- return c;
747
- }
748
- }
749
- function ae(o) {
750
- return !o.constructor || !o.constructor.name ? b : o.constructor.name;
751
- }
752
- return R.checkPropTypes = u, R.resetWarningCache = u.resetWarningCache, R.PropTypes = R, R;
753
- }, Ee;
754
- }
755
- if (process.env.NODE_ENV !== "production") {
756
- var hr = Ve(), Er = !0;
757
- ge.exports = br()(hr.isElement, Er);
758
- } else
759
- ge.exports = dr()();
760
- var gr = ge.exports;
761
- const N = /* @__PURE__ */ Qe(gr);
762
- function qe(r, e) {
763
- var t = Object.keys(r);
764
- if (Object.getOwnPropertySymbols) {
765
- var n = Object.getOwnPropertySymbols(r);
766
- e && (n = n.filter(function(u) {
767
- return Object.getOwnPropertyDescriptor(r, u).enumerable;
768
- })), t.push.apply(t, n);
769
- }
770
- return t;
771
- }
772
- function De(r) {
773
- for (var e = 1; e < arguments.length; e++) {
774
- var t = arguments[e] != null ? arguments[e] : {};
775
- e % 2 ? qe(Object(t), !0).forEach(function(n) {
776
- Je(r, n, t[n]);
777
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : qe(Object(t)).forEach(function(n) {
778
- Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
779
- });
780
- }
781
- return r;
782
- }
783
- function fe(r) {
784
- "@babel/helpers - typeof";
785
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? fe = function(e) {
786
- return typeof e;
787
- } : fe = function(e) {
788
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
789
- }, fe(r);
790
- }
791
- function Je(r, e, t) {
792
- return e in r ? Object.defineProperty(r, e, {
793
- value: t,
794
- enumerable: !0,
795
- configurable: !0,
796
- writable: !0
797
- }) : r[e] = t, r;
798
- }
799
- function Sr(r, e) {
800
- return Tr(r) || Or(r, e) || Pr(r, e) || _r();
801
- }
802
- function Tr(r) {
803
- if (Array.isArray(r))
804
- return r;
805
- }
806
- function Or(r, e) {
807
- var t = r && (typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]);
808
- if (t != null) {
809
- var n = [], u = !0, a = !1, v, l;
810
- try {
811
- for (t = t.call(r); !(u = (v = t.next()).done) && (n.push(v.value), !(e && n.length === e)); u = !0)
812
- ;
813
- } catch (f) {
814
- a = !0, l = f;
815
- } finally {
816
- try {
817
- !u && t.return != null && t.return();
818
- } finally {
819
- if (a)
820
- throw l;
821
- }
822
- }
823
- return n;
824
- }
825
- }
826
- function Pr(r, e) {
827
- if (r) {
828
- if (typeof r == "string")
829
- return We(r, e);
830
- var t = Object.prototype.toString.call(r).slice(8, -1);
831
- if (t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set")
832
- return Array.from(r);
833
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
834
- return We(r, e);
835
- }
836
- }
837
- function We(r, e) {
838
- (e == null || e > r.length) && (e = r.length);
839
- for (var t = 0, n = new Array(e); t < e; t++)
840
- n[t] = r[t];
841
- return n;
842
- }
843
- function _r() {
844
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
845
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
846
- }
847
- var Se = function(e) {
848
- var t = k.useRef(e);
849
- return k.useEffect(function() {
850
- t.current = e;
851
- }, [e]), t.current;
852
- }, ee = function(e) {
853
- return e !== null && fe(e) === "object";
854
- }, Cr = function(e) {
855
- return ee(e) && typeof e.then == "function";
856
- }, xr = function(e) {
857
- return ee(e) && typeof e.elements == "function" && typeof e.createToken == "function" && typeof e.createPaymentMethod == "function" && typeof e.confirmCardPayment == "function";
858
- }, Ye = "[object Object]", wr = function r(e, t) {
859
- if (!ee(e) || !ee(t))
860
- return e === t;
861
- var n = Array.isArray(e), u = Array.isArray(t);
862
- if (n !== u)
863
- return !1;
864
- var a = Object.prototype.toString.call(e) === Ye, v = Object.prototype.toString.call(t) === Ye;
865
- if (a !== v)
866
- return !1;
867
- if (!a && !n)
868
- return e === t;
869
- var l = Object.keys(e), f = Object.keys(t);
870
- if (l.length !== f.length)
871
- return !1;
872
- for (var d = {}, y = 0; y < l.length; y += 1)
873
- d[l[y]] = !0;
874
- for (var h = 0; h < f.length; h += 1)
875
- d[f[h]] = !0;
876
- var b = Object.keys(d);
877
- if (b.length !== l.length)
878
- return !1;
879
- var R = e, A = t, _ = function(L) {
880
- return r(R[L], A[L]);
881
- };
882
- return b.every(_);
883
- }, Xe = function(e, t, n) {
884
- return ee(e) ? Object.keys(e).reduce(function(u, a) {
885
- var v = !ee(t) || !wr(e[a], t[a]);
886
- return n.includes(a) ? (v && console.warn("Unsupported prop change: options.".concat(a, " is not a mutable property.")), u) : v ? De(De({}, u || {}), {}, Je({}, a, e[a])) : u;
887
- }, null) : null;
888
- }, Rr = "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.", Ne = function(e) {
889
- if (e === null || xr(e))
890
- return e;
891
- throw new Error(Rr);
892
- }, jr = function(e) {
893
- if (Cr(e))
894
- return {
895
- tag: "async",
896
- stripePromise: Promise.resolve(e).then(Ne)
897
- };
898
- var t = Ne(e);
899
- return t === null ? {
900
- tag: "empty"
901
- } : {
902
- tag: "sync",
903
- stripe: t
904
- };
905
- }, Pe = /* @__PURE__ */ k.createContext(null);
906
- Pe.displayName = "ElementsContext";
907
- var Ar = function(e, t) {
908
- if (!e)
909
- throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t, " in an <Elements> provider."));
910
- return e;
911
- }, Ze = function(e) {
912
- var t = e.stripe, n = e.options, u = e.children, a = k.useMemo(function() {
913
- return jr(t);
914
- }, [t]), v = k.useState(function() {
915
- return {
916
- stripe: a.tag === "sync" ? a.stripe : null,
917
- elements: a.tag === "sync" ? a.stripe.elements(n) : null
918
- };
919
- }), l = Sr(v, 2), f = l[0], d = l[1];
920
- k.useEffect(function() {
921
- var b = !0, R = function(_) {
922
- d(function(j) {
923
- return j.stripe ? j : {
924
- stripe: _,
925
- elements: _.elements(n)
926
- };
927
- });
928
- };
929
- return a.tag === "async" && !f.stripe ? a.stripePromise.then(function(A) {
930
- A && b && R(A);
931
- }) : a.tag === "sync" && !f.stripe && R(a.stripe), function() {
932
- b = !1;
933
- };
934
- }, [a, f, n]);
935
- var y = Se(t);
936
- k.useEffect(function() {
937
- y !== null && y !== t && console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.");
938
- }, [y, t]);
939
- var h = Se(n);
940
- return k.useEffect(function() {
941
- if (f.elements) {
942
- var b = Xe(n, h, ["clientSecret", "fonts"]);
943
- b && f.elements.update(b);
944
- }
945
- }, [n, h, f.elements]), k.useEffect(function() {
946
- var b = f.stripe;
947
- !b || !b._registerWrapper || !b.registerAppInfo || (b._registerWrapper({
948
- name: "react-stripe-js",
949
- version: "1.10.0"
950
- }), b.registerAppInfo({
951
- name: "react-stripe-js",
952
- version: "1.10.0",
953
- url: "https://stripe.com/docs/stripe-js/react"
954
- }));
955
- }, [f.stripe]), /* @__PURE__ */ k.createElement(Pe.Provider, {
956
- value: f
957
- }, u);
958
- };
959
- Ze.propTypes = {
960
- stripe: N.any,
961
- options: N.object
962
- };
963
- var de = function(e) {
964
- var t = k.useContext(Pe);
965
- return Ar(t, e);
966
- }, Ir = function() {
967
- var e = de("calls useElements()"), t = e.elements;
968
- return t;
969
- }, $r = function() {
970
- var e = de("calls useStripe()"), t = e.stripe;
971
- return t;
972
- };
973
- N.func.isRequired;
974
- var K = function(e) {
975
- var t = k.useRef(e);
976
- return k.useEffect(function() {
977
- t.current = e;
978
- }, [e]), function() {
979
- t.current && t.current.apply(t, arguments);
980
- };
981
- }, V = function() {
982
- }, kr = function(e) {
983
- return e.charAt(0).toUpperCase() + e.slice(1);
984
- }, M = function(e, t) {
985
- var n = "".concat(kr(e), "Element"), u = function(f) {
986
- var d = f.id, y = f.className, h = f.options, b = h === void 0 ? {} : h, R = f.onBlur, A = R === void 0 ? V : R, _ = f.onFocus, j = _ === void 0 ? V : _, L = f.onReady, G = L === void 0 ? V : L, I = f.onChange, $ = I === void 0 ? V : I, i = f.onEscape, B = i === void 0 ? V : i, X = f.onClick, re = X === void 0 ? V : X, Z = f.onLoadError, te = Z === void 0 ? V : Z, J = f.onLoaderStart, ne = J === void 0 ? V : J, oe = de("mounts <".concat(n, ">")), z = oe.elements, F = k.useRef(null), W = k.useRef(null), H = K(G), Q = K(A), ae = K(j), o = K(re), c = K($), g = K(B), E = K(te), m = K(ne);
987
- k.useLayoutEffect(function() {
988
- if (F.current == null && z && W.current != null) {
989
- var p = z.create(e, b);
990
- F.current = p, p.mount(W.current), p.on("ready", function() {
991
- return H(p);
992
- }), p.on("change", c), p.on("blur", Q), p.on("focus", ae), p.on("escape", g), p.on("loaderror", E), p.on("loaderstart", m), p.on("click", o);
993
- }
994
- });
995
- var T = Se(b);
996
- return k.useEffect(function() {
997
- if (F.current) {
998
- var p = Xe(b, T, ["paymentRequest"]);
999
- p && F.current.update(p);
1000
- }
1001
- }, [b, T]), k.useLayoutEffect(function() {
1002
- return function() {
1003
- F.current && (F.current.destroy(), F.current = null);
1004
- };
1005
- }, []), /* @__PURE__ */ k.createElement("div", {
1006
- id: d,
1007
- className: y,
1008
- ref: W
1009
- });
1010
- }, a = function(f) {
1011
- de("mounts <".concat(n, ">"));
1012
- var d = f.id, y = f.className;
1013
- return /* @__PURE__ */ k.createElement("div", {
1014
- id: d,
1015
- className: y
1016
- });
1017
- }, v = t ? a : u;
1018
- return v.propTypes = {
1019
- id: N.string,
1020
- className: N.string,
1021
- onChange: N.func,
1022
- onBlur: N.func,
1023
- onFocus: N.func,
1024
- onReady: N.func,
1025
- onClick: N.func,
1026
- onLoadError: N.func,
1027
- onLoaderStart: N.func,
1028
- options: N.object
1029
- }, v.displayName = n, v.__elementType = e, v;
1030
- }, q = typeof window > "u";
1031
- M("auBankAccount", q);
1032
- M("card", q);
1033
- M("cardNumber", q);
1034
- M("cardExpiry", q);
1035
- M("cardCvc", q);
1036
- M("fpxBank", q);
1037
- M("iban", q);
1038
- M("idealBank", q);
1039
- M("p24Bank", q);
1040
- M("epsBank", q);
1041
- var Lr = M("payment", q);
1042
- M("paymentRequestButton", q);
1043
- M("linkAuthentication", q);
1044
- M("shippingAddress", q);
1045
- M("affirmMessage", q);
1046
- M("afterpayClearpayMessage", q);
1047
- const Mr = (r) => {
1048
- const { t: e, i18n: t } = Fe(), { paymentOption: n, elements: u, state: a, onPaymentElementChange: v } = r, [l, f] = le(!1), [d, y] = le(n !== "HOLD"), h = l || !d || ["processing", "error"].includes(a.status);
1049
- return Ue(() => {
1050
- u == null || u.update({ locale: t.language });
1051
- }, [u, t.language]), /* @__PURE__ */ D.jsxs("form", { id: "payment-form", className: "bg-subtle mt-4 rounded-md p-6", onSubmit: r.onSubmit, children: [
1052
- /* @__PURE__ */ D.jsx("div", { children: /* @__PURE__ */ D.jsx(Lr, { onChange: () => v() }) }),
1053
- n === "HOLD" && /* @__PURE__ */ D.jsx("div", { className: "bg-info mb-5 mt-2 rounded-md p-3", children: /* @__PURE__ */ D.jsx(
1054
- er,
1055
- {
1056
- description: e("acknowledge_booking_no_show_fee", {
1057
- amount: r.payment.amount / 100,
1058
- formatParams: { amount: { currency: r.payment.currency } }
1059
- }),
1060
- onChange: (b) => y(b.target.checked),
1061
- descriptionClassName: "text-info font-semibold"
1062
- }
1063
- ) }),
1064
- /* @__PURE__ */ D.jsxs("div", { className: "mt-2 flex justify-end space-x-2", children: [
1065
- /* @__PURE__ */ D.jsx(
1066
- Ce,
1067
- {
1068
- color: "minimal",
1069
- disabled: h,
1070
- id: "cancel",
1071
- type: "button",
1072
- loading: l,
1073
- onClick: () => {
1074
- f(!0), r.onCancel();
1075
- },
1076
- children: /* @__PURE__ */ D.jsx("span", { id: "button-text", children: e("cancel") })
1077
- }
1078
- ),
1079
- /* @__PURE__ */ D.jsx(
1080
- Ce,
1081
- {
1082
- type: "submit",
1083
- disabled: h,
1084
- loading: a.status === "processing",
1085
- id: "submit",
1086
- color: "secondary",
1087
- children: /* @__PURE__ */ D.jsx("span", { id: "button-text", children: a.status === "processing" ? /* @__PURE__ */ D.jsx("div", { className: "spinner", id: "spinner" }) : e(n === "HOLD" ? "submit_card" : "pay_now") })
1088
- }
1089
- )
1090
- ] }),
1091
- a.status === "error" && /* @__PURE__ */ D.jsx("div", { className: "mt-4 text-center text-red-900 dark:text-gray-300", role: "alert", children: a.error.message })
1092
- ] });
1093
- }, qr = (r) => {
1094
- const { t: e } = Fe(), t = Ir(), n = r.payment.paymentOption, u = r.booking.attendees[0].email, a = $r(), [v, l] = le({ status: "idle" });
1095
- return /* @__PURE__ */ D.jsx(
1096
- Mr,
1097
- {
1098
- ...r,
1099
- elements: t,
1100
- paymentOption: n,
1101
- state: v,
1102
- onSubmit: async (f) => {
1103
- var y;
1104
- if (f.preventDefault(), !a || !t)
1105
- return;
1106
- l({ status: "processing" });
1107
- let d;
1108
- r.booking.uid, n === "HOLD" && "setupIntent" in r.payment.data ? (d = await a.confirmSetup({
1109
- elements: t,
1110
- redirect: "if_required"
1111
- }), d.setupIntent && (d.setupIntent.id, d.setupIntent.client_secret, d.setupIntent.status)) : n === "ON_BOOKING" && (d = await a.confirmPayment({
1112
- elements: t,
1113
- redirect: "if_required"
1114
- }), d.paymentIntent && (d.paymentIntent.id, d.paymentIntent.client_secret, d.paymentIntent.status)), d != null && d.error ? l({
1115
- status: "error",
1116
- error: new Error(`Payment failed: ${d.error.message}`)
1117
- }) : (l({ status: "idle" }), (y = r.onPaymentSuccess) == null || y.call(r, r), r.location && (r.location.includes("integration") ? e("web_conferencing_details_to_follow") : r.location));
1118
- },
1119
- onCancel: () => {
1120
- var f;
1121
- (f = r.onPaymentCancellation) == null || f.call(r, r);
1122
- },
1123
- onPaymentElementChange: () => {
1124
- l({ status: "idle" });
1125
- }
1126
- }
1127
- );
1128
- }, Yr = (r) => {
1129
- const e = lr(r.payment.data.stripe_publishable_key), [t, n] = le("stripe");
1130
- return Ue(() => {
1131
- document.documentElement.classList.contains("dark") && n("night");
1132
- }, []), /* @__PURE__ */ D.jsx(
1133
- Ze,
1134
- {
1135
- stripe: e,
1136
- options: {
1137
- clientSecret: r.clientSecret,
1138
- appearance: {
1139
- theme: t
1140
- }
1141
- },
1142
- children: /* @__PURE__ */ D.jsx(qr, { ...r })
1143
- }
1144
- );
1145
- };
1146
- export {
1147
- Yr as default
1148
- };