@ory/elements-react 1.0.0-rc.2 → 1.0.0-rc.4

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.
@@ -40,48 +40,15 @@ function DefaultCardContent({ children }) {
40
40
 
41
41
  // src/theme/default/components/card/footer.tsx
42
42
  import { FlowType as FlowType10 } from "@ory/client-fetch";
43
- import { useComponents as useComponents3, useOryFlow as useOryFlow3 } from "@ory/elements-react";
43
+ import {
44
+ useComponents as useComponents3,
45
+ useOryConfiguration as useOryConfiguration2,
46
+ useOryFlow as useOryFlow3
47
+ } from "@ory/elements-react";
44
48
  import { useIntl as useIntl9 } from "react-intl";
45
49
 
46
- // src/theme/default/utils/url.ts
47
- function restartFlowUrl(flow, fallback) {
48
- return flow.request_url || appendReturnTo(fallback, flow.return_to);
49
- }
50
- function initFlowUrl(sdkUrl, flowType, flow) {
51
- const result = `${sdkUrl}/self-service/${flowType}/browser`;
52
- const qs = new URLSearchParams();
53
- if (flow.oauth2_login_challenge) {
54
- qs.set("login_challenge", flow.oauth2_login_challenge);
55
- }
56
- if (flow.return_to) {
57
- qs.set("return_to", flow.return_to);
58
- } else if (typeof window !== "undefined") {
59
- const searchParams = new URLSearchParams(window.location.search);
60
- if (searchParams.has("return_to")) {
61
- qs.set("return_to", searchParams.get("return_to") || "");
62
- }
63
- }
64
- if (qs.toString().length === 0) {
65
- return result;
66
- }
67
- return result + "?" + qs.toString();
68
- }
69
- function appendReturnTo(url, returnTo) {
70
- if (!returnTo) {
71
- return url;
72
- }
73
- const urlObj = new URL(url);
74
- urlObj.searchParams.set("return_to", returnTo);
75
- return urlObj.toString();
76
- }
77
-
78
- // src/util/ui/index.ts
79
- import {
80
- isUiNodeInputAttributes as isUiNodeInputAttributes2,
81
- isUiNodeScriptAttributes
82
- } from "@ory/client-fetch";
83
- import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
84
- import { useMemo } from "react";
50
+ // src/components/card/two-step/state-select-method.tsx
51
+ import { UiNodeGroupEnum as UiNodeGroupEnum15 } from "@ory/client-fetch";
85
52
 
86
53
  // src/context/component.tsx
87
54
  import {
@@ -108,7 +75,32 @@ var defaultGroupOrder = [
108
75
  UiNodeGroupEnum.Totp
109
76
  ];
110
77
 
78
+ // src/context/flow-context.tsx
79
+ import {
80
+ createContext as createContext2,
81
+ useContext as useContext2,
82
+ useState as useState2
83
+ } from "react";
84
+
85
+ // src/context/form-state.ts
86
+ import { FlowType as FlowType2 } from "@ory/client-fetch";
87
+ import { useReducer, useState } from "react";
88
+
89
+ // src/components/card/two-step/utils.ts
90
+ import { FlowType, UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
91
+
92
+ // src/theme/default/utils/form.ts
93
+ function isGroupImmediateSubmit(group) {
94
+ return group === "code";
95
+ }
96
+
111
97
  // src/util/ui/index.ts
98
+ import {
99
+ isUiNodeInputAttributes as isUiNodeInputAttributes2,
100
+ isUiNodeScriptAttributes
101
+ } from "@ory/client-fetch";
102
+ import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
103
+ import { useMemo } from "react";
112
104
  function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
113
105
  var _a;
114
106
  const groups = {};
@@ -171,38 +163,99 @@ function useNodeGroupsWithVisibleNodes(nodes) {
171
163
  }, [nodes]);
172
164
  }
173
165
 
174
- // src/util/nodes.ts
175
- function findScreenSelectionButton(nodes) {
176
- return nodes.find(
177
- (node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
178
- );
179
- }
180
-
181
- // src/components/card/two-step/state-select-method.tsx
182
- import { UiNodeGroupEnum as UiNodeGroupEnum15 } from "@ory/client-fetch";
183
-
184
166
  // src/context/flow-context.tsx
185
- import {
186
- createContext as createContext2,
187
- useContext as useContext2,
188
- useState as useState2
189
- } from "react";
167
+ import { jsx as jsx5 } from "react/jsx-runtime";
168
+ var OryFlowContext = createContext2(null);
190
169
 
191
- // src/context/form-state.ts
192
- import { FlowType as FlowType2 } from "@ory/client-fetch";
193
- import { useReducer, useState } from "react";
170
+ // src/context/config.tsx
171
+ import { createContext as createContext3, useContext as useContext3, useRef } from "react";
194
172
 
195
- // src/components/card/two-step/utils.ts
196
- import { FlowType, UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
173
+ // src/client/config.ts
174
+ function isProduction() {
175
+ var _a, _b;
176
+ return ["production", "prod"].indexOf(
177
+ (_b = (_a = process.env.VERCEL_ENV) != null ? _a : process.env.NODE_ENV) != null ? _b : ""
178
+ ) > -1;
179
+ }
197
180
 
198
- // src/theme/default/utils/form.ts
199
- function isGroupImmediateSubmit(group) {
200
- return group === "code";
181
+ // src/util/client.ts
182
+ import {
183
+ Configuration,
184
+ FrontendApi
185
+ } from "@ory/client-fetch";
186
+ function frontendClient(sdkUrl, opts = {}) {
187
+ const config = new Configuration({
188
+ ...opts,
189
+ basePath: sdkUrl,
190
+ credentials: "include",
191
+ headers: {
192
+ Accept: "application/json",
193
+ ...opts.headers
194
+ }
195
+ });
196
+ return new FrontendApi(config);
201
197
  }
202
198
 
203
- // src/context/flow-context.tsx
204
- import { jsx as jsx5 } from "react/jsx-runtime";
205
- var OryFlowContext = createContext2(null);
199
+ // src/context/config.tsx
200
+ import { jsx as jsx6 } from "react/jsx-runtime";
201
+ var defaultProject = {
202
+ name: "Ory",
203
+ registration_enabled: true,
204
+ verification_enabled: true,
205
+ recovery_enabled: true,
206
+ recovery_ui_url: "/ui/recovery",
207
+ registration_ui_url: "/ui/registration",
208
+ verification_ui_url: "/ui/verification",
209
+ login_ui_url: "/ui/login",
210
+ settings_ui_url: "/ui/settings",
211
+ default_redirect_url: "/ui/welcome",
212
+ error_ui_url: "/ui/error",
213
+ default_locale: "en",
214
+ locale_behavior: "force_default"
215
+ };
216
+ var OryConfigurationContext = createContext3({
217
+ sdk: computeSdkConfig({}),
218
+ project: defaultProject
219
+ });
220
+ function computeSdkConfig(config) {
221
+ if ((config == null ? void 0 : config.url) && typeof config.url === "string") {
222
+ console.debug("Using sdk url from config");
223
+ return {
224
+ url: config.url.replace(/\/$/, ""),
225
+ options: config.options || {}
226
+ };
227
+ }
228
+ return {
229
+ url: getSDKUrl(),
230
+ options: (config == null ? void 0 : config.options) || {}
231
+ };
232
+ }
233
+ function getSDKUrl() {
234
+ var _a;
235
+ if (typeof process !== "undefined" && process.versions && process.versions.node) {
236
+ if (isProduction()) {
237
+ const sdkUrl = (_a = process.env["NEXT_PUBLIC_ORY_SDK_URL"]) != null ? _a : process.env["ORY_SDK_URL"];
238
+ if (!sdkUrl) {
239
+ throw new Error(
240
+ "Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL in production environments."
241
+ );
242
+ }
243
+ return sdkUrl.replace(/\/$/, "");
244
+ } else {
245
+ if (process.env["__NEXT_PRIVATE_ORIGIN"]) {
246
+ return process.env["__NEXT_PRIVATE_ORIGIN"].replace(/\/$/, "");
247
+ } else if (process.env["VERCEL_URL"]) {
248
+ return `https://${process.env["VERCEL_URL"]}`.replace(/\/$/, "");
249
+ }
250
+ }
251
+ }
252
+ if (typeof window !== "undefined") {
253
+ return window.location.origin;
254
+ }
255
+ throw new Error(
256
+ "Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL or supply the sdk.url parameter in the Ory configuration."
257
+ );
258
+ }
206
259
 
207
260
  // src/context/intl-context.tsx
208
261
  import { IntlProvider as OriginalIntlProvider } from "react-intl";
@@ -228,33 +281,22 @@ import { useFormContext } from "react-hook-form";
228
281
  // src/util/onSubmitLogin.ts
229
282
  import {
230
283
  FlowType as FlowType3,
231
- handleFlowError,
232
284
  loginUrl
233
285
  } from "@ory/client-fetch";
234
286
 
235
- // src/util/client.ts
287
+ // src/util/sdk-helpers/error.ts
236
288
  import {
237
- Configuration,
238
- FrontendApi
289
+ ResponseError,
290
+ FetchError
239
291
  } from "@ory/client-fetch";
240
- function frontendClient(sdkUrl, opts = {}) {
241
- const config = new Configuration({
242
- ...opts,
243
- basePath: sdkUrl,
244
- credentials: "include",
245
- headers: {
246
- Accept: "application/json",
247
- ...opts.headers
248
- }
249
- });
250
- return new FrontendApi(config);
251
- }
292
+
293
+ // src/util/sdk-helpers/utils.ts
294
+ import { FetchError as FetchError2, ResponseError as ResponseError2 } from "@ory/client-fetch";
252
295
 
253
296
  // src/util/onSubmitRecovery.ts
254
297
  import {
255
298
  FlowType as FlowType4,
256
299
  handleContinueWith,
257
- handleFlowError as handleFlowError2,
258
300
  instanceOfContinueWithRecoveryUi,
259
301
  recoveryUrl
260
302
  } from "@ory/client-fetch";
@@ -263,7 +305,6 @@ import {
263
305
  import {
264
306
  FlowType as FlowType5,
265
307
  handleContinueWith as handleContinueWith2,
266
- handleFlowError as handleFlowError3,
267
308
  registrationUrl
268
309
  } from "@ory/client-fetch";
269
310
 
@@ -271,8 +312,7 @@ import {
271
312
  import {
272
313
  FlowType as FlowType6,
273
314
  handleContinueWith as handleContinueWith3,
274
- handleFlowError as handleFlowError4,
275
- isResponseError,
315
+ isResponseError as isResponseError2,
276
316
  loginUrl as loginUrl2,
277
317
  settingsUrl
278
318
  } from "@ory/client-fetch";
@@ -280,15 +320,14 @@ import {
280
320
  // src/util/onSubmitVerification.ts
281
321
  import {
282
322
  FlowType as FlowType7,
283
- handleFlowError as handleFlowError5,
284
- verificationUrl
323
+ verificationUrl as verificationUrl2
285
324
  } from "@ory/client-fetch";
286
325
 
287
326
  // src/components/form/form-helpers.ts
288
327
  import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
289
328
 
290
329
  // src/components/form/form.tsx
291
- import { jsx as jsx6 } from "react/jsx-runtime";
330
+ import { jsx as jsx7 } from "react/jsx-runtime";
292
331
 
293
332
  // src/components/form/groups.tsx
294
333
  import { getNodeId } from "@ory/client-fetch";
@@ -298,9 +337,9 @@ import {
298
337
  UiNodeGroupEnum as UiNodeGroupEnum6,
299
338
  UiNodeInputAttributesTypeEnum
300
339
  } from "@ory/client-fetch";
301
- import { useEffect, useRef } from "react";
340
+ import { useEffect, useRef as useRef2 } from "react";
302
341
  import { useFormContext as useFormContext3 } from "react-hook-form";
303
- import { jsx as jsx7 } from "react/jsx-runtime";
342
+ import { jsx as jsx8 } from "react/jsx-runtime";
304
343
 
305
344
  // src/components/form/nodes/node.tsx
306
345
  import {
@@ -311,13 +350,13 @@ import {
311
350
  isUiNodeTextAttributes,
312
351
  UiNodeGroupEnum as UiNodeGroupEnum7
313
352
  } from "@ory/client-fetch";
314
- import { jsx as jsx8 } from "react/jsx-runtime";
353
+ import { jsx as jsx9 } from "react/jsx-runtime";
315
354
 
316
355
  // src/components/form/groups.tsx
317
- import { jsx as jsx9 } from "react/jsx-runtime";
356
+ import { jsx as jsx10 } from "react/jsx-runtime";
318
357
 
319
358
  // src/components/form/messages.tsx
320
- import { jsx as jsx10 } from "react/jsx-runtime";
359
+ import { jsx as jsx11 } from "react/jsx-runtime";
321
360
 
322
361
  // src/components/form/social.tsx
323
362
  import {
@@ -334,21 +373,21 @@ import { FormProvider, useForm } from "react-hook-form";
334
373
  import { isUiNodeInputAttributes as isUiNodeInputAttributes6 } from "@ory/client-fetch";
335
374
 
336
375
  // src/components/form/form-provider.tsx
337
- import { jsx as jsx11 } from "react/jsx-runtime";
376
+ import { jsx as jsx12 } from "react/jsx-runtime";
338
377
 
339
378
  // src/components/form/social.tsx
340
- import { jsx as jsx12 } from "react/jsx-runtime";
379
+ import { jsx as jsx13 } from "react/jsx-runtime";
341
380
 
342
381
  // src/components/form/section.tsx
343
382
  import { useFormContext as useFormContext5 } from "react-hook-form";
344
- import { jsx as jsx13 } from "react/jsx-runtime";
383
+ import { jsx as jsx14 } from "react/jsx-runtime";
345
384
 
346
385
  // src/components/generic/divider.tsx
347
386
  import { UiNodeGroupEnum as UiNodeGroupEnum11 } from "@ory/client-fetch";
348
- import { jsx as jsx14 } from "react/jsx-runtime";
387
+ import { jsx as jsx15 } from "react/jsx-runtime";
349
388
 
350
389
  // src/components/generic/page-header.tsx
351
- import { jsx as jsx15 } from "react/jsx-runtime";
390
+ import { jsx as jsx16 } from "react/jsx-runtime";
352
391
 
353
392
  // src/components/settings/settings-card.tsx
354
393
  import {
@@ -361,30 +400,30 @@ import { useIntl as useIntl7 } from "react-intl";
361
400
  // src/components/settings/oidc-settings.tsx
362
401
  import { useIntl as useIntl2 } from "react-intl";
363
402
  import { useFormContext as useFormContext6 } from "react-hook-form";
364
- import { Fragment, jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
403
+ import { Fragment, jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
365
404
 
366
405
  // src/components/settings/passkey-settings.tsx
367
406
  import { useFormContext as useFormContext7 } from "react-hook-form";
368
407
  import { useIntl as useIntl3 } from "react-intl";
369
- import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
408
+ import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
370
409
 
371
410
  // src/components/settings/recovery-codes-settings.tsx
372
411
  import { useIntl as useIntl4 } from "react-intl";
373
412
  import { useFormContext as useFormContext8 } from "react-hook-form";
374
- import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
413
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
375
414
 
376
415
  // src/components/settings/totp-settings.tsx
377
416
  import { useFormContext as useFormContext9 } from "react-hook-form";
378
417
  import { useIntl as useIntl5 } from "react-intl";
379
- import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
418
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
380
419
 
381
420
  // src/components/settings/webauthn-settings.tsx
382
421
  import { useFormContext as useFormContext10 } from "react-hook-form";
383
422
  import { useIntl as useIntl6 } from "react-intl";
384
- import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
423
+ import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
385
424
 
386
425
  // src/components/settings/settings-card.tsx
387
- import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
426
+ import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
388
427
 
389
428
  // src/util/i18n/index.ts
390
429
  var uiTextToFormattedMessage = ({ id, context = {}, text }, intl) => {
@@ -2751,7 +2790,7 @@ var OryLocales = {
2751
2790
  };
2752
2791
 
2753
2792
  // src/context/intl-context.tsx
2754
- import { jsx as jsx22 } from "react/jsx-runtime";
2793
+ import { jsx as jsx23 } from "react/jsx-runtime";
2755
2794
  function mergeTranslations(customTranslations) {
2756
2795
  return Object.keys(customTranslations).reduce((acc, key) => {
2757
2796
  acc[key] = { ...OryLocales[key], ...customTranslations[key] };
@@ -2764,12 +2803,12 @@ var IntlProvider = ({
2764
2803
  customTranslations
2765
2804
  }) => {
2766
2805
  const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
2767
- return /* @__PURE__ */ jsx22(
2806
+ return /* @__PURE__ */ jsx23(
2768
2807
  OriginalIntlProvider,
2769
2808
  {
2770
2809
  onWarn: () => ({}),
2771
2810
  defaultRichTextElements: {
2772
- del: (chunks) => /* @__PURE__ */ jsx22("del", { children: chunks })
2811
+ del: (chunks) => /* @__PURE__ */ jsx23("del", { children: chunks })
2773
2812
  },
2774
2813
  locale,
2775
2814
  messages: messages[locale],
@@ -2780,38 +2819,38 @@ var IntlProvider = ({
2780
2819
  };
2781
2820
 
2782
2821
  // src/context/provider.tsx
2783
- import { jsx as jsx23 } from "react/jsx-runtime";
2822
+ import { jsx as jsx24 } from "react/jsx-runtime";
2784
2823
 
2785
2824
  // src/components/card/header.tsx
2786
- import { jsx as jsx24 } from "react/jsx-runtime";
2825
+ import { jsx as jsx25 } from "react/jsx-runtime";
2787
2826
 
2788
2827
  // src/components/card/card.tsx
2789
- import { jsx as jsx25 } from "react/jsx-runtime";
2828
+ import { jsx as jsx26 } from "react/jsx-runtime";
2790
2829
 
2791
2830
  // src/components/card/footer.tsx
2792
- import { jsx as jsx26 } from "react/jsx-runtime";
2831
+ import { jsx as jsx27 } from "react/jsx-runtime";
2793
2832
 
2794
2833
  // src/components/card/content.tsx
2795
- import { jsx as jsx27 } from "react/jsx-runtime";
2834
+ import { jsx as jsx28 } from "react/jsx-runtime";
2796
2835
 
2797
2836
  // src/components/card/two-step/state-method-active.tsx
2798
2837
  import {
2799
2838
  isUiNodeScriptAttributes as isUiNodeScriptAttributes5,
2800
2839
  UiNodeGroupEnum as UiNodeGroupEnum13
2801
2840
  } from "@ory/client-fetch";
2802
- import { jsx as jsx28, jsxs as jsxs10 } from "react/jsx-runtime";
2841
+ import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
2803
2842
 
2804
2843
  // src/components/card/two-step/state-provide-identifier.tsx
2805
2844
  import { UiNodeGroupEnum as UiNodeGroupEnum14 } from "@ory/client-fetch";
2806
- import { jsx as jsx29, jsxs as jsxs11 } from "react/jsx-runtime";
2845
+ import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
2807
2846
 
2808
2847
  // src/components/card/card-two-step.tsx
2809
2848
  import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
2810
- import { Fragment as Fragment7, jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
2849
+ import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
2811
2850
 
2812
2851
  // src/components/card/card-consent.tsx
2813
2852
  import { getNodeId as getNodeId4 } from "@ory/client-fetch";
2814
- import { jsx as jsx31, jsxs as jsxs13 } from "react/jsx-runtime";
2853
+ import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
2815
2854
 
2816
2855
  // src/components/card/two-step/state-select-method.tsx
2817
2856
  import { useIntl as useIntl8 } from "react-intl";
@@ -2819,10 +2858,10 @@ import { useIntl as useIntl8 } from "react-intl";
2819
2858
  // src/components/card/two-step/list-methods.tsx
2820
2859
  import { useComponents as useComponents2 } from "@ory/elements-react";
2821
2860
  import { useFormContext as useFormContext11 } from "react-hook-form";
2822
- import { jsx as jsx32 } from "react/jsx-runtime";
2861
+ import { jsx as jsx33 } from "react/jsx-runtime";
2823
2862
 
2824
2863
  // src/components/card/two-step/state-select-method.tsx
2825
- import { jsx as jsx33, jsxs as jsxs14 } from "react/jsx-runtime";
2864
+ import { jsx as jsx34, jsxs as jsxs14 } from "react/jsx-runtime";
2826
2865
  function toAuthMethodPickerOptions(visibleGroups) {
2827
2866
  return Object.fromEntries(
2828
2867
  Object.values(UiNodeGroupEnum15).filter((group) => {
@@ -2841,6 +2880,13 @@ function toAuthMethodPickerOptions(visibleGroups) {
2841
2880
  );
2842
2881
  }
2843
2882
 
2883
+ // src/util/nodes.ts
2884
+ function findScreenSelectionButton(nodes) {
2885
+ return nodes.find(
2886
+ (node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
2887
+ );
2888
+ }
2889
+
2844
2890
  // src/theme/default/utils/logout.ts
2845
2891
  import { useCallback, useEffect as useEffect2, useState as useState3 } from "react";
2846
2892
  function useClientLogout(config) {
@@ -2866,28 +2912,77 @@ function useClientLogout(config) {
2866
2912
  return { logoutFlow, didLoad: !isLoading };
2867
2913
  }
2868
2914
 
2915
+ // src/theme/default/utils/url.ts
2916
+ function restartFlowUrl(flow, fallback) {
2917
+ return flow.request_url || appendReturnTo(fallback, flow.return_to);
2918
+ }
2919
+ function initFlowUrl(sdkUrl, flowType, flow) {
2920
+ const result = `${sdkUrl}/self-service/${flowType}/browser`;
2921
+ const qs = new URLSearchParams();
2922
+ if (flow.oauth2_login_challenge) {
2923
+ qs.set("login_challenge", flow.oauth2_login_challenge);
2924
+ }
2925
+ if (flow.return_to) {
2926
+ qs.set("return_to", flow.return_to);
2927
+ } else if (typeof window !== "undefined") {
2928
+ const searchParams = new URLSearchParams(window.location.search);
2929
+ if (searchParams.has("return_to")) {
2930
+ qs.set("return_to", searchParams.get("return_to") || "");
2931
+ }
2932
+ }
2933
+ if (qs.toString().length === 0) {
2934
+ return result;
2935
+ }
2936
+ return result + "?" + qs.toString();
2937
+ }
2938
+ function appendReturnTo(url, returnTo) {
2939
+ if (!returnTo) {
2940
+ return url;
2941
+ }
2942
+ const urlObj = new URL(url);
2943
+ urlObj.searchParams.set("return_to", returnTo);
2944
+ return urlObj.toString();
2945
+ }
2946
+
2869
2947
  // src/theme/default/components/card/footer.tsx
2870
- import { Fragment as Fragment8, jsx as jsx34, jsxs as jsxs15 } from "react/jsx-runtime";
2948
+ import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
2871
2949
  function DefaultCardFooter() {
2872
2950
  const oryFlow = useOryFlow3();
2873
2951
  switch (oryFlow.flowType) {
2874
2952
  case FlowType10.Login:
2875
- return /* @__PURE__ */ jsx34(LoginCardFooter, {});
2953
+ return /* @__PURE__ */ jsx35(LoginCardFooter, {});
2876
2954
  case FlowType10.Registration:
2877
- return /* @__PURE__ */ jsx34(RegistrationCardFooter, {});
2955
+ return /* @__PURE__ */ jsx35(RegistrationCardFooter, {});
2878
2956
  case FlowType10.Recovery:
2879
- return /* @__PURE__ */ jsx34(RecoveryCardFooter, {});
2957
+ return /* @__PURE__ */ jsx35(RecoveryCardFooter, {});
2880
2958
  case FlowType10.Verification:
2881
- return /* @__PURE__ */ jsx34(VerificationCardFooter, {});
2959
+ return /* @__PURE__ */ jsx35(VerificationCardFooter, {});
2882
2960
  case FlowType10.OAuth2Consent:
2883
- return /* @__PURE__ */ jsx34(ConsentCardFooter, { flow: oryFlow.flow });
2961
+ return /* @__PURE__ */ jsx35(ConsentCardFooter, { flow: oryFlow.flow });
2884
2962
  default:
2885
2963
  return null;
2886
2964
  }
2887
2965
  }
2966
+ function shouldShowLogoutButton(flow, formState, authMethods) {
2967
+ if (flow.refresh) {
2968
+ return true;
2969
+ }
2970
+ if (flow.requested_aal === "aal2") {
2971
+ if (formState.current === "select_method") {
2972
+ return true;
2973
+ }
2974
+ if (formState.current === "method_active" && flow.active === "code") {
2975
+ return true;
2976
+ }
2977
+ if (formState.current === "method_active" && authMethods.length === 1) {
2978
+ return true;
2979
+ }
2980
+ }
2981
+ return false;
2982
+ }
2888
2983
  function LoginCardFooter() {
2889
- const { config, formState, flow, flowType } = useOryFlow3();
2890
- const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
2984
+ const { formState, flow, flowType, dispatchFormState } = useOryFlow3();
2985
+ const config = useOryConfiguration2();
2891
2986
  const intl = useIntl9();
2892
2987
  if (flowType !== FlowType10.Login) {
2893
2988
  return null;
@@ -2903,27 +2998,8 @@ function LoginCardFooter() {
2903
2998
  `${config.sdk.url}/self-service/${flowType}/browser`
2904
2999
  );
2905
3000
  }
2906
- if (flow.refresh || flow.requested_aal === "aal2") {
2907
- return /* @__PURE__ */ jsxs15("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
2908
- intl.formatMessage({
2909
- id: "login.2fa.go-back"
2910
- }),
2911
- " ",
2912
- /* @__PURE__ */ jsx34(
2913
- "a",
2914
- {
2915
- className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
2916
- href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
2917
- "data-testid": (
2918
- // Only add the test-id when the logout link has loaded.
2919
- didLoadLogout ? "ory/screen/login/action/logout" : void 0
2920
- ),
2921
- children: intl.formatMessage({
2922
- id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
2923
- })
2924
- }
2925
- )
2926
- ] });
3001
+ if (shouldShowLogoutButton(flow, formState, authMethods)) {
3002
+ return /* @__PURE__ */ jsx35(LogoutButton, { returnTo });
2927
3003
  }
2928
3004
  return /* @__PURE__ */ jsxs15(Fragment8, { children: [
2929
3005
  formState.current === "provide_identifier" && config.project.registration_enabled && /* @__PURE__ */ jsxs15("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
@@ -2932,7 +3008,7 @@ function LoginCardFooter() {
2932
3008
  defaultMessage: "No account?"
2933
3009
  }),
2934
3010
  " ",
2935
- /* @__PURE__ */ jsx34(
3011
+ /* @__PURE__ */ jsx35(
2936
3012
  "a",
2937
3013
  {
2938
3014
  className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
@@ -2945,18 +3021,22 @@ function LoginCardFooter() {
2945
3021
  }
2946
3022
  )
2947
3023
  ] }),
2948
- authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ jsx34("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx34(
2949
- "a",
3024
+ authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx35(
3025
+ "button",
2950
3026
  {
2951
3027
  className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
2952
- href: "",
3028
+ onClick: () => {
3029
+ dispatchFormState({
3030
+ type: "action_clear_active_method"
3031
+ });
3032
+ },
2953
3033
  "data-testid": "ory/screen/login/mfa/action/selectMethod",
2954
3034
  children: intl.formatMessage({
2955
3035
  id: "login.2fa.method.go-back"
2956
3036
  })
2957
3037
  }
2958
3038
  ) }),
2959
- authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */ jsx34("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx34(
3039
+ authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx35(
2960
3040
  "a",
2961
3041
  {
2962
3042
  className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
@@ -2969,9 +3049,35 @@ function LoginCardFooter() {
2969
3049
  ) })
2970
3050
  ] });
2971
3051
  }
3052
+ function LogoutButton({ returnTo }) {
3053
+ const config = useOryConfiguration2();
3054
+ const intl = useIntl9();
3055
+ const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
3056
+ return /* @__PURE__ */ jsxs15("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
3057
+ intl.formatMessage({
3058
+ id: "login.2fa.go-back"
3059
+ }),
3060
+ " ",
3061
+ /* @__PURE__ */ jsx35(
3062
+ "a",
3063
+ {
3064
+ className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
3065
+ href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
3066
+ "data-testid": (
3067
+ // Only add the test-id when the logout link has loaded.
3068
+ didLoadLogout ? "ory/screen/login/action/logout" : void 0
3069
+ ),
3070
+ children: intl.formatMessage({
3071
+ id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
3072
+ })
3073
+ }
3074
+ )
3075
+ ] });
3076
+ }
2972
3077
  function RegistrationCardFooter() {
2973
3078
  const intl = useIntl9();
2974
- const { config, flow, formState } = useOryFlow3();
3079
+ const { flow, formState } = useOryFlow3();
3080
+ const config = useOryConfiguration2();
2975
3081
  const visibleGroups = useNodeGroupsWithVisibleNodes(flow.ui.nodes);
2976
3082
  const authMethodBlocks = toAuthMethodPickerOptions(visibleGroups);
2977
3083
  const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
@@ -2980,11 +3086,12 @@ function RegistrationCardFooter() {
2980
3086
  if (!screenSelectionNode || Object.entries(authMethodBlocks).length < 2) {
2981
3087
  return null;
2982
3088
  }
2983
- return /* @__PURE__ */ jsx34("span", { className: "font-normal leading-normal antialiased", children: /* @__PURE__ */ jsx34(
3089
+ return /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased", children: /* @__PURE__ */ jsx35(
2984
3090
  "a",
2985
3091
  {
2986
3092
  className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
2987
3093
  href: "",
3094
+ "data-testid": "ory/screen/registration/action/selectMethod",
2988
3095
  children: intl.formatMessage({
2989
3096
  id: "card.footer.select-another-method",
2990
3097
  defaultMessage: "Select another method"
@@ -2999,7 +3106,7 @@ function RegistrationCardFooter() {
2999
3106
  defaultMessage: "Already have an account?"
3000
3107
  }),
3001
3108
  " ",
3002
- /* @__PURE__ */ jsx34(
3109
+ /* @__PURE__ */ jsx35(
3003
3110
  "a",
3004
3111
  {
3005
3112
  className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
@@ -3034,20 +3141,20 @@ function ConsentCardFooter({ flow }) {
3034
3141
  "Make sure you trust ",
3035
3142
  (_a = flow.consent_request.client) == null ? void 0 : _a.client_name
3036
3143
  ] }),
3037
- /* @__PURE__ */ jsx34("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
3144
+ /* @__PURE__ */ jsx35("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
3038
3145
  ] }),
3039
- rememberNode && /* @__PURE__ */ jsx34(
3146
+ rememberNode && /* @__PURE__ */ jsx35(
3040
3147
  Node2.Checkbox,
3041
3148
  {
3042
3149
  attributes: rememberNode.attributes,
3043
3150
  node: rememberNode
3044
3151
  }
3045
3152
  ),
3046
- /* @__PURE__ */ jsx34("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
3153
+ /* @__PURE__ */ jsx35("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
3047
3154
  (n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
3048
3155
  ).map((n) => {
3049
3156
  const attributes = n.attributes;
3050
- return /* @__PURE__ */ jsx34(
3157
+ return /* @__PURE__ */ jsx35(
3051
3158
  Node2.Button,
3052
3159
  {
3053
3160
  node: n,
@@ -3314,16 +3421,9 @@ import {
3314
3421
  FlowType as FlowType12,
3315
3422
  isUiNodeInputAttributes as isUiNodeInputAttributes8
3316
3423
  } from "@ory/client-fetch";
3317
- import { useOryFlow as useOryFlow4 } from "@ory/elements-react";
3318
-
3319
- // src/theme/default/assets/icons/arrow-left.svg
3320
- import * as React3 from "react";
3321
- import { jsx as jsx35 } from "react/jsx-runtime";
3322
- var SvgArrowLeft = (props) => {
3323
- var _a, _b;
3324
- return /* @__PURE__ */ jsx35("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx35("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
3325
- };
3326
- var arrow_left_default = SvgArrowLeft;
3424
+ import { useOryConfiguration as useOryConfiguration3, useOryFlow as useOryFlow4 } from "@ory/elements-react";
3425
+ import { useEffect as useEffect3, useState as useState4 } from "react";
3426
+ import { useFormContext as useFormContext12 } from "react-hook-form";
3327
3427
 
3328
3428
  // src/theme/default/utils/attributes.ts
3329
3429
  function omit(obj, keys) {
@@ -3334,13 +3434,46 @@ function omit(obj, keys) {
3334
3434
  return ret;
3335
3435
  }
3336
3436
 
3437
+ // src/util/omitAttributes.ts
3438
+ function omitInputAttributes({
3439
+ ...attrs
3440
+ }) {
3441
+ return omit(attrs, [
3442
+ "autocomplete",
3443
+ "label",
3444
+ "node_type",
3445
+ "maxlength",
3446
+ "onclick",
3447
+ "onclickTrigger",
3448
+ "onload",
3449
+ "onloadTrigger"
3450
+ ]);
3451
+ }
3452
+
3453
+ // src/theme/default/assets/icons/arrow-left.svg
3454
+ import * as React3 from "react";
3455
+ import { jsx as jsx36 } from "react/jsx-runtime";
3456
+ var SvgArrowLeft = (props) => {
3457
+ var _a, _b;
3458
+ return /* @__PURE__ */ jsx36("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx36("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
3459
+ };
3460
+ var arrow_left_default = SvgArrowLeft;
3461
+
3337
3462
  // src/theme/default/components/card/current-identifier-button.tsx
3338
- import { useFormContext as useFormContext12 } from "react-hook-form";
3339
- import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
3463
+ import { jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
3340
3464
  function DefaultCurrentIdentifierButton() {
3341
- const { flow, flowType, config, formState } = useOryFlow4();
3342
- const { setValue } = useFormContext12();
3465
+ var _a;
3466
+ const { flow, flowType, formState } = useOryFlow4();
3467
+ const { setValue, getValues, watch } = useFormContext12();
3468
+ const [turnstileResponse, setTurnstileResponse] = useState4();
3469
+ const config = useOryConfiguration3();
3343
3470
  const ui = flow.ui;
3471
+ const captchaVerificationValue = (_a = watch("transient_payload")) == null ? void 0 : _a.captcha_turnstile_response;
3472
+ useEffect3(() => {
3473
+ if (captchaVerificationValue) {
3474
+ setTurnstileResponse(captchaVerificationValue);
3475
+ }
3476
+ }, [captchaVerificationValue]);
3344
3477
  if (formState.current === "provide_identifier") {
3345
3478
  return null;
3346
3479
  }
@@ -3355,11 +3488,6 @@ function DefaultCurrentIdentifierButton() {
3355
3488
  flow,
3356
3489
  `${config.sdk.url}/self-service/${flowType}/browser`
3357
3490
  );
3358
- const attributes = omit(nodeBackButton, [
3359
- "autocomplete",
3360
- "node_type",
3361
- "maxlength"
3362
- ]);
3363
3491
  const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
3364
3492
  if (screenSelectionNode) {
3365
3493
  return /* @__PURE__ */ jsxs16("form", { action: flow.ui.action, method: flow.ui.method, children: [
@@ -3370,21 +3498,25 @@ function DefaultCurrentIdentifierButton() {
3370
3498
  return false;
3371
3499
  }).map((n) => {
3372
3500
  const attrs = n.attributes;
3373
- return /* @__PURE__ */ jsx36(
3501
+ let value = getValues(attrs.name) || attrs.value;
3502
+ if (attrs.name === "transient_payload.captcha_turnstile_response" && turnstileResponse) {
3503
+ value = turnstileResponse;
3504
+ }
3505
+ return /* @__PURE__ */ jsx37(
3374
3506
  "input",
3375
3507
  {
3376
3508
  type: "hidden",
3377
3509
  name: attrs.name,
3378
- value: attrs.value
3510
+ value
3379
3511
  },
3380
3512
  attrs.name
3381
3513
  );
3382
3514
  }),
3383
- /* @__PURE__ */ jsx36(
3515
+ /* @__PURE__ */ jsx37(
3384
3516
  "button",
3385
3517
  {
3386
3518
  className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
3387
- ...attributes,
3519
+ ...omitInputAttributes(nodeBackButton),
3388
3520
  type: "submit",
3389
3521
  onClick: () => {
3390
3522
  setValue(
@@ -3398,7 +3530,7 @@ function DefaultCurrentIdentifierButton() {
3398
3530
  title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
3399
3531
  "data-testid": `ory/screen/${flowType}/action/restart`,
3400
3532
  children: /* @__PURE__ */ jsxs16("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
3401
- /* @__PURE__ */ jsx36(
3533
+ /* @__PURE__ */ jsx37(
3402
3534
  arrow_left_default,
3403
3535
  {
3404
3536
  size: 16,
@@ -3406,22 +3538,22 @@ function DefaultCurrentIdentifierButton() {
3406
3538
  className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
3407
3539
  }
3408
3540
  ),
3409
- /* @__PURE__ */ jsx36("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
3541
+ /* @__PURE__ */ jsx37("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
3410
3542
  ] })
3411
3543
  }
3412
3544
  )
3413
3545
  ] });
3414
3546
  }
3415
- return /* @__PURE__ */ jsx36(
3547
+ return /* @__PURE__ */ jsx37(
3416
3548
  "a",
3417
3549
  {
3418
3550
  className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
3419
- ...attributes,
3551
+ ...omitInputAttributes(nodeBackButton),
3420
3552
  href: initFlowUrl2,
3421
3553
  title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
3422
3554
  "data-testid": `ory/screen/${flowType}/action/restart`,
3423
3555
  children: /* @__PURE__ */ jsxs16("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
3424
- /* @__PURE__ */ jsx36(
3556
+ /* @__PURE__ */ jsx37(
3425
3557
  arrow_left_default,
3426
3558
  {
3427
3559
  size: 16,
@@ -3429,7 +3561,7 @@ function DefaultCurrentIdentifierButton() {
3429
3561
  className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
3430
3562
  }
3431
3563
  ),
3432
- /* @__PURE__ */ jsx36("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
3564
+ /* @__PURE__ */ jsx37("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
3433
3565
  ] })
3434
3566
  }
3435
3567
  );
@@ -3471,7 +3603,7 @@ function guessRegistrationBackButton(uiNodes) {
3471
3603
  }
3472
3604
 
3473
3605
  // src/theme/default/components/card/header.tsx
3474
- import { jsx as jsx37, jsxs as jsxs17 } from "react/jsx-runtime";
3606
+ import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
3475
3607
  function InnerCardHeader({
3476
3608
  title,
3477
3609
  text,
@@ -3479,10 +3611,10 @@ function InnerCardHeader({
3479
3611
  }) {
3480
3612
  const { Card } = useComponents4();
3481
3613
  return /* @__PURE__ */ jsxs17("header", { className: "flex flex-col gap-8 antialiased", children: [
3482
- /* @__PURE__ */ jsx37(Card.Logo, {}),
3614
+ /* @__PURE__ */ jsx38(Card.Logo, {}),
3483
3615
  /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2", children: [
3484
- /* @__PURE__ */ jsx37("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
3485
- /* @__PURE__ */ jsx37(
3616
+ /* @__PURE__ */ jsx38("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
3617
+ /* @__PURE__ */ jsx38(
3486
3618
  "p",
3487
3619
  {
3488
3620
  className: "leading-normal text-interface-foreground-default-secondary",
@@ -3490,7 +3622,7 @@ function InnerCardHeader({
3490
3622
  children: text
3491
3623
  }
3492
3624
  ),
3493
- /* @__PURE__ */ jsx37(DefaultCurrentIdentifierButton, {})
3625
+ /* @__PURE__ */ jsx38(DefaultCurrentIdentifierButton, {})
3494
3626
  ] })
3495
3627
  ] });
3496
3628
  }
@@ -3500,44 +3632,40 @@ function DefaultCardHeader() {
3500
3632
  context.flow.ui,
3501
3633
  context
3502
3634
  );
3503
- return /* @__PURE__ */ jsx37(InnerCardHeader, { title, text: description, messageId });
3635
+ return /* @__PURE__ */ jsx38(InnerCardHeader, { title, text: description, messageId });
3504
3636
  }
3505
3637
 
3506
3638
  // src/theme/default/components/card/logo.tsx
3507
- import { useOryFlow as useOryFlow6 } from "@ory/elements-react";
3508
- import { jsx as jsx38 } from "react/jsx-runtime";
3639
+ import { useOryConfiguration as useOryConfiguration4 } from "@ory/elements-react";
3640
+ import { jsx as jsx39 } from "react/jsx-runtime";
3509
3641
  function DefaultCardLogo() {
3510
- var _a;
3511
- const flow = useOryFlow6();
3512
- if (flow.config.project.logo_light_url) {
3513
- return /* @__PURE__ */ jsx38(
3642
+ const config = useOryConfiguration4();
3643
+ if (config.project.logo_light_url) {
3644
+ return /* @__PURE__ */ jsx39(
3514
3645
  "img",
3515
3646
  {
3516
- src: flow.config.project.logo_light_url,
3647
+ src: config.project.logo_light_url,
3517
3648
  width: 100,
3518
3649
  height: 36,
3519
3650
  alt: "Logo"
3520
3651
  }
3521
3652
  );
3522
3653
  }
3523
- if (flow.config.logoUrl) {
3524
- return /* @__PURE__ */ jsx38("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
3525
- }
3526
- return /* @__PURE__ */ jsx38("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: (_a = flow.config.project.name) != null ? _a : flow.config.name });
3654
+ return /* @__PURE__ */ jsx39("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.project.name });
3527
3655
  }
3528
3656
 
3529
3657
  // src/theme/default/components/card/layout.tsx
3530
- import { jsx as jsx39 } from "react/jsx-runtime";
3658
+ import { jsx as jsx40 } from "react/jsx-runtime";
3531
3659
  function DefaultCardLayout({ children }) {
3532
- return /* @__PURE__ */ jsx39("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
3660
+ return /* @__PURE__ */ jsx40("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
3533
3661
  }
3534
3662
 
3535
3663
  // src/theme/default/components/card/index.tsx
3536
- import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
3664
+ import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
3537
3665
  function DefaultCard({ children }) {
3538
- return /* @__PURE__ */ jsx40("div", { className: "flex flex-1 sm:items-center justify-center font-sans items-start w-full sm:w-[480px] sm:max-w-[480px]", children: /* @__PURE__ */ jsxs18("div", { className: "relative grid grid-cols-1 gap-8 sm:rounded-cards sm:border border-form-border-default bg-form-background-default px-8 py-12 sm:px-12 sm:py-14 border-b w-full", children: [
3666
+ return /* @__PURE__ */ jsx41("div", { className: "flex flex-1 sm:items-center justify-center font-sans items-start w-full sm:w-[480px] sm:max-w-[480px]", children: /* @__PURE__ */ jsxs18("div", { className: "relative grid grid-cols-1 gap-8 sm:rounded-cards sm:border border-form-border-default bg-form-background-default px-8 py-12 sm:px-12 sm:py-14 border-b w-full", children: [
3539
3667
  children,
3540
- /* @__PURE__ */ jsx40(Badge, {})
3668
+ /* @__PURE__ */ jsx41(Badge, {})
3541
3669
  ] }) });
3542
3670
  }
3543
3671
 
@@ -3553,61 +3681,61 @@ import { useIntl as useIntl12 } from "react-intl";
3553
3681
  import {
3554
3682
  messageTestId as messageTestId2,
3555
3683
  uiTextToFormattedMessage as uiTextToFormattedMessage3,
3556
- useOryFlow as useOryFlow8
3684
+ useOryFlow as useOryFlow7
3557
3685
  } from "@ory/elements-react";
3558
3686
  import { FlowType as FlowType13 } from "@ory/client-fetch";
3559
3687
 
3560
3688
  // src/theme/default/components/form/social.tsx
3561
3689
  import {
3562
3690
  uiTextToFormattedMessage as uiTextToFormattedMessage2,
3563
- useOryFlow as useOryFlow7
3691
+ useOryFlow as useOryFlow6
3564
3692
  } from "@ory/elements-react";
3565
- import { useEffect as useEffect3 } from "react";
3693
+ import { useEffect as useEffect4 } from "react";
3566
3694
  import { useFormContext as useFormContext13 } from "react-hook-form";
3567
3695
  import { useIntl as useIntl11 } from "react-intl";
3568
3696
  import { useDebounceValue } from "usehooks-ts";
3569
3697
 
3570
3698
  // src/theme/default/provider-logos/apple.svg
3571
3699
  import * as React4 from "react";
3572
- import { jsx as jsx41 } from "react/jsx-runtime";
3700
+ import { jsx as jsx42 } from "react/jsx-runtime";
3573
3701
  var SvgApple = (props) => {
3574
3702
  var _a, _b;
3575
- return /* @__PURE__ */ jsx41("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx41("path", { fill: "#283544", d: "M27.734 11.55c-.134.078-3.317 1.724-3.317 5.374.15 4.162 4.017 5.621 4.083 5.621-.066.078-.584 1.988-2.116 3.991C25.167 28.261 23.817 30 21.767 30c-1.95 0-2.65-1.15-4.9-1.15-2.416 0-3.1 1.15-4.95 1.15-2.05 0-3.5-1.832-4.782-3.541-1.667-2.236-3.083-5.746-3.133-9.116-.034-1.786.334-3.54 1.266-5.032 1.317-2.081 3.667-3.494 6.233-3.54 1.966-.063 3.716 1.257 4.916 1.257 1.15 0 3.3-1.258 5.733-1.258 1.05.001 3.85.296 5.584 2.78M16.25 8.414c-.35-1.631.616-3.262 1.516-4.302C18.917 2.854 20.734 2 22.3 2c.1 1.63-.534 3.23-1.666 4.395-1.017 1.258-2.767 2.205-4.383 2.019" }) });
3703
+ return /* @__PURE__ */ jsx42("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx42("path", { fill: "#283544", d: "M27.734 11.55c-.134.078-3.317 1.724-3.317 5.374.15 4.162 4.017 5.621 4.083 5.621-.066.078-.584 1.988-2.116 3.991C25.167 28.261 23.817 30 21.767 30c-1.95 0-2.65-1.15-4.9-1.15-2.416 0-3.1 1.15-4.95 1.15-2.05 0-3.5-1.832-4.782-3.541-1.667-2.236-3.083-5.746-3.133-9.116-.034-1.786.334-3.54 1.266-5.032 1.317-2.081 3.667-3.494 6.233-3.54 1.966-.063 3.716 1.257 4.916 1.257 1.15 0 3.3-1.258 5.733-1.258 1.05.001 3.85.296 5.584 2.78M16.25 8.414c-.35-1.631.616-3.262 1.516-4.302C18.917 2.854 20.734 2 22.3 2c.1 1.63-.534 3.23-1.666 4.395-1.017 1.258-2.767 2.205-4.383 2.019" }) });
3576
3704
  };
3577
3705
  var apple_default = SvgApple;
3578
3706
 
3579
3707
  // src/theme/default/provider-logos/auth0.svg
3580
3708
  import * as React5 from "react";
3581
- import { jsx as jsx42 } from "react/jsx-runtime";
3709
+ import { jsx as jsx43 } from "react/jsx-runtime";
3582
3710
  var SvgAuth0 = (props) => {
3583
3711
  var _a, _b;
3584
- return /* @__PURE__ */ jsx42("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx42("path", { fill: "#eb5424", d: "M49.012 51.774 42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z" }) });
3712
+ return /* @__PURE__ */ jsx43("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx43("path", { fill: "#eb5424", d: "M49.012 51.774 42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z" }) });
3585
3713
  };
3586
3714
  var auth0_default = SvgAuth0;
3587
3715
 
3588
3716
  // src/theme/default/provider-logos/discord.svg
3589
3717
  import * as React6 from "react";
3590
- import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
3718
+ import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
3591
3719
  var SvgDiscord = (props) => {
3592
3720
  var _a, _b;
3593
3721
  return /* @__PURE__ */ jsxs19("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3594
- /* @__PURE__ */ jsx43("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
3595
- /* @__PURE__ */ jsx43("path", { fill: "#5865F2", d: "M23.636 9.34A18.8 18.8 0 0 0 19.097 8c-.195.332-.424.779-.581 1.134a17.7 17.7 0 0 0-5.03 0A12 12 0 0 0 12.897 8a18.7 18.7 0 0 0-4.542 1.343c-2.872 4.078-3.65 8.055-3.262 11.975a18.6 18.6 0 0 0 5.567 2.68c.448-.58.848-1.195 1.192-1.844a12 12 0 0 1-1.877-.859 9 9 0 0 0 .46-.342c3.62 1.59 7.553 1.59 11.13 0q.225.178.46.342c-.595.337-1.225.626-1.88.86q.516.974 1.191 1.845a18.6 18.6 0 0 0 5.57-2.682c.457-4.544-.78-8.484-3.27-11.978m-11.29 9.567c-1.087 0-1.978-.953-1.978-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116.002 1.16-.872 2.113-1.978 2.113m7.308 0c-1.086 0-1.977-.953-1.977-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116 0 1.16-.872 2.113-1.978 2.113" })
3722
+ /* @__PURE__ */ jsx44("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
3723
+ /* @__PURE__ */ jsx44("path", { fill: "#5865F2", d: "M23.636 9.34A18.8 18.8 0 0 0 19.097 8c-.195.332-.424.779-.581 1.134a17.7 17.7 0 0 0-5.03 0A12 12 0 0 0 12.897 8a18.7 18.7 0 0 0-4.542 1.343c-2.872 4.078-3.65 8.055-3.262 11.975a18.6 18.6 0 0 0 5.567 2.68c.448-.58.848-1.195 1.192-1.844a12 12 0 0 1-1.877-.859 9 9 0 0 0 .46-.342c3.62 1.59 7.553 1.59 11.13 0q.225.178.46.342c-.595.337-1.225.626-1.88.86q.516.974 1.191 1.845a18.6 18.6 0 0 0 5.57-2.682c.457-4.544-.78-8.484-3.27-11.978m-11.29 9.567c-1.087 0-1.978-.953-1.978-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116.002 1.16-.872 2.113-1.978 2.113m7.308 0c-1.086 0-1.977-.953-1.977-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116 0 1.16-.872 2.113-1.978 2.113" })
3596
3724
  ] });
3597
3725
  };
3598
3726
  var discord_default = SvgDiscord;
3599
3727
 
3600
3728
  // src/theme/default/provider-logos/facebook.svg
3601
3729
  import * as React7 from "react";
3602
- import { jsx as jsx44, jsxs as jsxs20 } from "react/jsx-runtime";
3730
+ import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
3603
3731
  var SvgFacebook = (props) => {
3604
3732
  var _a, _b;
3605
3733
  return /* @__PURE__ */ jsxs20("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3606
- /* @__PURE__ */ jsx44("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
3607
- /* @__PURE__ */ jsx44("path", { fill: "#fff", d: "m21.214 20.282.622-3.952h-3.89v-2.563c0-1.081.542-2.136 2.284-2.136H22V8.267S20.395 8 18.86 8c-3.205 0-5.298 1.893-5.298 5.318v3.012H10v3.952h3.562v9.552q1.073.165 2.191.166 1.12 0 2.192-.166v-9.552z" }),
3608
- /* @__PURE__ */ jsx44("defs", { children: /* @__PURE__ */ jsxs20("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
3609
- /* @__PURE__ */ jsx44("stop", { stopColor: "#18ACFE" }),
3610
- /* @__PURE__ */ jsx44("stop", { offset: 1, stopColor: "#0163E0" })
3734
+ /* @__PURE__ */ jsx45("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
3735
+ /* @__PURE__ */ jsx45("path", { fill: "#fff", d: "m21.214 20.282.622-3.952h-3.89v-2.563c0-1.081.542-2.136 2.284-2.136H22V8.267S20.395 8 18.86 8c-3.205 0-5.298 1.893-5.298 5.318v3.012H10v3.952h3.562v9.552q1.073.165 2.191.166 1.12 0 2.192-.166v-9.552z" }),
3736
+ /* @__PURE__ */ jsx45("defs", { children: /* @__PURE__ */ jsxs20("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
3737
+ /* @__PURE__ */ jsx45("stop", { stopColor: "#18ACFE" }),
3738
+ /* @__PURE__ */ jsx45("stop", { offset: 1, stopColor: "#0163E0" })
3611
3739
  ] }) })
3612
3740
  ] });
3613
3741
  };
@@ -3615,111 +3743,111 @@ var facebook_default = SvgFacebook;
3615
3743
 
3616
3744
  // src/theme/default/provider-logos/github.svg
3617
3745
  import * as React8 from "react";
3618
- import { jsx as jsx45 } from "react/jsx-runtime";
3746
+ import { jsx as jsx46 } from "react/jsx-runtime";
3619
3747
  var SvgGithub = (props) => {
3620
3748
  var _a, _b;
3621
- return /* @__PURE__ */ jsx45("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx45("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
3749
+ return /* @__PURE__ */ jsx46("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx46("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
3622
3750
  };
3623
3751
  var github_default = SvgGithub;
3624
3752
 
3625
3753
  // src/theme/default/provider-logos/gitlab.svg
3626
3754
  import * as React9 from "react";
3627
- import { jsx as jsx46, jsxs as jsxs21 } from "react/jsx-runtime";
3755
+ import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
3628
3756
  var SvgGitlab = (props) => {
3629
3757
  var _a, _b;
3630
3758
  return /* @__PURE__ */ jsxs21("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3631
- /* @__PURE__ */ jsx46("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
3632
- /* @__PURE__ */ jsx46("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
3633
- /* @__PURE__ */ jsx46("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
3634
- /* @__PURE__ */ jsx46("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
3759
+ /* @__PURE__ */ jsx47("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
3760
+ /* @__PURE__ */ jsx47("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
3761
+ /* @__PURE__ */ jsx47("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
3762
+ /* @__PURE__ */ jsx47("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
3635
3763
  ] });
3636
3764
  };
3637
3765
  var gitlab_default = SvgGitlab;
3638
3766
 
3639
3767
  // src/theme/default/provider-logos/google.svg
3640
3768
  import * as React10 from "react";
3641
- import { jsx as jsx47, jsxs as jsxs22 } from "react/jsx-runtime";
3769
+ import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
3642
3770
  var SvgGoogle = (props) => {
3643
3771
  var _a, _b;
3644
3772
  return /* @__PURE__ */ jsxs22("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3645
- /* @__PURE__ */ jsx47("path", { fill: "#4285F4", d: "M30.001 16.31c0-1.15-.095-1.99-.301-2.861H16.287v5.195h7.873c-.159 1.291-1.016 3.236-2.92 4.542l-.027.174 4.24 3.22.294.029c2.699-2.443 4.254-6.036 4.254-10.298" }),
3646
- /* @__PURE__ */ jsx47("path", { fill: "#34A853", d: "M16.286 30c3.857 0 7.095-1.244 9.46-3.391l-4.507-3.423c-1.207.825-2.826 1.4-4.953 1.4A8.58 8.58 0 0 1 8.16 18.77l-.167.014-4.41 3.344-.058.157C5.874 26.858 10.7 30 16.286 30" }),
3647
- /* @__PURE__ */ jsx47("path", { fill: "#FBBC05", d: "M8.16 18.769a8.5 8.5 0 0 1-.476-2.77c0-.964.174-1.897.46-2.768l-.008-.185-4.465-3.399-.146.068A13.8 13.8 0 0 0 2.001 16c0 2.256.556 4.387 1.524 6.284z" }),
3648
- /* @__PURE__ */ jsx47("path", { fill: "#EB4335", d: "M16.286 7.413c2.683 0 4.492 1.136 5.524 2.085l4.032-3.858C23.366 3.384 20.143 2 16.286 2 10.7 2 5.874 5.142 3.524 9.715l4.62 3.516c1.158-3.375 4.365-5.818 8.142-5.818" })
3773
+ /* @__PURE__ */ jsx48("path", { fill: "#4285F4", d: "M30.001 16.31c0-1.15-.095-1.99-.301-2.861H16.287v5.195h7.873c-.159 1.291-1.016 3.236-2.92 4.542l-.027.174 4.24 3.22.294.029c2.699-2.443 4.254-6.036 4.254-10.298" }),
3774
+ /* @__PURE__ */ jsx48("path", { fill: "#34A853", d: "M16.286 30c3.857 0 7.095-1.244 9.46-3.391l-4.507-3.423c-1.207.825-2.826 1.4-4.953 1.4A8.58 8.58 0 0 1 8.16 18.77l-.167.014-4.41 3.344-.058.157C5.874 26.858 10.7 30 16.286 30" }),
3775
+ /* @__PURE__ */ jsx48("path", { fill: "#FBBC05", d: "M8.16 18.769a8.5 8.5 0 0 1-.476-2.77c0-.964.174-1.897.46-2.768l-.008-.185-4.465-3.399-.146.068A13.8 13.8 0 0 0 2.001 16c0 2.256.556 4.387 1.524 6.284z" }),
3776
+ /* @__PURE__ */ jsx48("path", { fill: "#EB4335", d: "M16.286 7.413c2.683 0 4.492 1.136 5.524 2.085l4.032-3.858C23.366 3.384 20.143 2 16.286 2 10.7 2 5.874 5.142 3.524 9.715l4.62 3.516c1.158-3.375 4.365-5.818 8.142-5.818" })
3649
3777
  ] });
3650
3778
  };
3651
3779
  var google_default = SvgGoogle;
3652
3780
 
3653
3781
  // src/theme/default/provider-logos/linkedin.svg
3654
3782
  import * as React11 from "react";
3655
- import { jsx as jsx48, jsxs as jsxs23 } from "react/jsx-runtime";
3783
+ import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
3656
3784
  var SvgLinkedin = (props) => {
3657
3785
  var _a, _b;
3658
3786
  return /* @__PURE__ */ jsxs23("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3659
- /* @__PURE__ */ jsx48("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
3660
- /* @__PURE__ */ jsx48("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
3787
+ /* @__PURE__ */ jsx49("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
3788
+ /* @__PURE__ */ jsx49("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
3661
3789
  ] });
3662
3790
  };
3663
3791
  var linkedin_default = SvgLinkedin;
3664
3792
 
3665
3793
  // src/theme/default/provider-logos/microsoft.svg
3666
3794
  import * as React12 from "react";
3667
- import { jsx as jsx49, jsxs as jsxs24 } from "react/jsx-runtime";
3795
+ import { jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
3668
3796
  var SvgMicrosoft = (props) => {
3669
3797
  var _a, _b;
3670
3798
  return /* @__PURE__ */ jsxs24("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 23 23", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3671
- /* @__PURE__ */ jsx49("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
3672
- /* @__PURE__ */ jsx49("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
3673
- /* @__PURE__ */ jsx49("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
3674
- /* @__PURE__ */ jsx49("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
3799
+ /* @__PURE__ */ jsx50("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
3800
+ /* @__PURE__ */ jsx50("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
3801
+ /* @__PURE__ */ jsx50("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
3802
+ /* @__PURE__ */ jsx50("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
3675
3803
  ] });
3676
3804
  };
3677
3805
  var microsoft_default = SvgMicrosoft;
3678
3806
 
3679
3807
  // src/theme/default/provider-logos/slack.svg
3680
3808
  import * as React13 from "react";
3681
- import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
3809
+ import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
3682
3810
  var SvgSlack = (props) => {
3683
3811
  var _a, _b;
3684
3812
  return /* @__PURE__ */ jsxs25("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3685
- /* @__PURE__ */ jsx50("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
3686
- /* @__PURE__ */ jsx50("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
3687
- /* @__PURE__ */ jsx50("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
3688
- /* @__PURE__ */ jsx50("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
3813
+ /* @__PURE__ */ jsx51("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
3814
+ /* @__PURE__ */ jsx51("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
3815
+ /* @__PURE__ */ jsx51("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
3816
+ /* @__PURE__ */ jsx51("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
3689
3817
  ] });
3690
3818
  };
3691
3819
  var slack_default = SvgSlack;
3692
3820
 
3693
3821
  // src/theme/default/provider-logos/spotify.svg
3694
3822
  import * as React14 from "react";
3695
- import { jsx as jsx51, jsxs as jsxs26 } from "react/jsx-runtime";
3823
+ import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
3696
3824
  var SvgSpotify = (props) => {
3697
3825
  var _a, _b;
3698
3826
  return /* @__PURE__ */ jsxs26("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3699
- /* @__PURE__ */ jsx51("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
3700
- /* @__PURE__ */ jsx51("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
3827
+ /* @__PURE__ */ jsx52("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
3828
+ /* @__PURE__ */ jsx52("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
3701
3829
  ] });
3702
3830
  };
3703
3831
  var spotify_default = SvgSpotify;
3704
3832
 
3705
3833
  // src/theme/default/provider-logos/yandex.svg
3706
3834
  import * as React15 from "react";
3707
- import { jsx as jsx52, jsxs as jsxs27 } from "react/jsx-runtime";
3835
+ import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
3708
3836
  var SvgYandex = (props) => {
3709
3837
  var _a, _b;
3710
3838
  return /* @__PURE__ */ jsxs27("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
3711
- /* @__PURE__ */ jsx52("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
3712
- /* @__PURE__ */ jsx52("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
3839
+ /* @__PURE__ */ jsx53("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
3840
+ /* @__PURE__ */ jsx53("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
3713
3841
  ] });
3714
3842
  };
3715
3843
  var yandex_default = SvgYandex;
3716
3844
 
3717
3845
  // src/theme/default/provider-logos/x.svg
3718
3846
  import * as React16 from "react";
3719
- import { jsx as jsx53 } from "react/jsx-runtime";
3847
+ import { jsx as jsx54 } from "react/jsx-runtime";
3720
3848
  var SvgX = (props) => {
3721
3849
  var _a, _b;
3722
- return /* @__PURE__ */ jsx53("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx53("path", { fill: "#0F172A", d: "M24.122 3h4.292L18.99 13.73 30 28.285h-8.64l-6.764-8.845-7.744 8.845H2.56l9.983-11.476L2 3h8.854l6.112 8.08zM22.62 25.766h2.379L9.604 5.426H7.048z" }) });
3850
+ return /* @__PURE__ */ jsx54("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx54("path", { fill: "#0F172A", d: "M24.122 3h4.292L18.99 13.73 30 28.285h-8.64l-6.764-8.845-7.744 8.845H2.56l9.983-11.476L2 3h8.854l6.112 8.08zM22.62 25.766h2.379L9.604 5.426H7.048z" }) });
3723
3851
  };
3724
3852
  var x_default = SvgX;
3725
3853
 
@@ -3742,7 +3870,7 @@ var logos = {
3742
3870
  var provider_logos_default = logos;
3743
3871
 
3744
3872
  // src/theme/default/components/form/spinner.tsx
3745
- import { jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
3873
+ import { jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
3746
3874
  function Spinner({ className }) {
3747
3875
  return /* @__PURE__ */ jsxs28(
3748
3876
  "svg",
@@ -3757,7 +3885,7 @@ function Spinner({ className }) {
3757
3885
  fill: "none",
3758
3886
  xmlns: "http://www.w3.org/2000/svg",
3759
3887
  children: [
3760
- /* @__PURE__ */ jsx54("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ jsx54(
3888
+ /* @__PURE__ */ jsx55("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ jsx55(
3761
3889
  "path",
3762
3890
  {
3763
3891
  d: "M23.364 10.6362C22.1053 9.37751 20.5016 8.52034 18.7558 8.17307C17.01 7.82581 15.2004 8.00404 13.5559 8.68523C11.9113 9.36641 10.5057 10.52 9.51678 12C8.52784 13.4801 8 15.2201 8 17.0001C8 18.7802 8.52784 20.5202 9.51678 22.0003C10.5057 23.4803 11.9113 24.6339 13.5559 25.3151C15.2004 25.9962 17.01 26.1745 18.7558 25.8272C20.5016 25.4799 22.1053 24.6228 23.364 23.3641",
@@ -3766,7 +3894,7 @@ function Spinner({ className }) {
3766
3894
  strokeLinejoin: "round"
3767
3895
  }
3768
3896
  ) }),
3769
- /* @__PURE__ */ jsx54("defs", { children: /* @__PURE__ */ jsx54("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ jsx54(
3897
+ /* @__PURE__ */ jsx55("defs", { children: /* @__PURE__ */ jsx55("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ jsx55(
3770
3898
  "rect",
3771
3899
  {
3772
3900
  width: "24",
@@ -3782,25 +3910,7 @@ function Spinner({ className }) {
3782
3910
 
3783
3911
  // src/theme/default/components/form/social.tsx
3784
3912
  import { UiNodeGroupEnum as UiNodeGroupEnum16 } from "@ory/client-fetch";
3785
-
3786
- // src/util/omitAttributes.ts
3787
- function omitInputAttributes({
3788
- ...attrs
3789
- }) {
3790
- return omit(attrs, [
3791
- "autocomplete",
3792
- "label",
3793
- "node_type",
3794
- "maxlength",
3795
- "onclick",
3796
- "onclickTrigger",
3797
- "onload",
3798
- "onloadTrigger"
3799
- ]);
3800
- }
3801
-
3802
- // src/theme/default/components/form/social.tsx
3803
- import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
3913
+ import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs29 } from "react/jsx-runtime";
3804
3914
  function extractProvider(context) {
3805
3915
  if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
3806
3916
  return context.provider;
@@ -3819,7 +3929,7 @@ function DefaultButtonSocial({
3819
3929
  const { type: _ignoredType, name: _ignoredName, ...rest } = attributes;
3820
3930
  const {
3821
3931
  flow: { ui }
3822
- } = useOryFlow7();
3932
+ } = useOryFlow6();
3823
3933
  const [clicked, setClicked] = useDebounceValue(false, 100);
3824
3934
  const intl = useIntl11();
3825
3935
  const {
@@ -3835,7 +3945,7 @@ function DefaultButtonSocial({
3835
3945
  onClick == null ? void 0 : onClick();
3836
3946
  setClicked(true);
3837
3947
  };
3838
- useEffect3(() => {
3948
+ useEffect4(() => {
3839
3949
  if (!isSubmitting) {
3840
3950
  setClicked(false);
3841
3951
  }
@@ -3855,21 +3965,21 @@ function DefaultButtonSocial({
3855
3965
  "aria-label": label,
3856
3966
  ...omitInputAttributes(rest),
3857
3967
  children: [
3858
- /* @__PURE__ */ jsx55("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx55(Logo, { size: 20 }) : /* @__PURE__ */ jsx55(GenericLogo, { label: provider.slice(0, 1) }) : /* @__PURE__ */ jsx55(Spinner, { className: "size-5" }) }),
3968
+ /* @__PURE__ */ jsx56("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx56(Logo, { size: 20 }) : /* @__PURE__ */ jsx56(GenericLogo, { label: provider.slice(0, 1) }) : /* @__PURE__ */ jsx56(Spinner, { className: "size-5" }) }),
3859
3969
  showLabel && node.meta.label ? /* @__PURE__ */ jsxs29(Fragment9, { children: [
3860
- /* @__PURE__ */ jsx55("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
3861
- /* @__PURE__ */ jsx55("span", { className: "size-5 block" })
3970
+ /* @__PURE__ */ jsx56("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
3971
+ /* @__PURE__ */ jsx56("span", { className: "size-5 block" })
3862
3972
  ] }) : null
3863
3973
  ]
3864
3974
  }
3865
3975
  );
3866
3976
  }
3867
- DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ jsx55(DefaultButtonSocial, { ...props, logos: logos2 });
3977
+ DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ jsx56(DefaultButtonSocial, { ...props, logos: logos2 });
3868
3978
  function DefaultSocialButtonContainer({
3869
3979
  children,
3870
3980
  nodes
3871
3981
  }) {
3872
- return /* @__PURE__ */ jsx55(
3982
+ return /* @__PURE__ */ jsx56(
3873
3983
  "div",
3874
3984
  {
3875
3985
  className: cn("grid gap-3", {
@@ -3883,11 +3993,11 @@ function DefaultSocialButtonContainer({
3883
3993
  );
3884
3994
  }
3885
3995
  function GenericLogo({ label }) {
3886
- return /* @__PURE__ */ jsx55("span", { className: "flex rounded-buttons bg-button-social-background-generic-provider text-button-social-foreground-generic-provider border-button-social-border-generic-provider text-xs size-full items-center justify-center", children: label });
3996
+ return /* @__PURE__ */ jsx56("span", { className: "flex rounded-buttons bg-button-social-background-generic-provider text-button-social-foreground-generic-provider border-button-social-border-generic-provider text-xs size-full items-center justify-center", children: label });
3887
3997
  }
3888
3998
 
3889
3999
  // src/theme/default/components/form/index.tsx
3890
- import { jsx as jsx56 } from "react/jsx-runtime";
4000
+ import { jsx as jsx57 } from "react/jsx-runtime";
3891
4001
  function DefaultFormContainer({
3892
4002
  children,
3893
4003
  onSubmit,
@@ -3895,7 +4005,7 @@ function DefaultFormContainer({
3895
4005
  method,
3896
4006
  "data-testid": dataTestId
3897
4007
  }) {
3898
- return /* @__PURE__ */ jsx56(
4008
+ return /* @__PURE__ */ jsx57(
3899
4009
  "form",
3900
4010
  {
3901
4011
  "data-testid": dataTestId,
@@ -3909,11 +4019,11 @@ function DefaultFormContainer({
3909
4019
  );
3910
4020
  }
3911
4021
  function DefaultMessageContainer({ children }) {
3912
- const { flowType } = useOryFlow8();
4022
+ const { flowType } = useOryFlow7();
3913
4023
  if (!children || Array.isArray(children) && children.length === 0) {
3914
4024
  return null;
3915
4025
  }
3916
- return /* @__PURE__ */ jsx56(
4026
+ return /* @__PURE__ */ jsx57(
3917
4027
  "section",
3918
4028
  {
3919
4029
  className: cn(
@@ -3925,7 +4035,7 @@ function DefaultMessageContainer({ children }) {
3925
4035
  }
3926
4036
  function DefaultMessage({ message }) {
3927
4037
  const intl = useIntl12();
3928
- return /* @__PURE__ */ jsx56(
4038
+ return /* @__PURE__ */ jsx57(
3929
4039
  "span",
3930
4040
  {
3931
4041
  className: cn(
@@ -3945,60 +4055,60 @@ import { useIntl as useIntl13 } from "react-intl";
3945
4055
 
3946
4056
  // src/theme/default/assets/icons/code.svg
3947
4057
  import * as React17 from "react";
3948
- import { jsx as jsx57 } from "react/jsx-runtime";
4058
+ import { jsx as jsx58 } from "react/jsx-runtime";
3949
4059
  var SvgCode = (props) => {
3950
4060
  var _a, _b;
3951
- return /* @__PURE__ */ jsx57("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 15 13", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx57("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6.333 10.666h-4A1.333 1.333 0 0 1 1 9.333V2.666m0 0a1.333 1.333 0 0 1 1.333-1.333h9.334A1.333 1.333 0 0 1 13 2.666m-12 0 6 4 6-4m0 0v4M12.333 12l1.334-1.334-1.334-1.333m-2 0L9 10.666 10.333 12" }) });
4061
+ return /* @__PURE__ */ jsx58("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 15 13", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx58("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6.333 10.666h-4A1.333 1.333 0 0 1 1 9.333V2.666m0 0a1.333 1.333 0 0 1 1.333-1.333h9.334A1.333 1.333 0 0 1 13 2.666m-12 0 6 4 6-4m0 0v4M12.333 12l1.334-1.334-1.334-1.333m-2 0L9 10.666 10.333 12" }) });
3952
4062
  };
3953
4063
  var code_default = SvgCode;
3954
4064
 
3955
4065
  // src/theme/default/assets/icons/passkey.svg
3956
4066
  import * as React18 from "react";
3957
- import { jsx as jsx58 } from "react/jsx-runtime";
4067
+ import { jsx as jsx59 } from "react/jsx-runtime";
3958
4068
  var SvgPasskey = (props) => {
3959
4069
  var _a, _b;
3960
- return /* @__PURE__ */ jsx58("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 13 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx58("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.602 3.667c.603 1 .86 2.171.733 3.333v.667a4 4 0 0 0 .533 2M3.335 6.333a2.667 2.667 0 0 1 5.333 0V7c0 1.442.468 2.846 1.334 4m-4-4.667v1.334A9.33 9.33 0 0 0 7.668 13M3.335 9a12 12 0 0 0 1.2 4m-3.267-1.333A14.7 14.7 0 0 1 .668 7v-.667a5.333 5.333 0 0 1 8-4.633" }) });
4070
+ return /* @__PURE__ */ jsx59("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 13 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx59("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.602 3.667c.603 1 .86 2.171.733 3.333v.667a4 4 0 0 0 .533 2M3.335 6.333a2.667 2.667 0 0 1 5.333 0V7c0 1.442.468 2.846 1.334 4m-4-4.667v1.334A9.33 9.33 0 0 0 7.668 13M3.335 9a12 12 0 0 0 1.2 4m-3.267-1.333A14.7 14.7 0 0 1 .668 7v-.667a5.333 5.333 0 0 1 8-4.633" }) });
3961
4071
  };
3962
4072
  var passkey_default = SvgPasskey;
3963
4073
 
3964
4074
  // src/theme/default/assets/icons/password.svg
3965
4075
  import * as React19 from "react";
3966
- import { jsx as jsx59 } from "react/jsx-runtime";
4076
+ import { jsx as jsx60 } from "react/jsx-runtime";
3967
4077
  var SvgPassword = (props) => {
3968
4078
  var _a, _b;
3969
- return /* @__PURE__ */ jsx59("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 4", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx59("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 .667v2.667m-1.333-.667 2.666-1.333m-2.666 0 2.666 1.333m-6-2v2.667M1 2.667l2.667-1.333M1 1.334l2.667 1.333m8-2v2.667m-1.334-.667L13 1.334m-2.667 0L13 2.667" }) });
4079
+ return /* @__PURE__ */ jsx60("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 4", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx60("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 .667v2.667m-1.333-.667 2.666-1.333m-2.666 0 2.666 1.333m-6-2v2.667M1 2.667l2.667-1.333M1 1.334l2.667 1.333m8-2v2.667m-1.334-.667L13 1.334m-2.667 0L13 2.667" }) });
3970
4080
  };
3971
4081
  var password_default = SvgPassword;
3972
4082
 
3973
4083
  // src/theme/default/assets/icons/webauthn.svg
3974
4084
  import * as React20 from "react";
3975
- import { jsx as jsx60 } from "react/jsx-runtime";
4085
+ import { jsx as jsx61 } from "react/jsx-runtime";
3976
4086
  var SvgWebauthn = (props) => {
3977
4087
  var _a, _b;
3978
- return /* @__PURE__ */ jsx60("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx60("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5h.007m1.03-3.438 2.401 2.401a1.92 1.92 0 0 1 0 2.713l-1.762 1.762a1.92 1.92 0 0 1-2.713 0l-.2-.2-4.372 4.371a1.33 1.33 0 0 1-.826.386L2.448 13h-.781a.667.667 0 0 1-.662-.589L1 12.333v-.781c0-.313.11-.616.311-.856l.08-.087.276-.276H3V9h1.333V7.667l1.43-1.43-.201-.2a1.92 1.92 0 0 1 0-2.713l1.762-1.762a1.92 1.92 0 0 1 2.713 0" }) });
4088
+ return /* @__PURE__ */ jsx61("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx61("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5h.007m1.03-3.438 2.401 2.401a1.92 1.92 0 0 1 0 2.713l-1.762 1.762a1.92 1.92 0 0 1-2.713 0l-.2-.2-4.372 4.371a1.33 1.33 0 0 1-.826.386L2.448 13h-.781a.667.667 0 0 1-.662-.589L1 12.333v-.781c0-.313.11-.616.311-.856l.08-.087.276-.276H3V9h1.333V7.667l1.43-1.43-.201-.2a1.92 1.92 0 0 1 0-2.713l1.762-1.762a1.92 1.92 0 0 1 2.713 0" }) });
3979
4089
  };
3980
4090
  var webauthn_default = SvgWebauthn;
3981
4091
 
3982
4092
  // src/theme/default/assets/icons/totp.svg
3983
4093
  import * as React21 from "react";
3984
- import { jsx as jsx61 } from "react/jsx-runtime";
4094
+ import { jsx as jsx62 } from "react/jsx-runtime";
3985
4095
  var SvgTotp = (props) => {
3986
4096
  var _a, _b;
3987
- return /* @__PURE__ */ jsx61("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx61("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
4097
+ return /* @__PURE__ */ jsx62("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx62("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
3988
4098
  };
3989
4099
  var totp_default = SvgTotp;
3990
4100
 
3991
4101
  // src/theme/default/assets/icons/code-asterix.svg
3992
4102
  import * as React22 from "react";
3993
- import { jsx as jsx62 } from "react/jsx-runtime";
4103
+ import { jsx as jsx63 } from "react/jsx-runtime";
3994
4104
  var SvgCodeAsterix = (props) => {
3995
4105
  var _a, _b;
3996
- return /* @__PURE__ */ jsx62("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx62("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 19.325a2 2 0 0 1-2-2v-4l-1-1 1-1v-4a2 2 0 0 1 2-2m6 6.875 3-1.687M12 12.2v3.375m0-3.375-3-1.687m3 1.687 3 1.688M12 12.2V8.825m0 3.375-3 1.688m9 5.437a2 2 0 0 0 2-2v-4l1-1-1-1v-4a2 2 0 0 0-2-2" }) });
4106
+ return /* @__PURE__ */ jsx63("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx63("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 19.325a2 2 0 0 1-2-2v-4l-1-1 1-1v-4a2 2 0 0 1 2-2m6 6.875 3-1.687M12 12.2v3.375m0-3.375-3-1.687m3 1.687 3 1.688M12 12.2V8.825m0 3.375-3 1.688m9 5.437a2 2 0 0 0 2-2v-4l1-1-1-1v-4a2 2 0 0 0-2-2" }) });
3997
4107
  };
3998
4108
  var code_asterix_default = SvgCodeAsterix;
3999
4109
 
4000
4110
  // src/theme/default/components/card/list-item.tsx
4001
- import { jsx as jsx63, jsxs as jsxs30 } from "react/jsx-runtime";
4111
+ import { jsx as jsx64, jsxs as jsxs30 } from "react/jsx-runtime";
4002
4112
  function ListItem({
4003
4113
  icon: Icon,
4004
4114
  as,
@@ -4018,10 +4128,10 @@ function ListItem({
4018
4128
  className
4019
4129
  ),
4020
4130
  children: [
4021
- /* @__PURE__ */ jsx63("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx63(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
4131
+ /* @__PURE__ */ jsx64("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx64(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
4022
4132
  /* @__PURE__ */ jsxs30("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
4023
- /* @__PURE__ */ jsx63("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
4024
- /* @__PURE__ */ jsx63("span", { className: "text-interface-foreground-default-secondary", children: description })
4133
+ /* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
4134
+ /* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-secondary", children: description })
4025
4135
  ] }),
4026
4136
  children
4027
4137
  ]
@@ -4030,7 +4140,7 @@ function ListItem({
4030
4140
  }
4031
4141
 
4032
4142
  // src/theme/default/components/card/auth-method-list-item.tsx
4033
- import { jsx as jsx64 } from "react/jsx-runtime";
4143
+ import { jsx as jsx65 } from "react/jsx-runtime";
4034
4144
  var iconsMap = {
4035
4145
  code: code_default,
4036
4146
  passkey: passkey_default,
@@ -4049,7 +4159,7 @@ function DefaultAuthMethodListItem({
4049
4159
  var _a;
4050
4160
  const intl = useIntl13();
4051
4161
  const Icon = iconsMap[group] || null;
4052
- return /* @__PURE__ */ jsx64(
4162
+ return /* @__PURE__ */ jsx65(
4053
4163
  ListItem,
4054
4164
  {
4055
4165
  as: "button",
@@ -4076,8 +4186,8 @@ import {
4076
4186
  import { cva } from "class-variance-authority";
4077
4187
  import { useFormContext as useFormContext14 } from "react-hook-form";
4078
4188
  import { useIntl as useIntl14 } from "react-intl";
4079
- import { useEffect as useEffect4, useState as useState4 } from "react";
4080
- import { jsx as jsx65, jsxs as jsxs31 } from "react/jsx-runtime";
4189
+ import { useEffect as useEffect5, useState as useState5 } from "react";
4190
+ import { jsx as jsx66, jsxs as jsxs31 } from "react/jsx-runtime";
4081
4191
  var buttonStyles = cva(
4082
4192
  [
4083
4193
  "relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
@@ -4117,14 +4227,14 @@ var DefaultButton = ({
4117
4227
  }) => {
4118
4228
  var _a;
4119
4229
  const { type, name, value, ...rest } = attributes;
4120
- const [clicked, setClicked] = useState4(false);
4230
+ const [clicked, setClicked] = useState5(false);
4121
4231
  const intl = useIntl14();
4122
4232
  const label = getNodeLabel(node);
4123
4233
  const {
4124
4234
  formState: { isSubmitting },
4125
4235
  setValue
4126
4236
  } = useFormContext14();
4127
- useEffect4(() => {
4237
+ useEffect5(() => {
4128
4238
  if (!isSubmitting) {
4129
4239
  setClicked(false);
4130
4240
  }
@@ -4150,8 +4260,8 @@ var DefaultButton = ({
4150
4260
  disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
4151
4261
  "data-loading": clicked,
4152
4262
  children: [
4153
- clicked ? /* @__PURE__ */ jsx65(Spinner, {}) : null,
4154
- label ? /* @__PURE__ */ jsx65("span", { children: uiTextToFormattedMessage4(label, intl) }) : ""
4263
+ clicked ? /* @__PURE__ */ jsx66(Spinner, {}) : null,
4264
+ label ? /* @__PURE__ */ jsx66("span", { children: uiTextToFormattedMessage4(label, intl) }) : ""
4155
4265
  ]
4156
4266
  }
4157
4267
  );
@@ -4169,7 +4279,7 @@ import { useIntl as useIntl16 } from "react-intl";
4169
4279
 
4170
4280
  // src/theme/default/components/ui/checkbox-label.tsx
4171
4281
  import { useIntl as useIntl15 } from "react-intl";
4172
- import { Fragment as Fragment10, jsx as jsx66 } from "react/jsx-runtime";
4282
+ import { Fragment as Fragment10, jsx as jsx67 } from "react/jsx-runtime";
4173
4283
  var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
4174
4284
  function computeLabelElements(labelText) {
4175
4285
  const elements = [];
@@ -4185,7 +4295,7 @@ function computeLabelElements(labelText) {
4185
4295
  elements.push(labelText.slice(lastIndex, matchStart));
4186
4296
  }
4187
4297
  elements.push(
4188
- /* @__PURE__ */ jsx66(
4298
+ /* @__PURE__ */ jsx67(
4189
4299
  "a",
4190
4300
  {
4191
4301
  href: url,
@@ -4210,13 +4320,13 @@ function CheckboxLabel({ label }) {
4210
4320
  return null;
4211
4321
  }
4212
4322
  const labelText = uiTextToFormattedMessage(label, intl);
4213
- return /* @__PURE__ */ jsx66(Fragment10, { children: computeLabelElements(labelText) });
4323
+ return /* @__PURE__ */ jsx67(Fragment10, { children: computeLabelElements(labelText) });
4214
4324
  }
4215
4325
 
4216
4326
  // src/theme/default/components/form/checkbox.tsx
4217
- import { jsx as jsx67, jsxs as jsxs32 } from "react/jsx-runtime";
4327
+ import { jsx as jsx68, jsxs as jsxs32 } from "react/jsx-runtime";
4218
4328
  function CheckboxSVG() {
4219
- return /* @__PURE__ */ jsx67(
4329
+ return /* @__PURE__ */ jsx68(
4220
4330
  "svg",
4221
4331
  {
4222
4332
  className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
@@ -4225,7 +4335,7 @@ function CheckboxSVG() {
4225
4335
  height: "16",
4226
4336
  viewBox: "0 0 16 16",
4227
4337
  fill: "none",
4228
- children: /* @__PURE__ */ jsx67(
4338
+ children: /* @__PURE__ */ jsx68(
4229
4339
  "path",
4230
4340
  {
4231
4341
  fillRule: "evenodd",
@@ -4247,7 +4357,7 @@ var DefaultCheckbox = ({
4247
4357
  const hasError = node.messages.some((m) => m.type === "error");
4248
4358
  return /* @__PURE__ */ jsxs32("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
4249
4359
  /* @__PURE__ */ jsxs32("span", { className: "flex h-5 items-center", children: [
4250
- /* @__PURE__ */ jsx67(
4360
+ /* @__PURE__ */ jsx68(
4251
4361
  "input",
4252
4362
  {
4253
4363
  ...omitInputAttributes(attributes),
@@ -4257,14 +4367,15 @@ var DefaultCheckbox = ({
4257
4367
  "peer size-4 border appearance-none rounded-forms bg-checkbox-background-default border-checkbox-border-checkbox-border-default checked:bg-checkbox-background-checked checked:border-checkbox-border-checkbox-border-checked",
4258
4368
  hasError && "border-interface-border-validation-danger"
4259
4369
  ),
4370
+ "data-testid": `ory/form/node/input/${name}`,
4260
4371
  ...register(name)
4261
4372
  }
4262
4373
  ),
4263
- /* @__PURE__ */ jsx67(CheckboxSVG, {})
4374
+ /* @__PURE__ */ jsx68(CheckboxSVG, {})
4264
4375
  ] }),
4265
4376
  /* @__PURE__ */ jsxs32("span", { className: "flex flex-col", children: [
4266
- /* @__PURE__ */ jsx67("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx67(CheckboxLabel, { label }) }),
4267
- node.messages.map((message) => /* @__PURE__ */ jsx67(
4377
+ /* @__PURE__ */ jsx68("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx68(CheckboxLabel, { label }) }),
4378
+ node.messages.map((message) => /* @__PURE__ */ jsx68(
4268
4379
  "span",
4269
4380
  {
4270
4381
  className: cn(
@@ -4281,7 +4392,7 @@ var DefaultCheckbox = ({
4281
4392
  };
4282
4393
 
4283
4394
  // src/theme/default/components/form/group-container.tsx
4284
- import { useOryFlow as useOryFlow9 } from "@ory/elements-react";
4395
+ import { useOryFlow as useOryFlow8 } from "@ory/elements-react";
4285
4396
  import { FlowType as FlowType14 } from "@ory/client-fetch";
4286
4397
 
4287
4398
  // src/util/childCounter.ts
@@ -4296,14 +4407,14 @@ function countRenderableChildren(children) {
4296
4407
  }
4297
4408
 
4298
4409
  // src/theme/default/components/form/group-container.tsx
4299
- import { jsx as jsx68 } from "react/jsx-runtime";
4410
+ import { jsx as jsx69 } from "react/jsx-runtime";
4300
4411
  function DefaultGroupContainer({ children }) {
4301
- const { flowType } = useOryFlow9();
4412
+ const { flowType } = useOryFlow8();
4302
4413
  const count = countRenderableChildren(children);
4303
4414
  if (count === 0) {
4304
4415
  return null;
4305
4416
  }
4306
- return /* @__PURE__ */ jsx68(
4417
+ return /* @__PURE__ */ jsx69(
4307
4418
  "div",
4308
4419
  {
4309
4420
  className: cn(
@@ -4316,16 +4427,16 @@ function DefaultGroupContainer({ children }) {
4316
4427
  }
4317
4428
 
4318
4429
  // src/theme/default/components/form/horizontal-divider.tsx
4319
- import { jsx as jsx69 } from "react/jsx-runtime";
4430
+ import { jsx as jsx70 } from "react/jsx-runtime";
4320
4431
  function DefaultHorizontalDivider() {
4321
- return /* @__PURE__ */ jsx69("hr", { className: "border-interface-border-default-primary" });
4432
+ return /* @__PURE__ */ jsx70("hr", { className: "border-interface-border-default-primary" });
4322
4433
  }
4323
4434
 
4324
4435
  // src/theme/default/components/form/image.tsx
4325
- import { jsx as jsx70 } from "react/jsx-runtime";
4436
+ import { jsx as jsx71 } from "react/jsx-runtime";
4326
4437
  function DefaultImage({ attributes, node }) {
4327
4438
  var _a;
4328
- return /* @__PURE__ */ jsx70("figure", { children: /* @__PURE__ */ jsx70(
4439
+ return /* @__PURE__ */ jsx71("figure", { children: /* @__PURE__ */ jsx71(
4329
4440
  "img",
4330
4441
  {
4331
4442
  ...omitInputAttributes(attributes),
@@ -4338,35 +4449,35 @@ function DefaultImage({ attributes, node }) {
4338
4449
  import { FlowType as FlowType15, getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
4339
4450
  import {
4340
4451
  uiTextToFormattedMessage as uiTextToFormattedMessage6,
4341
- useOryFlow as useOryFlow10
4452
+ useOryFlow as useOryFlow9
4342
4453
  } from "@ory/elements-react";
4343
- import { useRef as useRef2, useState as useState5 } from "react";
4454
+ import { useRef as useRef3, useState as useState6 } from "react";
4344
4455
  import { useFormContext as useFormContext16 } from "react-hook-form";
4345
4456
  import { useIntl as useIntl17 } from "react-intl";
4346
4457
 
4347
4458
  // src/theme/default/assets/icons/eye-off.svg
4348
4459
  import * as React23 from "react";
4349
- import { jsx as jsx71 } from "react/jsx-runtime";
4460
+ import { jsx as jsx72 } from "react/jsx-runtime";
4350
4461
  var SvgEyeOff = (props) => {
4351
4462
  var _a, _b;
4352
- return /* @__PURE__ */ jsx71("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx71("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
4463
+ return /* @__PURE__ */ jsx72("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx72("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
4353
4464
  };
4354
4465
  var eye_off_default = SvgEyeOff;
4355
4466
 
4356
4467
  // src/theme/default/assets/icons/eye.svg
4357
4468
  import * as React24 from "react";
4358
- import { jsx as jsx72, jsxs as jsxs33 } from "react/jsx-runtime";
4469
+ import { jsx as jsx73, jsxs as jsxs33 } from "react/jsx-runtime";
4359
4470
  var SvgEye = (props) => {
4360
4471
  var _a, _b;
4361
- return /* @__PURE__ */ jsx72("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs33("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
4362
- /* @__PURE__ */ jsx72("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
4363
- /* @__PURE__ */ jsx72("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
4472
+ return /* @__PURE__ */ jsx73("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs33("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
4473
+ /* @__PURE__ */ jsx73("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
4474
+ /* @__PURE__ */ jsx73("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
4364
4475
  ] }) });
4365
4476
  };
4366
4477
  var eye_default = SvgEye;
4367
4478
 
4368
4479
  // src/theme/default/components/form/input.tsx
4369
- import { jsx as jsx73, jsxs as jsxs34 } from "react/jsx-runtime";
4480
+ import { jsx as jsx74, jsxs as jsxs34 } from "react/jsx-runtime";
4370
4481
  var defaultInputClassName = cn(
4371
4482
  "antialiased rounded-forms border leading-tight transition-colors placeholder:h-[20px] placeholder:text-input-foreground-tertiary focus-visible:outline-none focus:ring-0 w-full",
4372
4483
  "bg-input-background-default border-input-border-default text-input-foreground-primary",
@@ -4384,8 +4495,8 @@ var DefaultInput = ({
4384
4495
  const { register } = useFormContext16();
4385
4496
  const { value, autocomplete, name, maxlength, ...rest } = attributes;
4386
4497
  const intl = useIntl17();
4387
- const { flowType } = useOryFlow10();
4388
- const inputRef = useRef2(null);
4498
+ const { flowType } = useOryFlow9();
4499
+ const inputRef = useRef3(null);
4389
4500
  const formattedLabel = label ? intl.formatMessage(
4390
4501
  {
4391
4502
  id: "input.placeholder",
@@ -4396,10 +4507,10 @@ var DefaultInput = ({
4396
4507
  }
4397
4508
  ) : "";
4398
4509
  if (rest.type === "hidden") {
4399
- return /* @__PURE__ */ jsx73(
4510
+ return /* @__PURE__ */ jsx74(
4400
4511
  "input",
4401
4512
  {
4402
- ...rest,
4513
+ ...omitInputAttributes(rest),
4403
4514
  onClick,
4404
4515
  maxLength: maxlength,
4405
4516
  autoComplete: autocomplete,
@@ -4419,7 +4530,7 @@ var DefaultInput = ({
4419
4530
  flowType === FlowType15.Settings && "max-w-[488px]"
4420
4531
  ),
4421
4532
  children: [
4422
- /* @__PURE__ */ jsx73(
4533
+ /* @__PURE__ */ jsx74(
4423
4534
  "input",
4424
4535
  {
4425
4536
  ...omitInputAttributes(rest),
@@ -4436,7 +4547,7 @@ var DefaultInput = ({
4436
4547
  ...restRegister
4437
4548
  }
4438
4549
  ),
4439
- rest.type === "password" && /* @__PURE__ */ jsx73(PasswordToggle, { inputRef })
4550
+ rest.type === "password" && /* @__PURE__ */ jsx74(PasswordToggle, { inputRef })
4440
4551
  ]
4441
4552
  }
4442
4553
  );
@@ -4444,21 +4555,21 @@ var DefaultInput = ({
4444
4555
  function PasswordToggle({
4445
4556
  inputRef
4446
4557
  }) {
4447
- const [shown, setShown] = useState5(false);
4558
+ const [shown, setShown] = useState6(false);
4448
4559
  const handleClick = () => {
4449
4560
  setShown(!shown);
4450
4561
  if (inputRef.current) {
4451
4562
  inputRef.current.type = shown ? "password" : "text";
4452
4563
  }
4453
4564
  };
4454
- return /* @__PURE__ */ jsx73(
4565
+ return /* @__PURE__ */ jsx74(
4455
4566
  "button",
4456
4567
  {
4457
4568
  onClick: handleClick,
4458
4569
  className: "absolute right-0 h-full w-12 flex items-center justify-center",
4459
4570
  type: "button",
4460
4571
  "aria-label": "Toggle password visibility",
4461
- children: shown ? /* @__PURE__ */ jsx73(eye_off_default, {}) : /* @__PURE__ */ jsx73(eye_default, {})
4572
+ children: shown ? /* @__PURE__ */ jsx74(eye_off_default, {}) : /* @__PURE__ */ jsx74(eye_default, {})
4462
4573
  }
4463
4574
  );
4464
4575
  }
@@ -4473,11 +4584,12 @@ import {
4473
4584
  messageTestId as messageTestId4,
4474
4585
  uiTextToFormattedMessage as uiTextToFormattedMessage7,
4475
4586
  useComponents as useComponents5,
4476
- useOryFlow as useOryFlow11
4587
+ useOryConfiguration as useOryConfiguration5,
4588
+ useOryFlow as useOryFlow10
4477
4589
  } from "@ory/elements-react";
4478
4590
  import { useFormContext as useFormContext17 } from "react-hook-form";
4479
4591
  import { useIntl as useIntl18 } from "react-intl";
4480
- import { jsx as jsx74, jsxs as jsxs35 } from "react/jsx-runtime";
4592
+ import { jsx as jsx75, jsxs as jsxs35 } from "react/jsx-runtime";
4481
4593
  function findResendNode(nodes) {
4482
4594
  return nodes.find(
4483
4595
  (n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
@@ -4492,7 +4604,8 @@ function DefaultLabel({
4492
4604
  const intl = useIntl18();
4493
4605
  const label = getNodeLabel4(node);
4494
4606
  const { Message } = useComponents5();
4495
- const { config, flowType, flow } = useOryFlow11();
4607
+ const { flowType, flow } = useOryFlow10();
4608
+ const config = useOryConfiguration5();
4496
4609
  const { setValue, formState } = useFormContext17();
4497
4610
  const isPassword = attributes.type === "password";
4498
4611
  const resendNode = findResendNode(flow.ui.nodes);
@@ -4504,7 +4617,7 @@ function DefaultLabel({
4504
4617
  const fieldError = formState.errors[attributes.name];
4505
4618
  return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1 antialiased", children: [
4506
4619
  label && /* @__PURE__ */ jsxs35("span", { className: "inline-flex justify-between", children: [
4507
- /* @__PURE__ */ jsx74(
4620
+ /* @__PURE__ */ jsx75(
4508
4621
  "label",
4509
4622
  {
4510
4623
  ...messageTestId4(label),
@@ -4516,7 +4629,7 @@ function DefaultLabel({
4516
4629
  }
4517
4630
  ),
4518
4631
  isPassword && config.project.recovery_enabled && flowType === FlowType16.Login && // TODO: make it possible to override with a custom component
4519
- /* @__PURE__ */ jsx74(
4632
+ /* @__PURE__ */ jsx75(
4520
4633
  "a",
4521
4634
  {
4522
4635
  href: initFlowUrl(config.sdk.url, "recovery", flow),
@@ -4527,7 +4640,7 @@ function DefaultLabel({
4527
4640
  })
4528
4641
  }
4529
4642
  ),
4530
- (resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx74(
4643
+ (resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx75(
4531
4644
  "button",
4532
4645
  {
4533
4646
  type: "submit",
@@ -4540,8 +4653,8 @@ function DefaultLabel({
4540
4653
  )
4541
4654
  ] }),
4542
4655
  children,
4543
- node.messages.map((message) => /* @__PURE__ */ jsx74(Message.Content, { message }, message.id)),
4544
- fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx74(Message.Content, { message: fieldError })
4656
+ node.messages.map((message) => /* @__PURE__ */ jsx75(Message.Content, { message }, message.id)),
4657
+ fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx75(Message.Content, { message: fieldError })
4545
4658
  ] });
4546
4659
  }
4547
4660
 
@@ -4552,11 +4665,11 @@ import {
4552
4665
  } from "@ory/elements-react";
4553
4666
  import { forwardRef } from "react";
4554
4667
  import { useIntl as useIntl19 } from "react-intl";
4555
- import { jsx as jsx75 } from "react/jsx-runtime";
4668
+ import { jsx as jsx76 } from "react/jsx-runtime";
4556
4669
  var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
4557
4670
  const intl = useIntl19();
4558
4671
  const label = getNodeLabel5(node);
4559
- return /* @__PURE__ */ jsx75(
4672
+ return /* @__PURE__ */ jsx76(
4560
4673
  "a",
4561
4674
  {
4562
4675
  ...omitInputAttributes(attributes),
@@ -4578,8 +4691,8 @@ import { useFormContext as useFormContext18 } from "react-hook-form";
4578
4691
  // src/theme/default/components/form/shadcn/otp-input.tsx
4579
4692
  import { OTPInput, OTPInputContext } from "input-otp";
4580
4693
  import * as React25 from "react";
4581
- import { jsx as jsx76, jsxs as jsxs36 } from "react/jsx-runtime";
4582
- var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx76(
4694
+ import { jsx as jsx77, jsxs as jsxs36 } from "react/jsx-runtime";
4695
+ var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx77(
4583
4696
  OTPInput,
4584
4697
  {
4585
4698
  ref,
@@ -4592,7 +4705,7 @@ var InputOTP = React25.forwardRef(({ className, containerClassName, ...props },
4592
4705
  }
4593
4706
  ));
4594
4707
  InputOTP.displayName = "InputOTP";
4595
- var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx76("div", { ref, className: cn("flex items-center", className), ...props }));
4708
+ var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx77("div", { ref, className: cn("flex items-center", className), ...props }));
4596
4709
  InputOTPGroup.displayName = "InputOTPGroup";
4597
4710
  var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
4598
4711
  const inputOTPContext = React25.useContext(OTPInputContext);
@@ -4609,8 +4722,8 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
4609
4722
  ),
4610
4723
  ...props,
4611
4724
  children: [
4612
- /* @__PURE__ */ jsx76("span", { className: "inline-block size-4", children: char }),
4613
- hasFakeCaret && /* @__PURE__ */ jsx76("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx76("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
4725
+ /* @__PURE__ */ jsx77("span", { className: "inline-block size-4", children: char }),
4726
+ hasFakeCaret && /* @__PURE__ */ jsx77("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx77("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
4614
4727
  ]
4615
4728
  }
4616
4729
  );
@@ -4618,26 +4731,26 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
4618
4731
  InputOTPSlot.displayName = "InputOTPSlot";
4619
4732
 
4620
4733
  // src/theme/default/components/form/pin-code-input.tsx
4621
- import { useOryFlow as useOryFlow12 } from "@ory/elements-react";
4734
+ import { useOryFlow as useOryFlow11 } from "@ory/elements-react";
4622
4735
  import { FlowType as FlowType17 } from "@ory/client-fetch";
4623
- import { jsx as jsx77 } from "react/jsx-runtime";
4736
+ import { jsx as jsx78 } from "react/jsx-runtime";
4624
4737
  var DefaultPinCodeInput = ({ attributes }) => {
4625
4738
  const { setValue, watch } = useFormContext18();
4626
4739
  const { maxlength, name } = attributes;
4627
4740
  const elements = maxlength != null ? maxlength : 6;
4628
- const { flowType } = useOryFlow12();
4741
+ const { flowType } = useOryFlow11();
4629
4742
  const handleInputChange = (v) => {
4630
4743
  setValue(name, v);
4631
4744
  };
4632
4745
  const value = watch(name);
4633
- return /* @__PURE__ */ jsx77(
4746
+ return /* @__PURE__ */ jsx78(
4634
4747
  InputOTP,
4635
4748
  {
4636
4749
  maxLength: maxlength != null ? maxlength : 6,
4637
4750
  onChange: handleInputChange,
4638
4751
  name,
4639
4752
  value,
4640
- children: /* @__PURE__ */ jsx77(
4753
+ children: /* @__PURE__ */ jsx78(
4641
4754
  InputOTPGroup,
4642
4755
  {
4643
4756
  className: cn(
@@ -4645,7 +4758,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
4645
4758
  // The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
4646
4759
  flowType === FlowType17.Settings && "max-w-[488px]"
4647
4760
  ),
4648
- children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx77(InputOTPSlot, { index }, index))
4761
+ children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx78(InputOTPSlot, { index }, index))
4649
4762
  }
4650
4763
  )
4651
4764
  }
@@ -4653,13 +4766,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
4653
4766
  };
4654
4767
 
4655
4768
  // src/theme/default/components/form/section.tsx
4656
- import { jsx as jsx78, jsxs as jsxs37 } from "react/jsx-runtime";
4769
+ import { jsx as jsx79, jsxs as jsxs37 } from "react/jsx-runtime";
4657
4770
  var DefaultFormSection = ({
4658
4771
  children,
4659
4772
  nodes: _nodes,
4660
4773
  ...rest
4661
4774
  }) => {
4662
- return /* @__PURE__ */ jsx78(
4775
+ return /* @__PURE__ */ jsx79(
4663
4776
  "form",
4664
4777
  {
4665
4778
  className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
@@ -4675,8 +4788,8 @@ var DefaultFormSectionContent = ({
4675
4788
  }) => {
4676
4789
  return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-8 rounded-t-cards border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
4677
4790
  /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-2", children: [
4678
- /* @__PURE__ */ jsx78("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
4679
- /* @__PURE__ */ jsx78("span", { className: "text-interface-foreground-default-secondary", children: description })
4791
+ /* @__PURE__ */ jsx79("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
4792
+ /* @__PURE__ */ jsx79("span", { className: "text-interface-foreground-default-secondary", children: description })
4680
4793
  ] }),
4681
4794
  children
4682
4795
  ] });
@@ -4692,7 +4805,7 @@ var DefaultFormSectionFooter = ({
4692
4805
  "flex min-h-[72px] items-center justify-between gap-2 rounded-b-cards border border-interface-border-default-primary bg-interface-background-default-secondary px-6 py-4 text-interface-foreground-default-tertiary"
4693
4806
  ),
4694
4807
  children: [
4695
- /* @__PURE__ */ jsx78("span", { children: text }),
4808
+ /* @__PURE__ */ jsx79("span", { children: text }),
4696
4809
  children
4697
4810
  ]
4698
4811
  }
@@ -4702,31 +4815,31 @@ var DefaultFormSectionFooter = ({
4702
4815
  // src/theme/default/components/form/text.tsx
4703
4816
  import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
4704
4817
  import { useIntl as useIntl20 } from "react-intl";
4705
- import { Fragment as Fragment11, jsx as jsx79, jsxs as jsxs38 } from "react/jsx-runtime";
4818
+ import { Fragment as Fragment11, jsx as jsx80, jsxs as jsxs38 } from "react/jsx-runtime";
4706
4819
  function DefaultText({ node, attributes }) {
4707
4820
  var _a;
4708
4821
  const intl = useIntl20();
4709
4822
  const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
4710
4823
  if (lookup) {
4711
4824
  return /* @__PURE__ */ jsxs38(Fragment11, { children: [
4712
- /* @__PURE__ */ jsx79("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
4713
- lookup.map((text, index) => /* @__PURE__ */ jsx79(
4825
+ /* @__PURE__ */ jsx80("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
4826
+ lookup.map((text, index) => /* @__PURE__ */ jsx80(
4714
4827
  "pre",
4715
4828
  {
4716
4829
  "data-testid": `ory/form/node/text/lookup_secret_codes/text`,
4717
- children: /* @__PURE__ */ jsx79("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
4830
+ children: /* @__PURE__ */ jsx80("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
4718
4831
  },
4719
4832
  index
4720
4833
  ))
4721
4834
  ] });
4722
4835
  }
4723
- return /* @__PURE__ */ jsx79(Fragment11, { children: /* @__PURE__ */ jsxs38(
4836
+ return /* @__PURE__ */ jsx80(Fragment11, { children: /* @__PURE__ */ jsxs38(
4724
4837
  "p",
4725
4838
  {
4726
4839
  "data-testid": `ory/form/node/text/${attributes.id}/label`,
4727
4840
  id: attributes.id,
4728
4841
  children: [
4729
- node.meta.label ? /* @__PURE__ */ jsx79("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
4842
+ node.meta.label ? /* @__PURE__ */ jsx80("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
4730
4843
  attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
4731
4844
  ]
4732
4845
  }
@@ -4736,30 +4849,31 @@ function DefaultText({ node, attributes }) {
4736
4849
  // src/theme/default/components/generic/page-header.tsx
4737
4850
  import {
4738
4851
  useComponents as useComponents6,
4739
- useOryFlow as useOryFlow14
4852
+ useOryConfiguration as useOryConfiguration7,
4853
+ useOryFlow as useOryFlow12
4740
4854
  } from "@ory/elements-react";
4741
4855
 
4742
4856
  // src/theme/default/components/ui/user-menu.tsx
4743
- import { useOryFlow as useOryFlow13 } from "@ory/elements-react";
4857
+ import { useOryConfiguration as useOryConfiguration6 } from "@ory/elements-react";
4744
4858
  import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
4745
4859
 
4746
4860
  // src/theme/default/assets/icons/logout.svg
4747
4861
  import * as React26 from "react";
4748
- import { jsx as jsx80 } from "react/jsx-runtime";
4862
+ import { jsx as jsx81 } from "react/jsx-runtime";
4749
4863
  var SvgLogout = (props) => {
4750
4864
  var _a, _b;
4751
- return /* @__PURE__ */ jsx80("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx80("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
4865
+ return /* @__PURE__ */ jsx81("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx81("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
4752
4866
  };
4753
4867
  var logout_default = SvgLogout;
4754
4868
 
4755
4869
  // src/theme/default/assets/icons/settings.svg
4756
4870
  import * as React27 from "react";
4757
- import { jsx as jsx81, jsxs as jsxs39 } from "react/jsx-runtime";
4871
+ import { jsx as jsx82, jsxs as jsxs39 } from "react/jsx-runtime";
4758
4872
  var SvgSettings = (props) => {
4759
4873
  var _a, _b;
4760
- return /* @__PURE__ */ jsx81("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs39("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
4761
- /* @__PURE__ */ jsx81("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
4762
- /* @__PURE__ */ jsx81("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
4874
+ return /* @__PURE__ */ jsx82("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs39("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
4875
+ /* @__PURE__ */ jsx82("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
4876
+ /* @__PURE__ */ jsx82("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
4763
4877
  ] }) });
4764
4878
  };
4765
4879
  var settings_default = SvgSettings;
@@ -4806,10 +4920,10 @@ var getUserInitials = (session) => {
4806
4920
  // src/theme/default/components/ui/dropdown-menu.tsx
4807
4921
  import { forwardRef as forwardRef3 } from "react";
4808
4922
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
4809
- import { jsx as jsx82 } from "react/jsx-runtime";
4923
+ import { jsx as jsx83 } from "react/jsx-runtime";
4810
4924
  var DropdownMenu = DropdownMenuPrimitive.Root;
4811
4925
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
4812
- var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx82(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx82(
4926
+ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx83(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx83(
4813
4927
  DropdownMenuPrimitive.Content,
4814
4928
  {
4815
4929
  ref,
@@ -4824,7 +4938,7 @@ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props },
4824
4938
  }
4825
4939
  ) }));
4826
4940
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
4827
- var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx82(
4941
+ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx83(
4828
4942
  DropdownMenuPrimitive.Item,
4829
4943
  {
4830
4944
  ref,
@@ -4842,7 +4956,7 @@ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @
4842
4956
  }
4843
4957
  ));
4844
4958
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
4845
- var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx82(
4959
+ var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx83(
4846
4960
  DropdownMenuPrimitive.Label,
4847
4961
  {
4848
4962
  ref,
@@ -4861,31 +4975,31 @@ import { forwardRef as forwardRef4 } from "react";
4861
4975
 
4862
4976
  // src/theme/default/assets/icons/user.svg
4863
4977
  import * as React28 from "react";
4864
- import { jsx as jsx83 } from "react/jsx-runtime";
4978
+ import { jsx as jsx84 } from "react/jsx-runtime";
4865
4979
  var SvgUser = (props) => {
4866
4980
  var _a, _b;
4867
- return /* @__PURE__ */ jsx83("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx83("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
4981
+ return /* @__PURE__ */ jsx84("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx84("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
4868
4982
  };
4869
4983
  var user_default = SvgUser;
4870
4984
 
4871
4985
  // src/theme/default/components/ui/user-avater.tsx
4872
- import { jsx as jsx84 } from "react/jsx-runtime";
4986
+ import { jsx as jsx85 } from "react/jsx-runtime";
4873
4987
  var UserAvatar = forwardRef4(
4874
4988
  ({ initials, ...rest }, ref) => {
4875
- return /* @__PURE__ */ jsx84(
4989
+ return /* @__PURE__ */ jsx85(
4876
4990
  "button",
4877
4991
  {
4878
4992
  ref,
4879
4993
  className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
4880
4994
  ...rest,
4881
- children: /* @__PURE__ */ jsx84("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx84(
4995
+ children: /* @__PURE__ */ jsx85("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx85(
4882
4996
  "img",
4883
4997
  {
4884
4998
  src: initials.avatar,
4885
4999
  alt: initials.primary,
4886
5000
  className: "w-full object-contain"
4887
5001
  }
4888
- ) : /* @__PURE__ */ jsx84(
5002
+ ) : /* @__PURE__ */ jsx85(
4889
5003
  user_default,
4890
5004
  {
4891
5005
  size: 24,
@@ -4899,27 +5013,27 @@ var UserAvatar = forwardRef4(
4899
5013
  UserAvatar.displayName = "UserAvatar";
4900
5014
 
4901
5015
  // src/theme/default/components/ui/user-menu.tsx
4902
- import { jsx as jsx85, jsxs as jsxs40 } from "react/jsx-runtime";
5016
+ import { jsx as jsx86, jsxs as jsxs40 } from "react/jsx-runtime";
4903
5017
  var UserMenu = ({ session }) => {
4904
- const { config } = useOryFlow13();
5018
+ const config = useOryConfiguration6();
4905
5019
  const initials = getUserInitials(session);
4906
5020
  const { logoutFlow } = useClientLogout(config);
4907
5021
  return /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
4908
- /* @__PURE__ */ jsx85(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx85(UserAvatar, { initials, title: "User Menu" }) }),
5022
+ /* @__PURE__ */ jsx86(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx86(UserAvatar, { initials, title: "User Menu" }) }),
4909
5023
  /* @__PURE__ */ jsxs40(DropdownMenuContent, { children: [
4910
5024
  /* @__PURE__ */ jsxs40(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
4911
- /* @__PURE__ */ jsx85(UserAvatar, { disabled: true, initials }),
5025
+ /* @__PURE__ */ jsx86(UserAvatar, { disabled: true, initials }),
4912
5026
  /* @__PURE__ */ jsxs40("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
4913
- /* @__PURE__ */ jsx85("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
4914
- initials.secondary && /* @__PURE__ */ jsx85("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
5027
+ /* @__PURE__ */ jsx86("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
5028
+ initials.secondary && /* @__PURE__ */ jsx86("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
4915
5029
  ] })
4916
5030
  ] }),
4917
- /* @__PURE__ */ jsx85(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs40("a", { href: "/settings", children: [
4918
- /* @__PURE__ */ jsx85(settings_default, { size: 16 }),
5031
+ /* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs40("a", { href: "/settings", children: [
5032
+ /* @__PURE__ */ jsx86(settings_default, { size: 16 }),
4919
5033
  " User settings"
4920
5034
  ] }) }),
4921
- /* @__PURE__ */ jsx85(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs40("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
4922
- /* @__PURE__ */ jsx85(logout_default, { size: 16 }),
5035
+ /* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs40("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
5036
+ /* @__PURE__ */ jsx86(logout_default, { size: 16 }),
4923
5037
  " Logout"
4924
5038
  ] }) })
4925
5039
  ] })
@@ -4929,27 +5043,28 @@ var UserMenu = ({ session }) => {
4929
5043
  // src/theme/default/components/generic/page-header.tsx
4930
5044
  import { useSession } from "@ory/elements-react/client";
4931
5045
  import { useIntl as useIntl21 } from "react-intl";
4932
- import { jsx as jsx86, jsxs as jsxs41 } from "react/jsx-runtime";
5046
+ import { jsx as jsx87, jsxs as jsxs41 } from "react/jsx-runtime";
4933
5047
  var DefaultPageHeader = (_props) => {
4934
5048
  var _a;
4935
5049
  const { Card } = useComponents6();
4936
5050
  const { session } = useSession();
4937
5051
  const intl = useIntl21();
4938
- const { config, flow } = useOryFlow14();
5052
+ const { flow } = useOryFlow12();
5053
+ const config = useOryConfiguration7();
4939
5054
  const returnUrl = (_a = flow.return_to) != null ? _a : config.project.default_redirect_url;
4940
- return /* @__PURE__ */ jsx86("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-12", children: [
5055
+ return /* @__PURE__ */ jsx87("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-12", children: [
4941
5056
  /* @__PURE__ */ jsxs41("div", { className: "flex max-h-10 flex-1 justify-between gap-2 items-center", children: [
4942
- /* @__PURE__ */ jsx86(Card.Logo, {}),
4943
- /* @__PURE__ */ jsx86(UserMenu, { session })
5057
+ /* @__PURE__ */ jsx87(Card.Logo, {}),
5058
+ /* @__PURE__ */ jsx87(UserMenu, { session })
4944
5059
  ] }),
4945
- returnUrl && /* @__PURE__ */ jsx86("div", { children: /* @__PURE__ */ jsxs41(
5060
+ returnUrl && /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsxs41(
4946
5061
  "a",
4947
5062
  {
4948
5063
  "data-testid": "ory/screen/settings/back-button",
4949
5064
  href: returnUrl,
4950
5065
  className: "inline-flex gap-2 items-center",
4951
5066
  children: [
4952
- /* @__PURE__ */ jsx86(arrow_left_default, {}),
5067
+ /* @__PURE__ */ jsx87(arrow_left_default, {}),
4953
5068
  " ",
4954
5069
  intl.formatMessage({
4955
5070
  id: "settings.navigation-back-button",
@@ -4962,21 +5077,21 @@ var DefaultPageHeader = (_props) => {
4962
5077
  };
4963
5078
 
4964
5079
  // src/theme/default/components/settings/settings-oidc.tsx
4965
- import { useEffect as useEffect5 } from "react";
5080
+ import { useEffect as useEffect6 } from "react";
4966
5081
  import { useFormContext as useFormContext19 } from "react-hook-form";
4967
5082
  import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
4968
5083
 
4969
5084
  // src/theme/default/assets/icons/trash.svg
4970
5085
  import * as React29 from "react";
4971
- import { jsx as jsx87 } from "react/jsx-runtime";
5086
+ import { jsx as jsx88 } from "react/jsx-runtime";
4972
5087
  var SvgTrash = (props) => {
4973
5088
  var _a, _b;
4974
- return /* @__PURE__ */ jsx87("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx87("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
5089
+ return /* @__PURE__ */ jsx88("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx88("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
4975
5090
  };
4976
5091
  var trash_default = SvgTrash;
4977
5092
 
4978
5093
  // src/theme/default/components/settings/settings-oidc.tsx
4979
- import { jsx as jsx88, jsxs as jsxs42 } from "react/jsx-runtime";
5094
+ import { jsx as jsx89, jsxs as jsxs42 } from "react/jsx-runtime";
4980
5095
  function DefaultSettingsOidc({
4981
5096
  linkButtons,
4982
5097
  unlinkButtons
@@ -4984,9 +5099,9 @@ function DefaultSettingsOidc({
4984
5099
  const hasLinkButtons = linkButtons.length > 0;
4985
5100
  const hasUnlinkButtons = unlinkButtons.length > 0;
4986
5101
  return /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-8", children: [
4987
- hasLinkButtons && /* @__PURE__ */ jsx88("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
5102
+ hasLinkButtons && /* @__PURE__ */ jsx89("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
4988
5103
  const attrs = button.attributes;
4989
- return /* @__PURE__ */ jsx88(
5104
+ return /* @__PURE__ */ jsx89(
4990
5105
  DefaultButtonSocial,
4991
5106
  {
4992
5107
  showLabel: true,
@@ -4997,12 +5112,12 @@ function DefaultSettingsOidc({
4997
5112
  attrs.value
4998
5113
  );
4999
5114
  }) }),
5000
- hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx88(DefaultHorizontalDivider, {}) : null,
5115
+ hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx89(DefaultHorizontalDivider, {}) : null,
5001
5116
  unlinkButtons.map((button) => {
5002
5117
  if (button.attributes.node_type !== "input") {
5003
5118
  return null;
5004
5119
  }
5005
- return /* @__PURE__ */ jsx88(UnlinkRow, { button }, button.attributes.value);
5120
+ return /* @__PURE__ */ jsx89(UnlinkRow, { button }, button.attributes.value);
5006
5121
  })
5007
5122
  ] });
5008
5123
  }
@@ -5019,7 +5134,7 @@ function UnlinkRow({ button }) {
5019
5134
  button.onClick();
5020
5135
  setClicked(true);
5021
5136
  };
5022
- useEffect5(() => {
5137
+ useEffect6(() => {
5023
5138
  if (!isSubmitting) {
5024
5139
  setClicked(false);
5025
5140
  }
@@ -5027,10 +5142,10 @@ function UnlinkRow({ button }) {
5027
5142
  console.log((_c = button.meta.label) == null ? void 0 : _c.context);
5028
5143
  return /* @__PURE__ */ jsxs42("div", { className: "flex justify-between", children: [
5029
5144
  /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-6", children: [
5030
- Logo ? /* @__PURE__ */ jsx88(Logo, { size: 32 }) : /* @__PURE__ */ jsx88(GenericLogo, { label: provider.slice(0, 1) }),
5031
- /* @__PURE__ */ jsx88("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
5145
+ Logo ? /* @__PURE__ */ jsx89(Logo, { size: 32 }) : /* @__PURE__ */ jsx89(GenericLogo, { label: provider.slice(0, 1) }),
5146
+ /* @__PURE__ */ jsx89("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
5032
5147
  ] }),
5033
- /* @__PURE__ */ jsx88(
5148
+ /* @__PURE__ */ jsx89(
5034
5149
  "button",
5035
5150
  {
5036
5151
  ...omitInputAttributes(attrs),
@@ -5039,7 +5154,7 @@ function UnlinkRow({ button }) {
5039
5154
  disabled: isSubmitting,
5040
5155
  className: "relative",
5041
5156
  title: `Unlink ${provider}`,
5042
- children: clicked ? /* @__PURE__ */ jsx88(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx88(
5157
+ children: clicked ? /* @__PURE__ */ jsx89(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx89(
5043
5158
  trash_default,
5044
5159
  {
5045
5160
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -5054,7 +5169,7 @@ function UnlinkRow({ button }) {
5054
5169
  // src/theme/default/components/settings/settings-passkey.tsx
5055
5170
  import { useComponents as useComponents7 } from "@ory/elements-react";
5056
5171
  import { useFormContext as useFormContext20 } from "react-hook-form";
5057
- import { jsx as jsx89, jsxs as jsxs43 } from "react/jsx-runtime";
5172
+ import { jsx as jsx90, jsxs as jsxs43 } from "react/jsx-runtime";
5058
5173
  function DefaultSettingsPasskey({
5059
5174
  triggerButton,
5060
5175
  removeButtons
@@ -5065,7 +5180,7 @@ function DefaultSettingsPasskey({
5065
5180
  const { Node: Node2 } = useComponents7();
5066
5181
  const hasRemoveButtons = removeButtons.length > 0;
5067
5182
  return /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
5068
- /* @__PURE__ */ jsx89("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx89(
5183
+ /* @__PURE__ */ jsx90("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx90(
5069
5184
  Node2.Button,
5070
5185
  {
5071
5186
  node: triggerButton,
@@ -5074,8 +5189,8 @@ function DefaultSettingsPasskey({
5074
5189
  }
5075
5190
  ) }),
5076
5191
  hasRemoveButtons ? /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
5077
- /* @__PURE__ */ jsx89(DefaultHorizontalDivider, {}),
5078
- /* @__PURE__ */ jsx89("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
5192
+ /* @__PURE__ */ jsx90(DefaultHorizontalDivider, {}),
5193
+ /* @__PURE__ */ jsx90("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
5079
5194
  var _a, _b;
5080
5195
  const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
5081
5196
  const addedAt = "added_at" in context ? context.added_at : null;
@@ -5087,7 +5202,7 @@ function DefaultSettingsPasskey({
5087
5202
  className: "flex justify-between gap-6 md:items-center",
5088
5203
  children: [
5089
5204
  /* @__PURE__ */ jsxs43("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
5090
- /* @__PURE__ */ jsx89(
5205
+ /* @__PURE__ */ jsx90(
5091
5206
  passkey_default,
5092
5207
  {
5093
5208
  size: 32,
@@ -5096,15 +5211,15 @@ function DefaultSettingsPasskey({
5096
5211
  ),
5097
5212
  /* @__PURE__ */ jsxs43("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
5098
5213
  /* @__PURE__ */ jsxs43("div", { className: "flex-1 flex-col truncate", children: [
5099
- /* @__PURE__ */ jsx89("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
5100
- /* @__PURE__ */ jsx89("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
5214
+ /* @__PURE__ */ jsx90("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
5215
+ /* @__PURE__ */ jsx90("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
5101
5216
  ] }),
5102
- addedAt && /* @__PURE__ */ jsx89("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
5217
+ addedAt && /* @__PURE__ */ jsx90("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
5103
5218
  dateStyle: "long"
5104
5219
  }).format(new Date(addedAt)) })
5105
5220
  ] })
5106
5221
  ] }),
5107
- /* @__PURE__ */ jsx89(
5222
+ /* @__PURE__ */ jsx90(
5108
5223
  "button",
5109
5224
  {
5110
5225
  ...node.attributes,
@@ -5112,7 +5227,7 @@ function DefaultSettingsPasskey({
5112
5227
  onClick: node.onClick,
5113
5228
  disabled: isSubmitting,
5114
5229
  className: "relative",
5115
- children: isSubmitting ? /* @__PURE__ */ jsx89(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx89(
5230
+ children: isSubmitting ? /* @__PURE__ */ jsx90(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx90(
5116
5231
  trash_default,
5117
5232
  {
5118
5233
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -5132,25 +5247,25 @@ function DefaultSettingsPasskey({
5132
5247
 
5133
5248
  // src/theme/default/assets/icons/download.svg
5134
5249
  import * as React30 from "react";
5135
- import { jsx as jsx90 } from "react/jsx-runtime";
5250
+ import { jsx as jsx91 } from "react/jsx-runtime";
5136
5251
  var SvgDownload = (props) => {
5137
5252
  var _a, _b;
5138
- return /* @__PURE__ */ jsx90("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx90("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
5253
+ return /* @__PURE__ */ jsx91("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx91("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
5139
5254
  };
5140
5255
  var download_default = SvgDownload;
5141
5256
 
5142
5257
  // src/theme/default/assets/icons/refresh.svg
5143
5258
  import * as React31 from "react";
5144
- import { jsx as jsx91 } from "react/jsx-runtime";
5259
+ import { jsx as jsx92 } from "react/jsx-runtime";
5145
5260
  var SvgRefresh = (props) => {
5146
5261
  var _a, _b;
5147
- return /* @__PURE__ */ jsx91("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx91("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
5262
+ return /* @__PURE__ */ jsx92("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx92("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
5148
5263
  };
5149
5264
  var refresh_default = SvgRefresh;
5150
5265
 
5151
5266
  // src/theme/default/components/settings/settings-recovery-codes.tsx
5152
5267
  import { useFormContext as useFormContext21 } from "react-hook-form";
5153
- import { Fragment as Fragment12, jsx as jsx92, jsxs as jsxs44 } from "react/jsx-runtime";
5268
+ import { Fragment as Fragment12, jsx as jsx93, jsxs as jsxs44 } from "react/jsx-runtime";
5154
5269
  function DefaultSettingsRecoveryCodes({
5155
5270
  codes,
5156
5271
  regnerateButton,
@@ -5173,11 +5288,11 @@ function DefaultSettingsRecoveryCodes({
5173
5288
  };
5174
5289
  const hasCodes = codes.length >= 1;
5175
5290
  return /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-8", children: [
5176
- codes.length > 0 && /* @__PURE__ */ jsx92(DefaultHorizontalDivider, {}),
5291
+ codes.length > 0 && /* @__PURE__ */ jsx93(DefaultHorizontalDivider, {}),
5177
5292
  /* @__PURE__ */ jsxs44("div", { className: "flex gap-4 justify-between", children: [
5178
- /* @__PURE__ */ jsx92("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
5293
+ /* @__PURE__ */ jsx93("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
5179
5294
  /* @__PURE__ */ jsxs44("div", { className: "flex gap-2", children: [
5180
- regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx92(
5295
+ regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx93(
5181
5296
  "button",
5182
5297
  {
5183
5298
  ...regnerateButton.attributes,
@@ -5186,7 +5301,7 @@ function DefaultSettingsRecoveryCodes({
5186
5301
  onClick: onRegenerate,
5187
5302
  disabled: isSubmitting,
5188
5303
  "data-loading": isSubmitting,
5189
- children: /* @__PURE__ */ jsx92(
5304
+ children: /* @__PURE__ */ jsx93(
5190
5305
  refresh_default,
5191
5306
  {
5192
5307
  size: 24,
@@ -5195,7 +5310,7 @@ function DefaultSettingsRecoveryCodes({
5195
5310
  )
5196
5311
  }
5197
5312
  ),
5198
- revealButton && /* @__PURE__ */ jsx92(Fragment12, { children: /* @__PURE__ */ jsx92(
5313
+ revealButton && /* @__PURE__ */ jsx93(Fragment12, { children: /* @__PURE__ */ jsx93(
5199
5314
  "button",
5200
5315
  {
5201
5316
  ...revealButton.attributes,
@@ -5203,7 +5318,7 @@ function DefaultSettingsRecoveryCodes({
5203
5318
  className: "ml-auto",
5204
5319
  onClick: onReveal,
5205
5320
  title: "Reveal recovery codes",
5206
- children: /* @__PURE__ */ jsx92(
5321
+ children: /* @__PURE__ */ jsx93(
5207
5322
  eye_default,
5208
5323
  {
5209
5324
  size: 24,
@@ -5212,7 +5327,7 @@ function DefaultSettingsRecoveryCodes({
5212
5327
  )
5213
5328
  }
5214
5329
  ) }),
5215
- hasCodes && /* @__PURE__ */ jsx92(
5330
+ hasCodes && /* @__PURE__ */ jsx93(
5216
5331
  "button",
5217
5332
  {
5218
5333
  onClick: onDownload,
@@ -5220,7 +5335,7 @@ function DefaultSettingsRecoveryCodes({
5220
5335
  className: "ml-auto",
5221
5336
  "data-testid": "ory/screen/settings/group/recovery_code/download",
5222
5337
  title: "Download recovery codes",
5223
- children: /* @__PURE__ */ jsx92(
5338
+ children: /* @__PURE__ */ jsx93(
5224
5339
  download_default,
5225
5340
  {
5226
5341
  size: 24,
@@ -5231,12 +5346,12 @@ function DefaultSettingsRecoveryCodes({
5231
5346
  )
5232
5347
  ] })
5233
5348
  ] }),
5234
- hasCodes ? /* @__PURE__ */ jsx92("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx92(
5349
+ hasCodes ? /* @__PURE__ */ jsx93("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx93(
5235
5350
  "div",
5236
5351
  {
5237
5352
  className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
5238
5353
  "data-testid": "ory/screen/settings/group/recovery_code/codes",
5239
- children: codes.map((code) => /* @__PURE__ */ jsx92("p", { children: code }, code))
5354
+ children: codes.map((code) => /* @__PURE__ */ jsx93("p", { children: code }, code))
5240
5355
  }
5241
5356
  ) }) : null
5242
5357
  ] });
@@ -5247,16 +5362,16 @@ import { useComponents as useComponents8 } from "@ory/elements-react";
5247
5362
 
5248
5363
  // src/theme/default/assets/icons/qrcode.svg
5249
5364
  import * as React32 from "react";
5250
- import { jsx as jsx93 } from "react/jsx-runtime";
5365
+ import { jsx as jsx94 } from "react/jsx-runtime";
5251
5366
  var SvgQrcode = (props) => {
5252
5367
  var _a, _b;
5253
- return /* @__PURE__ */ jsx93("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx93("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
5368
+ return /* @__PURE__ */ jsx94("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx94("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
5254
5369
  };
5255
5370
  var qrcode_default = SvgQrcode;
5256
5371
 
5257
5372
  // src/theme/default/components/settings/settings-totp.tsx
5258
5373
  import { useFormContext as useFormContext22 } from "react-hook-form";
5259
- import { jsx as jsx94, jsxs as jsxs45 } from "react/jsx-runtime";
5374
+ import { jsx as jsx95, jsxs as jsxs45 } from "react/jsx-runtime";
5260
5375
  function DefaultSettingsTotp({
5261
5376
  totpImage,
5262
5377
  totpInput,
@@ -5277,18 +5392,18 @@ function DefaultSettingsTotp({
5277
5392
  ...buttonAttrs
5278
5393
  } = totpUnlink.attributes;
5279
5394
  return /* @__PURE__ */ jsxs45("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
5280
- /* @__PURE__ */ jsx94("div", { className: "col-span-full", children: /* @__PURE__ */ jsx94(Card.Divider, {}) }),
5395
+ /* @__PURE__ */ jsx95("div", { className: "col-span-full", children: /* @__PURE__ */ jsx95(Card.Divider, {}) }),
5281
5396
  /* @__PURE__ */ jsxs45("div", { className: "col-span-full flex items-center gap-6", children: [
5282
- /* @__PURE__ */ jsx94("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx94(qrcode_default, { size: 32 }) }),
5283
- /* @__PURE__ */ jsx94("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ jsx94("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
5284
- /* @__PURE__ */ jsx94(
5397
+ /* @__PURE__ */ jsx95("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx95(qrcode_default, { size: 32 }) }),
5398
+ /* @__PURE__ */ jsx95("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ jsx95("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
5399
+ /* @__PURE__ */ jsx95(
5285
5400
  "button",
5286
5401
  {
5287
5402
  type: type === "button" ? "button" : "submit",
5288
5403
  ...buttonAttrs,
5289
5404
  onClick: onUnlink,
5290
5405
  disabled: isSubmitting,
5291
- children: isSubmitting ? /* @__PURE__ */ jsx94(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx94(
5406
+ children: isSubmitting ? /* @__PURE__ */ jsx95(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx95(
5292
5407
  trash_default,
5293
5408
  {
5294
5409
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -5302,8 +5417,8 @@ function DefaultSettingsTotp({
5302
5417
  }
5303
5418
  if (totpImage && totpSecret && totpInput) {
5304
5419
  return /* @__PURE__ */ jsxs45("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
5305
- /* @__PURE__ */ jsx94("div", { className: "col-span-full", children: /* @__PURE__ */ jsx94(DefaultHorizontalDivider, {}) }),
5306
- /* @__PURE__ */ jsx94("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx94("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx94("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx94(
5420
+ /* @__PURE__ */ jsx95("div", { className: "col-span-full", children: /* @__PURE__ */ jsx95(DefaultHorizontalDivider, {}) }),
5421
+ /* @__PURE__ */ jsx95("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx95("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx95("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx95(
5307
5422
  Node2.Image,
5308
5423
  {
5309
5424
  node: totpImage,
@@ -5313,12 +5428,12 @@ function DefaultSettingsTotp({
5313
5428
  }
5314
5429
  ) }) }) }),
5315
5430
  /* @__PURE__ */ jsxs45("div", { className: "flex flex-col gap-6", children: [
5316
- /* @__PURE__ */ jsx94(
5431
+ /* @__PURE__ */ jsx95(
5317
5432
  Node2.Label,
5318
5433
  {
5319
5434
  node: totpSecret,
5320
5435
  attributes: totpSecret.attributes,
5321
- children: /* @__PURE__ */ jsx94("div", { className: "relative flex justify-stretch max-w-[488px]", children: /* @__PURE__ */ jsx94(
5436
+ children: /* @__PURE__ */ jsx95("div", { className: "relative flex justify-stretch max-w-[488px]", children: /* @__PURE__ */ jsx95(
5322
5437
  "input",
5323
5438
  {
5324
5439
  disabled: true,
@@ -5331,12 +5446,12 @@ function DefaultSettingsTotp({
5331
5446
  ) })
5332
5447
  }
5333
5448
  ),
5334
- /* @__PURE__ */ jsx94(
5449
+ /* @__PURE__ */ jsx95(
5335
5450
  Node2.Label,
5336
5451
  {
5337
5452
  attributes: totpInput.attributes,
5338
5453
  node: totpInput,
5339
- children: /* @__PURE__ */ jsx94(
5454
+ children: /* @__PURE__ */ jsx95(
5340
5455
  Node2.CodeInput,
5341
5456
  {
5342
5457
  node: totpInput,
@@ -5355,16 +5470,16 @@ import { useComponents as useComponents9 } from "@ory/elements-react";
5355
5470
 
5356
5471
  // src/theme/default/assets/icons/key.svg
5357
5472
  import * as React33 from "react";
5358
- import { jsx as jsx95 } from "react/jsx-runtime";
5473
+ import { jsx as jsx96 } from "react/jsx-runtime";
5359
5474
  var SvgKey = (props) => {
5360
5475
  var _a, _b;
5361
- return /* @__PURE__ */ jsx95("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx95("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
5476
+ return /* @__PURE__ */ jsx96("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx96("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
5362
5477
  };
5363
5478
  var key_default = SvgKey;
5364
5479
 
5365
5480
  // src/theme/default/components/settings/settings-webauthn.tsx
5366
5481
  import { useFormContext as useFormContext23 } from "react-hook-form";
5367
- import { jsx as jsx96, jsxs as jsxs46 } from "react/jsx-runtime";
5482
+ import { jsx as jsx97, jsxs as jsxs46 } from "react/jsx-runtime";
5368
5483
  function DefaultSettingsWebauthn({
5369
5484
  nameInput,
5370
5485
  triggerButton,
@@ -5377,12 +5492,12 @@ function DefaultSettingsWebauthn({
5377
5492
  const hasRemoveButtons = removeButtons.length > 0;
5378
5493
  return /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-8", children: [
5379
5494
  /* @__PURE__ */ jsxs46("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
5380
- /* @__PURE__ */ jsx96("div", { className: "flex-1", children: /* @__PURE__ */ jsx96(
5495
+ /* @__PURE__ */ jsx97("div", { className: "flex-1", children: /* @__PURE__ */ jsx97(
5381
5496
  Node2.Label,
5382
5497
  {
5383
5498
  node: nameInput,
5384
5499
  attributes: nameInput.attributes,
5385
- children: /* @__PURE__ */ jsx96(
5500
+ children: /* @__PURE__ */ jsx97(
5386
5501
  Node2.Input,
5387
5502
  {
5388
5503
  node: nameInput,
@@ -5391,7 +5506,7 @@ function DefaultSettingsWebauthn({
5391
5506
  )
5392
5507
  }
5393
5508
  ) }),
5394
- triggerButton ? /* @__PURE__ */ jsx96(
5509
+ triggerButton ? /* @__PURE__ */ jsx97(
5395
5510
  Node2.Button,
5396
5511
  {
5397
5512
  node: triggerButton,
@@ -5401,8 +5516,8 @@ function DefaultSettingsWebauthn({
5401
5516
  ) : null
5402
5517
  ] }),
5403
5518
  hasRemoveButtons ? /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-8", children: [
5404
- /* @__PURE__ */ jsx96(Card.Divider, {}),
5405
- /* @__PURE__ */ jsx96("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
5519
+ /* @__PURE__ */ jsx97(Card.Divider, {}),
5520
+ /* @__PURE__ */ jsx97("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
5406
5521
  var _a, _b;
5407
5522
  const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
5408
5523
  const addedAt = "added_at" in context ? context.added_at : null;
@@ -5414,7 +5529,7 @@ function DefaultSettingsWebauthn({
5414
5529
  className: "flex justify-between gap-6 md:items-center",
5415
5530
  children: [
5416
5531
  /* @__PURE__ */ jsxs46("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
5417
- /* @__PURE__ */ jsx96(
5532
+ /* @__PURE__ */ jsx97(
5418
5533
  key_default,
5419
5534
  {
5420
5535
  size: 32,
@@ -5423,15 +5538,15 @@ function DefaultSettingsWebauthn({
5423
5538
  ),
5424
5539
  /* @__PURE__ */ jsxs46("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
5425
5540
  /* @__PURE__ */ jsxs46("div", { className: "flex-1 flex-col truncate", children: [
5426
- /* @__PURE__ */ jsx96("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
5427
- /* @__PURE__ */ jsx96("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
5541
+ /* @__PURE__ */ jsx97("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
5542
+ /* @__PURE__ */ jsx97("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
5428
5543
  ] }),
5429
- addedAt && /* @__PURE__ */ jsx96("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
5544
+ addedAt && /* @__PURE__ */ jsx97("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
5430
5545
  dateStyle: "long"
5431
5546
  }).format(new Date(addedAt)) })
5432
5547
  ] })
5433
5548
  ] }),
5434
- /* @__PURE__ */ jsx96(
5549
+ /* @__PURE__ */ jsx97(
5435
5550
  "button",
5436
5551
  {
5437
5552
  ...node.attributes,
@@ -5439,7 +5554,7 @@ function DefaultSettingsWebauthn({
5439
5554
  onClick: node.onClick,
5440
5555
  disabled: isSubmitting,
5441
5556
  className: "relative",
5442
- children: isSubmitting ? /* @__PURE__ */ jsx96(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx96(
5557
+ children: isSubmitting ? /* @__PURE__ */ jsx97(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx97(
5443
5558
  trash_default,
5444
5559
  {
5445
5560
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -5458,91 +5573,96 @@ function DefaultSettingsWebauthn({
5458
5573
  }
5459
5574
 
5460
5575
  // src/theme/default/components/card/auth-method-list-container.tsx
5461
- import { jsx as jsx97 } from "react/jsx-runtime";
5576
+ import { jsx as jsx98 } from "react/jsx-runtime";
5462
5577
  function DefaultAuthMethodListContainer({
5463
5578
  children
5464
5579
  }) {
5465
- return /* @__PURE__ */ jsx97("div", { className: "grid grid-cols-1 gap-2", children });
5580
+ return /* @__PURE__ */ jsx98("div", { className: "grid grid-cols-1 gap-2", children });
5466
5581
  }
5467
5582
 
5468
5583
  // src/theme/default/components/form/captcha.tsx
5469
5584
  import { isUiNodeInputAttributes as isUiNodeInputAttributes9 } from "@ory/client-fetch";
5470
5585
  import { Turnstile } from "@marsidev/react-turnstile";
5471
- import { useRef as useRef3 } from "react";
5586
+ import { useEffect as useEffect7, useRef as useRef4 } from "react";
5472
5587
  import { useFormContext as useFormContext24 } from "react-hook-form";
5473
- import { jsx as jsx98 } from "react/jsx-runtime";
5588
+ import { jsx as jsx99 } from "react/jsx-runtime";
5474
5589
  var DefaultCaptcha = ({ node }) => {
5475
- const { setValue } = useFormContext24();
5476
- const ref = useRef3();
5477
- const nodes = [];
5478
- if (isUiNodeInputAttributes9(node.attributes)) {
5479
- if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
5480
- nodes.push(
5481
- /* @__PURE__ */ jsx98(DefaultInput, { node, attributes: node.attributes }, 1)
5482
- );
5590
+ const { setValue, formState } = useFormContext24();
5591
+ const ref = useRef4();
5592
+ const prevSubmitCount = useRef4(formState.submitCount);
5593
+ useEffect7(() => {
5594
+ if (formState.submitCount > prevSubmitCount.current && formState.isSubmitSuccessful) {
5595
+ prevSubmitCount.current = formState.submitCount;
5596
+ setTimeout(() => {
5597
+ if (ref.current) {
5598
+ ref.current.reset();
5599
+ }
5600
+ }, 100);
5483
5601
  }
5602
+ }, [formState.submitCount, formState.isSubmitSuccessful]);
5603
+ if (!isUiNodeInputAttributes9(node.attributes)) {
5604
+ return null;
5484
5605
  }
5485
- if (isUiNodeInputAttributes9(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
5606
+ if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
5607
+ return /* @__PURE__ */ jsx99(DefaultInput, { node, attributes: node.attributes }, 1);
5608
+ } else if (node.attributes.name === "captcha_turnstile_options") {
5486
5609
  const options = JSON.parse(node.attributes.value);
5487
- nodes.push(
5488
- /* @__PURE__ */ jsx98(
5489
- Turnstile,
5490
- {
5491
- ref,
5492
- siteKey: options.sitekey,
5493
- options: {
5494
- action: options.action,
5495
- size: "flexible",
5496
- theme: options.theme,
5497
- responseField: false,
5498
- responseFieldName: options.response_field_name
5499
- },
5500
- onExpire: () => {
5501
- var _a;
5502
- return (_a = ref.current) == null ? void 0 : _a.reset();
5503
- },
5504
- onSuccess: (token) => {
5505
- setValue(options.response_field_name, token);
5506
- }
5610
+ return /* @__PURE__ */ jsx99(
5611
+ Turnstile,
5612
+ {
5613
+ ref,
5614
+ siteKey: options.sitekey,
5615
+ options: {
5616
+ action: options.action,
5617
+ size: "flexible",
5618
+ theme: options.theme,
5619
+ responseField: false,
5620
+ responseFieldName: options.response_field_name
5507
5621
  },
5508
- 2
5509
- )
5622
+ onExpire: () => {
5623
+ var _a;
5624
+ return (_a = ref.current) == null ? void 0 : _a.reset();
5625
+ },
5626
+ onSuccess: (token) => {
5627
+ setValue(options.response_field_name, token);
5628
+ }
5629
+ }
5510
5630
  );
5511
5631
  }
5512
- return nodes;
5632
+ return null;
5513
5633
  };
5514
5634
 
5515
5635
  // src/theme/default/assets/icons/personal.svg
5516
5636
  import * as React34 from "react";
5517
- import { jsx as jsx99 } from "react/jsx-runtime";
5637
+ import { jsx as jsx100 } from "react/jsx-runtime";
5518
5638
  var SvgPersonal = (props) => {
5519
5639
  var _a, _b;
5520
- return /* @__PURE__ */ jsx99("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx99("path", { stroke: "#0F172A", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 14v-1.333A2.667 2.667 0 0 1 6.667 10h1m5.8 3.467 1.2 1.2m-9.334-10a2.667 2.667 0 1 0 5.334 0 2.667 2.667 0 0 0-5.334 0M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }) });
5640
+ return /* @__PURE__ */ jsx100("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx100("path", { stroke: "#0F172A", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 14v-1.333A2.667 2.667 0 0 1 6.667 10h1m5.8 3.467 1.2 1.2m-9.334-10a2.667 2.667 0 1 0 5.334 0 2.667 2.667 0 0 0-5.334 0M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }) });
5521
5641
  };
5522
5642
  var personal_default = SvgPersonal;
5523
5643
 
5524
5644
  // src/theme/default/assets/icons/message.svg
5525
5645
  import * as React35 from "react";
5526
- import { jsx as jsx100 } from "react/jsx-runtime";
5646
+ import { jsx as jsx101 } from "react/jsx-runtime";
5527
5647
  var SvgMessage = (props) => {
5528
5648
  var _a, _b;
5529
- return /* @__PURE__ */ jsx100("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx100("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7.325a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-18 0v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-10m-18 0 9 6 9-6" }) });
5649
+ return /* @__PURE__ */ jsx101("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx101("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7.325a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-18 0v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-10m-18 0 9 6 9-6" }) });
5530
5650
  };
5531
5651
  var message_default = SvgMessage;
5532
5652
 
5533
5653
  // src/theme/default/assets/icons/phone.svg
5534
5654
  import * as React36 from "react";
5535
- import { jsx as jsx101 } from "react/jsx-runtime";
5655
+ import { jsx as jsx102 } from "react/jsx-runtime";
5536
5656
  var SvgPhone = (props) => {
5537
5657
  var _a, _b;
5538
- return /* @__PURE__ */ jsx101("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx101("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 4.325h4l2 5-2.5 1.5a11 11 0 0 0 5 5l1.5-2.5 5 2v4a2 2 0 0 1-2 2 16 16 0 0 1-15-15 2 2 0 0 1 2-2" }) });
5658
+ return /* @__PURE__ */ jsx102("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx102("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 4.325h4l2 5-2.5 1.5a11 11 0 0 0 5 5l1.5-2.5 5 2v4a2 2 0 0 1-2 2 16 16 0 0 1-15-15 2 2 0 0 1 2-2" }) });
5539
5659
  };
5540
5660
  var phone_default = SvgPhone;
5541
5661
 
5542
5662
  // src/theme/default/components/form/consent-scope-checkbox.tsx
5543
5663
  import { useIntl as useIntl22 } from "react-intl";
5544
5664
  import * as Switch from "@radix-ui/react-switch";
5545
- import { jsx as jsx102 } from "react/jsx-runtime";
5665
+ import { jsx as jsx103 } from "react/jsx-runtime";
5546
5666
  var ScopeIcons = {
5547
5667
  openid: personal_default,
5548
5668
  offline_access: personal_default,
@@ -5557,7 +5677,7 @@ function DefaultConsentScopeCheckbox({
5557
5677
  var _a;
5558
5678
  const intl = useIntl22();
5559
5679
  const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
5560
- return /* @__PURE__ */ jsx102(
5680
+ return /* @__PURE__ */ jsx103(
5561
5681
  ListItem,
5562
5682
  {
5563
5683
  as: "label",
@@ -5572,7 +5692,7 @@ function DefaultConsentScopeCheckbox({
5572
5692
  }),
5573
5693
  className: "col-span-2",
5574
5694
  "data-testid": "ory/screen/consent/scope-checkbox-label",
5575
- children: /* @__PURE__ */ jsx102(
5695
+ children: /* @__PURE__ */ jsx103(
5576
5696
  Switch.Root,
5577
5697
  {
5578
5698
  className: "relative w-7 h-4 bg-toggle-background-default rounded-identifier border-toggle-border-default border p-[3px] data-[state=checked]:bg-toggle-background-checked transition-all data-[state=checked]:border-toggle-border-checked",
@@ -5580,7 +5700,7 @@ function DefaultConsentScopeCheckbox({
5580
5700
  value: attributes.value,
5581
5701
  onCheckedChange,
5582
5702
  defaultChecked: true,
5583
- children: /* @__PURE__ */ jsx102(Switch.Thumb, { className: "size-2 block bg-toggle-foreground-default rounded-identifier data-[state=checked]:bg-toggle-foreground-checked transition-all data-[state=checked]:translate-x-3" })
5703
+ children: /* @__PURE__ */ jsx103(Switch.Thumb, { className: "size-2 block bg-toggle-foreground-default rounded-identifier data-[state=checked]:bg-toggle-foreground-checked transition-all data-[state=checked]:translate-x-3" })
5584
5704
  }
5585
5705
  )
5586
5706
  }
@@ -5642,9 +5762,13 @@ import {
5642
5762
  instanceOfFlowError,
5643
5763
  instanceOfGenericError
5644
5764
  } from "@ory/client-fetch";
5765
+ import {
5766
+ OryConfigurationProvider as OryConfigurationProvider2,
5767
+ useOryConfiguration as useOryConfiguration8
5768
+ } from "@ory/elements-react";
5645
5769
  import { useMemo as useMemo2 } from "react";
5646
5770
  import { FormattedMessage } from "react-intl";
5647
- import { jsx as jsx103, jsxs as jsxs47 } from "react/jsx-runtime";
5771
+ import { jsx as jsx104, jsxs as jsxs47 } from "react/jsx-runtime";
5648
5772
  function isOAuth2Error(error) {
5649
5773
  return !!error && typeof error === "object" && "error" in error && "error_description" in error;
5650
5774
  }
@@ -5697,47 +5821,47 @@ function Error2({
5697
5821
  const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
5698
5822
  const parsed = useStandardize(error);
5699
5823
  const description = errorDescriptions[Math.floor(parsed.code / 100)];
5700
- return /* @__PURE__ */ jsx103(
5824
+ return /* @__PURE__ */ jsx104(OryConfigurationProvider2, { sdk: config.sdk, project: config.project, children: /* @__PURE__ */ jsx104(
5701
5825
  IntlProvider,
5702
5826
  {
5703
5827
  locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
5704
5828
  customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
5705
- children: /* @__PURE__ */ jsx103(Card, { children: /* @__PURE__ */ jsxs47(
5829
+ children: /* @__PURE__ */ jsx104(Card, { children: /* @__PURE__ */ jsxs47(
5706
5830
  "div",
5707
5831
  {
5708
5832
  className: "flex flex-col gap-6 antialiased",
5709
5833
  "data-testid": "ory/screen/error",
5710
5834
  children: [
5711
5835
  /* @__PURE__ */ jsxs47("header", { className: "flex flex-col gap-8 antialiased", children: [
5712
- /* @__PURE__ */ jsx103(ErrorLogo, { config }),
5836
+ /* @__PURE__ */ jsx104(ErrorLogo, {}),
5713
5837
  /* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-2", children: [
5714
- /* @__PURE__ */ jsx103("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx103(FormattedMessage, { id: "error.title.what-happened" }) }),
5715
- /* @__PURE__ */ jsx103("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
5716
- parsed.reason && /* @__PURE__ */ jsx103("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
5838
+ /* @__PURE__ */ jsx104("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.title.what-happened" }) }),
5839
+ /* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
5840
+ parsed.reason && /* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
5717
5841
  ] })
5718
5842
  ] }),
5719
- /* @__PURE__ */ jsx103(Divider, {}),
5843
+ /* @__PURE__ */ jsx104(Divider, {}),
5720
5844
  /* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-2", children: [
5721
- /* @__PURE__ */ jsx103("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx103(FormattedMessage, { id: "error.title.what-can-i-do" }) }),
5722
- /* @__PURE__ */ jsx103("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx103(FormattedMessage, { id: "error.instructions" }) }),
5723
- /* @__PURE__ */ jsx103("div", { children: session ? /* @__PURE__ */ jsx103(LoggedInActions, { config }) : /* @__PURE__ */ jsx103(GoBackButton, { config }) })
5845
+ /* @__PURE__ */ jsx104("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.title.what-can-i-do" }) }),
5846
+ /* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.instructions" }) }),
5847
+ /* @__PURE__ */ jsx104("div", { children: session ? /* @__PURE__ */ jsx104(LoggedInActions, {}) : /* @__PURE__ */ jsx104(GoBackButton, {}) })
5724
5848
  ] }),
5725
- /* @__PURE__ */ jsx103(Divider, {}),
5849
+ /* @__PURE__ */ jsx104(Divider, {}),
5726
5850
  /* @__PURE__ */ jsxs47("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
5727
- /* @__PURE__ */ jsx103("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx103(FormattedMessage, { id: "error.footer.text" }) }),
5851
+ /* @__PURE__ */ jsx104("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.footer.text" }) }),
5728
5852
  parsed.id && /* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5729
5853
  "ID: ",
5730
- /* @__PURE__ */ jsx103("code", { children: parsed.id })
5854
+ /* @__PURE__ */ jsx104("code", { children: parsed.id })
5731
5855
  ] }),
5732
5856
  /* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5733
5857
  "Time: ",
5734
- /* @__PURE__ */ jsx103("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
5858
+ /* @__PURE__ */ jsx104("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
5735
5859
  ] }),
5736
5860
  /* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5737
5861
  "Message: ",
5738
- /* @__PURE__ */ jsx103("code", { children: parsed.reason })
5862
+ /* @__PURE__ */ jsx104("code", { children: parsed.reason })
5739
5863
  ] }),
5740
- /* @__PURE__ */ jsx103("div", { children: /* @__PURE__ */ jsx103(
5864
+ /* @__PURE__ */ jsx104("div", { children: /* @__PURE__ */ jsx104(
5741
5865
  "button",
5742
5866
  {
5743
5867
  className: "text-interface-foreground-default-primary underline",
@@ -5749,7 +5873,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
5749
5873
  `;
5750
5874
  void navigator.clipboard.writeText(text);
5751
5875
  },
5752
- children: /* @__PURE__ */ jsx103(FormattedMessage, { id: "error.footer.copy" })
5876
+ children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.footer.copy" })
5753
5877
  }
5754
5878
  ) })
5755
5879
  ] })
@@ -5757,49 +5881,40 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
5757
5881
  }
5758
5882
  ) })
5759
5883
  }
5760
- );
5884
+ ) });
5761
5885
  }
5762
- function LoggedInActions({ config }) {
5886
+ function LoggedInActions() {
5887
+ const config = useOryConfiguration8();
5763
5888
  const { logoutFlow } = useClientLogout(config);
5764
- return /* @__PURE__ */ jsx103(
5889
+ return /* @__PURE__ */ jsx104(
5765
5890
  "a",
5766
5891
  {
5767
5892
  href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
5768
5893
  className: "text-interface-foreground-default-primary underline",
5769
- children: /* @__PURE__ */ jsx103(FormattedMessage, { id: "login.logout-button" })
5894
+ children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "login.logout-button" })
5770
5895
  }
5771
5896
  );
5772
5897
  }
5773
- function GoBackButton({ config }) {
5898
+ function GoBackButton() {
5899
+ const config = useOryConfiguration8();
5774
5900
  if ("default_redirect_url" in config.project) {
5775
- return /* @__PURE__ */ jsx103(
5901
+ return /* @__PURE__ */ jsx104(
5776
5902
  "a",
5777
5903
  {
5778
5904
  className: "text-interface-foreground-default-primary underline",
5779
5905
  href: config.project.default_redirect_url,
5780
- children: /* @__PURE__ */ jsx103(FormattedMessage, { id: "error.action.go-back" })
5906
+ children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.action.go-back" })
5781
5907
  }
5782
5908
  );
5783
5909
  }
5784
5910
  return null;
5785
5911
  }
5786
- function ErrorLogo({ config }) {
5787
- var _a;
5788
- if (config.project.logo_light_url) {
5789
- return /* @__PURE__ */ jsx103(
5790
- "img",
5791
- {
5792
- src: config.project.logo_light_url,
5793
- width: 100,
5794
- height: 36,
5795
- alt: "Logo"
5796
- }
5797
- );
5798
- }
5799
- if (config.logoUrl) {
5800
- return /* @__PURE__ */ jsx103("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
5912
+ function ErrorLogo() {
5913
+ const { project } = useOryConfiguration8();
5914
+ if (project.logo_light_url) {
5915
+ return /* @__PURE__ */ jsx104("img", { src: project.logo_light_url, width: 100, height: 36, alt: "Logo" });
5801
5916
  }
5802
- return /* @__PURE__ */ jsx103("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: (_a = config.project.name) != null ? _a : config.name });
5917
+ return /* @__PURE__ */ jsx104("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: project.name });
5803
5918
  }
5804
5919
 
5805
5920
  // src/theme/default/flows/login.tsx
@@ -5808,7 +5923,7 @@ import {
5808
5923
  OryProvider,
5809
5924
  OryTwoStepCard as OryTwoStepCard2
5810
5925
  } from "@ory/elements-react";
5811
- import { jsx as jsx104 } from "react/jsx-runtime";
5926
+ import { jsx as jsx105 } from "react/jsx-runtime";
5812
5927
  function Login({
5813
5928
  flow,
5814
5929
  config,
@@ -5816,14 +5931,14 @@ function Login({
5816
5931
  components: flowOverrideComponents
5817
5932
  }) {
5818
5933
  const components = getOryComponents(flowOverrideComponents);
5819
- return /* @__PURE__ */ jsx104(
5934
+ return /* @__PURE__ */ jsx105(
5820
5935
  OryProvider,
5821
5936
  {
5822
5937
  config,
5823
5938
  flow,
5824
5939
  flowType: FlowType18.Login,
5825
5940
  components,
5826
- children: children != null ? children : /* @__PURE__ */ jsx104(OryTwoStepCard2, {})
5941
+ children: children != null ? children : /* @__PURE__ */ jsx105(OryTwoStepCard2, {})
5827
5942
  }
5828
5943
  );
5829
5944
  }
@@ -5834,7 +5949,7 @@ import {
5834
5949
  OryProvider as OryProvider2,
5835
5950
  OryTwoStepCard as OryTwoStepCard3
5836
5951
  } from "@ory/elements-react";
5837
- import { jsx as jsx105 } from "react/jsx-runtime";
5952
+ import { jsx as jsx106 } from "react/jsx-runtime";
5838
5953
  function Recovery({
5839
5954
  flow,
5840
5955
  config,
@@ -5842,14 +5957,14 @@ function Recovery({
5842
5957
  components: flowOverrideComponents
5843
5958
  }) {
5844
5959
  const components = getOryComponents(flowOverrideComponents);
5845
- return /* @__PURE__ */ jsx105(
5960
+ return /* @__PURE__ */ jsx106(
5846
5961
  OryProvider2,
5847
5962
  {
5848
5963
  config,
5849
5964
  flow,
5850
5965
  flowType: FlowType19.Recovery,
5851
5966
  components,
5852
- children: children != null ? children : /* @__PURE__ */ jsx105(OryTwoStepCard3, {})
5967
+ children: children != null ? children : /* @__PURE__ */ jsx106(OryTwoStepCard3, {})
5853
5968
  }
5854
5969
  );
5855
5970
  }
@@ -5860,7 +5975,7 @@ import {
5860
5975
  OryProvider as OryProvider3,
5861
5976
  OryTwoStepCard as OryTwoStepCard4
5862
5977
  } from "@ory/elements-react";
5863
- import { jsx as jsx106 } from "react/jsx-runtime";
5978
+ import { jsx as jsx107 } from "react/jsx-runtime";
5864
5979
  function Registration({
5865
5980
  flow,
5866
5981
  children,
@@ -5868,14 +5983,14 @@ function Registration({
5868
5983
  config
5869
5984
  }) {
5870
5985
  const components = getOryComponents(flowOverrideComponents);
5871
- return /* @__PURE__ */ jsx106(
5986
+ return /* @__PURE__ */ jsx107(
5872
5987
  OryProvider3,
5873
5988
  {
5874
5989
  config,
5875
5990
  flow,
5876
5991
  flowType: FlowType20.Registration,
5877
5992
  components,
5878
- children: children != null ? children : /* @__PURE__ */ jsx106(OryTwoStepCard4, {})
5993
+ children: children != null ? children : /* @__PURE__ */ jsx107(OryTwoStepCard4, {})
5879
5994
  }
5880
5995
  );
5881
5996
  }
@@ -5887,7 +6002,7 @@ import {
5887
6002
  OryProvider as OryProvider4,
5888
6003
  OrySettingsCard
5889
6004
  } from "@ory/elements-react";
5890
- import { Fragment as Fragment13, jsx as jsx107, jsxs as jsxs48 } from "react/jsx-runtime";
6005
+ import { Fragment as Fragment13, jsx as jsx108, jsxs as jsxs48 } from "react/jsx-runtime";
5891
6006
  function Settings({
5892
6007
  flow,
5893
6008
  config,
@@ -5895,7 +6010,7 @@ function Settings({
5895
6010
  components: flowOverrideComponents
5896
6011
  }) {
5897
6012
  const components = getOryComponents(flowOverrideComponents);
5898
- return /* @__PURE__ */ jsx107(
6013
+ return /* @__PURE__ */ jsx108(
5899
6014
  OryProvider4,
5900
6015
  {
5901
6016
  config,
@@ -5903,8 +6018,8 @@ function Settings({
5903
6018
  flowType: FlowType21.Settings,
5904
6019
  components,
5905
6020
  children: children != null ? children : /* @__PURE__ */ jsxs48(Fragment13, { children: [
5906
- /* @__PURE__ */ jsx107(HeadlessPageHeader, {}),
5907
- /* @__PURE__ */ jsx107(OrySettingsCard, {})
6021
+ /* @__PURE__ */ jsx108(HeadlessPageHeader, {}),
6022
+ /* @__PURE__ */ jsx108(OrySettingsCard, {})
5908
6023
  ] })
5909
6024
  }
5910
6025
  );
@@ -5916,7 +6031,7 @@ import {
5916
6031
  OryProvider as OryProvider5,
5917
6032
  OryTwoStepCard as OryTwoStepCard5
5918
6033
  } from "@ory/elements-react";
5919
- import { jsx as jsx108 } from "react/jsx-runtime";
6034
+ import { jsx as jsx109 } from "react/jsx-runtime";
5920
6035
  function Verification({
5921
6036
  flow,
5922
6037
  config,
@@ -5924,14 +6039,14 @@ function Verification({
5924
6039
  components: flowOverrideComponents
5925
6040
  }) {
5926
6041
  const components = getOryComponents(flowOverrideComponents);
5927
- return /* @__PURE__ */ jsx108(
6042
+ return /* @__PURE__ */ jsx109(
5928
6043
  OryProvider5,
5929
6044
  {
5930
6045
  config,
5931
6046
  flow,
5932
6047
  flowType: FlowType22.Verification,
5933
6048
  components,
5934
- children: children != null ? children : /* @__PURE__ */ jsx108(OryTwoStepCard5, {})
6049
+ children: children != null ? children : /* @__PURE__ */ jsx109(OryTwoStepCard5, {})
5935
6050
  }
5936
6051
  );
5937
6052
  }
@@ -6084,7 +6199,7 @@ function challengeNode(challenge) {
6084
6199
  }
6085
6200
 
6086
6201
  // src/theme/default/flows/consent.tsx
6087
- import { jsx as jsx109 } from "react/jsx-runtime";
6202
+ import { jsx as jsx110 } from "react/jsx-runtime";
6088
6203
  function Consent({
6089
6204
  consentChallenge,
6090
6205
  session,
@@ -6101,14 +6216,14 @@ function Consent({
6101
6216
  formActionUrl,
6102
6217
  session
6103
6218
  );
6104
- return /* @__PURE__ */ jsx109(
6219
+ return /* @__PURE__ */ jsx110(
6105
6220
  OryProvider6,
6106
6221
  {
6107
6222
  config,
6108
6223
  flow,
6109
6224
  flowType: FlowType23.OAuth2Consent,
6110
6225
  components,
6111
- children: children != null ? children : /* @__PURE__ */ jsx109(OryConsentCard2, {})
6226
+ children: children != null ? children : /* @__PURE__ */ jsx110(OryConsentCard2, {})
6112
6227
  }
6113
6228
  );
6114
6229
  }