@ory/elements-react 1.0.0-next.41 → 1.0.0-next.43

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.
@@ -92,9 +92,8 @@ function DefaultCardContent({ children }) {
92
92
  }
93
93
 
94
94
  // src/theme/default/components/card/footer.tsx
95
- var import_client_fetch3 = require("@ory/client-fetch");
95
+ var import_client_fetch4 = require("@ory/client-fetch");
96
96
  var import_elements_react = require("@ory/elements-react");
97
- var import_react_hook_form = require("react-hook-form");
98
97
  var import_react_intl = require("react-intl");
99
98
 
100
99
  // src/theme/default/utils/url.ts
@@ -143,6 +142,7 @@ function appendRefresh(url, refresh) {
143
142
 
144
143
  // src/util/ui/index.ts
145
144
  var import_client_fetch2 = require("@ory/client-fetch");
145
+ var import_client_fetch3 = require("@ory/client-fetch");
146
146
  var import_react2 = require("react");
147
147
 
148
148
  // src/context/component.tsx
@@ -179,15 +179,15 @@ function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
179
179
  groupNodes.push(node);
180
180
  groups[node.group] = groupNodes;
181
181
  }
182
- return Object.values(import_client_fetch2.UiNodeGroupEnum).filter((group) => {
182
+ return Object.values(import_client_fetch3.UiNodeGroupEnum).filter((group) => {
183
183
  var _a2;
184
184
  return (_a2 = groups[group]) == null ? void 0 : _a2.length;
185
185
  }).filter(
186
186
  (group) => ![
187
- import_client_fetch2.UiNodeGroupEnum.Default,
188
- import_client_fetch2.UiNodeGroupEnum.IdentifierFirst,
189
- import_client_fetch2.UiNodeGroupEnum.Profile,
190
- import_client_fetch2.UiNodeGroupEnum.Captcha,
187
+ import_client_fetch3.UiNodeGroupEnum.Default,
188
+ import_client_fetch3.UiNodeGroupEnum.IdentifierFirst,
189
+ import_client_fetch3.UiNodeGroupEnum.Profile,
190
+ import_client_fetch3.UiNodeGroupEnum.Captcha,
191
191
  ...excludeAuthMethods
192
192
  ].includes(group)
193
193
  );
@@ -196,20 +196,27 @@ var findNode = (nodes, opt) => nodes.find((n) => {
196
196
  return n.attributes.node_type === opt.node_type && (opt.group instanceof RegExp ? n.group.match(opt.group) : n.group === opt.group) && (opt.name && n.attributes.node_type === "input" ? opt.name instanceof RegExp ? n.attributes.name.match(opt.name) : n.attributes.name === opt.name : !opt.name);
197
197
  });
198
198
 
199
+ // src/util/nodes.ts
200
+ function findScreenSelectionButton(nodes) {
201
+ return nodes.find(
202
+ (node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
203
+ );
204
+ }
205
+
199
206
  // src/theme/default/components/card/footer.tsx
200
207
  var import_jsx_runtime5 = require("react/jsx-runtime");
201
208
  function DefaultCardFooter() {
202
209
  const oryFlow = (0, import_elements_react.useOryFlow)();
203
210
  switch (oryFlow.flowType) {
204
- case import_client_fetch3.FlowType.Login:
211
+ case import_client_fetch4.FlowType.Login:
205
212
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LoginCardFooter, {});
206
- case import_client_fetch3.FlowType.Registration:
213
+ case import_client_fetch4.FlowType.Registration:
207
214
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RegistrationCardFooter, {});
208
- case import_client_fetch3.FlowType.Recovery:
215
+ case import_client_fetch4.FlowType.Recovery:
209
216
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RecoveryCardFooter, {});
210
- case import_client_fetch3.FlowType.Verification:
217
+ case import_client_fetch4.FlowType.Verification:
211
218
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(VerificationCardFooter, {});
212
- case import_client_fetch3.FlowType.OAuth2Consent:
219
+ case import_client_fetch4.FlowType.OAuth2Consent:
213
220
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ConsentCardFooter, { flow: oryFlow.flow });
214
221
  default:
215
222
  return null;
@@ -219,7 +226,7 @@ function LoginCardFooter() {
219
226
  const { config, formState, flow, flowType } = (0, import_elements_react.useOryFlow)();
220
227
  const intl = (0, import_react_intl.useIntl)();
221
228
  const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
222
- if (flowType === import_client_fetch3.FlowType.Login && flow.refresh) {
229
+ if (flowType === import_client_fetch4.FlowType.Login && flow.refresh) {
223
230
  return null;
224
231
  }
225
232
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
@@ -267,7 +274,7 @@ function LoginCardFooter() {
267
274
  })
268
275
  }
269
276
  ) }),
270
- flowType === import_client_fetch3.FlowType.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
277
+ flowType === import_client_fetch4.FlowType.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
271
278
  intl.formatMessage({
272
279
  id: "login.2fa.go-back"
273
280
  }),
@@ -289,60 +296,45 @@ function LoginCardFooter() {
289
296
  ] })
290
297
  ] });
291
298
  }
292
- function findScreenSelectionButton(nodes) {
293
- return nodes.find(
294
- (node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
295
- );
296
- }
297
299
  function RegistrationCardFooter() {
298
300
  const intl = (0, import_react_intl.useIntl)();
299
301
  const { config, flow, formState } = (0, import_elements_react.useOryFlow)();
300
- const { setValue } = (0, import_react_hook_form.useFormContext)();
301
- if (formState.current === "select_method") {
302
- return null;
303
- }
304
302
  const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
305
- function handleScreenSelection() {
306
- setValue("method", "profile");
307
- if (screenSelectionNode) {
308
- setValue(
309
- screenSelectionNode.attributes.name,
310
- screenSelectionNode.attributes.value
311
- );
312
- }
303
+ switch (formState.current) {
304
+ case "method_active":
305
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased", children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
306
+ "a",
307
+ {
308
+ className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
309
+ href: "",
310
+ children: intl.formatMessage({
311
+ id: "card.footer.select-another-method",
312
+ defaultMessage: "Select another method"
313
+ })
314
+ }
315
+ ) });
316
+ case "select_method":
317
+ default:
318
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased", children: [
319
+ intl.formatMessage({
320
+ id: "registration.login-label",
321
+ defaultMessage: "Already have an account?"
322
+ }),
323
+ " ",
324
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
325
+ "a",
326
+ {
327
+ className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
328
+ href: initFlowUrl(config.sdk.url, "login", flow),
329
+ "data-testid": "ory/screen/registration/action/login",
330
+ children: intl.formatMessage({
331
+ id: "registration.login-button",
332
+ defaultMessage: "Sign in"
333
+ })
334
+ }
335
+ )
336
+ ] });
313
337
  }
