@clerk/ui 1.24.2-snapshot.v20260702192602 → 1.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/{9074_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → 9074_ui_3d4a5c_1.24.2.js} +1 -1
  2. package/dist/{9074_ui_ac5565_1.24.2-snapshot.v20260702192602.js → 9074_ui_56d83c_1.24.2.js} +1 -1
  3. package/dist/{9074_ui_f3e343_1.24.2-snapshot.v20260702192602.js → 9074_ui_efcebc_1.24.2.js} +1 -1
  4. package/dist/ClerkUI.js +2 -2
  5. package/dist/checkout_ui_3d4a5c_1.24.2.js +1 -0
  6. package/dist/checkout_ui_56d83c_1.24.2.js +9 -0
  7. package/dist/checkout_ui_efcebc_1.24.2.js +9 -0
  8. package/dist/components/Checkout/CheckoutForm.js +4 -3
  9. package/dist/components/Checkout/CheckoutForm.js.map +1 -1
  10. package/dist/components/ConfigureSSO/hooks/useEnterpriseConnectionTestRuns.js +9 -1
  11. package/dist/components/ConfigureSSO/hooks/useEnterpriseConnectionTestRuns.js.map +1 -1
  12. package/dist/components/ConfigureSSO/hooks/useOrganizationEnterpriseConnection.js +5 -4
  13. package/dist/components/ConfigureSSO/hooks/useOrganizationEnterpriseConnection.js.map +1 -1
  14. package/dist/components/ConfigureSSO/steps/TestConfigurationStep.js +30 -8
  15. package/dist/components/ConfigureSSO/steps/TestConfigurationStep.js.map +1 -1
  16. package/dist/components/PaymentAttempts/PaymentAttemptPage.js +4 -3
  17. package/dist/components/PaymentAttempts/PaymentAttemptPage.js.map +1 -1
  18. package/dist/elements/SocialButtons.js +7 -5
  19. package/dist/elements/SocialButtons.js.map +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/no-rhc/ClerkUI.js +2 -2
  22. package/dist/no-rhc/components/Checkout/CheckoutForm.js +4 -3
  23. package/dist/no-rhc/components/Checkout/CheckoutForm.js.map +1 -1
  24. package/dist/no-rhc/components/ConfigureSSO/hooks/useEnterpriseConnectionTestRuns.js +9 -1
  25. package/dist/no-rhc/components/ConfigureSSO/hooks/useEnterpriseConnectionTestRuns.js.map +1 -1
  26. package/dist/no-rhc/components/ConfigureSSO/hooks/useOrganizationEnterpriseConnection.js +5 -4
  27. package/dist/no-rhc/components/ConfigureSSO/hooks/useOrganizationEnterpriseConnection.js.map +1 -1
  28. package/dist/no-rhc/components/ConfigureSSO/steps/TestConfigurationStep.js +30 -8
  29. package/dist/no-rhc/components/ConfigureSSO/steps/TestConfigurationStep.js.map +1 -1
  30. package/dist/no-rhc/components/PaymentAttempts/PaymentAttemptPage.js +4 -3
  31. package/dist/no-rhc/components/PaymentAttempts/PaymentAttemptPage.js.map +1 -1
  32. package/dist/no-rhc/elements/SocialButtons.js +7 -5
  33. package/dist/no-rhc/elements/SocialButtons.js.map +1 -1
  34. package/dist/no-rhc/index.js +1 -1
  35. package/dist/no-rhc/primitives/Input.js +24 -5
  36. package/dist/no-rhc/primitives/Input.js.map +1 -1
  37. package/dist/no-rhc/utils/billing.js +16 -0
  38. package/dist/no-rhc/utils/billing.js.map +1 -0
  39. package/dist/no-rhc/utils/truncateTextWithEndVisible.js +2 -2
  40. package/dist/no-rhc/utils/truncateTextWithEndVisible.js.map +1 -1
  41. package/dist/payment-attempt-page_ui_3d4a5c_1.24.2.js +1 -0
  42. package/dist/payment-attempt-page_ui_56d83c_1.24.2.js +1 -0
  43. package/dist/payment-attempt-page_ui_efcebc_1.24.2.js +1 -0
  44. package/dist/primitives/Input.js +24 -5
  45. package/dist/primitives/Input.js.map +1 -1
  46. package/dist/server.js +1 -1
  47. package/dist/ui-common_ui_3d4a5c_1.24.2.js +1 -0
  48. package/dist/{ui-common_ui_ac5565_1.24.2-snapshot.v20260702192602.js → ui-common_ui_56d83c_1.24.2.js} +4 -4
  49. package/dist/{ui-common_ui_f3e343_1.24.2-snapshot.v20260702192602.js → ui-common_ui_efcebc_1.24.2.js} +4 -4
  50. package/dist/ui.browser.js +2 -2
  51. package/dist/ui.legacy.browser.js +1 -1
  52. package/dist/ui.shared.browser.js +3 -3
  53. package/dist/utils/billing.js +16 -0
  54. package/dist/utils/billing.js.map +1 -0
  55. package/dist/utils/truncateTextWithEndVisible.js +2 -2
  56. package/dist/utils/truncateTextWithEndVisible.js.map +1 -1
  57. package/dist/vendors_ui_3d4a5c_1.24.2.js +1 -0
  58. package/package.json +4 -4
  59. package/dist/checkout_ui_7c4b52_1.24.2-snapshot.v20260702192602.js +0 -1
  60. package/dist/checkout_ui_ac5565_1.24.2-snapshot.v20260702192602.js +0 -9
  61. package/dist/checkout_ui_f3e343_1.24.2-snapshot.v20260702192602.js +0 -9
  62. package/dist/payment-attempt-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js +0 -1
  63. package/dist/payment-attempt-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js +0 -1
  64. package/dist/payment-attempt-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js +0 -1
  65. package/dist/ui-common_ui_7c4b52_1.24.2-snapshot.v20260702192602.js +0 -1
  66. package/dist/vendors_ui_7c4b52_1.24.2-snapshot.v20260702192602.js +0 -1
  67. /package/dist/{4424_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → 4424_ui_3d4a5c_1.24.2.js} +0 -0
  68. /package/dist/{4424_ui_ac5565_1.24.2-snapshot.v20260702192602.js → 4424_ui_56d83c_1.24.2.js} +0 -0
  69. /package/dist/{4424_ui_f3e343_1.24.2-snapshot.v20260702192602.js → 4424_ui_efcebc_1.24.2.js} +0 -0
  70. /package/dist/{4718_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → 4718_ui_3d4a5c_1.24.2.js} +0 -0
  71. /package/dist/{4718_ui_ac5565_1.24.2-snapshot.v20260702192602.js → 4718_ui_56d83c_1.24.2.js} +0 -0
  72. /package/dist/{4718_ui_f3e343_1.24.2-snapshot.v20260702192602.js → 4718_ui_efcebc_1.24.2.js} +0 -0
  73. /package/dist/{6678_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → 6678_ui_3d4a5c_1.24.2.js} +0 -0
  74. /package/dist/{6678_ui_ac5565_1.24.2-snapshot.v20260702192602.js → 6678_ui_56d83c_1.24.2.js} +0 -0
  75. /package/dist/{6678_ui_f3e343_1.24.2-snapshot.v20260702192602.js → 6678_ui_efcebc_1.24.2.js} +0 -0
  76. /package/dist/{76_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → 76_ui_3d4a5c_1.24.2.js} +0 -0
  77. /package/dist/{76_ui_ac5565_1.24.2-snapshot.v20260702192602.js → 76_ui_56d83c_1.24.2.js} +0 -0
  78. /package/dist/{76_ui_f3e343_1.24.2-snapshot.v20260702192602.js → 76_ui_efcebc_1.24.2.js} +0 -0
  79. /package/dist/{8316_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → 8316_ui_3d4a5c_1.24.2.js} +0 -0
  80. /package/dist/{8316_ui_ac5565_1.24.2-snapshot.v20260702192602.js → 8316_ui_56d83c_1.24.2.js} +0 -0
  81. /package/dist/{8316_ui_f3e343_1.24.2-snapshot.v20260702192602.js → 8316_ui_efcebc_1.24.2.js} +0 -0
  82. /package/dist/{8746_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → 8746_ui_3d4a5c_1.24.2.js} +0 -0
  83. /package/dist/{8746_ui_ac5565_1.24.2-snapshot.v20260702192602.js → 8746_ui_56d83c_1.24.2.js} +0 -0
  84. /package/dist/{8746_ui_f3e343_1.24.2-snapshot.v20260702192602.js → 8746_ui_efcebc_1.24.2.js} +0 -0
  85. /package/dist/{9419_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → 9419_ui_3d4a5c_1.24.2.js} +0 -0
  86. /package/dist/{9419_ui_ac5565_1.24.2-snapshot.v20260702192602.js → 9419_ui_56d83c_1.24.2.js} +0 -0
  87. /package/dist/{9419_ui_f3e343_1.24.2-snapshot.v20260702192602.js → 9419_ui_efcebc_1.24.2.js} +0 -0
  88. /package/dist/{apiKeys_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → apiKeys_ui_3d4a5c_1.24.2.js} +0 -0
  89. /package/dist/{apiKeys_ui_ac5565_1.24.2-snapshot.v20260702192602.js → apiKeys_ui_56d83c_1.24.2.js} +0 -0
  90. /package/dist/{apiKeys_ui_f3e343_1.24.2-snapshot.v20260702192602.js → apiKeys_ui_efcebc_1.24.2.js} +0 -0
  91. /package/dist/{blankcaptcha_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → blankcaptcha_ui_3d4a5c_1.24.2.js} +0 -0
  92. /package/dist/{blankcaptcha_ui_ac5565_1.24.2-snapshot.v20260702192602.js → blankcaptcha_ui_56d83c_1.24.2.js} +0 -0
  93. /package/dist/{blankcaptcha_ui_f3e343_1.24.2-snapshot.v20260702192602.js → blankcaptcha_ui_efcebc_1.24.2.js} +0 -0
  94. /package/dist/{configureSSO_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → configureSSO_ui_3d4a5c_1.24.2.js} +0 -0
  95. /package/dist/{configureSSO_ui_ac5565_1.24.2-snapshot.v20260702192602.js → configureSSO_ui_56d83c_1.24.2.js} +0 -0
  96. /package/dist/{configureSSO_ui_f3e343_1.24.2-snapshot.v20260702192602.js → configureSSO_ui_efcebc_1.24.2.js} +0 -0
  97. /package/dist/{copy-api-key-modal_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → copy-api-key-modal_ui_3d4a5c_1.24.2.js} +0 -0
  98. /package/dist/{copy-api-key-modal_ui_ac5565_1.24.2-snapshot.v20260702192602.js → copy-api-key-modal_ui_56d83c_1.24.2.js} +0 -0
  99. /package/dist/{copy-api-key-modal_ui_f3e343_1.24.2-snapshot.v20260702192602.js → copy-api-key-modal_ui_efcebc_1.24.2.js} +0 -0
  100. /package/dist/{createorganization_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → createorganization_ui_3d4a5c_1.24.2.js} +0 -0
  101. /package/dist/{createorganization_ui_ac5565_1.24.2-snapshot.v20260702192602.js → createorganization_ui_56d83c_1.24.2.js} +0 -0
  102. /package/dist/{createorganization_ui_f3e343_1.24.2-snapshot.v20260702192602.js → createorganization_ui_efcebc_1.24.2.js} +0 -0
  103. /package/dist/{credit-history-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → credit-history-page_ui_3d4a5c_1.24.2.js} +0 -0
  104. /package/dist/{credit-history-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → credit-history-page_ui_56d83c_1.24.2.js} +0 -0
  105. /package/dist/{credit-history-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → credit-history-page_ui_efcebc_1.24.2.js} +0 -0
  106. /package/dist/{enableOrganizationsPrompt_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → enableOrganizationsPrompt_ui_3d4a5c_1.24.2.js} +0 -0
  107. /package/dist/{enableOrganizationsPrompt_ui_ac5565_1.24.2-snapshot.v20260702192602.js → enableOrganizationsPrompt_ui_56d83c_1.24.2.js} +0 -0
  108. /package/dist/{enableOrganizationsPrompt_ui_f3e343_1.24.2-snapshot.v20260702192602.js → enableOrganizationsPrompt_ui_efcebc_1.24.2.js} +0 -0
  109. /package/dist/{framework_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → framework_ui_3d4a5c_1.24.2.js} +0 -0
  110. /package/dist/{framework_ui_ac5565_1.24.2-snapshot.v20260702192602.js → framework_ui_56d83c_1.24.2.js} +0 -0
  111. /package/dist/{impersonationfab_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → impersonationfab_ui_3d4a5c_1.24.2.js} +0 -0
  112. /package/dist/{impersonationfab_ui_ac5565_1.24.2-snapshot.v20260702192602.js → impersonationfab_ui_56d83c_1.24.2.js} +0 -0
  113. /package/dist/{impersonationfab_ui_f3e343_1.24.2-snapshot.v20260702192602.js → impersonationfab_ui_efcebc_1.24.2.js} +0 -0
  114. /package/dist/{keylessPrompt_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → keylessPrompt_ui_3d4a5c_1.24.2.js} +0 -0
  115. /package/dist/{keylessPrompt_ui_ac5565_1.24.2-snapshot.v20260702192602.js → keylessPrompt_ui_56d83c_1.24.2.js} +0 -0
  116. /package/dist/{keylessPrompt_ui_f3e343_1.24.2-snapshot.v20260702192602.js → keylessPrompt_ui_efcebc_1.24.2.js} +0 -0
  117. /package/dist/{oauthConsent_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → oauthConsent_ui_3d4a5c_1.24.2.js} +0 -0
  118. /package/dist/{oauthConsent_ui_ac5565_1.24.2-snapshot.v20260702192602.js → oauthConsent_ui_56d83c_1.24.2.js} +0 -0
  119. /package/dist/{oauthConsent_ui_f3e343_1.24.2-snapshot.v20260702192602.js → oauthConsent_ui_efcebc_1.24.2.js} +0 -0
  120. /package/dist/{onetap_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → onetap_ui_3d4a5c_1.24.2.js} +0 -0
  121. /package/dist/{onetap_ui_ac5565_1.24.2-snapshot.v20260702192602.js → onetap_ui_56d83c_1.24.2.js} +0 -0
  122. /package/dist/{onetap_ui_f3e343_1.24.2-snapshot.v20260702192602.js → onetap_ui_efcebc_1.24.2.js} +0 -0
  123. /package/dist/{op-api-keys-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → op-api-keys-page_ui_3d4a5c_1.24.2.js} +0 -0
  124. /package/dist/{op-api-keys-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → op-api-keys-page_ui_56d83c_1.24.2.js} +0 -0
  125. /package/dist/{op-api-keys-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → op-api-keys-page_ui_efcebc_1.24.2.js} +0 -0
  126. /package/dist/{op-billing-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → op-billing-page_ui_3d4a5c_1.24.2.js} +0 -0
  127. /package/dist/{op-billing-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → op-billing-page_ui_56d83c_1.24.2.js} +0 -0
  128. /package/dist/{op-billing-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → op-billing-page_ui_efcebc_1.24.2.js} +0 -0
  129. /package/dist/{op-plans-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → op-plans-page_ui_3d4a5c_1.24.2.js} +0 -0
  130. /package/dist/{op-plans-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → op-plans-page_ui_56d83c_1.24.2.js} +0 -0
  131. /package/dist/{op-plans-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → op-plans-page_ui_efcebc_1.24.2.js} +0 -0
  132. /package/dist/{op-security-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → op-security-page_ui_3d4a5c_1.24.2.js} +0 -0
  133. /package/dist/{op-security-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → op-security-page_ui_56d83c_1.24.2.js} +0 -0
  134. /package/dist/{op-security-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → op-security-page_ui_efcebc_1.24.2.js} +0 -0
  135. /package/dist/{organizationlist_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → organizationlist_ui_3d4a5c_1.24.2.js} +0 -0
  136. /package/dist/{organizationlist_ui_ac5565_1.24.2-snapshot.v20260702192602.js → organizationlist_ui_56d83c_1.24.2.js} +0 -0
  137. /package/dist/{organizationlist_ui_f3e343_1.24.2-snapshot.v20260702192602.js → organizationlist_ui_efcebc_1.24.2.js} +0 -0
  138. /package/dist/{organizationprofile_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → organizationprofile_ui_3d4a5c_1.24.2.js} +0 -0
  139. /package/dist/{organizationprofile_ui_ac5565_1.24.2-snapshot.v20260702192602.js → organizationprofile_ui_56d83c_1.24.2.js} +0 -0
  140. /package/dist/{organizationprofile_ui_f3e343_1.24.2-snapshot.v20260702192602.js → organizationprofile_ui_efcebc_1.24.2.js} +0 -0
  141. /package/dist/{organizationswitcher_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → organizationswitcher_ui_3d4a5c_1.24.2.js} +0 -0
  142. /package/dist/{organizationswitcher_ui_ac5565_1.24.2-snapshot.v20260702192602.js → organizationswitcher_ui_56d83c_1.24.2.js} +0 -0
  143. /package/dist/{organizationswitcher_ui_f3e343_1.24.2-snapshot.v20260702192602.js → organizationswitcher_ui_efcebc_1.24.2.js} +0 -0
  144. /package/dist/{planDetails_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → planDetails_ui_3d4a5c_1.24.2.js} +0 -0
  145. /package/dist/{planDetails_ui_ac5565_1.24.2-snapshot.v20260702192602.js → planDetails_ui_56d83c_1.24.2.js} +0 -0
  146. /package/dist/{planDetails_ui_f3e343_1.24.2-snapshot.v20260702192602.js → planDetails_ui_efcebc_1.24.2.js} +0 -0
  147. /package/dist/{prefetchorganizationlist_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → prefetchorganizationlist_ui_3d4a5c_1.24.2.js} +0 -0
  148. /package/dist/{prefetchorganizationlist_ui_ac5565_1.24.2-snapshot.v20260702192602.js → prefetchorganizationlist_ui_56d83c_1.24.2.js} +0 -0
  149. /package/dist/{prefetchorganizationlist_ui_f3e343_1.24.2-snapshot.v20260702192602.js → prefetchorganizationlist_ui_efcebc_1.24.2.js} +0 -0
  150. /package/dist/{pricingTable_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → pricingTable_ui_3d4a5c_1.24.2.js} +0 -0
  151. /package/dist/{pricingTable_ui_ac5565_1.24.2-snapshot.v20260702192602.js → pricingTable_ui_56d83c_1.24.2.js} +0 -0
  152. /package/dist/{pricingTable_ui_f3e343_1.24.2-snapshot.v20260702192602.js → pricingTable_ui_efcebc_1.24.2.js} +0 -0
  153. /package/dist/{revoke-api-key-modal_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → revoke-api-key-modal_ui_3d4a5c_1.24.2.js} +0 -0
  154. /package/dist/{revoke-api-key-modal_ui_ac5565_1.24.2-snapshot.v20260702192602.js → revoke-api-key-modal_ui_56d83c_1.24.2.js} +0 -0
  155. /package/dist/{revoke-api-key-modal_ui_f3e343_1.24.2-snapshot.v20260702192602.js → revoke-api-key-modal_ui_efcebc_1.24.2.js} +0 -0
  156. /package/dist/{sessionTasks_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → sessionTasks_ui_3d4a5c_1.24.2.js} +0 -0
  157. /package/dist/{sessionTasks_ui_ac5565_1.24.2-snapshot.v20260702192602.js → sessionTasks_ui_56d83c_1.24.2.js} +0 -0
  158. /package/dist/{sessionTasks_ui_f3e343_1.24.2-snapshot.v20260702192602.js → sessionTasks_ui_efcebc_1.24.2.js} +0 -0
  159. /package/dist/{signin_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → signin_ui_3d4a5c_1.24.2.js} +0 -0
  160. /package/dist/{signin_ui_ac5565_1.24.2-snapshot.v20260702192602.js → signin_ui_56d83c_1.24.2.js} +0 -0
  161. /package/dist/{signin_ui_f3e343_1.24.2-snapshot.v20260702192602.js → signin_ui_efcebc_1.24.2.js} +0 -0
  162. /package/dist/{signup_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → signup_ui_3d4a5c_1.24.2.js} +0 -0
  163. /package/dist/{signup_ui_ac5565_1.24.2-snapshot.v20260702192602.js → signup_ui_56d83c_1.24.2.js} +0 -0
  164. /package/dist/{signup_ui_f3e343_1.24.2-snapshot.v20260702192602.js → signup_ui_efcebc_1.24.2.js} +0 -0
  165. /package/dist/{statement-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → statement-page_ui_3d4a5c_1.24.2.js} +0 -0
  166. /package/dist/{statement-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → statement-page_ui_56d83c_1.24.2.js} +0 -0
  167. /package/dist/{statement-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → statement-page_ui_efcebc_1.24.2.js} +0 -0
  168. /package/dist/{subscriptionDetails_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → subscriptionDetails_ui_3d4a5c_1.24.2.js} +0 -0
  169. /package/dist/{subscriptionDetails_ui_ac5565_1.24.2-snapshot.v20260702192602.js → subscriptionDetails_ui_56d83c_1.24.2.js} +0 -0
  170. /package/dist/{subscriptionDetails_ui_f3e343_1.24.2-snapshot.v20260702192602.js → subscriptionDetails_ui_efcebc_1.24.2.js} +0 -0
  171. /package/dist/{taskChooseOrganization_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → taskChooseOrganization_ui_3d4a5c_1.24.2.js} +0 -0
  172. /package/dist/{taskChooseOrganization_ui_ac5565_1.24.2-snapshot.v20260702192602.js → taskChooseOrganization_ui_56d83c_1.24.2.js} +0 -0
  173. /package/dist/{taskChooseOrganization_ui_f3e343_1.24.2-snapshot.v20260702192602.js → taskChooseOrganization_ui_efcebc_1.24.2.js} +0 -0
  174. /package/dist/{taskResetPassword_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → taskResetPassword_ui_3d4a5c_1.24.2.js} +0 -0
  175. /package/dist/{taskResetPassword_ui_ac5565_1.24.2-snapshot.v20260702192602.js → taskResetPassword_ui_56d83c_1.24.2.js} +0 -0
  176. /package/dist/{taskResetPassword_ui_f3e343_1.24.2-snapshot.v20260702192602.js → taskResetPassword_ui_efcebc_1.24.2.js} +0 -0
  177. /package/dist/{taskSetupMFA_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → taskSetupMFA_ui_3d4a5c_1.24.2.js} +0 -0
  178. /package/dist/{taskSetupMFA_ui_ac5565_1.24.2-snapshot.v20260702192602.js → taskSetupMFA_ui_56d83c_1.24.2.js} +0 -0
  179. /package/dist/{taskSetupMFA_ui_f3e343_1.24.2-snapshot.v20260702192602.js → taskSetupMFA_ui_efcebc_1.24.2.js} +0 -0
  180. /package/dist/{up-api-keys-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → up-api-keys-page_ui_3d4a5c_1.24.2.js} +0 -0
  181. /package/dist/{up-api-keys-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → up-api-keys-page_ui_56d83c_1.24.2.js} +0 -0
  182. /package/dist/{up-api-keys-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → up-api-keys-page_ui_efcebc_1.24.2.js} +0 -0
  183. /package/dist/{up-billing-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → up-billing-page_ui_3d4a5c_1.24.2.js} +0 -0
  184. /package/dist/{up-billing-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → up-billing-page_ui_56d83c_1.24.2.js} +0 -0
  185. /package/dist/{up-billing-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → up-billing-page_ui_efcebc_1.24.2.js} +0 -0
  186. /package/dist/{up-plans-page_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → up-plans-page_ui_3d4a5c_1.24.2.js} +0 -0
  187. /package/dist/{up-plans-page_ui_ac5565_1.24.2-snapshot.v20260702192602.js → up-plans-page_ui_56d83c_1.24.2.js} +0 -0
  188. /package/dist/{up-plans-page_ui_f3e343_1.24.2-snapshot.v20260702192602.js → up-plans-page_ui_efcebc_1.24.2.js} +0 -0
  189. /package/dist/{useravatar_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → useravatar_ui_3d4a5c_1.24.2.js} +0 -0
  190. /package/dist/{useravatar_ui_ac5565_1.24.2-snapshot.v20260702192602.js → useravatar_ui_56d83c_1.24.2.js} +0 -0
  191. /package/dist/{useravatar_ui_f3e343_1.24.2-snapshot.v20260702192602.js → useravatar_ui_efcebc_1.24.2.js} +0 -0
  192. /package/dist/{userbutton_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → userbutton_ui_3d4a5c_1.24.2.js} +0 -0
  193. /package/dist/{userbutton_ui_ac5565_1.24.2-snapshot.v20260702192602.js → userbutton_ui_56d83c_1.24.2.js} +0 -0
  194. /package/dist/{userbutton_ui_f3e343_1.24.2-snapshot.v20260702192602.js → userbutton_ui_efcebc_1.24.2.js} +0 -0
  195. /package/dist/{userprofile_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → userprofile_ui_3d4a5c_1.24.2.js} +0 -0
  196. /package/dist/{userprofile_ui_ac5565_1.24.2-snapshot.v20260702192602.js → userprofile_ui_56d83c_1.24.2.js} +0 -0
  197. /package/dist/{userprofile_ui_f3e343_1.24.2-snapshot.v20260702192602.js → userprofile_ui_efcebc_1.24.2.js} +0 -0
  198. /package/dist/{userverification_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → userverification_ui_3d4a5c_1.24.2.js} +0 -0
  199. /package/dist/{userverification_ui_ac5565_1.24.2-snapshot.v20260702192602.js → userverification_ui_56d83c_1.24.2.js} +0 -0
  200. /package/dist/{userverification_ui_f3e343_1.24.2-snapshot.v20260702192602.js → userverification_ui_efcebc_1.24.2.js} +0 -0
  201. /package/dist/{vendors_ui_ac5565_1.24.2-snapshot.v20260702192602.js → vendors_ui_56d83c_1.24.2.js} +0 -0
  202. /package/dist/{vendors_ui_f3e343_1.24.2-snapshot.v20260702192602.js → vendors_ui_efcebc_1.24.2.js} +0 -0
  203. /package/dist/{waitlist_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → waitlist_ui_3d4a5c_1.24.2.js} +0 -0
  204. /package/dist/{waitlist_ui_ac5565_1.24.2-snapshot.v20260702192602.js → waitlist_ui_56d83c_1.24.2.js} +0 -0
  205. /package/dist/{waitlist_ui_f3e343_1.24.2-snapshot.v20260702192602.js → waitlist_ui_efcebc_1.24.2.js} +0 -0
  206. /package/dist/{web3-solana-wallet-buttons_ui_7c4b52_1.24.2-snapshot.v20260702192602.js → web3-solana-wallet-buttons_ui_3d4a5c_1.24.2.js} +0 -0
  207. /package/dist/{web3-solana-wallet-buttons_ui_ac5565_1.24.2-snapshot.v20260702192602.js → web3-solana-wallet-buttons_ui_56d83c_1.24.2.js} +0 -0
  208. /package/dist/{web3-solana-wallet-buttons_ui_f3e343_1.24.2-snapshot.v20260702192602.js → web3-solana-wallet-buttons_ui_efcebc_1.24.2.js} +0 -0