314
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
315
- "button",
316
- {
317
- className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
318
- type: "submit",
319
- name: screenSelectionNode.attributes.name,
320
- value: screenSelectionNode.attributes.value,
321
- onClick: handleScreenSelection,
322
- children: intl.formatMessage({
323
- id: "card.footer.select-another-method",
324
- defaultMessage: "Select another method"
325
- })
326
- }
327
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
328
- intl.formatMessage({
329
- id: "registration.login-label",
330
- defaultMessage: "Already have an account?"
331
- }),
332
- " ",
333
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
334
- "a",
335
- {
336
- className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
337
- href: initFlowUrl(config.sdk.url, "login", flow),
338
- "data-testid": "ory/screen/registration/action/login",
339
- children: intl.formatMessage({
340
- id: "registration.login-button",
341
- defaultMessage: "Sign in"
342
- })
343
- }
344
- )
345
- ] }) });
346
338
  }
347
339
  function RecoveryCardFooter() {
348
340
  return null;
@@ -400,7 +392,7 @@ function ConsentCardFooter({ flow }) {
400
392
  var import_elements_react3 = require("@ory/elements-react");
401
393
 
402
394
  // src/theme/default/utils/constructCardHeader.ts
403
- var import_client_fetch4 = require("@ory/client-fetch");
395
+ var import_client_fetch5 = require("@ory/client-fetch");
404
396
  var import_react_intl2 = require("react-intl");
405
397
  function joinWithCommaOr(list, orText = "or") {
406
398
  if (list.length === 0) {
@@ -417,7 +409,7 @@ function useCardHeaderText(container, opts) {
417
409
  const nodes = container.nodes;
418
410
  const intl = (0, import_react_intl2.useIntl)();
419
411
  switch (opts.flowType) {
420
- case import_client_fetch4.FlowType.Recovery:
412
+ case import_client_fetch5.FlowType.Recovery:
421
413
  if (nodes.find(
422
414
  (node) => "name" in node.attributes && node.attributes.name === "code"
423
415
  )) {
@@ -438,7 +430,7 @@ function useCardHeaderText(container, opts) {
438
430
  id: "recovery.subtitle"
439
431
  })
440
432
  };
441
- case import_client_fetch4.FlowType.Settings:
433
+ case import_client_fetch5.FlowType.Settings:
442
434
  return {
443
435
  title: intl.formatMessage({
444
436
  id: "settings.title"
@@ -447,7 +439,7 @@ function useCardHeaderText(container, opts) {
447
439
  id: "settings.subtitle"
448
440
  })
449
441
  };
450
- case import_client_fetch4.FlowType.Verification:
442
+ case import_client_fetch5.FlowType.Verification:
451
443
  if (nodes.find(
452
444
  (node) => "name" in node.attributes && node.attributes.name === "code"
453
445
  )) {
@@ -468,7 +460,7 @@ function useCardHeaderText(container, opts) {
468
460
  id: "verification.subtitle"
469
461
  })
470
462
  };
471
- case import_client_fetch4.FlowType.Login: {
463
+ case import_client_fetch5.FlowType.Login: {
472
464
  const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
473
465
  (m) => m.id === 1010016
474
466
  );
@@ -490,7 +482,7 @@ function useCardHeaderText(container, opts) {
490
482
  const parts = [];
491
483
  if (nodes.find((node) => node.group === "password")) {
492
484
  switch (opts.flowType) {
493
- case import_client_fetch4.FlowType.Registration:
485
+ case import_client_fetch5.FlowType.Registration:
494
486
  parts.push(
495
487
  intl.formatMessage(
496
488
  { id: "card.header.parts.password.registration" },
@@ -527,7 +519,7 @@ function useCardHeaderText(container, opts) {
527
519
  }
528
520
  if (nodes.find((node) => node.group === "identifier_first")) {
529
521
  const identifier = nodes.find(
530
- (node) => (0, import_client_fetch4.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
522
+ (node) => (0, import_client_fetch5.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
531
523
  );
532
524
  if (identifier) {
533
525
  parts.push(
@@ -543,7 +535,7 @@ function useCardHeaderText(container, opts) {
543
535
  }
544
536
  }
545
537
  switch (opts.flowType) {
546
- case import_client_fetch4.FlowType.Login:
538
+ case import_client_fetch5.FlowType.Login:
547
539
  if (opts.flow.refresh) {
548
540
  return {
549
541
  title: intl.formatMessage({
@@ -584,7 +576,7 @@ function useCardHeaderText(container, opts) {
584
576
  }
585
577
  ) : ""
586
578
  };
587
- case import_client_fetch4.FlowType.Registration:
579
+ case import_client_fetch5.FlowType.Registration:
588
580
  return {
589
581
  title: intl.formatMessage({
590
582
  id: "registration.title"
@@ -601,7 +593,7 @@ function useCardHeaderText(container, opts) {
601
593
  }
602
594
  ) : ""
603
595
  };
604
- case import_client_fetch4.FlowType.OAuth2Consent:
596
+ case import_client_fetch5.FlowType.OAuth2Consent:
605
597
  return {
606
598
  title: intl.formatMessage(
607
599
  {
@@ -628,7 +620,7 @@ function useCardHeaderText(container, opts) {
628
620
  }
629
621
 
630
622
  // src/theme/default/components/card/current-identifier-button.tsx
631
- var import_client_fetch5 = require("@ory/client-fetch");
623
+ var import_client_fetch6 = require("@ory/client-fetch");
632
624
  var import_elements_react2 = require("@ory/elements-react");
633
625
 
634
626
  // src/theme/default/assets/icons/arrow-left.svg
@@ -650,36 +642,90 @@ function omit(obj, keys) {
650
642
  }
651
643
 
652
644
  // src/theme/default/components/card/current-identifier-button.tsx
645
+ var import_react_hook_form = require("react-hook-form");
653
646
  var import_jsx_runtime7 = require("react/jsx-runtime");
654
647
  function DefaultCurrentIdentifierButton() {
655
648
  const { flow, flowType, config, formState } = (0, import_elements_react2.useOryFlow)();
649
+ const { setValue } = (0, import_react_hook_form.useFormContext)();
656
650
  const ui = flow.ui;
657
651
  if (formState.current === "provide_identifier") {
658
652
  return null;
659
653
  }
660
- if (flowType === import_client_fetch5.FlowType.Login && flow.requested_aal === "aal2") {
654
+ if (flowType === import_client_fetch6.FlowType.Login && flow.requested_aal === "aal2") {
661
655
  return null;
662
656
  }
663
- const nodeBackButton = getBackButtonNode(flowType, ui.nodes);
664
- if ((nodeBackButton == null ? void 0 : nodeBackButton.attributes.node_type) !== "input" || !nodeBackButton.attributes.value) {
657
+ const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
658
+ if (!nodeBackButton) {
665
659
  return null;
666
660
  }
667
661
  const initFlowUrl2 = restartFlowUrl(
668
662
  flow,
669
663
  `${config.sdk.url}/self-service/${flowType}/browser`
670
664
  );
671
- const attributes = omit(nodeBackButton.attributes, [
665
+ const attributes = omit(nodeBackButton, [
672
666
  "autocomplete",
673
667
  "node_type",
674
668
  "maxlength"
675
669
  ]);
670
+ const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
671
+ if (screenSelectionNode) {
672
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { action: flow.ui.action, method: flow.ui.method, children: [
673
+ flow.ui.nodes.filter((n) => {
674
+ if ((0, import_client_fetch6.isUiNodeInputAttributes)(n.attributes)) {
675
+ return n.attributes.type === "hidden";
676
+ }
677
+ return false;
678
+ }).map((n) => {
679
+ const attrs = n.attributes;
680
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
681
+ "input",
682
+ {
683
+ type: "hidden",
684
+ name: attrs.name,
685
+ value: attrs.value
686
+ },
687
+ attrs.name
688
+ );
689
+ }),
690
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
691
+ "button",
692
+ {
693
+ 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",
694
+ ...attributes,
695
+ type: "submit",
696
+ onClick: () => {
697
+ setValue(
698
+ screenSelectionNode.attributes.name,
699
+ screenSelectionNode.attributes.value
700
+ );
701
+ setValue("method", "profile");
702
+ },
703
+ name: screenSelectionNode.attributes.name,
704
+ value: screenSelectionNode.attributes.value,
705
+ title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
706
+ "data-testid": "ory/screen/login/action/restart",
707
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
708
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
709
+ arrow_left_default,
710
+ {
711
+ size: 16,
712
+ stroke: "1",
713
+ className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
714
+ }
715
+ ),
716
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("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 })
717
+ ] })
718
+ }
719
+ )
720
+ ] });
721
+ }
676
722
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
677
723
  "a",
678
724
  {
679
725
  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",
680
726
  ...attributes,
681
727
  href: initFlowUrl2,
682
- title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
728
+ title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
683
729
  "data-testid": "ory/screen/login/action/restart",
684
730
  children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
685
731
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
@@ -690,30 +736,34 @@ function DefaultCurrentIdentifierButton() {
690
736
  className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
691
737
  }
692
738
  ),
693
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("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.attributes.value })
739
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("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 })
694
740
  ] })
695
741
  }
696
742
  );
697
743
  }
698
- function getBackButtonNode(flowType, nodes) {
699
- let nodeBackButton;
744
+ function getBackButtonNodeAttributes(flowType, nodes) {
745
+ var _a, _b;
746
+ let nodeBackButtonAttributes;
700
747
  switch (flowType) {
701
- case import_client_fetch5.FlowType.Login:
702
- nodeBackButton = nodes.find(
703
- (node) => "name" in node.attributes && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
704
- );
748
+ case import_client_fetch6.FlowType.Login:
749
+ nodeBackButtonAttributes = (_a = nodes.find(
750
+ (node) => (0, import_client_fetch6.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
751
+ )) == null ? void 0 : _a.attributes;
705
752
  break;
706
- case import_client_fetch5.FlowType.Registration:
707
- nodeBackButton = guessRegistrationBackButton(nodes);
753
+ case import_client_fetch6.FlowType.Registration:
754
+ nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
708
755
  break;
709
- case import_client_fetch5.FlowType.Recovery:
710
- case import_client_fetch5.FlowType.Verification:
711
- nodeBackButton = nodes.find(
712
- (n) => "name" in n.attributes && n.attributes.name === "email"
713
- );
756
+ case import_client_fetch6.FlowType.Recovery:
757
+ case import_client_fetch6.FlowType.Verification:
758
+ nodeBackButtonAttributes = (_b = nodes.find(
759
+ (n) => (0, import_client_fetch6.isUiNodeInputAttributes)(n.attributes) && n.attributes.name === "email"
760
+ )) == null ? void 0 : _b.attributes;
714
761
  break;
715
762
  }
716
- return nodeBackButton;
763
+ if ((nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.node_type) !== "input" || !(nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.value)) {
764
+ return void 0;
765
+ }
766
+ return nodeBackButtonAttributes;
717
767
  }
718
768
  var backButtonCandiates = [
719
769
  "traits.email",
@@ -721,9 +771,10 @@ var backButtonCandiates = [
721
771
  "traits.phone_number"
722
772
  ];
723
773
  function guessRegistrationBackButton(uiNodes) {
724
- return uiNodes.find(
725
- (node) => "name" in node.attributes && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
726
- );
774
+ var _a;
775
+ return (_a = uiNodes.find(
776
+ (node) => (0, import_client_fetch6.isUiNodeInputAttributes)(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
777
+ )) == null ? void 0 : _a.attributes;
727
778
  }
728
779
 
729
780
  // src/theme/default/components/card/header.tsx
@@ -781,7 +832,7 @@ function cn(...inputs) {
781
832
  // src/theme/default/components/form/index.tsx
782
833
  var import_react_intl4 = require("react-intl");
783
834
  var import_elements_react6 = require("@ory/elements-react");
784
- var import_client_fetch7 = require("@ory/client-fetch");
835
+ var import_client_fetch8 = require("@ory/client-fetch");
785
836
 
786
837
  // src/theme/default/components/form/social.tsx
787
838
  var import_elements_react5 = require("@ory/elements-react");
@@ -1018,7 +1069,7 @@ function Spinner({ className }) {
1018
1069
  }
1019
1070
 
1020
1071
  // src/theme/default/components/form/social.tsx
1021
- var import_client_fetch6 = require("@ory/client-fetch");
1072
+ var import_client_fetch7 = require("@ory/client-fetch");
1022
1073
  var import_jsx_runtime27 = require("react/jsx-runtime");
1023
1074
  function extractProvider(context) {
1024
1075
  if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
@@ -1050,7 +1101,7 @@ function DefaultButtonSocial({
1050
1101
  formState: { isSubmitting }
1051
1102
  } = (0, import_react_hook_form2.useFormContext)();
1052
1103
  const oidcNodeCount = (_a = ui.nodes.filter(
1053
- (node2) => node2.group === import_client_fetch6.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch6.UiNodeGroupEnum.Saml
1104
+ (node2) => node2.group === import_client_fetch7.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch7.UiNodeGroupEnum.Saml
1054
1105
  ).length) != null ? _a : 0;
1055
1106
  const Logo = logos2[attributes.value.split("-")[0]];
1056
1107
  const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
@@ -1136,7 +1187,7 @@ function DefaultMessageContainer({ children }) {
1136
1187
  "section",
1137
1188
  {
1138
1189
  className: cn(
1139
- flowType === import_client_fetch7.FlowType.Settings ? "text-center" : "text-left"
1190
+ flowType === import_client_fetch8.FlowType.Settings ? "text-center" : "text-left"
1140
1191
  ),
1141
1192
  children
1142
1193
  }
@@ -1293,7 +1344,7 @@ function DefaultAuthMethodListItem({
1293
1344
  }
1294
1345
 
1295
1346
  // src/theme/default/components/form/button.tsx
1296
- var import_client_fetch8 = require("@ory/client-fetch");
1347
+ var import_client_fetch9 = require("@ory/client-fetch");
1297
1348
  var import_elements_react7 = require("@ory/elements-react");
1298
1349
  var import_class_variance_authority = require("class-variance-authority");
1299
1350
  var import_react_hook_form3 = require("react-hook-form");
@@ -1352,7 +1403,7 @@ var DefaultButton = ({
1352
1403
  } = attributes;
1353
1404
  const [clicked, setClicked] = (0, import_react4.useState)(false);
1354
1405
  const intl = (0, import_react_intl6.useIntl)();
1355
- const label = (0, import_client_fetch8.getNodeLabel)(node);
1406
+ const label = (0, import_client_fetch9.getNodeLabel)(node);
1356
1407
  const {
1357
1408
  formState: { isSubmitting },
1358
1409
  setValue
@@ -1392,7 +1443,7 @@ var DefaultButton = ({
1392
1443
  DefaultButton.displayName = "DefaultButton";
1393
1444
 
1394
1445
  // src/theme/default/components/form/checkbox.tsx
1395
- var import_client_fetch9 = require("@ory/client-fetch");
1446
+ var import_client_fetch10 = require("@ory/client-fetch");
1396
1447
  var import_elements_react8 = require("@ory/elements-react");
1397
1448
  var import_react_hook_form4 = require("react-hook-form");
1398
1449
  var import_react_intl8 = require("react-intl");
@@ -1539,7 +1590,7 @@ var DefaultCheckbox = ({
1539
1590
  ...attributes
1540
1591
  } = initialAttributes;
1541
1592
  const intl = (0, import_react_intl8.useIntl)();
1542
- const label = (0, import_client_fetch9.getNodeLabel)(node);
1593
+ const label = (0, import_client_fetch10.getNodeLabel)(node);
1543
1594
  const { register } = (0, import_react_hook_form4.useFormContext)();
1544
1595
  const hasError = node.messages.some((m) => m.type === "error");
1545
1596
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
@@ -1579,16 +1630,33 @@ var DefaultCheckbox = ({
1579
1630
 
1580
1631
  // src/theme/default/components/form/group-container.tsx
1581
1632
  var import_elements_react9 = require("@ory/elements-react");
1582
- var import_client_fetch10 = require("@ory/client-fetch");
1633
+ var import_client_fetch11 = require("@ory/client-fetch");
1634
+
1635
+ // src/util/childCounter.ts
1636
+ var import_react5 = require("react");
1637
+ function countRenderableChildren(children) {
1638
+ return import_react5.Children.toArray(children).filter((c) => {
1639
+ if ((0, import_react5.isValidElement)(c)) {
1640
+ return true;
1641
+ }
1642
+ return false;
1643
+ }).length;
1644
+ }
1645
+
1646
+ // src/theme/default/components/form/group-container.tsx
1583
1647
  var import_jsx_runtime40 = require("react/jsx-runtime");
1584
1648
  function DefaultGroupContainer({ children }) {
1585
1649
  const { flowType } = (0, import_elements_react9.useOryFlow)();
1650
+ const count = countRenderableChildren(children);
1651
+ if (count === 0) {
1652
+ return null;
1653
+ }
1586
1654
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
1587
1655
  "div",
1588
1656
  {
1589
1657
  className: cn(
1590
1658
  "grid",
1591
- flowType === import_client_fetch10.FlowType.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
1659
+ flowType === import_client_fetch11.FlowType.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
1592
1660
  ),
1593
1661
  children
1594
1662
  }
@@ -1609,9 +1677,9 @@ function DefaultImage({ attributes, node }) {
1609
1677
  }
1610
1678
 
1611
1679
  // src/theme/default/components/form/input.tsx
1612
- var import_client_fetch11 = require("@ory/client-fetch");
1680
+ var import_client_fetch12 = require("@ory/client-fetch");
1613
1681
  var import_elements_react10 = require("@ory/elements-react");
1614
- var import_react5 = require("react");
1682
+ var import_react6 = require("react");
1615
1683
  var import_react_hook_form5 = require("react-hook-form");
1616
1684
  var import_react_intl9 = require("react-intl");
1617
1685
 
@@ -1643,7 +1711,7 @@ var DefaultInput = ({
1643
1711
  attributes,
1644
1712
  onClick
1645
1713
  }) => {
1646
- const label = (0, import_client_fetch11.getNodeLabel)(node);
1714
+ const label = (0, import_client_fetch12.getNodeLabel)(node);
1647
1715
  const { register } = (0, import_react_hook_form5.useFormContext)();
1648
1716
  const {
1649
1717
  value,
@@ -1655,7 +1723,7 @@ var DefaultInput = ({
1655
1723
  } = attributes;
1656
1724
  const intl = (0, import_react_intl9.useIntl)();
1657
1725
  const { flowType } = (0, import_elements_react10.useOryFlow)();
1658
- const inputRef = (0, import_react5.useRef)(null);
1726
+ const inputRef = (0, import_react6.useRef)(null);
1659
1727
  const formattedLabel = label ? intl.formatMessage(
1660
1728
  {
1661
1729
  id: "input.placeholder",
@@ -1686,7 +1754,7 @@ var DefaultInput = ({
1686
1754
  className: cn(
1687
1755
  "relative flex justify-stretch",
1688
1756
  // The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
1689
- flowType === import_client_fetch11.FlowType.Settings && "max-w-[488px]"
1757
+ flowType === import_client_fetch12.FlowType.Settings && "max-w-[488px]"
1690
1758
  ),
1691
1759
  children: [
1692
1760
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
@@ -1721,7 +1789,7 @@ var DefaultInput = ({
1721
1789
  function PasswordToggle({
1722
1790
  inputRef
1723
1791
  }) {
1724
- const [shown, setShown] = (0, import_react5.useState)(false);
1792
+ const [shown, setShown] = (0, import_react6.useState)(false);
1725
1793
  const handleClick = () => {
1726
1794
  setShown(!shown);
1727
1795
  if (inputRef.current) {
@@ -1741,7 +1809,7 @@ function PasswordToggle({
1741
1809
  }
1742
1810
 
1743
1811
  // src/theme/default/components/form/label.tsx
1744
- var import_client_fetch12 = require("@ory/client-fetch");
1812
+ var import_client_fetch13 = require("@ory/client-fetch");
1745
1813
  var import_elements_react11 = require("@ory/elements-react");
1746
1814
  var import_react_hook_form6 = require("react-hook-form");
1747
1815
  var import_react_intl10 = require("react-intl");
@@ -1758,7 +1826,7 @@ function DefaultLabel({
1758
1826
  ...rest
1759
1827
  }) {
1760
1828
  const intl = (0, import_react_intl10.useIntl)();
1761
- const label = (0, import_client_fetch12.getNodeLabel)(node);
1829
+ const label = (0, import_client_fetch13.getNodeLabel)(node);
1762
1830
  const { Message } = (0, import_elements_react11.useComponents)();
1763
1831
  const { config, flowType, flow } = (0, import_elements_react11.useOryFlow)();
1764
1832
  const { setValue, formState } = (0, import_react_hook_form6.useFormContext)();
@@ -1783,7 +1851,7 @@ function DefaultLabel({
1783
1851
  children: (0, import_elements_react11.uiTextToFormattedMessage)(label, intl)
1784
1852
  }
1785
1853
  ),
1786
- isPassword && config.project.recovery_enabled && flowType === import_client_fetch12.FlowType.Login && // TODO: make it possible to override with a custom component
1854
+ isPassword && config.project.recovery_enabled && flowType === import_client_fetch13.FlowType.Login && // TODO: make it possible to override with a custom component
1787
1855
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1788
1856
  "a",
1789
1857
  {
@@ -1809,19 +1877,19 @@ function DefaultLabel({
1809
1877
  ] }),
1810
1878
  children,
1811
1879
  node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message.Content, { message }, message.id)),
1812
- fieldError && (0, import_client_fetch12.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message.Content, { message: fieldError })
1880
+ fieldError && (0, import_client_fetch13.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message.Content, { message: fieldError })
1813
1881
  ] });
1814
1882
  }
1815
1883
 
1816
1884
  // src/theme/default/components/form/link-button.tsx
1817
- var import_client_fetch13 = require("@ory/client-fetch");
1885
+ var import_client_fetch14 = require("@ory/client-fetch");
1818
1886
  var import_elements_react12 = require("@ory/elements-react");
1819
- var import_react6 = require("react");
1887
+ var import_react7 = require("react");
1820
1888
  var import_react_intl11 = require("react-intl");
1821
1889
  var import_jsx_runtime47 = require("react/jsx-runtime");
1822
- var DefaultLinkButton = (0, import_react6.forwardRef)(({ attributes, node }, ref) => {
1890
+ var DefaultLinkButton = (0, import_react7.forwardRef)(({ attributes, node }, ref) => {
1823
1891
  const intl = (0, import_react_intl11.useIntl)();
1824
- const label = (0, import_client_fetch13.getNodeLabel)(node);
1892
+ const label = (0, import_client_fetch14.getNodeLabel)(node);
1825
1893
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
1826
1894
  "a",
1827
1895
  {
@@ -1885,7 +1953,7 @@ InputOTPSlot.displayName = "InputOTPSlot";
1885
1953
 
1886
1954
  // src/theme/default/components/form/pin-code-input.tsx
1887
1955
  var import_elements_react13 = require("@ory/elements-react");
1888
- var import_client_fetch14 = require("@ory/client-fetch");
1956
+ var import_client_fetch15 = require("@ory/client-fetch");
1889
1957
  var import_jsx_runtime49 = require("react/jsx-runtime");
1890
1958
  var DefaultPinCodeInput = ({ attributes }) => {
1891
1959
  const { setValue, watch } = (0, import_react_hook_form7.useFormContext)();
@@ -1909,7 +1977,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
1909
1977
  className: cn(
1910
1978
  "w-full flex gap-2 justify-stretch",
1911
1979
  // The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
1912
- flowType === import_client_fetch14.FlowType.Settings && "max-w-[488px]"
1980
+ flowType === import_client_fetch15.FlowType.Settings && "max-w-[488px]"
1913
1981
  ),
1914
1982
  children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(InputOTPSlot, { index }, index))
1915
1983
  }
@@ -2028,12 +2096,12 @@ var SvgSettings = (props) => {
2028
2096
  var settings_default = SvgSettings;
2029
2097
 
2030
2098
  // src/theme/default/utils/logout.ts
2031
- var import_react7 = require("react");
2099
+ var import_react8 = require("react");
2032
2100
 
2033
2101
  // src/util/client.ts
2034
- var import_client_fetch15 = require("@ory/client-fetch");
2102
+ var import_client_fetch16 = require("@ory/client-fetch");
2035
2103
  function frontendClient(sdkUrl, opts = {}) {
2036
- const config = new import_client_fetch15.Configuration({
2104
+ const config = new import_client_fetch16.Configuration({
2037
2105
  ...opts,
2038
2106
  basePath: sdkUrl,
2039
2107
  headers: {
@@ -2041,17 +2109,17 @@ function frontendClient(sdkUrl, opts = {}) {
2041
2109
  ...opts.headers
2042
2110
  }
2043
2111
  });
2044
- return new import_client_fetch15.FrontendApi(config);
2112
+ return new import_client_fetch16.FrontendApi(config);
2045
2113
  }
2046
2114
 
2047
2115
  // src/theme/default/utils/logout.ts
2048
2116
  function useClientLogout(config) {
2049
- const [logoutFlow, setLogoutFlow] = (0, import_react7.useState)();
2050
- const fetchLogoutFlow = (0, import_react7.useCallback)(async () => {
2117
+ const [logoutFlow, setLogoutFlow] = (0, import_react8.useState)();
2118
+ const fetchLogoutFlow = (0, import_react8.useCallback)(async () => {
2051
2119
  const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
2052
2120
  setLogoutFlow(flow);
2053
2121
  }, [config.sdk.url]);
2054
- (0, import_react7.useEffect)(() => {
2122
+ (0, import_react8.useEffect)(() => {
2055
2123
  void fetchLogoutFlow();
2056
2124
  }, [fetchLogoutFlow]);
2057
2125
  return logoutFlow;
@@ -2097,12 +2165,12 @@ var getUserInitials = (session) => {
2097
2165
  };
2098
2166
 
2099
2167
  // src/theme/default/components/ui/dropdown-menu.tsx
2100
- var import_react8 = require("react");
2168
+ var import_react9 = require("react");
2101
2169
  var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
2102
2170
  var import_jsx_runtime54 = require("react/jsx-runtime");
2103
2171
  var DropdownMenu = DropdownMenuPrimitive.Root;
2104
2172
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
2105
- var DropdownMenuContent = (0, import_react8.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2173
+ var DropdownMenuContent = (0, import_react9.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2106
2174
  DropdownMenuPrimitive.Content,
2107
2175
  {
2108
2176
  ref,
@@ -2117,7 +2185,7 @@ var DropdownMenuContent = (0, import_react8.forwardRef)(({ className, sideOffset
2117
2185
  }
2118
2186
  ) }));
2119
2187
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
2120
- var DropdownMenuItem = (0, import_react8.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2188
+ var DropdownMenuItem = (0, import_react9.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2121
2189
  DropdownMenuPrimitive.Item,
2122
2190
  {
2123
2191
  ref,
@@ -2135,7 +2203,7 @@ var DropdownMenuItem = (0, import_react8.forwardRef)(({ className, inset, ...pro
2135
2203
  }
2136
2204
  ));
2137
2205
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
2138
- var DropdownMenuLabel = (0, import_react8.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2206
+ var DropdownMenuLabel = (0, import_react9.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2139
2207
  DropdownMenuPrimitive.Label,
2140
2208
  {
2141
2209
  ref,
@@ -2150,7 +2218,7 @@ var DropdownMenuLabel = (0, import_react8.forwardRef)(({ className, inset, ...pr
2150
2218
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
2151
2219
 
2152
2220
  // src/theme/default/components/ui/user-avater.tsx
2153
- var import_react9 = require("react");
2221
+ var import_react10 = require("react");
2154
2222
 
2155
2223
  // src/theme/default/assets/icons/user.svg
2156
2224
  var React29 = __toESM(require("react"));
@@ -2163,7 +2231,7 @@ var user_default = SvgUser;
2163
2231
 
2164
2232
  // src/theme/default/components/ui/user-avater.tsx
2165
2233
  var import_jsx_runtime56 = require("react/jsx-runtime");
2166
- var UserAvatar = (0, import_react9.forwardRef)(
2234
+ var UserAvatar = (0, import_react10.forwardRef)(
2167
2235
  ({ initials, ...rest }, ref) => {
2168
2236
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2169
2237
  "button",
@@ -2232,7 +2300,7 @@ var DefaultPageHeader = (_props) => {
2232
2300
  };
2233
2301
 
2234
2302
  // src/theme/default/components/settings/settings-oidc.tsx
2235
- var import_react10 = require("react");
2303
+ var import_react11 = require("react");
2236
2304
  var import_react_hook_form8 = require("react-hook-form");
2237
2305
  var import_usehooks_ts2 = require("usehooks-ts");
2238
2306
 
@@ -2289,7 +2357,7 @@ function UnlinkRow({ button }) {
2289
2357
  button.onClick();
2290
2358
  setClicked(true);
2291
2359
  };
2292
- (0, import_react10.useEffect)(() => {
2360
+ (0, import_react11.useEffect)(() => {
2293
2361
  if (!isSubmitting) {
2294
2362
  setClicked(false);
2295
2363
  }
@@ -2737,23 +2805,23 @@ function DefaultAuthMethodListContainer({
2737
2805
  }
2738
2806
 
2739
2807
  // src/theme/default/components/form/captcha.tsx
2740
- var import_client_fetch16 = require("@ory/client-fetch");
2808
+ var import_client_fetch17 = require("@ory/client-fetch");
2741
2809
  var import_react_turnstile = require("@marsidev/react-turnstile");
2742
- var import_react11 = require("react");
2810
+ var import_react12 = require("react");
2743
2811
  var import_react_hook_form13 = require("react-hook-form");
2744
2812
  var import_jsx_runtime70 = require("react/jsx-runtime");
2745
2813
  var DefaultCaptcha = ({ node }) => {
2746
2814
  const { setValue } = (0, import_react_hook_form13.useFormContext)();
2747
- const ref = (0, import_react11.useRef)();
2815
+ const ref = (0, import_react12.useRef)();
2748
2816
  const nodes = [];
2749
- if ((0, import_client_fetch16.isUiNodeInputAttributes)(node.attributes)) {
2817
+ if ((0, import_client_fetch17.isUiNodeInputAttributes)(node.attributes)) {
2750
2818
  if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
2751
2819
  nodes.push(
2752
2820
  /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DefaultInput, { node, attributes: node.attributes }, 1)
2753
2821
  );
2754
2822
  }
2755
2823
  }
2756
- if ((0, import_client_fetch16.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2824
+ if ((0, import_client_fetch17.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2757
2825
  const options = JSON.parse(node.attributes.value);
2758
2826
  nodes.push(
2759
2827
  /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
@@ -2908,25 +2976,25 @@ function getOryComponents(overrides) {
2908
2976
  }
2909
2977
 
2910
2978
  // src/theme/default/flows/error.tsx
2911
- var import_client_fetch35 = require("@ory/client-fetch");
2912
- var import_react15 = require("react");
2979
+ var import_client_fetch36 = require("@ory/client-fetch");
2980
+ var import_react16 = require("react");
2913
2981
 
2914
2982
  // src/context/intl-context.tsx
2915
2983
  var import_react_intl21 = require("react-intl");
2916
2984
 
2917
2985
  // src/context/flow-context.tsx
2918
- var import_react13 = require("react");
2986
+ var import_react14 = require("react");
2919
2987
 
2920
2988
  // src/context/form-state.ts
2921
- var import_client_fetch18 = require("@ory/client-fetch");
2922
- var import_react12 = require("react");
2989
+ var import_client_fetch19 = require("@ory/client-fetch");
2990
+ var import_react13 = require("react");
2923
2991
 
2924
2992
  // src/components/card/card-two-step.utils.ts
2925
- var import_client_fetch17 = require("@ory/client-fetch");
2993
+ var import_client_fetch18 = require("@ory/client-fetch");
2926
2994
 
2927
2995
  // src/context/flow-context.tsx
2928
2996
  var import_jsx_runtime75 = require("react/jsx-runtime");
2929
- var OryFlowContext = (0, import_react13.createContext)(null);
2997
+ var OryFlowContext = (0, import_react14.createContext)(null);
2930
2998
 
2931
2999
  // src/context/provider.tsx
2932
3000
  var import_jsx_runtime76 = require("react/jsx-runtime");
@@ -2935,14 +3003,14 @@ var import_jsx_runtime76 = require("react/jsx-runtime");
2935
3003
  var import_jsx_runtime77 = require("react/jsx-runtime");
2936
3004
 
2937
3005
  // src/components/form/form-provider.tsx
2938
- var import_client_fetch21 = require("@ory/client-fetch");
3006
+ var import_client_fetch22 = require("@ory/client-fetch");
2939
3007
  var import_react_hook_form14 = require("react-hook-form");
2940
3008
 
2941
3009
  // src/components/form/form-helpers.ts
2942
- var import_client_fetch19 = require("@ory/client-fetch");
3010
+ var import_client_fetch20 = require("@ory/client-fetch");
2943
3011
 
2944
3012
  // src/components/form/form-resolver.ts
2945
- var import_client_fetch20 = require("@ory/client-fetch");
3013
+ var import_client_fetch21 = require("@ory/client-fetch");
2946
3014
 
2947
3015
  // src/components/form/form-provider.tsx
2948
3016
  var import_jsx_runtime78 = require("react/jsx-runtime");
@@ -2957,32 +3025,32 @@ var import_jsx_runtime80 = require("react/jsx-runtime");
2957
3025
  var import_jsx_runtime81 = require("react/jsx-runtime");
2958
3026
 
2959
3027
  // src/components/card/card-two-step.tsx
2960
- var import_client_fetch32 = require("@ory/client-fetch");
3028
+ var import_client_fetch33 = require("@ory/client-fetch");
2961
3029
  var import_react_hook_form19 = require("react-hook-form");
2962
3030
 
2963
3031
  // src/components/form/form.tsx
2964
- var import_client_fetch28 = require("@ory/client-fetch");
3032
+ var import_client_fetch29 = require("@ory/client-fetch");
2965
3033
  var import_react_hook_form16 = require("react-hook-form");
2966
3034
  var import_react_intl14 = require("react-intl");
2967
3035
 
2968
3036
  // src/components/form/useOryFormSubmit.ts
2969
- var import_client_fetch27 = require("@ory/client-fetch");
3037
+ var import_client_fetch28 = require("@ory/client-fetch");
2970
3038
  var import_react_hook_form15 = require("react-hook-form");
2971
3039
 
2972
3040
  // src/util/onSubmitLogin.ts
2973
- var import_client_fetch22 = require("@ory/client-fetch");
3041
+ var import_client_fetch23 = require("@ory/client-fetch");
2974
3042
 
2975
3043
  // src/util/onSubmitRecovery.ts
2976
- var import_client_fetch23 = require("@ory/client-fetch");
3044
+ var import_client_fetch24 = require("@ory/client-fetch");
2977
3045
 
2978
3046
  // src/util/onSubmitRegistration.ts
2979
- var import_client_fetch24 = require("@ory/client-fetch");
3047
+ var import_client_fetch25 = require("@ory/client-fetch");
2980
3048
 
2981
3049
  // src/util/onSubmitSettings.ts
2982
- var import_client_fetch25 = require("@ory/client-fetch");
3050
+ var import_client_fetch26 = require("@ory/client-fetch");
2983
3051
 
2984
3052
  // src/util/onSubmitVerification.ts
2985
- var import_client_fetch26 = require("@ory/client-fetch");
3053
+ var import_client_fetch27 = require("@ory/client-fetch");
2986
3054
 
2987
3055
  // src/components/form/form.tsx
2988
3056
  var import_jsx_runtime82 = require("react/jsx-runtime");
@@ -2991,17 +3059,17 @@ var import_jsx_runtime82 = require("react/jsx-runtime");
2991
3059
  var import_jsx_runtime83 = require("react/jsx-runtime");
2992
3060
 
2993
3061
  // src/components/form/nodes/input.tsx
2994
- var import_client_fetch29 = require("@ory/client-fetch");
2995
- var import_react14 = require("react");
3062
+ var import_client_fetch30 = require("@ory/client-fetch");
3063
+ var import_react15 = require("react");
2996
3064
  var import_react_hook_form17 = require("react-hook-form");
2997
3065
  var import_jsx_runtime84 = require("react/jsx-runtime");
2998
3066
 
2999
3067
  // src/components/form/nodes/node.tsx
3000
- var import_client_fetch30 = require("@ory/client-fetch");
3068
+ var import_client_fetch31 = require("@ory/client-fetch");
3001
3069
  var import_jsx_runtime85 = require("react/jsx-runtime");
3002
3070
 
3003
3071
  // src/components/form/social.tsx
3004
- var import_client_fetch31 = require("@ory/client-fetch");
3072
+ var import_client_fetch32 = require("@ory/client-fetch");
3005
3073
  var import_react_hook_form18 = require("react-hook-form");
3006
3074
  var import_jsx_runtime86 = require("react/jsx-runtime");
3007
3075
 
@@ -3019,14 +3087,14 @@ var import_jsx_runtime89 = require("react/jsx-runtime");
3019
3087
  var import_jsx_runtime90 = require("react/jsx-runtime");
3020
3088
 
3021
3089
  // src/components/generic/divider.tsx
3022
- var import_client_fetch33 = require("@ory/client-fetch");
3090
+ var import_client_fetch34 = require("@ory/client-fetch");
3023
3091
  var import_jsx_runtime91 = require("react/jsx-runtime");
3024
3092
 
3025
3093
  // src/components/generic/page-header.tsx
3026
3094
  var import_jsx_runtime92 = require("react/jsx-runtime");
3027
3095
 
3028
3096
  // src/components/settings/settings-card.tsx
3029
- var import_client_fetch34 = require("@ory/client-fetch");
3097
+ var import_client_fetch35 = require("@ory/client-fetch");
3030
3098
  var import_react_intl20 = require("react-intl");
3031
3099
 
3032
3100
  // src/components/settings/oidc-settings.tsx
@@ -3510,7 +3578,7 @@ var de_default = {
3510
3578
  "two-step.code.description": "Ein Best\xE4tigungscode wird an Ihre E-Mail gesendet.",
3511
3579
  "two-step.code.title": "E-Mail-Code",
3512
3580
  "two-step.passkey.description": "Verwenden Sie die Fingerabdruck- oder Gesichtserkennung Ihres Ger\xE4ts",
3513
- "two-step.passkey.title": "Passwort (empfohlen)",
3581
+ "two-step.passkey.title": "Passkey (empfohlen)",
3514
3582
  "two-step.password.description": "Geben Sie Ihr Passwort ein, das mit Ihrem Konto verkn\xFCpft ist",
3515
3583
  "two-step.password.title": "Passwort",
3516
3584
  "two-step.webauthn.title": "Sicherheitsschl\xFCssel",
@@ -5389,7 +5457,7 @@ var errorDescriptions = {
5389
5457
  5: "The server encountered an error and could not complete your request"
5390
5458
  };
5391
5459
  function useStandardize(error) {
5392
- return (0, import_react15.useMemo)(() => {
5460
+ return (0, import_react16.useMemo)(() => {
5393
5461
  var _a;
5394
5462
  if (isOAuth2Error(error)) {
5395
5463
  return {
@@ -5399,14 +5467,14 @@ function useStandardize(error) {
5399
5467
  timestamp: /* @__PURE__ */ new Date()
5400
5468
  };
5401
5469
  }
5402
- if ((0, import_client_fetch35.instanceOfFlowError)(error)) {
5470
+ if ((0, import_client_fetch36.instanceOfFlowError)(error)) {
5403
5471
  const parsed = error.error;
5404
5472
  return {
5405
5473
  ...parsed,
5406
5474
  id: error.id,
5407
5475
  timestamp: error.created_at
5408
5476
  };
5409
- } else if (error.error && (0, import_client_fetch35.instanceOfGenericError)(error.error)) {
5477
+ } else if (error.error && (0, import_client_fetch36.instanceOfGenericError)(error.error)) {
5410
5478
  return {
5411
5479
  code: (_a = error.error.code) != null ? _a : 500,
5412
5480
  message: error.error.message,
@@ -5527,7 +5595,7 @@ function ErrorLogo({ config }) {
5527
5595
  }
5528
5596
 
5529
5597
  // src/theme/default/flows/login.tsx
5530
- var import_client_fetch36 = require("@ory/client-fetch");
5598
+ var import_client_fetch37 = require("@ory/client-fetch");
5531
5599
  var import_elements_react20 = require("@ory/elements-react");
5532
5600
  var import_jsx_runtime101 = require("react/jsx-runtime");
5533
5601
  function Login({
@@ -5542,7 +5610,7 @@ function Login({
5542
5610
  {
5543
5611
  config,
5544
5612
  flow,
5545
- flowType: import_client_fetch36.FlowType.Login,
5613
+ flowType: import_client_fetch37.FlowType.Login,
5546
5614
  components,
5547
5615
  children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_elements_react20.OryTwoStepCard, {})
5548
5616
  }
@@ -5550,7 +5618,7 @@ function Login({
5550
5618
  }
5551
5619
 
5552
5620
  // src/theme/default/flows/recovery.tsx
5553
- var import_client_fetch37 = require("@ory/client-fetch");
5621
+ var import_client_fetch38 = require("@ory/client-fetch");
5554
5622
  var import_elements_react21 = require("@ory/elements-react");
5555
5623
  var import_jsx_runtime102 = require("react/jsx-runtime");
5556
5624
  function Recovery({
@@ -5565,7 +5633,7 @@ function Recovery({
5565
5633
  {
5566
5634
  config,
5567
5635
  flow,
5568
- flowType: import_client_fetch37.FlowType.Recovery,
5636
+ flowType: import_client_fetch38.FlowType.Recovery,
5569
5637
  components,
5570
5638
  children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_elements_react21.OryTwoStepCard, {})
5571
5639
  }
@@ -5573,7 +5641,7 @@ function Recovery({
5573
5641
  }
5574
5642
 
5575
5643
  // src/theme/default/flows/registration.tsx
5576
- var import_client_fetch38 = require("@ory/client-fetch");
5644
+ var import_client_fetch39 = require("@ory/client-fetch");
5577
5645
  var import_elements_react22 = require("@ory/elements-react");
5578
5646
  var import_jsx_runtime103 = require("react/jsx-runtime");
5579
5647
  function Registration({
@@ -5588,7 +5656,7 @@ function Registration({
5588
5656
  {
5589
5657
  config,
5590
5658
  flow,
5591
- flowType: import_client_fetch38.FlowType.Registration,
5659
+ flowType: import_client_fetch39.FlowType.Registration,
5592
5660
  components,
5593
5661
  children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_elements_react22.OryTwoStepCard, {})
5594
5662
  }
@@ -5596,7 +5664,7 @@ function Registration({
5596
5664
  }
5597
5665
 
5598
5666
  // src/theme/default/flows/settings.tsx
5599
- var import_client_fetch39 = require("@ory/client-fetch");
5667
+ var import_client_fetch40 = require("@ory/client-fetch");
5600
5668
  var import_elements_react23 = require("@ory/elements-react");
5601
5669
  var import_jsx_runtime104 = require("react/jsx-runtime");
5602
5670
  function Settings({
@@ -5611,7 +5679,7 @@ function Settings({
5611
5679
  {
5612
5680
  config,
5613
5681
  flow,
5614
- flowType: import_client_fetch39.FlowType.Settings,
5682
+ flowType: import_client_fetch40.FlowType.Settings,
5615
5683
  components,
5616
5684
  children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
5617
5685
  /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_elements_react23.HeadlessPageHeader, {}),
@@ -5622,7 +5690,7 @@ function Settings({
5622
5690
  }
5623
5691
 
5624
5692
  // src/theme/default/flows/verification.tsx
5625
- var import_client_fetch40 = require("@ory/client-fetch");
5693
+ var import_client_fetch41 = require("@ory/client-fetch");
5626
5694
  var import_elements_react24 = require("@ory/elements-react");
5627
5695
  var import_jsx_runtime105 = require("react/jsx-runtime");
5628
5696
  function Verification({
@@ -5637,7 +5705,7 @@ function Verification({
5637
5705
  {
5638
5706
  config,
5639
5707
  flow,
5640
- flowType: import_client_fetch40.FlowType.Verification,
5708
+ flowType: import_client_fetch41.FlowType.Verification,
5641
5709
  components,
5642
5710
  children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_elements_react24.OryTwoStepCard, {})
5643
5711
  }
@@ -5645,11 +5713,11 @@ function Verification({
5645
5713
  }
5646
5714
 
5647
5715
  // src/theme/default/flows/consent.tsx
5648
- var import_client_fetch42 = require("@ory/client-fetch");
5716
+ var import_client_fetch43 = require("@ory/client-fetch");
5649
5717
  var import_elements_react25 = require("@ory/elements-react");
5650
5718
 
5651
5719
  // src/theme/default/utils/oauth2.ts
5652
- var import_client_fetch41 = require("@ory/client-fetch");
5720
+ var import_client_fetch42 = require("@ory/client-fetch");
5653
5721
  var rememberCheckbox = {
5654
5722
  type: "input",
5655
5723
  group: "oauth2_consent",
@@ -5657,7 +5725,7 @@ var rememberCheckbox = {
5657
5725
  label: {
5658
5726
  id: 9999111,
5659
5727
  text: "Remember my decision",
5660
- type: import_client_fetch41.UiTextTypeEnum.Info
5728
+ type: import_client_fetch42.UiTextTypeEnum.Info
5661
5729
  }
5662
5730
  },
5663
5731
  attributes: {
@@ -5676,7 +5744,7 @@ var acceptButton = {
5676
5744
  label: {
5677
5745
  id: 9999111,
5678
5746
  text: "Accept",
5679
- type: import_client_fetch41.UiTextTypeEnum.Info
5747
+ type: import_client_fetch42.UiTextTypeEnum.Info
5680
5748
  }
5681
5749
  },
5682
5750
  attributes: {
@@ -5695,7 +5763,7 @@ var rejectButton = {
5695
5763
  label: {
5696
5764
  id: 9999111,
5697
5765
  text: "Reject",
5698
- type: import_client_fetch41.UiTextTypeEnum.Info
5766
+ type: import_client_fetch42.UiTextTypeEnum.Info
5699
5767
  }
5700
5768
  },
5701
5769
  attributes: {
@@ -5742,7 +5810,7 @@ function scopesToUiNodes(scopes) {
5742
5810
  label: {
5743
5811
  id: 9999111,
5744
5812
  text: scope,
5745
- type: import_client_fetch41.UiTextTypeEnum.Info
5813
+ type: import_client_fetch42.UiTextTypeEnum.Info
5746
5814
  }
5747
5815
  },
5748
5816
  attributes: {
@@ -5809,7 +5877,7 @@ function Consent({
5809
5877
  {
5810
5878
  config,
5811
5879
  flow,
5812
- flowType: import_client_fetch42.FlowType.OAuth2Consent,
5880
+ flowType: import_client_fetch43.FlowType.OAuth2Consent,
5813
5881
  components,
5814
5882
  children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_elements_react25.OryConsentCard, {})
5815
5883
  }