@@ -1 +1 @@
1
- "use strict";(globalThis.rspackChunk_clerk_ui=globalThis.rspackChunk_clerk_ui||[]).push([[9074],{37330(e,i,t){t(15254);var r=t(59763),o=t(59701);let n=o.createContext(null);n.displayName="ConfigureSSOContext",t.d(i,{},{t:()=>{let e=o.useContext(n);if(!e)throw Error("useConfigureSSO called outside <ConfigureSSOProvider>.");return e},z:e=>{let{enterpriseConnection:i,organizationEnterpriseConnection:t,testRuns:a,organizationDomains:l,contentRef:s,enterpriseConnectionMutations:c,organizationDomainMutations:d,onExit:p,children:u}=e,S=o.useMemo(()=>({contentRef:s,enterpriseConnection:i,organizationEnterpriseConnection:t,testRuns:a,organizationDomains:l,enterpriseConnectionMutations:c,organizationDomainMutations:d,onExit:p}),[s,c,d,t,a,l,i,p]);return(0,r.Y)(n.Provider,{value:S,children:u})}})},56700(e,i,t){t.d(i,{b:()=>iF});var r=t(59763),o=t(59701),n=t(17308),a=t(37330);t(42949),t(18723),t(37891);var l=t(66887),s=t(39230),c=t(34260),d=t(98157),p=t(52537);t(15254);let u=o.createContext(null);function S(){let e=o.useContext(u);if(!e)throw Error("useWizard called outside of <Wizard>");return e}u.displayName="WizardContext";let g=e=>{let{title:i}=e,{activeSteps:t,currentIndex:o,goToStep:n}=S(),{t:a}=(0,l._)(),u=t.filter(e=>e.label),g=u.findIndex(e=>{var i;return(null==(i=t[o])?void 0:i.id)===e.id});return(0,r.FD)(d.B,{children:[i,(0,r.Y)(s.so,{sx:i?{marginInlineStart:"auto",[c.g.md]:{marginInlineStart:0}}:void 0,children:(0,r.Y)(p.C,{children:u.map((e,i)=>{let t=e.label?"string"==typeof e.label?e.label:a(e.label):"";return(0,r.Y)(p.C.Item,{bullet:i+1,isCurrent:i===g,isCompleted:e.isCompleted,isReachable:e.isReachable,onClick:()=>n(e.id),children:t},e.id)})})})]})};var m=t(80085);t(49678),t(36395);let f=e=>!e.isReachable||e.isReachable(),h=(e,i)=>e.findIndex(e=>e.id===i),Y=e=>{let i=e.descriptors;if(0===i.length)return{current:"",direction:0,hasNavigated:!1};let t=0;for(;t+1<i.length&&f(i[t+1]);)t++;return{current:i[t].id,direction:0,hasNavigated:!1}},v=(e,i)=>({current:e,direction:i,hasNavigated:!0}),y=(e,i,t)=>{let r=t.descriptors;switch(i.type){case"NEXT":{let i=h(r,e.current);if(i<0)return e;let t=r[i+1];if(!t||!f(t))return e;return v(t.id,1)}case"PREV":{let i=h(r,e.current);if(i<0)return e;let t=r[i-1];if(!t||!f(t))return e;return v(t.id,-1)}case"GOTO":{let t=r.find(e=>e.id===i.step);if(!t||t.id===e.current||!f(t))return e;return v(t.id,0)}default:return e}},b=e=>{let{id:i,children:t}=e,{current:o}=S();return o!==i?null:(0,r.Y)(r.FK,{children:t})};b.displayName="Wizard.Match";let O=Object.assign(e=>{let{steps:i,initialStepId:t,children:n}=e,a=o.useContext(u),l=(e=>{let{config:i,parentWizard:t,initialStepId:r}=e,n=null!==t,[a,l]=o.useState(()=>((e,i)=>{if(i){let t=e.descriptors.find(e=>e.id===i);if(t&&f(t))return{current:i,direction:0,hasNavigated:!1}}return Y(e)})(i,r)),[s,c]=o.useState(null),d=o.useRef(i);d.current=i;let p=o.useRef(t);p.current=t;let u=o.useRef(a);u.current=a;let S=i.descriptors.find(e=>e.id===a.current);if(!S||!f(S)){let e=Y(i);e.current!==a.current&&l(e)}if(null!==s)if(s!==a.current)c(null);else{let e=y(a,{type:"NEXT"},i);e!==a&&(l(e),c(null))}let g=(e,i)=>i.descriptors.findIndex(i=>i.id===e.current),m=o.useCallback(()=>{let e=u.current,i=d.current,t=y(e,{type:"NEXT"},i);if(t!==e){c(null),l(t);return}if(g(e,i)===i.descriptors.length-1){var r;null==(r=p.current)||r.goNext();return}c(e.current)},[]),h=o.useCallback(()=>{c(null);let e=u.current,i=d.current,t=y(e,{type:"PREV"},i);if(t===e){if(0===g(e,i)){var r;null==(r=p.current)||r.goPrev()}return}l(t)},[]),v=o.useCallback(e=>{l(y(u.current,e,d.current))},[]),b=o.useCallback(e=>{c(null),v({type:"GOTO",step:e})},[v]),O=a.current,D=o.useMemo(()=>{let e=i.descriptors,t=e.findIndex(e=>e.id===O);return e.map((e,i)=>({id:e.id,label:e.label,isCompleted:e.isComplete?e.isComplete():t>=0&&i<t,isReachable:f(e)}))},[i,O]),$=D.findIndex(e=>e.id===O),z=$>=0?D[$]:void 0,F=i.descriptors,C=F.findIndex(e=>e.id===O),x=!a.hasNavigated;return o.useMemo(()=>({current:O,direction:a.direction,activeSteps:D,currentStep:z,currentIndex:$,totalSteps:D.length,isInitialStep:x,isNested:n,isFirstStep:C<=0&&(!t||t.isFirstStep),isLastStep:C===F.length-1&&(!t||t.isLastStep),goNext:m,goPrev:h,goToStep:b}),[O,a.direction,D,z,$,x,n,C,F.length,t,m,h,b])})({config:o.useMemo(()=>({descriptors:i}),[i]),parentWizard:a,initialStepId:t});return(0,r.Y)(u.Provider,{value:l,children:n})},{Match:b});t(85281),t(12021),t(73560),t(86449);var D=t(46262),$=t(99963),z=t(78342),F=t(34641),C=t(61046),x=t(40395),I=t(40890),G=t(16363),M=t(65790),R=t(17447),k=t(75880),E=t(72310),P=t(38426),T=t(76504),A=t(53693),K=t(8343),w=t(51637),U=t(30869),_=t(37876),L=t(35402),B=t(46600),H=t(5870),W=t(62574);let q=e=>e.isOpen?(0,r.Y)(W.Modal,{handleClose:e.onClose,canCloseModal:!1,portalRoot:e.contentRef,containerSx:e=>({alignItems:"center",position:"absolute",inset:0,width:"auto",height:"auto",backgroundColor:"inherit",backdropFilter:"blur(".concat(e.sizes.$2,")")}),children:(0,r.Y)(N,{...e})}):null,N=(0,n.dm)(e=>{let{onClose:i,onRemove:t}=e,a=(0,n.f0)(),l=(0,o.useMemo)(()=>e.isConnectionActive?(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.subtitle__active",{domain:e.domain}):(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.subtitle__inactive",{domain:e.domain}),[]),c=async()=>{try{await t(),i()}catch(e){(0,U.H4)(e,[],a.setError)}};return(0,r.Y)(L.Z.Root,{elementDescriptor:C.$z.configureSSORemoveDomainDialog,sx:e=>({borderRadius:e.radii.$md}),children:(0,r.Y)(L.Z.Content,{sx:e=>({textAlign:"start",padding:e.sizes.$5}),children:(0,r.Y)(H.M,{headerTitle:(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.title"),headerSubtitle:l,sx:e=>({gap:e.space.$4}),children:(0,r.Y)(R.l.Root,{onSubmit:c,children:(0,r.Y)(s.fv,{gap:4,children:(0,r.FD)(B.c,{children:[(0,r.Y)(R.l.SubmitButton,{elementDescriptor:C.$z.configureSSORemoveDomainDialogSubmitButton,block:!1,colorScheme:"danger",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.removeButton")}),(0,r.Y)(R.l.ResetButton,{elementDescriptor:C.$z.configureSSORemoveDomainDialogCancelButton,block:!1,localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.cancelButton"),onClick:i})]})})})})})})}),V=()=>{var e;let{t:i}=(0,l._)(),{enterpriseConnection:t,organizationDomains:c,organizationEnterpriseConnection:d,contentRef:p,organizationDomainMutations:{createDomain:u,revalidate:g,prepareOwnershipVerification:f},enterpriseConnectionMutations:{updateConnection:h}}=(0,a.t)(),{goPrev:Y,goNext:v,isFirstStep:y,isLastStep:b}=S(),O=(0,n.f0)(),I=(0,D.ho)(),{organization:G}=(0,D.Z5)(),[M,R]=(0,o.useState)(null),k=(0,o.useRef)(!1);(0,o.useEffect)(()=>{var e,i,r;k.current||(k.current=!0,null==(r=I.telemetry)||r.record((0,$.fC)("configureSSO","verify-domain",{timestamp:new Date().toISOString(),connectionStatus:d.status,connectionId:null!=(e=null==t?void 0:t.id)?e:null,organizationId:null!=(i=null==G?void 0:G.id)?i:null})))},[]);let E=async e=>{O.setError(void 0);try{await u(e)}catch(t){var i;let e=null!=(i=(0,U.hG)(t))?i:(0,U.QU)(t);O.setError(e)}},P=async e=>{O.setError(void 0);try{await f([e])}catch(t){var i;let e=null!=(i=(0,U.hG)(t))?i:(0,U.QU)(t);O.setError(e)}},T=async e=>{if(t){let i=t.domains.filter(i=>i!==e.name);await h(t.id,{domains:i})}await e.delete(),await g()},A=(0,m.im)(c),w=null!=(e=null==c?void 0:c.filter(e=>{var i;return(null==(i=e.ownershipVerification)?void 0:i.status)==="verified"}).length)?e:0,L=!!t,B=(null==t?void 0:t.active)?(0,z.G)("configureSSO.organizationDomainsStep.domainCard.removeButtonTooltip__lastVerifiedDomainActive"):(0,z.G)("configureSSO.organizationDomainsStep.domainCard.removeButtonTooltip__lastVerifiedDomain");return(0,r.FD)(F.n.Part,{part:"organizationDomains",children:[(0,r.FD)(_.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("verify-domain"),children:[(0,r.Y)(_.p.Header,{title:i((0,z.G)("configureSSO.organizationDomainsStep.title")),description:i((0,z.G)("configureSSO.organizationDomainsStep.subtitle"))}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{fill:!0,sx:e=>({gap:e.space.$5,minHeight:0}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$4}),children:[(0,r.Y)(Z,{onSubmit:E,organizationDomains:c}),!(null==c?void 0:c.length)&&(0,r.Y)(j,{onSubmit:E}),O.error&&(0,r.Y)(x.F,{variant:"danger",title:O.error})]}),!!(null==c?void 0:c.length)&&(0,r.Y)(s.fv,{elementDescriptor:C.$z.configureSSOVerifyDomainList,sx:e=>({gap:e.space.$3,flex:"0 1 auto",minHeight:0,overflowY:"auto",marginInline:"calc(".concat(e.space.$1," * -1)"),paddingInline:e.space.$1,...K.s.unstyledScrollbar(e)}),children:c.map(e=>{var i;let t=(null==(i=e.ownershipVerification)?void 0:i.status)==="verified";return(0,r.Y)(X,{domain:e,onRemove:()=>R(e),onPrepareOwnershipVerification:()=>P(e),isRemoveDisabled:L&&t&&1===w,removeDisabledTooltip:B},e.id)})})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Previous,{onClick:()=>Y(),isDisabled:y}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>v(),isDisabled:b||!A})]})]}),M&&(0,r.Y)(q,{isOpen:!!M,onClose:()=>R(null),domain:M.name,isConnectionActive:!!(null==t?void 0:t.active),onRemove:()=>T(M),contentRef:p})]})},J=/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/i,Z=e=>{let{onSubmit:i,organizationDomains:t}=e,[n,a]=(0,o.useState)(!1),l=(0,w.tJ)("domain","",{type:"text",label:(0,z.G)("configureSSO.organizationDomainsStep.formFieldLabel__domain"),placeholder:(0,z.G)("configureSSO.organizationDomainsStep.formFieldInputPlaceholder__domain")}),c=l.value.trim().toLowerCase(),d=J.test(c)&&!(null==t?void 0:t.some(e=>e.name===c))&&!n;return(0,r.Y)(R.l.Root,{onSubmit:e=>{e.preventDefault(),d&&(a(!0),i(c).then(()=>l.setValue("")).finally(()=>a(!1)))},children:(0,r.Y)(M.D.Root,{...l.props,children:(0,r.FD)(s.fv,{elementDescriptor:C.$z.formField,elementId:C.$z.formField.setId(l.id),sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(M.D.LabelRow,{children:(0,r.Y)(M.D.Label,{})}),(0,r.FD)(s.so,{align:"start",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.az,{sx:{flex:1},children:(0,r.Y)(M.D.Input,{})}),(0,r.Y)(s.$n,{type:"submit",variant:"bordered",colorScheme:"secondary",isDisabled:!d,isLoading:n,localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.formButtonPrimary__add"),sx:{flexShrink:0}})]})]})})})},j=e=>{var i,t;let{onSubmit:n}=e,{user:a}=(0,D.Jd)(),[l,c]=(0,o.useState)(!1),[d,p]=(0,o.useState)(!1),u=null==a||null==(i=a.primaryEmailAddress)?void 0:i.emailAddress,S=u&&(null==(t=u.split("@")[1])?void 0:t.trim().toLowerCase())||null;return!S||l?null:(0,r.FD)(s.so,{elementDescriptor:C.$z.configureSSOVerifyDomainSuggestion,align:"center",justify:"between",sx:e=>({gap:e.space.$2,paddingInline:e.space.$3,paddingBlock:e.space.$1x5,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$lg,background:e.colors.$neutralAlpha50}),children:[(0,r.FD)(s.so,{align:"center",sx:e=>({gap:e.space.$3,minWidth:0}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainSuggestion.messageLabel",{domain:S}),sx:e=>({fontSize:e.fontSizes.$sm})}),(0,r.Y)(s.$n,{variant:"bordered",colorScheme:"secondary",size:"xs",isLoading:d,onClick:()=>{p(!0),n(S).then(()=>c(!0)).finally(()=>p(!1))},localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainSuggestion.formButtonPrimary__add",{domain:S}),sx:{flexShrink:0}})]}),(0,r.Y)(s.$n,{variant:"ghost",colorScheme:"neutral","aria-label":"Dismiss domain suggestion",isDisabled:d,onClick:()=>c(!0),sx:e=>({flexShrink:0,padding:e.space.$1}),children:(0,r.Y)(s.In,{icon:E.A,sx:e=>({width:e.sizes.$4,height:e.sizes.$4,color:e.colors.$colorMutedForeground})})})]})},X=e=>{var i,t;let{domain:o,onRemove:n,onPrepareOwnershipVerification:a,isRemoveDisabled:l=!1,removeDisabledTooltip:c}=e;if(!o.name)return null;let d=o.ownershipVerification,p=(null==d?void 0:d.status)==="verified",u=(null==d?void 0:d.status)==="expired",S=null!=(i=null==d?void 0:d.status)?i:"unverified",g=(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOVerifyDomainCardRemoveButton,variant:"ghost",colorScheme:"neutral","aria-label":"Remove domain",onClick:n,isDisabled:l,sx:e=>({flexShrink:0,padding:e.space.$1}),children:(0,r.Y)(s.In,{icon:E.A,sx:e=>({width:e.sizes.$4,height:e.sizes.$4,color:e.colors.$colorMutedForeground})})});return(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOVerifyDomainCard,elementId:C.$z.configureSSOVerifyDomainCard.setId(S),sx:e=>({borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$lg,background:e.colors.$colorBackground}),children:[(0,r.FD)(s.so,{align:"center",justify:"between",sx:e=>({gap:e.space.$2,padding:e.space.$4,paddingBottom:e.space.$2}),children:[(0,r.FD)(s.so,{align:"center",sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.Y)(s.EY,{as:"span",sx:e=>({fontWeight:e.fontWeights.$medium,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),children:o.name}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOVerifyDomainCardBadge,elementId:C.$z.configureSSOVerifyDomainCardBadge.setId(S),colorScheme:p?"success":"danger",localizationKey:p?(0,z.G)("configureSSO.organizationDomainsStep.domainCard.badge__verified"):u?(0,z.G)("configureSSO.organizationDomainsStep.domainCard.badge__expired"):(0,z.G)("configureSSO.organizationDomainsStep.domainCard.badge__unverified")}),!p&&!u&&(0,r.Y)(s.y$,{size:"xs",colorScheme:"neutral",sx:e=>({flexShrink:0,marginInlineStart:e.space.$1})})]}),l&&c?(0,r.FD)(k.m_.Root,{children:[(0,r.Y)(k.m_.Trigger,{children:g}),(0,r.Y)(k.m_.Content,{text:c})]}):g]}),(0,r.Y)(s.az,{sx:{overflow:"hidden"},children:(0,r.Y)(I.k,{children:u?(0,r.Y)(Q,{expiresAt:null!=(t=null==d?void 0:d.expiresAt)?t:null,onPrepareOwnershipVerification:a},"expired"):(null==d?void 0:d.verifiedAt)?(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.verifiedAtLabel",{date:d.verifiedAt}),sx:e=>({padding:e.space.$4,paddingTop:0})},"verified"):(0,r.Y)(ee,{ownershipVerification:d},"unverified")})})]})},Q=e=>{let{expiresAt:i,onPrepareOwnershipVerification:t}=e,[n,a]=(0,o.useState)(!1);return(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOVerifyDomainCardExpired,sx:e=>({gap:e.space.$3,paddingInline:e.space.$4,paddingBottom:e.space.$4}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:i?(0,z.G)("configureSSO.organizationDomainsStep.domainCard.expiredAtLabel",{date:i}):(0,z.G)("configureSSO.organizationDomainsStep.domainCard.expiredLabel")}),(0,r.FD)(s.$n,{variant:"bordered",colorScheme:"secondary",size:"xs",isLoading:n,onClick:()=>{a(!0),t().finally(()=>a(!1))},sx:e=>({alignSelf:"flex-start",gap:e.space.$1x5}),children:[(0,r.Y)(s.In,{icon:P.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.verifyAgainButton")})]})]})},ee=e=>{var i,t;let{ownershipVerification:o}=e;return(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOVerifyDomainCardTxtRecord,sx:e=>({gap:e.space.$3,paddingInline:e.space.$4,paddingBottom:e.space.$4}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.txtRecord.instructions"),sx:e=>({fontSize:e.fontSizes.$sm})}),(0,r.Y)(s.az,{sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,marginInline:"calc(".concat(e.space.$4," * -1)")})}),(0,r.FD)(s.so,{wrap:"wrap",sx:e=>({gap:e.space.$6}),children:[(0,r.Y)(ei,{label:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.txtRecord.typeLabel"),value:"TXT"}),(0,r.Y)(ei,{label:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.txtRecord.hostLabel"),value:null!=(i=null==o?void 0:o.txtRecordName)?i:"@"})]}),(0,r.FD)(s.so,{align:"center",sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.txtRecord.valueLabel"),sx:e=>({fontSize:e.fontSizes.$sm,flexShrink:0})}),(0,r.Y)(G.r,{elementDescriptor:C.$z.configureSSOVerifyDomainCardTxtRecordValue,value:null!=(t=null==o?void 0:o.txtRecordValue)?t:"—",copyIcon:T.A,copiedIcon:A.A,sx:{flex:1,minWidth:0}})]})]})},ei=e=>{let{label:i,value:t}=e;return(0,r.FD)(s.so,{align:"center",sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:i,sx:e=>({fontSize:e.fontSizes.$sm,flexShrink:0})}),(0,r.Y)(s.Ex,{colorScheme:"primary",sx:e=>({fontFamily:e.fonts.$buttons,display:"flex",alignItems:"center",justifyContent:"center",paddingBlock:e.space.$1,paddingInline:e.space.$1x5}),children:(0,r.Y)(s.az,{as:"span",sx:{display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,textBoxTrim:"trim-both",textBoxEdge:"cap alphabetic"},children:t})})]})};t(67548),t(70954),t(98803),t(79162),t(15385),t(39342),t(69152),t(50119),t(45249);var et=t(30129);let er=e=>e.isOpen?(0,r.Y)(W.Modal,{handleClose:e.onClose,canCloseModal:!1,portalRoot:e.contentRef,containerSx:e=>({alignItems:"center",position:"absolute",inset:0,width:"auto",height:"auto",backgroundColor:"inherit",backdropFilter:"blur(".concat(e.sizes.$2,")")}),children:(0,r.Y)(eo,{...e})}):null,eo=(0,n.dm)(e=>{let{onClose:i,onConfirm:t,isSubmitting:o,nextProviderLabel:n,currentProviderLabel:a}=e,{t:c}=(0,l._)(),d=c(n),p=c(a);return(0,r.Y)(L.Z.Root,{elementDescriptor:C.$z.configureSSOChangeProviderDialog,sx:e=>({borderRadius:e.radii.$md}),children:(0,r.Y)(L.Z.Content,{sx:e=>({textAlign:"start",padding:e.sizes.$5}),children:(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$4}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.DZ,{textVariant:"h2",localizationKey:(0,z.G)("configureSSO.changeProviderDialog.title",{provider:d}),sx:e=>({fontSize:e.fontSizes.$md})}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.changeProviderDialog.subtitle",{provider:d,currentProvider:p})})]}),(0,r.FD)(s.so,{justify:"end",sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOChangeProviderDialogCancelButton,variant:"ghost",isDisabled:o,onClick:i,localizationKey:(0,z.G)("configureSSO.changeProviderDialog.cancelButton")}),(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOChangeProviderDialogConfirmButton,variant:"solid",isLoading:o,onClick:t,localizationKey:(0,z.G)("configureSSO.changeProviderDialog.confirmButton")})]})]})})})}),en=new Set(["okta"]),ea=[{id:"saml",label:(0,z.G)("configureSSO.selectProviderStep.saml.groupLabel"),options:[{id:"saml_okta",label:(0,z.G)("configureSSO.selectProviderStep.saml.okta"),iconId:"okta"},{id:"saml_microsoft",label:(0,z.G)("configureSSO.selectProviderStep.saml.microsoft"),iconId:"microsoft"},{id:"saml_google",label:(0,z.G)("configureSSO.selectProviderStep.saml.google"),iconId:"google"},{id:"saml_custom",label:(0,z.G)("configureSSO.selectProviderStep.saml.customSaml"),iconId:"saml"}]}],el=e=>{var i;return null==(i=ea.flatMap(e=>e.options).find(i=>i.id===e))?void 0:i.label},es=()=>{var e;let{organizationEnterpriseConnection:i,enterpriseConnectionMutations:{createConnection:t,changeProvider:d},contentRef:p}=(0,a.t)(),{goNext:u,goPrev:g,isFirstStep:m}=S(),{t:f}=(0,l._)(),[h,Y]=o.useState(null!=(e=i.provider)?e:null),v=(0,n.f0)(),[y,b]=o.useState(!1),[O,D]=o.useState(!1),[$,I]=o.useState(null),G=i.hasConnection&&null!==h&&h!==i.provider,M=async()=>{if(h){if(i.hasConnection&&h===i.provider)return void u();if(G){var e;I(null!=(e=i.provider)?e:null),D(!0);return}v.setError(void 0),b(!0);try{await t(h),u()}catch(e){(0,U.H4)(e,[],v.setError),b(!1)}}},R=async()=>{if(h){v.setError(void 0),b(!0);try{await d(h),u()}catch(e){(0,U.H4)(e,[],v.setError),D(!1),I(null),b(!1)}}},k=$?el($):void 0,E=h?el(h):void 0;return(0,r.Y)(F.n.Part,{part:"selectProvider",children:(0,r.FD)(_.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("select-provider"),children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.selectProviderStep.title"),description:(0,z.G)("configureSSO.selectProviderStep.subtitle")}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$5}),children:[ea.map(e=>(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOProviderGroup,elementId:C.$z.configureSSOProviderGroup.setId(e.id),gap:3,children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOProviderGroupLabel,elementId:C.$z.configureSSOProviderGroupLabel.setId(e.id),as:"label",variant:"subtitle",localizationKey:e.label}),(0,r.Y)(s.xA,{role:"radiogroup","aria-label":f(e.label),elementDescriptor:C.$z.configureSSOProviderGrid,gap:3,sx:{gridTemplateColumns:"repeat(2, 1fr)",[c.g.sm]:{gridTemplateColumns:"1fr"}},children:e.options.map(e=>(0,r.Y)(ec,{name:"configure-sso-provider",value:e.id,iconId:e.iconId,label:e.label,checked:h===e.id,onChange:()=>{Y(e.id)}},e.id))})]},e.id)),v.error&&(0,r.Y)(x.F,{variant:"danger",title:v.error,sx:e=>({margin:e.space.$3})})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Previous,{onClick:()=>g(),isDisabled:m||y}),(0,r.Y)(_.p.Footer.Continue,{onClick:M,isLoading:y&&!O,isDisabled:!h||y})]}),k&&E?(0,r.Y)(er,{isOpen:O,onClose:()=>{D(!1),I(null)},onConfirm:()=>{R()},isSubmitting:y,nextProviderLabel:E,currentProviderLabel:k,contentRef:p}):null]})})},ec=e=>{let{name:i,value:t,iconId:o,label:n,checked:a,onChange:c}=e,{t:d}=(0,l._)(),p=d(n);return(0,r.FD)(s.az,{as:"label",elementDescriptor:C.$z.configureSSOProviderCard,elementId:C.$z.configureSSOProviderCard.setId(t),isActive:a,sx:e=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:e.space.$2,height:e.sizes.$32,padding:e.space.$1x5,cursor:"pointer",position:"relative",...K.s.borderVariants(e).normal,"&:has(input:focus-visible)":{...K.s.focusRingStyles(e),borderColor:e.colors.$borderAlpha300},"&:hover":{backgroundColor:e.colors.$neutralAlpha50},"&:has(input:checked)":{backgroundColor:e.colors.$neutralAlpha50}}),children:[(0,r.Y)(s.AT,{elementDescriptor:C.$z.configureSSOProviderCardRadio,elementId:C.$z.configureSSOProviderCardRadio.setId(t),name:i,value:t,checked:a,onChange:c,focusRing:!1,sx:K.s.visuallyHidden()}),(0,r.Y)(s.L9,{elementDescriptor:C.$z.configureSSOProviderCardIcon,elementId:C.$z.configureSSOProviderCardIcon.setId(t),"aria-hidden":!0,sx:e=>{let i=en.has(o),t={width:e.sizes.$8,height:e.sizes.$8};return i?{...t,backgroundColor:e.colors.$colorForeground,maskImage:"url(".concat((0,et.at)(o),")"),maskSize:"contain",maskPosition:"center",maskRepeat:"no-repeat"}:{...t,backgroundImage:"url(".concat((0,et.at)(o),")"),backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOProviderCardLabel,elementId:C.$z.configureSSOProviderCardLabel.setId(t),as:"span",variant:"body",sx:e=>({color:e.colors.$colorForeground}),children:p})]})},ed=()=>{let{currentIndex:e,totalSteps:i}=S();return(0,r.Y)(_.p.Counter,{total:i,current:e+1})};var ep=t(71756),eu=t(59582);let eS=()=>{let{enterpriseConnection:e}=(0,a.t)(),[i,t]=o.useState(!1);return(null==e?void 0:e.active)&&!i?(0,r.Y)(x.F,{variant:"warning",title:(0,z.G)("configureSSO.configureStep.activeConnectionWarning.title"),dismissLabel:(0,z.G)("configureSSO.configureStep.activeConnectionWarning.dismiss"),onDismiss:()=>t(!0)}):null},eg=e=>{switch(e.mode){case"metadataUrl":return(0,r.Y)(ef,{form:e.form,labels:e.labels});case"metadataFile":return(0,r.Y)(eh,{form:e.form,labels:e.labels});case"manual":return(0,r.Y)(eY,{form:e.form,labels:e.labels})}},em=e=>(0,r.FD)(r.FK,{children:[(0,r.Y)(eg,{...e}),(0,r.Y)(eS,{})]}),ef=e=>{let{form:i,labels:t}=e;return(0,r.FD)(r.FK,{children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:t.description}),(0,r.Y)(R.l.ControlRow,{elementId:i.field.id,children:(0,r.Y)(R.l.PlainInput,{...i.field.props})})]})},eh=e=>{let{form:i,labels:t}=e;return(0,r.FD)(r.FK,{children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:t.description}),(0,r.Y)(eb,{field:i.field,file:i.file,onFileChange:i.onFileChange,existingFilePresent:!!i.existingFilePresent,labels:t,accept:".xml"})]})},eY=e=>{let{form:i,labels:t}=e;return(0,r.FD)(r.FK,{children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:t.description}),(0,r.Y)(R.l.ControlRow,{elementId:i.signOnUrlField.id,children:(0,r.Y)(R.l.PlainInput,{...i.signOnUrlField.props})}),(0,r.Y)(R.l.ControlRow,{elementId:i.issuerField.id,children:(0,r.Y)(R.l.PlainInput,{...i.issuerField.props})}),(0,r.Y)(eb,{field:i.certificateField,file:i.certFile,onFileChange:i.onCertFileChange,existingFilePresent:!!i.existingCertPresent,labels:t,accept:".pem,.key,.crt,.cer,.cert"})]})},ev=async e=>{let{mode:i,metadataUrl:t,metadataFile:r,manual:o}=e;if("metadataUrl"===i){if(!t)throw Error('metadataUrl values missing for mode "metadataUrl"');return{idpMetadataUrl:t.value.trim()}}if("metadataFile"===i){if(!(null==r?void 0:r.file))throw Error('metadataFile is missing for mode "metadataFile"');return{idpMetadata:await r.file.text()}}if(!o)throw Error('manual values missing for mode "manual"');let n={idpSsoUrl:o.signOnUrl.trim(),idpEntityId:o.issuer.trim()};return null!==o.certFile&&(n.idpCertificate=await o.certFile.text()),n},ey=function(e,i,t){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if((0,U.H4)(e,[t,...r],i.setError),(0,ep.$R)(e)){let r=e.errors.find(e=>{var i,t;return(null==(i=e.code)?void 0:i.startsWith("saml_"))&&!(null==(t=e.meta)?void 0:t.paramName)});r&&(t.setError(r),i.setError(void 0))}},eb=e=>{let{field:i,file:t,onFileChange:n,existingFilePresent:a,labels:c,accept:d}=e,{t:p}=(0,l._)(),u=o.useRef(null);return(0,r.Y)(s.az,{children:(0,r.FD)(M.D.Root,{...i.props,children:[(0,r.FD)(s.fv,{gap:2,children:[(0,r.Y)(M.D.LabelRow,{children:(0,r.Y)(M.D.Label,{})}),(0,r.Y)("input",{ref:u,type:"file",accept:d,multiple:!1,style:{display:"none"},onChange:e=>{var t,r;n(null!=(t=null==(r=e.target.files)?void 0:r[0])?t:null),i.clearFeedback()}}),null===t?(0,r.FD)(s.so,{align:"center",gap:2,sx:{alignSelf:"flex-start",flexWrap:"wrap"},children:[a&&(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOCertificateFileBadge,localizationKey:c.fileUploaded}),(0,r.FD)(s.$n,{elementDescriptor:C.$z.configureSSOCertificateUploadButton,size:"xs",variant:"outline",onClick:()=>{var e;return null==(e=u.current)?void 0:e.click()},children:[(0,r.Y)(s.In,{icon:eu.A,size:"sm",colorScheme:"neutral",sx:e=>({marginInlineEnd:e.space.$1})}),(0,r.Y)(s.EY,{as:"span",localizationKey:a?c.replaceFile:c.uploadFile})]})]}):(0,r.FD)(s.so,{align:"center",gap:2,sx:e=>({paddingTop:e.space.$1,paddingBottom:e.space.$1}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOCertificateFileName,as:"span",colorScheme:"secondary",variant:"buttonSmall",children:t.name}),(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOCertificateRemoveButton,variant:"ghost",colorScheme:"neutral","aria-label":p(c.removeFile),onClick:()=>{n(null),i.clearFeedback(),u.current&&(u.current.value="")},sx:e=>({padding:e.space.$1}),children:(0,r.Y)(s.In,{icon:E.A,size:"xs"})})]})]}),(0,r.Y)(M.D.Feedback,{})]})})};var eO=t(92386);let eD=e=>{let{modes:i,value:t,onChange:o,labels:n}=e,{t:a}=(0,l._)();return(0,r.Y)(eO.I.Root,{"aria-label":a(n.ariaLabel),value:t,onChange:e=>o(e),fullWidth:!0,size:"lg",children:i.map(e=>{let i=n[e];return i?(0,r.Y)(eO.I.Button,{value:e,text:i},e):null})})},e$=[{id:"create-app"},{id:"attribute-mapping"},{id:"assign-users"},{id:"identity-provider-metadata"}],ez=()=>{var e,i,t,o;let{goNext:n,goPrev:l,isFirstStep:c,isLastStep:d}=S(),{enterpriseConnection:p}=(0,a.t)(),u=null!=(e=null==p||null==(t=p.samlConnection)?void 0:t.acsUrl)?e:"",g=null!=(i=null==p||null==(o=p.samlConnection)?void 0:o.spEntityId)?i:"",m=(0,w.tJ)("acsUrl",u,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.createAppStep.serviceProviderFields.acsUrl.label"),isRequired:!1}),f=(0,w.tJ)("spEntityId",g,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.createAppStep.serviceProviderFields.spEntityId.label"),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlCustom.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlCustom.createAppStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.Y)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.createAppStep.createAppInstructions.paragraph")})}),(0,r.Y)(R.l.ControlRow,{elementId:m.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...m.props,children:(0,r.Y)(G.r,{value:u,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.Y)(R.l.ControlRow,{elementId:f.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(G.r,{value:g,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>l(),isDisabled:c}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>n(),isDisabled:d})]})]})},eF=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlCustom.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.paragraph")}),(0,r.Y)(ex,{})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eC=[{id:"email",isRequired:!0},{id:"firstName",isRequired:!1},{id:"lastName",isRequired:!1}],ex=()=>(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.attributeMappingTable.columns.attributeName")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.attributeMappingTable.columns.userAttribute")})})]})}),(0,r.Y)(s.NN,{children:eC.map(e=>(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Td,{children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".userAttribute"))}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOAttributeMappingBadge,elementId:C.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,z.G)(e.isRequired?"configureSSO.configureStep.attributeMappingTable.badges.required":"configureSSO.configureStep.attributeMappingTable.badges.optional")})]})}),(0,r.Y)(s.Td,{children:(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".attributeName"))})})]},e.id))})]}),eI=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlCustom.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlCustom.assignUsersStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.Y)(_.p.Section,{sx:e=>({gap:e.space.$3}),children:(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.assignUsersStep.paragraph")})})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eG=["metadataUrl","manual"],eM=()=>{var e,i,t;let l=(0,n.f0)(),{goNext:s,goPrev:c,isFirstStep:d}=S(),{enterpriseConnection:p,enterpriseConnectionMutations:{updateConnection:u}}=(0,a.t)(),g=null==p?void 0:p.samlConnection,m=!!((null==g?void 0:g.idpSsoUrl)||(null==g?void 0:g.idpEntityId)||(null==g?void 0:g.idpCertificate)||(null==g?void 0:g.idpMetadataUrl)),f=!!(null==g?void 0:g.idpCertificate),[h,Y]=o.useState(m?"manual":"metadataUrl"),[v,y]=o.useState(null),[b,O]=o.useState(!1),D=(0,w.tJ)("idpMetadataUrl",null!=(e=null==g?void 0:g.idpMetadataUrl)?e:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.metadataUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.metadataUrl.placeholder"),isRequired:!0}),$=(0,w.tJ)("idpSsoUrl",null!=(i=null==g?void 0:g.idpSsoUrl)?i:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signOnUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signOnUrl.placeholder"),isRequired:!0}),F=(0,w.tJ)("idpEntityId",null!=(t=null==g?void 0:g.idpEntityId)?t:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.issuer.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.issuer.placeholder"),isRequired:!0}),C=(0,w.tJ)("idpCertificate","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.label"),isRequired:!0}),x=D.value.trim(),I=$.value.trim(),G=F.value.trim(),M=null!==v||f,R=("metadataUrl"===h?x.length>0:I.length>0&&G.length>0&&M)&&!b,k="metadataUrl"===h?{mode:"metadataUrl",form:{field:D},labels:{description:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.metadataUrl.description")}}:{mode:"manual",form:{signOnUrlField:$,issuerField:F,certificateField:C,certFile:v,onCertFileChange:y,existingCertPresent:f},labels:{description:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.fileUploaded")}},E=async()=>{if(p&&R){l.setError(void 0),O(!0);try{let e=await ev({mode:h,metadataUrl:{value:D.value},manual:{signOnUrl:$.value,issuer:F.value,certFile:v}});await u(p.id,{saml:e}),s()}catch(e){"metadataUrl"===h?ey(e,l,D):ey(e,l,$,[F,C]),O(!1)}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlCustom.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{fill:!0,gap:5,children:[(0,r.Y)(eD,{modes:eG,value:h,onChange:e=>{l.setError(void 0),Y(e)},labels:{ariaLabel:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.modes.ariaLabel"),metadataUrl:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.modes.metadataUrl"),manual:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.modes.manual")}}),(0,r.Y)(em,{...k})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>c(),isDisabled:d||b}),(0,r.Y)(_.p.Footer.Continue,{onClick:E,isLoading:b,isDisabled:!R})]})]})},eR=[{id:"create-app"},{id:"attribute-mapping"},{id:"assign-users"},{id:"identity-provider-metadata"}],ek=()=>{var e,i,t,o;let{goNext:n,goPrev:l,isFirstStep:c,isLastStep:d}=S(),{enterpriseConnection:p}=(0,a.t)(),u=null!=(e=null==p||null==(t=p.samlConnection)?void 0:t.acsUrl)?e:"",g=null!=(i=null==p||null==(o=p.samlConnection)?void 0:o.spEntityId)?i:"",m=(0,w.tJ)("acsUrl",u,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.serviceProviderFields.acsUrl.label"),isRequired:!1}),f=(0,w.tJ)("spEntityId",g,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.serviceProviderFields.spEntityId.label"),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlOkta.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.step4")})]})]}),(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.title")}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.paragraph1")}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.paragraph2")})]}),(0,r.Y)(R.l.ControlRow,{elementId:m.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...m.props,children:(0,r.Y)(G.r,{value:u,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.Y)(R.l.ControlRow,{elementId:f.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(G.r,{value:g,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.completeSamlIntegrationInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.completeSamlIntegrationInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.completeSamlIntegrationInstructions.step2")})]})]})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>l(),isDisabled:c}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>n(),isDisabled:d})]})]})},eE=[{id:"email",isRequired:!0},{id:"firstName",isRequired:!1},{id:"lastName",isRequired:!1}],eP=()=>(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.attributeMappingTable.columns.name")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.attributeMappingTable.columns.expression")})})]})}),(0,r.Y)(s.NN,{children:eE.map(e=>(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Td,{children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".name"))}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOAttributeMappingBadge,elementId:C.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,z.G)(e.isRequired?"configureSSO.configureStep.attributeMappingTable.badges.required":"configureSSO.configureStep.attributeMappingTable.badges.optional")})]})}),(0,r.Y)(s.Td,{children:(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".expression"))})})]},e.id))})]}),eT=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlOkta.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.paragraph")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.step2")})]}),(0,r.Y)(eP,{})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eA=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlOkta.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.paragraph")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step4")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step5")})]})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eK=["metadataUrl","manual"],ew=()=>{var e,i,t;let l=(0,n.f0)(),{goNext:s,goPrev:c,isFirstStep:d}=S(),{enterpriseConnection:p,enterpriseConnectionMutations:{updateConnection:u}}=(0,a.t)(),g=null==p?void 0:p.samlConnection,m=!!((null==g?void 0:g.idpSsoUrl)||(null==g?void 0:g.idpEntityId)||(null==g?void 0:g.idpCertificate)||(null==g?void 0:g.idpMetadataUrl)),f=!!(null==g?void 0:g.idpCertificate),[h,Y]=o.useState(m?"manual":"metadataUrl"),[v,y]=o.useState(null),[b,O]=o.useState(!1),D=(0,w.tJ)("idpMetadataUrl",null!=(e=null==g?void 0:g.idpMetadataUrl)?e:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.metadataUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.metadataUrl.placeholder"),isRequired:!0}),$=(0,w.tJ)("idpSsoUrl",null!=(i=null==g?void 0:g.idpSsoUrl)?i:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signOnUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signOnUrl.placeholder"),isRequired:!0}),F=(0,w.tJ)("idpEntityId",null!=(t=null==g?void 0:g.idpEntityId)?t:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.issuer.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.issuer.placeholder"),isRequired:!0}),C=(0,w.tJ)("idpCertificate","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.label"),isRequired:!0}),x=D.value.trim(),I=$.value.trim(),G=F.value.trim(),M=null!==v||f,R=("metadataUrl"===h?x.length>0:I.length>0&&G.length>0&&M)&&!b,k="metadataUrl"===h?{mode:"metadataUrl",form:{field:D},labels:{description:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.metadataUrl.description")}}:{mode:"manual",form:{signOnUrlField:$,issuerField:F,certificateField:C,certFile:v,onCertFileChange:y,existingCertPresent:f},labels:{description:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.fileUploaded")}},E=async()=>{if(p&&R){l.setError(void 0),O(!0);try{let e=await ev({mode:h,metadataUrl:{value:D.value},manual:{signOnUrl:$.value,issuer:F.value,certFile:v}});await u(p.id,{saml:e}),s()}catch(e){"metadataUrl"===h?ey(e,l,D):ey(e,l,$,[F,C]),O(!1)}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlOkta.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{fill:!0,gap:5,children:[(0,r.Y)(eD,{modes:eK,value:h,onChange:e=>{l.setError(void 0),Y(e)},labels:{ariaLabel:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.modes.ariaLabel"),metadataUrl:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.modes.metadataUrl"),manual:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.modes.manual")}}),(0,r.Y)(em,{...k})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>c(),isDisabled:d||b}),(0,r.Y)(_.p.Footer.Continue,{onClick:E,isLoading:b,isDisabled:!R})]})]})},eU=[{id:"create-app"},{id:"identity-provider-metadata"},{id:"service-provider"},{id:"attribute-mapping"},{id:"configure-user-access"}],e_=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.Y)(_.p.Section,{sx:e=>({gap:e.space.$5}),children:(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.step4")})]})]})})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eL=["metadataFile","manual"],eB=()=>{var e,i;let t=(0,n.f0)(),{goNext:l,goPrev:s,isFirstStep:c}=S(),{enterpriseConnection:d,enterpriseConnectionMutations:{updateConnection:p}}=(0,a.t)(),u=null==d?void 0:d.samlConnection,g=!!((null==u?void 0:u.idpSsoUrl)||(null==u?void 0:u.idpEntityId)||(null==u?void 0:u.idpCertificate)),m=!!(null==u?void 0:u.idpCertificate),f=!!(null==u?void 0:u.idpMetadata),[h,Y]=o.useState(g?"manual":"metadataFile"),[v,y]=o.useState(null),[b,O]=o.useState(null),[D,$]=o.useState(!1),F=(0,w.tJ)("idpMetadata","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.label"),isRequired:!0}),C=(0,w.tJ)("idpSsoUrl",null!=(e=null==u?void 0:u.idpSsoUrl)?e:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signOnUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signOnUrl.placeholder"),isRequired:!0}),x=(0,w.tJ)("idpEntityId",null!=(i=null==u?void 0:u.idpEntityId)?i:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.issuer.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.issuer.placeholder"),isRequired:!0}),I=(0,w.tJ)("idpCertificate","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.label"),isRequired:!0}),G=C.value.trim(),M=x.value.trim(),R=null!==b||m,k=null!==v||f,E=("metadataFile"===h?k:G.length>0&&M.length>0&&R)&&!D,P="metadataFile"===h?{mode:"metadataFile",form:{field:F,file:v,onFileChange:y,existingFilePresent:f},labels:{description:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.fileUploaded")}}:{mode:"manual",form:{signOnUrlField:C,issuerField:x,certificateField:I,certFile:b,onCertFileChange:O,existingCertPresent:m},labels:{description:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.fileUploaded")}},T=async()=>{if(d&&E){t.setError(void 0),$(!0);try{let e=await ev({mode:h,metadataFile:{file:v},manual:{signOnUrl:C.value,issuer:x.value,certFile:b}});await p(d.id,{saml:e}),l()}catch(e){"metadataFile"===h?ey(e,t,F):ey(e,t,C,[x,I]),$(!1)}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{fill:!0,gap:5,children:[(0,r.Y)(eD,{modes:eL,value:h,onChange:e=>{t.setError(void 0),Y(e)},labels:{ariaLabel:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.modes.ariaLabel"),metadataFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.modes.metadataFile"),manual:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.modes.manual")}}),(0,r.Y)(em,{...P})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>s(),isDisabled:c||D}),(0,r.Y)(_.p.Footer.Continue,{onClick:T,isLoading:D,isDisabled:!E})]})]})},eH=()=>{var e,i,t,o;let{goNext:n,goPrev:l,isFirstStep:c,isLastStep:d}=S(),{enterpriseConnection:p}=(0,a.t)(),u=null!=(e=null==p||null==(t=p.samlConnection)?void 0:t.acsUrl)?e:"",g=null!=(i=null==p||null==(o=p.samlConnection)?void 0:o.spEntityId)?i:"",m=(0,w.tJ)("acsUrl",u,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.serviceProviderFields.acsUrl.label"),isRequired:!1}),f=(0,w.tJ)("spEntityId",g,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.serviceProviderFields.spEntityId.label"),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.title")}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.paragraph")})]}),(0,r.Y)(R.l.ControlRow,{elementId:m.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...m.props,children:(0,r.Y)(G.r,{value:u,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.Y)(R.l.ControlRow,{elementId:f.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(G.r,{value:g,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.nameIdInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.nameIdInstructions.step2")})]})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>l(),isDisabled:c}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>n(),isDisabled:d})]})]})},eW=[{id:"email",isRequired:!0},{id:"firstName",isRequired:!1},{id:"lastName",isRequired:!1}],eq=()=>(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.columns.googleAttribute")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.columns.appAttribute")})})]})}),(0,r.Y)(s.NN,{children:eW.map(e=>(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Td,{children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".googleAttribute"))}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOAttributeMappingBadge,elementId:C.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,z.G)(e.isRequired?"configureSSO.configureStep.attributeMappingTable.badges.required":"configureSSO.configureStep.attributeMappingTable.badges.optional")})]})}),(0,r.Y)(s.Td,{children:(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".appAttribute"))})})]},e.id))})]}),eN=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.paragraph")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.step2")})]}),(0,r.Y)(eq,{})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eV=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.paragraph1")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.step3")})]}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.paragraph2")})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})};var eJ=t(58087),eZ=t(5747);let ej=[{id:"create-app"},{id:"service-provider"},{id:"attribute-mapping"},{id:"identity-provider-metadata"}],eX=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlMicrosoft.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step3")}),(0,r.FD)(s.az,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",sx:e=>({fontSize:e.fontSizes.$md,lineHeight:e.lineHeights.$small,color:e.colors.$colorMutedForeground}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step4.label")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,marginBlockStart:e.space.$1x5,marginBlockEnd:0,paddingInlineStart:e.space.$5,listStyleType:"circle"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step4.subSteps.appName")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step4.subSteps.nonGallery")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step4.subSteps.create")})]})]})]})]}),(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step4")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step5")})]})]})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eQ=()=>{var e,i,t,o;let{goNext:n,goPrev:l,isFirstStep:c,isLastStep:d}=S(),{enterpriseConnection:p}=(0,a.t)(),u=null!=(e=null==p||null==(t=p.samlConnection)?void 0:t.acsUrl)?e:"",g=null!=(i=null==p||null==(o=p.samlConnection)?void 0:o.spEntityId)?i:"",m=(0,w.tJ)("spEntityId",g,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.serviceProviderFields.spEntityId.label"),isRequired:!1}),f=(0,w.tJ)("acsUrl",u,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.serviceProviderFields.acsUrl.label"),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlMicrosoft.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.Y)(_.p.Section,{sx:e=>({gap:e.space.$5}),children:(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step4")}),(0,r.FD)(s.az,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",sx:e=>({fontSize:e.fontSizes.$md,lineHeight:e.lineHeights.$small,color:e.colors.$colorMutedForeground}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step5")}),(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$4,marginBlock:e.space.$3}),children:[(0,r.Y)(R.l.ControlRow,{elementId:m.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...m.props,children:(0,r.Y)(G.r,{value:g,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.Y)(R.l.ControlRow,{elementId:f.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(G.r,{value:u,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})})]})]}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step6")})]})]})})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>l(),isDisabled:c}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>n(),isDisabled:d})]})]})},e0=[{id:"email",isRequired:!0},{id:"firstName",isRequired:!1},{id:"lastName",isRequired:!1}],e1=e=>{let{claimNameKey:i}=e,{t}=(0,l._)(),o=t(i),{onCopy:n,hasCopied:a}=(0,eJ.i)(o);return(0,r.Y)(s.Td,{sx:{maxWidth:0,width:"100%"},children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$1}),children:[(0,r.FD)(k.m_.Root,{children:[(0,r.Y)(k.m_.Trigger,{children:(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace",display:"block",whiteSpace:"nowrap"},children:(0,eZ.W)(o,32,12)})}),(0,r.Y)(k.m_.Content,{text:i,textSx:{overflowWrap:"anywhere"}})]}),(0,r.Y)(s.$n,{variant:"ghost",onClick:()=>n(),"aria-label":t((0,z.G)(a?"configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.copyClaimNameCopied":"configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.copyClaimName")),sx:e=>({padding:0,height:e.sizes.$5,aspectRatio:1,borderRadius:e.radii.$sm,color:e.colors.$colorMutedForeground}),children:(0,r.Y)(s.In,{size:"sm",icon:a?A.A:T.A,"aria-hidden":!0})})]})})},e5=()=>(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.columns.attribute")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.columns.claimName")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.columns.value")})})]})}),(0,r.Y)(s.NN,{children:e0.map(e=>{let i=(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".claimName"));return(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Td,{sx:{whiteSpace:"nowrap"},children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".attribute"))}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOAttributeMappingBadge,elementId:C.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,z.G)(e.isRequired?"configureSSO.configureStep.attributeMappingTable.badges.required":"configureSSO.configureStep.attributeMappingTable.badges.optional")})]})}),(0,r.Y)(e1,{claimNameKey:i}),(0,r.Y)(s.Td,{children:(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".value"))})})]},e.id)})})]}),e3=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlMicrosoft.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",elementDescriptor:C.$z.configureSSOInstructionsHeading,localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.step2")})]}),(0,r.Y)(e5,{})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(_.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},e2=["metadataUrl","manual"],e4=()=>{var e,i,t;let l=(0,n.f0)(),{goNext:s,goPrev:c,isFirstStep:d}=S(),{enterpriseConnection:p,enterpriseConnectionMutations:{updateConnection:u}}=(0,a.t)(),g=null==p?void 0:p.samlConnection,m=!!((null==g?void 0:g.idpSsoUrl)||(null==g?void 0:g.idpEntityId)||(null==g?void 0:g.idpCertificate)||(null==g?void 0:g.idpMetadataUrl)),f=!!(null==g?void 0:g.idpCertificate),[h,Y]=o.useState(m?"manual":"metadataUrl"),[v,y]=o.useState(null),[b,O]=o.useState(!1),D=(0,w.tJ)("idpMetadataUrl",null!=(e=null==g?void 0:g.idpMetadataUrl)?e:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.metadataUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.metadataUrl.placeholder"),isRequired:!0}),$=(0,w.tJ)("idpSsoUrl",null!=(i=null==g?void 0:g.idpSsoUrl)?i:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signOnUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signOnUrl.placeholder"),isRequired:!0}),F=(0,w.tJ)("idpEntityId",null!=(t=null==g?void 0:g.idpEntityId)?t:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.issuer.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.issuer.placeholder"),isRequired:!0}),C=(0,w.tJ)("idpCertificate","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.label"),isRequired:!0}),x=D.value.trim(),I=$.value.trim(),G=F.value.trim(),M=null!==v||f,R=("metadataUrl"===h?x.length>0:I.length>0&&G.length>0&&M)&&!b,k="metadataUrl"===h?{mode:"metadataUrl",form:{field:D},labels:{description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.metadataUrl.description")}}:{mode:"manual",form:{signOnUrlField:$,issuerField:F,certificateField:C,certFile:v,onCertFileChange:y,existingCertPresent:f},labels:{description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.fileUploaded")}},E=async()=>{if(p&&R){l.setError(void 0),O(!0);try{let e=await ev({mode:h,metadataUrl:{value:D.value},manual:{signOnUrl:$.value,issuer:F.value,certFile:v}});await u(p.id,{saml:e}),s()}catch(e){"metadataUrl"===h?ey(e,l,D):ey(e,l,$,[F,C]),O(!1)}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlMicrosoft.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{fill:!0,gap:5,children:[(0,r.Y)(eD,{modes:e2,value:h,onChange:e=>{l.setError(void 0),Y(e)},labels:{ariaLabel:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.modes.ariaLabel"),metadataUrl:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.modes.metadataUrl"),manual:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.modes.manual")}}),(0,r.Y)(em,{...k})]})}),(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>c(),isDisabled:d||b}),(0,r.Y)(_.p.Footer.Continue,{onClick:E,isLoading:b,isDisabled:!R})]})]})},e9={saml_custom:()=>(0,r.FD)(O,{steps:e$,initialStepId:e$[0].id,children:[(0,r.Y)(O.Match,{id:"create-app",children:(0,r.Y)(ez,{})}),(0,r.Y)(O.Match,{id:"attribute-mapping",children:(0,r.Y)(eF,{})}),(0,r.Y)(O.Match,{id:"assign-users",children:(0,r.Y)(eI,{})}),(0,r.Y)(O.Match,{id:"identity-provider-metadata",children:(0,r.Y)(eM,{})})]}),saml_okta:()=>(0,r.FD)(O,{steps:eR,initialStepId:eR[0].id,children:[(0,r.Y)(O.Match,{id:"create-app",children:(0,r.Y)(ek,{})}),(0,r.Y)(O.Match,{id:"attribute-mapping",children:(0,r.Y)(eT,{})}),(0,r.Y)(O.Match,{id:"assign-users",children:(0,r.Y)(eA,{})}),(0,r.Y)(O.Match,{id:"identity-provider-metadata",children:(0,r.Y)(ew,{})})]}),saml_google:()=>(0,r.FD)(O,{steps:eU,initialStepId:eU[0].id,children:[(0,r.Y)(O.Match,{id:"create-app",children:(0,r.Y)(e_,{})}),(0,r.Y)(O.Match,{id:"identity-provider-metadata",children:(0,r.Y)(eB,{})}),(0,r.Y)(O.Match,{id:"service-provider",children:(0,r.Y)(eH,{})}),(0,r.Y)(O.Match,{id:"attribute-mapping",children:(0,r.Y)(eN,{})}),(0,r.Y)(O.Match,{id:"configure-user-access",children:(0,r.Y)(eV,{})})]}),saml_microsoft:()=>(0,r.FD)(O,{steps:ej,initialStepId:ej[0].id,children:[(0,r.Y)(O.Match,{id:"create-app",children:(0,r.Y)(eX,{})}),(0,r.Y)(O.Match,{id:"service-provider",children:(0,r.Y)(eQ,{})}),(0,r.Y)(O.Match,{id:"attribute-mapping",children:(0,r.Y)(e3,{})}),(0,r.Y)(O.Match,{id:"identity-provider-metadata",children:(0,r.Y)(e4,{})})]})},e6=()=>{let{organizationEnterpriseConnection:e}=(0,a.t)(),{direction:i}=S(),t=o.useMemo(()=>[{id:"select-provider"},{id:"configure-provider",isReachable:()=>e.hasConnection}],[e]);return(0,r.FD)(O,{steps:t,initialStepId:1===i?"select-provider":void 0,children:[(0,r.Y)(O.Match,{id:"select-provider",children:(0,r.Y)(n.pe,{children:(0,r.Y)(es,{})})}),(0,r.Y)(O.Match,{id:"configure-provider",children:(0,r.Y)(n.pe,{children:(0,r.Y)(e7,{})})})]})},e7=()=>{let{organizationEnterpriseConnection:e}=(0,a.t)();if(!e.provider)return null;let i=e9[e.provider];if(!i)throw Error("No steps found for provider: ".concat(e.provider));return(0,r.Y)(F.n.Part,{part:"configureCreateApp",children:(0,r.Y)(_.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("configure"),children:(0,r.Y)(i,{})})})};var e8=t(66923),ie=t(4874),ii=t(39632),it=t(9982),ir=t(54657),io=t(69154);t(96954),t(50260);var ia=t(70408);let il={saml_user_attribute_missing:{kind:"steps",introKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.intro"),stepKeys:[(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step1"),(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step2"),(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step3")]},saml_response_relaystate_missing:{kind:"description",descriptionKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_response_relaystate_missing.description")},saml_email_address_domain_mismatch:{kind:"description",descriptionKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_email_address_domain_mismatch.description")},oauth_access_denied:{kind:"description",descriptionKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_access_denied.description")},oauth_token_exchange_error:{kind:"description",descriptionKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_token_exchange_error.description")},oauth_fetch_user_error:{kind:"steps",introKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.intro"),stepKeys:[(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.step1"),(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.step2")]}},is=e=>{let{errorCode:i}=e;if(!i)return null;let t=il[i];if(!t)return null;let o="".concat("https://clerk.com/docs/guides/organizations/add-members/sso","#").concat(i.replaceAll("_","-"));return(0,r.FD)(s.so,{elementDescriptor:C.$z.configureSSOTestRunHowToFixSection,direction:"col",gap:3,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,paddingTop:e.space.$4}),children:[(0,r.Y)(s.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.sectionTitle")}),(0,r.FD)(s.az,{sx:e=>({padding:e.space.$3,backgroundColor:e.colors.$colorBackground,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$md,boxShadow:e.shadows.$cardContentShadow}),children:[(0,r.Y)(ic,{content:t}),(0,r.FD)(s.N_,{elementDescriptor:C.$z.configureSSOTestRunHowToFixDocsLink,href:o,target:"_blank",rel:"noopener noreferrer",sx:e=>({alignSelf:"flex-start",display:"inline-flex",alignItems:"center",gap:e.space.$1x5,paddingBlock:e.space.$1,paddingInline:e.space.$3,borderRadius:e.radii.$md,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,color:e.colors.$colorForeground,fontSize:e.fontSizes.$sm,fontWeight:e.fontWeights.$medium,textDecoration:"none",marginTop:e.space.$2,"&:hover":{backgroundColor:e.colors.$neutralAlpha50,textDecoration:"none"}}),children:[(0,r.Y)(s.L9,{localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.actionLabel__viewDocumentation")}),(0,r.Y)(s.In,{icon:ia.A,size:"sm"})]})]})]})},ic=e=>{let{content:i}=e;return"description"===i.kind?(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:i.descriptionKey}):(0,r.FD)(s.so,{direction:"col",gap:2,children:[i.introKey?(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:i.introKey}):null,(0,r.Y)(s.az,{as:"ol",sx:e=>({margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal",display:"flex",flexDirection:"column",gap:e.space.$1}),children:i.stepKeys.map(e=>(0,r.Y)(s.az,{as:"li",sx:e=>({color:e.colors.$colorMutedForeground,fontSize:e.fontSizes.$sm,"&::marker":{color:e.colors.$colorMutedForeground,fontSize:e.fontSizes.$sm}}),children:(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:e})},e.key))})]})},id=()=>{let{goPrev:e}=S(),{organizationEnterpriseConnection:i,testRuns:t}=(0,a.t)(),o=(0,n.f0)(),{rows:l,totalCount:c,isLoading:d,isFetching:p,isPolling:u,page:g,setPage:m,refresh:f}=t,h=(0,it.P)(p&&!d),Y=c?Math.ceil(c/5):0;return(0,r.Y)(F.n.Part,{part:"testSso",children:(0,r.FD)(_.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("test"),children:[(0,r.Y)(_.p.Header,{title:(0,z.G)("configureSSO.testConfigurationStep.title")}),(0,r.FD)(_.p.Body,{children:[(0,r.Y)(_.p.Section,{sx:e=>({borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,r.FD)(s.fv,{gap:3,children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.subtitle")}),(0,r.Y)(iO,{onTestRunCreated:()=>{m(1),f({armPolling:!0})}})]})}),(0,r.FD)(_.p.Section,{sx:e=>({flex:1,minHeight:0,gap:e.space.$3}),children:[(0,r.FD)(s.so,{align:"center",justify:"between",sx:e=>({gap:e.space.$2,flexShrink:0}),children:[(0,r.Y)(s.EY,{variant:"subtitle",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.title")}),(0,r.FD)(s.$n,{elementDescriptor:C.$z.configureSSOTestRefreshButton,variant:"bordered",colorScheme:"secondary",size:"xs",onClick:()=>void f(),isDisabled:h,sx:e=>({gap:e.space.$1x5}),children:[h?(0,r.Y)(s.y$,{elementDescriptor:C.$z.spinner,size:"xs"}):(0,r.Y)(s.In,{icon:P.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.actionLabel__refresh")})]})]}),(0,r.Y)(s.fv,{sx:{flex:1,minHeight:0},children:(0,r.Y)(iu,{rows:l,isPolling:u,isLoading:d,page:g,pageCount:Y,pageSize:5,totalCount:null!=c?c:0,onPageChange:m})})]})]}),o.error?(0,r.Y)(s.az,{elementDescriptor:C.$z.configureSSOTestError,sx:e=>({flexShrink:0,paddingInline:e.space.$5,paddingBlock:e.space.$3,borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100}),children:(0,r.Y)(s.EY,{as:"p",variant:"body",sx:e=>({color:e.colors.$danger500,fontSize:e.fontSizes.$sm}),children:o.error})}):null,(0,r.FD)(_.p.Footer,{children:[(0,r.Y)(_.p.Footer.Reset,{}),(0,r.Y)(_.p.Footer.Previous,{onClick:()=>e()}),(0,r.Y)(ip,{hasSuccessfulTestRun:i.hasSuccessfulTestRun})]})]})})},ip=e=>{let{hasSuccessfulTestRun:i}=e,{t}=(0,l._)(),o=(0,n.f0)(),{goNext:a}=S();return(0,r.Y)(_.p.Footer.Continue,{onClick:()=>{if(i){o.setError(void 0),a();return}o.setError(t((0,z.G)("configureSSO.testConfigurationStep.error__noSuccessfulTestRun")))}})},iu=e=>{var i,t;let{rows:n,isLoading:d,isPolling:p,page:u,pageCount:S,pageSize:g,totalCount:m,onPageChange:f}=e,{t:h}=(0,l._)(),{contentRef:Y}=(0,a.t)(),[v,y]=(0,o.useState)(null),b=(null==v?void 0:v.status)==="failed"&&(null==(t=v.logs)||null==(i=t[0])?void 0:i.shortMessage)||h((0,z.G)("configureSSO.testConfigurationStep.testRunDetails.title"));return(0,r.FD)(r.FK,{children:[(0,r.Y)(s.so,{direction:"col",sx:e=>({width:"100%",flex:"0 1 auto",minHeight:0,overflowY:"auto",borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$lg,...K.s.unstyledScrollbar(e),[c.g.sm]:{overflowX:"auto",padding:e.space.$0x25}}),children:(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOTestResultsTable,tableHeadVisuallyHidden:!n.length,sx:e=>({background:e.colors.$colorBackground,"&&":{border:"none",borderRadius:0}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.timestamp")}),(0,r.Y)(s.Th,{localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.sectionTitle")}),(0,r.Y)(s.Th,{localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.status")})]})}),(0,r.Y)(s.NN,{children:d||p?(0,r.Y)(s.Tr,{children:(0,r.Y)(s.Td,{colSpan:3,children:(0,r.FD)(s.so,{direction:"col",align:"center",gap:2,sx:e=>({padding:"".concat(e.space.$10," 0")}),children:[(0,r.Y)(s.y$,{colorScheme:"primary",elementDescriptor:C.$z.configureSSOTestResultsLoadingSpinner}),(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:p?(0,z.G)("configureSSO.testConfigurationStep.testResults.polling"):void 0})]})})}):n.length?n.map(e=>(0,r.FD)(s.Tr,{elementDescriptor:C.$z.configureSSOTestResultsRow,onClick:()=>y(e),sx:e=>({cursor:"pointer","&:hover > td":{backgroundColor:e.colors.$neutralAlpha50}}),children:[(0,r.Y)(s.Td,{children:(0,r.Y)(ig,{testRun:e})}),(0,r.Y)(s.Td,{children:(0,r.Y)(iy,{testRun:e})}),(0,r.Y)(s.Td,{children:(0,r.Y)(ib,{testRun:e})})]},e.id)):(0,r.Y)(s.Tr,{children:(0,r.Y)(s.Td,{colSpan:3,children:(0,r.FD)(s.so,{elementDescriptor:C.$z.configureSSOTestResultsEmpty,direction:"col",align:"center",justify:"center",sx:e=>({padding:"".concat(e.space.$10," 0"),flex:1,gap:e.space.$1,textAlign:"center"}),children:[(0,r.Y)(s.EY,{variant:"subtitle",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.empty.title")}),(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.empty.subtitle")})]})})})})]})}),S>1?(0,r.Y)(s.az,{sx:{flexShrink:0},children:(0,r.Y)(ii.d,{page:Math.min(u,S),count:S,onChange:f,siblingCount:1,rowInfo:{allRowsCount:m,startingRow:m>0?Math.max(0,(u-1)*g)+1:0,endingRow:Math.min(u*g,m)}})}):null,(0,r.FD)(e8.Drawer.Root,{open:null!==v,onOpenChange:e=>{e||y(null)},strategy:"absolute",portalProps:{root:Y},children:[(0,r.Y)(e8.Drawer.Overlay,{}),(0,r.FD)(e8.Drawer.Content,{children:[(0,r.Y)(e8.Drawer.Header,{title:b}),v?(0,r.Y)(ih,{testRun:v}):null]})]})]})},iS=e=>{let{locale:i}=(0,l._)();return e.createdAt?{time:new Intl.DateTimeFormat(i,{timeStyle:"medium"}).format(e.createdAt),day:new Intl.DateTimeFormat(i,{month:"short",day:"numeric"}).format(e.createdAt)}:null},ig=e=>{let{testRun:i}=e,t=iS(i);return t?(0,r.FD)(s.so,{gap:2,align:"baseline",sx:{whiteSpace:"nowrap"},children:[(0,r.Y)(s.EY,{children:t.time}),(0,r.Y)(s.EY,{colorScheme:"secondary",children:t.day})]}):null},im=e=>{let{title:i,children:t}=e;return(0,r.FD)(s.az,{as:"div",sx:e=>({display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:e.space.$2}),children:[(0,r.Y)(s.Dt,{localizationKey:i,sx:e=>({color:e.colors.$colorForeground,...K.s.textVariants(e).subtitle})}),(0,r.Y)(s.Dd,{sx:e=>({display:"grid",justifyContent:"end",color:e.colors.$colorForeground}),children:t})]})},ih=e=>{var i;let{testRun:t}=e,o=iS(t),n="failed"===t.status?null==(i=t.logs)?void 0:i[0]:null;return(0,r.FD)(e8.Drawer.Body,{sx:e=>({display:"flex",flexDirection:"column",flex:1,overflowY:"auto",padding:e.space.$4,gap:e.space.$4}),children:[(0,r.Y)(s.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.sectionTitle")}),(0,r.FD)(s.Dl,{sx:e=>({display:"grid",gridRowGap:e.space.$2}),children:[o?(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.timestamp"),children:(0,r.FD)(s.so,{gap:2,align:"baseline",sx:{whiteSpace:"nowrap"},children:[(0,r.Y)(s.EY,{children:o.time}),(0,r.Y)(s.EY,{colorScheme:"secondary",children:o.day})]})}):null,"failed"===t.status?(null==n?void 0:n.code)?(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.errorCode"),children:(0,r.Y)(s.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:n.code})}):null:(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.status"),children:(0,r.Y)(ib,{testRun:t})})]}),"failed"===t.status&&(null==n?void 0:n.message)?(0,r.Y)(iv,{message:n.message}):null,"failed"===t.status?(0,r.Y)(is,{errorCode:null==n?void 0:n.code}):null,"success"===t.status?(0,r.Y)(iY,{parsedUserInfo:t.parsedUserInfo}):null]})},iY=e=>{let{parsedUserInfo:i}=e;return(null==i?void 0:i.emailAddress)||(null==i?void 0:i.firstName)?(0,r.FD)(s.so,{elementDescriptor:C.$z.configureSSOTestRunParsedUserInfo,direction:"col",gap:3,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,paddingTop:e.space.$4}),children:[(0,r.Y)(s.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.sectionTitle")}),(0,r.FD)(s.Dl,{sx:e=>({display:"grid",gridRowGap:e.space.$2}),children:[i.emailAddress?(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.email"),children:(0,r.Y)(s.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:i.emailAddress})}):null,i.firstName?(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.firstName"),children:(0,r.Y)(s.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:i.firstName})}):null]})]}):null},iv=e=>{let{message:i}=e,{t}=(0,l._)(),{onCopy:o,hasCopied:n}=(0,eJ.i)(i),a=t((0,z.G)(n?"configureSSO.testConfigurationStep.testRunDetails.runDetails.actionLabel__copied":"configureSSO.testConfigurationStep.testRunDetails.runDetails.actionLabel__copy"));return(0,r.FD)(s.so,{direction:"col",gap:2,children:[(0,r.FD)(s.so,{justify:"between",align:"center",gap:4,children:[(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.fullMessage")}),(0,r.Y)(ie.K,{elementDescriptor:C.$z.configureSSOTestRunFullMessageCopyButton,variant:"ghost",colorScheme:"neutral",size:"xs",icon:n?A.A:ir.A,"aria-label":a,onClick:()=>o()})]}),(0,r.Y)(s.az,{elementDescriptor:C.$z.configureSSOTestRunFullMessage,as:"pre",sx:e=>({margin:0,padding:e.space.$3,backgroundColor:e.colors.$colorBackground,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$md,boxShadow:e.shadows.$cardContentShadow,fontFamily:e.fonts.$mono,fontSize:e.fontSizes.$sm,color:e.colors.$colorForeground,whiteSpace:"pre-wrap",wordBreak:"break-word"}),children:i})]})},iy=e=>{var i,t,o;let{testRun:n}=e;return"pending"===n.status?(0,r.Y)(s.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(s.EY,{children:"-"})}):"success"===n.status?(0,r.Y)(s.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(s.EY,{children:null==(o=n.parsedUserInfo)?void 0:o.emailAddress})}):(0,r.Y)(s.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(s.EY,{children:null==(t=n.logs)||null==(i=t[0])?void 0:i.shortMessage})})},ib=e=>{let{testRun:i}=e;return"success"===i.status?(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOTestRunStatusBadge,elementId:C.$z.configureSSOTestRunStatusBadge.setId("success"),colorScheme:"success",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.status__success")}):"failed"===i.status?(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOTestRunStatusBadge,elementId:C.$z.configureSSOTestRunStatusBadge.setId("failed"),colorScheme:"danger",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.status__failed")}):(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOTestRunStatusBadge,elementId:C.$z.configureSSOTestRunStatusBadge.setId("pending"),colorScheme:"warning",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.status__pending")})},iO=e=>{let{onTestRunCreated:i}=e,t=(0,n.f0)(),{enterpriseConnection:l,enterpriseConnectionMutations:{createTestRun:c}}=(0,a.t)(),[d,p]=(0,o.useState)(!1);return(0,r.FD)(s.$n,{elementDescriptor:C.$z.configureSSOTestUrlOpenButton,id:"testSsoUrl",variant:"bordered",colorScheme:"secondary",size:"xs",onClick:()=>{l&&(p(!0),c(l.id).then(e=>{let{url:t}=e;null==i||i(t),window.open(t,"_blank","noopener,noreferrer")}).catch(e=>(0,U.H4)(e,[],t.setError)).finally(()=>p(!1)))},isDisabled:d,sx:e=>({gap:e.space.$1x5,width:"fit-content"}),children:[d?(0,r.Y)(s.y$,{elementDescriptor:C.$z.spinner,size:"sm"}):(0,r.Y)(s.In,{icon:io.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testUrl.actionLabel__open")})]})};var iD=t(75051),i$=t(59242);let iz=()=>{var e;let{enterpriseConnection:i,organizationEnterpriseConnection:t,enterpriseConnectionMutations:{setConnectionActive:o},onExit:l}=(0,a.t)(),c=(0,n.f0)(),d=(0,D.ho)(),{organization:p}=(0,D.Z5)(),u=(null!=(e=null==i?void 0:i.domains)?e:[]).join(", "),S=t.isActive,g=async()=>{if(i&&!c.isLoading){c.setError(void 0),c.setLoading();try{var e,t;await o(i.id,!0),null==(t=d.telemetry)||t.record((0,$.fC)("configureSSO","activate",{timestamp:new Date().toISOString(),connectionStatus:"active",connectionId:i.id,organizationId:null!=(e=null==p?void 0:p.id)?e:null})),null==l||l()}catch(e){(0,U.H4)(e,[],c.setError)}finally{c.setIdle()}}};return(0,r.Y)(F.n.Part,{part:"ssoActivate",children:(0,r.Y)(_.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("activate"),children:(0,r.Y)(_.p.Body,{children:(0,r.FD)(_.p.Section,{elementDescriptor:C.$z.configureSSOActivate,fill:!0,gap:5,sx:{alignItems:"center",justifyContent:"center"},children:[(0,r.FD)(s.fv,{align:"center",sx:e=>({textAlign:"center",maxWidth:"20.75rem",gap:e.space.$3x5}),children:[(0,r.Y)(s.In,{elementDescriptor:C.$z.configureSSOActivateIcon,icon:iD.A,colorScheme:"neutral",sx:e=>({width:e.sizes.$8,height:e.sizes.$8})}),(0,r.FD)(s.fv,{align:"center",gap:2,children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOActivateTitle,textVariant:"h2",localizationKey:(0,z.G)(S?"configureSSO.activate.activeTitle":"configureSSO.activate.title")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOActivateSubtitle,as:"p",colorScheme:"secondary",localizationKey:(0,z.G)(S?"configureSSO.activate.activeSubtitle":"configureSSO.activate.subtitle",{domain:u})})]}),c.error&&(0,r.Y)(x.F,{variant:"danger",sx:{width:"100%"},title:c.error})]}),S?(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOActivateButton,variant:"bordered",colorScheme:"secondary",size:"sm",onClick:()=>null==l?void 0:l(),localizationKey:(0,z.G)("configureSSO.activate.doneButton")}):(0,r.FD)(s.so,{align:"center",gap:4,children:[(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOActivateButton,variant:"solid",size:"sm",isLoading:c.isLoading,onClick:()=>void g(),localizationKey:(0,z.G)("configureSSO.activate.activateButton")}),(0,r.FD)(s.$n,{elementDescriptor:C.$z.configureSSOActivateSkipButton,variant:"outline",size:"sm",isDisabled:c.isLoading,onClick:()=>null==l?void 0:l(),children:[(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.activate.skipButton")}),(0,r.Y)(s.In,{icon:i$.A,size:"sm",sx:e=>({marginInlineStart:e.space.$1})})]})]})]})})})})},iF=e=>{let{title:i,forceInitialStep:t,...l}=e,{organizationEnterpriseConnection:s,organizationDomains:c}=l,d=(0,m.im)(c),p=o.useMemo(()=>[{id:"verify-domain",label:"Domains",isComplete:()=>d},{id:"configure",label:"Connection",isReachable:()=>d||s.hasConnection,isComplete:()=>s.hasMinimumConfiguration||s.isActive},{id:"test",label:"Test",isReachable:()=>s.hasMinimumConfiguration||s.isActive,isComplete:()=>s.hasSuccessfulTestRun||s.isActive},{id:"activate",label:"Activate",isReachable:()=>s.hasSuccessfulTestRun||s.isActive,isComplete:()=>s.isActive}],[s,d]),u=t?p[0].id:void 0;return(0,r.Y)(a.z,{...l,children:(0,r.FD)(O,{steps:p,initialStepId:u,children:[(0,r.Y)(g,{title:i}),(0,r.Y)(O.Match,{id:"verify-domain",children:(0,r.Y)(n.pe,{children:(0,r.Y)(V,{})})}),(0,r.Y)(O.Match,{id:"configure",children:(0,r.Y)(n.pe,{children:(0,r.Y)(e6,{})})}),(0,r.Y)(O.Match,{id:"test",children:(0,r.Y)(n.pe,{children:(0,r.Y)(id,{})})}),(0,r.Y)(O.Match,{id:"activate",children:(0,r.Y)(n.pe,{children:(0,r.Y)(iz,{})})})]})})}},98125(e,i,t){var r=t(59763),o=t(78342),n=t(61046),a=t(39230),l=t(35402),s=t(17308),c=t(17447),d=t(46600),p=t(5870),u=t(62574),S=t(51637),g=t(30869);let m=(0,s.dm)(e=>{var i,t,u;let{onClose:m,onDelete:f,confirmationValue:h}=e,Y=null!=(i=e.title)?i:(0,o.G)("configureSSO.resetConnectionDialog.title"),v=null!=(t=e.subtitle)?t:(0,o.G)("configureSSO.resetConnectionDialog.subtitle"),y=null!=(u=e.confirmButtonLabel)?u:(0,o.G)("configureSSO.resetConnectionDialog.resetButton"),b=(0,s.f0)(),O=(0,S.tJ)("deleteConfirmation","",{type:"text",label:(0,o.G)("configureSSO.resetConnectionDialog.confirmationFieldLabel",{name:h}),isRequired:!0,placeholder:h}),D=!!(h&&O.value===h),$=async()=>{if(D)try{await f(),m()}catch(e){(0,g.H4)(e,[O],b.setError)}};return(0,r.Y)(l.Z.Root,{elementDescriptor:n.$z.configureSSOResetConnectionDialog,sx:e=>({borderRadius:e.radii.$md}),children:(0,r.Y)(l.Z.Content,{sx:e=>({textAlign:"start",padding:e.sizes.$5}),children:(0,r.Y)(p.M,{headerTitle:Y,headerSubtitle:v,sx:e=>({gap:e.space.$4}),children:(0,r.Y)(c.l.Root,{onSubmit:$,children:(0,r.FD)(a.fv,{gap:4,children:[(0,r.Y)(c.l.ControlRow,{elementId:O.id,children:(0,r.Y)(c.l.PlainInput,{...O.props,elementDescriptor:n.$z.configureSSOResetConnectionDialogConfirmationInput,ignorePasswordManager:!0})}),(0,r.FD)(d.c,{children:[(0,r.Y)(c.l.SubmitButton,{elementDescriptor:n.$z.configureSSOResetConnectionDialogSubmitButton,block:!1,colorScheme:"danger",isDisabled:!D,localizationKey:y}),(0,r.Y)(c.l.ResetButton,{elementDescriptor:n.$z.configureSSOResetConnectionDialogCancelButton,block:!1,localizationKey:(0,o.G)("configureSSO.resetConnectionDialog.cancelButton"),onClick:m})]})]})})})})})});t.d(i,{},{i:e=>e.isOpen?(0,r.Y)(u.Modal,{handleClose:e.onClose,canCloseModal:!1,portalRoot:e.contentRef,containerSx:e=>({alignItems:"center",position:"absolute",inset:0,width:"auto",height:"auto",backgroundColor:"inherit",backdropFilter:"blur(".concat(e.sizes.$2,")")}),children:(0,r.Y)(m,{...e})}):null})},80085(e,i,t){t(42949),t(49678),t(31178);let r=e=>{var i,t;return!!((null==e||null==(i=e.samlConnection)?void 0:i.idpSsoUrl)&&(null==e||null==(t=e.samlConnection)?void 0:t.idpEntityId))};t.d(i,{},{im:e=>!!(null==e?void 0:e.length)&&e.every(e=>{var i;return(null==(i=e.ownershipVerification)?void 0:i.status)==="verified"}),vF:e=>{let{connection:i,hasSuccessfulTestRun:t}=e,o=!!i,n=!!(null==i?void 0:i.active),a=r(i);return{provider:null==i?void 0:i.provider,hasConnection:o,isActive:n,hasMinimumConfiguration:a,hasSuccessfulTestRun:t,status:(e=>{let{hasConnection:i,isActive:t,hasMinimumConfiguration:r,hasSuccessfulTestRun:o}=e;return i?t?"active":r&&o?"inactive":"in_progress":"unconfigured"})({hasConnection:o,isActive:n,hasMinimumConfiguration:a,hasSuccessfulTestRun:t})}},yh:r})},98157(e,i,t){var r=t(59763),o=t(39230),n=t(61046),a=t(34260),l=t(8343);t.d(i,{},{B:e=>(0,r.Y)(o.so,{as:"header",elementDescriptor:n.$z.configureSSOHeader,...e,sx:e=>({gap:e.space.$2,width:"100%",minHeight:e.sizes.$13,padding:e.space.$5,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100,[a.g.md]:{flexDirection:"column",alignItems:"flex-start",gap:e.space.$4}})}),F:e=>(0,r.Y)(o.so,{as:"footer",elementDescriptor:n.$z.configureSSOFooter,align:"center",justify:"end",...e,sx:e=>({gap:e.space.$2,minHeight:e.sizes.$16,padding:e.space.$4,background:l.s.mutedBackground(e),borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100})})})},37876(e,i,t){t(36395);var r=t(59763),o=t(46262),n=t(59701),a=t(39230),l=t(61046),s=t(66887),c=t(78342),d=t(43919),p=t(59242),u=t(8343),S=t(37330),g=t(98125),m=t(98157);let f=e=>{let{fill:i,sx:t,...o}=e;return(0,r.Y)(a.fv,{elementDescriptor:l.$z.configureSSOStepSection,...o,sx:[e=>({padding:e.space.$5}),i&&{flex:1},t]})},h=e=>{let{onClick:i,isDisabled:t,isLoading:o,label:n="Previous"}=e,{t:c}=(0,s._)(),p="string"==typeof n?n:c(n);return(0,r.FD)(a.$n,{elementDescriptor:l.$z.configureSSOFooterPreviousButton,variant:"outline",size:"sm",isDisabled:t,isLoading:o,onClick:i?()=>{i()}:void 0,children:[(0,r.Y)(a.In,{icon:d.A,size:"sm",sx:e=>({marginInlineEnd:e.space.$1})}),p]})};h.displayName="Step.Footer.Previous";let Y=e=>{let{onClick:i,isDisabled:t,isLoading:o,label:n="Continue"}=e,{t:c}=(0,s._)(),d="string"==typeof n?n:c(n);return(0,r.FD)(a.$n,{elementDescriptor:l.$z.configureSSOFooterContinueButton,variant:"solid",size:"sm",isDisabled:t,isLoading:o,onClick:i?()=>{i()}:void 0,children:[d,(0,r.Y)(a.In,{icon:p.A,size:"sm",sx:e=>({marginInlineStart:e.space.$1})})]})};Y.displayName="Step.Footer.Continue";let v=()=>{var e;let{enterpriseConnection:i,enterpriseConnectionMutations:t,contentRef:s}=(0,S.t)(),d=(0,o.It)(),[p,u]=(0,n.useState)(!1);return i?(0,r.FD)(r.FK,{children:[(0,r.Y)(a.$n,{elementDescriptor:l.$z.configureSSOFooterResetButton,variant:"ghost",size:"sm",colorScheme:"danger",onClick:()=>u(!0),localizationKey:(0,c.G)("configureSSO.resetConnectionDialog.resetButton"),sx:{marginInlineEnd:"auto"}}),(0,r.Y)(g.i,{isOpen:p,onClose:()=>u(!1),confirmationValue:null!=(e=null==d?void 0:d.name)?e:"",onDelete:()=>t.deleteConnection(i.id),contentRef:s})]}):null};v.displayName="Step.Footer.Reset";let y=Object.assign(e=>{let{children:i}=e;return(0,r.Y)(m.F,{children:i})},{Previous:h,Continue:Y,Reset:v}),b=e=>{let{total:i,current:t}=e;return i<=1?null:(0,r.Y)(a.Ex,{elementDescriptor:l.$z.configureSSOStepCounter,colorScheme:"primary",sx:{whiteSpace:"nowrap"},children:(0,r.FD)(a.EY,{as:"span",sx:e=>({fontSize:e.fontSizes.$xs}),children:["Step ",t,"/",i]})})};b.displayName="Step.Counter";let O=Object.assign(e=>{let{sx:i,...t}=e;return(0,r.Y)(a.fv,{...t,sx:[{flex:1,minHeight:0},i]})},{Section:f,Header:e=>{let{title:i,description:t,badge:o,children:n}=e,{t:c}=(0,s._)(),d="string"==typeof i?i:c(i),p=t?"string"==typeof t?t:c(t):null;return(0,r.Y)(f,{elementDescriptor:l.$z.configureSSOStepHeader,sx:e=>({borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,r.FD)(a.so,{align:"start",justify:"between",sx:e=>({gap:e.space.$4}),children:[(0,r.FD)(a.fv,{sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.FD)(a.so,{align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap"}),children:[(0,r.Y)(a.DZ,{elementDescriptor:l.$z.configureSSOStepHeaderTitle,textVariant:"h2",children:d}),o]}),p&&(0,r.Y)(a.EY,{elementDescriptor:l.$z.configureSSOStepHeaderDescription,as:"p",colorScheme:"secondary",children:p})]}),n]})})},Body:e=>{let{sx:i,...t}=e;return(0,r.Y)(a.fv,{elementDescriptor:l.$z.configureSSOStepBody,as:"main",...t,sx:[e=>({flex:1,minHeight:0,overflowY:"auto",...u.s.unstyledScrollbar(e)}),i]})},Footer:y,Counter:b});t.d(i,{},{p:O})},52537(e,i,t){t(42949),t(98972),t(73560),t(18723),t(37891);var r=t(59763),o=t(59701),n=t(39230),a=t(61046),l=t(59242),s=t(53693),c=t(34260);let d=e=>{let{bullet:i,isCurrent:t,isCompleted:o,isReachable:l=!0,onClick:c,children:d}=e;return(0,r.FD)(n.dF,{elementDescriptor:a.$z.configureSSOStepperItem,isActive:t,variant:"unstyled",isDisabled:!l,onClick:c,sx:e=>({gap:e.space.$1x5,padding:0,color:t||o?e.colors.$colorForeground:e.colors.$colorMutedForeground,"&:disabled,&[data-disabled]":{opacity:1}}),children:[(0,r.Y)(n.so,{elementDescriptor:a.$z.configureSSOStepperItemBullet,isActive:t,align:"center",justify:"center",sx:e=>({width:e.sizes.$4,height:e.sizes.$4,borderRadius:e.radii.$circle,backgroundColor:o?e.colors.$success500:t?e.colors.$colorForeground:e.colors.$colorMutedForeground}),children:o?(0,r.Y)(n.In,{icon:s.A,size:"sm",sx:e=>({color:e.colors.$white})}):(0,r.Y)(n.EY,{as:"span",sx:e=>({fontSize:e.fontSizes.$xs,fontWeight:e.fontWeights.$medium,color:e.colors.$colorBackground,lineHeight:"1rem"}),children:i})}),(0,r.Y)(n.EY,{elementDescriptor:a.$z.configureSSOStepperItemLabel,as:"span",variant:"body",sx:{fontWeight:"inherit",color:"inherit"},children:d})]})};d.displayName="Stepper.Item";let p=()=>(0,r.FD)(n.so,{align:"center",sx:e=>({gap:e.space.$1x5,minHeight:e.sizes.$4x5,opacity:.16}),children:[(0,r.Y)(n.az,{sx:e=>({width:e.sizes.$4,height:e.sizes.$4,borderRadius:e.radii.$circle,backgroundColor:e.colors.$colorMutedForeground})}),(0,r.Y)(n.az,{sx:e=>({width:e.sizes.$17,height:e.sizes.$1x5,borderRadius:e.radii.$md,backgroundColor:e.colors.$colorMutedForeground})})]}),u=Object.assign(e=>{let{children:i}=e,t=o.Children.toArray(i).filter(e=>o.isValidElement(e));return(0,r.Y)(n.so,{elementDescriptor:a.$z.configureSSOStepper,align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap",[c.g.md]:{gap:e.space.$3}}),children:t.map((e,i)=>(0,r.FD)(n.L9,{sx:e=>({display:"flex",alignItems:"center",gap:e.space.$2}),children:[e,i<t.length-1&&(0,r.Y)(n.In,{elementDescriptor:a.$z.configureSSOStepperSeparator,icon:l.A,size:"md",colorScheme:"neutral",sx:{[c.g.md]:{display:"none"}}})]},i))})},{Item:d,Skeleton:e=>{let{totalSteps:i=4}=e;return(0,r.Y)(n.so,{elementDescriptor:a.$z.configureSSOStepper,align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap",[c.g.md]:{gap:e.space.$3}}),children:Array.from({length:i}).map((e,t)=>(0,r.FD)(o.Fragment,{children:[(0,r.Y)(p,{}),t<i-1&&(0,r.Y)(n.In,{elementDescriptor:a.$z.configureSSOStepperSeparator,icon:l.A,size:"md",colorScheme:"neutral",sx:{opacity:.16,[c.g.md]:{display:"none"}}})]},t))})}});t.d(i,{},{C:u})},51182(e,i,t){t.d(i,{c:()=>l}),t(42949),t(37891),t(67548),t(70954),t(98803),t(79162),t(15385),t(39342),t(69152),t(36395),t(15254);var r=t(46262),o=t(59701),n=t(80085);t(73560);let a=function(e){var i,t;let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],a=null!=(i=null==e?void 0:e.id)?i:null,[l,s]=(0,o.useState)(1),{data:c,isLoading:d,revalidate:p}=(0,r.yS)({enterpriseConnectionId:a,params:{initialPage:1,pageSize:1,status:["success"]},enabled:n}),{data:u,totalCount:S,isLoading:g,isFetching:m,isPolling:f,revalidate:h}=(0,r.yS)({enterpriseConnectionId:a,params:{initialPage:l,pageSize:5},enabled:n,keepPreviousData:!0}),Y=(0,o.useCallback)(e=>{var i;let t=null!=(i=null==e?void 0:e.armPolling)&&i;return Promise.all([p({armPolling:!1}),h({armPolling:t})])},[p,h]);return{hasSuccessfulTestRun:(null!=(t=null==c?void 0:c.length)?t:0)>0,isLoading:d||g,isFetching:m,rows:null!=u?u:[],totalCount:null!=S?S:0,isPolling:f,page:l,setPage:s,refresh:Y}},l=()=>{let{data:e,isLoading:i,createEnterpriseConnection:t,updateEnterpriseConnection:l,deleteEnterpriseConnection:s}=(0,r.n6)({enabled:!0}),c=null==e?void 0:e[0],d=(0,o.useRef)(void 0);void 0!==d.current||i||(d.current=!!c);let p=!0===d.current,u=(0,n.yh)(c)||!!(null==c?void 0:c.active),{hasSuccessfulTestRun:S,isLoading:g,isFetching:m,rows:f,totalCount:h,isPolling:Y,page:v,setPage:y,refresh:b}=a(c,u),{user:O}=(0,r.Jd)(),{session:D}=(0,r.wV)(),{organization:$}=(0,r.Z5)(),z=(0,o.useCallback)(async e=>{var i,t,r;if(!c)return;let o=e.map(e=>e.name),n=Array.from(new Set([...null!=(i=c.domains)?i:[],...o]));n.length!==(null!=(t=null==(r=c.domains)?void 0:r.length)?t:0)&&await l(c.id,{domains:n})},[c,l]),{isLoading:F,data:C,createDomain:x,prepareOwnershipVerification:I,attemptOwnershipVerification:G,revalidate:M}=(0,r.QE)({enrollmentMode:"enterprise_sso",onOwnershipVerified:z}),R=(0,o.useMemo)(()=>({createDomain:x,prepareOwnershipVerification:I,attemptOwnershipVerification:G,revalidate:M}),[x,I,G,M]),k=(0,o.useMemo)(()=>({createConnection:e=>t({provider:e,domains:null==C?void 0:C.map(e=>e.name)}),changeProvider:async e=>{var i;return c&&await s(c.id),t({provider:e,domains:null!=(i=null==c?void 0:c.domains)?i:null==C?void 0:C.map(e=>e.name)})},updateConnection:(e,i)=>l(e,i),setConnectionActive:(e,i)=>l(e,{active:i}),deleteConnection:e=>s(e),createTestRun:e=>{if(!$)throw Error("useOrganizationEnterpriseConnection.createTestRun called before the organization resource was loaded.");return $.createEnterpriseConnectionTestRun(e)}}),[O,$,C,c,t,l,s]),E=(0,o.useMemo)(()=>({rows:f,totalCount:h,isLoading:g,isFetching:m,isPolling:Y,page:v,setPage:y,refresh:b}),[f,h,g,m,Y,v,y,b]),P=(0,o.useMemo)(()=>(0,n.vF)({connection:c,hasSuccessfulTestRun:S}),[c,S]);return{user:O,session:D,organization:$,isLoading:i||F||p&&g,enterpriseConnection:c,organizationEnterpriseConnection:P,enterpriseConnectionMutations:k,testRuns:E,organizationDomains:C,organizationDomainMutations:R}}}}]);
1
+ "use strict";(globalThis.rspackChunk_clerk_ui=globalThis.rspackChunk_clerk_ui||[]).push([[9074],{37330(e,i,t){t(15254);var r=t(59763),o=t(59701);let n=o.createContext(null);n.displayName="ConfigureSSOContext",t.d(i,{},{t:()=>{let e=o.useContext(n);if(!e)throw Error("useConfigureSSO called outside <ConfigureSSOProvider>.");return e},z:e=>{let{enterpriseConnection:i,organizationEnterpriseConnection:t,testRuns:a,organizationDomains:l,contentRef:s,enterpriseConnectionMutations:c,organizationDomainMutations:d,onExit:p,children:u}=e,S=o.useMemo(()=>({contentRef:s,enterpriseConnection:i,organizationEnterpriseConnection:t,testRuns:a,organizationDomains:l,enterpriseConnectionMutations:c,organizationDomainMutations:d,onExit:p}),[s,c,d,t,a,l,i,p]);return(0,r.Y)(n.Provider,{value:S,children:u})}})},56700(e,i,t){t.d(i,{b:()=>iF});var r=t(59763),o=t(59701),n=t(17308),a=t(37330);t(42949),t(18723),t(37891);var l=t(66887),s=t(39230),c=t(34260),d=t(98157),p=t(52537);t(15254);let u=o.createContext(null);function S(){let e=o.useContext(u);if(!e)throw Error("useWizard called outside of <Wizard>");return e}u.displayName="WizardContext";let g=e=>{let{title:i}=e,{activeSteps:t,currentIndex:o,goToStep:n}=S(),{t:a}=(0,l._)(),u=t.filter(e=>e.label),g=u.findIndex(e=>{var i;return(null==(i=t[o])?void 0:i.id)===e.id});return(0,r.FD)(d.B,{children:[i,(0,r.Y)(s.so,{sx:i?{marginInlineStart:"auto",[c.g.md]:{marginInlineStart:0}}:void 0,children:(0,r.Y)(p.C,{children:u.map((e,i)=>{let t=e.label?"string"==typeof e.label?e.label:a(e.label):"";return(0,r.Y)(p.C.Item,{bullet:i+1,isCurrent:i===g,isCompleted:e.isCompleted,isReachable:e.isReachable,onClick:()=>n(e.id),children:t},e.id)})})})]})};var m=t(80085);t(49678),t(36395);let f=e=>!e.isReachable||e.isReachable(),h=(e,i)=>e.findIndex(e=>e.id===i),Y=e=>{let i=e.descriptors;if(0===i.length)return{current:"",direction:0,hasNavigated:!1};let t=0;for(;t+1<i.length&&f(i[t+1]);)t++;return{current:i[t].id,direction:0,hasNavigated:!1}},v=(e,i)=>({current:e,direction:i,hasNavigated:!0}),y=(e,i,t)=>{let r=t.descriptors;switch(i.type){case"NEXT":{let i=h(r,e.current);if(i<0)return e;let t=r[i+1];if(!t||!f(t))return e;return v(t.id,1)}case"PREV":{let i=h(r,e.current);if(i<0)return e;let t=r[i-1];if(!t||!f(t))return e;return v(t.id,-1)}case"GOTO":{let t=r.find(e=>e.id===i.step);if(!t||t.id===e.current||!f(t))return e;return v(t.id,0)}default:return e}},b=e=>{let{id:i,children:t}=e,{current:o}=S();return o!==i?null:(0,r.Y)(r.FK,{children:t})};b.displayName="Wizard.Match";let O=Object.assign(e=>{let{steps:i,initialStepId:t,children:n}=e,a=o.useContext(u),l=(e=>{let{config:i,parentWizard:t,initialStepId:r}=e,n=null!==t,[a,l]=o.useState(()=>((e,i)=>{if(i){let t=e.descriptors.find(e=>e.id===i);if(t&&f(t))return{current:i,direction:0,hasNavigated:!1}}return Y(e)})(i,r)),[s,c]=o.useState(null),d=o.useRef(i);d.current=i;let p=o.useRef(t);p.current=t;let u=o.useRef(a);u.current=a;let S=i.descriptors.find(e=>e.id===a.current);if(!S||!f(S)){let e=Y(i);e.current!==a.current&&l(e)}if(null!==s)if(s!==a.current)c(null);else{let e=y(a,{type:"NEXT"},i);e!==a&&(l(e),c(null))}let g=(e,i)=>i.descriptors.findIndex(i=>i.id===e.current),m=o.useCallback(()=>{let e=u.current,i=d.current,t=y(e,{type:"NEXT"},i);if(t!==e){c(null),l(t);return}if(g(e,i)===i.descriptors.length-1){var r;null==(r=p.current)||r.goNext();return}c(e.current)},[]),h=o.useCallback(()=>{c(null);let e=u.current,i=d.current,t=y(e,{type:"PREV"},i);if(t===e){if(0===g(e,i)){var r;null==(r=p.current)||r.goPrev()}return}l(t)},[]),v=o.useCallback(e=>{l(y(u.current,e,d.current))},[]),b=o.useCallback(e=>{c(null),v({type:"GOTO",step:e})},[v]),O=a.current,D=o.useMemo(()=>{let e=i.descriptors,t=e.findIndex(e=>e.id===O);return e.map((e,i)=>({id:e.id,label:e.label,isCompleted:e.isComplete?e.isComplete():t>=0&&i<t,isReachable:f(e)}))},[i,O]),$=D.findIndex(e=>e.id===O),z=$>=0?D[$]:void 0,F=i.descriptors,C=F.findIndex(e=>e.id===O),x=!a.hasNavigated;return o.useMemo(()=>({current:O,direction:a.direction,activeSteps:D,currentStep:z,currentIndex:$,totalSteps:D.length,isInitialStep:x,isNested:n,isFirstStep:C<=0&&(!t||t.isFirstStep),isLastStep:C===F.length-1&&(!t||t.isLastStep),goNext:m,goPrev:h,goToStep:b}),[O,a.direction,D,z,$,x,n,C,F.length,t,m,h,b])})({config:o.useMemo(()=>({descriptors:i}),[i]),parentWizard:a,initialStepId:t});return(0,r.Y)(u.Provider,{value:l,children:n})},{Match:b});t(85281),t(12021),t(73560),t(86449);var D=t(46262),$=t(99963),z=t(78342),F=t(34641),C=t(61046),x=t(40395),I=t(40890),G=t(16363),M=t(65790),R=t(17447),k=t(75880),E=t(72310),P=t(38426),T=t(76504),A=t(53693),K=t(8343),w=t(51637),U=t(30869),L=t(37876),_=t(35402),B=t(46600),H=t(5870),W=t(62574);let q=e=>e.isOpen?(0,r.Y)(W.Modal,{handleClose:e.onClose,canCloseModal:!1,portalRoot:e.contentRef,containerSx:e=>({alignItems:"center",position:"absolute",inset:0,width:"auto",height:"auto",backgroundColor:"inherit",backdropFilter:"blur(".concat(e.sizes.$2,")")}),children:(0,r.Y)(N,{...e})}):null,N=(0,n.dm)(e=>{let{onClose:i,onRemove:t}=e,a=(0,n.f0)(),l=(0,o.useMemo)(()=>e.isConnectionActive?(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.subtitle__active",{domain:e.domain}):(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.subtitle__inactive",{domain:e.domain}),[]),c=async()=>{try{await t(),i()}catch(e){(0,U.H4)(e,[],a.setError)}};return(0,r.Y)(_.Z.Root,{elementDescriptor:C.$z.configureSSORemoveDomainDialog,sx:e=>({borderRadius:e.radii.$md}),children:(0,r.Y)(_.Z.Content,{sx:e=>({textAlign:"start",padding:e.sizes.$5}),children:(0,r.Y)(H.M,{headerTitle:(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.title"),headerSubtitle:l,sx:e=>({gap:e.space.$4}),children:(0,r.Y)(R.l.Root,{onSubmit:c,children:(0,r.Y)(s.fv,{gap:4,children:(0,r.FD)(B.c,{children:[(0,r.Y)(R.l.SubmitButton,{elementDescriptor:C.$z.configureSSORemoveDomainDialogSubmitButton,block:!1,colorScheme:"danger",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.removeButton")}),(0,r.Y)(R.l.ResetButton,{elementDescriptor:C.$z.configureSSORemoveDomainDialogCancelButton,block:!1,localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.removeDomainDialog.cancelButton"),onClick:i})]})})})})})})}),V=()=>{var e;let{t:i}=(0,l._)(),{enterpriseConnection:t,organizationDomains:c,organizationEnterpriseConnection:d,contentRef:p,organizationDomainMutations:{createDomain:u,revalidate:g,prepareOwnershipVerification:f},enterpriseConnectionMutations:{updateConnection:h}}=(0,a.t)(),{goPrev:Y,goNext:v,isFirstStep:y,isLastStep:b}=S(),O=(0,n.f0)(),I=(0,D.ho)(),{organization:G}=(0,D.Z5)(),[M,R]=(0,o.useState)(null),k=(0,o.useRef)(!1);(0,o.useEffect)(()=>{var e,i,r;k.current||(k.current=!0,null==(r=I.telemetry)||r.record((0,$.fC)("configureSSO","verify-domain",{timestamp:new Date().toISOString(),connectionStatus:d.status,connectionId:null!=(e=null==t?void 0:t.id)?e:null,organizationId:null!=(i=null==G?void 0:G.id)?i:null})))},[]);let E=async e=>{O.setError(void 0);try{await u(e)}catch(t){var i;let e=null!=(i=(0,U.hG)(t))?i:(0,U.QU)(t);O.setError(e)}},P=async e=>{O.setError(void 0);try{await f([e])}catch(t){var i;let e=null!=(i=(0,U.hG)(t))?i:(0,U.QU)(t);O.setError(e)}},T=async e=>{if(t){let i=t.domains.filter(i=>i!==e.name);await h(t.id,{domains:i})}await e.delete(),await g()},A=(0,m.im)(c),w=null!=(e=null==c?void 0:c.filter(e=>{var i;return(null==(i=e.ownershipVerification)?void 0:i.status)==="verified"}).length)?e:0,_=!!t,B=(null==t?void 0:t.active)?(0,z.G)("configureSSO.organizationDomainsStep.domainCard.removeButtonTooltip__lastVerifiedDomainActive"):(0,z.G)("configureSSO.organizationDomainsStep.domainCard.removeButtonTooltip__lastVerifiedDomain");return(0,r.FD)(F.n.Part,{part:"organizationDomains",children:[(0,r.FD)(L.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("verify-domain"),children:[(0,r.Y)(L.p.Header,{title:i((0,z.G)("configureSSO.organizationDomainsStep.title")),description:i((0,z.G)("configureSSO.organizationDomainsStep.subtitle"))}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{fill:!0,sx:e=>({gap:e.space.$5,minHeight:0}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$4}),children:[(0,r.Y)(Z,{onSubmit:E,organizationDomains:c}),!(null==c?void 0:c.length)&&(0,r.Y)(j,{onSubmit:E}),O.error&&(0,r.Y)(x.F,{variant:"danger",title:O.error})]}),!!(null==c?void 0:c.length)&&(0,r.Y)(s.fv,{elementDescriptor:C.$z.configureSSOVerifyDomainList,sx:e=>({gap:e.space.$3,flex:"0 1 auto",minHeight:0,overflowY:"auto",marginInline:"calc(".concat(e.space.$1," * -1)"),paddingInline:e.space.$1,...K.s.unstyledScrollbar(e)}),children:c.map(e=>{var i;let t=(null==(i=e.ownershipVerification)?void 0:i.status)==="verified";return(0,r.Y)(X,{domain:e,onRemove:()=>R(e),onPrepareOwnershipVerification:()=>P(e),isRemoveDisabled:_&&t&&1===w,removeDisabledTooltip:B},e.id)})})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Previous,{onClick:()=>Y(),isDisabled:y}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>v(),isDisabled:b||!A})]})]}),M&&(0,r.Y)(q,{isOpen:!!M,onClose:()=>R(null),domain:M.name,isConnectionActive:!!(null==t?void 0:t.active),onRemove:()=>T(M),contentRef:p})]})},J=/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/i,Z=e=>{let{onSubmit:i,organizationDomains:t}=e,[n,a]=(0,o.useState)(!1),l=(0,w.tJ)("domain","",{type:"text",label:(0,z.G)("configureSSO.organizationDomainsStep.formFieldLabel__domain"),placeholder:(0,z.G)("configureSSO.organizationDomainsStep.formFieldInputPlaceholder__domain")}),c=l.value.trim().toLowerCase(),d=J.test(c)&&!(null==t?void 0:t.some(e=>e.name===c))&&!n;return(0,r.Y)(R.l.Root,{onSubmit:e=>{e.preventDefault(),d&&(a(!0),i(c).then(()=>l.setValue("")).finally(()=>a(!1)))},children:(0,r.Y)(M.D.Root,{...l.props,children:(0,r.FD)(s.fv,{elementDescriptor:C.$z.formField,elementId:C.$z.formField.setId(l.id),sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(M.D.LabelRow,{children:(0,r.Y)(M.D.Label,{})}),(0,r.FD)(s.so,{align:"start",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.az,{sx:{flex:1},children:(0,r.Y)(M.D.Input,{})}),(0,r.Y)(s.$n,{type:"submit",variant:"bordered",colorScheme:"secondary",isDisabled:!d,isLoading:n,localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.formButtonPrimary__add"),sx:{flexShrink:0}})]})]})})})},j=e=>{var i,t;let{onSubmit:n}=e,{user:a}=(0,D.Jd)(),[l,c]=(0,o.useState)(!1),[d,p]=(0,o.useState)(!1),u=null==a||null==(i=a.primaryEmailAddress)?void 0:i.emailAddress,S=u&&(null==(t=u.split("@")[1])?void 0:t.trim().toLowerCase())||null;return!S||l?null:(0,r.FD)(s.so,{elementDescriptor:C.$z.configureSSOVerifyDomainSuggestion,align:"center",justify:"between",sx:e=>({gap:e.space.$2,paddingInline:e.space.$3,paddingBlock:e.space.$1x5,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$lg,background:e.colors.$neutralAlpha50}),children:[(0,r.FD)(s.so,{align:"center",sx:e=>({gap:e.space.$3,minWidth:0}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainSuggestion.messageLabel",{domain:S}),sx:e=>({fontSize:e.fontSizes.$sm})}),(0,r.Y)(s.$n,{variant:"bordered",colorScheme:"secondary",size:"xs",isLoading:d,onClick:()=>{p(!0),n(S).then(()=>c(!0)).finally(()=>p(!1))},localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainSuggestion.formButtonPrimary__add",{domain:S}),sx:{flexShrink:0}})]}),(0,r.Y)(s.$n,{variant:"ghost",colorScheme:"neutral","aria-label":"Dismiss domain suggestion",isDisabled:d,onClick:()=>c(!0),sx:e=>({flexShrink:0,padding:e.space.$1}),children:(0,r.Y)(s.In,{icon:E.A,sx:e=>({width:e.sizes.$4,height:e.sizes.$4,color:e.colors.$colorMutedForeground})})})]})},X=e=>{var i,t;let{domain:o,onRemove:n,onPrepareOwnershipVerification:a,isRemoveDisabled:l=!1,removeDisabledTooltip:c}=e;if(!o.name)return null;let d=o.ownershipVerification,p=(null==d?void 0:d.status)==="verified",u=(null==d?void 0:d.status)==="expired",S=null!=(i=null==d?void 0:d.status)?i:"unverified",g=(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOVerifyDomainCardRemoveButton,variant:"ghost",colorScheme:"neutral","aria-label":"Remove domain",onClick:n,isDisabled:l,sx:e=>({flexShrink:0,padding:e.space.$1}),children:(0,r.Y)(s.In,{icon:E.A,sx:e=>({width:e.sizes.$4,height:e.sizes.$4,color:e.colors.$colorMutedForeground})})});return(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOVerifyDomainCard,elementId:C.$z.configureSSOVerifyDomainCard.setId(S),sx:e=>({borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$lg,background:e.colors.$colorBackground}),children:[(0,r.FD)(s.so,{align:"center",justify:"between",sx:e=>({gap:e.space.$2,padding:e.space.$4,paddingBottom:e.space.$2}),children:[(0,r.FD)(s.so,{align:"center",sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.Y)(s.EY,{as:"span",sx:e=>({fontWeight:e.fontWeights.$medium,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),children:o.name}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOVerifyDomainCardBadge,elementId:C.$z.configureSSOVerifyDomainCardBadge.setId(S),colorScheme:p?"success":"danger",localizationKey:p?(0,z.G)("configureSSO.organizationDomainsStep.domainCard.badge__verified"):u?(0,z.G)("configureSSO.organizationDomainsStep.domainCard.badge__expired"):(0,z.G)("configureSSO.organizationDomainsStep.domainCard.badge__unverified")}),!p&&!u&&(0,r.Y)(s.y$,{size:"xs",colorScheme:"neutral",sx:e=>({flexShrink:0,marginInlineStart:e.space.$1})})]}),l&&c?(0,r.FD)(k.m_.Root,{children:[(0,r.Y)(k.m_.Trigger,{children:g}),(0,r.Y)(k.m_.Content,{text:c})]}):g]}),(0,r.Y)(s.az,{sx:{overflow:"hidden"},children:(0,r.Y)(I.k,{children:u?(0,r.Y)(Q,{expiresAt:null!=(t=null==d?void 0:d.expiresAt)?t:null,onPrepareOwnershipVerification:a},"expired"):(null==d?void 0:d.verifiedAt)?(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.verifiedAtLabel",{date:d.verifiedAt}),sx:e=>({padding:e.space.$4,paddingTop:0})},"verified"):(0,r.Y)(ee,{ownershipVerification:d},"unverified")})})]})},Q=e=>{let{expiresAt:i,onPrepareOwnershipVerification:t}=e,[n,a]=(0,o.useState)(!1);return(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOVerifyDomainCardExpired,sx:e=>({gap:e.space.$3,paddingInline:e.space.$4,paddingBottom:e.space.$4}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:i?(0,z.G)("configureSSO.organizationDomainsStep.domainCard.expiredAtLabel",{date:i}):(0,z.G)("configureSSO.organizationDomainsStep.domainCard.expiredLabel")}),(0,r.FD)(s.$n,{variant:"bordered",colorScheme:"secondary",size:"xs",isLoading:n,onClick:()=>{a(!0),t().finally(()=>a(!1))},sx:e=>({alignSelf:"flex-start",gap:e.space.$1x5}),children:[(0,r.Y)(s.In,{icon:P.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.verifyAgainButton")})]})]})},ee=e=>{var i,t;let{ownershipVerification:o}=e;return(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOVerifyDomainCardTxtRecord,sx:e=>({gap:e.space.$3,paddingInline:e.space.$4,paddingBottom:e.space.$4}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.txtRecord.instructions"),sx:e=>({fontSize:e.fontSizes.$sm})}),(0,r.Y)(s.az,{sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,marginInline:"calc(".concat(e.space.$4," * -1)")})}),(0,r.FD)(s.so,{wrap:"wrap",sx:e=>({gap:e.space.$6}),children:[(0,r.Y)(ei,{label:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.txtRecord.typeLabel"),value:"TXT"}),(0,r.Y)(ei,{label:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.txtRecord.hostLabel"),value:null!=(i=null==o?void 0:o.txtRecordName)?i:"@"})]}),(0,r.FD)(s.so,{align:"center",sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.organizationDomainsStep.domainCard.txtRecord.valueLabel"),sx:e=>({fontSize:e.fontSizes.$sm,flexShrink:0})}),(0,r.Y)(G.r,{elementDescriptor:C.$z.configureSSOVerifyDomainCardTxtRecordValue,value:null!=(t=null==o?void 0:o.txtRecordValue)?t:"—",copyIcon:T.A,copiedIcon:A.A,sx:{flex:1,minWidth:0}})]})]})},ei=e=>{let{label:i,value:t}=e;return(0,r.FD)(s.so,{align:"center",sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:i,sx:e=>({fontSize:e.fontSizes.$sm,flexShrink:0})}),(0,r.Y)(s.Ex,{colorScheme:"primary",sx:e=>({fontFamily:e.fonts.$buttons,display:"flex",alignItems:"center",justifyContent:"center",paddingBlock:e.space.$1,paddingInline:e.space.$1x5}),children:(0,r.Y)(s.az,{as:"span",sx:{display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,textBoxTrim:"trim-both",textBoxEdge:"cap alphabetic"},children:t})})]})};t(67548),t(70954),t(98803),t(79162),t(15385),t(39342),t(69152),t(50119),t(45249);var et=t(30129);let er=e=>e.isOpen?(0,r.Y)(W.Modal,{handleClose:e.onClose,canCloseModal:!1,portalRoot:e.contentRef,containerSx:e=>({alignItems:"center",position:"absolute",inset:0,width:"auto",height:"auto",backgroundColor:"inherit",backdropFilter:"blur(".concat(e.sizes.$2,")")}),children:(0,r.Y)(eo,{...e})}):null,eo=(0,n.dm)(e=>{let{onClose:i,onConfirm:t,isSubmitting:o,nextProviderLabel:n,currentProviderLabel:a}=e,{t:c}=(0,l._)(),d=c(n),p=c(a);return(0,r.Y)(_.Z.Root,{elementDescriptor:C.$z.configureSSOChangeProviderDialog,sx:e=>({borderRadius:e.radii.$md}),children:(0,r.Y)(_.Z.Content,{sx:e=>({textAlign:"start",padding:e.sizes.$5}),children:(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$4}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.DZ,{textVariant:"h2",localizationKey:(0,z.G)("configureSSO.changeProviderDialog.title",{provider:d}),sx:e=>({fontSize:e.fontSizes.$md})}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.changeProviderDialog.subtitle",{provider:d,currentProvider:p})})]}),(0,r.FD)(s.so,{justify:"end",sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOChangeProviderDialogCancelButton,variant:"ghost",isDisabled:o,onClick:i,localizationKey:(0,z.G)("configureSSO.changeProviderDialog.cancelButton")}),(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOChangeProviderDialogConfirmButton,variant:"solid",isLoading:o,onClick:t,localizationKey:(0,z.G)("configureSSO.changeProviderDialog.confirmButton")})]})]})})})}),en=new Set(["okta"]),ea=[{id:"saml",label:(0,z.G)("configureSSO.selectProviderStep.saml.groupLabel"),options:[{id:"saml_okta",label:(0,z.G)("configureSSO.selectProviderStep.saml.okta"),iconId:"okta"},{id:"saml_microsoft",label:(0,z.G)("configureSSO.selectProviderStep.saml.microsoft"),iconId:"microsoft"},{id:"saml_google",label:(0,z.G)("configureSSO.selectProviderStep.saml.google"),iconId:"google"},{id:"saml_custom",label:(0,z.G)("configureSSO.selectProviderStep.saml.customSaml"),iconId:"saml"}]}],el=e=>{var i;return null==(i=ea.flatMap(e=>e.options).find(i=>i.id===e))?void 0:i.label},es=()=>{var e;let{organizationEnterpriseConnection:i,enterpriseConnectionMutations:{createConnection:t,changeProvider:d},contentRef:p}=(0,a.t)(),{goNext:u,goPrev:g,isFirstStep:m}=S(),{t:f}=(0,l._)(),[h,Y]=o.useState(null!=(e=i.provider)?e:null),v=(0,n.f0)(),[y,b]=o.useState(!1),[O,D]=o.useState(!1),[$,I]=o.useState(null),G=i.hasConnection&&null!==h&&h!==i.provider,M=async()=>{if(h){if(i.hasConnection&&h===i.provider)return void u();if(G){var e;I(null!=(e=i.provider)?e:null),D(!0);return}v.setError(void 0),b(!0);try{await t(h),u()}catch(e){(0,U.H4)(e,[],v.setError),b(!1)}}},R=async()=>{if(h){v.setError(void 0),b(!0);try{await d(h),u()}catch(e){(0,U.H4)(e,[],v.setError),D(!1),I(null),b(!1)}}},k=$?el($):void 0,E=h?el(h):void 0;return(0,r.Y)(F.n.Part,{part:"selectProvider",children:(0,r.FD)(L.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("select-provider"),children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.selectProviderStep.title"),description:(0,z.G)("configureSSO.selectProviderStep.subtitle")}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$5}),children:[ea.map(e=>(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOProviderGroup,elementId:C.$z.configureSSOProviderGroup.setId(e.id),gap:3,children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOProviderGroupLabel,elementId:C.$z.configureSSOProviderGroupLabel.setId(e.id),as:"label",variant:"subtitle",localizationKey:e.label}),(0,r.Y)(s.xA,{role:"radiogroup","aria-label":f(e.label),elementDescriptor:C.$z.configureSSOProviderGrid,gap:3,sx:{gridTemplateColumns:"repeat(2, 1fr)",[c.g.sm]:{gridTemplateColumns:"1fr"}},children:e.options.map(e=>(0,r.Y)(ec,{name:"configure-sso-provider",value:e.id,iconId:e.iconId,label:e.label,checked:h===e.id,onChange:()=>{Y(e.id)}},e.id))})]},e.id)),v.error&&(0,r.Y)(x.F,{variant:"danger",title:v.error,sx:e=>({margin:e.space.$3})})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Previous,{onClick:()=>g(),isDisabled:m||y}),(0,r.Y)(L.p.Footer.Continue,{onClick:M,isLoading:y&&!O,isDisabled:!h||y})]}),k&&E?(0,r.Y)(er,{isOpen:O,onClose:()=>{D(!1),I(null)},onConfirm:()=>{R()},isSubmitting:y,nextProviderLabel:E,currentProviderLabel:k,contentRef:p}):null]})})},ec=e=>{let{name:i,value:t,iconId:o,label:n,checked:a,onChange:c}=e,{t:d}=(0,l._)(),p=d(n);return(0,r.FD)(s.az,{as:"label",elementDescriptor:C.$z.configureSSOProviderCard,elementId:C.$z.configureSSOProviderCard.setId(t),isActive:a,sx:e=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:e.space.$2,height:e.sizes.$32,padding:e.space.$1x5,cursor:"pointer",position:"relative",...K.s.borderVariants(e).normal,"&:has(input:focus-visible)":{...K.s.focusRingStyles(e),borderColor:e.colors.$borderAlpha300},"&:hover":{backgroundColor:e.colors.$neutralAlpha50},"&:has(input:checked)":{backgroundColor:e.colors.$neutralAlpha50}}),children:[(0,r.Y)(s.AT,{elementDescriptor:C.$z.configureSSOProviderCardRadio,elementId:C.$z.configureSSOProviderCardRadio.setId(t),name:i,value:t,checked:a,onChange:c,focusRing:!1,sx:K.s.visuallyHidden()}),(0,r.Y)(s.L9,{elementDescriptor:C.$z.configureSSOProviderCardIcon,elementId:C.$z.configureSSOProviderCardIcon.setId(t),"aria-hidden":!0,sx:e=>{let i=en.has(o),t={width:e.sizes.$8,height:e.sizes.$8};return i?{...t,backgroundColor:e.colors.$colorForeground,maskImage:"url(".concat((0,et.at)(o),")"),maskSize:"contain",maskPosition:"center",maskRepeat:"no-repeat"}:{...t,backgroundImage:"url(".concat((0,et.at)(o),")"),backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOProviderCardLabel,elementId:C.$z.configureSSOProviderCardLabel.setId(t),as:"span",variant:"body",sx:e=>({color:e.colors.$colorForeground}),children:p})]})},ed=()=>{let{currentIndex:e,totalSteps:i}=S();return(0,r.Y)(L.p.Counter,{total:i,current:e+1})};var ep=t(71756),eu=t(59582);let eS=()=>{let{enterpriseConnection:e}=(0,a.t)(),[i,t]=o.useState(!1);return(null==e?void 0:e.active)&&!i?(0,r.Y)(x.F,{variant:"warning",title:(0,z.G)("configureSSO.configureStep.activeConnectionWarning.title"),dismissLabel:(0,z.G)("configureSSO.configureStep.activeConnectionWarning.dismiss"),onDismiss:()=>t(!0)}):null},eg=e=>{switch(e.mode){case"metadataUrl":return(0,r.Y)(ef,{form:e.form,labels:e.labels});case"metadataFile":return(0,r.Y)(eh,{form:e.form,labels:e.labels});case"manual":return(0,r.Y)(eY,{form:e.form,labels:e.labels})}},em=e=>(0,r.FD)(r.FK,{children:[(0,r.Y)(eg,{...e}),(0,r.Y)(eS,{})]}),ef=e=>{let{form:i,labels:t}=e;return(0,r.FD)(r.FK,{children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:t.description}),(0,r.Y)(R.l.ControlRow,{elementId:i.field.id,children:(0,r.Y)(R.l.PlainInput,{...i.field.props})})]})},eh=e=>{let{form:i,labels:t}=e;return(0,r.FD)(r.FK,{children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:t.description}),(0,r.Y)(eb,{field:i.field,file:i.file,onFileChange:i.onFileChange,existingFilePresent:!!i.existingFilePresent,labels:t,accept:".xml"})]})},eY=e=>{let{form:i,labels:t}=e;return(0,r.FD)(r.FK,{children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:t.description}),(0,r.Y)(R.l.ControlRow,{elementId:i.signOnUrlField.id,children:(0,r.Y)(R.l.PlainInput,{...i.signOnUrlField.props})}),(0,r.Y)(R.l.ControlRow,{elementId:i.issuerField.id,children:(0,r.Y)(R.l.PlainInput,{...i.issuerField.props})}),(0,r.Y)(eb,{field:i.certificateField,file:i.certFile,onFileChange:i.onCertFileChange,existingFilePresent:!!i.existingCertPresent,labels:t,accept:".pem,.key,.crt,.cer,.cert"})]})},ev=async e=>{let{mode:i,metadataUrl:t,metadataFile:r,manual:o}=e;if("metadataUrl"===i){if(!t)throw Error('metadataUrl values missing for mode "metadataUrl"');return{idpMetadataUrl:t.value.trim()}}if("metadataFile"===i){if(!(null==r?void 0:r.file))throw Error('metadataFile is missing for mode "metadataFile"');return{idpMetadata:await r.file.text()}}if(!o)throw Error('manual values missing for mode "manual"');let n={idpSsoUrl:o.signOnUrl.trim(),idpEntityId:o.issuer.trim()};return null!==o.certFile&&(n.idpCertificate=await o.certFile.text()),n},ey=function(e,i,t){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if((0,U.H4)(e,[t,...r],i.setError),(0,ep.$R)(e)){let r=e.errors.find(e=>{var i,t;return(null==(i=e.code)?void 0:i.startsWith("saml_"))&&!(null==(t=e.meta)?void 0:t.paramName)});r&&(t.setError(r),i.setError(void 0))}},eb=e=>{let{field:i,file:t,onFileChange:n,existingFilePresent:a,labels:c,accept:d}=e,{t:p}=(0,l._)(),u=o.useRef(null);return(0,r.Y)(s.az,{children:(0,r.FD)(M.D.Root,{...i.props,children:[(0,r.FD)(s.fv,{gap:2,children:[(0,r.Y)(M.D.LabelRow,{children:(0,r.Y)(M.D.Label,{})}),(0,r.Y)("input",{ref:u,type:"file",accept:d,multiple:!1,style:{display:"none"},onChange:e=>{var t,r;n(null!=(t=null==(r=e.target.files)?void 0:r[0])?t:null),i.clearFeedback()}}),null===t?(0,r.FD)(s.so,{align:"center",gap:2,sx:{alignSelf:"flex-start",flexWrap:"wrap"},children:[a&&(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOCertificateFileBadge,localizationKey:c.fileUploaded}),(0,r.FD)(s.$n,{elementDescriptor:C.$z.configureSSOCertificateUploadButton,size:"xs",variant:"outline",onClick:()=>{var e;return null==(e=u.current)?void 0:e.click()},children:[(0,r.Y)(s.In,{icon:eu.A,size:"sm",colorScheme:"neutral",sx:e=>({marginInlineEnd:e.space.$1})}),(0,r.Y)(s.EY,{as:"span",localizationKey:a?c.replaceFile:c.uploadFile})]})]}):(0,r.FD)(s.so,{align:"center",gap:2,sx:e=>({paddingTop:e.space.$1,paddingBottom:e.space.$1}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOCertificateFileName,as:"span",colorScheme:"secondary",variant:"buttonSmall",children:t.name}),(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOCertificateRemoveButton,variant:"ghost",colorScheme:"neutral","aria-label":p(c.removeFile),onClick:()=>{n(null),i.clearFeedback(),u.current&&(u.current.value="")},sx:e=>({padding:e.space.$1}),children:(0,r.Y)(s.In,{icon:E.A,size:"xs"})})]})]}),(0,r.Y)(M.D.Feedback,{})]})})};var eO=t(92386);let eD=e=>{let{modes:i,value:t,onChange:o,labels:n}=e,{t:a}=(0,l._)();return(0,r.Y)(eO.I.Root,{"aria-label":a(n.ariaLabel),value:t,onChange:e=>o(e),fullWidth:!0,size:"lg",children:i.map(e=>{let i=n[e];return i?(0,r.Y)(eO.I.Button,{value:e,text:i},e):null})})},e$=[{id:"create-app"},{id:"attribute-mapping"},{id:"assign-users"},{id:"identity-provider-metadata"}],ez=()=>{var e,i,t,o;let{goNext:n,goPrev:l,isFirstStep:c,isLastStep:d}=S(),{enterpriseConnection:p}=(0,a.t)(),u=null!=(e=null==p||null==(t=p.samlConnection)?void 0:t.acsUrl)?e:"",g=null!=(i=null==p||null==(o=p.samlConnection)?void 0:o.spEntityId)?i:"",m=(0,w.tJ)("acsUrl",u,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.createAppStep.serviceProviderFields.acsUrl.label"),isRequired:!1}),f=(0,w.tJ)("spEntityId",g,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.createAppStep.serviceProviderFields.spEntityId.label"),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlCustom.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlCustom.createAppStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.Y)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.createAppStep.createAppInstructions.paragraph")})}),(0,r.Y)(R.l.ControlRow,{elementId:m.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...m.props,children:(0,r.Y)(G.r,{value:u,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.Y)(R.l.ControlRow,{elementId:f.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(G.r,{value:g,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>l(),isDisabled:c}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>n(),isDisabled:d})]})]})},eF=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlCustom.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.paragraph")}),(0,r.Y)(ex,{})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eC=[{id:"email",isRequired:!0},{id:"firstName",isRequired:!1},{id:"lastName",isRequired:!1}],ex=()=>(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.attributeMappingTable.columns.attributeName")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.attributeMappingTable.columns.userAttribute")})})]})}),(0,r.Y)(s.NN,{children:eC.map(e=>(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Td,{children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".userAttribute"))}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOAttributeMappingBadge,elementId:C.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,z.G)(e.isRequired?"configureSSO.configureStep.attributeMappingTable.badges.required":"configureSSO.configureStep.attributeMappingTable.badges.optional")})]})}),(0,r.Y)(s.Td,{children:(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".attributeName"))})})]},e.id))})]}),eI=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlCustom.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlCustom.assignUsersStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.Y)(L.p.Section,{sx:e=>({gap:e.space.$3}),children:(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlCustom.assignUsersStep.paragraph")})})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eG=["metadataUrl","manual"],eM=()=>{var e,i,t;let l=(0,n.f0)(),{goNext:s,goPrev:c,isFirstStep:d}=S(),{enterpriseConnection:p,enterpriseConnectionMutations:{updateConnection:u}}=(0,a.t)(),g=null==p?void 0:p.samlConnection,m=!!((null==g?void 0:g.idpSsoUrl)||(null==g?void 0:g.idpEntityId)||(null==g?void 0:g.idpCertificate)||(null==g?void 0:g.idpMetadataUrl)),f=!!(null==g?void 0:g.idpCertificate),[h,Y]=o.useState(m?"manual":"metadataUrl"),[v,y]=o.useState(null),[b,O]=o.useState(!1),D=(0,w.tJ)("idpMetadataUrl",null!=(e=null==g?void 0:g.idpMetadataUrl)?e:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.metadataUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.metadataUrl.placeholder"),isRequired:!0}),$=(0,w.tJ)("idpSsoUrl",null!=(i=null==g?void 0:g.idpSsoUrl)?i:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signOnUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signOnUrl.placeholder"),isRequired:!0}),F=(0,w.tJ)("idpEntityId",null!=(t=null==g?void 0:g.idpEntityId)?t:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.issuer.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.issuer.placeholder"),isRequired:!0}),C=(0,w.tJ)("idpCertificate","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.label"),isRequired:!0}),x=D.value.trim(),I=$.value.trim(),G=F.value.trim(),M=null!==v||f,R=("metadataUrl"===h?x.length>0:I.length>0&&G.length>0&&M)&&!b,k="metadataUrl"===h?{mode:"metadataUrl",form:{field:D},labels:{description:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.metadataUrl.description")}}:{mode:"manual",form:{signOnUrlField:$,issuerField:F,certificateField:C,certFile:v,onCertFileChange:y,existingCertPresent:f},labels:{description:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.manual.signingCertificate.fileUploaded")}},E=async()=>{if(p&&R){l.setError(void 0),O(!0);try{let e=await ev({mode:h,metadataUrl:{value:D.value},manual:{signOnUrl:$.value,issuer:F.value,certFile:v}});await u(p.id,{saml:e}),s()}catch(e){"metadataUrl"===h?ey(e,l,D):ey(e,l,$,[F,C]),O(!1)}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlCustom.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{fill:!0,gap:5,children:[(0,r.Y)(eD,{modes:eG,value:h,onChange:e=>{l.setError(void 0),Y(e)},labels:{ariaLabel:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.modes.ariaLabel"),metadataUrl:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.modes.metadataUrl"),manual:(0,z.G)("configureSSO.configureStep.samlCustom.identityProviderMetadataStep.modes.manual")}}),(0,r.Y)(em,{...k})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>c(),isDisabled:d||b}),(0,r.Y)(L.p.Footer.Continue,{onClick:E,isLoading:b,isDisabled:!R})]})]})},eR=[{id:"create-app"},{id:"attribute-mapping"},{id:"assign-users"},{id:"identity-provider-metadata"}],ek=()=>{var e,i,t,o;let{goNext:n,goPrev:l,isFirstStep:c,isLastStep:d}=S(),{enterpriseConnection:p}=(0,a.t)(),u=null!=(e=null==p||null==(t=p.samlConnection)?void 0:t.acsUrl)?e:"",g=null!=(i=null==p||null==(o=p.samlConnection)?void 0:o.spEntityId)?i:"",m=(0,w.tJ)("acsUrl",u,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.serviceProviderFields.acsUrl.label"),isRequired:!1}),f=(0,w.tJ)("spEntityId",g,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.serviceProviderFields.spEntityId.label"),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlOkta.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.createAppInstructions.step4")})]})]}),(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.title")}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.paragraph1")}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.serviceProviderInstructions.paragraph2")})]}),(0,r.Y)(R.l.ControlRow,{elementId:m.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...m.props,children:(0,r.Y)(G.r,{value:u,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.Y)(R.l.ControlRow,{elementId:f.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(G.r,{value:g,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.completeSamlIntegrationInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.completeSamlIntegrationInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.createAppStep.completeSamlIntegrationInstructions.step2")})]})]})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>l(),isDisabled:c}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>n(),isDisabled:d})]})]})},eE=[{id:"email",isRequired:!0},{id:"firstName",isRequired:!1},{id:"lastName",isRequired:!1}],eP=()=>(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.attributeMappingTable.columns.name")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.attributeMappingTable.columns.expression")})})]})}),(0,r.Y)(s.NN,{children:eE.map(e=>(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Td,{children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".name"))}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOAttributeMappingBadge,elementId:C.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,z.G)(e.isRequired?"configureSSO.configureStep.attributeMappingTable.badges.required":"configureSSO.configureStep.attributeMappingTable.badges.optional")})]})}),(0,r.Y)(s.Td,{children:(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".expression"))})})]},e.id))})]}),eT=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlOkta.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.paragraph")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.attributeMappingStep.step2")})]}),(0,r.Y)(eP,{})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eA=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlOkta.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.paragraph")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step4")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlOkta.assignUsersStep.assignUsersInstructions.step5")})]})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eK=["metadataUrl","manual"],ew=()=>{var e,i,t;let l=(0,n.f0)(),{goNext:s,goPrev:c,isFirstStep:d}=S(),{enterpriseConnection:p,enterpriseConnectionMutations:{updateConnection:u}}=(0,a.t)(),g=null==p?void 0:p.samlConnection,m=!!((null==g?void 0:g.idpSsoUrl)||(null==g?void 0:g.idpEntityId)||(null==g?void 0:g.idpCertificate)||(null==g?void 0:g.idpMetadataUrl)),f=!!(null==g?void 0:g.idpCertificate),[h,Y]=o.useState(m?"manual":"metadataUrl"),[v,y]=o.useState(null),[b,O]=o.useState(!1),D=(0,w.tJ)("idpMetadataUrl",null!=(e=null==g?void 0:g.idpMetadataUrl)?e:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.metadataUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.metadataUrl.placeholder"),isRequired:!0}),$=(0,w.tJ)("idpSsoUrl",null!=(i=null==g?void 0:g.idpSsoUrl)?i:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signOnUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signOnUrl.placeholder"),isRequired:!0}),F=(0,w.tJ)("idpEntityId",null!=(t=null==g?void 0:g.idpEntityId)?t:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.issuer.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.issuer.placeholder"),isRequired:!0}),C=(0,w.tJ)("idpCertificate","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.label"),isRequired:!0}),x=D.value.trim(),I=$.value.trim(),G=F.value.trim(),M=null!==v||f,R=("metadataUrl"===h?x.length>0:I.length>0&&G.length>0&&M)&&!b,k="metadataUrl"===h?{mode:"metadataUrl",form:{field:D},labels:{description:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.metadataUrl.description")}}:{mode:"manual",form:{signOnUrlField:$,issuerField:F,certificateField:C,certFile:v,onCertFileChange:y,existingCertPresent:f},labels:{description:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.manual.signingCertificate.fileUploaded")}},E=async()=>{if(p&&R){l.setError(void 0),O(!0);try{let e=await ev({mode:h,metadataUrl:{value:D.value},manual:{signOnUrl:$.value,issuer:F.value,certFile:v}});await u(p.id,{saml:e}),s()}catch(e){"metadataUrl"===h?ey(e,l,D):ey(e,l,$,[F,C]),O(!1)}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlOkta.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{fill:!0,gap:5,children:[(0,r.Y)(eD,{modes:eK,value:h,onChange:e=>{l.setError(void 0),Y(e)},labels:{ariaLabel:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.modes.ariaLabel"),metadataUrl:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.modes.metadataUrl"),manual:(0,z.G)("configureSSO.configureStep.samlOkta.identityProviderMetadataStep.modes.manual")}}),(0,r.Y)(em,{...k})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>c(),isDisabled:d||b}),(0,r.Y)(L.p.Footer.Continue,{onClick:E,isLoading:b,isDisabled:!R})]})]})},eU=[{id:"create-app"},{id:"identity-provider-metadata"},{id:"service-provider"},{id:"attribute-mapping"},{id:"configure-user-access"}],eL=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.Y)(L.p.Section,{sx:e=>({gap:e.space.$5}),children:(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.createAppStep.createAppInstructions.step4")})]})]})})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},e_=["metadataFile","manual"],eB=()=>{var e,i;let t=(0,n.f0)(),{goNext:l,goPrev:s,isFirstStep:c}=S(),{enterpriseConnection:d,enterpriseConnectionMutations:{updateConnection:p}}=(0,a.t)(),u=null==d?void 0:d.samlConnection,g=!!((null==u?void 0:u.idpSsoUrl)||(null==u?void 0:u.idpEntityId)||(null==u?void 0:u.idpCertificate)),m=!!(null==u?void 0:u.idpCertificate),f=!!(null==u?void 0:u.idpMetadata),[h,Y]=o.useState(g?"manual":"metadataFile"),[v,y]=o.useState(null),[b,O]=o.useState(null),[D,$]=o.useState(!1),F=(0,w.tJ)("idpMetadata","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.label"),isRequired:!0}),C=(0,w.tJ)("idpSsoUrl",null!=(e=null==u?void 0:u.idpSsoUrl)?e:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signOnUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signOnUrl.placeholder"),isRequired:!0}),x=(0,w.tJ)("idpEntityId",null!=(i=null==u?void 0:u.idpEntityId)?i:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.issuer.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.issuer.placeholder"),isRequired:!0}),I=(0,w.tJ)("idpCertificate","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.label"),isRequired:!0}),G=C.value.trim(),M=x.value.trim(),R=null!==b||m,k=null!==v||f,E=("metadataFile"===h?k:G.length>0&&M.length>0&&R)&&!D,P="metadataFile"===h?{mode:"metadataFile",form:{field:F,file:v,onFileChange:y,existingFilePresent:f},labels:{description:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.metadataFile.fileUploaded")}}:{mode:"manual",form:{signOnUrlField:C,issuerField:x,certificateField:I,certFile:b,onCertFileChange:O,existingCertPresent:m},labels:{description:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.manual.signingCertificate.fileUploaded")}},T=async()=>{if(d&&E){t.setError(void 0),$(!0);try{let e=await ev({mode:h,metadataFile:{file:v},manual:{signOnUrl:C.value,issuer:x.value,certFile:b}});await p(d.id,{saml:e}),l()}catch(e){"metadataFile"===h?ey(e,t,F):ey(e,t,C,[x,I]),$(!1)}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{fill:!0,gap:5,children:[(0,r.Y)(eD,{modes:e_,value:h,onChange:e=>{t.setError(void 0),Y(e)},labels:{ariaLabel:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.modes.ariaLabel"),metadataFile:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.modes.metadataFile"),manual:(0,z.G)("configureSSO.configureStep.samlGoogle.identityProviderMetadataStep.modes.manual")}}),(0,r.Y)(em,{...P})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>s(),isDisabled:c||D}),(0,r.Y)(L.p.Footer.Continue,{onClick:T,isLoading:D,isDisabled:!E})]})]})},eH=()=>{var e,i,t,o;let{goNext:n,goPrev:l,isFirstStep:c,isLastStep:d}=S(),{enterpriseConnection:p}=(0,a.t)(),u=null!=(e=null==p||null==(t=p.samlConnection)?void 0:t.acsUrl)?e:"",g=null!=(i=null==p||null==(o=p.samlConnection)?void 0:o.spEntityId)?i:"",m=(0,w.tJ)("acsUrl",u,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.serviceProviderFields.acsUrl.label"),isRequired:!1}),f=(0,w.tJ)("spEntityId",g,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.serviceProviderFields.spEntityId.label"),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.title")}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.paragraph")})]}),(0,r.Y)(R.l.ControlRow,{elementId:m.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...m.props,children:(0,r.Y)(G.r,{value:u,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.Y)(R.l.ControlRow,{elementId:f.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(G.r,{value:g,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.nameIdInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.serviceProviderStep.nameIdInstructions.step2")})]})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>l(),isDisabled:c}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>n(),isDisabled:d})]})]})},eW=[{id:"email",isRequired:!0},{id:"firstName",isRequired:!1},{id:"lastName",isRequired:!1}],eq=()=>(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.columns.googleAttribute")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.columns.appAttribute")})})]})}),(0,r.Y)(s.NN,{children:eW.map(e=>(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Td,{children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".googleAttribute"))}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOAttributeMappingBadge,elementId:C.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,z.G)(e.isRequired?"configureSSO.configureStep.attributeMappingTable.badges.required":"configureSSO.configureStep.attributeMappingTable.badges.optional")})]})}),(0,r.Y)(s.Td,{children:(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".appAttribute"))})})]},e.id))})]}),eN=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.paragraph")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.attributeMappingStep.step2")})]}),(0,r.Y)(eq,{})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eV=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlGoogle.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.paragraph1")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.step3")})]}),(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlGoogle.configureUserAccess.assignUsersInstructions.paragraph2")})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})};var eJ=t(58087),eZ=t(5747);let ej=[{id:"create-app"},{id:"service-provider"},{id:"attribute-mapping"},{id:"identity-provider-metadata"}],eX=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlMicrosoft.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step3")}),(0,r.FD)(s.az,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",sx:e=>({fontSize:e.fontSizes.$md,lineHeight:e.lineHeights.$small,color:e.colors.$colorMutedForeground}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step4.label")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,marginBlockStart:e.space.$1x5,marginBlockEnd:0,paddingInlineStart:e.space.$5,listStyleType:"circle"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step4.subSteps.appName")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step4.subSteps.nonGallery")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.createAppInstructions.step4.subSteps.create")})]})]})]})]}),(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step4")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.createAppStep.assignUsersInstructions.step5")})]})]})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eQ=()=>{var e,i,t,o;let{goNext:n,goPrev:l,isFirstStep:c,isLastStep:d}=S(),{enterpriseConnection:p}=(0,a.t)(),u=null!=(e=null==p||null==(t=p.samlConnection)?void 0:t.acsUrl)?e:"",g=null!=(i=null==p||null==(o=p.samlConnection)?void 0:o.spEntityId)?i:"",m=(0,w.tJ)("spEntityId",g,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.serviceProviderFields.spEntityId.label"),isRequired:!1}),f=(0,w.tJ)("acsUrl",u,{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.serviceProviderFields.acsUrl.label"),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlMicrosoft.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.Y)(L.p.Section,{sx:e=>({gap:e.space.$5}),children:(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step2")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step3")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step4")}),(0,r.FD)(s.az,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",sx:e=>({fontSize:e.fontSizes.$md,lineHeight:e.lineHeights.$small,color:e.colors.$colorMutedForeground}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step5")}),(0,r.FD)(s.fv,{sx:e=>({gap:e.space.$4,marginBlock:e.space.$3}),children:[(0,r.Y)(R.l.ControlRow,{elementId:m.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...m.props,children:(0,r.Y)(G.r,{value:g,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})}),(0,r.Y)(R.l.ControlRow,{elementId:f.id,children:(0,r.Y)(R.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(G.r,{value:u,readOnly:!0,copyIcon:T.A,copiedIcon:A.A})})})]})]}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.serviceProviderStep.step6")})]})]})})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>l(),isDisabled:c}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>n(),isDisabled:d})]})]})},e0=[{id:"email",isRequired:!0},{id:"firstName",isRequired:!1},{id:"lastName",isRequired:!1}],e1=e=>{let{claimNameKey:i}=e,{t}=(0,l._)(),o=t(i),{onCopy:n,hasCopied:a}=(0,eJ.i)(o);return(0,r.Y)(s.Td,{sx:{maxWidth:0,width:"100%"},children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$1}),children:[(0,r.FD)(k.m_.Root,{children:[(0,r.Y)(k.m_.Trigger,{children:(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace",display:"block",whiteSpace:"nowrap"},children:(0,eZ.W)(o,32,12)})}),(0,r.Y)(k.m_.Content,{text:i,textSx:{overflowWrap:"anywhere"}})]}),(0,r.Y)(s.$n,{variant:"ghost",onClick:()=>n(),"aria-label":t((0,z.G)(a?"configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.copyClaimNameCopied":"configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.copyClaimName")),sx:e=>({padding:0,height:e.sizes.$5,aspectRatio:1,borderRadius:e.radii.$sm,color:e.colors.$colorMutedForeground}),children:(0,r.Y)(s.In,{size:"sm",icon:a?A.A:T.A,"aria-hidden":!0})})]})})},e5=()=>(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.columns.attribute")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.columns.claimName")})}),(0,r.Y)(s.Th,{children:(0,r.Y)(s.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.columns.value")})})]})}),(0,r.Y)(s.NN,{children:e0.map(e=>{let i=(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".claimName"));return(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Td,{sx:{whiteSpace:"nowrap"},children:(0,r.FD)(s.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".attribute"))}),(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOAttributeMappingBadge,elementId:C.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,z.G)(e.isRequired?"configureSSO.configureStep.attributeMappingTable.badges.required":"configureSSO.configureStep.attributeMappingTable.badges.optional")})]})}),(0,r.Y)(e1,{claimNameKey:i}),(0,r.Y)(s.Td,{children:(0,r.Y)(s.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.attributeMappingTable.rows.".concat(e.id,".value"))})})]},e.id)})})]}),e3=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=S();return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlMicrosoft.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",elementDescriptor:C.$z.configureSSOInstructionsHeading,localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.title")}),(0,r.FD)(s.fv,{elementDescriptor:C.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.step1")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.configureStep.samlMicrosoft.attributeMappingStep.step2")})]}),(0,r.Y)(e5,{})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(L.p.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},e2=["metadataUrl","manual"],e4=()=>{var e,i,t;let l=(0,n.f0)(),{goNext:s,goPrev:c,isFirstStep:d}=S(),{enterpriseConnection:p,enterpriseConnectionMutations:{updateConnection:u}}=(0,a.t)(),g=null==p?void 0:p.samlConnection,m=!!((null==g?void 0:g.idpSsoUrl)||(null==g?void 0:g.idpEntityId)||(null==g?void 0:g.idpCertificate)||(null==g?void 0:g.idpMetadataUrl)),f=!!(null==g?void 0:g.idpCertificate),[h,Y]=o.useState(m?"manual":"metadataUrl"),[v,y]=o.useState(null),[b,O]=o.useState(!1),D=(0,w.tJ)("idpMetadataUrl",null!=(e=null==g?void 0:g.idpMetadataUrl)?e:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.metadataUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.metadataUrl.placeholder"),isRequired:!0}),$=(0,w.tJ)("idpSsoUrl",null!=(i=null==g?void 0:g.idpSsoUrl)?i:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signOnUrl.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signOnUrl.placeholder"),isRequired:!0}),F=(0,w.tJ)("idpEntityId",null!=(t=null==g?void 0:g.idpEntityId)?t:"",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.issuer.label"),placeholder:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.issuer.placeholder"),isRequired:!0}),C=(0,w.tJ)("idpCertificate","",{type:"text",label:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.label"),isRequired:!0}),x=D.value.trim(),I=$.value.trim(),G=F.value.trim(),M=null!==v||f,R=("metadataUrl"===h?x.length>0:I.length>0&&G.length>0&&M)&&!b,k="metadataUrl"===h?{mode:"metadataUrl",form:{field:D},labels:{description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.metadataUrl.description")}}:{mode:"manual",form:{signOnUrlField:$,issuerField:F,certificateField:C,certFile:v,onCertFileChange:y,existingCertPresent:f},labels:{description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.description"),uploadFile:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.uploadFile"),replaceFile:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.replaceFile"),removeFile:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.removeFile"),fileUploaded:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.manual.signingCertificate.fileUploaded")}},E=async()=>{if(p&&R){l.setError(void 0),O(!0);try{let e=await ev({mode:h,metadataUrl:{value:D.value},manual:{signOnUrl:$.value,issuer:F.value,certFile:v}});await u(p.id,{saml:e}),s()}catch(e){"metadataUrl"===h?ey(e,l,D):ey(e,l,$,[F,C]),O(!1)}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.configureStep.samlMicrosoft.mainHeaderTitle"),description:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.headerSubtitle"),children:(0,r.Y)(ed,{})}),(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{fill:!0,gap:5,children:[(0,r.Y)(eD,{modes:e2,value:h,onChange:e=>{l.setError(void 0),Y(e)},labels:{ariaLabel:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.modes.ariaLabel"),metadataUrl:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.modes.metadataUrl"),manual:(0,z.G)("configureSSO.configureStep.samlMicrosoft.identityProviderMetadataStep.modes.manual")}}),(0,r.Y)(em,{...k})]})}),(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>c(),isDisabled:d||b}),(0,r.Y)(L.p.Footer.Continue,{onClick:E,isLoading:b,isDisabled:!R})]})]})},e9={saml_custom:()=>(0,r.FD)(O,{steps:e$,initialStepId:e$[0].id,children:[(0,r.Y)(O.Match,{id:"create-app",children:(0,r.Y)(ez,{})}),(0,r.Y)(O.Match,{id:"attribute-mapping",children:(0,r.Y)(eF,{})}),(0,r.Y)(O.Match,{id:"assign-users",children:(0,r.Y)(eI,{})}),(0,r.Y)(O.Match,{id:"identity-provider-metadata",children:(0,r.Y)(eM,{})})]}),saml_okta:()=>(0,r.FD)(O,{steps:eR,initialStepId:eR[0].id,children:[(0,r.Y)(O.Match,{id:"create-app",children:(0,r.Y)(ek,{})}),(0,r.Y)(O.Match,{id:"attribute-mapping",children:(0,r.Y)(eT,{})}),(0,r.Y)(O.Match,{id:"assign-users",children:(0,r.Y)(eA,{})}),(0,r.Y)(O.Match,{id:"identity-provider-metadata",children:(0,r.Y)(ew,{})})]}),saml_google:()=>(0,r.FD)(O,{steps:eU,initialStepId:eU[0].id,children:[(0,r.Y)(O.Match,{id:"create-app",children:(0,r.Y)(eL,{})}),(0,r.Y)(O.Match,{id:"identity-provider-metadata",children:(0,r.Y)(eB,{})}),(0,r.Y)(O.Match,{id:"service-provider",children:(0,r.Y)(eH,{})}),(0,r.Y)(O.Match,{id:"attribute-mapping",children:(0,r.Y)(eN,{})}),(0,r.Y)(O.Match,{id:"configure-user-access",children:(0,r.Y)(eV,{})})]}),saml_microsoft:()=>(0,r.FD)(O,{steps:ej,initialStepId:ej[0].id,children:[(0,r.Y)(O.Match,{id:"create-app",children:(0,r.Y)(eX,{})}),(0,r.Y)(O.Match,{id:"service-provider",children:(0,r.Y)(eQ,{})}),(0,r.Y)(O.Match,{id:"attribute-mapping",children:(0,r.Y)(e3,{})}),(0,r.Y)(O.Match,{id:"identity-provider-metadata",children:(0,r.Y)(e4,{})})]})},e6=()=>{let{organizationEnterpriseConnection:e}=(0,a.t)(),{direction:i}=S(),t=o.useMemo(()=>[{id:"select-provider"},{id:"configure-provider",isReachable:()=>e.hasConnection}],[e]);return(0,r.FD)(O,{steps:t,initialStepId:1===i?"select-provider":void 0,children:[(0,r.Y)(O.Match,{id:"select-provider",children:(0,r.Y)(n.pe,{children:(0,r.Y)(es,{})})}),(0,r.Y)(O.Match,{id:"configure-provider",children:(0,r.Y)(n.pe,{children:(0,r.Y)(e7,{})})})]})},e7=()=>{let{organizationEnterpriseConnection:e}=(0,a.t)();if(!e.provider)return null;let i=e9[e.provider];if(!i)throw Error("No steps found for provider: ".concat(e.provider));return(0,r.Y)(F.n.Part,{part:"configureCreateApp",children:(0,r.Y)(L.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("configure"),children:(0,r.Y)(i,{})})})};var e8=t(66923),ie=t(4874),ii=t(39632),it=t(9982),ir=t(54657),io=t(69154);t(96954),t(50260);var ia=t(70408);let il={saml_user_attribute_missing:{kind:"steps",introKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.intro"),stepKeys:[(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step1"),(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step2"),(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step3")]},saml_response_relaystate_missing:{kind:"description",descriptionKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_response_relaystate_missing.description")},saml_email_address_domain_mismatch:{kind:"description",descriptionKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_email_address_domain_mismatch.description")},oauth_access_denied:{kind:"description",descriptionKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_access_denied.description")},oauth_token_exchange_error:{kind:"description",descriptionKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_token_exchange_error.description")},oauth_fetch_user_error:{kind:"steps",introKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.intro"),stepKeys:[(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.step1"),(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.step2")]}},is=e=>{let{errorCode:i}=e;if(!i)return null;let t=il[i];if(!t)return null;let o="".concat("https://clerk.com/docs/guides/organizations/add-members/sso","#").concat(i.replaceAll("_","-"));return(0,r.FD)(s.so,{elementDescriptor:C.$z.configureSSOTestRunHowToFixSection,direction:"col",gap:3,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,paddingTop:e.space.$4}),children:[(0,r.Y)(s.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.sectionTitle")}),(0,r.FD)(s.az,{sx:e=>({padding:e.space.$3,backgroundColor:e.colors.$colorBackground,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$md,boxShadow:e.shadows.$cardContentShadow}),children:[(0,r.Y)(ic,{content:t}),(0,r.FD)(s.N_,{elementDescriptor:C.$z.configureSSOTestRunHowToFixDocsLink,href:o,target:"_blank",rel:"noopener noreferrer",sx:e=>({alignSelf:"flex-start",display:"inline-flex",alignItems:"center",gap:e.space.$1x5,paddingBlock:e.space.$1,paddingInline:e.space.$3,borderRadius:e.radii.$md,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,color:e.colors.$colorForeground,fontSize:e.fontSizes.$sm,fontWeight:e.fontWeights.$medium,textDecoration:"none",marginTop:e.space.$2,"&:hover":{backgroundColor:e.colors.$neutralAlpha50,textDecoration:"none"}}),children:[(0,r.Y)(s.L9,{localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.actionLabel__viewDocumentation")}),(0,r.Y)(s.In,{icon:ia.A,size:"sm"})]})]})]})},ic=e=>{let{content:i}=e;return"description"===i.kind?(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:i.descriptionKey}):(0,r.FD)(s.so,{direction:"col",gap:2,children:[i.introKey?(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:i.introKey}):null,(0,r.Y)(s.az,{as:"ol",sx:e=>({margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal",display:"flex",flexDirection:"column",gap:e.space.$1}),children:i.stepKeys.map(e=>(0,r.Y)(s.az,{as:"li",sx:e=>({color:e.colors.$colorMutedForeground,fontSize:e.fontSizes.$sm,"&::marker":{color:e.colors.$colorMutedForeground,fontSize:e.fontSizes.$sm}}),children:(0,r.Y)(s.EY,{as:"span",colorScheme:"secondary",localizationKey:e})},e.key))})]})},id=()=>{let{goPrev:e}=S(),{organizationEnterpriseConnection:i,testRuns:t}=(0,a.t)(),o=(0,n.f0)(),{rows:l,totalCount:c,isLoading:d,isFetching:p,isPolling:u,page:g,setPage:m,refresh:f,revalidateHasSuccessfulTestRun:h}=t,Y=(0,it.P)(p&&!d),v=c?Math.ceil(c/5):0;return(0,r.Y)(F.n.Part,{part:"testSso",children:(0,r.FD)(L.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("test"),children:[(0,r.Y)(L.p.Header,{title:(0,z.G)("configureSSO.testConfigurationStep.title")}),(0,r.FD)(L.p.Body,{children:[(0,r.Y)(L.p.Section,{sx:e=>({borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,r.FD)(s.fv,{gap:3,children:[(0,r.Y)(s.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.subtitle")}),(0,r.Y)(iO,{onTestRunCreated:()=>{m(1),f({armPolling:!0})}})]})}),(0,r.FD)(L.p.Section,{sx:e=>({flex:1,minHeight:0,gap:e.space.$3}),children:[(0,r.FD)(s.so,{align:"center",justify:"between",sx:e=>({gap:e.space.$2,flexShrink:0}),children:[(0,r.Y)(s.EY,{variant:"subtitle",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.title")}),(0,r.FD)(s.$n,{elementDescriptor:C.$z.configureSSOTestRefreshButton,variant:"bordered",colorScheme:"secondary",size:"xs",onClick:()=>void f(),isDisabled:Y,sx:e=>({gap:e.space.$1x5}),children:[Y?(0,r.Y)(s.y$,{elementDescriptor:C.$z.spinner,size:"xs"}):(0,r.Y)(s.In,{icon:P.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.actionLabel__refresh")})]})]}),(0,r.Y)(s.fv,{sx:{flex:1,minHeight:0},children:(0,r.Y)(iu,{rows:l,isPolling:u,isLoading:d,page:g,pageCount:v,pageSize:5,totalCount:null!=c?c:0,onPageChange:m})})]})]}),o.error?(0,r.Y)(s.az,{elementDescriptor:C.$z.configureSSOTestError,sx:e=>({flexShrink:0,paddingInline:e.space.$5,paddingBlock:e.space.$3,borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100}),children:(0,r.Y)(s.EY,{as:"p",variant:"body",sx:e=>({color:e.colors.$danger500,fontSize:e.fontSizes.$sm}),children:o.error})}):null,(0,r.FD)(L.p.Footer,{children:[(0,r.Y)(L.p.Footer.Reset,{}),(0,r.Y)(L.p.Footer.Previous,{onClick:()=>e()}),(0,r.Y)(ip,{hasSuccessfulTestRun:i.hasSuccessfulTestRun,revalidateHasSuccessfulTestRun:h})]})]})})},ip=e=>{let{hasSuccessfulTestRun:i,revalidateHasSuccessfulTestRun:t}=e,{t:a}=(0,l._)(),s=(0,n.f0)(),{goNext:c}=S(),[d,p]=(0,o.useState)(!1),u=(0,it.P)(d),g=()=>{s.setError(void 0),c()},m=async()=>{if(i)return void g();p(!0);try{if(await t())return void g();s.setError(a((0,z.G)("configureSSO.testConfigurationStep.error__noSuccessfulTestRun")))}catch(e){(0,U.H4)(e,[],s.setError)}finally{p(!1)}};return(0,r.Y)(L.p.Footer.Continue,{onClick:m,isLoading:u})},iu=e=>{var i,t;let{rows:n,isLoading:d,isPolling:p,page:u,pageCount:S,pageSize:g,totalCount:m,onPageChange:f}=e,{t:h}=(0,l._)(),{contentRef:Y}=(0,a.t)(),[v,y]=(0,o.useState)(null),b=(null==v?void 0:v.status)==="failed"&&(null==(t=v.logs)||null==(i=t[0])?void 0:i.shortMessage)||h((0,z.G)("configureSSO.testConfigurationStep.testRunDetails.title"));return(0,r.FD)(r.FK,{children:[(0,r.Y)(s.so,{direction:"col",sx:e=>({width:"100%",flex:"0 1 auto",minHeight:0,overflowY:"auto",borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$lg,...K.s.unstyledScrollbar(e),[c.g.sm]:{overflowX:"auto",padding:e.space.$0x25}}),children:(0,r.FD)(s.XI,{elementDescriptor:C.$z.configureSSOTestResultsTable,tableHeadVisuallyHidden:!n.length,sx:e=>({background:e.colors.$colorBackground,"&&":{border:"none",borderRadius:0}}),children:[(0,r.Y)(s.d8,{children:(0,r.FD)(s.Tr,{children:[(0,r.Y)(s.Th,{localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.timestamp")}),(0,r.Y)(s.Th,{localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.sectionTitle")}),(0,r.Y)(s.Th,{localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.status")})]})}),(0,r.Y)(s.NN,{children:d||p?(0,r.Y)(s.Tr,{children:(0,r.Y)(s.Td,{colSpan:3,children:(0,r.FD)(s.so,{direction:"col",align:"center",gap:2,sx:e=>({padding:"".concat(e.space.$10," 0")}),children:[(0,r.Y)(s.y$,{colorScheme:"primary",elementDescriptor:C.$z.configureSSOTestResultsLoadingSpinner}),(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:p?(0,z.G)("configureSSO.testConfigurationStep.testResults.polling"):void 0})]})})}):n.length?n.map(e=>(0,r.FD)(s.Tr,{elementDescriptor:C.$z.configureSSOTestResultsRow,onClick:()=>y(e),sx:e=>({cursor:"pointer","&:hover > td":{backgroundColor:e.colors.$neutralAlpha50}}),children:[(0,r.Y)(s.Td,{children:(0,r.Y)(ig,{testRun:e})}),(0,r.Y)(s.Td,{children:(0,r.Y)(iy,{testRun:e})}),(0,r.Y)(s.Td,{children:(0,r.Y)(ib,{testRun:e})})]},e.id)):(0,r.Y)(s.Tr,{children:(0,r.Y)(s.Td,{colSpan:3,children:(0,r.FD)(s.so,{elementDescriptor:C.$z.configureSSOTestResultsEmpty,direction:"col",align:"center",justify:"center",sx:e=>({padding:"".concat(e.space.$10," 0"),flex:1,gap:e.space.$1,textAlign:"center"}),children:[(0,r.Y)(s.EY,{variant:"subtitle",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.empty.title")}),(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.empty.subtitle")})]})})})})]})}),S>1?(0,r.Y)(s.az,{sx:{flexShrink:0},children:(0,r.Y)(ii.d,{page:Math.min(u,S),count:S,onChange:f,siblingCount:1,rowInfo:{allRowsCount:m,startingRow:m>0?Math.max(0,(u-1)*g)+1:0,endingRow:Math.min(u*g,m)}})}):null,(0,r.FD)(e8.Drawer.Root,{open:null!==v,onOpenChange:e=>{e||y(null)},strategy:"absolute",portalProps:{root:Y},children:[(0,r.Y)(e8.Drawer.Overlay,{}),(0,r.FD)(e8.Drawer.Content,{children:[(0,r.Y)(e8.Drawer.Header,{title:b}),v?(0,r.Y)(ih,{testRun:v}):null]})]})]})},iS=e=>{let{locale:i}=(0,l._)();return e.createdAt?{time:new Intl.DateTimeFormat(i,{timeStyle:"medium"}).format(e.createdAt),day:new Intl.DateTimeFormat(i,{month:"short",day:"numeric"}).format(e.createdAt)}:null},ig=e=>{let{testRun:i}=e,t=iS(i);return t?(0,r.FD)(s.so,{gap:2,align:"baseline",sx:{whiteSpace:"nowrap"},children:[(0,r.Y)(s.EY,{children:t.time}),(0,r.Y)(s.EY,{colorScheme:"secondary",children:t.day})]}):null},im=e=>{let{title:i,children:t}=e;return(0,r.FD)(s.az,{as:"div",sx:e=>({display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:e.space.$2}),children:[(0,r.Y)(s.Dt,{localizationKey:i,sx:e=>({color:e.colors.$colorForeground,...K.s.textVariants(e).subtitle})}),(0,r.Y)(s.Dd,{sx:e=>({display:"grid",justifyContent:"end",color:e.colors.$colorForeground}),children:t})]})},ih=e=>{var i;let{testRun:t}=e,o=iS(t),n="failed"===t.status?null==(i=t.logs)?void 0:i[0]:null;return(0,r.FD)(e8.Drawer.Body,{sx:e=>({display:"flex",flexDirection:"column",flex:1,overflowY:"auto",padding:e.space.$4,gap:e.space.$4}),children:[(0,r.Y)(s.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.sectionTitle")}),(0,r.FD)(s.Dl,{sx:e=>({display:"grid",gridRowGap:e.space.$2}),children:[o?(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.timestamp"),children:(0,r.FD)(s.so,{gap:2,align:"baseline",sx:{whiteSpace:"nowrap"},children:[(0,r.Y)(s.EY,{children:o.time}),(0,r.Y)(s.EY,{colorScheme:"secondary",children:o.day})]})}):null,"failed"===t.status?(null==n?void 0:n.code)?(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.errorCode"),children:(0,r.Y)(s.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:n.code})}):null:(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.status"),children:(0,r.Y)(ib,{testRun:t})})]}),"failed"===t.status&&(null==n?void 0:n.message)?(0,r.Y)(iv,{message:n.message}):null,"failed"===t.status?(0,r.Y)(is,{errorCode:null==n?void 0:n.code}):null,"success"===t.status?(0,r.Y)(iY,{parsedUserInfo:t.parsedUserInfo}):null]})},iY=e=>{let{parsedUserInfo:i}=e;return(null==i?void 0:i.emailAddress)||(null==i?void 0:i.firstName)?(0,r.FD)(s.so,{elementDescriptor:C.$z.configureSSOTestRunParsedUserInfo,direction:"col",gap:3,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,paddingTop:e.space.$4}),children:[(0,r.Y)(s.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.sectionTitle")}),(0,r.FD)(s.Dl,{sx:e=>({display:"grid",gridRowGap:e.space.$2}),children:[i.emailAddress?(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.email"),children:(0,r.Y)(s.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:i.emailAddress})}):null,i.firstName?(0,r.Y)(im,{title:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.firstName"),children:(0,r.Y)(s.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:i.firstName})}):null]})]}):null},iv=e=>{let{message:i}=e,{t}=(0,l._)(),{onCopy:o,hasCopied:n}=(0,eJ.i)(i),a=t((0,z.G)(n?"configureSSO.testConfigurationStep.testRunDetails.runDetails.actionLabel__copied":"configureSSO.testConfigurationStep.testRunDetails.runDetails.actionLabel__copy"));return(0,r.FD)(s.so,{direction:"col",gap:2,children:[(0,r.FD)(s.so,{justify:"between",align:"center",gap:4,children:[(0,r.Y)(s.EY,{colorScheme:"secondary",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.fullMessage")}),(0,r.Y)(ie.K,{elementDescriptor:C.$z.configureSSOTestRunFullMessageCopyButton,variant:"ghost",colorScheme:"neutral",size:"xs",icon:n?A.A:ir.A,"aria-label":a,onClick:()=>o()})]}),(0,r.Y)(s.az,{elementDescriptor:C.$z.configureSSOTestRunFullMessage,as:"pre",sx:e=>({margin:0,padding:e.space.$3,backgroundColor:e.colors.$colorBackground,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$md,boxShadow:e.shadows.$cardContentShadow,fontFamily:e.fonts.$mono,fontSize:e.fontSizes.$sm,color:e.colors.$colorForeground,whiteSpace:"pre-wrap",wordBreak:"break-word"}),children:i})]})},iy=e=>{var i,t,o;let{testRun:n}=e;return"pending"===n.status?(0,r.Y)(s.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(s.EY,{children:"-"})}):"success"===n.status?(0,r.Y)(s.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(s.EY,{children:null==(o=n.parsedUserInfo)?void 0:o.emailAddress})}):(0,r.Y)(s.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(s.EY,{children:null==(t=n.logs)||null==(i=t[0])?void 0:i.shortMessage})})},ib=e=>{let{testRun:i}=e;return"success"===i.status?(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOTestRunStatusBadge,elementId:C.$z.configureSSOTestRunStatusBadge.setId("success"),colorScheme:"success",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.status__success")}):"failed"===i.status?(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOTestRunStatusBadge,elementId:C.$z.configureSSOTestRunStatusBadge.setId("failed"),colorScheme:"danger",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.status__failed")}):(0,r.Y)(s.Ex,{elementDescriptor:C.$z.configureSSOTestRunStatusBadge,elementId:C.$z.configureSSOTestRunStatusBadge.setId("pending"),colorScheme:"warning",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testResults.status__pending")})},iO=e=>{let{onTestRunCreated:i}=e,t=(0,n.f0)(),{enterpriseConnection:l,enterpriseConnectionMutations:{createTestRun:c}}=(0,a.t)(),[d,p]=(0,o.useState)(!1);return(0,r.FD)(s.$n,{elementDescriptor:C.$z.configureSSOTestUrlOpenButton,id:"testSsoUrl",variant:"bordered",colorScheme:"secondary",size:"xs",onClick:()=>{l&&(p(!0),c(l.id).then(e=>{let{url:t}=e;null==i||i(t),window.open(t,"_blank","noopener,noreferrer")}).catch(e=>(0,U.H4)(e,[],t.setError)).finally(()=>p(!1)))},isDisabled:d,sx:e=>({gap:e.space.$1x5,width:"fit-content"}),children:[d?(0,r.Y)(s.y$,{elementDescriptor:C.$z.spinner,size:"sm"}):(0,r.Y)(s.In,{icon:io.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.testConfigurationStep.testUrl.actionLabel__open")})]})};var iD=t(75051),i$=t(59242);let iz=()=>{var e;let{enterpriseConnection:i,organizationEnterpriseConnection:t,enterpriseConnectionMutations:{setConnectionActive:o},onExit:l}=(0,a.t)(),c=(0,n.f0)(),d=(0,D.ho)(),{organization:p}=(0,D.Z5)(),u=(null!=(e=null==i?void 0:i.domains)?e:[]).join(", "),S=t.isActive,g=async()=>{if(i&&!c.isLoading){c.setError(void 0),c.setLoading();try{var e,t;await o(i.id,!0),null==(t=d.telemetry)||t.record((0,$.fC)("configureSSO","activate",{timestamp:new Date().toISOString(),connectionStatus:"active",connectionId:i.id,organizationId:null!=(e=null==p?void 0:p.id)?e:null})),null==l||l()}catch(e){(0,U.H4)(e,[],c.setError)}finally{c.setIdle()}}};return(0,r.Y)(F.n.Part,{part:"ssoActivate",children:(0,r.Y)(L.p,{elementDescriptor:C.$z.configureSSOStep,elementId:C.$z.configureSSOStep.setId("activate"),children:(0,r.Y)(L.p.Body,{children:(0,r.FD)(L.p.Section,{elementDescriptor:C.$z.configureSSOActivate,fill:!0,gap:5,sx:{alignItems:"center",justifyContent:"center"},children:[(0,r.FD)(s.fv,{align:"center",sx:e=>({textAlign:"center",maxWidth:"20.75rem",gap:e.space.$3x5}),children:[(0,r.Y)(s.In,{elementDescriptor:C.$z.configureSSOActivateIcon,icon:iD.A,colorScheme:"neutral",sx:e=>({width:e.sizes.$8,height:e.sizes.$8})}),(0,r.FD)(s.fv,{align:"center",gap:2,children:[(0,r.Y)(s.DZ,{elementDescriptor:C.$z.configureSSOActivateTitle,textVariant:"h2",localizationKey:(0,z.G)(S?"configureSSO.activate.activeTitle":"configureSSO.activate.title")}),(0,r.Y)(s.EY,{elementDescriptor:C.$z.configureSSOActivateSubtitle,as:"p",colorScheme:"secondary",localizationKey:(0,z.G)(S?"configureSSO.activate.activeSubtitle":"configureSSO.activate.subtitle",{domain:u})})]}),c.error&&(0,r.Y)(x.F,{variant:"danger",sx:{width:"100%"},title:c.error})]}),S?(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOActivateButton,variant:"bordered",colorScheme:"secondary",size:"sm",onClick:()=>null==l?void 0:l(),localizationKey:(0,z.G)("configureSSO.activate.doneButton")}):(0,r.FD)(s.so,{align:"center",gap:4,children:[(0,r.Y)(s.$n,{elementDescriptor:C.$z.configureSSOActivateButton,variant:"solid",size:"sm",isLoading:c.isLoading,onClick:()=>void g(),localizationKey:(0,z.G)("configureSSO.activate.activateButton")}),(0,r.FD)(s.$n,{elementDescriptor:C.$z.configureSSOActivateSkipButton,variant:"outline",size:"sm",isDisabled:c.isLoading,onClick:()=>null==l?void 0:l(),children:[(0,r.Y)(s.EY,{as:"span",localizationKey:(0,z.G)("configureSSO.activate.skipButton")}),(0,r.Y)(s.In,{icon:i$.A,size:"sm",sx:e=>({marginInlineStart:e.space.$1})})]})]})]})})})})},iF=e=>{let{title:i,forceInitialStep:t,...l}=e,{organizationEnterpriseConnection:s,organizationDomains:c}=l,d=(0,m.im)(c),p=o.useMemo(()=>[{id:"verify-domain",label:"Domains",isComplete:()=>d},{id:"configure",label:"Connection",isReachable:()=>d||s.hasConnection,isComplete:()=>s.hasMinimumConfiguration||s.isActive},{id:"test",label:"Test",isReachable:()=>s.hasMinimumConfiguration||s.isActive,isComplete:()=>s.hasSuccessfulTestRun||s.isActive},{id:"activate",label:"Activate",isReachable:()=>s.hasSuccessfulTestRun||s.isActive,isComplete:()=>s.isActive}],[s,d]),u=t?p[0].id:void 0;return(0,r.Y)(a.z,{...l,children:(0,r.FD)(O,{steps:p,initialStepId:u,children:[(0,r.Y)(g,{title:i}),(0,r.Y)(O.Match,{id:"verify-domain",children:(0,r.Y)(n.pe,{children:(0,r.Y)(V,{})})}),(0,r.Y)(O.Match,{id:"configure",children:(0,r.Y)(n.pe,{children:(0,r.Y)(e6,{})})}),(0,r.Y)(O.Match,{id:"test",children:(0,r.Y)(n.pe,{children:(0,r.Y)(id,{})})}),(0,r.Y)(O.Match,{id:"activate",children:(0,r.Y)(n.pe,{children:(0,r.Y)(iz,{})})})]})})}},98125(e,i,t){var r=t(59763),o=t(78342),n=t(61046),a=t(39230),l=t(35402),s=t(17308),c=t(17447),d=t(46600),p=t(5870),u=t(62574),S=t(51637),g=t(30869);let m=(0,s.dm)(e=>{var i,t,u;let{onClose:m,onDelete:f,confirmationValue:h}=e,Y=null!=(i=e.title)?i:(0,o.G)("configureSSO.resetConnectionDialog.title"),v=null!=(t=e.subtitle)?t:(0,o.G)("configureSSO.resetConnectionDialog.subtitle"),y=null!=(u=e.confirmButtonLabel)?u:(0,o.G)("configureSSO.resetConnectionDialog.resetButton"),b=(0,s.f0)(),O=(0,S.tJ)("deleteConfirmation","",{type:"text",label:(0,o.G)("configureSSO.resetConnectionDialog.confirmationFieldLabel",{name:h}),isRequired:!0,placeholder:h}),D=!!(h&&O.value===h),$=async()=>{if(D)try{await f(),m()}catch(e){(0,g.H4)(e,[O],b.setError)}};return(0,r.Y)(l.Z.Root,{elementDescriptor:n.$z.configureSSOResetConnectionDialog,sx:e=>({borderRadius:e.radii.$md}),children:(0,r.Y)(l.Z.Content,{sx:e=>({textAlign:"start",padding:e.sizes.$5}),children:(0,r.Y)(p.M,{headerTitle:Y,headerSubtitle:v,sx:e=>({gap:e.space.$4}),children:(0,r.Y)(c.l.Root,{onSubmit:$,children:(0,r.FD)(a.fv,{gap:4,children:[(0,r.Y)(c.l.ControlRow,{elementId:O.id,children:(0,r.Y)(c.l.PlainInput,{...O.props,elementDescriptor:n.$z.configureSSOResetConnectionDialogConfirmationInput,ignorePasswordManager:!0})}),(0,r.FD)(d.c,{children:[(0,r.Y)(c.l.SubmitButton,{elementDescriptor:n.$z.configureSSOResetConnectionDialogSubmitButton,block:!1,colorScheme:"danger",isDisabled:!D,localizationKey:y}),(0,r.Y)(c.l.ResetButton,{elementDescriptor:n.$z.configureSSOResetConnectionDialogCancelButton,block:!1,localizationKey:(0,o.G)("configureSSO.resetConnectionDialog.cancelButton"),onClick:m})]})]})})})})})});t.d(i,{},{i:e=>e.isOpen?(0,r.Y)(u.Modal,{handleClose:e.onClose,canCloseModal:!1,portalRoot:e.contentRef,containerSx:e=>({alignItems:"center",position:"absolute",inset:0,width:"auto",height:"auto",backgroundColor:"inherit",backdropFilter:"blur(".concat(e.sizes.$2,")")}),children:(0,r.Y)(m,{...e})}):null})},80085(e,i,t){t(42949),t(49678),t(31178);let r=e=>{var i,t;return!!((null==e||null==(i=e.samlConnection)?void 0:i.idpSsoUrl)&&(null==e||null==(t=e.samlConnection)?void 0:t.idpEntityId))};t.d(i,{},{im:e=>!!(null==e?void 0:e.length)&&e.every(e=>{var i;return(null==(i=e.ownershipVerification)?void 0:i.status)==="verified"}),vF:e=>{let{connection:i,hasSuccessfulTestRun:t}=e,o=!!i,n=!!(null==i?void 0:i.active),a=r(i);return{provider:null==i?void 0:i.provider,hasConnection:o,isActive:n,hasMinimumConfiguration:a,hasSuccessfulTestRun:t,status:(e=>{let{hasConnection:i,isActive:t,hasMinimumConfiguration:r,hasSuccessfulTestRun:o}=e;return i?t?"active":r&&o?"inactive":"in_progress":"unconfigured"})({hasConnection:o,isActive:n,hasMinimumConfiguration:a,hasSuccessfulTestRun:t})}},yh:r})},98157(e,i,t){var r=t(59763),o=t(39230),n=t(61046),a=t(34260),l=t(8343);t.d(i,{},{B:e=>(0,r.Y)(o.so,{as:"header",elementDescriptor:n.$z.configureSSOHeader,...e,sx:e=>({gap:e.space.$2,width:"100%",minHeight:e.sizes.$13,padding:e.space.$5,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100,[a.g.md]:{flexDirection:"column",alignItems:"flex-start",gap:e.space.$4}})}),F:e=>(0,r.Y)(o.so,{as:"footer",elementDescriptor:n.$z.configureSSOFooter,align:"center",justify:"end",...e,sx:e=>({gap:e.space.$2,minHeight:e.sizes.$16,padding:e.space.$4,background:l.s.mutedBackground(e),borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100})})})},37876(e,i,t){t(36395);var r=t(59763),o=t(46262),n=t(59701),a=t(39230),l=t(61046),s=t(66887),c=t(78342),d=t(43919),p=t(59242),u=t(8343),S=t(37330),g=t(98125),m=t(98157);let f=e=>{let{fill:i,sx:t,...o}=e;return(0,r.Y)(a.fv,{elementDescriptor:l.$z.configureSSOStepSection,...o,sx:[e=>({padding:e.space.$5}),i&&{flex:1},t]})},h=e=>{let{onClick:i,isDisabled:t,isLoading:o,label:n="Previous"}=e,{t:c}=(0,s._)(),p="string"==typeof n?n:c(n);return(0,r.FD)(a.$n,{elementDescriptor:l.$z.configureSSOFooterPreviousButton,variant:"outline",size:"sm",isDisabled:t,isLoading:o,onClick:i?()=>{i()}:void 0,children:[(0,r.Y)(a.In,{icon:d.A,size:"sm",sx:e=>({marginInlineEnd:e.space.$1})}),p]})};h.displayName="Step.Footer.Previous";let Y=e=>{let{onClick:i,isDisabled:t,isLoading:o,label:n="Continue"}=e,{t:c}=(0,s._)(),d="string"==typeof n?n:c(n);return(0,r.FD)(a.$n,{elementDescriptor:l.$z.configureSSOFooterContinueButton,variant:"solid",size:"sm",isDisabled:t,isLoading:o,onClick:i?()=>{i()}:void 0,children:[d,(0,r.Y)(a.In,{icon:p.A,size:"sm",sx:e=>({marginInlineStart:e.space.$1})})]})};Y.displayName="Step.Footer.Continue";let v=()=>{var e;let{enterpriseConnection:i,enterpriseConnectionMutations:t,contentRef:s}=(0,S.t)(),d=(0,o.It)(),[p,u]=(0,n.useState)(!1);return i?(0,r.FD)(r.FK,{children:[(0,r.Y)(a.$n,{elementDescriptor:l.$z.configureSSOFooterResetButton,variant:"ghost",size:"sm",colorScheme:"danger",onClick:()=>u(!0),localizationKey:(0,c.G)("configureSSO.resetConnectionDialog.resetButton"),sx:{marginInlineEnd:"auto"}}),(0,r.Y)(g.i,{isOpen:p,onClose:()=>u(!1),confirmationValue:null!=(e=null==d?void 0:d.name)?e:"",onDelete:()=>t.deleteConnection(i.id),contentRef:s})]}):null};v.displayName="Step.Footer.Reset";let y=Object.assign(e=>{let{children:i}=e;return(0,r.Y)(m.F,{children:i})},{Previous:h,Continue:Y,Reset:v}),b=e=>{let{total:i,current:t}=e;return i<=1?null:(0,r.Y)(a.Ex,{elementDescriptor:l.$z.configureSSOStepCounter,colorScheme:"primary",sx:{whiteSpace:"nowrap"},children:(0,r.FD)(a.EY,{as:"span",sx:e=>({fontSize:e.fontSizes.$xs}),children:["Step ",t,"/",i]})})};b.displayName="Step.Counter";let O=Object.assign(e=>{let{sx:i,...t}=e;return(0,r.Y)(a.fv,{...t,sx:[{flex:1,minHeight:0},i]})},{Section:f,Header:e=>{let{title:i,description:t,badge:o,children:n}=e,{t:c}=(0,s._)(),d="string"==typeof i?i:c(i),p=t?"string"==typeof t?t:c(t):null;return(0,r.Y)(f,{elementDescriptor:l.$z.configureSSOStepHeader,sx:e=>({borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,r.FD)(a.so,{align:"start",justify:"between",sx:e=>({gap:e.space.$4}),children:[(0,r.FD)(a.fv,{sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.FD)(a.so,{align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap"}),children:[(0,r.Y)(a.DZ,{elementDescriptor:l.$z.configureSSOStepHeaderTitle,textVariant:"h2",children:d}),o]}),p&&(0,r.Y)(a.EY,{elementDescriptor:l.$z.configureSSOStepHeaderDescription,as:"p",colorScheme:"secondary",children:p})]}),n]})})},Body:e=>{let{sx:i,...t}=e;return(0,r.Y)(a.fv,{elementDescriptor:l.$z.configureSSOStepBody,as:"main",...t,sx:[e=>({flex:1,minHeight:0,overflowY:"auto",...u.s.unstyledScrollbar(e)}),i]})},Footer:y,Counter:b});t.d(i,{},{p:O})},52537(e,i,t){t(42949),t(98972),t(73560),t(18723),t(37891);var r=t(59763),o=t(59701),n=t(39230),a=t(61046),l=t(59242),s=t(53693),c=t(34260);let d=e=>{let{bullet:i,isCurrent:t,isCompleted:o,isReachable:l=!0,onClick:c,children:d}=e;return(0,r.FD)(n.dF,{elementDescriptor:a.$z.configureSSOStepperItem,isActive:t,variant:"unstyled",isDisabled:!l,onClick:c,sx:e=>({gap:e.space.$1x5,padding:0,color:t||o?e.colors.$colorForeground:e.colors.$colorMutedForeground,"&:disabled,&[data-disabled]":{opacity:1}}),children:[(0,r.Y)(n.so,{elementDescriptor:a.$z.configureSSOStepperItemBullet,isActive:t,align:"center",justify:"center",sx:e=>({width:e.sizes.$4,height:e.sizes.$4,borderRadius:e.radii.$circle,backgroundColor:o?e.colors.$success500:t?e.colors.$colorForeground:e.colors.$colorMutedForeground}),children:o?(0,r.Y)(n.In,{icon:s.A,size:"sm",sx:e=>({color:e.colors.$white})}):(0,r.Y)(n.EY,{as:"span",sx:e=>({fontSize:e.fontSizes.$xs,fontWeight:e.fontWeights.$medium,color:e.colors.$colorBackground,lineHeight:"1rem"}),children:i})}),(0,r.Y)(n.EY,{elementDescriptor:a.$z.configureSSOStepperItemLabel,as:"span",variant:"body",sx:{fontWeight:"inherit",color:"inherit"},children:d})]})};d.displayName="Stepper.Item";let p=()=>(0,r.FD)(n.so,{align:"center",sx:e=>({gap:e.space.$1x5,minHeight:e.sizes.$4x5,opacity:.16}),children:[(0,r.Y)(n.az,{sx:e=>({width:e.sizes.$4,height:e.sizes.$4,borderRadius:e.radii.$circle,backgroundColor:e.colors.$colorMutedForeground})}),(0,r.Y)(n.az,{sx:e=>({width:e.sizes.$17,height:e.sizes.$1x5,borderRadius:e.radii.$md,backgroundColor:e.colors.$colorMutedForeground})})]}),u=Object.assign(e=>{let{children:i}=e,t=o.Children.toArray(i).filter(e=>o.isValidElement(e));return(0,r.Y)(n.so,{elementDescriptor:a.$z.configureSSOStepper,align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap",[c.g.md]:{gap:e.space.$3}}),children:t.map((e,i)=>(0,r.FD)(n.L9,{sx:e=>({display:"flex",alignItems:"center",gap:e.space.$2}),children:[e,i<t.length-1&&(0,r.Y)(n.In,{elementDescriptor:a.$z.configureSSOStepperSeparator,icon:l.A,size:"md",colorScheme:"neutral",sx:{[c.g.md]:{display:"none"}}})]},i))})},{Item:d,Skeleton:e=>{let{totalSteps:i=4}=e;return(0,r.Y)(n.so,{elementDescriptor:a.$z.configureSSOStepper,align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap",[c.g.md]:{gap:e.space.$3}}),children:Array.from({length:i}).map((e,t)=>(0,r.FD)(o.Fragment,{children:[(0,r.Y)(p,{}),t<i-1&&(0,r.Y)(n.In,{elementDescriptor:a.$z.configureSSOStepperSeparator,icon:l.A,size:"md",colorScheme:"neutral",sx:{opacity:.16,[c.g.md]:{display:"none"}}})]},t))})}});t.d(i,{},{C:u})},51182(e,i,t){t.d(i,{c:()=>l}),t(42949),t(37891),t(67548),t(70954),t(98803),t(79162),t(15385),t(39342),t(69152),t(36395),t(15254);var r=t(46262),o=t(59701),n=t(80085);t(73560);let a=function(e){var i,t;let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],a=null!=(i=null==e?void 0:e.id)?i:null,[l,s]=(0,o.useState)(1),{data:c,isLoading:d,revalidate:p}=(0,r.yS)({enterpriseConnectionId:a,params:{initialPage:1,pageSize:1,status:["success"]},enabled:n}),{data:u,totalCount:S,isLoading:g,isFetching:m,isPolling:f,revalidate:h}=(0,r.yS)({enterpriseConnectionId:a,params:{initialPage:l,pageSize:5},enabled:n,keepPreviousData:!0}),Y=(0,o.useCallback)(e=>{var i;let t=null!=(i=null==e?void 0:e.armPolling)&&i;return Promise.all([p({armPolling:!1}),h({armPolling:t})])},[p,h]),v=(0,o.useCallback)(async()=>{var e;let{data:i}=await p({armPolling:!1,exact:!0});return(null!=(e=null==i?void 0:i.length)?e:0)>0},[p]);return{hasSuccessfulTestRun:(null!=(t=null==c?void 0:c.length)?t:0)>0,isLoading:d||g,isFetching:m,rows:null!=u?u:[],totalCount:null!=S?S:0,isPolling:f,page:l,setPage:s,refresh:Y,revalidateHasSuccessfulTestRun:v}},l=()=>{let{data:e,isLoading:i,createEnterpriseConnection:t,updateEnterpriseConnection:l,deleteEnterpriseConnection:s}=(0,r.n6)({enabled:!0}),c=null==e?void 0:e[0],d=(0,o.useRef)(void 0);void 0!==d.current||i||(d.current=!!c);let p=!0===d.current,u=(0,n.yh)(c)||!!(null==c?void 0:c.active),{hasSuccessfulTestRun:S,isLoading:g,isFetching:m,rows:f,totalCount:h,isPolling:Y,page:v,setPage:y,refresh:b,revalidateHasSuccessfulTestRun:O}=a(c,u),{user:D}=(0,r.Jd)(),{session:$}=(0,r.wV)(),{organization:z}=(0,r.Z5)(),F=(0,o.useCallback)(async e=>{var i,t,r;if(!c)return;let o=e.map(e=>e.name),n=Array.from(new Set([...null!=(i=c.domains)?i:[],...o]));n.length!==(null!=(t=null==(r=c.domains)?void 0:r.length)?t:0)&&await l(c.id,{domains:n})},[c,l]),{isLoading:C,data:x,createDomain:I,prepareOwnershipVerification:G,attemptOwnershipVerification:M,revalidate:R}=(0,r.QE)({enrollmentMode:"enterprise_sso",onOwnershipVerified:F}),k=(0,o.useMemo)(()=>({createDomain:I,prepareOwnershipVerification:G,attemptOwnershipVerification:M,revalidate:R}),[I,G,M,R]),E=(0,o.useMemo)(()=>({createConnection:e=>t({provider:e,domains:null==x?void 0:x.map(e=>e.name)}),changeProvider:async e=>{var i;return c&&await s(c.id),t({provider:e,domains:null!=(i=null==c?void 0:c.domains)?i:null==x?void 0:x.map(e=>e.name)})},updateConnection:(e,i)=>l(e,i),setConnectionActive:(e,i)=>l(e,{active:i}),deleteConnection:e=>s(e),createTestRun:e=>{if(!z)throw Error("useOrganizationEnterpriseConnection.createTestRun called before the organization resource was loaded.");return z.createEnterpriseConnectionTestRun(e)}}),[z,x,c,t,l,s]),P=(0,o.useMemo)(()=>({rows:f,totalCount:h,isLoading:g,isFetching:m,isPolling:Y,page:v,setPage:y,refresh:b,revalidateHasSuccessfulTestRun:O}),[f,h,g,m,Y,v,y,b,O]),T=(0,o.useMemo)(()=>(0,n.vF)({connection:c,hasSuccessfulTestRun:S}),[c,S]);return{user:D,session:$,organization:z,isLoading:i||C||p&&g,enterpriseConnection:c,organizationEnterpriseConnection:T,enterpriseConnectionMutations:E,testRuns:P,organizationDomains:x,organizationDomainMutations:k}}}}]);