@asgardeo/vue 0.3.9 → 0.4.0

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 (86) hide show
  1. package/README.md +2 -32
  2. package/dist/api/updateMeProfile.d.ts +25 -0
  3. package/dist/api/updateMeProfile.d.ts.map +1 -0
  4. package/dist/cjs/index.js +1437 -774
  5. package/dist/cjs/index.js.map +4 -4
  6. package/dist/components/auth/sign-in/AuthOptionFactory.d.ts.map +1 -0
  7. package/dist/components/auth/sign-in/AuthOptionFactoryCore.d.ts.map +1 -0
  8. package/dist/components/auth/sign-in/BaseSignIn.d.ts.map +1 -0
  9. package/dist/components/auth/sign-in/SignIn.d.ts.map +1 -0
  10. package/dist/components/auth/sign-in/v1/BaseSignIn.d.ts.map +1 -0
  11. package/dist/components/auth/sign-in/v1/SignIn.d.ts.map +1 -0
  12. package/dist/components/auth/sign-in/v1/options/SignInOptionFactory.d.ts.map +1 -0
  13. package/dist/components/auth/sign-in/v2/AuthOptionFactory.d.ts.map +1 -0
  14. package/dist/components/auth/sign-in/v2/BaseSignIn.d.ts.map +1 -0
  15. package/dist/components/auth/sign-in/v2/SignIn.d.ts.map +1 -0
  16. package/dist/components/auth/sign-up/BaseSignUp.d.ts.map +1 -0
  17. package/dist/components/auth/sign-up/SignUp.d.ts.map +1 -0
  18. package/dist/components/auth/sign-up/v1/BaseSignUp.d.ts.map +1 -0
  19. package/dist/components/auth/sign-up/v1/SignUp.d.ts.map +1 -0
  20. package/dist/components/auth/sign-up/v1/options/SignUpOptionFactory.d.ts.map +1 -0
  21. package/dist/components/auth/sign-up/v2/BaseSignUp.d.ts.map +1 -0
  22. package/dist/components/auth/sign-up/v2/SignUp.d.ts.map +1 -0
  23. package/dist/components/{control → presentation}/organization/Organization.d.ts +1 -1
  24. package/dist/components/presentation/organization/Organization.d.ts.map +1 -0
  25. package/dist/components/{control → presentation}/user/User.d.ts +2 -2
  26. package/dist/components/presentation/user/User.d.ts.map +1 -0
  27. package/dist/components/presentation/user-dropdown/BaseUserDropdown.d.ts +28 -3
  28. package/dist/components/presentation/user-dropdown/BaseUserDropdown.d.ts.map +1 -1
  29. package/dist/components/presentation/user-dropdown/UserDropdown.css.d.ts +18 -8
  30. package/dist/components/presentation/user-dropdown/UserDropdown.css.d.ts.map +1 -1
  31. package/dist/components/presentation/user-dropdown/UserDropdown.d.ts +20 -2
  32. package/dist/components/presentation/user-dropdown/UserDropdown.d.ts.map +1 -1
  33. package/dist/components/presentation/user-profile/BaseUserProfile.d.ts +9 -17
  34. package/dist/components/presentation/user-profile/BaseUserProfile.d.ts.map +1 -1
  35. package/dist/components/presentation/user-profile/UserProfile.css.d.ts +9 -0
  36. package/dist/components/presentation/user-profile/UserProfile.css.d.ts.map +1 -1
  37. package/dist/components/presentation/user-profile/UserProfile.d.ts.map +1 -1
  38. package/dist/index.d.ts +11 -11
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +1391 -721
  41. package/dist/index.js.map +4 -4
  42. package/dist/models/contexts.d.ts +2 -0
  43. package/dist/models/contexts.d.ts.map +1 -1
  44. package/dist/providers/AsgardeoProvider.d.ts.map +1 -1
  45. package/dist/providers/UserProvider.d.ts.map +1 -1
  46. package/dist/utils/getDisplayName.d.ts +23 -0
  47. package/dist/utils/getDisplayName.d.ts.map +1 -0
  48. package/dist/utils/getMappedUserProfileValue.d.ts +21 -0
  49. package/dist/utils/getMappedUserProfileValue.d.ts.map +1 -0
  50. package/package.json +2 -2
  51. package/dist/components/control/organization/Organization.d.ts.map +0 -1
  52. package/dist/components/control/user/User.d.ts.map +0 -1
  53. package/dist/components/presentation/sign-in/AuthOptionFactory.d.ts.map +0 -1
  54. package/dist/components/presentation/sign-in/AuthOptionFactoryCore.d.ts.map +0 -1
  55. package/dist/components/presentation/sign-in/BaseSignIn.d.ts.map +0 -1
  56. package/dist/components/presentation/sign-in/SignIn.d.ts.map +0 -1
  57. package/dist/components/presentation/sign-in/v1/BaseSignIn.d.ts.map +0 -1
  58. package/dist/components/presentation/sign-in/v1/SignIn.d.ts.map +0 -1
  59. package/dist/components/presentation/sign-in/v1/options/SignInOptionFactory.d.ts.map +0 -1
  60. package/dist/components/presentation/sign-in/v2/AuthOptionFactory.d.ts.map +0 -1
  61. package/dist/components/presentation/sign-in/v2/BaseSignIn.d.ts.map +0 -1
  62. package/dist/components/presentation/sign-in/v2/SignIn.d.ts.map +0 -1
  63. package/dist/components/presentation/sign-up/BaseSignUp.d.ts.map +0 -1
  64. package/dist/components/presentation/sign-up/SignUp.d.ts.map +0 -1
  65. package/dist/components/presentation/sign-up/v1/BaseSignUp.d.ts.map +0 -1
  66. package/dist/components/presentation/sign-up/v1/SignUp.d.ts.map +0 -1
  67. package/dist/components/presentation/sign-up/v1/options/SignUpOptionFactory.d.ts.map +0 -1
  68. package/dist/components/presentation/sign-up/v2/BaseSignUp.d.ts.map +0 -1
  69. package/dist/components/presentation/sign-up/v2/SignUp.d.ts.map +0 -1
  70. /package/dist/components/{presentation → auth}/sign-in/AuthOptionFactory.d.ts +0 -0
  71. /package/dist/components/{presentation → auth}/sign-in/AuthOptionFactoryCore.d.ts +0 -0
  72. /package/dist/components/{presentation → auth}/sign-in/BaseSignIn.d.ts +0 -0
  73. /package/dist/components/{presentation → auth}/sign-in/SignIn.d.ts +0 -0
  74. /package/dist/components/{presentation → auth}/sign-in/v1/BaseSignIn.d.ts +0 -0
  75. /package/dist/components/{presentation → auth}/sign-in/v1/SignIn.d.ts +0 -0
  76. /package/dist/components/{presentation → auth}/sign-in/v1/options/SignInOptionFactory.d.ts +0 -0
  77. /package/dist/components/{presentation → auth}/sign-in/v2/AuthOptionFactory.d.ts +0 -0
  78. /package/dist/components/{presentation → auth}/sign-in/v2/BaseSignIn.d.ts +0 -0
  79. /package/dist/components/{presentation → auth}/sign-in/v2/SignIn.d.ts +0 -0
  80. /package/dist/components/{presentation → auth}/sign-up/BaseSignUp.d.ts +0 -0
  81. /package/dist/components/{presentation → auth}/sign-up/SignUp.d.ts +0 -0
  82. /package/dist/components/{presentation → auth}/sign-up/v1/BaseSignUp.d.ts +0 -0
  83. /package/dist/components/{presentation → auth}/sign-up/v1/SignUp.d.ts +0 -0
  84. /package/dist/components/{presentation → auth}/sign-up/v1/options/SignUpOptionFactory.d.ts +0 -0
  85. /package/dist/components/{presentation → auth}/sign-up/v2/BaseSignUp.d.ts +0 -0
  86. /package/dist/components/{presentation → auth}/sign-up/v2/SignUp.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts", "../../src/providers/AsgardeoProvider.ts", "../../src/providers/BrandingProvider.ts", "../../src/keys.ts", "../../src/providers/FlowMetaProvider.ts", "../../src/providers/FlowProvider.ts", "../../src/providers/I18nProvider.ts", "../../src/utils/logger.ts", "../../src/providers/OrganizationProvider.ts", "../../src/providers/ThemeProvider.ts", "../../src/providers/UserProvider.ts", "../../src/AsgardeoVueClient.ts", "../../src/__temp__/api.ts", "../../src/api/getAllOrganizations.ts", "../../src/api/getMeOrganizations.ts", "../../src/api/getSchemas.ts", "../../src/api/getScim2Me.ts", "../../src/styles/animations.css.ts", "../../src/styles/defaults.css.ts", "../../src/components/presentation/create-organization/CreateOrganization.css.ts", "../../src/components/presentation/language-switcher/LanguageSwitcher.css.ts", "../../src/components/presentation/organization-list/OrganizationList.css.ts", "../../src/components/presentation/organization-profile/OrganizationProfile.css.ts", "../../src/components/presentation/organization-switcher/OrganizationSwitcher.css.ts", "../../src/components/presentation/user-dropdown/UserDropdown.css.ts", "../../src/components/presentation/user-profile/UserProfile.css.ts", "../../src/components/primitives/Alert/Alert.css.ts", "../../src/components/primitives/Button/Button.css.ts", "../../src/components/primitives/Card/Card.css.ts", "../../src/components/primitives/Checkbox/Checkbox.css.ts", "../../src/components/primitives/DatePicker/DatePicker.css.ts", "../../src/components/primitives/Divider/Divider.css.ts", "../../src/components/primitives/Logo/Logo.css.ts", "../../src/components/primitives/OtpField/OtpField.css.ts", "../../src/components/primitives/PasswordField/PasswordField.css.ts", "../../src/components/primitives/Select/Select.css.ts", "../../src/components/primitives/Spinner/Spinner.css.ts", "../../src/components/primitives/TextField/TextField.css.ts", "../../src/components/primitives/Typography/Typography.css.ts", "../../src/styles/injectStyles.ts", "../../src/plugins/AsgardeoPlugin.ts", "../../src/composables/useAsgardeo.ts", "../../src/composables/useBranding.ts", "../../src/composables/useFlow.ts", "../../src/composables/useFlowMeta.ts", "../../src/composables/useI18n.ts", "../../src/composables/useOrganization.ts", "../../src/composables/useTheme.ts", "../../src/composables/useUser.ts", "../../src/composables/useOAuthCallback.ts", "../../src/composables/v2/useOAuthCallback.ts", "../../src/components/primitives/Button/Button.ts", "../../src/components/primitives/Card/Card.ts", "../../src/components/primitives/Alert/Alert.ts", "../../src/components/primitives/TextField/TextField.ts", "../../src/components/primitives/PasswordField/PasswordField.ts", "../../src/components/primitives/Icons.ts", "../../src/components/primitives/Select/Select.ts", "../../src/components/primitives/Checkbox/Checkbox.ts", "../../src/components/primitives/DatePicker/DatePicker.ts", "../../src/components/primitives/OtpField/OtpField.ts", "../../src/components/primitives/Typography/Typography.ts", "../../src/components/primitives/Divider/Divider.ts", "../../src/components/primitives/Logo/Logo.ts", "../../src/components/primitives/Spinner/Spinner.ts", "../../src/components/actions/SignInButton.ts", "../../src/components/actions/BaseSignInButton.ts", "../../src/components/actions/SignOutButton.ts", "../../src/components/actions/BaseSignOutButton.ts", "../../src/components/actions/SignUpButton.ts", "../../src/components/actions/BaseSignUpButton.ts", "../../src/components/auth/Callback.ts", "../../src/components/control/SignedIn.ts", "../../src/components/control/SignedOut.ts", "../../src/components/control/Loading.ts", "../../src/components/control/user/User.ts", "../../src/components/control/organization/Organization.ts", "../../src/components/presentation/sign-in/SignIn.ts", "../../src/components/presentation/sign-in/v1/SignIn.ts", "../../src/components/presentation/sign-in/v1/BaseSignIn.ts", "../../src/components/presentation/sign-in/v1/options/SignInOptionFactory.ts", "../../src/components/adapters/FacebookButton.ts", "../../src/components/adapters/GitHubButton.ts", "../../src/components/adapters/GoogleButton.ts", "../../src/components/adapters/MicrosoftButton.ts", "../../src/components/factories/FieldFactory.ts", "../../src/components/presentation/sign-in/v2/SignIn.ts", "../../src/components/presentation/sign-in/v2/BaseSignIn.ts", "../../src/components/presentation/sign-in/AuthOptionFactoryCore.ts", "../../src/utils/v2/resolveTranslationsInObject.ts", "../../src/utils/v2/resolveTranslationsInArray.ts", "../../src/utils/v2/flowTransformer.ts", "../../src/utils/oauth.ts", "../../src/utils/v2/passkey.ts", "../../src/components/presentation/sign-in/BaseSignIn.ts", "../../src/components/presentation/sign-up/SignUp.ts", "../../src/components/presentation/sign-up/v1/SignUp.ts", "../../src/components/presentation/sign-up/v1/BaseSignUp.ts", "../../src/components/presentation/sign-up/v1/options/SignUpOptionFactory.ts", "../../src/components/presentation/sign-up/v2/SignUp.ts", "../../src/components/presentation/sign-up/v2/BaseSignUp.ts", "../../src/utils/v2/getAuthComponentHeadings.ts", "../../src/components/presentation/sign-up/BaseSignUp.ts", "../../src/components/presentation/user-profile/UserProfile.ts", "../../src/components/presentation/user-profile/BaseUserProfile.ts", "../../src/components/presentation/user-dropdown/UserDropdown.ts", "../../src/components/presentation/user-dropdown/BaseUserDropdown.ts", "../../src/components/presentation/accept-invite/AcceptInvite.ts", "../../src/components/presentation/accept-invite/BaseAcceptInvite.ts", "../../src/components/presentation/invite-user/InviteUser.ts", "../../src/components/presentation/invite-user/BaseInviteUser.ts", "../../src/components/presentation/organization-list/OrganizationList.ts", "../../src/components/presentation/organization-list/BaseOrganizationList.ts", "../../src/components/presentation/organization-profile/OrganizationProfile.ts", "../../src/components/presentation/organization-profile/BaseOrganizationProfile.ts", "../../src/components/presentation/organization-switcher/OrganizationSwitcher.ts", "../../src/components/presentation/organization-switcher/BaseOrganizationSwitcher.ts", "../../src/components/presentation/create-organization/CreateOrganization.ts", "../../src/components/presentation/create-organization/BaseCreateOrganization.ts", "../../src/components/presentation/language-switcher/LanguageSwitcher.ts", "../../src/components/presentation/language-switcher/BaseLanguageSwitcher.ts", "../../src/utils/v2/buildThemeConfigFromFlowMeta.ts", "../../src/utils/handleWebAuthnAuthentication.ts", "../../src/utils/hasAuthParamsInUrl.ts", "../../src/utils/navigate.ts", "../../src/utils/http.ts", "../../src/router/guard.ts", "../../src/router/callbackRoute.ts", "../../src/theme/getActiveTheme.ts", "../../src/theme/themeDetection.ts"],
4
- "sourcesContent": ["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n// \u2500\u2500 Plugin \u2500\u2500\nexport {default as AsgardeoPlugin} from './plugins/AsgardeoPlugin';\nexport type {AsgardeoPluginOptions} from './plugins/AsgardeoPlugin';\n\n// \u2500\u2500 Components \u2500\u2500\nexport {default as AsgardeoProvider} from './providers/AsgardeoProvider';\n\n// \u2500\u2500 Providers \u2500\u2500\nexport {default as BrandingProvider} from './providers/BrandingProvider';\nexport {default as FlowMetaProvider} from './providers/FlowMetaProvider';\nexport {default as FlowProvider} from './providers/FlowProvider';\nexport {default as I18nProvider} from './providers/I18nProvider';\nexport {default as OrganizationProvider} from './providers/OrganizationProvider';\nexport {default as ThemeProvider} from './providers/ThemeProvider';\nexport {default as UserProvider} from './providers/UserProvider';\n\n// \u2500\u2500 Composables \u2500\u2500\nexport {default as useAsgardeo} from './composables/useAsgardeo';\nexport {default as useBranding} from './composables/useBranding';\nexport {default as useFlow} from './composables/useFlow';\nexport {default as useFlowMeta} from './composables/useFlowMeta';\nexport {default as useI18n} from './composables/useI18n';\nexport {default as useOrganization} from './composables/useOrganization';\nexport {default as useTheme} from './composables/useTheme';\nexport {default as useUser} from './composables/useUser';\nexport {useOAuthCallback} from './composables/useOAuthCallback';\nexport type {UseOAuthCallbackOptions, OAuthCallbackPayload} from './composables/useOAuthCallback';\nexport {useOAuthCallback as useOAuthCallbackV2} from './composables/v2/useOAuthCallback';\nexport type {\n UseOAuthCallbackOptions as UseOAuthCallbackOptionsV2,\n OAuthCallbackPayload as OAuthCallbackPayloadV2,\n} from './composables/v2/useOAuthCallback';\n\n// \u2500\u2500 Client \u2500\u2500\nexport {default as AsgardeoVueClient} from './AsgardeoVueClient';\n\n// \u2500\u2500 Keys \u2500\u2500\nexport {\n ASGARDEO_KEY,\n BRANDING_KEY,\n FLOW_KEY,\n FLOW_META_KEY,\n I18N_KEY,\n ORGANIZATION_KEY,\n THEME_KEY,\n USER_KEY,\n} from './keys';\n\n// \u2500\u2500 Models / Types \u2500\u2500\nexport type {AsgardeoVueConfig} from './models/config';\nexport type {\n AsgardeoContext,\n BrandingContextValue,\n FlowContextValue,\n FlowMessage,\n FlowMetaContextValue,\n FlowStep,\n I18nContextValue,\n OrganizationContextValue,\n ThemeContextValue,\n UserContextValue,\n} from './models/contexts';\n\n// \u2500\u2500 UI Components \u2014 Primitives \u2500\u2500\nexport {default as Button} from './components/primitives/Button/Button';\nexport {default as Card} from './components/primitives/Card/Card';\nexport {default as Alert} from './components/primitives/Alert/Alert';\nexport {default as TextField} from './components/primitives/TextField/TextField';\nexport {default as PasswordField} from './components/primitives/PasswordField/PasswordField';\nexport {default as Select} from './components/primitives/Select/Select';\nexport type {SelectOption} from './components/primitives/Select/Select';\nexport {default as Checkbox} from './components/primitives/Checkbox/Checkbox';\nexport {default as DatePicker} from './components/primitives/DatePicker/DatePicker';\nexport {default as OtpField} from './components/primitives/OtpField/OtpField';\nexport {default as Typography} from './components/primitives/Typography/Typography';\nexport {default as Divider} from './components/primitives/Divider/Divider';\nexport {default as Logo} from './components/primitives/Logo/Logo';\nexport {default as Spinner} from './components/primitives/Spinner/Spinner';\nexport {\n UserIcon,\n EyeIcon,\n EyeOffIcon,\n ChevronDownIcon,\n CheckIcon,\n CircleAlertIcon,\n CircleCheckIcon,\n InfoIcon,\n TriangleAlertIcon,\n XIcon,\n PlusIcon,\n LogOutIcon,\n ArrowLeftRightIcon,\n BuildingIcon,\n GlobeIcon,\n PencilIcon,\n} from './components/primitives/Icons';\n\n// \u2500\u2500 UI Components \u2014 Actions \u2500\u2500\nexport {default as SignInButton} from './components/actions/SignInButton';\nexport {default as BaseSignInButton} from './components/actions/BaseSignInButton';\nexport {default as SignOutButton} from './components/actions/SignOutButton';\nexport {default as BaseSignOutButton} from './components/actions/BaseSignOutButton';\nexport {default as SignUpButton} from './components/actions/SignUpButton';\nexport {default as BaseSignUpButton} from './components/actions/BaseSignUpButton';\n\n// \u2500\u2500 UI Components \u2014 Auth Flow \u2500\u2500\nexport {default as Callback} from './components/auth/Callback';\n\n// \u2500\u2500 UI Components \u2014 Control \u2500\u2500\nexport {default as SignedIn} from './components/control/SignedIn';\nexport {default as SignedOut} from './components/control/SignedOut';\nexport {default as Loading} from './components/control/Loading';\nexport {default as UserComponent} from './components/control/user/User';\nexport {default as OrganizationComponent} from './components/control/organization/Organization';\n\n// \u2500\u2500 UI Components \u2014 Presentation \u2500\u2500\nexport {default as SignIn} from './components/presentation/sign-in/SignIn';\nexport type {SignInRenderProps} from './components/presentation/sign-in/SignIn';\nexport {default as BaseSignIn} from './components/presentation/sign-in/BaseSignIn';\nexport type {BaseSignInRenderProps, BaseSignInProps} from './components/presentation/sign-in/BaseSignIn';\nexport {default as SignUp} from './components/presentation/sign-up/SignUp';\nexport type {SignUpRenderProps} from './components/presentation/sign-up/SignUp';\nexport {default as BaseSignUp} from './components/presentation/sign-up/BaseSignUp';\nexport type {BaseSignUpRenderProps, BaseSignUpProps} from './components/presentation/sign-up/BaseSignUp';\nexport {default as UserProfile} from './components/presentation/user-profile/UserProfile';\nexport {default as BaseUserProfile} from './components/presentation/user-profile/BaseUserProfile';\nexport {default as UserDropdown} from './components/presentation/user-dropdown/UserDropdown';\nexport {default as BaseUserDropdown} from './components/presentation/user-dropdown/BaseUserDropdown';\nexport {default as AcceptInvite} from './components/presentation/accept-invite/AcceptInvite';\nexport type {AcceptInviteRenderProps} from './components/presentation/accept-invite/AcceptInvite';\nexport {default as BaseAcceptInvite} from './components/presentation/accept-invite/BaseAcceptInvite';\nexport type {\n BaseAcceptInviteRenderProps,\n BaseAcceptInviteProps,\n} from './components/presentation/accept-invite/BaseAcceptInvite';\nexport {default as InviteUser} from './components/presentation/invite-user/InviteUser';\nexport type {InviteUserRenderProps} from './components/presentation/invite-user/InviteUser';\nexport {default as BaseInviteUser} from './components/presentation/invite-user/BaseInviteUser';\nexport type {\n BaseInviteUserRenderProps,\n BaseInviteUserProps,\n} from './components/presentation/invite-user/BaseInviteUser';\nexport {default as OrganizationList} from './components/presentation/organization-list/OrganizationList';\nexport {default as BaseOrganizationList} from './components/presentation/organization-list/BaseOrganizationList';\nexport {default as OrganizationProfile} from './components/presentation/organization-profile/OrganizationProfile';\nexport {default as BaseOrganizationProfile} from './components/presentation/organization-profile/BaseOrganizationProfile';\nexport {default as OrganizationSwitcher} from './components/presentation/organization-switcher/OrganizationSwitcher';\nexport {default as BaseOrganizationSwitcher} from './components/presentation/organization-switcher/BaseOrganizationSwitcher';\nexport {default as CreateOrganization} from './components/presentation/create-organization/CreateOrganization';\nexport {default as BaseCreateOrganization} from './components/presentation/create-organization/BaseCreateOrganization';\nexport {default as LanguageSwitcher} from './components/presentation/language-switcher/LanguageSwitcher';\nexport {default as BaseLanguageSwitcher} from './components/presentation/language-switcher/BaseLanguageSwitcher';\n\n// \u2500\u2500 UI Components \u2014 Adapters \u2500\u2500\nexport {default as GoogleButton} from './components/adapters/GoogleButton';\nexport {default as GitHubButton} from './components/adapters/GitHubButton';\nexport {default as MicrosoftButton} from './components/adapters/MicrosoftButton';\nexport {default as FacebookButton} from './components/adapters/FacebookButton';\n\n// \u2500\u2500 Factories \u2500\u2500\nexport {default as FieldFactory, createField, validateFieldValue} from './components/factories/FieldFactory';\nexport type {FieldConfig} from './components/factories/FieldFactory';\n\n// \u2500\u2500 Utilities \u2500\u2500\nexport {default as buildThemeConfigFromFlowMeta} from './utils/v2/buildThemeConfigFromFlowMeta';\nexport {default as getAuthComponentHeadings} from './utils/v2/getAuthComponentHeadings';\nexport type {HeadingExtractionResult, AuthComponentHeadingsResult} from './utils/v2/getAuthComponentHeadings';\n\n// \u2500\u2500 Re-exports from @asgardeo/browser \u2500\u2500\nexport {\n FieldType,\n type AllOrganizationsApiResponse,\n type Config,\n type EmbeddedFlowExecuteRequestPayload,\n type EmbeddedFlowExecuteResponse,\n type EmbeddedSignInFlowHandleRequestPayload,\n type HttpRequestConfig,\n type HttpResponse,\n type IdToken,\n type Organization,\n type SignInOptions,\n type SignOutOptions,\n type SignUpOptions,\n type TokenExchangeRequestConfig,\n type TokenResponse,\n type User, // type UserProfile,\n} from '@asgardeo/browser';\n\n// \u2500\u2500 Phase 4 \u2014 Utilities \u2500\u2500\nexport {handleWebAuthnAuthentication} from './utils/handleWebAuthnAuthentication';\nexport {hasAuthParamsInUrl} from './utils/hasAuthParamsInUrl';\nexport {navigate} from './utils/navigate';\nexport {http} from './utils/http';\nexport {initiateOAuthRedirect} from './utils/oauth';\n\n// \u2500\u2500 Phase 4 \u2014 Router Helpers \u2500\u2500\nexport {createAsgardeoGuard} from './router/guard';\nexport type {GuardOptions, AsgardeoNavigationGuard, NavigationGuardReturn} from './router/guard';\nexport {createCallbackRoute} from './router/callbackRoute';\nexport type {CallbackRouteOptions, AsgardeoRouteRecord} from './router/callbackRoute';\n\n// \u2500\u2500 Phase 4 \u2014 Theme Utilities \u2500\u2500\nexport {getActiveTheme} from './theme/getActiveTheme';\nexport {detectThemeMode, createClassObserver, createMediaQueryListener} from './theme/themeDetection';\nexport type {BrowserThemeDetection} from './theme/themeDetection';\n\n// \u2500\u2500 Phase 4 \u2014 Re-exports from @asgardeo/browser (V2 embedded flow models) \u2500\u2500\nexport {\n AsgardeoRuntimeError,\n EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,\n EmbeddedFlowActionVariantV2 as EmbeddedFlowActionVariant,\n EmbeddedFlowTextVariantV2 as EmbeddedFlowTextVariant,\n EmbeddedFlowEventTypeV2 as EmbeddedFlowEventType,\n type EmbeddedFlowComponentV2 as EmbeddedFlowComponent,\n type EmbeddedFlowResponseDataV2 as EmbeddedFlowResponseData,\n type EmbeddedFlowExecuteRequestConfigV2 as EmbeddedFlowExecuteRequestConfig,\n EmbeddedSignInFlowStatusV2 as EmbeddedSignInFlowStatus,\n EmbeddedSignInFlowTypeV2 as EmbeddedSignInFlowType,\n type ExtendedEmbeddedSignInFlowResponseV2 as ExtendedEmbeddedSignInFlowResponse,\n type EmbeddedSignInFlowResponseV2 as EmbeddedSignInFlowResponse,\n type EmbeddedSignInFlowCompleteResponseV2 as EmbeddedSignInFlowCompleteResponse,\n type EmbeddedSignInFlowInitiateRequestV2 as EmbeddedSignInFlowInitiateRequest,\n type EmbeddedSignInFlowRequestV2 as EmbeddedSignInFlowRequest,\n type EmbeddedSignUpFlowStatusV2 as EmbeddedSignUpFlowStatus,\n type EmbeddedSignUpFlowTypeV2 as EmbeddedSignUpFlowType,\n type ExtendedEmbeddedSignUpFlowResponseV2 as ExtendedEmbeddedSignUpFlowResponse,\n type EmbeddedSignUpFlowResponseV2 as EmbeddedSignUpFlowResponse,\n type EmbeddedSignUpFlowCompleteResponseV2 as EmbeddedSignUpFlowCompleteResponse,\n type EmbeddedSignUpFlowInitiateRequestV2 as EmbeddedSignUpFlowInitiateRequest,\n type EmbeddedSignUpFlowRequestV2 as EmbeddedSignUpFlowRequest,\n type EmbeddedSignUpFlowErrorResponseV2 as EmbeddedSignUpFlowErrorResponse,\n type ComponentRenderContext,\n type ComponentsExtensions,\n type ComponentRenderer,\n} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AllOrganizationsApiResponse,\n AsgardeoRuntimeError,\n extractUserClaimsFromIdToken,\n hasAuthParamsInUrl,\n hasCalledForThisInstanceInUrl,\n HttpResponse,\n IdToken,\n Organization,\n Platform,\n User,\n UserProfile,\n Schema,\n SignInOptions,\n TokenResponse,\n EmbeddedSignInFlowResponseV2,\n} from '@asgardeo/browser';\nimport {\n type Component,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n provide,\n type Ref,\n ref,\n type SetupContext,\n type ShallowRef,\n shallowRef,\n type PropType,\n type VNode,\n} from 'vue';\nimport BrandingProvider from './BrandingProvider';\nimport FlowMetaProvider from './FlowMetaProvider';\nimport FlowProvider from './FlowProvider';\nimport I18nProvider from './I18nProvider';\nimport OrganizationProvider from './OrganizationProvider';\nimport ThemeProvider from './ThemeProvider';\nimport UserProvider from './UserProvider';\nimport AsgardeoVueClient from '../AsgardeoVueClient';\nimport {ASGARDEO_KEY} from '../keys';\nimport type {AsgardeoVueConfig} from '../models/config';\nimport type {AsgardeoContext} from '../models/contexts';\n\ninterface AsgardeoProviderProps {\n afterSignInUrl: string;\n afterSignOutUrl: string;\n applicationId: string | undefined;\n baseUrl: string;\n clientId: string;\n instanceId: number;\n organizationChain: object | undefined;\n organizationHandle: string | undefined;\n platform: string | undefined;\n scopes: string[] | undefined;\n signInOptions: SignInOptions | undefined;\n signInUrl: string | undefined;\n signUpUrl: string | undefined;\n storage: string | undefined;\n syncSession: boolean | undefined;\n}\n\n/**\n * Checks if the current URL contains authentication parameters.\n */\nfunction hasAuthParams(url: URL, afterSignInUrl: string): boolean {\n return (\n (hasAuthParamsInUrl() && new URL(url.origin + url.pathname).toString() === new URL(afterSignInUrl).toString()) ||\n url.searchParams.get('error') !== null\n );\n}\n\n/**\n * Root provider component for the Asgardeo Vue SDK.\n *\n * This component initializes the client, manages authentication state,\n * and provides the Asgardeo context to child components via Vue's provide/inject.\n *\n * @example\n * ```vue\n * <template>\n * <AsgardeoProvider v-bind=\"config\">\n * <router-view />\n * </AsgardeoProvider>\n * </template>\n * ```\n */\nconst AsgardeoProvider: Component = defineComponent({\n name: 'AsgardeoProvider',\n props: {\n /** The URL to redirect to after sign in. Defaults to `window.location.origin`. */\n afterSignInUrl: {\n default: () => window.location.origin,\n type: String,\n },\n /** The URL to redirect to after sign out. Defaults to `window.location.origin`. */\n afterSignOutUrl: {\n default: () => window.location.origin,\n type: String,\n },\n /** The Asgardeo application ID. */\n applicationId: {\n default: undefined,\n type: String,\n },\n /** The base URL of the Asgardeo tenant. */\n baseUrl: {\n required: true,\n type: String,\n },\n /** The OAuth2 client ID. */\n clientId: {\n required: true,\n type: String,\n },\n /** Instance ID for multi-instance support. */\n instanceId: {\n default: 0,\n type: Number,\n },\n /** Organization chain config. */\n organizationChain: {\n default: undefined,\n type: Object,\n },\n /** The organization handle. */\n organizationHandle: {\n default: undefined,\n type: String,\n },\n /** Platform type. */\n platform: {\n default: undefined,\n type: String,\n },\n /** The scopes to request. */\n scopes: {\n default: undefined,\n type: Array as PropType<string[]>,\n },\n /** Additional sign-in options. */\n signInOptions: {\n default: undefined,\n type: Object as PropType<SignInOptions>,\n },\n /** The sign-in URL. */\n signInUrl: {\n default: undefined,\n type: String,\n },\n /** The sign-up URL. */\n signUpUrl: {\n default: undefined,\n type: String,\n },\n /** Storage type. */\n storage: {\n default: undefined,\n type: String,\n },\n /** Whether to sync sessions across tabs. */\n syncSession: {\n default: undefined,\n type: Boolean,\n },\n },\n setup(props: AsgardeoProviderProps, {slots}: SetupContext): () => VNode {\n // \u2500\u2500 Client \u2500\u2500\n const asgardeo: AsgardeoVueClient = new AsgardeoVueClient(props.instanceId);\n\n // \u2500\u2500 Reactive State \u2500\u2500\n const isSignedIn: Ref<boolean> = ref<boolean>(false);\n const isInitialized: Ref<boolean> = ref<boolean>(false);\n const isLoading: Ref<boolean> = ref<boolean>(true);\n const user: ShallowRef<any | null> = shallowRef<any | null>(null);\n const currentOrganization: ShallowRef<Organization | null> = shallowRef<Organization | null>(null);\n const myOrganizations: ShallowRef<Organization[]> = shallowRef<Organization[]>([]);\n const userProfile: ShallowRef<UserProfile | null> = shallowRef<UserProfile | null>(null);\n const flattenedProfile: ShallowRef<User | null> = shallowRef<User | null>(null);\n const schemas: ShallowRef<Schema[]> = shallowRef<Schema[]>([]);\n const resolvedBaseUrl: Ref<string> = ref<string>(props.baseUrl);\n\n let isUpdatingSession: boolean = false;\n let signInCheckInterval: ReturnType<typeof setInterval> | undefined;\n let loadingCheckInterval: ReturnType<typeof setInterval> | undefined;\n\n // \u2500\u2500 Build config from props \u2500\u2500\n function buildConfig(): AsgardeoVueConfig {\n return {\n afterSignInUrl: props.afterSignInUrl,\n afterSignOutUrl: props.afterSignOutUrl,\n applicationId: props.applicationId,\n baseUrl: props.baseUrl,\n clientId: props.clientId,\n organizationChain: props.organizationChain,\n organizationHandle: props.organizationHandle,\n platform: props.platform,\n scopes: props.scopes,\n signInOptions: props.signInOptions,\n signInUrl: props.signInUrl,\n signUpUrl: props.signUpUrl,\n storage: props.storage,\n syncSession: props.syncSession,\n } as AsgardeoVueConfig;\n }\n\n // \u2500\u2500 Session Update \u2500\u2500\n async function updateSession(): Promise<void> {\n try {\n isUpdatingSession = true;\n isLoading.value = true;\n let baseUrl: string = resolvedBaseUrl.value;\n\n const decodedToken: IdToken = await asgardeo.getDecodedIdToken();\n\n if (decodedToken?.['user_org']) {\n baseUrl = `${(await asgardeo.getConfiguration()).baseUrl}/o`;\n resolvedBaseUrl.value = baseUrl;\n }\n\n const config: AsgardeoVueConfig = buildConfig();\n\n if (config.platform === Platform.AsgardeoV2) {\n const claims: User = extractUserClaimsFromIdToken(decodedToken);\n user.value = claims;\n } else {\n try {\n const fetchedUser: User = await asgardeo.getUser({baseUrl});\n user.value = fetchedUser;\n } catch {\n // silent\n }\n\n try {\n const fetchedOrg: Organization = await asgardeo.getCurrentOrganization();\n currentOrganization.value = fetchedOrg;\n } catch {\n // silent\n }\n\n // Fetch user's organizations for organization components\n try {\n const orgs: Organization[] = await asgardeo.getMyOrganizations({baseUrl});\n myOrganizations.value = orgs || [];\n } catch {\n // silent\n }\n\n // Fetch user profile details for profile components\n try {\n const profileData: UserProfile = await asgardeo.getUserProfile({baseUrl});\n userProfile.value = profileData;\n flattenedProfile.value = profileData.flattenedProfile || null;\n schemas.value = profileData.schemas || [];\n } catch {\n // silent\n }\n }\n\n const currentSignInStatus: boolean = await asgardeo.isSignedIn();\n isSignedIn.value = currentSignInStatus;\n } catch {\n // silent\n } finally {\n isUpdatingSession = false;\n isLoading.value = asgardeo.isLoading();\n }\n }\n\n // \u2500\u2500 Sign In (wrapper) \u2500\u2500\n async function signIn(...args: any[]): Promise<User | EmbeddedSignInFlowResponseV2> {\n const arg1: any = args[0];\n const config: AsgardeoVueConfig = buildConfig();\n const isV2FlowRequest: boolean =\n config.platform === Platform.AsgardeoV2 &&\n typeof arg1 === 'object' &&\n arg1 !== null &&\n ('executionId' in arg1 || 'applicationId' in arg1);\n\n try {\n if (!isV2FlowRequest) {\n isUpdatingSession = true;\n isLoading.value = true;\n }\n\n const response: User | EmbeddedSignInFlowResponseV2 = await asgardeo.signIn(...args);\n\n if (isV2FlowRequest || (response && typeof response === 'object' && 'flowStatus' in response)) {\n return response;\n }\n\n if (await asgardeo.isSignedIn()) {\n await updateSession();\n }\n\n return response as User;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Sign in failed: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,\n 'asgardeo-signIn-Error',\n 'vue',\n 'An error occurred while trying to sign in.',\n );\n } finally {\n if (!isV2FlowRequest) {\n isUpdatingSession = false;\n isLoading.value = asgardeo.isLoading();\n }\n }\n }\n\n // \u2500\u2500 Sign Out \u2500\u2500\n async function signOut(...args: any[]): Promise<any> {\n return asgardeo.signOut(...args);\n }\n\n // \u2500\u2500 Sign Up \u2500\u2500\n async function signUp(...args: any[]): Promise<any> {\n return asgardeo.signUp(...args);\n }\n\n // \u2500\u2500 Sign In Silently \u2500\u2500\n async function signInSilently(options?: SignInOptions): Promise<User | boolean> {\n try {\n isUpdatingSession = true;\n isLoading.value = true;\n const response: User | boolean = await asgardeo.signInSilently(options);\n\n if (await asgardeo.isSignedIn()) {\n await updateSession();\n }\n\n return response;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Error while signing in silently: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,\n 'asgardeo-signInSilently-Error',\n 'vue',\n 'An error occurred while trying to sign in silently.',\n );\n } finally {\n isUpdatingSession = false;\n isLoading.value = asgardeo.isLoading();\n }\n }\n\n // \u2500\u2500 Switch Organization \u2500\u2500\n async function switchOrganization(organization: Organization): Promise<TokenResponse | Response> {\n try {\n isUpdatingSession = true;\n isLoading.value = true;\n const response: TokenResponse | Response = await asgardeo.switchOrganization(organization);\n\n if (await asgardeo.isSignedIn()) {\n await updateSession();\n }\n\n return response;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to switch organization: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,\n 'asgardeo-switchOrganization-Error',\n 'vue',\n 'An error occurred while switching to the specified organization.',\n );\n } finally {\n isUpdatingSession = false;\n isLoading.value = asgardeo.isLoading();\n }\n }\n\n // \u2500\u2500 Provide Context \u2500\u2500\n const context: AsgardeoContext = {\n afterSignInUrl: props.afterSignInUrl,\n applicationId: props.applicationId,\n baseUrl: props.baseUrl,\n clearSession: async (...args: any[]): Promise<void> => {\n await asgardeo.clearSession(...args);\n },\n clientId: props.clientId,\n exchangeToken: (config: any): Promise<TokenResponse | Response> => asgardeo.exchangeToken(config),\n getAccessToken: (): Promise<string> => asgardeo.getAccessToken(),\n getDecodedIdToken: (): Promise<IdToken> => asgardeo.getDecodedIdToken(),\n getIdToken: (): Promise<string> => asgardeo.getIdToken(),\n http: {\n request: (requestConfig?: any): Promise<HttpResponse<any>> => asgardeo.request(requestConfig),\n requestAll: (requestConfigs?: any[]): Promise<HttpResponse<any>[]> => asgardeo.requestAll(requestConfigs),\n },\n instanceId: props.instanceId,\n isInitialized,\n isLoading,\n isSignedIn,\n organization: currentOrganization,\n organizationHandle: props.organizationHandle,\n platform: props.platform as AsgardeoVueConfig['platform'],\n reInitialize: async (config: any): Promise<boolean> => {\n const result: boolean = await asgardeo.reInitialize(config);\n return typeof result === 'boolean' ? result : true;\n },\n signIn,\n signInOptions: props.signInOptions,\n signInSilently,\n signInUrl: props.signInUrl,\n signOut,\n signUp,\n signUpUrl: props.signUpUrl,\n storage: props.storage as AsgardeoVueConfig['storage'],\n switchOrganization,\n user,\n };\n\n provide(ASGARDEO_KEY, context);\n\n // \u2500\u2500 Lifecycle \u2500\u2500\n onMounted(async (): Promise<void> => {\n // 1. Initialize the client\n const config: AsgardeoVueConfig = buildConfig();\n await asgardeo.initialize(config);\n\n const initializedConfig: any = asgardeo.getConfiguration();\n\n if (initializedConfig?.platform) {\n sessionStorage.setItem('asgardeo_platform', initializedConfig.platform);\n }\n if (initializedConfig?.baseUrl) {\n sessionStorage.setItem('asgardeo_base_url', initializedConfig.baseUrl);\n }\n\n // 2. Check initialization status\n try {\n const status: boolean = await asgardeo.isInitialized();\n isInitialized.value = status;\n } catch {\n isInitialized.value = false;\n }\n\n // 3. Try to sign in if already authenticated or if URL has auth params\n const alreadySignedIn: boolean = await asgardeo.isSignedIn();\n\n if (alreadySignedIn) {\n await updateSession();\n } else {\n const currentUrl: URL = new URL(window.location.href);\n const hasParams: boolean =\n hasAuthParams(currentUrl, props.afterSignInUrl) &&\n hasCalledForThisInstanceInUrl(props.instanceId ?? 0, currentUrl.search);\n\n if (hasParams) {\n try {\n const isV2Platform: boolean = config.platform === Platform.AsgardeoV2;\n\n if (isV2Platform) {\n const urlParams: URLSearchParams = currentUrl.searchParams;\n const code: string | null = urlParams.get('code');\n const executionIdFromUrl: string | null = urlParams.get('executionId');\n const storedExecutionId: string | null = sessionStorage.getItem('asgardeo_execution_id');\n\n if (code && !executionIdFromUrl && !storedExecutionId) {\n await signIn();\n }\n } else {\n await signIn({callOnlyOnRedirect: true});\n }\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Sign in failed: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,\n 'asgardeo-signIn-Error',\n 'vue',\n 'An error occurred while trying to sign in.',\n );\n }\n }\n }\n\n // 4. Set up polling for sign-in status\n try {\n const status: boolean = await asgardeo.isSignedIn();\n isSignedIn.value = status;\n\n if (!status) {\n signInCheckInterval = setInterval(async (): Promise<void> => {\n const newStatus: boolean = await asgardeo.isSignedIn();\n if (newStatus) {\n isSignedIn.value = true;\n if (signInCheckInterval) {\n clearInterval(signInCheckInterval);\n signInCheckInterval = undefined;\n }\n }\n }, 1000);\n }\n } catch {\n isSignedIn.value = false;\n }\n\n // 5. Set up polling for loading state\n loadingCheckInterval = setInterval((): void => {\n if (isUpdatingSession) return;\n\n const currentUrl: URL = new URL(window.location.href);\n if (!isSignedIn.value && hasAuthParams(currentUrl, props.afterSignInUrl)) return;\n\n isLoading.value = asgardeo.isLoading();\n }, 100);\n });\n\n onUnmounted((): void => {\n if (signInCheckInterval) {\n clearInterval(signInCheckInterval);\n }\n if (loadingCheckInterval) {\n clearInterval(loadingCheckInterval);\n }\n });\n\n // \u2500\u2500 Render \u2500\u2500\n return (): any =>\n h(I18nProvider, null, {\n default: (): any =>\n h(\n FlowMetaProvider,\n {enabled: props.platform === Platform.AsgardeoV2},\n {\n default: (): any =>\n h(BrandingProvider, null, {\n default: (): any =>\n h(ThemeProvider, null, {\n default: (): any =>\n h(FlowProvider, null, {\n default: (): any =>\n h(\n UserProvider,\n {\n flattenedProfile: flattenedProfile.value,\n profile: userProfile.value,\n revalidateProfile: async (): Promise<void> => {\n const baseUrl: string = resolvedBaseUrl.value;\n try {\n const profileData: UserProfile = await asgardeo.getUserProfile({baseUrl});\n userProfile.value = profileData;\n flattenedProfile.value = profileData.flattenedProfile || null;\n schemas.value = profileData.schemas || [];\n } catch {\n // silent\n }\n },\n schemas: schemas.value,\n },\n {\n default: (): any =>\n h(\n OrganizationProvider,\n {\n currentOrganization: currentOrganization.value,\n getAllOrganizations: async (): Promise<AllOrganizationsApiResponse> =>\n asgardeo.getAllOrganizations({baseUrl: resolvedBaseUrl.value}),\n myOrganizations: myOrganizations.value,\n onOrganizationSwitch: switchOrganization,\n revalidateMyOrganizations: async (): Promise<Organization[]> => {\n const baseUrl: string = resolvedBaseUrl.value;\n try {\n const orgs: Organization[] = await asgardeo.getMyOrganizations({baseUrl});\n myOrganizations.value = orgs || [];\n return orgs || [];\n } catch {\n return [];\n }\n },\n },\n {\n default: (): any => slots['default']?.(),\n },\n ),\n },\n ),\n }),\n }),\n }),\n },\n ),\n });\n },\n});\n\nexport default AsgardeoProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {BrandingPreference, Theme, transformBrandingPreferenceToTheme} from '@asgardeo/browser';\nimport {\n computed,\n defineComponent,\n h,\n provide,\n readonly,\n shallowReadonly,\n ref,\n watch,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {BRANDING_KEY} from '../keys';\nimport type {BrandingContextValue} from '../models/contexts';\n\ninterface BrandingProviderProps {\n brandingPreference: BrandingPreference | null;\n enabled: boolean;\n error: Error | null;\n forceTheme: 'light' | 'dark' | undefined;\n isLoading: boolean;\n refetch: (() => Promise<void>) | undefined;\n}\n\n/**\n * BrandingProvider manages branding preference state and makes branding data\n * available to child components via `useBranding()`.\n *\n * It receives branding preferences from a parent component (typically\n * `<AsgardeoProvider>`) and transforms them into `Theme` objects.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\nconst BrandingProvider: Component = defineComponent({\n name: 'BrandingProvider',\n props: {\n /** Whether branding is enabled. When false the context provides null. */\n brandingPreference: {\n default: null,\n type: Object as PropType<BrandingPreference | null>,\n },\n /** Loading state from the parent. */\n enabled: {\n default: true,\n type: Boolean,\n },\n error: {\n default: null,\n type: Object as PropType<Error | null>,\n },\n /** Force a specific theme mode, overriding the one declared in branding. */\n forceTheme: {\n default: undefined,\n type: String as PropType<'light' | 'dark'>,\n },\n /** Re-fetch callback from the parent (bypasses dedup). */\n isLoading: {\n default: false,\n type: Boolean,\n },\n refetch: {\n default: undefined,\n type: Function as PropType<() => Promise<void>>,\n },\n },\n setup(props: BrandingProviderProps, {slots}: SetupContext): () => VNode {\n const theme: Ref<Theme | null> = ref(null);\n const activeTheme: Ref<'light' | 'dark' | null> = ref(null);\n\n // Process branding preference whenever it changes\n const processBranding = (): void => {\n if (!props.enabled || !props.brandingPreference) {\n theme.value = null;\n activeTheme.value = null;\n return;\n }\n\n const activeThemeFromBranding: string | undefined = (props.brandingPreference as any)?.preference?.theme\n ?.activeTheme;\n if (activeThemeFromBranding) {\n const mode: string = activeThemeFromBranding.toLowerCase();\n activeTheme.value = mode === 'light' || mode === 'dark' ? mode : null;\n } else {\n activeTheme.value = null;\n }\n\n const transformedTheme: Theme | null = transformBrandingPreferenceToTheme(\n props.brandingPreference,\n props.forceTheme,\n );\n theme.value = transformedTheme;\n };\n\n watch(() => [props.brandingPreference, props.forceTheme, props.enabled], processBranding, {immediate: true});\n\n const fetchBranding = async (): Promise<void> => {\n if (props.refetch) {\n await props.refetch();\n }\n };\n\n const context: BrandingContextValue = {\n activeTheme: readonly(activeTheme),\n brandingPreference: readonly(computed(() => props.brandingPreference)) as Readonly<\n Ref<BrandingPreference | null>\n >,\n error: readonly(computed(() => props.error)) as Readonly<Ref<Error | null>>,\n fetchBranding,\n isLoading: readonly(computed(() => props.isLoading)) as Readonly<Ref<boolean>>,\n refetch: props.refetch ?? fetchBranding,\n theme: shallowReadonly(theme),\n };\n\n provide(BRANDING_KEY, context);\n\n return (): VNode => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default BrandingProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport type {InjectionKey} from 'vue';\nimport type {\n AsgardeoContext,\n BrandingContextValue,\n FlowContextValue,\n FlowMetaContextValue,\n I18nContextValue,\n OrganizationContextValue,\n ThemeContextValue,\n UserContextValue,\n} from './models/contexts';\n\n/**\n * Injection key for the core Asgardeo authentication context.\n */\nexport const ASGARDEO_KEY: InjectionKey<AsgardeoContext> = Symbol('asgardeo');\n\n/**\n * Injection key for the User context (profile, schemas, update operations).\n */\nexport const USER_KEY: InjectionKey<UserContextValue> = Symbol('asgardeo-user');\n\n/**\n * Injection key for the Organization context (list, current org, switching).\n */\nexport const ORGANIZATION_KEY: InjectionKey<OrganizationContextValue> = Symbol('asgardeo-organization');\n\n/**\n * Injection key for the Flow context (embedded flow UI state).\n */\nexport const FLOW_KEY: InjectionKey<FlowContextValue> = Symbol('asgardeo-flow');\n\n/**\n * Injection key for the FlowMeta context (server-driven flow metadata).\n */\nexport const FLOW_META_KEY: InjectionKey<FlowMetaContextValue> = Symbol('asgardeo-flow-meta');\n\n/**\n * Injection key for the Theme context (color scheme, CSS variables, toggle).\n */\nexport const THEME_KEY: InjectionKey<ThemeContextValue> = Symbol('asgardeo-theme');\n\n/**\n * Injection key for the Branding context (branding preferences from server).\n */\nexport const BRANDING_KEY: InjectionKey<BrandingContextValue> = Symbol('asgardeo-branding');\n\n/**\n * Injection key for the I18n context (translation function, language switching).\n */\nexport const I18N_KEY: InjectionKey<I18nContextValue> = Symbol('asgardeo-i18n');\n", "/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse, FlowMetaType, getFlowMetaV2} from '@asgardeo/browser';\nimport {I18nBundle, TranslationBundleConstants} from '@asgardeo/i18n';\nimport {\n defineComponent,\n h,\n inject,\n onMounted,\n provide,\n readonly,\n shallowReadonly,\n ref,\n watch,\n type Component,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {ASGARDEO_KEY, FLOW_META_KEY, I18N_KEY} from '../keys';\nimport type {AsgardeoContext, FlowMetaContextValue, I18nContextValue} from '../models/contexts';\n\n/**\n * FlowMetaProvider fetches flow metadata from the `GET /flow/meta` endpoint\n * (v2 API) and makes it available via `useFlowMeta()`.\n *\n * It also integrates with `I18nProvider` so that server-side translations\n * from the metadata are automatically injected into the i18n system.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface FlowMetaProviderProps {\n enabled: boolean;\n}\n\nconst FlowMetaProvider: Component = defineComponent({\n name: 'FlowMetaProvider',\n props: {\n /**\n * When false the provider skips fetching and provides null meta.\n * @default true\n */\n enabled: {default: true, type: Boolean},\n },\n setup(props: FlowMetaProviderProps, {slots}: SetupContext): () => VNode {\n const asgardeoContext: AsgardeoContext | undefined = inject(ASGARDEO_KEY);\n const i18nContext: I18nContextValue | null = inject(I18N_KEY, null);\n\n const meta: Ref<FlowMetadataResponse | null> = ref(null);\n const isLoading: Ref<boolean> = ref(false);\n const error: Ref<Error | null> = ref(null);\n const pendingLanguage: Ref<string | null> = ref(null);\n\n const baseUrl: string | undefined = asgardeoContext?.baseUrl;\n const applicationId: string | undefined = asgardeoContext?.applicationId;\n\n const fetchFlowMeta = async (): Promise<void> => {\n if (!props.enabled) {\n meta.value = null;\n return;\n }\n\n isLoading.value = true;\n error.value = null;\n\n try {\n const result: FlowMetadataResponse = await getFlowMetaV2({\n baseUrl,\n id: applicationId,\n type: FlowMetaType.App,\n });\n meta.value = result;\n } catch (err: unknown) {\n error.value = err instanceof Error ? err : new Error(String(err));\n } finally {\n isLoading.value = false;\n }\n };\n\n const switchLanguage = async (language: string): Promise<void> => {\n if (!props.enabled) return;\n\n isLoading.value = true;\n error.value = null;\n\n try {\n const result: FlowMetadataResponse = await getFlowMetaV2({\n baseUrl,\n id: applicationId,\n language,\n type: FlowMetaType.App,\n });\n\n // Inject translations before switching language so the i18n state is updated\n if (result.i18n?.translations && i18nContext?.injectBundles) {\n const flatTranslations: Record<string, string> = {};\n Object.entries(result.i18n.translations).forEach(([namespace, keys]: [string, Record<string, string>]) => {\n Object.entries(keys).forEach(([key, value]: [string, string]) => {\n flatTranslations[`${namespace}.${key}`] = value;\n });\n });\n const bundle: I18nBundle = {translations: flatTranslations} as unknown as I18nBundle;\n i18nContext.injectBundles({[language]: bundle});\n }\n\n // Defer setLanguage so that injectBundles' state is committed first\n pendingLanguage.value = language;\n meta.value = result;\n } catch (err: unknown) {\n error.value = err instanceof Error ? err : new Error(String(err));\n } finally {\n isLoading.value = false;\n }\n };\n\n // After injectBundles + pendingLanguage are committed, call setLanguage\n watch(pendingLanguage, (lang: string | null) => {\n if (lang && i18nContext?.setLanguage) {\n i18nContext.setLanguage(lang);\n pendingLanguage.value = null;\n }\n });\n\n // When meta loads with i18n translations, inject them into the i18n system\n watch(\n () => meta.value?.i18n?.translations,\n (translations: Record<string, Record<string, string>> | undefined) => {\n if (!translations || !i18nContext?.injectBundles) return;\n\n const metaLanguage: string = (meta.value?.i18n as any)?.language || TranslationBundleConstants.FALLBACK_LOCALE;\n\n const flatTranslations: Record<string, string> = {};\n Object.entries(translations).forEach(([namespace, keys]: [string, Record<string, string>]) => {\n Object.entries(keys).forEach(([key, value]: [string, string]) => {\n flatTranslations[`${namespace}.${key}`] = value;\n });\n });\n\n const bundle: I18nBundle = {translations: flatTranslations} as unknown as I18nBundle;\n const bundlesToInject: Record<string, I18nBundle> = {[metaLanguage]: bundle};\n\n const currentLang: string = i18nContext.currentLanguage.value;\n const fallbackLang: string = i18nContext.fallbackLanguage;\n\n if (currentLang && currentLang !== metaLanguage) {\n bundlesToInject[currentLang] = bundle;\n }\n if (fallbackLang && fallbackLang !== metaLanguage) {\n bundlesToInject[fallbackLang] = bundle;\n }\n\n i18nContext.injectBundles(bundlesToInject);\n },\n );\n\n onMounted(() => {\n fetchFlowMeta();\n });\n\n const context: FlowMetaContextValue = {\n error: readonly(error),\n fetchFlowMeta,\n isLoading: readonly(isLoading),\n meta: shallowReadonly(meta),\n switchLanguage,\n };\n\n provide(FLOW_META_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default FlowMetaProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n defineComponent,\n h,\n provide,\n readonly,\n shallowReadonly,\n ref,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {FLOW_KEY} from '../keys';\nimport type {FlowContextValue, FlowMessage, FlowStep} from '../models/contexts';\n\n/**\n * FlowProvider manages authentication flow UI state and makes it available\n * via `useFlow()`.\n *\n * It tracks the current step, title, subtitle, messages, loading state,\n * and back-navigation callback for embedded authentication flows.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface FlowProviderProps {\n initialStep: FlowStep | null;\n initialSubtitle: string | undefined;\n initialTitle: string;\n onFlowChange: ((step: FlowStep) => void) | undefined;\n}\n\nconst FlowProvider: Component = defineComponent({\n name: 'FlowProvider',\n props: {\n /** Initial step to start with. */\n initialStep: {default: null, type: Object as PropType<FlowStep>},\n /** Initial subtitle. */\n initialSubtitle: {default: undefined, type: String},\n /** Initial title. */\n initialTitle: {default: '', type: String},\n /** Callback when the flow step changes. */\n onFlowChange: {default: undefined, type: Function as PropType<(step: FlowStep) => void>},\n },\n setup(props: FlowProviderProps, {slots}: SetupContext): () => VNode {\n const currentStep: Ref<FlowStep> = ref(props.initialStep ?? null);\n const title: Ref<string> = ref(props.initialTitle ?? '');\n const subtitle: Ref<string | undefined> = ref(props.initialSubtitle);\n const messages: Ref<FlowMessage[]> = ref([]);\n const error: Ref<string | null> = ref(null);\n const isLoading: Ref<boolean> = ref(false);\n const showBackButton: Ref<boolean> = ref(false);\n const onGoBack: Ref<(() => void) | undefined> = ref(undefined);\n\n const setCurrentStep = (step: FlowStep): void => {\n currentStep.value = step;\n if (step) {\n title.value = step.title;\n subtitle.value = step.subtitle;\n showBackButton.value = step.canGoBack ?? false;\n }\n props.onFlowChange?.(step);\n };\n\n const setTitle = (newTitle: string): void => {\n title.value = newTitle;\n };\n\n const setSubtitle = (newSubtitle?: string): void => {\n subtitle.value = newSubtitle;\n };\n\n const setError = (newError: string | null): void => {\n error.value = newError;\n };\n\n const setIsLoading = (loading: boolean): void => {\n isLoading.value = loading;\n };\n\n const setShowBackButton = (show: boolean): void => {\n showBackButton.value = show;\n };\n\n const setOnGoBack = (callback?: () => void): void => {\n onGoBack.value = callback;\n };\n\n const addMessage = (message: FlowMessage): void => {\n const messageWithId: FlowMessage = {\n ...message,\n id: message.id ?? `msg-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,\n };\n messages.value = [...messages.value, messageWithId];\n };\n\n const removeMessage = (messageId: string): void => {\n messages.value = messages.value.filter((msg: FlowMessage): boolean => msg.id !== messageId);\n };\n\n const clearMessages = (): void => {\n messages.value = [];\n };\n\n const reset = (): void => {\n currentStep.value = props.initialStep ?? null;\n title.value = props.initialTitle ?? '';\n subtitle.value = props.initialSubtitle;\n messages.value = [];\n error.value = null;\n isLoading.value = false;\n showBackButton.value = false;\n onGoBack.value = undefined;\n };\n\n const navigateToFlow = (\n flowType: NonNullable<FlowStep>['type'],\n options?: {metadata?: Record<string, any>; subtitle?: string; title?: string},\n ): void => {\n const stepId: string = `${flowType}-${Date.now()}`;\n const step: NonNullable<FlowStep> = {\n canGoBack: flowType !== 'signin',\n id: stepId,\n metadata: options?.metadata,\n subtitle: options?.subtitle,\n title: options?.title ?? '',\n type: flowType,\n };\n setCurrentStep(step);\n clearMessages();\n error.value = null;\n };\n\n const context: FlowContextValue = {\n addMessage,\n clearMessages,\n currentStep: readonly(currentStep),\n error: readonly(error),\n isLoading: readonly(isLoading),\n messages: shallowReadonly(messages),\n navigateToFlow,\n onGoBack: readonly(onGoBack),\n removeMessage,\n reset,\n setCurrentStep,\n setError,\n setIsLoading,\n setOnGoBack,\n setShowBackButton,\n setSubtitle,\n setTitle,\n showBackButton: readonly(showBackButton),\n subtitle: readonly(subtitle),\n title: readonly(title),\n };\n\n provide(FLOW_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default FlowProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {deepMerge, I18nPreferences, I18nStorageStrategy} from '@asgardeo/browser';\nimport {\n I18nBundle,\n I18nTranslations,\n TranslationBundleConstants,\n getDefaultI18nBundles,\n normalizeTranslations,\n} from '@asgardeo/i18n';\nimport {\n computed,\n defineComponent,\n h,\n provide,\n readonly,\n ref,\n watch,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {I18N_KEY} from '../keys';\nimport type {I18nContextValue} from '../models/contexts';\nimport {createVueLogger} from '../utils/logger';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('I18nProvider');\n\nconst DEFAULT_STORAGE_KEY: string = 'asgardeo-i18n-language';\nconst DEFAULT_URL_PARAM: string = 'lang';\n\n// \u2500\u2500 Storage helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst deriveRootDomain = (hostname: string): string => {\n const parts: string[] = hostname.split('.');\n return parts.length > 1 ? parts.slice(-2).join('.') : hostname;\n};\n\nconst getCookie = (name: string): string | null => {\n if (typeof document === 'undefined') return null;\n const match: RegExpMatchArray | null = document.cookie.match(\n new RegExp(`(?:^|; )${name.replace(/([.*+?^${}()|[\\]\\\\])/g, '\\\\$1')}=([^;]*)`),\n );\n return match ? decodeURIComponent(match[1]) : null;\n};\n\nconst setCookie = (name: string, value: string, domain: string): void => {\n if (typeof document === 'undefined') return;\n const maxAge: number = 365 * 24 * 60 * 60;\n const secure: string = typeof window !== 'undefined' && window.location.protocol === 'https:' ? '; Secure' : '';\n document.cookie =\n `${encodeURIComponent(name)}=${encodeURIComponent(value)}` +\n `; Max-Age=${maxAge}` +\n `; Path=/` +\n `; Domain=${domain}` +\n `; SameSite=Lax${secure}`;\n};\n\ninterface StorageAdapter {\n read: () => string | null;\n write: (language: string) => void;\n}\n\nconst createStorageAdapter = (strategy: I18nStorageStrategy, key: string, cookieDomain?: string): StorageAdapter => {\n switch (strategy) {\n case 'cookie':\n return {\n read: (): string | null => getCookie(key),\n write: (language: string): void => {\n const domain: string =\n cookieDomain ?? (typeof window !== 'undefined' ? deriveRootDomain(window.location.hostname) : '');\n if (domain) setCookie(key, language, domain);\n },\n };\n case 'localStorage':\n return {\n read: (): string | null => {\n if (typeof window === 'undefined' || !window.localStorage) return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n },\n write: (language: string): void => {\n if (typeof window === 'undefined' || !window.localStorage) return;\n try {\n window.localStorage.setItem(key, language);\n } catch {\n logger.warn('Failed to persist language preference to localStorage.');\n }\n },\n };\n case 'none':\n default:\n return {read: (): null => null, write: (): void => {}};\n }\n};\n\nconst detectUrlParamLanguage = (paramName: string): string | null => {\n if (typeof window === 'undefined') return null;\n try {\n return new URLSearchParams(window.location.search).get(paramName);\n } catch {\n return null;\n }\n};\n\nconst detectBrowserLanguage = (): string => {\n if (typeof window !== 'undefined' && window.navigator) {\n return window.navigator.language || TranslationBundleConstants.FALLBACK_LOCALE;\n }\n return TranslationBundleConstants.FALLBACK_LOCALE;\n};\n\n// \u2500\u2500 Component \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * I18nProvider manages internationalization state and provides translation\n * functions to child components via `useI18n()`.\n *\n * Language resolution order:\n * URL param \u2192 stored preference \u2192 browser language \u2192 fallback locale\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface I18nProviderProps {\n preferences: I18nPreferences | undefined;\n}\n\nconst I18nProvider: Component = defineComponent({\n name: 'I18nProvider',\n props: {\n /** i18n preferences passed down from the AsgardeoProvider config. */\n preferences: {default: undefined, type: Object as PropType<I18nPreferences>},\n },\n setup(props: I18nProviderProps, {slots}: SetupContext): () => VNode {\n const defaultBundles: Record<string, I18nBundle> = getDefaultI18nBundles();\n\n const storageStrategy: I18nStorageStrategy = props.preferences?.storageStrategy ?? 'cookie';\n const storageKey: string = props.preferences?.storageKey ?? DEFAULT_STORAGE_KEY;\n const urlParamConfig: string | false =\n props.preferences?.urlParam === undefined ? DEFAULT_URL_PARAM : props.preferences.urlParam;\n\n const resolvedCookieDomain: string | undefined =\n storageStrategy === 'cookie'\n ? props.preferences?.cookieDomain ??\n (typeof window !== 'undefined' ? deriveRootDomain(window.location.hostname) : undefined)\n : undefined;\n\n const storage: StorageAdapter = createStorageAdapter(storageStrategy, storageKey, resolvedCookieDomain);\n\n // Determine initial language\n const determineInitialLanguage = (): string => {\n if (props.preferences?.language) return props.preferences.language;\n if (urlParamConfig !== false) {\n const urlLanguage: string | null = detectUrlParamLanguage(urlParamConfig);\n if (urlLanguage) {\n storage.write(urlLanguage);\n return urlLanguage;\n }\n }\n const storedLanguage: string | null = storage.read();\n if (storedLanguage) return storedLanguage;\n const browserLanguage: string = detectBrowserLanguage();\n if (browserLanguage) return browserLanguage;\n return props.preferences?.fallbackLanguage || TranslationBundleConstants.FALLBACK_LOCALE;\n };\n\n const currentLanguage: Ref<string> = ref(determineInitialLanguage());\n const fallbackLanguage: string = props.preferences?.fallbackLanguage || TranslationBundleConstants.FALLBACK_LOCALE;\n\n // Bundles injected at runtime (e.g., from flow metadata translations).\n const injectedBundles: Ref<Record<string, I18nBundle>> = ref({});\n\n const injectBundles = (newBundles: Record<string, I18nBundle>): void => {\n const mergedBundles: Record<string, I18nBundle> = {...injectedBundles.value};\n Object.entries(newBundles).forEach(([languageKey, bundle]: [key: string, bundle: I18nBundle]): void => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n bundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (mergedBundles[languageKey]) {\n mergedBundles[languageKey] = {\n ...mergedBundles[languageKey],\n translations: deepMerge(mergedBundles[languageKey].translations, normalizedTranslations),\n };\n } else {\n mergedBundles[languageKey] = {...bundle, translations: normalizedTranslations};\n }\n });\n injectedBundles.value = mergedBundles;\n };\n\n /**\n * Merge bundles: defaults \u2192 injected (meta) \u2192 prop-provided (highest priority)\n */\n const mergedBundlesComputed: Ref<Record<string, I18nBundle>> = computed<Record<string, I18nBundle>>(() => {\n const merged: Record<string, I18nBundle> = {};\n\n // 1. Default bundles\n Object.entries(defaultBundles).forEach(([key, bundle]: [key: string, bundle: I18nBundle]): void => {\n const languageKey: string = key.replace('_', '-');\n merged[languageKey] = bundle;\n });\n\n // 2. Injected bundles (from flow metadata)\n Object.entries(injectedBundles.value).forEach(([key, bundle]: [key: string, bundle: I18nBundle]): void => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n bundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...bundle, translations: normalizedTranslations};\n }\n });\n\n // 3. User-provided bundles (highest priority)\n if (props.preferences?.bundles) {\n Object.entries(props.preferences.bundles).forEach(\n ([key, userBundle]: [key: string, userBundle: I18nBundle]): void => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n userBundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n metadata: userBundle.metadata\n ? {...merged[key].metadata, ...userBundle.metadata}\n : merged[key].metadata,\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...userBundle, translations: normalizedTranslations};\n }\n },\n );\n }\n\n return merged;\n });\n\n // Persist language changes to storage\n watch(currentLanguage, (lang: string): void => {\n storage.write(lang);\n });\n\n const t = (key: string, params?: Record<string, string | number>): string => {\n let translation: string | undefined;\n\n const currentBundle: I18nBundle | undefined = mergedBundlesComputed.value[currentLanguage.value];\n if (currentBundle?.translations[key]) {\n translation = currentBundle.translations[key];\n }\n\n if (!translation && currentLanguage.value !== fallbackLanguage) {\n const fallbackBundle: I18nBundle | undefined = mergedBundlesComputed.value[fallbackLanguage];\n if (fallbackBundle?.translations[key]) {\n translation = fallbackBundle.translations[key];\n }\n }\n\n if (!translation) {\n translation = key;\n }\n\n if (params && Object.keys(params).length > 0) {\n return Object.entries(params).reduce(\n (acc: string, [paramKey, paramValue]: [key: string, value: string | number]): string =>\n acc.replaceAll(`{${paramKey}}`, String(paramValue)),\n translation,\n );\n }\n\n return translation;\n };\n\n const setLanguage = (language: string): void => {\n if (mergedBundlesComputed.value[language]) {\n currentLanguage.value = language;\n } else {\n logger.warn(\n `Language '${language}' is not available. Available languages: ${Object.keys(\n mergedBundlesComputed.value,\n ).join(', ')}`,\n );\n }\n };\n\n const context: I18nContextValue = {\n bundles: readonly(mergedBundlesComputed),\n currentLanguage: readonly(currentLanguage),\n fallbackLanguage,\n injectBundles,\n setLanguage,\n t,\n };\n\n provide(I18N_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default I18nProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {createPackageComponentLogger, createPackageLogger} from '@asgardeo/browser';\n\nconst PACKAGE_NAME: string = '@asgardeo/vue';\n\n/**\n * Package-level logger for `@asgardeo/vue`.\n * Use this when logging is not tied to a specific component.\n */\nconst logger: ReturnType<typeof createPackageLogger> = createPackageLogger(PACKAGE_NAME);\n\n/**\n * Creates a component-scoped logger prefixed with `@asgardeo/vue - <component>`.\n *\n * @param component - The component or module name (e.g. `'AsgardeoProvider'`).\n */\nexport const createVueLogger = (component: string): ReturnType<typeof createPackageComponentLogger> =>\n createPackageComponentLogger(PACKAGE_NAME, component);\n\nexport default logger;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AllOrganizationsApiResponse,\n AsgardeoRuntimeError,\n CreateOrganizationPayload,\n Organization,\n TokenResponse,\n} from '@asgardeo/browser';\nimport {\n computed,\n defineComponent,\n h,\n provide,\n readonly,\n ref,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {ORGANIZATION_KEY} from '../keys';\nimport type {OrganizationContextValue} from '../models/contexts';\n\n/**\n * OrganizationProvider manages organization state and makes it available\n * via `useOrganization()`.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface OrganizationProviderProps {\n createOrganization: ((payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>) | undefined;\n currentOrganization: Organization | null;\n getAllOrganizations: (() => Promise<AllOrganizationsApiResponse>) | undefined;\n myOrganizations: Organization[];\n onError: ((error: string) => void) | undefined;\n onOrganizationSwitch: ((organization: Organization) => Promise<TokenResponse | Response>) | undefined;\n revalidateMyOrganizations: () => Promise<Organization[]>;\n}\n\nconst OrganizationProvider: Component = defineComponent({\n name: 'OrganizationProvider',\n props: {\n /** Optional factory for creating a new sub-organization. */\n createOrganization: {\n default: undefined,\n type: Function as PropType<(payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>>,\n },\n /** The organization the user is currently operating in. */\n currentOrganization: {default: null, type: Object as PropType<Organization | null>},\n /** Callback to fetch all organizations (paginated). */\n getAllOrganizations: {\n default: undefined,\n type: Function as PropType<() => Promise<AllOrganizationsApiResponse>>,\n },\n /** The list of organizations the user is a member of. */\n myOrganizations: {default: () => [], type: Array as PropType<Organization[]>},\n /** Callback when an error occurs. */\n onError: {default: undefined, type: Function as PropType<(error: string) => void>},\n /** Callback that performs the actual organization switch (token exchange). */\n onOrganizationSwitch: {\n default: undefined,\n type: Function as PropType<(organization: Organization) => Promise<TokenResponse | Response>>,\n },\n /** Callback to re-fetch the user's organization list. */\n revalidateMyOrganizations: {\n default: async () => [],\n type: Function as PropType<() => Promise<Organization[]>>,\n },\n },\n setup(props: OrganizationProviderProps, {slots}: SetupContext): () => VNode {\n const isLoading: Ref<boolean> = ref(false);\n const error: Ref<string | null> = ref(null);\n\n const switchOrganization = async (organization: Organization): Promise<void> => {\n if (!props.onOrganizationSwitch) {\n throw new AsgardeoRuntimeError(\n 'onOrganizationSwitch callback is required',\n 'OrganizationProvider-SwitchError-001',\n 'vue',\n 'The onOrganizationSwitch callback must be provided to handle organization switching.',\n );\n }\n\n isLoading.value = true;\n error.value = null;\n\n try {\n await props.onOrganizationSwitch(organization);\n } catch (switchError: unknown) {\n const errorMessage: string =\n switchError instanceof Error ? switchError.message : 'Failed to switch organization';\n error.value = errorMessage;\n if (props.onError) {\n props.onError(errorMessage);\n }\n throw switchError;\n } finally {\n isLoading.value = false;\n }\n };\n\n const getAllOrgs = async (): Promise<AllOrganizationsApiResponse> => {\n if (props.getAllOrganizations) {\n return props.getAllOrganizations();\n }\n return {organizations: []};\n };\n\n // Use computed refs so context stays in sync when props change\n const currentOrganizationRef: Ref<Organization | null> = computed(() => props.currentOrganization);\n const myOrganizationsRef: Ref<Organization[]> = computed(() => props.myOrganizations);\n\n const context: OrganizationContextValue = {\n createOrganization: props.createOrganization,\n currentOrganization: currentOrganizationRef as unknown as Readonly<Ref<Organization | null>>,\n error: readonly(error),\n getAllOrganizations: getAllOrgs,\n isLoading: readonly(isLoading),\n myOrganizations: myOrganizationsRef as unknown as Readonly<Ref<Organization[]>>,\n revalidateMyOrganizations: props.revalidateMyOrganizations,\n switchOrganization,\n };\n\n provide(ORGANIZATION_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default OrganizationProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n Theme,\n ThemeConfig,\n ThemeMode,\n ThemePreferences,\n RecursivePartial,\n BrowserThemeDetection,\n DEFAULT_THEME,\n createTheme,\n detectThemeMode,\n createClassObserver,\n createMediaQueryListener,\n} from '@asgardeo/browser';\nimport {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n readonly,\n shallowReadonly,\n ref,\n watch,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {BRANDING_KEY, THEME_KEY} from '../keys';\nimport type {BrandingContextValue, ThemeContextValue} from '../models/contexts';\nimport {createVueLogger} from '../utils/logger';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('ThemeProvider');\n\n/**\n * ThemeProvider manages theme state and provides it to child components via `useTheme()`.\n *\n * It supports:\n * - Fixed color schemes (`light` | `dark`)\n * - System preference detection (`system`)\n * - CSS-class-based detection (`class`)\n * - Branding-driven mode (`branding`) \u2014 inherits the active theme from `BrandingProvider`\n * - Merging server branding theme with local overrides\n * - CSS variable injection onto `document.documentElement`\n *\n * @example\n * ```vue\n * <ThemeProvider mode=\"system\" :inherit-from-branding=\"true\">\n * <App />\n * </ThemeProvider>\n * ```\n */\ninterface ThemeProviderProps {\n detection: BrowserThemeDetection;\n inheritFromBranding: boolean;\n mode: ThemeMode | 'branding';\n theme: RecursivePartial<ThemeConfig> | undefined;\n}\n\nconst ThemeProvider: Component = defineComponent({\n name: 'ThemeProvider',\n props: {\n /** Theme detection configuration (for 'class' or 'system' mode). */\n detection: {default: () => ({}), type: Object as PropType<BrowserThemeDetection>},\n /** Whether to inherit theme from Asgardeo branding preference. */\n inheritFromBranding: {default: true as ThemePreferences['inheritFromBranding'], type: Boolean},\n /**\n * The theme mode:\n * - `'light'` | `'dark'`: Fixed color scheme.\n * - `'system'`: Follows OS preference.\n * - `'class'`: Detects theme from CSS classes on `<html>`.\n * - `'branding'`: Follows the active theme from branding preference.\n */\n mode: {\n default: DEFAULT_THEME as ThemeMode | 'branding',\n type: String as PropType<ThemeMode | 'branding'>,\n },\n /** Optional partial theme overrides applied on top of the resolved theme. */\n theme: {default: undefined, type: Object as PropType<RecursivePartial<ThemeConfig>>},\n },\n setup(props: ThemeProviderProps, {slots}: SetupContext): () => VNode {\n // Try to consume branding context \u2013 it is optional (BrandingProvider may not be mounted)\n const brandingContext: BrandingContextValue | null = inject(BRANDING_KEY, null);\n\n const initColorScheme = (): 'light' | 'dark' => {\n if (props.mode === 'light' || props.mode === 'dark') return props.mode;\n if (props.mode === 'branding') return detectThemeMode('system', props.detection);\n return detectThemeMode(props.mode as ThemeMode, props.detection);\n };\n\n const colorScheme: Ref<'light' | 'dark'> = ref(initColorScheme());\n\n // Update color scheme when branding's active theme is available\n watch(\n () => (brandingContext as any)?.activeTheme.value,\n (brandingActiveTheme: string | 'light' | 'dark' | undefined): void => {\n if (!props.inheritFromBranding || !brandingActiveTheme) return;\n if (props.mode === 'branding') {\n colorScheme.value = brandingActiveTheme as 'light' | 'dark';\n } else if (props.mode === 'system' && !(brandingContext as any)?.isLoading.value) {\n colorScheme.value = brandingActiveTheme as 'light' | 'dark';\n }\n },\n );\n\n // Warn if inheritFromBranding is true but no BrandingProvider is present\n if (props.inheritFromBranding && !brandingContext) {\n logger.warn(\n 'ThemeProvider: inheritFromBranding is enabled but BrandingProvider is not available. ' +\n 'Make sure to wrap your app with BrandingProvider or AsgardeoProvider.',\n );\n }\n\n // Merge branding theme with user-provided overrides\n const finalThemeConfig: Ref<RecursivePartial<ThemeConfig> | undefined> = computed<\n RecursivePartial<ThemeConfig> | undefined\n >(() => {\n const themeConfig: RecursivePartial<ThemeConfig> | undefined = props.theme;\n const brandingTheme: RecursivePartial<ThemeConfig> | null | undefined = props.inheritFromBranding\n ? (brandingContext as any)?.theme.value\n : null;\n\n if (!brandingTheme) return themeConfig;\n\n const brandingThemeConfig: RecursivePartial<ThemeConfig> = {\n borderRadius: brandingTheme.borderRadius,\n colors: brandingTheme.colors,\n components: brandingTheme.components,\n images: brandingTheme.images,\n shadows: brandingTheme.shadows,\n spacing: brandingTheme.spacing,\n };\n\n return {\n ...brandingThemeConfig,\n ...themeConfig,\n borderRadius: {...brandingThemeConfig.borderRadius, ...themeConfig?.borderRadius},\n colors: {...brandingThemeConfig.colors, ...themeConfig?.colors},\n components: {...brandingThemeConfig.components, ...themeConfig?.components},\n images: {...brandingThemeConfig.images, ...themeConfig?.images},\n shadows: {...brandingThemeConfig.shadows, ...themeConfig?.shadows},\n spacing: {...brandingThemeConfig.spacing, ...themeConfig?.spacing},\n };\n });\n\n const resolvedTheme: Ref<Theme> = computed<Theme>(() =>\n createTheme(finalThemeConfig.value, colorScheme.value === 'dark'),\n );\n\n const direction: Ref<'ltr' | 'rtl'> = computed<'ltr' | 'rtl'>(\n () => ((finalThemeConfig.value as any)?.direction as 'ltr' | 'rtl') || 'ltr',\n );\n\n const toggleTheme = (): void => {\n colorScheme.value = colorScheme.value === 'light' ? 'dark' : 'light';\n };\n\n // Apply CSS variables to DOM\n const applyToDom = (theme: Theme): void => {\n if (typeof document === 'undefined') return;\n const root: HTMLElement = document.documentElement;\n // Use the pre-computed cssVariables map from createTheme() which contains\n // correctly-named CSS variables (e.g. --asgardeo-color-primary-main).\n Object.entries(theme.cssVariables).forEach(([key, value]: [key: string, value: string]): void => {\n root.style.setProperty(key, value);\n });\n };\n\n watch(resolvedTheme, (theme: Theme): void => applyToDom(theme), {immediate: true});\n\n // Apply direction to document\n watch(\n direction,\n (dir: 'ltr' | 'rtl'): void => {\n if (typeof document !== 'undefined') {\n document.documentElement.dir = dir;\n }\n },\n {immediate: true},\n );\n\n // Set up automatic theme detection listeners\n let classObserver: MutationObserver | null = null;\n let mediaQuery: MediaQueryList | null = null;\n\n const handleThemeChange = (isDark: boolean): void => {\n colorScheme.value = isDark ? 'dark' : 'light';\n };\n\n onMounted((): void => {\n if (props.mode === 'branding') return;\n\n if (props.mode === 'class') {\n const targetElement: HTMLElement = (props.detection as any).targetElement || document.documentElement;\n if (targetElement) {\n classObserver = createClassObserver(targetElement, handleThemeChange, props.detection);\n }\n } else if (props.mode === 'system') {\n if (!props.inheritFromBranding || !(brandingContext as any)?.activeTheme.value) {\n mediaQuery = createMediaQueryListener(handleThemeChange);\n }\n }\n });\n\n onBeforeUnmount((): void => {\n if (classObserver) classObserver.disconnect();\n if (mediaQuery?.removeEventListener) {\n mediaQuery.removeEventListener('change', handleThemeChange as any);\n }\n });\n\n const context: ThemeContextValue = {\n brandingError: brandingContext?.error ?? readonly(ref(null)),\n colorScheme: readonly(colorScheme),\n direction: readonly(direction) as Readonly<Ref<'ltr' | 'rtl'>>,\n inheritFromBranding: props.inheritFromBranding,\n isBrandingLoading: brandingContext?.isLoading ?? readonly(ref(false)),\n theme: shallowReadonly(resolvedTheme),\n toggleTheme,\n };\n\n provide(THEME_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default ThemeProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Schema, UpdateMeProfileConfig, User, UserProfile} from '@asgardeo/browser';\nimport {\n computed,\n defineComponent,\n h,\n provide,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {USER_KEY} from '../keys';\nimport type {UserContextValue} from '../models/contexts';\n\n/**\n * UserProvider manages user profile state and makes it available via `useUser()`.\n *\n * It is a thin wrapper that receives profile data from a parent (typically\n * `<AsgardeoProvider>`) and surfaces it through the Vue inject system.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface UserProviderProps {\n flattenedProfile: User | null;\n onUpdateProfile: ((payload: User) => void) | undefined;\n profile: UserProfile | null;\n revalidateProfile: () => Promise<void>;\n schemas: Schema[] | null;\n updateProfile:\n | ((\n requestConfig: UpdateMeProfileConfig,\n sessionId?: string,\n ) => Promise<{data: {user: User}; error: string; success: boolean}>)\n | undefined;\n}\n\nconst UserProvider: Component = defineComponent({\n name: 'UserProvider',\n props: {\n /** The flattened profile (top-level attribute map). */\n flattenedProfile: {default: null, type: Object as PropType<User | null>},\n /** Optional callback run after the profile is updated locally. */\n onUpdateProfile: {default: undefined, type: Function as PropType<(payload: User) => void>},\n /** The full user profile data (nested + flat + schemas). */\n profile: {default: null, type: Object as PropType<UserProfile | null>},\n /** Re-fetch the user profile from the server. */\n revalidateProfile: {default: async () => {}, type: Function as PropType<() => Promise<void>>},\n /** The SCIM2 schemas describing user profile attributes. */\n schemas: {default: null, type: Array as PropType<Schema[] | null>},\n /** Update the user profile via SCIM2 PATCH. */\n updateProfile: {\n default: undefined,\n type: Function as PropType<\n (\n requestConfig: UpdateMeProfileConfig,\n sessionId?: string,\n ) => Promise<{data: {user: User}; error: string; success: boolean}>\n >,\n },\n },\n setup(props: UserProviderProps, {slots}: SetupContext): () => VNode {\n // Use computed refs so context stays in sync when props change\n const flattenedProfileRef: Ref<User | null> = computed(() => props.flattenedProfile);\n const profileRef: Ref<UserProfile | null> = computed(() => props.profile);\n const schemasRef: Ref<Schema[] | null> = computed(() => props.schemas);\n\n const context: UserContextValue = {\n flattenedProfile: flattenedProfileRef as unknown as Readonly<Ref<User | null>>,\n profile: profileRef as unknown as Readonly<Ref<UserProfile | null>>,\n revalidateProfile: props.revalidateProfile,\n schemas: schemasRef as unknown as Readonly<Ref<Schema[] | null>>,\n updateProfile:\n props.updateProfile ??\n (async (): Promise<{data: {user: User}; error: string; success: boolean}> => ({\n data: {user: {} as User},\n error: 'updateProfile callback not provided',\n success: false,\n })),\n };\n\n provide(USER_KEY, context);\n\n return (): VNode => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default UserProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoBrowserClient,\n flattenUserSchema,\n generateFlattenedUserProfile,\n UserProfile,\n SignInOptions,\n SignOutOptions,\n User,\n generateUserProfile,\n EmbeddedFlowExecuteResponse,\n SignUpOptions,\n EmbeddedFlowExecuteRequestPayload,\n AsgardeoRuntimeError,\n executeEmbeddedSignUpFlow,\n EmbeddedSignInFlowHandleRequestPayload,\n executeEmbeddedSignInFlow,\n executeEmbeddedSignInFlowV2,\n Organization,\n IdToken,\n EmbeddedFlowExecuteRequestConfig,\n deriveOrganizationHandleFromBaseUrl,\n AllOrganizationsApiResponse,\n extractUserClaimsFromIdToken,\n TokenResponse,\n HttpRequestConfig,\n HttpResponse,\n navigate,\n getRedirectBasedSignUpUrl,\n Config,\n TokenExchangeRequestConfig,\n Platform,\n isEmpty,\n EmbeddedSignInFlowResponseV2,\n executeEmbeddedSignUpFlowV2,\n EmbeddedSignInFlowStatusV2,\n} from '@asgardeo/browser';\nimport AuthAPI from './__temp__/api';\nimport getAllOrganizations from './api/getAllOrganizations';\nimport getMeOrganizations from './api/getMeOrganizations';\nimport getSchemas from './api/getSchemas';\nimport getScim2Me from './api/getScim2Me';\nimport {AsgardeoVueConfig} from './models/config';\n\n/**\n * Client for implementing Asgardeo in Vue applications.\n * This class provides the core functionality for managing user authentication and sessions.\n *\n * @typeParam T - Configuration type that extends AsgardeoVueConfig.\n */\nclass AsgardeoVueClient<T extends AsgardeoVueConfig = AsgardeoVueConfig> extends AsgardeoBrowserClient<T> {\n private asgardeo: AuthAPI;\n\n private loadingState: boolean = false;\n\n private clientInstanceId: number;\n\n constructor(instanceId: number = 0) {\n super();\n this.clientInstanceId = instanceId;\n\n // FIXME: This has to be the browser client from `@asgardeo/browser` package.\n this.asgardeo = new AuthAPI(undefined, instanceId);\n }\n\n public getInstanceId(): number {\n return this.clientInstanceId;\n }\n\n private setLoading(loading: boolean): void {\n this.loadingState = loading;\n }\n\n private async withLoading<TResult>(operation: () => Promise<TResult>): Promise<TResult> {\n this.setLoading(true);\n try {\n const result: TResult = await operation();\n return result;\n } finally {\n this.setLoading(false);\n }\n }\n\n override initialize(config: AsgardeoVueConfig): Promise<boolean> {\n let resolvedOrganizationHandle: string | undefined = config?.organizationHandle;\n\n if (!resolvedOrganizationHandle) {\n resolvedOrganizationHandle = deriveOrganizationHandleFromBaseUrl(config?.baseUrl);\n }\n\n return this.withLoading(async () =>\n this.asgardeo.init({...config, organizationHandle: resolvedOrganizationHandle} as any),\n );\n }\n\n override reInitialize(config: Partial<AsgardeoVueConfig>): Promise<boolean> {\n return this.withLoading(async () => {\n let isInitialized: boolean;\n\n try {\n await this.asgardeo.reInitialize(config as any);\n isInitialized = true;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to check if the client is initialized: ${error instanceof Error ? error.message : String(error)}`,\n 'AsgardeoVueClient-reInitialize-RuntimeError-001',\n 'vue',\n 'An error occurred while checking the initialization status of the client.',\n );\n }\n\n return isInitialized;\n });\n }\n\n // eslint-disable-next-line class-methods-use-this\n override async updateUserProfile(): Promise<User> {\n throw new Error('Not implemented');\n }\n\n override async getUser(options?: any): Promise<User> {\n try {\n let baseUrl: string = options?.baseUrl;\n\n if (!baseUrl) {\n const configData: any = await this.asgardeo.getConfigData();\n baseUrl = configData?.baseUrl;\n }\n\n const profile: User = await getScim2Me({baseUrl});\n const schemas: any = await getSchemas({baseUrl});\n\n return generateUserProfile(profile, flattenUserSchema(schemas));\n } catch (error) {\n return extractUserClaimsFromIdToken(await this.getDecodedIdToken());\n }\n }\n\n async getDecodedIdToken(sessionId?: string): Promise<IdToken> {\n return this.asgardeo.getDecodedIdToken(sessionId);\n }\n\n async getIdToken(): Promise<string> {\n return this.withLoading(async () => this.asgardeo.getIdToken());\n }\n\n override async getUserProfile(options?: any): Promise<UserProfile> {\n return this.withLoading(async () => {\n try {\n let baseUrl: string = options?.baseUrl;\n\n if (!baseUrl) {\n const configData: any = await this.asgardeo.getConfigData();\n baseUrl = configData?.baseUrl;\n }\n\n const profile: User = await getScim2Me({baseUrl, instanceId: this.getInstanceId()});\n const schemas: any = await getSchemas({baseUrl, instanceId: this.getInstanceId()});\n\n const processedSchemas: any = flattenUserSchema(schemas);\n\n const output: UserProfile = {\n flattenedProfile: generateFlattenedUserProfile(profile, processedSchemas),\n profile,\n schemas: processedSchemas,\n };\n\n return output;\n } catch (error) {\n return {\n flattenedProfile: extractUserClaimsFromIdToken(await this.getDecodedIdToken()),\n profile: extractUserClaimsFromIdToken(await this.getDecodedIdToken()),\n schemas: [],\n };\n }\n });\n }\n\n override async getMyOrganizations(options?: any): Promise<Organization[]> {\n try {\n let baseUrl: string = options?.baseUrl;\n\n if (!baseUrl) {\n const configData: any = await this.asgardeo.getConfigData();\n baseUrl = configData?.baseUrl;\n }\n\n return await getMeOrganizations({baseUrl, instanceId: this.getInstanceId()});\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to fetch the user's associated organizations: ${\n error instanceof Error ? error.message : String(error)\n }`,\n 'AsgardeoVueClient-getMyOrganizations-RuntimeError-001',\n 'vue',\n 'An error occurred while fetching associated organizations of the signed-in user.',\n );\n }\n }\n\n override async getAllOrganizations(options?: any): Promise<AllOrganizationsApiResponse> {\n try {\n let baseUrl: string = options?.baseUrl;\n\n if (!baseUrl) {\n const configData: any = await this.asgardeo.getConfigData();\n baseUrl = configData?.baseUrl;\n }\n\n return await getAllOrganizations({baseUrl, instanceId: this.getInstanceId()});\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to fetch all organizations: ${error instanceof Error ? error.message : String(error)}`,\n 'AsgardeoVueClient-getAllOrganizations-RuntimeError-001',\n 'vue',\n 'An error occurred while fetching all the organizations associated with the user.',\n );\n }\n }\n\n override async getCurrentOrganization(): Promise<Organization | null> {\n try {\n return await this.withLoading(async () => {\n const idToken: IdToken = await this.getDecodedIdToken();\n return {\n id: idToken?.org_id,\n name: idToken?.org_name,\n orgHandle: idToken?.org_handle,\n };\n });\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to fetch the current organization: ${error instanceof Error ? error.message : String(error)}`,\n 'AsgardeoVueClient-getCurrentOrganization-RuntimeError-001',\n 'vue',\n 'An error occurred while fetching the current organization of the signed-in user.',\n );\n }\n }\n\n override async switchOrganization(organization: Organization): Promise<TokenResponse | Response> {\n return this.withLoading(async () => {\n try {\n const configData: any = await this.asgardeo.getConfigData();\n const sourceInstanceId: number | undefined = configData?.organizationChain?.sourceInstanceId;\n\n if (!organization.id) {\n throw new AsgardeoRuntimeError(\n 'Organization ID is required for switching organizations',\n 'vue-AsgardeoVueClient-SwitchOrganizationError-001',\n 'vue',\n 'The organization object must contain a valid ID to perform the organization switch.',\n );\n }\n\n const exchangeConfig: TokenExchangeRequestConfig = {\n attachToken: false,\n data: {\n client_id: '{{clientId}}',\n grant_type: 'organization_switch',\n scope: '{{scopes}}',\n switching_organization: organization.id,\n token: '{{accessToken}}',\n },\n id: 'organization-switch',\n returnsSession: true,\n signInRequired: sourceInstanceId === undefined,\n };\n\n return (await this.asgardeo.exchangeToken(exchangeConfig, () => {})) as TokenResponse | Response;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to switch organization: ${error.message || error}`,\n 'vue-AsgardeoVueClient-SwitchOrganizationError-003',\n 'vue',\n 'An error occurred while switching to the specified organization. Please try again.',\n );\n }\n });\n }\n\n override isLoading(): boolean {\n return this.loadingState || this.asgardeo.isLoading();\n }\n\n async isInitialized(): Promise<boolean> {\n return this.asgardeo.isInitialized();\n }\n\n override async isSignedIn(): Promise<boolean> {\n return this.asgardeo.isSignedIn();\n }\n\n override getConfiguration(): T {\n return this.asgardeo.getConfigData() as unknown as T;\n }\n\n override async exchangeToken(config: TokenExchangeRequestConfig): Promise<TokenResponse | Response> {\n return this.withLoading(\n async () => this.asgardeo.exchangeToken(config, () => {}) as unknown as TokenResponse | Response,\n );\n }\n\n override signIn(\n options?: SignInOptions,\n sessionId?: string,\n onSignInSuccess?: (afterSignInUrl: string) => void,\n ): Promise<User>;\n override signIn(\n payload: EmbeddedSignInFlowHandleRequestPayload,\n request: EmbeddedFlowExecuteRequestConfig,\n sessionId?: string,\n onSignInSuccess?: (afterSignInUrl: string) => void,\n ): Promise<User>;\n override async signIn(...args: any[]): Promise<User | EmbeddedSignInFlowResponseV2> {\n return this.withLoading(async () => {\n const arg1: any = args[0];\n const arg2: any = args[1];\n\n const config: AsgardeoVueConfig | undefined = (await this.asgardeo.getConfigData()) as\n | AsgardeoVueConfig\n | undefined;\n\n const platformFromStorage: string | null = sessionStorage.getItem('asgardeo_platform');\n const isV2Platform: boolean =\n (config && config.platform === Platform.AsgardeoV2) || platformFromStorage === 'AsgardeoV2';\n\n if (isV2Platform && typeof arg1 === 'object' && arg1 !== null && (arg1 as any).callOnlyOnRedirect === true) {\n return undefined as any;\n }\n\n if (\n isV2Platform &&\n typeof arg1 === 'object' &&\n arg1 !== null &&\n !isEmpty(arg1) &&\n ('executionId' in arg1 || 'applicationId' in arg1)\n ) {\n const authIdFromUrl: string = new URL(window.location.href).searchParams.get('authId');\n const authIdFromStorage: string = sessionStorage.getItem('asgardeo_auth_id');\n const authId: string = authIdFromUrl || authIdFromStorage;\n const baseUrlFromStorage: string = sessionStorage.getItem('asgardeo_base_url');\n const baseUrl: string = config?.baseUrl || baseUrlFromStorage;\n\n const response: EmbeddedSignInFlowResponseV2 = await executeEmbeddedSignInFlowV2({\n authId,\n baseUrl,\n payload: arg1 as EmbeddedSignInFlowHandleRequestPayload,\n url: arg2?.url,\n });\n\n if (\n isV2Platform &&\n response &&\n typeof response === 'object' &&\n response['flowStatus'] === EmbeddedSignInFlowStatusV2.Complete &&\n response['assertion']\n ) {\n const decodedAssertion: {\n [key: string]: unknown;\n exp?: number;\n iat?: number;\n scope?: string;\n } = await this.decodeJwtToken<{\n [key: string]: unknown;\n exp?: number;\n iat?: number;\n scope?: string;\n }>(response['assertion']);\n\n const createdAt: number = decodedAssertion.iat ? decodedAssertion.iat * 1000 : Date.now();\n const expiresIn: number =\n decodedAssertion.exp && decodedAssertion.iat ? decodedAssertion.exp - decodedAssertion.iat : 3600;\n\n await this.setSession({\n access_token: response['assertion'],\n created_at: createdAt,\n expires_in: expiresIn,\n id_token: response['assertion'],\n scope: decodedAssertion.scope,\n token_type: 'Bearer',\n });\n }\n\n return response;\n }\n\n if (typeof arg1 === 'object' && 'flowId' in arg1 && typeof arg2 === 'object' && 'url' in arg2) {\n return executeEmbeddedSignInFlow({\n payload: arg1,\n url: arg2.url,\n });\n }\n\n return (await this.asgardeo.signIn(arg1 as any)) as unknown as Promise<User>;\n });\n }\n\n override async signInSilently(options?: SignInOptions): Promise<User | boolean> {\n return this.asgardeo.signInSilently(options as Record<string, string | boolean>);\n }\n\n override signOut(options?: SignOutOptions, afterSignOut?: (afterSignOutUrl: string) => void): Promise<string>;\n override signOut(\n options?: SignOutOptions,\n sessionId?: string,\n afterSignOut?: (afterSignOutUrl: string) => void,\n ): Promise<string>;\n override async signOut(...args: any[]): Promise<string> {\n let afterSignOut: ((url: string) => void) | undefined;\n\n if (typeof args[1] === 'string') {\n // Overload 2: signOut(options, sessionId, afterSignOut?)\n [, , afterSignOut] = args;\n } else if (typeof args[1] === 'function') {\n // Overload 1: signOut(options, afterSignOut)\n [, afterSignOut] = args;\n }\n\n const config: AsgardeoVueConfig = (await this.asgardeo.getConfigData()) as AsgardeoVueConfig;\n\n if (config.platform === Platform.AsgardeoV2) {\n this.asgardeo.clearSession();\n\n if (config.signInUrl) {\n navigate(config.signInUrl);\n } else {\n this.signIn(config.signInOptions);\n }\n\n afterSignOut?.(config.afterSignOutUrl || '');\n\n return Promise.resolve(config.afterSignOutUrl || '');\n }\n\n const response: boolean = await this.asgardeo.signOut(afterSignOut as any);\n\n return Promise.resolve(String(response));\n }\n\n override async signUp(options?: SignUpOptions): Promise<void>;\n override async signUp(payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse>;\n override async signUp(...args: any[]): Promise<void | EmbeddedFlowExecuteResponse> {\n const config: AsgardeoVueConfig = (await this.asgardeo.getConfigData()) as AsgardeoVueConfig;\n const firstArg: any = args[0];\n const baseUrl: string = config?.baseUrl;\n\n if (config.platform === Platform.AsgardeoV2) {\n const authIdFromUrl: string = new URL(window.location.href).searchParams.get('authId');\n const authIdFromStorage: string = sessionStorage.getItem('asgardeo_auth_id');\n const authId: string = authIdFromUrl || authIdFromStorage;\n\n if (authIdFromUrl && !authIdFromStorage) {\n sessionStorage.setItem('asgardeo_auth_id', authIdFromUrl);\n }\n\n return executeEmbeddedSignUpFlowV2({\n authId,\n baseUrl,\n payload:\n typeof firstArg === 'object' && 'flowType' in firstArg\n ? {...(firstArg as EmbeddedFlowExecuteRequestPayload), verbose: true}\n : (firstArg as EmbeddedFlowExecuteRequestPayload),\n }) as any;\n }\n\n if (typeof firstArg === 'object' && 'flowType' in firstArg) {\n return executeEmbeddedSignUpFlow({\n baseUrl,\n payload: firstArg as EmbeddedFlowExecuteRequestPayload,\n });\n }\n\n navigate(getRedirectBasedSignUpUrl(config as Config));\n return undefined;\n }\n\n async request(requestConfig?: HttpRequestConfig): Promise<HttpResponse<any>> {\n return this.asgardeo.httpRequest(requestConfig);\n }\n\n async requestAll(requestConfigs?: HttpRequestConfig[]): Promise<HttpResponse<any>[]> {\n return this.asgardeo.httpRequestAll(requestConfigs);\n }\n\n override async getAccessToken(sessionId?: string): Promise<string> {\n return this.asgardeo.getAccessToken(sessionId);\n }\n\n override clearSession(sessionId?: string): void {\n this.asgardeo.clearSession(sessionId);\n }\n\n override async setSession(sessionData: Record<string, unknown>, sessionId?: string): Promise<void> {\n return (await this.asgardeo.getStorageManager()).setSessionData(sessionData, sessionId);\n }\n\n override decodeJwtToken<TResult = Record<string, unknown>>(token: string): Promise<TResult> {\n return this.asgardeo.decodeJwtToken<TResult>(token);\n }\n}\n\nexport default AsgardeoVueClient;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoSPAClient,\n AuthClientConfig,\n User,\n LegacyConfig as Config,\n IdToken,\n Hooks,\n HttpClient,\n HttpRequestConfig,\n HttpResponse,\n OIDCEndpoints,\n SignInConfig,\n SPACustomGrantConfig,\n} from '@asgardeo/browser';\nimport {AuthStateInterface} from './models';\n\nclass AuthAPI {\n static DEFAULT_STATE: AuthStateInterface;\n\n private authState: AuthStateInterface = AuthAPI.DEFAULT_STATE;\n\n private client: AsgardeoSPAClient;\n\n private apiInstanceId: number;\n\n private loadingState: boolean;\n\n constructor(spaClient?: AsgardeoSPAClient, instanceId: number = 0) {\n this.apiInstanceId = instanceId;\n this.client = spaClient ?? AsgardeoSPAClient.getInstance(instanceId);\n\n this.getState = this.getState.bind(this);\n this.init = this.init.bind(this);\n this.signIn = this.signIn.bind(this);\n this.signOut = this.signOut.bind(this);\n this.updateState = this.updateState.bind(this);\n }\n\n public getInstanceId(): number {\n return this.apiInstanceId;\n }\n\n public setLoadingState(isLoading: boolean): void {\n this.loadingState = isLoading;\n }\n\n public getLoadingState(): boolean {\n return this.loadingState;\n }\n\n public isLoading(): boolean {\n return this.getLoadingState();\n }\n\n public getState(): AuthStateInterface {\n return this.authState;\n }\n\n public async init(config: AuthClientConfig<Config>): Promise<boolean> {\n return this.client.initialize(config);\n }\n\n public async getConfigData(): Promise<AuthClientConfig<Config>> {\n return this.client.getConfigData();\n }\n\n public async getStorageManager(): Promise<any> {\n return this.client.getStorageManager();\n }\n\n public async isInitialized(): Promise<boolean> {\n return this.client.isInitialized();\n }\n\n public async signIn(\n config: SignInConfig,\n authorizationCode?: string,\n sessionState?: string,\n authState?: string,\n callback?: (response: User) => void,\n tokenRequestConfig?: {\n params: Record<string, unknown>;\n },\n ): Promise<any> {\n return this.client\n .signIn(config, authorizationCode, sessionState, authState, tokenRequestConfig)\n .then(async (response: User) => {\n if (!response) {\n return null;\n }\n\n if (await this.client.isSignedIn()) {\n const stateToUpdate: AuthStateInterface = {\n displayName: response.displayName,\n email: response.email,\n isLoading: false,\n isSignedIn: true,\n username: response.username,\n };\n\n this.updateState(stateToUpdate);\n this.setLoadingState(false);\n\n if (callback) {\n callback(response);\n }\n }\n\n return response;\n })\n .catch((error: Error) => Promise.reject(error));\n }\n\n public signOut(callback?: (response?: boolean) => void): Promise<boolean> {\n return this.client\n .signOut()\n .then((response: boolean) => {\n if (callback) {\n callback(response);\n }\n\n return response;\n })\n .catch((error: Error) => Promise.reject(error));\n }\n\n public updateState(state: AuthStateInterface): void {\n this.authState = {...this.authState, ...state};\n }\n\n public async getUser(): Promise<User> {\n return this.client.getUser();\n }\n\n public async httpRequest(config: HttpRequestConfig): Promise<HttpResponse<any>> {\n return this.client.httpRequest(config);\n }\n\n public async httpRequestAll(configs: HttpRequestConfig[]): Promise<HttpResponse<any>[]> {\n return this.client.httpRequestAll(configs);\n }\n\n public exchangeToken(\n config: SPACustomGrantConfig,\n callback: (response: User | Response) => void,\n ): Promise<User | Response> {\n return this.client\n .exchangeToken(config)\n .then((response: User | Response) => {\n if (!response) {\n return null;\n }\n\n if (config.returnsSession) {\n this.updateState({\n ...this.getState(),\n ...(response as User),\n isLoading: false,\n isSignedIn: true,\n });\n }\n\n if (callback) {\n callback(response);\n }\n\n return response;\n })\n .catch((error: Error) => Promise.reject(error));\n }\n\n public async getOpenIDProviderEndpoints(): Promise<OIDCEndpoints> {\n return this.client.getOpenIDProviderEndpoints();\n }\n\n public async getHttpClient(): Promise<HttpClient> {\n return this.client.getHttpClient();\n }\n\n public async decodeJwtToken<T = Record<string, unknown>>(token: string): Promise<T> {\n return this.client.decodeJwtToken<T>(token);\n }\n\n public async getDecodedIdToken(sessionId?: string): Promise<IdToken> {\n return this.client.getDecodedIdToken(sessionId);\n }\n\n public async getIdToken(): Promise<string> {\n return this.client.getIdToken();\n }\n\n public async getAccessToken(sessionId?: string): Promise<string> {\n return this.client.getAccessToken(sessionId);\n }\n\n public async refreshAccessToken(): Promise<User> {\n return this.client.refreshAccessToken();\n }\n\n public async isSignedIn(): Promise<boolean> {\n return this.client.isSignedIn();\n }\n\n public async enableHttpHandler(): Promise<boolean> {\n return this.client.enableHttpHandler();\n }\n\n public async disableHttpHandler(): Promise<boolean> {\n return this.client.disableHttpHandler();\n }\n\n public async reInitialize(config: Partial<AuthClientConfig<Config>>): Promise<void> {\n return this.client.reInitialize(config);\n }\n\n public on(hook: Hooks.CustomGrant, callback: (response?: any) => void, id: string): Promise<void>;\n public on(hook: Exclude<Hooks, Hooks.CustomGrant>, callback: (response?: any) => void): Promise<void>;\n public on(hook: Hooks, callback: (response?: any) => void, id?: string): Promise<void> {\n if (hook === Hooks.CustomGrant) {\n return this.client.on(hook, callback, id);\n }\n\n return this.client.on(hook, callback);\n }\n\n public async signInSilently(\n additionalParams?: Record<string, string | boolean>,\n tokenRequestConfig?: {params: Record<string, unknown>},\n ): Promise<User | boolean | undefined> {\n return this.client\n .signInSilently(additionalParams, tokenRequestConfig)\n .then(async (response: User | boolean) => {\n if (!response) {\n return false;\n }\n\n return response;\n })\n .catch((error: Error) => Promise.reject(error));\n }\n\n public clearSession(sessionId?: string): void {\n this.client.clearSession(sessionId);\n }\n}\n\nAuthAPI.DEFAULT_STATE = {\n displayName: '',\n email: '',\n isLoading: true,\n isSignedIn: false,\n username: '',\n};\n\nexport default AuthAPI;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n HttpResponse,\n AsgardeoSPAClient,\n HttpRequestConfig,\n getAllOrganizations as baseGetAllOrganizations,\n GetAllOrganizationsConfig as BaseGetAllOrganizationsConfig,\n AllOrganizationsApiResponse,\n} from '@asgardeo/browser';\n\nexport interface GetAllOrganizationsConfig extends Omit<BaseGetAllOrganizationsConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst getAllOrganizations = async ({\n fetcher,\n instanceId = 0,\n ...requestConfig\n}: GetAllOrganizationsConfig): Promise<AllOrganizationsApiResponse> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetAllOrganizations({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getAllOrganizations;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n Organization,\n HttpResponse,\n AsgardeoSPAClient,\n HttpRequestConfig,\n getMeOrganizations as baseGetMeOrganizations,\n GetMeOrganizationsConfig as BaseGetMeOrganizationsConfig,\n} from '@asgardeo/browser';\n\nexport interface GetMeOrganizationsConfig extends Omit<BaseGetMeOrganizationsConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst getMeOrganizations = async ({\n fetcher,\n instanceId = 0,\n ...requestConfig\n}: GetMeOrganizationsConfig): Promise<Organization[]> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetMeOrganizations({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getMeOrganizations;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n Schema,\n HttpResponse,\n AsgardeoSPAClient,\n HttpRequestConfig,\n getSchemas as baseGetSchemas,\n GetSchemasConfig as BaseGetSchemasConfig,\n} from '@asgardeo/browser';\n\nexport interface GetSchemasConfig extends Omit<BaseGetSchemasConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst getSchemas = async ({fetcher, instanceId = 0, ...requestConfig}: GetSchemasConfig): Promise<Schema[]> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetSchemas({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getSchemas;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n User,\n HttpResponse,\n AsgardeoSPAClient,\n HttpRequestConfig,\n getScim2Me as baseGetScim2Me,\n GetScim2MeConfig as BaseGetScim2MeConfig,\n} from '@asgardeo/browser';\n\nexport interface GetScim2MeConfig extends Omit<BaseGetScim2MeConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst getScim2Me = async ({fetcher, instanceId = 0, ...requestConfig}: GetScim2MeConfig): Promise<User> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetScim2Me({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getScim2Me;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Shared CSS keyframe animations used by multiple primitive components.\n *\n * `asgardeo-spin` - used by Spinner (__svg) and Button (__spinner)\n * `asgardeo-spinner-dash` - used by Spinner (__circle)\n *\n * Defined once here rather than in each component's CSS file to avoid\n * duplicate `@keyframes` blocks in the injected stylesheet.\n */\nconst ANIMATIONS_CSS: string = `\n/* ============================================================\n Asgardeo Vue SDK \u2013 shared keyframe animations\n ============================================================ */\n\n@keyframes asgardeo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes asgardeo-spinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n`;\n\nexport default ANIMATIONS_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Default CSS custom property fallback values.\n *\n * These are written into a `:root` rule so that every Asgardeo Vue primitive\n * renders correctly even when no ThemeProvider is mounted. When ThemeProvider\n * IS present it calls `document.documentElement.style.setProperty(...)` which\n * has higher specificity than a stylesheet `:root` rule and therefore wins\n * automatically \u2014 no special cascade tricks required.\n *\n * Design token naming follows the pattern:\n * --asgardeo-{category}-{sub}-{scale?}\n */\nconst DEFAULTS_CSS: string = `\n/* ============================================================\n Asgardeo Vue SDK \u2013 CSS variable defaults\n (ThemeProvider overrides these at runtime via inline styles)\n ============================================================ */\n:root {\n /* --- Colors: Primary --- */\n --asgardeo-color-primary-main: #4b6ef5;\n --asgardeo-color-primary-light: #eef1fe;\n --asgardeo-color-primary-dark: #3451d1;\n --asgardeo-color-primary-contrastText: #ffffff;\n\n /* --- Colors: Secondary --- */\n --asgardeo-color-secondary-main: #4b5563;\n --asgardeo-color-secondary-light: #f3f4f6;\n --asgardeo-color-secondary-contrastText: #ffffff;\n\n /* --- Colors: Background --- */\n --asgardeo-color-background-surface: #ffffff;\n --asgardeo-color-background-body: #f9fafb;\n --asgardeo-color-background-disabled: #f3f4f6;\n --asgardeo-color-background-muted: #f1f3f5;\n\n /* --- Colors: Text --- */\n --asgardeo-color-text-primary: #111827;\n --asgardeo-color-text-secondary: #6b7280;\n\n /* --- Colors: Border --- */\n --asgardeo-color-border: #e5e7eb;\n --asgardeo-color-border-focus: var(--asgardeo-color-primary-main);\n\n /* --- Colors: Action states --- */\n --asgardeo-color-action-hover: rgba(0, 0, 0, 0.04);\n --asgardeo-color-action-selected: rgba(75, 110, 245, 0.08);\n --asgardeo-color-action-focus: rgba(75, 110, 245, 0.12);\n --asgardeo-color-action-disabled: rgba(0, 0, 0, 0.26);\n --asgardeo-color-action-disabledBackground: rgba(0, 0, 0, 0.08);\n\n /* --- Colors: Semantic --- */\n --asgardeo-color-error-main: #ef4444;\n --asgardeo-color-error-light: #fef2f2;\n --asgardeo-color-error-contrastText: #991b1b;\n --asgardeo-color-success-main: #22c55e;\n --asgardeo-color-success-light: #f0fdf4;\n --asgardeo-color-success-contrastText: #166534;\n --asgardeo-color-warning-main: #f59e0b;\n --asgardeo-color-warning-light: #fffbeb;\n --asgardeo-color-warning-contrastText: #92400e;\n --asgardeo-color-info-main: #3b82f6;\n --asgardeo-color-info-light: #eff6ff;\n --asgardeo-color-info-contrastText: #1e40af;\n\n /* --- Spacing --- */\n --asgardeo-spacing-unit: 8px;\n\n /* --- Border Radius --- */\n --asgardeo-border-radius-xs: 4px;\n --asgardeo-border-radius-small: 6px;\n --asgardeo-border-radius-medium: 10px;\n --asgardeo-border-radius-large: 14px;\n --asgardeo-border-radius-full: 9999px;\n\n /* --- Shadows --- */\n --asgardeo-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);\n --asgardeo-shadow-small: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);\n --asgardeo-shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);\n --asgardeo-shadow-large: 0 10px 25px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);\n\n /* --- Transitions --- */\n --asgardeo-transition-fast: 120ms ease;\n --asgardeo-transition-normal: 180ms ease;\n --asgardeo-transition-slow: 280ms ease;\n\n /* --- Focus Ring --- */\n --asgardeo-focus-ring-width: 2px;\n --asgardeo-focus-ring-offset: 2px;\n --asgardeo-focus-ring-color: rgba(75, 110, 245, 0.35);\n\n /* --- Typography: Font Family --- */\n --asgardeo-typography-fontFamily: \"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n\n /* --- Typography: Font Sizes --- */\n --asgardeo-typography-fontSize-xs: 0.6875rem; /* 11px */\n --asgardeo-typography-fontSize-sm: 0.8125rem; /* 13px */\n --asgardeo-typography-fontSize-md: 0.875rem; /* 14px */\n --asgardeo-typography-fontSize-lg: 1rem; /* 16px */\n --asgardeo-typography-fontSize-xl: 1.125rem; /* 18px */\n --asgardeo-typography-fontSize-2xl: 1.375rem; /* 22px */\n --asgardeo-typography-fontSize-3xl: 1.75rem; /* 28px */\n\n /* --- Typography: Font Weights --- */\n --asgardeo-typography-fontWeight-normal: 400;\n --asgardeo-typography-fontWeight-medium: 500;\n --asgardeo-typography-fontWeight-semibold: 600;\n --asgardeo-typography-fontWeight-bold: 700;\n\n /* --- Typography: Line Heights --- */\n --asgardeo-typography-lineHeight-tight: 1.25;\n --asgardeo-typography-lineHeight-normal: 1.5;\n --asgardeo-typography-lineHeight-relaxed: 1.625;\n\n /* --- Typography: Letter Spacing --- */\n --asgardeo-typography-letterSpacing-tight: -0.01em;\n --asgardeo-typography-letterSpacing-normal: 0;\n --asgardeo-typography-letterSpacing-wide: 0.025em;\n\n /* --- Component: Button --- */\n --asgardeo-button-borderRadius: var(--asgardeo-border-radius-small);\n --asgardeo-button-fontWeight: var(--asgardeo-typography-fontWeight-medium);\n --asgardeo-button-sm-height: 30px;\n --asgardeo-button-sm-paddingX: calc(var(--asgardeo-spacing-unit) * 1.25);\n --asgardeo-button-sm-fontSize: var(--asgardeo-typography-fontSize-sm);\n --asgardeo-button-md-height: 36px;\n --asgardeo-button-md-paddingX: calc(var(--asgardeo-spacing-unit) * 2);\n --asgardeo-button-md-fontSize: var(--asgardeo-typography-fontSize-md);\n --asgardeo-button-lg-height: 42px;\n --asgardeo-button-lg-paddingX: calc(var(--asgardeo-spacing-unit) * 2.5);\n --asgardeo-button-lg-fontSize: var(--asgardeo-typography-fontSize-lg);\n\n /* --- Component: Input fields --- */\n --asgardeo-input-borderRadius: var(--asgardeo-border-radius-small);\n --asgardeo-input-height: 36px;\n --asgardeo-input-paddingX: calc(var(--asgardeo-spacing-unit) * 1.25);\n --asgardeo-input-fontSize: var(--asgardeo-typography-fontSize-md);\n --asgardeo-input-borderColor: var(--asgardeo-color-border);\n --asgardeo-input-focusBorderColor: var(--asgardeo-color-primary-main);\n --asgardeo-input-focusRing: 0 0 0 3px var(--asgardeo-focus-ring-color);\n\n /* --- Component: Card --- */\n --asgardeo-card-borderRadius: var(--asgardeo-border-radius-medium);\n --asgardeo-card-padding: calc(var(--asgardeo-spacing-unit) * 2.5);\n --asgardeo-card-shadow: var(--asgardeo-shadow-small);\n --asgardeo-card-borderColor: var(--asgardeo-color-border);\n\n /* --- Component: Alert --- */\n --asgardeo-alert-borderRadius: var(--asgardeo-border-radius-small);\n --asgardeo-alert-paddingX: calc(var(--asgardeo-spacing-unit) * 1.5);\n --asgardeo-alert-paddingY: calc(var(--asgardeo-spacing-unit) * 1.25);\n\n /* --- Component: Checkbox --- */\n --asgardeo-checkbox-size: 16px;\n\n /* --- Component: Avatar --- */\n --asgardeo-avatar-size: 64px;\n --asgardeo-avatar-fontSize: 1.375rem;\n\n /* --- Component: Dropdown --- */\n --asgardeo-dropdown-borderRadius: var(--asgardeo-border-radius-medium);\n --asgardeo-dropdown-shadow: var(--asgardeo-shadow-medium);\n --asgardeo-dropdown-itemPaddingX: calc(var(--asgardeo-spacing-unit) * 1.5);\n --asgardeo-dropdown-itemPaddingY: calc(var(--asgardeo-spacing-unit) * 1);\n\n /* --- Component overrides (set by ThemeProvider when configured) --- */\n --asgardeo-component-button-root-borderRadius: var(--asgardeo-button-borderRadius);\n --asgardeo-component-field-root-borderRadius: var(--asgardeo-input-borderRadius);\n}\n`;\n\nexport default DEFAULTS_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the CreateOrganization presentation component.\n *\n * BEM block: `.asgardeo-create-organization`\n *\n * The root element is a Card, whose padding is intentionally kept\n * as this is a full form panel.\n *\n * Elements:\n * __title \u2013 form heading (Typography h6)\n * __description \u2013 optional sub-heading (Typography body2)\n * __error \u2013 error Alert\n * __input \u2013 the org-name TextField\n * __submit \u2013 the submit Button\n */\nconst CREATE_ORGANIZATION_CSS: string = `\n/* ============================================================\n CreateOrganization\n ============================================================ */\n\n.asgardeo-create-organization {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 1.75);\n max-width: 440px;\n width: 100%;\n}\n\n/* Title & description --------------------------------------- */\n\n.asgardeo-create-organization__description {\n margin-top: calc(var(--asgardeo-spacing-unit) * -0.75);\n color: var(--asgardeo-color-text-secondary);\n}\n\n/* Input ----------------------------------------------------- */\n\n.asgardeo-create-organization__input {\n width: 100%;\n}\n\n/* Submit ---------------------------------------------------- */\n\n.asgardeo-create-organization__submit {\n align-self: flex-start;\n}\n`;\n\nexport default CREATE_ORGANIZATION_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the LanguageSwitcher presentation component.\n *\n * BEM block: `.asgardeo-language-switcher`\n *\n * The root element is a Card (`.asgardeo-card`). We override its default\n * padding to 0 so the trigger button fills the surface edge-to-edge,\n * and apply `position: relative` to anchor the absolute dropdown.\n * The Card's border-radius and shadow are intentionally kept.\n *\n * Elements:\n * __trigger \u2013 compact trigger button (globe icon + language label + chevron)\n * __trigger-label \u2013 the current language name Typography inside the trigger\n * __dropdown \u2013 absolute-positioned dropdown listbox\n * __item \u2013 each selectable language row\n * __item--active \u2013 the currently selected language\n */\nconst LANGUAGE_SWITCHER_CSS: string = `\n/* ============================================================\n LanguageSwitcher\n ============================================================ */\n\n/* Override Card's default padding so the trigger fills the surface */\n.asgardeo-language-switcher.asgardeo-card {\n padding: 0;\n position: relative;\n display: inline-block;\n}\n\n/* Trigger ---------------------------------------------------- */\n\n.asgardeo-language-switcher__trigger {\n display: inline-flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n color: var(--asgardeo-color-text-primary);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n transition: background-color var(--asgardeo-transition-fast);\n white-space: nowrap;\n box-sizing: border-box;\n}\n\n.asgardeo-language-switcher__trigger:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-language-switcher__trigger:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n}\n\n.asgardeo-language-switcher__trigger-label {\n flex: 0 0 auto;\n}\n\n/* Dropdown --------------------------------------------------- */\n\n.asgardeo-language-switcher__dropdown {\n position: absolute;\n top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.5));\n right: 0;\n z-index: 1000;\n background-color: var(--asgardeo-color-background-surface);\n border: 1px solid var(--asgardeo-color-border);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n box-shadow: var(--asgardeo-dropdown-shadow);\n overflow: hidden;\n min-width: 130px;\n display: flex;\n flex-direction: column;\n padding: calc(var(--asgardeo-spacing-unit) * 0.5) 0;\n}\n\n/* Items ----------------------------------------------------- */\n\n.asgardeo-language-switcher__item {\n display: flex;\n align-items: center;\n width: 100%;\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n color: var(--asgardeo-color-text-primary);\n transition: background-color var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-language-switcher__item:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-language-switcher__item--active {\n background-color: var(--asgardeo-color-action-selected);\n color: var(--asgardeo-color-primary-main);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n\n.asgardeo-language-switcher__item--active:hover {\n background-color: var(--asgardeo-color-action-focus);\n}\n`;\n\nexport default LANGUAGE_SWITCHER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the OrganizationList presentation component.\n *\n * BEM block: `.asgardeo-organization-list`\n *\n * The root element is a plain `div`. There is no Card wrapper here,\n * so this file provides the full layout including border and spacing.\n *\n * Elements:\n * __loading \u2013 loading state container (centred Spinner)\n * __empty \u2013 empty state message (Typography body2)\n * __item \u2013 each selectable organization row button\n */\nconst ORGANIZATION_LIST_CSS: string = `\n/* ============================================================\n OrganizationList\n ============================================================ */\n\n.asgardeo-organization-list {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n/* Loading / Empty ------------------------------------------- */\n\n.asgardeo-organization-list__loading,\n.asgardeo-organization-list__empty {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 3);\n color: var(--asgardeo-color-text-secondary);\n}\n\n/* Items ----------------------------------------------------- */\n\n.asgardeo-organization-list__item {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 1.25);\n width: 100%;\n padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 1.5);\n background: var(--asgardeo-color-background-surface);\n border: 1px solid var(--asgardeo-color-border);\n border-radius: var(--asgardeo-border-radius-small);\n cursor: pointer;\n text-align: left;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n color: var(--asgardeo-color-text-primary);\n transition:\n background-color var(--asgardeo-transition-fast),\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-organization-list__item:hover {\n background-color: var(--asgardeo-color-primary-light);\n border-color: var(--asgardeo-color-primary-main);\n}\n\n.asgardeo-organization-list__item:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n`;\n\nexport default ORGANIZATION_LIST_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the OrganizationProfile presentation component.\n *\n * BEM block: `.asgardeo-organization-profile`\n */\nconst ORGANIZATION_PROFILE_CSS: string = `\n/* ============================================================\n OrganizationProfile\n ============================================================ */\n\n.asgardeo-organization-profile {\n display: flex;\n flex-direction: column;\n min-width: 320px;\n padding: 0;\n overflow: hidden;\n}\n\n/* Header: title + divider ------------------------------------ */\n\n.asgardeo-organization-profile__header {\n padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2.5);\n padding-bottom: calc(var(--asgardeo-spacing-unit) * 1.5);\n}\n\n.asgardeo-organization-profile__title {\n margin: 0;\n}\n\n.asgardeo-organization-profile__header-divider {\n margin: 0;\n}\n\n/* Identity: avatar + org name + handle ----------------------- */\n\n.asgardeo-organization-profile__identity {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: calc(var(--asgardeo-spacing-unit) * 2) 0 calc(var(--asgardeo-spacing-unit) * 1.5);\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n}\n\n.asgardeo-organization-profile__avatar {\n width: var(--asgardeo-avatar-size);\n height: var(--asgardeo-avatar-size);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-bottom: calc(var(--asgardeo-spacing-unit) * 0.375);\n}\n\n.asgardeo-organization-profile__avatar-initials {\n color: #ffffff;\n font-size: var(--asgardeo-avatar-fontSize);\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.02em;\n pointer-events: none;\n user-select: none;\n}\n\n.asgardeo-organization-profile__org-name {\n margin: 0;\n text-align: center;\n}\n\n.asgardeo-organization-profile__org-handle {\n color: var(--asgardeo-color-text-secondary);\n text-align: center;\n}\n\n.asgardeo-organization-profile__identity-divider {\n margin: 0;\n}\n\n/* Fields ---------------------------------------------------- */\n\n.asgardeo-organization-profile__fields {\n display: flex;\n flex-direction: column;\n}\n\n.asgardeo-organization-profile__field {\n display: grid;\n grid-template-columns: 36% 64%;\n align-items: center;\n padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 2.5);\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n box-sizing: border-box;\n transition: background-color var(--asgardeo-transition-fast);\n}\n\n.asgardeo-organization-profile__field:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-organization-profile__field + .asgardeo-organization-profile__field {\n border-top: 1px solid var(--asgardeo-color-border);\n}\n\n.asgardeo-organization-profile__field-label-col {\n /* label column */\n}\n\n.asgardeo-organization-profile__field-label {\n color: var(--asgardeo-color-text-secondary);\n font-size: var(--asgardeo-typography-fontSize-sm);\n}\n\n.asgardeo-organization-profile__field-value-col {\n /* value column */\n}\n\n.asgardeo-organization-profile__field-display {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n min-height: 1.5rem;\n}\n\n.asgardeo-organization-profile__field-value {\n color: var(--asgardeo-color-text-primary);\n word-break: break-word;\n flex: 1;\n font-size: var(--asgardeo-typography-fontSize-sm);\n}\n\n.asgardeo-organization-profile__field-value--id {\n font-size: calc(var(--asgardeo-typography-fontSize-sm) * 0.9);\n color: var(--asgardeo-color-text-secondary);\n font-family: monospace;\n word-break: break-all;\n}\n\n.asgardeo-organization-profile__field-placeholder {\n color: var(--asgardeo-color-primary-main);\n font-style: italic;\n font-size: var(--asgardeo-typography-fontSize-sm);\n flex: 1;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-style: dotted;\n text-underline-offset: 2px;\n}\n\n/* Edit button (pencil icon) --------------------------------- */\n\n.asgardeo-organization-profile__field-edit-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--asgardeo-color-text-secondary);\n flex-shrink: 0;\n padding: calc(var(--asgardeo-spacing-unit) * 0.375);\n border-radius: var(--asgardeo-border-radius-small);\n transition:\n color var(--asgardeo-transition-fast),\n background-color var(--asgardeo-transition-fast),\n opacity var(--asgardeo-transition-fast);\n opacity: 0;\n line-height: 0;\n}\n\n.asgardeo-organization-profile__field:hover .asgardeo-organization-profile__field-edit-btn {\n opacity: 1;\n}\n\n.asgardeo-organization-profile__field-edit-btn:hover {\n color: var(--asgardeo-color-primary-main);\n background-color: var(--asgardeo-color-primary-light);\n}\n\n.asgardeo-organization-profile__field-edit-btn:focus-visible {\n opacity: 1;\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n\n/* Edit mode ------------------------------------------------- */\n\n.asgardeo-organization-profile__field-edit {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n\n.asgardeo-organization-profile__field-edit-actions {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n`;\n\nexport default ORGANIZATION_PROFILE_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the OrganizationSwitcher presentation component.\n *\n * BEM block: `.asgardeo-organization-switcher`\n *\n * The root element is a Card (`.asgardeo-card`), so we override its\n * default padding to let the trigger button fill the surface edge-to-edge,\n * and apply `position: relative` to anchor the absolute dropdown.\n *\n * Modifiers: (none \u2014 state is controlled via isOpen in component logic)\n *\n * Elements:\n * __trigger \u2013 the clickable trigger button showing current org\n * __trigger-label \u2013 the org name Typography inside the trigger\n * __dropdown \u2013 the absolute-positioned dropdown listbox\n * __loading \u2013 loading state container (Spinner)\n * __empty \u2013 empty state message (Typography)\n * __item \u2013 each selectable organization row\n * __item--active \u2013 currently selected organization\n */\nconst ORGANIZATION_SWITCHER_CSS: string = `\n/* ============================================================\n OrganizationSwitcher\n ============================================================ */\n\n/* Override Card's default padding so the trigger button fills the surface */\n.asgardeo-organization-switcher.asgardeo-card {\n padding: 0;\n position: relative;\n display: inline-block;\n min-width: 180px;\n}\n\n/* Trigger ---------------------------------------------------- */\n\n.asgardeo-organization-switcher__trigger {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n width: 100%;\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n border-radius: var(--asgardeo-dropdown-borderRadius);\n color: var(--asgardeo-color-text-primary);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n transition: background-color var(--asgardeo-transition-fast);\n text-align: left;\n box-sizing: border-box;\n}\n\n.asgardeo-organization-switcher__trigger:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-organization-switcher__trigger:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n}\n\n.asgardeo-organization-switcher__trigger-label {\n flex: 1;\n text-align: left;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n/* Dropdown --------------------------------------------------- */\n\n.asgardeo-organization-switcher__dropdown {\n position: absolute;\n top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.5));\n left: 0;\n right: 0;\n z-index: 1000;\n background-color: var(--asgardeo-color-background-surface);\n border: 1px solid var(--asgardeo-color-border);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n box-shadow: var(--asgardeo-dropdown-shadow);\n overflow: hidden;\n min-width: 160px;\n display: flex;\n flex-direction: column;\n padding: calc(var(--asgardeo-spacing-unit) * 0.5) 0;\n}\n\n/* Loading / Empty states ------------------------------------ */\n\n.asgardeo-organization-switcher__loading,\n.asgardeo-organization-switcher__empty {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 2);\n color: var(--asgardeo-color-text-secondary);\n}\n\n/* Items ----------------------------------------------------- */\n\n.asgardeo-organization-switcher__item {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n width: 100%;\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n color: var(--asgardeo-color-text-primary);\n transition: background-color var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-organization-switcher__item:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-organization-switcher__item--active {\n background-color: var(--asgardeo-color-action-selected);\n color: var(--asgardeo-color-primary-main);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n\n.asgardeo-organization-switcher__item--active:hover {\n background-color: var(--asgardeo-color-action-focus);\n}\n`;\n\nexport default ORGANIZATION_SWITCHER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the UserDropdown presentation component.\n *\n * BEM block: `.asgardeo-user-dropdown`\n *\n * The root element is a plain `div` (no Card wrapper), so this file\n * is responsible for all layout. The dropdown is absolute-positioned\n * relative to the root using `position: relative`.\n *\n * Elements:\n * __trigger \u2013 pill-shaped trigger button (avatar + name + chevron)\n * __avatar \u2013 circular icon container inside the trigger\n * __name \u2013 display-name Typography inside the trigger\n * __menu \u2013 absolute-positioned dropdown panel\n * __item \u2013 each action row inside the menu\n */\nconst USER_DROPDOWN_CSS: string = `\n/* ============================================================\n UserDropdown\n ============================================================ */\n\n.asgardeo-user-dropdown {\n position: relative;\n display: inline-block;\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n/* Trigger ---------------------------------------------------- */\n\n.asgardeo-user-dropdown__trigger {\n display: inline-flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n padding: calc(var(--asgardeo-spacing-unit) * 0.5) calc(var(--asgardeo-spacing-unit) * 1)\n calc(var(--asgardeo-spacing-unit) * 0.5) calc(var(--asgardeo-spacing-unit) * 0.5);\n background: none;\n border: 1px solid var(--asgardeo-color-border);\n border-radius: 9999px;\n cursor: pointer;\n color: var(--asgardeo-color-text-primary);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n transition:\n background-color var(--asgardeo-transition-fast),\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-user-dropdown__trigger:hover {\n background-color: var(--asgardeo-color-action-hover);\n border-color: var(--asgardeo-color-primary-main);\n}\n\n.asgardeo-user-dropdown__trigger:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n\n/* Avatar ---------------------------------------------------- */\n\n.asgardeo-user-dropdown__avatar {\n display: flex;\n align-items: center;\n justify-content: center;\n width: calc(var(--asgardeo-spacing-unit) * 3);\n height: calc(var(--asgardeo-spacing-unit) * 3);\n border-radius: 50%;\n background-color: var(--asgardeo-color-primary-main);\n color: var(--asgardeo-color-primary-contrastText);\n flex-shrink: 0;\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n\n/* Name ------------------------------------------------------ */\n\n.asgardeo-user-dropdown__name {\n max-width: 140px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n/* Dropdown menu --------------------------------------------- */\n\n.asgardeo-user-dropdown__menu {\n position: absolute;\n top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.5));\n right: 0;\n z-index: 1000;\n background-color: var(--asgardeo-color-background-surface);\n border: 1px solid var(--asgardeo-color-border);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n box-shadow: var(--asgardeo-dropdown-shadow);\n overflow: hidden;\n min-width: 160px;\n display: flex;\n flex-direction: column;\n padding: calc(var(--asgardeo-spacing-unit) * 0.5) 0;\n}\n\n/* Menu items ------------------------------------------------ */\n\n.asgardeo-user-dropdown__item {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n width: 100%;\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-sm);\n color: var(--asgardeo-color-text-primary);\n transition: background-color var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-user-dropdown__item:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-user-dropdown__item:focus-visible {\n outline: none;\n background-color: var(--asgardeo-color-action-focus);\n}\n\n/* Modal overlay ------------------------------------------------ */\n\n.asgardeo-user-dropdown__modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n backdrop-filter: blur(2px);\n}\n\n/* Modal content ------------------------------------------------ */\n\n.asgardeo-user-dropdown__modal-content {\n background: var(--asgardeo-color-background-surface);\n border-radius: var(--asgardeo-border-radius-medium);\n box-shadow: var(--asgardeo-shadow-large);\n max-width: 460px;\n width: 90%;\n max-height: 90vh;\n overflow-y: auto;\n position: relative;\n}\n\n/* Modal close button ------------------------------------------ */\n\n.asgardeo-user-dropdown__modal-close {\n position: absolute;\n top: calc(var(--asgardeo-spacing-unit) * 1.25);\n right: calc(var(--asgardeo-spacing-unit) * 1.25);\n background: none;\n border: none;\n cursor: pointer;\n color: var(--asgardeo-color-text-secondary);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 0.5);\n border-radius: var(--asgardeo-border-radius-small);\n z-index: 10001;\n transition:\n color var(--asgardeo-transition-fast),\n background-color var(--asgardeo-transition-fast);\n line-height: 0;\n}\n\n.asgardeo-user-dropdown__modal-close:hover {\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-user-dropdown__modal-close:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n`;\n\nexport default USER_DROPDOWN_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the UserProfile presentation component.\n *\n * BEM block: `.asgardeo-user-profile`\n */\nconst USER_PROFILE_CSS: string = `\n/* ============================================================\n UserProfile\n ============================================================ */\n\n.asgardeo-user-profile {\n display: flex;\n flex-direction: column;\n min-width: 320px;\n padding: 0;\n overflow: hidden;\n}\n\n/* Header ---------------------------------------------------- */\n\n.asgardeo-user-profile__header {\n padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2.5);\n padding-bottom: calc(var(--asgardeo-spacing-unit) * 1.5);\n}\n\n.asgardeo-user-profile__title {\n margin: 0;\n}\n\n.asgardeo-user-profile__header-divider {\n margin: 0;\n}\n\n/* Avatar ---------------------------------------------------- */\n\n.asgardeo-user-profile__avatar-section {\n display: flex;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 2) 0 calc(var(--asgardeo-spacing-unit) * 1.25);\n}\n\n.asgardeo-user-profile__avatar {\n width: var(--asgardeo-avatar-size);\n height: var(--asgardeo-avatar-size);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.asgardeo-user-profile__avatar-initials {\n color: #ffffff;\n font-size: var(--asgardeo-avatar-fontSize);\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.02em;\n pointer-events: none;\n user-select: none;\n}\n\n/* Alerts & loading ------------------------------------------ */\n\n.asgardeo-user-profile__error {\n margin: 0 calc(var(--asgardeo-spacing-unit) * 2.5) calc(var(--asgardeo-spacing-unit) * 1.25);\n}\n\n.asgardeo-user-profile__loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 3) 0;\n}\n\n/* Fields ---------------------------------------------------- */\n\n.asgardeo-user-profile__fields {\n display: flex;\n flex-direction: column;\n}\n\n.asgardeo-user-profile__field {\n display: grid;\n grid-template-columns: 36% 64%;\n align-items: center;\n padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 2.5);\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n box-sizing: border-box;\n transition: background-color var(--asgardeo-transition-fast);\n}\n\n.asgardeo-user-profile__field:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-user-profile__field + .asgardeo-user-profile__field {\n border-top: 1px solid var(--asgardeo-color-border);\n}\n\n.asgardeo-user-profile__field-label-col {\n /* label column */\n}\n\n.asgardeo-user-profile__field-label {\n color: var(--asgardeo-color-text-secondary);\n font-size: var(--asgardeo-typography-fontSize-sm);\n}\n\n.asgardeo-user-profile__field-value-col {\n /* value column */\n}\n\n.asgardeo-user-profile__field-display {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n min-height: 1.5rem;\n}\n\n.asgardeo-user-profile__field-value {\n color: var(--asgardeo-color-text-primary);\n word-break: break-word;\n flex: 1;\n font-size: var(--asgardeo-typography-fontSize-sm);\n}\n\n.asgardeo-user-profile__field-placeholder {\n color: var(--asgardeo-color-primary-main);\n font-style: italic;\n font-size: var(--asgardeo-typography-fontSize-sm);\n flex: 1;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-style: dotted;\n text-underline-offset: 2px;\n}\n\n/* Edit button (pencil icon) --------------------------------- */\n\n.asgardeo-user-profile__field-edit-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--asgardeo-color-text-secondary);\n flex-shrink: 0;\n padding: calc(var(--asgardeo-spacing-unit) * 0.375);\n border-radius: var(--asgardeo-border-radius-small);\n transition:\n color var(--asgardeo-transition-fast),\n background-color var(--asgardeo-transition-fast),\n opacity var(--asgardeo-transition-fast);\n opacity: 0;\n line-height: 0;\n}\n\n.asgardeo-user-profile__field:hover .asgardeo-user-profile__field-edit-btn {\n opacity: 1;\n}\n\n.asgardeo-user-profile__field-edit-btn:hover {\n color: var(--asgardeo-color-primary-main);\n background-color: var(--asgardeo-color-primary-light);\n}\n\n.asgardeo-user-profile__field-edit-btn:focus-visible {\n opacity: 1;\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n\n/* Edit mode ------------------------------------------------- */\n\n.asgardeo-user-profile__field-edit {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n\n.asgardeo-user-profile__field-edit-actions {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n\n/* Footer slot ----------------------------------------------- */\n\n.asgardeo-user-profile__footer {\n padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5);\n border-top: 1px solid var(--asgardeo-color-border);\n}\n`;\n\nexport default USER_PROFILE_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Alert primitive component.\n *\n * BEM block: `.asgardeo-alert`\n *\n * Modifiers:\n * Severity: --info | --success | --warning | --error\n *\n * Elements:\n * __content | __dismiss\n */\nconst ALERT_CSS: string = `\n/* ============================================================\n Alert\n ============================================================ */\n\n.asgardeo-alert {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: calc(var(--asgardeo-spacing-unit) * 1);\n padding: var(--asgardeo-alert-paddingY) var(--asgardeo-alert-paddingX);\n border-radius: var(--asgardeo-alert-borderRadius);\n border: 1px solid transparent;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-sm);\n box-sizing: border-box;\n width: 100%;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-alert__content {\n flex: 1;\n}\n\n.asgardeo-alert--info {\n background-color: var(--asgardeo-color-info-light);\n border-color: var(--asgardeo-color-info-main);\n color: var(--asgardeo-color-info-contrastText);\n}\n\n.asgardeo-alert--success {\n background-color: var(--asgardeo-color-success-light);\n border-color: var(--asgardeo-color-success-main);\n color: var(--asgardeo-color-success-contrastText);\n}\n\n.asgardeo-alert--warning {\n background-color: var(--asgardeo-color-warning-light);\n border-color: var(--asgardeo-color-warning-main);\n color: var(--asgardeo-color-warning-contrastText);\n}\n\n.asgardeo-alert--error {\n background-color: var(--asgardeo-color-error-light);\n border-color: var(--asgardeo-color-error-main);\n color: var(--asgardeo-color-error-contrastText);\n}\n\n.asgardeo-alert__dismiss {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 1em;\n line-height: 0;\n padding: calc(var(--asgardeo-spacing-unit) * 0.25);\n border-radius: var(--asgardeo-border-radius-xs);\n color: inherit;\n opacity: 0.6;\n flex-shrink: 0;\n transition: opacity var(--asgardeo-transition-fast), background-color var(--asgardeo-transition-fast);\n}\n.asgardeo-alert__dismiss:hover {\n opacity: 1;\n background-color: var(--asgardeo-color-action-hover);\n}\n`;\n\nexport default ALERT_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Button primitive component.\n *\n * BEM block: `.asgardeo-button`\n *\n * Modifiers:\n * Variant: --solid | --outline | --ghost | --text\n * Color: --primary | --secondary | --danger\n * Size: --small | --medium | --large\n * State: --full-width | --loading\n *\n * Elements:\n * __start-icon | __end-icon | __content | __spinner\n *\n * Note: The `asgardeo-spin` keyframe animation is defined in\n * `styles/animations.css.ts` and shared with the Spinner component.\n */\nconst BUTTON_CSS: string = `\n/* ============================================================\n Button\n ============================================================ */\n\n.asgardeo-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n border-radius: var(--asgardeo-button-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-weight: var(--asgardeo-button-fontWeight);\n letter-spacing: var(--asgardeo-typography-letterSpacing-normal);\n cursor: pointer;\n outline: none;\n text-decoration: none;\n white-space: nowrap;\n border-width: 1px;\n border-style: solid;\n box-sizing: border-box;\n transition:\n background-color var(--asgardeo-transition-fast),\n color var(--asgardeo-transition-fast),\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast),\n opacity var(--asgardeo-transition-fast),\n transform var(--asgardeo-transition-fast);\n position: relative;\n vertical-align: middle;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n user-select: none;\n}\n\n.asgardeo-button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n\n/* -- Sizes -- */\n\n.asgardeo-button--small {\n padding: 0 var(--asgardeo-button-sm-paddingX);\n font-size: var(--asgardeo-button-sm-fontSize);\n height: var(--asgardeo-button-sm-height);\n}\n\n.asgardeo-button--medium {\n padding: 0 var(--asgardeo-button-md-paddingX);\n font-size: var(--asgardeo-button-md-fontSize);\n height: var(--asgardeo-button-md-height);\n}\n\n.asgardeo-button--large {\n padding: 0 var(--asgardeo-button-lg-paddingX);\n font-size: var(--asgardeo-button-lg-fontSize);\n height: var(--asgardeo-button-lg-height);\n}\n\n/* -- Modifiers -- */\n\n.asgardeo-button--full-width {\n width: 100%;\n}\n\n.asgardeo-button--loading,\n.asgardeo-button:disabled {\n cursor: not-allowed;\n opacity: 0.55;\n pointer-events: none;\n}\n\n/* -- Solid variants -- */\n\n.asgardeo-button--solid.asgardeo-button--primary {\n background-color: var(--asgardeo-color-primary-main);\n color: var(--asgardeo-color-primary-contrastText);\n border-color: var(--asgardeo-color-primary-main);\n}\n.asgardeo-button--solid.asgardeo-button--primary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-primary-dark);\n border-color: var(--asgardeo-color-primary-dark);\n}\n.asgardeo-button--solid.asgardeo-button--primary:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n.asgardeo-button--solid.asgardeo-button--secondary {\n background-color: var(--asgardeo-color-secondary-light);\n color: var(--asgardeo-color-secondary-main);\n border-color: var(--asgardeo-color-border);\n}\n.asgardeo-button--solid.asgardeo-button--secondary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-border);\n border-color: var(--asgardeo-color-border);\n}\n.asgardeo-button--solid.asgardeo-button--secondary:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n.asgardeo-button--solid.asgardeo-button--danger {\n background-color: var(--asgardeo-color-error-main);\n color: #ffffff;\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-button--solid.asgardeo-button--danger:hover:not(:disabled) {\n filter: brightness(0.92);\n}\n.asgardeo-button--solid.asgardeo-button--danger:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n/* -- Outline variants -- */\n\n.asgardeo-button--outline.asgardeo-button--primary {\n background-color: transparent;\n color: var(--asgardeo-color-primary-main);\n border-color: var(--asgardeo-color-primary-main);\n}\n.asgardeo-button--outline.asgardeo-button--primary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-primary-light);\n}\n.asgardeo-button--outline.asgardeo-button--primary:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n.asgardeo-button--outline.asgardeo-button--secondary {\n background-color: transparent;\n color: var(--asgardeo-color-secondary-main);\n border-color: var(--asgardeo-color-border);\n}\n.asgardeo-button--outline.asgardeo-button--secondary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-secondary-light);\n border-color: var(--asgardeo-color-secondary-main);\n}\n.asgardeo-button--outline.asgardeo-button--secondary:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n.asgardeo-button--outline.asgardeo-button--danger {\n background-color: transparent;\n color: var(--asgardeo-color-error-main);\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-button--outline.asgardeo-button--danger:hover:not(:disabled) {\n background-color: var(--asgardeo-color-error-light);\n}\n.asgardeo-button--outline.asgardeo-button--danger:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n/* -- Ghost variants -- */\n\n.asgardeo-button--ghost.asgardeo-button--primary {\n background-color: transparent;\n color: var(--asgardeo-color-primary-main);\n border-color: transparent;\n}\n.asgardeo-button--ghost.asgardeo-button--primary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-primary-light);\n border-color: transparent;\n}\n\n.asgardeo-button--ghost.asgardeo-button--secondary {\n background-color: transparent;\n color: var(--asgardeo-color-secondary-main);\n border-color: transparent;\n}\n.asgardeo-button--ghost.asgardeo-button--secondary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-action-hover);\n border-color: transparent;\n}\n\n.asgardeo-button--ghost.asgardeo-button--danger {\n background-color: transparent;\n color: var(--asgardeo-color-error-main);\n border-color: transparent;\n}\n.asgardeo-button--ghost.asgardeo-button--danger:hover:not(:disabled) {\n background-color: var(--asgardeo-color-error-light);\n border-color: transparent;\n}\n\n/* -- Text variants -- */\n\n.asgardeo-button--text {\n border-color: transparent;\n background-color: transparent;\n padding-left: calc(var(--asgardeo-spacing-unit) * 0.25);\n padding-right: calc(var(--asgardeo-spacing-unit) * 0.25);\n}\n\n.asgardeo-button--text.asgardeo-button--primary {\n color: var(--asgardeo-color-primary-main);\n}\n.asgardeo-button--text.asgardeo-button--primary:hover:not(:disabled) {\n color: var(--asgardeo-color-primary-dark);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n.asgardeo-button--text.asgardeo-button--secondary {\n color: var(--asgardeo-color-secondary-main);\n}\n.asgardeo-button--text.asgardeo-button--secondary:hover:not(:disabled) {\n color: var(--asgardeo-color-text-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n.asgardeo-button--text.asgardeo-button--danger {\n color: var(--asgardeo-color-error-main);\n}\n.asgardeo-button--text.asgardeo-button--danger:hover:not(:disabled) {\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n/* -- Inner elements -- */\n\n.asgardeo-button__start-icon,\n.asgardeo-button__end-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n line-height: 0;\n}\n.asgardeo-button--small .asgardeo-button__start-icon svg,\n.asgardeo-button--small .asgardeo-button__end-icon svg {\n width: 14px;\n height: 14px;\n}\n\n.asgardeo-button__content {\n display: inline-flex;\n align-items: center;\n}\n\n.asgardeo-button__spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: asgardeo-spin 0.6s linear infinite;\n margin-left: calc(var(--asgardeo-spacing-unit) * 0.5);\n}\n`;\n\nexport default BUTTON_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Card primitive component.\n *\n * BEM block: `.asgardeo-card`\n *\n * Modifiers:\n * --elevated \u2013 medium drop shadow\n * --outlined \u2013 1px border, no shadow\n * --flat \u2013 neither shadow nor border (default)\n */\nconst CARD_CSS: string = `\n/* ============================================================\n Card\n ============================================================ */\n\n.asgardeo-card {\n background-color: var(--asgardeo-color-background-surface);\n border-radius: var(--asgardeo-card-borderRadius);\n padding: var(--asgardeo-card-padding);\n box-sizing: border-box;\n transition: box-shadow var(--asgardeo-transition-normal);\n}\n\n.asgardeo-card--elevated {\n box-shadow: var(--asgardeo-card-shadow);\n}\n\n.asgardeo-card--outlined {\n border: 1px solid var(--asgardeo-card-borderColor);\n}\n\n/* .asgardeo-card--flat: no shadow or border */\n`;\n\nexport default CARD_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Checkbox primitive component.\n *\n * BEM block: `.asgardeo-checkbox`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __wrapper | __input | __label | __error\n */\nconst CHECKBOX_CSS: string = `\n/* ============================================================\n Checkbox\n ============================================================ */\n\n.asgardeo-checkbox {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n.asgardeo-checkbox__wrapper {\n display: inline-flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n cursor: pointer;\n user-select: none;\n}\n\n.asgardeo-checkbox__input {\n width: var(--asgardeo-checkbox-size);\n height: var(--asgardeo-checkbox-size);\n cursor: pointer;\n accent-color: var(--asgardeo-color-primary-main);\n flex-shrink: 0;\n border-radius: var(--asgardeo-border-radius-xs);\n}\n.asgardeo-checkbox__input:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n.asgardeo-checkbox__input:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.asgardeo-checkbox__label {\n font-size: var(--asgardeo-typography-fontSize-md);\n color: var(--asgardeo-color-text-primary);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-checkbox__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default CHECKBOX_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the DatePicker primitive component.\n *\n * BEM block: `.asgardeo-date-picker`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __label | __required | __input | __error\n */\nconst DATE_PICKER_CSS: string = `\n/* ============================================================\n DatePicker\n ============================================================ */\n\n.asgardeo-date-picker {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n width: 100%;\n box-sizing: border-box;\n}\n\n.asgardeo-date-picker__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-date-picker__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-date-picker__input {\n width: 100%;\n height: var(--asgardeo-input-height);\n padding: 0 var(--asgardeo-input-paddingX);\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-input-fontSize);\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-background-surface);\n box-sizing: border-box;\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n outline: none;\n cursor: pointer;\n}\n.asgardeo-date-picker__input:focus {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-date-picker--error .asgardeo-date-picker__input {\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-date-picker--error .asgardeo-date-picker__input:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);\n}\n.asgardeo-date-picker__input:disabled {\n background-color: var(--asgardeo-color-background-disabled);\n color: var(--asgardeo-color-action-disabled);\n cursor: not-allowed;\n}\n\n.asgardeo-date-picker__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default DATE_PICKER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Divider primitive component.\n *\n * BEM block: `.asgardeo-divider`\n *\n * Modifiers:\n * --horizontal \u2013 full-width horizontal rule\n * --vertical \u2013 inline vertical bar\n * --with-content \u2013 flex row with centred label between two lines\n *\n * Elements:\n * __line | __content\n */\nconst DIVIDER_CSS: string = `\n/* ============================================================\n Divider\n ============================================================ */\n\n.asgardeo-divider {\n box-sizing: border-box;\n}\n\n.asgardeo-divider--horizontal {\n width: 100%;\n border: none;\n border-top: 1px solid var(--asgardeo-color-border);\n margin: calc(var(--asgardeo-spacing-unit) * 1) 0;\n}\n\n.asgardeo-divider--vertical {\n display: inline-block;\n width: 1px;\n height: 100%;\n min-height: 1em;\n border: none;\n background-color: var(--asgardeo-color-border);\n margin: 0 calc(var(--asgardeo-spacing-unit) * 1);\n align-self: stretch;\n}\n\n.asgardeo-divider--with-content {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 1);\n border: none;\n margin: calc(var(--asgardeo-spacing-unit) * 1) 0;\n}\n\n.asgardeo-divider__line {\n flex: 1;\n height: 1px;\n background-color: var(--asgardeo-color-border);\n}\n\n.asgardeo-divider__content {\n flex-shrink: 0;\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-text-secondary);\n padding: 0 calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n text-transform: uppercase;\n letter-spacing: var(--asgardeo-typography-letterSpacing-wide);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n`;\n\nexport default DIVIDER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Logo primitive component.\n *\n * BEM block: `.asgardeo-logo`\n *\n * Elements:\n * __image\n */\nconst LOGO_CSS: string = `\n/* ============================================================\n Logo\n ============================================================ */\n\n.asgardeo-logo {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n transition: opacity var(--asgardeo-transition-fast);\n}\n\n.asgardeo-logo:hover {\n opacity: 0.85;\n}\n\n.asgardeo-logo__image {\n display: block;\n max-height: 100%;\n width: auto;\n height: auto;\n object-fit: contain;\n}\n`;\n\nexport default LOGO_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the OtpField primitive component.\n *\n * BEM block: `.asgardeo-otp-field`\n *\n * Elements:\n * __label | __required | __inputs | __digit | __error\n */\nconst OTP_FIELD_CSS: string = `\n/* ============================================================\n OtpField\n ============================================================ */\n\n.asgardeo-otp-field {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n.asgardeo-otp-field__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-otp-field__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-otp-field__inputs {\n display: flex;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n\n.asgardeo-otp-field__digit {\n width: var(--asgardeo-input-height);\n height: var(--asgardeo-input-height);\n text-align: center;\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-lg);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-background-surface);\n box-sizing: border-box;\n outline: none;\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n}\n.asgardeo-otp-field__digit:focus {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-otp-field__digit:disabled {\n background-color: var(--asgardeo-color-background-disabled);\n color: var(--asgardeo-color-action-disabled);\n cursor: not-allowed;\n}\n\n.asgardeo-otp-field__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default OTP_FIELD_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the PasswordField primitive component.\n *\n * BEM block: `.asgardeo-password-field`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __label | __required | __wrapper | __input | __toggle | __error\n */\nconst PASSWORD_FIELD_CSS: string = `\n/* ============================================================\n PasswordField\n ============================================================ */\n\n.asgardeo-password-field {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n width: 100%;\n box-sizing: border-box;\n}\n\n.asgardeo-password-field__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-password-field__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-password-field__wrapper {\n display: flex;\n align-items: center;\n height: var(--asgardeo-input-height);\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n background-color: var(--asgardeo-color-background-surface);\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n overflow: hidden;\n box-sizing: border-box;\n}\n.asgardeo-password-field__wrapper:focus-within {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-password-field--error .asgardeo-password-field__wrapper {\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-password-field--error .asgardeo-password-field__wrapper:focus-within {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);\n}\n\n.asgardeo-password-field__input {\n flex: 1;\n padding: 0 var(--asgardeo-input-paddingX);\n border: none;\n outline: none;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-input-fontSize);\n color: var(--asgardeo-color-text-primary);\n background: transparent;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n min-width: 0;\n}\n.asgardeo-password-field__input::placeholder {\n color: var(--asgardeo-color-text-secondary);\n}\n.asgardeo-password-field__input:disabled {\n cursor: not-allowed;\n}\n\n.asgardeo-password-field__toggle {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0 var(--asgardeo-input-paddingX);\n color: var(--asgardeo-color-text-secondary);\n font-size: var(--asgardeo-typography-fontSize-md);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n height: 100%;\n transition: color var(--asgardeo-transition-fast);\n}\n.asgardeo-password-field__toggle:hover {\n color: var(--asgardeo-color-text-primary);\n}\n\n.asgardeo-password-field__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default PASSWORD_FIELD_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Select primitive component.\n *\n * BEM block: `.asgardeo-select`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __label | __required | __input | __error | __helper\n */\nconst SELECT_CSS: string = `\n/* ============================================================\n Select\n ============================================================ */\n\n.asgardeo-select {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n width: 100%;\n box-sizing: border-box;\n}\n\n.asgardeo-select__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-select__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-select__input {\n width: 100%;\n height: var(--asgardeo-input-height);\n padding: 0 calc(var(--asgardeo-spacing-unit) * 4) 0 var(--asgardeo-input-paddingX);\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-input-fontSize);\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-background-surface);\n appearance: none;\n -webkit-appearance: none;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--asgardeo-input-paddingX) center;\n cursor: pointer;\n box-sizing: border-box;\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n outline: none;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n.asgardeo-select__input:focus {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-select__input:disabled {\n background-color: var(--asgardeo-color-background-disabled);\n color: var(--asgardeo-color-action-disabled);\n cursor: not-allowed;\n}\n\n.asgardeo-select--error .asgardeo-select__input {\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-select--error .asgardeo-select__input:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);\n}\n\n.asgardeo-select__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-select__helper {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-text-secondary);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default SELECT_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Spinner primitive component.\n *\n * BEM block: `.asgardeo-spinner`\n *\n * Modifiers:\n * Size: --small | --medium | --large\n *\n * Elements:\n * __svg | __circle\n *\n * Note: The `asgardeo-spin` and `asgardeo-spinner-dash` keyframe animations\n * are defined in `styles/animations.css.ts` and shared with the Button component.\n */\nconst SPINNER_CSS: string = `\n/* ============================================================\n Spinner\n ============================================================ */\n\n.asgardeo-spinner {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--asgardeo-color-primary-main);\n}\n\n.asgardeo-spinner--small {\n width: calc(var(--asgardeo-spacing-unit) * 2);\n height: calc(var(--asgardeo-spacing-unit) * 2);\n}\n\n.asgardeo-spinner--medium {\n width: calc(var(--asgardeo-spacing-unit) * 2.5);\n height: calc(var(--asgardeo-spacing-unit) * 2.5);\n}\n\n.asgardeo-spinner--large {\n width: calc(var(--asgardeo-spacing-unit) * 3.5);\n height: calc(var(--asgardeo-spacing-unit) * 3.5);\n}\n\n.asgardeo-spinner__svg {\n width: 100%;\n height: 100%;\n animation: asgardeo-spin 1.4s linear infinite;\n}\n\n.asgardeo-spinner__circle {\n stroke-dasharray: 80, 200;\n stroke-dashoffset: 0;\n animation: asgardeo-spinner-dash 1.4s ease-in-out infinite;\n}\n`;\n\nexport default SPINNER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the TextField primitive component.\n *\n * BEM block: `.asgardeo-text-field`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __label | __required | __input | __error | __helper\n */\nconst TEXT_FIELD_CSS: string = `\n/* ============================================================\n TextField\n ============================================================ */\n\n.asgardeo-text-field {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n width: 100%;\n box-sizing: border-box;\n}\n\n.asgardeo-text-field__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-text-field__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-text-field__input {\n width: 100%;\n height: var(--asgardeo-input-height);\n padding: 0 var(--asgardeo-input-paddingX);\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-input-fontSize);\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-background-surface);\n box-sizing: border-box;\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n outline: none;\n}\n.asgardeo-text-field__input:focus {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-text-field__input::placeholder {\n color: var(--asgardeo-color-text-secondary);\n}\n.asgardeo-text-field__input:disabled {\n background-color: var(--asgardeo-color-background-disabled);\n color: var(--asgardeo-color-action-disabled);\n cursor: not-allowed;\n}\n\n.asgardeo-text-field--error .asgardeo-text-field__input {\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-text-field--error .asgardeo-text-field__input:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);\n}\n\n.asgardeo-text-field__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-text-field__helper {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-text-secondary);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default TEXT_FIELD_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Typography primitive component.\n *\n * BEM block: `.asgardeo-typography`\n *\n * Modifiers (variant):\n * --h1 | --h2 | --h3 | --h4 | --h5 | --h6\n * --subtitle1 | --subtitle2\n * --body1 | --body2\n * --caption | --overline\n */\nconst TYPOGRAPHY_CSS: string = `\n/* ============================================================\n Typography\n ============================================================ */\n\n.asgardeo-typography {\n font-family: var(--asgardeo-typography-fontFamily);\n color: var(--asgardeo-color-text-primary);\n margin: 0;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.asgardeo-typography--h1 {\n font-size: var(--asgardeo-typography-fontSize-3xl);\n font-weight: var(--asgardeo-typography-fontWeight-bold);\n line-height: var(--asgardeo-typography-lineHeight-tight);\n letter-spacing: var(--asgardeo-typography-letterSpacing-tight);\n}\n\n.asgardeo-typography--h2 {\n font-size: var(--asgardeo-typography-fontSize-2xl);\n font-weight: var(--asgardeo-typography-fontWeight-bold);\n line-height: var(--asgardeo-typography-lineHeight-tight);\n letter-spacing: var(--asgardeo-typography-letterSpacing-tight);\n}\n\n.asgardeo-typography--h3 {\n font-size: var(--asgardeo-typography-fontSize-xl);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n line-height: var(--asgardeo-typography-lineHeight-tight);\n}\n\n.asgardeo-typography--h4 {\n font-size: var(--asgardeo-typography-fontSize-lg);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n}\n\n.asgardeo-typography--h5 {\n font-size: var(--asgardeo-typography-fontSize-md);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n}\n\n.asgardeo-typography--h6 {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n text-transform: uppercase;\n letter-spacing: var(--asgardeo-typography-letterSpacing-wide);\n}\n\n.asgardeo-typography--subtitle1 {\n font-size: var(--asgardeo-typography-fontSize-lg);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n\n.asgardeo-typography--subtitle2 {\n font-size: var(--asgardeo-typography-fontSize-md);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-secondary);\n}\n\n.asgardeo-typography--body1 {\n font-size: var(--asgardeo-typography-fontSize-md);\n font-weight: var(--asgardeo-typography-fontWeight-normal);\n line-height: var(--asgardeo-typography-lineHeight-relaxed);\n}\n\n.asgardeo-typography--body2 {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-normal);\n line-height: var(--asgardeo-typography-lineHeight-relaxed);\n color: var(--asgardeo-color-text-secondary);\n}\n\n.asgardeo-typography--caption {\n font-size: var(--asgardeo-typography-fontSize-xs);\n font-weight: var(--asgardeo-typography-fontWeight-normal);\n color: var(--asgardeo-color-text-secondary);\n}\n\n.asgardeo-typography--overline {\n font-size: var(--asgardeo-typography-fontSize-xs);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--asgardeo-color-text-secondary);\n}\n`;\n\nexport default TYPOGRAPHY_CSS;\n", "\uFEFF/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Style injection orchestrator for the Asgardeo Vue SDK.\n *\n * Each component owns its CSS in a co-located `*.css.ts` file.\n * This module assembles those CSS strings in a deterministic order and\n * injects them as a single `<style>` tag into `document.head` once per page \u2014\n * subsequent calls are no-ops (idempotent).\n *\n * Architecture:\n * - `styles/defaults.css.ts` \u2014 `:root` CSS variable fallback values\n * - `styles/animations.css.ts` \u2014 shared `@keyframes` used by multiple components\n * - `components/primitives/{Component}/{Component}.css.ts` \u2014 per-component BEM rules (primitives)\n * - `components/presentation/{component}/{Component}.css.ts` \u2014 composition/layout rules (presentation)\n *\n * ThemeProvider overrides CSS variables at runtime via inline styles on\n * `document.documentElement`, which wins over the `:root` stylesheet rule.\n */\n\nimport ANIMATIONS_CSS from './animations.css';\nimport DEFAULTS_CSS from './defaults.css';\n\n// Primitives\nimport CREATE_ORGANIZATION_CSS from '../components/presentation/create-organization/CreateOrganization.css';\nimport LANGUAGE_SWITCHER_CSS from '../components/presentation/language-switcher/LanguageSwitcher.css';\nimport ORGANIZATION_LIST_CSS from '../components/presentation/organization-list/OrganizationList.css';\nimport ORGANIZATION_PROFILE_CSS from '../components/presentation/organization-profile/OrganizationProfile.css';\nimport ORGANIZATION_SWITCHER_CSS from '../components/presentation/organization-switcher/OrganizationSwitcher.css';\nimport USER_DROPDOWN_CSS from '../components/presentation/user-dropdown/UserDropdown.css';\nimport USER_PROFILE_CSS from '../components/presentation/user-profile/UserProfile.css';\nimport ALERT_CSS from '../components/primitives/Alert/Alert.css';\nimport BUTTON_CSS from '../components/primitives/Button/Button.css';\nimport CARD_CSS from '../components/primitives/Card/Card.css';\nimport CHECKBOX_CSS from '../components/primitives/Checkbox/Checkbox.css';\nimport DATE_PICKER_CSS from '../components/primitives/DatePicker/DatePicker.css';\nimport DIVIDER_CSS from '../components/primitives/Divider/Divider.css';\nimport LOGO_CSS from '../components/primitives/Logo/Logo.css';\nimport OTP_FIELD_CSS from '../components/primitives/OtpField/OtpField.css';\nimport PASSWORD_FIELD_CSS from '../components/primitives/PasswordField/PasswordField.css';\nimport SELECT_CSS from '../components/primitives/Select/Select.css';\nimport SPINNER_CSS from '../components/primitives/Spinner/Spinner.css';\nimport TEXT_FIELD_CSS from '../components/primitives/TextField/TextField.css';\nimport TYPOGRAPHY_CSS from '../components/primitives/Typography/Typography.css';\n\n// Presentation\n\nconst STYLE_ID: string = 'asgardeo-vue-styles';\n\n/**\n * Assembled CSS for all Asgardeo Vue components.\n * Order is intentional:\n * 1. CSS variable defaults + keyframes\n * 2. Primitives (lowest level, no dependencies on higher layers)\n * 3. Presentation (composed from primitives; may override primitive classes in context)\n */\nconst STYLES: string = [\n // Foundations\n DEFAULTS_CSS,\n ANIMATIONS_CSS,\n // Primitives\n BUTTON_CSS,\n CARD_CSS,\n TYPOGRAPHY_CSS,\n ALERT_CSS,\n TEXT_FIELD_CSS,\n PASSWORD_FIELD_CSS,\n SELECT_CSS,\n CHECKBOX_CSS,\n DATE_PICKER_CSS,\n OTP_FIELD_CSS,\n DIVIDER_CSS,\n LOGO_CSS,\n SPINNER_CSS,\n // Presentation\n ORGANIZATION_LIST_CSS,\n ORGANIZATION_SWITCHER_CSS,\n ORGANIZATION_PROFILE_CSS,\n CREATE_ORGANIZATION_CSS,\n LANGUAGE_SWITCHER_CSS,\n USER_DROPDOWN_CSS,\n USER_PROFILE_CSS,\n].join('\\n');\n\n/**\n * Injects Asgardeo Vue component styles into the document `<head>` once.\n * Subsequent calls are no-ops (idempotent).\n */\nexport function injectStyles(): void {\n if (typeof document === 'undefined') return;\n if (document.getElementById(STYLE_ID)) return;\n\n const style: HTMLStyleElement = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = STYLES;\n document.head.appendChild(style);\n}\n\nexport default injectStyles;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport type {App, Plugin} from 'vue';\nimport AsgardeoProvider from '../providers/AsgardeoProvider';\nimport {injectStyles} from '../styles/injectStyles';\n\n/**\n * Options accepted by {@link AsgardeoPlugin}.\n *\n * @example Browser SPA (default behaviour \u2014 no options needed)\n * ```ts\n * app.use(AsgardeoPlugin);\n * ```\n *\n * @example Delegated mode (e.g. @asgardeo/nuxt)\n * ```ts\n * // The host framework is responsible for providing all injection context\n * // via app.provide(). The plugin skips browser-only initialisation so it\n * // can run safely in SSR environments.\n * app.use(AsgardeoPlugin, { mode: 'delegated' });\n * ```\n */\nexport interface AsgardeoPluginOptions {\n /**\n * `'browser'` (default) \u2014 full browser PKCE flow, registers `<AsgardeoProvider>`.\n * `'delegated'` \u2014 the host framework (e.g. `@asgardeo/nuxt`) provides all\n * injection context via `app.provide()`. The plugin skips browser-only\n * initialisation so it is safe to call during SSR.\n */\n mode?: 'browser' | 'delegated';\n}\n\n/**\n * Vue plugin for Asgardeo authentication.\n *\n * Registers the `<AsgardeoProvider>` component globally so it can be used\n * anywhere in the application without explicit imports.\n *\n * @example\n * ```ts\n * import { createApp } from 'vue';\n * import { AsgardeoPlugin } from '@asgardeo/vue';\n * import App from './App.vue';\n *\n * const app = createApp(App);\n * app.use(AsgardeoPlugin);\n * app.mount('#app');\n * ```\n *\n * Then in your root component:\n * ```vue\n * <template>\n * <AsgardeoProvider :base-url=\"baseUrl\" :client-id=\"clientId\">\n * <router-view />\n * </AsgardeoProvider>\n * </template>\n * ```\n */\nconst AsgardeoPlugin: Plugin<[AsgardeoPluginOptions?]> = {\n install(app: App, options?: AsgardeoPluginOptions): void {\n injectStyles();\n\n if (options?.mode === 'delegated') {\n // In delegated mode the host framework is responsible for providing all\n // injection context (ASGARDEO_KEY, USER_KEY, \u2026) via app.provide() and\n // for registering its own root component.\n return;\n }\n app.component('AsgardeoProvider', AsgardeoProvider);\n },\n};\n\nexport default AsgardeoPlugin;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {resolveFlowTemplateLiterals, type FlowMetadataResponse} from '@asgardeo/browser';\nimport {inject, ref, type Ref} from 'vue';\nimport {ASGARDEO_KEY, FLOW_META_KEY, I18N_KEY} from '../keys';\nimport type {AsgardeoContext, FlowMetaContextValue, I18nContextValue} from '../models/contexts';\n\n/**\n * Primary composable for Asgardeo authentication.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n * Returns all auth-related reactive state and action methods.\n *\n * @throws Error if called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useAsgardeo } from '@asgardeo/vue';\n *\n * const { isSignedIn, isLoading, user, signIn, signOut } = useAsgardeo();\n * </script>\n *\n * <template>\n * <div v-if=\"isLoading\">Loading...</div>\n * <div v-else-if=\"isSignedIn\">\n * <p>Welcome, {{ user?.name }}</p>\n * <button @click=\"signOut()\">Sign Out</button>\n * </div>\n * <div v-else>\n * <button @click=\"signIn()\">Sign In</button>\n * </div>\n * </template>\n * ```\n */\nconst useAsgardeo = (): AsgardeoContext => {\n const context: unknown = inject(ASGARDEO_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useAsgardeo() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n // FlowMetaContext lives inside AsgardeoProvider, so it is always present in\n // normal usage. Optional chaining keeps the composable safe in unit tests that\n // don't render FlowMetaProvider.\n const flowMetaContext: FlowMetaContextValue | null = inject(FLOW_META_KEY, null) as FlowMetaContextValue | null;\n\n // I18nContext provides the translation function.\n const i18nContext: I18nContextValue | null = inject(I18N_KEY, null) as I18nContextValue | null;\n\n const meta: Ref<FlowMetadataResponse | null> = flowMetaContext?.meta ?? ref(null);\n\n return {\n ...(context as AsgardeoContext),\n meta: meta as Readonly<Ref<FlowMetadataResponse | null>>,\n resolveFlowTemplateLiterals: (text: string | undefined): string =>\n resolveFlowTemplateLiterals(text, {\n meta: meta.value,\n t: i18nContext?.t ?? ((key: string): string => key),\n }),\n };\n};\n\nexport default useAsgardeo;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {BRANDING_KEY} from '../keys';\nimport type {BrandingContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing branding preference data.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {BrandingContextValue} The branding context with preferences, theme, and fetch operations.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useBranding } from '@asgardeo/vue';\n *\n * const { brandingPreference, theme, isLoading, fetchBranding } = useBranding();\n * </script>\n *\n * <template>\n * <div v-if=\"!isLoading\">\n * <img :src=\"brandingPreference?.images?.logo?.imgURL\" alt=\"Logo\" />\n * </div>\n * </template>\n * ```\n */\nconst useBranding = (): BrandingContextValue => {\n const context: unknown = inject(BRANDING_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useBranding() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as BrandingContextValue;\n};\n\nexport default useBranding;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {FLOW_KEY} from '../keys';\nimport type {FlowContextValue} from '../models/contexts';\n\n/**\n * Composable for managing authentication flow UI state.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {FlowContextValue} The flow context with step navigation, messages, and loading state.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useFlow } from '@asgardeo/vue';\n *\n * const { currentStep, isLoading, messages, navigateToFlow, reset } = useFlow();\n * </script>\n *\n * <template>\n * <div>\n * <p v-if=\"isLoading\">Loading...</p>\n * <component :is=\"currentStep?.component\" v-else />\n * <p v-for=\"msg in messages\" :key=\"msg.id\">{{ msg.content }}</p>\n * </div>\n * </template>\n * ```\n */\nconst useFlow = (): FlowContextValue => {\n const context: unknown = inject(FLOW_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useFlow() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as FlowContextValue;\n};\n\nexport default useFlow;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {FLOW_META_KEY} from '../keys';\nimport type {FlowMetaContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing flow metadata.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {FlowMetaContextValue} The flow meta context with metadata, loading state, and language switching.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useFlowMeta } from '@asgardeo/vue';\n *\n * const { meta, isLoading, switchLanguage } = useFlowMeta();\n *\n * async function changeLanguage(lang: string) {\n * await switchLanguage(lang);\n * }\n * </script>\n * ```\n */\nconst useFlowMeta = (): FlowMetaContextValue => {\n const context: unknown = inject(FLOW_META_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useFlowMeta() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as FlowMetaContextValue;\n};\n\nexport default useFlowMeta;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {I18N_KEY} from '../keys';\nimport type {I18nContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing internationalization utilities.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {I18nContextValue} The i18n context with translation function, language management, and bundle injection.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useI18n } from '@asgardeo/vue';\n *\n * const { t, currentLanguage, setLanguage } = useI18n();\n * </script>\n *\n * <template>\n * <p>{{ t('common.welcome') }}</p>\n * <select :value=\"currentLanguage\" @change=\"setLanguage($event.target.value)\">\n * <option value=\"en-US\">English</option>\n * <option value=\"fr-FR\">Fran\u00E7ais</option>\n * </select>\n * </template>\n * ```\n */\nconst useI18n = (): I18nContextValue => {\n const context: unknown = inject(I18N_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useI18n() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as I18nContextValue;\n};\n\nexport default useI18n;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {ORGANIZATION_KEY} from '../keys';\nimport type {OrganizationContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing organization data and operations.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {OrganizationContextValue} The organization context.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useOrganization } from '@asgardeo/vue';\n *\n * const { myOrganizations, currentOrganization, switchOrganization } = useOrganization();\n *\n * async function handleSwitch(orgId: string) {\n * await switchOrganization(orgId);\n * }\n * </script>\n * ```\n */\nconst useOrganization = (): OrganizationContextValue => {\n const context: unknown = inject(ORGANIZATION_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useOrganization() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as OrganizationContextValue;\n};\n\nexport default useOrganization;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {THEME_KEY} from '../keys';\nimport type {ThemeContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing and controlling the active theme.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {ThemeContextValue} The theme context with the active theme, color scheme, and toggle function.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useTheme } from '@asgardeo/vue';\n *\n * const { theme, colorScheme, toggleTheme } = useTheme();\n * </script>\n *\n * <template>\n * <button @click=\"toggleTheme()\">\n * Switch to {{ colorScheme === 'light' ? 'dark' : 'light' }} mode\n * </button>\n * </template>\n * ```\n */\nconst useTheme = (): ThemeContextValue => {\n const context: unknown = inject(THEME_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useTheme() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as ThemeContextValue;\n};\n\nexport default useTheme;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {USER_KEY} from '../keys';\nimport type {UserContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing user profile data.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {UserContextValue} The user context containing profile, schemas, and update operations.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useUser } from '@asgardeo/vue';\n *\n * const { profile, flattenedProfile, schemas, updateProfile, revalidateProfile } = useUser();\n * </script>\n *\n * <template>\n * <div v-if=\"profile\">\n * <p>Name: {{ flattenedProfile?.name }}</p>\n * <button @click=\"revalidateProfile()\">Refresh</button>\n * </div>\n * </template>\n * ```\n */\nconst useUser = (): UserContextValue => {\n const context: unknown = inject(USER_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useUser() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as UserContextValue;\n};\n\nexport default useUser;\n", "/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {watch, type Ref} from 'vue';\n\nexport interface UseOAuthCallbackOptions {\n /** Current flowId from component state */\n currentFlowId: Ref<string | null>;\n\n /** SessionStorage key for flowId (defaults to 'asgardeo_flow_id') */\n flowIdStorageKey?: string;\n\n /** Whether the component is initialized and ready to process OAuth callback */\n isInitialized: Ref<boolean>;\n\n /** Whether a submission is currently in progress */\n isSubmitting?: Ref<boolean>;\n\n /** Callback when OAuth flow completes successfully */\n onComplete?: () => void;\n\n /** Callback when OAuth flow encounters an error */\n onError?: (error: any) => void;\n\n /** Callback to handle flow response after submission */\n onFlowChange?: (response: any) => void;\n\n /** Callback to set loading state at the start of OAuth processing */\n onProcessingStart?: () => void;\n\n /** Function to submit OAuth code to the server */\n onSubmit: (payload: OAuthCallbackPayload) => Promise<any>;\n\n /** Mutable flag to track whether OAuth has already been processed */\n processedFlag?: {value: boolean};\n\n /** Additional handler for setting state (e.g., setFlowId) */\n setFlowId?: (flowId: string) => void;\n\n /**\n * Mutable flag for token validation tracking.\n * Used in AcceptInvite to coordinate between OAuth callback and token validation.\n */\n tokenValidationAttemptedFlag?: {value: boolean};\n}\n\nexport interface OAuthCallbackPayload {\n flowId: string;\n inputs: {\n code: string;\n nonce?: string;\n };\n}\n\nfunction cleanupUrlParams(): void {\n if (typeof window === 'undefined') return;\n\n const url: URL = new URL(window.location.href);\n url.searchParams.delete('code');\n url.searchParams.delete('nonce');\n url.searchParams.delete('state');\n url.searchParams.delete('error');\n url.searchParams.delete('error_description');\n\n window.history.replaceState({}, '', url.toString());\n}\n\n/**\n * Processes OAuth callbacks by detecting auth code in URL, resolving flowId, and submitting to server.\n * Used by SignIn, SignUp, and AcceptInvite components.\n *\n * Vue composable equivalent of React's useOAuthCallback hook.\n */\nexport function useOAuthCallback({\n currentFlowId,\n flowIdStorageKey = 'asgardeo_flow_id',\n isInitialized,\n isSubmitting,\n onComplete,\n onError,\n onFlowChange,\n onProcessingStart,\n onSubmit,\n processedFlag,\n setFlowId,\n tokenValidationAttemptedFlag,\n}: UseOAuthCallbackOptions): void {\n const internalFlag: {value: boolean} = {value: false};\n const oauthCodeProcessedFlag: {value: boolean} = processedFlag ?? internalFlag;\n const tokenValidationFlag: {value: boolean} | undefined = tokenValidationAttemptedFlag;\n\n watch(\n () => [isInitialized.value, currentFlowId.value, isSubmitting?.value] as const,\n ([initialized, , submitting]: readonly [boolean, string | null, boolean | undefined]) => {\n if (!initialized || submitting) {\n return;\n }\n\n const urlParams: URLSearchParams = new URLSearchParams(window.location.search);\n const code: string | null = urlParams.get('code');\n const nonce: string | null = urlParams.get('nonce');\n const state: string | null = urlParams.get('state');\n const flowIdFromUrl: string | null = urlParams.get('flowId');\n const error: string | null = urlParams.get('error');\n const errorDescription: string | null = urlParams.get('error_description');\n\n if (error) {\n oauthCodeProcessedFlag.value = true;\n if (tokenValidationFlag) {\n tokenValidationFlag.value = true;\n }\n onError?.(new Error(errorDescription || error || 'OAuth authentication failed'));\n cleanupUrlParams();\n return;\n }\n\n if (!code || oauthCodeProcessedFlag.value) {\n return;\n }\n\n if (tokenValidationFlag?.value) {\n return;\n }\n\n const storedFlowId: string | null = sessionStorage.getItem(flowIdStorageKey);\n const flowIdToUse: string | null = currentFlowId.value || storedFlowId || flowIdFromUrl || state || null;\n\n if (!flowIdToUse) {\n oauthCodeProcessedFlag.value = true;\n onError?.(new Error('Invalid flow. Missing flowId.'));\n cleanupUrlParams();\n return;\n }\n\n oauthCodeProcessedFlag.value = true;\n\n if (tokenValidationFlag) {\n tokenValidationFlag.value = true;\n }\n\n onProcessingStart?.();\n\n if (!currentFlowId.value && setFlowId) {\n setFlowId(flowIdToUse);\n }\n\n (async (): Promise<void> => {\n try {\n const payload: OAuthCallbackPayload = {\n flowId: flowIdToUse,\n inputs: {\n code,\n ...(nonce && {nonce}),\n },\n };\n\n const response: any = await onSubmit(payload);\n\n onFlowChange?.(response);\n\n if (response?.flowStatus === 'COMPLETE' || response?.status === 'COMPLETE') {\n onComplete?.();\n }\n\n if (response?.flowStatus === 'ERROR' || response?.status === 'ERROR') {\n onError?.(response);\n }\n\n cleanupUrlParams();\n } catch (err) {\n onError?.(err);\n cleanupUrlParams();\n }\n })();\n },\n {immediate: true},\n );\n}\n", "/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {watch, type Ref} from 'vue';\n\nexport interface UseOAuthCallbackOptions {\n /** Current executionId from component state */\n currentExecutionId: Ref<string | null>;\n\n /** SessionStorage key for executionId (defaults to 'asgardeo_execution_id') */\n executionIdStorageKey?: string;\n\n /** Whether the component is initialized and ready to process OAuth callback */\n isInitialized: Ref<boolean>;\n\n /** Whether a submission is currently in progress */\n isSubmitting?: Ref<boolean>;\n\n /** Callback when OAuth flow completes successfully */\n onComplete?: () => void;\n\n /** Callback when OAuth flow encounters an error */\n onError?: (error: any) => void;\n\n /** Callback to handle flow response after submission */\n onFlowChange?: (response: any) => void;\n\n /** Callback to set loading state at the start of OAuth processing */\n onProcessingStart?: () => void;\n\n /** Function to submit OAuth code to the server */\n onSubmit: (payload: OAuthCallbackPayload) => Promise<any>;\n\n /** Mutable flag to track whether OAuth has already been processed */\n processedFlag?: {value: boolean};\n\n /** Additional handler for setting state (e.g., setExecutionId) */\n setExecutionId?: (executionId: string) => void;\n\n /**\n * Mutable flag for token validation tracking.\n * Used in AcceptInvite to coordinate between OAuth callback and token validation.\n */\n tokenValidationAttemptedFlag?: {value: boolean};\n}\n\nexport interface OAuthCallbackPayload {\n /** The execution ID of the active flow step */\n executionId: string;\n\n /** OAuth callback inputs extracted from the redirect URL */\n inputs: {\n /** The authorization code returned by the OAuth provider */\n code: string;\n\n /** Optional nonce for OIDC replay protection */\n nonce?: string;\n };\n}\n\n/**\n * Removes OAuth-related query parameters from the current URL without triggering a navigation.\n * This prevents re-processing the callback on subsequent renders or page interactions.\n */\nfunction cleanupUrlParams(): void {\n if (typeof window === 'undefined') return;\n\n const url: URL = new URL(window.location.href);\n url.searchParams.delete('code');\n url.searchParams.delete('nonce');\n url.searchParams.delete('state');\n url.searchParams.delete('error');\n url.searchParams.delete('error_description');\n\n window.history.replaceState({}, '', url.toString());\n}\n\n/**\n * Processes OAuth callbacks by detecting auth code in URL, resolving executionId, and submitting to server.\n * Used by SignIn, SignUp, and AcceptInvite components.\n *\n * Vue composable equivalent of React's useOAuthCallback hook.\n */\nexport function useOAuthCallback({\n currentExecutionId,\n executionIdStorageKey = 'asgardeo_execution_id',\n isInitialized,\n isSubmitting,\n onComplete,\n onError,\n onFlowChange,\n onProcessingStart,\n onSubmit,\n processedFlag,\n setExecutionId,\n tokenValidationAttemptedFlag,\n}: UseOAuthCallbackOptions): void {\n /** Fallback mutable flag used when no external processedFlag is provided */\n const internalFlag: {value: boolean} = {value: false};\n\n /** Ensures OAuth code is submitted only once, even across reactive re-evaluations */\n const oauthCodeProcessedFlag: {value: boolean} = processedFlag ?? internalFlag;\n\n /** Tracks whether token validation has been attempted; used to coordinate with AcceptInvite */\n const tokenValidationFlag: {value: boolean} | undefined = tokenValidationAttemptedFlag;\n\n // Re-run whenever initialization state, executionId, or submission state changes.\n // `immediate: true` ensures the callback runs on mount to catch OAuth redirects on first load.\n watch(\n () => [isInitialized.value, currentExecutionId.value, isSubmitting?.value] as const,\n ([initialized, , submitting]: readonly [boolean, string | null, boolean | undefined]) => {\n // Wait until the component is ready and any in-flight submission has settled.\n if (!initialized || submitting) {\n return;\n }\n\n // Extract all OAuth-related parameters from the redirect URL.\n const urlParams: URLSearchParams = new URLSearchParams(window.location.search);\n const code: string | null = urlParams.get('code');\n const nonce: string | null = urlParams.get('nonce');\n const state: string | null = urlParams.get('state');\n const executionIdFromUrl: string | null = urlParams.get('executionId');\n const error: string | null = urlParams.get('error');\n const errorDescription: string | null = urlParams.get('error_description');\n\n // Handle OAuth provider errors (e.g., user denied consent) before processing the code.\n if (error) {\n oauthCodeProcessedFlag.value = true;\n if (tokenValidationFlag) {\n tokenValidationFlag.value = true;\n }\n onError?.(new Error(errorDescription || error || 'OAuth authentication failed'));\n cleanupUrlParams();\n return;\n }\n\n // Skip if there is no authorization code or if it has already been submitted.\n if (!code || oauthCodeProcessedFlag.value) {\n return;\n }\n\n // In AcceptInvite flows, token validation runs concurrently. If it has already\n // started, the OAuth callback should not interfere.\n if (tokenValidationFlag?.value) {\n return;\n }\n\n // Resolve executionId using the most specific available source:\n // component state > sessionStorage > URL param > OAuth state param.\n const storedExecutionId: string | null = sessionStorage.getItem(executionIdStorageKey);\n const executionIdToUse: string | null =\n currentExecutionId.value || storedExecutionId || executionIdFromUrl || state || null;\n\n // Cannot proceed without an executionId \u2014 the flow context is missing.\n if (!executionIdToUse) {\n oauthCodeProcessedFlag.value = true;\n onError?.(new Error('Invalid flow. Missing executionId.'));\n cleanupUrlParams();\n return;\n }\n\n // Mark as processed synchronously before the async submission to prevent\n // duplicate submissions if the watcher fires again during the await.\n oauthCodeProcessedFlag.value = true;\n\n if (tokenValidationFlag) {\n tokenValidationFlag.value = true;\n }\n\n // Signal the component to enter a loading state before the async work begins.\n onProcessingStart?.();\n\n // Sync the resolved executionId back into component state if it was sourced\n // from sessionStorage or the URL rather than reactive state.\n if (!currentExecutionId.value && setExecutionId) {\n setExecutionId(executionIdToUse);\n }\n\n // Submit the OAuth code in an IIFE to allow async/await inside a synchronous watcher callback.\n (async (): Promise<void> => {\n try {\n const payload: OAuthCallbackPayload = {\n executionId: executionIdToUse,\n inputs: {\n code,\n ...(nonce && {nonce}),\n },\n };\n\n const response: any = await onSubmit(payload);\n\n // Notify the component so it can update its flow state (e.g., move to the next step).\n onFlowChange?.(response);\n\n if (response?.flowStatus === 'COMPLETE' || response?.status === 'COMPLETE') {\n onComplete?.();\n }\n\n if (response?.flowStatus === 'ERROR' || response?.status === 'ERROR') {\n onError?.(response);\n }\n\n cleanupUrlParams();\n } catch (err) {\n onError?.(err);\n cleanupUrlParams();\n }\n })();\n },\n {immediate: true},\n );\n}\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype ButtonProps = Readonly<{\n color: 'primary' | 'secondary' | 'danger';\n disabled: boolean;\n endIcon: VNode | undefined;\n fullWidth: boolean;\n loading: boolean;\n size: 'small' | 'medium' | 'large';\n startIcon: VNode | undefined;\n type: 'button' | 'submit' | 'reset';\n variant: 'solid' | 'outline' | 'ghost' | 'text';\n}>;\n\nconst Button: Component = defineComponent({\n emits: ['click'],\n name: 'Button',\n props: {\n color: {\n default: 'primary',\n type: String as PropType<'primary' | 'secondary' | 'danger'>,\n },\n disabled: {default: false, type: Boolean},\n endIcon: {default: undefined, type: Object as PropType<VNode>},\n fullWidth: {default: false, type: Boolean},\n loading: {default: false, type: Boolean},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n startIcon: {default: undefined, type: Object as PropType<VNode>},\n type: {\n default: 'button',\n type: String as PropType<'button' | 'submit' | 'reset'>,\n },\n variant: {\n default: 'solid',\n type: String as PropType<'solid' | 'outline' | 'ghost' | 'text'>,\n },\n },\n setup(props: ButtonProps, {slots, emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const cssClass: string = [\n withVendorCSSClassPrefix('button'),\n withVendorCSSClassPrefix(`button--${props.variant}`),\n withVendorCSSClassPrefix(`button--${props.color}`),\n withVendorCSSClassPrefix(`button--${props.size}`),\n props.fullWidth ? withVendorCSSClassPrefix('button--full-width') : '',\n props.loading ? withVendorCSSClassPrefix('button--loading') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return h(\n 'button',\n {\n class: cssClass,\n disabled: props.disabled || props.loading,\n onClick: (e: MouseEvent) => emit('click', e),\n style: attrs['style'],\n type: props.type,\n },\n [\n props.startIcon\n ? h('span', {class: withVendorCSSClassPrefix('button__start-icon')}, [props.startIcon])\n : null,\n h('span', {class: withVendorCSSClassPrefix('button__content')}, slots['default']?.()),\n props.endIcon ? h('span', {class: withVendorCSSClassPrefix('button__end-icon')}, [props.endIcon]) : null,\n props.loading ? h('span', {'aria-hidden': 'true', class: withVendorCSSClassPrefix('button__spinner')}) : null,\n ],\n );\n };\n },\n});\n\nexport default Button;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype CardProps = Readonly<{\n variant: 'elevated' | 'outlined' | 'flat';\n}>;\n\nconst Card: Component = defineComponent({\n name: 'Card',\n props: {\n variant: {\n default: 'elevated',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(props: CardProps, {slots, attrs}: SetupContext): () => VNode {\n return (): VNode =>\n h(\n 'div',\n {\n class: [\n withVendorCSSClassPrefix('card'),\n withVendorCSSClassPrefix(`card--${props.variant}`),\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' '),\n style: attrs['style'],\n },\n slots['default']?.(),\n );\n },\n});\n\nexport default Card;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype AlertProps = Readonly<{\n dismissible: boolean;\n severity: 'success' | 'error' | 'warning' | 'info';\n}>;\n\nconst Alert: Component = defineComponent({\n emits: ['dismiss'],\n name: 'Alert',\n props: {\n dismissible: {default: false, type: Boolean},\n severity: {\n default: 'info',\n type: String as PropType<'success' | 'error' | 'warning' | 'info'>,\n },\n },\n setup(props: AlertProps, {slots, emit, attrs}: SetupContext): () => VNode {\n return (): VNode =>\n h(\n 'div',\n {\n class: [\n withVendorCSSClassPrefix('alert'),\n withVendorCSSClassPrefix(`alert--${props.severity}`),\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' '),\n role: 'alert',\n style: attrs['style'],\n },\n [\n h('div', {class: withVendorCSSClassPrefix('alert__content')}, slots['default']?.()),\n props.dismissible\n ? h(\n 'button',\n {\n 'aria-label': 'Dismiss',\n class: withVendorCSSClassPrefix('alert__dismiss'),\n onClick: () => emit('dismiss'),\n type: 'button',\n },\n '\\u00d7',\n )\n : null,\n ],\n );\n },\n});\n\nexport default Alert;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype TextFieldProps = Readonly<{\n autoComplete: string | undefined;\n disabled: boolean;\n error: string | undefined;\n helperText: string | undefined;\n label: string | undefined;\n modelValue: string;\n name: string | undefined;\n placeholder: string | undefined;\n required: boolean;\n type: 'text' | 'email' | 'number' | 'tel' | 'url';\n}>;\n\nconst TextField: Component = defineComponent({\n emits: ['update:modelValue', 'blur'],\n name: 'TextField',\n props: {\n autoComplete: {default: undefined, type: String},\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n helperText: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n type: {\n default: 'text',\n type: String as PropType<'text' | 'email' | 'number' | 'tel' | 'url'>,\n },\n },\n setup(props: TextFieldProps, {emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const hasError: boolean = !!props.error;\n const wrapperClass: string = [\n withVendorCSSClassPrefix('text-field'),\n hasError ? withVendorCSSClassPrefix('text-field--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n let helperContent: VNode | null;\n if (hasError) {\n helperContent = h('span', {class: withVendorCSSClassPrefix('text-field__error')}, props.error);\n } else if (props.helperText) {\n helperContent = h('span', {class: withVendorCSSClassPrefix('text-field__helper')}, props.helperText);\n } else {\n helperContent = null;\n }\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n props.label\n ? h(\n 'label',\n {\n class: withVendorCSSClassPrefix('text-field__label'),\n for: props.name,\n },\n [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('text-field__required')}, ' *') : null,\n ],\n )\n : null,\n h('input', {\n autocomplete: props.autoComplete,\n class: withVendorCSSClassPrefix('text-field__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onBlur: () => emit('blur'),\n onInput: (e: Event) => emit('update:modelValue', (e.target as HTMLInputElement).value),\n placeholder: props.placeholder,\n required: props.required,\n type: props.type,\n value: props.modelValue,\n }),\n helperContent,\n ]);\n };\n },\n});\n\nexport default TextField;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type Ref, type SetupContext, type VNode, defineComponent, h, ref} from 'vue';\nimport {EyeIcon, EyeOffIcon} from '../Icons';\n\ntype PasswordFieldProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n label: string | undefined;\n modelValue: string;\n name: string | undefined;\n placeholder: string | undefined;\n required: boolean;\n}>;\n\nconst PasswordField: Component = defineComponent({\n emits: ['update:modelValue', 'blur'],\n name: 'PasswordField',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: PasswordFieldProps, {emit, attrs}: SetupContext): () => VNode {\n const visible: Ref<boolean> = ref(false);\n\n return (): VNode => {\n const hasError: boolean = !!props.error;\n const wrapperClass: string = [\n withVendorCSSClassPrefix('password-field'),\n hasError ? withVendorCSSClassPrefix('password-field--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n props.label\n ? h(\n 'label',\n {\n class: withVendorCSSClassPrefix('password-field__label'),\n for: props.name,\n },\n [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('password-field__required')}, ' *') : null,\n ],\n )\n : null,\n h('div', {class: withVendorCSSClassPrefix('password-field__wrapper')}, [\n h('input', {\n class: withVendorCSSClassPrefix('password-field__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onBlur: () => emit('blur'),\n onInput: (e: Event) => emit('update:modelValue', (e.target as HTMLInputElement).value),\n placeholder: props.placeholder,\n required: props.required,\n type: visible.value ? 'text' : 'password',\n value: props.modelValue,\n }),\n h(\n 'button',\n {\n 'aria-label': visible.value ? 'Hide password' : 'Show password',\n class: withVendorCSSClassPrefix('password-field__toggle'),\n onClick: () => {\n visible.value = !visible.value;\n },\n tabindex: -1,\n type: 'button',\n },\n visible.value ? EyeOffIcon() : EyeIcon(),\n ),\n ]),\n hasError ? h('span', {class: withVendorCSSClassPrefix('password-field__error')}, props.error) : null,\n ]);\n };\n },\n});\n\nexport default PasswordField;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {h, type VNode} from 'vue';\n\nconst defaultProps: Record<string, string> = {\n fill: 'none',\n height: '16',\n stroke: 'currentColor',\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n 'stroke-width': '2',\n viewBox: '0 0 24 24',\n width: '16',\n xmlns: 'http://www.w3.org/2000/svg',\n};\n\nconst icon = (paths: VNode[]): VNode => h('svg', {...defaultProps}, paths);\n\nexport const CheckIcon = (): VNode => icon([h('polyline', {points: '20 6 9 17 4 12'})]);\n\nexport const XIcon = (): VNode =>\n icon([h('line', {x1: '18', x2: '6', y1: '6', y2: '18'}), h('line', {x1: '6', x2: '18', y1: '6', y2: '18'})]);\n\nexport const EyeIcon = (): VNode =>\n icon([h('path', {d: 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'}), h('circle', {cx: '12', cy: '12', r: '3'})]);\n\nexport const EyeOffIcon = (): VNode =>\n icon([\n h('path', {d: 'M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'}),\n h('path', {d: 'M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'}),\n h('line', {x1: '1', x2: '23', y1: '1', y2: '23'}),\n ]);\n\nexport const CircleAlertIcon = (): VNode =>\n icon([\n h('circle', {cx: '12', cy: '12', r: '10'}),\n h('line', {x1: '12', x2: '12', y1: '8', y2: '12'}),\n h('line', {x1: '12', x2: '12.01', y1: '16', y2: '16'}),\n ]);\n\nexport const CircleCheckIcon = (): VNode =>\n icon([h('path', {d: 'M22 11.08V12a10 10 0 1 1-5.93-9.14'}), h('polyline', {points: '22 4 12 14.01 9 11.01'})]);\n\nexport const InfoIcon = (): VNode =>\n icon([\n h('circle', {cx: '12', cy: '12', r: '10'}),\n h('line', {x1: '12', x2: '12', y1: '16', y2: '12'}),\n h('line', {x1: '12', x2: '12.01', y1: '8', y2: '8'}),\n ]);\n\nexport const TriangleAlertIcon = (): VNode =>\n icon([\n h('path', {d: 'M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'}),\n h('line', {x1: '12', x2: '12', y1: '9', y2: '13'}),\n h('line', {x1: '12', x2: '12.01', y1: '17', y2: '17'}),\n ]);\n\nexport const PlusIcon = (): VNode =>\n icon([h('line', {x1: '12', x2: '12', y1: '5', y2: '19'}), h('line', {x1: '5', x2: '19', y1: '12', y2: '12'})]);\n\nexport const LogOutIcon = (): VNode =>\n icon([\n h('path', {d: 'M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'}),\n h('polyline', {points: '16 17 21 12 16 7'}),\n h('line', {x1: '21', x2: '9', y1: '12', y2: '12'}),\n ]);\n\nexport const UserIcon = (): VNode =>\n icon([h('path', {d: 'M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'}), h('circle', {cx: '12', cy: '7', r: '4'})]);\n\nexport const ArrowLeftRightIcon = (): VNode =>\n icon([\n h('polyline', {points: '7 16 3 12 7 8'}),\n h('line', {x1: '21', x2: '3', y1: '12', y2: '12'}),\n h('polyline', {points: '17 8 21 12 17 16'}),\n ]);\n\nexport const BuildingIcon = (): VNode =>\n icon([\n h('rect', {height: '20', rx: '2', ry: '2', width: '16', x: '4', y: '2'}),\n h('line', {x1: '9', x2: '9', y1: '6', y2: '6.01'}),\n h('line', {x1: '15', x2: '15', y1: '6', y2: '6.01'}),\n h('line', {x1: '9', x2: '9', y1: '10', y2: '10.01'}),\n h('line', {x1: '15', x2: '15', y1: '10', y2: '10.01'}),\n h('line', {x1: '9', x2: '9', y1: '14', y2: '14.01'}),\n h('line', {x1: '15', x2: '15', y1: '14', y2: '14.01'}),\n h('line', {x1: '9', x2: '15', y1: '18', y2: '18'}),\n ]);\n\nexport const ChevronDownIcon = (): VNode => icon([h('polyline', {points: '6 9 12 15 18 9'})]);\n\nexport const GlobeIcon = (): VNode =>\n icon([\n h('circle', {cx: '12', cy: '12', r: '10'}),\n h('line', {x1: '2', x2: '22', y1: '12', y2: '12'}),\n h('path', {d: 'M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'}),\n ]);\n\nexport const PencilIcon = (): VNode =>\n icon([h('path', {d: 'M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z'})]);\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\nexport interface SelectOption {\n disabled?: boolean;\n label: string;\n value: string;\n}\n\ntype SelectProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n helperText: string | undefined;\n label: string | undefined;\n modelValue: string;\n name: string | undefined;\n options: SelectOption[];\n placeholder: string | undefined;\n required: boolean;\n}>;\n\nconst Select: Component = defineComponent({\n emits: ['update:modelValue'],\n name: 'AsgardeoSelect',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n helperText: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n options: {default: () => [], type: Array as PropType<SelectOption[]>},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: SelectProps, {emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const hasError: boolean = !!props.error;\n const wrapperClass: string = [\n withVendorCSSClassPrefix('select'),\n hasError ? withVendorCSSClassPrefix('select--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n let helperContent: VNode | null;\n if (hasError) {\n helperContent = h('span', {class: withVendorCSSClassPrefix('select__error')}, props.error);\n } else if (props.helperText) {\n helperContent = h('span', {class: withVendorCSSClassPrefix('select__helper')}, props.helperText);\n } else {\n helperContent = null;\n }\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n props.label\n ? h('label', {class: withVendorCSSClassPrefix('select__label'), for: props.name}, [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('select__required')}, ' *') : null,\n ])\n : null,\n h(\n 'select',\n {\n class: withVendorCSSClassPrefix('select__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onChange: (e: Event) => emit('update:modelValue', (e.target as HTMLSelectElement).value),\n required: props.required,\n value: props.modelValue,\n },\n [\n props.placeholder ? h('option', {disabled: true, value: ''}, props.placeholder) : null,\n ...props.options.map((opt: SelectOption) => h('option', {key: opt.value, value: opt.value}, opt.label)),\n ],\n ),\n helperContent,\n ]);\n };\n },\n});\n\nexport default Select;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\n\ntype CheckboxProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n label: string | undefined;\n modelValue: boolean;\n name: string | undefined;\n required: boolean;\n}>;\n\nconst Checkbox: Component = defineComponent({\n emits: ['update:modelValue'],\n name: 'AsgardeoCheckbox',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: false, type: Boolean},\n name: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: CheckboxProps, {emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const wrapperClass: string = [\n withVendorCSSClassPrefix('checkbox'),\n props.error ? withVendorCSSClassPrefix('checkbox--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n h('label', {class: withVendorCSSClassPrefix('checkbox__wrapper')}, [\n h('input', {\n checked: props.modelValue,\n class: withVendorCSSClassPrefix('checkbox__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onChange: (e: Event) => emit('update:modelValue', (e.target as HTMLInputElement).checked),\n required: props.required,\n type: 'checkbox',\n }),\n props.label ? h('span', {class: withVendorCSSClassPrefix('checkbox__label')}, props.label) : null,\n ]),\n props.error ? h('span', {class: withVendorCSSClassPrefix('checkbox__error')}, props.error) : null,\n ]);\n };\n },\n});\n\nexport default Checkbox;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\n\ntype DatePickerProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n label: string | undefined;\n modelValue: string;\n name: string | undefined;\n placeholder: string | undefined;\n required: boolean;\n}>;\n\nconst DatePicker: Component = defineComponent({\n emits: ['update:modelValue'],\n name: 'AsgardeoDatePicker',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: DatePickerProps, {emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const hasError: boolean = !!props.error;\n const wrapperClass: string = [\n withVendorCSSClassPrefix('date-picker'),\n hasError ? withVendorCSSClassPrefix('date-picker--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n props.label\n ? h('label', {class: withVendorCSSClassPrefix('date-picker__label'), for: props.name}, [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('date-picker__required')}, ' *') : null,\n ])\n : null,\n h('input', {\n class: withVendorCSSClassPrefix('date-picker__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onInput: (e: Event) => emit('update:modelValue', (e.target as HTMLInputElement).value),\n placeholder: props.placeholder,\n required: props.required,\n type: 'date',\n value: props.modelValue,\n }),\n hasError ? h('span', {class: withVendorCSSClassPrefix('date-picker__error')}, props.error) : null,\n ]);\n };\n },\n});\n\nexport default DatePicker;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type Ref, type SetupContext, type VNode, defineComponent, h, nextTick, ref} from 'vue';\n\ntype OtpFieldProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n label: string | undefined;\n length: number;\n modelValue: string;\n name: string | undefined;\n required: boolean;\n}>;\n\nconst OtpField: Component = defineComponent({\n emits: ['update:modelValue'],\n name: 'OtpField',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {default: undefined, type: String},\n length: {default: 6, type: Number},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: OtpFieldProps, {emit, attrs}: SetupContext): () => VNode {\n const inputRefs: Ref<HTMLInputElement[]> = ref<HTMLInputElement[]>([]);\n\n const setRef = (el: unknown, index: number): void => {\n if (el) inputRefs.value[index] = el as HTMLInputElement;\n };\n\n const handleInput = (index: number, e: Event): void => {\n const target: HTMLInputElement = e.target as HTMLInputElement;\n const val: string = target.value.replace(/\\D/g, '').slice(0, 1);\n target.value = val;\n\n const current: string[] = (props.modelValue || '').split('');\n while (current.length < props.length) current.push('');\n current[index] = val;\n emit('update:modelValue', current.join(''));\n\n if (val && index < props.length - 1) {\n nextTick(() => inputRefs.value[index + 1]?.focus());\n }\n };\n\n const handleKeydown = (index: number, e: KeyboardEvent): void => {\n if (e.key === 'Backspace' && !(e.target as HTMLInputElement).value && index > 0) {\n nextTick(() => inputRefs.value[index - 1]?.focus());\n }\n };\n\n return (): VNode => {\n const digits: string[] = (props.modelValue || '').split('');\n while (digits.length < props.length) digits.push('');\n\n return h(\n 'div',\n {\n class: [withVendorCSSClassPrefix('otp-field'), (attrs['class'] as string) || ''].filter(Boolean).join(' '),\n style: attrs['style'],\n },\n [\n props.label\n ? h('label', {class: withVendorCSSClassPrefix('otp-field__label')}, [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('otp-field__required')}, ' *') : null,\n ])\n : null,\n h(\n 'div',\n {class: withVendorCSSClassPrefix('otp-field__inputs')},\n Array.from({length: props.length}, (_: unknown, i: number) =>\n h('input', {\n 'aria-label': `Digit ${i + 1}`,\n class: withVendorCSSClassPrefix('otp-field__digit'),\n disabled: props.disabled,\n inputmode: 'numeric',\n key: i,\n maxlength: 1,\n onInput: (e: Event) => handleInput(i, e),\n onKeydown: (e: KeyboardEvent) => handleKeydown(i, e),\n ref: (el: unknown) => setRef(el, i),\n type: 'text',\n value: digits[i],\n }),\n ),\n ),\n props.error ? h('span', {class: withVendorCSSClassPrefix('otp-field__error')}, props.error) : null,\n ],\n );\n };\n },\n});\n\nexport default OtpField;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype TypographyProps = Readonly<{\n component: string | undefined;\n variant:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'subtitle1'\n | 'subtitle2'\n | 'body1'\n | 'body2'\n | 'caption'\n | 'overline';\n}>;\n\nconst Typography: Component = defineComponent({\n name: 'Typography',\n props: {\n component: {\n default: undefined,\n type: String as PropType<string>,\n },\n variant: {\n default: 'body1',\n type: String as PropType<\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline'\n >,\n },\n },\n setup(props: TypographyProps, {slots, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const tagMap: Record<string, string> = {\n body1: 'p',\n body2: 'p',\n caption: 'span',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n overline: 'span',\n subtitle1: 'h6',\n subtitle2: 'h6',\n };\n\n const tag: string = props.component || tagMap[props.variant] || 'p';\n\n return h(\n tag,\n {\n class: [\n withVendorCSSClassPrefix('typography'),\n withVendorCSSClassPrefix(`typography--${props.variant}`),\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' '),\n style: attrs['style'],\n },\n slots['default']?.(),\n );\n };\n },\n});\n\nexport default Typography;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype DividerProps = Readonly<{\n orientation: 'horizontal' | 'vertical';\n}>;\n\nconst Divider: Component = defineComponent({\n name: 'Divider',\n props: {\n orientation: {\n default: 'horizontal',\n type: String as PropType<'horizontal' | 'vertical'>,\n },\n },\n setup(props: DividerProps, {slots, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const hasContent: boolean = !!slots['default'];\n const cssClass: string = [\n withVendorCSSClassPrefix('divider'),\n withVendorCSSClassPrefix(`divider--${props.orientation}`),\n hasContent ? withVendorCSSClassPrefix('divider--with-content') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n if (hasContent) {\n return h('div', {class: cssClass, role: 'separator', style: attrs['style']}, [\n h('span', {class: withVendorCSSClassPrefix('divider__line')}),\n h('span', {class: withVendorCSSClassPrefix('divider__content')}, slots['default']?.()),\n h('span', {class: withVendorCSSClassPrefix('divider__line')}),\n ]);\n }\n\n return h('hr', {class: cssClass, role: 'separator', style: attrs['style']});\n };\n },\n});\n\nexport default Divider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\n\ntype LogoProps = Readonly<{\n alt: string;\n height: string | number | undefined;\n href: string | undefined;\n src: string | undefined;\n width: string | number | undefined;\n}>;\n\nconst Logo: Component = defineComponent({\n name: 'Logo',\n props: {\n alt: {default: 'Logo', type: String},\n height: {default: undefined, type: [String, Number]},\n href: {default: undefined, type: String},\n src: {default: undefined, type: String},\n width: {default: undefined, type: [String, Number]},\n },\n setup(props: LogoProps, {attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const img: VNode = h('img', {\n alt: props.alt,\n class: withVendorCSSClassPrefix('logo__image'),\n height: props.height,\n src: props.src,\n width: props.width,\n });\n\n if (props.href) {\n return h(\n 'a',\n {\n class: [withVendorCSSClassPrefix('logo'), (attrs['class'] as string) || ''].filter(Boolean).join(' '),\n href: props.href,\n style: attrs['style'],\n },\n [img],\n );\n }\n\n return h(\n 'div',\n {\n class: [withVendorCSSClassPrefix('logo'), (attrs['class'] as string) || ''].filter(Boolean).join(' '),\n style: attrs['style'],\n },\n [img],\n );\n };\n },\n});\n\nexport default Logo;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype SpinnerProps = Readonly<{\n size: 'small' | 'medium' | 'large';\n}>;\n\nconst Spinner: Component = defineComponent({\n name: 'Spinner',\n props: {\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n },\n setup(props: SpinnerProps, {attrs}: SetupContext): () => VNode {\n return (): VNode =>\n h(\n 'div',\n {\n 'aria-label': 'Loading',\n class: [\n withVendorCSSClassPrefix('spinner'),\n withVendorCSSClassPrefix(`spinner--${props.size}`),\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' '),\n role: 'status',\n style: attrs['style'],\n },\n [\n h(\n 'svg',\n {\n class: withVendorCSSClassPrefix('spinner__svg'),\n fill: 'none',\n viewBox: '0 0 24 24',\n xmlns: 'http://www.w3.org/2000/svg',\n },\n [\n h('circle', {\n class: withVendorCSSClassPrefix('spinner__circle'),\n cx: '12',\n cy: '12',\n r: '10',\n stroke: 'currentColor',\n 'stroke-dasharray': '31.4 31.4',\n 'stroke-linecap': 'round',\n 'stroke-width': '3',\n }),\n ],\n ),\n ],\n );\n },\n});\n\nexport default Spinner;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoRuntimeError, navigate} from '@asgardeo/browser';\nimport {defineComponent, h, ref, type Component, type PropType, type Ref, type SetupContext, type VNode} from 'vue';\nimport BaseSignInButton from './BaseSignInButton';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * SignInButton \u2014 triggers `signIn()` from the Asgardeo context.\n *\n * If a custom `signInUrl` is configured, navigates to it instead.\n * Falls back to i18n translation for the button text.\n */\nconst SignInButton: Component = defineComponent({\n emits: ['click', 'error'],\n name: 'SignInButton',\n props: {\n signInOptions: {default: undefined, type: Object as PropType<Record<string, any>>},\n },\n setup(props: {signInOptions?: Record<string, any>}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {signIn, signInUrl, signInOptions: contextSignInOptions} = useAsgardeo();\n const isLoading: Ref<boolean> = ref(false);\n\n const handleSignIn = async (e?: MouseEvent): Promise<void> => {\n try {\n isLoading.value = true;\n if (signInUrl) {\n navigate(signInUrl);\n } else {\n await signIn(props.signInOptions ?? contextSignInOptions);\n }\n if (e) emit('click', e);\n } catch (error) {\n emit('error', error);\n throw new AsgardeoRuntimeError(\n `Sign in failed: ${error instanceof Error ? error.message : String(error)}`,\n 'SignInButton-handleSignIn-RuntimeError-001',\n 'vue',\n 'Something went wrong while trying to sign in. Please try again later.',\n );\n } finally {\n isLoading.value = false;\n }\n };\n\n return (): VNode => {\n const slotContent: (() => VNode[]) | undefined = slots['default']\n ? (): VNode[] => slots['default']!({isLoading: isLoading.value})\n : undefined;\n\n return h(\n BaseSignInButton,\n {\n class: attrs['class'],\n isLoading: isLoading.value,\n onClick: handleSignIn,\n style: attrs['style'],\n },\n slotContent,\n );\n };\n },\n});\n\nexport default SignInButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport Button from '../primitives/Button';\n\n/**\n * BaseSignInButton \u2014 styled sign-in button with customization support.\n *\n * By default, renders a styled Button primitive with contents from the slot or fallback text.\n * Set `unstyled={true}` to render a plain <button> for full customization control.\n *\n * @example\n * <!-- Default styled button with custom text -->\n * <BaseSignInButton>Custom Text</BaseSignInButton>\n *\n * @example\n * <!-- Unstyled button for full customization -->\n * <BaseSignInButton unstyled class=\"my-custom-styles\">Custom Content</BaseSignInButton>\n */\nconst BaseSignInButton: Component = defineComponent({\n emits: ['click'],\n name: 'BaseSignInButton',\n props: {\n disabled: {\n default: false,\n type: Boolean,\n },\n isLoading: {\n default: false,\n type: Boolean,\n },\n /**\n * When true, renders a plain <button> with no default styling.\n * When false (default), renders a styled Button component.\n */\n unstyled: {\n default: false,\n type: Boolean,\n },\n },\n setup(props: any, {slots, emit, attrs}: any): any {\n const handleClick = (e: MouseEvent): void => {\n if (!props.disabled && !props.isLoading) {\n emit('click', e);\n }\n };\n\n return (): any => {\n // Unstyled mode: plain button for full customization\n if (props.unstyled) {\n return h(\n 'button',\n {\n class: [withVendorCSSClassPrefix('sign-in-button-wrapper'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default'] ? slots['default']({isLoading: props.isLoading}) : 'Sign In',\n );\n }\n\n // Styled mode (default): always render the styled Button with slot/fallback content\n return h(\n Button,\n {\n class: [withVendorCSSClassPrefix('sign-in-button'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n loading: props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default']\n ? (): VNode | VNode[] => slots['default']({isLoading: props.isLoading})\n : (): string => 'Sign In',\n );\n };\n },\n});\n\nexport default BaseSignInButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoRuntimeError} from '@asgardeo/browser';\nimport {defineComponent, h, ref, type Component, type Ref, type SetupContext, type VNode} from 'vue';\nimport BaseSignOutButton from './BaseSignOutButton';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * SignOutButton \u2014 triggers `signOut()` from the Asgardeo context.\n */\nconst SignOutButton: Component = defineComponent({\n emits: ['click', 'error'],\n name: 'SignOutButton',\n setup(_: {}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {signOut} = useAsgardeo();\n const isLoading: Ref<boolean> = ref(false);\n\n const handleSignOut = async (e?: MouseEvent): Promise<void> => {\n try {\n isLoading.value = true;\n await signOut();\n if (e) emit('click', e);\n } catch (error) {\n emit('error', error);\n throw new AsgardeoRuntimeError(\n `Sign out failed: ${error instanceof Error ? error.message : String(error)}`,\n 'SignOutButton-handleSignOut-RuntimeError-001',\n 'vue',\n 'Something went wrong while trying to sign out. Please try again later.',\n );\n } finally {\n isLoading.value = false;\n }\n };\n\n return (): VNode => {\n const slotContent: (() => VNode[]) | undefined = slots['default']\n ? (): VNode[] => slots['default']!({isLoading: isLoading.value})\n : undefined;\n\n return h(\n BaseSignOutButton,\n {\n class: attrs['class'],\n isLoading: isLoading.value,\n onClick: handleSignOut,\n style: attrs['style'],\n },\n slotContent,\n );\n };\n },\n});\n\nexport default SignOutButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport Button from '../primitives/Button';\n\n/**\n * BaseSignOutButton \u2014 styled sign-out button with customization support.\n *\n * By default, renders a styled Button primitive with contents from the slot or fallback text.\n * Set `unstyled={true}` to render a plain <button> for full customization control.\n *\n * @example\n * <!-- Default styled button with custom text -->\n * <BaseSignOutButton>Custom Text</BaseSignOutButton>\n *\n * @example\n * <!-- Unstyled button for full customization -->\n * <BaseSignOutButton unstyled class=\"my-custom-styles\">Custom Content</BaseSignOutButton>\n */\nconst BaseSignOutButton: Component = defineComponent({\n emits: ['click'],\n name: 'BaseSignOutButton',\n props: {\n disabled: {\n default: false,\n type: Boolean,\n },\n isLoading: {\n default: false,\n type: Boolean,\n },\n /**\n * When true, renders a plain <button> with no default styling.\n * When false (default), renders a styled Button component.\n */\n unstyled: {\n default: false,\n type: Boolean,\n },\n },\n setup(props: any, {slots, emit, attrs}: any): any {\n const handleClick = (e: MouseEvent): void => {\n if (!props.disabled && !props.isLoading) {\n emit('click', e);\n }\n };\n\n return (): any => {\n // Unstyled mode: plain button for full customization\n if (props.unstyled) {\n return h(\n 'button',\n {\n class: [withVendorCSSClassPrefix('sign-out-button-wrapper'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default'] ? slots['default']({isLoading: props.isLoading}) : 'Sign Out',\n );\n }\n\n // Styled mode (default): always render the styled Button with slot/fallback content\n return h(\n Button,\n {\n class: [withVendorCSSClassPrefix('sign-out-button'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n loading: props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default']\n ? (): VNode | VNode[] => slots['default']({isLoading: props.isLoading})\n : (): string => 'Sign Out',\n );\n };\n },\n});\n\nexport default BaseSignOutButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoRuntimeError, navigate} from '@asgardeo/browser';\nimport {defineComponent, h, ref, type Component, type Ref, type SetupContext, type VNode} from 'vue';\nimport BaseSignUpButton from './BaseSignUpButton';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * SignUpButton \u2014 triggers `signUp()` from the Asgardeo context.\n *\n * If a custom `signUpUrl` is configured, navigates to it instead.\n * Falls back to i18n translation for the button text.\n */\nconst SignUpButton: Component = defineComponent({\n emits: ['click', 'error'],\n name: 'SignUpButton',\n setup(_: {}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {signUp, signUpUrl} = useAsgardeo();\n const isLoading: Ref<boolean> = ref(false);\n\n const handleSignUp = async (e?: MouseEvent): Promise<void> => {\n try {\n isLoading.value = true;\n if (signUpUrl) {\n navigate(signUpUrl);\n } else {\n await signUp();\n }\n if (e) emit('click', e);\n } catch (error) {\n emit('error', error);\n throw new AsgardeoRuntimeError(\n `Sign up failed: ${error instanceof Error ? error.message : String(error)}`,\n 'SignUpButton-handleSignUp-RuntimeError-001',\n 'vue',\n 'Something went wrong while trying to sign up. Please try again later.',\n );\n } finally {\n isLoading.value = false;\n }\n };\n\n return (): VNode => {\n const slotContent: (() => VNode[]) | undefined = slots['default']\n ? (): VNode[] => slots['default']!({isLoading: isLoading.value})\n : undefined;\n\n return h(\n BaseSignUpButton,\n {\n class: attrs['class'],\n isLoading: isLoading.value,\n onClick: handleSignUp,\n style: attrs['style'],\n },\n slotContent,\n );\n };\n },\n});\n\nexport default SignUpButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport Button from '../primitives/Button';\n\n/**\n * BaseSignUpButton \u2014 styled sign-up button with customization support.\n *\n * By default, renders a styled Button primitive with contents from the slot or fallback text.\n * Set `unstyled={true}` to render a plain <button> for full customization control.\n *\n * @example\n * <!-- Default styled button with custom text -->\n * <BaseSignUpButton>Custom Text</BaseSignUpButton>\n *\n * @example\n * <!-- Unstyled button for full customization -->\n * <BaseSignUpButton unstyled class=\"my-custom-styles\">Custom Content</BaseSignUpButton>\n */\nconst BaseSignUpButton: Component = defineComponent({\n emits: ['click'],\n name: 'BaseSignUpButton',\n props: {\n disabled: {\n default: false,\n type: Boolean,\n },\n isLoading: {\n default: false,\n type: Boolean,\n },\n /**\n * When true, renders a plain <button> with no default styling.\n * When false (default), renders a styled Button component.\n */\n unstyled: {\n default: false,\n type: Boolean,\n },\n },\n setup(props: any, {slots, emit, attrs}: any): any {\n const handleClick = (e: MouseEvent): void => {\n if (!props.disabled && !props.isLoading) {\n emit('click', e);\n }\n };\n\n return (): any => {\n // Unstyled mode: plain button for full customization\n if (props.unstyled) {\n return h(\n 'button',\n {\n class: [withVendorCSSClassPrefix('sign-up-button-wrapper'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default'] ? slots['default']({isLoading: props.isLoading}) : 'Sign Up',\n );\n }\n\n // Styled mode (default): always render the styled Button with slot/fallback content\n return h(\n Button,\n {\n class: [withVendorCSSClassPrefix('sign-up-button'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n color: 'primary' as const,\n disabled: props.disabled || props.isLoading,\n loading: props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n variant: 'solid' as const,\n },\n slots['default']\n ? (): VNode | VNode[] => slots['default']({isLoading: props.isLoading})\n : (): string => 'Sign Up',\n );\n };\n },\n});\n\nexport default BaseSignUpButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {navigate as browserNavigate} from '@asgardeo/browser';\nimport {type Component, defineComponent, onMounted} from 'vue';\nimport {createVueLogger} from '../../utils/logger';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('Callback');\n\ninterface CallbackSetupProps {\n onError: ((error: Error) => void) | undefined;\n onNavigate: ((path: string) => void) | undefined;\n}\n\n/**\n * Callback \u2014 headless component that handles OAuth callback parameter forwarding.\n *\n * Extracts OAuth parameters (code, state, error) from the URL and forwards them\n * to the original component that initiated the OAuth flow.\n *\n * Works standalone using the browser navigate utility (History API) for navigation by default.\n * Pass an `onNavigate` prop to enable framework-specific navigation (e.g., via Vue Router).\n *\n * Flow: Extract OAuth parameters from URL -> Parse state parameter -> Redirect to original path with parameters\n */\nconst Callback: Component = defineComponent({\n name: 'Callback',\n props: {\n onError: {default: undefined, type: Function as unknown as () => (error: Error) => void},\n onNavigate: {default: undefined, type: Function as unknown as () => (path: string) => void},\n },\n setup(props: CallbackSetupProps) {\n const navigate = (path: string): void => {\n if (props.onNavigate) {\n props.onNavigate(path);\n } else {\n browserNavigate(path);\n }\n };\n\n onMounted(() => {\n let returnPath: string = '/';\n\n try {\n // 1. Extract OAuth parameters from URL\n const urlParams: URLSearchParams = new URLSearchParams(window.location.search);\n const code: string | null = urlParams.get('code');\n const state: string | null = urlParams.get('state');\n const nonce: string | null = urlParams.get('nonce');\n const oauthError: string | null = urlParams.get('error');\n const errorDescription: string | null = urlParams.get('error_description');\n\n // If no OAuth parameters are present, this component is not on a real callback\n // route \u2014 do nothing and return early.\n if (!code && !state && !oauthError) {\n return;\n }\n\n // 1a. If running inside a popup (e.g. social signup), send OAuth params\n // back to the opener via postMessage. The parent window's handler will\n // close this popup after processing the code.\n if (window.opener) {\n window.opener.postMessage({code, error: oauthError, errorDescription, nonce, state}, window.location.origin);\n return;\n }\n\n // 2. Validate and retrieve OAuth state from sessionStorage\n if (!state) {\n throw new Error('Missing OAuth state parameter - possible security issue');\n }\n\n const storedData: string | null = sessionStorage.getItem(`asgardeo_oauth_${state}`);\n if (!storedData) {\n if (oauthError) {\n const errorMsg: string = errorDescription || oauthError || 'OAuth authentication failed';\n const err: Error = new Error(errorMsg);\n props.onError?.(err);\n\n const params: URLSearchParams = new URLSearchParams();\n params.set('error', oauthError);\n if (errorDescription) {\n params.set('error_description', errorDescription);\n }\n\n navigate(`/?${params.toString()}`);\n\n return;\n }\n throw new Error('Invalid OAuth state - possible CSRF attack');\n }\n\n const {path, timestamp} = JSON.parse(storedData);\n returnPath = path || '/';\n\n // 3. Validate state freshness\n const MAX_STATE_AGE: number = 300000; // 5 minutes\n if (Date.now() - timestamp > MAX_STATE_AGE) {\n sessionStorage.removeItem(`asgardeo_oauth_${state}`);\n throw new Error('OAuth state expired - please try again');\n }\n\n // 4. Clean up state\n sessionStorage.removeItem(`asgardeo_oauth_${state}`);\n\n // 5. Handle OAuth error response\n if (oauthError) {\n const errorMsg: string = errorDescription || oauthError || 'OAuth authentication failed';\n const err: Error = new Error(errorMsg);\n props.onError?.(err);\n\n const params: URLSearchParams = new URLSearchParams();\n params.set('error', oauthError);\n if (errorDescription) {\n params.set('error_description', errorDescription);\n }\n\n navigate(`${returnPath}?${params.toString()}`);\n\n return;\n }\n\n // 6. Validate required parameters\n if (!code) {\n throw new Error('Missing OAuth authorization code');\n }\n\n // 7. Forward OAuth code to original component\n const params: URLSearchParams = new URLSearchParams();\n params.set('code', code);\n if (nonce) {\n params.set('nonce', nonce);\n }\n\n navigate(`${returnPath}?${params.toString()}`);\n } catch (err) {\n const errorMessage: string = err instanceof Error ? err.message : 'OAuth callback processing failed';\n logger.error('OAuth callback error:', err);\n\n props.onError?.(err instanceof Error ? err : new Error(errorMessage));\n\n const params: URLSearchParams = new URLSearchParams();\n params.set('error', 'callback_error');\n params.set('error_description', errorMessage);\n\n navigate(`${returnPath}?${params.toString()}`);\n }\n });\n\n // Headless component \u2014 renders nothing\n return (): null => null;\n },\n});\n\nexport default Callback;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * A component that only renders its children when the user is signed in.\n *\n * @example\n * ```vue\n * <SignedIn>\n * <p>Welcome! You are signed in.</p>\n * <template #fallback>\n * <p>Please sign in to continue</p>\n * </template>\n * </SignedIn>\n * ```\n */\nconst SignedIn: Component = defineComponent({\n name: 'SignedIn',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {isSignedIn} = useAsgardeo();\n\n return (): VNode | VNode[] | null => {\n if (!isSignedIn.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.();\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default SignedIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * A component that only renders its children when the user is signed out.\n *\n * @example\n * ```vue\n * <SignedOut>\n * <p>Please sign in to continue</p>\n * <template #fallback>\n * <p>You are already signed in</p>\n * </template>\n * </SignedOut>\n * ```\n */\nconst SignedOut: Component = defineComponent({\n name: 'SignedOut',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {isSignedIn} = useAsgardeo();\n\n return (): VNode | VNode[] | null => {\n if (isSignedIn.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.();\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default SignedOut;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * A component that only renders its children when Asgardeo is loading.\n *\n * @example\n * ```vue\n * <Loading>\n * <p>Loading...</p>\n * <template #fallback>\n * <p>Finished loading</p>\n * </template>\n * </Loading>\n * ```\n */\nconst Loading: Component = defineComponent({\n name: 'Loading',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {isLoading} = useAsgardeo();\n\n return (): VNode | VNode[] | null => {\n if (!isLoading.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.();\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default Loading;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\n/**\n * User \u2014 control component that exposes the current user via a scoped slot.\n *\n * Renders the `default` slot with `{ user }` when a user is signed in,\n * or the `fallback` slot when no user is available.\n *\n * @example\n * ```vue\n * <User>\n * <template #default=\"{ user }\">\n * <p>Welcome, {{ user.givenName }}!</p>\n * </template>\n * <template #fallback>\n * <p>No user signed in.</p>\n * </template>\n * </User>\n * ```\n */\nconst User: Component = defineComponent({\n name: 'User',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {user} = useAsgardeo();\n\n return (): VNode | VNode[] | null => {\n if (!user.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.({user: user.value});\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default User;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useOrganization from '../../../composables/useOrganization';\n\n/**\n * Organization \u2014 control component that exposes the current organization via a scoped slot.\n *\n * Renders the `default` slot with `{ organization }` when a current organization is available,\n * or the `fallback` slot when none is set.\n *\n * @example\n * ```vue\n * <Organization>\n * <template #default=\"{ organization }\">\n * <p>Current org: {{ organization.name }}</p>\n * </template>\n * <template #fallback>\n * <p>No organization selected.</p>\n * </template>\n * </Organization>\n * ```\n */\nconst Organization: Component = defineComponent({\n name: 'Organization',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {currentOrganization} = useOrganization();\n\n return (): VNode | VNode[] | null => {\n if (!currentOrganization?.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.({organization: currentOrganization.value});\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default Organization;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport SignInV1 from './v1/SignIn';\nimport SignInV2 from './v2/SignIn';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type {SignInRenderProps} from './v2/SignIn';\n\n/**\n * SignIn \u2014 platform-aware sign-in component.\n *\n * Routes to the V1 (authenticator-based) flow by default or the V2\n * (component-driven) flow when `platform` is set to `Platform.AsgardeoV2`.\n */\nconst SignIn: Component = defineComponent({\n emits: ['error', 'success'],\n name: 'SignIn',\n props: {\n className: {default: '', type: String},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(\n props: Readonly<{className: string; size: 'small' | 'medium' | 'large'; variant: 'elevated' | 'outlined' | 'flat'}>,\n {slots, emit, attrs}: SetupContext,\n ): () => VNode {\n const {platform} = useAsgardeo();\n\n return (): VNode => {\n if (platform === Platform.AsgardeoV2) {\n return h(\n SignInV2,\n {\n ...attrs,\n class: props.className,\n onError: (err: Error) => emit('error', err),\n onSuccess: (data: Record<string, any>) => emit('success', data),\n size: props.size,\n variant: props.variant,\n },\n slots,\n );\n }\n\n return h(\n SignInV1,\n {\n ...attrs,\n class: props.className,\n onError: (err: Error) => emit('error', err),\n onSuccess: (data: Record<string, any>) => emit('success', data),\n size: props.size,\n variant: props.variant,\n },\n slots,\n );\n };\n },\n});\n\nexport default SignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedSignInFlowHandleRequestPayload,\n EmbeddedSignInFlowHandleResponse,\n EmbeddedSignInFlowInitiateResponse,\n} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignIn from './BaseSignIn';\nimport useAsgardeo from '../../../../composables/useAsgardeo';\n\n/**\n * V1 SignIn \u2014 app-native sign-in component using the authenticator-based flow.\n *\n * Initialises the flow with `signIn({ response_mode: 'direct' })` and delegates\n * all UI rendering to `BaseSignInV1`.\n */\nconst SignIn: Component = defineComponent({\n emits: ['error', 'success'],\n name: 'SignInV1',\n props: {\n className: {default: '', type: String},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(\n props: Readonly<{className: string; size: 'small' | 'medium' | 'large'; variant: 'elevated' | 'outlined' | 'flat'}>,\n {emit, attrs}: SetupContext,\n ): () => VNode {\n const {signIn, afterSignInUrl, isInitialized, isLoading} = useAsgardeo();\n\n const handleInitialize = async (): Promise<EmbeddedSignInFlowInitiateResponse> =>\n (await signIn({response_mode: 'direct'})) as EmbeddedSignInFlowInitiateResponse;\n\n const handleOnSubmit = async (\n payload: EmbeddedSignInFlowHandleRequestPayload,\n request: any,\n ): Promise<EmbeddedSignInFlowHandleResponse> =>\n (await signIn(payload, request)) as EmbeddedSignInFlowHandleResponse;\n\n const handleSuccess = (authData: Record<string, any>): void => {\n emit('success', authData);\n\n if (authData && afterSignInUrl) {\n const url: URL = new URL(afterSignInUrl as string, window.location.origin);\n Object.entries(authData).forEach(([key, value]: [string, any]) => {\n if (value !== undefined && value !== null) {\n url.searchParams.append(key, String(value));\n }\n });\n window.location.href = url.toString();\n }\n };\n\n return (): VNode =>\n h(BaseSignIn, {\n ...attrs,\n afterSignInUrl,\n class: props.className,\n isLoading: isLoading.value || !isInitialized.value,\n onError: (err: Error) => emit('error', err),\n onInitialize: handleInitialize,\n onSubmit: handleOnSubmit,\n onSuccess: handleSuccess,\n showLogo: true,\n showSubtitle: true,\n showTitle: true,\n size: props.size,\n variant: props.variant,\n });\n },\n});\n\nexport default SignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedSignInFlowAuthenticator,\n EmbeddedSignInFlowInitiateResponse,\n EmbeddedSignInFlowHandleResponse,\n EmbeddedSignInFlowStepType,\n EmbeddedSignInFlowStatus,\n EmbeddedSignInFlowAuthenticatorPromptType,\n ApplicationNativeAuthenticationConstants,\n AsgardeoAPIError,\n withVendorCSSClassPrefix,\n EmbeddedSignInFlowHandleRequestPayload,\n EmbeddedFlowExecuteRequestConfig,\n handleWebAuthnAuthentication,\n} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport {createSignInOptionFromAuthenticator} from './options/SignInOptionFactory';\nimport useFlow from '../../../../composables/useFlow';\nimport useI18n from '../../../../composables/useI18n';\nimport Alert from '../../../primitives/Alert';\nimport Card from '../../../primitives/Card';\nimport Divider from '../../../primitives/Divider';\nimport Logo from '../../../primitives/Logo';\nimport Spinner from '../../../primitives/Spinner';\nimport Typography from '../../../primitives/Typography';\n\n/**\n * Authenticators that are currently hidden from the UI.\n * OrganizationSSO is not yet supported in app-native authentication.\n */\nconst HIDDEN_AUTHENTICATORS: string[] = ['T3JnYW5pemF0aW9uQXV0aGVudGljYXRvcjpTU08'];\n\nconst isPasskeyAuthenticator = (authenticator: EmbeddedSignInFlowAuthenticator): boolean =>\n authenticator.authenticatorId === ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey &&\n authenticator.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.InternalPrompt &&\n !!(authenticator.metadata as any)?.additionalData?.challengeData;\n\n/**\n * V1 BaseSignIn component \u2014 authenticator-based app-native sign-in for Vue.\n *\n * Handles multi-step authentication flows, form rendering per-authenticator,\n * redirect popups for OAuth, and passkey/FIDO WebAuthn.\n */\nconst BaseSignIn: Component = defineComponent({\n emits: ['error', 'flowChange', 'success'],\n name: 'BaseSignInV1',\n props: {\n afterSignInUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n isLoading: {default: false, type: Boolean},\n messageClassName: {default: '', type: String},\n onInitialize: {default: undefined, type: Function as PropType<() => Promise<EmbeddedSignInFlowInitiateResponse>>},\n onSubmit: {\n default: undefined,\n type: Function as PropType<\n (\n payload: EmbeddedSignInFlowHandleRequestPayload,\n request: EmbeddedFlowExecuteRequestConfig,\n ) => Promise<EmbeddedSignInFlowHandleResponse>\n >,\n },\n showLogo: {default: true, type: Boolean},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'elevated' | 'outlined' | 'flat'>},\n },\n setup(props: any, {emit}: SetupContext): () => VNode {\n const {t} = useI18n();\n const {title: flowTitle, subtitle: flowSubtitle, messages: flowMessages} = useFlow();\n\n // \u2500\u2500 Reactive state \u2500\u2500\n const isInitRequestLoading: Ref<boolean> = ref(false);\n const isInitialized: Ref<boolean> = ref(false);\n const currentFlow: Ref<EmbeddedSignInFlowInitiateResponse | null> = ref(null);\n const currentAuthenticator: Ref<EmbeddedSignInFlowAuthenticator | null> = ref(null);\n const error: Ref<string | null> = ref(null);\n const messages: Ref<Array<{message: string; type: string}>> = ref([]);\n const formValues: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n\n const isLoading = (): boolean => props.isLoading || isInitRequestLoading.value;\n\n // \u2500\u2500 Form helpers \u2500\u2500\n\n const setupFormFields = (authenticator: EmbeddedSignInFlowAuthenticator): void => {\n const vals: Record<string, string> = {};\n authenticator.metadata?.params?.forEach((param: any) => {\n vals[param.param] = '';\n });\n formValues.value = vals;\n touchedFields.value = {};\n };\n\n const handleInputChange = (param: string, value: string): void => {\n formValues.value = {...formValues.value, [param]: value};\n touchedFields.value = {...touchedFields.value, [param]: true};\n };\n\n const touchAllFields = (): void => {\n const touched: Record<string, boolean> = {};\n Object.keys(formValues.value).forEach((key: string) => {\n touched[key] = true;\n });\n touchedFields.value = touched;\n };\n\n const validateForm = (): boolean => {\n if (!currentAuthenticator.value) return true;\n const required: string[] = currentAuthenticator.value.requiredParams || [];\n\n return required.every((key: string) => {\n const val: string = formValues.value[key] || '';\n\n return !!val && val.trim() !== '';\n });\n };\n\n // \u2500\u2500 Next step processing \u2500\u2500\n\n let handleAuthenticatorSelection: (\n authenticator: EmbeddedSignInFlowAuthenticator,\n formData?: Record<string, string>,\n ) => Promise<void>;\n\n const processNextStep = (response: any): void => {\n if (response && 'flowId' in response && 'nextStep' in response) {\n currentFlow.value = response;\n\n if (response.nextStep?.authenticators?.length > 0) {\n if (\n response.nextStep.stepType === EmbeddedSignInFlowStepType.MultiOptionsPrompt &&\n response.nextStep.authenticators.length > 1\n ) {\n currentAuthenticator.value = null;\n } else {\n const nextAuth: EmbeddedSignInFlowAuthenticator = response.nextStep.authenticators[0];\n if (isPasskeyAuthenticator(nextAuth)) {\n handleAuthenticatorSelection(nextAuth).catch((err: unknown) => {\n emit('error', err);\n });\n return;\n }\n currentAuthenticator.value = nextAuth;\n setupFormFields(nextAuth);\n }\n }\n\n if (response.nextStep?.messages) {\n messages.value = response.nextStep.messages.map((msg: any) => ({\n message: msg.message || '',\n type: msg.type || 'INFO',\n }));\n }\n }\n };\n\n // \u2500\u2500 Redirect popup (OAuth flows) \u2500\u2500\n\n const handleRedirectionIfNeeded = (response: EmbeddedSignInFlowHandleResponse): boolean => {\n if (\n response &&\n 'nextStep' in response &&\n response.nextStep &&\n (response.nextStep as any).stepType === EmbeddedSignInFlowStepType.AuthenticatorPrompt &&\n (response.nextStep as any).authenticators?.length === 1\n ) {\n const responseAuth: any = (response.nextStep as any).authenticators[0];\n if (\n responseAuth.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt &&\n (responseAuth.metadata as any)?.additionalData?.redirectUrl\n ) {\n const {redirectUrl} = (responseAuth.metadata as any).additionalData;\n const popup: Window | null = window.open(\n redirectUrl,\n 'oauth_popup',\n 'width=500,height=600,scrollbars=yes,resizable=yes',\n );\n\n if (!popup) return false;\n\n let messageHandler: any;\n let popupMonitor: any;\n let hasProcessedCallback: boolean = false;\n\n const cleanup = (): void => {\n window.removeEventListener('message', messageHandler);\n if (popupMonitor) clearInterval(popupMonitor);\n };\n\n messageHandler = async (event: MessageEvent): Promise<void> => {\n if (event.source !== popup) return;\n const expectedOrigin: string = props.afterSignInUrl\n ? new URL(props.afterSignInUrl).origin\n : window.location.origin;\n if (event.origin !== expectedOrigin && event.origin !== window.location.origin) return;\n\n const {code, state} = event.data;\n if (code && state) {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value!.flowId,\n selectedAuthenticator: {\n authenticatorId: responseAuth.authenticatorId,\n params: {code, state},\n },\n };\n await props.onSubmit(payload, {\n method: currentFlow.value?.links[0].method,\n url: currentFlow.value?.links[0].href,\n });\n popup.close();\n cleanup();\n }\n };\n\n window.addEventListener('message', messageHandler);\n\n popupMonitor = setInterval(async (): Promise<void> => {\n try {\n if (popup.closed) {\n cleanup();\n return;\n }\n if (hasProcessedCallback) return;\n try {\n const popupUrl: string = popup.location.href;\n if (popupUrl && (popupUrl.includes('code=') || popupUrl.includes('error='))) {\n hasProcessedCallback = true;\n const url: URL = new URL(popupUrl);\n const code: string | null = url.searchParams.get('code');\n const state: string | null = url.searchParams.get('state');\n const oauthError: string | null = url.searchParams.get('error');\n\n if (oauthError) {\n popup.close();\n cleanup();\n return;\n }\n if (code && state) {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value!.flowId,\n selectedAuthenticator: {\n authenticatorId: responseAuth.authenticatorId,\n params: {code, state},\n },\n };\n const submitResponse: any = await props.onSubmit(payload, {\n method: currentFlow.value?.links[0].method,\n url: currentFlow.value?.links[0].href,\n });\n popup.close();\n emit('flowChange', submitResponse);\n if (submitResponse?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', submitResponse.authData);\n }\n }\n }\n } catch {\n // Cross-origin error expected during OAuth redirect\n }\n } catch {\n // Ignore popup monitoring errors\n }\n }, 1000);\n\n return true;\n }\n }\n return false;\n };\n\n // \u2500\u2500 Form submission \u2500\u2500\n\n const handleSubmit = async (submittedValues: Record<string, string>): Promise<void> => {\n if (!currentFlow.value || !currentAuthenticator.value) return;\n\n touchAllFields();\n if (!validateForm()) return;\n\n isInitRequestLoading.value = true;\n error.value = null;\n messages.value = [];\n\n try {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: currentAuthenticator.value.authenticatorId,\n params: submittedValues,\n },\n };\n\n const response: any = await props.onSubmit(payload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData);\n return;\n }\n if (\n response?.flowStatus === EmbeddedSignInFlowStatus.FailCompleted ||\n response?.flowStatus === EmbeddedSignInFlowStatus.FailIncomplete\n ) {\n error.value = t('errors.signin.flow.completion.failure');\n return;\n }\n if (handleRedirectionIfNeeded(response)) return;\n\n processNextStep(response);\n } catch (err: any) {\n error.value = err instanceof AsgardeoAPIError ? err.message : t('errors.signin.flow.failure');\n emit('error', err);\n } finally {\n isInitRequestLoading.value = false;\n }\n };\n\n // \u2500\u2500 Authenticator selection (multi-option, passkey, redirect, form) \u2500\u2500\n\n handleAuthenticatorSelection = async (\n authenticator: EmbeddedSignInFlowAuthenticator,\n formData?: Record<string, string>,\n ): Promise<void> => {\n if (!currentFlow.value) return;\n\n if (formData) touchAllFields();\n\n isInitRequestLoading.value = true;\n error.value = null;\n messages.value = [];\n\n try {\n // Passkey / FIDO\n if (isPasskeyAuthenticator(authenticator)) {\n const challengeData: any = (authenticator.metadata as any)?.additionalData?.challengeData;\n if (!challengeData) throw new Error('Missing challenge data for passkey authentication');\n\n const tokenResponse: any = await handleWebAuthnAuthentication(challengeData);\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: authenticator.authenticatorId,\n params: {tokenResponse},\n },\n };\n const response: any = await props.onSubmit(payload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData);\n return;\n }\n if (\n response?.flowStatus === EmbeddedSignInFlowStatus.FailCompleted ||\n response?.flowStatus === EmbeddedSignInFlowStatus.FailIncomplete\n ) {\n error.value = t('errors.signin.flow.passkeys.completion.failure');\n return;\n }\n processNextStep(response);\n return;\n }\n\n // Redirection prompt (social login first-touch)\n if (authenticator.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt) {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: authenticator.authenticatorId,\n params: {},\n },\n };\n const response: any = await props.onSubmit(payload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData);\n return;\n }\n handleRedirectionIfNeeded(response);\n return;\n }\n\n // Form data submission\n if (formData) {\n if (!validateForm()) return;\n\n const formPayload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: authenticator.authenticatorId,\n params: formData,\n },\n };\n const formResponse: any = await props.onSubmit(formPayload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', formResponse);\n\n if (formResponse?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', formResponse.authData);\n return;\n }\n if (\n formResponse?.flowStatus === EmbeddedSignInFlowStatus.FailCompleted ||\n formResponse?.flowStatus === EmbeddedSignInFlowStatus.FailIncomplete\n ) {\n error.value = t('errors.signin.flow.completion.failure');\n return;\n }\n if (handleRedirectionIfNeeded(formResponse)) return;\n processNextStep(formResponse);\n return;\n }\n\n // No form data \u2014 direct selection or show form\n const hasParams: boolean = !!(authenticator.metadata?.params && authenticator.metadata.params.length > 0);\n if (!hasParams) {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: authenticator.authenticatorId,\n params: {},\n },\n };\n const response: any = await props.onSubmit(payload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData);\n return;\n }\n if (\n response?.flowStatus === EmbeddedSignInFlowStatus.FailCompleted ||\n response?.flowStatus === EmbeddedSignInFlowStatus.FailIncomplete\n ) {\n error.value = t('errors.signin.flow.completion.failure');\n return;\n }\n if (handleRedirectionIfNeeded(response)) return;\n processNextStep(response);\n } else {\n currentAuthenticator.value = authenticator;\n setupFormFields(authenticator);\n }\n } catch (err: any) {\n const errorMessage: string = err instanceof AsgardeoAPIError ? err.message : t('errors.signin.flow.failure');\n error.value = errorMessage;\n emit('error', err);\n } finally {\n isInitRequestLoading.value = false;\n }\n };\n\n // \u2500\u2500 Multi-option checks \u2500\u2500\n\n const hasMultipleOptions = (): boolean =>\n !!(\n currentFlow.value &&\n 'nextStep' in currentFlow.value &&\n currentFlow.value.nextStep?.stepType === EmbeddedSignInFlowStepType.MultiOptionsPrompt &&\n currentFlow.value.nextStep?.authenticators &&\n currentFlow.value.nextStep.authenticators.length > 1\n );\n\n const getAvailableAuthenticators = (): EmbeddedSignInFlowAuthenticator[] => {\n if (!currentFlow.value || !('nextStep' in currentFlow.value) || !currentFlow.value.nextStep?.authenticators) {\n return [];\n }\n return currentFlow.value.nextStep.authenticators;\n };\n\n // \u2500\u2500 Initialize flow on mount \u2500\u2500\n\n let initAttempted: boolean = false;\n\n watch(\n () => props.isLoading,\n (loading: boolean) => {\n if (!loading && !initAttempted && props.onInitialize) {\n initAttempted = true;\n (async (): Promise<void> => {\n isInitRequestLoading.value = true;\n error.value = null;\n\n try {\n const response: any = await props.onInitialize();\n currentFlow.value = response;\n isInitialized.value = true;\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData || {});\n return;\n }\n\n if (response?.nextStep?.authenticators?.length > 0) {\n if (\n response.nextStep.stepType === EmbeddedSignInFlowStepType.MultiOptionsPrompt &&\n response.nextStep.authenticators.length > 1\n ) {\n currentAuthenticator.value = null;\n } else {\n const authenticator: EmbeddedSignInFlowAuthenticator = response.nextStep.authenticators[0];\n currentAuthenticator.value = authenticator;\n setupFormFields(authenticator);\n }\n }\n\n if (response?.nextStep?.messages) {\n messages.value = response.nextStep.messages.map((msg: any) => ({\n message: msg.message || '',\n type: msg.type || 'INFO',\n }));\n }\n } catch (err: any) {\n error.value = err instanceof AsgardeoAPIError ? err.message : t('errors.signin.initialization');\n emit('error', err);\n } finally {\n isInitRequestLoading.value = false;\n }\n })();\n }\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Render helpers \u2500\u2500\n\n const renderAlertVariant = (type: string): string => {\n const lower: string = type.toLowerCase();\n if (lower === 'error') return 'error';\n if (lower === 'warning') return 'warning';\n if (lower === 'success') return 'success';\n return 'info';\n };\n\n const renderMessages = (): VNode[] =>\n messages.value.map((msg: any, i: number) =>\n h(Alert, {key: i, severity: renderAlertVariant(msg.type)}, {default: () => msg.message}),\n );\n\n const renderError = (): VNode | null =>\n error.value ? h(Alert, {severity: 'error'}, {default: () => error.value}) : null;\n\n // \u2500\u2500 Main render function \u2500\u2500\n\n return (): VNode => {\n const cardClass: string = [\n withVendorCSSClassPrefix('signin'),\n withVendorCSSClassPrefix(`signin--${props.size}`),\n withVendorCSSClassPrefix(`signin--${props.variant}`),\n props.className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // Loading state\n if (!isInitialized.value && isLoading()) {\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => [\n h('div', {class: withVendorCSSClassPrefix('signin__loading')}, [\n h(Spinner, {size: 'medium'}),\n h(Typography, {variant: 'body1'}, {default: () => t('messages.loading.placeholder')}),\n ]),\n ],\n },\n ),\n ]);\n }\n\n // Multi-option prompt (no single authenticator selected)\n if (hasMultipleOptions() && !currentAuthenticator.value) {\n const available: EmbeddedSignInFlowAuthenticator[] = getAvailableAuthenticators();\n\n const userPromptAuths: EmbeddedSignInFlowAuthenticator[] = available.filter(\n (auth: any) =>\n auth.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.UserPrompt ||\n (auth.idp === 'LOCAL' && auth.metadata?.params && auth.metadata.params.length > 0),\n );\n\n const optionAuths: EmbeddedSignInFlowAuthenticator[] = available\n .filter((auth: any) => !userPromptAuths.includes(auth))\n .filter((auth: any) => !HIDDEN_AUTHENTICATORS.includes(auth.authenticatorId));\n\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => {\n const children: VNode[] = [];\n\n // Header\n if (props.showTitle || props.showSubtitle) {\n children.push(\n h('div', {class: withVendorCSSClassPrefix('signin__header')}, [\n props.showTitle\n ? h(Typography, {variant: 'h2'}, {default: () => flowTitle.value || t('signin.heading')})\n : null,\n props.showSubtitle\n ? h(\n Typography,\n {variant: 'body1'},\n {default: () => flowSubtitle.value || t('signin.subheading')},\n )\n : null,\n ]),\n );\n }\n\n // Flow messages\n if (flowMessages.value?.length > 0) {\n children.push(\n h(\n 'div',\n {class: withVendorCSSClassPrefix('signin__flow-messages')},\n flowMessages.value.map((fm: any, i: number) =>\n h(Alert, {key: fm.id || i, severity: fm.type}, {default: () => fm.message}),\n ),\n ),\n );\n }\n\n // Local messages & error\n if (messages.value.length > 0) children.push(h('div', {}, renderMessages()));\n const errNode: VNode | null = renderError();\n if (errNode) children.push(errNode);\n\n // User prompt authenticators (forms)\n userPromptAuths.forEach((auth: EmbeddedSignInFlowAuthenticator, index: number) => {\n if (index > 0) children.push(h(Divider, {}, {default: () => 'OR'}));\n children.push(\n h(\n 'form',\n {\n onSubmit: (e: Event) => {\n e.preventDefault();\n const fd: Record<string, string> = {};\n auth.metadata?.params?.forEach((p: any) => {\n fd[p.param] = formValues.value[p.param] || '';\n });\n handleAuthenticatorSelection(auth, fd);\n },\n },\n [\n createSignInOptionFromAuthenticator(\n auth,\n formValues.value,\n touchedFields.value,\n isLoading(),\n handleInputChange,\n (a: any, fd: any) => handleAuthenticatorSelection(a, fd),\n t,\n {\n buttonClassName: props.buttonClassName,\n error: error.value,\n inputClassName: props.inputClassName,\n },\n ),\n ],\n ),\n );\n });\n\n // Divider between user prompts and options\n if (userPromptAuths.length > 0 && optionAuths.length > 0) {\n children.push(h(Divider, {}, {default: () => 'OR'}));\n }\n\n // Option authenticators (social, multi-option buttons)\n optionAuths.forEach((auth: EmbeddedSignInFlowAuthenticator) => {\n children.push(\n h('div', {key: auth.authenticatorId}, [\n createSignInOptionFromAuthenticator(\n auth,\n formValues.value,\n touchedFields.value,\n isLoading(),\n handleInputChange,\n (a: any, fd: any) => handleAuthenticatorSelection(a, fd),\n t,\n {\n buttonClassName: props.buttonClassName,\n error: error.value,\n inputClassName: props.inputClassName,\n },\n ),\n ]),\n );\n });\n\n return children;\n },\n },\n ),\n ]);\n }\n\n // No authenticator available (error state)\n if (!currentAuthenticator.value) {\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => {\n const errNode: VNode | null = renderError();\n return errNode\n ? [errNode]\n : [h(Typography, {variant: 'body1'}, {default: () => t('messages.loading.placeholder')})];\n },\n },\n ),\n ]);\n }\n\n // Passkey auto-trigger\n if (isPasskeyAuthenticator(currentAuthenticator.value) && !isLoading()) {\n handleAuthenticatorSelection(currentAuthenticator.value);\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => [\n h('div', {style: 'text-align:center'}, [\n h(Spinner, {size: 'large'}),\n h(\n Typography,\n {variant: 'body1'},\n {default: () => t('passkey.authenticating') || 'Authenticating with passkey...'},\n ),\n ]),\n ],\n },\n ),\n ]);\n }\n\n // Single authenticator form\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => {\n const children: VNode[] = [];\n\n // Header\n children.push(\n h('div', {class: withVendorCSSClassPrefix('signin__header')}, [\n h(Typography, {variant: 'h2'}, {default: () => flowTitle.value || t('signin.heading')}),\n h(Typography, {variant: 'body1'}, {default: () => flowSubtitle.value || t('signin.subheading')}),\n ]),\n );\n\n // Flow messages\n if (flowMessages.value?.length > 0) {\n children.push(\n h(\n 'div',\n {class: withVendorCSSClassPrefix('signin__flow-messages')},\n flowMessages.value.map((fm: any, i: number) =>\n h(Alert, {key: fm.id || i, severity: fm.type}, {default: () => fm.message}),\n ),\n ),\n );\n }\n\n // Local messages & error\n if (messages.value.length > 0) children.push(h('div', {}, renderMessages()));\n const errNode: VNode | null = renderError();\n if (errNode) children.push(errNode);\n\n // Form\n children.push(\n h(\n 'form',\n {\n class: withVendorCSSClassPrefix('signin__form'),\n onSubmit: (e: Event) => {\n e.preventDefault();\n const fd: Record<string, string> = {};\n currentAuthenticator.value!.metadata?.params?.forEach((p: any) => {\n fd[p.param] = formValues.value[p.param] || '';\n });\n handleSubmit(fd);\n },\n },\n [\n createSignInOptionFromAuthenticator(\n currentAuthenticator.value,\n formValues.value,\n touchedFields.value,\n isLoading(),\n handleInputChange,\n (_: any, fd: any) => handleSubmit(fd || formValues.value),\n t,\n {\n buttonClassName: props.buttonClassName,\n error: error.value,\n inputClassName: props.inputClassName,\n },\n ),\n ],\n ),\n );\n\n return children;\n },\n },\n ),\n ]);\n };\n },\n});\n\nexport default BaseSignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n ApplicationNativeAuthenticationConstants,\n EmbeddedSignInFlowAuthenticator,\n EmbeddedSignInFlowAuthenticatorKnownIdPType,\n EmbeddedSignInFlowAuthenticatorParamType,\n FieldType,\n} from '@asgardeo/browser';\nimport {type VNode, h} from 'vue';\nimport FacebookButton from '../../../../adapters/FacebookButton';\nimport GitHubButton from '../../../../adapters/GitHubButton';\nimport GoogleButton from '../../../../adapters/GoogleButton';\nimport MicrosoftButton from '../../../../adapters/MicrosoftButton';\nimport {createField} from '../../../../factories/FieldFactory';\nimport Button from '../../../../primitives/Button';\n\n/**\n * Props shared by sign-in option rendering functions.\n */\nexport interface BaseSignInOptionProps {\n authenticator: EmbeddedSignInFlowAuthenticator;\n buttonClassName?: string;\n error?: string | null;\n formValues: Record<string, string>;\n inputClassName?: string;\n isLoading: boolean;\n onInputChange: (param: string, value: string) => void;\n onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;\n t: (key: string, params?: Record<string, string>) => string;\n touchedFields: Record<string, boolean>;\n}\n\n/**\n * Renders form fields for authenticators that require user input (e.g. UsernamePassword, IdentifierFirst).\n */\nconst renderFormFields = (props: BaseSignInOptionProps): VNode[] => {\n const {authenticator, formValues, touchedFields, isLoading, onInputChange, inputClassName, buttonClassName, t} =\n props;\n\n const formFields: any[] =\n authenticator.metadata?.params\n ?.sort((a: any, b: any) => a.order - b.order)\n ?.filter((param: any) => param.param !== 'totp') || [];\n\n const fieldNodes: VNode[] = formFields.map((param: any) =>\n h(\n 'div',\n {key: param.param},\n createField({\n className: inputClassName,\n disabled: isLoading,\n label: param.displayName,\n name: param.param,\n onChange: (value: string) => onInputChange(param.param, value),\n placeholder: t('elements.fields.generic.placeholder', {\n field: (param.displayName || param.param).toLowerCase(),\n }),\n required: authenticator.requiredParams.includes(param.param),\n touched: touchedFields[param.param] || false,\n type:\n param.type === EmbeddedSignInFlowAuthenticatorParamType.String && param.confidential\n ? FieldType.Password\n : FieldType.Text,\n value: formValues[param.param] || '',\n }),\n ),\n );\n\n fieldNodes.push(\n h(\n Button,\n {\n class: buttonClassName,\n color: 'primary',\n 'data-testid': 'asgardeo-signin-submit',\n disabled: isLoading,\n fullWidth: true,\n loading: isLoading,\n type: 'submit',\n variant: 'solid',\n },\n {default: () => t('username.password.buttons.submit.text')},\n ),\n );\n\n return fieldNodes;\n};\n\n/**\n * Renders a multi-option button for authenticators that require selection\n * but no immediate user input (e.g. EmailOtp, SmsOtp, Totp, Passkey).\n */\nconst renderMultiOptionButton = (props: BaseSignInOptionProps): VNode => {\n const {authenticator, isLoading, onSubmit, buttonClassName, t} = props;\n\n let authenticatorName: string = authenticator.authenticator;\n if (authenticator.idp !== EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {\n authenticatorName = authenticator.idp;\n }\n\n const displayName: string = t('elements.buttons.multi.option.text', {connection: authenticatorName});\n\n const iconPathMap: Record<string, string> = {\n [ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp]:\n 'M20 15.5c-1.25 0-2.45-.2-3.57-.57a1.02 1.02 0 0 0-1.02.24l-2.2 2.2a15.074 15.074 0 0 1-6.59-6.59l2.2-2.2c.27-.27.35-.67.24-1.02A11.36 11.36 0 0 1 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1M12 3v10l3-3h6V3z',\n [ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp]:\n 'M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4l-8 5l-8-5V6l8 5l8-5z',\n [ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp]:\n 'M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5z',\n };\n\n const iconPath: string =\n iconPathMap[authenticator.authenticatorId] ||\n 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z';\n\n const icon: VNode = h('svg', {height: '18', viewBox: '0 0 24 24', width: '18', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('path', {d: iconPath, fill: 'currentColor'}),\n ]);\n\n return h(\n Button,\n {\n class: buttonClassName,\n color: 'secondary',\n disabled: isLoading,\n fullWidth: true,\n onClick: () => onSubmit(authenticator),\n startIcon: icon,\n type: 'button',\n variant: 'solid',\n },\n {default: () => displayName},\n );\n};\n\n/**\n * Renders a generic social/federated login button for unknown federated authenticators.\n */\nconst renderSocialButton = (props: BaseSignInOptionProps): VNode => {\n const {authenticator, isLoading, onSubmit, buttonClassName, t} = props;\n\n const socialIcon: VNode = h(\n 'svg',\n {height: '18', viewBox: '0 0 24 24', width: '18', xmlns: 'http://www.w3.org/2000/svg'},\n [\n h('path', {\n d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z',\n fill: 'currentColor',\n }),\n ],\n );\n\n return h(\n Button,\n {\n class: buttonClassName,\n color: 'secondary',\n disabled: isLoading,\n fullWidth: true,\n onClick: () => onSubmit(authenticator),\n startIcon: socialIcon,\n type: 'button',\n variant: 'outline',\n },\n {default: () => t('elements.buttons.social.text', {connection: authenticator.idp})},\n );\n};\n\n/**\n * Creates the appropriate sign-in VNode(s) based on the authenticator's ID.\n */\nexport const createSignInOption = (props: BaseSignInOptionProps): VNode | VNode[] => {\n const {authenticator, onSubmit, buttonClassName, isLoading} = props;\n const hasParams: boolean = !!(authenticator.metadata?.params && authenticator.metadata.params.length > 0);\n\n switch (authenticator.authenticatorId) {\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.UsernamePassword:\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.IdentifierFirst:\n return h('div', {}, renderFormFields(props));\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Google:\n return h(GoogleButton, {\n class: buttonClassName,\n isLoading,\n onClick: () => onSubmit(authenticator),\n });\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.GitHub:\n return h(GitHubButton, {\n class: buttonClassName,\n isLoading,\n onClick: () => onSubmit(authenticator),\n });\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Microsoft:\n return h(MicrosoftButton, {\n class: buttonClassName,\n isLoading,\n onClick: () => onSubmit(authenticator),\n });\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Facebook:\n return h(FacebookButton, {\n class: buttonClassName,\n isLoading,\n onClick: () => onSubmit(authenticator),\n });\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:\n return hasParams ? h('div', {}, renderFormFields(props)) : renderMultiOptionButton(props);\n\n default:\n // Federated (non-LOCAL) authenticators \u2192 generic social button\n if (authenticator.idp !== EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {\n return renderSocialButton(props);\n }\n // LOCAL with params \u2192 form fields fallback; otherwise multi-option button\n return hasParams ? h('div', {}, renderFormFields(props)) : renderMultiOptionButton(props);\n }\n};\n\n/**\n * Convenience function to create sign-in option VNode(s) from an authenticator.\n */\nexport const createSignInOptionFromAuthenticator = (\n authenticator: EmbeddedSignInFlowAuthenticator,\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n isLoading: boolean,\n onInputChange: (param: string, value: string) => void,\n onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void,\n t: (key: string, params?: Record<string, string>) => string,\n options?: {\n buttonClassName?: string;\n error?: string | null;\n inputClassName?: string;\n },\n): VNode | VNode[] =>\n createSignInOption({\n authenticator,\n formValues,\n isLoading,\n onInputChange,\n onSubmit,\n t,\n touchedFields,\n ...options,\n });\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {defineComponent, h, type Component, type SetupContext, type VNode} from 'vue';\nimport useI18n from '../../composables/useI18n';\nimport Button from '../primitives/Button';\n\n/**\n * Facebook Sign-In Button Component.\n * Handles authentication with Facebook identity provider.\n */\nconst FacebookButton: Component = defineComponent({\n emits: ['click'],\n name: 'FacebookButton',\n props: {\n isLoading: {default: false, type: Boolean},\n },\n setup(props: {isLoading: boolean}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {t} = useI18n();\n\n const facebookIcon = (): VNode =>\n h('svg', {height: '18', viewBox: '0 0 512 512', width: '18', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('path', {\n d: 'M448,0H64C28.704,0,0,28.704,0,64v384c0,35.296,28.704,64,64,64h384c35.296,0,64-28.704,64-64V64C512,28.704,483.296,0,448,0z',\n fill: '#1976D2',\n }),\n h('path', {\n d: 'M432,256h-80v-64c0-17.664,14.336-16,32-16h32V96h-64l0,0c-53.024,0-96,42.976-96,96v64h-64v80h64v176h96V336h48L432,256z',\n fill: '#FAFAFA',\n }),\n ]);\n\n return (): VNode =>\n h(\n Button,\n {\n ...attrs,\n color: 'primary' as const,\n disabled: props.isLoading,\n fullWidth: true,\n type: 'button' as const,\n variant: 'solid' as const,\n ...(slots['default'] ? {} : {startIcon: facebookIcon()}),\n onClick: (e: MouseEvent) => emit('click', e),\n },\n () =>\n slots['default']?.({isLoading: props.isLoading}) ??\n (t('elements.buttons.facebook.text') || 'Sign in with Facebook'),\n );\n },\n});\n\nexport default FacebookButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {defineComponent, h, type Component, type SetupContext, type VNode} from 'vue';\nimport useI18n from '../../composables/useI18n';\nimport Button from '../primitives/Button';\n\n/**\n * GitHub Sign-In Button Component.\n * Handles authentication with GitHub identity provider.\n */\nconst GitHubButton: Component = defineComponent({\n emits: ['click'],\n name: 'GitHubButton',\n props: {\n isLoading: {default: false, type: Boolean},\n },\n setup(props: {isLoading: boolean}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {t} = useI18n();\n\n const gitHubIcon = (): VNode =>\n h('svg', {height: '18', viewBox: '0 0 67.91 66.233', width: '18', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('g', {transform: 'translate(-386.96 658.072)'}, [\n h('path', {\n d: 'M420.915-658.072a33.956,33.956,0,0,0-33.955,33.955,33.963,33.963,0,0,0,23.221,32.22c1.7.314,2.32-.737,2.32-1.633,0-.81-.031-3.484-.046-6.322-9.446,2.054-11.44-4.006-11.44-4.006-1.545-3.925-3.77-4.968-3.77-4.968-3.081-2.107.232-2.064.232-2.064,3.41.239,5.205,3.5,5.205,3.5,3.028,5.19,7.943,3.69,9.881,2.822a7.23,7.23,0,0,1,2.156-4.54c-7.542-.859-15.47-3.77-15.47-16.781a13.141,13.141,0,0,1,3.5-9.114,12.2,12.2,0,0,1,.329-8.986s2.851-.913,9.34,3.48a32.545,32.545,0,0,1,8.5-1.143,32.629,32.629,0,0,1,8.506,1.143c6.481-4.393,9.328-3.48,9.328-3.48a12.185,12.185,0,0,1,.333,8.986,13.115,13.115,0,0,1,3.495,9.114c0,13.042-7.943,15.913-15.5,16.754,1.218,1.054,2.3,3.12,2.3,6.288,0,4.543-.039,8.2-.039,9.318,0,.9.611,1.962,2.332,1.629a33.959,33.959,0,0,0,23.2-32.215,33.955,33.955,0,0,0-33.955-33.955',\n fill: 'currentColor',\n }),\n ]),\n ]);\n\n return (): VNode =>\n h(\n Button,\n {\n ...attrs,\n color: 'secondary' as const,\n disabled: props.isLoading,\n fullWidth: true,\n type: 'button' as const,\n variant: 'solid' as const,\n ...(slots['default'] ? {} : {startIcon: gitHubIcon()}),\n onClick: (e: MouseEvent) => emit('click', e),\n },\n () =>\n slots['default']?.({isLoading: props.isLoading}) ??\n (t('elements.buttons.github.text') || 'Sign in with GitHub'),\n );\n },\n});\n\nexport default GitHubButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {defineComponent, h, type Component, type SetupContext, type VNode} from 'vue';\nimport useI18n from '../../composables/useI18n';\nimport Button from '../primitives/Button';\n\n/**\n * Google Sign-In Button Component.\n * Handles authentication with Google identity provider.\n */\nconst GoogleButton: Component = defineComponent({\n emits: ['click'],\n name: 'GoogleButton',\n props: {\n isLoading: {default: false, type: Boolean},\n },\n setup(props: {isLoading: boolean}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {t} = useI18n();\n\n const googleIcon = (): VNode =>\n h('svg', {height: '18', viewBox: '0 0 67.91 67.901', width: '18', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('g', {transform: 'translate(-0.001 -0.001)'}, [\n h('path', {\n d: 'M15.049,160.965l-2.364,8.824-8.639.183a34.011,34.011,0,0,1-.25-31.7h0l7.691,1.41,3.369,7.645a20.262,20.262,0,0,0,.19,13.642Z',\n fill: '#fbbb00',\n transform: 'translate(0 -119.93)',\n }),\n h('path', {\n d: 'M294.24,208.176A33.939,33.939,0,0,1,282.137,241h0l-9.687-.494-1.371-8.559a20.235,20.235,0,0,0,8.706-10.333H261.628V208.176Z',\n fill: '#518ef8',\n transform: 'translate(-226.93 -180.567)',\n }),\n h('path', {\n d: 'M81.668,328.8h0a33.962,33.962,0,0,1-51.161-10.387l11-9.006a20.192,20.192,0,0,0,29.1,10.338Z',\n fill: '#28b446',\n transform: 'translate(-26.463 -268.374)',\n }),\n h('path', {\n d: 'M80.451,7.816l-11,9A20.19,20.19,0,0,0,39.686,27.393l-11.06-9.055h0A33.959,33.959,0,0,1,80.451,7.816Z',\n fill: '#f14336',\n transform: 'translate(-24.828)',\n }),\n ]),\n ]);\n\n return (): VNode =>\n h(\n Button,\n {\n ...attrs,\n color: 'secondary' as const,\n disabled: props.isLoading,\n fullWidth: true,\n type: 'button' as const,\n variant: 'solid' as const,\n ...(slots['default'] ? {} : {startIcon: googleIcon()}),\n onClick: (e: MouseEvent) => emit('click', e),\n },\n () =>\n slots['default']?.({isLoading: props.isLoading}) ??\n (t('elements.buttons.google.text') || 'Sign in with Google'),\n );\n },\n});\n\nexport default GoogleButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {defineComponent, h, type Component, type SetupContext, type VNode} from 'vue';\nimport useI18n from '../../composables/useI18n';\nimport Button from '../primitives/Button';\n\n/**\n * Microsoft Sign-In Button Component.\n * Handles authentication with Microsoft identity provider.\n */\nconst MicrosoftButton: Component = defineComponent({\n emits: ['click'],\n name: 'MicrosoftButton',\n props: {\n isLoading: {default: false, type: Boolean},\n },\n setup(props: {isLoading: boolean}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {t} = useI18n();\n\n const microsoftIcon = (): VNode =>\n h('svg', {height: '14', viewBox: '0 0 23 23', width: '14', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('path', {d: 'M0 0h23v23H0z', fill: '#f3f3f3'}),\n h('path', {d: 'M1 1h10v10H1z', fill: '#f35325'}),\n h('path', {d: 'M12 1h10v10H12z', fill: '#81bc06'}),\n h('path', {d: 'M1 12h10v10H1z', fill: '#05a6f0'}),\n h('path', {d: 'M12 12h10v10H12z', fill: '#ffba08'}),\n ]);\n\n return (): VNode =>\n h(\n Button,\n {\n ...attrs,\n color: 'secondary' as const,\n disabled: props.isLoading,\n fullWidth: true,\n type: 'button' as const,\n variant: 'solid' as const,\n ...(slots['default'] ? {} : {startIcon: microsoftIcon()}),\n onClick: (e: MouseEvent) => emit('click', e),\n },\n () =>\n slots['default']?.({isLoading: props.isLoading}) ??\n (t('elements.buttons.microsoft.text') || 'Sign in with Microsoft'),\n );\n },\n});\n\nexport default MicrosoftButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FieldType} from '@asgardeo/browser';\nimport {type Component, type PropType, type VNode, defineComponent, h} from 'vue';\nimport Checkbox from '../primitives/Checkbox';\nimport DatePicker from '../primitives/DatePicker';\nimport OtpField from '../primitives/OtpField';\nimport PasswordField from '../primitives/PasswordField';\nimport Select, {type SelectOption} from '../primitives/Select/Select';\nimport TextField from '../primitives/TextField';\n\n/**\n * Interface for field configuration.\n */\nexport interface FieldConfig {\n className?: string;\n disabled?: boolean;\n error?: string;\n label: string;\n name: string;\n onBlur?: () => void;\n onChange: (value: string) => void;\n options?: SelectOption[];\n placeholder?: string;\n required: boolean;\n touched?: boolean;\n type: FieldType;\n value: string;\n}\n\ninterface FieldFactorySetupProps {\n className?: string;\n disabled: boolean;\n error?: string;\n label: string;\n name: string;\n options: SelectOption[];\n placeholder?: string;\n required: boolean;\n touched: boolean;\n type: FieldType;\n value: string;\n}\n\n/**\n * Utility function to validate field values based on type.\n */\nexport const validateFieldValue = (\n value: string,\n type: FieldType,\n required: boolean = false,\n touched: boolean = false,\n): string | null => {\n if (required && touched && (!value || value.trim() === '')) {\n return 'This field is required';\n }\n\n if (!value || value.trim() === '') {\n return null;\n }\n\n switch (type) {\n case FieldType.Number: {\n const numValue: number = parseInt(value, 10);\n if (Number.isNaN(numValue)) {\n return 'Please enter a valid number';\n }\n break;\n }\n default:\n break;\n }\n\n return null;\n};\n\n/**\n * Factory function to create form field VNodes based on FieldType.\n */\nexport const createField = (config: FieldConfig): VNode => {\n const {\n name,\n type,\n label,\n required,\n value,\n onChange,\n onBlur,\n disabled = false,\n error,\n className,\n options = [],\n touched = false,\n placeholder,\n } = config;\n\n const validationError: string | null | undefined = error || validateFieldValue(value, type, required, touched);\n\n const commonProps: Record<string, unknown> = {\n class: className,\n 'data-testid': `asgardeo-signin-${name}`,\n disabled,\n error: validationError,\n label,\n modelValue: value,\n name,\n onBlur,\n placeholder,\n required,\n };\n\n switch (type) {\n case FieldType.Password:\n return h(PasswordField, {\n ...commonProps,\n 'onUpdate:modelValue': onChange,\n } as Record<string, unknown>);\n\n case FieldType.Text:\n return h(TextField, {\n ...commonProps,\n autocomplete: 'off',\n 'onUpdate:modelValue': onChange,\n type: 'text',\n } as Record<string, unknown>);\n\n case FieldType.Email:\n return h(TextField, {\n ...commonProps,\n autocomplete: 'email',\n 'onUpdate:modelValue': onChange,\n type: 'email',\n } as Record<string, unknown>);\n\n case FieldType.Date:\n return h(DatePicker, {\n ...commonProps,\n 'onUpdate:modelValue': onChange,\n } as Record<string, unknown>);\n\n case FieldType.Checkbox: {\n const isChecked: boolean = value === 'true' || (value as unknown) === true;\n\n return h(Checkbox, {\n ...commonProps,\n modelValue: isChecked,\n 'onUpdate:modelValue': (checked: boolean) => onChange(checked.toString()),\n } as Record<string, unknown>);\n }\n\n case FieldType.Otp:\n return h(OtpField, {\n ...commonProps,\n 'onUpdate:modelValue': onChange,\n } as Record<string, unknown>);\n\n case FieldType.Number:\n return h(TextField, {\n ...commonProps,\n helperText: 'Enter a numeric value',\n 'onUpdate:modelValue': onChange,\n type: 'number',\n } as Record<string, unknown>);\n\n case FieldType.Select: {\n const fieldOptions: SelectOption[] = options.length > 0 ? options : [];\n\n if (fieldOptions.length > 0) {\n return h(Select, {\n ...commonProps,\n helperText: 'Select from available options',\n 'onUpdate:modelValue': onChange,\n options: fieldOptions,\n } as Record<string, unknown>);\n }\n\n return h(TextField, {\n ...commonProps,\n helperText: 'Enter multiple values separated by commas (e.g., value1, value2, value3)',\n 'onUpdate:modelValue': onChange,\n placeholder: 'value1, value2, value3',\n type: 'text',\n } as Record<string, unknown>);\n }\n\n default:\n return h(TextField, {\n ...commonProps,\n helperText: 'Unknown field type, treating as text',\n 'onUpdate:modelValue': onChange,\n type: 'text',\n } as Record<string, unknown>);\n }\n};\n\n/**\n * FieldFactory \u2014 Vue component wrapper for the field factory.\n */\nconst FieldFactory: Component = defineComponent({\n emits: ['change', 'blur'],\n name: 'FieldFactory',\n props: {\n className: {default: undefined, type: String},\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {required: true, type: String},\n name: {required: true, type: String},\n options: {default: () => [], type: Array as PropType<SelectOption[]>},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n touched: {default: false, type: Boolean},\n type: {required: true, type: String as PropType<FieldType>},\n value: {default: '', type: String},\n },\n setup(props: FieldFactorySetupProps, {emit}: {emit: any}): any {\n return () =>\n createField({\n className: props.className,\n disabled: props.disabled,\n error: props.error,\n label: props.label,\n name: props.name,\n onBlur: () => emit('blur'),\n onChange: (value: string) => emit('change', value),\n options: props.options,\n placeholder: props.placeholder,\n required: props.required,\n touched: props.touched,\n type: props.type,\n value: props.value,\n });\n },\n});\n\nexport default FieldFactory;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoRuntimeError,\n EmbeddedFlowComponentV2 as EmbeddedFlowComponent,\n EmbeddedFlowType,\n EmbeddedSignInFlowRequestV2,\n EmbeddedSignInFlowResponseV2,\n EmbeddedSignInFlowStatusV2,\n EmbeddedSignInFlowTypeV2,\n FlowMetadataResponse,\n} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n ref,\n watch,\n} from 'vue';\nimport BaseSignIn from './BaseSignIn';\nimport useAsgardeo from '../../../../composables/useAsgardeo';\nimport useFlowMeta from '../../../../composables/useFlowMeta';\nimport useI18n from '../../../../composables/useI18n';\nimport {useOAuthCallback} from '../../../../composables/v2/useOAuthCallback';\nimport {initiateOAuthRedirect} from '../../../../utils/oauth';\nimport {normalizeFlowResponse} from '../../../../utils/v2/flowTransformer';\nimport {handlePasskeyAuthentication, handlePasskeyRegistration} from '../../../../utils/v2/passkey';\n\nconst EXECUTION_ID_STORAGE_KEY: string = 'asgardeo_execution_id';\nconst AUTH_ID_STORAGE_KEY: string = 'asgardeo_auth_id';\n\ninterface PasskeyState {\n actionId: string | null;\n challenge: string | null;\n creationOptions: string | null;\n error: Error | null;\n executionId: string | null;\n isActive: boolean;\n}\n\n/**\n * Render props passed to the default scoped slot for custom UI rendering.\n */\nexport interface SignInRenderProps {\n additionalData?: Record<string, any>;\n components: EmbeddedFlowComponent[];\n error: Error | null;\n initialize: () => Promise<void>;\n isInitialized: boolean;\n isLoading: boolean;\n isTimeoutDisabled?: boolean;\n meta: FlowMetadataResponse | null;\n onSubmit: (payload: EmbeddedSignInFlowRequestV2) => Promise<void>;\n}\n\n/**\n * SignIn \u2014 app-native sign-in component with full flow lifecycle management.\n *\n * Initializes the authentication flow, handles passkey authentication/registration,\n * OAuth redirect flows, and renders the UI via `BaseSignIn` or a scoped slot.\n *\n * @example\n * ```vue\n * <!-- Default UI -->\n * <SignIn\n * @success=\"(data) => console.log('Authenticated:', data)\"\n * @error=\"(err) => console.error('Auth failed:', err)\"\n * />\n *\n * <!-- Custom UI via scoped slot -->\n * <SignIn v-slot=\"{ components, onSubmit, isLoading, error }\">\n * <!-- your custom sign-in UI here -->\n * </SignIn>\n * ```\n */\nconst SignIn: Component = defineComponent({\n emits: ['error', 'success'],\n name: 'SignIn',\n props: {\n className: {default: '', type: String},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(\n props: Readonly<{className: string; size: 'small' | 'medium' | 'large'; variant: 'elevated' | 'outlined' | 'flat'}>,\n {slots, emit, attrs}: SetupContext,\n ): () => VNode | null {\n const {applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading} = useAsgardeo();\n const {meta: flowMeta} = useFlowMeta();\n const {t} = useI18n();\n\n // Flow state\n const components: Ref<EmbeddedFlowComponent[]> = ref([]);\n const additionalData: Ref<Record<string, any>> = ref({});\n const currentExecutionId: Ref<string | null> = ref(null);\n const isFlowInitialized: Ref<boolean> = ref(false);\n const flowError: Ref<Error | null> = ref(null);\n const isSubmitting: Ref<boolean> = ref(false);\n const isTimeoutDisabled: Ref<boolean> = ref(false);\n const passkeyState: Ref<PasskeyState> = ref({\n actionId: null,\n challenge: null,\n creationOptions: null,\n error: null,\n executionId: null,\n isActive: false,\n });\n\n // Track one-time initialization and OAuth processing\n let initializationAttempted: boolean = false;\n const oauthCodeProcessedFlag: {value: boolean} = {value: false};\n let passkeyProcessed: boolean = false;\n\n // \u2500\u2500 Helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n const persistExecutionId = (executionId: string | null): void => {\n currentExecutionId.value = executionId;\n if (executionId) {\n sessionStorage.setItem(EXECUTION_ID_STORAGE_KEY, executionId);\n } else {\n sessionStorage.removeItem(EXECUTION_ID_STORAGE_KEY);\n }\n };\n\n const clearFlowState = (): void => {\n persistExecutionId(null);\n isFlowInitialized.value = false;\n sessionStorage.removeItem(AUTH_ID_STORAGE_KEY);\n isTimeoutDisabled.value = false;\n oauthCodeProcessedFlag.value = false;\n };\n\n interface UrlParams {\n applicationId: string | null;\n authId: string | null;\n code: string | null;\n error: string | null;\n errorDescription: string | null;\n executionId: string | null;\n nonce: string | null;\n state: string | null;\n }\n\n const getUrlParams = (): UrlParams => {\n const params: URLSearchParams = new URLSearchParams(window?.location?.search ?? '');\n return {\n applicationId: params.get('applicationId'),\n authId: params.get('authId'),\n code: params.get('code'),\n error: params.get('error'),\n errorDescription: params.get('error_description'),\n executionId: params.get('executionId'),\n nonce: params.get('nonce'),\n state: params.get('state'),\n };\n };\n\n const cleanupOAuthUrlParams = (): void => {\n if (!window?.location?.href) return;\n const url: URL = new URL(window.location.href);\n ['error', 'error_description', 'code', 'state', 'nonce'].forEach((p: string) => url.searchParams.delete(p));\n window.history.replaceState({}, '', url.toString());\n };\n\n const cleanupFlowUrlParams = (): void => {\n if (!window?.location?.href) return;\n const url: URL = new URL(window.location.href);\n ['executionId', 'authId', 'applicationId'].forEach((p: string) => url.searchParams.delete(p));\n window.history.replaceState({}, '', url.toString());\n };\n\n const setError = (error: Error): void => {\n flowError.value = error;\n isFlowInitialized.value = true;\n emit('error', error);\n };\n\n // \u2500\u2500 Flow initialization \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n const initializeFlow = async (): Promise<void> => {\n const urlParams: UrlParams = getUrlParams();\n\n oauthCodeProcessedFlag.value = false;\n\n if (urlParams.authId) {\n sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);\n }\n\n const effectiveApplicationId: string | null | undefined =\n (applicationId as string | undefined) || urlParams.applicationId;\n\n if (!urlParams.executionId && !effectiveApplicationId) {\n const err: AsgardeoRuntimeError = new AsgardeoRuntimeError(\n 'Either executionId or applicationId is required for authentication',\n 'SIGN_IN_ERROR',\n 'vue',\n );\n setError(err);\n throw err;\n }\n\n try {\n flowError.value = null;\n\n let response: EmbeddedSignInFlowResponseV2;\n\n if (urlParams.executionId) {\n response = (await signIn({executionId: urlParams.executionId})) as EmbeddedSignInFlowResponseV2;\n } else {\n response = (await signIn({\n applicationId: effectiveApplicationId,\n flowType: EmbeddedFlowType.Authentication,\n })) as EmbeddedSignInFlowResponseV2;\n }\n\n // Handle OAuth redirect types\n if (response.type === EmbeddedSignInFlowTypeV2.Redirection) {\n const redirectURL: string | undefined = (response.data as any)?.redirectURL || (response as any)?.redirectURL;\n if (redirectURL && window?.location) {\n if (response.executionId) persistExecutionId(response.executionId);\n if (urlParams.authId) sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);\n initiateOAuthRedirect(redirectURL);\n return;\n }\n }\n\n const {\n executionId: normalizedExecutionId,\n components: normalizedComponents,\n additionalData: normalizedAdditionalData,\n } = normalizeFlowResponse(response, t, {resolveTranslations: false}, flowMeta.value);\n\n if (normalizedExecutionId && normalizedComponents) {\n persistExecutionId(normalizedExecutionId);\n components.value = normalizedComponents;\n additionalData.value = normalizedAdditionalData ?? {};\n isFlowInitialized.value = true;\n isTimeoutDisabled.value = false;\n cleanupFlowUrlParams();\n }\n } catch (error: unknown) {\n const err: any = error as any;\n clearFlowState();\n const errorMessage: string = err?.failureReason || (err instanceof Error ? err.message : String(err));\n setError(new Error(errorMessage));\n initializationAttempted = false;\n }\n };\n\n // \u2500\u2500 Submit handler \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n const handleSubmit = async (payload: EmbeddedSignInFlowRequestV2): Promise<void> => {\n const effectiveExecutionId: string | null = payload.executionId || currentExecutionId.value;\n\n if (!effectiveExecutionId) {\n throw new Error('No active flow ID');\n }\n\n const processedInputs: Record<string, any> = {...payload.inputs};\n\n // Auto-compile consent decisions if on a consent prompt step\n if (additionalData.value?.['consentPrompt']) {\n try {\n const consentRaw: any = additionalData.value['consentPrompt'];\n const purposes: any[] =\n typeof consentRaw === 'string' ? JSON.parse(consentRaw) : consentRaw.purposes || consentRaw;\n\n let isDeny: boolean = false;\n if (payload.action) {\n const findAction = (comps: any[]): any => {\n if (!comps?.length) return null;\n const found: any = comps.find((c: any) => c.id === payload.action);\n if (found) return found;\n return comps.reduce((acc: any, c: any) => acc || (c.components ? findAction(c.components) : null), null);\n };\n const submitAction: any = findAction(components.value as any[]);\n if (submitAction && submitAction.variant?.toLowerCase() !== 'primary') {\n isDeny = true;\n }\n }\n\n const decisions: Record<string, any> = {\n purposes: purposes.map((p: any) => ({\n approved: !isDeny,\n elements: [\n ...(p.essential || []).map((attr: string) => ({approved: !isDeny, name: attr})),\n ...(p.optional || []).map((attr: string) => {\n const key: string = `__consent_opt__${p.purpose_id}__${attr}`;\n return {approved: isDeny ? false : processedInputs[key] !== 'false', name: attr};\n }),\n ],\n purpose_name: p.purpose_name,\n })),\n };\n processedInputs['consent_decisions'] = JSON.stringify(decisions);\n\n Object.keys(processedInputs).forEach((key: string) => {\n if (key.startsWith('__consent_opt__')) delete processedInputs[key];\n });\n } catch {\n // Ignore consent construction failures\n }\n }\n\n try {\n isSubmitting.value = true;\n flowError.value = null;\n\n const response: EmbeddedSignInFlowResponseV2 = (await signIn({\n executionId: effectiveExecutionId,\n ...payload,\n inputs: processedInputs,\n })) as EmbeddedSignInFlowResponseV2;\n\n // Handle OAuth redirect\n if (response.type === EmbeddedSignInFlowTypeV2.Redirection) {\n const redirectURL: string | undefined = (response.data as any)?.redirectURL || (response as any)?.redirectURL;\n if (redirectURL && window?.location) {\n if (response.executionId) persistExecutionId(response.executionId);\n const urlParams: UrlParams = getUrlParams();\n if (urlParams.authId) sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);\n initiateOAuthRedirect(redirectURL);\n return;\n }\n }\n\n // Handle passkey challenge in response\n if (\n response.data?.additionalData?.['passkeyChallenge'] ||\n response.data?.additionalData?.['passkeyCreationOptions']\n ) {\n const {passkeyChallenge, passkeyCreationOptions} = response.data.additionalData as any;\n passkeyProcessed = false;\n passkeyState.value = {\n actionId: 'submit',\n challenge: passkeyChallenge || null,\n creationOptions: passkeyCreationOptions || null,\n error: null,\n executionId: response.executionId || effectiveExecutionId,\n isActive: true,\n };\n isSubmitting.value = false;\n return;\n }\n\n const {\n executionId: normalizedExecutionId,\n components: normalizedComponents,\n additionalData: normalizedAdditionalData,\n } = normalizeFlowResponse(response, t, {resolveTranslations: false}, flowMeta.value);\n\n // Handle error flow status\n if (response.flowStatus === EmbeddedSignInFlowStatusV2.Error) {\n clearFlowState();\n const failureReason: string =\n (response as any)?.failureReason || 'Authentication flow failed. Please try again.';\n const err: Error = new Error(failureReason);\n setError(err);\n cleanupFlowUrlParams();\n throw err;\n }\n\n // Handle flow completion\n if (response.flowStatus === EmbeddedSignInFlowStatusV2.Complete) {\n const redirectUrl: string | undefined = (response as any)?.redirectUrl || (response as any)?.redirect_uri;\n const finalRedirectUrl: string | undefined = redirectUrl || afterSignInUrl;\n\n isSubmitting.value = false;\n persistExecutionId(null);\n isFlowInitialized.value = false;\n sessionStorage.removeItem(AUTH_ID_STORAGE_KEY);\n cleanupOAuthUrlParams();\n\n emit('success', {\n redirectUrl: finalRedirectUrl,\n ...(response.data || {}),\n });\n\n if (finalRedirectUrl && window?.location) {\n window.location.href = finalRedirectUrl;\n }\n return;\n }\n\n // Update flow state for next step\n if (normalizedExecutionId && normalizedComponents) {\n persistExecutionId(normalizedExecutionId);\n components.value = normalizedComponents;\n additionalData.value = normalizedAdditionalData ?? {};\n isTimeoutDisabled.value = false;\n isFlowInitialized.value = true;\n cleanupFlowUrlParams();\n\n if ((response as any)?.failureReason) {\n flowError.value = new Error((response as any).failureReason);\n }\n }\n } catch (error: unknown) {\n const err: any = error as any;\n if (err instanceof Error && flowError.value === err) {\n // Already set; re-throw\n throw err;\n }\n clearFlowState();\n const errorMessage: string = err?.failureReason || (err instanceof Error ? err.message : String(err));\n setError(new Error(errorMessage));\n } finally {\n isSubmitting.value = false;\n }\n };\n\n // \u2500\u2500 Step timeout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n let timeoutHandle: ReturnType<typeof setTimeout> | null = null;\n\n const scheduleTimeout = (timeoutMs: number): void => {\n if (timeoutHandle) clearTimeout(timeoutHandle);\n if (timeoutMs <= 0 || !isFlowInitialized.value) {\n isTimeoutDisabled.value = false;\n return;\n }\n const remaining: number = Math.max(0, Math.floor((timeoutMs - Date.now()) / 1000));\n if (remaining <= 0) {\n isTimeoutDisabled.value = true;\n setError(new Error(t('errors.signin.timeout') || 'Time allowed to complete the step has expired.'));\n return;\n }\n timeoutHandle = setTimeout(() => {\n isTimeoutDisabled.value = true;\n setError(new Error(t('errors.signin.timeout') || 'Time allowed to complete the step has expired.'));\n }, remaining * 1000);\n };\n\n watch(\n () => [additionalData.value?.['stepTimeout'], isFlowInitialized.value] as [number | undefined, boolean],\n ([timeoutMs]: [number | undefined, boolean]) => {\n scheduleTimeout(Number(timeoutMs) || 0);\n },\n );\n\n onUnmounted(() => {\n if (timeoutHandle) clearTimeout(timeoutHandle);\n });\n\n // \u2500\u2500 Passkey processing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n watch(\n () => passkeyState.value,\n async (state: PasskeyState) => {\n if (!state.isActive || (!state.challenge && !state.creationOptions) || !state.executionId) return;\n if (passkeyProcessed) return;\n passkeyProcessed = true;\n\n try {\n let inputs: Record<string, string>;\n\n if (state.challenge) {\n const passkeyResponse: string = await handlePasskeyAuthentication(state.challenge);\n const obj: any = JSON.parse(passkeyResponse);\n inputs = {\n authenticatorData: obj.response.authenticatorData,\n clientDataJSON: obj.response.clientDataJSON,\n credentialId: obj.id,\n signature: obj.response.signature,\n userHandle: obj.response.userHandle,\n };\n } else if (state.creationOptions) {\n const passkeyResponse: string = await handlePasskeyRegistration(state.creationOptions);\n const obj: any = JSON.parse(passkeyResponse);\n inputs = {\n attestationObject: obj.response.attestationObject,\n clientDataJSON: obj.response.clientDataJSON,\n credentialId: obj.id,\n };\n } else {\n throw new Error('No passkey challenge or creation options available');\n }\n\n await handleSubmit({executionId: state.executionId!, inputs});\n\n passkeyState.value = {\n actionId: null,\n challenge: null,\n creationOptions: null,\n error: null,\n executionId: null,\n isActive: false,\n };\n } catch (error: unknown) {\n const err: Error = error as Error;\n passkeyState.value = {...passkeyState.value, error: err, isActive: false};\n flowError.value = err;\n emit('error', err);\n }\n },\n {deep: true},\n );\n\n // \u2500\u2500 OAuth callback (via composable) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n useOAuthCallback({\n currentExecutionId,\n executionIdStorageKey: EXECUTION_ID_STORAGE_KEY,\n isInitialized,\n isSubmitting,\n onError: (err: any) => {\n // Guard against double-processing when handleSubmit already set the error\n if (!flowError.value) {\n clearFlowState();\n setError(err instanceof Error ? err : new Error(String(err)));\n }\n },\n onSubmit: (payload: EmbeddedSignInFlowRequestV2) =>\n handleSubmit({executionId: payload.executionId, inputs: payload.inputs}),\n processedFlag: oauthCodeProcessedFlag,\n setExecutionId: persistExecutionId,\n });\n\n // \u2500\u2500 Lifecycle \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n onMounted(() => {\n const urlParams: UrlParams = getUrlParams();\n\n if (urlParams.authId) {\n sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);\n }\n });\n\n // Initialize flow when SDK is ready (OAuth callback is handled by useOAuthCallback)\n watch(\n () =>\n [\n isInitialized.value,\n sdkLoading.value,\n isFlowInitialized.value,\n currentExecutionId.value,\n isSubmitting.value,\n ] as [boolean, boolean, boolean, string | null, boolean],\n ([initialized, loading, flowInit, executionId, submitting]: [\n boolean,\n boolean,\n boolean,\n string | null,\n boolean,\n ]) => {\n const urlParams: UrlParams = getUrlParams();\n const hasOAuthCode: boolean = !!urlParams.code;\n const hasOAuthState: boolean = !!urlParams.state;\n\n // Initialize flow when SDK is ready and no flow is active\n if (\n initialized &&\n !loading &&\n !flowInit &&\n !initializationAttempted &&\n !executionId &&\n !hasOAuthCode &&\n !hasOAuthState &&\n !submitting &&\n !oauthCodeProcessedFlag.value\n ) {\n initializationAttempted = true;\n initializeFlow();\n }\n },\n );\n\n // \u2500\u2500 Render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n return (): VNode | null => {\n const combinedIsLoading: boolean = sdkLoading.value || isSubmitting.value || !isInitialized.value;\n\n // Scoped slot / render props pattern\n if (slots['default']) {\n const renderProps: SignInRenderProps = {\n additionalData: additionalData.value,\n components: components.value,\n error: flowError.value,\n initialize: initializeFlow,\n isInitialized: isFlowInitialized.value,\n isLoading: combinedIsLoading,\n isTimeoutDisabled: isTimeoutDisabled.value,\n meta: flowMeta.value,\n onSubmit: handleSubmit,\n };\n return h('div', {}, slots['default'](renderProps));\n }\n\n // Default BaseSignIn rendering\n return h(BaseSignIn, {\n ...attrs,\n additionalData: additionalData.value,\n class: props.className,\n components: components.value,\n error: flowError.value,\n isLoading: combinedIsLoading || !isFlowInitialized.value,\n isTimeoutDisabled: isTimeoutDisabled.value,\n onError: (err: Error) => emit('error', err),\n onSubmit: handleSubmit,\n size: props.size,\n variant: props.variant,\n });\n };\n },\n});\n\nexport default SignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n withVendorCSSClassPrefix,\n EmbeddedSignInFlowRequestV2 as EmbeddedSignInFlowRequest,\n EmbeddedFlowComponentV2 as EmbeddedFlowComponent,\n FlowMetadataResponse,\n} from '@asgardeo/browser';\nimport {\n type ComputedRef,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n computed,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport {renderSignInComponents} from './AuthOptionFactory';\nimport useFlow from '../../../../composables/useFlow';\nimport useFlowMeta from '../../../../composables/useFlowMeta';\nimport useI18n from '../../../../composables/useI18n';\nimport {extractErrorMessage} from '../../../../utils/v2/flowTransformer';\nimport Alert from '../../../primitives/Alert';\nimport Card from '../../../primitives/Card';\nimport Spinner from '../../../primitives/Spinner';\nimport Typography from '../../../primitives/Typography';\n\n/**\n * Render props passed to the default scoped slot for custom UI rendering.\n */\nexport interface BaseSignInRenderProps {\n components: EmbeddedFlowComponent[];\n error?: Error | null;\n fieldErrors: Record<string, string>;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: EmbeddedFlowComponent, data?: Record<string, any>) => Promise<void>;\n isLoading: boolean;\n isTimeoutDisabled?: boolean;\n isValid: boolean;\n messages: Array<{message: string; type: string}>;\n meta: FlowMetadataResponse | null;\n subtitle: string | undefined;\n title: string;\n touched: Record<string, boolean>;\n validateForm: () => {fieldErrors: Record<string, string>; isValid: boolean};\n values: Record<string, string>;\n}\n\nexport interface BaseSignInProps {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n className?: string;\n components?: EmbeddedFlowComponent[];\n error?: Error | null;\n errorClassName?: string;\n inputClassName?: string;\n isLoading?: boolean;\n isTimeoutDisabled?: boolean;\n messageClassName?: string;\n onSubmit?: (payload: EmbeddedSignInFlowRequest, component: EmbeddedFlowComponent) => Promise<void>;\n size?: 'small' | 'medium' | 'large';\n variant?: 'elevated' | 'outlined' | 'flat';\n}\n\ninterface FieldDefinition {\n name: string;\n required: boolean;\n type: string;\n}\n\nconst extractFormFields = (flowComponents: EmbeddedFlowComponent[]): FieldDefinition[] => {\n const fields: FieldDefinition[] = [];\n const process = (comps: EmbeddedFlowComponent[]): void => {\n comps.forEach((c: any) => {\n if (c.type === 'TEXT_INPUT' || c.type === 'PASSWORD_INPUT' || c.type === 'EMAIL_INPUT' || c.type === 'SELECT') {\n fields.push({name: c.ref, required: c.required || false, type: c.type});\n }\n if (c.components) {\n process(c.components);\n }\n });\n };\n process(flowComponents);\n return fields;\n};\n\n/**\n * BaseSignIn \u2014 unstyled app-native sign-in presentation component.\n *\n * Renders the server-driven UI components from an embedded authentication flow.\n * Manages local form state (values, touched, errors) and delegates submission to the parent SignIn component.\n *\n * Supports render props via the `default` scoped slot for complete UI customization.\n *\n * @example\n * ```vue\n * <!-- Default UI -->\n * <BaseSignIn :components=\"flowComponents\" :on-submit=\"handleSubmit\" />\n *\n * <!-- Custom UI via scoped slot -->\n * <BaseSignIn :components=\"flowComponents\" :on-submit=\"handleSubmit\" v-slot=\"{ values, handleInputChange, handleSubmit }\">\n * <input :value=\"values.username\" @input=\"handleInputChange('username', $event.target.value)\" />\n * <button @click=\"handleSubmit(submitComponent)\">Sign In</button>\n * </BaseSignIn>\n * ```\n */\nconst BaseSignIn: Component = defineComponent({\n emits: ['error', 'success'],\n name: 'BaseSignIn',\n props: {\n additionalData: {\n default: (): Record<string, any> => ({}),\n type: Object as PropType<Record<string, any>>,\n },\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n components: {\n default: (): EmbeddedFlowComponent[] => [],\n type: Array as PropType<EmbeddedFlowComponent[]>,\n },\n error: {default: null, type: Object as PropType<Error | null>},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n isLoading: {default: false, type: Boolean},\n isTimeoutDisabled: {default: false, type: Boolean},\n messageClassName: {default: '', type: String},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(\n props: Readonly<{\n additionalData: Record<string, any>;\n buttonClassName: string;\n className: string;\n components: EmbeddedFlowComponent[];\n error: Error | null;\n errorClassName: string;\n inputClassName: string;\n isLoading: boolean;\n isTimeoutDisabled: boolean;\n messageClassName: string;\n onSubmit?: (payload: EmbeddedSignInFlowRequest, component: EmbeddedFlowComponent) => Promise<void>;\n size: 'small' | 'medium' | 'large';\n variant: 'elevated' | 'outlined' | 'flat';\n }>,\n {slots, emit, attrs}: SetupContext,\n ): () => VNode | null {\n const {meta: metaRef} = useFlowMeta();\n const {t} = useI18n();\n const {subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages} = useFlow();\n\n const isSubmitting: Ref<boolean> = ref(false);\n const apiError: Ref<Error | null> = ref(null);\n\n const isLoading: ComputedRef<boolean> = computed<boolean>(() => props.isLoading || isSubmitting.value);\n\n // Form state\n const formValues: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n\n // Reset form state when components change (new flow step)\n watch(\n () => props.components,\n (newComponents: EmbeddedFlowComponent[]) => {\n const fields: FieldDefinition[] = extractFormFields(newComponents || []);\n const freshValues: Record<string, string> = {};\n fields.forEach((f: FieldDefinition) => {\n freshValues[f.name] = '';\n });\n formValues.value = freshValues;\n touchedFields.value = {};\n },\n {deep: false, immediate: true},\n );\n\n // Computed form errors based on current values + touched\n const formErrors: ComputedRef<Record<string, string>> = computed<Record<string, string>>(() => {\n const fields: FieldDefinition[] = extractFormFields(props.components || []);\n const errors: Record<string, string> = {};\n fields.forEach((field: FieldDefinition) => {\n const value: string = formValues.value[field.name] || '';\n const isTouched: boolean = touchedFields.value[field.name] || false;\n if (field.required && isTouched && (!value || value.trim() === '')) {\n errors[field.name] = t('validations.required.field.error') || 'This field is required';\n }\n if (field.type === 'EMAIL_INPUT' && value && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) {\n errors[field.name] = t('field.email.invalid') || 'Invalid email address';\n }\n });\n return errors;\n });\n\n const isFormValid: ComputedRef<boolean> = computed<boolean>(() => Object.keys(formErrors.value).length === 0);\n\n const handleError = (error: any): void => {\n const errorMessage: string = (error as any)?.failureReason || extractErrorMessage(error, t);\n apiError.value = error instanceof Error ? error : new Error(errorMessage);\n clearMessages();\n addMessage({message: errorMessage, type: 'error'});\n };\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n };\n\n const handleInputBlur = (name: string): void => {\n touchedFields.value = {...touchedFields.value, [name]: true};\n };\n\n const touchAllFields = (): void => {\n const fields: FieldDefinition[] = extractFormFields(props.components || []);\n const newTouched: Record<string, boolean> = {};\n fields.forEach((f: FieldDefinition) => {\n newTouched[f.name] = true;\n });\n touchedFields.value = newTouched;\n };\n\n const validateForm = (): {fieldErrors: Record<string, string>; isValid: boolean} => {\n touchAllFields();\n const errors: Record<string, string> = formErrors.value;\n return {fieldErrors: errors, isValid: Object.keys(errors).length === 0};\n };\n\n const handleSubmit = async (\n component: EmbeddedFlowComponent,\n data?: Record<string, any>,\n skipValidation?: boolean,\n ): Promise<void> => {\n if (!skipValidation) {\n const {isValid} = validateForm();\n if (!isValid) return;\n }\n\n isSubmitting.value = true;\n apiError.value = null;\n clearMessages();\n\n try {\n const filteredInputs: Record<string, any> = {};\n if (data) {\n Object.keys(data).forEach((key: string) => {\n if (data[key] !== undefined && data[key] !== null && data[key] !== '') {\n filteredInputs[key] = data[key];\n }\n });\n }\n\n const payload: EmbeddedSignInFlowRequest = {\n ...((component as any).id ? {action: (component as any).id} : {}),\n inputs: filteredInputs,\n };\n\n await props.onSubmit?.(payload, component);\n } catch (err: unknown) {\n handleError(err);\n emit('error', err);\n } finally {\n isSubmitting.value = false;\n }\n };\n\n const renderComponents = (): VNode[] =>\n renderSignInComponents(\n props.components || [],\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid.value,\n handleInputChange,\n {\n additionalData: props.additionalData,\n buttonClassName: props.buttonClassName,\n inputClassName: props.inputClassName,\n isTimeoutDisabled: props.isTimeoutDisabled,\n meta: (metaRef as Ref<FlowMetadataResponse | null>).value,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size: props.size,\n t,\n },\n );\n\n return (): VNode | null => {\n const containerClass: string = [\n withVendorCSSClassPrefix('signin'),\n withVendorCSSClassPrefix(`signin--${props.size}`),\n withVendorCSSClassPrefix(`signin--${props.variant}`),\n props.className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // If a scoped slot is provided, use render props pattern\n if (slots['default']) {\n const renderProps: BaseSignInRenderProps = {\n components: props.components || [],\n error: apiError.value,\n fieldErrors: formErrors.value,\n handleInputChange,\n handleSubmit,\n isLoading: isLoading.value,\n isTimeoutDisabled: props.isTimeoutDisabled,\n isValid: isFormValid.value,\n messages: (flowMessages as Ref<Array<{message: string; type: string}>>).value || [],\n meta: (metaRef as Ref<FlowMetadataResponse | null>).value,\n subtitle: (flowSubtitle as Ref<string | undefined>).value,\n title: (flowTitle as Ref<string>).value || t('signin.heading') || 'Sign In',\n touched: touchedFields.value,\n validateForm,\n values: formValues.value,\n };\n return h('div', {class: containerClass, ...attrs}, slots['default'](renderProps));\n }\n\n // Loading state\n if (isLoading.value && (!props.components || props.components.length === 0)) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;justify-content:center;padding:2rem'}, h(Spinner)),\n );\n }\n\n // No components available\n if (!props.components || props.components.length === 0) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h(Alert, {severity: 'warning'}, () =>\n h(\n Typography,\n {variant: 'body1'},\n () => t('errors.signin.components.not.available') || 'No sign-in options available',\n ),\n ),\n );\n }\n\n const messages: Array<{message: string; type: string}> =\n (flowMessages as Ref<Array<{message: string; type: string}>>).value || [];\n const externalError: Error | null = props.error;\n\n return h(Card, {class: containerClass, ...attrs, variant: props.variant}, () => [\n // Show errors and flow messages\n (externalError || messages.length > 0) &&\n h(\n 'div',\n {class: [withVendorCSSClassPrefix('signin__messages'), props.messageClassName].filter(Boolean).join(' ')},\n [\n externalError &&\n h(Alert, {severity: 'error'}, () => h(Typography, {variant: 'body2'}, () => externalError.message)),\n ...messages.map((msg: {message: string; type: string}, index: number) =>\n h(Alert, {key: index, severity: msg.type === 'error' ? 'error' : 'info'}, () =>\n h(Typography, {variant: 'body2'}, () => msg.message),\n ),\n ),\n ],\n ),\n // Render flow components\n h('div', {class: withVendorCSSClassPrefix('signin__content')}, renderComponents()),\n ]);\n };\n },\n});\n\nexport default BaseSignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n FieldType,\n FlowMetadataResponse,\n EmbeddedFlowComponentV2 as EmbeddedFlowComponent,\n EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,\n EmbeddedFlowTextVariantV2 as EmbeddedFlowTextVariant,\n EmbeddedFlowEventTypeV2 as EmbeddedFlowEventType,\n resolveFlowTemplateLiterals,\n extractEmojiFromUri,\n isEmojiUri,\n ConsentPurposeDataV2 as ConsentPurposeData,\n ConsentPromptDataV2 as ConsentPromptData,\n ConsentDecisionsV2 as ConsentDecisions,\n ConsentPurposeDecisionV2 as ConsentPurposeDecision,\n ConsentAttributeElementV2 as ConsentAttributeElement,\n} from '@asgardeo/browser';\nimport DOMPurify from 'dompurify';\nimport {h, type VNode} from 'vue';\nimport {createVueLogger} from '../../../utils/logger';\nimport FacebookButton from '../../adapters/FacebookButton';\nimport GitHubButton from '../../adapters/GitHubButton';\nimport GoogleButton from '../../adapters/GoogleButton';\nimport MicrosoftButton from '../../adapters/MicrosoftButton';\nimport {createField} from '../../factories/FieldFactory';\nimport Button from '../../primitives/Button';\nimport Divider from '../../primitives/Divider';\nimport Select from '../../primitives/Select/Select';\nimport Typography from '../../primitives/Typography';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('AuthOptionFactory');\n\n/**\n * Inline helper for consent optional attribute key (mirrors ConsentCheckboxList.getConsentOptionalKey).\n */\nconst getConsentOptionalKey = (purposeId: string | number, attr: string): string => `consent_${purposeId}_${attr}`;\n\n/**\n * Replaces `emoji:` URIs embedded in HTML before DOMPurify sanitization.\n *\n * DOMPurify strips unknown URI schemes from attributes (e.g. `src=\"emoji:\uD83E\uDD8A\"` \u2192 `src=\"\"`).\n * Converting them to inline spans first preserves the emoji content through sanitization.\n *\n * Converts:\n * - `<img src=\"emoji:X\" alt=\"Y\">` \u2192 `<span role=\"img\" aria-label=\"Y\">X</span>`\n * - Any remaining `emoji:X` text occurrences \u2192 `X`\n */\nconst resolveEmojiUrisInHtml = (html: string): string => {\n const withEmojiImages: string = html.replace(\n /<img([^>]*)src=\"(emoji:[^\"]+)\"([^>]*)\\/?>/gi,\n (_match: string, pre: string, src: string, post: string): string => {\n const emoji: string = extractEmojiFromUri(src);\n if (!emoji) {\n return _match;\n }\n const altMatch: RegExpMatchArray | null = (pre + post).match(/alt=\"([^\"]*)\"/i);\n const label: string = altMatch ? altMatch[1] : emoji;\n return `<span role=\"img\" aria-label=\"${label}\">${emoji}</span>`;\n },\n );\n return withEmojiImages.replace(/emoji:([^\\s\"<>&]+)/g, (_: string, rest: string): string =>\n isEmojiUri(`emoji:${rest}`) ? rest : `emoji:${rest}`,\n );\n};\n\ntype TranslationFn = (key: string, params?: Record<string, string | number>) => string;\n\n/**\n * Get the appropriate FieldType for an input component.\n */\nconst getFieldType = (variant: EmbeddedFlowComponentType): FieldType => {\n switch (variant) {\n case EmbeddedFlowComponentType.EmailInput:\n return FieldType.Email;\n case EmbeddedFlowComponentType.PasswordInput:\n return FieldType.Password;\n case EmbeddedFlowComponentType.TextInput:\n default:\n return FieldType.Text;\n }\n};\n\n/**\n * Get typography variant from component variant.\n */\nconst getTypographyVariant = (variant: string): any => {\n const variantMap: Record<string, string> = {\n BODY_1: 'body1',\n BODY_2: 'body2',\n BUTTON_TEXT: 'body2',\n CAPTION: 'caption',\n HEADING_1: 'h1',\n HEADING_2: 'h2',\n HEADING_3: 'h3',\n HEADING_4: 'h4',\n HEADING_5: 'h5',\n HEADING_6: 'h6',\n OVERLINE: 'overline',\n SUBTITLE_1: 'subtitle1',\n SUBTITLE_2: 'subtitle2',\n } as Record<EmbeddedFlowTextVariant, string>;\n\n return variantMap[variant] || 'h3';\n};\n\n/**\n * Check if a button text or action matches a social provider.\n */\nconst matchesSocialProvider = (actionId: string, eventType: string, buttonText: string, provider: string): boolean => {\n const providerId: string = `${provider}_auth`;\n const providerMatches: boolean = actionId === providerId || eventType === providerId;\n\n if (buttonText.toLowerCase().includes(provider)) {\n return true;\n }\n\n return providerMatches;\n};\n\n/**\n * Create an auth component (VNode) from a flow component configuration.\n */\nconst createAuthComponentFromFlow = (\n component: EmbeddedFlowComponent,\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n options: {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n inStack?: boolean;\n inputClassName?: string;\n isTimeoutDisabled?: boolean;\n key?: string | number;\n meta?: FlowMetadataResponse | null;\n onInputBlur?: (name: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n size?: 'small' | 'medium' | 'large';\n t?: TranslationFn;\n variant?: any;\n } = {},\n): VNode | null => {\n const key: string | number = options.key ?? component.id;\n\n /** Resolve any remaining {{t()}} or {{meta()}} template expressions in a string at render time. */\n const resolve = (text: string | undefined): string => {\n if (!text || (!options.t && !options.meta)) {\n return text || '';\n }\n return resolveFlowTemplateLiterals(text, {meta: options.meta, t: options.t || ((k: string): string => k)});\n };\n\n switch (component.type) {\n case EmbeddedFlowComponentType.TextInput:\n case EmbeddedFlowComponentType.PasswordInput:\n case EmbeddedFlowComponentType.EmailInput: {\n const identifier: string = component.ref;\n const value: string = formValues[identifier] || '';\n const isTouched: boolean = touchedFields[identifier] || false;\n const error: string | undefined = isTouched ? formErrors[identifier] : undefined;\n const fieldType: FieldType = getFieldType(component.type);\n\n return createField({\n className: options.inputClassName,\n error,\n label: resolve(component.label) || '',\n name: identifier,\n onBlur: () => options.onInputBlur?.(identifier),\n onChange: (newValue: string) => onInputChange(identifier, newValue),\n placeholder: resolve(component.placeholder) || '',\n required: component.required || false,\n type: fieldType,\n value,\n });\n }\n\n case EmbeddedFlowComponentType.Action: {\n const actionId: string = component.id;\n const eventType: string = (component.eventType as string) || '';\n const buttonText: string = resolve(component.label);\n const componentVariant: string = (component.variant as string) || '';\n\n const shouldSkipValidation: boolean = eventType.toUpperCase() === EmbeddedFlowEventType.Trigger;\n\n const handleClick = (): void => {\n if (options.onSubmit) {\n const formData: Record<string, any> = {};\n Object.keys(formValues).forEach((field: string) => {\n formData[field] = formValues[field];\n });\n\n const consentPrompt: ConsentPromptData | undefined = options.additionalData?.['consentPrompt'] as\n | ConsentPromptData\n | undefined;\n if (consentPrompt && eventType.toUpperCase() === EmbeddedFlowEventType.Submit) {\n const isDeny: boolean = componentVariant.toLowerCase() !== 'primary';\n const decisions: ConsentDecisions = {\n purposes: consentPrompt.purposes.map(\n (p: ConsentPurposeData): ConsentPurposeDecision => ({\n approved: !isDeny,\n elements: [\n ...p.essential.map((attr: string): ConsentAttributeElement => ({approved: !isDeny, name: attr})),\n ...p.optional.map(\n (attr: string): ConsentAttributeElement => ({\n approved: isDeny ? false : formValues[getConsentOptionalKey(p.purposeId, attr)] !== 'false',\n name: attr,\n }),\n ),\n ],\n purposeName: p.purposeName,\n }),\n ),\n };\n formData['consent_decisions'] = JSON.stringify(decisions);\n }\n\n options.onSubmit(component, formData, shouldSkipValidation);\n }\n };\n\n // Render branded social login buttons for known action IDs\n if (matchesSocialProvider(actionId, eventType, buttonText, 'google')) {\n return h(GoogleButton, {class: options.buttonClassName, key, onClick: handleClick});\n }\n if (matchesSocialProvider(actionId, eventType, buttonText, 'github')) {\n return h(GitHubButton, {class: options.buttonClassName, key, onClick: handleClick});\n }\n if (matchesSocialProvider(actionId, eventType, buttonText, 'facebook')) {\n return h(FacebookButton, {class: options.buttonClassName, key, onClick: handleClick});\n }\n if (matchesSocialProvider(actionId, eventType, buttonText, 'microsoft')) {\n return h(MicrosoftButton, {class: options.buttonClassName, key, onClick: handleClick});\n }\n\n // Generic button for other providers / actions\n const startIconVNode: VNode | null = component.startIcon\n ? h('img', {\n alt: '',\n 'aria-hidden': 'true',\n src: component.startIcon,\n style: {height: '1.25em', objectFit: 'contain', width: '1.25em'},\n })\n : null;\n\n const endIconVNode: VNode | null = component.endIcon\n ? h('img', {\n alt: '',\n 'aria-hidden': 'true',\n src: component.endIcon,\n style: {height: '1.25em', objectFit: 'contain', width: '1.25em'},\n })\n : null;\n\n return h(\n Button,\n {\n class: options.buttonClassName,\n color: component.variant?.toLowerCase() === 'primary' ? 'primary' : 'secondary',\n 'data-testid': 'asgardeo-signin-submit',\n disabled:\n isLoading ||\n (!isFormValid && !shouldSkipValidation) ||\n options.isTimeoutDisabled ||\n (component as any).config?.disabled,\n endIcon: endIconVNode ?? undefined,\n fullWidth: true,\n key,\n onClick: handleClick,\n startIcon: startIconVNode ?? undefined,\n variant: component.variant?.toLowerCase() === 'primary' ? 'solid' : 'outline',\n },\n {default: () => buttonText || 'Submit'},\n );\n }\n\n case EmbeddedFlowComponentType.Text: {\n const variant: any = getTypographyVariant(component.variant as string);\n const align: string = typeof (component as any)['align'] === 'string' ? (component as any)['align'] : 'left';\n\n return h(\n Typography,\n {\n key,\n style: {marginBottom: '0.5rem', textAlign: align},\n variant,\n },\n {default: () => resolve(component.label)},\n );\n }\n\n case EmbeddedFlowComponentType.Divider: {\n const dividerLabel: string = resolve(component.label) || '';\n return h(Divider, {key}, dividerLabel ? {default: () => dividerLabel} : undefined);\n }\n\n case EmbeddedFlowComponentType.Select: {\n const identifier: string = component.ref;\n const value: string = formValues[identifier] || '';\n const isTouched: boolean = touchedFields[identifier] || false;\n const error: string | undefined = isTouched ? formErrors[identifier] : undefined;\n\n const selectOptions: Array<{label: string; value: string}> = ((component as any).options || []).map(\n (opt: any) => ({\n label: typeof opt === 'string' ? opt : String(opt.label ?? opt.value ?? ''),\n value: typeof opt === 'string' ? opt : String(opt.value ?? ''),\n }),\n );\n\n return h(Select, {\n class: options.inputClassName,\n error,\n key,\n label: resolve(component.label) || '',\n modelValue: value,\n name: identifier,\n onBlur: () => options.onInputBlur?.(identifier),\n 'onUpdate:modelValue': (val: string) => onInputChange(identifier, val),\n options: selectOptions,\n placeholder: resolve(component.placeholder),\n required: component.required,\n });\n }\n\n case EmbeddedFlowComponentType.Block: {\n if (component.components && component.components.length > 0) {\n const blockChildren: (VNode | null)[] = component.components\n .map((childComponent: any, index: number) =>\n createAuthComponentFromFlow(\n childComponent,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n key: childComponent.id || `${component.id}_${index}`,\n },\n ),\n )\n .filter(Boolean);\n\n return h('form', {id: component.id, key}, blockChildren);\n }\n return null;\n }\n\n case EmbeddedFlowComponentType.RichText: {\n // NOTE: Content comes from Asgardeo's own servers (server-driven UI).\n // Emoji URIs are resolved first because DOMPurify strips unknown URI schemes.\n // Manually sanitizes with `DOMPurify` before setting innerHTML (defense-in-depth).\n return h('div', {\n innerHTML: DOMPurify.sanitize(resolveEmojiUrisInHtml(resolve(component.label))),\n key,\n style: {overflowWrap: 'anywhere'},\n });\n }\n\n case EmbeddedFlowComponentType.Image: {\n const explicitHeight: string = resolve((component as any).height?.toString());\n const explicitWidth: string = resolve((component as any).width?.toString());\n return h('img', {\n alt: resolve((component as any).alt) || resolve(component.label) || 'Image',\n key,\n src: resolve((component as any).src),\n style: {\n height: explicitHeight || (options.inStack ? '50px' : 'auto'),\n objectFit: 'contain',\n width: explicitWidth || (options.inStack ? '50px' : '100%'),\n },\n });\n }\n\n case EmbeddedFlowComponentType.Icon: {\n // Flow icon registry is not yet available in the Vue SDK.\n logger.warn(`Icon component type is not yet supported in the Vue SDK. Skipping render.`);\n return null;\n }\n\n case EmbeddedFlowComponentType.Stack: {\n const direction: string = (component as any).direction || 'row';\n const gap: number = (component as any).gap ?? 2;\n const align: string = (component as any).align || 'center';\n const justify: string = (component as any).justify || 'flex-start';\n\n const stackStyle: Record<string, string> = {\n alignItems: align,\n display: 'flex',\n flexDirection: direction as string,\n flexWrap: 'wrap',\n gap: `${gap * 0.5}rem`,\n justifyContent: justify,\n };\n\n const stackChildren: (VNode | null)[] = component.components\n ? component.components.map((childComponent: any, index: number) =>\n createAuthComponentFromFlow(\n childComponent,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n inStack: true,\n key: childComponent.id || `${component.id}_${index}`,\n },\n ),\n )\n : [];\n\n return h('div', {key, style: stackStyle}, stackChildren.filter(Boolean) as VNode[]);\n }\n\n case EmbeddedFlowComponentType.Consent: {\n // Consent component is not yet implemented in the Vue SDK.\n logger.warn(`Consent component type is not yet fully supported in the Vue SDK.`);\n return null;\n }\n\n case EmbeddedFlowComponentType.Timer: {\n const textTemplate: string = resolve((component as any).label) || 'Time remaining: {time}';\n const timeoutMs: number = Number(options.additionalData?.['stepTimeout']) || 0;\n const expiresIn: number = timeoutMs > 0 ? Math.max(0, Math.floor((timeoutMs - Date.now()) / 1000)) : 0;\n const timerText: string = textTemplate.replace('{time}', String(expiresIn));\n\n return h('div', {class: 'asgardeo-flow-timer', key}, timerText);\n }\n\n default:\n logger.warn(`Unsupported component type: ${(component as any).type}. Skipping render.`);\n return null;\n }\n};\n\nexport type {TranslationFn};\n\n/**\n * Processes an array of components and renders them as VNodes for sign-in.\n */\nexport const renderSignInComponents = (\n components: EmbeddedFlowComponent[],\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n options?: {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n inputClassName?: string;\n isTimeoutDisabled?: boolean;\n meta?: FlowMetadataResponse | null;\n onInputBlur?: (name: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n size?: 'small' | 'medium' | 'large';\n t?: TranslationFn;\n variant?: any;\n },\n): VNode[] =>\n components\n .map((component: any, index: number) =>\n createAuthComponentFromFlow(\n component,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n key: component.id || index,\n },\n ),\n )\n .filter(Boolean) as VNode[];\n\n/**\n * Processes an array of components and renders them as VNodes for sign-up.\n * Identical to renderSignInComponents \u2014 separated for semantic clarity.\n */\nexport const renderSignUpComponents = (\n components: EmbeddedFlowComponent[],\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n options?: {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n inputClassName?: string;\n isTimeoutDisabled?: boolean;\n meta?: FlowMetadataResponse | null;\n onInputBlur?: (name: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n size?: 'small' | 'medium' | 'large';\n t?: TranslationFn;\n variant?: any;\n },\n): VNode[] =>\n components\n .map((component: any, index: number) =>\n createAuthComponentFromFlow(\n component,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n key: component.id || index,\n },\n ),\n )\n .filter(Boolean) as VNode[];\n\n/**\n * Processes an array of components and renders them as VNodes for invite-user flows.\n * Identical to renderSignInComponents \u2014 separated for semantic clarity.\n */\nexport const renderInviteUserComponents = (\n components: EmbeddedFlowComponent[],\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n options?: {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n inputClassName?: string;\n isTimeoutDisabled?: boolean;\n meta?: FlowMetadataResponse | null;\n onInputBlur?: (name: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n size?: 'small' | 'medium' | 'large';\n t?: TranslationFn;\n variant?: any;\n },\n): VNode[] =>\n components\n .map((component: any, index: number) =>\n createAuthComponentFromFlow(\n component,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n key: component.id || index,\n },\n ),\n )\n .filter(Boolean) as VNode[];\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse, resolveFlowTemplateLiterals} from '@asgardeo/browser';\n\ntype TranslationFn = (key: string, params?: Record<string, string | number>) => string;\n\n/**\n * Resolves all {{ t() }} and {{ meta() }} template expressions in an object's string properties.\n * @param obj - The object to process\n * @param t - The translation function from useI18n\n * @param properties - Array of property names to resolve (optional, defaults to common properties)\n * @param meta - Optional flow metadata for resolving meta() expressions\n * @returns A new object with resolved template strings\n */\nexport const resolveTranslationsInObject = <T extends Record<string, any>>(\n obj: T,\n t: TranslationFn,\n properties: string[] = ['label', 'placeholder', 'text', 'title', 'subtitle'],\n meta?: FlowMetadataResponse | null,\n): T => {\n const resolved: T = {...obj};\n\n properties.forEach((prop: string) => {\n if (resolved[prop] && typeof resolved[prop] === 'string') {\n (resolved as any)[prop] = resolveFlowTemplateLiterals(resolved[prop], {meta, t});\n }\n });\n\n return resolved;\n};\n\nexport default resolveTranslationsInObject;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse} from '@asgardeo/browser';\nimport {resolveTranslationsInObject} from './resolveTranslationsInObject';\n\ntype TranslationFn = (key: string, params?: Record<string, string | number>) => string;\n\n/**\n * Recursively resolves translation and meta template strings in an array of objects.\n * @param items - Array of objects to process\n * @param t - The translation function from useI18n\n * @param properties - Array of property names to resolve (optional)\n * @param meta - Optional flow metadata for resolving meta() expressions\n * @returns A new array with resolved translations\n */\nconst resolveTranslationsInArray = <T extends Record<string, any>>(\n items: T[],\n t: TranslationFn,\n properties?: string[],\n meta?: FlowMetadataResponse | null,\n): T[] =>\n items.map((item: T) => {\n const resolved: T = resolveTranslationsInObject(item, t, properties, meta);\n\n // If the item has nested components (like BLOCK or STACK type), resolve those too\n if (resolved['components'] && Array.isArray(resolved['components'])) {\n (resolved as any)['components'] = resolveTranslationsInArray(resolved['components'], t, properties, meta);\n }\n\n return resolved;\n });\n\nexport default resolveTranslationsInArray;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * @fileoverview Shared flow response transformer utilities for v2 embedded flows.\n *\n * This module provides reusable transformation functions for normalizing embedded flow\n * responses from Asgardeo APIs. It handles both successful responses with component\n * extraction and error responses with proper error message extraction.\n *\n * Key features:\n * - Component extraction from flow meta structure\n * - Translation string resolution in components\n * - Error response detection and message extraction\n * - Configurable error handling (throw vs return errors)\n *\n * Usage:\n * ```typescript\n * import { normalizeFlowResponse } from '../../../utils/v2/flowTransformer';\n *\n * const { executionId, components } = normalizeFlowResponse(apiResponse, t, {\n * defaultErrorKey: 'components.signIn.errors.generic'\n * });\n * ```\n *\n * This transformer is used by both SignIn and SignUp v2 components to ensure\n * consistent response handling across all embedded flows.\n */\n\nimport {EmbeddedFlowComponentV2 as EmbeddedFlowComponent, FlowMetadataResponse} from '@asgardeo/browser';\nimport resolveTranslationsInArray from './resolveTranslationsInArray';\n\ntype TranslationFn = (key: string, params?: Record<string, string | number>) => string;\n\n/**\n * Generic flow error response interface that covers common error structure\n */\nexport interface FlowErrorResponse {\n executionId: string;\n failureReason?: string;\n flowStatus: 'ERROR';\n}\n\n/**\n * Configuration options for flow transformation\n */\nexport interface FlowTransformOptions {\n /**\n * Default error message key for translation fallback\n * @default 'errors.flow.generic'\n */\n defaultErrorKey?: string;\n /**\n * Whether to resolve translation strings or keep them as i18n keys\n * @default true\n */\n resolveTranslations?: boolean;\n /**\n * Whether to throw errors or return them as normalized response\n * @default true\n */\n throwOnError?: boolean;\n}\n\n/**\n * Create a mapping from ref to identifier based on data.inputs array.\n */\nconst createInputRefMapping = (response: any): Map<string, string> => {\n const mapping: Map<string, string> = new Map<string, string>();\n\n if (response?.data?.inputs && Array.isArray(response.data.inputs)) {\n response.data.inputs.forEach((input: any) => {\n if (input.ref && input.identifier) {\n mapping.set(input.ref, input.identifier);\n }\n });\n }\n\n return mapping;\n};\n\n/**\n * Create a mapping from action ref to nextNode based on data.actions array.\n */\nconst createActionRefMapping = (response: any): Map<string, string> => {\n const mapping: Map<string, string> = new Map<string, string>();\n\n if (response?.data?.actions && Array.isArray(response.data.actions)) {\n response.data.actions.forEach((action: any) => {\n if (action.ref && action.nextNode) {\n mapping.set(action.ref, action.nextNode);\n }\n });\n }\n\n return mapping;\n};\n\n/**\n * Apply input ref mapping to components recursively.\n */\nconst applyInputRefMapping = (\n components: EmbeddedFlowComponent[],\n refMapping: Map<string, string>,\n actionMapping: Map<string, string>,\n inputsData: any[] = [],\n): EmbeddedFlowComponent[] =>\n components.map((component: EmbeddedFlowComponent) => {\n const transformedComponent: any = {...component} as EmbeddedFlowComponent & {\n actionRef?: string;\n options?: Array<{label: string; value: string}>;\n };\n\n if (transformedComponent.ref && refMapping.has(transformedComponent.ref)) {\n transformedComponent.ref = refMapping.get(transformedComponent.ref);\n }\n\n if (transformedComponent.type === 'SELECT' && component.id) {\n const inputData: any = inputsData.find((input: any) => input.ref === component.id);\n if (inputData?.options) {\n transformedComponent.options = inputData.options.map((opt: any) => {\n if (typeof opt === 'string') {\n return {label: opt, value: opt};\n }\n const value: string = typeof opt.value === 'object' ? JSON.stringify(opt.value) : String(opt.value || '');\n const label: string = typeof opt.label === 'object' ? JSON.stringify(opt.label) : String(opt.label || value);\n\n return {label, value};\n });\n }\n }\n\n if (\n transformedComponent.type === 'ACTION' &&\n transformedComponent.id &&\n actionMapping.has(transformedComponent.id)\n ) {\n transformedComponent.actionRef = actionMapping.get(transformedComponent.id);\n }\n\n if (transformedComponent.components && Array.isArray(transformedComponent.components)) {\n transformedComponent.components = applyInputRefMapping(\n transformedComponent.components,\n refMapping,\n actionMapping,\n inputsData,\n );\n }\n\n return transformedComponent;\n });\n\n/**\n * Transform and resolve translations in components from flow response.\n */\nexport const transformComponents = (\n response: any,\n t: TranslationFn,\n resolveTranslations: boolean = true,\n meta?: FlowMetadataResponse | null,\n): EmbeddedFlowComponent[] => {\n if (!response?.data?.meta?.components) {\n return [];\n }\n\n let {components} = response.data.meta;\n\n const refMapping: Map<string, string> = createInputRefMapping(response);\n const actionMapping: Map<string, string> = createActionRefMapping(response);\n const inputsData: any[] = response?.data?.inputs || [];\n\n if (refMapping.size > 0 || actionMapping.size > 0 || inputsData.length > 0) {\n components = applyInputRefMapping(components, refMapping, actionMapping, inputsData);\n }\n\n return resolveTranslations ? resolveTranslationsInArray(components, t, undefined, meta) : components;\n};\n\n/**\n * Extract error message from flow error response.\n * Supports any flow error response that follows the standard structure.\n * Prioritizes failureReason if present, otherwise falls back to translated generic message.\n */\nexport const extractErrorMessage = (\n error: FlowErrorResponse | any,\n t: TranslationFn,\n defaultErrorKey: string = 'errors.flow.generic',\n): string => {\n if (error && typeof error === 'object' && error.failureReason) {\n return error.failureReason;\n }\n\n if (error instanceof Error && error.message) {\n return error.message;\n }\n\n return t(defaultErrorKey);\n};\n\n/**\n * Check if a response is an error response and extract the error message.\n */\nexport const checkForErrorResponse = (\n response: any,\n t: TranslationFn,\n defaultErrorKey: string = 'errors.flow.generic',\n): string | null => {\n if (response?.flowStatus === 'ERROR') {\n return extractErrorMessage(response, t, defaultErrorKey);\n }\n\n return null;\n};\n\n/**\n * Generic flow response normalizer that handles both success and error responses.\n * This is the main transformer function that should be used by all flow components.\n */\nexport const normalizeFlowResponse = (\n response: any,\n t: TranslationFn,\n options: FlowTransformOptions = {},\n meta?: FlowMetadataResponse | null,\n): {\n additionalData: Record<string, any>;\n components: EmbeddedFlowComponent[];\n executionId: string;\n} => {\n const {throwOnError = true, defaultErrorKey = 'errors.flow.generic', resolveTranslations = true} = options;\n\n const errorMessage: string | null = checkForErrorResponse(response, t, defaultErrorKey);\n\n if (errorMessage && throwOnError) {\n throw response;\n }\n\n const additionalData: Record<string, any> = (response?.data?.additionalData as Record<string, any>) ?? {};\n\n if (typeof additionalData['consentPrompt'] === 'string') {\n try {\n const parsed: any = JSON.parse(additionalData['consentPrompt']);\n additionalData['consentPrompt'] = {purposes: Array.isArray(parsed) ? parsed : []};\n } catch {\n // Leave unparseable value as-is\n }\n }\n\n return {\n additionalData,\n components: transformComponents(response, t, resolveTranslations, meta),\n executionId: response.executionId,\n };\n};\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {navigate} from '@asgardeo/browser';\n\n/**\n * Initiates OAuth redirect with CSRF protection.\n * Generates random state, stores return path in sessionStorage, and redirects to OAuth provider.\n *\n * @param redirectURL - OAuth authorization URL from the server\n */\nexport function initiateOAuthRedirect(redirectURL: string): void {\n const basePath: string = document.querySelector('base')?.getAttribute('href') || '';\n let returnPath: string = window.location.pathname;\n\n if (basePath && returnPath.startsWith(basePath)) {\n returnPath = returnPath.slice(basePath.length) || '/';\n }\n\n const state: string = crypto.randomUUID();\n\n sessionStorage.setItem(\n `asgardeo_oauth_${state}`,\n JSON.stringify({\n path: returnPath,\n timestamp: Date.now(),\n }),\n );\n\n const redirectUrlObj: URL = new URL(redirectURL);\n redirectUrlObj.searchParams.set('state', state);\n\n navigate(redirectUrlObj.toString());\n}\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoRuntimeError, arrayBufferToBase64url, base64urlToArrayBuffer} from '@asgardeo/browser';\n\n/**\n * Handles WebAuthn/Passkey registration flow for browser environments.\n *\n * @param challengeData - JSON stringified challenge data containing WebAuthn creation options.\n * @returns Promise that resolves to a JSON string containing the WebAuthn registration response.\n */\nexport const handlePasskeyRegistration = async (challengeData: string): Promise<string> => {\n if (!window.navigator.credentials || !window.navigator.credentials.create) {\n throw new AsgardeoRuntimeError(\n 'WebAuthn is not supported in this browser.',\n 'browser-webauthn-not-supported',\n 'browser',\n 'WebAuthn/Passkey registration requires a browser that supports the Web Authentication API.',\n );\n }\n\n try {\n const creationOptions: any = JSON.parse(challengeData);\n\n const publicKey: any = {\n ...creationOptions,\n challenge: base64urlToArrayBuffer(creationOptions.challenge),\n user: {\n ...creationOptions.user,\n id: base64urlToArrayBuffer(creationOptions.user.id),\n },\n ...(creationOptions.excludeCredentials && {\n excludeCredentials: creationOptions.excludeCredentials.map((cred: any) => ({\n ...cred,\n id: base64urlToArrayBuffer(cred.id),\n })),\n }),\n };\n\n const credential: PublicKeyCredential = (await navigator.credentials.create({\n publicKey,\n })) as PublicKeyCredential;\n\n if (!credential) {\n throw new AsgardeoRuntimeError(\n 'No credential returned from WebAuthn registration.',\n 'browser-webauthn-no-credential',\n 'browser',\n 'The WebAuthn registration ceremony completed but did not return a valid credential.',\n );\n }\n\n const response: AuthenticatorAttestationResponse = credential.response as AuthenticatorAttestationResponse;\n\n const registrationResponse: any = {\n id: credential.id,\n rawId: arrayBufferToBase64url(credential.rawId),\n response: {\n attestationObject: arrayBufferToBase64url(response.attestationObject),\n clientDataJSON: arrayBufferToBase64url(response.clientDataJSON),\n ...(response.getTransports && {\n transports: response.getTransports(),\n }),\n },\n type: credential.type,\n ...(credential.authenticatorAttachment && {\n authenticatorAttachment: credential.authenticatorAttachment,\n }),\n };\n\n return JSON.stringify(registrationResponse);\n } catch (error) {\n if (error instanceof AsgardeoRuntimeError) {\n throw error;\n }\n\n if (error instanceof Error) {\n throw new AsgardeoRuntimeError(\n `Passkey registration failed: ${error.message}`,\n 'browser-webauthn-registration-error',\n 'browser',\n `WebAuthn registration failed with error: ${error.name}`,\n );\n }\n\n throw new AsgardeoRuntimeError(\n 'Passkey registration failed due to an unexpected error.',\n 'browser-webauthn-unexpected-error',\n 'browser',\n 'An unexpected error occurred during WebAuthn registration.',\n );\n }\n};\n\n/**\n * Handles WebAuthn/Passkey authentication flow for browser environments.\n *\n * @param challengeData - JSON stringified challenge data containing WebAuthn request options.\n * @returns Promise that resolves to a JSON string containing the WebAuthn authentication response.\n */\nexport const handlePasskeyAuthentication = async (challengeData: string): Promise<string> => {\n if (!window.navigator.credentials || !window.navigator.credentials.get) {\n throw new AsgardeoRuntimeError(\n 'WebAuthn is not supported in this browser.',\n 'browser-webauthn-not-supported',\n 'browser',\n 'WebAuthn/Passkey authentication requires a browser that supports the Web Authentication API.',\n );\n }\n\n try {\n const requestOptions: any = JSON.parse(challengeData);\n\n const publicKey: any = {\n ...requestOptions,\n challenge: base64urlToArrayBuffer(requestOptions.challenge),\n ...(requestOptions.allowCredentials && {\n allowCredentials: requestOptions.allowCredentials.map((cred: any) => ({\n ...cred,\n id: base64urlToArrayBuffer(cred.id),\n })),\n }),\n };\n\n const credential: PublicKeyCredential = (await navigator.credentials.get({\n publicKey,\n })) as PublicKeyCredential;\n\n if (!credential) {\n throw new AsgardeoRuntimeError(\n 'No credential returned from WebAuthn authentication.',\n 'browser-webauthn-no-credential',\n 'browser',\n 'The WebAuthn authentication ceremony completed but did not return a valid credential.',\n );\n }\n\n const response: AuthenticatorAssertionResponse = credential.response as AuthenticatorAssertionResponse;\n\n const authenticationResponse: any = {\n id: credential.id,\n rawId: arrayBufferToBase64url(credential.rawId),\n response: {\n authenticatorData: arrayBufferToBase64url(response.authenticatorData),\n clientDataJSON: arrayBufferToBase64url(response.clientDataJSON),\n signature: arrayBufferToBase64url(response.signature),\n ...(response.userHandle && {\n userHandle: arrayBufferToBase64url(response.userHandle),\n }),\n },\n type: credential.type,\n ...(credential.authenticatorAttachment && {\n authenticatorAttachment: credential.authenticatorAttachment,\n }),\n };\n\n return JSON.stringify(authenticationResponse);\n } catch (error) {\n if (error instanceof AsgardeoRuntimeError) {\n throw error;\n }\n\n if (error instanceof Error) {\n throw new AsgardeoRuntimeError(\n `Passkey authentication failed: ${error.message}`,\n 'browser-webauthn-authentication-error',\n 'browser',\n `WebAuthn authentication failed with error: ${error.name}`,\n );\n }\n\n throw new AsgardeoRuntimeError(\n 'Passkey authentication failed due to an unexpected error.',\n 'browser-webauthn-unexpected-error',\n 'browser',\n 'An unexpected error occurred during WebAuthn authentication.',\n );\n }\n};\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignInV1 from './v1/BaseSignIn';\nimport BaseSignInV2 from './v2/BaseSignIn';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type {BaseSignInRenderProps, BaseSignInProps} from './v2/BaseSignIn';\n\n/**\n * BaseSignIn \u2014 platform-aware base sign-in component.\n *\n * Routes to the V1 (authenticator-based) or V2 (component-driven) BaseSignIn\n * based on the configured `platform`.\n */\nconst BaseSignIn: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseSignIn',\n setup(_props: Record<string, unknown>, {attrs, slots}: SetupContext): () => VNode {\n const {platform} = useAsgardeo();\n\n return (): VNode => {\n if (platform === Platform.AsgardeoV2) {\n return h(BaseSignInV2, {...attrs}, slots);\n }\n\n return h(BaseSignInV1, {...attrs}, slots);\n };\n },\n});\n\nexport default BaseSignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport SignUpV1 from './v1/SignUp';\nimport SignUpV2 from './v2/SignUp';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type {SignUpRenderProps} from './v2/SignUp';\n\n/**\n * SignUp \u2014 platform-aware sign-up container.\n *\n * Routes to V1 (default, component-driven V1 flow API) or V2 (`AsgardeoV2`\n * platform) based on the `platform` value from {@link useAsgardeo}. Mirrors\n * the existing `SignIn` dispatcher pattern in this package.\n */\nconst SignUp: Component = defineComponent({\n inheritAttrs: false,\n name: 'SignUp',\n setup(_props: Record<string, unknown>, {attrs, slots}: SetupContext): () => VNode {\n const {platform} = useAsgardeo();\n\n return (): VNode => {\n if (platform === Platform.AsgardeoV2) {\n return h(SignUpV2, {...attrs}, slots);\n }\n return h(SignUpV1, {...attrs}, slots);\n };\n },\n});\n\nexport default SignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedFlowExecuteRequestPayload,\n EmbeddedFlowExecuteResponse,\n EmbeddedFlowResponseType,\n EmbeddedFlowType,\n} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignUp from './BaseSignUp';\nimport type {BaseSignUpRenderProps} from './BaseSignUp';\nimport useAsgardeo from '../../../../composables/useAsgardeo';\n\nexport type SignUpRenderProps = BaseSignUpRenderProps;\n\n/**\n * V1 SignUp container \u2014 wires `useAsgardeo().signUp` into `BaseSignUpV1` and\n * handles redirects after the flow completes.\n *\n * Mirrors `sign-up/v2/.../SignUp.ts` but invokes the V1 base component which\n * understands the `TYPOGRAPHY` / `INPUT` / `BUTTON` / `FORM` shapes returned by\n * the V1 flow API.\n */\nconst SignUp: Component = defineComponent({\n name: 'SignUpV1',\n props: {\n afterSignUpUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n messageClassName: {default: '', type: String},\n onComplete: {default: undefined, type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n shouldRedirectAfterSignUp: {default: true, type: Boolean},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'elevated' | 'outlined' | 'flat'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {signUp, isInitialized, applicationId} = useAsgardeo();\n\n const handleInitialize = async (\n payload?: EmbeddedFlowExecuteRequestPayload,\n ): Promise<EmbeddedFlowExecuteResponse> => {\n // Pull the application id from the URL query (same convention as the\n // React V1 SignUp), falling back to the configured value from the\n // Asgardeo context.\n const applicationIdFromUrl: string | null =\n typeof window !== 'undefined' ? new URL(window.location.href).searchParams.get('applicationId') : null;\n const effectiveApplicationId: string | undefined = applicationId || applicationIdFromUrl || undefined;\n\n const initialPayload: any = payload || {\n flowType: EmbeddedFlowType.Registration,\n ...(effectiveApplicationId && {applicationId: effectiveApplicationId}),\n };\n\n return (await signUp(initialPayload)) as EmbeddedFlowExecuteResponse;\n };\n\n const handleOnSubmit = async (payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse> =>\n (await signUp(payload)) as EmbeddedFlowExecuteResponse;\n\n const handleComplete = (response: EmbeddedFlowExecuteResponse): void => {\n props.onComplete?.(response);\n\n const oauthRedirectUrl: string | undefined = (response as any)?.redirectUrl;\n if (props.shouldRedirectAfterSignUp && oauthRedirectUrl) {\n if (typeof window !== 'undefined') {\n window.location.href = oauthRedirectUrl;\n }\n return;\n }\n\n if (\n props.shouldRedirectAfterSignUp &&\n response?.type !== EmbeddedFlowResponseType.Redirection &&\n props.afterSignUpUrl\n ) {\n if (typeof window !== 'undefined') {\n window.location.href = props.afterSignUpUrl;\n }\n }\n };\n\n return (): VNode | null =>\n h(\n BaseSignUp,\n {\n afterSignUpUrl: props.afterSignUpUrl,\n buttonClassName: props.buttonClassName,\n className: props.className,\n errorClassName: props.errorClassName,\n inputClassName: props.inputClassName,\n isInitialized: isInitialized?.value ?? false,\n messageClassName: props.messageClassName,\n onComplete: handleComplete,\n onError: props.onError,\n onInitialize: handleInitialize,\n onSubmit: handleOnSubmit,\n showSubtitle: props.showSubtitle,\n showTitle: props.showTitle,\n size: props.size,\n variant: props.variant,\n },\n slots['default'] ? {default: (renderProps: any) => slots['default']!(renderProps)} : undefined,\n );\n },\n});\n\nexport default SignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedFlowComponent,\n EmbeddedFlowComponentType,\n EmbeddedFlowExecuteRequestPayload,\n EmbeddedFlowExecuteResponse,\n EmbeddedFlowResponseType,\n EmbeddedFlowStatus,\n withVendorCSSClassPrefix,\n} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport {renderSignUpComponents} from './options/SignUpOptionFactory';\nimport useFlow from '../../../../composables/useFlow';\nimport useI18n from '../../../../composables/useI18n';\nimport {createVueLogger} from '../../../../utils/logger';\nimport Alert from '../../../primitives/Alert';\nimport Card from '../../../primitives/Card';\nimport Logo from '../../../primitives/Logo';\nimport Spinner from '../../../primitives/Spinner';\nimport Typography from '../../../primitives/Typography';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('BaseSignUpV1');\n\n/**\n * Render-prop payload exposed via the default slot.\n */\nexport interface BaseSignUpRenderProps {\n components: any[];\n errors: Record<string, string>;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n isLoading: boolean;\n isValid: boolean;\n messages: Array<{message: string; type: string}>;\n subtitle: string;\n title: string;\n touched: Record<string, boolean>;\n values: Record<string, string>;\n}\n\n/**\n * V1 BaseSignUp \u2014 component-driven app-native sign-up for Vue.\n *\n * Mirrors `packages/react/.../SignUp/v1/BaseSignUp.tsx`. Reads the\n * `/api/server/v1/flow/execute` response shape (`TYPOGRAPHY`, `FORM`, `INPUT`,\n * `BUTTON`, `RICH_TEXT`, etc.) and renders it via the V1\n * `SignUpOptionFactory`. Tracks form state internally and submits steps via\n * the `onSubmit` prop until the flow completes.\n */\nconst BaseSignUp: Component = defineComponent({\n emits: ['error', 'flowChange', 'complete'],\n name: 'BaseSignUpV1',\n props: {\n afterSignUpUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n isInitialized: {default: true, type: Boolean},\n messageClassName: {default: '', type: String},\n onComplete: {default: undefined, type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>,\n },\n onInitialize: {\n default: undefined,\n type: Function as PropType<(payload?: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>>,\n },\n onSubmit: {\n default: undefined,\n type: Function as PropType<(payload: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>>,\n },\n shouldRedirectAfterSignUp: {default: true, type: Boolean},\n showLogo: {default: true, type: Boolean},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'elevated' | 'outlined' | 'flat'>},\n },\n setup(props: any, {slots, emit}: SetupContext): () => VNode | null {\n const {t} = useI18n();\n const {title: flowTitle, subtitle: flowSubtitle, messages: flowMessages, addMessage, clearMessages} = useFlow();\n\n // \u2500\u2500 Reactive state \u2500\u2500\n const isLoading: Ref<boolean> = ref(false);\n const isFlowInitialized: Ref<boolean> = ref(false);\n const currentFlow: Ref<EmbeddedFlowExecuteResponse | null> = ref(null);\n const formValues: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n const formErrors: Ref<Record<string, string>> = ref({});\n\n let initializationAttempted: boolean = false;\n\n // \u2500\u2500 Error handling \u2500\u2500\n\n const handleError = (err: any): void => {\n let errorMessage: string = t('errors.signup.flow.failure') || 'Sign-up failed';\n\n if (err && typeof err === 'object') {\n if (err.code && (err.message || err.description)) {\n errorMessage = err.description || err.message;\n } else if (err.message) {\n errorMessage = err.message;\n }\n } else if (typeof err === 'string') {\n errorMessage = err;\n }\n\n clearMessages();\n addMessage({message: errorMessage, type: 'error'});\n };\n\n // \u2500\u2500 Form helpers \u2500\u2500\n\n /**\n * Walk the V1 component tree and collect every INPUT's bound parameter\n * name. The parameter name comes from `config.identifier` (a SCIM claim\n * URI) or `config.name`, falling back to the component id.\n */\n const collectInputNames = (components: EmbeddedFlowComponent[]): string[] => {\n const names: string[] = [];\n const walk = (comps: EmbeddedFlowComponent[]): void => {\n comps.forEach((component: EmbeddedFlowComponent) => {\n const cfg: any = (component as any).config || {};\n if (component.type === EmbeddedFlowComponentType.Input) {\n const name: string = (cfg.name as string) || (cfg.identifier as string) || (component.id as string);\n if (name) names.push(name);\n }\n const children: EmbeddedFlowComponent[] = (component as any).components || [];\n if (children.length > 0) walk(children);\n });\n };\n walk(components);\n return names;\n };\n\n const setupFormFields = (response: EmbeddedFlowExecuteResponse): void => {\n const componentTree: EmbeddedFlowComponent[] = (response.data?.components as EmbeddedFlowComponent[]) || [];\n const names: string[] = collectInputNames(componentTree);\n const initial: Record<string, string> = {};\n names.forEach((name: string) => {\n initial[name] = '';\n });\n formValues.value = initial;\n touchedFields.value = {};\n formErrors.value = {};\n };\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n touchedFields.value = {...touchedFields.value, [name]: true};\n // Clear any prior error on input\n if (formErrors.value[name]) {\n const next: Record<string, string> = {...formErrors.value};\n delete next[name];\n formErrors.value = next;\n }\n };\n\n const isFormValid = (): boolean => Object.keys(formErrors.value).length === 0;\n\n /**\n * Mirror the React V1 popup-based redirection handler for social/IdP\n * registration steps. Opens a popup, waits for the OAuth code, and submits\n * `{code, state}` as the next flow step.\n *\n * Returns `true` if redirection was handled (caller should not fall\n * through), `false` otherwise.\n */\n const handleRedirectionIfNeeded = (response: EmbeddedFlowExecuteResponse): boolean => {\n if (response?.type !== EmbeddedFlowResponseType.Redirection || !(response as any)?.data?.redirectURL) {\n return false;\n }\n if (typeof window === 'undefined') return false;\n\n const redirectUrl: string = (response as any).data.redirectURL;\n const popup: Window | null = window.open(\n redirectUrl,\n 'oauth_popup',\n 'width=500,height=600,scrollbars=yes,resizable=yes',\n );\n\n if (!popup) {\n logger.error('Failed to open popup window for social sign-up redirect');\n return false;\n }\n\n let processed: boolean = false;\n let popupMonitor: ReturnType<typeof setInterval> | undefined;\n let messageHandler: (event: MessageEvent) => Promise<void>;\n\n const cleanup = (): void => {\n window.removeEventListener('message', messageHandler);\n if (popupMonitor) clearInterval(popupMonitor);\n };\n\n const continueWithCode = async (code: string, state: string): Promise<void> => {\n const payload: any = {\n ...(currentFlow.value?.flowId && {flowId: currentFlow.value.flowId}),\n actionId: '',\n flowType: ((currentFlow.value as any)?.flowType as string) || 'REGISTRATION',\n inputs: {code, state},\n };\n try {\n const next: any = await props.onSubmit(payload);\n props.onFlowChange?.(next);\n emit('flowChange', next);\n if (next.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(next);\n emit('complete', next);\n } else if (next.flowStatus === EmbeddedFlowStatus.Incomplete) {\n currentFlow.value = next;\n setupFormFields(next);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n emit('error', err);\n } finally {\n popup.close();\n cleanup();\n }\n };\n\n messageHandler = async (event: MessageEvent): Promise<void> => {\n if (event.source !== popup) return;\n const expectedOrigin: string = props.afterSignUpUrl\n ? new URL(props.afterSignUpUrl).origin\n : window.location.origin;\n if (event.origin !== expectedOrigin && event.origin !== window.location.origin) return;\n const {code, state} = (event.data || {}) as {code?: string; state?: string};\n if (code && state && !processed) {\n processed = true;\n await continueWithCode(code, state);\n }\n };\n window.addEventListener('message', messageHandler);\n\n popupMonitor = setInterval(async () => {\n try {\n if (popup.closed) {\n cleanup();\n return;\n }\n if (processed) return;\n\n // Same-origin URL inspection. Throws on cross-origin (expected while\n // the popup is on the IdP's domain) \u2014 swallow and try next tick.\n let popupUrl: string | undefined;\n try {\n popupUrl = popup.location.href;\n } catch {\n return;\n }\n if (!popupUrl) return;\n\n if (popupUrl.includes('code=') || popupUrl.includes('error=')) {\n const url: URL = new URL(popupUrl);\n const code: string | null = url.searchParams.get('code');\n const state: string | null = url.searchParams.get('state');\n const error: string | null = url.searchParams.get('error');\n if (error) {\n processed = true;\n logger.error(`OAuth error during social sign-up: ${error}`);\n popup.close();\n cleanup();\n return;\n }\n if (code && state) {\n processed = true;\n await continueWithCode(code, state);\n }\n }\n } catch (err) {\n logger.error('Error monitoring sign-up popup');\n }\n }, 1000);\n\n return true;\n };\n\n // \u2500\u2500 Step submission \u2500\u2500\n\n const handleSubmit = async (component: any, data?: Record<string, any>): Promise<void> => {\n if (!currentFlow.value) return;\n\n isLoading.value = true;\n clearMessages();\n\n try {\n const filteredInputs: Record<string, any> = {};\n // Prefer explicit `data` if the component handler passes it; otherwise\n // submit the entire form snapshot. Empty strings are stripped to match\n // the React V1 behaviour.\n const sourceInputs: Record<string, any> = data ?? formValues.value;\n Object.entries(sourceInputs).forEach(([key, value]: [string, any]) => {\n if (value !== null && value !== undefined && value !== '') {\n filteredInputs[key] = value;\n }\n });\n\n const actionId: string | undefined = component?.actionId || component?.id;\n\n const payload: any = {\n ...(currentFlow.value.flowId && {flowId: currentFlow.value.flowId}),\n flowType: ((currentFlow.value as any).flowType as string) || 'REGISTRATION',\n inputs: filteredInputs,\n ...(actionId && {actionId}),\n };\n\n const response: any = await props.onSubmit(payload);\n props.onFlowChange?.(response);\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(response);\n emit('complete', response);\n return;\n }\n\n if (response?.flowStatus === EmbeddedFlowStatus.Incomplete) {\n if (handleRedirectionIfNeeded(response)) return;\n currentFlow.value = response;\n setupFormFields(response);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n emit('error', err);\n } finally {\n isLoading.value = false;\n }\n };\n\n // \u2500\u2500 Flow initialization \u2500\u2500\n\n watch(\n () => [props.isInitialized, isFlowInitialized.value] as [boolean, boolean],\n ([initialized, flowInit]: [boolean, boolean]) => {\n if (!initialized || flowInit || initializationAttempted) return;\n if (!props.onInitialize) return;\n initializationAttempted = true;\n\n (async (): Promise<void> => {\n isLoading.value = true;\n clearMessages();\n try {\n const response: EmbeddedFlowExecuteResponse = await props.onInitialize();\n currentFlow.value = response;\n isFlowInitialized.value = true;\n props.onFlowChange?.(response);\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(response);\n emit('complete', response);\n return;\n }\n if (response?.flowStatus === EmbeddedFlowStatus.Incomplete) {\n setupFormFields(response);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n emit('error', err);\n } finally {\n isLoading.value = false;\n }\n })();\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Render \u2500\u2500\n\n return (): VNode | null => {\n const containerClass: string = [\n withVendorCSSClassPrefix('signup'),\n withVendorCSSClassPrefix(`signup--${props.size}`),\n withVendorCSSClassPrefix(`signup--${props.variant}`),\n props.className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // Render-props (scoped slot) escape hatch\n if (slots['default']) {\n const renderProps: BaseSignUpRenderProps = {\n components: (currentFlow.value?.data?.components as any[]) || [],\n errors: formErrors.value,\n handleInputChange,\n handleSubmit,\n isLoading: isLoading.value,\n isValid: isFormValid(),\n messages: (flowMessages.value as Array<{message: string; type: string}>) || [],\n subtitle: flowSubtitle.value || t('signup.subheading') || '',\n title: flowTitle.value || t('signup.heading') || '',\n touched: touchedFields.value,\n values: formValues.value,\n };\n return h('div', {class: containerClass}, slots['default'](renderProps));\n }\n\n // Loading state (initial flow fetch)\n if (!isFlowInitialized.value && isLoading.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;justify-content:center;padding:2rem'}, h(Spinner)),\n );\n }\n\n // Failed to obtain a flow at all\n if (!currentFlow.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h(\n Alert,\n {variant: 'error'},\n () => t('errors.signup.flow.initialization.failure') || 'Failed to initialize sign-up flow',\n ),\n );\n }\n\n const components: EmbeddedFlowComponent[] = (currentFlow.value.data?.components as EmbeddedFlowComponent[]) || [];\n\n const rendered: VNode[] = renderSignUpComponents(\n components,\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid(),\n handleInputChange,\n handleSubmit,\n {\n buttonClassName: props.buttonClassName,\n inputClassName: props.inputClassName,\n size: props.size,\n },\n );\n\n const cardChildren: VNode[] = [];\n\n if (props.showLogo) {\n cardChildren.push(h('div', {style: 'display:flex;justify-content:center;margin-bottom:1rem'}, [h(Logo)]));\n }\n\n if (props.showTitle || props.showSubtitle) {\n const headerChildren: VNode[] = [];\n if (props.showTitle) {\n headerChildren.push(\n h(Typography, {variant: 'h2'}, {default: () => flowTitle.value || t('signup.heading') || 'Sign Up'}),\n );\n }\n if (props.showSubtitle) {\n headerChildren.push(\n h(\n Typography,\n {variant: 'body1'},\n {default: () => flowSubtitle.value || t('signup.subheading') || 'Create your account'},\n ),\n );\n }\n cardChildren.push(h('div', {style: 'padding: 0 1rem 1rem'}, headerChildren));\n }\n\n // Flow-level messages (errors, info)\n if (flowMessages.value && flowMessages.value.length > 0) {\n cardChildren.push(\n h(\n 'div',\n {style: 'padding: 0 1rem'},\n flowMessages.value.map((msg: any, i: number) =>\n h(\n Alert,\n {\n class: props.messageClassName,\n key: msg.id || i,\n variant: msg.type?.toLowerCase() === 'error' ? 'error' : 'info',\n },\n () => msg.message,\n ),\n ),\n ),\n );\n }\n\n cardChildren.push(\n h(\n 'form',\n {\n class: withVendorCSSClassPrefix('signup__form'),\n onSubmit: (e: Event): void => {\n e.preventDefault();\n // Submit-type buttons in the V1 flow are handled inline by the\n // `onSubmit` handler attached to the BUTTON component; the\n // native form submit is a fallback (e.g. enter-key in a field).\n handleSubmit({config: {type: 'submit'}, type: 'BUTTON'});\n },\n style: 'padding: 1rem;display:flex;flex-direction:column;gap:0.75rem',\n },\n rendered.length > 0\n ? rendered\n : [\n h(\n Alert,\n {variant: 'warning'},\n () => t('errors.signup.components.not.available') || 'No components available',\n ),\n ],\n ),\n );\n\n return h(Card, {class: containerClass, variant: props.variant}, () => cardChildren);\n };\n },\n});\n\nexport default BaseSignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedFlowComponent, EmbeddedFlowComponentType, FieldType} from '@asgardeo/browser';\nimport {type VNode, h} from 'vue';\nimport FacebookButton from '../../../../adapters/FacebookButton';\nimport GitHubButton from '../../../../adapters/GitHubButton';\nimport GoogleButton from '../../../../adapters/GoogleButton';\nimport MicrosoftButton from '../../../../adapters/MicrosoftButton';\nimport {createField} from '../../../../factories/FieldFactory';\nimport Button from '../../../../primitives/Button';\nimport Typography from '../../../../primitives/Typography';\n\n/**\n * Mirrors the logic in `packages/react/.../SignUp/v1/SignUpOptionFactory.tsx` \u2014\n * renders the V1 flow component shapes (`TYPOGRAPHY`, `INPUT`, `BUTTON`,\n * `FORM`, `SELECT`, `DIVIDER`, `IMAGE`, `RICH_TEXT`) returned by the Asgardeo\n * `/api/server/v1/flow/execute` endpoint.\n *\n * Each leaf component returns a Vue VNode (or null for unknown types). Branch\n * components (`FORM`) recurse so children render as a flat list.\n */\n\n/**\n * Resolve the form-field name for an input component.\n * Asgardeo V1 stores the bound parameter name in `config.identifier` (e.g.\n * `http://wso2.org/claims/emailaddress`), with `config.name` used as a fallback.\n */\nconst getInputName = (component: any): string => {\n const cfg: any = component.config || {};\n return (cfg.name as string) || (cfg.identifier as string) || (component.id as string);\n};\n\n/**\n * Map V1 INPUT variants/types to the SDK's internal `FieldType` so the existing\n * `createField` factory (used by the V1 sign-in flow too) produces the right\n * primitive (`TextField`, `PasswordField`, `Checkbox`, etc.).\n */\nconst inferFieldType = (component: any): FieldType => {\n const variant: string = String(component.variant || '').toUpperCase();\n const cfg: any = component.config || {};\n const cfgType: string = String(cfg.type || '').toLowerCase();\n\n if (variant === 'EMAIL' || cfgType === 'email') return FieldType.Email;\n if (variant === 'PASSWORD' || cfgType === 'password') return FieldType.Password;\n if (variant === 'TELEPHONE' || cfgType === 'tel') return FieldType.Text;\n if (variant === 'NUMBER' || cfgType === 'number') return FieldType.Number;\n if (variant === 'DATE' || cfgType === 'date') return FieldType.Date;\n if (variant === 'CHECKBOX' || cfgType === 'checkbox') return FieldType.Checkbox;\n return FieldType.Text;\n};\n\n/**\n * Map TYPOGRAPHY variants (H1-H6, BODY, CAPTION etc.) to the Vue Typography\n * primitive's variant prop.\n */\nconst inferTypographyVariant = (\n component: any,\n): 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline' => {\n const variant: string = String(component.variant || '').toUpperCase();\n switch (variant) {\n case 'H1':\n return 'h1';\n case 'H2':\n return 'h2';\n case 'H3':\n return 'h3';\n case 'H4':\n return 'h4';\n case 'H5':\n return 'h5';\n case 'H6':\n return 'h6';\n case 'SUBTITLE1':\n return 'subtitle1';\n case 'SUBTITLE2':\n return 'subtitle2';\n case 'BODY2':\n return 'body2';\n case 'CAPTION':\n return 'caption';\n case 'OVERLINE':\n return 'overline';\n default:\n return 'body1';\n }\n};\n\n/**\n * Detect whether a BUTTON looks like a known social-login provider so we can\n * render a branded button (matches the React V1 factory's behaviour).\n */\nconst matchesSocialProvider = (component: any, provider: 'google' | 'github' | 'microsoft' | 'facebook'): boolean => {\n const text: string = String(component?.config?.text || component?.config?.label || '').toLowerCase();\n const variant: string = String(component?.variant || '').toUpperCase();\n return variant === 'SOCIAL' && text.includes(provider);\n};\n\n/**\n * Props shared by all sign-up component renderers.\n */\nexport interface BaseSignUpOptionProps {\n buttonClassName?: string;\n component: EmbeddedFlowComponent;\n formErrors: Record<string, string>;\n formValues: Record<string, string>;\n inputClassName?: string;\n isFormValid: boolean;\n isLoading: boolean;\n onInputChange: (name: string, value: string) => void;\n onSubmit: (component: EmbeddedFlowComponent, data?: Record<string, any>) => void;\n size?: 'small' | 'medium' | 'large';\n touchedFields: Record<string, boolean>;\n}\n\n/**\n * Build a VNode for a single V1 flow component. Returns `null` for unknown\n * types (caller filters these out).\n */\nexport const createSignUpComponent = (props: BaseSignUpOptionProps): VNode | VNode[] | null => {\n const {\n component,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n onSubmit,\n inputClassName,\n buttonClassName,\n } = props;\n\n const cfg: any = (component as any).config || {};\n\n switch (component.type) {\n case EmbeddedFlowComponentType.Typography: {\n const text: string = String(cfg.text || cfg.label || '');\n return h(\n Typography,\n {style: 'margin-bottom:0.5rem', variant: inferTypographyVariant(component)},\n {default: () => text},\n );\n }\n\n case EmbeddedFlowComponentType.Input: {\n const name: string = getInputName(component);\n const fieldType: FieldType = inferFieldType(component);\n const value: string = formValues[name] || '';\n const isTouched: boolean = touchedFields[name] || false;\n const error: string | undefined = isTouched ? formErrors[name] : undefined;\n\n return createField({\n className: inputClassName,\n disabled: isLoading,\n error,\n label: String(cfg.label || ''),\n name,\n onChange: (newValue: string) => onInputChange(name, newValue),\n placeholder: String(cfg.placeholder || ''),\n required: Boolean(cfg.required),\n touched: isTouched,\n type: fieldType,\n value,\n });\n }\n\n case EmbeddedFlowComponentType.Button: {\n const text: string = String(cfg.text || cfg.label || 'Submit');\n const variant: string = String(component.variant || 'PRIMARY').toUpperCase();\n const isPrimary: boolean = variant === 'PRIMARY';\n const handleClick = (): void => onSubmit(component, undefined);\n\n // Branded social-login buttons for known providers\n if (matchesSocialProvider(component, 'google')) {\n return h(GoogleButton, {class: buttonClassName, isLoading, onClick: handleClick});\n }\n if (matchesSocialProvider(component, 'github')) {\n return h(GitHubButton, {class: buttonClassName, isLoading, onClick: handleClick});\n }\n if (matchesSocialProvider(component, 'microsoft')) {\n return h(MicrosoftButton, {class: buttonClassName, isLoading, onClick: handleClick});\n }\n if (matchesSocialProvider(component, 'facebook')) {\n return h(FacebookButton, {class: buttonClassName, isLoading, onClick: handleClick});\n }\n\n // Generic submit/secondary button\n return h(\n Button,\n {\n class: buttonClassName,\n color: isPrimary ? 'primary' : 'secondary',\n 'data-testid': 'asgardeo-signup-submit',\n disabled: isLoading || (!isFormValid && cfg.type === 'submit'),\n fullWidth: true,\n loading: isLoading,\n onClick: handleClick,\n type: cfg.type === 'submit' ? 'submit' : 'button',\n variant: isPrimary ? 'solid' : 'outline',\n },\n {default: () => text},\n );\n }\n\n case EmbeddedFlowComponentType.Form: {\n // Recursively render child components inline (one form wrapper at the\n // BaseSignUp level handles native `<form>` semantics \u2014 we just unwrap\n // children here to keep the render flat).\n const children: any[] = (component as any).components || [];\n const nodes: VNode[] = [];\n children.forEach((child: EmbeddedFlowComponent) => {\n const rendered: VNode | VNode[] | null = createSignUpComponent({...props, component: child});\n if (rendered === null) return;\n if (Array.isArray(rendered)) nodes.push(...rendered);\n else nodes.push(rendered);\n });\n return nodes;\n }\n\n case EmbeddedFlowComponentType.Divider: {\n return h('hr', {\n class: 'asgardeo-signup__divider',\n style: 'margin:0.75rem 0;border:0;border-top:1px solid #e5e7eb',\n });\n }\n\n case EmbeddedFlowComponentType.Image: {\n const src: string = String(cfg.src || cfg.url || '');\n const alt: string = String(cfg.alt || '');\n if (!src) return null;\n return h('img', {alt, src, style: 'max-width:100%;height:auto;display:block;margin:0.5rem auto'});\n }\n\n default: {\n // Asgardeo's V1 flow API also returns 'RICH_TEXT' which is not in the V1\n // component-type enum (the enum predates it). Render its raw HTML so\n // links and inline copy show up.\n if (String(component.type).toUpperCase() === 'RICH_TEXT') {\n const html: string = String(cfg.text || cfg.label || '');\n return h('div', {class: 'asgardeo-signup__rich-text', innerHTML: html});\n }\n return null;\n }\n }\n};\n\n/**\n * Render an array of V1 flow components as Vue VNodes, flattening nested\n * containers (FORM) into a single list.\n */\nexport const renderSignUpComponents = (\n components: EmbeddedFlowComponent[],\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n onSubmit: (component: EmbeddedFlowComponent, data?: Record<string, any>) => void,\n options?: {\n buttonClassName?: string;\n inputClassName?: string;\n size?: 'small' | 'medium' | 'large';\n },\n): VNode[] => {\n const result: VNode[] = [];\n components.forEach((component: EmbeddedFlowComponent) => {\n const rendered: VNode | VNode[] | null = createSignUpComponent({\n buttonClassName: options?.buttonClassName,\n component,\n formErrors,\n formValues,\n inputClassName: options?.inputClassName,\n isFormValid,\n isLoading,\n onInputChange,\n onSubmit,\n size: options?.size,\n touchedFields,\n });\n if (rendered === null) return;\n if (Array.isArray(rendered)) result.push(...rendered);\n else result.push(rendered);\n });\n return result;\n};\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedFlowExecuteRequestPayload,\n EmbeddedFlowExecuteResponse,\n EmbeddedFlowResponseType,\n EmbeddedFlowType,\n} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignUp from './BaseSignUp';\nimport type {BaseSignUpRenderProps} from './BaseSignUp';\nimport useAsgardeo from '../../../../composables/useAsgardeo';\n\nexport type SignUpRenderProps = BaseSignUpRenderProps;\n\n/**\n * SignUp \u2014 embedded sign-up component that handles API calls and delegates UI to BaseSignUp.\n */\nconst SignUp: Component = defineComponent({\n name: 'SignUp',\n props: {\n afterSignUpUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n messageClassName: {default: '', type: String},\n onComplete: {default: undefined, type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n shouldRedirectAfterSignUp: {default: true, type: Boolean},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'elevated' | 'outlined' | 'flat'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {signUp, isInitialized, applicationId} = useAsgardeo();\n\n const handleInitialize = async (\n payload?: EmbeddedFlowExecuteRequestPayload,\n ): Promise<EmbeddedFlowExecuteResponse> => {\n const urlParams: URLSearchParams = new URL(window.location.href).searchParams;\n const applicationIdFromUrl: string | null = urlParams.get('applicationId');\n const effectiveApplicationId: string | undefined = applicationId || applicationIdFromUrl || undefined;\n\n const initialPayload: any = payload || {\n flowType: EmbeddedFlowType.Registration,\n ...(effectiveApplicationId && {applicationId: effectiveApplicationId}),\n };\n\n return (await signUp(initialPayload)) as EmbeddedFlowExecuteResponse;\n };\n\n const handleOnSubmit = async (payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse> =>\n (await signUp(payload)) as EmbeddedFlowExecuteResponse;\n\n const handleComplete = (response: EmbeddedFlowExecuteResponse): void => {\n props.onComplete?.(response);\n\n const oauthRedirectUrl: string | undefined = (response as any)?.redirectUrl;\n if (props.shouldRedirectAfterSignUp && oauthRedirectUrl) {\n window.location.href = oauthRedirectUrl;\n return;\n }\n\n if (\n props.shouldRedirectAfterSignUp &&\n response?.type !== EmbeddedFlowResponseType.Redirection &&\n props.afterSignUpUrl\n ) {\n window.location.href = props.afterSignUpUrl;\n }\n\n if (\n props.shouldRedirectAfterSignUp &&\n response?.type === EmbeddedFlowResponseType.Redirection &&\n response?.data?.redirectURL &&\n !response.data.redirectURL.includes('oauth') &&\n !response.data.redirectURL.includes('auth')\n ) {\n window.location.href = response.data.redirectURL;\n }\n };\n\n return (): VNode | null =>\n h(\n BaseSignUp,\n {\n afterSignUpUrl: props.afterSignUpUrl,\n buttonClassName: props.buttonClassName,\n className: props.className,\n errorClassName: props.errorClassName,\n inputClassName: props.inputClassName,\n isInitialized: isInitialized?.value ?? false,\n messageClassName: props.messageClassName,\n onComplete: handleComplete,\n onError: props.onError,\n onInitialize: handleInitialize,\n onSubmit: handleOnSubmit,\n showSubtitle: props.showSubtitle,\n showTitle: props.showTitle,\n size: props.size,\n variant: props.variant,\n },\n slots['default'] ? {default: (renderProps: any) => slots['default']!(renderProps)} : undefined,\n );\n },\n});\n\nexport default SignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,\n EmbeddedFlowExecuteRequestPayload,\n EmbeddedFlowExecuteResponse,\n EmbeddedFlowResponseType,\n EmbeddedFlowStatus,\n FlowMetadataResponse,\n withVendorCSSClassPrefix,\n} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport useFlowMeta from '../../../../composables/useFlowMeta';\nimport useI18n from '../../../../composables/useI18n';\nimport {createVueLogger} from '../../../../utils/logger';\nimport {normalizeFlowResponse, extractErrorMessage} from '../../../../utils/v2/flowTransformer';\nimport getAuthComponentHeadings from '../../../../utils/v2/getAuthComponentHeadings';\nimport {handlePasskeyRegistration} from '../../../../utils/v2/passkey';\nimport Alert from '../../../primitives/Alert';\nimport Card from '../../../primitives/Card';\nimport Spinner from '../../../primitives/Spinner';\nimport Typography from '../../../primitives/Typography';\nimport {renderSignUpComponents} from '../../sign-in/AuthOptionFactory';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('BaseSignUp');\n\n/**\n * Passkey registration tracking state.\n */\ninterface PasskeyState {\n actionId: string | null;\n creationOptions: string | null;\n error: Error | null;\n flowId: string | null;\n isActive: boolean;\n}\n\n/**\n * Render props passed to the default scoped slot.\n */\nexport interface BaseSignUpRenderProps {\n components: any[];\n error?: Error | null;\n fieldErrors: Record<string, string>;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n isLoading: boolean;\n isValid: boolean;\n messages: Array<{message: string; type: string}>;\n subtitle: string;\n title: string;\n touched: Record<string, boolean>;\n validateForm: () => {fieldErrors: Record<string, string>; isValid: boolean};\n values: Record<string, string>;\n}\n\nexport interface BaseSignUpProps {\n afterSignUpUrl?: string;\n buttonClassName?: string;\n className?: string;\n error?: Error | null;\n errorClassName?: string;\n inputClassName?: string;\n isInitialized?: boolean;\n messageClassName?: string;\n onComplete?: (response: EmbeddedFlowExecuteResponse) => void;\n onError?: (error: Error) => void;\n onFlowChange?: (response: EmbeddedFlowExecuteResponse) => void;\n onInitialize?: (payload?: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>;\n onSubmit?: (payload: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>;\n shouldRedirectAfterSignUp?: boolean;\n showLogo?: boolean;\n showSubtitle?: boolean;\n showTitle?: boolean;\n size?: 'small' | 'medium' | 'large';\n variant?: 'elevated' | 'outlined' | 'flat';\n}\n\ninterface FieldDefinition {\n name: string;\n required: boolean;\n type: string;\n}\n\nconst extractFormFields = (components: any[]): FieldDefinition[] => {\n const fields: FieldDefinition[] = [];\n const process = (comps: any[]): void => {\n comps.forEach((c: any) => {\n if (\n c.type === EmbeddedFlowComponentType.TextInput ||\n c.type === EmbeddedFlowComponentType.PasswordInput ||\n c.type === EmbeddedFlowComponentType.EmailInput ||\n c.type === EmbeddedFlowComponentType.Select\n ) {\n const fieldName: string = c.ref || c.id;\n fields.push({name: fieldName, required: c.required || false, type: c.type});\n }\n if (c.components && Array.isArray(c.components)) {\n process(c.components);\n }\n });\n };\n process(components);\n return fields;\n};\n\n/**\n * BaseSignUp \u2014 app-native sign-up presentation component.\n *\n * Manages the sign-up flow lifecycle including initialization, form state,\n * passkey registration, popup-based social OAuth, and renders the server-driven UI.\n */\nconst BaseSignUp: Component = defineComponent({\n emits: ['error', 'complete', 'flowChange'],\n name: 'BaseSignUp',\n props: {\n afterSignUpUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n error: {default: null, type: Object as PropType<Error | null>},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n isInitialized: {default: false, type: Boolean},\n messageClassName: {default: '', type: String},\n onComplete: {default: undefined, type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>,\n },\n onInitialize: {\n default: undefined,\n type: Function as PropType<(payload?: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>>,\n },\n onSubmit: {\n default: undefined,\n type: Function as PropType<(payload: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>>,\n },\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {meta: flowMetaRef} = useFlowMeta();\n const {t} = useI18n();\n\n // \u2500\u2500 State \u2500\u2500\n const isLoading: Ref<boolean> = ref(false);\n const isFlowInitialized: Ref<boolean> = ref(false);\n const currentFlow: Ref<EmbeddedFlowExecuteResponse | null> = ref(null);\n const apiError: Ref<Error | null> = ref(null);\n const flowMessages: Ref<Array<{message: string; type: string}>> = ref([]);\n const passkeyState: Ref<PasskeyState> = ref({\n actionId: null,\n creationOptions: null,\n error: null,\n flowId: null,\n isActive: false,\n });\n\n // Form state\n const formValues: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n const formErrors: Ref<Record<string, string>> = ref({});\n const isFormValid: Ref<boolean> = ref(true);\n\n // One-time flags (plain mutable, not reactive)\n let initializationAttempted: boolean = false;\n let passkeyProcessed: boolean = false;\n\n // \u2500\u2500 Helpers \u2500\u2500\n\n const handleError = (error: any): void => {\n const errorMessage: string = error?.failureReason || extractErrorMessage(error, t);\n apiError.value = error instanceof Error ? error : new Error(errorMessage);\n flowMessages.value = [{message: errorMessage, type: 'error'}];\n };\n\n const normalizeFlowResponseLocal = (response: EmbeddedFlowExecuteResponse): EmbeddedFlowExecuteResponse => {\n if (response?.data?.components && Array.isArray(response.data.components)) {\n return response;\n }\n if (response?.data) {\n const {components} = normalizeFlowResponse(\n response,\n t,\n {defaultErrorKey: 'components.signUp.errors.generic', resolveTranslations: false},\n (flowMetaRef as Ref<FlowMetadataResponse | null>).value,\n );\n return {...response, data: {...response.data, components: components as any}};\n }\n return response;\n };\n\n const setupFormFields = (flowResponse: EmbeddedFlowExecuteResponse): void => {\n const fields: FieldDefinition[] = extractFormFields(flowResponse.data?.components || []);\n const initialValues: Record<string, string> = {};\n fields.forEach((f: FieldDefinition) => {\n initialValues[f.name] = '';\n });\n formValues.value = initialValues;\n touchedFields.value = {};\n formErrors.value = {};\n isFormValid.value = true;\n };\n\n const computeFormErrors = (): Record<string, string> => {\n const components: any[] = currentFlow.value?.data?.components || [];\n const fields: FieldDefinition[] = extractFormFields(components);\n const errors: Record<string, string> = {};\n fields.forEach((field: FieldDefinition) => {\n const value: string = formValues.value[field.name] || '';\n if (field.required && (!value || value.trim() === '')) {\n errors[field.name] = t('validations.required.field.error') || 'This field is required';\n }\n if (\n (field.type === EmbeddedFlowComponentType.EmailInput || field.type === 'EMAIL') &&\n value &&\n !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)\n ) {\n errors[field.name] = t('field.email.invalid') || 'Invalid email address';\n }\n });\n return errors;\n };\n\n const touchAllFields = (): void => {\n const fields: FieldDefinition[] = extractFormFields(currentFlow.value?.data?.components || []);\n const newTouched: Record<string, boolean> = {};\n fields.forEach((f: FieldDefinition) => {\n newTouched[f.name] = true;\n });\n touchedFields.value = newTouched;\n };\n\n const validateForm = (): {fieldErrors: Record<string, string>; isValid: boolean} => {\n touchAllFields();\n const errors: Record<string, string> = computeFormErrors();\n formErrors.value = errors;\n const valid: boolean = Object.keys(errors).length === 0;\n isFormValid.value = valid;\n return {fieldErrors: errors, isValid: valid};\n };\n\n // \u2500\u2500 Input handlers \u2500\u2500\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n };\n\n const handleInputBlur = (name: string): void => {\n touchedFields.value = {...touchedFields.value, [name]: true};\n };\n\n // \u2500\u2500 Popup OAuth for social sign-up \u2500\u2500\n\n const handleRedirectionIfNeeded = (response: EmbeddedFlowExecuteResponse): boolean => {\n if (response?.type !== EmbeddedFlowResponseType.Redirection || !response?.data?.redirectURL) {\n return false;\n }\n\n const redirectUrl: string = response.data.redirectURL;\n const popup: Window | null = window.open(\n redirectUrl,\n 'oauth_popup',\n 'width=500,height=600,scrollbars=yes,resizable=yes',\n );\n\n if (!popup) {\n logger.error('Failed to open popup window');\n return false;\n }\n\n let hasProcessedCallback: boolean = false;\n let popupMonitor: ReturnType<typeof setInterval> | null = null;\n let messageHandler: ((event: MessageEvent) => Promise<void>) | null = null;\n\n const cleanup = (): void => {\n if (messageHandler) window.removeEventListener('message', messageHandler);\n if (popupMonitor) clearInterval(popupMonitor);\n };\n\n const processOAuthCode = async (code: string, state: string): Promise<void> => {\n const payload: EmbeddedFlowExecuteRequestPayload = {\n ...(currentFlow.value?.flowId && {flowId: currentFlow.value.flowId}),\n action: '',\n flowType: (currentFlow.value as any)?.flowType || 'REGISTRATION',\n inputs: {code, state},\n } as any;\n\n try {\n const continueResponse: EmbeddedFlowExecuteResponse = await props.onSubmit(payload);\n props.onFlowChange?.(continueResponse);\n\n if (continueResponse.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(continueResponse);\n } else if (continueResponse.flowStatus === EmbeddedFlowStatus.Incomplete) {\n currentFlow.value = continueResponse;\n setupFormFields(continueResponse);\n }\n popup.close();\n cleanup();\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n popup.close();\n cleanup();\n }\n };\n\n messageHandler = async (event: MessageEvent): Promise<void> => {\n if (event.source !== popup) return;\n const expectedOrigin: string = props.afterSignUpUrl\n ? new URL(props.afterSignUpUrl).origin\n : window.location.origin;\n if (event.origin !== expectedOrigin && event.origin !== window.location.origin) return;\n const {code, state} = event.data;\n if (code && state) {\n await processOAuthCode(code, state);\n }\n };\n\n window.addEventListener('message', messageHandler);\n\n popupMonitor = setInterval(async () => {\n try {\n if (popup.closed) {\n cleanup();\n return;\n }\n if (hasProcessedCallback) return;\n try {\n const popupUrl: string = popup.location.href;\n if (popupUrl && (popupUrl.includes('code=') || popupUrl.includes('error='))) {\n hasProcessedCallback = true;\n const url: URL = new URL(popupUrl);\n const code: string | null = url.searchParams.get('code');\n const state: string | null = url.searchParams.get('state');\n const error: string | null = url.searchParams.get('error');\n\n if (error) {\n logger.error('OAuth error');\n popup.close();\n cleanup();\n return;\n }\n if (code && state) {\n await processOAuthCode(code, state);\n }\n }\n } catch {\n // Cross-origin error expected during OAuth redirect\n }\n } catch {\n logger.error('Error monitoring popup');\n }\n }, 1000);\n\n return true;\n };\n\n // \u2500\u2500 Submit handler \u2500\u2500\n\n const handleSubmit = async (\n component: any,\n data?: Record<string, any>,\n skipValidation?: boolean,\n ): Promise<void> => {\n if (!currentFlow.value) return;\n\n if (!skipValidation) {\n const validation: {fieldErrors: Record<string, string>; isValid: boolean} = validateForm();\n if (!validation.isValid) return;\n }\n\n isLoading.value = true;\n apiError.value = null;\n flowMessages.value = [];\n\n try {\n const filteredInputs: Record<string, any> = {};\n if (data) {\n Object.entries(data).forEach(([key, value]: [string, any]) => {\n if (value !== null && value !== undefined && value !== '') {\n filteredInputs[key] = value;\n }\n });\n }\n\n const payload: EmbeddedFlowExecuteRequestPayload = {\n ...(currentFlow.value.flowId && {flowId: currentFlow.value.flowId}),\n flowType: (currentFlow.value as any).flowType || 'REGISTRATION',\n ...(component.id && {action: component.id}),\n inputs: filteredInputs,\n } as any;\n\n const rawResponse: EmbeddedFlowExecuteResponse = await props.onSubmit(payload);\n const response: EmbeddedFlowExecuteResponse = normalizeFlowResponseLocal(rawResponse);\n props.onFlowChange?.(response);\n\n if (response.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(response);\n return;\n }\n\n if (response.flowStatus === EmbeddedFlowStatus.Incomplete) {\n if (handleRedirectionIfNeeded(response)) return;\n\n if (response.data?.additionalData?.['passkeyCreationOptions']) {\n const {passkeyCreationOptions} = response.data.additionalData as any;\n const effectiveFlowId: string | undefined = response.flowId || currentFlow.value?.flowId;\n passkeyProcessed = false;\n passkeyState.value = {\n actionId: component.id || 'submit',\n creationOptions: passkeyCreationOptions,\n error: null,\n flowId: effectiveFlowId || null,\n isActive: true,\n };\n isLoading.value = false;\n return;\n }\n\n currentFlow.value = response;\n setupFormFields(response);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n } finally {\n isLoading.value = false;\n }\n };\n\n // \u2500\u2500 Passkey registration watch \u2500\u2500\n\n watch(\n () => passkeyState.value,\n async (state: PasskeyState) => {\n if (!state.isActive || !state.creationOptions || !state.flowId) return;\n if (passkeyProcessed) return;\n passkeyProcessed = true;\n\n try {\n const passkeyResponse: string = await handlePasskeyRegistration(state.creationOptions);\n const passkeyObj: any = JSON.parse(passkeyResponse);\n const inputs: Record<string, string> = {\n attestationObject: passkeyObj.response.attestationObject,\n clientDataJSON: passkeyObj.response.clientDataJSON,\n credentialId: passkeyObj.id,\n };\n\n const payload: EmbeddedFlowExecuteRequestPayload = {\n actionId: state.actionId || 'submit',\n flowId: state.flowId,\n flowType: (currentFlow.value as any)?.flowType || 'REGISTRATION',\n inputs,\n } as any;\n\n const nextResponse: EmbeddedFlowExecuteResponse = await props.onSubmit(payload);\n const processed: EmbeddedFlowExecuteResponse = normalizeFlowResponseLocal(nextResponse);\n props.onFlowChange?.(processed);\n\n if (processed.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(processed);\n } else {\n currentFlow.value = processed;\n setupFormFields(processed);\n }\n\n passkeyState.value = {actionId: null, creationOptions: null, error: null, flowId: null, isActive: false};\n } catch (error: unknown) {\n passkeyState.value = {...passkeyState.value, error: error as Error, isActive: false};\n handleError(error);\n props.onError?.(error as Error);\n }\n },\n {deep: true},\n );\n\n // \u2500\u2500 Flow initialization \u2500\u2500\n\n watch(\n () => [props.isInitialized, isFlowInitialized.value] as [boolean, boolean],\n ([initialized, flowInit]: [boolean, boolean]) => {\n // Skip if URL has OAuth code params\n const urlParams: URLSearchParams = new URL(window.location.href).searchParams;\n if (urlParams.get('code') || urlParams.get('state')) return;\n\n if (initialized && !flowInit && !initializationAttempted) {\n initializationAttempted = true;\n\n (async (): Promise<void> => {\n isLoading.value = true;\n apiError.value = null;\n flowMessages.value = [];\n\n try {\n const rawResponse: EmbeddedFlowExecuteResponse = await props.onInitialize();\n const response: EmbeddedFlowExecuteResponse = normalizeFlowResponseLocal(rawResponse);\n currentFlow.value = response;\n isFlowInitialized.value = true;\n props.onFlowChange?.(response);\n\n if (response.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(response);\n return;\n }\n if (response.flowStatus === EmbeddedFlowStatus.Incomplete) {\n setupFormFields(response);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n } finally {\n isLoading.value = false;\n }\n })();\n }\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Render \u2500\u2500\n\n return (): VNode | null => {\n const containerClass: string = [\n withVendorCSSClassPrefix('signup'),\n withVendorCSSClassPrefix(`signup--${props.size}`),\n withVendorCSSClassPrefix(`signup--${props.variant}`),\n props.className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // Scoped slot / render props\n if (slots['default']) {\n const renderProps: BaseSignUpRenderProps = {\n components: currentFlow.value?.data?.components || [],\n error: apiError.value,\n fieldErrors: formErrors.value,\n handleInputChange,\n handleSubmit,\n isLoading: isLoading.value,\n isValid: isFormValid.value,\n messages: flowMessages.value,\n subtitle: t('signup.subheading') || 'Create your account',\n title: t('signup.heading') || 'Sign Up',\n touched: touchedFields.value,\n validateForm: (): {fieldErrors: Record<string, string>; isValid: boolean} => {\n const result: {fieldErrors: Record<string, string>; isValid: boolean} = validateForm();\n return {fieldErrors: result.fieldErrors, isValid: result.isValid};\n },\n values: formValues.value,\n };\n return h('div', {class: containerClass}, slots['default'](renderProps));\n }\n\n // Loading state\n if (!isFlowInitialized.value && isLoading.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;justify-content:center;padding:2rem'}, h(Spinner)),\n );\n }\n\n // No flow available\n if (!currentFlow.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h(\n Alert,\n {variant: 'error'},\n () => t('errors.signup.flow.initialization.failure') || 'Failed to initialize sign-up flow',\n ),\n );\n }\n\n // Extract headings\n const componentsToRender: any[] = currentFlow.value.data?.components || [];\n const {title, subtitle, componentsWithoutHeadings} = getAuthComponentHeadings(\n componentsToRender,\n undefined,\n undefined,\n t('signup.heading') || 'Sign Up',\n t('signup.subheading') || 'Create your account',\n );\n\n const meta: FlowMetadataResponse | null = (flowMetaRef as Ref<FlowMetadataResponse | null>).value;\n\n const renderedComponents: VNode[] =\n componentsWithoutHeadings.length > 0\n ? renderSignUpComponents(\n componentsWithoutHeadings,\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid.value,\n handleInputChange,\n {\n buttonClassName: props.buttonClassName,\n inputClassName: props.inputClassName,\n meta,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size: props.size,\n t,\n variant: props.variant,\n },\n )\n : [];\n\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n // Header with title/subtitle\n props.showTitle || props.showSubtitle\n ? h('div', {style: 'padding: 1rem 1rem 0'}, [\n props.showTitle ? h(Typography, {variant: 'h5'}, () => title) : null,\n props.showSubtitle\n ? h(Typography, {style: 'margin-top: 0.25rem', variant: 'body1'}, () => subtitle)\n : null,\n ])\n : null,\n // External error\n props.error\n ? h(\n 'div',\n {style: 'padding: 0 1rem'},\n h(Alert, {variant: 'error'}, () => props.error.message),\n )\n : null,\n // Flow messages\n flowMessages.value.length > 0\n ? h(\n 'div',\n {style: 'padding: 0 1rem'},\n flowMessages.value.map((msg: {message: string; type: string}, i: number) =>\n h(Alert, {key: i, variant: msg.type === 'error' ? 'error' : 'info'}, () => msg.message),\n ),\n )\n : null,\n // Components\n h(\n 'div',\n {style: 'padding: 1rem'},\n renderedComponents.length > 0\n ? renderedComponents\n : [\n h(\n Alert,\n {variant: 'warning'},\n () => t('errors.signup.components.not.available') || 'No components available',\n ),\n ],\n ),\n ]);\n };\n },\n});\n\nexport default BaseSignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedFlowComponentV2 as EmbeddedFlowComponent} from '@asgardeo/browser';\n\n/**\n * Result of heading extraction from flow components\n */\nexport interface HeadingExtractionResult {\n heading: EmbeddedFlowComponent | null;\n subheading: EmbeddedFlowComponent | null;\n}\n\n/**\n * Complete result of authentication component heading extraction\n */\nexport interface AuthComponentHeadingsResult {\n componentsWithoutHeadings: EmbeddedFlowComponent[];\n headingComponents: HeadingExtractionResult;\n subtitle: string;\n title: string;\n}\n\n/**\n * Extracts heading and subheading components from authentication flow components\n * and provides resolved title/subtitle text with fallback logic.\n */\nconst getAuthComponentHeadings = (\n components: EmbeddedFlowComponent[],\n flowTitle?: string,\n flowSubtitle?: string,\n defaultTitle?: string,\n defaultSubtitle?: string,\n): AuthComponentHeadingsResult => {\n let heading: EmbeddedFlowComponent | null = null;\n let subheading: EmbeddedFlowComponent | null = null;\n\n const findHeadings = (comps: EmbeddedFlowComponent[]): void => {\n comps.some((component: EmbeddedFlowComponent) => {\n if (component.type === 'TEXT' && component.variant && component.variant.startsWith('HEADING_')) {\n if (!heading) {\n heading = component;\n } else if (!subheading) {\n subheading = component;\n return true;\n }\n }\n\n if (component.components && component.components.length > 0) {\n findHeadings(component.components);\n return Boolean(heading && subheading);\n }\n\n return false;\n });\n };\n\n const filterComponents = (comps: EmbeddedFlowComponent[]): EmbeddedFlowComponent[] => {\n let foundHeadings: number = 0;\n const maxHeadings: number = 2;\n\n const filter = (items: EmbeddedFlowComponent[]): EmbeddedFlowComponent[] =>\n items.reduce((acc: EmbeddedFlowComponent[], component: EmbeddedFlowComponent) => {\n if (\n foundHeadings < maxHeadings &&\n component.type === 'TEXT' &&\n component.variant &&\n component.variant.startsWith('HEADING_')\n ) {\n foundHeadings += 1;\n return acc;\n }\n\n if (component.components && component.components.length > 0) {\n const filteredNestedComponents: EmbeddedFlowComponent[] = filter(component.components);\n if (filteredNestedComponents.length > 0) {\n acc.push({\n ...component,\n components: filteredNestedComponents,\n });\n }\n } else {\n acc.push(component);\n }\n\n return acc;\n }, []);\n\n return filter(comps);\n };\n\n const getComponentText = (component: EmbeddedFlowComponent | null): string => {\n if (!component) return '';\n return component.label || '';\n };\n\n findHeadings(components);\n\n const headingText: string = getComponentText(heading);\n const subheadingText: string = getComponentText(subheading);\n\n const result: AuthComponentHeadingsResult = {\n componentsWithoutHeadings: filterComponents(components),\n headingComponents: {heading, subheading},\n subtitle: flowSubtitle || subheadingText || defaultSubtitle || '',\n title: flowTitle || headingText || defaultTitle || '',\n };\n\n return result;\n};\n\nexport default getAuthComponentHeadings;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignUpV1 from './v1/BaseSignUp';\nimport BaseSignUpV2 from './v2/BaseSignUp';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type {BaseSignUpRenderProps, BaseSignUpProps} from './v2/BaseSignUp';\n\n/**\n * BaseSignUp \u2014 platform-aware base sign-up component.\n *\n * Routes to V1 (component-driven, V1 flow API: `TYPOGRAPHY` / `INPUT` /\n * `BUTTON` / `FORM` shapes) or V2 (`AsgardeoV2` platform with `BLOCK` / `STACK`\n * / `TEXT_INPUT` shapes) based on the `platform` value resolved by\n * {@link useAsgardeo}.\n *\n * Mirrors the React `BaseSignUp` dispatcher and matches the existing pattern\n * already used by `BaseSignIn` in this package.\n */\nconst BaseSignUp: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseSignUp',\n setup(_props: Record<string, unknown>, {attrs, slots}: SetupContext): () => VNode {\n const {platform} = useAsgardeo();\n\n return (): VNode => {\n if (platform === Platform.AsgardeoV2) {\n return h(BaseSignUpV2, {...attrs}, slots);\n }\n return h(BaseSignUpV1, {...attrs}, slots);\n };\n },\n});\n\nexport default BaseSignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseUserProfile from './BaseUserProfile';\nimport useUser from '../../../composables/useUser';\n\n/**\n * UserProfile \u2014 styled user profile component.\n *\n * Retrieves user profile data from context and delegates to BaseUserProfile.\n */\n\ntype UserProfileProps = Readonly<{\n cardLayout: boolean;\n className: string;\n editable: boolean;\n hideFields: string[];\n showFields: string[];\n title: string;\n}>;\n\nconst UserProfile: Component = defineComponent({\n name: 'UserProfile',\n props: {\n cardLayout: {default: true, type: Boolean},\n className: {default: '', type: String},\n editable: {default: true, type: Boolean},\n hideFields: {default: () => [], type: Array as PropType<string[]>},\n showFields: {default: () => [], type: Array as PropType<string[]>},\n title: {default: 'Profile', type: String},\n },\n setup(props: UserProfileProps, {slots}: SetupContext): () => VNode {\n const {flattenedProfile, schemas, updateProfile} = useUser();\n\n return (): VNode =>\n h(\n BaseUserProfile,\n {\n cardLayout: props.cardLayout,\n class: withVendorCSSClassPrefix('user-profile--styled'),\n className: props.className,\n editable: props.editable,\n flattenedProfile: flattenedProfile?.value,\n hideFields: props.hideFields,\n onUpdate: updateProfile,\n schemas: schemas?.value,\n showFields: props.showFields,\n title: props.title,\n },\n slots,\n );\n },\n});\n\nexport default UserProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n type User,\n type Schema,\n type SchemaAttribute,\n type UpdateMeProfileConfig,\n WellKnownSchemaIds,\n withVendorCSSClassPrefix,\n} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type SetupContext, type VNode, defineComponent, h, ref} from 'vue';\nimport Alert from '../../primitives/Alert';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport Divider from '../../primitives/Divider';\nimport {PencilIcon} from '../../primitives/Icons';\nimport Spinner from '../../primitives/Spinner';\nimport TextField from '../../primitives/TextField';\nimport Typography from '../../primitives/Typography';\n\n/**\n * Runtime shape produced by `flattenUserSchema` \u2014 a `SchemaAttribute` with the\n * owning schema's URN attached. Modelled locally because the published\n * `FlattenedSchema` type incorrectly extends `Schema` instead of\n * `SchemaAttribute` and is therefore missing fields like `multiValued`.\n */\ntype FlatSchemaEntry = SchemaAttribute & {schemaId: string};\n\nexport interface BaseUserProfileProps {\n cardLayout?: boolean;\n className?: string;\n editable?: boolean;\n error?: string | null;\n flattenedProfile?: User;\n hideFields?: string[];\n isLoading?: boolean;\n onUpdate?: (\n requestConfig: UpdateMeProfileConfig,\n sessionId?: string,\n ) => Promise<{data: {user: User}; error: string; success: boolean}>;\n profile?: User;\n schemas?: Schema[];\n showFields?: string[];\n title?: string;\n}\n\n/**\n * Ordered list of fields to display. Each entry specifies candidate key names\n * (first match in the profile data wins), a human-readable label, and whether\n * the field is read-only.\n */\ntype ProfileFieldDescriptor = {keys: string[]; label: string; readonly: boolean};\n\n/**\n * Each entry's `keys` lists candidate flattened paths produced by\n * `generateFlattenedUserProfile`. The first key that exists in the profile\n * data is used both for display lookup and as the SCIM2 attribute path\n * `buildScimPatchValue` translates back into a proper PATCH payload.\n */\nconst PROFILE_FIELD_DESCRIPTORS: ProfileFieldDescriptor[] = [\n {keys: ['userName', 'username'], label: 'Username', readonly: true},\n {keys: ['name.givenName', 'firstName', 'givenName'], label: 'First Name', readonly: false},\n {keys: ['name.familyName', 'lastName', 'familyName'], label: 'Last Name', readonly: false},\n {keys: ['emails', 'email'], label: 'Email', readonly: true},\n {keys: ['country'], label: 'Country', readonly: false},\n {keys: ['dateOfBirth', 'birthdate', 'birthDate'], label: 'Birth Date', readonly: false},\n {keys: ['phoneNumbers.mobile', 'mobile', 'mobileNumbers'], label: 'Mobile', readonly: false},\n];\n\nconst CORE_USER_SCHEMA_ID: string = WellKnownSchemaIds.User;\n\nconst setNestedPath = (target: Record<string, unknown>, segments: string[], value: unknown): void => {\n let cursor: Record<string, unknown> = target;\n for (let i: number = 0; i < segments.length - 1; i += 1) {\n const segment: string = segments[i];\n if (typeof cursor[segment] !== 'object' || cursor[segment] === null) {\n cursor[segment] = {};\n }\n cursor = cursor[segment] as Record<string, unknown>;\n }\n cursor[segments[segments.length - 1]] = value;\n};\n\n/**\n * Build a SCIM2 PATCH `value` object for a flattened profile field update.\n *\n * Translates a flat key (e.g. `name.givenName`, `phoneNumbers.mobile`,\n * `country`) plus a string value into the canonical SCIM2 structure expected\n * by the `/scim2/Me` PATCH endpoint:\n *\n * - `name.givenName` \u2192 `{name: {givenName: value}}`\n * - `phoneNumbers.mobile` \u2192 `{phoneNumbers: [{type: 'mobile', value}]}`\n * - `emails.work` \u2192 `{emails: [{type: 'work', value}]}`\n * - `country` (WSO2 ext) \u2192 `{\"urn:scim:wso2:schema\": {country: value}}`\n * - `mobileNumbers` (multiV) \u2192 `{\"urn:scim:wso2:schema\": {mobileNumbers: [value]}}`\n *\n * Falls back to a plain `{[flatKey]: value}` when the schema is unknown so\n * unrecognised fields still produce a syntactically valid (if possibly\n * ineffective) PATCH instead of throwing.\n */\nconst buildScimPatchValue = (\n flatKey: string,\n rawValue: string,\n schemas: Schema[] | null | undefined,\n): Record<string, unknown> => {\n const list: FlatSchemaEntry[] = (schemas ?? []) as unknown as FlatSchemaEntry[];\n const entry: FlatSchemaEntry | undefined = list.find((s: FlatSchemaEntry) => s.name === flatKey);\n\n // Special case: in Asgardeo / WSO2 IS the user's mobile is stored across two\n // independent SCIM2 attributes that map to two distinct userstore columns:\n // - phoneNumbers[type=mobile].value \u2192 claim http://wso2.org/claims/mobile\n // - urn:scim:wso2:schema.mobileNumbers \u2192 claim http://wso2.org/claims/mobileNumbers\n // ID-token claims and the SCIM `phoneNumbers` array read from the first;\n // the Asgardeo Console's User Details page and consumers that read the\n // multi-valued aggregate read from the second. Update both in the same\n // PATCH so the value is consistent everywhere.\n if (flatKey === 'phoneNumbers.mobile') {\n return {\n phoneNumbers: [{type: 'mobile', value: rawValue}],\n [WellKnownSchemaIds.SystemUser]: {mobileNumbers: [rawValue]},\n };\n }\n\n // SCIM multi-valued complex attributes (phoneNumbers, emails, ims, photos, ...)\n // surface in flattenedProfile as `<attr>.<type>` (e.g. phoneNumbers.mobile).\n // The PATCH shape is an array of typed objects, NOT a nested object \u2014\n // sending `{phoneNumbers: {mobile: \"...\"}}` is invalid and silently dropped.\n const complexMultiValued: Set<string> = new Set([\n 'phoneNumbers',\n 'emails',\n 'ims',\n 'photos',\n 'addresses',\n 'entitlements',\n 'roles',\n 'x509Certificates',\n ]);\n const dotIndex: number = flatKey.indexOf('.');\n if (dotIndex > 0) {\n const head: string = flatKey.slice(0, dotIndex);\n const tail: string = flatKey.slice(dotIndex + 1);\n if (complexMultiValued.has(head)) {\n return {[head]: [{type: tail, value: rawValue}]};\n }\n }\n\n // Multi-valued simple attributes (e.g. mobileNumbers under WSO2 schema):\n // wrap the value in an array.\n const value: unknown = entry?.multiValued ? [rawValue] : rawValue;\n\n // Build the nested object for dotted attribute paths within the same\n // schema (e.g. name.givenName \u2192 {name: {givenName: value}}).\n const segments: string[] = flatKey.split('.');\n const nested: Record<string, unknown> = {};\n setNestedPath(nested, segments, value);\n\n // If the attribute belongs to an extension schema, wrap under its URN.\n // Core attributes (urn:...:core:2.0:User) sit at the root.\n const schemaId: string | undefined = entry?.schemaId;\n if (schemaId && schemaId !== CORE_USER_SCHEMA_ID) {\n return {[schemaId]: nested};\n }\n\n return nested;\n};\n\nconst AVATAR_GRADIENTS: string[] = [\n 'linear-gradient(135deg, #a855f7 0%, #ec4899 100%)',\n 'linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%)',\n 'linear-gradient(135deg, #22c55e 0%, #10b981 100%)',\n 'linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)',\n 'linear-gradient(135deg, #ec4899 0%, #f43f5e 100%)',\n 'linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)',\n 'linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)',\n 'linear-gradient(135deg, #f97316 0%, #eab308 100%)',\n];\n\nconst getAvatarGradient = (seed: string): string => {\n if (!seed) return AVATAR_GRADIENTS[0];\n let hash: number = 0;\n for (let i: number = 0; i < seed.length; i += 1) {\n const char: number = seed.charCodeAt(i);\n // eslint-disable-next-line no-bitwise\n hash = (hash * 31 + char) >>> 0;\n }\n return AVATAR_GRADIENTS[Math.abs(hash) % AVATAR_GRADIENTS.length];\n};\n\nconst getUserInitials = (user: Record<string, unknown> | null): string => {\n if (!user) return '?';\n const given: string = String(user['givenName'] || user['firstName'] || '');\n const family: string = String(user['familyName'] || user['lastName'] || '');\n if (given || family) return `${given.charAt(0)}${family.charAt(0)}`.toUpperCase();\n const fallback: string = String(user['username'] || user['userName'] || user['email'] || user['sub'] || '');\n return fallback.charAt(0).toUpperCase() || '?';\n};\n\n/**\n * BaseUserProfile \u2014 unstyled user profile component.\n *\n * Renders a profile card with avatar, title, and two-column field rows\n * that support inline editing via a pencil-icon button.\n */\nconst BaseUserProfile: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseUserProfile',\n props: {\n cardLayout: {default: true, type: Boolean},\n className: {default: '', type: String},\n editable: {default: true, type: Boolean},\n error: {default: null, type: String as PropType<string | null>},\n flattenedProfile: {default: null, type: Object as PropType<User | null>},\n hideFields: {default: () => [], type: Array as PropType<string[]>},\n isLoading: {default: false, type: Boolean},\n onUpdate: {\n default: undefined,\n type: Function as PropType<\n (\n requestConfig: UpdateMeProfileConfig,\n sessionId?: string,\n ) => Promise<{data: {user: User}; error: string; success: boolean}>\n >,\n },\n profile: {default: null, type: Object as PropType<User | null>},\n schemas: {default: () => [], type: Array as PropType<Schema[]>},\n showFields: {default: () => [], type: Array as PropType<string[]>},\n title: {default: 'Profile', type: String},\n },\n setup(props: BaseUserProfileProps, {slots}: SetupContext): () => VNode | VNode[] {\n const editingFields: Ref<Record<string, boolean>> = ref<Record<string, boolean>>({});\n const editedValues: Ref<Record<string, string>> = ref<Record<string, string>>({});\n\n return (): VNode | VNode[] => {\n if (slots['default']) {\n return slots['default']({\n error: props.error,\n isLoading: props.isLoading,\n profile: props.flattenedProfile || props.profile,\n });\n }\n\n const prefix: (className: string) => string = withVendorCSSClassPrefix;\n const data: User | null | undefined = props.flattenedProfile || props.profile;\n const dataRecord: Record<string, unknown> | null = data as Record<string, unknown> | null;\n const initials: string = getUserInitials(dataRecord);\n const avatarSeed: string = String(\n (dataRecord &&\n (dataRecord['username'] || dataRecord['userName'] || dataRecord['email'] || dataRecord['sub'])) ??\n initials,\n );\n const avatarGradient: string = getAvatarGradient(avatarSeed);\n\n const children: VNode[] = [];\n\n // Header: title\n children.push(\n h('div', {class: prefix('user-profile__header')}, [\n h(Typography, {class: prefix('user-profile__title'), variant: 'h5'}, () => props.title),\n ]),\n );\n\n children.push(h(Divider, {class: prefix('user-profile__header-divider')}));\n\n // Avatar section\n children.push(\n h('div', {class: prefix('user-profile__avatar-section')}, [\n h(\n 'div',\n {\n class: prefix('user-profile__avatar'),\n style: {background: avatarGradient},\n },\n [h('span', {class: prefix('user-profile__avatar-initials')}, initials)],\n ),\n ]),\n );\n\n if (props.error) {\n children.push(h(Alert, {class: prefix('user-profile__error'), severity: 'error' as const}, () => props.error));\n }\n\n if (props.isLoading) {\n children.push(h('div', {class: prefix('user-profile__loading')}, [h(Spinner)]));\n } else if (data) {\n const fieldDataRecord: Record<string, unknown> = data as Record<string, unknown>;\n\n // Always show all defined profile fields; honour hideFields/showFields overrides\n const descriptors: ProfileFieldDescriptor[] = PROFILE_FIELD_DESCRIPTORS.filter((d: ProfileFieldDescriptor) => {\n const activeKey: string | undefined = d.keys.find((k: string) => k in fieldDataRecord);\n const matchKey: string = activeKey ?? d.keys[0];\n if (props.hideFields && props.hideFields.length > 0 && props.hideFields.includes(matchKey)) return false;\n if (\n props.showFields &&\n props.showFields.length > 0 &&\n !props.showFields.some((f: string) => d.keys.includes(f))\n )\n return false;\n return true;\n });\n\n const fieldRows: VNode[] = [];\n\n descriptors.forEach((descriptor: ProfileFieldDescriptor) => {\n const key: string = descriptor.keys.find((k: string) => k in fieldDataRecord) ?? descriptor.keys[0];\n const value: unknown = fieldDataRecord[key];\n const isReadonly: boolean = descriptor.readonly;\n const isEditing: boolean = editingFields.value[key];\n const isEmpty: boolean = value == null || value === '';\n const {label} = descriptor;\n\n fieldRows.push(\n h('div', {class: prefix('user-profile__field'), key}, [\n // Label column\n h('div', {class: prefix('user-profile__field-label-col')}, [\n h(Typography, {class: prefix('user-profile__field-label'), variant: 'body2'}, () => label),\n ]),\n // Value column\n h('div', {class: prefix('user-profile__field-value-col')}, [\n isEditing\n ? h('div', {class: prefix('user-profile__field-edit')}, [\n h(TextField, {\n modelValue: editedValues.value[key] ?? String(value ?? ''),\n 'onUpdate:modelValue': (v: string) => {\n editedValues.value = {...editedValues.value, [key]: v};\n },\n }),\n h('div', {class: prefix('user-profile__field-edit-actions')}, [\n h(\n Button,\n {\n onClick: async (): Promise<void> => {\n if (props.onUpdate) {\n await props.onUpdate({\n payload: buildScimPatchValue(key, editedValues.value[key] ?? '', props.schemas),\n } as UpdateMeProfileConfig);\n }\n editingFields.value = {...editingFields.value, [key]: false};\n },\n size: 'small' as const,\n variant: 'solid' as const,\n },\n () => 'Save',\n ),\n h(\n Button,\n {\n onClick: (): void => {\n editingFields.value = {...editingFields.value, [key]: false};\n },\n size: 'small' as const,\n variant: 'text' as const,\n },\n () => 'Cancel',\n ),\n ]),\n ])\n : h('div', {class: prefix('user-profile__field-display')}, [\n isEmpty\n ? h(\n 'span',\n {\n class: prefix('user-profile__field-placeholder'),\n onClick:\n props.editable && !isReadonly\n ? (): void => {\n editingFields.value = {...editingFields.value, [key]: true};\n editedValues.value = {...editedValues.value, [key]: ''};\n }\n : undefined,\n },\n `Enter your ${label.toLowerCase()}`,\n )\n : h(Typography, {class: prefix('user-profile__field-value'), variant: 'body1'}, () =>\n String(value),\n ),\n props.editable && !isReadonly\n ? h(\n 'button',\n {\n 'aria-label': `Edit ${label}`,\n class: prefix('user-profile__field-edit-btn'),\n onClick: (): void => {\n editingFields.value = {...editingFields.value, [key]: true};\n editedValues.value = {...editedValues.value, [key]: String(value ?? '')};\n },\n type: 'button',\n },\n [h(PencilIcon)],\n )\n : null,\n ]),\n ]),\n ]),\n );\n });\n\n children.push(h('div', {class: prefix('user-profile__fields')}, fieldRows));\n }\n\n if (slots['footer']) {\n children.push(h('div', {class: prefix('user-profile__footer')}, slots['footer']()));\n }\n\n if (props.cardLayout) {\n return h(Card, {class: [prefix('user-profile'), props.className].filter(Boolean).join(' ')}, () => children);\n }\n\n return h('div', {class: [prefix('user-profile'), props.className].filter(Boolean).join(' ')}, children);\n };\n },\n});\n\nexport default BaseUserProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport BaseUserDropdown from './BaseUserDropdown';\nimport useAsgardeo from '../../../composables/useAsgardeo';\nimport UserProfileComponent from '../user-profile/UserProfile';\n\n/**\n * UserDropdown \u2014 styled user dropdown component.\n *\n * Retrieves user and signOut from context and delegates to BaseUserDropdown.\n */\nconst UserDropdown: Component = defineComponent({\n emits: ['profileClick'],\n name: 'UserDropdown',\n props: {\n className: {\n default: '',\n type: String,\n },\n },\n setup(props: {className: string}, {slots, emit}: {emit: any; slots: any}): () => VNode | VNode[] | null {\n const {user, signOut} = useAsgardeo();\n const isProfileModalOpen: Ref<boolean> = ref(false);\n\n return (): VNode | VNode[] | null =>\n h(\n BaseUserDropdown,\n {\n class: withVendorCSSClassPrefix('user-dropdown--styled'),\n className: props.className,\n isProfileModalOpen: isProfileModalOpen.value,\n onProfileClick: (): void => {\n isProfileModalOpen.value = true;\n emit('profileClick');\n },\n onProfileModalClose: (): void => {\n isProfileModalOpen.value = false;\n },\n onSignOut: (): void => {\n signOut();\n },\n profileContent: isProfileModalOpen.value\n ? h(UserProfileComponent, {\n cardLayout: false,\n editable: true,\n })\n : null,\n user: user.value,\n },\n slots,\n );\n },\n});\n\nexport default UserDropdown;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type User, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport {ChevronDownIcon, LogOutIcon, UserIcon, XIcon} from '../../primitives/Icons';\nimport Typography from '../../primitives/Typography';\n\nexport interface BaseUserDropdownProps {\n className?: string;\n isProfileModalOpen?: boolean;\n onProfileClick?: () => void;\n onProfileModalClose?: () => void;\n onSignOut?: () => void;\n profileContent?: VNode | null;\n user?: User | null;\n}\n\n/**\n * BaseUserDropdown \u2014 unstyled user dropdown with avatar, profile link, sign-out.\n */\nconst BaseUserDropdown: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseUserDropdown',\n props: {\n className: {default: '', type: String},\n isProfileModalOpen: {default: false, type: Boolean},\n onProfileClick: {default: undefined, type: Function as PropType<() => void>},\n onProfileModalClose: {default: undefined, type: Function as PropType<() => void>},\n onSignOut: {default: undefined, type: Function as PropType<() => void>},\n profileContent: {default: null, type: Object as PropType<VNode | null>},\n user: {default: null, type: Object as PropType<User | null>},\n },\n setup(\n props: {\n className: string;\n isProfileModalOpen: boolean;\n onProfileClick?: () => void;\n onProfileModalClose?: () => void;\n onSignOut?: () => void;\n profileContent: VNode | null;\n user: User | null;\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n const isOpen: Ref<boolean> = ref(false);\n const prefix: typeof withVendorCSSClassPrefix = withVendorCSSClassPrefix;\n\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({\n isOpen: isOpen.value,\n toggle: () => {\n isOpen.value = !isOpen.value;\n },\n user: props.user,\n });\n }\n\n const resolveDisplayName = (): string | undefined => {\n if (!props.user) return undefined;\n const {displayName, name, email, username, sub} = props.user as Record<string, unknown>;\n if (typeof displayName === 'string') return displayName;\n if (typeof name === 'string') return name;\n if (typeof name === 'object' && name) {\n const parts: string[] = [(name as any).givenName, (name as any).familyName].filter(Boolean);\n if (parts.length > 0) return parts.join(' ');\n }\n if (typeof email === 'string') return email;\n if (typeof username === 'string') return username;\n if (typeof sub === 'string') return sub;\n return undefined;\n };\n const displayName: string | undefined = resolveDisplayName();\n\n const children: VNode[] = [];\n\n // Trigger button\n children.push(\n h(\n 'button',\n {\n class: prefix('user-dropdown__trigger'),\n onClick: () => {\n isOpen.value = !isOpen.value;\n },\n type: 'button',\n },\n [\n h('span', {class: prefix('user-dropdown__avatar')}, [h(UserIcon, {size: 20})]),\n displayName\n ? h(Typography, {class: prefix('user-dropdown__name'), variant: 'body2'}, () => displayName)\n : null,\n h(ChevronDownIcon, {size: 16}),\n ],\n ),\n );\n\n // Dropdown menu\n if (isOpen.value) {\n const menuItems: VNode[] = [];\n\n if (props.onProfileClick) {\n menuItems.push(\n h('button', {class: prefix('user-dropdown__item'), onClick: props.onProfileClick, type: 'button'}, [\n h(UserIcon, {size: 16}),\n h('span', null, 'Profile'),\n ]),\n );\n }\n\n if (slots['items']) {\n menuItems.push(...(slots['items']() ?? []));\n }\n\n if (props.onSignOut) {\n menuItems.push(\n h('button', {class: prefix('user-dropdown__item'), onClick: props.onSignOut, type: 'button'}, [\n h(LogOutIcon, {size: 16}),\n h('span', null, 'Sign Out'),\n ]),\n );\n }\n\n children.push(h('div', {class: prefix('user-dropdown__menu')}, menuItems));\n }\n\n const container: VNode = h(\n 'div',\n {class: [prefix('user-dropdown'), props.className].filter(Boolean).join(' ')},\n children,\n );\n\n // If profile modal is open, render modal overlay\n if (props.isProfileModalOpen) {\n return h('div', [\n container,\n h('div', {class: prefix('user-dropdown__modal-overlay')}, [\n h('div', {class: prefix('user-dropdown__modal-content')}, [\n h(\n 'button',\n {\n 'aria-label': 'Close profile modal',\n class: prefix('user-dropdown__modal-close'),\n onClick: props.onProfileModalClose,\n type: 'button',\n },\n [h(XIcon, {size: 24})],\n ),\n props.profileContent,\n ]),\n ]),\n ]);\n }\n\n return container;\n };\n },\n});\n\nexport default BaseUserDropdown;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseAcceptInvite from './BaseAcceptInvite';\nimport type {AcceptInviteFlowResponse, BaseAcceptInviteRenderProps} from './BaseAcceptInvite';\n\nexport type AcceptInviteRenderProps = BaseAcceptInviteRenderProps;\n\n/**\n * Helper to extract query parameters from URL.\n */\nconst getUrlParams = (): {flowId?: string; inviteToken?: string} => {\n if (typeof window === 'undefined') return {};\n const params: URLSearchParams = new URLSearchParams(window.location.search);\n return {\n flowId: params.get('flowId') || undefined,\n inviteToken: params.get('inviteToken') || undefined,\n };\n};\n\n/**\n * AcceptInvite \u2014 end-user component for accepting an invite and setting a password.\n *\n * Automatically extracts flowId and inviteToken from URL, validates the token,\n * and delegates rendering to BaseAcceptInvite.\n */\nconst AcceptInvite: Component = defineComponent({\n name: 'AcceptInvite',\n props: {\n baseUrl: {default: undefined, type: String},\n className: {default: '', type: String},\n flowId: {default: undefined, type: String},\n inviteToken: {default: undefined, type: String},\n onComplete: {default: undefined, type: Function as PropType<() => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: AcceptInviteFlowResponse) => void>,\n },\n onGoToSignIn: {default: undefined, type: Function as PropType<() => void>},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'outlined' | 'elevated'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const urlParams: {flowId?: string; inviteToken?: string} = getUrlParams();\n const flowId: string | undefined = props.flowId || urlParams.flowId;\n const inviteToken: string | undefined = props.inviteToken || urlParams.inviteToken;\n\n const apiBaseUrl: string = props.baseUrl || (typeof window !== 'undefined' ? window.location.origin : '');\n\n const handleSubmit = async (payload: Record<string, any>): Promise<AcceptInviteFlowResponse> => {\n const response: Response = await fetch(`${apiBaseUrl}/flow/execute`, {\n body: JSON.stringify({...payload, verbose: true}),\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n method: 'POST',\n });\n\n if (!response.ok) {\n const errorText: string = await response.text();\n throw new Error(`Request failed: ${errorText}`);\n }\n\n return response.json();\n };\n\n return (): VNode | null =>\n h(\n BaseAcceptInvite,\n {\n className: props.className,\n flowId,\n inviteToken,\n onComplete: props.onComplete,\n onError: props.onError,\n onFlowChange: props.onFlowChange,\n onGoToSignIn: props.onGoToSignIn,\n onSubmit: handleSubmit,\n showSubtitle: props.showSubtitle,\n showTitle: props.showTitle,\n size: props.size,\n variant: props.variant,\n },\n slots['default'] ? {default: (renderProps: any) => slots['default']!(renderProps)} : undefined,\n );\n },\n});\n\nexport default AcceptInvite;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport useFlowMeta from '../../../composables/useFlowMeta';\nimport useI18n from '../../../composables/useI18n';\nimport {useOAuthCallback} from '../../../composables/useOAuthCallback';\nimport {initiateOAuthRedirect} from '../../../utils/oauth';\nimport {extractErrorMessage, normalizeFlowResponse} from '../../../utils/v2/flowTransformer';\nimport Alert from '../../primitives/Alert';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport Spinner from '../../primitives/Spinner';\nimport Typography from '../../primitives/Typography';\nimport {renderInviteUserComponents} from '../sign-in/AuthOptionFactory';\n\n/**\n * Flow response from the accept-invite backend.\n */\nexport interface AcceptInviteFlowResponse {\n data?: {\n additionalData?: Record<string, string>;\n components?: any[];\n meta?: {\n components?: any[];\n };\n redirectURL?: string;\n };\n failureReason?: string;\n flowId: string;\n flowStatus: 'INCOMPLETE' | 'COMPLETE' | 'ERROR';\n type?: 'VIEW' | 'REDIRECTION';\n}\n\n/**\n * Render props passed to the default scoped slot.\n */\nexport interface BaseAcceptInviteRenderProps {\n completionTitle?: string;\n components: any[];\n error?: Error | null;\n fieldErrors: Record<string, string>;\n flowId?: string;\n goToSignIn?: () => void;\n handleInputBlur: (name: string) => void;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n inviteToken?: string;\n isComplete: boolean;\n isLoading: boolean;\n isTokenInvalid: boolean;\n isValid: boolean;\n isValidatingToken: boolean;\n meta: FlowMetadataResponse | null;\n subtitle?: string;\n title?: string;\n touched: Record<string, boolean>;\n values: Record<string, string>;\n}\n\nexport interface BaseAcceptInviteProps {\n className?: string;\n flowId?: string;\n inviteToken?: string;\n onComplete?: () => void;\n onError?: (error: Error) => void;\n onFlowChange?: (response: AcceptInviteFlowResponse) => void;\n onGoToSignIn?: () => void;\n onSubmit: (payload: Record<string, any>) => Promise<AcceptInviteFlowResponse>;\n showSubtitle?: boolean;\n showTitle?: boolean;\n size?: 'small' | 'medium' | 'large';\n variant?: 'outlined' | 'elevated';\n}\n\n/**\n * BaseAcceptInvite \u2014 handles the accept-invite flow lifecycle.\n *\n * Steps: validate invite token \u2192 render password form \u2192 flow completion.\n */\nconst BaseAcceptInvite: Component = defineComponent({\n name: 'BaseAcceptInvite',\n props: {\n className: {default: '', type: String},\n flowId: {default: undefined, type: String},\n inviteToken: {default: undefined, type: String},\n onComplete: {default: undefined, type: Function as PropType<() => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: AcceptInviteFlowResponse) => void>,\n },\n onGoToSignIn: {default: undefined, type: Function as PropType<() => void>},\n onSubmit: {\n required: true,\n type: Function as PropType<(payload: Record<string, any>) => Promise<AcceptInviteFlowResponse>>,\n },\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'outlined' | 'elevated'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {meta: metaRef} = useFlowMeta();\n const {t} = useI18n();\n\n // \u2500\u2500 State \u2500\u2500\n const isLoading: Ref<boolean> = ref(false);\n const isValidatingToken: Ref<boolean> = ref(true);\n const isTokenInvalid: Ref<boolean> = ref(false);\n const isComplete: Ref<boolean> = ref(false);\n const currentFlow: Ref<AcceptInviteFlowResponse | null> = ref(null);\n const apiError: Ref<Error | null> = ref(null);\n const completionTitle: Ref<string | undefined> = ref(undefined);\n\n // Form state\n const formValues: Ref<Record<string, string>> = ref({});\n const formErrors: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n const isFormValid: Ref<boolean> = ref(true);\n\n let tokenValidationAttempted: boolean = false;\n\n // \u2500\u2500 Helpers \u2500\u2500\n\n const handleError = (error: any): void => {\n const errorMessage: string =\n error?.failureReason || extractErrorMessage(error, t, 'components.acceptInvite.errors.generic');\n apiError.value = error instanceof Error ? error : new Error(errorMessage);\n props.onError?.(apiError.value);\n };\n\n const normalizeFlowResponseLocal = (response: AcceptInviteFlowResponse): AcceptInviteFlowResponse => {\n if (!response?.data?.meta?.components) return response;\n try {\n const {components} = normalizeFlowResponse(\n response,\n t,\n {defaultErrorKey: 'components.acceptInvite.errors.generic', resolveTranslations: false},\n (metaRef as Ref<FlowMetadataResponse | null>).value,\n );\n return {...response, data: {...response.data, components: components as any}};\n } catch {\n return response;\n }\n };\n\n // \u2500\u2500 OAuth callback \u2500\u2500\n\n useOAuthCallback({\n currentFlowId: ref(props.flowId ?? null),\n isInitialized: ref(true),\n onComplete: () => {\n isComplete.value = true;\n isValidatingToken.value = false;\n props.onComplete?.();\n },\n onError: (error: any) => {\n isTokenInvalid.value = true;\n isValidatingToken.value = false;\n handleError(error);\n },\n onFlowChange: (response: any) => {\n props.onFlowChange?.(response);\n if (response.flowStatus !== 'COMPLETE') {\n currentFlow.value = response;\n formValues.value = {};\n formErrors.value = {};\n touchedFields.value = {};\n }\n },\n onProcessingStart: () => {\n isValidatingToken.value = true;\n },\n onSubmit: async (payload: any) => {\n const rawResponse: any = await props.onSubmit(payload);\n return normalizeFlowResponseLocal(rawResponse);\n },\n tokenValidationAttemptedFlag: {value: tokenValidationAttempted},\n });\n\n // \u2500\u2500 Input handlers \u2500\u2500\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n const newErrors: Record<string, string> = {...formErrors.value};\n delete newErrors[name];\n formErrors.value = newErrors;\n };\n\n const handleInputBlur = (name: string): void => {\n touchedFields.value = {...touchedFields.value, [name]: true};\n };\n\n // \u2500\u2500 Validation \u2500\u2500\n\n const validateForm = (components: any[]): {errors: Record<string, string>; isValid: boolean} => {\n const errors: Record<string, string> = {};\n const validateComponents = (comps: any[]): void => {\n comps.forEach((comp: any) => {\n if (\n (comp.type === 'PASSWORD_INPUT' || comp.type === 'TEXT_INPUT' || comp.type === 'EMAIL_INPUT') &&\n comp.required &&\n comp.ref\n ) {\n const value: string = formValues.value[comp.ref] || '';\n if (!value || value.trim() === '') {\n errors[comp.ref] = `${comp.label || comp.ref} is required`;\n }\n }\n if (comp.components && Array.isArray(comp.components)) {\n validateComponents(comp.components);\n }\n });\n };\n validateComponents(components);\n return {errors, isValid: Object.keys(errors).length === 0};\n };\n\n // \u2500\u2500 Submit handler \u2500\u2500\n\n const handleSubmit = async (component: any, data?: Record<string, any>): Promise<void> => {\n if (!currentFlow.value) return;\n\n const components: any[] = currentFlow.value.data?.components || [];\n const validation: {errors: Record<string, string>; isValid: boolean} = validateForm(components);\n if (!validation.isValid) {\n formErrors.value = validation.errors;\n isFormValid.value = false;\n const touched: Record<string, boolean> = {};\n Object.keys(validation.errors).forEach((key: string) => {\n touched[key] = true;\n });\n touchedFields.value = {...touchedFields.value, ...touched};\n return;\n }\n\n isLoading.value = true;\n apiError.value = null;\n isFormValid.value = true;\n\n try {\n const inputs: Record<string, any> = data || formValues.value;\n const payload: Record<string, any> = {\n flowId: currentFlow.value.flowId,\n inputs,\n verbose: true,\n };\n if (component?.id) payload['action'] = component.id;\n\n const rawResponse: AcceptInviteFlowResponse = await props.onSubmit(payload);\n const response: AcceptInviteFlowResponse = normalizeFlowResponseLocal(rawResponse);\n props.onFlowChange?.(response);\n\n // Handle OAuth redirect\n if (response.type === 'REDIRECTION') {\n const redirectURL: string | undefined = response.data?.redirectURL || (response as any)?.redirectURL;\n if (redirectURL) {\n initiateOAuthRedirect(redirectURL);\n return;\n }\n }\n\n // Store heading before completion\n if (currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components) {\n const currentComponents: any[] =\n currentFlow.value.data?.components || currentFlow.value.data?.meta?.components || [];\n const heading: any = currentComponents.find(\n (comp: any) => comp.type === 'TEXT' && comp.variant === 'HEADING_1',\n );\n if (heading?.label) completionTitle.value = heading.label;\n }\n\n if (response.flowStatus === 'COMPLETE') {\n isComplete.value = true;\n props.onComplete?.();\n return;\n }\n\n if (response.flowStatus === 'ERROR') {\n handleError(response);\n return;\n }\n\n currentFlow.value = response;\n formValues.value = {};\n formErrors.value = {};\n touchedFields.value = {};\n } catch (err) {\n handleError(err);\n } finally {\n isLoading.value = false;\n }\n };\n\n // \u2500\u2500 Token validation on mount \u2500\u2500\n\n watch(\n () => [props.flowId, props.inviteToken] as [string | undefined, string | undefined],\n ([flowId, inviteToken]: [string | undefined, string | undefined]) => {\n if (tokenValidationAttempted) return;\n\n if (!flowId || !inviteToken) {\n isValidatingToken.value = false;\n isTokenInvalid.value = true;\n handleError(new Error('Invalid invite link. Missing flowId or inviteToken.'));\n return;\n }\n\n tokenValidationAttempted = true;\n\n (async (): Promise<void> => {\n isValidatingToken.value = true;\n apiError.value = null;\n\n try {\n if (flowId) sessionStorage.setItem('asgardeo_flow_id', flowId);\n\n const payload: any = {flowId, inputs: {inviteToken}, verbose: true};\n const rawResponse: AcceptInviteFlowResponse = await props.onSubmit(payload);\n const response: AcceptInviteFlowResponse = normalizeFlowResponseLocal(rawResponse);\n props.onFlowChange?.(response);\n\n if (response.flowStatus === 'ERROR') {\n isTokenInvalid.value = true;\n handleError(response);\n return;\n }\n\n currentFlow.value = response;\n } catch (err) {\n isTokenInvalid.value = true;\n handleError(err);\n } finally {\n isValidatingToken.value = false;\n }\n })();\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Heading extraction \u2500\u2500\n\n const extractHeadings = (components: any[]): {subtitle?: string; title?: string} => {\n let title: string | undefined;\n let subtitle: string | undefined;\n components.forEach((comp: any) => {\n if (comp.type === 'TEXT') {\n if (comp.variant === 'HEADING_1' && !title) title = comp.label;\n else if ((comp.variant === 'HEADING_2' || comp.variant === 'SUBTITLE_1') && !subtitle) subtitle = comp.label;\n }\n });\n return {subtitle, title};\n };\n\n const filterHeadings = (components: any[]): any[] =>\n components.filter(\n (comp: any) => !(comp.type === 'TEXT' && (comp.variant === 'HEADING_1' || comp.variant === 'HEADING_2')),\n );\n\n // \u2500\u2500 Render \u2500\u2500\n\n return (): VNode | null => {\n const containerClass: string = [withVendorCSSClassPrefix('accept-invite'), props.className]\n .filter(Boolean)\n .join(' ');\n\n const components: any[] = currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components || [];\n const {title, subtitle} = extractHeadings(components);\n const componentsWithoutHeadings: any[] = filterHeadings(components);\n\n const meta: FlowMetadataResponse | null = (metaRef as Ref<FlowMetadataResponse | null>).value;\n\n // Scoped slot\n if (slots['default']) {\n const renderProps: BaseAcceptInviteRenderProps = {\n completionTitle: completionTitle.value,\n components,\n error: apiError.value,\n fieldErrors: formErrors.value,\n flowId: props.flowId,\n goToSignIn: props.onGoToSignIn,\n handleInputBlur,\n handleInputChange,\n handleSubmit,\n inviteToken: props.inviteToken,\n isComplete: isComplete.value,\n isLoading: isLoading.value,\n isTokenInvalid: isTokenInvalid.value,\n isValid: isFormValid.value,\n isValidatingToken: isValidatingToken.value,\n meta,\n subtitle,\n title,\n touched: touchedFields.value,\n values: formValues.value,\n };\n return h('div', {class: containerClass}, slots['default'](renderProps));\n }\n\n // Loading / validating state\n if (isValidatingToken.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;flex-direction:column;align-items:center;gap:1rem;padding:2rem'}, [\n h(Spinner),\n h(Typography, {variant: 'body1'}, () => 'Validating your invite link...'),\n ]),\n );\n }\n\n // Invalid token\n if (isTokenInvalid.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n h('div', {style: 'padding:1rem'}, [\n h(Typography, {variant: 'h5'}, () => 'Invalid Invite Link'),\n h(\n Alert,\n {style: 'margin-top:1rem', variant: 'error'},\n () =>\n apiError.value?.message ||\n 'This invite link is invalid or has expired. Please contact your administrator for a new invite.',\n ),\n props.onGoToSignIn\n ? h('div', {style: 'display:flex;justify-content:center;margin-top:1.5rem'}, [\n h(Button, {onClick: props.onGoToSignIn, variant: 'outline'}, () => 'Go to Sign In'),\n ])\n : null,\n ]),\n ]);\n }\n\n // Completion\n if (isComplete.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n h('div', {style: 'padding:1rem'}, [\n h(Typography, {variant: 'h5'}, () => 'Account Setup Complete!'),\n h(\n Alert,\n {style: 'margin-top:1rem', variant: 'success'},\n () => 'Your account has been successfully set up. You can now sign in with your credentials.',\n ),\n props.onGoToSignIn\n ? h('div', {style: 'display:flex;justify-content:center;margin-top:1.5rem'}, [\n h(Button, {onClick: props.onGoToSignIn, variant: 'solid'}, () => 'Sign In'),\n ])\n : null,\n ]),\n ]);\n }\n\n // Render form components\n const renderedComponents: VNode[] =\n componentsWithoutHeadings.length > 0\n ? renderInviteUserComponents(\n componentsWithoutHeadings,\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid.value,\n handleInputChange,\n {\n meta,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size: props.size,\n t,\n variant: props.variant,\n },\n )\n : [];\n\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n (props.showTitle || props.showSubtitle) && (title || subtitle)\n ? h('div', {style: 'padding:1rem 1rem 0'}, [\n props.showTitle && title ? h(Typography, {variant: 'h5'}, () => title) : null,\n props.showSubtitle && subtitle\n ? h(Typography, {style: 'margin-top:0.25rem', variant: 'body1'}, () => subtitle)\n : null,\n ])\n : null,\n apiError.value\n ? h(\n 'div',\n {style: 'padding:0 1rem;margin-bottom:1rem'},\n h(Alert, {variant: 'error'}, () => apiError.value!.message),\n )\n : null,\n h(\n 'div',\n {style: 'padding:1rem'},\n ((): Array<VNode | VNode[] | null> => {\n const formContent: Array<VNode | VNode[] | null> = [];\n\n if (renderedComponents.length > 0) {\n formContent.push(renderedComponents);\n } else if (!isLoading.value) {\n formContent.push(h(Alert, {variant: 'warning'}, () => 'No form components available'));\n }\n\n if (isLoading.value) {\n formContent.push(h('div', {style: 'display:flex;justify-content:center;padding:1rem'}, h(Spinner)));\n }\n\n return formContent;\n })(),\n ),\n props.onGoToSignIn\n ? h('div', {style: 'margin-top:1.5rem;text-align:center;padding:0 1rem 1rem'}, [\n h(Typography, {variant: 'body2'}, () => [\n 'Already have an account? ',\n h(\n Button,\n {onClick: props.onGoToSignIn, style: 'min-width:auto;padding:0', variant: 'text'},\n () => 'Sign In',\n ),\n ]),\n ])\n : null,\n ]);\n };\n },\n});\n\nexport default BaseAcceptInvite;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedFlowType} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseInviteUser from './BaseInviteUser';\nimport type {BaseInviteUserRenderProps, InviteUserFlowResponse} from './BaseInviteUser';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type InviteUserRenderProps = BaseInviteUserRenderProps;\n\n/**\n * InviteUser \u2014 admin invite component using authenticated Asgardeo SDK context.\n */\nconst InviteUser: Component = defineComponent({\n name: 'InviteUser',\n props: {\n className: {default: '', type: String},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: InviteUserFlowResponse) => void>,\n },\n onInviteLinkGenerated: {\n default: undefined,\n type: Function as PropType<(inviteLink: string, flowId: string) => void>,\n },\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'outlined' | 'elevated'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {http, baseUrl, isInitialized} = useAsgardeo();\n\n const handleInitialize = async (payload: Record<string, any>): Promise<InviteUserFlowResponse> => {\n const response: any = await http.request({\n data: {...payload, flowType: EmbeddedFlowType.UserOnboarding, verbose: true},\n headers: {Accept: 'application/json', 'Content-Type': 'application/json'},\n method: 'POST',\n url: `${baseUrl}/flow/execute`,\n } as any);\n return response.data as InviteUserFlowResponse;\n };\n\n const handleSubmit = async (payload: Record<string, any>): Promise<InviteUserFlowResponse> => {\n const response: any = await http.request({\n data: {...payload, verbose: true},\n headers: {Accept: 'application/json', 'Content-Type': 'application/json'},\n method: 'POST',\n url: `${baseUrl}/flow/execute`,\n } as any);\n return response.data as InviteUserFlowResponse;\n };\n\n return (): VNode | null =>\n h(\n BaseInviteUser,\n {\n className: props.className,\n isInitialized: isInitialized?.value ?? false,\n onError: props.onError,\n onFlowChange: props.onFlowChange,\n onInitialize: handleInitialize,\n onInviteLinkGenerated: props.onInviteLinkGenerated,\n onSubmit: handleSubmit,\n showSubtitle: props.showSubtitle,\n showTitle: props.showTitle,\n size: props.size,\n variant: props.variant,\n },\n slots['default'] ? {default: (renderProps: any) => slots['default']!(renderProps)} : undefined,\n );\n },\n});\n\nexport default InviteUser;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedFlowType, FlowMetadataResponse, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport useFlowMeta from '../../../composables/useFlowMeta';\nimport useI18n from '../../../composables/useI18n';\nimport {extractErrorMessage, normalizeFlowResponse} from '../../../utils/v2/flowTransformer';\nimport Alert from '../../primitives/Alert';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport Spinner from '../../primitives/Spinner';\nimport Typography from '../../primitives/Typography';\nimport {renderInviteUserComponents} from '../sign-in/AuthOptionFactory';\n\n/**\n * Flow response from the invite-user backend.\n */\nexport interface InviteUserFlowResponse {\n data?: {\n additionalData?: Record<string, string>;\n components?: any[];\n meta?: {\n components?: any[];\n };\n };\n failureReason?: string;\n flowId: string;\n flowStatus: 'INCOMPLETE' | 'COMPLETE' | 'ERROR';\n type?: 'VIEW' | 'REDIRECTION';\n}\n\n/**\n * Render props passed to the default scoped slot.\n */\nexport interface BaseInviteUserRenderProps {\n components: any[];\n copyInviteLink: () => Promise<void>;\n error?: Error | null;\n fieldErrors: Record<string, string>;\n flowId?: string;\n handleInputBlur: (name: string) => void;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n inviteLink?: string;\n inviteLinkCopied: boolean;\n isEmailSent: boolean;\n isInviteGenerated: boolean;\n isLoading: boolean;\n isValid: boolean;\n meta: FlowMetadataResponse | null;\n resetFlow: () => void;\n subtitle?: string;\n title?: string;\n touched: Record<string, boolean>;\n values: Record<string, string>;\n}\n\nexport interface BaseInviteUserProps {\n className?: string;\n isInitialized?: boolean;\n onError?: (error: Error) => void;\n onFlowChange?: (response: InviteUserFlowResponse) => void;\n onInitialize: (payload: Record<string, any>) => Promise<InviteUserFlowResponse>;\n onInviteLinkGenerated?: (inviteLink: string, flowId: string) => void;\n onSubmit: (payload: Record<string, any>) => Promise<InviteUserFlowResponse>;\n showSubtitle?: boolean;\n showTitle?: boolean;\n size?: 'small' | 'medium' | 'large';\n variant?: 'outlined' | 'elevated';\n}\n\n/**\n * BaseInviteUser \u2014 handles the admin invite-user flow lifecycle.\n *\n * Steps: user type selection \u2192 user details \u2192 invite link generation.\n */\nconst BaseInviteUser: Component = defineComponent({\n name: 'BaseInviteUser',\n props: {\n className: {default: '', type: String},\n isInitialized: {default: true, type: Boolean},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: InviteUserFlowResponse) => void>,\n },\n onInitialize: {\n required: true,\n type: Function as PropType<(payload: Record<string, any>) => Promise<InviteUserFlowResponse>>,\n },\n onInviteLinkGenerated: {\n default: undefined,\n type: Function as PropType<(inviteLink: string, flowId: string) => void>,\n },\n onSubmit: {\n required: true,\n type: Function as PropType<(payload: Record<string, any>) => Promise<InviteUserFlowResponse>>,\n },\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'outlined' | 'elevated'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {meta: metaRef} = useFlowMeta();\n const {t} = useI18n();\n\n // \u2500\u2500 State \u2500\u2500\n const isLoading: Ref<boolean> = ref(false);\n const isFlowInitialized: Ref<boolean> = ref(false);\n const currentFlow: Ref<InviteUserFlowResponse | null> = ref(null);\n const apiError: Ref<Error | null> = ref(null);\n\n // Form state\n const formValues: Ref<Record<string, string>> = ref({});\n const formErrors: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n const isFormValid: Ref<boolean> = ref(true);\n\n // Invite state\n const inviteLink: Ref<string | undefined> = ref(undefined);\n const inviteLinkCopied: Ref<boolean> = ref(false);\n const emailSent: Ref<boolean> = ref(false);\n\n let initializationAttempted: boolean = false;\n\n // \u2500\u2500 Helpers \u2500\u2500\n\n const handleError = (error: any): void => {\n const errorMessage: string =\n error?.failureReason || extractErrorMessage(error, t, 'components.inviteUser.errors.generic');\n apiError.value = error instanceof Error ? error : new Error(errorMessage);\n props.onError?.(apiError.value);\n };\n\n const normalizeFlowResponseLocal = (response: InviteUserFlowResponse): InviteUserFlowResponse => {\n if (!response?.data?.meta?.components) return response;\n try {\n const {components} = normalizeFlowResponse(\n response,\n t,\n {defaultErrorKey: 'components.inviteUser.errors.generic', resolveTranslations: false},\n (metaRef as Ref<FlowMetadataResponse | null>).value,\n );\n return {...response, data: {...response.data, components: components as any}};\n } catch {\n return response;\n }\n };\n\n // \u2500\u2500 Input handlers \u2500\u2500\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n const newErrors: Record<string, string> = {...formErrors.value};\n delete newErrors[name];\n formErrors.value = newErrors;\n };\n\n const handleInputBlur = (name: string): void => {\n touchedFields.value = {...touchedFields.value, [name]: true};\n };\n\n // \u2500\u2500 Validation \u2500\u2500\n\n const validateForm = (components: any[]): {errors: Record<string, string>; isValid: boolean} => {\n const errors: Record<string, string> = {};\n const validateComponents = (comps: any[]): void => {\n comps.forEach((comp: any) => {\n if (\n (comp.type === 'TEXT_INPUT' || comp.type === 'EMAIL_INPUT' || comp.type === 'SELECT') &&\n comp.required &&\n comp.ref\n ) {\n const value: string = formValues.value[comp.ref] || '';\n if (!value || value.trim() === '') {\n errors[comp.ref] = `${comp.label || comp.ref} is required`;\n }\n if (comp.type === 'EMAIL_INPUT' && value && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) {\n errors[comp.ref] = 'Please enter a valid email address';\n }\n }\n if (comp.components && Array.isArray(comp.components)) {\n validateComponents(comp.components);\n }\n });\n };\n validateComponents(components);\n return {errors, isValid: Object.keys(errors).length === 0};\n };\n\n // \u2500\u2500 Submit handler \u2500\u2500\n\n const handleSubmit = async (component: any, data?: Record<string, any>): Promise<void> => {\n if (!currentFlow.value) return;\n\n const components: any[] = currentFlow.value.data?.components || [];\n const validation: {errors: Record<string, string>; isValid: boolean} = validateForm(components);\n if (!validation.isValid) {\n formErrors.value = validation.errors;\n isFormValid.value = false;\n const touched: Record<string, boolean> = {};\n Object.keys(validation.errors).forEach((key: string) => {\n touched[key] = true;\n });\n touchedFields.value = {...touchedFields.value, ...touched};\n return;\n }\n\n isLoading.value = true;\n apiError.value = null;\n isFormValid.value = true;\n\n try {\n const inputs: Record<string, any> = data || formValues.value;\n const payload: Record<string, any> = {\n flowId: currentFlow.value.flowId,\n inputs,\n verbose: true,\n };\n if (component?.id) payload['action'] = component.id;\n\n const rawResponse: InviteUserFlowResponse = await props.onSubmit(payload);\n const response: InviteUserFlowResponse = normalizeFlowResponseLocal(rawResponse);\n props.onFlowChange?.(response);\n\n // Check for invite link\n if (response.data?.additionalData?.['inviteLink']) {\n const linkValue: string = response.data.additionalData['inviteLink'];\n inviteLink.value = linkValue;\n props.onInviteLinkGenerated?.(linkValue, response.flowId);\n }\n\n if (response.data?.additionalData?.['emailSent'] === 'true') {\n emailSent.value = true;\n }\n\n if (response.flowStatus === 'ERROR') {\n handleError(response);\n return;\n }\n\n currentFlow.value = response;\n formValues.value = {};\n formErrors.value = {};\n touchedFields.value = {};\n } catch (err) {\n handleError(err);\n } finally {\n isLoading.value = false;\n }\n };\n\n // \u2500\u2500 Copy invite link \u2500\u2500\n\n const copyInviteLink = async (): Promise<void> => {\n if (!inviteLink.value) return;\n try {\n await navigator.clipboard.writeText(inviteLink.value);\n inviteLinkCopied.value = true;\n setTimeout(() => {\n inviteLinkCopied.value = false;\n }, 3000);\n } catch {\n const textArea: HTMLTextAreaElement = document.createElement('textarea');\n textArea.value = inviteLink.value;\n document.body.appendChild(textArea);\n textArea.select();\n document.execCommand('copy');\n document.body.removeChild(textArea);\n inviteLinkCopied.value = true;\n setTimeout(() => {\n inviteLinkCopied.value = false;\n }, 3000);\n }\n };\n\n // \u2500\u2500 Reset flow \u2500\u2500\n\n const resetFlow = (): void => {\n isFlowInitialized.value = false;\n currentFlow.value = null;\n apiError.value = null;\n formValues.value = {};\n formErrors.value = {};\n touchedFields.value = {};\n inviteLink.value = undefined;\n inviteLinkCopied.value = false;\n emailSent.value = false;\n initializationAttempted = false;\n };\n\n // \u2500\u2500 Flow initialization \u2500\u2500\n\n watch(\n () => [props.isInitialized, isFlowInitialized.value] as [boolean, boolean],\n ([initialized, flowInit]: [boolean, boolean]) => {\n if (initialized && !flowInit && !initializationAttempted) {\n initializationAttempted = true;\n\n (async (): Promise<void> => {\n isLoading.value = true;\n apiError.value = null;\n\n try {\n const payload: any = {flowType: EmbeddedFlowType.UserOnboarding, verbose: true};\n const rawResponse: InviteUserFlowResponse = await props.onInitialize(payload);\n const response: InviteUserFlowResponse = normalizeFlowResponseLocal(rawResponse);\n currentFlow.value = response;\n isFlowInitialized.value = true;\n props.onFlowChange?.(response);\n\n if (response.flowStatus === 'ERROR') {\n handleError(response);\n }\n } catch (err) {\n handleError(err);\n } finally {\n isLoading.value = false;\n }\n })();\n }\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Heading extraction \u2500\u2500\n\n const extractHeadings = (components: any[]): {subtitle?: string; title?: string} => {\n let title: string | undefined;\n let subtitle: string | undefined;\n components.forEach((comp: any) => {\n if (comp.type === 'TEXT') {\n if (comp.variant === 'HEADING_1' && !title) title = comp.label;\n else if ((comp.variant === 'HEADING_2' || comp.variant === 'SUBTITLE_1') && !subtitle) subtitle = comp.label;\n }\n });\n return {subtitle, title};\n };\n\n const filterHeadings = (components: any[]): any[] =>\n components.filter(\n (comp: any) => !(comp.type === 'TEXT' && (comp.variant === 'HEADING_1' || comp.variant === 'HEADING_2')),\n );\n\n // \u2500\u2500 Render \u2500\u2500\n\n return (): VNode | null => {\n const containerClass: string = [withVendorCSSClassPrefix('invite-user'), props.className]\n .filter(Boolean)\n .join(' ');\n\n const components: any[] = currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components || [];\n const {title, subtitle} = extractHeadings(components);\n const componentsWithoutHeadings: any[] = filterHeadings(components);\n const isInviteGenerated: boolean = !!inviteLink.value;\n const isEmailSent: boolean = emailSent.value;\n\n const meta: FlowMetadataResponse | null = (metaRef as Ref<FlowMetadataResponse | null>).value;\n\n // Scoped slot\n if (slots['default']) {\n const renderProps: BaseInviteUserRenderProps = {\n components,\n copyInviteLink,\n error: apiError.value,\n fieldErrors: formErrors.value,\n flowId: currentFlow.value?.flowId,\n handleInputBlur,\n handleInputChange,\n handleSubmit,\n inviteLink: inviteLink.value,\n inviteLinkCopied: inviteLinkCopied.value,\n isEmailSent,\n isInviteGenerated,\n isLoading: isLoading.value,\n isValid: isFormValid.value,\n meta,\n resetFlow,\n subtitle,\n title,\n touched: touchedFields.value,\n values: formValues.value,\n };\n return h('div', {class: containerClass}, slots['default'](renderProps));\n }\n\n // Waiting for SDK initialization\n if (!props.isInitialized || (!isFlowInitialized.value && isLoading.value)) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;justify-content:center;padding:2rem'}, h(Spinner)),\n );\n }\n\n // Error state during initialization\n if (!currentFlow.value && apiError.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h(Alert, {variant: 'error'}, () => apiError.value!.message),\n );\n }\n\n // Email sent confirmation\n if (isInviteGenerated && isEmailSent) {\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n h('div', {style: 'padding:1rem'}, [\n h(Typography, {variant: 'h5'}, () => 'Invite Email Sent!'),\n h(\n Alert,\n {style: 'margin-top:1rem', variant: 'success'},\n () =>\n 'An invitation email has been sent successfully. The user can complete their registration using the link in the email.',\n ),\n h('div', {style: 'display:flex;gap:0.5rem;margin-top:1.5rem'}, [\n h(Button, {onClick: resetFlow, variant: 'outline'}, () => 'Invite Another User'),\n ]),\n ]),\n ]);\n }\n\n // Invite link generated \u2014 show copy link\n if (isInviteGenerated && inviteLink.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n h('div', {style: 'padding:1rem'}, [\n h(Typography, {variant: 'h5'}, () => 'Invite Link Generated!'),\n h(\n Alert,\n {style: 'margin-top:1rem', variant: 'success'},\n () => 'Share this link with the user to complete their registration.',\n ),\n h('div', {style: 'margin-top:1rem'}, [\n h(Typography, {style: 'margin-bottom:0.5rem', variant: 'body2'}, () => 'Invite Link'),\n h(\n 'div',\n {\n style:\n 'display:flex;align-items:center;gap:0.5rem;padding:0.75rem;background:var(--asgardeo-color-background-secondary,#f5f5f5);border-radius:4px;word-break:break-all',\n },\n [\n h(Typography, {style: 'flex:1', variant: 'body2'}, () => inviteLink.value),\n h(Button, {onClick: copyInviteLink, size: 'small', variant: 'outline'}, () =>\n inviteLinkCopied.value ? 'Copied!' : 'Copy',\n ),\n ],\n ),\n ]),\n h('div', {style: 'display:flex;gap:0.5rem;margin-top:1.5rem'}, [\n h(Button, {onClick: resetFlow, variant: 'outline'}, () => 'Invite Another User'),\n ]),\n ]),\n ]);\n }\n\n // Render form components\n const renderedComponents: VNode[] =\n componentsWithoutHeadings.length > 0\n ? renderInviteUserComponents(\n componentsWithoutHeadings,\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid.value,\n handleInputChange,\n {\n meta,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size: props.size,\n t,\n variant: props.variant,\n },\n )\n : [];\n\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n (props.showTitle || props.showSubtitle) && (title || subtitle)\n ? h('div', {style: 'padding:1rem 1rem 0'}, [\n props.showTitle && title ? h(Typography, {variant: 'h5'}, () => title) : null,\n props.showSubtitle && subtitle\n ? h(Typography, {style: 'margin-top:0.25rem', variant: 'body1'}, () => subtitle)\n : null,\n ])\n : null,\n apiError.value\n ? h(\n 'div',\n {style: 'padding:0 1rem;margin-bottom:1rem'},\n h(Alert, {variant: 'error'}, () => apiError.value!.message),\n )\n : null,\n h(\n 'div',\n {style: 'padding:1rem'},\n ((): Array<VNode | VNode[] | null> => {\n const formContent: Array<VNode | VNode[] | null> = [];\n\n if (renderedComponents.length > 0) {\n formContent.push(renderedComponents);\n } else if (!isLoading.value) {\n formContent.push(h(Alert, {variant: 'warning'}, () => 'No form components available'));\n }\n\n if (isLoading.value) {\n formContent.push(h('div', {style: 'display:flex;justify-content:center;padding:1rem'}, h(Spinner)));\n }\n\n return formContent;\n })(),\n ),\n ]);\n };\n },\n});\n\nexport default BaseInviteUser;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Organization as IOrganization, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport BaseOrganizationList from './BaseOrganizationList';\nimport useOrganization from '../../../composables/useOrganization';\n\n/**\n * OrganizationList \u2014 styled organization list component.\n *\n * Retrieves organization list from context and delegates to BaseOrganizationList.\n */\nconst OrganizationList: Component = defineComponent({\n emits: ['select'],\n name: 'OrganizationList',\n props: {\n className: {\n default: '',\n type: String,\n },\n },\n setup(props: {className: string}, {slots, emit}: {emit: any; slots: any}): () => VNode | VNode[] | null {\n const {myOrganizations, isLoading, switchOrganization} = useOrganization();\n\n const handleSelect = async (org: IOrganization): Promise<void> => {\n emit('select', org);\n await switchOrganization(org);\n };\n\n return (): VNode | VNode[] | null =>\n h(\n BaseOrganizationList,\n {\n class: withVendorCSSClassPrefix('organization-list--styled'),\n className: props.className,\n isLoading: isLoading.value,\n onSelect: handleSelect,\n organizations: myOrganizations.value,\n },\n slots,\n );\n },\n});\n\nexport default OrganizationList;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Organization as IOrganization, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type VNode, defineComponent, h} from 'vue';\nimport {BuildingIcon} from '../../primitives/Icons';\nimport Spinner from '../../primitives/Spinner';\nimport Typography from '../../primitives/Typography';\n\n/**\n * BaseOrganizationList \u2014 unstyled list of organizations.\n */\nconst BaseOrganizationList: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseOrganizationList',\n props: {\n className: {default: '', type: String},\n isLoading: {default: false, type: Boolean},\n onSelect: {default: undefined, type: Function as PropType<(org: IOrganization) => void>},\n organizations: {default: () => [], type: Array as PropType<IOrganization[]>},\n },\n setup(\n props: {\n className: string;\n isLoading: boolean;\n onSelect?: (org: IOrganization) => void;\n organizations: IOrganization[];\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({isLoading: props.isLoading, organizations: props.organizations});\n }\n\n const prefix: typeof withVendorCSSClassPrefix = withVendorCSSClassPrefix;\n const children: VNode[] = [];\n\n if (props.isLoading) {\n children.push(h('div', {class: prefix('organization-list__loading')}, [h(Spinner)]));\n } else if (props.organizations.length === 0) {\n children.push(\n h(Typography, {class: prefix('organization-list__empty'), variant: 'body2'}, () => 'No organizations found'),\n );\n } else {\n props.organizations.forEach((org: IOrganization) => {\n children.push(\n h(\n 'button',\n {\n class: prefix('organization-list__item'),\n key: org['id'],\n onClick: () => props.onSelect?.(org),\n type: 'button',\n },\n [h(BuildingIcon, {size: 16}), h(Typography, {variant: 'body1'}, () => org['name'] || org['id'])],\n ),\n );\n });\n }\n\n return h('div', {class: [prefix('organization-list'), props.className].filter(Boolean).join(' ')}, children);\n };\n },\n});\n\nexport default BaseOrganizationList;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type VNode, defineComponent, h} from 'vue';\nimport BaseOrganizationProfile from './BaseOrganizationProfile';\nimport useOrganization from '../../../composables/useOrganization';\n\n/**\n * OrganizationProfile \u2014 styled organisation details component.\n *\n * Retrieves current organization from context and delegates to BaseOrganizationProfile.\n */\nconst OrganizationProfile: Component = defineComponent({\n name: 'OrganizationProfile',\n props: {\n className: {default: '', type: String},\n editable: {default: false, type: Boolean},\n onUpdate: {\n default: undefined,\n type: Function as PropType<(payload: Record<string, unknown>) => Promise<void>>,\n },\n title: {default: 'Organization Profile', type: String},\n },\n setup(\n props: {\n className: string;\n editable: boolean;\n onUpdate?: (payload: Record<string, unknown>) => Promise<void>;\n title: string;\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n const {currentOrganization} = useOrganization();\n\n return (): VNode | VNode[] | null =>\n h(\n BaseOrganizationProfile,\n {\n class: withVendorCSSClassPrefix('organization-profile--styled'),\n className: props.className,\n editable: props.editable,\n onUpdate: props.onUpdate,\n organization: currentOrganization?.value ?? null,\n title: props.title,\n },\n slots,\n );\n },\n});\n\nexport default OrganizationProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport type {Organization} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport Divider from '../../primitives/Divider';\nimport {PencilIcon} from '../../primitives/Icons';\nimport TextField from '../../primitives/TextField';\nimport Typography from '../../primitives/Typography';\n\nconst ORG_AVATAR_GRADIENTS: string[] = [\n 'linear-gradient(135deg, #22d3ee 0%, #2dd4bf 100%)',\n 'linear-gradient(135deg, #34d399 0%, #059669 100%)',\n 'linear-gradient(135deg, #60a5fa 0%, #818cf8 100%)',\n 'linear-gradient(135deg, #f472b6 0%, #c084fc 100%)',\n 'linear-gradient(135deg, #fb923c 0%, #fbbf24 100%)',\n 'linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%)',\n 'linear-gradient(135deg, #4ade80 0%, #22d3ee 100%)',\n 'linear-gradient(135deg, #f87171 0%, #fb923c 100%)',\n];\n\nconst getOrgAvatarGradient = (seed: string): string => {\n if (!seed) return ORG_AVATAR_GRADIENTS[0];\n let hash: number = 0;\n for (let i: number = 0; i < seed.length; i += 1) {\n hash = Math.imul(31, hash) + seed.charCodeAt(i);\n }\n return ORG_AVATAR_GRADIENTS[Math.abs(hash) % ORG_AVATAR_GRADIENTS.length];\n};\n\nconst getOrgInitials = (name: string): string => {\n if (!name) return '?';\n const parts: string[] = name.trim().split(/\\s+/).filter(Boolean);\n if (parts.length >= 2) return (parts[0].charAt(0) + parts[1].charAt(0)).toUpperCase();\n return name.charAt(0).toUpperCase();\n};\n\nconst formatDate = (dateStr: string): string => {\n try {\n return new Date(dateStr).toLocaleDateString('en-US', {day: 'numeric', month: 'long', year: 'numeric'});\n } catch {\n return dateStr;\n }\n};\n\n/**\n * BaseOrganizationProfile \u2014 unstyled organization details view/edit component.\n *\n * Renders a profile card with avatar, org name, handle, and two-column field rows\n * for Organization ID, Name, Description, Created Date, and Last Modified Date.\n */\nconst BaseOrganizationProfile: Component = defineComponent({\n name: 'BaseOrganizationProfile',\n props: {\n className: {default: '', type: String},\n editable: {default: false, type: Boolean},\n onUpdate: {\n default: undefined,\n type: Function as PropType<(payload: Record<string, unknown>) => Promise<void>>,\n },\n organization: {default: null, type: Object as PropType<Organization | null>},\n title: {default: 'Organization Profile', type: String},\n },\n setup(\n props: {\n className: string;\n editable: boolean;\n onUpdate?: (payload: Record<string, unknown>) => Promise<void>;\n organization: Organization | null;\n title: string;\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n const editingName: Ref<boolean> = ref(false);\n const editingDescription: Ref<boolean> = ref(false);\n const editedName: Ref<string> = ref('');\n const editedDescription: Ref<string> = ref('');\n\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({organization: props.organization});\n }\n\n if (!props.organization) {\n return slots['fallback']?.() ?? null;\n }\n\n const prefix: typeof withVendorCSSClassPrefix = withVendorCSSClassPrefix;\n const org: Record<string, unknown> = props.organization as unknown as Record<string, unknown>;\n const orgName: string = String(org['name'] || org['displayName'] || '');\n const orgHandle: string = String(org['orgHandle'] || '');\n const orgId: string = String(org['id'] || '');\n const orgDescription: string | null = org['description'] != null ? String(org['description']) : null;\n const createdDate: string | null = org['created'] ? formatDate(String(org['created'])) : null;\n const lastModifiedDate: string | null = org['lastModified'] ? formatDate(String(org['lastModified'])) : null;\n const initials: string = getOrgInitials(orgName);\n const avatarGradient: string = getOrgAvatarGradient(orgId || orgName);\n\n const children: VNode[] = [];\n\n // Header: title\n children.push(\n h('div', {class: prefix('organization-profile__header')}, [\n h(Typography, {class: prefix('organization-profile__title'), variant: 'h5'}, () => props.title),\n ]),\n );\n\n children.push(h(Divider, {class: prefix('organization-profile__header-divider')}));\n\n // Avatar + org name + handle\n children.push(\n h('div', {class: prefix('organization-profile__identity')}, [\n h(\n 'div',\n {\n class: prefix('organization-profile__avatar'),\n style: {background: avatarGradient},\n },\n [h('span', {class: prefix('organization-profile__avatar-initials')}, initials)],\n ),\n h(Typography, {class: prefix('organization-profile__org-name'), variant: 'h5'}, () => orgName),\n orgHandle\n ? h(\n Typography,\n {class: prefix('organization-profile__org-handle'), variant: 'body2'},\n () => `@${orgHandle}`,\n )\n : null,\n ]),\n );\n\n children.push(h(Divider, {class: prefix('organization-profile__identity-divider')}));\n\n // Field rows\n const fieldRows: VNode[] = [];\n\n // Organization ID (readonly)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'id'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Organization ID',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n h('div', {class: prefix('organization-profile__field-display')}, [\n orgId\n ? h(\n Typography,\n {\n class: [\n prefix('organization-profile__field-value'),\n prefix('organization-profile__field-value--id'),\n ].join(' '),\n variant: 'body1',\n },\n () => orgId,\n )\n : h('span', {class: prefix('organization-profile__field-placeholder')}, 'Not available'),\n ]),\n ]),\n ]),\n );\n\n // Organization Name (editable)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'name'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Organization Name',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n editingName.value\n ? h('div', {class: prefix('organization-profile__field-edit')}, [\n h(TextField, {\n modelValue: editedName.value,\n 'onUpdate:modelValue': (v: string) => {\n editedName.value = v;\n },\n }),\n h('div', {class: prefix('organization-profile__field-edit-actions')}, [\n h(\n Button,\n {\n onClick: async () => {\n await props.onUpdate?.({name: editedName.value});\n editingName.value = false;\n },\n size: 'small' as const,\n variant: 'solid' as const,\n },\n () => 'Save',\n ),\n h(\n Button,\n {\n onClick: () => {\n editingName.value = false;\n },\n size: 'small' as const,\n variant: 'text' as const,\n },\n () => 'Cancel',\n ),\n ]),\n ])\n : h('div', {class: prefix('organization-profile__field-display')}, [\n h(Typography, {class: prefix('organization-profile__field-value'), variant: 'body1'}, () => orgName),\n props.editable\n ? h(\n 'button',\n {\n 'aria-label': 'Edit Organization Name',\n class: prefix('organization-profile__field-edit-btn'),\n onClick: () => {\n editedName.value = orgName;\n editingName.value = true;\n },\n type: 'button',\n },\n [h(PencilIcon)],\n )\n : null,\n ]),\n ]),\n ]),\n );\n\n // Organization Description (editable)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'description'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Organization Description',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n editingDescription.value\n ? h('div', {class: prefix('organization-profile__field-edit')}, [\n h(TextField, {\n modelValue: editedDescription.value,\n 'onUpdate:modelValue': (v: string) => {\n editedDescription.value = v;\n },\n }),\n h('div', {class: prefix('organization-profile__field-edit-actions')}, [\n h(\n Button,\n {\n onClick: async () => {\n await props.onUpdate?.({description: editedDescription.value});\n editingDescription.value = false;\n },\n size: 'small' as const,\n variant: 'solid' as const,\n },\n () => 'Save',\n ),\n h(\n Button,\n {\n onClick: () => {\n editingDescription.value = false;\n },\n size: 'small' as const,\n variant: 'text' as const,\n },\n () => 'Cancel',\n ),\n ]),\n ])\n : h('div', {class: prefix('organization-profile__field-display')}, [\n orgDescription != null\n ? h(\n Typography,\n {class: prefix('organization-profile__field-value'), variant: 'body1'},\n () => orgDescription,\n )\n : h(\n 'span',\n {\n class: prefix('organization-profile__field-placeholder'),\n onClick: props.editable\n ? (): void => {\n editedDescription.value = '';\n editingDescription.value = true;\n }\n : undefined,\n },\n 'Enter organization description',\n ),\n props.editable\n ? h(\n 'button',\n {\n 'aria-label': 'Edit Organization Description',\n class: prefix('organization-profile__field-edit-btn'),\n onClick: () => {\n editedDescription.value = orgDescription ?? '';\n editingDescription.value = true;\n },\n type: 'button',\n },\n [h(PencilIcon)],\n )\n : null,\n ]),\n ]),\n ]),\n );\n\n // Created Date (readonly)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'created'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(Typography, {class: prefix('organization-profile__field-label'), variant: 'body2'}, () => 'Created Date'),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n h('div', {class: prefix('organization-profile__field-display')}, [\n createdDate\n ? h(\n Typography,\n {class: prefix('organization-profile__field-value'), variant: 'body1'},\n () => createdDate,\n )\n : h('span', {class: prefix('organization-profile__field-placeholder')}, 'Not available'),\n ]),\n ]),\n ]),\n );\n\n // Last Modified Date (readonly)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'lastModified'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Last Modified Date',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n h('div', {class: prefix('organization-profile__field-display')}, [\n lastModifiedDate\n ? h(\n Typography,\n {class: prefix('organization-profile__field-value'), variant: 'body1'},\n () => lastModifiedDate,\n )\n : h('span', {class: prefix('organization-profile__field-placeholder')}, 'Not available'),\n ]),\n ]),\n ]),\n );\n\n // Organization Handle (readonly)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'orgHandle'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Organization Handle',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n h('div', {class: prefix('organization-profile__field-display')}, [\n orgHandle\n ? h(Typography, {class: prefix('organization-profile__field-value'), variant: 'body1'}, () => orgHandle)\n : h('span', {class: prefix('organization-profile__field-placeholder')}, 'Not available'),\n ]),\n ]),\n ]),\n );\n\n children.push(h('div', {class: prefix('organization-profile__fields')}, fieldRows));\n\n return h(\n Card,\n {class: [prefix('organization-profile'), props.className].filter(Boolean).join(' ')},\n () => children,\n );\n };\n },\n});\n\nexport default BaseOrganizationProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport BaseOrganizationSwitcher from './BaseOrganizationSwitcher';\nimport useOrganization from '../../../composables/useOrganization';\n\n/**\n * OrganizationSwitcher \u2014 styled organisation switcher component.\n *\n * Retrieves organisations from context and delegates to BaseOrganizationSwitcher.\n */\nconst OrganizationSwitcher: Component = defineComponent({\n name: 'OrganizationSwitcher',\n props: {\n className: {default: '', type: String},\n },\n setup(props: {className: string}, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {currentOrganization, myOrganizations, isLoading, switchOrganization} = useOrganization();\n\n return (): VNode | VNode[] | null =>\n h(\n BaseOrganizationSwitcher,\n {\n class: withVendorCSSClassPrefix('organization-switcher--styled'),\n className: props.className,\n currentOrganization: currentOrganization?.value ?? null,\n isLoading: isLoading?.value ?? false,\n onSwitch: switchOrganization,\n organizations: myOrganizations?.value ?? [],\n },\n slots,\n );\n },\n});\n\nexport default OrganizationSwitcher;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport type {Organization} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport Card from '../../primitives/Card';\nimport {BuildingIcon, ChevronDownIcon} from '../../primitives/Icons';\nimport Spinner from '../../primitives/Spinner';\nimport Typography from '../../primitives/Typography';\n\nconst cls = (name: string): string => withVendorCSSClassPrefix(`organization-switcher${name}`);\n\n/**\n * BaseOrganizationSwitcher \u2014 unstyled organisation dropdown switcher.\n *\n * Shows the current organization name and a dropdown list to switch.\n */\nconst BaseOrganizationSwitcher: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseOrganizationSwitcher',\n props: {\n className: {default: '', type: String},\n currentOrganization: {default: null, type: Object as PropType<Organization | null>},\n isLoading: {default: false, type: Boolean},\n onSwitch: {default: undefined, type: Function as PropType<(org: Organization) => void>},\n organizations: {default: () => [], type: Array as PropType<Organization[]>},\n },\n setup(\n props: {\n className: string;\n currentOrganization: Organization | null;\n isLoading: boolean;\n onSwitch?: (org: Organization) => void;\n organizations: Organization[];\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n const isOpen: Ref<boolean> = ref(false);\n\n const toggle = (): void => {\n isOpen.value = !isOpen.value;\n };\n\n const handleSelect = (org: Organization): void => {\n isOpen.value = false;\n props.onSwitch?.(org);\n };\n\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({\n currentOrganization: props.currentOrganization,\n handleSelect,\n isLoading: props.isLoading,\n isOpen: isOpen.value,\n organizations: props.organizations,\n toggle,\n });\n }\n\n const currentName: string = props.currentOrganization?.name ?? 'No Organization';\n\n const triggerButton: VNode = h(\n 'button',\n {\n 'aria-expanded': isOpen.value,\n 'aria-haspopup': 'listbox',\n class: cls('__trigger'),\n onClick: toggle,\n type: 'button',\n },\n [\n h(BuildingIcon, {size: 16}),\n h(Typography, {class: cls('__trigger-label'), variant: 'body2'}, () => currentName),\n h(ChevronDownIcon, {size: 12}),\n ],\n );\n\n const dropdownChildren: VNode[] = [];\n\n if (props.isLoading) {\n dropdownChildren.push(h('div', {class: cls('__loading')}, [h(Spinner, {size: 'small'})]));\n } else if (props.organizations.length === 0) {\n dropdownChildren.push(\n h(Typography, {class: cls('__empty'), variant: 'body2'}, () => 'No organizations available'),\n );\n } else {\n props.organizations.forEach((org: Organization) => {\n const isActive: boolean = org['id'] === props.currentOrganization?.id;\n dropdownChildren.push(\n h(\n 'button',\n {\n 'aria-selected': isActive,\n class: [cls('__item'), isActive ? cls('__item--active') : ''],\n onClick: () => handleSelect(org),\n role: 'option',\n type: 'button',\n },\n [h(BuildingIcon, {size: 14}), h(Typography, {variant: 'body2'}, () => org['name'])],\n ),\n );\n });\n }\n\n const dropdown: VNode | null = isOpen.value\n ? h('div', {class: cls('__dropdown'), role: 'listbox'}, dropdownChildren)\n : null;\n\n return h(Card, {class: [cls(''), props.className].filter(Boolean).join(' ')}, () => [triggerButton, dropdown]);\n };\n },\n});\n\nexport default BaseOrganizationSwitcher;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport BaseCreateOrganization from './BaseCreateOrganization';\nimport useOrganization from '../../../composables/useOrganization';\n\ninterface CreateOrganizationSetupProps {\n className: string;\n description: string;\n title: string;\n}\n\n/**\n * CreateOrganization \u2014 styled sub-organisation creation component.\n *\n * Retrieves createOrganization from context and delegates to BaseCreateOrganization.\n */\nconst CreateOrganization: Component = defineComponent({\n name: 'CreateOrganization',\n props: {\n className: {default: '', type: String},\n description: {default: 'Create a new sub-organization.', type: String},\n title: {default: 'Create Organization', type: String},\n },\n setup(props: CreateOrganizationSetupProps, {slots}: {slots: any}): () => VNode {\n const {createOrganization} = useOrganization();\n\n return (): VNode =>\n h(\n BaseCreateOrganization,\n {\n class: withVendorCSSClassPrefix('create-organization--styled'),\n className: props.className,\n description: props.description,\n onCreate: createOrganization\n ? async (name: string): Promise<void> => {\n await createOrganization({description: '', name, parentId: '', type: 'TENANT'}, '');\n }\n : undefined,\n title: props.title,\n },\n slots,\n );\n },\n});\n\nexport default CreateOrganization;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport Alert from '../../primitives/Alert';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport TextField from '../../primitives/TextField';\nimport Typography from '../../primitives/Typography';\n\nconst cls = (name: string): string => withVendorCSSClassPrefix(`create-organization${name}`);\n\ninterface BaseCreateOrganizationSetupProps {\n className: string;\n description: string;\n onCreate?: (name: string) => Promise<void> | void;\n title: string;\n}\n\n/**\n * BaseCreateOrganization \u2014 unstyled sub-organisation creation form.\n *\n * Provides a form with an org name input and create button.\n */\nconst BaseCreateOrganization: Component = defineComponent({\n name: 'BaseCreateOrganization',\n props: {\n className: {default: '', type: String},\n description: {default: 'Create a new sub-organization.', type: String},\n onCreate: {default: undefined, type: Function as PropType<(name: string) => Promise<void> | void>},\n title: {default: 'Create Organization', type: String},\n },\n setup(props: BaseCreateOrganizationSetupProps, {slots}: {slots: any}): () => VNode | VNode[] {\n const orgName: Ref<string> = ref('');\n const isSubmitting: Ref<boolean> = ref(false);\n const error: Ref<string | null> = ref<string | null>(null);\n\n const handleSubmit = async (): Promise<void> => {\n const name: string = orgName.value.trim();\n if (!name) {\n error.value = 'Organization name is required.';\n return;\n }\n\n error.value = null;\n isSubmitting.value = true;\n try {\n await props.onCreate?.(name);\n orgName.value = '';\n } catch (err: unknown) {\n error.value = err instanceof Error ? err.message : 'Failed to create organization.';\n } finally {\n isSubmitting.value = false;\n }\n };\n\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({\n error: error.value,\n handleSubmit,\n isSubmitting: isSubmitting.value,\n orgName: orgName.value,\n setOrgName: (v: string) => {\n orgName.value = v;\n },\n });\n }\n\n return h(Card, {class: [cls(''), props.className].filter(Boolean).join(' ')}, () => [\n h(Typography, {class: cls('__title'), variant: 'h6'}, () => props.title),\n props.description\n ? h(Typography, {class: cls('__description'), variant: 'body2'}, () => props.description)\n : null,\n error.value ? h(Alert, {class: cls('__error'), severity: 'error'}, () => error.value) : null,\n h(TextField, {\n class: cls('__input'),\n label: 'Organization Name',\n modelValue: orgName.value,\n 'onUpdate:modelValue': (v: string) => {\n orgName.value = v;\n },\n placeholder: 'Enter organization name',\n }),\n h(\n Button,\n {\n class: cls('__submit'),\n color: 'primary',\n disabled: isSubmitting.value,\n loading: isSubmitting.value,\n onClick: handleSubmit,\n variant: 'solid',\n },\n () => 'Create',\n ),\n ]);\n };\n },\n});\n\nexport default BaseCreateOrganization;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type VNode, defineComponent, h} from 'vue';\nimport BaseLanguageSwitcher from './BaseLanguageSwitcher';\nimport useI18n from '../../../composables/useI18n';\nimport type {SelectOption} from '../../primitives/Select/Select';\n\ninterface LanguageSwitcherSetupProps {\n className: string;\n languages: SelectOption[];\n}\n\n/**\n * LanguageSwitcher \u2014 styled language selection component.\n *\n * Retrieves current language and setLanguage from i18n context.\n */\nconst LanguageSwitcher: Component = defineComponent({\n name: 'LanguageSwitcher',\n props: {\n className: {default: '', type: String},\n languages: {\n default: () => [\n {label: 'English', value: 'en'},\n {label: 'French', value: 'fr'},\n {label: 'Spanish', value: 'es'},\n {label: 'Portuguese', value: 'pt'},\n ],\n type: Array as PropType<SelectOption[]>,\n },\n },\n setup(props: LanguageSwitcherSetupProps, {slots}: {slots: any}): () => VNode {\n const {currentLanguage, setLanguage} = useI18n();\n\n return (): VNode =>\n h(\n BaseLanguageSwitcher,\n {\n class: withVendorCSSClassPrefix('language-switcher--styled'),\n className: props.className,\n currentLanguage: currentLanguage?.value ?? 'en',\n languages: props.languages,\n onLanguageChange: setLanguage,\n },\n slots,\n );\n },\n});\n\nexport default LanguageSwitcher;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport Card from '../../primitives/Card';\nimport {ChevronDownIcon, GlobeIcon} from '../../primitives/Icons';\nimport type {SelectOption} from '../../primitives/Select/Select';\nimport Typography from '../../primitives/Typography';\n\nconst cls = (name: string): string => withVendorCSSClassPrefix(`language-switcher${name}`);\n\ninterface BaseLanguageSwitcherSetupProps {\n className: string;\n currentLanguage: string;\n languages: SelectOption[];\n onLanguageChange?: (lang: string) => void;\n}\n\n/**\n * BaseLanguageSwitcher \u2014 unstyled language selection component.\n *\n * Shows the current language and a dropdown to select another.\n */\nconst BaseLanguageSwitcher: Component = defineComponent({\n name: 'BaseLanguageSwitcher',\n props: {\n className: {default: '', type: String},\n currentLanguage: {default: 'en', type: String},\n languages: {default: () => [{label: 'English', value: 'en'}], type: Array as PropType<SelectOption[]>},\n onLanguageChange: {default: undefined, type: Function as PropType<(lang: string) => void>},\n },\n setup(props: BaseLanguageSwitcherSetupProps, {slots}: {slots: any}): () => VNode | VNode[] {\n const isOpen: Ref<boolean> = ref(false);\n\n const toggle = (): void => {\n isOpen.value = !isOpen.value;\n };\n\n const handleSelect = (lang: string): void => {\n isOpen.value = false;\n props.onLanguageChange?.(lang);\n };\n\n return (): VNode | VNode[] => {\n if (slots['default']) {\n return slots['default']({\n currentLanguage: props.currentLanguage,\n handleSelect,\n isOpen: isOpen.value,\n languages: props.languages,\n toggle,\n });\n }\n\n const currentLabel: string =\n props.languages.find((l: SelectOption) => l.value === props.currentLanguage)?.label ?? props.currentLanguage;\n\n const triggerButton: VNode = h(\n 'button',\n {\n 'aria-expanded': isOpen.value,\n 'aria-haspopup': 'listbox',\n class: cls('__trigger'),\n onClick: toggle,\n type: 'button',\n },\n [\n h(GlobeIcon, {size: 16}),\n h(Typography, {class: cls('__trigger-label'), variant: 'body2'}, () => currentLabel),\n h(ChevronDownIcon, {size: 12}),\n ],\n );\n\n const dropdownItems: VNode[] = props.languages.map((lang: SelectOption) => {\n const isActive: boolean = lang.value === props.currentLanguage;\n return h(\n 'button',\n {\n 'aria-selected': isActive,\n class: [cls('__item'), isActive ? cls('__item--active') : ''],\n onClick: () => handleSelect(lang.value),\n role: 'option',\n type: 'button',\n },\n [h(Typography, {variant: 'body2'}, () => lang.label)],\n );\n });\n\n const dropdown: VNode | null = isOpen.value\n ? h('div', {class: cls('__dropdown'), role: 'listbox'}, dropdownItems)\n : null;\n\n return h(Card, {class: [cls(''), props.className].filter(Boolean).join(' ')}, () => [triggerButton, dropdown]);\n };\n },\n});\n\nexport default BaseLanguageSwitcher;\n", "/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetaTheme, FlowMetaThemeColorScheme, RecursivePartial, ThemeConfig} from '@asgardeo/browser';\n\n/**\n * Converts a v2 `FlowMetaTheme` into a `RecursivePartial<ThemeConfig>` that\n * `createTheme` can consume.\n *\n * Only fields explicitly present in the FlowMeta response are included so that\n * `createTheme` can deep-merge them onto its base (light/dark) defaults without\n * accidentally dropping sibling keys that were not returned by the server.\n */\nconst buildThemeConfigFromFlowMeta = (\n flowMetaTheme: FlowMetaTheme,\n colorScheme: 'light' | 'dark',\n): RecursivePartial<ThemeConfig> => {\n const scheme: FlowMetaThemeColorScheme | undefined = flowMetaTheme.colorSchemes?.[colorScheme];\n const borderRadius: number | undefined = flowMetaTheme.shape?.borderRadius;\n const borderRadiusStr: string | undefined = borderRadius !== undefined ? `${borderRadius}px` : undefined;\n\n let colors: RecursivePartial<ThemeConfig['colors']> | undefined;\n\n if (scheme?.palette) {\n colors = {};\n\n if (scheme.palette.primary) {\n colors.primary = scheme.palette.primary;\n }\n if (scheme.palette.secondary) {\n colors.secondary = scheme.palette.secondary;\n }\n if (scheme.palette.text) {\n colors.text = scheme.palette.text;\n }\n\n if (scheme.palette.background) {\n const bg: RecursivePartial<ThemeConfig['colors']['background']> = {};\n\n if (scheme.palette.background.default) {\n bg.body = {main: scheme.palette.background.default};\n }\n if (scheme.palette.background.paper) {\n bg.surface = scheme.palette.background.paper;\n }\n\n if (Object.keys(bg).length > 0) {\n colors.background = bg;\n }\n }\n }\n\n return {\n ...(flowMetaTheme.direction ? {direction: flowMetaTheme.direction} : {}),\n ...(borderRadiusStr\n ? {\n borderRadius: {\n large: borderRadiusStr,\n medium: borderRadiusStr,\n small: borderRadiusStr,\n },\n }\n : {}),\n ...(colors && Object.keys(colors).length > 0 ? {colors} : {}),\n ...(flowMetaTheme.typography?.fontFamily ? {typography: {fontFamily: flowMetaTheme.typography.fontFamily}} : {}),\n };\n};\n\nexport default buildThemeConfigFromFlowMeta;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the WebAuthn authentication handler from the Browser SDK.\n *\n * Handles WebAuthn/Passkey authentication flow for browser environments,\n * including browser compatibility checks, HTTPS validation, challenge processing,\n * and the credential authentication ceremony.\n *\n * @see {@link @asgardeo/browser#handleWebAuthnAuthentication}\n */\nexport {handleWebAuthnAuthentication, handleWebAuthnAuthentication as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the auth params URL check from the Browser SDK.\n *\n * Checks if `code` (and optionally `session_state`) are present in the URL search params,\n * indicating an OAuth2 authorization code callback.\n *\n * @see {@link @asgardeo/browser#hasAuthParamsInUrl}\n */\nexport {hasAuthParamsInUrl, hasAuthParamsInUrl as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the navigation helper from the Browser SDK.\n *\n * Navigates to a new URL within the browser:\n * - For same-origin URLs: Uses the History API and dispatches a `popstate` event (SPA navigation).\n * - For cross-origin URLs: Performs a full page load using `window.location.assign`.\n *\n * @see {@link @asgardeo/browser#navigate}\n */\nexport {navigate, navigate as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the HTTP utility from the Browser SDK.\n *\n * Creates an HTTP utility for making authenticated requests using a specific\n * AsgardeoSPAClient instance. The returned object has `request` and `requestAll` methods.\n *\n * @see {@link @asgardeo/browser#http}\n */\nexport {http, http as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {ASGARDEO_KEY} from '../keys';\nimport type {AsgardeoContext} from '../models/contexts';\nimport {createVueLogger} from '../utils/logger';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('Guard');\n\n/**\n * Options for the Asgardeo navigation guard.\n */\nexport interface GuardOptions {\n /**\n * Maximum time (in ms) to wait for SDK initialization before redirecting.\n * Only applicable when `waitForInit` is `true`.\n * @default 10000\n */\n initTimeout?: number;\n\n /**\n * The path to redirect unauthenticated users to.\n * @default '/'\n */\n redirectTo?: string;\n\n /**\n * If `true`, the guard will wait for the SDK to finish initializing before\n * evaluating the authentication state. If `false`, the guard will reject\n * immediately when the SDK is not yet initialized.\n * @default true\n */\n waitForInit?: boolean;\n}\n\n/**\n * A minimal navigation guard type compatible with Vue Router's `NavigationGuard`.\n *\n * This avoids a hard dependency on `vue-router` while remaining structurally compatible.\n * When consumers pass this to `beforeEnter` or `router.beforeEach`, Vue Router will\n * accept it because it satisfies the shape of `NavigationGuard`.\n */\nexport type NavigationGuardReturn = boolean | string | {path: string} | {name: string} | undefined;\nexport type AsgardeoNavigationGuard = (\n to: {fullPath: string; path: string; query: Record<string, string | (string | null)[] | null | undefined>},\n from: {fullPath: string; path: string},\n next: (target?: NavigationGuardReturn) => void,\n) => void | Promise<void>;\n\n/**\n * Creates a Vue Router navigation guard that protects routes by requiring authentication.\n *\n * The guard injects the Asgardeo context to check `isSignedIn` state.\n * If the user is not authenticated, they are redirected to `redirectTo`.\n *\n * **Requires `vue-router` as a peer dependency.**\n *\n * @param options - Guard configuration options.\n * @returns A navigation guard function compatible with Vue Router's `beforeEnter` or `router.beforeEach`.\n *\n * @example\n * ```typescript\n * import { createRouter, createWebHistory } from 'vue-router';\n * import { createAsgardeoGuard } from '@asgardeo/vue';\n *\n * const router = createRouter({\n * history: createWebHistory(),\n * routes: [\n * {\n * path: '/dashboard',\n * component: Dashboard,\n * beforeEnter: createAsgardeoGuard({ redirectTo: '/login' }),\n * },\n * ],\n * });\n * ```\n *\n * @example\n * ```typescript\n * // Global guard on all routes\n * router.beforeEach(createAsgardeoGuard({ redirectTo: '/' }));\n * ```\n */\nexport const createAsgardeoGuard = (options: GuardOptions = {}): AsgardeoNavigationGuard => {\n const {redirectTo = '/', waitForInit = true, initTimeout = 10000} = options;\n\n return async (_to: unknown, _from: unknown, next: (target?: {path: string}) => void): Promise<void> => {\n const ctx: AsgardeoContext | undefined = inject(ASGARDEO_KEY);\n\n if (!ctx) {\n logger.error(\n 'createAsgardeoGuard: Asgardeo context not found. ' +\n 'Ensure the AsgardeoPlugin is installed before using the router guard.',\n );\n next({path: redirectTo});\n\n return;\n }\n\n // If initialized and signed in, allow navigation\n if (ctx.isInitialized.value && ctx.isSignedIn.value) {\n next();\n\n return;\n }\n\n // If initialized and not signed in, redirect\n if (ctx.isInitialized.value && !ctx.isSignedIn.value) {\n next({path: redirectTo});\n\n return;\n }\n\n // SDK not yet initialized \u2014 optionally wait for it\n if (!waitForInit) {\n next({path: redirectTo});\n\n return;\n }\n\n // Wait for initialization to complete\n try {\n await new Promise<void>((resolve: () => void, reject: (reason?: Error) => void) => {\n const timeout: ReturnType<typeof setTimeout> = setTimeout(() => {\n reject(new Error('Asgardeo SDK initialization timed out'));\n }, initTimeout);\n\n const check = (): void => {\n if (ctx.isInitialized.value) {\n clearTimeout(timeout);\n resolve();\n } else {\n requestAnimationFrame(check);\n }\n };\n\n check();\n });\n\n if (ctx.isSignedIn.value) {\n next();\n } else {\n next({path: redirectTo});\n }\n } catch {\n // Timed out \u2014 redirect to fallback\n next({path: redirectTo});\n }\n };\n};\n\nexport default createAsgardeoGuard;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, defineComponent, h} from 'vue';\nimport Callback from '../components/auth/Callback';\n\n/**\n * Options for creating a callback route.\n */\nexport interface CallbackRouteOptions {\n /**\n * The route name. If not provided, no name is set on the route record.\n */\n name?: string;\n\n /**\n * Optional error handler called when the OAuth callback encounters an error.\n */\n onError?: (error: Error) => void;\n\n /**\n * The URL path for the callback route.\n * @default '/callback'\n */\n path?: string;\n}\n\n/**\n * A minimal route record type compatible with Vue Router's `RouteRecordRaw`.\n *\n * This avoids a hard dependency on `vue-router` while remaining structurally compatible.\n */\nexport interface AsgardeoRouteRecord {\n component: ReturnType<typeof defineComponent>;\n meta?: Record<string, unknown>;\n name?: string;\n path: string;\n}\n\n/**\n * Creates a Vue Router route record for the OAuth2 callback.\n *\n * The generated route renders the `<Callback>` component which extracts OAuth parameters\n * (code, state, error) from the URL and redirects the user back to the original path.\n *\n * **Requires `vue-router` as a peer dependency.**\n *\n * @param options - Callback route configuration.\n * @returns A route record compatible with Vue Router's `RouteRecordRaw`.\n *\n * @example\n * ```typescript\n * import { createRouter, createWebHistory } from 'vue-router';\n * import { createCallbackRoute } from '@asgardeo/vue';\n *\n * const router = createRouter({\n * history: createWebHistory(),\n * routes: [\n * createCallbackRoute({ path: '/callback' }),\n * { path: '/', component: Home },\n * { path: '/dashboard', component: Dashboard },\n * ],\n * });\n * ```\n *\n * @example\n * ```typescript\n * // With error handling and Vue Router navigation\n * import { useRouter } from 'vue-router';\n *\n * createCallbackRoute({\n * path: '/auth/callback',\n * name: 'oauth-callback',\n * onError: (error) => console.error('OAuth error:', error),\n * });\n * ```\n */\nexport const createCallbackRoute = (options: CallbackRouteOptions = {}): AsgardeoRouteRecord => {\n const {path = '/callback', name, onError} = options;\n\n const CallbackWrapper: Component = defineComponent({\n name: 'AsgardeoCallbackRoute',\n setup() {\n return (): ReturnType<typeof h> =>\n h(Callback, {\n ...(onError && {onError}),\n });\n },\n });\n\n return {\n ...(name && {name}),\n component: CallbackWrapper,\n meta: {isAsgardeoCallback: true},\n path,\n };\n};\n\nexport default createCallbackRoute;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the active theme resolver from the Browser SDK.\n *\n * Gets the active theme based on the theme mode preference:\n * - `'light'` / `'dark'` \u2192 Returns the specified mode directly.\n * - `'system'` \u2192 Uses `matchMedia('(prefers-color-scheme: dark)')` to detect system preference.\n * - `'class'` \u2192 Inspects DOM element class list for dark/light classes.\n *\n * @see {@link @asgardeo/browser#getActiveTheme}\n */\nexport {getActiveTheme, getActiveTheme as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-exports of theme detection utilities from the Browser SDK.\n *\n * - `detectThemeMode` \u2014 Detects current theme mode based on system preference or DOM class.\n * - `createClassObserver` \u2014 Creates a MutationObserver watching for CSS class changes on a target element.\n * - `createMediaQueryListener` \u2014 Creates a media query listener for `prefers-color-scheme` changes.\n * - `BrowserThemeDetection` \u2014 Configuration interface for DOM-specific theme detection options.\n *\n * @see {@link @asgardeo/browser#detectThemeMode}\n * @see {@link @asgardeo/browser#createClassObserver}\n * @see {@link @asgardeo/browser#createMediaQueryListener}\n */\nexport {\n detectThemeMode,\n createClassObserver,\n createMediaQueryListener,\n type BrowserThemeDetection,\n} from '@asgardeo/browser';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA,oBAAAC;AAAA,EAAA;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AA,QACV,GAAI,WAAW,EAAC,QAAO;AAAA,MACzB,CAAC;AAAA,IACL;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL,GAAI,QAAQ,EAAC,KAAI;AAAA,IACjB,WAAW;AAAA,IACX,MAAM,EAAC,oBAAoB,KAAI;AAAA,IAC/B;AAAA,EACF;AACF;;;ACnFA,IAAAC,mBAAwD;;;ACExD,IAAAC,mBAKO;;;AjI8LP,IAAAC,mBA2BO;",
6
- "names": ["BaseSignIn_default", "BaseSignUp_default", "SignIn_default", "SignUp_default", "useOAuthCallback", "import_browser", "import_vue", "import_browser", "import_vue", "import_vue", "import_browser", "import_i18n", "import_vue", "import_browser", "logger", "import_browser", "import_vue", "import_browser", "import_vue", "logger", "import_vue", "import_browser", "import_browser", "import_browser", "baseGetAllOrganizations", "import_browser", "baseGetMeOrganizations", "import_browser", "baseGetSchemas", "import_browser", "baseGetScim2Me", "import_browser", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "cleanupUrlParams", "useOAuthCallback", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "logger", "navigate", "browserNavigate", "params", "import_vue", "import_vue", "import_vue", "import_vue", "User", "import_vue", "Organization", "import_browser", "import_vue", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_browser", "import_vue", "icon", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "logger", "EmbeddedFlowComponentType", "EmbeddedFlowEventType", "DOMPurify", "import_browser", "BaseSignIn", "BaseSignIn_default", "import_browser", "import_browser", "SignIn", "getUrlParams", "useOAuthCallback", "BaseSignIn_default", "SignIn_default", "SignIn", "SignIn_default", "import_browser", "import_vue", "BaseSignIn", "BaseSignIn_default", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "matchesSocialProvider", "renderSignUpComponents", "logger", "renderSignUpComponents", "import_browser", "import_vue", "import_browser", "import_vue", "logger", "extractFormFields", "EmbeddedFlowComponentType", "BaseSignUp", "BaseSignUp_default", "SignUp", "BaseSignUp_default", "SignUp_default", "SignUp", "SignUp_default", "import_browser", "import_vue", "BaseSignUp", "BaseSignUp_default", "import_browser", "import_vue", "import_browser", "import_vue", "isEmpty", "UserProfile", "import_browser", "import_vue", "import_browser", "import_vue", "displayName", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "http", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "cls", "import_browser", "import_vue", "import_browser", "import_vue", "cls", "import_browser", "import_browser", "import_browser", "import_browser", "import_browser", "import_vue", "logger", "import_vue", "import_browser", "import_browser", "import_browser"]
3
+ "sources": ["../../src/index.ts", "../../src/providers/AsgardeoProvider.ts", "../../src/providers/BrandingProvider.ts", "../../src/keys.ts", "../../src/providers/FlowMetaProvider.ts", "../../src/providers/FlowProvider.ts", "../../src/providers/I18nProvider.ts", "../../src/utils/logger.ts", "../../src/providers/OrganizationProvider.ts", "../../src/providers/ThemeProvider.ts", "../../src/providers/UserProvider.ts", "../../src/AsgardeoVueClient.ts", "../../src/__temp__/api.ts", "../../src/api/getAllOrganizations.ts", "../../src/api/getMeOrganizations.ts", "../../src/api/getSchemas.ts", "../../src/api/getScim2Me.ts", "../../src/styles/animations.css.ts", "../../src/styles/defaults.css.ts", "../../src/components/presentation/create-organization/CreateOrganization.css.ts", "../../src/components/presentation/language-switcher/LanguageSwitcher.css.ts", "../../src/components/presentation/organization-list/OrganizationList.css.ts", "../../src/components/presentation/organization-profile/OrganizationProfile.css.ts", "../../src/components/presentation/organization-switcher/OrganizationSwitcher.css.ts", "../../src/components/presentation/user-dropdown/UserDropdown.css.ts", "../../src/components/presentation/user-profile/UserProfile.css.ts", "../../src/components/primitives/Alert/Alert.css.ts", "../../src/components/primitives/Button/Button.css.ts", "../../src/components/primitives/Card/Card.css.ts", "../../src/components/primitives/Checkbox/Checkbox.css.ts", "../../src/components/primitives/DatePicker/DatePicker.css.ts", "../../src/components/primitives/Divider/Divider.css.ts", "../../src/components/primitives/Logo/Logo.css.ts", "../../src/components/primitives/OtpField/OtpField.css.ts", "../../src/components/primitives/PasswordField/PasswordField.css.ts", "../../src/components/primitives/Select/Select.css.ts", "../../src/components/primitives/Spinner/Spinner.css.ts", "../../src/components/primitives/TextField/TextField.css.ts", "../../src/components/primitives/Typography/Typography.css.ts", "../../src/styles/injectStyles.ts", "../../src/plugins/AsgardeoPlugin.ts", "../../src/composables/useAsgardeo.ts", "../../src/composables/useBranding.ts", "../../src/composables/useFlow.ts", "../../src/composables/useFlowMeta.ts", "../../src/composables/useI18n.ts", "../../src/composables/useOrganization.ts", "../../src/composables/useTheme.ts", "../../src/composables/useUser.ts", "../../src/composables/useOAuthCallback.ts", "../../src/composables/v2/useOAuthCallback.ts", "../../src/components/primitives/Button/Button.ts", "../../src/components/primitives/Card/Card.ts", "../../src/components/primitives/Alert/Alert.ts", "../../src/components/primitives/TextField/TextField.ts", "../../src/components/primitives/PasswordField/PasswordField.ts", "../../src/components/primitives/Icons.ts", "../../src/components/primitives/Select/Select.ts", "../../src/components/primitives/Checkbox/Checkbox.ts", "../../src/components/primitives/DatePicker/DatePicker.ts", "../../src/components/primitives/OtpField/OtpField.ts", "../../src/components/primitives/Typography/Typography.ts", "../../src/components/primitives/Divider/Divider.ts", "../../src/components/primitives/Logo/Logo.ts", "../../src/components/primitives/Spinner/Spinner.ts", "../../src/components/actions/SignInButton.ts", "../../src/components/actions/BaseSignInButton.ts", "../../src/components/actions/SignOutButton.ts", "../../src/components/actions/BaseSignOutButton.ts", "../../src/components/actions/SignUpButton.ts", "../../src/components/actions/BaseSignUpButton.ts", "../../src/components/auth/Callback.ts", "../../src/components/auth/sign-in/SignIn.ts", "../../src/components/auth/sign-in/v1/SignIn.ts", "../../src/components/auth/sign-in/v1/BaseSignIn.ts", "../../src/components/auth/sign-in/v1/options/SignInOptionFactory.ts", "../../src/components/adapters/FacebookButton.ts", "../../src/components/adapters/GitHubButton.ts", "../../src/components/adapters/GoogleButton.ts", "../../src/components/adapters/MicrosoftButton.ts", "../../src/components/factories/FieldFactory.ts", "../../src/components/auth/sign-in/v2/SignIn.ts", "../../src/components/auth/sign-in/v2/BaseSignIn.ts", "../../src/components/auth/sign-in/AuthOptionFactoryCore.ts", "../../src/utils/v2/resolveTranslationsInObject.ts", "../../src/utils/v2/resolveTranslationsInArray.ts", "../../src/utils/v2/flowTransformer.ts", "../../src/utils/oauth.ts", "../../src/utils/v2/passkey.ts", "../../src/components/auth/sign-in/BaseSignIn.ts", "../../src/components/auth/sign-up/SignUp.ts", "../../src/components/auth/sign-up/v1/SignUp.ts", "../../src/components/auth/sign-up/v1/BaseSignUp.ts", "../../src/components/auth/sign-up/v1/options/SignUpOptionFactory.ts", "../../src/components/auth/sign-up/v2/SignUp.ts", "../../src/components/auth/sign-up/v2/BaseSignUp.ts", "../../src/utils/v2/getAuthComponentHeadings.ts", "../../src/components/auth/sign-up/BaseSignUp.ts", "../../src/components/control/SignedIn.ts", "../../src/components/control/SignedOut.ts", "../../src/components/control/Loading.ts", "../../src/components/presentation/user/User.ts", "../../src/components/presentation/organization/Organization.ts", "../../src/components/presentation/user-profile/UserProfile.ts", "../../src/components/presentation/user-profile/BaseUserProfile.ts", "../../src/utils/getMappedUserProfileValue.ts", "../../src/utils/getDisplayName.ts", "../../src/api/updateMeProfile.ts", "../../src/components/presentation/user-dropdown/UserDropdown.ts", "../../src/components/presentation/user-dropdown/BaseUserDropdown.ts", "../../src/components/presentation/accept-invite/AcceptInvite.ts", "../../src/components/presentation/accept-invite/BaseAcceptInvite.ts", "../../src/components/presentation/invite-user/InviteUser.ts", "../../src/components/presentation/invite-user/BaseInviteUser.ts", "../../src/components/presentation/organization-list/OrganizationList.ts", "../../src/components/presentation/organization-list/BaseOrganizationList.ts", "../../src/components/presentation/organization-profile/OrganizationProfile.ts", "../../src/components/presentation/organization-profile/BaseOrganizationProfile.ts", "../../src/components/presentation/organization-switcher/OrganizationSwitcher.ts", "../../src/components/presentation/organization-switcher/BaseOrganizationSwitcher.ts", "../../src/components/presentation/create-organization/CreateOrganization.ts", "../../src/components/presentation/create-organization/BaseCreateOrganization.ts", "../../src/components/presentation/language-switcher/LanguageSwitcher.ts", "../../src/components/presentation/language-switcher/BaseLanguageSwitcher.ts", "../../src/utils/v2/buildThemeConfigFromFlowMeta.ts", "../../src/utils/handleWebAuthnAuthentication.ts", "../../src/utils/hasAuthParamsInUrl.ts", "../../src/utils/navigate.ts", "../../src/utils/http.ts", "../../src/router/guard.ts", "../../src/router/callbackRoute.ts", "../../src/theme/getActiveTheme.ts", "../../src/theme/themeDetection.ts"],
4
+ "sourcesContent": ["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n// \u2500\u2500 Plugin \u2500\u2500\nexport {default as AsgardeoPlugin} from './plugins/AsgardeoPlugin';\nexport type {AsgardeoPluginOptions} from './plugins/AsgardeoPlugin';\n\n// \u2500\u2500 Components \u2500\u2500\nexport {default as AsgardeoProvider} from './providers/AsgardeoProvider';\n\n// \u2500\u2500 Providers \u2500\u2500\nexport {default as BrandingProvider} from './providers/BrandingProvider';\nexport {default as FlowMetaProvider} from './providers/FlowMetaProvider';\nexport {default as FlowProvider} from './providers/FlowProvider';\nexport {default as I18nProvider} from './providers/I18nProvider';\nexport {default as OrganizationProvider} from './providers/OrganizationProvider';\nexport {default as ThemeProvider} from './providers/ThemeProvider';\nexport {default as UserProvider} from './providers/UserProvider';\n\n// \u2500\u2500 Composables \u2500\u2500\nexport {default as useAsgardeo} from './composables/useAsgardeo';\nexport {default as useBranding} from './composables/useBranding';\nexport {default as useFlow} from './composables/useFlow';\nexport {default as useFlowMeta} from './composables/useFlowMeta';\nexport {default as useI18n} from './composables/useI18n';\nexport {default as useOrganization} from './composables/useOrganization';\nexport {default as useTheme} from './composables/useTheme';\nexport {default as useUser} from './composables/useUser';\nexport {useOAuthCallback} from './composables/useOAuthCallback';\nexport type {UseOAuthCallbackOptions, OAuthCallbackPayload} from './composables/useOAuthCallback';\nexport {useOAuthCallback as useOAuthCallbackV2} from './composables/v2/useOAuthCallback';\nexport type {\n UseOAuthCallbackOptions as UseOAuthCallbackOptionsV2,\n OAuthCallbackPayload as OAuthCallbackPayloadV2,\n} from './composables/v2/useOAuthCallback';\n\n// \u2500\u2500 Client \u2500\u2500\nexport {default as AsgardeoVueClient} from './AsgardeoVueClient';\n\n// \u2500\u2500 Keys \u2500\u2500\nexport {\n ASGARDEO_KEY,\n BRANDING_KEY,\n FLOW_KEY,\n FLOW_META_KEY,\n I18N_KEY,\n ORGANIZATION_KEY,\n THEME_KEY,\n USER_KEY,\n} from './keys';\n\n// \u2500\u2500 Models / Types \u2500\u2500\nexport type {AsgardeoVueConfig} from './models/config';\nexport type {\n AsgardeoContext,\n BrandingContextValue,\n FlowContextValue,\n FlowMessage,\n FlowMetaContextValue,\n FlowStep,\n I18nContextValue,\n OrganizationContextValue,\n ThemeContextValue,\n UserContextValue,\n} from './models/contexts';\n\n// \u2500\u2500 UI Components \u2014 Primitives \u2500\u2500\nexport {default as Button} from './components/primitives/Button/Button';\nexport {default as Card} from './components/primitives/Card/Card';\nexport {default as Alert} from './components/primitives/Alert/Alert';\nexport {default as TextField} from './components/primitives/TextField/TextField';\nexport {default as PasswordField} from './components/primitives/PasswordField/PasswordField';\nexport {default as Select} from './components/primitives/Select/Select';\nexport type {SelectOption} from './components/primitives/Select/Select';\nexport {default as Checkbox} from './components/primitives/Checkbox/Checkbox';\nexport {default as DatePicker} from './components/primitives/DatePicker/DatePicker';\nexport {default as OtpField} from './components/primitives/OtpField/OtpField';\nexport {default as Typography} from './components/primitives/Typography/Typography';\nexport {default as Divider} from './components/primitives/Divider/Divider';\nexport {default as Logo} from './components/primitives/Logo/Logo';\nexport {default as Spinner} from './components/primitives/Spinner/Spinner';\nexport {\n UserIcon,\n EyeIcon,\n EyeOffIcon,\n ChevronDownIcon,\n CheckIcon,\n CircleAlertIcon,\n CircleCheckIcon,\n InfoIcon,\n TriangleAlertIcon,\n XIcon,\n PlusIcon,\n LogOutIcon,\n ArrowLeftRightIcon,\n BuildingIcon,\n GlobeIcon,\n PencilIcon,\n} from './components/primitives/Icons';\n\n// \u2500\u2500 UI Components \u2014 Actions \u2500\u2500\nexport {default as SignInButton} from './components/actions/SignInButton';\nexport {default as BaseSignInButton} from './components/actions/BaseSignInButton';\nexport {default as SignOutButton} from './components/actions/SignOutButton';\nexport {default as BaseSignOutButton} from './components/actions/BaseSignOutButton';\nexport {default as SignUpButton} from './components/actions/SignUpButton';\nexport {default as BaseSignUpButton} from './components/actions/BaseSignUpButton';\n\n// \u2500\u2500 UI Components \u2014 Auth Flow \u2500\u2500\nexport {default as Callback} from './components/auth/Callback';\nexport {default as SignIn} from './components/auth/sign-in/SignIn';\nexport type {SignInRenderProps} from './components/auth/sign-in/SignIn';\nexport {default as BaseSignIn} from './components/auth/sign-in/BaseSignIn';\nexport type {BaseSignInRenderProps, BaseSignInProps} from './components/auth/sign-in/BaseSignIn';\nexport {default as SignUp} from './components/auth/sign-up/SignUp';\nexport type {SignUpRenderProps} from './components/auth/sign-up/SignUp';\nexport {default as BaseSignUp} from './components/auth/sign-up/BaseSignUp';\nexport type {BaseSignUpRenderProps, BaseSignUpProps} from './components/auth/sign-up/BaseSignUp';\n\n// \u2500\u2500 UI Components \u2014 Control \u2500\u2500\nexport {default as SignedIn} from './components/control/SignedIn';\nexport {default as SignedOut} from './components/control/SignedOut';\nexport {default as Loading} from './components/control/Loading';\n\n// \u2500\u2500 UI Components \u2014 Presentation \u2500\u2500\nexport {default as User} from './components/presentation/user/User';\nexport {default as Organization} from './components/presentation/organization/Organization';\nexport {default as UserProfile} from './components/presentation/user-profile/UserProfile';\nexport {default as BaseUserProfile} from './components/presentation/user-profile/BaseUserProfile';\nexport {default as UserDropdown} from './components/presentation/user-dropdown/UserDropdown';\nexport {default as BaseUserDropdown} from './components/presentation/user-dropdown/BaseUserDropdown';\nexport {default as AcceptInvite} from './components/presentation/accept-invite/AcceptInvite';\nexport type {AcceptInviteRenderProps} from './components/presentation/accept-invite/AcceptInvite';\nexport {default as BaseAcceptInvite} from './components/presentation/accept-invite/BaseAcceptInvite';\nexport type {\n BaseAcceptInviteRenderProps,\n BaseAcceptInviteProps,\n} from './components/presentation/accept-invite/BaseAcceptInvite';\nexport {default as InviteUser} from './components/presentation/invite-user/InviteUser';\nexport type {InviteUserRenderProps} from './components/presentation/invite-user/InviteUser';\nexport {default as BaseInviteUser} from './components/presentation/invite-user/BaseInviteUser';\nexport type {\n BaseInviteUserRenderProps,\n BaseInviteUserProps,\n} from './components/presentation/invite-user/BaseInviteUser';\nexport {default as OrganizationList} from './components/presentation/organization-list/OrganizationList';\nexport {default as BaseOrganizationList} from './components/presentation/organization-list/BaseOrganizationList';\nexport {default as OrganizationProfile} from './components/presentation/organization-profile/OrganizationProfile';\nexport {default as BaseOrganizationProfile} from './components/presentation/organization-profile/BaseOrganizationProfile';\nexport {default as OrganizationSwitcher} from './components/presentation/organization-switcher/OrganizationSwitcher';\nexport {default as BaseOrganizationSwitcher} from './components/presentation/organization-switcher/BaseOrganizationSwitcher';\nexport {default as CreateOrganization} from './components/presentation/create-organization/CreateOrganization';\nexport {default as BaseCreateOrganization} from './components/presentation/create-organization/BaseCreateOrganization';\nexport {default as LanguageSwitcher} from './components/presentation/language-switcher/LanguageSwitcher';\nexport {default as BaseLanguageSwitcher} from './components/presentation/language-switcher/BaseLanguageSwitcher';\n\n// \u2500\u2500 UI Components \u2014 Adapters \u2500\u2500\nexport {default as GoogleButton} from './components/adapters/GoogleButton';\nexport {default as GitHubButton} from './components/adapters/GitHubButton';\nexport {default as MicrosoftButton} from './components/adapters/MicrosoftButton';\nexport {default as FacebookButton} from './components/adapters/FacebookButton';\n\n// \u2500\u2500 Factories \u2500\u2500\nexport {default as FieldFactory, createField, validateFieldValue} from './components/factories/FieldFactory';\nexport type {FieldConfig} from './components/factories/FieldFactory';\n\n// \u2500\u2500 Utilities \u2500\u2500\nexport {default as buildThemeConfigFromFlowMeta} from './utils/v2/buildThemeConfigFromFlowMeta';\nexport {default as getAuthComponentHeadings} from './utils/v2/getAuthComponentHeadings';\nexport type {HeadingExtractionResult, AuthComponentHeadingsResult} from './utils/v2/getAuthComponentHeadings';\n\n// \u2500\u2500 Re-exports from @asgardeo/browser \u2500\u2500\nexport {\n FieldType,\n type AllOrganizationsApiResponse,\n type Config,\n type EmbeddedFlowExecuteRequestPayload,\n type EmbeddedFlowExecuteResponse,\n type EmbeddedSignInFlowHandleRequestPayload,\n type HttpRequestConfig,\n type HttpResponse,\n type IdToken,\n type Organization as IOrganization,\n type SignInOptions,\n type SignOutOptions,\n type SignUpOptions,\n type TokenExchangeRequestConfig,\n type TokenResponse,\n type User as IUser,\n} from '@asgardeo/browser';\n\n// \u2500\u2500 Phase 4 \u2014 Utilities \u2500\u2500\nexport {handleWebAuthnAuthentication} from './utils/handleWebAuthnAuthentication';\nexport {hasAuthParamsInUrl} from './utils/hasAuthParamsInUrl';\nexport {navigate} from './utils/navigate';\nexport {http} from './utils/http';\nexport {initiateOAuthRedirect} from './utils/oauth';\n\n// \u2500\u2500 Phase 4 \u2014 Router Helpers \u2500\u2500\nexport {createAsgardeoGuard} from './router/guard';\nexport type {GuardOptions, AsgardeoNavigationGuard, NavigationGuardReturn} from './router/guard';\nexport {createCallbackRoute} from './router/callbackRoute';\nexport type {CallbackRouteOptions, AsgardeoRouteRecord} from './router/callbackRoute';\n\n// \u2500\u2500 Phase 4 \u2014 Theme Utilities \u2500\u2500\nexport {getActiveTheme} from './theme/getActiveTheme';\nexport {detectThemeMode, createClassObserver, createMediaQueryListener} from './theme/themeDetection';\nexport type {BrowserThemeDetection} from './theme/themeDetection';\n\n// \u2500\u2500 Phase 4 \u2014 Re-exports from @asgardeo/browser (V2 embedded flow models) \u2500\u2500\nexport {\n AsgardeoRuntimeError,\n EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,\n EmbeddedFlowActionVariantV2 as EmbeddedFlowActionVariant,\n EmbeddedFlowTextVariantV2 as EmbeddedFlowTextVariant,\n EmbeddedFlowEventTypeV2 as EmbeddedFlowEventType,\n type EmbeddedFlowComponentV2 as EmbeddedFlowComponent,\n type EmbeddedFlowResponseDataV2 as EmbeddedFlowResponseData,\n type EmbeddedFlowExecuteRequestConfigV2 as EmbeddedFlowExecuteRequestConfig,\n EmbeddedSignInFlowStatusV2 as EmbeddedSignInFlowStatus,\n EmbeddedSignInFlowTypeV2 as EmbeddedSignInFlowType,\n type ExtendedEmbeddedSignInFlowResponseV2 as ExtendedEmbeddedSignInFlowResponse,\n type EmbeddedSignInFlowResponseV2 as EmbeddedSignInFlowResponse,\n type EmbeddedSignInFlowCompleteResponseV2 as EmbeddedSignInFlowCompleteResponse,\n type EmbeddedSignInFlowInitiateRequestV2 as EmbeddedSignInFlowInitiateRequest,\n type EmbeddedSignInFlowRequestV2 as EmbeddedSignInFlowRequest,\n type EmbeddedSignUpFlowStatusV2 as EmbeddedSignUpFlowStatus,\n type EmbeddedSignUpFlowTypeV2 as EmbeddedSignUpFlowType,\n type ExtendedEmbeddedSignUpFlowResponseV2 as ExtendedEmbeddedSignUpFlowResponse,\n type EmbeddedSignUpFlowResponseV2 as EmbeddedSignUpFlowResponse,\n type EmbeddedSignUpFlowCompleteResponseV2 as EmbeddedSignUpFlowCompleteResponse,\n type EmbeddedSignUpFlowInitiateRequestV2 as EmbeddedSignUpFlowInitiateRequest,\n type EmbeddedSignUpFlowRequestV2 as EmbeddedSignUpFlowRequest,\n type EmbeddedSignUpFlowErrorResponseV2 as EmbeddedSignUpFlowErrorResponse,\n type ComponentRenderContext,\n type ComponentsExtensions,\n type ComponentRenderer,\n} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AllOrganizationsApiResponse,\n AsgardeoRuntimeError,\n extractUserClaimsFromIdToken,\n generateFlattenedUserProfile,\n hasAuthParamsInUrl,\n hasCalledForThisInstanceInUrl,\n HttpResponse,\n IdToken,\n Organization,\n Platform,\n User,\n UserProfile,\n SignInOptions,\n TokenResponse,\n EmbeddedSignInFlowResponseV2,\n} from '@asgardeo/browser';\nimport {\n type Component,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n provide,\n type Ref,\n ref,\n type SetupContext,\n type ShallowRef,\n shallowRef,\n type PropType,\n type VNode,\n} from 'vue';\nimport BrandingProvider from './BrandingProvider';\nimport FlowMetaProvider from './FlowMetaProvider';\nimport FlowProvider from './FlowProvider';\nimport I18nProvider from './I18nProvider';\nimport OrganizationProvider from './OrganizationProvider';\nimport ThemeProvider from './ThemeProvider';\nimport UserProvider from './UserProvider';\nimport AsgardeoVueClient from '../AsgardeoVueClient';\nimport {ASGARDEO_KEY} from '../keys';\nimport type {AsgardeoVueConfig} from '../models/config';\nimport type {AsgardeoContext} from '../models/contexts';\n\ninterface AsgardeoProviderProps {\n afterSignInUrl: string;\n afterSignOutUrl: string;\n applicationId: string | undefined;\n baseUrl: string;\n clientId: string;\n instanceId: number;\n organizationChain: object | undefined;\n organizationHandle: string | undefined;\n platform: string | undefined;\n scopes: string[] | undefined;\n signInOptions: SignInOptions | undefined;\n signInUrl: string | undefined;\n signUpUrl: string | undefined;\n storage: string | undefined;\n syncSession: boolean | undefined;\n}\n\n/**\n * Checks if the current URL contains authentication parameters.\n */\nfunction hasAuthParams(url: URL, afterSignInUrl: string): boolean {\n return (\n (hasAuthParamsInUrl() && new URL(url.origin + url.pathname).toString() === new URL(afterSignInUrl).toString()) ||\n url.searchParams.get('error') !== null\n );\n}\n\n/**\n * Root provider component for the Asgardeo Vue SDK.\n *\n * This component initializes the client, manages authentication state,\n * and provides the Asgardeo context to child components via Vue's provide/inject.\n *\n * @example\n * ```vue\n * <template>\n * <AsgardeoProvider v-bind=\"config\">\n * <router-view />\n * </AsgardeoProvider>\n * </template>\n * ```\n */\nconst AsgardeoProvider: Component = defineComponent({\n name: 'AsgardeoProvider',\n props: {\n /** The URL to redirect to after sign in. Defaults to `window.location.origin`. */\n afterSignInUrl: {\n default: () => window.location.origin,\n type: String,\n },\n /** The URL to redirect to after sign out. Defaults to `window.location.origin`. */\n afterSignOutUrl: {\n default: () => window.location.origin,\n type: String,\n },\n /** The Asgardeo application ID. */\n applicationId: {\n default: undefined,\n type: String,\n },\n /** The base URL of the Asgardeo tenant. */\n baseUrl: {\n required: true,\n type: String,\n },\n /** The OAuth2 client ID. */\n clientId: {\n required: true,\n type: String,\n },\n /** Instance ID for multi-instance support. */\n instanceId: {\n default: 0,\n type: Number,\n },\n /** Organization chain config. */\n organizationChain: {\n default: undefined,\n type: Object,\n },\n /** The organization handle. */\n organizationHandle: {\n default: undefined,\n type: String,\n },\n /** Platform type. */\n platform: {\n default: undefined,\n type: String,\n },\n /** The scopes to request. */\n scopes: {\n default: undefined,\n type: Array as PropType<string[]>,\n },\n /** Additional sign-in options. */\n signInOptions: {\n default: undefined,\n type: Object as PropType<SignInOptions>,\n },\n /** The sign-in URL. */\n signInUrl: {\n default: undefined,\n type: String,\n },\n /** The sign-up URL. */\n signUpUrl: {\n default: undefined,\n type: String,\n },\n /** Storage type. */\n storage: {\n default: undefined,\n type: String,\n },\n /** Whether to sync sessions across tabs. */\n syncSession: {\n default: undefined,\n type: Boolean,\n },\n },\n setup(props: AsgardeoProviderProps, {slots}: SetupContext): () => VNode {\n // \u2500\u2500 Client \u2500\u2500\n const asgardeo: AsgardeoVueClient = new AsgardeoVueClient(props.instanceId);\n\n // \u2500\u2500 Reactive State \u2500\u2500\n const isSignedIn: Ref<boolean> = ref<boolean>(false);\n const isInitialized: Ref<boolean> = ref<boolean>(false);\n const isLoading: Ref<boolean> = ref<boolean>(true);\n const user: ShallowRef<any | null> = shallowRef<any | null>(null);\n const currentOrganization: ShallowRef<Organization | null> = shallowRef<Organization | null>(null);\n const myOrganizations: ShallowRef<Organization[]> = shallowRef<Organization[]>([]);\n const userProfile: ShallowRef<UserProfile | null> = shallowRef<UserProfile | null>(null);\n const resolvedBaseUrl: Ref<string> = ref<string>(props.baseUrl);\n\n let isUpdatingSession: boolean = false;\n let signInCheckInterval: ReturnType<typeof setInterval> | undefined;\n let loadingCheckInterval: ReturnType<typeof setInterval> | undefined;\n\n // \u2500\u2500 Build config from props \u2500\u2500\n function buildConfig(): AsgardeoVueConfig {\n return {\n afterSignInUrl: props.afterSignInUrl,\n afterSignOutUrl: props.afterSignOutUrl,\n applicationId: props.applicationId,\n baseUrl: props.baseUrl,\n clientId: props.clientId,\n organizationChain: props.organizationChain,\n organizationHandle: props.organizationHandle,\n platform: props.platform,\n scopes: props.scopes,\n signInOptions: props.signInOptions,\n signInUrl: props.signInUrl,\n signUpUrl: props.signUpUrl,\n storage: props.storage,\n syncSession: props.syncSession,\n } as AsgardeoVueConfig;\n }\n\n // \u2500\u2500 Session Update \u2500\u2500\n async function updateSession(): Promise<void> {\n try {\n isUpdatingSession = true;\n isLoading.value = true;\n let baseUrl: string = resolvedBaseUrl.value;\n\n const decodedToken: IdToken = await asgardeo.getDecodedIdToken();\n\n if (decodedToken?.['user_org']) {\n baseUrl = `${(await asgardeo.getConfiguration()).baseUrl}/o`;\n resolvedBaseUrl.value = baseUrl;\n }\n\n const config: AsgardeoVueConfig = buildConfig();\n\n if (config.platform === Platform.AsgardeoV2) {\n const claims: User = extractUserClaimsFromIdToken(decodedToken);\n user.value = claims;\n const profileData: UserProfile = {\n flattenedProfile: claims as User,\n profile: claims as User,\n schemas: [],\n };\n userProfile.value = profileData;\n } else {\n try {\n const fetchedUser: User = await asgardeo.getUser({baseUrl});\n user.value = fetchedUser;\n } catch {\n // silent\n }\n\n try {\n const fetchedOrg: Organization = await asgardeo.getCurrentOrganization();\n currentOrganization.value = fetchedOrg;\n } catch {\n // silent\n }\n\n // Fetch user's organizations for organization components\n try {\n const orgs: Organization[] = await asgardeo.getMyOrganizations({baseUrl});\n myOrganizations.value = orgs || [];\n } catch {\n // silent\n }\n\n // Fetch user profile details for profile components\n try {\n const profileData: UserProfile = await asgardeo.getUserProfile({baseUrl});\n userProfile.value = profileData;\n } catch {\n // silent\n }\n }\n\n const currentSignInStatus: boolean = await asgardeo.isSignedIn();\n isSignedIn.value = currentSignInStatus;\n } catch {\n // silent\n } finally {\n isUpdatingSession = false;\n isLoading.value = asgardeo.isLoading();\n }\n }\n\n // \u2500\u2500 Sign In (wrapper) \u2500\u2500\n async function signIn(...args: any[]): Promise<User | EmbeddedSignInFlowResponseV2> {\n const arg1: any = args[0];\n const config: AsgardeoVueConfig = buildConfig();\n const isV2FlowRequest: boolean =\n config.platform === Platform.AsgardeoV2 &&\n typeof arg1 === 'object' &&\n arg1 !== null &&\n ('executionId' in arg1 || 'applicationId' in arg1);\n\n try {\n if (!isV2FlowRequest) {\n isUpdatingSession = true;\n isLoading.value = true;\n }\n\n const response: User | EmbeddedSignInFlowResponseV2 = await asgardeo.signIn(...args);\n\n if (isV2FlowRequest || (response && typeof response === 'object' && 'flowStatus' in response)) {\n return response;\n }\n\n if (await asgardeo.isSignedIn()) {\n await updateSession();\n }\n\n return response as User;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Sign in failed: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,\n 'asgardeo-signIn-Error',\n 'vue',\n 'An error occurred while trying to sign in.',\n );\n } finally {\n if (!isV2FlowRequest) {\n isUpdatingSession = false;\n isLoading.value = asgardeo.isLoading();\n }\n }\n }\n\n // \u2500\u2500 Sign Out \u2500\u2500\n async function signOut(...args: any[]): Promise<any> {\n return asgardeo.signOut(...args);\n }\n\n // \u2500\u2500 Sign Up \u2500\u2500\n async function signUp(...args: any[]): Promise<any> {\n return asgardeo.signUp(...args);\n }\n\n // \u2500\u2500 Sign In Silently \u2500\u2500\n async function signInSilently(options?: SignInOptions): Promise<User | boolean> {\n try {\n isUpdatingSession = true;\n isLoading.value = true;\n const response: User | boolean = await asgardeo.signInSilently(options);\n\n if (await asgardeo.isSignedIn()) {\n await updateSession();\n }\n\n return response;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Error while signing in silently: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,\n 'asgardeo-signInSilently-Error',\n 'vue',\n 'An error occurred while trying to sign in silently.',\n );\n } finally {\n isUpdatingSession = false;\n isLoading.value = asgardeo.isLoading();\n }\n }\n\n // \u2500\u2500 Switch Organization \u2500\u2500\n async function switchOrganization(organization: Organization): Promise<TokenResponse | Response> {\n try {\n isUpdatingSession = true;\n isLoading.value = true;\n const response: TokenResponse | Response = await asgardeo.switchOrganization(organization);\n\n if (await asgardeo.isSignedIn()) {\n await updateSession();\n }\n\n return response;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to switch organization: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,\n 'asgardeo-switchOrganization-Error',\n 'vue',\n 'An error occurred while switching to the specified organization.',\n );\n } finally {\n isUpdatingSession = false;\n isLoading.value = asgardeo.isLoading();\n }\n }\n\n // \u2500\u2500 Provide Context \u2500\u2500\n const context: AsgardeoContext = {\n afterSignInUrl: props.afterSignInUrl,\n applicationId: props.applicationId,\n baseUrl: props.baseUrl,\n clearSession: async (...args: any[]): Promise<void> => {\n await asgardeo.clearSession(...args);\n },\n clientId: props.clientId,\n exchangeToken: (config: any): Promise<TokenResponse | Response> => asgardeo.exchangeToken(config),\n getAccessToken: (): Promise<string> => asgardeo.getAccessToken(),\n getDecodedIdToken: (): Promise<IdToken> => asgardeo.getDecodedIdToken(),\n getIdToken: (): Promise<string> => asgardeo.getIdToken(),\n http: {\n request: (requestConfig?: any): Promise<HttpResponse<any>> => asgardeo.request(requestConfig),\n requestAll: (requestConfigs?: any[]): Promise<HttpResponse<any>[]> => asgardeo.requestAll(requestConfigs),\n },\n instanceId: props.instanceId,\n isInitialized,\n isLoading,\n isSignedIn,\n organization: currentOrganization,\n organizationHandle: props.organizationHandle,\n platform: props.platform as AsgardeoVueConfig['platform'],\n reInitialize: async (config: any): Promise<boolean> => {\n const result: boolean = await asgardeo.reInitialize(config);\n return typeof result === 'boolean' ? result : true;\n },\n signIn,\n signInOptions: props.signInOptions,\n signInSilently,\n signInUrl: props.signInUrl,\n signOut,\n signUp,\n signUpUrl: props.signUpUrl,\n storage: props.storage as AsgardeoVueConfig['storage'],\n switchOrganization,\n user,\n };\n\n provide(ASGARDEO_KEY, context);\n\n // \u2500\u2500 Lifecycle \u2500\u2500\n onMounted(async (): Promise<void> => {\n // 1. Initialize the client\n const config: AsgardeoVueConfig = buildConfig();\n await asgardeo.initialize(config);\n\n const initializedConfig: any = asgardeo.getConfiguration();\n\n if (initializedConfig?.platform) {\n sessionStorage.setItem('asgardeo_platform', initializedConfig.platform);\n }\n if (initializedConfig?.baseUrl) {\n sessionStorage.setItem('asgardeo_base_url', initializedConfig.baseUrl);\n }\n\n // 2. Check initialization status\n try {\n const status: boolean = await asgardeo.isInitialized();\n isInitialized.value = status;\n } catch {\n isInitialized.value = false;\n }\n\n // 3. Try to sign in if already authenticated or if URL has auth params\n const alreadySignedIn: boolean = await asgardeo.isSignedIn();\n\n if (alreadySignedIn) {\n await updateSession();\n } else {\n const currentUrl: URL = new URL(window.location.href);\n const hasParams: boolean =\n hasAuthParams(currentUrl, props.afterSignInUrl) &&\n hasCalledForThisInstanceInUrl(props.instanceId ?? 0, currentUrl.search);\n\n if (hasParams) {\n try {\n const isV2Platform: boolean = config.platform === Platform.AsgardeoV2;\n\n if (isV2Platform) {\n const urlParams: URLSearchParams = currentUrl.searchParams;\n const code: string | null = urlParams.get('code');\n const executionIdFromUrl: string | null = urlParams.get('executionId');\n const storedExecutionId: string | null = sessionStorage.getItem('asgardeo_execution_id');\n\n if (code && !executionIdFromUrl && !storedExecutionId) {\n await signIn();\n }\n } else {\n await signIn({callOnlyOnRedirect: true});\n }\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Sign in failed: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,\n 'asgardeo-signIn-Error',\n 'vue',\n 'An error occurred while trying to sign in.',\n );\n }\n }\n }\n\n // 4. Set up polling for sign-in status\n try {\n const status: boolean = await asgardeo.isSignedIn();\n isSignedIn.value = status;\n\n if (!status) {\n signInCheckInterval = setInterval(async (): Promise<void> => {\n const newStatus: boolean = await asgardeo.isSignedIn();\n if (newStatus) {\n isSignedIn.value = true;\n if (signInCheckInterval) {\n clearInterval(signInCheckInterval);\n signInCheckInterval = undefined;\n }\n }\n }, 1000);\n }\n } catch {\n isSignedIn.value = false;\n }\n\n // 5. Set up polling for loading state\n loadingCheckInterval = setInterval((): void => {\n if (isUpdatingSession) return;\n\n const currentUrl: URL = new URL(window.location.href);\n if (!isSignedIn.value && hasAuthParams(currentUrl, props.afterSignInUrl)) return;\n\n isLoading.value = asgardeo.isLoading();\n }, 100);\n });\n\n onUnmounted((): void => {\n if (signInCheckInterval) {\n clearInterval(signInCheckInterval);\n }\n if (loadingCheckInterval) {\n clearInterval(loadingCheckInterval);\n }\n });\n\n // \u2500\u2500 Render \u2500\u2500\n return (): any =>\n h(I18nProvider, null, {\n default: (): any =>\n h(\n FlowMetaProvider,\n {enabled: props.platform === Platform.AsgardeoV2},\n {\n default: (): any =>\n h(BrandingProvider, null, {\n default: (): any =>\n h(ThemeProvider, null, {\n default: (): any =>\n h(FlowProvider, null, {\n default: (): any =>\n h(\n UserProvider,\n {\n onUpdateProfile: (updatedUser: User): void => {\n user.value = updatedUser;\n userProfile.value = {\n flattenedProfile: generateFlattenedUserProfile(\n updatedUser,\n userProfile.value?.schemas,\n ),\n profile: updatedUser,\n schemas: userProfile.value?.schemas ?? [],\n };\n },\n profile: userProfile.value,\n revalidateProfile: async (): Promise<void> => {\n const revalConfig: AsgardeoVueConfig = buildConfig();\n if (revalConfig.platform === Platform.AsgardeoV2) {\n try {\n const decodedToken: IdToken = await asgardeo.getDecodedIdToken();\n const claims: User = extractUserClaimsFromIdToken(decodedToken);\n user.value = claims;\n userProfile.value = {\n flattenedProfile: claims as User,\n profile: claims as User,\n schemas: [],\n };\n } catch {\n // silent\n }\n return;\n }\n try {\n const profileData: UserProfile = await asgardeo.getUserProfile({\n baseUrl: resolvedBaseUrl.value,\n });\n userProfile.value = profileData;\n } catch {\n // silent\n }\n },\n },\n {\n default: (): any =>\n h(\n OrganizationProvider,\n {\n currentOrganization: currentOrganization.value,\n getAllOrganizations: async (): Promise<AllOrganizationsApiResponse> =>\n asgardeo.getAllOrganizations({baseUrl: resolvedBaseUrl.value}),\n myOrganizations: myOrganizations.value,\n onOrganizationSwitch: switchOrganization,\n revalidateMyOrganizations: async (): Promise<Organization[]> => {\n const baseUrl: string = resolvedBaseUrl.value;\n try {\n const orgs: Organization[] = await asgardeo.getMyOrganizations({baseUrl});\n myOrganizations.value = orgs || [];\n return orgs || [];\n } catch {\n return [];\n }\n },\n },\n {\n default: (): any => slots['default']?.(),\n },\n ),\n },\n ),\n }),\n }),\n }),\n },\n ),\n });\n },\n});\n\nexport default AsgardeoProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {BrandingPreference, Theme, transformBrandingPreferenceToTheme} from '@asgardeo/browser';\nimport {\n computed,\n defineComponent,\n h,\n provide,\n readonly,\n shallowReadonly,\n ref,\n watch,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {BRANDING_KEY} from '../keys';\nimport type {BrandingContextValue} from '../models/contexts';\n\ninterface BrandingProviderProps {\n brandingPreference: BrandingPreference | null;\n enabled: boolean;\n error: Error | null;\n forceTheme: 'light' | 'dark' | undefined;\n isLoading: boolean;\n refetch: (() => Promise<void>) | undefined;\n}\n\n/**\n * BrandingProvider manages branding preference state and makes branding data\n * available to child components via `useBranding()`.\n *\n * It receives branding preferences from a parent component (typically\n * `<AsgardeoProvider>`) and transforms them into `Theme` objects.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\nconst BrandingProvider: Component = defineComponent({\n name: 'BrandingProvider',\n props: {\n /** Whether branding is enabled. When false the context provides null. */\n brandingPreference: {\n default: null,\n type: Object as PropType<BrandingPreference | null>,\n },\n /** Loading state from the parent. */\n enabled: {\n default: true,\n type: Boolean,\n },\n error: {\n default: null,\n type: Object as PropType<Error | null>,\n },\n /** Force a specific theme mode, overriding the one declared in branding. */\n forceTheme: {\n default: undefined,\n type: String as PropType<'light' | 'dark'>,\n },\n /** Re-fetch callback from the parent (bypasses dedup). */\n isLoading: {\n default: false,\n type: Boolean,\n },\n refetch: {\n default: undefined,\n type: Function as PropType<() => Promise<void>>,\n },\n },\n setup(props: BrandingProviderProps, {slots}: SetupContext): () => VNode {\n const theme: Ref<Theme | null> = ref(null);\n const activeTheme: Ref<'light' | 'dark' | null> = ref(null);\n\n // Process branding preference whenever it changes\n const processBranding = (): void => {\n if (!props.enabled || !props.brandingPreference) {\n theme.value = null;\n activeTheme.value = null;\n return;\n }\n\n const activeThemeFromBranding: string | undefined = (props.brandingPreference as any)?.preference?.theme\n ?.activeTheme;\n if (activeThemeFromBranding) {\n const mode: string = activeThemeFromBranding.toLowerCase();\n activeTheme.value = mode === 'light' || mode === 'dark' ? mode : null;\n } else {\n activeTheme.value = null;\n }\n\n const transformedTheme: Theme | null = transformBrandingPreferenceToTheme(\n props.brandingPreference,\n props.forceTheme,\n );\n theme.value = transformedTheme;\n };\n\n watch(() => [props.brandingPreference, props.forceTheme, props.enabled], processBranding, {immediate: true});\n\n const fetchBranding = async (): Promise<void> => {\n if (props.refetch) {\n await props.refetch();\n }\n };\n\n const context: BrandingContextValue = {\n activeTheme: readonly(activeTheme),\n brandingPreference: readonly(computed(() => props.brandingPreference)) as Readonly<\n Ref<BrandingPreference | null>\n >,\n error: readonly(computed(() => props.error)) as Readonly<Ref<Error | null>>,\n fetchBranding,\n isLoading: readonly(computed(() => props.isLoading)) as Readonly<Ref<boolean>>,\n refetch: props.refetch ?? fetchBranding,\n theme: shallowReadonly(theme),\n };\n\n provide(BRANDING_KEY, context);\n\n return (): VNode => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default BrandingProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport type {InjectionKey} from 'vue';\nimport type {\n AsgardeoContext,\n BrandingContextValue,\n FlowContextValue,\n FlowMetaContextValue,\n I18nContextValue,\n OrganizationContextValue,\n ThemeContextValue,\n UserContextValue,\n} from './models/contexts';\n\n/**\n * Injection key for the core Asgardeo authentication context.\n */\nexport const ASGARDEO_KEY: InjectionKey<AsgardeoContext> = Symbol('asgardeo');\n\n/**\n * Injection key for the User context (profile, schemas, update operations).\n */\nexport const USER_KEY: InjectionKey<UserContextValue> = Symbol('asgardeo-user');\n\n/**\n * Injection key for the Organization context (list, current org, switching).\n */\nexport const ORGANIZATION_KEY: InjectionKey<OrganizationContextValue> = Symbol('asgardeo-organization');\n\n/**\n * Injection key for the Flow context (embedded flow UI state).\n */\nexport const FLOW_KEY: InjectionKey<FlowContextValue> = Symbol('asgardeo-flow');\n\n/**\n * Injection key for the FlowMeta context (server-driven flow metadata).\n */\nexport const FLOW_META_KEY: InjectionKey<FlowMetaContextValue> = Symbol('asgardeo-flow-meta');\n\n/**\n * Injection key for the Theme context (color scheme, CSS variables, toggle).\n */\nexport const THEME_KEY: InjectionKey<ThemeContextValue> = Symbol('asgardeo-theme');\n\n/**\n * Injection key for the Branding context (branding preferences from server).\n */\nexport const BRANDING_KEY: InjectionKey<BrandingContextValue> = Symbol('asgardeo-branding');\n\n/**\n * Injection key for the I18n context (translation function, language switching).\n */\nexport const I18N_KEY: InjectionKey<I18nContextValue> = Symbol('asgardeo-i18n');\n", "/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse, FlowMetaType, getFlowMetaV2} from '@asgardeo/browser';\nimport {I18nBundle, TranslationBundleConstants} from '@asgardeo/i18n';\nimport {\n defineComponent,\n h,\n inject,\n onMounted,\n provide,\n readonly,\n shallowReadonly,\n ref,\n watch,\n type Component,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {ASGARDEO_KEY, FLOW_META_KEY, I18N_KEY} from '../keys';\nimport type {AsgardeoContext, FlowMetaContextValue, I18nContextValue} from '../models/contexts';\n\n/**\n * FlowMetaProvider fetches flow metadata from the `GET /flow/meta` endpoint\n * (v2 API) and makes it available via `useFlowMeta()`.\n *\n * It also integrates with `I18nProvider` so that server-side translations\n * from the metadata are automatically injected into the i18n system.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface FlowMetaProviderProps {\n enabled: boolean;\n}\n\nconst FlowMetaProvider: Component = defineComponent({\n name: 'FlowMetaProvider',\n props: {\n /**\n * When false the provider skips fetching and provides null meta.\n * @default true\n */\n enabled: {default: true, type: Boolean},\n },\n setup(props: FlowMetaProviderProps, {slots}: SetupContext): () => VNode {\n const asgardeoContext: AsgardeoContext | undefined = inject(ASGARDEO_KEY);\n const i18nContext: I18nContextValue | null = inject(I18N_KEY, null);\n\n const meta: Ref<FlowMetadataResponse | null> = ref(null);\n const isLoading: Ref<boolean> = ref(false);\n const error: Ref<Error | null> = ref(null);\n const pendingLanguage: Ref<string | null> = ref(null);\n\n const baseUrl: string | undefined = asgardeoContext?.baseUrl;\n const applicationId: string | undefined = asgardeoContext?.applicationId;\n\n const fetchFlowMeta = async (): Promise<void> => {\n if (!props.enabled) {\n meta.value = null;\n return;\n }\n\n isLoading.value = true;\n error.value = null;\n\n try {\n const result: FlowMetadataResponse = await getFlowMetaV2({\n baseUrl,\n id: applicationId,\n type: FlowMetaType.App,\n });\n meta.value = result;\n } catch (err: unknown) {\n error.value = err instanceof Error ? err : new Error(String(err));\n } finally {\n isLoading.value = false;\n }\n };\n\n const switchLanguage = async (language: string): Promise<void> => {\n if (!props.enabled) return;\n\n isLoading.value = true;\n error.value = null;\n\n try {\n const result: FlowMetadataResponse = await getFlowMetaV2({\n baseUrl,\n id: applicationId,\n language,\n type: FlowMetaType.App,\n });\n\n // Inject translations before switching language so the i18n state is updated\n if (result.i18n?.translations && i18nContext?.injectBundles) {\n const flatTranslations: Record<string, string> = {};\n Object.entries(result.i18n.translations).forEach(([namespace, keys]: [string, Record<string, string>]) => {\n Object.entries(keys).forEach(([key, value]: [string, string]) => {\n flatTranslations[`${namespace}.${key}`] = value;\n });\n });\n const bundle: I18nBundle = {translations: flatTranslations} as unknown as I18nBundle;\n i18nContext.injectBundles({[language]: bundle});\n }\n\n // Defer setLanguage so that injectBundles' state is committed first\n pendingLanguage.value = language;\n meta.value = result;\n } catch (err: unknown) {\n error.value = err instanceof Error ? err : new Error(String(err));\n } finally {\n isLoading.value = false;\n }\n };\n\n // After injectBundles + pendingLanguage are committed, call setLanguage\n watch(pendingLanguage, (lang: string | null) => {\n if (lang && i18nContext?.setLanguage) {\n i18nContext.setLanguage(lang);\n pendingLanguage.value = null;\n }\n });\n\n // When meta loads with i18n translations, inject them into the i18n system\n watch(\n () => meta.value?.i18n?.translations,\n (translations: Record<string, Record<string, string>> | undefined) => {\n if (!translations || !i18nContext?.injectBundles) return;\n\n const metaLanguage: string = (meta.value?.i18n as any)?.language || TranslationBundleConstants.FALLBACK_LOCALE;\n\n const flatTranslations: Record<string, string> = {};\n Object.entries(translations).forEach(([namespace, keys]: [string, Record<string, string>]) => {\n Object.entries(keys).forEach(([key, value]: [string, string]) => {\n flatTranslations[`${namespace}.${key}`] = value;\n });\n });\n\n const bundle: I18nBundle = {translations: flatTranslations} as unknown as I18nBundle;\n const bundlesToInject: Record<string, I18nBundle> = {[metaLanguage]: bundle};\n\n const currentLang: string = i18nContext.currentLanguage.value;\n const fallbackLang: string = i18nContext.fallbackLanguage;\n\n if (currentLang && currentLang !== metaLanguage) {\n bundlesToInject[currentLang] = bundle;\n }\n if (fallbackLang && fallbackLang !== metaLanguage) {\n bundlesToInject[fallbackLang] = bundle;\n }\n\n i18nContext.injectBundles(bundlesToInject);\n },\n );\n\n onMounted(() => {\n fetchFlowMeta();\n });\n\n const context: FlowMetaContextValue = {\n error: readonly(error),\n fetchFlowMeta,\n isLoading: readonly(isLoading),\n meta: shallowReadonly(meta),\n switchLanguage,\n };\n\n provide(FLOW_META_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default FlowMetaProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n defineComponent,\n h,\n provide,\n readonly,\n shallowReadonly,\n ref,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {FLOW_KEY} from '../keys';\nimport type {FlowContextValue, FlowMessage, FlowStep} from '../models/contexts';\n\n/**\n * FlowProvider manages authentication flow UI state and makes it available\n * via `useFlow()`.\n *\n * It tracks the current step, title, subtitle, messages, loading state,\n * and back-navigation callback for embedded authentication flows.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface FlowProviderProps {\n initialStep: FlowStep | null;\n initialSubtitle: string | undefined;\n initialTitle: string;\n onFlowChange: ((step: FlowStep) => void) | undefined;\n}\n\nconst FlowProvider: Component = defineComponent({\n name: 'FlowProvider',\n props: {\n /** Initial step to start with. */\n initialStep: {default: null, type: Object as PropType<FlowStep>},\n /** Initial subtitle. */\n initialSubtitle: {default: undefined, type: String},\n /** Initial title. */\n initialTitle: {default: '', type: String},\n /** Callback when the flow step changes. */\n onFlowChange: {default: undefined, type: Function as PropType<(step: FlowStep) => void>},\n },\n setup(props: FlowProviderProps, {slots}: SetupContext): () => VNode {\n const currentStep: Ref<FlowStep> = ref(props.initialStep ?? null);\n const title: Ref<string> = ref(props.initialTitle ?? '');\n const subtitle: Ref<string | undefined> = ref(props.initialSubtitle);\n const messages: Ref<FlowMessage[]> = ref([]);\n const error: Ref<string | null> = ref(null);\n const isLoading: Ref<boolean> = ref(false);\n const showBackButton: Ref<boolean> = ref(false);\n const onGoBack: Ref<(() => void) | undefined> = ref(undefined);\n\n const setCurrentStep = (step: FlowStep): void => {\n currentStep.value = step;\n if (step) {\n title.value = step.title;\n subtitle.value = step.subtitle;\n showBackButton.value = step.canGoBack ?? false;\n }\n props.onFlowChange?.(step);\n };\n\n const setTitle = (newTitle: string): void => {\n title.value = newTitle;\n };\n\n const setSubtitle = (newSubtitle?: string): void => {\n subtitle.value = newSubtitle;\n };\n\n const setError = (newError: string | null): void => {\n error.value = newError;\n };\n\n const setIsLoading = (loading: boolean): void => {\n isLoading.value = loading;\n };\n\n const setShowBackButton = (show: boolean): void => {\n showBackButton.value = show;\n };\n\n const setOnGoBack = (callback?: () => void): void => {\n onGoBack.value = callback;\n };\n\n const addMessage = (message: FlowMessage): void => {\n const messageWithId: FlowMessage = {\n ...message,\n id: message.id ?? `msg-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,\n };\n messages.value = [...messages.value, messageWithId];\n };\n\n const removeMessage = (messageId: string): void => {\n messages.value = messages.value.filter((msg: FlowMessage): boolean => msg.id !== messageId);\n };\n\n const clearMessages = (): void => {\n messages.value = [];\n };\n\n const reset = (): void => {\n currentStep.value = props.initialStep ?? null;\n title.value = props.initialTitle ?? '';\n subtitle.value = props.initialSubtitle;\n messages.value = [];\n error.value = null;\n isLoading.value = false;\n showBackButton.value = false;\n onGoBack.value = undefined;\n };\n\n const navigateToFlow = (\n flowType: NonNullable<FlowStep>['type'],\n options?: {metadata?: Record<string, any>; subtitle?: string; title?: string},\n ): void => {\n const stepId: string = `${flowType}-${Date.now()}`;\n const step: NonNullable<FlowStep> = {\n canGoBack: flowType !== 'signin',\n id: stepId,\n metadata: options?.metadata,\n subtitle: options?.subtitle,\n title: options?.title ?? '',\n type: flowType,\n };\n setCurrentStep(step);\n clearMessages();\n error.value = null;\n };\n\n const context: FlowContextValue = {\n addMessage,\n clearMessages,\n currentStep: readonly(currentStep),\n error: readonly(error),\n isLoading: readonly(isLoading),\n messages: shallowReadonly(messages),\n navigateToFlow,\n onGoBack: readonly(onGoBack),\n removeMessage,\n reset,\n setCurrentStep,\n setError,\n setIsLoading,\n setOnGoBack,\n setShowBackButton,\n setSubtitle,\n setTitle,\n showBackButton: readonly(showBackButton),\n subtitle: readonly(subtitle),\n title: readonly(title),\n };\n\n provide(FLOW_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default FlowProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {deepMerge, I18nPreferences, I18nStorageStrategy} from '@asgardeo/browser';\nimport {\n I18nBundle,\n I18nTranslations,\n TranslationBundleConstants,\n getDefaultI18nBundles,\n normalizeTranslations,\n} from '@asgardeo/i18n';\nimport {\n computed,\n defineComponent,\n h,\n provide,\n readonly,\n ref,\n watch,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {I18N_KEY} from '../keys';\nimport type {I18nContextValue} from '../models/contexts';\nimport {createVueLogger} from '../utils/logger';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('I18nProvider');\n\nconst DEFAULT_STORAGE_KEY: string = 'asgardeo-i18n-language';\nconst DEFAULT_URL_PARAM: string = 'lang';\n\n// \u2500\u2500 Storage helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst deriveRootDomain = (hostname: string): string => {\n const parts: string[] = hostname.split('.');\n return parts.length > 1 ? parts.slice(-2).join('.') : hostname;\n};\n\nconst getCookie = (name: string): string | null => {\n if (typeof document === 'undefined') return null;\n const match: RegExpMatchArray | null = document.cookie.match(\n new RegExp(`(?:^|; )${name.replace(/([.*+?^${}()|[\\]\\\\])/g, '\\\\$1')}=([^;]*)`),\n );\n return match ? decodeURIComponent(match[1]) : null;\n};\n\nconst setCookie = (name: string, value: string, domain: string): void => {\n if (typeof document === 'undefined') return;\n const maxAge: number = 365 * 24 * 60 * 60;\n const secure: string = typeof window !== 'undefined' && window.location.protocol === 'https:' ? '; Secure' : '';\n document.cookie =\n `${encodeURIComponent(name)}=${encodeURIComponent(value)}` +\n `; Max-Age=${maxAge}` +\n `; Path=/` +\n `; Domain=${domain}` +\n `; SameSite=Lax${secure}`;\n};\n\ninterface StorageAdapter {\n read: () => string | null;\n write: (language: string) => void;\n}\n\nconst createStorageAdapter = (strategy: I18nStorageStrategy, key: string, cookieDomain?: string): StorageAdapter => {\n switch (strategy) {\n case 'cookie':\n return {\n read: (): string | null => getCookie(key),\n write: (language: string): void => {\n const domain: string =\n cookieDomain ?? (typeof window !== 'undefined' ? deriveRootDomain(window.location.hostname) : '');\n if (domain) setCookie(key, language, domain);\n },\n };\n case 'localStorage':\n return {\n read: (): string | null => {\n if (typeof window === 'undefined' || !window.localStorage) return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n },\n write: (language: string): void => {\n if (typeof window === 'undefined' || !window.localStorage) return;\n try {\n window.localStorage.setItem(key, language);\n } catch {\n logger.warn('Failed to persist language preference to localStorage.');\n }\n },\n };\n case 'none':\n default:\n return {read: (): null => null, write: (): void => {}};\n }\n};\n\nconst detectUrlParamLanguage = (paramName: string): string | null => {\n if (typeof window === 'undefined') return null;\n try {\n return new URLSearchParams(window.location.search).get(paramName);\n } catch {\n return null;\n }\n};\n\nconst detectBrowserLanguage = (): string => {\n if (typeof window !== 'undefined' && window.navigator) {\n return window.navigator.language || TranslationBundleConstants.FALLBACK_LOCALE;\n }\n return TranslationBundleConstants.FALLBACK_LOCALE;\n};\n\n// \u2500\u2500 Component \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * I18nProvider manages internationalization state and provides translation\n * functions to child components via `useI18n()`.\n *\n * Language resolution order:\n * URL param \u2192 stored preference \u2192 browser language \u2192 fallback locale\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface I18nProviderProps {\n preferences: I18nPreferences | undefined;\n}\n\nconst I18nProvider: Component = defineComponent({\n name: 'I18nProvider',\n props: {\n /** i18n preferences passed down from the AsgardeoProvider config. */\n preferences: {default: undefined, type: Object as PropType<I18nPreferences>},\n },\n setup(props: I18nProviderProps, {slots}: SetupContext): () => VNode {\n const defaultBundles: Record<string, I18nBundle> = getDefaultI18nBundles();\n\n const storageStrategy: I18nStorageStrategy = props.preferences?.storageStrategy ?? 'cookie';\n const storageKey: string = props.preferences?.storageKey ?? DEFAULT_STORAGE_KEY;\n const urlParamConfig: string | false =\n props.preferences?.urlParam === undefined ? DEFAULT_URL_PARAM : props.preferences.urlParam;\n\n const resolvedCookieDomain: string | undefined =\n storageStrategy === 'cookie'\n ? props.preferences?.cookieDomain ??\n (typeof window !== 'undefined' ? deriveRootDomain(window.location.hostname) : undefined)\n : undefined;\n\n const storage: StorageAdapter = createStorageAdapter(storageStrategy, storageKey, resolvedCookieDomain);\n\n // Determine initial language\n const determineInitialLanguage = (): string => {\n if (props.preferences?.language) return props.preferences.language;\n if (urlParamConfig !== false) {\n const urlLanguage: string | null = detectUrlParamLanguage(urlParamConfig);\n if (urlLanguage) {\n storage.write(urlLanguage);\n return urlLanguage;\n }\n }\n const storedLanguage: string | null = storage.read();\n if (storedLanguage) return storedLanguage;\n const browserLanguage: string = detectBrowserLanguage();\n if (browserLanguage) return browserLanguage;\n return props.preferences?.fallbackLanguage || TranslationBundleConstants.FALLBACK_LOCALE;\n };\n\n const currentLanguage: Ref<string> = ref(determineInitialLanguage());\n const fallbackLanguage: string = props.preferences?.fallbackLanguage || TranslationBundleConstants.FALLBACK_LOCALE;\n\n // Bundles injected at runtime (e.g., from flow metadata translations).\n const injectedBundles: Ref<Record<string, I18nBundle>> = ref({});\n\n const injectBundles = (newBundles: Record<string, I18nBundle>): void => {\n const mergedBundles: Record<string, I18nBundle> = {...injectedBundles.value};\n Object.entries(newBundles).forEach(([languageKey, bundle]: [key: string, bundle: I18nBundle]): void => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n bundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (mergedBundles[languageKey]) {\n mergedBundles[languageKey] = {\n ...mergedBundles[languageKey],\n translations: deepMerge(mergedBundles[languageKey].translations, normalizedTranslations),\n };\n } else {\n mergedBundles[languageKey] = {...bundle, translations: normalizedTranslations};\n }\n });\n injectedBundles.value = mergedBundles;\n };\n\n /**\n * Merge bundles: defaults \u2192 injected (meta) \u2192 prop-provided (highest priority)\n */\n const mergedBundlesComputed: Ref<Record<string, I18nBundle>> = computed<Record<string, I18nBundle>>(() => {\n const merged: Record<string, I18nBundle> = {};\n\n // 1. Default bundles\n Object.entries(defaultBundles).forEach(([key, bundle]: [key: string, bundle: I18nBundle]): void => {\n const languageKey: string = key.replace('_', '-');\n merged[languageKey] = bundle;\n });\n\n // 2. Injected bundles (from flow metadata)\n Object.entries(injectedBundles.value).forEach(([key, bundle]: [key: string, bundle: I18nBundle]): void => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n bundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...bundle, translations: normalizedTranslations};\n }\n });\n\n // 3. User-provided bundles (highest priority)\n if (props.preferences?.bundles) {\n Object.entries(props.preferences.bundles).forEach(\n ([key, userBundle]: [key: string, userBundle: I18nBundle]): void => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n userBundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n metadata: userBundle.metadata\n ? {...merged[key].metadata, ...userBundle.metadata}\n : merged[key].metadata,\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...userBundle, translations: normalizedTranslations};\n }\n },\n );\n }\n\n return merged;\n });\n\n // Persist language changes to storage\n watch(currentLanguage, (lang: string): void => {\n storage.write(lang);\n });\n\n const t = (key: string, params?: Record<string, string | number>): string => {\n let translation: string | undefined;\n\n const currentBundle: I18nBundle | undefined = mergedBundlesComputed.value[currentLanguage.value];\n if (currentBundle?.translations[key]) {\n translation = currentBundle.translations[key];\n }\n\n if (!translation && currentLanguage.value !== fallbackLanguage) {\n const fallbackBundle: I18nBundle | undefined = mergedBundlesComputed.value[fallbackLanguage];\n if (fallbackBundle?.translations[key]) {\n translation = fallbackBundle.translations[key];\n }\n }\n\n if (!translation) {\n translation = key;\n }\n\n if (params && Object.keys(params).length > 0) {\n return Object.entries(params).reduce(\n (acc: string, [paramKey, paramValue]: [key: string, value: string | number]): string =>\n acc.replaceAll(`{${paramKey}}`, String(paramValue)),\n translation,\n );\n }\n\n return translation;\n };\n\n const setLanguage = (language: string): void => {\n if (mergedBundlesComputed.value[language]) {\n currentLanguage.value = language;\n } else {\n logger.warn(\n `Language '${language}' is not available. Available languages: ${Object.keys(\n mergedBundlesComputed.value,\n ).join(', ')}`,\n );\n }\n };\n\n const context: I18nContextValue = {\n bundles: readonly(mergedBundlesComputed),\n currentLanguage: readonly(currentLanguage),\n fallbackLanguage,\n injectBundles,\n setLanguage,\n t,\n };\n\n provide(I18N_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default I18nProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {createPackageComponentLogger, createPackageLogger} from '@asgardeo/browser';\n\nconst PACKAGE_NAME: string = '@asgardeo/vue';\n\n/**\n * Package-level logger for `@asgardeo/vue`.\n * Use this when logging is not tied to a specific component.\n */\nconst logger: ReturnType<typeof createPackageLogger> = createPackageLogger(PACKAGE_NAME);\n\n/**\n * Creates a component-scoped logger prefixed with `@asgardeo/vue - <component>`.\n *\n * @param component - The component or module name (e.g. `'AsgardeoProvider'`).\n */\nexport const createVueLogger = (component: string): ReturnType<typeof createPackageComponentLogger> =>\n createPackageComponentLogger(PACKAGE_NAME, component);\n\nexport default logger;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AllOrganizationsApiResponse,\n AsgardeoRuntimeError,\n CreateOrganizationPayload,\n Organization,\n TokenResponse,\n} from '@asgardeo/browser';\nimport {\n computed,\n defineComponent,\n h,\n provide,\n readonly,\n ref,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {ORGANIZATION_KEY} from '../keys';\nimport type {OrganizationContextValue} from '../models/contexts';\n\n/**\n * OrganizationProvider manages organization state and makes it available\n * via `useOrganization()`.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface OrganizationProviderProps {\n createOrganization: ((payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>) | undefined;\n currentOrganization: Organization | null;\n getAllOrganizations: (() => Promise<AllOrganizationsApiResponse>) | undefined;\n myOrganizations: Organization[];\n onError: ((error: string) => void) | undefined;\n onOrganizationSwitch: ((organization: Organization) => Promise<TokenResponse | Response>) | undefined;\n revalidateMyOrganizations: () => Promise<Organization[]>;\n}\n\nconst OrganizationProvider: Component = defineComponent({\n name: 'OrganizationProvider',\n props: {\n /** Optional factory for creating a new sub-organization. */\n createOrganization: {\n default: undefined,\n type: Function as PropType<(payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>>,\n },\n /** The organization the user is currently operating in. */\n currentOrganization: {default: null, type: Object as PropType<Organization | null>},\n /** Callback to fetch all organizations (paginated). */\n getAllOrganizations: {\n default: undefined,\n type: Function as PropType<() => Promise<AllOrganizationsApiResponse>>,\n },\n /** The list of organizations the user is a member of. */\n myOrganizations: {default: () => [], type: Array as PropType<Organization[]>},\n /** Callback when an error occurs. */\n onError: {default: undefined, type: Function as PropType<(error: string) => void>},\n /** Callback that performs the actual organization switch (token exchange). */\n onOrganizationSwitch: {\n default: undefined,\n type: Function as PropType<(organization: Organization) => Promise<TokenResponse | Response>>,\n },\n /** Callback to re-fetch the user's organization list. */\n revalidateMyOrganizations: {\n default: async () => [],\n type: Function as PropType<() => Promise<Organization[]>>,\n },\n },\n setup(props: OrganizationProviderProps, {slots}: SetupContext): () => VNode {\n const isLoading: Ref<boolean> = ref(false);\n const error: Ref<string | null> = ref(null);\n\n const switchOrganization = async (organization: Organization): Promise<void> => {\n if (!props.onOrganizationSwitch) {\n throw new AsgardeoRuntimeError(\n 'onOrganizationSwitch callback is required',\n 'OrganizationProvider-SwitchError-001',\n 'vue',\n 'The onOrganizationSwitch callback must be provided to handle organization switching.',\n );\n }\n\n isLoading.value = true;\n error.value = null;\n\n try {\n await props.onOrganizationSwitch(organization);\n } catch (switchError: unknown) {\n const errorMessage: string =\n switchError instanceof Error ? switchError.message : 'Failed to switch organization';\n error.value = errorMessage;\n if (props.onError) {\n props.onError(errorMessage);\n }\n throw switchError;\n } finally {\n isLoading.value = false;\n }\n };\n\n const getAllOrgs = async (): Promise<AllOrganizationsApiResponse> => {\n if (props.getAllOrganizations) {\n return props.getAllOrganizations();\n }\n return {organizations: []};\n };\n\n // Use computed refs so context stays in sync when props change\n const currentOrganizationRef: Ref<Organization | null> = computed(() => props.currentOrganization);\n const myOrganizationsRef: Ref<Organization[]> = computed(() => props.myOrganizations);\n\n const context: OrganizationContextValue = {\n createOrganization: props.createOrganization,\n currentOrganization: currentOrganizationRef as unknown as Readonly<Ref<Organization | null>>,\n error: readonly(error),\n getAllOrganizations: getAllOrgs,\n isLoading: readonly(isLoading),\n myOrganizations: myOrganizationsRef as unknown as Readonly<Ref<Organization[]>>,\n revalidateMyOrganizations: props.revalidateMyOrganizations,\n switchOrganization,\n };\n\n provide(ORGANIZATION_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default OrganizationProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n Theme,\n ThemeConfig,\n ThemeMode,\n ThemePreferences,\n RecursivePartial,\n BrowserThemeDetection,\n DEFAULT_THEME,\n createTheme,\n detectThemeMode,\n createClassObserver,\n createMediaQueryListener,\n} from '@asgardeo/browser';\nimport {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n readonly,\n shallowReadonly,\n ref,\n watch,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {BRANDING_KEY, THEME_KEY} from '../keys';\nimport type {BrandingContextValue, ThemeContextValue} from '../models/contexts';\nimport {createVueLogger} from '../utils/logger';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('ThemeProvider');\n\n/**\n * ThemeProvider manages theme state and provides it to child components via `useTheme()`.\n *\n * It supports:\n * - Fixed color schemes (`light` | `dark`)\n * - System preference detection (`system`)\n * - CSS-class-based detection (`class`)\n * - Branding-driven mode (`branding`) \u2014 inherits the active theme from `BrandingProvider`\n * - Merging server branding theme with local overrides\n * - CSS variable injection onto `document.documentElement`\n *\n * @example\n * ```vue\n * <ThemeProvider mode=\"system\" :inherit-from-branding=\"true\">\n * <App />\n * </ThemeProvider>\n * ```\n */\ninterface ThemeProviderProps {\n detection: BrowserThemeDetection;\n inheritFromBranding: boolean;\n mode: ThemeMode | 'branding';\n theme: RecursivePartial<ThemeConfig> | undefined;\n}\n\nconst ThemeProvider: Component = defineComponent({\n name: 'ThemeProvider',\n props: {\n /** Theme detection configuration (for 'class' or 'system' mode). */\n detection: {default: () => ({}), type: Object as PropType<BrowserThemeDetection>},\n /** Whether to inherit theme from Asgardeo branding preference. */\n inheritFromBranding: {default: true as ThemePreferences['inheritFromBranding'], type: Boolean},\n /**\n * The theme mode:\n * - `'light'` | `'dark'`: Fixed color scheme.\n * - `'system'`: Follows OS preference.\n * - `'class'`: Detects theme from CSS classes on `<html>`.\n * - `'branding'`: Follows the active theme from branding preference.\n */\n mode: {\n default: DEFAULT_THEME as ThemeMode | 'branding',\n type: String as PropType<ThemeMode | 'branding'>,\n },\n /** Optional partial theme overrides applied on top of the resolved theme. */\n theme: {default: undefined, type: Object as PropType<RecursivePartial<ThemeConfig>>},\n },\n setup(props: ThemeProviderProps, {slots}: SetupContext): () => VNode {\n // Try to consume branding context \u2013 it is optional (BrandingProvider may not be mounted)\n const brandingContext: BrandingContextValue | null = inject(BRANDING_KEY, null);\n\n const initColorScheme = (): 'light' | 'dark' => {\n if (props.mode === 'light' || props.mode === 'dark') return props.mode;\n if (props.mode === 'branding') return detectThemeMode('system', props.detection);\n return detectThemeMode(props.mode as ThemeMode, props.detection);\n };\n\n const colorScheme: Ref<'light' | 'dark'> = ref(initColorScheme());\n\n // Update color scheme when branding's active theme is available\n watch(\n () => (brandingContext as any)?.activeTheme.value,\n (brandingActiveTheme: string | 'light' | 'dark' | undefined): void => {\n if (!props.inheritFromBranding || !brandingActiveTheme) return;\n if (props.mode === 'branding') {\n colorScheme.value = brandingActiveTheme as 'light' | 'dark';\n } else if (props.mode === 'system' && !(brandingContext as any)?.isLoading.value) {\n colorScheme.value = brandingActiveTheme as 'light' | 'dark';\n }\n },\n );\n\n // Warn if inheritFromBranding is true but no BrandingProvider is present\n if (props.inheritFromBranding && !brandingContext) {\n logger.warn(\n 'ThemeProvider: inheritFromBranding is enabled but BrandingProvider is not available. ' +\n 'Make sure to wrap your app with BrandingProvider or AsgardeoProvider.',\n );\n }\n\n // Merge branding theme with user-provided overrides\n const finalThemeConfig: Ref<RecursivePartial<ThemeConfig> | undefined> = computed<\n RecursivePartial<ThemeConfig> | undefined\n >(() => {\n const themeConfig: RecursivePartial<ThemeConfig> | undefined = props.theme;\n const brandingTheme: RecursivePartial<ThemeConfig> | null | undefined = props.inheritFromBranding\n ? (brandingContext as any)?.theme.value\n : null;\n\n if (!brandingTheme) return themeConfig;\n\n const brandingThemeConfig: RecursivePartial<ThemeConfig> = {\n borderRadius: brandingTheme.borderRadius,\n colors: brandingTheme.colors,\n components: brandingTheme.components,\n images: brandingTheme.images,\n shadows: brandingTheme.shadows,\n spacing: brandingTheme.spacing,\n };\n\n return {\n ...brandingThemeConfig,\n ...themeConfig,\n borderRadius: {...brandingThemeConfig.borderRadius, ...themeConfig?.borderRadius},\n colors: {...brandingThemeConfig.colors, ...themeConfig?.colors},\n components: {...brandingThemeConfig.components, ...themeConfig?.components},\n images: {...brandingThemeConfig.images, ...themeConfig?.images},\n shadows: {...brandingThemeConfig.shadows, ...themeConfig?.shadows},\n spacing: {...brandingThemeConfig.spacing, ...themeConfig?.spacing},\n };\n });\n\n const resolvedTheme: Ref<Theme> = computed<Theme>(() =>\n createTheme(finalThemeConfig.value, colorScheme.value === 'dark'),\n );\n\n const direction: Ref<'ltr' | 'rtl'> = computed<'ltr' | 'rtl'>(\n () => ((finalThemeConfig.value as any)?.direction as 'ltr' | 'rtl') || 'ltr',\n );\n\n const toggleTheme = (): void => {\n colorScheme.value = colorScheme.value === 'light' ? 'dark' : 'light';\n };\n\n // Apply CSS variables to DOM\n const applyToDom = (theme: Theme): void => {\n if (typeof document === 'undefined') return;\n const root: HTMLElement = document.documentElement;\n // Use the pre-computed cssVariables map from createTheme() which contains\n // correctly-named CSS variables (e.g. --asgardeo-color-primary-main).\n Object.entries(theme.cssVariables).forEach(([key, value]: [key: string, value: string]): void => {\n root.style.setProperty(key, value);\n });\n };\n\n watch(resolvedTheme, (theme: Theme): void => applyToDom(theme), {immediate: true});\n\n // Apply direction to document\n watch(\n direction,\n (dir: 'ltr' | 'rtl'): void => {\n if (typeof document !== 'undefined') {\n document.documentElement.dir = dir;\n }\n },\n {immediate: true},\n );\n\n // Set up automatic theme detection listeners\n let classObserver: MutationObserver | null = null;\n let mediaQuery: MediaQueryList | null = null;\n\n const handleThemeChange = (isDark: boolean): void => {\n colorScheme.value = isDark ? 'dark' : 'light';\n };\n\n onMounted((): void => {\n if (props.mode === 'branding') return;\n\n if (props.mode === 'class') {\n const targetElement: HTMLElement = (props.detection as any).targetElement || document.documentElement;\n if (targetElement) {\n classObserver = createClassObserver(targetElement, handleThemeChange, props.detection);\n }\n } else if (props.mode === 'system') {\n if (!props.inheritFromBranding || !(brandingContext as any)?.activeTheme.value) {\n mediaQuery = createMediaQueryListener(handleThemeChange);\n }\n }\n });\n\n onBeforeUnmount((): void => {\n if (classObserver) classObserver.disconnect();\n if (mediaQuery?.removeEventListener) {\n mediaQuery.removeEventListener('change', handleThemeChange as any);\n }\n });\n\n const context: ThemeContextValue = {\n brandingError: brandingContext?.error ?? readonly(ref(null)),\n colorScheme: readonly(colorScheme),\n direction: readonly(direction) as Readonly<Ref<'ltr' | 'rtl'>>,\n inheritFromBranding: props.inheritFromBranding,\n isBrandingLoading: brandingContext?.isLoading ?? readonly(ref(false)),\n theme: shallowReadonly(resolvedTheme),\n toggleTheme,\n };\n\n provide(THEME_KEY, context);\n\n return () => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default ThemeProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Schema, UpdateMeProfileConfig, User, UserProfile} from '@asgardeo/browser';\nimport {\n computed,\n defineComponent,\n h,\n provide,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n} from 'vue';\nimport {USER_KEY} from '../keys';\nimport type {UserContextValue} from '../models/contexts';\n\n/**\n * UserProvider manages user profile state and makes it available via `useUser()`.\n *\n * It is a thin wrapper that receives profile data from a parent (typically\n * `<AsgardeoProvider>`) and surfaces it through the Vue inject system.\n *\n * @internal \u2014 This provider is mounted automatically by `<AsgardeoProvider>`.\n */\ninterface UserProviderProps {\n onUpdateProfile: ((payload: User) => void) | undefined;\n profile: UserProfile | null;\n revalidateProfile: () => Promise<void>;\n updateProfile:\n | ((\n requestConfig: UpdateMeProfileConfig,\n sessionId?: string,\n ) => Promise<{data: {user: User}; error: string; success: boolean}>)\n | undefined;\n}\n\nconst UserProvider: Component = defineComponent({\n name: 'UserProvider',\n props: {\n /** Callback to sync a successfully-saved profile back up to AsgardeoProvider. */\n onUpdateProfile: {default: undefined, type: Function as PropType<(payload: User) => void>},\n /** The full user profile data (nested + flat + schemas). */\n profile: {default: null, type: Object as PropType<UserProfile | null>},\n /** Re-fetch the user profile from the server. */\n revalidateProfile: {default: async () => {}, type: Function as PropType<() => Promise<void>>},\n /** Update the user profile via SCIM2 PATCH. */\n updateProfile: {\n default: undefined,\n type: Function as PropType<\n (\n requestConfig: UpdateMeProfileConfig,\n sessionId?: string,\n ) => Promise<{data: {user: User}; error: string; success: boolean}>\n >,\n },\n },\n setup(props: UserProviderProps, {slots}: SetupContext): () => VNode {\n // Derive flattenedProfile and schemas from the single profile prop,\n // matching the same pattern as the React SDK's UserProvider.\n const profileRef: Ref<UserProfile | null> = computed(() => props.profile);\n const flattenedProfileRef: Ref<User | null> = computed(() => props.profile?.flattenedProfile ?? null);\n const schemasRef: Ref<Schema[] | null> = computed(() => props.profile?.schemas ?? null);\n\n const context: UserContextValue = {\n flattenedProfile: flattenedProfileRef as unknown as Readonly<Ref<User | null>>,\n onUpdateProfile: props.onUpdateProfile ?? ((): void => {}),\n profile: profileRef as unknown as Readonly<Ref<UserProfile | null>>,\n revalidateProfile: props.revalidateProfile,\n schemas: schemasRef as unknown as Readonly<Ref<Schema[] | null>>,\n updateProfile:\n props.updateProfile ??\n (async (): Promise<{data: {user: User}; error: string; success: boolean}> => ({\n data: {user: {} as User},\n error: 'updateProfile callback not provided',\n success: false,\n })),\n };\n\n provide(USER_KEY, context);\n\n return (): VNode => h('div', {style: 'display:contents'}, slots['default']?.());\n },\n});\n\nexport default UserProvider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoBrowserClient,\n flattenUserSchema,\n generateFlattenedUserProfile,\n UserProfile,\n SignInOptions,\n SignOutOptions,\n User,\n generateUserProfile,\n EmbeddedFlowExecuteResponse,\n SignUpOptions,\n EmbeddedFlowExecuteRequestPayload,\n AsgardeoRuntimeError,\n executeEmbeddedSignUpFlow,\n EmbeddedSignInFlowHandleRequestPayload,\n executeEmbeddedSignInFlow,\n executeEmbeddedSignInFlowV2,\n Organization,\n IdToken,\n EmbeddedFlowExecuteRequestConfig,\n deriveOrganizationHandleFromBaseUrl,\n AllOrganizationsApiResponse,\n extractUserClaimsFromIdToken,\n TokenResponse,\n HttpRequestConfig,\n HttpResponse,\n navigate,\n getRedirectBasedSignUpUrl,\n Config,\n TokenExchangeRequestConfig,\n Platform,\n isEmpty,\n EmbeddedSignInFlowResponseV2,\n executeEmbeddedSignUpFlowV2,\n EmbeddedSignInFlowStatusV2,\n} from '@asgardeo/browser';\nimport AuthAPI from './__temp__/api';\nimport getAllOrganizations from './api/getAllOrganizations';\nimport getMeOrganizations from './api/getMeOrganizations';\nimport getSchemas from './api/getSchemas';\nimport getScim2Me from './api/getScim2Me';\nimport {AsgardeoVueConfig} from './models/config';\n\n/**\n * Client for implementing Asgardeo in Vue applications.\n * This class provides the core functionality for managing user authentication and sessions.\n *\n * @typeParam T - Configuration type that extends AsgardeoVueConfig.\n */\nclass AsgardeoVueClient<T extends AsgardeoVueConfig = AsgardeoVueConfig> extends AsgardeoBrowserClient<T> {\n private asgardeo: AuthAPI;\n\n private loadingState: boolean = false;\n\n private clientInstanceId: number;\n\n constructor(instanceId: number = 0) {\n super();\n this.clientInstanceId = instanceId;\n\n // FIXME: This has to be the browser client from `@asgardeo/browser` package.\n this.asgardeo = new AuthAPI(undefined, instanceId);\n }\n\n public getInstanceId(): number {\n return this.clientInstanceId;\n }\n\n private setLoading(loading: boolean): void {\n this.loadingState = loading;\n }\n\n private async withLoading<TResult>(operation: () => Promise<TResult>): Promise<TResult> {\n this.setLoading(true);\n try {\n const result: TResult = await operation();\n return result;\n } finally {\n this.setLoading(false);\n }\n }\n\n override initialize(config: AsgardeoVueConfig): Promise<boolean> {\n let resolvedOrganizationHandle: string | undefined = config?.organizationHandle;\n\n if (!resolvedOrganizationHandle) {\n resolvedOrganizationHandle = deriveOrganizationHandleFromBaseUrl(config?.baseUrl);\n }\n\n return this.withLoading(async () =>\n this.asgardeo.init({...config, organizationHandle: resolvedOrganizationHandle} as any),\n );\n }\n\n override reInitialize(config: Partial<AsgardeoVueConfig>): Promise<boolean> {\n return this.withLoading(async () => {\n let isInitialized: boolean;\n\n try {\n await this.asgardeo.reInitialize(config as any);\n isInitialized = true;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to check if the client is initialized: ${error instanceof Error ? error.message : String(error)}`,\n 'AsgardeoVueClient-reInitialize-RuntimeError-001',\n 'vue',\n 'An error occurred while checking the initialization status of the client.',\n );\n }\n\n return isInitialized;\n });\n }\n\n // eslint-disable-next-line class-methods-use-this\n override async updateUserProfile(): Promise<User> {\n throw new Error('Not implemented');\n }\n\n override async getUser(options?: any): Promise<User> {\n try {\n let baseUrl: string = options?.baseUrl;\n\n if (!baseUrl) {\n const configData: any = await this.asgardeo.getConfigData();\n baseUrl = configData?.baseUrl;\n }\n\n const profile: User = await getScim2Me({baseUrl});\n const schemas: any = await getSchemas({baseUrl});\n\n return generateUserProfile(profile, flattenUserSchema(schemas));\n } catch (error) {\n return extractUserClaimsFromIdToken(await this.getDecodedIdToken());\n }\n }\n\n async getDecodedIdToken(sessionId?: string): Promise<IdToken> {\n return this.asgardeo.getDecodedIdToken(sessionId);\n }\n\n async getIdToken(): Promise<string> {\n return this.withLoading(async () => this.asgardeo.getIdToken());\n }\n\n override async getUserProfile(options?: any): Promise<UserProfile> {\n return this.withLoading(async () => {\n try {\n let baseUrl: string = options?.baseUrl;\n\n if (!baseUrl) {\n const configData: any = await this.asgardeo.getConfigData();\n baseUrl = configData?.baseUrl;\n }\n\n const profile: User = await getScim2Me({baseUrl, instanceId: this.getInstanceId()});\n const schemas: any = await getSchemas({baseUrl, instanceId: this.getInstanceId()});\n\n const processedSchemas: any = flattenUserSchema(schemas);\n\n const output: UserProfile = {\n flattenedProfile: generateFlattenedUserProfile(profile, processedSchemas),\n profile,\n schemas: processedSchemas,\n };\n\n return output;\n } catch (error) {\n return {\n flattenedProfile: extractUserClaimsFromIdToken(await this.getDecodedIdToken()),\n profile: extractUserClaimsFromIdToken(await this.getDecodedIdToken()),\n schemas: [],\n };\n }\n });\n }\n\n override async getMyOrganizations(options?: any): Promise<Organization[]> {\n try {\n let baseUrl: string = options?.baseUrl;\n\n if (!baseUrl) {\n const configData: any = await this.asgardeo.getConfigData();\n baseUrl = configData?.baseUrl;\n }\n\n return await getMeOrganizations({baseUrl, instanceId: this.getInstanceId()});\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to fetch the user's associated organizations: ${\n error instanceof Error ? error.message : String(error)\n }`,\n 'AsgardeoVueClient-getMyOrganizations-RuntimeError-001',\n 'vue',\n 'An error occurred while fetching associated organizations of the signed-in user.',\n );\n }\n }\n\n override async getAllOrganizations(options?: any): Promise<AllOrganizationsApiResponse> {\n try {\n let baseUrl: string = options?.baseUrl;\n\n if (!baseUrl) {\n const configData: any = await this.asgardeo.getConfigData();\n baseUrl = configData?.baseUrl;\n }\n\n return await getAllOrganizations({baseUrl, instanceId: this.getInstanceId()});\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to fetch all organizations: ${error instanceof Error ? error.message : String(error)}`,\n 'AsgardeoVueClient-getAllOrganizations-RuntimeError-001',\n 'vue',\n 'An error occurred while fetching all the organizations associated with the user.',\n );\n }\n }\n\n override async getCurrentOrganization(): Promise<Organization | null> {\n try {\n return await this.withLoading(async () => {\n const idToken: IdToken = await this.getDecodedIdToken();\n return {\n id: idToken?.org_id,\n name: idToken?.org_name,\n orgHandle: idToken?.org_handle,\n };\n });\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to fetch the current organization: ${error instanceof Error ? error.message : String(error)}`,\n 'AsgardeoVueClient-getCurrentOrganization-RuntimeError-001',\n 'vue',\n 'An error occurred while fetching the current organization of the signed-in user.',\n );\n }\n }\n\n override async switchOrganization(organization: Organization): Promise<TokenResponse | Response> {\n return this.withLoading(async () => {\n try {\n const configData: any = await this.asgardeo.getConfigData();\n const sourceInstanceId: number | undefined = configData?.organizationChain?.sourceInstanceId;\n\n if (!organization.id) {\n throw new AsgardeoRuntimeError(\n 'Organization ID is required for switching organizations',\n 'vue-AsgardeoVueClient-SwitchOrganizationError-001',\n 'vue',\n 'The organization object must contain a valid ID to perform the organization switch.',\n );\n }\n\n const exchangeConfig: TokenExchangeRequestConfig = {\n attachToken: false,\n data: {\n client_id: '{{clientId}}',\n grant_type: 'organization_switch',\n scope: '{{scopes}}',\n switching_organization: organization.id,\n token: '{{accessToken}}',\n },\n id: 'organization-switch',\n returnsSession: true,\n signInRequired: sourceInstanceId === undefined,\n };\n\n return (await this.asgardeo.exchangeToken(exchangeConfig, () => {})) as TokenResponse | Response;\n } catch (error) {\n throw new AsgardeoRuntimeError(\n `Failed to switch organization: ${error.message || error}`,\n 'vue-AsgardeoVueClient-SwitchOrganizationError-003',\n 'vue',\n 'An error occurred while switching to the specified organization. Please try again.',\n );\n }\n });\n }\n\n override isLoading(): boolean {\n return this.loadingState || this.asgardeo.isLoading();\n }\n\n async isInitialized(): Promise<boolean> {\n return this.asgardeo.isInitialized();\n }\n\n override async isSignedIn(): Promise<boolean> {\n return this.asgardeo.isSignedIn();\n }\n\n override getConfiguration(): T {\n return this.asgardeo.getConfigData() as unknown as T;\n }\n\n override async exchangeToken(config: TokenExchangeRequestConfig): Promise<TokenResponse | Response> {\n return this.withLoading(\n async () => this.asgardeo.exchangeToken(config, () => {}) as unknown as TokenResponse | Response,\n );\n }\n\n override signIn(\n options?: SignInOptions,\n sessionId?: string,\n onSignInSuccess?: (afterSignInUrl: string) => void,\n ): Promise<User>;\n override signIn(\n payload: EmbeddedSignInFlowHandleRequestPayload,\n request: EmbeddedFlowExecuteRequestConfig,\n sessionId?: string,\n onSignInSuccess?: (afterSignInUrl: string) => void,\n ): Promise<User>;\n override async signIn(...args: any[]): Promise<User | EmbeddedSignInFlowResponseV2> {\n return this.withLoading(async () => {\n const arg1: any = args[0];\n const arg2: any = args[1];\n\n const config: AsgardeoVueConfig | undefined = (await this.asgardeo.getConfigData()) as\n | AsgardeoVueConfig\n | undefined;\n\n const platformFromStorage: string | null = sessionStorage.getItem('asgardeo_platform');\n const isV2Platform: boolean =\n (config && config.platform === Platform.AsgardeoV2) || platformFromStorage === 'AsgardeoV2';\n\n if (isV2Platform && typeof arg1 === 'object' && arg1 !== null && (arg1 as any).callOnlyOnRedirect === true) {\n return undefined as any;\n }\n\n if (\n isV2Platform &&\n typeof arg1 === 'object' &&\n arg1 !== null &&\n !isEmpty(arg1) &&\n ('executionId' in arg1 || 'applicationId' in arg1)\n ) {\n const authIdFromUrl: string = new URL(window.location.href).searchParams.get('authId');\n const authIdFromStorage: string = sessionStorage.getItem('asgardeo_auth_id');\n const authId: string = authIdFromUrl || authIdFromStorage;\n const baseUrlFromStorage: string = sessionStorage.getItem('asgardeo_base_url');\n const baseUrl: string = config?.baseUrl || baseUrlFromStorage;\n\n const response: EmbeddedSignInFlowResponseV2 = await executeEmbeddedSignInFlowV2({\n authId,\n baseUrl,\n payload: arg1 as EmbeddedSignInFlowHandleRequestPayload,\n url: arg2?.url,\n });\n\n if (\n isV2Platform &&\n response &&\n typeof response === 'object' &&\n response['flowStatus'] === EmbeddedSignInFlowStatusV2.Complete &&\n response['assertion']\n ) {\n const decodedAssertion: {\n [key: string]: unknown;\n exp?: number;\n iat?: number;\n scope?: string;\n } = await this.decodeJwtToken<{\n [key: string]: unknown;\n exp?: number;\n iat?: number;\n scope?: string;\n }>(response['assertion']);\n\n const createdAt: number = decodedAssertion.iat ? decodedAssertion.iat * 1000 : Date.now();\n const expiresIn: number =\n decodedAssertion.exp && decodedAssertion.iat ? decodedAssertion.exp - decodedAssertion.iat : 3600;\n\n await this.setSession({\n access_token: response['assertion'],\n created_at: createdAt,\n expires_in: expiresIn,\n id_token: response['assertion'],\n scope: decodedAssertion.scope,\n token_type: 'Bearer',\n });\n }\n\n return response;\n }\n\n if (typeof arg1 === 'object' && 'flowId' in arg1 && typeof arg2 === 'object' && 'url' in arg2) {\n return executeEmbeddedSignInFlow({\n payload: arg1,\n url: arg2.url,\n });\n }\n\n return (await this.asgardeo.signIn(arg1 as any)) as unknown as Promise<User>;\n });\n }\n\n override async signInSilently(options?: SignInOptions): Promise<User | boolean> {\n return this.asgardeo.signInSilently(options as Record<string, string | boolean>);\n }\n\n override signOut(options?: SignOutOptions, afterSignOut?: (afterSignOutUrl: string) => void): Promise<string>;\n override signOut(\n options?: SignOutOptions,\n sessionId?: string,\n afterSignOut?: (afterSignOutUrl: string) => void,\n ): Promise<string>;\n override async signOut(...args: any[]): Promise<string> {\n let afterSignOut: ((url: string) => void) | undefined;\n\n if (typeof args[1] === 'string') {\n // Overload 2: signOut(options, sessionId, afterSignOut?)\n [, , afterSignOut] = args;\n } else if (typeof args[1] === 'function') {\n // Overload 1: signOut(options, afterSignOut)\n [, afterSignOut] = args;\n }\n\n const config: AsgardeoVueConfig = (await this.asgardeo.getConfigData()) as AsgardeoVueConfig;\n\n if (config.platform === Platform.AsgardeoV2) {\n this.asgardeo.clearSession();\n\n if (config.signInUrl) {\n navigate(config.signInUrl);\n } else {\n this.signIn(config.signInOptions);\n }\n\n afterSignOut?.(config.afterSignOutUrl || '');\n\n return Promise.resolve(config.afterSignOutUrl || '');\n }\n\n const response: boolean = await this.asgardeo.signOut(afterSignOut as any);\n\n return Promise.resolve(String(response));\n }\n\n override async signUp(options?: SignUpOptions): Promise<void>;\n override async signUp(payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse>;\n override async signUp(...args: any[]): Promise<void | EmbeddedFlowExecuteResponse> {\n const config: AsgardeoVueConfig = (await this.asgardeo.getConfigData()) as AsgardeoVueConfig;\n const firstArg: any = args[0];\n const baseUrl: string = config?.baseUrl;\n\n if (config.platform === Platform.AsgardeoV2) {\n const authIdFromUrl: string = new URL(window.location.href).searchParams.get('authId');\n const authIdFromStorage: string = sessionStorage.getItem('asgardeo_auth_id');\n const authId: string = authIdFromUrl || authIdFromStorage;\n\n if (authIdFromUrl && !authIdFromStorage) {\n sessionStorage.setItem('asgardeo_auth_id', authIdFromUrl);\n }\n\n return executeEmbeddedSignUpFlowV2({\n authId,\n baseUrl,\n payload:\n typeof firstArg === 'object' && 'flowType' in firstArg\n ? {...(firstArg as EmbeddedFlowExecuteRequestPayload), verbose: true}\n : (firstArg as EmbeddedFlowExecuteRequestPayload),\n }) as any;\n }\n\n if (typeof firstArg === 'object' && 'flowType' in firstArg) {\n return executeEmbeddedSignUpFlow({\n baseUrl,\n payload: firstArg as EmbeddedFlowExecuteRequestPayload,\n });\n }\n\n navigate(getRedirectBasedSignUpUrl(config as Config));\n return undefined;\n }\n\n async request(requestConfig?: HttpRequestConfig): Promise<HttpResponse<any>> {\n return this.asgardeo.httpRequest(requestConfig);\n }\n\n async requestAll(requestConfigs?: HttpRequestConfig[]): Promise<HttpResponse<any>[]> {\n return this.asgardeo.httpRequestAll(requestConfigs);\n }\n\n override async getAccessToken(sessionId?: string): Promise<string> {\n return this.asgardeo.getAccessToken(sessionId);\n }\n\n override clearSession(sessionId?: string): void {\n this.asgardeo.clearSession(sessionId);\n }\n\n override async setSession(sessionData: Record<string, unknown>, sessionId?: string): Promise<void> {\n return (await this.asgardeo.getStorageManager()).setSessionData(sessionData, sessionId);\n }\n\n override decodeJwtToken<TResult = Record<string, unknown>>(token: string): Promise<TResult> {\n return this.asgardeo.decodeJwtToken<TResult>(token);\n }\n}\n\nexport default AsgardeoVueClient;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoSPAClient,\n AuthClientConfig,\n User,\n LegacyConfig as Config,\n IdToken,\n Hooks,\n HttpClient,\n HttpRequestConfig,\n HttpResponse,\n OIDCEndpoints,\n SignInConfig,\n SPACustomGrantConfig,\n} from '@asgardeo/browser';\nimport {AuthStateInterface} from './models';\n\nclass AuthAPI {\n static DEFAULT_STATE: AuthStateInterface;\n\n private authState: AuthStateInterface = AuthAPI.DEFAULT_STATE;\n\n private client: AsgardeoSPAClient;\n\n private apiInstanceId: number;\n\n private loadingState: boolean;\n\n constructor(spaClient?: AsgardeoSPAClient, instanceId: number = 0) {\n this.apiInstanceId = instanceId;\n this.client = spaClient ?? AsgardeoSPAClient.getInstance(instanceId);\n\n this.getState = this.getState.bind(this);\n this.init = this.init.bind(this);\n this.signIn = this.signIn.bind(this);\n this.signOut = this.signOut.bind(this);\n this.updateState = this.updateState.bind(this);\n }\n\n public getInstanceId(): number {\n return this.apiInstanceId;\n }\n\n public setLoadingState(isLoading: boolean): void {\n this.loadingState = isLoading;\n }\n\n public getLoadingState(): boolean {\n return this.loadingState;\n }\n\n public isLoading(): boolean {\n return this.getLoadingState();\n }\n\n public getState(): AuthStateInterface {\n return this.authState;\n }\n\n public async init(config: AuthClientConfig<Config>): Promise<boolean> {\n return this.client.initialize(config);\n }\n\n public async getConfigData(): Promise<AuthClientConfig<Config>> {\n return this.client.getConfigData();\n }\n\n public async getStorageManager(): Promise<any> {\n return this.client.getStorageManager();\n }\n\n public async isInitialized(): Promise<boolean> {\n return this.client.isInitialized();\n }\n\n public async signIn(\n config: SignInConfig,\n authorizationCode?: string,\n sessionState?: string,\n authState?: string,\n callback?: (response: User) => void,\n tokenRequestConfig?: {\n params: Record<string, unknown>;\n },\n ): Promise<any> {\n return this.client\n .signIn(config, authorizationCode, sessionState, authState, tokenRequestConfig)\n .then(async (response: User) => {\n if (!response) {\n return null;\n }\n\n if (await this.client.isSignedIn()) {\n const stateToUpdate: AuthStateInterface = {\n displayName: response.displayName,\n email: response.email,\n isLoading: false,\n isSignedIn: true,\n username: response.username,\n };\n\n this.updateState(stateToUpdate);\n this.setLoadingState(false);\n\n if (callback) {\n callback(response);\n }\n }\n\n return response;\n })\n .catch((error: Error) => Promise.reject(error));\n }\n\n public signOut(callback?: (response?: boolean) => void): Promise<boolean> {\n return this.client\n .signOut()\n .then((response: boolean) => {\n if (callback) {\n callback(response);\n }\n\n return response;\n })\n .catch((error: Error) => Promise.reject(error));\n }\n\n public updateState(state: AuthStateInterface): void {\n this.authState = {...this.authState, ...state};\n }\n\n public async getUser(): Promise<User> {\n return this.client.getUser();\n }\n\n public async httpRequest(config: HttpRequestConfig): Promise<HttpResponse<any>> {\n return this.client.httpRequest(config);\n }\n\n public async httpRequestAll(configs: HttpRequestConfig[]): Promise<HttpResponse<any>[]> {\n return this.client.httpRequestAll(configs);\n }\n\n public exchangeToken(\n config: SPACustomGrantConfig,\n callback: (response: User | Response) => void,\n ): Promise<User | Response> {\n return this.client\n .exchangeToken(config)\n .then((response: User | Response) => {\n if (!response) {\n return null;\n }\n\n if (config.returnsSession) {\n this.updateState({\n ...this.getState(),\n ...(response as User),\n isLoading: false,\n isSignedIn: true,\n });\n }\n\n if (callback) {\n callback(response);\n }\n\n return response;\n })\n .catch((error: Error) => Promise.reject(error));\n }\n\n public async getOpenIDProviderEndpoints(): Promise<OIDCEndpoints> {\n return this.client.getOpenIDProviderEndpoints();\n }\n\n public async getHttpClient(): Promise<HttpClient> {\n return this.client.getHttpClient();\n }\n\n public async decodeJwtToken<T = Record<string, unknown>>(token: string): Promise<T> {\n return this.client.decodeJwtToken<T>(token);\n }\n\n public async getDecodedIdToken(sessionId?: string): Promise<IdToken> {\n return this.client.getDecodedIdToken(sessionId);\n }\n\n public async getIdToken(): Promise<string> {\n return this.client.getIdToken();\n }\n\n public async getAccessToken(sessionId?: string): Promise<string> {\n return this.client.getAccessToken(sessionId);\n }\n\n public async refreshAccessToken(): Promise<User> {\n return this.client.refreshAccessToken();\n }\n\n public async isSignedIn(): Promise<boolean> {\n return this.client.isSignedIn();\n }\n\n public async enableHttpHandler(): Promise<boolean> {\n return this.client.enableHttpHandler();\n }\n\n public async disableHttpHandler(): Promise<boolean> {\n return this.client.disableHttpHandler();\n }\n\n public async reInitialize(config: Partial<AuthClientConfig<Config>>): Promise<void> {\n return this.client.reInitialize(config);\n }\n\n public on(hook: Hooks.CustomGrant, callback: (response?: any) => void, id: string): Promise<void>;\n public on(hook: Exclude<Hooks, Hooks.CustomGrant>, callback: (response?: any) => void): Promise<void>;\n public on(hook: Hooks, callback: (response?: any) => void, id?: string): Promise<void> {\n if (hook === Hooks.CustomGrant) {\n return this.client.on(hook, callback, id);\n }\n\n return this.client.on(hook, callback);\n }\n\n public async signInSilently(\n additionalParams?: Record<string, string | boolean>,\n tokenRequestConfig?: {params: Record<string, unknown>},\n ): Promise<User | boolean | undefined> {\n return this.client\n .signInSilently(additionalParams, tokenRequestConfig)\n .then(async (response: User | boolean) => {\n if (!response) {\n return false;\n }\n\n return response;\n })\n .catch((error: Error) => Promise.reject(error));\n }\n\n public clearSession(sessionId?: string): void {\n this.client.clearSession(sessionId);\n }\n}\n\nAuthAPI.DEFAULT_STATE = {\n displayName: '',\n email: '',\n isLoading: true,\n isSignedIn: false,\n username: '',\n};\n\nexport default AuthAPI;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n HttpResponse,\n AsgardeoSPAClient,\n HttpRequestConfig,\n getAllOrganizations as baseGetAllOrganizations,\n GetAllOrganizationsConfig as BaseGetAllOrganizationsConfig,\n AllOrganizationsApiResponse,\n} from '@asgardeo/browser';\n\nexport interface GetAllOrganizationsConfig extends Omit<BaseGetAllOrganizationsConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst getAllOrganizations = async ({\n fetcher,\n instanceId = 0,\n ...requestConfig\n}: GetAllOrganizationsConfig): Promise<AllOrganizationsApiResponse> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetAllOrganizations({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getAllOrganizations;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n Organization,\n HttpResponse,\n AsgardeoSPAClient,\n HttpRequestConfig,\n getMeOrganizations as baseGetMeOrganizations,\n GetMeOrganizationsConfig as BaseGetMeOrganizationsConfig,\n} from '@asgardeo/browser';\n\nexport interface GetMeOrganizationsConfig extends Omit<BaseGetMeOrganizationsConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst getMeOrganizations = async ({\n fetcher,\n instanceId = 0,\n ...requestConfig\n}: GetMeOrganizationsConfig): Promise<Organization[]> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetMeOrganizations({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getMeOrganizations;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n Schema,\n HttpResponse,\n AsgardeoSPAClient,\n HttpRequestConfig,\n getSchemas as baseGetSchemas,\n GetSchemasConfig as BaseGetSchemasConfig,\n} from '@asgardeo/browser';\n\nexport interface GetSchemasConfig extends Omit<BaseGetSchemasConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst getSchemas = async ({fetcher, instanceId = 0, ...requestConfig}: GetSchemasConfig): Promise<Schema[]> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetSchemas({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getSchemas;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n User,\n HttpResponse,\n AsgardeoSPAClient,\n HttpRequestConfig,\n getScim2Me as baseGetScim2Me,\n GetScim2MeConfig as BaseGetScim2MeConfig,\n} from '@asgardeo/browser';\n\nexport interface GetScim2MeConfig extends Omit<BaseGetScim2MeConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst getScim2Me = async ({fetcher, instanceId = 0, ...requestConfig}: GetScim2MeConfig): Promise<User> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetScim2Me({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getScim2Me;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Shared CSS keyframe animations used by multiple primitive components.\n *\n * `asgardeo-spin` - used by Spinner (__svg) and Button (__spinner)\n * `asgardeo-spinner-dash` - used by Spinner (__circle)\n *\n * Defined once here rather than in each component's CSS file to avoid\n * duplicate `@keyframes` blocks in the injected stylesheet.\n */\nconst ANIMATIONS_CSS: string = `\n/* ============================================================\n Asgardeo Vue SDK \u2013 shared keyframe animations\n ============================================================ */\n\n@keyframes asgardeo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes asgardeo-spinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n`;\n\nexport default ANIMATIONS_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Default CSS custom property fallback values.\n *\n * These are written into a `:root` rule so that every Asgardeo Vue primitive\n * renders correctly even when no ThemeProvider is mounted. When ThemeProvider\n * IS present it calls `document.documentElement.style.setProperty(...)` which\n * has higher specificity than a stylesheet `:root` rule and therefore wins\n * automatically \u2014 no special cascade tricks required.\n *\n * Design token naming follows the pattern:\n * --asgardeo-{category}-{sub}-{scale?}\n */\nconst DEFAULTS_CSS: string = `\n/* ============================================================\n Asgardeo Vue SDK \u2013 CSS variable defaults\n (ThemeProvider overrides these at runtime via inline styles)\n ============================================================ */\n:root {\n /* --- Colors: Primary --- */\n --asgardeo-color-primary-main: #4b6ef5;\n --asgardeo-color-primary-light: #eef1fe;\n --asgardeo-color-primary-dark: #3451d1;\n --asgardeo-color-primary-contrastText: #ffffff;\n\n /* --- Colors: Secondary --- */\n --asgardeo-color-secondary-main: #4b5563;\n --asgardeo-color-secondary-light: #f3f4f6;\n --asgardeo-color-secondary-contrastText: #ffffff;\n\n /* --- Colors: Background --- */\n --asgardeo-color-background-surface: #ffffff;\n --asgardeo-color-background-body: #f9fafb;\n --asgardeo-color-background-disabled: #f3f4f6;\n --asgardeo-color-background-muted: #f1f3f5;\n\n /* --- Colors: Text --- */\n --asgardeo-color-text-primary: #111827;\n --asgardeo-color-text-secondary: #6b7280;\n\n /* --- Colors: Border --- */\n --asgardeo-color-border: #e5e7eb;\n --asgardeo-color-border-focus: var(--asgardeo-color-primary-main);\n\n /* --- Colors: Action states --- */\n --asgardeo-color-action-hover: rgba(0, 0, 0, 0.04);\n --asgardeo-color-action-selected: rgba(75, 110, 245, 0.08);\n --asgardeo-color-action-focus: rgba(75, 110, 245, 0.12);\n --asgardeo-color-action-disabled: rgba(0, 0, 0, 0.26);\n --asgardeo-color-action-disabledBackground: rgba(0, 0, 0, 0.08);\n\n /* --- Colors: Semantic --- */\n --asgardeo-color-error-main: #ef4444;\n --asgardeo-color-error-light: #fef2f2;\n --asgardeo-color-error-contrastText: #991b1b;\n --asgardeo-color-success-main: #22c55e;\n --asgardeo-color-success-light: #f0fdf4;\n --asgardeo-color-success-contrastText: #166534;\n --asgardeo-color-warning-main: #f59e0b;\n --asgardeo-color-warning-light: #fffbeb;\n --asgardeo-color-warning-contrastText: #92400e;\n --asgardeo-color-info-main: #3b82f6;\n --asgardeo-color-info-light: #eff6ff;\n --asgardeo-color-info-contrastText: #1e40af;\n\n /* --- Spacing --- */\n --asgardeo-spacing-unit: 8px;\n\n /* --- Border Radius --- */\n --asgardeo-border-radius-xs: 4px;\n --asgardeo-border-radius-small: 6px;\n --asgardeo-border-radius-medium: 10px;\n --asgardeo-border-radius-large: 14px;\n --asgardeo-border-radius-full: 9999px;\n\n /* --- Shadows --- */\n --asgardeo-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);\n --asgardeo-shadow-small: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);\n --asgardeo-shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);\n --asgardeo-shadow-large: 0 10px 25px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);\n\n /* --- Transitions --- */\n --asgardeo-transition-fast: 120ms ease;\n --asgardeo-transition-normal: 180ms ease;\n --asgardeo-transition-slow: 280ms ease;\n\n /* --- Focus Ring --- */\n --asgardeo-focus-ring-width: 2px;\n --asgardeo-focus-ring-offset: 2px;\n --asgardeo-focus-ring-color: rgba(75, 110, 245, 0.35);\n\n /* --- Typography: Font Family --- */\n --asgardeo-typography-fontFamily: \"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n\n /* --- Typography: Font Sizes --- */\n --asgardeo-typography-fontSize-xs: 0.6875rem; /* 11px */\n --asgardeo-typography-fontSize-sm: 0.8125rem; /* 13px */\n --asgardeo-typography-fontSize-md: 0.875rem; /* 14px */\n --asgardeo-typography-fontSize-lg: 1rem; /* 16px */\n --asgardeo-typography-fontSize-xl: 1.125rem; /* 18px */\n --asgardeo-typography-fontSize-2xl: 1.375rem; /* 22px */\n --asgardeo-typography-fontSize-3xl: 1.75rem; /* 28px */\n\n /* --- Typography: Font Weights --- */\n --asgardeo-typography-fontWeight-normal: 400;\n --asgardeo-typography-fontWeight-medium: 500;\n --asgardeo-typography-fontWeight-semibold: 600;\n --asgardeo-typography-fontWeight-bold: 700;\n\n /* --- Typography: Line Heights --- */\n --asgardeo-typography-lineHeight-tight: 1.25;\n --asgardeo-typography-lineHeight-normal: 1.5;\n --asgardeo-typography-lineHeight-relaxed: 1.625;\n\n /* --- Typography: Letter Spacing --- */\n --asgardeo-typography-letterSpacing-tight: -0.01em;\n --asgardeo-typography-letterSpacing-normal: 0;\n --asgardeo-typography-letterSpacing-wide: 0.025em;\n\n /* --- Component: Button --- */\n --asgardeo-button-borderRadius: var(--asgardeo-border-radius-small);\n --asgardeo-button-fontWeight: var(--asgardeo-typography-fontWeight-medium);\n --asgardeo-button-sm-height: 30px;\n --asgardeo-button-sm-paddingX: calc(var(--asgardeo-spacing-unit) * 1.25);\n --asgardeo-button-sm-fontSize: var(--asgardeo-typography-fontSize-sm);\n --asgardeo-button-md-height: 36px;\n --asgardeo-button-md-paddingX: calc(var(--asgardeo-spacing-unit) * 2);\n --asgardeo-button-md-fontSize: var(--asgardeo-typography-fontSize-md);\n --asgardeo-button-lg-height: 42px;\n --asgardeo-button-lg-paddingX: calc(var(--asgardeo-spacing-unit) * 2.5);\n --asgardeo-button-lg-fontSize: var(--asgardeo-typography-fontSize-lg);\n\n /* --- Component: Input fields --- */\n --asgardeo-input-borderRadius: var(--asgardeo-border-radius-small);\n --asgardeo-input-height: 36px;\n --asgardeo-input-paddingX: calc(var(--asgardeo-spacing-unit) * 1.25);\n --asgardeo-input-fontSize: var(--asgardeo-typography-fontSize-md);\n --asgardeo-input-borderColor: var(--asgardeo-color-border);\n --asgardeo-input-focusBorderColor: var(--asgardeo-color-primary-main);\n --asgardeo-input-focusRing: 0 0 0 3px var(--asgardeo-focus-ring-color);\n\n /* --- Component: Card --- */\n --asgardeo-card-borderRadius: var(--asgardeo-border-radius-medium);\n --asgardeo-card-padding: calc(var(--asgardeo-spacing-unit) * 2.5);\n --asgardeo-card-shadow: var(--asgardeo-shadow-small);\n --asgardeo-card-borderColor: var(--asgardeo-color-border);\n\n /* --- Component: Alert --- */\n --asgardeo-alert-borderRadius: var(--asgardeo-border-radius-small);\n --asgardeo-alert-paddingX: calc(var(--asgardeo-spacing-unit) * 1.5);\n --asgardeo-alert-paddingY: calc(var(--asgardeo-spacing-unit) * 1.25);\n\n /* --- Component: Checkbox --- */\n --asgardeo-checkbox-size: 16px;\n\n /* --- Component: Avatar --- */\n --asgardeo-avatar-size: 64px;\n --asgardeo-avatar-fontSize: 1.375rem;\n\n /* --- Component: Dropdown --- */\n --asgardeo-dropdown-borderRadius: var(--asgardeo-border-radius-medium);\n --asgardeo-dropdown-shadow: var(--asgardeo-shadow-medium);\n --asgardeo-dropdown-itemPaddingX: calc(var(--asgardeo-spacing-unit) * 1.5);\n --asgardeo-dropdown-itemPaddingY: calc(var(--asgardeo-spacing-unit) * 1);\n\n /* --- Component overrides (set by ThemeProvider when configured) --- */\n --asgardeo-component-button-root-borderRadius: var(--asgardeo-button-borderRadius);\n --asgardeo-component-field-root-borderRadius: var(--asgardeo-input-borderRadius);\n}\n`;\n\nexport default DEFAULTS_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the CreateOrganization presentation component.\n *\n * BEM block: `.asgardeo-create-organization`\n *\n * The root element is a Card, whose padding is intentionally kept\n * as this is a full form panel.\n *\n * Elements:\n * __title \u2013 form heading (Typography h6)\n * __description \u2013 optional sub-heading (Typography body2)\n * __error \u2013 error Alert\n * __input \u2013 the org-name TextField\n * __submit \u2013 the submit Button\n */\nconst CREATE_ORGANIZATION_CSS: string = `\n/* ============================================================\n CreateOrganization\n ============================================================ */\n\n.asgardeo-create-organization {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 1.75);\n max-width: 440px;\n width: 100%;\n}\n\n/* Title & description --------------------------------------- */\n\n.asgardeo-create-organization__description {\n margin-top: calc(var(--asgardeo-spacing-unit) * -0.75);\n color: var(--asgardeo-color-text-secondary);\n}\n\n/* Input ----------------------------------------------------- */\n\n.asgardeo-create-organization__input {\n width: 100%;\n}\n\n/* Submit ---------------------------------------------------- */\n\n.asgardeo-create-organization__submit {\n align-self: flex-start;\n}\n`;\n\nexport default CREATE_ORGANIZATION_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the LanguageSwitcher presentation component.\n *\n * BEM block: `.asgardeo-language-switcher`\n *\n * The root element is a Card (`.asgardeo-card`). We override its default\n * padding to 0 so the trigger button fills the surface edge-to-edge,\n * and apply `position: relative` to anchor the absolute dropdown.\n * The Card's border-radius and shadow are intentionally kept.\n *\n * Elements:\n * __trigger \u2013 compact trigger button (globe icon + language label + chevron)\n * __trigger-label \u2013 the current language name Typography inside the trigger\n * __dropdown \u2013 absolute-positioned dropdown listbox\n * __item \u2013 each selectable language row\n * __item--active \u2013 the currently selected language\n */\nconst LANGUAGE_SWITCHER_CSS: string = `\n/* ============================================================\n LanguageSwitcher\n ============================================================ */\n\n/* Override Card's default padding so the trigger fills the surface */\n.asgardeo-language-switcher.asgardeo-card {\n padding: 0;\n position: relative;\n display: inline-block;\n}\n\n/* Trigger ---------------------------------------------------- */\n\n.asgardeo-language-switcher__trigger {\n display: inline-flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n color: var(--asgardeo-color-text-primary);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n transition: background-color var(--asgardeo-transition-fast);\n white-space: nowrap;\n box-sizing: border-box;\n}\n\n.asgardeo-language-switcher__trigger:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-language-switcher__trigger:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n}\n\n.asgardeo-language-switcher__trigger-label {\n flex: 0 0 auto;\n}\n\n/* Dropdown --------------------------------------------------- */\n\n.asgardeo-language-switcher__dropdown {\n position: absolute;\n top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.5));\n right: 0;\n z-index: 1000;\n background-color: var(--asgardeo-color-background-surface);\n border: 1px solid var(--asgardeo-color-border);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n box-shadow: var(--asgardeo-dropdown-shadow);\n overflow: hidden;\n min-width: 130px;\n display: flex;\n flex-direction: column;\n padding: calc(var(--asgardeo-spacing-unit) * 0.5) 0;\n}\n\n/* Items ----------------------------------------------------- */\n\n.asgardeo-language-switcher__item {\n display: flex;\n align-items: center;\n width: 100%;\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n color: var(--asgardeo-color-text-primary);\n transition: background-color var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-language-switcher__item:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-language-switcher__item--active {\n background-color: var(--asgardeo-color-action-selected);\n color: var(--asgardeo-color-primary-main);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n\n.asgardeo-language-switcher__item--active:hover {\n background-color: var(--asgardeo-color-action-focus);\n}\n`;\n\nexport default LANGUAGE_SWITCHER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the OrganizationList presentation component.\n *\n * BEM block: `.asgardeo-organization-list`\n *\n * The root element is a plain `div`. There is no Card wrapper here,\n * so this file provides the full layout including border and spacing.\n *\n * Elements:\n * __loading \u2013 loading state container (centred Spinner)\n * __empty \u2013 empty state message (Typography body2)\n * __item \u2013 each selectable organization row button\n */\nconst ORGANIZATION_LIST_CSS: string = `\n/* ============================================================\n OrganizationList\n ============================================================ */\n\n.asgardeo-organization-list {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n/* Loading / Empty ------------------------------------------- */\n\n.asgardeo-organization-list__loading,\n.asgardeo-organization-list__empty {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 3);\n color: var(--asgardeo-color-text-secondary);\n}\n\n/* Items ----------------------------------------------------- */\n\n.asgardeo-organization-list__item {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 1.25);\n width: 100%;\n padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 1.5);\n background: var(--asgardeo-color-background-surface);\n border: 1px solid var(--asgardeo-color-border);\n border-radius: var(--asgardeo-border-radius-small);\n cursor: pointer;\n text-align: left;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n color: var(--asgardeo-color-text-primary);\n transition:\n background-color var(--asgardeo-transition-fast),\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-organization-list__item:hover {\n background-color: var(--asgardeo-color-primary-light);\n border-color: var(--asgardeo-color-primary-main);\n}\n\n.asgardeo-organization-list__item:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n`;\n\nexport default ORGANIZATION_LIST_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the OrganizationProfile presentation component.\n *\n * BEM block: `.asgardeo-organization-profile`\n */\nconst ORGANIZATION_PROFILE_CSS: string = `\n/* ============================================================\n OrganizationProfile\n ============================================================ */\n\n.asgardeo-organization-profile {\n display: flex;\n flex-direction: column;\n min-width: 320px;\n padding: 0;\n overflow: hidden;\n}\n\n/* Header: title + divider ------------------------------------ */\n\n.asgardeo-organization-profile__header {\n padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2.5);\n padding-bottom: calc(var(--asgardeo-spacing-unit) * 1.5);\n}\n\n.asgardeo-organization-profile__title {\n margin: 0;\n}\n\n.asgardeo-organization-profile__header-divider {\n margin: 0;\n}\n\n/* Identity: avatar + org name + handle ----------------------- */\n\n.asgardeo-organization-profile__identity {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: calc(var(--asgardeo-spacing-unit) * 2) 0 calc(var(--asgardeo-spacing-unit) * 1.5);\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n}\n\n.asgardeo-organization-profile__avatar {\n width: var(--asgardeo-avatar-size);\n height: var(--asgardeo-avatar-size);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-bottom: calc(var(--asgardeo-spacing-unit) * 0.375);\n}\n\n.asgardeo-organization-profile__avatar-initials {\n color: #ffffff;\n font-size: var(--asgardeo-avatar-fontSize);\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.02em;\n pointer-events: none;\n user-select: none;\n}\n\n.asgardeo-organization-profile__org-name {\n margin: 0;\n text-align: center;\n}\n\n.asgardeo-organization-profile__org-handle {\n color: var(--asgardeo-color-text-secondary);\n text-align: center;\n}\n\n.asgardeo-organization-profile__identity-divider {\n margin: 0;\n}\n\n/* Fields ---------------------------------------------------- */\n\n.asgardeo-organization-profile__fields {\n display: flex;\n flex-direction: column;\n}\n\n.asgardeo-organization-profile__field {\n display: grid;\n grid-template-columns: 36% 64%;\n align-items: center;\n padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 2.5);\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n box-sizing: border-box;\n transition: background-color var(--asgardeo-transition-fast);\n}\n\n.asgardeo-organization-profile__field:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-organization-profile__field + .asgardeo-organization-profile__field {\n border-top: 1px solid var(--asgardeo-color-border);\n}\n\n.asgardeo-organization-profile__field-label-col {\n /* label column */\n}\n\n.asgardeo-organization-profile__field-label {\n color: var(--asgardeo-color-text-secondary);\n font-size: var(--asgardeo-typography-fontSize-sm);\n}\n\n.asgardeo-organization-profile__field-value-col {\n /* value column */\n}\n\n.asgardeo-organization-profile__field-display {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n min-height: 1.5rem;\n}\n\n.asgardeo-organization-profile__field-value {\n color: var(--asgardeo-color-text-primary);\n word-break: break-word;\n flex: 1;\n font-size: var(--asgardeo-typography-fontSize-sm);\n}\n\n.asgardeo-organization-profile__field-value--id {\n font-size: calc(var(--asgardeo-typography-fontSize-sm) * 0.9);\n color: var(--asgardeo-color-text-secondary);\n font-family: monospace;\n word-break: break-all;\n}\n\n.asgardeo-organization-profile__field-placeholder {\n color: var(--asgardeo-color-primary-main);\n font-style: italic;\n font-size: var(--asgardeo-typography-fontSize-sm);\n flex: 1;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-style: dotted;\n text-underline-offset: 2px;\n}\n\n/* Edit button (pencil icon) --------------------------------- */\n\n.asgardeo-organization-profile__field-edit-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--asgardeo-color-text-secondary);\n flex-shrink: 0;\n padding: calc(var(--asgardeo-spacing-unit) * 0.375);\n border-radius: var(--asgardeo-border-radius-small);\n transition:\n color var(--asgardeo-transition-fast),\n background-color var(--asgardeo-transition-fast),\n opacity var(--asgardeo-transition-fast);\n opacity: 0;\n line-height: 0;\n}\n\n.asgardeo-organization-profile__field:hover .asgardeo-organization-profile__field-edit-btn {\n opacity: 1;\n}\n\n.asgardeo-organization-profile__field-edit-btn:hover {\n color: var(--asgardeo-color-primary-main);\n background-color: var(--asgardeo-color-primary-light);\n}\n\n.asgardeo-organization-profile__field-edit-btn:focus-visible {\n opacity: 1;\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n\n/* Edit mode ------------------------------------------------- */\n\n.asgardeo-organization-profile__field-edit {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n\n.asgardeo-organization-profile__field-edit-actions {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n`;\n\nexport default ORGANIZATION_PROFILE_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the OrganizationSwitcher presentation component.\n *\n * BEM block: `.asgardeo-organization-switcher`\n *\n * The root element is a Card (`.asgardeo-card`), so we override its\n * default padding to let the trigger button fill the surface edge-to-edge,\n * and apply `position: relative` to anchor the absolute dropdown.\n *\n * Modifiers: (none \u2014 state is controlled via isOpen in component logic)\n *\n * Elements:\n * __trigger \u2013 the clickable trigger button showing current org\n * __trigger-label \u2013 the org name Typography inside the trigger\n * __dropdown \u2013 the absolute-positioned dropdown listbox\n * __loading \u2013 loading state container (Spinner)\n * __empty \u2013 empty state message (Typography)\n * __item \u2013 each selectable organization row\n * __item--active \u2013 currently selected organization\n */\nconst ORGANIZATION_SWITCHER_CSS: string = `\n/* ============================================================\n OrganizationSwitcher\n ============================================================ */\n\n/* Override Card's default padding so the trigger button fills the surface */\n.asgardeo-organization-switcher.asgardeo-card {\n padding: 0;\n position: relative;\n display: inline-block;\n min-width: 180px;\n}\n\n/* Trigger ---------------------------------------------------- */\n\n.asgardeo-organization-switcher__trigger {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n width: 100%;\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n border-radius: var(--asgardeo-dropdown-borderRadius);\n color: var(--asgardeo-color-text-primary);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n transition: background-color var(--asgardeo-transition-fast);\n text-align: left;\n box-sizing: border-box;\n}\n\n.asgardeo-organization-switcher__trigger:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-organization-switcher__trigger:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n}\n\n.asgardeo-organization-switcher__trigger-label {\n flex: 1;\n text-align: left;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n/* Dropdown --------------------------------------------------- */\n\n.asgardeo-organization-switcher__dropdown {\n position: absolute;\n top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.5));\n left: 0;\n right: 0;\n z-index: 1000;\n background-color: var(--asgardeo-color-background-surface);\n border: 1px solid var(--asgardeo-color-border);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n box-shadow: var(--asgardeo-dropdown-shadow);\n overflow: hidden;\n min-width: 160px;\n display: flex;\n flex-direction: column;\n padding: calc(var(--asgardeo-spacing-unit) * 0.5) 0;\n}\n\n/* Loading / Empty states ------------------------------------ */\n\n.asgardeo-organization-switcher__loading,\n.asgardeo-organization-switcher__empty {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 2);\n color: var(--asgardeo-color-text-secondary);\n}\n\n/* Items ----------------------------------------------------- */\n\n.asgardeo-organization-switcher__item {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n width: 100%;\n padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-md);\n color: var(--asgardeo-color-text-primary);\n transition: background-color var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-organization-switcher__item:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-organization-switcher__item--active {\n background-color: var(--asgardeo-color-action-selected);\n color: var(--asgardeo-color-primary-main);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n\n.asgardeo-organization-switcher__item--active:hover {\n background-color: var(--asgardeo-color-action-focus);\n}\n`;\n\nexport default ORGANIZATION_SWITCHER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the UserDropdown presentation component.\n *\n * BEM block: `.asgardeo-user-dropdown`\n *\n * Trigger modifiers:\n * __trigger--open \u2013 ring + border while menu is visible\n * __avatar--sm / --lg \u2013 trigger avatar size variants (default is 32 px)\n *\n * Menu modifiers:\n * __menu--align-left \u2013 panel opens to the left of the trigger\n * __menu--size-sm \u2013 compact menu (180 px min-width, tighter padding)\n * __menu--size-lg \u2013 spacious menu (280 px min-width, more padding)\n *\n * Item modifiers:\n * __item--danger \u2013 destructive action (red text/hover)\n *\n * Elements:\n * __chevron \u2013 rotates 180\u00B0 when menu is open\n * __menu-header \u2013 user identity section at top of menu\n * __menu-header-avatar \u2013 gradient avatar circle in header\n * __menu-header-info \u2013 name + subtitle column\n * __menu-header-name \u2013 bold display name\n * __menu-header-subtitle \u2013 muted email / username\n * __menu-divider \u2013 thin horizontal separator\n */\nconst USER_DROPDOWN_CSS: string = `\n/* ============================================================\n UserDropdown\n ============================================================ */\n\n.asgardeo-user-dropdown {\n position: relative;\n display: inline-block;\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n/* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__trigger {\n display: inline-flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n padding: 3px;\n background: none;\n border: 2px solid transparent;\n border-radius: var(--asgardeo-border-radius-full);\n cursor: pointer;\n color: var(--asgardeo-color-text-primary);\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n box-sizing: border-box;\n outline: none;\n}\n\n.asgardeo-user-dropdown__trigger:hover {\n border-color: var(--asgardeo-color-primary-main);\n}\n\n.asgardeo-user-dropdown__trigger--open {\n border-color: var(--asgardeo-color-primary-main);\n box-shadow: 0 0 0 3px var(--asgardeo-focus-ring-color);\n}\n\n.asgardeo-user-dropdown__trigger:focus-visible {\n border-color: var(--asgardeo-color-primary-main);\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n\n/* \u2500\u2500 Trigger avatar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__avatar {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n color: #ffffff;\n flex-shrink: 0;\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n line-height: 1;\n user-select: none;\n pointer-events: none;\n}\n\n/* sm \u2014 28 px */\n.asgardeo-user-dropdown__avatar--sm {\n width: 28px;\n height: 28px;\n font-size: var(--asgardeo-typography-fontSize-xs);\n}\n\n/* lg \u2014 38 px */\n.asgardeo-user-dropdown__avatar--lg {\n width: 38px;\n height: 38px;\n font-size: var(--asgardeo-typography-fontSize-md);\n}\n\n/* \u2500\u2500 Chevron \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__chevron {\n display: inline-flex;\n align-items: center;\n color: var(--asgardeo-color-text-secondary);\n transition: transform var(--asgardeo-transition-normal);\n padding-right: calc(var(--asgardeo-spacing-unit) * 0.25);\n}\n\n.asgardeo-user-dropdown__trigger--open .asgardeo-user-dropdown__chevron {\n transform: rotate(180deg);\n}\n\n/* \u2500\u2500 Dropdown menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__menu {\n position: absolute;\n top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.75));\n right: 0;\n z-index: 1000;\n background-color: var(--asgardeo-color-background-surface);\n border: 1px solid var(--asgardeo-color-border);\n border-radius: var(--asgardeo-dropdown-borderRadius);\n box-shadow: var(--asgardeo-dropdown-shadow);\n overflow: hidden;\n min-width: 220px;\n display: flex;\n flex-direction: column;\n animation: asgardeo-dropdown-enter var(--asgardeo-transition-fast) ease;\n}\n\n/* Alignment */\n\n.asgardeo-user-dropdown__menu--align-left {\n right: auto;\n left: 0;\n}\n\n/* Size: sm */\n\n.asgardeo-user-dropdown__menu--size-sm {\n min-width: 180px;\n}\n\n.asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__menu-header {\n padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 1.5);\n gap: calc(var(--asgardeo-spacing-unit) * 1);\n}\n\n.asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__menu-header-avatar {\n width: 30px;\n height: 30px;\n font-size: var(--asgardeo-typography-fontSize-sm);\n}\n\n.asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__item {\n padding: calc(var(--asgardeo-spacing-unit) * 0.75) calc(var(--asgardeo-spacing-unit) * 1.5);\n font-size: var(--asgardeo-typography-fontSize-xs);\n}\n\n/* Size: lg */\n\n.asgardeo-user-dropdown__menu--size-lg {\n min-width: 280px;\n}\n\n.asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__menu-header {\n padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2);\n gap: calc(var(--asgardeo-spacing-unit) * 1.5);\n}\n\n.asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__menu-header-avatar {\n width: 42px;\n height: 42px;\n font-size: var(--asgardeo-typography-fontSize-lg);\n}\n\n.asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__item {\n padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 2);\n font-size: var(--asgardeo-typography-fontSize-md);\n}\n\n@keyframes asgardeo-dropdown-enter {\n from {\n opacity: 0;\n transform: translateY(-6px) scale(0.97);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n/* \u2500\u2500 Menu header (user identity) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__menu-header {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 1.25);\n padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 1.75);\n}\n\n.asgardeo-user-dropdown__menu-header-avatar {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border-radius: 50%;\n color: #ffffff;\n flex-shrink: 0;\n font-size: var(--asgardeo-typography-fontSize-md);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n line-height: 1;\n user-select: none;\n}\n\n.asgardeo-user-dropdown__menu-header-info {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.asgardeo-user-dropdown__menu-header-name {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n color: var(--asgardeo-color-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: var(--asgardeo-typography-lineHeight-tight);\n}\n\n.asgardeo-user-dropdown__menu-header-subtitle {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n/* \u2500\u2500 Menu divider \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__menu-divider {\n height: 1px;\n background-color: var(--asgardeo-color-border);\n margin: calc(var(--asgardeo-spacing-unit) * 0.5) 0;\n flex-shrink: 0;\n}\n\n/* \u2500\u2500 Menu items \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__item {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 1);\n width: 100%;\n padding: calc(var(--asgardeo-spacing-unit) * 1) calc(var(--asgardeo-spacing-unit) * 1.75);\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-sm);\n color: var(--asgardeo-color-text-primary);\n transition: background-color var(--asgardeo-transition-fast);\n box-sizing: border-box;\n}\n\n.asgardeo-user-dropdown__item:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-user-dropdown__item:focus-visible {\n outline: none;\n background-color: var(--asgardeo-color-action-focus);\n}\n\n/* Danger variant (sign-out) */\n\n.asgardeo-user-dropdown__item--danger {\n color: var(--asgardeo-color-error-main);\n}\n\n.asgardeo-user-dropdown__item--danger:hover {\n background-color: var(--asgardeo-color-error-light);\n}\n\n/* \u2500\u2500 Modal overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__modal-overlay {\n position: fixed;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.45);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n backdrop-filter: blur(3px);\n animation: asgardeo-overlay-enter var(--asgardeo-transition-fast) ease;\n}\n\n@keyframes asgardeo-overlay-enter {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* \u2500\u2500 Modal content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__modal-content {\n background: var(--asgardeo-color-background-surface);\n border-radius: var(--asgardeo-border-radius-large);\n box-shadow: var(--asgardeo-shadow-large);\n max-width: 480px;\n width: 92%;\n max-height: 90vh;\n overflow-y: auto;\n position: relative;\n animation: asgardeo-modal-enter var(--asgardeo-transition-normal) ease;\n}\n\n@keyframes asgardeo-modal-enter {\n from {\n opacity: 0;\n transform: translateY(12px) scale(0.97);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n/* \u2500\u2500 Modal close button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-dropdown__modal-close {\n position: absolute;\n top: calc(var(--asgardeo-spacing-unit) * 1.25);\n right: calc(var(--asgardeo-spacing-unit) * 1.25);\n background: none;\n border: none;\n cursor: pointer;\n color: var(--asgardeo-color-text-secondary);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 0.625);\n border-radius: var(--asgardeo-border-radius-small);\n z-index: 10001;\n transition:\n color var(--asgardeo-transition-fast),\n background-color var(--asgardeo-transition-fast);\n line-height: 0;\n}\n\n.asgardeo-user-dropdown__modal-close:hover {\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-user-dropdown__modal-close:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n`;\n\nexport default USER_DROPDOWN_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the UserProfile presentation component.\n *\n * BEM block: `.asgardeo-user-profile`\n *\n * Modifiers:\n * --compact \u2013 reduced field padding for modal / dropdown embedding\n *\n * New elements in this version:\n * __hero \u2013 avatar + name + subtitle banner\n * __avatar--sm/md/lg \u2013 avatar size variants\n * __hero-name \u2013 prominent display name\n * __hero-subtitle \u2013 secondary line (email / username)\n */\nconst USER_PROFILE_CSS: string = `\n/* ============================================================\n UserProfile (modern redesign)\n ============================================================ */\n\n.asgardeo-user-profile {\n display: flex;\n flex-direction: column;\n min-width: 320px;\n overflow: hidden;\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-profile__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2.5)\n calc(var(--asgardeo-spacing-unit) * 1.75);\n}\n\n.asgardeo-user-profile__title {\n margin: 0;\n font-size: var(--asgardeo-typography-fontSize-md);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n color: var(--asgardeo-color-text-primary);\n letter-spacing: var(--asgardeo-typography-letterSpacing-tight);\n}\n\n.asgardeo-user-profile__header-divider {\n margin: 0;\n}\n\n/* \u2500\u2500 Hero (avatar + name + subtitle) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-profile__hero {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: calc(var(--asgardeo-spacing-unit) * 3) calc(var(--asgardeo-spacing-unit) * 2.5)\n calc(var(--asgardeo-spacing-unit) * 2);\n gap: calc(var(--asgardeo-spacing-unit) * 1.25);\n background: linear-gradient(\n 180deg,\n var(--asgardeo-color-primary-light) 0%,\n var(--asgardeo-color-background-surface) 100%\n );\n border-bottom: 1px solid var(--asgardeo-color-border);\n}\n\n.asgardeo-user-profile__avatar-wrapper {\n position: relative;\n border-radius: 50%;\n padding: 3px;\n background: linear-gradient(\n 135deg,\n var(--asgardeo-color-primary-main),\n var(--asgardeo-color-primary-dark)\n );\n box-shadow: 0 4px 14px rgba(75, 110, 245, 0.28);\n}\n\n.asgardeo-user-profile__avatar {\n width: var(--asgardeo-avatar-size, 72px);\n height: var(--asgardeo-avatar-size, 72px);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border: 2px solid var(--asgardeo-color-background-surface);\n}\n\n/* Avatar size variants */\n\n.asgardeo-user-profile__avatar--sm {\n width: 48px;\n height: 48px;\n}\n\n.asgardeo-user-profile__avatar--sm .asgardeo-user-profile__avatar-initials {\n font-size: 1rem;\n}\n\n.asgardeo-user-profile__avatar--md {\n width: 64px;\n height: 64px;\n}\n\n.asgardeo-user-profile__avatar--md .asgardeo-user-profile__avatar-initials {\n font-size: 1.25rem;\n}\n\n.asgardeo-user-profile__avatar--lg {\n width: 80px;\n height: 80px;\n}\n\n.asgardeo-user-profile__avatar--lg .asgardeo-user-profile__avatar-initials {\n font-size: 1.625rem;\n}\n\n.asgardeo-user-profile__avatar-initials {\n color: #ffffff;\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n line-height: 1;\n letter-spacing: 0.02em;\n pointer-events: none;\n user-select: none;\n}\n\n.asgardeo-user-profile__hero-info {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.375);\n text-align: center;\n}\n\n.asgardeo-user-profile__hero-name {\n font-size: var(--asgardeo-typography-fontSize-lg);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n color: var(--asgardeo-color-text-primary);\n line-height: var(--asgardeo-typography-lineHeight-tight);\n letter-spacing: var(--asgardeo-typography-letterSpacing-tight);\n}\n\n.asgardeo-user-profile__hero-subtitle {\n font-size: var(--asgardeo-typography-fontSize-sm);\n color: var(--asgardeo-color-text-secondary);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n/* \u2500\u2500 Alerts & loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-profile__error {\n margin: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5)\n calc(var(--asgardeo-spacing-unit) * 0.5);\n}\n\n.asgardeo-user-profile__loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--asgardeo-spacing-unit) * 3.5) 0;\n}\n\n/* \u2500\u2500 Fields \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-profile__fields {\n display: flex;\n flex-direction: column;\n}\n\n.asgardeo-user-profile__field {\n display: grid;\n grid-template-columns: 38% 62%;\n align-items: start;\n padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5);\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n box-sizing: border-box;\n transition: background-color var(--asgardeo-transition-fast);\n}\n\n.asgardeo-user-profile__field:hover {\n background-color: var(--asgardeo-color-action-hover);\n}\n\n.asgardeo-user-profile__field + .asgardeo-user-profile__field {\n border-top: 1px solid var(--asgardeo-color-border);\n}\n\n.asgardeo-user-profile__field-label {\n color: var(--asgardeo-color-text-secondary);\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n padding-top: 2px;\n}\n\n.asgardeo-user-profile__field-display {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n min-height: 1.5rem;\n}\n\n.asgardeo-user-profile__field-value {\n color: var(--asgardeo-color-text-primary);\n word-break: break-word;\n flex: 1;\n font-size: var(--asgardeo-typography-fontSize-sm);\n}\n\n.asgardeo-user-profile__field-placeholder {\n color: var(--asgardeo-color-primary-main);\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-style: italic;\n flex: 1;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-style: dotted;\n text-underline-offset: 2px;\n opacity: 0.8;\n transition: opacity var(--asgardeo-transition-fast);\n}\n\n.asgardeo-user-profile__field-placeholder:hover {\n opacity: 1;\n}\n\n/* \u2500\u2500 Edit button (pencil) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-profile__field-edit-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--asgardeo-color-text-secondary);\n flex-shrink: 0;\n padding: calc(var(--asgardeo-spacing-unit) * 0.375);\n border-radius: var(--asgardeo-border-radius-small);\n transition:\n color var(--asgardeo-transition-fast),\n background-color var(--asgardeo-transition-fast),\n opacity var(--asgardeo-transition-fast);\n opacity: 0;\n line-height: 0;\n}\n\n.asgardeo-user-profile__field:hover .asgardeo-user-profile__field-edit-btn {\n opacity: 1;\n}\n\n.asgardeo-user-profile__field-edit-btn:hover {\n color: var(--asgardeo-color-primary-main);\n background-color: var(--asgardeo-color-primary-light);\n}\n\n.asgardeo-user-profile__field-edit-btn:focus-visible {\n opacity: 1;\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n\n/* \u2500\u2500 Edit mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-profile__field-edit {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n padding: calc(var(--asgardeo-spacing-unit) * 0.25) 0;\n}\n\n.asgardeo-user-profile__field-edit-actions {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n\n/* \u2500\u2500 Footer slot \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-profile__footer {\n padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5);\n border-top: 1px solid var(--asgardeo-color-border);\n}\n\n/* \u2500\u2500 Compact modifier \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.asgardeo-user-profile--compact .asgardeo-user-profile__hero {\n padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2);\n}\n\n.asgardeo-user-profile--compact .asgardeo-user-profile__avatar--lg {\n width: 56px;\n height: 56px;\n}\n\n.asgardeo-user-profile--compact .asgardeo-user-profile__avatar--lg .asgardeo-user-profile__avatar-initials {\n font-size: 1.125rem;\n}\n\n.asgardeo-user-profile--compact .asgardeo-user-profile__field {\n padding: calc(var(--asgardeo-spacing-unit) * 1) calc(var(--asgardeo-spacing-unit) * 2);\n}\n\n.asgardeo-user-profile--compact .asgardeo-user-profile__hero-name {\n font-size: var(--asgardeo-typography-fontSize-md);\n}\n`;\n\nexport default USER_PROFILE_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Alert primitive component.\n *\n * BEM block: `.asgardeo-alert`\n *\n * Modifiers:\n * Severity: --info | --success | --warning | --error\n *\n * Elements:\n * __content | __dismiss\n */\nconst ALERT_CSS: string = `\n/* ============================================================\n Alert\n ============================================================ */\n\n.asgardeo-alert {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: calc(var(--asgardeo-spacing-unit) * 1);\n padding: var(--asgardeo-alert-paddingY) var(--asgardeo-alert-paddingX);\n border-radius: var(--asgardeo-alert-borderRadius);\n border: 1px solid transparent;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-sm);\n box-sizing: border-box;\n width: 100%;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-alert__content {\n flex: 1;\n}\n\n.asgardeo-alert--info {\n background-color: var(--asgardeo-color-info-light);\n border-color: var(--asgardeo-color-info-main);\n color: var(--asgardeo-color-info-contrastText);\n}\n\n.asgardeo-alert--success {\n background-color: var(--asgardeo-color-success-light);\n border-color: var(--asgardeo-color-success-main);\n color: var(--asgardeo-color-success-contrastText);\n}\n\n.asgardeo-alert--warning {\n background-color: var(--asgardeo-color-warning-light);\n border-color: var(--asgardeo-color-warning-main);\n color: var(--asgardeo-color-warning-contrastText);\n}\n\n.asgardeo-alert--error {\n background-color: var(--asgardeo-color-error-light);\n border-color: var(--asgardeo-color-error-main);\n color: var(--asgardeo-color-error-contrastText);\n}\n\n.asgardeo-alert__dismiss {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 1em;\n line-height: 0;\n padding: calc(var(--asgardeo-spacing-unit) * 0.25);\n border-radius: var(--asgardeo-border-radius-xs);\n color: inherit;\n opacity: 0.6;\n flex-shrink: 0;\n transition: opacity var(--asgardeo-transition-fast), background-color var(--asgardeo-transition-fast);\n}\n.asgardeo-alert__dismiss:hover {\n opacity: 1;\n background-color: var(--asgardeo-color-action-hover);\n}\n`;\n\nexport default ALERT_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Button primitive component.\n *\n * BEM block: `.asgardeo-button`\n *\n * Modifiers:\n * Variant: --solid | --outline | --ghost | --text\n * Color: --primary | --secondary | --danger\n * Size: --small | --medium | --large\n * State: --full-width | --loading\n *\n * Elements:\n * __start-icon | __end-icon | __content | __spinner\n *\n * Note: The `asgardeo-spin` keyframe animation is defined in\n * `styles/animations.css.ts` and shared with the Spinner component.\n */\nconst BUTTON_CSS: string = `\n/* ============================================================\n Button\n ============================================================ */\n\n.asgardeo-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n border-radius: var(--asgardeo-button-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-weight: var(--asgardeo-button-fontWeight);\n letter-spacing: var(--asgardeo-typography-letterSpacing-normal);\n cursor: pointer;\n outline: none;\n text-decoration: none;\n white-space: nowrap;\n border-width: 1px;\n border-style: solid;\n box-sizing: border-box;\n transition:\n background-color var(--asgardeo-transition-fast),\n color var(--asgardeo-transition-fast),\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast),\n opacity var(--asgardeo-transition-fast),\n transform var(--asgardeo-transition-fast);\n position: relative;\n vertical-align: middle;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n user-select: none;\n}\n\n.asgardeo-button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n\n/* -- Sizes -- */\n\n.asgardeo-button--small {\n padding: 0 var(--asgardeo-button-sm-paddingX);\n font-size: var(--asgardeo-button-sm-fontSize);\n height: var(--asgardeo-button-sm-height);\n}\n\n.asgardeo-button--medium {\n padding: 0 var(--asgardeo-button-md-paddingX);\n font-size: var(--asgardeo-button-md-fontSize);\n height: var(--asgardeo-button-md-height);\n}\n\n.asgardeo-button--large {\n padding: 0 var(--asgardeo-button-lg-paddingX);\n font-size: var(--asgardeo-button-lg-fontSize);\n height: var(--asgardeo-button-lg-height);\n}\n\n/* -- Modifiers -- */\n\n.asgardeo-button--full-width {\n width: 100%;\n}\n\n.asgardeo-button--loading,\n.asgardeo-button:disabled {\n cursor: not-allowed;\n opacity: 0.55;\n pointer-events: none;\n}\n\n/* -- Solid variants -- */\n\n.asgardeo-button--solid.asgardeo-button--primary {\n background-color: var(--asgardeo-color-primary-main);\n color: var(--asgardeo-color-primary-contrastText);\n border-color: var(--asgardeo-color-primary-main);\n}\n.asgardeo-button--solid.asgardeo-button--primary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-primary-dark);\n border-color: var(--asgardeo-color-primary-dark);\n}\n.asgardeo-button--solid.asgardeo-button--primary:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n.asgardeo-button--solid.asgardeo-button--secondary {\n background-color: var(--asgardeo-color-secondary-light);\n color: var(--asgardeo-color-secondary-main);\n border-color: var(--asgardeo-color-border);\n}\n.asgardeo-button--solid.asgardeo-button--secondary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-border);\n border-color: var(--asgardeo-color-border);\n}\n.asgardeo-button--solid.asgardeo-button--secondary:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n.asgardeo-button--solid.asgardeo-button--danger {\n background-color: var(--asgardeo-color-error-main);\n color: #ffffff;\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-button--solid.asgardeo-button--danger:hover:not(:disabled) {\n filter: brightness(0.92);\n}\n.asgardeo-button--solid.asgardeo-button--danger:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n/* -- Outline variants -- */\n\n.asgardeo-button--outline.asgardeo-button--primary {\n background-color: transparent;\n color: var(--asgardeo-color-primary-main);\n border-color: var(--asgardeo-color-primary-main);\n}\n.asgardeo-button--outline.asgardeo-button--primary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-primary-light);\n}\n.asgardeo-button--outline.asgardeo-button--primary:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n.asgardeo-button--outline.asgardeo-button--secondary {\n background-color: transparent;\n color: var(--asgardeo-color-secondary-main);\n border-color: var(--asgardeo-color-border);\n}\n.asgardeo-button--outline.asgardeo-button--secondary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-secondary-light);\n border-color: var(--asgardeo-color-secondary-main);\n}\n.asgardeo-button--outline.asgardeo-button--secondary:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n.asgardeo-button--outline.asgardeo-button--danger {\n background-color: transparent;\n color: var(--asgardeo-color-error-main);\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-button--outline.asgardeo-button--danger:hover:not(:disabled) {\n background-color: var(--asgardeo-color-error-light);\n}\n.asgardeo-button--outline.asgardeo-button--danger:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n/* -- Ghost variants -- */\n\n.asgardeo-button--ghost.asgardeo-button--primary {\n background-color: transparent;\n color: var(--asgardeo-color-primary-main);\n border-color: transparent;\n}\n.asgardeo-button--ghost.asgardeo-button--primary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-primary-light);\n border-color: transparent;\n}\n\n.asgardeo-button--ghost.asgardeo-button--secondary {\n background-color: transparent;\n color: var(--asgardeo-color-secondary-main);\n border-color: transparent;\n}\n.asgardeo-button--ghost.asgardeo-button--secondary:hover:not(:disabled) {\n background-color: var(--asgardeo-color-action-hover);\n border-color: transparent;\n}\n\n.asgardeo-button--ghost.asgardeo-button--danger {\n background-color: transparent;\n color: var(--asgardeo-color-error-main);\n border-color: transparent;\n}\n.asgardeo-button--ghost.asgardeo-button--danger:hover:not(:disabled) {\n background-color: var(--asgardeo-color-error-light);\n border-color: transparent;\n}\n\n/* -- Text variants -- */\n\n.asgardeo-button--text {\n border-color: transparent;\n background-color: transparent;\n padding-left: calc(var(--asgardeo-spacing-unit) * 0.25);\n padding-right: calc(var(--asgardeo-spacing-unit) * 0.25);\n}\n\n.asgardeo-button--text.asgardeo-button--primary {\n color: var(--asgardeo-color-primary-main);\n}\n.asgardeo-button--text.asgardeo-button--primary:hover:not(:disabled) {\n color: var(--asgardeo-color-primary-dark);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n.asgardeo-button--text.asgardeo-button--secondary {\n color: var(--asgardeo-color-secondary-main);\n}\n.asgardeo-button--text.asgardeo-button--secondary:hover:not(:disabled) {\n color: var(--asgardeo-color-text-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n.asgardeo-button--text.asgardeo-button--danger {\n color: var(--asgardeo-color-error-main);\n}\n.asgardeo-button--text.asgardeo-button--danger:hover:not(:disabled) {\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n/* -- Inner elements -- */\n\n.asgardeo-button__start-icon,\n.asgardeo-button__end-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n line-height: 0;\n}\n.asgardeo-button--small .asgardeo-button__start-icon svg,\n.asgardeo-button--small .asgardeo-button__end-icon svg {\n width: 14px;\n height: 14px;\n}\n\n.asgardeo-button__content {\n display: inline-flex;\n align-items: center;\n}\n\n.asgardeo-button__spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: asgardeo-spin 0.6s linear infinite;\n margin-left: calc(var(--asgardeo-spacing-unit) * 0.5);\n}\n`;\n\nexport default BUTTON_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Card primitive component.\n *\n * BEM block: `.asgardeo-card`\n *\n * Modifiers:\n * --elevated \u2013 medium drop shadow\n * --outlined \u2013 1px border, no shadow\n * --flat \u2013 neither shadow nor border (default)\n */\nconst CARD_CSS: string = `\n/* ============================================================\n Card\n ============================================================ */\n\n.asgardeo-card {\n background-color: var(--asgardeo-color-background-surface);\n border-radius: var(--asgardeo-card-borderRadius);\n padding: var(--asgardeo-card-padding);\n box-sizing: border-box;\n transition: box-shadow var(--asgardeo-transition-normal);\n}\n\n.asgardeo-card--elevated {\n box-shadow: var(--asgardeo-card-shadow);\n}\n\n.asgardeo-card--outlined {\n border: 1px solid var(--asgardeo-card-borderColor);\n}\n\n/* .asgardeo-card--flat: no shadow or border */\n`;\n\nexport default CARD_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Checkbox primitive component.\n *\n * BEM block: `.asgardeo-checkbox`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __wrapper | __input | __label | __error\n */\nconst CHECKBOX_CSS: string = `\n/* ============================================================\n Checkbox\n ============================================================ */\n\n.asgardeo-checkbox {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n.asgardeo-checkbox__wrapper {\n display: inline-flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n cursor: pointer;\n user-select: none;\n}\n\n.asgardeo-checkbox__input {\n width: var(--asgardeo-checkbox-size);\n height: var(--asgardeo-checkbox-size);\n cursor: pointer;\n accent-color: var(--asgardeo-color-primary-main);\n flex-shrink: 0;\n border-radius: var(--asgardeo-border-radius-xs);\n}\n.asgardeo-checkbox__input:focus-visible {\n outline: none;\n box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);\n}\n.asgardeo-checkbox__input:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.asgardeo-checkbox__label {\n font-size: var(--asgardeo-typography-fontSize-md);\n color: var(--asgardeo-color-text-primary);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-checkbox__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default CHECKBOX_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the DatePicker primitive component.\n *\n * BEM block: `.asgardeo-date-picker`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __label | __required | __input | __error\n */\nconst DATE_PICKER_CSS: string = `\n/* ============================================================\n DatePicker\n ============================================================ */\n\n.asgardeo-date-picker {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n width: 100%;\n box-sizing: border-box;\n}\n\n.asgardeo-date-picker__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-date-picker__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-date-picker__input {\n width: 100%;\n height: var(--asgardeo-input-height);\n padding: 0 var(--asgardeo-input-paddingX);\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-input-fontSize);\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-background-surface);\n box-sizing: border-box;\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n outline: none;\n cursor: pointer;\n}\n.asgardeo-date-picker__input:focus {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-date-picker--error .asgardeo-date-picker__input {\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-date-picker--error .asgardeo-date-picker__input:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);\n}\n.asgardeo-date-picker__input:disabled {\n background-color: var(--asgardeo-color-background-disabled);\n color: var(--asgardeo-color-action-disabled);\n cursor: not-allowed;\n}\n\n.asgardeo-date-picker__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default DATE_PICKER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Divider primitive component.\n *\n * BEM block: `.asgardeo-divider`\n *\n * Modifiers:\n * --horizontal \u2013 full-width horizontal rule\n * --vertical \u2013 inline vertical bar\n * --with-content \u2013 flex row with centred label between two lines\n *\n * Elements:\n * __line | __content\n */\nconst DIVIDER_CSS: string = `\n/* ============================================================\n Divider\n ============================================================ */\n\n.asgardeo-divider {\n box-sizing: border-box;\n}\n\n.asgardeo-divider--horizontal {\n width: 100%;\n border: none;\n border-top: 1px solid var(--asgardeo-color-border);\n margin: calc(var(--asgardeo-spacing-unit) * 1) 0;\n}\n\n.asgardeo-divider--vertical {\n display: inline-block;\n width: 1px;\n height: 100%;\n min-height: 1em;\n border: none;\n background-color: var(--asgardeo-color-border);\n margin: 0 calc(var(--asgardeo-spacing-unit) * 1);\n align-self: stretch;\n}\n\n.asgardeo-divider--with-content {\n display: flex;\n align-items: center;\n gap: calc(var(--asgardeo-spacing-unit) * 1);\n border: none;\n margin: calc(var(--asgardeo-spacing-unit) * 1) 0;\n}\n\n.asgardeo-divider__line {\n flex: 1;\n height: 1px;\n background-color: var(--asgardeo-color-border);\n}\n\n.asgardeo-divider__content {\n flex-shrink: 0;\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-text-secondary);\n padding: 0 calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n text-transform: uppercase;\n letter-spacing: var(--asgardeo-typography-letterSpacing-wide);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n`;\n\nexport default DIVIDER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Logo primitive component.\n *\n * BEM block: `.asgardeo-logo`\n *\n * Elements:\n * __image\n */\nconst LOGO_CSS: string = `\n/* ============================================================\n Logo\n ============================================================ */\n\n.asgardeo-logo {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n transition: opacity var(--asgardeo-transition-fast);\n}\n\n.asgardeo-logo:hover {\n opacity: 0.85;\n}\n\n.asgardeo-logo__image {\n display: block;\n max-height: 100%;\n width: auto;\n height: auto;\n object-fit: contain;\n}\n`;\n\nexport default LOGO_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the OtpField primitive component.\n *\n * BEM block: `.asgardeo-otp-field`\n *\n * Elements:\n * __label | __required | __inputs | __digit | __error\n */\nconst OTP_FIELD_CSS: string = `\n/* ============================================================\n OtpField\n ============================================================ */\n\n.asgardeo-otp-field {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n font-family: var(--asgardeo-typography-fontFamily);\n}\n\n.asgardeo-otp-field__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-otp-field__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-otp-field__inputs {\n display: flex;\n gap: calc(var(--asgardeo-spacing-unit) * 0.75);\n}\n\n.asgardeo-otp-field__digit {\n width: var(--asgardeo-input-height);\n height: var(--asgardeo-input-height);\n text-align: center;\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-typography-fontSize-lg);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-background-surface);\n box-sizing: border-box;\n outline: none;\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n}\n.asgardeo-otp-field__digit:focus {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-otp-field__digit:disabled {\n background-color: var(--asgardeo-color-background-disabled);\n color: var(--asgardeo-color-action-disabled);\n cursor: not-allowed;\n}\n\n.asgardeo-otp-field__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default OTP_FIELD_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the PasswordField primitive component.\n *\n * BEM block: `.asgardeo-password-field`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __label | __required | __wrapper | __input | __toggle | __error\n */\nconst PASSWORD_FIELD_CSS: string = `\n/* ============================================================\n PasswordField\n ============================================================ */\n\n.asgardeo-password-field {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n width: 100%;\n box-sizing: border-box;\n}\n\n.asgardeo-password-field__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-password-field__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-password-field__wrapper {\n display: flex;\n align-items: center;\n height: var(--asgardeo-input-height);\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n background-color: var(--asgardeo-color-background-surface);\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n overflow: hidden;\n box-sizing: border-box;\n}\n.asgardeo-password-field__wrapper:focus-within {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-password-field--error .asgardeo-password-field__wrapper {\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-password-field--error .asgardeo-password-field__wrapper:focus-within {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);\n}\n\n.asgardeo-password-field__input {\n flex: 1;\n padding: 0 var(--asgardeo-input-paddingX);\n border: none;\n outline: none;\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-input-fontSize);\n color: var(--asgardeo-color-text-primary);\n background: transparent;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n min-width: 0;\n}\n.asgardeo-password-field__input::placeholder {\n color: var(--asgardeo-color-text-secondary);\n}\n.asgardeo-password-field__input:disabled {\n cursor: not-allowed;\n}\n\n.asgardeo-password-field__toggle {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0 var(--asgardeo-input-paddingX);\n color: var(--asgardeo-color-text-secondary);\n font-size: var(--asgardeo-typography-fontSize-md);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n height: 100%;\n transition: color var(--asgardeo-transition-fast);\n}\n.asgardeo-password-field__toggle:hover {\n color: var(--asgardeo-color-text-primary);\n}\n\n.asgardeo-password-field__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default PASSWORD_FIELD_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Select primitive component.\n *\n * BEM block: `.asgardeo-select`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __label | __required | __input | __error | __helper\n */\nconst SELECT_CSS: string = `\n/* ============================================================\n Select\n ============================================================ */\n\n.asgardeo-select {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n width: 100%;\n box-sizing: border-box;\n}\n\n.asgardeo-select__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-select__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-select__input {\n width: 100%;\n height: var(--asgardeo-input-height);\n padding: 0 calc(var(--asgardeo-spacing-unit) * 4) 0 var(--asgardeo-input-paddingX);\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-input-fontSize);\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-background-surface);\n appearance: none;\n -webkit-appearance: none;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--asgardeo-input-paddingX) center;\n cursor: pointer;\n box-sizing: border-box;\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n outline: none;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n.asgardeo-select__input:focus {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-select__input:disabled {\n background-color: var(--asgardeo-color-background-disabled);\n color: var(--asgardeo-color-action-disabled);\n cursor: not-allowed;\n}\n\n.asgardeo-select--error .asgardeo-select__input {\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-select--error .asgardeo-select__input:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);\n}\n\n.asgardeo-select__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-select__helper {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-text-secondary);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default SELECT_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Spinner primitive component.\n *\n * BEM block: `.asgardeo-spinner`\n *\n * Modifiers:\n * Size: --small | --medium | --large\n *\n * Elements:\n * __svg | __circle\n *\n * Note: The `asgardeo-spin` and `asgardeo-spinner-dash` keyframe animations\n * are defined in `styles/animations.css.ts` and shared with the Button component.\n */\nconst SPINNER_CSS: string = `\n/* ============================================================\n Spinner\n ============================================================ */\n\n.asgardeo-spinner {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--asgardeo-color-primary-main);\n}\n\n.asgardeo-spinner--small {\n width: calc(var(--asgardeo-spacing-unit) * 2);\n height: calc(var(--asgardeo-spacing-unit) * 2);\n}\n\n.asgardeo-spinner--medium {\n width: calc(var(--asgardeo-spacing-unit) * 2.5);\n height: calc(var(--asgardeo-spacing-unit) * 2.5);\n}\n\n.asgardeo-spinner--large {\n width: calc(var(--asgardeo-spacing-unit) * 3.5);\n height: calc(var(--asgardeo-spacing-unit) * 3.5);\n}\n\n.asgardeo-spinner__svg {\n width: 100%;\n height: 100%;\n animation: asgardeo-spin 1.4s linear infinite;\n}\n\n.asgardeo-spinner__circle {\n stroke-dasharray: 80, 200;\n stroke-dashoffset: 0;\n animation: asgardeo-spinner-dash 1.4s ease-in-out infinite;\n}\n`;\n\nexport default SPINNER_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the TextField primitive component.\n *\n * BEM block: `.asgardeo-text-field`\n *\n * Modifiers:\n * --error \u2013 shows validation error state\n *\n * Elements:\n * __label | __required | __input | __error | __helper\n */\nconst TEXT_FIELD_CSS: string = `\n/* ============================================================\n TextField\n ============================================================ */\n\n.asgardeo-text-field {\n display: flex;\n flex-direction: column;\n gap: calc(var(--asgardeo-spacing-unit) * 0.5);\n font-family: var(--asgardeo-typography-fontFamily);\n width: 100%;\n box-sizing: border-box;\n}\n\n.asgardeo-text-field__label {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-primary);\n display: block;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-text-field__required {\n color: var(--asgardeo-color-error-main);\n margin-left: 2px;\n}\n\n.asgardeo-text-field__input {\n width: 100%;\n height: var(--asgardeo-input-height);\n padding: 0 var(--asgardeo-input-paddingX);\n border: 1px solid var(--asgardeo-input-borderColor);\n border-radius: var(--asgardeo-input-borderRadius);\n font-family: var(--asgardeo-typography-fontFamily);\n font-size: var(--asgardeo-input-fontSize);\n color: var(--asgardeo-color-text-primary);\n background-color: var(--asgardeo-color-background-surface);\n box-sizing: border-box;\n transition:\n border-color var(--asgardeo-transition-fast),\n box-shadow var(--asgardeo-transition-fast);\n outline: none;\n}\n.asgardeo-text-field__input:focus {\n border-color: var(--asgardeo-input-focusBorderColor);\n box-shadow: var(--asgardeo-input-focusRing);\n}\n.asgardeo-text-field__input::placeholder {\n color: var(--asgardeo-color-text-secondary);\n}\n.asgardeo-text-field__input:disabled {\n background-color: var(--asgardeo-color-background-disabled);\n color: var(--asgardeo-color-action-disabled);\n cursor: not-allowed;\n}\n\n.asgardeo-text-field--error .asgardeo-text-field__input {\n border-color: var(--asgardeo-color-error-main);\n}\n.asgardeo-text-field--error .asgardeo-text-field__input:focus {\n box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);\n}\n\n.asgardeo-text-field__error {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-error-contrastText);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n\n.asgardeo-text-field__helper {\n font-size: var(--asgardeo-typography-fontSize-xs);\n color: var(--asgardeo-color-text-secondary);\n line-height: var(--asgardeo-typography-lineHeight-normal);\n}\n`;\n\nexport default TEXT_FIELD_CSS;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Styles for the Typography primitive component.\n *\n * BEM block: `.asgardeo-typography`\n *\n * Modifiers (variant):\n * --h1 | --h2 | --h3 | --h4 | --h5 | --h6\n * --subtitle1 | --subtitle2\n * --body1 | --body2\n * --caption | --overline\n */\nconst TYPOGRAPHY_CSS: string = `\n/* ============================================================\n Typography\n ============================================================ */\n\n.asgardeo-typography {\n font-family: var(--asgardeo-typography-fontFamily);\n color: var(--asgardeo-color-text-primary);\n margin: 0;\n line-height: var(--asgardeo-typography-lineHeight-normal);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.asgardeo-typography--h1 {\n font-size: var(--asgardeo-typography-fontSize-3xl);\n font-weight: var(--asgardeo-typography-fontWeight-bold);\n line-height: var(--asgardeo-typography-lineHeight-tight);\n letter-spacing: var(--asgardeo-typography-letterSpacing-tight);\n}\n\n.asgardeo-typography--h2 {\n font-size: var(--asgardeo-typography-fontSize-2xl);\n font-weight: var(--asgardeo-typography-fontWeight-bold);\n line-height: var(--asgardeo-typography-lineHeight-tight);\n letter-spacing: var(--asgardeo-typography-letterSpacing-tight);\n}\n\n.asgardeo-typography--h3 {\n font-size: var(--asgardeo-typography-fontSize-xl);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n line-height: var(--asgardeo-typography-lineHeight-tight);\n}\n\n.asgardeo-typography--h4 {\n font-size: var(--asgardeo-typography-fontSize-lg);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n}\n\n.asgardeo-typography--h5 {\n font-size: var(--asgardeo-typography-fontSize-md);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n}\n\n.asgardeo-typography--h6 {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-semibold);\n text-transform: uppercase;\n letter-spacing: var(--asgardeo-typography-letterSpacing-wide);\n}\n\n.asgardeo-typography--subtitle1 {\n font-size: var(--asgardeo-typography-fontSize-lg);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n}\n\n.asgardeo-typography--subtitle2 {\n font-size: var(--asgardeo-typography-fontSize-md);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n color: var(--asgardeo-color-text-secondary);\n}\n\n.asgardeo-typography--body1 {\n font-size: var(--asgardeo-typography-fontSize-md);\n font-weight: var(--asgardeo-typography-fontWeight-normal);\n line-height: var(--asgardeo-typography-lineHeight-relaxed);\n}\n\n.asgardeo-typography--body2 {\n font-size: var(--asgardeo-typography-fontSize-sm);\n font-weight: var(--asgardeo-typography-fontWeight-normal);\n line-height: var(--asgardeo-typography-lineHeight-relaxed);\n color: var(--asgardeo-color-text-secondary);\n}\n\n.asgardeo-typography--caption {\n font-size: var(--asgardeo-typography-fontSize-xs);\n font-weight: var(--asgardeo-typography-fontWeight-normal);\n color: var(--asgardeo-color-text-secondary);\n}\n\n.asgardeo-typography--overline {\n font-size: var(--asgardeo-typography-fontSize-xs);\n font-weight: var(--asgardeo-typography-fontWeight-medium);\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--asgardeo-color-text-secondary);\n}\n`;\n\nexport default TYPOGRAPHY_CSS;\n", "\uFEFF/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Style injection orchestrator for the Asgardeo Vue SDK.\n *\n * Each component owns its CSS in a co-located `*.css.ts` file.\n * This module assembles those CSS strings in a deterministic order and\n * injects them as a single `<style>` tag into `document.head` once per page \u2014\n * subsequent calls are no-ops (idempotent).\n *\n * Architecture:\n * - `styles/defaults.css.ts` \u2014 `:root` CSS variable fallback values\n * - `styles/animations.css.ts` \u2014 shared `@keyframes` used by multiple components\n * - `components/primitives/{Component}/{Component}.css.ts` \u2014 per-component BEM rules (primitives)\n * - `components/presentation/{component}/{Component}.css.ts` \u2014 composition/layout rules (presentation)\n *\n * ThemeProvider overrides CSS variables at runtime via inline styles on\n * `document.documentElement`, which wins over the `:root` stylesheet rule.\n */\n\nimport ANIMATIONS_CSS from './animations.css';\nimport DEFAULTS_CSS from './defaults.css';\n\n// Primitives\nimport CREATE_ORGANIZATION_CSS from '../components/presentation/create-organization/CreateOrganization.css';\nimport LANGUAGE_SWITCHER_CSS from '../components/presentation/language-switcher/LanguageSwitcher.css';\nimport ORGANIZATION_LIST_CSS from '../components/presentation/organization-list/OrganizationList.css';\nimport ORGANIZATION_PROFILE_CSS from '../components/presentation/organization-profile/OrganizationProfile.css';\nimport ORGANIZATION_SWITCHER_CSS from '../components/presentation/organization-switcher/OrganizationSwitcher.css';\nimport USER_DROPDOWN_CSS from '../components/presentation/user-dropdown/UserDropdown.css';\nimport USER_PROFILE_CSS from '../components/presentation/user-profile/UserProfile.css';\nimport ALERT_CSS from '../components/primitives/Alert/Alert.css';\nimport BUTTON_CSS from '../components/primitives/Button/Button.css';\nimport CARD_CSS from '../components/primitives/Card/Card.css';\nimport CHECKBOX_CSS from '../components/primitives/Checkbox/Checkbox.css';\nimport DATE_PICKER_CSS from '../components/primitives/DatePicker/DatePicker.css';\nimport DIVIDER_CSS from '../components/primitives/Divider/Divider.css';\nimport LOGO_CSS from '../components/primitives/Logo/Logo.css';\nimport OTP_FIELD_CSS from '../components/primitives/OtpField/OtpField.css';\nimport PASSWORD_FIELD_CSS from '../components/primitives/PasswordField/PasswordField.css';\nimport SELECT_CSS from '../components/primitives/Select/Select.css';\nimport SPINNER_CSS from '../components/primitives/Spinner/Spinner.css';\nimport TEXT_FIELD_CSS from '../components/primitives/TextField/TextField.css';\nimport TYPOGRAPHY_CSS from '../components/primitives/Typography/Typography.css';\n\n// Presentation\n\nconst STYLE_ID: string = 'asgardeo-vue-styles';\n\n/**\n * Assembled CSS for all Asgardeo Vue components.\n * Order is intentional:\n * 1. CSS variable defaults + keyframes\n * 2. Primitives (lowest level, no dependencies on higher layers)\n * 3. Presentation (composed from primitives; may override primitive classes in context)\n */\nconst STYLES: string = [\n // Foundations\n DEFAULTS_CSS,\n ANIMATIONS_CSS,\n // Primitives\n BUTTON_CSS,\n CARD_CSS,\n TYPOGRAPHY_CSS,\n ALERT_CSS,\n TEXT_FIELD_CSS,\n PASSWORD_FIELD_CSS,\n SELECT_CSS,\n CHECKBOX_CSS,\n DATE_PICKER_CSS,\n OTP_FIELD_CSS,\n DIVIDER_CSS,\n LOGO_CSS,\n SPINNER_CSS,\n // Presentation\n ORGANIZATION_LIST_CSS,\n ORGANIZATION_SWITCHER_CSS,\n ORGANIZATION_PROFILE_CSS,\n CREATE_ORGANIZATION_CSS,\n LANGUAGE_SWITCHER_CSS,\n USER_DROPDOWN_CSS,\n USER_PROFILE_CSS,\n].join('\\n');\n\n/**\n * Injects Asgardeo Vue component styles into the document `<head>` once.\n * Subsequent calls are no-ops (idempotent).\n */\nexport function injectStyles(): void {\n if (typeof document === 'undefined') return;\n if (document.getElementById(STYLE_ID)) return;\n\n const style: HTMLStyleElement = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = STYLES;\n document.head.appendChild(style);\n}\n\nexport default injectStyles;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport type {App, Plugin} from 'vue';\nimport AsgardeoProvider from '../providers/AsgardeoProvider';\nimport {injectStyles} from '../styles/injectStyles';\n\n/**\n * Options accepted by {@link AsgardeoPlugin}.\n *\n * @example Browser SPA (default behaviour \u2014 no options needed)\n * ```ts\n * app.use(AsgardeoPlugin);\n * ```\n *\n * @example Delegated mode (e.g. @asgardeo/nuxt)\n * ```ts\n * // The host framework is responsible for providing all injection context\n * // via app.provide(). The plugin skips browser-only initialisation so it\n * // can run safely in SSR environments.\n * app.use(AsgardeoPlugin, { mode: 'delegated' });\n * ```\n */\nexport interface AsgardeoPluginOptions {\n /**\n * `'browser'` (default) \u2014 full browser PKCE flow, registers `<AsgardeoProvider>`.\n * `'delegated'` \u2014 the host framework (e.g. `@asgardeo/nuxt`) provides all\n * injection context via `app.provide()`. The plugin skips browser-only\n * initialisation so it is safe to call during SSR.\n */\n mode?: 'browser' | 'delegated';\n}\n\n/**\n * Vue plugin for Asgardeo authentication.\n *\n * Registers the `<AsgardeoProvider>` component globally so it can be used\n * anywhere in the application without explicit imports.\n *\n * @example\n * ```ts\n * import { createApp } from 'vue';\n * import { AsgardeoPlugin } from '@asgardeo/vue';\n * import App from './App.vue';\n *\n * const app = createApp(App);\n * app.use(AsgardeoPlugin);\n * app.mount('#app');\n * ```\n *\n * Then in your root component:\n * ```vue\n * <template>\n * <AsgardeoProvider :base-url=\"baseUrl\" :client-id=\"clientId\">\n * <router-view />\n * </AsgardeoProvider>\n * </template>\n * ```\n */\nconst AsgardeoPlugin: Plugin<[AsgardeoPluginOptions?]> = {\n install(app: App, options?: AsgardeoPluginOptions): void {\n injectStyles();\n\n if (options?.mode === 'delegated') {\n // In delegated mode the host framework is responsible for providing all\n // injection context (ASGARDEO_KEY, USER_KEY, \u2026) via app.provide() and\n // for registering its own root component.\n return;\n }\n app.component('AsgardeoProvider', AsgardeoProvider);\n },\n};\n\nexport default AsgardeoPlugin;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {resolveFlowTemplateLiterals, type FlowMetadataResponse} from '@asgardeo/browser';\nimport {inject, ref, type Ref} from 'vue';\nimport {ASGARDEO_KEY, FLOW_META_KEY, I18N_KEY} from '../keys';\nimport type {AsgardeoContext, FlowMetaContextValue, I18nContextValue} from '../models/contexts';\n\n/**\n * Primary composable for Asgardeo authentication.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n * Returns all auth-related reactive state and action methods.\n *\n * @throws Error if called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useAsgardeo } from '@asgardeo/vue';\n *\n * const { isSignedIn, isLoading, user, signIn, signOut } = useAsgardeo();\n * </script>\n *\n * <template>\n * <div v-if=\"isLoading\">Loading...</div>\n * <div v-else-if=\"isSignedIn\">\n * <p>Welcome, {{ user?.name }}</p>\n * <button @click=\"signOut()\">Sign Out</button>\n * </div>\n * <div v-else>\n * <button @click=\"signIn()\">Sign In</button>\n * </div>\n * </template>\n * ```\n */\nconst useAsgardeo = (): AsgardeoContext => {\n const context: unknown = inject(ASGARDEO_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useAsgardeo() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n // FlowMetaContext lives inside AsgardeoProvider, so it is always present in\n // normal usage. Optional chaining keeps the composable safe in unit tests that\n // don't render FlowMetaProvider.\n const flowMetaContext: FlowMetaContextValue | null = inject(FLOW_META_KEY, null) as FlowMetaContextValue | null;\n\n // I18nContext provides the translation function.\n const i18nContext: I18nContextValue | null = inject(I18N_KEY, null) as I18nContextValue | null;\n\n const meta: Ref<FlowMetadataResponse | null> = flowMetaContext?.meta ?? ref(null);\n\n return {\n ...(context as AsgardeoContext),\n meta: meta as Readonly<Ref<FlowMetadataResponse | null>>,\n resolveFlowTemplateLiterals: (text: string | undefined): string =>\n resolveFlowTemplateLiterals(text, {\n meta: meta.value,\n t: i18nContext?.t ?? ((key: string): string => key),\n }),\n };\n};\n\nexport default useAsgardeo;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {BRANDING_KEY} from '../keys';\nimport type {BrandingContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing branding preference data.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {BrandingContextValue} The branding context with preferences, theme, and fetch operations.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useBranding } from '@asgardeo/vue';\n *\n * const { brandingPreference, theme, isLoading, fetchBranding } = useBranding();\n * </script>\n *\n * <template>\n * <div v-if=\"!isLoading\">\n * <img :src=\"brandingPreference?.images?.logo?.imgURL\" alt=\"Logo\" />\n * </div>\n * </template>\n * ```\n */\nconst useBranding = (): BrandingContextValue => {\n const context: unknown = inject(BRANDING_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useBranding() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as BrandingContextValue;\n};\n\nexport default useBranding;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {FLOW_KEY} from '../keys';\nimport type {FlowContextValue} from '../models/contexts';\n\n/**\n * Composable for managing authentication flow UI state.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {FlowContextValue} The flow context with step navigation, messages, and loading state.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useFlow } from '@asgardeo/vue';\n *\n * const { currentStep, isLoading, messages, navigateToFlow, reset } = useFlow();\n * </script>\n *\n * <template>\n * <div>\n * <p v-if=\"isLoading\">Loading...</p>\n * <component :is=\"currentStep?.component\" v-else />\n * <p v-for=\"msg in messages\" :key=\"msg.id\">{{ msg.content }}</p>\n * </div>\n * </template>\n * ```\n */\nconst useFlow = (): FlowContextValue => {\n const context: unknown = inject(FLOW_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useFlow() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as FlowContextValue;\n};\n\nexport default useFlow;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {FLOW_META_KEY} from '../keys';\nimport type {FlowMetaContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing flow metadata.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {FlowMetaContextValue} The flow meta context with metadata, loading state, and language switching.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useFlowMeta } from '@asgardeo/vue';\n *\n * const { meta, isLoading, switchLanguage } = useFlowMeta();\n *\n * async function changeLanguage(lang: string) {\n * await switchLanguage(lang);\n * }\n * </script>\n * ```\n */\nconst useFlowMeta = (): FlowMetaContextValue => {\n const context: unknown = inject(FLOW_META_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useFlowMeta() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as FlowMetaContextValue;\n};\n\nexport default useFlowMeta;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {I18N_KEY} from '../keys';\nimport type {I18nContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing internationalization utilities.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {I18nContextValue} The i18n context with translation function, language management, and bundle injection.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useI18n } from '@asgardeo/vue';\n *\n * const { t, currentLanguage, setLanguage } = useI18n();\n * </script>\n *\n * <template>\n * <p>{{ t('common.welcome') }}</p>\n * <select :value=\"currentLanguage\" @change=\"setLanguage($event.target.value)\">\n * <option value=\"en-US\">English</option>\n * <option value=\"fr-FR\">Fran\u00E7ais</option>\n * </select>\n * </template>\n * ```\n */\nconst useI18n = (): I18nContextValue => {\n const context: unknown = inject(I18N_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useI18n() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as I18nContextValue;\n};\n\nexport default useI18n;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {ORGANIZATION_KEY} from '../keys';\nimport type {OrganizationContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing organization data and operations.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {OrganizationContextValue} The organization context.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useOrganization } from '@asgardeo/vue';\n *\n * const { myOrganizations, currentOrganization, switchOrganization } = useOrganization();\n *\n * async function handleSwitch(orgId: string) {\n * await switchOrganization(orgId);\n * }\n * </script>\n * ```\n */\nconst useOrganization = (): OrganizationContextValue => {\n const context: unknown = inject(ORGANIZATION_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useOrganization() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as OrganizationContextValue;\n};\n\nexport default useOrganization;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {THEME_KEY} from '../keys';\nimport type {ThemeContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing and controlling the active theme.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {ThemeContextValue} The theme context with the active theme, color scheme, and toggle function.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useTheme } from '@asgardeo/vue';\n *\n * const { theme, colorScheme, toggleTheme } = useTheme();\n * </script>\n *\n * <template>\n * <button @click=\"toggleTheme()\">\n * Switch to {{ colorScheme === 'light' ? 'dark' : 'light' }} mode\n * </button>\n * </template>\n * ```\n */\nconst useTheme = (): ThemeContextValue => {\n const context: unknown = inject(THEME_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useTheme() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as ThemeContextValue;\n};\n\nexport default useTheme;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {USER_KEY} from '../keys';\nimport type {UserContextValue} from '../models/contexts';\n\n/**\n * Composable for accessing user profile data.\n *\n * Must be called inside a component that is a descendant of `<AsgardeoProvider>`.\n *\n * @returns {UserContextValue} The user context containing profile, schemas, and update operations.\n * @throws {Error} If called outside of `<AsgardeoProvider>`.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useUser } from '@asgardeo/vue';\n *\n * const { profile, flattenedProfile, schemas, updateProfile, revalidateProfile } = useUser();\n * </script>\n *\n * <template>\n * <div v-if=\"profile\">\n * <p>Name: {{ flattenedProfile?.name }}</p>\n * <button @click=\"revalidateProfile()\">Refresh</button>\n * </div>\n * </template>\n * ```\n */\nconst useUser = (): UserContextValue => {\n const context: unknown = inject(USER_KEY);\n\n if (!context) {\n throw new Error(\n '[Asgardeo] useUser() was called outside of <AsgardeoProvider>. ' +\n 'Make sure to install the AsgardeoPlugin or wrap your app with <AsgardeoProvider>.',\n );\n }\n\n return context as UserContextValue;\n};\n\nexport default useUser;\n", "/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {watch, type Ref} from 'vue';\n\nexport interface UseOAuthCallbackOptions {\n /** Current flowId from component state */\n currentFlowId: Ref<string | null>;\n\n /** SessionStorage key for flowId (defaults to 'asgardeo_flow_id') */\n flowIdStorageKey?: string;\n\n /** Whether the component is initialized and ready to process OAuth callback */\n isInitialized: Ref<boolean>;\n\n /** Whether a submission is currently in progress */\n isSubmitting?: Ref<boolean>;\n\n /** Callback when OAuth flow completes successfully */\n onComplete?: () => void;\n\n /** Callback when OAuth flow encounters an error */\n onError?: (error: any) => void;\n\n /** Callback to handle flow response after submission */\n onFlowChange?: (response: any) => void;\n\n /** Callback to set loading state at the start of OAuth processing */\n onProcessingStart?: () => void;\n\n /** Function to submit OAuth code to the server */\n onSubmit: (payload: OAuthCallbackPayload) => Promise<any>;\n\n /** Mutable flag to track whether OAuth has already been processed */\n processedFlag?: {value: boolean};\n\n /** Additional handler for setting state (e.g., setFlowId) */\n setFlowId?: (flowId: string) => void;\n\n /**\n * Mutable flag for token validation tracking.\n * Used in AcceptInvite to coordinate between OAuth callback and token validation.\n */\n tokenValidationAttemptedFlag?: {value: boolean};\n}\n\nexport interface OAuthCallbackPayload {\n flowId: string;\n inputs: {\n code: string;\n nonce?: string;\n };\n}\n\nfunction cleanupUrlParams(): void {\n if (typeof window === 'undefined') return;\n\n const url: URL = new URL(window.location.href);\n url.searchParams.delete('code');\n url.searchParams.delete('nonce');\n url.searchParams.delete('state');\n url.searchParams.delete('error');\n url.searchParams.delete('error_description');\n\n window.history.replaceState({}, '', url.toString());\n}\n\n/**\n * Processes OAuth callbacks by detecting auth code in URL, resolving flowId, and submitting to server.\n * Used by SignIn, SignUp, and AcceptInvite components.\n *\n * Vue composable equivalent of React's useOAuthCallback hook.\n */\nexport function useOAuthCallback({\n currentFlowId,\n flowIdStorageKey = 'asgardeo_flow_id',\n isInitialized,\n isSubmitting,\n onComplete,\n onError,\n onFlowChange,\n onProcessingStart,\n onSubmit,\n processedFlag,\n setFlowId,\n tokenValidationAttemptedFlag,\n}: UseOAuthCallbackOptions): void {\n const internalFlag: {value: boolean} = {value: false};\n const oauthCodeProcessedFlag: {value: boolean} = processedFlag ?? internalFlag;\n const tokenValidationFlag: {value: boolean} | undefined = tokenValidationAttemptedFlag;\n\n watch(\n () => [isInitialized.value, currentFlowId.value, isSubmitting?.value] as const,\n ([initialized, , submitting]: readonly [boolean, string | null, boolean | undefined]) => {\n if (!initialized || submitting) {\n return;\n }\n\n const urlParams: URLSearchParams = new URLSearchParams(window.location.search);\n const code: string | null = urlParams.get('code');\n const nonce: string | null = urlParams.get('nonce');\n const state: string | null = urlParams.get('state');\n const flowIdFromUrl: string | null = urlParams.get('flowId');\n const error: string | null = urlParams.get('error');\n const errorDescription: string | null = urlParams.get('error_description');\n\n if (error) {\n oauthCodeProcessedFlag.value = true;\n if (tokenValidationFlag) {\n tokenValidationFlag.value = true;\n }\n onError?.(new Error(errorDescription || error || 'OAuth authentication failed'));\n cleanupUrlParams();\n return;\n }\n\n if (!code || oauthCodeProcessedFlag.value) {\n return;\n }\n\n if (tokenValidationFlag?.value) {\n return;\n }\n\n const storedFlowId: string | null = sessionStorage.getItem(flowIdStorageKey);\n const flowIdToUse: string | null = currentFlowId.value || storedFlowId || flowIdFromUrl || state || null;\n\n if (!flowIdToUse) {\n oauthCodeProcessedFlag.value = true;\n onError?.(new Error('Invalid flow. Missing flowId.'));\n cleanupUrlParams();\n return;\n }\n\n oauthCodeProcessedFlag.value = true;\n\n if (tokenValidationFlag) {\n tokenValidationFlag.value = true;\n }\n\n onProcessingStart?.();\n\n if (!currentFlowId.value && setFlowId) {\n setFlowId(flowIdToUse);\n }\n\n (async (): Promise<void> => {\n try {\n const payload: OAuthCallbackPayload = {\n flowId: flowIdToUse,\n inputs: {\n code,\n ...(nonce && {nonce}),\n },\n };\n\n const response: any = await onSubmit(payload);\n\n onFlowChange?.(response);\n\n if (response?.flowStatus === 'COMPLETE' || response?.status === 'COMPLETE') {\n onComplete?.();\n }\n\n if (response?.flowStatus === 'ERROR' || response?.status === 'ERROR') {\n onError?.(response);\n }\n\n cleanupUrlParams();\n } catch (err) {\n onError?.(err);\n cleanupUrlParams();\n }\n })();\n },\n {immediate: true},\n );\n}\n", "/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {watch, type Ref} from 'vue';\n\nexport interface UseOAuthCallbackOptions {\n /** Current executionId from component state */\n currentExecutionId: Ref<string | null>;\n\n /** SessionStorage key for executionId (defaults to 'asgardeo_execution_id') */\n executionIdStorageKey?: string;\n\n /** Whether the component is initialized and ready to process OAuth callback */\n isInitialized: Ref<boolean>;\n\n /** Whether a submission is currently in progress */\n isSubmitting?: Ref<boolean>;\n\n /** Callback when OAuth flow completes successfully */\n onComplete?: () => void;\n\n /** Callback when OAuth flow encounters an error */\n onError?: (error: any) => void;\n\n /** Callback to handle flow response after submission */\n onFlowChange?: (response: any) => void;\n\n /** Callback to set loading state at the start of OAuth processing */\n onProcessingStart?: () => void;\n\n /** Function to submit OAuth code to the server */\n onSubmit: (payload: OAuthCallbackPayload) => Promise<any>;\n\n /** Mutable flag to track whether OAuth has already been processed */\n processedFlag?: {value: boolean};\n\n /** Additional handler for setting state (e.g., setExecutionId) */\n setExecutionId?: (executionId: string) => void;\n\n /**\n * Mutable flag for token validation tracking.\n * Used in AcceptInvite to coordinate between OAuth callback and token validation.\n */\n tokenValidationAttemptedFlag?: {value: boolean};\n}\n\nexport interface OAuthCallbackPayload {\n /** The execution ID of the active flow step */\n executionId: string;\n\n /** OAuth callback inputs extracted from the redirect URL */\n inputs: {\n /** The authorization code returned by the OAuth provider */\n code: string;\n\n /** Optional nonce for OIDC replay protection */\n nonce?: string;\n };\n}\n\n/**\n * Removes OAuth-related query parameters from the current URL without triggering a navigation.\n * This prevents re-processing the callback on subsequent renders or page interactions.\n */\nfunction cleanupUrlParams(): void {\n if (typeof window === 'undefined') return;\n\n const url: URL = new URL(window.location.href);\n url.searchParams.delete('code');\n url.searchParams.delete('nonce');\n url.searchParams.delete('state');\n url.searchParams.delete('error');\n url.searchParams.delete('error_description');\n\n window.history.replaceState({}, '', url.toString());\n}\n\n/**\n * Processes OAuth callbacks by detecting auth code in URL, resolving executionId, and submitting to server.\n * Used by SignIn, SignUp, and AcceptInvite components.\n *\n * Vue composable equivalent of React's useOAuthCallback hook.\n */\nexport function useOAuthCallback({\n currentExecutionId,\n executionIdStorageKey = 'asgardeo_execution_id',\n isInitialized,\n isSubmitting,\n onComplete,\n onError,\n onFlowChange,\n onProcessingStart,\n onSubmit,\n processedFlag,\n setExecutionId,\n tokenValidationAttemptedFlag,\n}: UseOAuthCallbackOptions): void {\n /** Fallback mutable flag used when no external processedFlag is provided */\n const internalFlag: {value: boolean} = {value: false};\n\n /** Ensures OAuth code is submitted only once, even across reactive re-evaluations */\n const oauthCodeProcessedFlag: {value: boolean} = processedFlag ?? internalFlag;\n\n /** Tracks whether token validation has been attempted; used to coordinate with AcceptInvite */\n const tokenValidationFlag: {value: boolean} | undefined = tokenValidationAttemptedFlag;\n\n // Re-run whenever initialization state, executionId, or submission state changes.\n // `immediate: true` ensures the callback runs on mount to catch OAuth redirects on first load.\n watch(\n () => [isInitialized.value, currentExecutionId.value, isSubmitting?.value] as const,\n ([initialized, , submitting]: readonly [boolean, string | null, boolean | undefined]) => {\n // Wait until the component is ready and any in-flight submission has settled.\n if (!initialized || submitting) {\n return;\n }\n\n // Extract all OAuth-related parameters from the redirect URL.\n const urlParams: URLSearchParams = new URLSearchParams(window.location.search);\n const code: string | null = urlParams.get('code');\n const nonce: string | null = urlParams.get('nonce');\n const state: string | null = urlParams.get('state');\n const executionIdFromUrl: string | null = urlParams.get('executionId');\n const error: string | null = urlParams.get('error');\n const errorDescription: string | null = urlParams.get('error_description');\n\n // Handle OAuth provider errors (e.g., user denied consent) before processing the code.\n if (error) {\n oauthCodeProcessedFlag.value = true;\n if (tokenValidationFlag) {\n tokenValidationFlag.value = true;\n }\n onError?.(new Error(errorDescription || error || 'OAuth authentication failed'));\n cleanupUrlParams();\n return;\n }\n\n // Skip if there is no authorization code or if it has already been submitted.\n if (!code || oauthCodeProcessedFlag.value) {\n return;\n }\n\n // In AcceptInvite flows, token validation runs concurrently. If it has already\n // started, the OAuth callback should not interfere.\n if (tokenValidationFlag?.value) {\n return;\n }\n\n // Resolve executionId using the most specific available source:\n // component state > sessionStorage > URL param > OAuth state param.\n const storedExecutionId: string | null = sessionStorage.getItem(executionIdStorageKey);\n const executionIdToUse: string | null =\n currentExecutionId.value || storedExecutionId || executionIdFromUrl || state || null;\n\n // Cannot proceed without an executionId \u2014 the flow context is missing.\n if (!executionIdToUse) {\n oauthCodeProcessedFlag.value = true;\n onError?.(new Error('Invalid flow. Missing executionId.'));\n cleanupUrlParams();\n return;\n }\n\n // Mark as processed synchronously before the async submission to prevent\n // duplicate submissions if the watcher fires again during the await.\n oauthCodeProcessedFlag.value = true;\n\n if (tokenValidationFlag) {\n tokenValidationFlag.value = true;\n }\n\n // Signal the component to enter a loading state before the async work begins.\n onProcessingStart?.();\n\n // Sync the resolved executionId back into component state if it was sourced\n // from sessionStorage or the URL rather than reactive state.\n if (!currentExecutionId.value && setExecutionId) {\n setExecutionId(executionIdToUse);\n }\n\n // Submit the OAuth code in an IIFE to allow async/await inside a synchronous watcher callback.\n (async (): Promise<void> => {\n try {\n const payload: OAuthCallbackPayload = {\n executionId: executionIdToUse,\n inputs: {\n code,\n ...(nonce && {nonce}),\n },\n };\n\n const response: any = await onSubmit(payload);\n\n // Notify the component so it can update its flow state (e.g., move to the next step).\n onFlowChange?.(response);\n\n if (response?.flowStatus === 'COMPLETE' || response?.status === 'COMPLETE') {\n onComplete?.();\n }\n\n if (response?.flowStatus === 'ERROR' || response?.status === 'ERROR') {\n onError?.(response);\n }\n\n cleanupUrlParams();\n } catch (err) {\n onError?.(err);\n cleanupUrlParams();\n }\n })();\n },\n {immediate: true},\n );\n}\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype ButtonProps = Readonly<{\n color: 'primary' | 'secondary' | 'danger';\n disabled: boolean;\n endIcon: VNode | undefined;\n fullWidth: boolean;\n loading: boolean;\n size: 'small' | 'medium' | 'large';\n startIcon: VNode | undefined;\n type: 'button' | 'submit' | 'reset';\n variant: 'solid' | 'outline' | 'ghost' | 'text';\n}>;\n\nconst Button: Component = defineComponent({\n emits: ['click'],\n name: 'Button',\n props: {\n color: {\n default: 'primary',\n type: String as PropType<'primary' | 'secondary' | 'danger'>,\n },\n disabled: {default: false, type: Boolean},\n endIcon: {default: undefined, type: Object as PropType<VNode>},\n fullWidth: {default: false, type: Boolean},\n loading: {default: false, type: Boolean},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n startIcon: {default: undefined, type: Object as PropType<VNode>},\n type: {\n default: 'button',\n type: String as PropType<'button' | 'submit' | 'reset'>,\n },\n variant: {\n default: 'solid',\n type: String as PropType<'solid' | 'outline' | 'ghost' | 'text'>,\n },\n },\n setup(props: ButtonProps, {slots, emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const cssClass: string = [\n withVendorCSSClassPrefix('button'),\n withVendorCSSClassPrefix(`button--${props.variant}`),\n withVendorCSSClassPrefix(`button--${props.color}`),\n withVendorCSSClassPrefix(`button--${props.size}`),\n props.fullWidth ? withVendorCSSClassPrefix('button--full-width') : '',\n props.loading ? withVendorCSSClassPrefix('button--loading') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return h(\n 'button',\n {\n class: cssClass,\n disabled: props.disabled || props.loading,\n onClick: (e: MouseEvent) => emit('click', e),\n style: attrs['style'],\n type: props.type,\n },\n [\n props.startIcon\n ? h('span', {class: withVendorCSSClassPrefix('button__start-icon')}, [props.startIcon])\n : null,\n h('span', {class: withVendorCSSClassPrefix('button__content')}, slots['default']?.()),\n props.endIcon ? h('span', {class: withVendorCSSClassPrefix('button__end-icon')}, [props.endIcon]) : null,\n props.loading ? h('span', {'aria-hidden': 'true', class: withVendorCSSClassPrefix('button__spinner')}) : null,\n ],\n );\n };\n },\n});\n\nexport default Button;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype CardProps = Readonly<{\n variant: 'elevated' | 'outlined' | 'flat';\n}>;\n\nconst Card: Component = defineComponent({\n name: 'Card',\n props: {\n variant: {\n default: 'elevated',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(props: CardProps, {slots, attrs}: SetupContext): () => VNode {\n return (): VNode =>\n h(\n 'div',\n {\n class: [\n withVendorCSSClassPrefix('card'),\n withVendorCSSClassPrefix(`card--${props.variant}`),\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' '),\n style: attrs['style'],\n },\n slots['default']?.(),\n );\n },\n});\n\nexport default Card;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype AlertProps = Readonly<{\n dismissible: boolean;\n severity: 'success' | 'error' | 'warning' | 'info';\n}>;\n\nconst Alert: Component = defineComponent({\n emits: ['dismiss'],\n name: 'Alert',\n props: {\n dismissible: {default: false, type: Boolean},\n severity: {\n default: 'info',\n type: String as PropType<'success' | 'error' | 'warning' | 'info'>,\n },\n },\n setup(props: AlertProps, {slots, emit, attrs}: SetupContext): () => VNode {\n return (): VNode =>\n h(\n 'div',\n {\n class: [\n withVendorCSSClassPrefix('alert'),\n withVendorCSSClassPrefix(`alert--${props.severity}`),\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' '),\n role: 'alert',\n style: attrs['style'],\n },\n [\n h('div', {class: withVendorCSSClassPrefix('alert__content')}, slots['default']?.()),\n props.dismissible\n ? h(\n 'button',\n {\n 'aria-label': 'Dismiss',\n class: withVendorCSSClassPrefix('alert__dismiss'),\n onClick: () => emit('dismiss'),\n type: 'button',\n },\n '\\u00d7',\n )\n : null,\n ],\n );\n },\n});\n\nexport default Alert;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype TextFieldProps = Readonly<{\n autoComplete: string | undefined;\n disabled: boolean;\n error: string | undefined;\n helperText: string | undefined;\n label: string | undefined;\n modelValue: string;\n name: string | undefined;\n placeholder: string | undefined;\n required: boolean;\n type: 'text' | 'email' | 'number' | 'tel' | 'url';\n}>;\n\nconst TextField: Component = defineComponent({\n emits: ['update:modelValue', 'blur'],\n name: 'TextField',\n props: {\n autoComplete: {default: undefined, type: String},\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n helperText: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n type: {\n default: 'text',\n type: String as PropType<'text' | 'email' | 'number' | 'tel' | 'url'>,\n },\n },\n setup(props: TextFieldProps, {emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const hasError: boolean = !!props.error;\n const wrapperClass: string = [\n withVendorCSSClassPrefix('text-field'),\n hasError ? withVendorCSSClassPrefix('text-field--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n let helperContent: VNode | null;\n if (hasError) {\n helperContent = h('span', {class: withVendorCSSClassPrefix('text-field__error')}, props.error);\n } else if (props.helperText) {\n helperContent = h('span', {class: withVendorCSSClassPrefix('text-field__helper')}, props.helperText);\n } else {\n helperContent = null;\n }\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n props.label\n ? h(\n 'label',\n {\n class: withVendorCSSClassPrefix('text-field__label'),\n for: props.name,\n },\n [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('text-field__required')}, ' *') : null,\n ],\n )\n : null,\n h('input', {\n autocomplete: props.autoComplete,\n class: withVendorCSSClassPrefix('text-field__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onBlur: () => emit('blur'),\n onInput: (e: Event) => emit('update:modelValue', (e.target as HTMLInputElement).value),\n placeholder: props.placeholder,\n required: props.required,\n type: props.type,\n value: props.modelValue,\n }),\n helperContent,\n ]);\n };\n },\n});\n\nexport default TextField;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type Ref, type SetupContext, type VNode, defineComponent, h, ref} from 'vue';\nimport {EyeIcon, EyeOffIcon} from '../Icons';\n\ntype PasswordFieldProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n label: string | undefined;\n modelValue: string;\n name: string | undefined;\n placeholder: string | undefined;\n required: boolean;\n}>;\n\nconst PasswordField: Component = defineComponent({\n emits: ['update:modelValue', 'blur'],\n name: 'PasswordField',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: PasswordFieldProps, {emit, attrs}: SetupContext): () => VNode {\n const visible: Ref<boolean> = ref(false);\n\n return (): VNode => {\n const hasError: boolean = !!props.error;\n const wrapperClass: string = [\n withVendorCSSClassPrefix('password-field'),\n hasError ? withVendorCSSClassPrefix('password-field--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n props.label\n ? h(\n 'label',\n {\n class: withVendorCSSClassPrefix('password-field__label'),\n for: props.name,\n },\n [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('password-field__required')}, ' *') : null,\n ],\n )\n : null,\n h('div', {class: withVendorCSSClassPrefix('password-field__wrapper')}, [\n h('input', {\n class: withVendorCSSClassPrefix('password-field__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onBlur: () => emit('blur'),\n onInput: (e: Event) => emit('update:modelValue', (e.target as HTMLInputElement).value),\n placeholder: props.placeholder,\n required: props.required,\n type: visible.value ? 'text' : 'password',\n value: props.modelValue,\n }),\n h(\n 'button',\n {\n 'aria-label': visible.value ? 'Hide password' : 'Show password',\n class: withVendorCSSClassPrefix('password-field__toggle'),\n onClick: () => {\n visible.value = !visible.value;\n },\n tabindex: -1,\n type: 'button',\n },\n visible.value ? EyeOffIcon() : EyeIcon(),\n ),\n ]),\n hasError ? h('span', {class: withVendorCSSClassPrefix('password-field__error')}, props.error) : null,\n ]);\n };\n },\n});\n\nexport default PasswordField;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {h, type VNode} from 'vue';\n\nconst defaultProps: Record<string, string> = {\n fill: 'none',\n height: '16',\n stroke: 'currentColor',\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n 'stroke-width': '2',\n viewBox: '0 0 24 24',\n width: '16',\n xmlns: 'http://www.w3.org/2000/svg',\n};\n\nconst icon = (paths: VNode[]): VNode => h('svg', {...defaultProps}, paths);\n\nexport const CheckIcon = (): VNode => icon([h('polyline', {points: '20 6 9 17 4 12'})]);\n\nexport const XIcon = (): VNode =>\n icon([h('line', {x1: '18', x2: '6', y1: '6', y2: '18'}), h('line', {x1: '6', x2: '18', y1: '6', y2: '18'})]);\n\nexport const EyeIcon = (): VNode =>\n icon([h('path', {d: 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'}), h('circle', {cx: '12', cy: '12', r: '3'})]);\n\nexport const EyeOffIcon = (): VNode =>\n icon([\n h('path', {d: 'M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'}),\n h('path', {d: 'M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'}),\n h('line', {x1: '1', x2: '23', y1: '1', y2: '23'}),\n ]);\n\nexport const CircleAlertIcon = (): VNode =>\n icon([\n h('circle', {cx: '12', cy: '12', r: '10'}),\n h('line', {x1: '12', x2: '12', y1: '8', y2: '12'}),\n h('line', {x1: '12', x2: '12.01', y1: '16', y2: '16'}),\n ]);\n\nexport const CircleCheckIcon = (): VNode =>\n icon([h('path', {d: 'M22 11.08V12a10 10 0 1 1-5.93-9.14'}), h('polyline', {points: '22 4 12 14.01 9 11.01'})]);\n\nexport const InfoIcon = (): VNode =>\n icon([\n h('circle', {cx: '12', cy: '12', r: '10'}),\n h('line', {x1: '12', x2: '12', y1: '16', y2: '12'}),\n h('line', {x1: '12', x2: '12.01', y1: '8', y2: '8'}),\n ]);\n\nexport const TriangleAlertIcon = (): VNode =>\n icon([\n h('path', {d: 'M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'}),\n h('line', {x1: '12', x2: '12', y1: '9', y2: '13'}),\n h('line', {x1: '12', x2: '12.01', y1: '17', y2: '17'}),\n ]);\n\nexport const PlusIcon = (): VNode =>\n icon([h('line', {x1: '12', x2: '12', y1: '5', y2: '19'}), h('line', {x1: '5', x2: '19', y1: '12', y2: '12'})]);\n\nexport const LogOutIcon = (): VNode =>\n icon([\n h('path', {d: 'M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'}),\n h('polyline', {points: '16 17 21 12 16 7'}),\n h('line', {x1: '21', x2: '9', y1: '12', y2: '12'}),\n ]);\n\nexport const UserIcon = (): VNode =>\n icon([h('path', {d: 'M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'}), h('circle', {cx: '12', cy: '7', r: '4'})]);\n\nexport const ArrowLeftRightIcon = (): VNode =>\n icon([\n h('polyline', {points: '7 16 3 12 7 8'}),\n h('line', {x1: '21', x2: '3', y1: '12', y2: '12'}),\n h('polyline', {points: '17 8 21 12 17 16'}),\n ]);\n\nexport const BuildingIcon = (): VNode =>\n icon([\n h('rect', {height: '20', rx: '2', ry: '2', width: '16', x: '4', y: '2'}),\n h('line', {x1: '9', x2: '9', y1: '6', y2: '6.01'}),\n h('line', {x1: '15', x2: '15', y1: '6', y2: '6.01'}),\n h('line', {x1: '9', x2: '9', y1: '10', y2: '10.01'}),\n h('line', {x1: '15', x2: '15', y1: '10', y2: '10.01'}),\n h('line', {x1: '9', x2: '9', y1: '14', y2: '14.01'}),\n h('line', {x1: '15', x2: '15', y1: '14', y2: '14.01'}),\n h('line', {x1: '9', x2: '15', y1: '18', y2: '18'}),\n ]);\n\nexport const ChevronDownIcon = (): VNode => icon([h('polyline', {points: '6 9 12 15 18 9'})]);\n\nexport const GlobeIcon = (): VNode =>\n icon([\n h('circle', {cx: '12', cy: '12', r: '10'}),\n h('line', {x1: '2', x2: '22', y1: '12', y2: '12'}),\n h('path', {d: 'M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'}),\n ]);\n\nexport const PencilIcon = (): VNode =>\n icon([h('path', {d: 'M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z'})]);\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\nexport interface SelectOption {\n disabled?: boolean;\n label: string;\n value: string;\n}\n\ntype SelectProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n helperText: string | undefined;\n label: string | undefined;\n modelValue: string;\n name: string | undefined;\n options: SelectOption[];\n placeholder: string | undefined;\n required: boolean;\n}>;\n\nconst Select: Component = defineComponent({\n emits: ['update:modelValue'],\n name: 'AsgardeoSelect',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n helperText: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n options: {default: () => [], type: Array as PropType<SelectOption[]>},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: SelectProps, {emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const hasError: boolean = !!props.error;\n const wrapperClass: string = [\n withVendorCSSClassPrefix('select'),\n hasError ? withVendorCSSClassPrefix('select--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n let helperContent: VNode | null;\n if (hasError) {\n helperContent = h('span', {class: withVendorCSSClassPrefix('select__error')}, props.error);\n } else if (props.helperText) {\n helperContent = h('span', {class: withVendorCSSClassPrefix('select__helper')}, props.helperText);\n } else {\n helperContent = null;\n }\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n props.label\n ? h('label', {class: withVendorCSSClassPrefix('select__label'), for: props.name}, [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('select__required')}, ' *') : null,\n ])\n : null,\n h(\n 'select',\n {\n class: withVendorCSSClassPrefix('select__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onChange: (e: Event) => emit('update:modelValue', (e.target as HTMLSelectElement).value),\n required: props.required,\n value: props.modelValue,\n },\n [\n props.placeholder ? h('option', {disabled: true, value: ''}, props.placeholder) : null,\n ...props.options.map((opt: SelectOption) => h('option', {key: opt.value, value: opt.value}, opt.label)),\n ],\n ),\n helperContent,\n ]);\n };\n },\n});\n\nexport default Select;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\n\ntype CheckboxProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n label: string | undefined;\n modelValue: boolean;\n name: string | undefined;\n required: boolean;\n}>;\n\nconst Checkbox: Component = defineComponent({\n emits: ['update:modelValue'],\n name: 'AsgardeoCheckbox',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: false, type: Boolean},\n name: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: CheckboxProps, {emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const wrapperClass: string = [\n withVendorCSSClassPrefix('checkbox'),\n props.error ? withVendorCSSClassPrefix('checkbox--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n h('label', {class: withVendorCSSClassPrefix('checkbox__wrapper')}, [\n h('input', {\n checked: props.modelValue,\n class: withVendorCSSClassPrefix('checkbox__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onChange: (e: Event) => emit('update:modelValue', (e.target as HTMLInputElement).checked),\n required: props.required,\n type: 'checkbox',\n }),\n props.label ? h('span', {class: withVendorCSSClassPrefix('checkbox__label')}, props.label) : null,\n ]),\n props.error ? h('span', {class: withVendorCSSClassPrefix('checkbox__error')}, props.error) : null,\n ]);\n };\n },\n});\n\nexport default Checkbox;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\n\ntype DatePickerProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n label: string | undefined;\n modelValue: string;\n name: string | undefined;\n placeholder: string | undefined;\n required: boolean;\n}>;\n\nconst DatePicker: Component = defineComponent({\n emits: ['update:modelValue'],\n name: 'AsgardeoDatePicker',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {default: undefined, type: String},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: DatePickerProps, {emit, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const hasError: boolean = !!props.error;\n const wrapperClass: string = [\n withVendorCSSClassPrefix('date-picker'),\n hasError ? withVendorCSSClassPrefix('date-picker--error') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return h('div', {class: wrapperClass, style: attrs['style']}, [\n props.label\n ? h('label', {class: withVendorCSSClassPrefix('date-picker__label'), for: props.name}, [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('date-picker__required')}, ' *') : null,\n ])\n : null,\n h('input', {\n class: withVendorCSSClassPrefix('date-picker__input'),\n 'data-testid': attrs['data-testid'],\n disabled: props.disabled,\n id: props.name,\n name: props.name,\n onInput: (e: Event) => emit('update:modelValue', (e.target as HTMLInputElement).value),\n placeholder: props.placeholder,\n required: props.required,\n type: 'date',\n value: props.modelValue,\n }),\n hasError ? h('span', {class: withVendorCSSClassPrefix('date-picker__error')}, props.error) : null,\n ]);\n };\n },\n});\n\nexport default DatePicker;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type Ref, type SetupContext, type VNode, defineComponent, h, nextTick, ref} from 'vue';\n\ntype OtpFieldProps = Readonly<{\n disabled: boolean;\n error: string | undefined;\n label: string | undefined;\n length: number;\n modelValue: string;\n name: string | undefined;\n required: boolean;\n}>;\n\nconst OtpField: Component = defineComponent({\n emits: ['update:modelValue'],\n name: 'OtpField',\n props: {\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {default: undefined, type: String},\n length: {default: 6, type: Number},\n modelValue: {default: '', type: String},\n name: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n },\n setup(props: OtpFieldProps, {emit, attrs}: SetupContext): () => VNode {\n const inputRefs: Ref<HTMLInputElement[]> = ref<HTMLInputElement[]>([]);\n\n const setRef = (el: unknown, index: number): void => {\n if (el) inputRefs.value[index] = el as HTMLInputElement;\n };\n\n const handleInput = (index: number, e: Event): void => {\n const target: HTMLInputElement = e.target as HTMLInputElement;\n const val: string = target.value.replace(/\\D/g, '').slice(0, 1);\n target.value = val;\n\n const current: string[] = (props.modelValue || '').split('');\n while (current.length < props.length) current.push('');\n current[index] = val;\n emit('update:modelValue', current.join(''));\n\n if (val && index < props.length - 1) {\n nextTick(() => inputRefs.value[index + 1]?.focus());\n }\n };\n\n const handleKeydown = (index: number, e: KeyboardEvent): void => {\n if (e.key === 'Backspace' && !(e.target as HTMLInputElement).value && index > 0) {\n nextTick(() => inputRefs.value[index - 1]?.focus());\n }\n };\n\n return (): VNode => {\n const digits: string[] = (props.modelValue || '').split('');\n while (digits.length < props.length) digits.push('');\n\n return h(\n 'div',\n {\n class: [withVendorCSSClassPrefix('otp-field'), (attrs['class'] as string) || ''].filter(Boolean).join(' '),\n style: attrs['style'],\n },\n [\n props.label\n ? h('label', {class: withVendorCSSClassPrefix('otp-field__label')}, [\n props.label,\n props.required ? h('span', {class: withVendorCSSClassPrefix('otp-field__required')}, ' *') : null,\n ])\n : null,\n h(\n 'div',\n {class: withVendorCSSClassPrefix('otp-field__inputs')},\n Array.from({length: props.length}, (_: unknown, i: number) =>\n h('input', {\n 'aria-label': `Digit ${i + 1}`,\n class: withVendorCSSClassPrefix('otp-field__digit'),\n disabled: props.disabled,\n inputmode: 'numeric',\n key: i,\n maxlength: 1,\n onInput: (e: Event) => handleInput(i, e),\n onKeydown: (e: KeyboardEvent) => handleKeydown(i, e),\n ref: (el: unknown) => setRef(el, i),\n type: 'text',\n value: digits[i],\n }),\n ),\n ),\n props.error ? h('span', {class: withVendorCSSClassPrefix('otp-field__error')}, props.error) : null,\n ],\n );\n };\n },\n});\n\nexport default OtpField;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype TypographyProps = Readonly<{\n component: string | undefined;\n variant:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'subtitle1'\n | 'subtitle2'\n | 'body1'\n | 'body2'\n | 'caption'\n | 'overline';\n}>;\n\nconst Typography: Component = defineComponent({\n name: 'Typography',\n props: {\n component: {\n default: undefined,\n type: String as PropType<string>,\n },\n variant: {\n default: 'body1',\n type: String as PropType<\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline'\n >,\n },\n },\n setup(props: TypographyProps, {slots, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const tagMap: Record<string, string> = {\n body1: 'p',\n body2: 'p',\n caption: 'span',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n overline: 'span',\n subtitle1: 'h6',\n subtitle2: 'h6',\n };\n\n const tag: string = props.component || tagMap[props.variant] || 'p';\n\n return h(\n tag,\n {\n class: [\n withVendorCSSClassPrefix('typography'),\n withVendorCSSClassPrefix(`typography--${props.variant}`),\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' '),\n style: attrs['style'],\n },\n slots['default']?.(),\n );\n };\n },\n});\n\nexport default Typography;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype DividerProps = Readonly<{\n orientation: 'horizontal' | 'vertical';\n}>;\n\nconst Divider: Component = defineComponent({\n name: 'Divider',\n props: {\n orientation: {\n default: 'horizontal',\n type: String as PropType<'horizontal' | 'vertical'>,\n },\n },\n setup(props: DividerProps, {slots, attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const hasContent: boolean = !!slots['default'];\n const cssClass: string = [\n withVendorCSSClassPrefix('divider'),\n withVendorCSSClassPrefix(`divider--${props.orientation}`),\n hasContent ? withVendorCSSClassPrefix('divider--with-content') : '',\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' ');\n\n if (hasContent) {\n return h('div', {class: cssClass, role: 'separator', style: attrs['style']}, [\n h('span', {class: withVendorCSSClassPrefix('divider__line')}),\n h('span', {class: withVendorCSSClassPrefix('divider__content')}, slots['default']?.()),\n h('span', {class: withVendorCSSClassPrefix('divider__line')}),\n ]);\n }\n\n return h('hr', {class: cssClass, role: 'separator', style: attrs['style']});\n };\n },\n});\n\nexport default Divider;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\n\ntype LogoProps = Readonly<{\n alt: string;\n height: string | number | undefined;\n href: string | undefined;\n src: string | undefined;\n width: string | number | undefined;\n}>;\n\nconst Logo: Component = defineComponent({\n name: 'Logo',\n props: {\n alt: {default: 'Logo', type: String},\n height: {default: undefined, type: [String, Number]},\n href: {default: undefined, type: String},\n src: {default: undefined, type: String},\n width: {default: undefined, type: [String, Number]},\n },\n setup(props: LogoProps, {attrs}: SetupContext): () => VNode {\n return (): VNode => {\n const img: VNode = h('img', {\n alt: props.alt,\n class: withVendorCSSClassPrefix('logo__image'),\n height: props.height,\n src: props.src,\n width: props.width,\n });\n\n if (props.href) {\n return h(\n 'a',\n {\n class: [withVendorCSSClassPrefix('logo'), (attrs['class'] as string) || ''].filter(Boolean).join(' '),\n href: props.href,\n style: attrs['style'],\n },\n [img],\n );\n }\n\n return h(\n 'div',\n {\n class: [withVendorCSSClassPrefix('logo'), (attrs['class'] as string) || ''].filter(Boolean).join(' '),\n style: attrs['style'],\n },\n [img],\n );\n };\n },\n});\n\nexport default Logo;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h, type PropType} from 'vue';\n\ntype SpinnerProps = Readonly<{\n size: 'small' | 'medium' | 'large';\n}>;\n\nconst Spinner: Component = defineComponent({\n name: 'Spinner',\n props: {\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n },\n setup(props: SpinnerProps, {attrs}: SetupContext): () => VNode {\n return (): VNode =>\n h(\n 'div',\n {\n 'aria-label': 'Loading',\n class: [\n withVendorCSSClassPrefix('spinner'),\n withVendorCSSClassPrefix(`spinner--${props.size}`),\n (attrs['class'] as string) || '',\n ]\n .filter(Boolean)\n .join(' '),\n role: 'status',\n style: attrs['style'],\n },\n [\n h(\n 'svg',\n {\n class: withVendorCSSClassPrefix('spinner__svg'),\n fill: 'none',\n viewBox: '0 0 24 24',\n xmlns: 'http://www.w3.org/2000/svg',\n },\n [\n h('circle', {\n class: withVendorCSSClassPrefix('spinner__circle'),\n cx: '12',\n cy: '12',\n r: '10',\n stroke: 'currentColor',\n 'stroke-dasharray': '31.4 31.4',\n 'stroke-linecap': 'round',\n 'stroke-width': '3',\n }),\n ],\n ),\n ],\n );\n },\n});\n\nexport default Spinner;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoRuntimeError, navigate} from '@asgardeo/browser';\nimport {defineComponent, h, ref, type Component, type PropType, type Ref, type SetupContext, type VNode} from 'vue';\nimport BaseSignInButton from './BaseSignInButton';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * SignInButton \u2014 triggers `signIn()` from the Asgardeo context.\n *\n * If a custom `signInUrl` is configured, navigates to it instead.\n * Falls back to i18n translation for the button text.\n */\nconst SignInButton: Component = defineComponent({\n emits: ['click', 'error'],\n name: 'SignInButton',\n props: {\n signInOptions: {default: undefined, type: Object as PropType<Record<string, any>>},\n },\n setup(props: {signInOptions?: Record<string, any>}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {signIn, signInUrl, signInOptions: contextSignInOptions} = useAsgardeo();\n const isLoading: Ref<boolean> = ref(false);\n\n const handleSignIn = async (e?: MouseEvent): Promise<void> => {\n try {\n isLoading.value = true;\n if (signInUrl) {\n navigate(signInUrl);\n } else {\n await signIn(props.signInOptions ?? contextSignInOptions);\n }\n if (e) emit('click', e);\n } catch (error) {\n emit('error', error);\n throw new AsgardeoRuntimeError(\n `Sign in failed: ${error instanceof Error ? error.message : String(error)}`,\n 'SignInButton-handleSignIn-RuntimeError-001',\n 'vue',\n 'Something went wrong while trying to sign in. Please try again later.',\n );\n } finally {\n isLoading.value = false;\n }\n };\n\n return (): VNode => {\n const slotContent: (() => VNode[]) | undefined = slots['default']\n ? (): VNode[] => slots['default']!({isLoading: isLoading.value})\n : undefined;\n\n return h(\n BaseSignInButton,\n {\n class: attrs['class'],\n isLoading: isLoading.value,\n onClick: handleSignIn,\n style: attrs['style'],\n },\n slotContent,\n );\n };\n },\n});\n\nexport default SignInButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport Button from '../primitives/Button';\n\n/**\n * BaseSignInButton \u2014 styled sign-in button with customization support.\n *\n * By default, renders a styled Button primitive with contents from the slot or fallback text.\n * Set `unstyled={true}` to render a plain <button> for full customization control.\n *\n * @example\n * <!-- Default styled button with custom text -->\n * <BaseSignInButton>Custom Text</BaseSignInButton>\n *\n * @example\n * <!-- Unstyled button for full customization -->\n * <BaseSignInButton unstyled class=\"my-custom-styles\">Custom Content</BaseSignInButton>\n */\nconst BaseSignInButton: Component = defineComponent({\n emits: ['click'],\n name: 'BaseSignInButton',\n props: {\n disabled: {\n default: false,\n type: Boolean,\n },\n isLoading: {\n default: false,\n type: Boolean,\n },\n /**\n * When true, renders a plain <button> with no default styling.\n * When false (default), renders a styled Button component.\n */\n unstyled: {\n default: false,\n type: Boolean,\n },\n },\n setup(props: any, {slots, emit, attrs}: any): any {\n const handleClick = (e: MouseEvent): void => {\n if (!props.disabled && !props.isLoading) {\n emit('click', e);\n }\n };\n\n return (): any => {\n // Unstyled mode: plain button for full customization\n if (props.unstyled) {\n return h(\n 'button',\n {\n class: [withVendorCSSClassPrefix('sign-in-button-wrapper'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default'] ? slots['default']({isLoading: props.isLoading}) : 'Sign In',\n );\n }\n\n // Styled mode (default): always render the styled Button with slot/fallback content\n return h(\n Button,\n {\n class: [withVendorCSSClassPrefix('sign-in-button'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n loading: props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default']\n ? (): VNode | VNode[] => slots['default']({isLoading: props.isLoading})\n : (): string => 'Sign In',\n );\n };\n },\n});\n\nexport default BaseSignInButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoRuntimeError} from '@asgardeo/browser';\nimport {defineComponent, h, ref, type Component, type Ref, type SetupContext, type VNode} from 'vue';\nimport BaseSignOutButton from './BaseSignOutButton';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * SignOutButton \u2014 triggers `signOut()` from the Asgardeo context.\n */\nconst SignOutButton: Component = defineComponent({\n emits: ['click', 'error'],\n name: 'SignOutButton',\n setup(_: {}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {signOut} = useAsgardeo();\n const isLoading: Ref<boolean> = ref(false);\n\n const handleSignOut = async (e?: MouseEvent): Promise<void> => {\n try {\n isLoading.value = true;\n await signOut();\n if (e) emit('click', e);\n } catch (error) {\n emit('error', error);\n throw new AsgardeoRuntimeError(\n `Sign out failed: ${error instanceof Error ? error.message : String(error)}`,\n 'SignOutButton-handleSignOut-RuntimeError-001',\n 'vue',\n 'Something went wrong while trying to sign out. Please try again later.',\n );\n } finally {\n isLoading.value = false;\n }\n };\n\n return (): VNode => {\n const slotContent: (() => VNode[]) | undefined = slots['default']\n ? (): VNode[] => slots['default']!({isLoading: isLoading.value})\n : undefined;\n\n return h(\n BaseSignOutButton,\n {\n class: attrs['class'],\n isLoading: isLoading.value,\n onClick: handleSignOut,\n style: attrs['style'],\n },\n slotContent,\n );\n };\n },\n});\n\nexport default SignOutButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport Button from '../primitives/Button';\n\n/**\n * BaseSignOutButton \u2014 styled sign-out button with customization support.\n *\n * By default, renders a styled Button primitive with contents from the slot or fallback text.\n * Set `unstyled={true}` to render a plain <button> for full customization control.\n *\n * @example\n * <!-- Default styled button with custom text -->\n * <BaseSignOutButton>Custom Text</BaseSignOutButton>\n *\n * @example\n * <!-- Unstyled button for full customization -->\n * <BaseSignOutButton unstyled class=\"my-custom-styles\">Custom Content</BaseSignOutButton>\n */\nconst BaseSignOutButton: Component = defineComponent({\n emits: ['click'],\n name: 'BaseSignOutButton',\n props: {\n disabled: {\n default: false,\n type: Boolean,\n },\n isLoading: {\n default: false,\n type: Boolean,\n },\n /**\n * When true, renders a plain <button> with no default styling.\n * When false (default), renders a styled Button component.\n */\n unstyled: {\n default: false,\n type: Boolean,\n },\n },\n setup(props: any, {slots, emit, attrs}: any): any {\n const handleClick = (e: MouseEvent): void => {\n if (!props.disabled && !props.isLoading) {\n emit('click', e);\n }\n };\n\n return (): any => {\n // Unstyled mode: plain button for full customization\n if (props.unstyled) {\n return h(\n 'button',\n {\n class: [withVendorCSSClassPrefix('sign-out-button-wrapper'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default'] ? slots['default']({isLoading: props.isLoading}) : 'Sign Out',\n );\n }\n\n // Styled mode (default): always render the styled Button with slot/fallback content\n return h(\n Button,\n {\n class: [withVendorCSSClassPrefix('sign-out-button'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n loading: props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default']\n ? (): VNode | VNode[] => slots['default']({isLoading: props.isLoading})\n : (): string => 'Sign Out',\n );\n };\n },\n});\n\nexport default BaseSignOutButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoRuntimeError, navigate} from '@asgardeo/browser';\nimport {defineComponent, h, ref, type Component, type Ref, type SetupContext, type VNode} from 'vue';\nimport BaseSignUpButton from './BaseSignUpButton';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * SignUpButton \u2014 triggers `signUp()` from the Asgardeo context.\n *\n * If a custom `signUpUrl` is configured, navigates to it instead.\n * Falls back to i18n translation for the button text.\n */\nconst SignUpButton: Component = defineComponent({\n emits: ['click', 'error'],\n name: 'SignUpButton',\n setup(_: {}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {signUp, signUpUrl} = useAsgardeo();\n const isLoading: Ref<boolean> = ref(false);\n\n const handleSignUp = async (e?: MouseEvent): Promise<void> => {\n try {\n isLoading.value = true;\n if (signUpUrl) {\n navigate(signUpUrl);\n } else {\n await signUp();\n }\n if (e) emit('click', e);\n } catch (error) {\n emit('error', error);\n throw new AsgardeoRuntimeError(\n `Sign up failed: ${error instanceof Error ? error.message : String(error)}`,\n 'SignUpButton-handleSignUp-RuntimeError-001',\n 'vue',\n 'Something went wrong while trying to sign up. Please try again later.',\n );\n } finally {\n isLoading.value = false;\n }\n };\n\n return (): VNode => {\n const slotContent: (() => VNode[]) | undefined = slots['default']\n ? (): VNode[] => slots['default']!({isLoading: isLoading.value})\n : undefined;\n\n return h(\n BaseSignUpButton,\n {\n class: attrs['class'],\n isLoading: isLoading.value,\n onClick: handleSignUp,\n style: attrs['style'],\n },\n slotContent,\n );\n };\n },\n});\n\nexport default SignUpButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport Button from '../primitives/Button';\n\n/**\n * BaseSignUpButton \u2014 styled sign-up button with customization support.\n *\n * By default, renders a styled Button primitive with contents from the slot or fallback text.\n * Set `unstyled={true}` to render a plain <button> for full customization control.\n *\n * @example\n * <!-- Default styled button with custom text -->\n * <BaseSignUpButton>Custom Text</BaseSignUpButton>\n *\n * @example\n * <!-- Unstyled button for full customization -->\n * <BaseSignUpButton unstyled class=\"my-custom-styles\">Custom Content</BaseSignUpButton>\n */\nconst BaseSignUpButton: Component = defineComponent({\n emits: ['click'],\n name: 'BaseSignUpButton',\n props: {\n disabled: {\n default: false,\n type: Boolean,\n },\n isLoading: {\n default: false,\n type: Boolean,\n },\n /**\n * When true, renders a plain <button> with no default styling.\n * When false (default), renders a styled Button component.\n */\n unstyled: {\n default: false,\n type: Boolean,\n },\n },\n setup(props: any, {slots, emit, attrs}: any): any {\n const handleClick = (e: MouseEvent): void => {\n if (!props.disabled && !props.isLoading) {\n emit('click', e);\n }\n };\n\n return (): any => {\n // Unstyled mode: plain button for full customization\n if (props.unstyled) {\n return h(\n 'button',\n {\n class: [withVendorCSSClassPrefix('sign-up-button-wrapper'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n disabled: props.disabled || props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n },\n slots['default'] ? slots['default']({isLoading: props.isLoading}) : 'Sign Up',\n );\n }\n\n // Styled mode (default): always render the styled Button with slot/fallback content\n return h(\n Button,\n {\n class: [withVendorCSSClassPrefix('sign-up-button'), (attrs['class'] as string) || '']\n .filter(Boolean)\n .join(' '),\n color: 'primary' as const,\n disabled: props.disabled || props.isLoading,\n loading: props.isLoading,\n onClick: handleClick,\n style: attrs['style'],\n type: 'button' as const,\n variant: 'solid' as const,\n },\n slots['default']\n ? (): VNode | VNode[] => slots['default']({isLoading: props.isLoading})\n : (): string => 'Sign Up',\n );\n };\n },\n});\n\nexport default BaseSignUpButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {navigate as browserNavigate} from '@asgardeo/browser';\nimport {type Component, defineComponent, onMounted} from 'vue';\nimport {createVueLogger} from '../../utils/logger';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('Callback');\n\ninterface CallbackSetupProps {\n onError: ((error: Error) => void) | undefined;\n onNavigate: ((path: string) => void) | undefined;\n}\n\n/**\n * Callback \u2014 headless component that handles OAuth callback parameter forwarding.\n *\n * Extracts OAuth parameters (code, state, error) from the URL and forwards them\n * to the original component that initiated the OAuth flow.\n *\n * Works standalone using the browser navigate utility (History API) for navigation by default.\n * Pass an `onNavigate` prop to enable framework-specific navigation (e.g., via Vue Router).\n *\n * Flow: Extract OAuth parameters from URL -> Parse state parameter -> Redirect to original path with parameters\n */\nconst Callback: Component = defineComponent({\n name: 'Callback',\n props: {\n onError: {default: undefined, type: Function as unknown as () => (error: Error) => void},\n onNavigate: {default: undefined, type: Function as unknown as () => (path: string) => void},\n },\n setup(props: CallbackSetupProps) {\n const navigate = (path: string): void => {\n if (props.onNavigate) {\n props.onNavigate(path);\n } else {\n browserNavigate(path);\n }\n };\n\n onMounted(() => {\n let returnPath: string = '/';\n\n try {\n // 1. Extract OAuth parameters from URL\n const urlParams: URLSearchParams = new URLSearchParams(window.location.search);\n const code: string | null = urlParams.get('code');\n const state: string | null = urlParams.get('state');\n const nonce: string | null = urlParams.get('nonce');\n const oauthError: string | null = urlParams.get('error');\n const errorDescription: string | null = urlParams.get('error_description');\n\n // If no OAuth parameters are present, this component is not on a real callback\n // route \u2014 do nothing and return early.\n if (!code && !state && !oauthError) {\n return;\n }\n\n // 1a. If running inside a popup (e.g. social signup), send OAuth params\n // back to the opener via postMessage. The parent window's handler will\n // close this popup after processing the code.\n if (window.opener) {\n window.opener.postMessage({code, error: oauthError, errorDescription, nonce, state}, window.location.origin);\n return;\n }\n\n // 2. Validate and retrieve OAuth state from sessionStorage\n if (!state) {\n throw new Error('Missing OAuth state parameter - possible security issue');\n }\n\n const storedData: string | null = sessionStorage.getItem(`asgardeo_oauth_${state}`);\n if (!storedData) {\n if (oauthError) {\n const errorMsg: string = errorDescription || oauthError || 'OAuth authentication failed';\n const err: Error = new Error(errorMsg);\n props.onError?.(err);\n\n const params: URLSearchParams = new URLSearchParams();\n params.set('error', oauthError);\n if (errorDescription) {\n params.set('error_description', errorDescription);\n }\n\n navigate(`/?${params.toString()}`);\n\n return;\n }\n throw new Error('Invalid OAuth state - possible CSRF attack');\n }\n\n const {path, timestamp} = JSON.parse(storedData);\n returnPath = path || '/';\n\n // 3. Validate state freshness\n const MAX_STATE_AGE: number = 300000; // 5 minutes\n if (Date.now() - timestamp > MAX_STATE_AGE) {\n sessionStorage.removeItem(`asgardeo_oauth_${state}`);\n throw new Error('OAuth state expired - please try again');\n }\n\n // 4. Clean up state\n sessionStorage.removeItem(`asgardeo_oauth_${state}`);\n\n // 5. Handle OAuth error response\n if (oauthError) {\n const errorMsg: string = errorDescription || oauthError || 'OAuth authentication failed';\n const err: Error = new Error(errorMsg);\n props.onError?.(err);\n\n const params: URLSearchParams = new URLSearchParams();\n params.set('error', oauthError);\n if (errorDescription) {\n params.set('error_description', errorDescription);\n }\n\n navigate(`${returnPath}?${params.toString()}`);\n\n return;\n }\n\n // 6. Validate required parameters\n if (!code) {\n throw new Error('Missing OAuth authorization code');\n }\n\n // 7. Forward OAuth code to original component\n const params: URLSearchParams = new URLSearchParams();\n params.set('code', code);\n if (nonce) {\n params.set('nonce', nonce);\n }\n\n navigate(`${returnPath}?${params.toString()}`);\n } catch (err) {\n const errorMessage: string = err instanceof Error ? err.message : 'OAuth callback processing failed';\n logger.error('OAuth callback error:', err);\n\n props.onError?.(err instanceof Error ? err : new Error(errorMessage));\n\n const params: URLSearchParams = new URLSearchParams();\n params.set('error', 'callback_error');\n params.set('error_description', errorMessage);\n\n navigate(`${returnPath}?${params.toString()}`);\n }\n });\n\n // Headless component \u2014 renders nothing\n return (): null => null;\n },\n});\n\nexport default Callback;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport SignInV1 from './v1/SignIn';\nimport SignInV2 from './v2/SignIn';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type {SignInRenderProps} from './v2/SignIn';\n\n/**\n * SignIn \u2014 platform-aware sign-in component.\n *\n * Routes to the V1 (authenticator-based) flow by default or the V2\n * (component-driven) flow when `platform` is set to `Platform.AsgardeoV2`.\n */\nconst SignIn: Component = defineComponent({\n emits: ['error', 'success'],\n name: 'SignIn',\n props: {\n className: {default: '', type: String},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(\n props: Readonly<{className: string; size: 'small' | 'medium' | 'large'; variant: 'elevated' | 'outlined' | 'flat'}>,\n {slots, emit, attrs}: SetupContext,\n ): () => VNode {\n const {platform} = useAsgardeo();\n\n return (): VNode => {\n if (platform === Platform.AsgardeoV2) {\n return h(\n SignInV2,\n {\n ...attrs,\n class: props.className,\n onError: (err: Error) => emit('error', err),\n onSuccess: (data: Record<string, any>) => emit('success', data),\n size: props.size,\n variant: props.variant,\n },\n slots,\n );\n }\n\n return h(\n SignInV1,\n {\n ...attrs,\n class: props.className,\n onError: (err: Error) => emit('error', err),\n onSuccess: (data: Record<string, any>) => emit('success', data),\n size: props.size,\n variant: props.variant,\n },\n slots,\n );\n };\n },\n});\n\nexport default SignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedSignInFlowHandleRequestPayload,\n EmbeddedSignInFlowHandleResponse,\n EmbeddedSignInFlowInitiateResponse,\n} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignIn from './BaseSignIn';\nimport useAsgardeo from '../../../../composables/useAsgardeo';\n\n/**\n * V1 SignIn \u2014 app-native sign-in component using the authenticator-based flow.\n *\n * Initialises the flow with `signIn({ response_mode: 'direct' })` and delegates\n * all UI rendering to `BaseSignInV1`.\n */\nconst SignIn: Component = defineComponent({\n emits: ['error', 'success'],\n name: 'SignInV1',\n props: {\n className: {default: '', type: String},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(\n props: Readonly<{className: string; size: 'small' | 'medium' | 'large'; variant: 'elevated' | 'outlined' | 'flat'}>,\n {emit, attrs}: SetupContext,\n ): () => VNode {\n const {signIn, afterSignInUrl, isInitialized, isLoading} = useAsgardeo();\n\n const handleInitialize = async (): Promise<EmbeddedSignInFlowInitiateResponse> =>\n (await signIn({response_mode: 'direct'})) as EmbeddedSignInFlowInitiateResponse;\n\n const handleOnSubmit = async (\n payload: EmbeddedSignInFlowHandleRequestPayload,\n request: any,\n ): Promise<EmbeddedSignInFlowHandleResponse> =>\n (await signIn(payload, request)) as EmbeddedSignInFlowHandleResponse;\n\n const handleSuccess = (authData: Record<string, any>): void => {\n emit('success', authData);\n\n if (authData && afterSignInUrl) {\n const url: URL = new URL(afterSignInUrl as string, window.location.origin);\n Object.entries(authData).forEach(([key, value]: [string, any]) => {\n if (value !== undefined && value !== null) {\n url.searchParams.append(key, String(value));\n }\n });\n window.location.href = url.toString();\n }\n };\n\n return (): VNode =>\n h(BaseSignIn, {\n ...attrs,\n afterSignInUrl,\n class: props.className,\n isLoading: isLoading.value || !isInitialized.value,\n onError: (err: Error) => emit('error', err),\n onInitialize: handleInitialize,\n onSubmit: handleOnSubmit,\n onSuccess: handleSuccess,\n showLogo: true,\n showSubtitle: true,\n showTitle: true,\n size: props.size,\n variant: props.variant,\n });\n },\n});\n\nexport default SignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedSignInFlowAuthenticator,\n EmbeddedSignInFlowInitiateResponse,\n EmbeddedSignInFlowHandleResponse,\n EmbeddedSignInFlowStepType,\n EmbeddedSignInFlowStatus,\n EmbeddedSignInFlowAuthenticatorPromptType,\n ApplicationNativeAuthenticationConstants,\n AsgardeoAPIError,\n withVendorCSSClassPrefix,\n EmbeddedSignInFlowHandleRequestPayload,\n EmbeddedFlowExecuteRequestConfig,\n handleWebAuthnAuthentication,\n} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport {createSignInOptionFromAuthenticator} from './options/SignInOptionFactory';\nimport useFlow from '../../../../composables/useFlow';\nimport useI18n from '../../../../composables/useI18n';\nimport Alert from '../../../primitives/Alert';\nimport Card from '../../../primitives/Card';\nimport Divider from '../../../primitives/Divider';\nimport Logo from '../../../primitives/Logo';\nimport Spinner from '../../../primitives/Spinner';\nimport Typography from '../../../primitives/Typography';\n\n/**\n * Authenticators that are currently hidden from the UI.\n * OrganizationSSO is not yet supported in app-native authentication.\n */\nconst HIDDEN_AUTHENTICATORS: string[] = ['T3JnYW5pemF0aW9uQXV0aGVudGljYXRvcjpTU08'];\n\nconst isPasskeyAuthenticator = (authenticator: EmbeddedSignInFlowAuthenticator): boolean =>\n authenticator.authenticatorId === ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey &&\n authenticator.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.InternalPrompt &&\n !!(authenticator.metadata as any)?.additionalData?.challengeData;\n\n/**\n * V1 BaseSignIn component \u2014 authenticator-based app-native sign-in for Vue.\n *\n * Handles multi-step authentication flows, form rendering per-authenticator,\n * redirect popups for OAuth, and passkey/FIDO WebAuthn.\n */\nconst BaseSignIn: Component = defineComponent({\n emits: ['error', 'flowChange', 'success'],\n name: 'BaseSignInV1',\n props: {\n afterSignInUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n isLoading: {default: false, type: Boolean},\n messageClassName: {default: '', type: String},\n onInitialize: {default: undefined, type: Function as PropType<() => Promise<EmbeddedSignInFlowInitiateResponse>>},\n onSubmit: {\n default: undefined,\n type: Function as PropType<\n (\n payload: EmbeddedSignInFlowHandleRequestPayload,\n request: EmbeddedFlowExecuteRequestConfig,\n ) => Promise<EmbeddedSignInFlowHandleResponse>\n >,\n },\n showLogo: {default: true, type: Boolean},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'elevated' | 'outlined' | 'flat'>},\n },\n setup(props: any, {emit}: SetupContext): () => VNode {\n const {t} = useI18n();\n const {title: flowTitle, subtitle: flowSubtitle, messages: flowMessages} = useFlow();\n\n // \u2500\u2500 Reactive state \u2500\u2500\n const isInitRequestLoading: Ref<boolean> = ref(false);\n const isInitialized: Ref<boolean> = ref(false);\n const currentFlow: Ref<EmbeddedSignInFlowInitiateResponse | null> = ref(null);\n const currentAuthenticator: Ref<EmbeddedSignInFlowAuthenticator | null> = ref(null);\n const error: Ref<string | null> = ref(null);\n const messages: Ref<Array<{message: string; type: string}>> = ref([]);\n const formValues: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n\n const isLoading = (): boolean => props.isLoading || isInitRequestLoading.value;\n\n // \u2500\u2500 Form helpers \u2500\u2500\n\n const setupFormFields = (authenticator: EmbeddedSignInFlowAuthenticator): void => {\n const vals: Record<string, string> = {};\n authenticator.metadata?.params?.forEach((param: any) => {\n vals[param.param] = '';\n });\n formValues.value = vals;\n touchedFields.value = {};\n };\n\n const handleInputChange = (param: string, value: string): void => {\n formValues.value = {...formValues.value, [param]: value};\n touchedFields.value = {...touchedFields.value, [param]: true};\n };\n\n const touchAllFields = (): void => {\n const touched: Record<string, boolean> = {};\n Object.keys(formValues.value).forEach((key: string) => {\n touched[key] = true;\n });\n touchedFields.value = touched;\n };\n\n const validateForm = (): boolean => {\n if (!currentAuthenticator.value) return true;\n const required: string[] = currentAuthenticator.value.requiredParams || [];\n\n return required.every((key: string) => {\n const val: string = formValues.value[key] || '';\n\n return !!val && val.trim() !== '';\n });\n };\n\n // \u2500\u2500 Next step processing \u2500\u2500\n\n let handleAuthenticatorSelection: (\n authenticator: EmbeddedSignInFlowAuthenticator,\n formData?: Record<string, string>,\n ) => Promise<void>;\n\n const processNextStep = (response: any): void => {\n if (response && 'flowId' in response && 'nextStep' in response) {\n currentFlow.value = response;\n\n if (response.nextStep?.authenticators?.length > 0) {\n if (\n response.nextStep.stepType === EmbeddedSignInFlowStepType.MultiOptionsPrompt &&\n response.nextStep.authenticators.length > 1\n ) {\n currentAuthenticator.value = null;\n } else {\n const nextAuth: EmbeddedSignInFlowAuthenticator = response.nextStep.authenticators[0];\n if (isPasskeyAuthenticator(nextAuth)) {\n handleAuthenticatorSelection(nextAuth).catch((err: unknown) => {\n emit('error', err);\n });\n return;\n }\n currentAuthenticator.value = nextAuth;\n setupFormFields(nextAuth);\n }\n }\n\n if (response.nextStep?.messages) {\n messages.value = response.nextStep.messages.map((msg: any) => ({\n message: msg.message || '',\n type: msg.type || 'INFO',\n }));\n }\n }\n };\n\n // \u2500\u2500 Redirect popup (OAuth flows) \u2500\u2500\n\n const handleRedirectionIfNeeded = (response: EmbeddedSignInFlowHandleResponse): boolean => {\n if (\n response &&\n 'nextStep' in response &&\n response.nextStep &&\n (response.nextStep as any).stepType === EmbeddedSignInFlowStepType.AuthenticatorPrompt &&\n (response.nextStep as any).authenticators?.length === 1\n ) {\n const responseAuth: any = (response.nextStep as any).authenticators[0];\n if (\n responseAuth.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt &&\n (responseAuth.metadata as any)?.additionalData?.redirectUrl\n ) {\n const {redirectUrl} = (responseAuth.metadata as any).additionalData;\n const popup: Window | null = window.open(\n redirectUrl,\n 'oauth_popup',\n 'width=500,height=600,scrollbars=yes,resizable=yes',\n );\n\n if (!popup) return false;\n\n let messageHandler: any;\n let popupMonitor: any;\n let hasProcessedCallback: boolean = false;\n\n const cleanup = (): void => {\n window.removeEventListener('message', messageHandler);\n if (popupMonitor) clearInterval(popupMonitor);\n };\n\n messageHandler = async (event: MessageEvent): Promise<void> => {\n if (event.source !== popup) return;\n const expectedOrigin: string = props.afterSignInUrl\n ? new URL(props.afterSignInUrl).origin\n : window.location.origin;\n if (event.origin !== expectedOrigin && event.origin !== window.location.origin) return;\n\n const {code, state} = event.data;\n if (code && state) {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value!.flowId,\n selectedAuthenticator: {\n authenticatorId: responseAuth.authenticatorId,\n params: {code, state},\n },\n };\n await props.onSubmit(payload, {\n method: currentFlow.value?.links[0].method,\n url: currentFlow.value?.links[0].href,\n });\n popup.close();\n cleanup();\n }\n };\n\n window.addEventListener('message', messageHandler);\n\n popupMonitor = setInterval(async (): Promise<void> => {\n try {\n if (popup.closed) {\n cleanup();\n return;\n }\n if (hasProcessedCallback) return;\n try {\n const popupUrl: string = popup.location.href;\n if (popupUrl && (popupUrl.includes('code=') || popupUrl.includes('error='))) {\n hasProcessedCallback = true;\n const url: URL = new URL(popupUrl);\n const code: string | null = url.searchParams.get('code');\n const state: string | null = url.searchParams.get('state');\n const oauthError: string | null = url.searchParams.get('error');\n\n if (oauthError) {\n popup.close();\n cleanup();\n return;\n }\n if (code && state) {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value!.flowId,\n selectedAuthenticator: {\n authenticatorId: responseAuth.authenticatorId,\n params: {code, state},\n },\n };\n const submitResponse: any = await props.onSubmit(payload, {\n method: currentFlow.value?.links[0].method,\n url: currentFlow.value?.links[0].href,\n });\n popup.close();\n emit('flowChange', submitResponse);\n if (submitResponse?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', submitResponse.authData);\n }\n }\n }\n } catch {\n // Cross-origin error expected during OAuth redirect\n }\n } catch {\n // Ignore popup monitoring errors\n }\n }, 1000);\n\n return true;\n }\n }\n return false;\n };\n\n // \u2500\u2500 Form submission \u2500\u2500\n\n const handleSubmit = async (submittedValues: Record<string, string>): Promise<void> => {\n if (!currentFlow.value || !currentAuthenticator.value) return;\n\n touchAllFields();\n if (!validateForm()) return;\n\n isInitRequestLoading.value = true;\n error.value = null;\n messages.value = [];\n\n try {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: currentAuthenticator.value.authenticatorId,\n params: submittedValues,\n },\n };\n\n const response: any = await props.onSubmit(payload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData);\n return;\n }\n if (\n response?.flowStatus === EmbeddedSignInFlowStatus.FailCompleted ||\n response?.flowStatus === EmbeddedSignInFlowStatus.FailIncomplete\n ) {\n error.value = t('errors.signin.flow.completion.failure');\n return;\n }\n if (handleRedirectionIfNeeded(response)) return;\n\n processNextStep(response);\n } catch (err: any) {\n error.value = err instanceof AsgardeoAPIError ? err.message : t('errors.signin.flow.failure');\n emit('error', err);\n } finally {\n isInitRequestLoading.value = false;\n }\n };\n\n // \u2500\u2500 Authenticator selection (multi-option, passkey, redirect, form) \u2500\u2500\n\n handleAuthenticatorSelection = async (\n authenticator: EmbeddedSignInFlowAuthenticator,\n formData?: Record<string, string>,\n ): Promise<void> => {\n if (!currentFlow.value) return;\n\n if (formData) touchAllFields();\n\n isInitRequestLoading.value = true;\n error.value = null;\n messages.value = [];\n\n try {\n // Passkey / FIDO\n if (isPasskeyAuthenticator(authenticator)) {\n const challengeData: any = (authenticator.metadata as any)?.additionalData?.challengeData;\n if (!challengeData) throw new Error('Missing challenge data for passkey authentication');\n\n const tokenResponse: any = await handleWebAuthnAuthentication(challengeData);\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: authenticator.authenticatorId,\n params: {tokenResponse},\n },\n };\n const response: any = await props.onSubmit(payload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData);\n return;\n }\n if (\n response?.flowStatus === EmbeddedSignInFlowStatus.FailCompleted ||\n response?.flowStatus === EmbeddedSignInFlowStatus.FailIncomplete\n ) {\n error.value = t('errors.signin.flow.passkeys.completion.failure');\n return;\n }\n processNextStep(response);\n return;\n }\n\n // Redirection prompt (social login first-touch)\n if (authenticator.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt) {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: authenticator.authenticatorId,\n params: {},\n },\n };\n const response: any = await props.onSubmit(payload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData);\n return;\n }\n handleRedirectionIfNeeded(response);\n return;\n }\n\n // Form data submission\n if (formData) {\n if (!validateForm()) return;\n\n const formPayload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: authenticator.authenticatorId,\n params: formData,\n },\n };\n const formResponse: any = await props.onSubmit(formPayload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', formResponse);\n\n if (formResponse?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', formResponse.authData);\n return;\n }\n if (\n formResponse?.flowStatus === EmbeddedSignInFlowStatus.FailCompleted ||\n formResponse?.flowStatus === EmbeddedSignInFlowStatus.FailIncomplete\n ) {\n error.value = t('errors.signin.flow.completion.failure');\n return;\n }\n if (handleRedirectionIfNeeded(formResponse)) return;\n processNextStep(formResponse);\n return;\n }\n\n // No form data \u2014 direct selection or show form\n const hasParams: boolean = !!(authenticator.metadata?.params && authenticator.metadata.params.length > 0);\n if (!hasParams) {\n const payload: EmbeddedSignInFlowHandleRequestPayload = {\n flowId: currentFlow.value.flowId,\n selectedAuthenticator: {\n authenticatorId: authenticator.authenticatorId,\n params: {},\n },\n };\n const response: any = await props.onSubmit(payload, {\n method: currentFlow.value.links[0].method,\n url: currentFlow.value.links[0].href,\n });\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData);\n return;\n }\n if (\n response?.flowStatus === EmbeddedSignInFlowStatus.FailCompleted ||\n response?.flowStatus === EmbeddedSignInFlowStatus.FailIncomplete\n ) {\n error.value = t('errors.signin.flow.completion.failure');\n return;\n }\n if (handleRedirectionIfNeeded(response)) return;\n processNextStep(response);\n } else {\n currentAuthenticator.value = authenticator;\n setupFormFields(authenticator);\n }\n } catch (err: any) {\n const errorMessage: string = err instanceof AsgardeoAPIError ? err.message : t('errors.signin.flow.failure');\n error.value = errorMessage;\n emit('error', err);\n } finally {\n isInitRequestLoading.value = false;\n }\n };\n\n // \u2500\u2500 Multi-option checks \u2500\u2500\n\n const hasMultipleOptions = (): boolean =>\n !!(\n currentFlow.value &&\n 'nextStep' in currentFlow.value &&\n currentFlow.value.nextStep?.stepType === EmbeddedSignInFlowStepType.MultiOptionsPrompt &&\n currentFlow.value.nextStep?.authenticators &&\n currentFlow.value.nextStep.authenticators.length > 1\n );\n\n const getAvailableAuthenticators = (): EmbeddedSignInFlowAuthenticator[] => {\n if (!currentFlow.value || !('nextStep' in currentFlow.value) || !currentFlow.value.nextStep?.authenticators) {\n return [];\n }\n return currentFlow.value.nextStep.authenticators;\n };\n\n // \u2500\u2500 Initialize flow on mount \u2500\u2500\n\n let initAttempted: boolean = false;\n\n watch(\n () => props.isLoading,\n (loading: boolean) => {\n if (!loading && !initAttempted && props.onInitialize) {\n initAttempted = true;\n (async (): Promise<void> => {\n isInitRequestLoading.value = true;\n error.value = null;\n\n try {\n const response: any = await props.onInitialize();\n currentFlow.value = response;\n isInitialized.value = true;\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedSignInFlowStatus.SuccessCompleted) {\n emit('success', response.authData || {});\n return;\n }\n\n if (response?.nextStep?.authenticators?.length > 0) {\n if (\n response.nextStep.stepType === EmbeddedSignInFlowStepType.MultiOptionsPrompt &&\n response.nextStep.authenticators.length > 1\n ) {\n currentAuthenticator.value = null;\n } else {\n const authenticator: EmbeddedSignInFlowAuthenticator = response.nextStep.authenticators[0];\n currentAuthenticator.value = authenticator;\n setupFormFields(authenticator);\n }\n }\n\n if (response?.nextStep?.messages) {\n messages.value = response.nextStep.messages.map((msg: any) => ({\n message: msg.message || '',\n type: msg.type || 'INFO',\n }));\n }\n } catch (err: any) {\n error.value = err instanceof AsgardeoAPIError ? err.message : t('errors.signin.initialization');\n emit('error', err);\n } finally {\n isInitRequestLoading.value = false;\n }\n })();\n }\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Render helpers \u2500\u2500\n\n const renderAlertVariant = (type: string): string => {\n const lower: string = type.toLowerCase();\n if (lower === 'error') return 'error';\n if (lower === 'warning') return 'warning';\n if (lower === 'success') return 'success';\n return 'info';\n };\n\n const renderMessages = (): VNode[] =>\n messages.value.map((msg: any, i: number) =>\n h(Alert, {key: i, severity: renderAlertVariant(msg.type)}, {default: () => msg.message}),\n );\n\n const renderError = (): VNode | null =>\n error.value ? h(Alert, {severity: 'error'}, {default: () => error.value}) : null;\n\n // \u2500\u2500 Main render function \u2500\u2500\n\n return (): VNode => {\n const cardClass: string = [\n withVendorCSSClassPrefix('signin'),\n withVendorCSSClassPrefix(`signin--${props.size}`),\n withVendorCSSClassPrefix(`signin--${props.variant}`),\n props.className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // Loading state\n if (!isInitialized.value && isLoading()) {\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => [\n h('div', {class: withVendorCSSClassPrefix('signin__loading')}, [\n h(Spinner, {size: 'medium'}),\n h(Typography, {variant: 'body1'}, {default: () => t('messages.loading.placeholder')}),\n ]),\n ],\n },\n ),\n ]);\n }\n\n // Multi-option prompt (no single authenticator selected)\n if (hasMultipleOptions() && !currentAuthenticator.value) {\n const available: EmbeddedSignInFlowAuthenticator[] = getAvailableAuthenticators();\n\n const userPromptAuths: EmbeddedSignInFlowAuthenticator[] = available.filter(\n (auth: any) =>\n auth.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.UserPrompt ||\n (auth.idp === 'LOCAL' && auth.metadata?.params && auth.metadata.params.length > 0),\n );\n\n const optionAuths: EmbeddedSignInFlowAuthenticator[] = available\n .filter((auth: any) => !userPromptAuths.includes(auth))\n .filter((auth: any) => !HIDDEN_AUTHENTICATORS.includes(auth.authenticatorId));\n\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => {\n const children: VNode[] = [];\n\n // Header\n if (props.showTitle || props.showSubtitle) {\n children.push(\n h('div', {class: withVendorCSSClassPrefix('signin__header')}, [\n props.showTitle\n ? h(Typography, {variant: 'h2'}, {default: () => flowTitle.value || t('signin.heading')})\n : null,\n props.showSubtitle\n ? h(\n Typography,\n {variant: 'body1'},\n {default: () => flowSubtitle.value || t('signin.subheading')},\n )\n : null,\n ]),\n );\n }\n\n // Flow messages\n if (flowMessages.value?.length > 0) {\n children.push(\n h(\n 'div',\n {class: withVendorCSSClassPrefix('signin__flow-messages')},\n flowMessages.value.map((fm: any, i: number) =>\n h(Alert, {key: fm.id || i, severity: fm.type}, {default: () => fm.message}),\n ),\n ),\n );\n }\n\n // Local messages & error\n if (messages.value.length > 0) children.push(h('div', {}, renderMessages()));\n const errNode: VNode | null = renderError();\n if (errNode) children.push(errNode);\n\n // User prompt authenticators (forms)\n userPromptAuths.forEach((auth: EmbeddedSignInFlowAuthenticator, index: number) => {\n if (index > 0) children.push(h(Divider, {}, {default: () => 'OR'}));\n children.push(\n h(\n 'form',\n {\n onSubmit: (e: Event) => {\n e.preventDefault();\n const fd: Record<string, string> = {};\n auth.metadata?.params?.forEach((p: any) => {\n fd[p.param] = formValues.value[p.param] || '';\n });\n handleAuthenticatorSelection(auth, fd);\n },\n },\n [\n createSignInOptionFromAuthenticator(\n auth,\n formValues.value,\n touchedFields.value,\n isLoading(),\n handleInputChange,\n (a: any, fd: any) => handleAuthenticatorSelection(a, fd),\n t,\n {\n buttonClassName: props.buttonClassName,\n error: error.value,\n inputClassName: props.inputClassName,\n },\n ),\n ],\n ),\n );\n });\n\n // Divider between user prompts and options\n if (userPromptAuths.length > 0 && optionAuths.length > 0) {\n children.push(h(Divider, {}, {default: () => 'OR'}));\n }\n\n // Option authenticators (social, multi-option buttons)\n optionAuths.forEach((auth: EmbeddedSignInFlowAuthenticator) => {\n children.push(\n h('div', {key: auth.authenticatorId}, [\n createSignInOptionFromAuthenticator(\n auth,\n formValues.value,\n touchedFields.value,\n isLoading(),\n handleInputChange,\n (a: any, fd: any) => handleAuthenticatorSelection(a, fd),\n t,\n {\n buttonClassName: props.buttonClassName,\n error: error.value,\n inputClassName: props.inputClassName,\n },\n ),\n ]),\n );\n });\n\n return children;\n },\n },\n ),\n ]);\n }\n\n // No authenticator available (error state)\n if (!currentAuthenticator.value) {\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => {\n const errNode: VNode | null = renderError();\n return errNode\n ? [errNode]\n : [h(Typography, {variant: 'body1'}, {default: () => t('messages.loading.placeholder')})];\n },\n },\n ),\n ]);\n }\n\n // Passkey auto-trigger\n if (isPasskeyAuthenticator(currentAuthenticator.value) && !isLoading()) {\n handleAuthenticatorSelection(currentAuthenticator.value);\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => [\n h('div', {style: 'text-align:center'}, [\n h(Spinner, {size: 'large'}),\n h(\n Typography,\n {variant: 'body1'},\n {default: () => t('passkey.authenticating') || 'Authenticating with passkey...'},\n ),\n ]),\n ],\n },\n ),\n ]);\n }\n\n // Single authenticator form\n return h('div', {}, [\n props.showLogo ? h('div', {class: withVendorCSSClassPrefix('signin__logo')}, [h(Logo)]) : null,\n h(\n Card,\n {class: cardClass, variant: props.variant},\n {\n default: () => {\n const children: VNode[] = [];\n\n // Header\n children.push(\n h('div', {class: withVendorCSSClassPrefix('signin__header')}, [\n h(Typography, {variant: 'h2'}, {default: () => flowTitle.value || t('signin.heading')}),\n h(Typography, {variant: 'body1'}, {default: () => flowSubtitle.value || t('signin.subheading')}),\n ]),\n );\n\n // Flow messages\n if (flowMessages.value?.length > 0) {\n children.push(\n h(\n 'div',\n {class: withVendorCSSClassPrefix('signin__flow-messages')},\n flowMessages.value.map((fm: any, i: number) =>\n h(Alert, {key: fm.id || i, severity: fm.type}, {default: () => fm.message}),\n ),\n ),\n );\n }\n\n // Local messages & error\n if (messages.value.length > 0) children.push(h('div', {}, renderMessages()));\n const errNode: VNode | null = renderError();\n if (errNode) children.push(errNode);\n\n // Form\n children.push(\n h(\n 'form',\n {\n class: withVendorCSSClassPrefix('signin__form'),\n onSubmit: (e: Event) => {\n e.preventDefault();\n const fd: Record<string, string> = {};\n currentAuthenticator.value!.metadata?.params?.forEach((p: any) => {\n fd[p.param] = formValues.value[p.param] || '';\n });\n handleSubmit(fd);\n },\n },\n [\n createSignInOptionFromAuthenticator(\n currentAuthenticator.value,\n formValues.value,\n touchedFields.value,\n isLoading(),\n handleInputChange,\n (_: any, fd: any) => handleSubmit(fd || formValues.value),\n t,\n {\n buttonClassName: props.buttonClassName,\n error: error.value,\n inputClassName: props.inputClassName,\n },\n ),\n ],\n ),\n );\n\n return children;\n },\n },\n ),\n ]);\n };\n },\n});\n\nexport default BaseSignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n ApplicationNativeAuthenticationConstants,\n EmbeddedSignInFlowAuthenticator,\n EmbeddedSignInFlowAuthenticatorKnownIdPType,\n EmbeddedSignInFlowAuthenticatorParamType,\n FieldType,\n} from '@asgardeo/browser';\nimport {type VNode, h} from 'vue';\nimport FacebookButton from '../../../../adapters/FacebookButton';\nimport GitHubButton from '../../../../adapters/GitHubButton';\nimport GoogleButton from '../../../../adapters/GoogleButton';\nimport MicrosoftButton from '../../../../adapters/MicrosoftButton';\nimport {createField} from '../../../../factories/FieldFactory';\nimport Button from '../../../../primitives/Button';\n\n/**\n * Props shared by sign-in option rendering functions.\n */\nexport interface BaseSignInOptionProps {\n authenticator: EmbeddedSignInFlowAuthenticator;\n buttonClassName?: string;\n error?: string | null;\n formValues: Record<string, string>;\n inputClassName?: string;\n isLoading: boolean;\n onInputChange: (param: string, value: string) => void;\n onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;\n t: (key: string, params?: Record<string, string>) => string;\n touchedFields: Record<string, boolean>;\n}\n\n/**\n * Renders form fields for authenticators that require user input (e.g. UsernamePassword, IdentifierFirst).\n */\nconst renderFormFields = (props: BaseSignInOptionProps): VNode[] => {\n const {authenticator, formValues, touchedFields, isLoading, onInputChange, inputClassName, buttonClassName, t} =\n props;\n\n const formFields: any[] =\n authenticator.metadata?.params\n ?.sort((a: any, b: any) => a.order - b.order)\n ?.filter((param: any) => param.param !== 'totp') || [];\n\n const fieldNodes: VNode[] = formFields.map((param: any) =>\n h(\n 'div',\n {key: param.param},\n createField({\n className: inputClassName,\n disabled: isLoading,\n label: param.displayName,\n name: param.param,\n onChange: (value: string) => onInputChange(param.param, value),\n placeholder: t('elements.fields.generic.placeholder', {\n field: (param.displayName || param.param).toLowerCase(),\n }),\n required: authenticator.requiredParams.includes(param.param),\n touched: touchedFields[param.param] || false,\n type:\n param.type === EmbeddedSignInFlowAuthenticatorParamType.String && param.confidential\n ? FieldType.Password\n : FieldType.Text,\n value: formValues[param.param] || '',\n }),\n ),\n );\n\n fieldNodes.push(\n h(\n Button,\n {\n class: buttonClassName,\n color: 'primary',\n 'data-testid': 'asgardeo-signin-submit',\n disabled: isLoading,\n fullWidth: true,\n loading: isLoading,\n type: 'submit',\n variant: 'solid',\n },\n {default: () => t('username.password.buttons.submit.text')},\n ),\n );\n\n return fieldNodes;\n};\n\n/**\n * Renders a multi-option button for authenticators that require selection\n * but no immediate user input (e.g. EmailOtp, SmsOtp, Totp, Passkey).\n */\nconst renderMultiOptionButton = (props: BaseSignInOptionProps): VNode => {\n const {authenticator, isLoading, onSubmit, buttonClassName, t} = props;\n\n let authenticatorName: string = authenticator.authenticator;\n if (authenticator.idp !== EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {\n authenticatorName = authenticator.idp;\n }\n\n const displayName: string = t('elements.buttons.multi.option.text', {connection: authenticatorName});\n\n const iconPathMap: Record<string, string> = {\n [ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp]:\n 'M20 15.5c-1.25 0-2.45-.2-3.57-.57a1.02 1.02 0 0 0-1.02.24l-2.2 2.2a15.074 15.074 0 0 1-6.59-6.59l2.2-2.2c.27-.27.35-.67.24-1.02A11.36 11.36 0 0 1 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1M12 3v10l3-3h6V3z',\n [ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp]:\n 'M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4l-8 5l-8-5V6l8 5l8-5z',\n [ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp]:\n 'M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5z',\n };\n\n const iconPath: string =\n iconPathMap[authenticator.authenticatorId] ||\n 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z';\n\n const icon: VNode = h('svg', {height: '18', viewBox: '0 0 24 24', width: '18', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('path', {d: iconPath, fill: 'currentColor'}),\n ]);\n\n return h(\n Button,\n {\n class: buttonClassName,\n color: 'secondary',\n disabled: isLoading,\n fullWidth: true,\n onClick: () => onSubmit(authenticator),\n startIcon: icon,\n type: 'button',\n variant: 'solid',\n },\n {default: () => displayName},\n );\n};\n\n/**\n * Renders a generic social/federated login button for unknown federated authenticators.\n */\nconst renderSocialButton = (props: BaseSignInOptionProps): VNode => {\n const {authenticator, isLoading, onSubmit, buttonClassName, t} = props;\n\n const socialIcon: VNode = h(\n 'svg',\n {height: '18', viewBox: '0 0 24 24', width: '18', xmlns: 'http://www.w3.org/2000/svg'},\n [\n h('path', {\n d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z',\n fill: 'currentColor',\n }),\n ],\n );\n\n return h(\n Button,\n {\n class: buttonClassName,\n color: 'secondary',\n disabled: isLoading,\n fullWidth: true,\n onClick: () => onSubmit(authenticator),\n startIcon: socialIcon,\n type: 'button',\n variant: 'outline',\n },\n {default: () => t('elements.buttons.social.text', {connection: authenticator.idp})},\n );\n};\n\n/**\n * Creates the appropriate sign-in VNode(s) based on the authenticator's ID.\n */\nexport const createSignInOption = (props: BaseSignInOptionProps): VNode | VNode[] => {\n const {authenticator, onSubmit, buttonClassName, isLoading} = props;\n const hasParams: boolean = !!(authenticator.metadata?.params && authenticator.metadata.params.length > 0);\n\n switch (authenticator.authenticatorId) {\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.UsernamePassword:\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.IdentifierFirst:\n return h('div', {}, renderFormFields(props));\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Google:\n return h(GoogleButton, {\n class: buttonClassName,\n isLoading,\n onClick: () => onSubmit(authenticator),\n });\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.GitHub:\n return h(GitHubButton, {\n class: buttonClassName,\n isLoading,\n onClick: () => onSubmit(authenticator),\n });\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Microsoft:\n return h(MicrosoftButton, {\n class: buttonClassName,\n isLoading,\n onClick: () => onSubmit(authenticator),\n });\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Facebook:\n return h(FacebookButton, {\n class: buttonClassName,\n isLoading,\n onClick: () => onSubmit(authenticator),\n });\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:\n return hasParams ? h('div', {}, renderFormFields(props)) : renderMultiOptionButton(props);\n\n default:\n // Federated (non-LOCAL) authenticators \u2192 generic social button\n if (authenticator.idp !== EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {\n return renderSocialButton(props);\n }\n // LOCAL with params \u2192 form fields fallback; otherwise multi-option button\n return hasParams ? h('div', {}, renderFormFields(props)) : renderMultiOptionButton(props);\n }\n};\n\n/**\n * Convenience function to create sign-in option VNode(s) from an authenticator.\n */\nexport const createSignInOptionFromAuthenticator = (\n authenticator: EmbeddedSignInFlowAuthenticator,\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n isLoading: boolean,\n onInputChange: (param: string, value: string) => void,\n onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void,\n t: (key: string, params?: Record<string, string>) => string,\n options?: {\n buttonClassName?: string;\n error?: string | null;\n inputClassName?: string;\n },\n): VNode | VNode[] =>\n createSignInOption({\n authenticator,\n formValues,\n isLoading,\n onInputChange,\n onSubmit,\n t,\n touchedFields,\n ...options,\n });\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {defineComponent, h, type Component, type SetupContext, type VNode} from 'vue';\nimport useI18n from '../../composables/useI18n';\nimport Button from '../primitives/Button';\n\n/**\n * Facebook Sign-In Button Component.\n * Handles authentication with Facebook identity provider.\n */\nconst FacebookButton: Component = defineComponent({\n emits: ['click'],\n name: 'FacebookButton',\n props: {\n isLoading: {default: false, type: Boolean},\n },\n setup(props: {isLoading: boolean}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {t} = useI18n();\n\n const facebookIcon = (): VNode =>\n h('svg', {height: '18', viewBox: '0 0 512 512', width: '18', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('path', {\n d: 'M448,0H64C28.704,0,0,28.704,0,64v384c0,35.296,28.704,64,64,64h384c35.296,0,64-28.704,64-64V64C512,28.704,483.296,0,448,0z',\n fill: '#1976D2',\n }),\n h('path', {\n d: 'M432,256h-80v-64c0-17.664,14.336-16,32-16h32V96h-64l0,0c-53.024,0-96,42.976-96,96v64h-64v80h64v176h96V336h48L432,256z',\n fill: '#FAFAFA',\n }),\n ]);\n\n return (): VNode =>\n h(\n Button,\n {\n ...attrs,\n color: 'primary' as const,\n disabled: props.isLoading,\n fullWidth: true,\n type: 'button' as const,\n variant: 'solid' as const,\n ...(slots['default'] ? {} : {startIcon: facebookIcon()}),\n onClick: (e: MouseEvent) => emit('click', e),\n },\n () =>\n slots['default']?.({isLoading: props.isLoading}) ??\n (t('elements.buttons.facebook.text') || 'Sign in with Facebook'),\n );\n },\n});\n\nexport default FacebookButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {defineComponent, h, type Component, type SetupContext, type VNode} from 'vue';\nimport useI18n from '../../composables/useI18n';\nimport Button from '../primitives/Button';\n\n/**\n * GitHub Sign-In Button Component.\n * Handles authentication with GitHub identity provider.\n */\nconst GitHubButton: Component = defineComponent({\n emits: ['click'],\n name: 'GitHubButton',\n props: {\n isLoading: {default: false, type: Boolean},\n },\n setup(props: {isLoading: boolean}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {t} = useI18n();\n\n const gitHubIcon = (): VNode =>\n h('svg', {height: '18', viewBox: '0 0 67.91 66.233', width: '18', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('g', {transform: 'translate(-386.96 658.072)'}, [\n h('path', {\n d: 'M420.915-658.072a33.956,33.956,0,0,0-33.955,33.955,33.963,33.963,0,0,0,23.221,32.22c1.7.314,2.32-.737,2.32-1.633,0-.81-.031-3.484-.046-6.322-9.446,2.054-11.44-4.006-11.44-4.006-1.545-3.925-3.77-4.968-3.77-4.968-3.081-2.107.232-2.064.232-2.064,3.41.239,5.205,3.5,5.205,3.5,3.028,5.19,7.943,3.69,9.881,2.822a7.23,7.23,0,0,1,2.156-4.54c-7.542-.859-15.47-3.77-15.47-16.781a13.141,13.141,0,0,1,3.5-9.114,12.2,12.2,0,0,1,.329-8.986s2.851-.913,9.34,3.48a32.545,32.545,0,0,1,8.5-1.143,32.629,32.629,0,0,1,8.506,1.143c6.481-4.393,9.328-3.48,9.328-3.48a12.185,12.185,0,0,1,.333,8.986,13.115,13.115,0,0,1,3.495,9.114c0,13.042-7.943,15.913-15.5,16.754,1.218,1.054,2.3,3.12,2.3,6.288,0,4.543-.039,8.2-.039,9.318,0,.9.611,1.962,2.332,1.629a33.959,33.959,0,0,0,23.2-32.215,33.955,33.955,0,0,0-33.955-33.955',\n fill: 'currentColor',\n }),\n ]),\n ]);\n\n return (): VNode =>\n h(\n Button,\n {\n ...attrs,\n color: 'secondary' as const,\n disabled: props.isLoading,\n fullWidth: true,\n type: 'button' as const,\n variant: 'solid' as const,\n ...(slots['default'] ? {} : {startIcon: gitHubIcon()}),\n onClick: (e: MouseEvent) => emit('click', e),\n },\n () =>\n slots['default']?.({isLoading: props.isLoading}) ??\n (t('elements.buttons.github.text') || 'Sign in with GitHub'),\n );\n },\n});\n\nexport default GitHubButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {defineComponent, h, type Component, type SetupContext, type VNode} from 'vue';\nimport useI18n from '../../composables/useI18n';\nimport Button from '../primitives/Button';\n\n/**\n * Google Sign-In Button Component.\n * Handles authentication with Google identity provider.\n */\nconst GoogleButton: Component = defineComponent({\n emits: ['click'],\n name: 'GoogleButton',\n props: {\n isLoading: {default: false, type: Boolean},\n },\n setup(props: {isLoading: boolean}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {t} = useI18n();\n\n const googleIcon = (): VNode =>\n h('svg', {height: '18', viewBox: '0 0 67.91 67.901', width: '18', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('g', {transform: 'translate(-0.001 -0.001)'}, [\n h('path', {\n d: 'M15.049,160.965l-2.364,8.824-8.639.183a34.011,34.011,0,0,1-.25-31.7h0l7.691,1.41,3.369,7.645a20.262,20.262,0,0,0,.19,13.642Z',\n fill: '#fbbb00',\n transform: 'translate(0 -119.93)',\n }),\n h('path', {\n d: 'M294.24,208.176A33.939,33.939,0,0,1,282.137,241h0l-9.687-.494-1.371-8.559a20.235,20.235,0,0,0,8.706-10.333H261.628V208.176Z',\n fill: '#518ef8',\n transform: 'translate(-226.93 -180.567)',\n }),\n h('path', {\n d: 'M81.668,328.8h0a33.962,33.962,0,0,1-51.161-10.387l11-9.006a20.192,20.192,0,0,0,29.1,10.338Z',\n fill: '#28b446',\n transform: 'translate(-26.463 -268.374)',\n }),\n h('path', {\n d: 'M80.451,7.816l-11,9A20.19,20.19,0,0,0,39.686,27.393l-11.06-9.055h0A33.959,33.959,0,0,1,80.451,7.816Z',\n fill: '#f14336',\n transform: 'translate(-24.828)',\n }),\n ]),\n ]);\n\n return (): VNode =>\n h(\n Button,\n {\n ...attrs,\n color: 'secondary' as const,\n disabled: props.isLoading,\n fullWidth: true,\n type: 'button' as const,\n variant: 'solid' as const,\n ...(slots['default'] ? {} : {startIcon: googleIcon()}),\n onClick: (e: MouseEvent) => emit('click', e),\n },\n () =>\n slots['default']?.({isLoading: props.isLoading}) ??\n (t('elements.buttons.google.text') || 'Sign in with Google'),\n );\n },\n});\n\nexport default GoogleButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {defineComponent, h, type Component, type SetupContext, type VNode} from 'vue';\nimport useI18n from '../../composables/useI18n';\nimport Button from '../primitives/Button';\n\n/**\n * Microsoft Sign-In Button Component.\n * Handles authentication with Microsoft identity provider.\n */\nconst MicrosoftButton: Component = defineComponent({\n emits: ['click'],\n name: 'MicrosoftButton',\n props: {\n isLoading: {default: false, type: Boolean},\n },\n setup(props: {isLoading: boolean}, {slots, emit, attrs}: SetupContext): () => VNode {\n const {t} = useI18n();\n\n const microsoftIcon = (): VNode =>\n h('svg', {height: '14', viewBox: '0 0 23 23', width: '14', xmlns: 'http://www.w3.org/2000/svg'}, [\n h('path', {d: 'M0 0h23v23H0z', fill: '#f3f3f3'}),\n h('path', {d: 'M1 1h10v10H1z', fill: '#f35325'}),\n h('path', {d: 'M12 1h10v10H12z', fill: '#81bc06'}),\n h('path', {d: 'M1 12h10v10H1z', fill: '#05a6f0'}),\n h('path', {d: 'M12 12h10v10H12z', fill: '#ffba08'}),\n ]);\n\n return (): VNode =>\n h(\n Button,\n {\n ...attrs,\n color: 'secondary' as const,\n disabled: props.isLoading,\n fullWidth: true,\n type: 'button' as const,\n variant: 'solid' as const,\n ...(slots['default'] ? {} : {startIcon: microsoftIcon()}),\n onClick: (e: MouseEvent) => emit('click', e),\n },\n () =>\n slots['default']?.({isLoading: props.isLoading}) ??\n (t('elements.buttons.microsoft.text') || 'Sign in with Microsoft'),\n );\n },\n});\n\nexport default MicrosoftButton;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FieldType} from '@asgardeo/browser';\nimport {type Component, type PropType, type VNode, defineComponent, h} from 'vue';\nimport Checkbox from '../primitives/Checkbox';\nimport DatePicker from '../primitives/DatePicker';\nimport OtpField from '../primitives/OtpField';\nimport PasswordField from '../primitives/PasswordField';\nimport Select, {type SelectOption} from '../primitives/Select/Select';\nimport TextField from '../primitives/TextField';\n\n/**\n * Interface for field configuration.\n */\nexport interface FieldConfig {\n className?: string;\n disabled?: boolean;\n error?: string;\n label: string;\n name: string;\n onBlur?: () => void;\n onChange: (value: string) => void;\n options?: SelectOption[];\n placeholder?: string;\n required: boolean;\n touched?: boolean;\n type: FieldType;\n value: string;\n}\n\ninterface FieldFactorySetupProps {\n className?: string;\n disabled: boolean;\n error?: string;\n label: string;\n name: string;\n options: SelectOption[];\n placeholder?: string;\n required: boolean;\n touched: boolean;\n type: FieldType;\n value: string;\n}\n\n/**\n * Utility function to validate field values based on type.\n */\nexport const validateFieldValue = (\n value: string,\n type: FieldType,\n required: boolean = false,\n touched: boolean = false,\n): string | null => {\n if (required && touched && (!value || value.trim() === '')) {\n return 'This field is required';\n }\n\n if (!value || value.trim() === '') {\n return null;\n }\n\n switch (type) {\n case FieldType.Number: {\n const numValue: number = parseInt(value, 10);\n if (Number.isNaN(numValue)) {\n return 'Please enter a valid number';\n }\n break;\n }\n default:\n break;\n }\n\n return null;\n};\n\n/**\n * Factory function to create form field VNodes based on FieldType.\n */\nexport const createField = (config: FieldConfig): VNode => {\n const {\n name,\n type,\n label,\n required,\n value,\n onChange,\n onBlur,\n disabled = false,\n error,\n className,\n options = [],\n touched = false,\n placeholder,\n } = config;\n\n const validationError: string | null | undefined = error || validateFieldValue(value, type, required, touched);\n\n const commonProps: Record<string, unknown> = {\n class: className,\n 'data-testid': `asgardeo-signin-${name}`,\n disabled,\n error: validationError,\n label,\n modelValue: value,\n name,\n onBlur,\n placeholder,\n required,\n };\n\n switch (type) {\n case FieldType.Password:\n return h(PasswordField, {\n ...commonProps,\n 'onUpdate:modelValue': onChange,\n } as Record<string, unknown>);\n\n case FieldType.Text:\n return h(TextField, {\n ...commonProps,\n autocomplete: 'off',\n 'onUpdate:modelValue': onChange,\n type: 'text',\n } as Record<string, unknown>);\n\n case FieldType.Email:\n return h(TextField, {\n ...commonProps,\n autocomplete: 'email',\n 'onUpdate:modelValue': onChange,\n type: 'email',\n } as Record<string, unknown>);\n\n case FieldType.Date:\n return h(DatePicker, {\n ...commonProps,\n 'onUpdate:modelValue': onChange,\n } as Record<string, unknown>);\n\n case FieldType.Checkbox: {\n const isChecked: boolean = value === 'true' || (value as unknown) === true;\n\n return h(Checkbox, {\n ...commonProps,\n modelValue: isChecked,\n 'onUpdate:modelValue': (checked: boolean) => onChange(checked.toString()),\n } as Record<string, unknown>);\n }\n\n case FieldType.Otp:\n return h(OtpField, {\n ...commonProps,\n 'onUpdate:modelValue': onChange,\n } as Record<string, unknown>);\n\n case FieldType.Number:\n return h(TextField, {\n ...commonProps,\n helperText: 'Enter a numeric value',\n 'onUpdate:modelValue': onChange,\n type: 'number',\n } as Record<string, unknown>);\n\n case FieldType.Select: {\n const fieldOptions: SelectOption[] = options.length > 0 ? options : [];\n\n if (fieldOptions.length > 0) {\n return h(Select, {\n ...commonProps,\n helperText: 'Select from available options',\n 'onUpdate:modelValue': onChange,\n options: fieldOptions,\n } as Record<string, unknown>);\n }\n\n return h(TextField, {\n ...commonProps,\n helperText: 'Enter multiple values separated by commas (e.g., value1, value2, value3)',\n 'onUpdate:modelValue': onChange,\n placeholder: 'value1, value2, value3',\n type: 'text',\n } as Record<string, unknown>);\n }\n\n default:\n return h(TextField, {\n ...commonProps,\n helperText: 'Unknown field type, treating as text',\n 'onUpdate:modelValue': onChange,\n type: 'text',\n } as Record<string, unknown>);\n }\n};\n\n/**\n * FieldFactory \u2014 Vue component wrapper for the field factory.\n */\nconst FieldFactory: Component = defineComponent({\n emits: ['change', 'blur'],\n name: 'FieldFactory',\n props: {\n className: {default: undefined, type: String},\n disabled: {default: false, type: Boolean},\n error: {default: undefined, type: String},\n label: {required: true, type: String},\n name: {required: true, type: String},\n options: {default: () => [], type: Array as PropType<SelectOption[]>},\n placeholder: {default: undefined, type: String},\n required: {default: false, type: Boolean},\n touched: {default: false, type: Boolean},\n type: {required: true, type: String as PropType<FieldType>},\n value: {default: '', type: String},\n },\n setup(props: FieldFactorySetupProps, {emit}: {emit: any}): any {\n return () =>\n createField({\n className: props.className,\n disabled: props.disabled,\n error: props.error,\n label: props.label,\n name: props.name,\n onBlur: () => emit('blur'),\n onChange: (value: string) => emit('change', value),\n options: props.options,\n placeholder: props.placeholder,\n required: props.required,\n touched: props.touched,\n type: props.type,\n value: props.value,\n });\n },\n});\n\nexport default FieldFactory;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoRuntimeError,\n EmbeddedFlowComponentV2 as EmbeddedFlowComponent,\n EmbeddedFlowType,\n EmbeddedSignInFlowRequestV2,\n EmbeddedSignInFlowResponseV2,\n EmbeddedSignInFlowStatusV2,\n EmbeddedSignInFlowTypeV2,\n FlowMetadataResponse,\n} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n ref,\n watch,\n} from 'vue';\nimport BaseSignIn from './BaseSignIn';\nimport useAsgardeo from '../../../../composables/useAsgardeo';\nimport useFlowMeta from '../../../../composables/useFlowMeta';\nimport useI18n from '../../../../composables/useI18n';\nimport {useOAuthCallback} from '../../../../composables/v2/useOAuthCallback';\nimport {initiateOAuthRedirect} from '../../../../utils/oauth';\nimport {normalizeFlowResponse} from '../../../../utils/v2/flowTransformer';\nimport {handlePasskeyAuthentication, handlePasskeyRegistration} from '../../../../utils/v2/passkey';\n\nconst EXECUTION_ID_STORAGE_KEY: string = 'asgardeo_execution_id';\nconst AUTH_ID_STORAGE_KEY: string = 'asgardeo_auth_id';\n\ninterface PasskeyState {\n actionId: string | null;\n challenge: string | null;\n creationOptions: string | null;\n error: Error | null;\n executionId: string | null;\n isActive: boolean;\n}\n\n/**\n * Render props passed to the default scoped slot for custom UI rendering.\n */\nexport interface SignInRenderProps {\n additionalData?: Record<string, any>;\n components: EmbeddedFlowComponent[];\n error: Error | null;\n initialize: () => Promise<void>;\n isInitialized: boolean;\n isLoading: boolean;\n isTimeoutDisabled?: boolean;\n meta: FlowMetadataResponse | null;\n onSubmit: (payload: EmbeddedSignInFlowRequestV2) => Promise<void>;\n}\n\n/**\n * SignIn \u2014 app-native sign-in component with full flow lifecycle management.\n *\n * Initializes the authentication flow, handles passkey authentication/registration,\n * OAuth redirect flows, and renders the UI via `BaseSignIn` or a scoped slot.\n *\n * @example\n * ```vue\n * <!-- Default UI -->\n * <SignIn\n * @success=\"(data) => console.log('Authenticated:', data)\"\n * @error=\"(err) => console.error('Auth failed:', err)\"\n * />\n *\n * <!-- Custom UI via scoped slot -->\n * <SignIn v-slot=\"{ components, onSubmit, isLoading, error }\">\n * <!-- your custom sign-in UI here -->\n * </SignIn>\n * ```\n */\nconst SignIn: Component = defineComponent({\n emits: ['error', 'success'],\n name: 'SignIn',\n props: {\n className: {default: '', type: String},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(\n props: Readonly<{className: string; size: 'small' | 'medium' | 'large'; variant: 'elevated' | 'outlined' | 'flat'}>,\n {slots, emit, attrs}: SetupContext,\n ): () => VNode | null {\n const {applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading} = useAsgardeo();\n const {meta: flowMeta} = useFlowMeta();\n const {t} = useI18n();\n\n // Flow state\n const components: Ref<EmbeddedFlowComponent[]> = ref([]);\n const additionalData: Ref<Record<string, any>> = ref({});\n const currentExecutionId: Ref<string | null> = ref(null);\n const isFlowInitialized: Ref<boolean> = ref(false);\n const flowError: Ref<Error | null> = ref(null);\n const isSubmitting: Ref<boolean> = ref(false);\n const isTimeoutDisabled: Ref<boolean> = ref(false);\n const passkeyState: Ref<PasskeyState> = ref({\n actionId: null,\n challenge: null,\n creationOptions: null,\n error: null,\n executionId: null,\n isActive: false,\n });\n\n // Track one-time initialization and OAuth processing\n let initializationAttempted: boolean = false;\n const oauthCodeProcessedFlag: {value: boolean} = {value: false};\n let passkeyProcessed: boolean = false;\n\n // \u2500\u2500 Helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n const persistExecutionId = (executionId: string | null): void => {\n currentExecutionId.value = executionId;\n if (executionId) {\n sessionStorage.setItem(EXECUTION_ID_STORAGE_KEY, executionId);\n } else {\n sessionStorage.removeItem(EXECUTION_ID_STORAGE_KEY);\n }\n };\n\n const clearFlowState = (): void => {\n persistExecutionId(null);\n isFlowInitialized.value = false;\n sessionStorage.removeItem(AUTH_ID_STORAGE_KEY);\n isTimeoutDisabled.value = false;\n oauthCodeProcessedFlag.value = false;\n };\n\n interface UrlParams {\n applicationId: string | null;\n authId: string | null;\n code: string | null;\n error: string | null;\n errorDescription: string | null;\n executionId: string | null;\n nonce: string | null;\n state: string | null;\n }\n\n const getUrlParams = (): UrlParams => {\n const params: URLSearchParams = new URLSearchParams(window?.location?.search ?? '');\n return {\n applicationId: params.get('applicationId'),\n authId: params.get('authId'),\n code: params.get('code'),\n error: params.get('error'),\n errorDescription: params.get('error_description'),\n executionId: params.get('executionId'),\n nonce: params.get('nonce'),\n state: params.get('state'),\n };\n };\n\n const cleanupOAuthUrlParams = (): void => {\n if (!window?.location?.href) return;\n const url: URL = new URL(window.location.href);\n ['error', 'error_description', 'code', 'state', 'nonce'].forEach((p: string) => url.searchParams.delete(p));\n window.history.replaceState({}, '', url.toString());\n };\n\n const cleanupFlowUrlParams = (): void => {\n if (!window?.location?.href) return;\n const url: URL = new URL(window.location.href);\n ['executionId', 'authId', 'applicationId'].forEach((p: string) => url.searchParams.delete(p));\n window.history.replaceState({}, '', url.toString());\n };\n\n const setError = (error: Error): void => {\n flowError.value = error;\n isFlowInitialized.value = true;\n emit('error', error);\n };\n\n // \u2500\u2500 Flow initialization \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n const initializeFlow = async (): Promise<void> => {\n const urlParams: UrlParams = getUrlParams();\n\n oauthCodeProcessedFlag.value = false;\n\n if (urlParams.authId) {\n sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);\n }\n\n const effectiveApplicationId: string | null | undefined =\n (applicationId as string | undefined) || urlParams.applicationId;\n\n if (!urlParams.executionId && !effectiveApplicationId) {\n const err: AsgardeoRuntimeError = new AsgardeoRuntimeError(\n 'Either executionId or applicationId is required for authentication',\n 'SIGN_IN_ERROR',\n 'vue',\n );\n setError(err);\n throw err;\n }\n\n try {\n flowError.value = null;\n\n let response: EmbeddedSignInFlowResponseV2;\n\n if (urlParams.executionId) {\n response = (await signIn({executionId: urlParams.executionId})) as EmbeddedSignInFlowResponseV2;\n } else {\n response = (await signIn({\n applicationId: effectiveApplicationId,\n flowType: EmbeddedFlowType.Authentication,\n })) as EmbeddedSignInFlowResponseV2;\n }\n\n // Handle OAuth redirect types\n if (response.type === EmbeddedSignInFlowTypeV2.Redirection) {\n const redirectURL: string | undefined = (response.data as any)?.redirectURL || (response as any)?.redirectURL;\n if (redirectURL && window?.location) {\n if (response.executionId) persistExecutionId(response.executionId);\n if (urlParams.authId) sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);\n initiateOAuthRedirect(redirectURL);\n return;\n }\n }\n\n const {\n executionId: normalizedExecutionId,\n components: normalizedComponents,\n additionalData: normalizedAdditionalData,\n } = normalizeFlowResponse(response, t, {resolveTranslations: false}, flowMeta.value);\n\n if (normalizedExecutionId && normalizedComponents) {\n persistExecutionId(normalizedExecutionId);\n components.value = normalizedComponents;\n additionalData.value = normalizedAdditionalData ?? {};\n isFlowInitialized.value = true;\n isTimeoutDisabled.value = false;\n cleanupFlowUrlParams();\n }\n } catch (error: unknown) {\n const err: any = error as any;\n clearFlowState();\n const errorMessage: string = err?.failureReason || (err instanceof Error ? err.message : String(err));\n setError(new Error(errorMessage));\n initializationAttempted = false;\n }\n };\n\n // \u2500\u2500 Submit handler \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n const handleSubmit = async (payload: EmbeddedSignInFlowRequestV2): Promise<void> => {\n const effectiveExecutionId: string | null = payload.executionId || currentExecutionId.value;\n\n if (!effectiveExecutionId) {\n throw new Error('No active flow ID');\n }\n\n const processedInputs: Record<string, any> = {...payload.inputs};\n\n // Auto-compile consent decisions if on a consent prompt step\n if (additionalData.value?.['consentPrompt']) {\n try {\n const consentRaw: any = additionalData.value['consentPrompt'];\n const purposes: any[] =\n typeof consentRaw === 'string' ? JSON.parse(consentRaw) : consentRaw.purposes || consentRaw;\n\n let isDeny: boolean = false;\n if (payload.action) {\n const findAction = (comps: any[]): any => {\n if (!comps?.length) return null;\n const found: any = comps.find((c: any) => c.id === payload.action);\n if (found) return found;\n return comps.reduce((acc: any, c: any) => acc || (c.components ? findAction(c.components) : null), null);\n };\n const submitAction: any = findAction(components.value as any[]);\n if (submitAction && submitAction.variant?.toLowerCase() !== 'primary') {\n isDeny = true;\n }\n }\n\n const decisions: Record<string, any> = {\n purposes: purposes.map((p: any) => ({\n approved: !isDeny,\n elements: [\n ...(p.essential || []).map((attr: string) => ({approved: !isDeny, name: attr})),\n ...(p.optional || []).map((attr: string) => {\n const key: string = `__consent_opt__${p.purpose_id}__${attr}`;\n return {approved: isDeny ? false : processedInputs[key] !== 'false', name: attr};\n }),\n ],\n purpose_name: p.purpose_name,\n })),\n };\n processedInputs['consent_decisions'] = JSON.stringify(decisions);\n\n Object.keys(processedInputs).forEach((key: string) => {\n if (key.startsWith('__consent_opt__')) delete processedInputs[key];\n });\n } catch {\n // Ignore consent construction failures\n }\n }\n\n try {\n isSubmitting.value = true;\n flowError.value = null;\n\n const response: EmbeddedSignInFlowResponseV2 = (await signIn({\n executionId: effectiveExecutionId,\n ...payload,\n inputs: processedInputs,\n })) as EmbeddedSignInFlowResponseV2;\n\n // Handle OAuth redirect\n if (response.type === EmbeddedSignInFlowTypeV2.Redirection) {\n const redirectURL: string | undefined = (response.data as any)?.redirectURL || (response as any)?.redirectURL;\n if (redirectURL && window?.location) {\n if (response.executionId) persistExecutionId(response.executionId);\n const urlParams: UrlParams = getUrlParams();\n if (urlParams.authId) sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);\n initiateOAuthRedirect(redirectURL);\n return;\n }\n }\n\n // Handle passkey challenge in response\n if (\n response.data?.additionalData?.['passkeyChallenge'] ||\n response.data?.additionalData?.['passkeyCreationOptions']\n ) {\n const {passkeyChallenge, passkeyCreationOptions} = response.data.additionalData as any;\n passkeyProcessed = false;\n passkeyState.value = {\n actionId: 'submit',\n challenge: passkeyChallenge || null,\n creationOptions: passkeyCreationOptions || null,\n error: null,\n executionId: response.executionId || effectiveExecutionId,\n isActive: true,\n };\n isSubmitting.value = false;\n return;\n }\n\n const {\n executionId: normalizedExecutionId,\n components: normalizedComponents,\n additionalData: normalizedAdditionalData,\n } = normalizeFlowResponse(response, t, {resolveTranslations: false}, flowMeta.value);\n\n // Handle error flow status\n if (response.flowStatus === EmbeddedSignInFlowStatusV2.Error) {\n clearFlowState();\n const failureReason: string =\n (response as any)?.failureReason || 'Authentication flow failed. Please try again.';\n const err: Error = new Error(failureReason);\n setError(err);\n cleanupFlowUrlParams();\n throw err;\n }\n\n // Handle flow completion\n if (response.flowStatus === EmbeddedSignInFlowStatusV2.Complete) {\n const redirectUrl: string | undefined = (response as any)?.redirectUrl || (response as any)?.redirect_uri;\n const finalRedirectUrl: string | undefined = redirectUrl || afterSignInUrl;\n\n isSubmitting.value = false;\n persistExecutionId(null);\n isFlowInitialized.value = false;\n sessionStorage.removeItem(AUTH_ID_STORAGE_KEY);\n cleanupOAuthUrlParams();\n\n emit('success', {\n redirectUrl: finalRedirectUrl,\n ...(response.data || {}),\n });\n\n if (finalRedirectUrl && window?.location) {\n window.location.href = finalRedirectUrl;\n }\n return;\n }\n\n // Update flow state for next step\n if (normalizedExecutionId && normalizedComponents) {\n persistExecutionId(normalizedExecutionId);\n components.value = normalizedComponents;\n additionalData.value = normalizedAdditionalData ?? {};\n isTimeoutDisabled.value = false;\n isFlowInitialized.value = true;\n cleanupFlowUrlParams();\n\n if ((response as any)?.failureReason) {\n flowError.value = new Error((response as any).failureReason);\n }\n }\n } catch (error: unknown) {\n const err: any = error as any;\n if (err instanceof Error && flowError.value === err) {\n // Already set; re-throw\n throw err;\n }\n clearFlowState();\n const errorMessage: string = err?.failureReason || (err instanceof Error ? err.message : String(err));\n setError(new Error(errorMessage));\n } finally {\n isSubmitting.value = false;\n }\n };\n\n // \u2500\u2500 Step timeout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n let timeoutHandle: ReturnType<typeof setTimeout> | null = null;\n\n const scheduleTimeout = (timeoutMs: number): void => {\n if (timeoutHandle) clearTimeout(timeoutHandle);\n if (timeoutMs <= 0 || !isFlowInitialized.value) {\n isTimeoutDisabled.value = false;\n return;\n }\n const remaining: number = Math.max(0, Math.floor((timeoutMs - Date.now()) / 1000));\n if (remaining <= 0) {\n isTimeoutDisabled.value = true;\n setError(new Error(t('errors.signin.timeout') || 'Time allowed to complete the step has expired.'));\n return;\n }\n timeoutHandle = setTimeout(() => {\n isTimeoutDisabled.value = true;\n setError(new Error(t('errors.signin.timeout') || 'Time allowed to complete the step has expired.'));\n }, remaining * 1000);\n };\n\n watch(\n () => [additionalData.value?.['stepTimeout'], isFlowInitialized.value] as [number | undefined, boolean],\n ([timeoutMs]: [number | undefined, boolean]) => {\n scheduleTimeout(Number(timeoutMs) || 0);\n },\n );\n\n onUnmounted(() => {\n if (timeoutHandle) clearTimeout(timeoutHandle);\n });\n\n // \u2500\u2500 Passkey processing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n watch(\n () => passkeyState.value,\n async (state: PasskeyState) => {\n if (!state.isActive || (!state.challenge && !state.creationOptions) || !state.executionId) return;\n if (passkeyProcessed) return;\n passkeyProcessed = true;\n\n try {\n let inputs: Record<string, string>;\n\n if (state.challenge) {\n const passkeyResponse: string = await handlePasskeyAuthentication(state.challenge);\n const obj: any = JSON.parse(passkeyResponse);\n inputs = {\n authenticatorData: obj.response.authenticatorData,\n clientDataJSON: obj.response.clientDataJSON,\n credentialId: obj.id,\n signature: obj.response.signature,\n userHandle: obj.response.userHandle,\n };\n } else if (state.creationOptions) {\n const passkeyResponse: string = await handlePasskeyRegistration(state.creationOptions);\n const obj: any = JSON.parse(passkeyResponse);\n inputs = {\n attestationObject: obj.response.attestationObject,\n clientDataJSON: obj.response.clientDataJSON,\n credentialId: obj.id,\n };\n } else {\n throw new Error('No passkey challenge or creation options available');\n }\n\n await handleSubmit({executionId: state.executionId!, inputs});\n\n passkeyState.value = {\n actionId: null,\n challenge: null,\n creationOptions: null,\n error: null,\n executionId: null,\n isActive: false,\n };\n } catch (error: unknown) {\n const err: Error = error as Error;\n passkeyState.value = {...passkeyState.value, error: err, isActive: false};\n flowError.value = err;\n emit('error', err);\n }\n },\n {deep: true},\n );\n\n // \u2500\u2500 OAuth callback (via composable) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n useOAuthCallback({\n currentExecutionId,\n executionIdStorageKey: EXECUTION_ID_STORAGE_KEY,\n isInitialized,\n isSubmitting,\n onError: (err: any) => {\n // Guard against double-processing when handleSubmit already set the error\n if (!flowError.value) {\n clearFlowState();\n setError(err instanceof Error ? err : new Error(String(err)));\n }\n },\n onSubmit: (payload: EmbeddedSignInFlowRequestV2) =>\n handleSubmit({executionId: payload.executionId, inputs: payload.inputs}),\n processedFlag: oauthCodeProcessedFlag,\n setExecutionId: persistExecutionId,\n });\n\n // \u2500\u2500 Lifecycle \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n onMounted(() => {\n const urlParams: UrlParams = getUrlParams();\n\n if (urlParams.authId) {\n sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);\n }\n });\n\n // Initialize flow when SDK is ready (OAuth callback is handled by useOAuthCallback)\n watch(\n () =>\n [\n isInitialized.value,\n sdkLoading.value,\n isFlowInitialized.value,\n currentExecutionId.value,\n isSubmitting.value,\n ] as [boolean, boolean, boolean, string | null, boolean],\n ([initialized, loading, flowInit, executionId, submitting]: [\n boolean,\n boolean,\n boolean,\n string | null,\n boolean,\n ]) => {\n const urlParams: UrlParams = getUrlParams();\n const hasOAuthCode: boolean = !!urlParams.code;\n const hasOAuthState: boolean = !!urlParams.state;\n\n // Initialize flow when SDK is ready and no flow is active\n if (\n initialized &&\n !loading &&\n !flowInit &&\n !initializationAttempted &&\n !executionId &&\n !hasOAuthCode &&\n !hasOAuthState &&\n !submitting &&\n !oauthCodeProcessedFlag.value\n ) {\n initializationAttempted = true;\n initializeFlow();\n }\n },\n );\n\n // \u2500\u2500 Render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n return (): VNode | null => {\n const combinedIsLoading: boolean = sdkLoading.value || isSubmitting.value || !isInitialized.value;\n\n // Scoped slot / render props pattern\n if (slots['default']) {\n const renderProps: SignInRenderProps = {\n additionalData: additionalData.value,\n components: components.value,\n error: flowError.value,\n initialize: initializeFlow,\n isInitialized: isFlowInitialized.value,\n isLoading: combinedIsLoading,\n isTimeoutDisabled: isTimeoutDisabled.value,\n meta: flowMeta.value,\n onSubmit: handleSubmit,\n };\n return h('div', {}, slots['default'](renderProps));\n }\n\n // Default BaseSignIn rendering\n return h(BaseSignIn, {\n ...attrs,\n additionalData: additionalData.value,\n class: props.className,\n components: components.value,\n error: flowError.value,\n isLoading: combinedIsLoading || !isFlowInitialized.value,\n isTimeoutDisabled: isTimeoutDisabled.value,\n onError: (err: Error) => emit('error', err),\n onSubmit: handleSubmit,\n size: props.size,\n variant: props.variant,\n });\n };\n },\n});\n\nexport default SignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n withVendorCSSClassPrefix,\n EmbeddedSignInFlowRequestV2 as EmbeddedSignInFlowRequest,\n EmbeddedFlowComponentV2 as EmbeddedFlowComponent,\n FlowMetadataResponse,\n} from '@asgardeo/browser';\nimport {\n type ComputedRef,\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n computed,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport {renderSignInComponents} from './AuthOptionFactory';\nimport useFlow from '../../../../composables/useFlow';\nimport useFlowMeta from '../../../../composables/useFlowMeta';\nimport useI18n from '../../../../composables/useI18n';\nimport {extractErrorMessage} from '../../../../utils/v2/flowTransformer';\nimport Alert from '../../../primitives/Alert';\nimport Card from '../../../primitives/Card';\nimport Spinner from '../../../primitives/Spinner';\nimport Typography from '../../../primitives/Typography';\n\n/**\n * Render props passed to the default scoped slot for custom UI rendering.\n */\nexport interface BaseSignInRenderProps {\n components: EmbeddedFlowComponent[];\n error?: Error | null;\n fieldErrors: Record<string, string>;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: EmbeddedFlowComponent, data?: Record<string, any>) => Promise<void>;\n isLoading: boolean;\n isTimeoutDisabled?: boolean;\n isValid: boolean;\n messages: Array<{message: string; type: string}>;\n meta: FlowMetadataResponse | null;\n subtitle: string | undefined;\n title: string;\n touched: Record<string, boolean>;\n validateForm: () => {fieldErrors: Record<string, string>; isValid: boolean};\n values: Record<string, string>;\n}\n\nexport interface BaseSignInProps {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n className?: string;\n components?: EmbeddedFlowComponent[];\n error?: Error | null;\n errorClassName?: string;\n inputClassName?: string;\n isLoading?: boolean;\n isTimeoutDisabled?: boolean;\n messageClassName?: string;\n onSubmit?: (payload: EmbeddedSignInFlowRequest, component: EmbeddedFlowComponent) => Promise<void>;\n size?: 'small' | 'medium' | 'large';\n variant?: 'elevated' | 'outlined' | 'flat';\n}\n\ninterface FieldDefinition {\n name: string;\n required: boolean;\n type: string;\n}\n\nconst extractFormFields = (flowComponents: EmbeddedFlowComponent[]): FieldDefinition[] => {\n const fields: FieldDefinition[] = [];\n const process = (comps: EmbeddedFlowComponent[]): void => {\n comps.forEach((c: any) => {\n if (c.type === 'TEXT_INPUT' || c.type === 'PASSWORD_INPUT' || c.type === 'EMAIL_INPUT' || c.type === 'SELECT') {\n fields.push({name: c.ref, required: c.required || false, type: c.type});\n }\n if (c.components) {\n process(c.components);\n }\n });\n };\n process(flowComponents);\n return fields;\n};\n\n/**\n * BaseSignIn \u2014 unstyled app-native sign-in presentation component.\n *\n * Renders the server-driven UI components from an embedded authentication flow.\n * Manages local form state (values, touched, errors) and delegates submission to the parent SignIn component.\n *\n * Supports render props via the `default` scoped slot for complete UI customization.\n *\n * @example\n * ```vue\n * <!-- Default UI -->\n * <BaseSignIn :components=\"flowComponents\" :on-submit=\"handleSubmit\" />\n *\n * <!-- Custom UI via scoped slot -->\n * <BaseSignIn :components=\"flowComponents\" :on-submit=\"handleSubmit\" v-slot=\"{ values, handleInputChange, handleSubmit }\">\n * <input :value=\"values.username\" @input=\"handleInputChange('username', $event.target.value)\" />\n * <button @click=\"handleSubmit(submitComponent)\">Sign In</button>\n * </BaseSignIn>\n * ```\n */\nconst BaseSignIn: Component = defineComponent({\n emits: ['error', 'success'],\n name: 'BaseSignIn',\n props: {\n additionalData: {\n default: (): Record<string, any> => ({}),\n type: Object as PropType<Record<string, any>>,\n },\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n components: {\n default: (): EmbeddedFlowComponent[] => [],\n type: Array as PropType<EmbeddedFlowComponent[]>,\n },\n error: {default: null, type: Object as PropType<Error | null>},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n isLoading: {default: false, type: Boolean},\n isTimeoutDisabled: {default: false, type: Boolean},\n messageClassName: {default: '', type: String},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(\n props: Readonly<{\n additionalData: Record<string, any>;\n buttonClassName: string;\n className: string;\n components: EmbeddedFlowComponent[];\n error: Error | null;\n errorClassName: string;\n inputClassName: string;\n isLoading: boolean;\n isTimeoutDisabled: boolean;\n messageClassName: string;\n onSubmit?: (payload: EmbeddedSignInFlowRequest, component: EmbeddedFlowComponent) => Promise<void>;\n size: 'small' | 'medium' | 'large';\n variant: 'elevated' | 'outlined' | 'flat';\n }>,\n {slots, emit, attrs}: SetupContext,\n ): () => VNode | null {\n const {meta: metaRef} = useFlowMeta();\n const {t} = useI18n();\n const {subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages} = useFlow();\n\n const isSubmitting: Ref<boolean> = ref(false);\n const apiError: Ref<Error | null> = ref(null);\n\n const isLoading: ComputedRef<boolean> = computed<boolean>(() => props.isLoading || isSubmitting.value);\n\n // Form state\n const formValues: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n\n // Reset form state when components change (new flow step)\n watch(\n () => props.components,\n (newComponents: EmbeddedFlowComponent[]) => {\n const fields: FieldDefinition[] = extractFormFields(newComponents || []);\n const freshValues: Record<string, string> = {};\n fields.forEach((f: FieldDefinition) => {\n freshValues[f.name] = '';\n });\n formValues.value = freshValues;\n touchedFields.value = {};\n },\n {deep: false, immediate: true},\n );\n\n // Computed form errors based on current values + touched\n const formErrors: ComputedRef<Record<string, string>> = computed<Record<string, string>>(() => {\n const fields: FieldDefinition[] = extractFormFields(props.components || []);\n const errors: Record<string, string> = {};\n fields.forEach((field: FieldDefinition) => {\n const value: string = formValues.value[field.name] || '';\n const isTouched: boolean = touchedFields.value[field.name] || false;\n if (field.required && isTouched && (!value || value.trim() === '')) {\n errors[field.name] = t('validations.required.field.error') || 'This field is required';\n }\n if (field.type === 'EMAIL_INPUT' && value && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) {\n errors[field.name] = t('field.email.invalid') || 'Invalid email address';\n }\n });\n return errors;\n });\n\n const isFormValid: ComputedRef<boolean> = computed<boolean>(() => Object.keys(formErrors.value).length === 0);\n\n const handleError = (error: any): void => {\n const errorMessage: string = (error as any)?.failureReason || extractErrorMessage(error, t);\n apiError.value = error instanceof Error ? error : new Error(errorMessage);\n clearMessages();\n addMessage({message: errorMessage, type: 'error'});\n };\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n };\n\n const handleInputBlur = (name: string): void => {\n touchedFields.value = {...touchedFields.value, [name]: true};\n };\n\n const touchAllFields = (): void => {\n const fields: FieldDefinition[] = extractFormFields(props.components || []);\n const newTouched: Record<string, boolean> = {};\n fields.forEach((f: FieldDefinition) => {\n newTouched[f.name] = true;\n });\n touchedFields.value = newTouched;\n };\n\n const validateForm = (): {fieldErrors: Record<string, string>; isValid: boolean} => {\n touchAllFields();\n const errors: Record<string, string> = formErrors.value;\n return {fieldErrors: errors, isValid: Object.keys(errors).length === 0};\n };\n\n const handleSubmit = async (\n component: EmbeddedFlowComponent,\n data?: Record<string, any>,\n skipValidation?: boolean,\n ): Promise<void> => {\n if (!skipValidation) {\n const {isValid} = validateForm();\n if (!isValid) return;\n }\n\n isSubmitting.value = true;\n apiError.value = null;\n clearMessages();\n\n try {\n const filteredInputs: Record<string, any> = {};\n if (data) {\n Object.keys(data).forEach((key: string) => {\n if (data[key] !== undefined && data[key] !== null && data[key] !== '') {\n filteredInputs[key] = data[key];\n }\n });\n }\n\n const payload: EmbeddedSignInFlowRequest = {\n ...((component as any).id ? {action: (component as any).id} : {}),\n inputs: filteredInputs,\n };\n\n await props.onSubmit?.(payload, component);\n } catch (err: unknown) {\n handleError(err);\n emit('error', err);\n } finally {\n isSubmitting.value = false;\n }\n };\n\n const renderComponents = (): VNode[] =>\n renderSignInComponents(\n props.components || [],\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid.value,\n handleInputChange,\n {\n additionalData: props.additionalData,\n buttonClassName: props.buttonClassName,\n inputClassName: props.inputClassName,\n isTimeoutDisabled: props.isTimeoutDisabled,\n meta: (metaRef as Ref<FlowMetadataResponse | null>).value,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size: props.size,\n t,\n },\n );\n\n return (): VNode | null => {\n const containerClass: string = [\n withVendorCSSClassPrefix('signin'),\n withVendorCSSClassPrefix(`signin--${props.size}`),\n withVendorCSSClassPrefix(`signin--${props.variant}`),\n props.className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // If a scoped slot is provided, use render props pattern\n if (slots['default']) {\n const renderProps: BaseSignInRenderProps = {\n components: props.components || [],\n error: apiError.value,\n fieldErrors: formErrors.value,\n handleInputChange,\n handleSubmit,\n isLoading: isLoading.value,\n isTimeoutDisabled: props.isTimeoutDisabled,\n isValid: isFormValid.value,\n messages: (flowMessages as Ref<Array<{message: string; type: string}>>).value || [],\n meta: (metaRef as Ref<FlowMetadataResponse | null>).value,\n subtitle: (flowSubtitle as Ref<string | undefined>).value,\n title: (flowTitle as Ref<string>).value || t('signin.heading') || 'Sign In',\n touched: touchedFields.value,\n validateForm,\n values: formValues.value,\n };\n return h('div', {class: containerClass, ...attrs}, slots['default'](renderProps));\n }\n\n // Loading state\n if (isLoading.value && (!props.components || props.components.length === 0)) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;justify-content:center;padding:2rem'}, h(Spinner)),\n );\n }\n\n // No components available\n if (!props.components || props.components.length === 0) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h(Alert, {severity: 'warning'}, () =>\n h(\n Typography,\n {variant: 'body1'},\n () => t('errors.signin.components.not.available') || 'No sign-in options available',\n ),\n ),\n );\n }\n\n const messages: Array<{message: string; type: string}> =\n (flowMessages as Ref<Array<{message: string; type: string}>>).value || [];\n const externalError: Error | null = props.error;\n\n return h(Card, {class: containerClass, ...attrs, variant: props.variant}, () => [\n // Show errors and flow messages\n (externalError || messages.length > 0) &&\n h(\n 'div',\n {class: [withVendorCSSClassPrefix('signin__messages'), props.messageClassName].filter(Boolean).join(' ')},\n [\n externalError &&\n h(Alert, {severity: 'error'}, () => h(Typography, {variant: 'body2'}, () => externalError.message)),\n ...messages.map((msg: {message: string; type: string}, index: number) =>\n h(Alert, {key: index, severity: msg.type === 'error' ? 'error' : 'info'}, () =>\n h(Typography, {variant: 'body2'}, () => msg.message),\n ),\n ),\n ],\n ),\n // Render flow components\n h('div', {class: withVendorCSSClassPrefix('signin__content')}, renderComponents()),\n ]);\n };\n },\n});\n\nexport default BaseSignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n FieldType,\n FlowMetadataResponse,\n EmbeddedFlowComponentV2 as EmbeddedFlowComponent,\n EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,\n EmbeddedFlowTextVariantV2 as EmbeddedFlowTextVariant,\n EmbeddedFlowEventTypeV2 as EmbeddedFlowEventType,\n resolveFlowTemplateLiterals,\n extractEmojiFromUri,\n isEmojiUri,\n ConsentPurposeDataV2 as ConsentPurposeData,\n ConsentPromptDataV2 as ConsentPromptData,\n ConsentDecisionsV2 as ConsentDecisions,\n ConsentPurposeDecisionV2 as ConsentPurposeDecision,\n ConsentAttributeElementV2 as ConsentAttributeElement,\n} from '@asgardeo/browser';\nimport DOMPurify from 'dompurify';\nimport {h, type VNode} from 'vue';\nimport {createVueLogger} from '../../../utils/logger';\nimport FacebookButton from '../../adapters/FacebookButton';\nimport GitHubButton from '../../adapters/GitHubButton';\nimport GoogleButton from '../../adapters/GoogleButton';\nimport MicrosoftButton from '../../adapters/MicrosoftButton';\nimport {createField} from '../../factories/FieldFactory';\nimport Button from '../../primitives/Button';\nimport Divider from '../../primitives/Divider';\nimport Select from '../../primitives/Select/Select';\nimport Typography from '../../primitives/Typography';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('AuthOptionFactory');\n\n/**\n * Inline helper for consent optional attribute key (mirrors ConsentCheckboxList.getConsentOptionalKey).\n */\nconst getConsentOptionalKey = (purposeId: string | number, attr: string): string => `consent_${purposeId}_${attr}`;\n\n/**\n * Replaces `emoji:` URIs embedded in HTML before DOMPurify sanitization.\n *\n * DOMPurify strips unknown URI schemes from attributes (e.g. `src=\"emoji:\uD83E\uDD8A\"` \u2192 `src=\"\"`).\n * Converting them to inline spans first preserves the emoji content through sanitization.\n *\n * Converts:\n * - `<img src=\"emoji:X\" alt=\"Y\">` \u2192 `<span role=\"img\" aria-label=\"Y\">X</span>`\n * - Any remaining `emoji:X` text occurrences \u2192 `X`\n */\nconst resolveEmojiUrisInHtml = (html: string): string => {\n const withEmojiImages: string = html.replace(\n /<img([^>]*)src=\"(emoji:[^\"]+)\"([^>]*)\\/?>/gi,\n (_match: string, pre: string, src: string, post: string): string => {\n const emoji: string = extractEmojiFromUri(src);\n if (!emoji) {\n return _match;\n }\n const altMatch: RegExpMatchArray | null = (pre + post).match(/alt=\"([^\"]*)\"/i);\n const label: string = altMatch ? altMatch[1] : emoji;\n return `<span role=\"img\" aria-label=\"${label}\">${emoji}</span>`;\n },\n );\n return withEmojiImages.replace(/emoji:([^\\s\"<>&]+)/g, (_: string, rest: string): string =>\n isEmojiUri(`emoji:${rest}`) ? rest : `emoji:${rest}`,\n );\n};\n\ntype TranslationFn = (key: string, params?: Record<string, string | number>) => string;\n\n/**\n * Get the appropriate FieldType for an input component.\n */\nconst getFieldType = (variant: EmbeddedFlowComponentType): FieldType => {\n switch (variant) {\n case EmbeddedFlowComponentType.EmailInput:\n return FieldType.Email;\n case EmbeddedFlowComponentType.PasswordInput:\n return FieldType.Password;\n case EmbeddedFlowComponentType.TextInput:\n default:\n return FieldType.Text;\n }\n};\n\n/**\n * Get typography variant from component variant.\n */\nconst getTypographyVariant = (variant: string): any => {\n const variantMap: Record<string, string> = {\n BODY_1: 'body1',\n BODY_2: 'body2',\n BUTTON_TEXT: 'body2',\n CAPTION: 'caption',\n HEADING_1: 'h1',\n HEADING_2: 'h2',\n HEADING_3: 'h3',\n HEADING_4: 'h4',\n HEADING_5: 'h5',\n HEADING_6: 'h6',\n OVERLINE: 'overline',\n SUBTITLE_1: 'subtitle1',\n SUBTITLE_2: 'subtitle2',\n } as Record<EmbeddedFlowTextVariant, string>;\n\n return variantMap[variant] || 'h3';\n};\n\n/**\n * Check if a button text or action matches a social provider.\n */\nconst matchesSocialProvider = (actionId: string, eventType: string, buttonText: string, provider: string): boolean => {\n const providerId: string = `${provider}_auth`;\n const providerMatches: boolean = actionId === providerId || eventType === providerId;\n\n if (buttonText.toLowerCase().includes(provider)) {\n return true;\n }\n\n return providerMatches;\n};\n\n/**\n * Create an auth component (VNode) from a flow component configuration.\n */\nconst createAuthComponentFromFlow = (\n component: EmbeddedFlowComponent,\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n options: {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n inStack?: boolean;\n inputClassName?: string;\n isTimeoutDisabled?: boolean;\n key?: string | number;\n meta?: FlowMetadataResponse | null;\n onInputBlur?: (name: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n size?: 'small' | 'medium' | 'large';\n t?: TranslationFn;\n variant?: any;\n } = {},\n): VNode | null => {\n const key: string | number = options.key ?? component.id;\n\n /** Resolve any remaining {{t()}} or {{meta()}} template expressions in a string at render time. */\n const resolve = (text: string | undefined): string => {\n if (!text || (!options.t && !options.meta)) {\n return text || '';\n }\n return resolveFlowTemplateLiterals(text, {meta: options.meta, t: options.t || ((k: string): string => k)});\n };\n\n switch (component.type) {\n case EmbeddedFlowComponentType.TextInput:\n case EmbeddedFlowComponentType.PasswordInput:\n case EmbeddedFlowComponentType.EmailInput: {\n const identifier: string = component.ref;\n const value: string = formValues[identifier] || '';\n const isTouched: boolean = touchedFields[identifier] || false;\n const error: string | undefined = isTouched ? formErrors[identifier] : undefined;\n const fieldType: FieldType = getFieldType(component.type);\n\n return createField({\n className: options.inputClassName,\n error,\n label: resolve(component.label) || '',\n name: identifier,\n onBlur: () => options.onInputBlur?.(identifier),\n onChange: (newValue: string) => onInputChange(identifier, newValue),\n placeholder: resolve(component.placeholder) || '',\n required: component.required || false,\n type: fieldType,\n value,\n });\n }\n\n case EmbeddedFlowComponentType.Action: {\n const actionId: string = component.id;\n const eventType: string = (component.eventType as string) || '';\n const buttonText: string = resolve(component.label);\n const componentVariant: string = (component.variant as string) || '';\n\n const shouldSkipValidation: boolean = eventType.toUpperCase() === EmbeddedFlowEventType.Trigger;\n\n const handleClick = (): void => {\n if (options.onSubmit) {\n const formData: Record<string, any> = {};\n Object.keys(formValues).forEach((field: string) => {\n formData[field] = formValues[field];\n });\n\n const consentPrompt: ConsentPromptData | undefined = options.additionalData?.['consentPrompt'] as\n | ConsentPromptData\n | undefined;\n if (consentPrompt && eventType.toUpperCase() === EmbeddedFlowEventType.Submit) {\n const isDeny: boolean = componentVariant.toLowerCase() !== 'primary';\n const decisions: ConsentDecisions = {\n purposes: consentPrompt.purposes.map(\n (p: ConsentPurposeData): ConsentPurposeDecision => ({\n approved: !isDeny,\n elements: [\n ...p.essential.map((attr: string): ConsentAttributeElement => ({approved: !isDeny, name: attr})),\n ...p.optional.map(\n (attr: string): ConsentAttributeElement => ({\n approved: isDeny ? false : formValues[getConsentOptionalKey(p.purposeId, attr)] !== 'false',\n name: attr,\n }),\n ),\n ],\n purposeName: p.purposeName,\n }),\n ),\n };\n formData['consent_decisions'] = JSON.stringify(decisions);\n }\n\n options.onSubmit(component, formData, shouldSkipValidation);\n }\n };\n\n // Render branded social login buttons for known action IDs\n if (matchesSocialProvider(actionId, eventType, buttonText, 'google')) {\n return h(GoogleButton, {class: options.buttonClassName, key, onClick: handleClick});\n }\n if (matchesSocialProvider(actionId, eventType, buttonText, 'github')) {\n return h(GitHubButton, {class: options.buttonClassName, key, onClick: handleClick});\n }\n if (matchesSocialProvider(actionId, eventType, buttonText, 'facebook')) {\n return h(FacebookButton, {class: options.buttonClassName, key, onClick: handleClick});\n }\n if (matchesSocialProvider(actionId, eventType, buttonText, 'microsoft')) {\n return h(MicrosoftButton, {class: options.buttonClassName, key, onClick: handleClick});\n }\n\n // Generic button for other providers / actions\n const startIconVNode: VNode | null = component.startIcon\n ? h('img', {\n alt: '',\n 'aria-hidden': 'true',\n src: component.startIcon,\n style: {height: '1.25em', objectFit: 'contain', width: '1.25em'},\n })\n : null;\n\n const endIconVNode: VNode | null = component.endIcon\n ? h('img', {\n alt: '',\n 'aria-hidden': 'true',\n src: component.endIcon,\n style: {height: '1.25em', objectFit: 'contain', width: '1.25em'},\n })\n : null;\n\n return h(\n Button,\n {\n class: options.buttonClassName,\n color: component.variant?.toLowerCase() === 'primary' ? 'primary' : 'secondary',\n 'data-testid': 'asgardeo-signin-submit',\n disabled:\n isLoading ||\n (!isFormValid && !shouldSkipValidation) ||\n options.isTimeoutDisabled ||\n (component as any).config?.disabled,\n endIcon: endIconVNode ?? undefined,\n fullWidth: true,\n key,\n onClick: handleClick,\n startIcon: startIconVNode ?? undefined,\n variant: component.variant?.toLowerCase() === 'primary' ? 'solid' : 'outline',\n },\n {default: () => buttonText || 'Submit'},\n );\n }\n\n case EmbeddedFlowComponentType.Text: {\n const variant: any = getTypographyVariant(component.variant as string);\n const align: string = typeof (component as any)['align'] === 'string' ? (component as any)['align'] : 'left';\n\n return h(\n Typography,\n {\n key,\n style: {marginBottom: '0.5rem', textAlign: align},\n variant,\n },\n {default: () => resolve(component.label)},\n );\n }\n\n case EmbeddedFlowComponentType.Divider: {\n const dividerLabel: string = resolve(component.label) || '';\n return h(Divider, {key}, dividerLabel ? {default: () => dividerLabel} : undefined);\n }\n\n case EmbeddedFlowComponentType.Select: {\n const identifier: string = component.ref;\n const value: string = formValues[identifier] || '';\n const isTouched: boolean = touchedFields[identifier] || false;\n const error: string | undefined = isTouched ? formErrors[identifier] : undefined;\n\n const selectOptions: Array<{label: string; value: string}> = ((component as any).options || []).map(\n (opt: any) => ({\n label: typeof opt === 'string' ? opt : String(opt.label ?? opt.value ?? ''),\n value: typeof opt === 'string' ? opt : String(opt.value ?? ''),\n }),\n );\n\n return h(Select, {\n class: options.inputClassName,\n error,\n key,\n label: resolve(component.label) || '',\n modelValue: value,\n name: identifier,\n onBlur: () => options.onInputBlur?.(identifier),\n 'onUpdate:modelValue': (val: string) => onInputChange(identifier, val),\n options: selectOptions,\n placeholder: resolve(component.placeholder),\n required: component.required,\n });\n }\n\n case EmbeddedFlowComponentType.Block: {\n if (component.components && component.components.length > 0) {\n const blockChildren: (VNode | null)[] = component.components\n .map((childComponent: any, index: number) =>\n createAuthComponentFromFlow(\n childComponent,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n key: childComponent.id || `${component.id}_${index}`,\n },\n ),\n )\n .filter(Boolean);\n\n return h('form', {id: component.id, key}, blockChildren);\n }\n return null;\n }\n\n case EmbeddedFlowComponentType.RichText: {\n // NOTE: Content comes from Asgardeo's own servers (server-driven UI).\n // Emoji URIs are resolved first because DOMPurify strips unknown URI schemes.\n // Manually sanitizes with `DOMPurify` before setting innerHTML (defense-in-depth).\n return h('div', {\n innerHTML: DOMPurify.sanitize(resolveEmojiUrisInHtml(resolve(component.label))),\n key,\n style: {overflowWrap: 'anywhere'},\n });\n }\n\n case EmbeddedFlowComponentType.Image: {\n const explicitHeight: string = resolve((component as any).height?.toString());\n const explicitWidth: string = resolve((component as any).width?.toString());\n return h('img', {\n alt: resolve((component as any).alt) || resolve(component.label) || 'Image',\n key,\n src: resolve((component as any).src),\n style: {\n height: explicitHeight || (options.inStack ? '50px' : 'auto'),\n objectFit: 'contain',\n width: explicitWidth || (options.inStack ? '50px' : '100%'),\n },\n });\n }\n\n case EmbeddedFlowComponentType.Icon: {\n // Flow icon registry is not yet available in the Vue SDK.\n logger.warn(`Icon component type is not yet supported in the Vue SDK. Skipping render.`);\n return null;\n }\n\n case EmbeddedFlowComponentType.Stack: {\n const direction: string = (component as any).direction || 'row';\n const gap: number = (component as any).gap ?? 2;\n const align: string = (component as any).align || 'center';\n const justify: string = (component as any).justify || 'flex-start';\n\n const stackStyle: Record<string, string> = {\n alignItems: align,\n display: 'flex',\n flexDirection: direction as string,\n flexWrap: 'wrap',\n gap: `${gap * 0.5}rem`,\n justifyContent: justify,\n };\n\n const stackChildren: (VNode | null)[] = component.components\n ? component.components.map((childComponent: any, index: number) =>\n createAuthComponentFromFlow(\n childComponent,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n inStack: true,\n key: childComponent.id || `${component.id}_${index}`,\n },\n ),\n )\n : [];\n\n return h('div', {key, style: stackStyle}, stackChildren.filter(Boolean) as VNode[]);\n }\n\n case EmbeddedFlowComponentType.Consent: {\n // Consent component is not yet implemented in the Vue SDK.\n logger.warn(`Consent component type is not yet fully supported in the Vue SDK.`);\n return null;\n }\n\n case EmbeddedFlowComponentType.Timer: {\n const textTemplate: string = resolve((component as any).label) || 'Time remaining: {time}';\n const timeoutMs: number = Number(options.additionalData?.['stepTimeout']) || 0;\n const expiresIn: number = timeoutMs > 0 ? Math.max(0, Math.floor((timeoutMs - Date.now()) / 1000)) : 0;\n const timerText: string = textTemplate.replace('{time}', String(expiresIn));\n\n return h('div', {class: 'asgardeo-flow-timer', key}, timerText);\n }\n\n default:\n logger.warn(`Unsupported component type: ${(component as any).type}. Skipping render.`);\n return null;\n }\n};\n\nexport type {TranslationFn};\n\n/**\n * Processes an array of components and renders them as VNodes for sign-in.\n */\nexport const renderSignInComponents = (\n components: EmbeddedFlowComponent[],\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n options?: {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n inputClassName?: string;\n isTimeoutDisabled?: boolean;\n meta?: FlowMetadataResponse | null;\n onInputBlur?: (name: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n size?: 'small' | 'medium' | 'large';\n t?: TranslationFn;\n variant?: any;\n },\n): VNode[] =>\n components\n .map((component: any, index: number) =>\n createAuthComponentFromFlow(\n component,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n key: component.id || index,\n },\n ),\n )\n .filter(Boolean) as VNode[];\n\n/**\n * Processes an array of components and renders them as VNodes for sign-up.\n * Identical to renderSignInComponents \u2014 separated for semantic clarity.\n */\nexport const renderSignUpComponents = (\n components: EmbeddedFlowComponent[],\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n options?: {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n inputClassName?: string;\n isTimeoutDisabled?: boolean;\n meta?: FlowMetadataResponse | null;\n onInputBlur?: (name: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n size?: 'small' | 'medium' | 'large';\n t?: TranslationFn;\n variant?: any;\n },\n): VNode[] =>\n components\n .map((component: any, index: number) =>\n createAuthComponentFromFlow(\n component,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n key: component.id || index,\n },\n ),\n )\n .filter(Boolean) as VNode[];\n\n/**\n * Processes an array of components and renders them as VNodes for invite-user flows.\n * Identical to renderSignInComponents \u2014 separated for semantic clarity.\n */\nexport const renderInviteUserComponents = (\n components: EmbeddedFlowComponent[],\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n options?: {\n additionalData?: Record<string, any>;\n buttonClassName?: string;\n inputClassName?: string;\n isTimeoutDisabled?: boolean;\n meta?: FlowMetadataResponse | null;\n onInputBlur?: (name: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n size?: 'small' | 'medium' | 'large';\n t?: TranslationFn;\n variant?: any;\n },\n): VNode[] =>\n components\n .map((component: any, index: number) =>\n createAuthComponentFromFlow(\n component,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n {\n ...options,\n key: component.id || index,\n },\n ),\n )\n .filter(Boolean) as VNode[];\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse, resolveFlowTemplateLiterals} from '@asgardeo/browser';\n\ntype TranslationFn = (key: string, params?: Record<string, string | number>) => string;\n\n/**\n * Resolves all {{ t() }} and {{ meta() }} template expressions in an object's string properties.\n * @param obj - The object to process\n * @param t - The translation function from useI18n\n * @param properties - Array of property names to resolve (optional, defaults to common properties)\n * @param meta - Optional flow metadata for resolving meta() expressions\n * @returns A new object with resolved template strings\n */\nexport const resolveTranslationsInObject = <T extends Record<string, any>>(\n obj: T,\n t: TranslationFn,\n properties: string[] = ['label', 'placeholder', 'text', 'title', 'subtitle'],\n meta?: FlowMetadataResponse | null,\n): T => {\n const resolved: T = {...obj};\n\n properties.forEach((prop: string) => {\n if (resolved[prop] && typeof resolved[prop] === 'string') {\n (resolved as any)[prop] = resolveFlowTemplateLiterals(resolved[prop], {meta, t});\n }\n });\n\n return resolved;\n};\n\nexport default resolveTranslationsInObject;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse} from '@asgardeo/browser';\nimport {resolveTranslationsInObject} from './resolveTranslationsInObject';\n\ntype TranslationFn = (key: string, params?: Record<string, string | number>) => string;\n\n/**\n * Recursively resolves translation and meta template strings in an array of objects.\n * @param items - Array of objects to process\n * @param t - The translation function from useI18n\n * @param properties - Array of property names to resolve (optional)\n * @param meta - Optional flow metadata for resolving meta() expressions\n * @returns A new array with resolved translations\n */\nconst resolveTranslationsInArray = <T extends Record<string, any>>(\n items: T[],\n t: TranslationFn,\n properties?: string[],\n meta?: FlowMetadataResponse | null,\n): T[] =>\n items.map((item: T) => {\n const resolved: T = resolveTranslationsInObject(item, t, properties, meta);\n\n // If the item has nested components (like BLOCK or STACK type), resolve those too\n if (resolved['components'] && Array.isArray(resolved['components'])) {\n (resolved as any)['components'] = resolveTranslationsInArray(resolved['components'], t, properties, meta);\n }\n\n return resolved;\n });\n\nexport default resolveTranslationsInArray;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * @fileoverview Shared flow response transformer utilities for v2 embedded flows.\n *\n * This module provides reusable transformation functions for normalizing embedded flow\n * responses from Asgardeo APIs. It handles both successful responses with component\n * extraction and error responses with proper error message extraction.\n *\n * Key features:\n * - Component extraction from flow meta structure\n * - Translation string resolution in components\n * - Error response detection and message extraction\n * - Configurable error handling (throw vs return errors)\n *\n * Usage:\n * ```typescript\n * import { normalizeFlowResponse } from '../../../utils/v2/flowTransformer';\n *\n * const { executionId, components } = normalizeFlowResponse(apiResponse, t, {\n * defaultErrorKey: 'components.signIn.errors.generic'\n * });\n * ```\n *\n * This transformer is used by both SignIn and SignUp v2 components to ensure\n * consistent response handling across all embedded flows.\n */\n\nimport {EmbeddedFlowComponentV2 as EmbeddedFlowComponent, FlowMetadataResponse} from '@asgardeo/browser';\nimport resolveTranslationsInArray from './resolveTranslationsInArray';\n\ntype TranslationFn = (key: string, params?: Record<string, string | number>) => string;\n\n/**\n * Generic flow error response interface that covers common error structure\n */\nexport interface FlowErrorResponse {\n executionId: string;\n failureReason?: string;\n flowStatus: 'ERROR';\n}\n\n/**\n * Configuration options for flow transformation\n */\nexport interface FlowTransformOptions {\n /**\n * Default error message key for translation fallback\n * @default 'errors.flow.generic'\n */\n defaultErrorKey?: string;\n /**\n * Whether to resolve translation strings or keep them as i18n keys\n * @default true\n */\n resolveTranslations?: boolean;\n /**\n * Whether to throw errors or return them as normalized response\n * @default true\n */\n throwOnError?: boolean;\n}\n\n/**\n * Create a mapping from ref to identifier based on data.inputs array.\n */\nconst createInputRefMapping = (response: any): Map<string, string> => {\n const mapping: Map<string, string> = new Map<string, string>();\n\n if (response?.data?.inputs && Array.isArray(response.data.inputs)) {\n response.data.inputs.forEach((input: any) => {\n if (input.ref && input.identifier) {\n mapping.set(input.ref, input.identifier);\n }\n });\n }\n\n return mapping;\n};\n\n/**\n * Create a mapping from action ref to nextNode based on data.actions array.\n */\nconst createActionRefMapping = (response: any): Map<string, string> => {\n const mapping: Map<string, string> = new Map<string, string>();\n\n if (response?.data?.actions && Array.isArray(response.data.actions)) {\n response.data.actions.forEach((action: any) => {\n if (action.ref && action.nextNode) {\n mapping.set(action.ref, action.nextNode);\n }\n });\n }\n\n return mapping;\n};\n\n/**\n * Apply input ref mapping to components recursively.\n */\nconst applyInputRefMapping = (\n components: EmbeddedFlowComponent[],\n refMapping: Map<string, string>,\n actionMapping: Map<string, string>,\n inputsData: any[] = [],\n): EmbeddedFlowComponent[] =>\n components.map((component: EmbeddedFlowComponent) => {\n const transformedComponent: any = {...component} as EmbeddedFlowComponent & {\n actionRef?: string;\n options?: Array<{label: string; value: string}>;\n };\n\n if (transformedComponent.ref && refMapping.has(transformedComponent.ref)) {\n transformedComponent.ref = refMapping.get(transformedComponent.ref);\n }\n\n if (transformedComponent.type === 'SELECT' && component.id) {\n const inputData: any = inputsData.find((input: any) => input.ref === component.id);\n if (inputData?.options) {\n transformedComponent.options = inputData.options.map((opt: any) => {\n if (typeof opt === 'string') {\n return {label: opt, value: opt};\n }\n const value: string = typeof opt.value === 'object' ? JSON.stringify(opt.value) : String(opt.value || '');\n const label: string = typeof opt.label === 'object' ? JSON.stringify(opt.label) : String(opt.label || value);\n\n return {label, value};\n });\n }\n }\n\n if (\n transformedComponent.type === 'ACTION' &&\n transformedComponent.id &&\n actionMapping.has(transformedComponent.id)\n ) {\n transformedComponent.actionRef = actionMapping.get(transformedComponent.id);\n }\n\n if (transformedComponent.components && Array.isArray(transformedComponent.components)) {\n transformedComponent.components = applyInputRefMapping(\n transformedComponent.components,\n refMapping,\n actionMapping,\n inputsData,\n );\n }\n\n return transformedComponent;\n });\n\n/**\n * Transform and resolve translations in components from flow response.\n */\nexport const transformComponents = (\n response: any,\n t: TranslationFn,\n resolveTranslations: boolean = true,\n meta?: FlowMetadataResponse | null,\n): EmbeddedFlowComponent[] => {\n if (!response?.data?.meta?.components) {\n return [];\n }\n\n let {components} = response.data.meta;\n\n const refMapping: Map<string, string> = createInputRefMapping(response);\n const actionMapping: Map<string, string> = createActionRefMapping(response);\n const inputsData: any[] = response?.data?.inputs || [];\n\n if (refMapping.size > 0 || actionMapping.size > 0 || inputsData.length > 0) {\n components = applyInputRefMapping(components, refMapping, actionMapping, inputsData);\n }\n\n return resolveTranslations ? resolveTranslationsInArray(components, t, undefined, meta) : components;\n};\n\n/**\n * Extract error message from flow error response.\n * Supports any flow error response that follows the standard structure.\n * Prioritizes failureReason if present, otherwise falls back to translated generic message.\n */\nexport const extractErrorMessage = (\n error: FlowErrorResponse | any,\n t: TranslationFn,\n defaultErrorKey: string = 'errors.flow.generic',\n): string => {\n if (error && typeof error === 'object' && error.failureReason) {\n return error.failureReason;\n }\n\n if (error instanceof Error && error.message) {\n return error.message;\n }\n\n return t(defaultErrorKey);\n};\n\n/**\n * Check if a response is an error response and extract the error message.\n */\nexport const checkForErrorResponse = (\n response: any,\n t: TranslationFn,\n defaultErrorKey: string = 'errors.flow.generic',\n): string | null => {\n if (response?.flowStatus === 'ERROR') {\n return extractErrorMessage(response, t, defaultErrorKey);\n }\n\n return null;\n};\n\n/**\n * Generic flow response normalizer that handles both success and error responses.\n * This is the main transformer function that should be used by all flow components.\n */\nexport const normalizeFlowResponse = (\n response: any,\n t: TranslationFn,\n options: FlowTransformOptions = {},\n meta?: FlowMetadataResponse | null,\n): {\n additionalData: Record<string, any>;\n components: EmbeddedFlowComponent[];\n executionId: string;\n} => {\n const {throwOnError = true, defaultErrorKey = 'errors.flow.generic', resolveTranslations = true} = options;\n\n const errorMessage: string | null = checkForErrorResponse(response, t, defaultErrorKey);\n\n if (errorMessage && throwOnError) {\n throw response;\n }\n\n const additionalData: Record<string, any> = (response?.data?.additionalData as Record<string, any>) ?? {};\n\n if (typeof additionalData['consentPrompt'] === 'string') {\n try {\n const parsed: any = JSON.parse(additionalData['consentPrompt']);\n additionalData['consentPrompt'] = {purposes: Array.isArray(parsed) ? parsed : []};\n } catch {\n // Leave unparseable value as-is\n }\n }\n\n return {\n additionalData,\n components: transformComponents(response, t, resolveTranslations, meta),\n executionId: response.executionId,\n };\n};\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {navigate} from '@asgardeo/browser';\n\n/**\n * Initiates OAuth redirect with CSRF protection.\n * Generates random state, stores return path in sessionStorage, and redirects to OAuth provider.\n *\n * @param redirectURL - OAuth authorization URL from the server\n */\nexport function initiateOAuthRedirect(redirectURL: string): void {\n const basePath: string = document.querySelector('base')?.getAttribute('href') || '';\n let returnPath: string = window.location.pathname;\n\n if (basePath && returnPath.startsWith(basePath)) {\n returnPath = returnPath.slice(basePath.length) || '/';\n }\n\n const state: string = crypto.randomUUID();\n\n sessionStorage.setItem(\n `asgardeo_oauth_${state}`,\n JSON.stringify({\n path: returnPath,\n timestamp: Date.now(),\n }),\n );\n\n const redirectUrlObj: URL = new URL(redirectURL);\n redirectUrlObj.searchParams.set('state', state);\n\n navigate(redirectUrlObj.toString());\n}\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoRuntimeError, arrayBufferToBase64url, base64urlToArrayBuffer} from '@asgardeo/browser';\n\n/**\n * Handles WebAuthn/Passkey registration flow for browser environments.\n *\n * @param challengeData - JSON stringified challenge data containing WebAuthn creation options.\n * @returns Promise that resolves to a JSON string containing the WebAuthn registration response.\n */\nexport const handlePasskeyRegistration = async (challengeData: string): Promise<string> => {\n if (!window.navigator.credentials || !window.navigator.credentials.create) {\n throw new AsgardeoRuntimeError(\n 'WebAuthn is not supported in this browser.',\n 'browser-webauthn-not-supported',\n 'browser',\n 'WebAuthn/Passkey registration requires a browser that supports the Web Authentication API.',\n );\n }\n\n try {\n const creationOptions: any = JSON.parse(challengeData);\n\n const publicKey: any = {\n ...creationOptions,\n challenge: base64urlToArrayBuffer(creationOptions.challenge),\n user: {\n ...creationOptions.user,\n id: base64urlToArrayBuffer(creationOptions.user.id),\n },\n ...(creationOptions.excludeCredentials && {\n excludeCredentials: creationOptions.excludeCredentials.map((cred: any) => ({\n ...cred,\n id: base64urlToArrayBuffer(cred.id),\n })),\n }),\n };\n\n const credential: PublicKeyCredential = (await navigator.credentials.create({\n publicKey,\n })) as PublicKeyCredential;\n\n if (!credential) {\n throw new AsgardeoRuntimeError(\n 'No credential returned from WebAuthn registration.',\n 'browser-webauthn-no-credential',\n 'browser',\n 'The WebAuthn registration ceremony completed but did not return a valid credential.',\n );\n }\n\n const response: AuthenticatorAttestationResponse = credential.response as AuthenticatorAttestationResponse;\n\n const registrationResponse: any = {\n id: credential.id,\n rawId: arrayBufferToBase64url(credential.rawId),\n response: {\n attestationObject: arrayBufferToBase64url(response.attestationObject),\n clientDataJSON: arrayBufferToBase64url(response.clientDataJSON),\n ...(response.getTransports && {\n transports: response.getTransports(),\n }),\n },\n type: credential.type,\n ...(credential.authenticatorAttachment && {\n authenticatorAttachment: credential.authenticatorAttachment,\n }),\n };\n\n return JSON.stringify(registrationResponse);\n } catch (error) {\n if (error instanceof AsgardeoRuntimeError) {\n throw error;\n }\n\n if (error instanceof Error) {\n throw new AsgardeoRuntimeError(\n `Passkey registration failed: ${error.message}`,\n 'browser-webauthn-registration-error',\n 'browser',\n `WebAuthn registration failed with error: ${error.name}`,\n );\n }\n\n throw new AsgardeoRuntimeError(\n 'Passkey registration failed due to an unexpected error.',\n 'browser-webauthn-unexpected-error',\n 'browser',\n 'An unexpected error occurred during WebAuthn registration.',\n );\n }\n};\n\n/**\n * Handles WebAuthn/Passkey authentication flow for browser environments.\n *\n * @param challengeData - JSON stringified challenge data containing WebAuthn request options.\n * @returns Promise that resolves to a JSON string containing the WebAuthn authentication response.\n */\nexport const handlePasskeyAuthentication = async (challengeData: string): Promise<string> => {\n if (!window.navigator.credentials || !window.navigator.credentials.get) {\n throw new AsgardeoRuntimeError(\n 'WebAuthn is not supported in this browser.',\n 'browser-webauthn-not-supported',\n 'browser',\n 'WebAuthn/Passkey authentication requires a browser that supports the Web Authentication API.',\n );\n }\n\n try {\n const requestOptions: any = JSON.parse(challengeData);\n\n const publicKey: any = {\n ...requestOptions,\n challenge: base64urlToArrayBuffer(requestOptions.challenge),\n ...(requestOptions.allowCredentials && {\n allowCredentials: requestOptions.allowCredentials.map((cred: any) => ({\n ...cred,\n id: base64urlToArrayBuffer(cred.id),\n })),\n }),\n };\n\n const credential: PublicKeyCredential = (await navigator.credentials.get({\n publicKey,\n })) as PublicKeyCredential;\n\n if (!credential) {\n throw new AsgardeoRuntimeError(\n 'No credential returned from WebAuthn authentication.',\n 'browser-webauthn-no-credential',\n 'browser',\n 'The WebAuthn authentication ceremony completed but did not return a valid credential.',\n );\n }\n\n const response: AuthenticatorAssertionResponse = credential.response as AuthenticatorAssertionResponse;\n\n const authenticationResponse: any = {\n id: credential.id,\n rawId: arrayBufferToBase64url(credential.rawId),\n response: {\n authenticatorData: arrayBufferToBase64url(response.authenticatorData),\n clientDataJSON: arrayBufferToBase64url(response.clientDataJSON),\n signature: arrayBufferToBase64url(response.signature),\n ...(response.userHandle && {\n userHandle: arrayBufferToBase64url(response.userHandle),\n }),\n },\n type: credential.type,\n ...(credential.authenticatorAttachment && {\n authenticatorAttachment: credential.authenticatorAttachment,\n }),\n };\n\n return JSON.stringify(authenticationResponse);\n } catch (error) {\n if (error instanceof AsgardeoRuntimeError) {\n throw error;\n }\n\n if (error instanceof Error) {\n throw new AsgardeoRuntimeError(\n `Passkey authentication failed: ${error.message}`,\n 'browser-webauthn-authentication-error',\n 'browser',\n `WebAuthn authentication failed with error: ${error.name}`,\n );\n }\n\n throw new AsgardeoRuntimeError(\n 'Passkey authentication failed due to an unexpected error.',\n 'browser-webauthn-unexpected-error',\n 'browser',\n 'An unexpected error occurred during WebAuthn authentication.',\n );\n }\n};\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignInV1 from './v1/BaseSignIn';\nimport BaseSignInV2 from './v2/BaseSignIn';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type {BaseSignInRenderProps, BaseSignInProps} from './v2/BaseSignIn';\n\n/**\n * BaseSignIn \u2014 platform-aware base sign-in component.\n *\n * Routes to the V1 (authenticator-based) or V2 (component-driven) BaseSignIn\n * based on the configured `platform`.\n */\nconst BaseSignIn: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseSignIn',\n setup(_props: Record<string, unknown>, {attrs, slots}: SetupContext): () => VNode {\n const {platform} = useAsgardeo();\n\n return (): VNode => {\n if (platform === Platform.AsgardeoV2) {\n return h(BaseSignInV2, {...attrs}, slots);\n }\n\n return h(BaseSignInV1, {...attrs}, slots);\n };\n },\n});\n\nexport default BaseSignIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport SignUpV1 from './v1/SignUp';\nimport SignUpV2 from './v2/SignUp';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type {SignUpRenderProps} from './v2/SignUp';\n\n/**\n * SignUp \u2014 platform-aware sign-up container.\n *\n * Routes to V1 (default, component-driven V1 flow API) or V2 (`AsgardeoV2`\n * platform) based on the `platform` value from {@link useAsgardeo}. Mirrors\n * the existing `SignIn` dispatcher pattern in this package.\n */\nconst SignUp: Component = defineComponent({\n inheritAttrs: false,\n name: 'SignUp',\n setup(_props: Record<string, unknown>, {attrs, slots}: SetupContext): () => VNode {\n const {platform} = useAsgardeo();\n\n return (): VNode => {\n if (platform === Platform.AsgardeoV2) {\n return h(SignUpV2, {...attrs}, slots);\n }\n return h(SignUpV1, {...attrs}, slots);\n };\n },\n});\n\nexport default SignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedFlowExecuteRequestPayload,\n EmbeddedFlowExecuteResponse,\n EmbeddedFlowResponseType,\n EmbeddedFlowType,\n} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignUp from './BaseSignUp';\nimport type {BaseSignUpRenderProps} from './BaseSignUp';\nimport useAsgardeo from '../../../../composables/useAsgardeo';\n\nexport type SignUpRenderProps = BaseSignUpRenderProps;\n\n/**\n * V1 SignUp container \u2014 wires `useAsgardeo().signUp` into `BaseSignUpV1` and\n * handles redirects after the flow completes.\n *\n * Mirrors `sign-up/v2/.../SignUp.ts` but invokes the V1 base component which\n * understands the `TYPOGRAPHY` / `INPUT` / `BUTTON` / `FORM` shapes returned by\n * the V1 flow API.\n */\nconst SignUp: Component = defineComponent({\n name: 'SignUpV1',\n props: {\n afterSignUpUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n messageClassName: {default: '', type: String},\n onComplete: {default: undefined, type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n shouldRedirectAfterSignUp: {default: true, type: Boolean},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'elevated' | 'outlined' | 'flat'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {signUp, isInitialized, applicationId} = useAsgardeo();\n\n const handleInitialize = async (\n payload?: EmbeddedFlowExecuteRequestPayload,\n ): Promise<EmbeddedFlowExecuteResponse> => {\n // Pull the application id from the URL query (same convention as the\n // React V1 SignUp), falling back to the configured value from the\n // Asgardeo context.\n const applicationIdFromUrl: string | null =\n typeof window !== 'undefined' ? new URL(window.location.href).searchParams.get('applicationId') : null;\n const effectiveApplicationId: string | undefined = applicationId || applicationIdFromUrl || undefined;\n\n const initialPayload: any = payload || {\n flowType: EmbeddedFlowType.Registration,\n ...(effectiveApplicationId && {applicationId: effectiveApplicationId}),\n };\n\n return (await signUp(initialPayload)) as EmbeddedFlowExecuteResponse;\n };\n\n const handleOnSubmit = async (payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse> =>\n (await signUp(payload)) as EmbeddedFlowExecuteResponse;\n\n const handleComplete = (response: EmbeddedFlowExecuteResponse): void => {\n props.onComplete?.(response);\n\n const oauthRedirectUrl: string | undefined = (response as any)?.redirectUrl;\n if (props.shouldRedirectAfterSignUp && oauthRedirectUrl) {\n if (typeof window !== 'undefined') {\n window.location.href = oauthRedirectUrl;\n }\n return;\n }\n\n if (\n props.shouldRedirectAfterSignUp &&\n response?.type !== EmbeddedFlowResponseType.Redirection &&\n props.afterSignUpUrl\n ) {\n if (typeof window !== 'undefined') {\n window.location.href = props.afterSignUpUrl;\n }\n }\n };\n\n return (): VNode | null =>\n h(\n BaseSignUp,\n {\n afterSignUpUrl: props.afterSignUpUrl,\n buttonClassName: props.buttonClassName,\n className: props.className,\n errorClassName: props.errorClassName,\n inputClassName: props.inputClassName,\n isInitialized: isInitialized?.value ?? false,\n messageClassName: props.messageClassName,\n onComplete: handleComplete,\n onError: props.onError,\n onInitialize: handleInitialize,\n onSubmit: handleOnSubmit,\n showSubtitle: props.showSubtitle,\n showTitle: props.showTitle,\n size: props.size,\n variant: props.variant,\n },\n slots['default'] ? {default: (renderProps: any) => slots['default']!(renderProps)} : undefined,\n );\n },\n});\n\nexport default SignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedFlowComponent,\n EmbeddedFlowComponentType,\n EmbeddedFlowExecuteRequestPayload,\n EmbeddedFlowExecuteResponse,\n EmbeddedFlowResponseType,\n EmbeddedFlowStatus,\n withVendorCSSClassPrefix,\n} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport {renderSignUpComponents} from './options/SignUpOptionFactory';\nimport useFlow from '../../../../composables/useFlow';\nimport useI18n from '../../../../composables/useI18n';\nimport {createVueLogger} from '../../../../utils/logger';\nimport Alert from '../../../primitives/Alert';\nimport Card from '../../../primitives/Card';\nimport Logo from '../../../primitives/Logo';\nimport Spinner from '../../../primitives/Spinner';\nimport Typography from '../../../primitives/Typography';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('BaseSignUpV1');\n\n/**\n * Render-prop payload exposed via the default slot.\n */\nexport interface BaseSignUpRenderProps {\n components: any[];\n errors: Record<string, string>;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n isLoading: boolean;\n isValid: boolean;\n messages: Array<{message: string; type: string}>;\n subtitle: string;\n title: string;\n touched: Record<string, boolean>;\n values: Record<string, string>;\n}\n\n/**\n * V1 BaseSignUp \u2014 component-driven app-native sign-up for Vue.\n *\n * Mirrors `packages/react/.../SignUp/v1/BaseSignUp.tsx`. Reads the\n * `/api/server/v1/flow/execute` response shape (`TYPOGRAPHY`, `FORM`, `INPUT`,\n * `BUTTON`, `RICH_TEXT`, etc.) and renders it via the V1\n * `SignUpOptionFactory`. Tracks form state internally and submits steps via\n * the `onSubmit` prop until the flow completes.\n */\nconst BaseSignUp: Component = defineComponent({\n emits: ['error', 'flowChange', 'complete'],\n name: 'BaseSignUpV1',\n props: {\n afterSignUpUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n isInitialized: {default: true, type: Boolean},\n messageClassName: {default: '', type: String},\n onComplete: {default: undefined, type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>,\n },\n onInitialize: {\n default: undefined,\n type: Function as PropType<(payload?: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>>,\n },\n onSubmit: {\n default: undefined,\n type: Function as PropType<(payload: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>>,\n },\n shouldRedirectAfterSignUp: {default: true, type: Boolean},\n showLogo: {default: true, type: Boolean},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'elevated' | 'outlined' | 'flat'>},\n },\n setup(props: any, {slots, emit}: SetupContext): () => VNode | null {\n const {t} = useI18n();\n const {title: flowTitle, subtitle: flowSubtitle, messages: flowMessages, addMessage, clearMessages} = useFlow();\n\n // \u2500\u2500 Reactive state \u2500\u2500\n const isLoading: Ref<boolean> = ref(false);\n const isFlowInitialized: Ref<boolean> = ref(false);\n const currentFlow: Ref<EmbeddedFlowExecuteResponse | null> = ref(null);\n const formValues: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n const formErrors: Ref<Record<string, string>> = ref({});\n\n let initializationAttempted: boolean = false;\n\n // \u2500\u2500 Error handling \u2500\u2500\n\n const handleError = (err: any): void => {\n let errorMessage: string = t('errors.signup.flow.failure') || 'Sign-up failed';\n\n if (err && typeof err === 'object') {\n if (err.code && (err.message || err.description)) {\n errorMessage = err.description || err.message;\n } else if (err.message) {\n errorMessage = err.message;\n }\n } else if (typeof err === 'string') {\n errorMessage = err;\n }\n\n clearMessages();\n addMessage({message: errorMessage, type: 'error'});\n };\n\n // \u2500\u2500 Form helpers \u2500\u2500\n\n /**\n * Walk the V1 component tree and collect every INPUT's bound parameter\n * name. The parameter name comes from `config.identifier` (a SCIM claim\n * URI) or `config.name`, falling back to the component id.\n */\n const collectInputNames = (components: EmbeddedFlowComponent[]): string[] => {\n const names: string[] = [];\n const walk = (comps: EmbeddedFlowComponent[]): void => {\n comps.forEach((component: EmbeddedFlowComponent) => {\n const cfg: any = (component as any).config || {};\n if (component.type === EmbeddedFlowComponentType.Input) {\n const name: string = (cfg.name as string) || (cfg.identifier as string) || (component.id as string);\n if (name) names.push(name);\n }\n const children: EmbeddedFlowComponent[] = (component as any).components || [];\n if (children.length > 0) walk(children);\n });\n };\n walk(components);\n return names;\n };\n\n const setupFormFields = (response: EmbeddedFlowExecuteResponse): void => {\n const componentTree: EmbeddedFlowComponent[] = (response.data?.components as EmbeddedFlowComponent[]) || [];\n const names: string[] = collectInputNames(componentTree);\n const initial: Record<string, string> = {};\n names.forEach((name: string) => {\n initial[name] = '';\n });\n formValues.value = initial;\n touchedFields.value = {};\n formErrors.value = {};\n };\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n touchedFields.value = {...touchedFields.value, [name]: true};\n // Clear any prior error on input\n if (formErrors.value[name]) {\n const next: Record<string, string> = {...formErrors.value};\n delete next[name];\n formErrors.value = next;\n }\n };\n\n const isFormValid = (): boolean => Object.keys(formErrors.value).length === 0;\n\n /**\n * Mirror the React V1 popup-based redirection handler for social/IdP\n * registration steps. Opens a popup, waits for the OAuth code, and submits\n * `{code, state}` as the next flow step.\n *\n * Returns `true` if redirection was handled (caller should not fall\n * through), `false` otherwise.\n */\n const handleRedirectionIfNeeded = (response: EmbeddedFlowExecuteResponse): boolean => {\n if (response?.type !== EmbeddedFlowResponseType.Redirection || !(response as any)?.data?.redirectURL) {\n return false;\n }\n if (typeof window === 'undefined') return false;\n\n const redirectUrl: string = (response as any).data.redirectURL;\n const popup: Window | null = window.open(\n redirectUrl,\n 'oauth_popup',\n 'width=500,height=600,scrollbars=yes,resizable=yes',\n );\n\n if (!popup) {\n logger.error('Failed to open popup window for social sign-up redirect');\n return false;\n }\n\n let processed: boolean = false;\n let popupMonitor: ReturnType<typeof setInterval> | undefined;\n let messageHandler: (event: MessageEvent) => Promise<void>;\n\n const cleanup = (): void => {\n window.removeEventListener('message', messageHandler);\n if (popupMonitor) clearInterval(popupMonitor);\n };\n\n const continueWithCode = async (code: string, state: string): Promise<void> => {\n const payload: any = {\n ...(currentFlow.value?.flowId && {flowId: currentFlow.value.flowId}),\n actionId: '',\n flowType: ((currentFlow.value as any)?.flowType as string) || 'REGISTRATION',\n inputs: {code, state},\n };\n try {\n const next: any = await props.onSubmit(payload);\n props.onFlowChange?.(next);\n emit('flowChange', next);\n if (next.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(next);\n emit('complete', next);\n } else if (next.flowStatus === EmbeddedFlowStatus.Incomplete) {\n currentFlow.value = next;\n setupFormFields(next);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n emit('error', err);\n } finally {\n popup.close();\n cleanup();\n }\n };\n\n messageHandler = async (event: MessageEvent): Promise<void> => {\n if (event.source !== popup) return;\n const expectedOrigin: string = props.afterSignUpUrl\n ? new URL(props.afterSignUpUrl).origin\n : window.location.origin;\n if (event.origin !== expectedOrigin && event.origin !== window.location.origin) return;\n const {code, state} = (event.data || {}) as {code?: string; state?: string};\n if (code && state && !processed) {\n processed = true;\n await continueWithCode(code, state);\n }\n };\n window.addEventListener('message', messageHandler);\n\n popupMonitor = setInterval(async () => {\n try {\n if (popup.closed) {\n cleanup();\n return;\n }\n if (processed) return;\n\n // Same-origin URL inspection. Throws on cross-origin (expected while\n // the popup is on the IdP's domain) \u2014 swallow and try next tick.\n let popupUrl: string | undefined;\n try {\n popupUrl = popup.location.href;\n } catch {\n return;\n }\n if (!popupUrl) return;\n\n if (popupUrl.includes('code=') || popupUrl.includes('error=')) {\n const url: URL = new URL(popupUrl);\n const code: string | null = url.searchParams.get('code');\n const state: string | null = url.searchParams.get('state');\n const error: string | null = url.searchParams.get('error');\n if (error) {\n processed = true;\n logger.error(`OAuth error during social sign-up: ${error}`);\n popup.close();\n cleanup();\n return;\n }\n if (code && state) {\n processed = true;\n await continueWithCode(code, state);\n }\n }\n } catch (err) {\n logger.error('Error monitoring sign-up popup');\n }\n }, 1000);\n\n return true;\n };\n\n // \u2500\u2500 Step submission \u2500\u2500\n\n const handleSubmit = async (component: any, data?: Record<string, any>): Promise<void> => {\n if (!currentFlow.value) return;\n\n isLoading.value = true;\n clearMessages();\n\n try {\n const filteredInputs: Record<string, any> = {};\n // Prefer explicit `data` if the component handler passes it; otherwise\n // submit the entire form snapshot. Empty strings are stripped to match\n // the React V1 behaviour.\n const sourceInputs: Record<string, any> = data ?? formValues.value;\n Object.entries(sourceInputs).forEach(([key, value]: [string, any]) => {\n if (value !== null && value !== undefined && value !== '') {\n filteredInputs[key] = value;\n }\n });\n\n const actionId: string | undefined = component?.actionId || component?.id;\n\n const payload: any = {\n ...(currentFlow.value.flowId && {flowId: currentFlow.value.flowId}),\n flowType: ((currentFlow.value as any).flowType as string) || 'REGISTRATION',\n inputs: filteredInputs,\n ...(actionId && {actionId}),\n };\n\n const response: any = await props.onSubmit(payload);\n props.onFlowChange?.(response);\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(response);\n emit('complete', response);\n return;\n }\n\n if (response?.flowStatus === EmbeddedFlowStatus.Incomplete) {\n if (handleRedirectionIfNeeded(response)) return;\n currentFlow.value = response;\n setupFormFields(response);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n emit('error', err);\n } finally {\n isLoading.value = false;\n }\n };\n\n // \u2500\u2500 Flow initialization \u2500\u2500\n\n watch(\n () => [props.isInitialized, isFlowInitialized.value] as [boolean, boolean],\n ([initialized, flowInit]: [boolean, boolean]) => {\n if (!initialized || flowInit || initializationAttempted) return;\n if (!props.onInitialize) return;\n initializationAttempted = true;\n\n (async (): Promise<void> => {\n isLoading.value = true;\n clearMessages();\n try {\n const response: EmbeddedFlowExecuteResponse = await props.onInitialize();\n currentFlow.value = response;\n isFlowInitialized.value = true;\n props.onFlowChange?.(response);\n emit('flowChange', response);\n\n if (response?.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(response);\n emit('complete', response);\n return;\n }\n if (response?.flowStatus === EmbeddedFlowStatus.Incomplete) {\n setupFormFields(response);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n emit('error', err);\n } finally {\n isLoading.value = false;\n }\n })();\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Render \u2500\u2500\n\n return (): VNode | null => {\n const containerClass: string = [\n withVendorCSSClassPrefix('signup'),\n withVendorCSSClassPrefix(`signup--${props.size}`),\n withVendorCSSClassPrefix(`signup--${props.variant}`),\n props.className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // Render-props (scoped slot) escape hatch\n if (slots['default']) {\n const renderProps: BaseSignUpRenderProps = {\n components: (currentFlow.value?.data?.components as any[]) || [],\n errors: formErrors.value,\n handleInputChange,\n handleSubmit,\n isLoading: isLoading.value,\n isValid: isFormValid(),\n messages: (flowMessages.value as Array<{message: string; type: string}>) || [],\n subtitle: flowSubtitle.value || t('signup.subheading') || '',\n title: flowTitle.value || t('signup.heading') || '',\n touched: touchedFields.value,\n values: formValues.value,\n };\n return h('div', {class: containerClass}, slots['default'](renderProps));\n }\n\n // Loading state (initial flow fetch)\n if (!isFlowInitialized.value && isLoading.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;justify-content:center;padding:2rem'}, h(Spinner)),\n );\n }\n\n // Failed to obtain a flow at all\n if (!currentFlow.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h(\n Alert,\n {variant: 'error'},\n () => t('errors.signup.flow.initialization.failure') || 'Failed to initialize sign-up flow',\n ),\n );\n }\n\n const components: EmbeddedFlowComponent[] = (currentFlow.value.data?.components as EmbeddedFlowComponent[]) || [];\n\n const rendered: VNode[] = renderSignUpComponents(\n components,\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid(),\n handleInputChange,\n handleSubmit,\n {\n buttonClassName: props.buttonClassName,\n inputClassName: props.inputClassName,\n size: props.size,\n },\n );\n\n const cardChildren: VNode[] = [];\n\n if (props.showLogo) {\n cardChildren.push(h('div', {style: 'display:flex;justify-content:center;margin-bottom:1rem'}, [h(Logo)]));\n }\n\n if (props.showTitle || props.showSubtitle) {\n const headerChildren: VNode[] = [];\n if (props.showTitle) {\n headerChildren.push(\n h(Typography, {variant: 'h2'}, {default: () => flowTitle.value || t('signup.heading') || 'Sign Up'}),\n );\n }\n if (props.showSubtitle) {\n headerChildren.push(\n h(\n Typography,\n {variant: 'body1'},\n {default: () => flowSubtitle.value || t('signup.subheading') || 'Create your account'},\n ),\n );\n }\n cardChildren.push(h('div', {style: 'padding: 0 1rem 1rem'}, headerChildren));\n }\n\n // Flow-level messages (errors, info)\n if (flowMessages.value && flowMessages.value.length > 0) {\n cardChildren.push(\n h(\n 'div',\n {style: 'padding: 0 1rem'},\n flowMessages.value.map((msg: any, i: number) =>\n h(\n Alert,\n {\n class: props.messageClassName,\n key: msg.id || i,\n variant: msg.type?.toLowerCase() === 'error' ? 'error' : 'info',\n },\n () => msg.message,\n ),\n ),\n ),\n );\n }\n\n cardChildren.push(\n h(\n 'form',\n {\n class: withVendorCSSClassPrefix('signup__form'),\n onSubmit: (e: Event): void => {\n e.preventDefault();\n // Submit-type buttons in the V1 flow are handled inline by the\n // `onSubmit` handler attached to the BUTTON component; the\n // native form submit is a fallback (e.g. enter-key in a field).\n handleSubmit({config: {type: 'submit'}, type: 'BUTTON'});\n },\n style: 'padding: 1rem;display:flex;flex-direction:column;gap:0.75rem',\n },\n rendered.length > 0\n ? rendered\n : [\n h(\n Alert,\n {variant: 'warning'},\n () => t('errors.signup.components.not.available') || 'No components available',\n ),\n ],\n ),\n );\n\n return h(Card, {class: containerClass, variant: props.variant}, () => cardChildren);\n };\n },\n});\n\nexport default BaseSignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedFlowComponent, EmbeddedFlowComponentType, FieldType} from '@asgardeo/browser';\nimport {type VNode, h} from 'vue';\nimport FacebookButton from '../../../../adapters/FacebookButton';\nimport GitHubButton from '../../../../adapters/GitHubButton';\nimport GoogleButton from '../../../../adapters/GoogleButton';\nimport MicrosoftButton from '../../../../adapters/MicrosoftButton';\nimport {createField} from '../../../../factories/FieldFactory';\nimport Button from '../../../../primitives/Button';\nimport Typography from '../../../../primitives/Typography';\n\n/**\n * Mirrors the logic in `packages/react/.../SignUp/v1/SignUpOptionFactory.tsx` \u2014\n * renders the V1 flow component shapes (`TYPOGRAPHY`, `INPUT`, `BUTTON`,\n * `FORM`, `SELECT`, `DIVIDER`, `IMAGE`, `RICH_TEXT`) returned by the Asgardeo\n * `/api/server/v1/flow/execute` endpoint.\n *\n * Each leaf component returns a Vue VNode (or null for unknown types). Branch\n * components (`FORM`) recurse so children render as a flat list.\n */\n\n/**\n * Resolve the form-field name for an input component.\n * Asgardeo V1 stores the bound parameter name in `config.identifier` (e.g.\n * `http://wso2.org/claims/emailaddress`), with `config.name` used as a fallback.\n */\nconst getInputName = (component: any): string => {\n const cfg: any = component.config || {};\n return (cfg.name as string) || (cfg.identifier as string) || (component.id as string);\n};\n\n/**\n * Map V1 INPUT variants/types to the SDK's internal `FieldType` so the existing\n * `createField` factory (used by the V1 sign-in flow too) produces the right\n * primitive (`TextField`, `PasswordField`, `Checkbox`, etc.).\n */\nconst inferFieldType = (component: any): FieldType => {\n const variant: string = String(component.variant || '').toUpperCase();\n const cfg: any = component.config || {};\n const cfgType: string = String(cfg.type || '').toLowerCase();\n\n if (variant === 'EMAIL' || cfgType === 'email') return FieldType.Email;\n if (variant === 'PASSWORD' || cfgType === 'password') return FieldType.Password;\n if (variant === 'TELEPHONE' || cfgType === 'tel') return FieldType.Text;\n if (variant === 'NUMBER' || cfgType === 'number') return FieldType.Number;\n if (variant === 'DATE' || cfgType === 'date') return FieldType.Date;\n if (variant === 'CHECKBOX' || cfgType === 'checkbox') return FieldType.Checkbox;\n return FieldType.Text;\n};\n\n/**\n * Map TYPOGRAPHY variants (H1-H6, BODY, CAPTION etc.) to the Vue Typography\n * primitive's variant prop.\n */\nconst inferTypographyVariant = (\n component: any,\n): 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline' => {\n const variant: string = String(component.variant || '').toUpperCase();\n switch (variant) {\n case 'H1':\n return 'h1';\n case 'H2':\n return 'h2';\n case 'H3':\n return 'h3';\n case 'H4':\n return 'h4';\n case 'H5':\n return 'h5';\n case 'H6':\n return 'h6';\n case 'SUBTITLE1':\n return 'subtitle1';\n case 'SUBTITLE2':\n return 'subtitle2';\n case 'BODY2':\n return 'body2';\n case 'CAPTION':\n return 'caption';\n case 'OVERLINE':\n return 'overline';\n default:\n return 'body1';\n }\n};\n\n/**\n * Detect whether a BUTTON looks like a known social-login provider so we can\n * render a branded button (matches the React V1 factory's behaviour).\n */\nconst matchesSocialProvider = (component: any, provider: 'google' | 'github' | 'microsoft' | 'facebook'): boolean => {\n const text: string = String(component?.config?.text || component?.config?.label || '').toLowerCase();\n const variant: string = String(component?.variant || '').toUpperCase();\n return variant === 'SOCIAL' && text.includes(provider);\n};\n\n/**\n * Props shared by all sign-up component renderers.\n */\nexport interface BaseSignUpOptionProps {\n buttonClassName?: string;\n component: EmbeddedFlowComponent;\n formErrors: Record<string, string>;\n formValues: Record<string, string>;\n inputClassName?: string;\n isFormValid: boolean;\n isLoading: boolean;\n onInputChange: (name: string, value: string) => void;\n onSubmit: (component: EmbeddedFlowComponent, data?: Record<string, any>) => void;\n size?: 'small' | 'medium' | 'large';\n touchedFields: Record<string, boolean>;\n}\n\n/**\n * Build a VNode for a single V1 flow component. Returns `null` for unknown\n * types (caller filters these out).\n */\nexport const createSignUpComponent = (props: BaseSignUpOptionProps): VNode | VNode[] | null => {\n const {\n component,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n onInputChange,\n onSubmit,\n inputClassName,\n buttonClassName,\n } = props;\n\n const cfg: any = (component as any).config || {};\n\n switch (component.type) {\n case EmbeddedFlowComponentType.Typography: {\n const text: string = String(cfg.text || cfg.label || '');\n return h(\n Typography,\n {style: 'margin-bottom:0.5rem', variant: inferTypographyVariant(component)},\n {default: () => text},\n );\n }\n\n case EmbeddedFlowComponentType.Input: {\n const name: string = getInputName(component);\n const fieldType: FieldType = inferFieldType(component);\n const value: string = formValues[name] || '';\n const isTouched: boolean = touchedFields[name] || false;\n const error: string | undefined = isTouched ? formErrors[name] : undefined;\n\n return createField({\n className: inputClassName,\n disabled: isLoading,\n error,\n label: String(cfg.label || ''),\n name,\n onChange: (newValue: string) => onInputChange(name, newValue),\n placeholder: String(cfg.placeholder || ''),\n required: Boolean(cfg.required),\n touched: isTouched,\n type: fieldType,\n value,\n });\n }\n\n case EmbeddedFlowComponentType.Button: {\n const text: string = String(cfg.text || cfg.label || 'Submit');\n const variant: string = String(component.variant || 'PRIMARY').toUpperCase();\n const isPrimary: boolean = variant === 'PRIMARY';\n const handleClick = (): void => onSubmit(component, undefined);\n\n // Branded social-login buttons for known providers\n if (matchesSocialProvider(component, 'google')) {\n return h(GoogleButton, {class: buttonClassName, isLoading, onClick: handleClick});\n }\n if (matchesSocialProvider(component, 'github')) {\n return h(GitHubButton, {class: buttonClassName, isLoading, onClick: handleClick});\n }\n if (matchesSocialProvider(component, 'microsoft')) {\n return h(MicrosoftButton, {class: buttonClassName, isLoading, onClick: handleClick});\n }\n if (matchesSocialProvider(component, 'facebook')) {\n return h(FacebookButton, {class: buttonClassName, isLoading, onClick: handleClick});\n }\n\n // Generic submit/secondary button\n return h(\n Button,\n {\n class: buttonClassName,\n color: isPrimary ? 'primary' : 'secondary',\n 'data-testid': 'asgardeo-signup-submit',\n disabled: isLoading || (!isFormValid && cfg.type === 'submit'),\n fullWidth: true,\n loading: isLoading,\n onClick: handleClick,\n type: cfg.type === 'submit' ? 'submit' : 'button',\n variant: isPrimary ? 'solid' : 'outline',\n },\n {default: () => text},\n );\n }\n\n case EmbeddedFlowComponentType.Form: {\n // Recursively render child components inline (one form wrapper at the\n // BaseSignUp level handles native `<form>` semantics \u2014 we just unwrap\n // children here to keep the render flat).\n const children: any[] = (component as any).components || [];\n const nodes: VNode[] = [];\n children.forEach((child: EmbeddedFlowComponent) => {\n const rendered: VNode | VNode[] | null = createSignUpComponent({...props, component: child});\n if (rendered === null) return;\n if (Array.isArray(rendered)) nodes.push(...rendered);\n else nodes.push(rendered);\n });\n return nodes;\n }\n\n case EmbeddedFlowComponentType.Divider: {\n return h('hr', {\n class: 'asgardeo-signup__divider',\n style: 'margin:0.75rem 0;border:0;border-top:1px solid #e5e7eb',\n });\n }\n\n case EmbeddedFlowComponentType.Image: {\n const src: string = String(cfg.src || cfg.url || '');\n const alt: string = String(cfg.alt || '');\n if (!src) return null;\n return h('img', {alt, src, style: 'max-width:100%;height:auto;display:block;margin:0.5rem auto'});\n }\n\n default: {\n // Asgardeo's V1 flow API also returns 'RICH_TEXT' which is not in the V1\n // component-type enum (the enum predates it). Render its raw HTML so\n // links and inline copy show up.\n if (String(component.type).toUpperCase() === 'RICH_TEXT') {\n const html: string = String(cfg.text || cfg.label || '');\n return h('div', {class: 'asgardeo-signup__rich-text', innerHTML: html});\n }\n return null;\n }\n }\n};\n\n/**\n * Render an array of V1 flow components as Vue VNodes, flattening nested\n * containers (FORM) into a single list.\n */\nexport const renderSignUpComponents = (\n components: EmbeddedFlowComponent[],\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n formErrors: Record<string, string>,\n isLoading: boolean,\n isFormValid: boolean,\n onInputChange: (name: string, value: string) => void,\n onSubmit: (component: EmbeddedFlowComponent, data?: Record<string, any>) => void,\n options?: {\n buttonClassName?: string;\n inputClassName?: string;\n size?: 'small' | 'medium' | 'large';\n },\n): VNode[] => {\n const result: VNode[] = [];\n components.forEach((component: EmbeddedFlowComponent) => {\n const rendered: VNode | VNode[] | null = createSignUpComponent({\n buttonClassName: options?.buttonClassName,\n component,\n formErrors,\n formValues,\n inputClassName: options?.inputClassName,\n isFormValid,\n isLoading,\n onInputChange,\n onSubmit,\n size: options?.size,\n touchedFields,\n });\n if (rendered === null) return;\n if (Array.isArray(rendered)) result.push(...rendered);\n else result.push(rendered);\n });\n return result;\n};\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedFlowExecuteRequestPayload,\n EmbeddedFlowExecuteResponse,\n EmbeddedFlowResponseType,\n EmbeddedFlowType,\n} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignUp from './BaseSignUp';\nimport type {BaseSignUpRenderProps} from './BaseSignUp';\nimport useAsgardeo from '../../../../composables/useAsgardeo';\n\nexport type SignUpRenderProps = BaseSignUpRenderProps;\n\n/**\n * SignUp \u2014 embedded sign-up component that handles API calls and delegates UI to BaseSignUp.\n */\nconst SignUp: Component = defineComponent({\n name: 'SignUp',\n props: {\n afterSignUpUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n messageClassName: {default: '', type: String},\n onComplete: {default: undefined, type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n shouldRedirectAfterSignUp: {default: true, type: Boolean},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'elevated' | 'outlined' | 'flat'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {signUp, isInitialized, applicationId} = useAsgardeo();\n\n const handleInitialize = async (\n payload?: EmbeddedFlowExecuteRequestPayload,\n ): Promise<EmbeddedFlowExecuteResponse> => {\n const urlParams: URLSearchParams = new URL(window.location.href).searchParams;\n const applicationIdFromUrl: string | null = urlParams.get('applicationId');\n const effectiveApplicationId: string | undefined = applicationId || applicationIdFromUrl || undefined;\n\n const initialPayload: any = payload || {\n flowType: EmbeddedFlowType.Registration,\n ...(effectiveApplicationId && {applicationId: effectiveApplicationId}),\n };\n\n return (await signUp(initialPayload)) as EmbeddedFlowExecuteResponse;\n };\n\n const handleOnSubmit = async (payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse> =>\n (await signUp(payload)) as EmbeddedFlowExecuteResponse;\n\n const handleComplete = (response: EmbeddedFlowExecuteResponse): void => {\n props.onComplete?.(response);\n\n const oauthRedirectUrl: string | undefined = (response as any)?.redirectUrl;\n if (props.shouldRedirectAfterSignUp && oauthRedirectUrl) {\n window.location.href = oauthRedirectUrl;\n return;\n }\n\n if (\n props.shouldRedirectAfterSignUp &&\n response?.type !== EmbeddedFlowResponseType.Redirection &&\n props.afterSignUpUrl\n ) {\n window.location.href = props.afterSignUpUrl;\n }\n\n if (\n props.shouldRedirectAfterSignUp &&\n response?.type === EmbeddedFlowResponseType.Redirection &&\n response?.data?.redirectURL &&\n !response.data.redirectURL.includes('oauth') &&\n !response.data.redirectURL.includes('auth')\n ) {\n window.location.href = response.data.redirectURL;\n }\n };\n\n return (): VNode | null =>\n h(\n BaseSignUp,\n {\n afterSignUpUrl: props.afterSignUpUrl,\n buttonClassName: props.buttonClassName,\n className: props.className,\n errorClassName: props.errorClassName,\n inputClassName: props.inputClassName,\n isInitialized: isInitialized?.value ?? false,\n messageClassName: props.messageClassName,\n onComplete: handleComplete,\n onError: props.onError,\n onInitialize: handleInitialize,\n onSubmit: handleOnSubmit,\n showSubtitle: props.showSubtitle,\n showTitle: props.showTitle,\n size: props.size,\n variant: props.variant,\n },\n slots['default'] ? {default: (renderProps: any) => slots['default']!(renderProps)} : undefined,\n );\n },\n});\n\nexport default SignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,\n EmbeddedFlowExecuteRequestPayload,\n EmbeddedFlowExecuteResponse,\n EmbeddedFlowResponseType,\n EmbeddedFlowStatus,\n FlowMetadataResponse,\n withVendorCSSClassPrefix,\n} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport useFlowMeta from '../../../../composables/useFlowMeta';\nimport useI18n from '../../../../composables/useI18n';\nimport {createVueLogger} from '../../../../utils/logger';\nimport {normalizeFlowResponse, extractErrorMessage} from '../../../../utils/v2/flowTransformer';\nimport getAuthComponentHeadings from '../../../../utils/v2/getAuthComponentHeadings';\nimport {handlePasskeyRegistration} from '../../../../utils/v2/passkey';\nimport Alert from '../../../primitives/Alert';\nimport Card from '../../../primitives/Card';\nimport Spinner from '../../../primitives/Spinner';\nimport Typography from '../../../primitives/Typography';\nimport {renderSignUpComponents} from '../../sign-in/AuthOptionFactory';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('BaseSignUp');\n\n/**\n * Passkey registration tracking state.\n */\ninterface PasskeyState {\n actionId: string | null;\n creationOptions: string | null;\n error: Error | null;\n flowId: string | null;\n isActive: boolean;\n}\n\n/**\n * Render props passed to the default scoped slot.\n */\nexport interface BaseSignUpRenderProps {\n components: any[];\n error?: Error | null;\n fieldErrors: Record<string, string>;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n isLoading: boolean;\n isValid: boolean;\n messages: Array<{message: string; type: string}>;\n subtitle: string;\n title: string;\n touched: Record<string, boolean>;\n validateForm: () => {fieldErrors: Record<string, string>; isValid: boolean};\n values: Record<string, string>;\n}\n\nexport interface BaseSignUpProps {\n afterSignUpUrl?: string;\n buttonClassName?: string;\n className?: string;\n error?: Error | null;\n errorClassName?: string;\n inputClassName?: string;\n isInitialized?: boolean;\n messageClassName?: string;\n onComplete?: (response: EmbeddedFlowExecuteResponse) => void;\n onError?: (error: Error) => void;\n onFlowChange?: (response: EmbeddedFlowExecuteResponse) => void;\n onInitialize?: (payload?: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>;\n onSubmit?: (payload: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>;\n shouldRedirectAfterSignUp?: boolean;\n showLogo?: boolean;\n showSubtitle?: boolean;\n showTitle?: boolean;\n size?: 'small' | 'medium' | 'large';\n variant?: 'elevated' | 'outlined' | 'flat';\n}\n\ninterface FieldDefinition {\n name: string;\n required: boolean;\n type: string;\n}\n\nconst extractFormFields = (components: any[]): FieldDefinition[] => {\n const fields: FieldDefinition[] = [];\n const process = (comps: any[]): void => {\n comps.forEach((c: any) => {\n if (\n c.type === EmbeddedFlowComponentType.TextInput ||\n c.type === EmbeddedFlowComponentType.PasswordInput ||\n c.type === EmbeddedFlowComponentType.EmailInput ||\n c.type === EmbeddedFlowComponentType.Select\n ) {\n const fieldName: string = c.ref || c.id;\n fields.push({name: fieldName, required: c.required || false, type: c.type});\n }\n if (c.components && Array.isArray(c.components)) {\n process(c.components);\n }\n });\n };\n process(components);\n return fields;\n};\n\n/**\n * BaseSignUp \u2014 app-native sign-up presentation component.\n *\n * Manages the sign-up flow lifecycle including initialization, form state,\n * passkey registration, popup-based social OAuth, and renders the server-driven UI.\n */\nconst BaseSignUp: Component = defineComponent({\n emits: ['error', 'complete', 'flowChange'],\n name: 'BaseSignUp',\n props: {\n afterSignUpUrl: {default: undefined, type: String},\n buttonClassName: {default: '', type: String},\n className: {default: '', type: String},\n error: {default: null, type: Object as PropType<Error | null>},\n errorClassName: {default: '', type: String},\n inputClassName: {default: '', type: String},\n isInitialized: {default: false, type: Boolean},\n messageClassName: {default: '', type: String},\n onComplete: {default: undefined, type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: EmbeddedFlowExecuteResponse) => void>,\n },\n onInitialize: {\n default: undefined,\n type: Function as PropType<(payload?: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>>,\n },\n onSubmit: {\n default: undefined,\n type: Function as PropType<(payload: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>>,\n },\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {\n default: 'medium',\n type: String as PropType<'small' | 'medium' | 'large'>,\n },\n variant: {\n default: 'outlined',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {meta: flowMetaRef} = useFlowMeta();\n const {t} = useI18n();\n\n // \u2500\u2500 State \u2500\u2500\n const isLoading: Ref<boolean> = ref(false);\n const isFlowInitialized: Ref<boolean> = ref(false);\n const currentFlow: Ref<EmbeddedFlowExecuteResponse | null> = ref(null);\n const apiError: Ref<Error | null> = ref(null);\n const flowMessages: Ref<Array<{message: string; type: string}>> = ref([]);\n const passkeyState: Ref<PasskeyState> = ref({\n actionId: null,\n creationOptions: null,\n error: null,\n flowId: null,\n isActive: false,\n });\n\n // Form state\n const formValues: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n const formErrors: Ref<Record<string, string>> = ref({});\n const isFormValid: Ref<boolean> = ref(true);\n\n // One-time flags (plain mutable, not reactive)\n let initializationAttempted: boolean = false;\n let passkeyProcessed: boolean = false;\n\n // \u2500\u2500 Helpers \u2500\u2500\n\n const handleError = (error: any): void => {\n const errorMessage: string = error?.failureReason || extractErrorMessage(error, t);\n apiError.value = error instanceof Error ? error : new Error(errorMessage);\n flowMessages.value = [{message: errorMessage, type: 'error'}];\n };\n\n const normalizeFlowResponseLocal = (response: EmbeddedFlowExecuteResponse): EmbeddedFlowExecuteResponse => {\n if (response?.data?.components && Array.isArray(response.data.components)) {\n return response;\n }\n if (response?.data) {\n const {components} = normalizeFlowResponse(\n response,\n t,\n {defaultErrorKey: 'components.signUp.errors.generic', resolveTranslations: false},\n (flowMetaRef as Ref<FlowMetadataResponse | null>).value,\n );\n return {...response, data: {...response.data, components: components as any}};\n }\n return response;\n };\n\n const setupFormFields = (flowResponse: EmbeddedFlowExecuteResponse): void => {\n const fields: FieldDefinition[] = extractFormFields(flowResponse.data?.components || []);\n const initialValues: Record<string, string> = {};\n fields.forEach((f: FieldDefinition) => {\n initialValues[f.name] = '';\n });\n formValues.value = initialValues;\n touchedFields.value = {};\n formErrors.value = {};\n isFormValid.value = true;\n };\n\n const computeFormErrors = (): Record<string, string> => {\n const components: any[] = currentFlow.value?.data?.components || [];\n const fields: FieldDefinition[] = extractFormFields(components);\n const errors: Record<string, string> = {};\n fields.forEach((field: FieldDefinition) => {\n const value: string = formValues.value[field.name] || '';\n if (field.required && (!value || value.trim() === '')) {\n errors[field.name] = t('validations.required.field.error') || 'This field is required';\n }\n if (\n (field.type === EmbeddedFlowComponentType.EmailInput || field.type === 'EMAIL') &&\n value &&\n !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)\n ) {\n errors[field.name] = t('field.email.invalid') || 'Invalid email address';\n }\n });\n return errors;\n };\n\n const touchAllFields = (): void => {\n const fields: FieldDefinition[] = extractFormFields(currentFlow.value?.data?.components || []);\n const newTouched: Record<string, boolean> = {};\n fields.forEach((f: FieldDefinition) => {\n newTouched[f.name] = true;\n });\n touchedFields.value = newTouched;\n };\n\n const validateForm = (): {fieldErrors: Record<string, string>; isValid: boolean} => {\n touchAllFields();\n const errors: Record<string, string> = computeFormErrors();\n formErrors.value = errors;\n const valid: boolean = Object.keys(errors).length === 0;\n isFormValid.value = valid;\n return {fieldErrors: errors, isValid: valid};\n };\n\n // \u2500\u2500 Input handlers \u2500\u2500\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n };\n\n const handleInputBlur = (name: string): void => {\n touchedFields.value = {...touchedFields.value, [name]: true};\n };\n\n // \u2500\u2500 Popup OAuth for social sign-up \u2500\u2500\n\n const handleRedirectionIfNeeded = (response: EmbeddedFlowExecuteResponse): boolean => {\n if (response?.type !== EmbeddedFlowResponseType.Redirection || !response?.data?.redirectURL) {\n return false;\n }\n\n const redirectUrl: string = response.data.redirectURL;\n const popup: Window | null = window.open(\n redirectUrl,\n 'oauth_popup',\n 'width=500,height=600,scrollbars=yes,resizable=yes',\n );\n\n if (!popup) {\n logger.error('Failed to open popup window');\n return false;\n }\n\n let hasProcessedCallback: boolean = false;\n let popupMonitor: ReturnType<typeof setInterval> | null = null;\n let messageHandler: ((event: MessageEvent) => Promise<void>) | null = null;\n\n const cleanup = (): void => {\n if (messageHandler) window.removeEventListener('message', messageHandler);\n if (popupMonitor) clearInterval(popupMonitor);\n };\n\n const processOAuthCode = async (code: string, state: string): Promise<void> => {\n const payload: EmbeddedFlowExecuteRequestPayload = {\n ...(currentFlow.value?.flowId && {flowId: currentFlow.value.flowId}),\n action: '',\n flowType: (currentFlow.value as any)?.flowType || 'REGISTRATION',\n inputs: {code, state},\n } as any;\n\n try {\n const continueResponse: EmbeddedFlowExecuteResponse = await props.onSubmit(payload);\n props.onFlowChange?.(continueResponse);\n\n if (continueResponse.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(continueResponse);\n } else if (continueResponse.flowStatus === EmbeddedFlowStatus.Incomplete) {\n currentFlow.value = continueResponse;\n setupFormFields(continueResponse);\n }\n popup.close();\n cleanup();\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n popup.close();\n cleanup();\n }\n };\n\n messageHandler = async (event: MessageEvent): Promise<void> => {\n if (event.source !== popup) return;\n const expectedOrigin: string = props.afterSignUpUrl\n ? new URL(props.afterSignUpUrl).origin\n : window.location.origin;\n if (event.origin !== expectedOrigin && event.origin !== window.location.origin) return;\n const {code, state} = event.data;\n if (code && state) {\n await processOAuthCode(code, state);\n }\n };\n\n window.addEventListener('message', messageHandler);\n\n popupMonitor = setInterval(async () => {\n try {\n if (popup.closed) {\n cleanup();\n return;\n }\n if (hasProcessedCallback) return;\n try {\n const popupUrl: string = popup.location.href;\n if (popupUrl && (popupUrl.includes('code=') || popupUrl.includes('error='))) {\n hasProcessedCallback = true;\n const url: URL = new URL(popupUrl);\n const code: string | null = url.searchParams.get('code');\n const state: string | null = url.searchParams.get('state');\n const error: string | null = url.searchParams.get('error');\n\n if (error) {\n logger.error('OAuth error');\n popup.close();\n cleanup();\n return;\n }\n if (code && state) {\n await processOAuthCode(code, state);\n }\n }\n } catch {\n // Cross-origin error expected during OAuth redirect\n }\n } catch {\n logger.error('Error monitoring popup');\n }\n }, 1000);\n\n return true;\n };\n\n // \u2500\u2500 Submit handler \u2500\u2500\n\n const handleSubmit = async (\n component: any,\n data?: Record<string, any>,\n skipValidation?: boolean,\n ): Promise<void> => {\n if (!currentFlow.value) return;\n\n if (!skipValidation) {\n const validation: {fieldErrors: Record<string, string>; isValid: boolean} = validateForm();\n if (!validation.isValid) return;\n }\n\n isLoading.value = true;\n apiError.value = null;\n flowMessages.value = [];\n\n try {\n const filteredInputs: Record<string, any> = {};\n if (data) {\n Object.entries(data).forEach(([key, value]: [string, any]) => {\n if (value !== null && value !== undefined && value !== '') {\n filteredInputs[key] = value;\n }\n });\n }\n\n const payload: EmbeddedFlowExecuteRequestPayload = {\n ...(currentFlow.value.flowId && {flowId: currentFlow.value.flowId}),\n flowType: (currentFlow.value as any).flowType || 'REGISTRATION',\n ...(component.id && {action: component.id}),\n inputs: filteredInputs,\n } as any;\n\n const rawResponse: EmbeddedFlowExecuteResponse = await props.onSubmit(payload);\n const response: EmbeddedFlowExecuteResponse = normalizeFlowResponseLocal(rawResponse);\n props.onFlowChange?.(response);\n\n if (response.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(response);\n return;\n }\n\n if (response.flowStatus === EmbeddedFlowStatus.Incomplete) {\n if (handleRedirectionIfNeeded(response)) return;\n\n if (response.data?.additionalData?.['passkeyCreationOptions']) {\n const {passkeyCreationOptions} = response.data.additionalData as any;\n const effectiveFlowId: string | undefined = response.flowId || currentFlow.value?.flowId;\n passkeyProcessed = false;\n passkeyState.value = {\n actionId: component.id || 'submit',\n creationOptions: passkeyCreationOptions,\n error: null,\n flowId: effectiveFlowId || null,\n isActive: true,\n };\n isLoading.value = false;\n return;\n }\n\n currentFlow.value = response;\n setupFormFields(response);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n } finally {\n isLoading.value = false;\n }\n };\n\n // \u2500\u2500 Passkey registration watch \u2500\u2500\n\n watch(\n () => passkeyState.value,\n async (state: PasskeyState) => {\n if (!state.isActive || !state.creationOptions || !state.flowId) return;\n if (passkeyProcessed) return;\n passkeyProcessed = true;\n\n try {\n const passkeyResponse: string = await handlePasskeyRegistration(state.creationOptions);\n const passkeyObj: any = JSON.parse(passkeyResponse);\n const inputs: Record<string, string> = {\n attestationObject: passkeyObj.response.attestationObject,\n clientDataJSON: passkeyObj.response.clientDataJSON,\n credentialId: passkeyObj.id,\n };\n\n const payload: EmbeddedFlowExecuteRequestPayload = {\n actionId: state.actionId || 'submit',\n flowId: state.flowId,\n flowType: (currentFlow.value as any)?.flowType || 'REGISTRATION',\n inputs,\n } as any;\n\n const nextResponse: EmbeddedFlowExecuteResponse = await props.onSubmit(payload);\n const processed: EmbeddedFlowExecuteResponse = normalizeFlowResponseLocal(nextResponse);\n props.onFlowChange?.(processed);\n\n if (processed.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(processed);\n } else {\n currentFlow.value = processed;\n setupFormFields(processed);\n }\n\n passkeyState.value = {actionId: null, creationOptions: null, error: null, flowId: null, isActive: false};\n } catch (error: unknown) {\n passkeyState.value = {...passkeyState.value, error: error as Error, isActive: false};\n handleError(error);\n props.onError?.(error as Error);\n }\n },\n {deep: true},\n );\n\n // \u2500\u2500 Flow initialization \u2500\u2500\n\n watch(\n () => [props.isInitialized, isFlowInitialized.value] as [boolean, boolean],\n ([initialized, flowInit]: [boolean, boolean]) => {\n // Skip if URL has OAuth code params\n const urlParams: URLSearchParams = new URL(window.location.href).searchParams;\n if (urlParams.get('code') || urlParams.get('state')) return;\n\n if (initialized && !flowInit && !initializationAttempted) {\n initializationAttempted = true;\n\n (async (): Promise<void> => {\n isLoading.value = true;\n apiError.value = null;\n flowMessages.value = [];\n\n try {\n const rawResponse: EmbeddedFlowExecuteResponse = await props.onInitialize();\n const response: EmbeddedFlowExecuteResponse = normalizeFlowResponseLocal(rawResponse);\n currentFlow.value = response;\n isFlowInitialized.value = true;\n props.onFlowChange?.(response);\n\n if (response.flowStatus === EmbeddedFlowStatus.Complete) {\n props.onComplete?.(response);\n return;\n }\n if (response.flowStatus === EmbeddedFlowStatus.Incomplete) {\n setupFormFields(response);\n }\n } catch (err) {\n handleError(err);\n props.onError?.(err as Error);\n } finally {\n isLoading.value = false;\n }\n })();\n }\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Render \u2500\u2500\n\n return (): VNode | null => {\n const containerClass: string = [\n withVendorCSSClassPrefix('signup'),\n withVendorCSSClassPrefix(`signup--${props.size}`),\n withVendorCSSClassPrefix(`signup--${props.variant}`),\n props.className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // Scoped slot / render props\n if (slots['default']) {\n const renderProps: BaseSignUpRenderProps = {\n components: currentFlow.value?.data?.components || [],\n error: apiError.value,\n fieldErrors: formErrors.value,\n handleInputChange,\n handleSubmit,\n isLoading: isLoading.value,\n isValid: isFormValid.value,\n messages: flowMessages.value,\n subtitle: t('signup.subheading') || 'Create your account',\n title: t('signup.heading') || 'Sign Up',\n touched: touchedFields.value,\n validateForm: (): {fieldErrors: Record<string, string>; isValid: boolean} => {\n const result: {fieldErrors: Record<string, string>; isValid: boolean} = validateForm();\n return {fieldErrors: result.fieldErrors, isValid: result.isValid};\n },\n values: formValues.value,\n };\n return h('div', {class: containerClass}, slots['default'](renderProps));\n }\n\n // Loading state\n if (!isFlowInitialized.value && isLoading.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;justify-content:center;padding:2rem'}, h(Spinner)),\n );\n }\n\n // No flow available\n if (!currentFlow.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h(\n Alert,\n {variant: 'error'},\n () => t('errors.signup.flow.initialization.failure') || 'Failed to initialize sign-up flow',\n ),\n );\n }\n\n // Extract headings\n const componentsToRender: any[] = currentFlow.value.data?.components || [];\n const {title, subtitle, componentsWithoutHeadings} = getAuthComponentHeadings(\n componentsToRender,\n undefined,\n undefined,\n t('signup.heading') || 'Sign Up',\n t('signup.subheading') || 'Create your account',\n );\n\n const meta: FlowMetadataResponse | null = (flowMetaRef as Ref<FlowMetadataResponse | null>).value;\n\n const renderedComponents: VNode[] =\n componentsWithoutHeadings.length > 0\n ? renderSignUpComponents(\n componentsWithoutHeadings,\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid.value,\n handleInputChange,\n {\n buttonClassName: props.buttonClassName,\n inputClassName: props.inputClassName,\n meta,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size: props.size,\n t,\n variant: props.variant,\n },\n )\n : [];\n\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n // Header with title/subtitle\n props.showTitle || props.showSubtitle\n ? h('div', {style: 'padding: 1rem 1rem 0'}, [\n props.showTitle ? h(Typography, {variant: 'h5'}, () => title) : null,\n props.showSubtitle\n ? h(Typography, {style: 'margin-top: 0.25rem', variant: 'body1'}, () => subtitle)\n : null,\n ])\n : null,\n // External error\n props.error\n ? h(\n 'div',\n {style: 'padding: 0 1rem'},\n h(Alert, {variant: 'error'}, () => props.error.message),\n )\n : null,\n // Flow messages\n flowMessages.value.length > 0\n ? h(\n 'div',\n {style: 'padding: 0 1rem'},\n flowMessages.value.map((msg: {message: string; type: string}, i: number) =>\n h(Alert, {key: i, variant: msg.type === 'error' ? 'error' : 'info'}, () => msg.message),\n ),\n )\n : null,\n // Components\n h(\n 'div',\n {style: 'padding: 1rem'},\n renderedComponents.length > 0\n ? renderedComponents\n : [\n h(\n Alert,\n {variant: 'warning'},\n () => t('errors.signup.components.not.available') || 'No components available',\n ),\n ],\n ),\n ]);\n };\n },\n});\n\nexport default BaseSignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedFlowComponentV2 as EmbeddedFlowComponent} from '@asgardeo/browser';\n\n/**\n * Result of heading extraction from flow components\n */\nexport interface HeadingExtractionResult {\n heading: EmbeddedFlowComponent | null;\n subheading: EmbeddedFlowComponent | null;\n}\n\n/**\n * Complete result of authentication component heading extraction\n */\nexport interface AuthComponentHeadingsResult {\n componentsWithoutHeadings: EmbeddedFlowComponent[];\n headingComponents: HeadingExtractionResult;\n subtitle: string;\n title: string;\n}\n\n/**\n * Extracts heading and subheading components from authentication flow components\n * and provides resolved title/subtitle text with fallback logic.\n */\nconst getAuthComponentHeadings = (\n components: EmbeddedFlowComponent[],\n flowTitle?: string,\n flowSubtitle?: string,\n defaultTitle?: string,\n defaultSubtitle?: string,\n): AuthComponentHeadingsResult => {\n let heading: EmbeddedFlowComponent | null = null;\n let subheading: EmbeddedFlowComponent | null = null;\n\n const findHeadings = (comps: EmbeddedFlowComponent[]): void => {\n comps.some((component: EmbeddedFlowComponent) => {\n if (component.type === 'TEXT' && component.variant && component.variant.startsWith('HEADING_')) {\n if (!heading) {\n heading = component;\n } else if (!subheading) {\n subheading = component;\n return true;\n }\n }\n\n if (component.components && component.components.length > 0) {\n findHeadings(component.components);\n return Boolean(heading && subheading);\n }\n\n return false;\n });\n };\n\n const filterComponents = (comps: EmbeddedFlowComponent[]): EmbeddedFlowComponent[] => {\n let foundHeadings: number = 0;\n const maxHeadings: number = 2;\n\n const filter = (items: EmbeddedFlowComponent[]): EmbeddedFlowComponent[] =>\n items.reduce((acc: EmbeddedFlowComponent[], component: EmbeddedFlowComponent) => {\n if (\n foundHeadings < maxHeadings &&\n component.type === 'TEXT' &&\n component.variant &&\n component.variant.startsWith('HEADING_')\n ) {\n foundHeadings += 1;\n return acc;\n }\n\n if (component.components && component.components.length > 0) {\n const filteredNestedComponents: EmbeddedFlowComponent[] = filter(component.components);\n if (filteredNestedComponents.length > 0) {\n acc.push({\n ...component,\n components: filteredNestedComponents,\n });\n }\n } else {\n acc.push(component);\n }\n\n return acc;\n }, []);\n\n return filter(comps);\n };\n\n const getComponentText = (component: EmbeddedFlowComponent | null): string => {\n if (!component) return '';\n return component.label || '';\n };\n\n findHeadings(components);\n\n const headingText: string = getComponentText(heading);\n const subheadingText: string = getComponentText(subheading);\n\n const result: AuthComponentHeadingsResult = {\n componentsWithoutHeadings: filterComponents(components),\n headingComponents: {heading, subheading},\n subtitle: flowSubtitle || subheadingText || defaultSubtitle || '',\n title: flowTitle || headingText || defaultTitle || '',\n };\n\n return result;\n};\n\nexport default getAuthComponentHeadings;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@asgardeo/browser';\nimport {type Component, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseSignUpV1 from './v1/BaseSignUp';\nimport BaseSignUpV2 from './v2/BaseSignUp';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type {BaseSignUpRenderProps, BaseSignUpProps} from './v2/BaseSignUp';\n\n/**\n * BaseSignUp \u2014 platform-aware base sign-up component.\n *\n * Routes to V1 (component-driven, V1 flow API: `TYPOGRAPHY` / `INPUT` /\n * `BUTTON` / `FORM` shapes) or V2 (`AsgardeoV2` platform with `BLOCK` / `STACK`\n * / `TEXT_INPUT` shapes) based on the `platform` value resolved by\n * {@link useAsgardeo}.\n *\n * Mirrors the React `BaseSignUp` dispatcher and matches the existing pattern\n * already used by `BaseSignIn` in this package.\n */\nconst BaseSignUp: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseSignUp',\n setup(_props: Record<string, unknown>, {attrs, slots}: SetupContext): () => VNode {\n const {platform} = useAsgardeo();\n\n return (): VNode => {\n if (platform === Platform.AsgardeoV2) {\n return h(BaseSignUpV2, {...attrs}, slots);\n }\n return h(BaseSignUpV1, {...attrs}, slots);\n };\n },\n});\n\nexport default BaseSignUp;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * A component that only renders its children when the user is signed in.\n *\n * @example\n * ```vue\n * <SignedIn>\n * <p>Welcome! You are signed in.</p>\n * <template #fallback>\n * <p>Please sign in to continue</p>\n * </template>\n * </SignedIn>\n * ```\n */\nconst SignedIn: Component = defineComponent({\n name: 'SignedIn',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {isSignedIn} = useAsgardeo();\n\n return (): VNode | VNode[] | null => {\n if (!isSignedIn.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.();\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default SignedIn;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * A component that only renders its children when the user is signed out.\n *\n * @example\n * ```vue\n * <SignedOut>\n * <p>Please sign in to continue</p>\n * <template #fallback>\n * <p>You are already signed in</p>\n * </template>\n * </SignedOut>\n * ```\n */\nconst SignedOut: Component = defineComponent({\n name: 'SignedOut',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {isSignedIn} = useAsgardeo();\n\n return (): VNode | VNode[] | null => {\n if (isSignedIn.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.();\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default SignedOut;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useAsgardeo from '../../composables/useAsgardeo';\n\n/**\n * A component that only renders its children when Asgardeo is loading.\n *\n * @example\n * ```vue\n * <Loading>\n * <p>Loading...</p>\n * <template #fallback>\n * <p>Finished loading</p>\n * </template>\n * </Loading>\n * ```\n */\nconst Loading: Component = defineComponent({\n name: 'Loading',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {isLoading} = useAsgardeo();\n\n return (): VNode | VNode[] | null => {\n if (!isLoading.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.();\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default Loading;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\n/**\n * User \u2014 presentation component that exposes the current user via a scoped slot.\n *\n * Renders the `default` slot with `{ user }` when a user is signed in,\n * or the `fallback` slot when no user is available.\n *\n * @example\n * ```vue\n * <User>\n * <template #default=\"{ user }\">\n * <p>Welcome, {{ user.given_name }}!</p>\n * </template>\n * <template #fallback>\n * <p>No user signed in.</p>\n * </template>\n * </User>\n * ```\n */\nconst User: Component = defineComponent({\n name: 'User',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {user} = useAsgardeo();\n\n return (): VNode | VNode[] | null => {\n if (!user.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.({user: user.value});\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default User;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type VNode, defineComponent, h, Fragment} from 'vue';\nimport useOrganization from '../../../composables/useOrganization';\n\n/**\n * Organization \u2014 presentation component that exposes the current organization via a scoped slot.\n *\n * Renders the `default` slot with `{ organization }` when a current organization is available,\n * or the `fallback` slot when none is set.\n *\n * @example\n * ```vue\n * <Organization>\n * <template #default=\"{ organization }\">\n * <p>Current org: {{ organization.name }}</p>\n * </template>\n * <template #fallback>\n * <p>No organization selected.</p>\n * </template>\n * </Organization>\n * ```\n */\nconst Organization: Component = defineComponent({\n name: 'Organization',\n setup(_props: Record<string, unknown>, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {currentOrganization} = useOrganization();\n\n return (): VNode | VNode[] | null => {\n if (!currentOrganization?.value) {\n const fallbackContent: VNode[] | undefined = slots['fallback']?.();\n return fallbackContent ? h(Fragment, {}, fallbackContent) : null;\n }\n\n const defaultContent: VNode[] | undefined = slots['default']?.({organization: currentOrganization.value});\n return defaultContent ? h(Fragment, {}, defaultContent) : null;\n };\n },\n});\n\nexport default Organization;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {AsgardeoError, User, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h, ref, type Ref} from 'vue';\nimport BaseUserProfile from './BaseUserProfile';\nimport updateMeProfile from '../../../api/updateMeProfile';\nimport useAsgardeo from '../../../composables/useAsgardeo';\nimport useI18n from '../../../composables/useI18n';\nimport useUser from '../../../composables/useUser';\n\ntype UserProfileProps = Readonly<{\n avatarSize: 'sm' | 'md' | 'lg';\n cardLayout: boolean;\n cardVariant: 'elevated' | 'outlined' | 'flat';\n className: string;\n compact: boolean;\n editable: boolean;\n hideFields: string[];\n showAvatar: boolean;\n showFields: string[];\n title: string;\n}>;\n\nconst UserProfile: Component = defineComponent({\n name: 'UserProfile',\n props: {\n /** Avatar circle size. */\n avatarSize: {\n default: 'lg',\n type: String as PropType<'sm' | 'md' | 'lg'>,\n },\n /** Whether to render the component inside a Card wrapper. */\n cardLayout: {default: true, type: Boolean},\n /** Shadow / border style of the card wrapper. */\n cardVariant: {\n default: 'elevated',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n /** Extra CSS class added to the root element. */\n className: {default: '', type: String},\n /** Tighter spacing \u2014 useful when embedded in a modal or dropdown. */\n compact: {default: false, type: Boolean},\n /** Whether fields can be edited inline. */\n editable: {default: true, type: Boolean},\n /** Fields to hide by name. */\n hideFields: {default: () => [], type: Array as PropType<string[]>},\n /** Whether to render the avatar hero section. */\n showAvatar: {default: true, type: Boolean},\n /** Fields to show exclusively (empty = show all). */\n showFields: {default: () => [], type: Array as PropType<string[]>},\n /** Card header title. */\n title: {default: 'Profile', type: String},\n },\n setup(props: UserProfileProps, {slots}: SetupContext): () => VNode {\n const {baseUrl, instanceId} = useAsgardeo();\n const {flattenedProfile, profile, schemas, onUpdateProfile} = useUser();\n const {t} = useI18n();\n\n const error: Ref<string | null> = ref<string | null>(null);\n\n async function handleProfileUpdate(payload: any): Promise<void> {\n if (!baseUrl) return;\n\n error.value = null;\n\n try {\n const response: User = await updateMeProfile({baseUrl, instanceId, payload});\n onUpdateProfile(response);\n } catch (caughtError: unknown) {\n let message: string = t('user.profile.update.generic.error') || 'Failed to update profile. Please try again.';\n\n if (caughtError instanceof AsgardeoError) {\n message = caughtError.message;\n }\n\n error.value = message;\n }\n }\n\n return (): VNode =>\n h(\n BaseUserProfile,\n {\n avatarSize: props.avatarSize,\n cardLayout: props.cardLayout,\n cardVariant: props.cardVariant,\n class: withVendorCSSClassPrefix('user-profile--styled'),\n className: props.className,\n compact: props.compact,\n editable: props.editable,\n error: error.value,\n flattenedProfile: flattenedProfile?.value,\n hideFields: props.hideFields,\n onUpdate: handleProfileUpdate,\n profile: profile?.value?.profile ?? flattenedProfile?.value,\n schemas: schemas?.value,\n showAvatar: props.showAvatar,\n showFields: props.showFields,\n title: props.title,\n },\n slots,\n );\n },\n});\n\nexport default UserProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type User, type Schema, WellKnownSchemaIds, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type SetupContext, type VNode, defineComponent, h, ref} from 'vue';\nimport getDisplayName from '../../../utils/getDisplayName';\nimport getMappedUserProfileValue from '../../../utils/getMappedUserProfileValue';\nimport Alert from '../../primitives/Alert';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport Checkbox from '../../primitives/Checkbox';\nimport DatePicker from '../../primitives/DatePicker';\nimport Divider from '../../primitives/Divider';\nimport {PencilIcon} from '../../primitives/Icons';\nimport Spinner from '../../primitives/Spinner';\nimport TextField from '../../primitives/TextField';\nimport Typography from '../../primitives/Typography';\n\n// \u2500\u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ninterface ExtendedSchema {\n description?: string;\n displayName?: string;\n displayOrder?: string;\n multiValued?: boolean;\n mutability?: string;\n name?: string;\n required?: boolean;\n schemaId?: string;\n subAttributes?: ExtendedSchema[];\n type?: string;\n value?: any;\n}\n\nexport interface BaseUserProfileProps {\n avatarSize?: 'sm' | 'md' | 'lg';\n cardLayout?: boolean;\n cardVariant?: 'elevated' | 'outlined' | 'flat';\n className?: string;\n compact?: boolean;\n editable?: boolean;\n error?: string | null;\n flattenedProfile?: User | null;\n hideFields?: string[];\n isLoading?: boolean;\n onUpdate?: (payload: any) => Promise<void>;\n profile?: User | null;\n schemas?: Schema[] | null;\n showAvatar?: boolean;\n showFields?: string[];\n title?: string;\n}\n\n// \u2500\u2500\u2500 Constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst FIELDS_TO_SKIP: string[] = [\n 'roles.default',\n 'active',\n 'groups',\n 'accountLocked',\n 'accountDisabled',\n 'oneTimePassword',\n 'userSourceId',\n 'idpType',\n 'localCredentialExists',\n 'ResourceType',\n 'ExternalID',\n 'MetaData',\n 'verifiedMobileNumbers',\n 'verifiedEmailAddresses',\n 'phoneNumbers.mobile',\n 'emailAddresses',\n 'preferredMFAOption',\n];\n\nconst READONLY_FIELDS: string[] = ['username', 'userName', 'user_name'];\n\nconst DEFAULT_ATTRIBUTE_MAPPINGS: Record<string, string | string[]> = {\n email: ['emails', 'email'],\n firstName: ['name.givenName', 'given_name'],\n lastName: ['name.familyName', 'family_name'],\n picture: ['profile', 'profileUrl', 'picture', 'URL'],\n username: ['userName', 'username', 'user_name'],\n};\n\nconst AVATAR_GRADIENTS: string[] = [\n 'linear-gradient(135deg, #4b6ef5 0%, #7c3aed 100%)',\n 'linear-gradient(135deg, #0ea5e9 0%, #4b6ef5 100%)',\n 'linear-gradient(135deg, #10b981 0%, #0ea5e9 100%)',\n 'linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)',\n 'linear-gradient(135deg, #ec4899 0%, #7c3aed 100%)',\n 'linear-gradient(135deg, #8b5cf6 0%, #4b6ef5 100%)',\n 'linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)',\n 'linear-gradient(135deg, #f97316 0%, #ec4899 100%)',\n];\n\n// \u2500\u2500\u2500 Helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction getAvatarGradient(seed: string): string {\n if (!seed) return AVATAR_GRADIENTS[0];\n let hash: number = 0;\n for (let i: number = 0; i < seed.length; i += 1) {\n // eslint-disable-next-line no-bitwise\n hash = (hash * 31 + seed.charCodeAt(i)) >>> 0;\n }\n return AVATAR_GRADIENTS[Math.abs(hash) % AVATAR_GRADIENTS.length];\n}\n\nfunction formatLabel(key: string): string {\n return key\n .split(/(?=[A-Z])|[_.]/)\n .map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n}\n\nfunction buildScimPatchValue(\n flatKey: string,\n rawValue: any,\n schemaId: string | undefined,\n multiValued: boolean | undefined,\n): Record<string, unknown> {\n if (flatKey === 'phoneNumbers.mobile') {\n return {\n phoneNumbers: [{type: 'mobile', value: rawValue}],\n [WellKnownSchemaIds.SystemUser]: {mobileNumbers: [rawValue]},\n };\n }\n\n const complexMultiValued: Set<string> = new Set([\n 'phoneNumbers',\n 'emails',\n 'ims',\n 'photos',\n 'addresses',\n 'entitlements',\n 'roles',\n 'x509Certificates',\n ]);\n\n const dotIndex: number = flatKey.indexOf('.');\n if (dotIndex > 0) {\n const head: string = flatKey.slice(0, dotIndex);\n const tail: string = flatKey.slice(dotIndex + 1);\n if (complexMultiValued.has(head)) {\n return {[head]: [{type: tail, value: rawValue}]};\n }\n }\n\n const value: unknown = multiValued ? [rawValue] : rawValue;\n\n if (schemaId && schemaId !== WellKnownSchemaIds.User) {\n return {[schemaId]: {[flatKey]: value}};\n }\n\n const segments: string[] = flatKey.split('.');\n const nested: Record<string, unknown> = {};\n let cursor: Record<string, unknown> = nested;\n for (let i: number = 0; i < segments.length - 1; i += 1) {\n cursor[segments[i]] = {};\n cursor = cursor[segments[i]] as Record<string, unknown>;\n }\n cursor[segments[segments.length - 1]] = value;\n return nested;\n}\n\n// \u2500\u2500\u2500 Component \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst BaseUserProfile: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseUserProfile',\n props: {\n /** Avatar circle size. */\n avatarSize: {\n default: 'lg',\n type: String as PropType<'sm' | 'md' | 'lg'>,\n },\n cardLayout: {default: true, type: Boolean},\n /** Shadow / border style of the Card wrapper. */\n cardVariant: {\n default: 'elevated',\n type: String as PropType<'elevated' | 'outlined' | 'flat'>,\n },\n className: {default: '', type: String},\n /** Tighter field spacing for modal / dropdown contexts. */\n compact: {default: false, type: Boolean},\n editable: {default: true, type: Boolean},\n error: {default: null, type: String as PropType<string | null>},\n flattenedProfile: {default: null, type: Object as PropType<User | null>},\n hideFields: {default: () => [], type: Array as PropType<string[]>},\n isLoading: {default: false, type: Boolean},\n onUpdate: {default: undefined, type: Function as PropType<(payload: any) => Promise<void>>},\n profile: {default: null, type: Object as PropType<User | null>},\n schemas: {default: () => [], type: Array as PropType<Schema[] | null>},\n /** Whether to render the avatar hero banner. */\n showAvatar: {default: true, type: Boolean},\n showFields: {default: () => [], type: Array as PropType<string[]>},\n title: {default: 'Profile', type: String},\n },\n setup(props: BaseUserProfileProps, {slots}: SetupContext): () => VNode | VNode[] | null {\n const editingFields: Ref<Record<string, boolean>> = ref({});\n const editedValues: Ref<Record<string, any>> = ref({});\n\n const px: typeof withVendorCSSClassPrefix = withVendorCSSClassPrefix;\n\n // \u2500\u2500 Visibility \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n function shouldShowField(fieldName: string): boolean {\n if (FIELDS_TO_SKIP.includes(fieldName)) return false;\n if (props.hideFields && props.hideFields.length > 0 && props.hideFields.includes(fieldName)) return false;\n if (props.showFields && props.showFields.length > 0) return props.showFields.includes(fieldName);\n return true;\n }\n\n // \u2500\u2500 Edit state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n function startEditing(fieldName: string, currentValue: any): void {\n editedValues.value = {...editedValues.value, [fieldName]: currentValue ?? ''};\n editingFields.value = {...editingFields.value, [fieldName]: true};\n }\n\n function cancelEditing(fieldName: string): void {\n const data: User | null = props.flattenedProfile || props.profile;\n const originalValue: any = (data as Record<string, any>)?.[fieldName] ?? '';\n editedValues.value = {...editedValues.value, [fieldName]: originalValue};\n editingFields.value = {...editingFields.value, [fieldName]: false};\n }\n\n function saveField(schema: ExtendedSchema): void {\n if (!props.onUpdate || !schema.name) return;\n const value: any = editedValues.value[schema.name] ?? '';\n const payload: Record<string, unknown> = buildScimPatchValue(\n schema.name,\n value,\n schema.schemaId,\n schema.multiValued,\n );\n props.onUpdate(payload);\n editingFields.value = {...editingFields.value, [schema.name]: false};\n }\n\n // \u2500\u2500 Input rendering per schema type \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n function renderInput(schema: ExtendedSchema): VNode {\n const fieldName: string = schema.name!;\n const currentValue: any = editedValues.value[fieldName];\n\n switch (schema.type) {\n case 'DATE_TIME':\n return h(DatePicker, {\n modelValue: String(currentValue ?? ''),\n 'onUpdate:modelValue': (v: string) => {\n editedValues.value = {...editedValues.value, [fieldName]: v};\n },\n placeholder: `Enter your ${(schema.displayName || fieldName).toLowerCase()}`,\n required: schema.required,\n });\n\n case 'BOOLEAN':\n return h(Checkbox, {\n label: schema.displayName || fieldName,\n modelValue: Boolean(currentValue),\n 'onUpdate:modelValue': (v: boolean) => {\n editedValues.value = {...editedValues.value, [fieldName]: v};\n },\n });\n\n default:\n return h(TextField, {\n modelValue: String(currentValue ?? ''),\n 'onUpdate:modelValue': (v: string) => {\n editedValues.value = {...editedValues.value, [fieldName]: v};\n },\n placeholder: `Enter your ${(schema.displayName || fieldName).toLowerCase()}`,\n required: schema.required,\n });\n }\n }\n\n // \u2500\u2500 Schema-driven field row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n function renderSchemaFieldRow(schema: ExtendedSchema): VNode | null {\n const {name, displayName, description, mutability, value} = schema;\n if (!name || !shouldShowField(name)) return null;\n\n const label: string = displayName || description || formatLabel(name);\n const isReadonly: boolean = mutability === 'READ_ONLY' || READONLY_FIELDS.includes(name);\n const isEditable: boolean = Boolean(props.editable) && !isReadonly;\n const isEditing: boolean = Boolean(editingFields.value[name]);\n const hasValue: boolean = value !== undefined && value !== null && value !== '';\n\n if (!hasValue && !isEditing && !(isEditable && mutability === 'READ_WRITE')) return null;\n\n const editablePlaceholder: VNode | null = isEditable\n ? h(\n 'span',\n {class: px('user-profile__field-placeholder'), onClick: () => startEditing(name, value)},\n `Enter your ${label.toLowerCase()}`,\n )\n : null;\n const displayValueNode: VNode | null = hasValue\n ? h(Typography, {class: px('user-profile__field-value'), variant: 'body1'}, () => String(value))\n : editablePlaceholder;\n\n return h('div', {class: px('user-profile__field'), key: name}, [\n h('div', {class: px('user-profile__field-label-col')}, [\n h(Typography, {class: px('user-profile__field-label'), variant: 'body2'}, () => label),\n ]),\n h('div', {class: px('user-profile__field-value-col')}, [\n isEditing\n ? h('div', {class: px('user-profile__field-edit')}, [\n renderInput(schema),\n h('div', {class: px('user-profile__field-edit-actions')}, [\n h(\n Button,\n {onClick: () => saveField(schema), size: 'small' as const, variant: 'solid' as const},\n () => 'Save',\n ),\n h(\n Button,\n {onClick: () => cancelEditing(name), size: 'small' as const, variant: 'text' as const},\n () => 'Cancel',\n ),\n ]),\n ])\n : h('div', {class: px('user-profile__field-display')}, [\n displayValueNode,\n isEditable\n ? h(\n 'button',\n {\n 'aria-label': `Edit ${label}`,\n class: px('user-profile__field-edit-btn'),\n onClick: () => startEditing(name, value),\n type: 'button',\n },\n [h(PencilIcon)],\n )\n : null,\n ]),\n ]),\n ]);\n }\n\n // \u2500\u2500 Fallback: no schemas \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n function renderProfileWithoutSchemas(): VNode[] {\n const data: Record<string, any> | null = (props.flattenedProfile || props.profile) as Record<string, any> | null;\n if (!data) return [];\n\n return Object.entries(data)\n .filter(([key, value]: [string, any]) => {\n if (!shouldShowField(key)) return false;\n return value !== undefined && value !== null && value !== '';\n })\n .sort(([a]: [string, any], [b]: [string, any]) => a.localeCompare(b))\n .map(([key, value]: [string, any]) =>\n h('div', {class: px('user-profile__field'), key}, [\n h('div', {class: px('user-profile__field-label-col')}, [\n h(Typography, {class: px('user-profile__field-label'), variant: 'body2'}, () => formatLabel(key)),\n ]),\n h('div', {class: px('user-profile__field-value-col')}, [\n h(Typography, {class: px('user-profile__field-value'), variant: 'body1'}, () =>\n typeof value === 'object' ? JSON.stringify(value) : String(value),\n ),\n ]),\n ]),\n );\n }\n\n // \u2500\u2500 Hero section \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n function renderHero(currentUser: Record<string, any>): VNode {\n const displayName: string = getDisplayName(DEFAULT_ATTRIBUTE_MAPPINGS, currentUser as User);\n const email: any =\n getMappedUserProfileValue('email', DEFAULT_ATTRIBUTE_MAPPINGS, currentUser as User) ||\n getMappedUserProfileValue('username', DEFAULT_ATTRIBUTE_MAPPINGS, currentUser as User);\n\n const avatarSeed: string = String(\n currentUser['username'] || currentUser['userName'] || currentUser['email'] || currentUser['sub'] || displayName,\n );\n const avatarGradient: string = getAvatarGradient(avatarSeed);\n const initials: string =\n displayName\n .split(' ')\n .map((w: string) => w.charAt(0))\n .slice(0, 2)\n .join('')\n .toUpperCase() || '?';\n\n const avatarSizeClass: string = px(`user-profile__avatar--${props.avatarSize ?? 'lg'}`);\n\n return h('div', {class: px('user-profile__hero')}, [\n h('div', {class: px('user-profile__avatar-wrapper')}, [\n h(\n 'div',\n {class: [px('user-profile__avatar'), avatarSizeClass].join(' '), style: {background: avatarGradient}},\n [h('span', {class: px('user-profile__avatar-initials')}, initials)],\n ),\n ]),\n h('div', {class: px('user-profile__hero-info')}, [\n h('span', {class: px('user-profile__hero-name')}, displayName),\n email ? h('span', {class: px('user-profile__hero-subtitle')}, String(email)) : null,\n ]),\n ]);\n }\n\n // \u2500\u2500 Main render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n return (): VNode | VNode[] | null => {\n const data: User | null = props.flattenedProfile || props.profile;\n\n if (!data && !props.isLoading) {\n return slots['default']\n ? slots['default']({error: props.error, isLoading: props.isLoading, profile: null})\n : null;\n }\n\n if (slots['default']) {\n return slots['default']({error: props.error, isLoading: props.isLoading, profile: data});\n }\n\n const currentUser: Record<string, any> = data as Record<string, any>;\n const schemas: ExtendedSchema[] = (props.schemas ?? []) as ExtendedSchema[];\n const hasSchemas: boolean = schemas.length > 0;\n\n const rootClasses: string = [\n px('user-profile'),\n props.compact ? px('user-profile--compact') : '',\n props.className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const children: VNode[] = [];\n\n // Title header\n children.push(\n h('div', {class: px('user-profile__header')}, [\n h('span', {class: px('user-profile__title')}, props.title ?? 'Profile'),\n ]),\n );\n children.push(h(Divider, {class: px('user-profile__header-divider')}));\n\n // Hero\n if (props.showAvatar !== false && currentUser) {\n children.push(renderHero(currentUser));\n }\n\n // Error alert\n if (props.error) {\n children.push(h(Alert, {class: px('user-profile__error'), severity: 'error' as const}, () => props.error));\n }\n\n // Fields\n if (props.isLoading) {\n children.push(h('div', {class: px('user-profile__loading')}, [h(Spinner)]));\n } else if (hasSchemas) {\n const fieldRows: VNode[] = schemas\n .filter((s: ExtendedSchema) => s.name && shouldShowField(s.name))\n .sort((a: ExtendedSchema, b: ExtendedSchema) => {\n const orderA: number = a.displayOrder ? parseInt(a.displayOrder, 10) : 999;\n const orderB: number = b.displayOrder ? parseInt(b.displayOrder, 10) : 999;\n return orderA - orderB;\n })\n .map((schema: ExtendedSchema) => {\n const value: any = currentUser && schema.name ? currentUser[schema.name] : undefined;\n return renderSchemaFieldRow({...schema, value});\n })\n .filter((node: VNode | null): node is VNode => node !== null);\n\n children.push(h('div', {class: px('user-profile__fields')}, fieldRows));\n } else {\n children.push(h('div', {class: px('user-profile__fields')}, renderProfileWithoutSchemas()));\n }\n\n if (slots['footer']) {\n children.push(h('div', {class: px('user-profile__footer')}, slots['footer']()));\n }\n\n if (props.cardLayout) {\n return h(Card, {class: rootClasses, variant: props.cardVariant ?? 'elevated'}, () => children);\n }\n\n return h('div', {class: rootClasses}, children);\n };\n },\n});\n\nexport default BaseUserProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {User, get} from '@asgardeo/browser';\n\nconst getMappedUserProfileValue = (key: string, mappings: Record<string, string | string[]>, user: User): any => {\n if (!key || !mappings || !user) return undefined;\n\n const mapping: string | string[] = mappings[key];\n\n if (!mapping) return get(user, key);\n\n if (Array.isArray(mapping)) {\n let foundValue: any;\n let found: boolean = false;\n mapping.some((path: string) => {\n const value: any = get(user, path);\n if (value !== undefined && value !== null && value !== '') {\n foundValue = value;\n found = true;\n return true;\n }\n return false;\n });\n return found ? foundValue : undefined;\n }\n\n return get(user, mapping);\n};\n\nexport default getMappedUserProfileValue;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {User} from '@asgardeo/browser';\nimport getMappedUserProfileValue from './getMappedUserProfileValue';\n\nconst getDisplayName = (\n mergedMappings: {[key: string]: string | string[] | undefined},\n user: User,\n displayAttributes?: string[],\n): string => {\n if (displayAttributes && displayAttributes.length > 0) {\n let foundValue: string | undefined;\n displayAttributes.some((attr: string) => {\n const value: any = getMappedUserProfileValue(attr, mergedMappings, user);\n if (value !== undefined && value !== null && value !== '') {\n foundValue = String(value);\n return true;\n }\n return false;\n });\n if (foundValue !== undefined) return foundValue;\n }\n\n const firstName: any = getMappedUserProfileValue('firstName', mergedMappings, user);\n const lastName: any = getMappedUserProfileValue('lastName', mergedMappings, user);\n\n if (firstName && lastName) return `${firstName} ${lastName}`;\n\n return (\n getMappedUserProfileValue('username', mergedMappings, user) ||\n getMappedUserProfileValue('email', mergedMappings, user) ||\n getMappedUserProfileValue('name', mergedMappings, user) ||\n 'User'\n );\n};\n\nexport default getDisplayName;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n AsgardeoSPAClient,\n HttpRequestConfig,\n HttpResponse,\n User,\n UpdateMeProfileConfig as BaseUpdateMeProfileConfig,\n updateMeProfile as baseUpdateMeProfile,\n} from '@asgardeo/browser';\n\nexport interface UpdateMeProfileConfig extends Omit<BaseUpdateMeProfileConfig, 'fetcher'> {\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n instanceId?: number;\n}\n\nconst updateMeProfile = async ({fetcher, instanceId = 0, ...requestConfig}: UpdateMeProfileConfig): Promise<User> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);\n const httpClient: (config: HttpRequestConfig) => Promise<HttpResponse<any>> = client.httpRequest.bind(client);\n const response: HttpResponse<any> = await httpClient({\n data: config.body ? JSON.parse(config.body as string) : undefined,\n headers: config.headers as Record<string, string>,\n method: config.method || 'PATCH',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseUpdateMeProfile({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default updateMeProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport BaseUserDropdown, {type DropdownMenuItem} from './BaseUserDropdown';\nimport useAsgardeo from '../../../composables/useAsgardeo';\nimport UserProfileComponent from '../user-profile/UserProfile';\n\n/**\n * UserDropdown \u2014 avatar button that opens a user identity menu.\n *\n * @example Default usage\n * ```vue\n * <UserDropdown />\n * ```\n *\n * @example With custom menu items and a separator\n * ```vue\n * <UserDropdown\n * :menu-items=\"[\n * { label: 'Settings', icon: h(SettingsIcon, { size: 15 }), onClick: goToSettings },\n * { label: 'Help', onClick: openHelp, separatorBefore: true },\n * ]\"\n * />\n * ```\n *\n * @example Small, left-aligned, no chevron\n * ```vue\n * <UserDropdown size=\"sm\" menu-align=\"left\" />\n * ```\n */\nconst UserDropdown: Component = defineComponent({\n emits: ['profileClick'],\n name: 'UserDropdown',\n props: {\n /** Extra CSS class added to the root element. */\n className: {default: '', type: String},\n /**\n * How to align the dropdown panel relative to the trigger button.\n * - `'auto'` (default) \u2014 picks the side with more available viewport space at open time.\n * - `'left'` \u2014 panel left edge aligns with trigger left edge.\n * - `'right'` \u2014 panel right edge aligns with trigger right edge.\n */\n menuAlign: {\n default: 'auto',\n type: String as PropType<'auto' | 'left' | 'right'>,\n },\n /**\n * Extra items inserted between the Profile link and Sign Out.\n * Set `separatorBefore: true` on any item to add a divider line before it.\n * Set `danger: true` for destructive actions (red styling).\n * Pass an `icon` VNode to render an icon to the left of the label.\n */\n menuItems: {\n default: undefined,\n type: Array as PropType<DropdownMenuItem[]>,\n },\n /** Whether to show the animated down-chevron beside the avatar. Default `false`. */\n showChevron: {default: false, type: Boolean},\n /**\n * Overall density / avatar size of the component.\n * - `'sm'` \u2014 28 px avatar, compact menu (180 px min-width).\n * - `'md'` (default) \u2014 32 px avatar, standard menu (220 px min-width).\n * - `'lg'` \u2014 38 px avatar, spacious menu (280 px min-width).\n */\n size: {\n default: 'md',\n type: String as PropType<'sm' | 'md' | 'lg'>,\n },\n },\n setup(\n props: {\n className: string;\n menuAlign: 'auto' | 'left' | 'right';\n menuItems?: DropdownMenuItem[];\n showChevron: boolean;\n size: 'sm' | 'md' | 'lg';\n },\n {slots, emit}: {emit: any; slots: any},\n ): () => VNode | VNode[] | null {\n const {user, signOut} = useAsgardeo();\n const isProfileModalOpen: Ref<boolean> = ref(false);\n\n return (): VNode | VNode[] | null =>\n h(\n BaseUserDropdown,\n {\n class: withVendorCSSClassPrefix('user-dropdown--styled'),\n className: props.className,\n isProfileModalOpen: isProfileModalOpen.value,\n menuAlign: props.menuAlign,\n menuItems: props.menuItems,\n onProfileClick: (): void => {\n isProfileModalOpen.value = true;\n emit('profileClick');\n },\n onProfileModalClose: (): void => {\n isProfileModalOpen.value = false;\n },\n onSignOut: (): void => {\n signOut();\n },\n profileContent: isProfileModalOpen.value\n ? h(UserProfileComponent, {\n cardLayout: false,\n compact: true,\n editable: true,\n })\n : null,\n showChevron: props.showChevron,\n size: props.size,\n user: user.value,\n },\n slots,\n );\n },\n});\n\nexport default UserDropdown;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type User, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type VNode,\n defineComponent,\n h,\n onMounted,\n onUnmounted,\n ref,\n} from 'vue';\nimport getDisplayName from '../../../utils/getDisplayName';\nimport getMappedUserProfileValue from '../../../utils/getMappedUserProfileValue';\nimport {ChevronDownIcon, LogOutIcon, UserIcon, XIcon} from '../../primitives/Icons';\n\n// \u2500\u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * A single item in the dropdown menu.\n *\n * @example\n * ```ts\n * const items: DropdownMenuItem[] = [\n * { label: 'Settings', icon: h(SettingsIcon, { size: 15 }), onClick: () => router.push('/settings') },\n * { label: 'Help', onClick: openHelp, separatorBefore: true },\n * { label: 'Delete account', onClick: deleteAccount, danger: true, separatorBefore: true },\n * ];\n * ```\n */\nexport interface DropdownMenuItem {\n /** Renders with red text and red hover background. Use for destructive actions. */\n danger?: boolean;\n /** Optional icon VNode rendered to the left of the label. */\n icon?: VNode | null;\n /** The visible text label. */\n label: string;\n /** Called when the item is clicked (menu closes first). */\n onClick: () => void;\n /** When `true`, a thin divider is rendered immediately before this item. */\n separatorBefore?: boolean;\n}\n\nexport interface BaseUserDropdownProps {\n className?: string;\n isProfileModalOpen?: boolean;\n menuAlign?: 'auto' | 'left' | 'right';\n menuItems?: DropdownMenuItem[];\n onProfileClick?: () => void;\n onProfileModalClose?: () => void;\n onSignOut?: () => void;\n profileContent?: VNode | null;\n showChevron?: boolean;\n size?: 'sm' | 'md' | 'lg';\n user?: User | null;\n}\n\n// \u2500\u2500\u2500 Constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst DEFAULT_ATTRIBUTE_MAPPINGS: Record<string, string | string[]> = {\n email: ['emails', 'email'],\n firstName: ['name.givenName', 'given_name'],\n lastName: ['name.familyName', 'family_name'],\n username: ['userName', 'username', 'user_name'],\n};\n\n/** Approximate min-width for each size, used for auto-alignment decisions. */\nconst MENU_MIN_WIDTHS: Record<string, number> = {lg: 280, md: 220, sm: 180};\n\nconst AVATAR_GRADIENTS: string[] = [\n 'linear-gradient(135deg, #4b6ef5 0%, #7c3aed 100%)',\n 'linear-gradient(135deg, #0ea5e9 0%, #4b6ef5 100%)',\n 'linear-gradient(135deg, #10b981 0%, #0ea5e9 100%)',\n 'linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)',\n 'linear-gradient(135deg, #ec4899 0%, #7c3aed 100%)',\n 'linear-gradient(135deg, #8b5cf6 0%, #4b6ef5 100%)',\n 'linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)',\n 'linear-gradient(135deg, #f97316 0%, #ec4899 100%)',\n];\n\n// \u2500\u2500\u2500 Helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction getAvatarGradient(seed: string): string {\n if (!seed) return AVATAR_GRADIENTS[0];\n let hash: number = 0;\n for (let i: number = 0; i < seed.length; i += 1) {\n // eslint-disable-next-line no-bitwise\n hash = (hash * 31 + seed.charCodeAt(i)) >>> 0;\n }\n return AVATAR_GRADIENTS[Math.abs(hash) % AVATAR_GRADIENTS.length];\n}\n\nfunction resolveUserInfo(user: User | null): {\n displayName: string;\n gradient: string;\n initials: string;\n subtitle: string;\n} {\n if (!user) {\n return {displayName: 'User', gradient: AVATAR_GRADIENTS[0], initials: '?', subtitle: ''};\n }\n\n const displayName: string = getDisplayName(DEFAULT_ATTRIBUTE_MAPPINGS, user) || 'User';\n const initials: string =\n displayName\n .split(' ')\n .map((w: string) => w.charAt(0))\n .slice(0, 2)\n .join('')\n .toUpperCase() || '?';\n\n const seed: string = String(\n getMappedUserProfileValue('username', DEFAULT_ATTRIBUTE_MAPPINGS, user) ||\n getMappedUserProfileValue('email', DEFAULT_ATTRIBUTE_MAPPINGS, user) ||\n displayName,\n );\n\n const subtitle: string = String(\n getMappedUserProfileValue('email', DEFAULT_ATTRIBUTE_MAPPINGS, user) ||\n getMappedUserProfileValue('username', DEFAULT_ATTRIBUTE_MAPPINGS, user) ||\n '',\n );\n\n return {displayName, gradient: getAvatarGradient(seed), initials, subtitle};\n}\n\n// \u2500\u2500\u2500 Component \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst BaseUserDropdown: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseUserDropdown',\n props: {\n className: {default: '', type: String},\n isProfileModalOpen: {default: false, type: Boolean},\n /**\n * How to align the dropdown panel relative to the trigger.\n * - `'auto'` (default) \u2014 opens toward the side with more viewport space.\n * - `'left'` \u2014 panel left edge aligns with trigger left edge.\n * - `'right'` \u2014 panel right edge aligns with trigger right edge.\n */\n menuAlign: {default: 'auto', type: String as PropType<'auto' | 'left' | 'right'>},\n /**\n * Extra items rendered between the Profile link and Sign Out.\n * Each item can carry an icon, a danger flag, and a separatorBefore flag.\n */\n menuItems: {default: undefined, type: Array as PropType<DropdownMenuItem[]>},\n onProfileClick: {default: undefined, type: Function as PropType<() => void>},\n onProfileModalClose: {default: undefined, type: Function as PropType<() => void>},\n onSignOut: {default: undefined, type: Function as PropType<() => void>},\n profileContent: {default: null, type: Object as PropType<VNode | null>},\n /** Show the animated chevron on the trigger. Default `false`. */\n showChevron: {default: false, type: Boolean},\n /** Controls avatar size on the trigger and spacing density of the menu. */\n size: {default: 'md', type: String as PropType<'sm' | 'md' | 'lg'>},\n user: {default: null, type: Object as PropType<User | null>},\n },\n setup(props: BaseUserDropdownProps, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const isOpen: Ref<boolean> = ref(false);\n const containerRef: Ref<HTMLElement | null> = ref(null);\n const px: typeof withVendorCSSClassPrefix = withVendorCSSClassPrefix;\n\n // \u2500\u2500 Click-outside / Escape \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n function handleClickOutside(event: MouseEvent): void {\n if (containerRef.value && !containerRef.value.contains(event.target as Node)) {\n isOpen.value = false;\n }\n }\n\n function handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Escape') isOpen.value = false;\n }\n\n onMounted((): void => {\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('keydown', handleKeyDown);\n });\n\n onUnmounted((): void => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('keydown', handleKeyDown);\n });\n\n // \u2500\u2500 Auto-alignment \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n function resolveMenuAlign(): 'left' | 'right' {\n if (props.menuAlign !== 'auto') return props.menuAlign as 'left' | 'right';\n if (!containerRef.value) return 'right';\n const rect: DOMRect = containerRef.value.getBoundingClientRect();\n const menuWidth: number = MENU_MIN_WIDTHS[props.size ?? 'md'] ?? 220;\n // Open toward whichever side has enough room; prefer right.\n return window.innerWidth - rect.right >= menuWidth ? 'right' : 'left';\n }\n\n // \u2500\u2500 Render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({\n isOpen: isOpen.value,\n toggle: (): void => {\n isOpen.value = !isOpen.value;\n },\n user: props.user,\n });\n }\n\n const {displayName, initials, gradient, subtitle} = resolveUserInfo(props.user ?? null);\n const size: 'sm' | 'md' | 'lg' = props.size ?? 'md';\n\n // \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n const avatarSizeClass: string = size !== 'md' ? px(`user-dropdown__avatar--${size}`) : '';\n const triggerClass: string = [\n px('user-dropdown__trigger'),\n isOpen.value ? px('user-dropdown__trigger--open') : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const trigger: VNode = h(\n 'button',\n {\n 'aria-expanded': isOpen.value,\n 'aria-haspopup': 'true',\n class: triggerClass,\n onClick: (e: MouseEvent): void => {\n e.stopPropagation();\n isOpen.value = !isOpen.value;\n },\n type: 'button',\n },\n [\n h(\n 'span',\n {\n class: [px('user-dropdown__avatar'), avatarSizeClass].filter(Boolean).join(' '),\n style: {background: gradient},\n },\n initials,\n ),\n props.showChevron ? h('span', {class: px('user-dropdown__chevron')}, [h(ChevronDownIcon, {size: 14})]) : null,\n ],\n );\n\n // \u2500\u2500 Menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n let menu: VNode | null = null;\n\n if (isOpen.value) {\n const resolvedAlign: 'left' | 'right' = resolveMenuAlign();\n const alignClass: string = resolvedAlign === 'left' ? px('user-dropdown__menu--align-left') : '';\n const sizeClass: string = size !== 'md' ? px(`user-dropdown__menu--size-${size}`) : '';\n const menuClass: string = [px('user-dropdown__menu'), alignClass, sizeClass].filter(Boolean).join(' ');\n\n // Build menu contents\n const menuChildren: (VNode | null)[] = [];\n\n // Header\n menuChildren.push(\n h('div', {class: px('user-dropdown__menu-header')}, [\n h('div', {class: px('user-dropdown__menu-header-avatar'), style: {background: gradient}}, initials),\n h('div', {class: px('user-dropdown__menu-header-info')}, [\n h('span', {class: px('user-dropdown__menu-header-name')}, displayName),\n subtitle ? h('span', {class: px('user-dropdown__menu-header-subtitle')}, subtitle) : null,\n ]),\n ]),\n );\n\n menuChildren.push(h('div', {class: px('user-dropdown__menu-divider')}));\n\n // Default Profile item\n if (props.onProfileClick) {\n menuChildren.push(\n h(\n 'button',\n {\n class: px('user-dropdown__item'),\n onClick: (): void => {\n isOpen.value = false;\n props.onProfileClick!();\n },\n type: 'button',\n },\n [h(UserIcon, {size: 15}), h('span', null, 'Profile')],\n ),\n );\n }\n\n // Custom items from prop (with optional separatorBefore per item)\n if (props.menuItems && props.menuItems.length > 0) {\n props.menuItems.forEach((item: DropdownMenuItem, idx: number): void => {\n if (item.separatorBefore) {\n menuChildren.push(h('div', {class: px('user-dropdown__menu-divider'), key: `sep-${idx}`}));\n }\n menuChildren.push(\n h(\n 'button',\n {\n class: [px('user-dropdown__item'), item.danger ? px('user-dropdown__item--danger') : '']\n .filter(Boolean)\n .join(' '),\n key: `item-${idx}`,\n onClick: (): void => {\n isOpen.value = false;\n item.onClick();\n },\n type: 'button',\n },\n [item.icon ?? null, h('span', null, item.label)],\n ),\n );\n });\n }\n\n // Legacy slot items (backward compat)\n if (slots['items']) {\n menuChildren.push(...(slots['items']() ?? []));\n }\n\n // Default Sign Out item (always last, always separated)\n if (props.onSignOut) {\n menuChildren.push(h('div', {class: px('user-dropdown__menu-divider')}));\n menuChildren.push(\n h(\n 'button',\n {\n class: [px('user-dropdown__item'), px('user-dropdown__item--danger')].join(' '),\n onClick: (): void => {\n isOpen.value = false;\n props.onSignOut!();\n },\n type: 'button',\n },\n [h(LogOutIcon, {size: 15}), h('span', null, 'Sign Out')],\n ),\n );\n }\n\n menu = h('div', {class: menuClass}, menuChildren.filter(Boolean));\n }\n\n // \u2500\u2500 Container \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n const container: VNode = h(\n 'div',\n {class: [px('user-dropdown'), props.className].filter(Boolean).join(' '), ref: containerRef},\n [trigger, menu],\n );\n\n // \u2500\u2500 Profile modal \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n if (props.isProfileModalOpen) {\n return h('div', [\n container,\n h(\n 'div',\n {\n class: px('user-dropdown__modal-overlay'),\n onClick: (e: MouseEvent): void => {\n if ((e.target as HTMLElement).classList.contains(px('user-dropdown__modal-overlay'))) {\n props.onProfileModalClose?.();\n }\n },\n },\n [\n h('div', {class: px('user-dropdown__modal-content')}, [\n h(\n 'button',\n {\n 'aria-label': 'Close profile',\n class: px('user-dropdown__modal-close'),\n onClick: props.onProfileModalClose,\n type: 'button',\n },\n [h(XIcon, {size: 18})],\n ),\n props.profileContent,\n ]),\n ],\n ),\n ]);\n }\n\n return container;\n };\n },\n});\n\nexport default BaseUserDropdown;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseAcceptInvite from './BaseAcceptInvite';\nimport type {AcceptInviteFlowResponse, BaseAcceptInviteRenderProps} from './BaseAcceptInvite';\n\nexport type AcceptInviteRenderProps = BaseAcceptInviteRenderProps;\n\n/**\n * Helper to extract query parameters from URL.\n */\nconst getUrlParams = (): {flowId?: string; inviteToken?: string} => {\n if (typeof window === 'undefined') return {};\n const params: URLSearchParams = new URLSearchParams(window.location.search);\n return {\n flowId: params.get('flowId') || undefined,\n inviteToken: params.get('inviteToken') || undefined,\n };\n};\n\n/**\n * AcceptInvite \u2014 end-user component for accepting an invite and setting a password.\n *\n * Automatically extracts flowId and inviteToken from URL, validates the token,\n * and delegates rendering to BaseAcceptInvite.\n */\nconst AcceptInvite: Component = defineComponent({\n name: 'AcceptInvite',\n props: {\n baseUrl: {default: undefined, type: String},\n className: {default: '', type: String},\n flowId: {default: undefined, type: String},\n inviteToken: {default: undefined, type: String},\n onComplete: {default: undefined, type: Function as PropType<() => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: AcceptInviteFlowResponse) => void>,\n },\n onGoToSignIn: {default: undefined, type: Function as PropType<() => void>},\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'outlined' | 'elevated'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const urlParams: {flowId?: string; inviteToken?: string} = getUrlParams();\n const flowId: string | undefined = props.flowId || urlParams.flowId;\n const inviteToken: string | undefined = props.inviteToken || urlParams.inviteToken;\n\n const apiBaseUrl: string = props.baseUrl || (typeof window !== 'undefined' ? window.location.origin : '');\n\n const handleSubmit = async (payload: Record<string, any>): Promise<AcceptInviteFlowResponse> => {\n const response: Response = await fetch(`${apiBaseUrl}/flow/execute`, {\n body: JSON.stringify({...payload, verbose: true}),\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n method: 'POST',\n });\n\n if (!response.ok) {\n const errorText: string = await response.text();\n throw new Error(`Request failed: ${errorText}`);\n }\n\n return response.json();\n };\n\n return (): VNode | null =>\n h(\n BaseAcceptInvite,\n {\n className: props.className,\n flowId,\n inviteToken,\n onComplete: props.onComplete,\n onError: props.onError,\n onFlowChange: props.onFlowChange,\n onGoToSignIn: props.onGoToSignIn,\n onSubmit: handleSubmit,\n showSubtitle: props.showSubtitle,\n showTitle: props.showTitle,\n size: props.size,\n variant: props.variant,\n },\n slots['default'] ? {default: (renderProps: any) => slots['default']!(renderProps)} : undefined,\n );\n },\n});\n\nexport default AcceptInvite;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport useFlowMeta from '../../../composables/useFlowMeta';\nimport useI18n from '../../../composables/useI18n';\nimport {useOAuthCallback} from '../../../composables/useOAuthCallback';\nimport {initiateOAuthRedirect} from '../../../utils/oauth';\nimport {extractErrorMessage, normalizeFlowResponse} from '../../../utils/v2/flowTransformer';\nimport {renderInviteUserComponents} from '../../auth/sign-in/AuthOptionFactory';\nimport Alert from '../../primitives/Alert';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport Spinner from '../../primitives/Spinner';\nimport Typography from '../../primitives/Typography';\n\n/**\n * Flow response from the accept-invite backend.\n */\nexport interface AcceptInviteFlowResponse {\n data?: {\n additionalData?: Record<string, string>;\n components?: any[];\n meta?: {\n components?: any[];\n };\n redirectURL?: string;\n };\n failureReason?: string;\n flowId: string;\n flowStatus: 'INCOMPLETE' | 'COMPLETE' | 'ERROR';\n type?: 'VIEW' | 'REDIRECTION';\n}\n\n/**\n * Render props passed to the default scoped slot.\n */\nexport interface BaseAcceptInviteRenderProps {\n completionTitle?: string;\n components: any[];\n error?: Error | null;\n fieldErrors: Record<string, string>;\n flowId?: string;\n goToSignIn?: () => void;\n handleInputBlur: (name: string) => void;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n inviteToken?: string;\n isComplete: boolean;\n isLoading: boolean;\n isTokenInvalid: boolean;\n isValid: boolean;\n isValidatingToken: boolean;\n meta: FlowMetadataResponse | null;\n subtitle?: string;\n title?: string;\n touched: Record<string, boolean>;\n values: Record<string, string>;\n}\n\nexport interface BaseAcceptInviteProps {\n className?: string;\n flowId?: string;\n inviteToken?: string;\n onComplete?: () => void;\n onError?: (error: Error) => void;\n onFlowChange?: (response: AcceptInviteFlowResponse) => void;\n onGoToSignIn?: () => void;\n onSubmit: (payload: Record<string, any>) => Promise<AcceptInviteFlowResponse>;\n showSubtitle?: boolean;\n showTitle?: boolean;\n size?: 'small' | 'medium' | 'large';\n variant?: 'outlined' | 'elevated';\n}\n\n/**\n * BaseAcceptInvite \u2014 handles the accept-invite flow lifecycle.\n *\n * Steps: validate invite token \u2192 render password form \u2192 flow completion.\n */\nconst BaseAcceptInvite: Component = defineComponent({\n name: 'BaseAcceptInvite',\n props: {\n className: {default: '', type: String},\n flowId: {default: undefined, type: String},\n inviteToken: {default: undefined, type: String},\n onComplete: {default: undefined, type: Function as PropType<() => void>},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: AcceptInviteFlowResponse) => void>,\n },\n onGoToSignIn: {default: undefined, type: Function as PropType<() => void>},\n onSubmit: {\n required: true,\n type: Function as PropType<(payload: Record<string, any>) => Promise<AcceptInviteFlowResponse>>,\n },\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'outlined' | 'elevated'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {meta: metaRef} = useFlowMeta();\n const {t} = useI18n();\n\n // \u2500\u2500 State \u2500\u2500\n const isLoading: Ref<boolean> = ref(false);\n const isValidatingToken: Ref<boolean> = ref(true);\n const isTokenInvalid: Ref<boolean> = ref(false);\n const isComplete: Ref<boolean> = ref(false);\n const currentFlow: Ref<AcceptInviteFlowResponse | null> = ref(null);\n const apiError: Ref<Error | null> = ref(null);\n const completionTitle: Ref<string | undefined> = ref(undefined);\n\n // Form state\n const formValues: Ref<Record<string, string>> = ref({});\n const formErrors: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n const isFormValid: Ref<boolean> = ref(true);\n\n let tokenValidationAttempted: boolean = false;\n\n // \u2500\u2500 Helpers \u2500\u2500\n\n const handleError = (error: any): void => {\n const errorMessage: string =\n error?.failureReason || extractErrorMessage(error, t, 'components.acceptInvite.errors.generic');\n apiError.value = error instanceof Error ? error : new Error(errorMessage);\n props.onError?.(apiError.value);\n };\n\n const normalizeFlowResponseLocal = (response: AcceptInviteFlowResponse): AcceptInviteFlowResponse => {\n if (!response?.data?.meta?.components) return response;\n try {\n const {components} = normalizeFlowResponse(\n response,\n t,\n {defaultErrorKey: 'components.acceptInvite.errors.generic', resolveTranslations: false},\n (metaRef as Ref<FlowMetadataResponse | null>).value,\n );\n return {...response, data: {...response.data, components: components as any}};\n } catch {\n return response;\n }\n };\n\n // \u2500\u2500 OAuth callback \u2500\u2500\n\n useOAuthCallback({\n currentFlowId: ref(props.flowId ?? null),\n isInitialized: ref(true),\n onComplete: () => {\n isComplete.value = true;\n isValidatingToken.value = false;\n props.onComplete?.();\n },\n onError: (error: any) => {\n isTokenInvalid.value = true;\n isValidatingToken.value = false;\n handleError(error);\n },\n onFlowChange: (response: any) => {\n props.onFlowChange?.(response);\n if (response.flowStatus !== 'COMPLETE') {\n currentFlow.value = response;\n formValues.value = {};\n formErrors.value = {};\n touchedFields.value = {};\n }\n },\n onProcessingStart: () => {\n isValidatingToken.value = true;\n },\n onSubmit: async (payload: any) => {\n const rawResponse: any = await props.onSubmit(payload);\n return normalizeFlowResponseLocal(rawResponse);\n },\n tokenValidationAttemptedFlag: {value: tokenValidationAttempted},\n });\n\n // \u2500\u2500 Input handlers \u2500\u2500\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n const newErrors: Record<string, string> = {...formErrors.value};\n delete newErrors[name];\n formErrors.value = newErrors;\n };\n\n const handleInputBlur = (name: string): void => {\n touchedFields.value = {...touchedFields.value, [name]: true};\n };\n\n // \u2500\u2500 Validation \u2500\u2500\n\n const validateForm = (components: any[]): {errors: Record<string, string>; isValid: boolean} => {\n const errors: Record<string, string> = {};\n const validateComponents = (comps: any[]): void => {\n comps.forEach((comp: any) => {\n if (\n (comp.type === 'PASSWORD_INPUT' || comp.type === 'TEXT_INPUT' || comp.type === 'EMAIL_INPUT') &&\n comp.required &&\n comp.ref\n ) {\n const value: string = formValues.value[comp.ref] || '';\n if (!value || value.trim() === '') {\n errors[comp.ref] = `${comp.label || comp.ref} is required`;\n }\n }\n if (comp.components && Array.isArray(comp.components)) {\n validateComponents(comp.components);\n }\n });\n };\n validateComponents(components);\n return {errors, isValid: Object.keys(errors).length === 0};\n };\n\n // \u2500\u2500 Submit handler \u2500\u2500\n\n const handleSubmit = async (component: any, data?: Record<string, any>): Promise<void> => {\n if (!currentFlow.value) return;\n\n const components: any[] = currentFlow.value.data?.components || [];\n const validation: {errors: Record<string, string>; isValid: boolean} = validateForm(components);\n if (!validation.isValid) {\n formErrors.value = validation.errors;\n isFormValid.value = false;\n const touched: Record<string, boolean> = {};\n Object.keys(validation.errors).forEach((key: string) => {\n touched[key] = true;\n });\n touchedFields.value = {...touchedFields.value, ...touched};\n return;\n }\n\n isLoading.value = true;\n apiError.value = null;\n isFormValid.value = true;\n\n try {\n const inputs: Record<string, any> = data || formValues.value;\n const payload: Record<string, any> = {\n flowId: currentFlow.value.flowId,\n inputs,\n verbose: true,\n };\n if (component?.id) payload['action'] = component.id;\n\n const rawResponse: AcceptInviteFlowResponse = await props.onSubmit(payload);\n const response: AcceptInviteFlowResponse = normalizeFlowResponseLocal(rawResponse);\n props.onFlowChange?.(response);\n\n // Handle OAuth redirect\n if (response.type === 'REDIRECTION') {\n const redirectURL: string | undefined = response.data?.redirectURL || (response as any)?.redirectURL;\n if (redirectURL) {\n initiateOAuthRedirect(redirectURL);\n return;\n }\n }\n\n // Store heading before completion\n if (currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components) {\n const currentComponents: any[] =\n currentFlow.value.data?.components || currentFlow.value.data?.meta?.components || [];\n const heading: any = currentComponents.find(\n (comp: any) => comp.type === 'TEXT' && comp.variant === 'HEADING_1',\n );\n if (heading?.label) completionTitle.value = heading.label;\n }\n\n if (response.flowStatus === 'COMPLETE') {\n isComplete.value = true;\n props.onComplete?.();\n return;\n }\n\n if (response.flowStatus === 'ERROR') {\n handleError(response);\n return;\n }\n\n currentFlow.value = response;\n formValues.value = {};\n formErrors.value = {};\n touchedFields.value = {};\n } catch (err) {\n handleError(err);\n } finally {\n isLoading.value = false;\n }\n };\n\n // \u2500\u2500 Token validation on mount \u2500\u2500\n\n watch(\n () => [props.flowId, props.inviteToken] as [string | undefined, string | undefined],\n ([flowId, inviteToken]: [string | undefined, string | undefined]) => {\n if (tokenValidationAttempted) return;\n\n if (!flowId || !inviteToken) {\n isValidatingToken.value = false;\n isTokenInvalid.value = true;\n handleError(new Error('Invalid invite link. Missing flowId or inviteToken.'));\n return;\n }\n\n tokenValidationAttempted = true;\n\n (async (): Promise<void> => {\n isValidatingToken.value = true;\n apiError.value = null;\n\n try {\n if (flowId) sessionStorage.setItem('asgardeo_flow_id', flowId);\n\n const payload: any = {flowId, inputs: {inviteToken}, verbose: true};\n const rawResponse: AcceptInviteFlowResponse = await props.onSubmit(payload);\n const response: AcceptInviteFlowResponse = normalizeFlowResponseLocal(rawResponse);\n props.onFlowChange?.(response);\n\n if (response.flowStatus === 'ERROR') {\n isTokenInvalid.value = true;\n handleError(response);\n return;\n }\n\n currentFlow.value = response;\n } catch (err) {\n isTokenInvalid.value = true;\n handleError(err);\n } finally {\n isValidatingToken.value = false;\n }\n })();\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Heading extraction \u2500\u2500\n\n const extractHeadings = (components: any[]): {subtitle?: string; title?: string} => {\n let title: string | undefined;\n let subtitle: string | undefined;\n components.forEach((comp: any) => {\n if (comp.type === 'TEXT') {\n if (comp.variant === 'HEADING_1' && !title) title = comp.label;\n else if ((comp.variant === 'HEADING_2' || comp.variant === 'SUBTITLE_1') && !subtitle) subtitle = comp.label;\n }\n });\n return {subtitle, title};\n };\n\n const filterHeadings = (components: any[]): any[] =>\n components.filter(\n (comp: any) => !(comp.type === 'TEXT' && (comp.variant === 'HEADING_1' || comp.variant === 'HEADING_2')),\n );\n\n // \u2500\u2500 Render \u2500\u2500\n\n return (): VNode | null => {\n const containerClass: string = [withVendorCSSClassPrefix('accept-invite'), props.className]\n .filter(Boolean)\n .join(' ');\n\n const components: any[] = currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components || [];\n const {title, subtitle} = extractHeadings(components);\n const componentsWithoutHeadings: any[] = filterHeadings(components);\n\n const meta: FlowMetadataResponse | null = (metaRef as Ref<FlowMetadataResponse | null>).value;\n\n // Scoped slot\n if (slots['default']) {\n const renderProps: BaseAcceptInviteRenderProps = {\n completionTitle: completionTitle.value,\n components,\n error: apiError.value,\n fieldErrors: formErrors.value,\n flowId: props.flowId,\n goToSignIn: props.onGoToSignIn,\n handleInputBlur,\n handleInputChange,\n handleSubmit,\n inviteToken: props.inviteToken,\n isComplete: isComplete.value,\n isLoading: isLoading.value,\n isTokenInvalid: isTokenInvalid.value,\n isValid: isFormValid.value,\n isValidatingToken: isValidatingToken.value,\n meta,\n subtitle,\n title,\n touched: touchedFields.value,\n values: formValues.value,\n };\n return h('div', {class: containerClass}, slots['default'](renderProps));\n }\n\n // Loading / validating state\n if (isValidatingToken.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;flex-direction:column;align-items:center;gap:1rem;padding:2rem'}, [\n h(Spinner),\n h(Typography, {variant: 'body1'}, () => 'Validating your invite link...'),\n ]),\n );\n }\n\n // Invalid token\n if (isTokenInvalid.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n h('div', {style: 'padding:1rem'}, [\n h(Typography, {variant: 'h5'}, () => 'Invalid Invite Link'),\n h(\n Alert,\n {style: 'margin-top:1rem', variant: 'error'},\n () =>\n apiError.value?.message ||\n 'This invite link is invalid or has expired. Please contact your administrator for a new invite.',\n ),\n props.onGoToSignIn\n ? h('div', {style: 'display:flex;justify-content:center;margin-top:1.5rem'}, [\n h(Button, {onClick: props.onGoToSignIn, variant: 'outline'}, () => 'Go to Sign In'),\n ])\n : null,\n ]),\n ]);\n }\n\n // Completion\n if (isComplete.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n h('div', {style: 'padding:1rem'}, [\n h(Typography, {variant: 'h5'}, () => 'Account Setup Complete!'),\n h(\n Alert,\n {style: 'margin-top:1rem', variant: 'success'},\n () => 'Your account has been successfully set up. You can now sign in with your credentials.',\n ),\n props.onGoToSignIn\n ? h('div', {style: 'display:flex;justify-content:center;margin-top:1.5rem'}, [\n h(Button, {onClick: props.onGoToSignIn, variant: 'solid'}, () => 'Sign In'),\n ])\n : null,\n ]),\n ]);\n }\n\n // Render form components\n const renderedComponents: VNode[] =\n componentsWithoutHeadings.length > 0\n ? renderInviteUserComponents(\n componentsWithoutHeadings,\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid.value,\n handleInputChange,\n {\n meta,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size: props.size,\n t,\n variant: props.variant,\n },\n )\n : [];\n\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n (props.showTitle || props.showSubtitle) && (title || subtitle)\n ? h('div', {style: 'padding:1rem 1rem 0'}, [\n props.showTitle && title ? h(Typography, {variant: 'h5'}, () => title) : null,\n props.showSubtitle && subtitle\n ? h(Typography, {style: 'margin-top:0.25rem', variant: 'body1'}, () => subtitle)\n : null,\n ])\n : null,\n apiError.value\n ? h(\n 'div',\n {style: 'padding:0 1rem;margin-bottom:1rem'},\n h(Alert, {variant: 'error'}, () => apiError.value!.message),\n )\n : null,\n h(\n 'div',\n {style: 'padding:1rem'},\n ((): Array<VNode | VNode[] | null> => {\n const formContent: Array<VNode | VNode[] | null> = [];\n\n if (renderedComponents.length > 0) {\n formContent.push(renderedComponents);\n } else if (!isLoading.value) {\n formContent.push(h(Alert, {variant: 'warning'}, () => 'No form components available'));\n }\n\n if (isLoading.value) {\n formContent.push(h('div', {style: 'display:flex;justify-content:center;padding:1rem'}, h(Spinner)));\n }\n\n return formContent;\n })(),\n ),\n props.onGoToSignIn\n ? h('div', {style: 'margin-top:1.5rem;text-align:center;padding:0 1rem 1rem'}, [\n h(Typography, {variant: 'body2'}, () => [\n 'Already have an account? ',\n h(\n Button,\n {onClick: props.onGoToSignIn, style: 'min-width:auto;padding:0', variant: 'text'},\n () => 'Sign In',\n ),\n ]),\n ])\n : null,\n ]);\n };\n },\n});\n\nexport default BaseAcceptInvite;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedFlowType} from '@asgardeo/browser';\nimport {type Component, type PropType, type SetupContext, type VNode, defineComponent, h} from 'vue';\nimport BaseInviteUser from './BaseInviteUser';\nimport type {BaseInviteUserRenderProps, InviteUserFlowResponse} from './BaseInviteUser';\nimport useAsgardeo from '../../../composables/useAsgardeo';\n\nexport type InviteUserRenderProps = BaseInviteUserRenderProps;\n\n/**\n * InviteUser \u2014 admin invite component using authenticated Asgardeo SDK context.\n */\nconst InviteUser: Component = defineComponent({\n name: 'InviteUser',\n props: {\n className: {default: '', type: String},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: InviteUserFlowResponse) => void>,\n },\n onInviteLinkGenerated: {\n default: undefined,\n type: Function as PropType<(inviteLink: string, flowId: string) => void>,\n },\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'outlined' | 'elevated'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {http, baseUrl, isInitialized} = useAsgardeo();\n\n const handleInitialize = async (payload: Record<string, any>): Promise<InviteUserFlowResponse> => {\n const response: any = await http.request({\n data: {...payload, flowType: EmbeddedFlowType.UserOnboarding, verbose: true},\n headers: {Accept: 'application/json', 'Content-Type': 'application/json'},\n method: 'POST',\n url: `${baseUrl}/flow/execute`,\n } as any);\n return response.data as InviteUserFlowResponse;\n };\n\n const handleSubmit = async (payload: Record<string, any>): Promise<InviteUserFlowResponse> => {\n const response: any = await http.request({\n data: {...payload, verbose: true},\n headers: {Accept: 'application/json', 'Content-Type': 'application/json'},\n method: 'POST',\n url: `${baseUrl}/flow/execute`,\n } as any);\n return response.data as InviteUserFlowResponse;\n };\n\n return (): VNode | null =>\n h(\n BaseInviteUser,\n {\n className: props.className,\n isInitialized: isInitialized?.value ?? false,\n onError: props.onError,\n onFlowChange: props.onFlowChange,\n onInitialize: handleInitialize,\n onInviteLinkGenerated: props.onInviteLinkGenerated,\n onSubmit: handleSubmit,\n showSubtitle: props.showSubtitle,\n showTitle: props.showTitle,\n size: props.size,\n variant: props.variant,\n },\n slots['default'] ? {default: (renderProps: any) => slots['default']!(renderProps)} : undefined,\n );\n },\n});\n\nexport default InviteUser;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedFlowType, FlowMetadataResponse, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {\n type Component,\n type PropType,\n type Ref,\n type SetupContext,\n type VNode,\n defineComponent,\n h,\n ref,\n watch,\n} from 'vue';\nimport useFlowMeta from '../../../composables/useFlowMeta';\nimport useI18n from '../../../composables/useI18n';\nimport {extractErrorMessage, normalizeFlowResponse} from '../../../utils/v2/flowTransformer';\nimport {renderInviteUserComponents} from '../../auth/sign-in/AuthOptionFactory';\nimport Alert from '../../primitives/Alert';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport Spinner from '../../primitives/Spinner';\nimport Typography from '../../primitives/Typography';\n\n/**\n * Flow response from the invite-user backend.\n */\nexport interface InviteUserFlowResponse {\n data?: {\n additionalData?: Record<string, string>;\n components?: any[];\n meta?: {\n components?: any[];\n };\n };\n failureReason?: string;\n flowId: string;\n flowStatus: 'INCOMPLETE' | 'COMPLETE' | 'ERROR';\n type?: 'VIEW' | 'REDIRECTION';\n}\n\n/**\n * Render props passed to the default scoped slot.\n */\nexport interface BaseInviteUserRenderProps {\n components: any[];\n copyInviteLink: () => Promise<void>;\n error?: Error | null;\n fieldErrors: Record<string, string>;\n flowId?: string;\n handleInputBlur: (name: string) => void;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n inviteLink?: string;\n inviteLinkCopied: boolean;\n isEmailSent: boolean;\n isInviteGenerated: boolean;\n isLoading: boolean;\n isValid: boolean;\n meta: FlowMetadataResponse | null;\n resetFlow: () => void;\n subtitle?: string;\n title?: string;\n touched: Record<string, boolean>;\n values: Record<string, string>;\n}\n\nexport interface BaseInviteUserProps {\n className?: string;\n isInitialized?: boolean;\n onError?: (error: Error) => void;\n onFlowChange?: (response: InviteUserFlowResponse) => void;\n onInitialize: (payload: Record<string, any>) => Promise<InviteUserFlowResponse>;\n onInviteLinkGenerated?: (inviteLink: string, flowId: string) => void;\n onSubmit: (payload: Record<string, any>) => Promise<InviteUserFlowResponse>;\n showSubtitle?: boolean;\n showTitle?: boolean;\n size?: 'small' | 'medium' | 'large';\n variant?: 'outlined' | 'elevated';\n}\n\n/**\n * BaseInviteUser \u2014 handles the admin invite-user flow lifecycle.\n *\n * Steps: user type selection \u2192 user details \u2192 invite link generation.\n */\nconst BaseInviteUser: Component = defineComponent({\n name: 'BaseInviteUser',\n props: {\n className: {default: '', type: String},\n isInitialized: {default: true, type: Boolean},\n onError: {default: undefined, type: Function as PropType<(error: Error) => void>},\n onFlowChange: {\n default: undefined,\n type: Function as PropType<(response: InviteUserFlowResponse) => void>,\n },\n onInitialize: {\n required: true,\n type: Function as PropType<(payload: Record<string, any>) => Promise<InviteUserFlowResponse>>,\n },\n onInviteLinkGenerated: {\n default: undefined,\n type: Function as PropType<(inviteLink: string, flowId: string) => void>,\n },\n onSubmit: {\n required: true,\n type: Function as PropType<(payload: Record<string, any>) => Promise<InviteUserFlowResponse>>,\n },\n showSubtitle: {default: true, type: Boolean},\n showTitle: {default: true, type: Boolean},\n size: {default: 'medium', type: String as PropType<'small' | 'medium' | 'large'>},\n variant: {default: 'outlined', type: String as PropType<'outlined' | 'elevated'>},\n },\n setup(props: any, {slots}: SetupContext): () => VNode | null {\n const {meta: metaRef} = useFlowMeta();\n const {t} = useI18n();\n\n // \u2500\u2500 State \u2500\u2500\n const isLoading: Ref<boolean> = ref(false);\n const isFlowInitialized: Ref<boolean> = ref(false);\n const currentFlow: Ref<InviteUserFlowResponse | null> = ref(null);\n const apiError: Ref<Error | null> = ref(null);\n\n // Form state\n const formValues: Ref<Record<string, string>> = ref({});\n const formErrors: Ref<Record<string, string>> = ref({});\n const touchedFields: Ref<Record<string, boolean>> = ref({});\n const isFormValid: Ref<boolean> = ref(true);\n\n // Invite state\n const inviteLink: Ref<string | undefined> = ref(undefined);\n const inviteLinkCopied: Ref<boolean> = ref(false);\n const emailSent: Ref<boolean> = ref(false);\n\n let initializationAttempted: boolean = false;\n\n // \u2500\u2500 Helpers \u2500\u2500\n\n const handleError = (error: any): void => {\n const errorMessage: string =\n error?.failureReason || extractErrorMessage(error, t, 'components.inviteUser.errors.generic');\n apiError.value = error instanceof Error ? error : new Error(errorMessage);\n props.onError?.(apiError.value);\n };\n\n const normalizeFlowResponseLocal = (response: InviteUserFlowResponse): InviteUserFlowResponse => {\n if (!response?.data?.meta?.components) return response;\n try {\n const {components} = normalizeFlowResponse(\n response,\n t,\n {defaultErrorKey: 'components.inviteUser.errors.generic', resolveTranslations: false},\n (metaRef as Ref<FlowMetadataResponse | null>).value,\n );\n return {...response, data: {...response.data, components: components as any}};\n } catch {\n return response;\n }\n };\n\n // \u2500\u2500 Input handlers \u2500\u2500\n\n const handleInputChange = (name: string, value: string): void => {\n formValues.value = {...formValues.value, [name]: value};\n const newErrors: Record<string, string> = {...formErrors.value};\n delete newErrors[name];\n formErrors.value = newErrors;\n };\n\n const handleInputBlur = (name: string): void => {\n touchedFields.value = {...touchedFields.value, [name]: true};\n };\n\n // \u2500\u2500 Validation \u2500\u2500\n\n const validateForm = (components: any[]): {errors: Record<string, string>; isValid: boolean} => {\n const errors: Record<string, string> = {};\n const validateComponents = (comps: any[]): void => {\n comps.forEach((comp: any) => {\n if (\n (comp.type === 'TEXT_INPUT' || comp.type === 'EMAIL_INPUT' || comp.type === 'SELECT') &&\n comp.required &&\n comp.ref\n ) {\n const value: string = formValues.value[comp.ref] || '';\n if (!value || value.trim() === '') {\n errors[comp.ref] = `${comp.label || comp.ref} is required`;\n }\n if (comp.type === 'EMAIL_INPUT' && value && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) {\n errors[comp.ref] = 'Please enter a valid email address';\n }\n }\n if (comp.components && Array.isArray(comp.components)) {\n validateComponents(comp.components);\n }\n });\n };\n validateComponents(components);\n return {errors, isValid: Object.keys(errors).length === 0};\n };\n\n // \u2500\u2500 Submit handler \u2500\u2500\n\n const handleSubmit = async (component: any, data?: Record<string, any>): Promise<void> => {\n if (!currentFlow.value) return;\n\n const components: any[] = currentFlow.value.data?.components || [];\n const validation: {errors: Record<string, string>; isValid: boolean} = validateForm(components);\n if (!validation.isValid) {\n formErrors.value = validation.errors;\n isFormValid.value = false;\n const touched: Record<string, boolean> = {};\n Object.keys(validation.errors).forEach((key: string) => {\n touched[key] = true;\n });\n touchedFields.value = {...touchedFields.value, ...touched};\n return;\n }\n\n isLoading.value = true;\n apiError.value = null;\n isFormValid.value = true;\n\n try {\n const inputs: Record<string, any> = data || formValues.value;\n const payload: Record<string, any> = {\n flowId: currentFlow.value.flowId,\n inputs,\n verbose: true,\n };\n if (component?.id) payload['action'] = component.id;\n\n const rawResponse: InviteUserFlowResponse = await props.onSubmit(payload);\n const response: InviteUserFlowResponse = normalizeFlowResponseLocal(rawResponse);\n props.onFlowChange?.(response);\n\n // Check for invite link\n if (response.data?.additionalData?.['inviteLink']) {\n const linkValue: string = response.data.additionalData['inviteLink'];\n inviteLink.value = linkValue;\n props.onInviteLinkGenerated?.(linkValue, response.flowId);\n }\n\n if (response.data?.additionalData?.['emailSent'] === 'true') {\n emailSent.value = true;\n }\n\n if (response.flowStatus === 'ERROR') {\n handleError(response);\n return;\n }\n\n currentFlow.value = response;\n formValues.value = {};\n formErrors.value = {};\n touchedFields.value = {};\n } catch (err) {\n handleError(err);\n } finally {\n isLoading.value = false;\n }\n };\n\n // \u2500\u2500 Copy invite link \u2500\u2500\n\n const copyInviteLink = async (): Promise<void> => {\n if (!inviteLink.value) return;\n try {\n await navigator.clipboard.writeText(inviteLink.value);\n inviteLinkCopied.value = true;\n setTimeout(() => {\n inviteLinkCopied.value = false;\n }, 3000);\n } catch {\n const textArea: HTMLTextAreaElement = document.createElement('textarea');\n textArea.value = inviteLink.value;\n document.body.appendChild(textArea);\n textArea.select();\n document.execCommand('copy');\n document.body.removeChild(textArea);\n inviteLinkCopied.value = true;\n setTimeout(() => {\n inviteLinkCopied.value = false;\n }, 3000);\n }\n };\n\n // \u2500\u2500 Reset flow \u2500\u2500\n\n const resetFlow = (): void => {\n isFlowInitialized.value = false;\n currentFlow.value = null;\n apiError.value = null;\n formValues.value = {};\n formErrors.value = {};\n touchedFields.value = {};\n inviteLink.value = undefined;\n inviteLinkCopied.value = false;\n emailSent.value = false;\n initializationAttempted = false;\n };\n\n // \u2500\u2500 Flow initialization \u2500\u2500\n\n watch(\n () => [props.isInitialized, isFlowInitialized.value] as [boolean, boolean],\n ([initialized, flowInit]: [boolean, boolean]) => {\n if (initialized && !flowInit && !initializationAttempted) {\n initializationAttempted = true;\n\n (async (): Promise<void> => {\n isLoading.value = true;\n apiError.value = null;\n\n try {\n const payload: any = {flowType: EmbeddedFlowType.UserOnboarding, verbose: true};\n const rawResponse: InviteUserFlowResponse = await props.onInitialize(payload);\n const response: InviteUserFlowResponse = normalizeFlowResponseLocal(rawResponse);\n currentFlow.value = response;\n isFlowInitialized.value = true;\n props.onFlowChange?.(response);\n\n if (response.flowStatus === 'ERROR') {\n handleError(response);\n }\n } catch (err) {\n handleError(err);\n } finally {\n isLoading.value = false;\n }\n })();\n }\n },\n {immediate: true},\n );\n\n // \u2500\u2500 Heading extraction \u2500\u2500\n\n const extractHeadings = (components: any[]): {subtitle?: string; title?: string} => {\n let title: string | undefined;\n let subtitle: string | undefined;\n components.forEach((comp: any) => {\n if (comp.type === 'TEXT') {\n if (comp.variant === 'HEADING_1' && !title) title = comp.label;\n else if ((comp.variant === 'HEADING_2' || comp.variant === 'SUBTITLE_1') && !subtitle) subtitle = comp.label;\n }\n });\n return {subtitle, title};\n };\n\n const filterHeadings = (components: any[]): any[] =>\n components.filter(\n (comp: any) => !(comp.type === 'TEXT' && (comp.variant === 'HEADING_1' || comp.variant === 'HEADING_2')),\n );\n\n // \u2500\u2500 Render \u2500\u2500\n\n return (): VNode | null => {\n const containerClass: string = [withVendorCSSClassPrefix('invite-user'), props.className]\n .filter(Boolean)\n .join(' ');\n\n const components: any[] = currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components || [];\n const {title, subtitle} = extractHeadings(components);\n const componentsWithoutHeadings: any[] = filterHeadings(components);\n const isInviteGenerated: boolean = !!inviteLink.value;\n const isEmailSent: boolean = emailSent.value;\n\n const meta: FlowMetadataResponse | null = (metaRef as Ref<FlowMetadataResponse | null>).value;\n\n // Scoped slot\n if (slots['default']) {\n const renderProps: BaseInviteUserRenderProps = {\n components,\n copyInviteLink,\n error: apiError.value,\n fieldErrors: formErrors.value,\n flowId: currentFlow.value?.flowId,\n handleInputBlur,\n handleInputChange,\n handleSubmit,\n inviteLink: inviteLink.value,\n inviteLinkCopied: inviteLinkCopied.value,\n isEmailSent,\n isInviteGenerated,\n isLoading: isLoading.value,\n isValid: isFormValid.value,\n meta,\n resetFlow,\n subtitle,\n title,\n touched: touchedFields.value,\n values: formValues.value,\n };\n return h('div', {class: containerClass}, slots['default'](renderProps));\n }\n\n // Waiting for SDK initialization\n if (!props.isInitialized || (!isFlowInitialized.value && isLoading.value)) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h('div', {style: 'display:flex;justify-content:center;padding:2rem'}, h(Spinner)),\n );\n }\n\n // Error state during initialization\n if (!currentFlow.value && apiError.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () =>\n h(Alert, {variant: 'error'}, () => apiError.value!.message),\n );\n }\n\n // Email sent confirmation\n if (isInviteGenerated && isEmailSent) {\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n h('div', {style: 'padding:1rem'}, [\n h(Typography, {variant: 'h5'}, () => 'Invite Email Sent!'),\n h(\n Alert,\n {style: 'margin-top:1rem', variant: 'success'},\n () =>\n 'An invitation email has been sent successfully. The user can complete their registration using the link in the email.',\n ),\n h('div', {style: 'display:flex;gap:0.5rem;margin-top:1.5rem'}, [\n h(Button, {onClick: resetFlow, variant: 'outline'}, () => 'Invite Another User'),\n ]),\n ]),\n ]);\n }\n\n // Invite link generated \u2014 show copy link\n if (isInviteGenerated && inviteLink.value) {\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n h('div', {style: 'padding:1rem'}, [\n h(Typography, {variant: 'h5'}, () => 'Invite Link Generated!'),\n h(\n Alert,\n {style: 'margin-top:1rem', variant: 'success'},\n () => 'Share this link with the user to complete their registration.',\n ),\n h('div', {style: 'margin-top:1rem'}, [\n h(Typography, {style: 'margin-bottom:0.5rem', variant: 'body2'}, () => 'Invite Link'),\n h(\n 'div',\n {\n style:\n 'display:flex;align-items:center;gap:0.5rem;padding:0.75rem;background:var(--asgardeo-color-background-secondary,#f5f5f5);border-radius:4px;word-break:break-all',\n },\n [\n h(Typography, {style: 'flex:1', variant: 'body2'}, () => inviteLink.value),\n h(Button, {onClick: copyInviteLink, size: 'small', variant: 'outline'}, () =>\n inviteLinkCopied.value ? 'Copied!' : 'Copy',\n ),\n ],\n ),\n ]),\n h('div', {style: 'display:flex;gap:0.5rem;margin-top:1.5rem'}, [\n h(Button, {onClick: resetFlow, variant: 'outline'}, () => 'Invite Another User'),\n ]),\n ]),\n ]);\n }\n\n // Render form components\n const renderedComponents: VNode[] =\n componentsWithoutHeadings.length > 0\n ? renderInviteUserComponents(\n componentsWithoutHeadings,\n formValues.value,\n touchedFields.value,\n formErrors.value,\n isLoading.value,\n isFormValid.value,\n handleInputChange,\n {\n meta,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size: props.size,\n t,\n variant: props.variant,\n },\n )\n : [];\n\n return h(Card, {class: containerClass, variant: props.variant}, () => [\n (props.showTitle || props.showSubtitle) && (title || subtitle)\n ? h('div', {style: 'padding:1rem 1rem 0'}, [\n props.showTitle && title ? h(Typography, {variant: 'h5'}, () => title) : null,\n props.showSubtitle && subtitle\n ? h(Typography, {style: 'margin-top:0.25rem', variant: 'body1'}, () => subtitle)\n : null,\n ])\n : null,\n apiError.value\n ? h(\n 'div',\n {style: 'padding:0 1rem;margin-bottom:1rem'},\n h(Alert, {variant: 'error'}, () => apiError.value!.message),\n )\n : null,\n h(\n 'div',\n {style: 'padding:1rem'},\n ((): Array<VNode | VNode[] | null> => {\n const formContent: Array<VNode | VNode[] | null> = [];\n\n if (renderedComponents.length > 0) {\n formContent.push(renderedComponents);\n } else if (!isLoading.value) {\n formContent.push(h(Alert, {variant: 'warning'}, () => 'No form components available'));\n }\n\n if (isLoading.value) {\n formContent.push(h('div', {style: 'display:flex;justify-content:center;padding:1rem'}, h(Spinner)));\n }\n\n return formContent;\n })(),\n ),\n ]);\n };\n },\n});\n\nexport default BaseInviteUser;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Organization as IOrganization, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport BaseOrganizationList from './BaseOrganizationList';\nimport useOrganization from '../../../composables/useOrganization';\n\n/**\n * OrganizationList \u2014 styled organization list component.\n *\n * Retrieves organization list from context and delegates to BaseOrganizationList.\n */\nconst OrganizationList: Component = defineComponent({\n emits: ['select'],\n name: 'OrganizationList',\n props: {\n className: {\n default: '',\n type: String,\n },\n },\n setup(props: {className: string}, {slots, emit}: {emit: any; slots: any}): () => VNode | VNode[] | null {\n const {myOrganizations, isLoading, switchOrganization} = useOrganization();\n\n const handleSelect = async (org: IOrganization): Promise<void> => {\n emit('select', org);\n await switchOrganization(org);\n };\n\n return (): VNode | VNode[] | null =>\n h(\n BaseOrganizationList,\n {\n class: withVendorCSSClassPrefix('organization-list--styled'),\n className: props.className,\n isLoading: isLoading.value,\n onSelect: handleSelect,\n organizations: myOrganizations.value,\n },\n slots,\n );\n },\n});\n\nexport default OrganizationList;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Organization as IOrganization, withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type VNode, defineComponent, h} from 'vue';\nimport {BuildingIcon} from '../../primitives/Icons';\nimport Spinner from '../../primitives/Spinner';\nimport Typography from '../../primitives/Typography';\n\n/**\n * BaseOrganizationList \u2014 unstyled list of organizations.\n */\nconst BaseOrganizationList: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseOrganizationList',\n props: {\n className: {default: '', type: String},\n isLoading: {default: false, type: Boolean},\n onSelect: {default: undefined, type: Function as PropType<(org: IOrganization) => void>},\n organizations: {default: () => [], type: Array as PropType<IOrganization[]>},\n },\n setup(\n props: {\n className: string;\n isLoading: boolean;\n onSelect?: (org: IOrganization) => void;\n organizations: IOrganization[];\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({isLoading: props.isLoading, organizations: props.organizations});\n }\n\n const prefix: typeof withVendorCSSClassPrefix = withVendorCSSClassPrefix;\n const children: VNode[] = [];\n\n if (props.isLoading) {\n children.push(h('div', {class: prefix('organization-list__loading')}, [h(Spinner)]));\n } else if (props.organizations.length === 0) {\n children.push(\n h(Typography, {class: prefix('organization-list__empty'), variant: 'body2'}, () => 'No organizations found'),\n );\n } else {\n props.organizations.forEach((org: IOrganization) => {\n children.push(\n h(\n 'button',\n {\n class: prefix('organization-list__item'),\n key: org['id'],\n onClick: () => props.onSelect?.(org),\n type: 'button',\n },\n [h(BuildingIcon, {size: 16}), h(Typography, {variant: 'body1'}, () => org['name'] || org['id'])],\n ),\n );\n });\n }\n\n return h('div', {class: [prefix('organization-list'), props.className].filter(Boolean).join(' ')}, children);\n };\n },\n});\n\nexport default BaseOrganizationList;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type VNode, defineComponent, h} from 'vue';\nimport BaseOrganizationProfile from './BaseOrganizationProfile';\nimport useOrganization from '../../../composables/useOrganization';\n\n/**\n * OrganizationProfile \u2014 styled organisation details component.\n *\n * Retrieves current organization from context and delegates to BaseOrganizationProfile.\n */\nconst OrganizationProfile: Component = defineComponent({\n name: 'OrganizationProfile',\n props: {\n className: {default: '', type: String},\n editable: {default: false, type: Boolean},\n onUpdate: {\n default: undefined,\n type: Function as PropType<(payload: Record<string, unknown>) => Promise<void>>,\n },\n title: {default: 'Organization Profile', type: String},\n },\n setup(\n props: {\n className: string;\n editable: boolean;\n onUpdate?: (payload: Record<string, unknown>) => Promise<void>;\n title: string;\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n const {currentOrganization} = useOrganization();\n\n return (): VNode | VNode[] | null =>\n h(\n BaseOrganizationProfile,\n {\n class: withVendorCSSClassPrefix('organization-profile--styled'),\n className: props.className,\n editable: props.editable,\n onUpdate: props.onUpdate,\n organization: currentOrganization?.value ?? null,\n title: props.title,\n },\n slots,\n );\n },\n});\n\nexport default OrganizationProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport type {Organization} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport Divider from '../../primitives/Divider';\nimport {PencilIcon} from '../../primitives/Icons';\nimport TextField from '../../primitives/TextField';\nimport Typography from '../../primitives/Typography';\n\nconst ORG_AVATAR_GRADIENTS: string[] = [\n 'linear-gradient(135deg, #22d3ee 0%, #2dd4bf 100%)',\n 'linear-gradient(135deg, #34d399 0%, #059669 100%)',\n 'linear-gradient(135deg, #60a5fa 0%, #818cf8 100%)',\n 'linear-gradient(135deg, #f472b6 0%, #c084fc 100%)',\n 'linear-gradient(135deg, #fb923c 0%, #fbbf24 100%)',\n 'linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%)',\n 'linear-gradient(135deg, #4ade80 0%, #22d3ee 100%)',\n 'linear-gradient(135deg, #f87171 0%, #fb923c 100%)',\n];\n\nconst getOrgAvatarGradient = (seed: string): string => {\n if (!seed) return ORG_AVATAR_GRADIENTS[0];\n let hash: number = 0;\n for (let i: number = 0; i < seed.length; i += 1) {\n hash = Math.imul(31, hash) + seed.charCodeAt(i);\n }\n return ORG_AVATAR_GRADIENTS[Math.abs(hash) % ORG_AVATAR_GRADIENTS.length];\n};\n\nconst getOrgInitials = (name: string): string => {\n if (!name) return '?';\n const parts: string[] = name.trim().split(/\\s+/).filter(Boolean);\n if (parts.length >= 2) return (parts[0].charAt(0) + parts[1].charAt(0)).toUpperCase();\n return name.charAt(0).toUpperCase();\n};\n\nconst formatDate = (dateStr: string): string => {\n try {\n return new Date(dateStr).toLocaleDateString('en-US', {day: 'numeric', month: 'long', year: 'numeric'});\n } catch {\n return dateStr;\n }\n};\n\n/**\n * BaseOrganizationProfile \u2014 unstyled organization details view/edit component.\n *\n * Renders a profile card with avatar, org name, handle, and two-column field rows\n * for Organization ID, Name, Description, Created Date, and Last Modified Date.\n */\nconst BaseOrganizationProfile: Component = defineComponent({\n name: 'BaseOrganizationProfile',\n props: {\n className: {default: '', type: String},\n editable: {default: false, type: Boolean},\n onUpdate: {\n default: undefined,\n type: Function as PropType<(payload: Record<string, unknown>) => Promise<void>>,\n },\n organization: {default: null, type: Object as PropType<Organization | null>},\n title: {default: 'Organization Profile', type: String},\n },\n setup(\n props: {\n className: string;\n editable: boolean;\n onUpdate?: (payload: Record<string, unknown>) => Promise<void>;\n organization: Organization | null;\n title: string;\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n const editingName: Ref<boolean> = ref(false);\n const editingDescription: Ref<boolean> = ref(false);\n const editedName: Ref<string> = ref('');\n const editedDescription: Ref<string> = ref('');\n\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({organization: props.organization});\n }\n\n if (!props.organization) {\n return slots['fallback']?.() ?? null;\n }\n\n const prefix: typeof withVendorCSSClassPrefix = withVendorCSSClassPrefix;\n const org: Record<string, unknown> = props.organization as unknown as Record<string, unknown>;\n const orgName: string = String(org['name'] || org['displayName'] || '');\n const orgHandle: string = String(org['orgHandle'] || '');\n const orgId: string = String(org['id'] || '');\n const orgDescription: string | null = org['description'] != null ? String(org['description']) : null;\n const createdDate: string | null = org['created'] ? formatDate(String(org['created'])) : null;\n const lastModifiedDate: string | null = org['lastModified'] ? formatDate(String(org['lastModified'])) : null;\n const initials: string = getOrgInitials(orgName);\n const avatarGradient: string = getOrgAvatarGradient(orgId || orgName);\n\n const children: VNode[] = [];\n\n // Header: title\n children.push(\n h('div', {class: prefix('organization-profile__header')}, [\n h(Typography, {class: prefix('organization-profile__title'), variant: 'h5'}, () => props.title),\n ]),\n );\n\n children.push(h(Divider, {class: prefix('organization-profile__header-divider')}));\n\n // Avatar + org name + handle\n children.push(\n h('div', {class: prefix('organization-profile__identity')}, [\n h(\n 'div',\n {\n class: prefix('organization-profile__avatar'),\n style: {background: avatarGradient},\n },\n [h('span', {class: prefix('organization-profile__avatar-initials')}, initials)],\n ),\n h(Typography, {class: prefix('organization-profile__org-name'), variant: 'h5'}, () => orgName),\n orgHandle\n ? h(\n Typography,\n {class: prefix('organization-profile__org-handle'), variant: 'body2'},\n () => `@${orgHandle}`,\n )\n : null,\n ]),\n );\n\n children.push(h(Divider, {class: prefix('organization-profile__identity-divider')}));\n\n // Field rows\n const fieldRows: VNode[] = [];\n\n // Organization ID (readonly)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'id'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Organization ID',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n h('div', {class: prefix('organization-profile__field-display')}, [\n orgId\n ? h(\n Typography,\n {\n class: [\n prefix('organization-profile__field-value'),\n prefix('organization-profile__field-value--id'),\n ].join(' '),\n variant: 'body1',\n },\n () => orgId,\n )\n : h('span', {class: prefix('organization-profile__field-placeholder')}, 'Not available'),\n ]),\n ]),\n ]),\n );\n\n // Organization Name (editable)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'name'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Organization Name',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n editingName.value\n ? h('div', {class: prefix('organization-profile__field-edit')}, [\n h(TextField, {\n modelValue: editedName.value,\n 'onUpdate:modelValue': (v: string) => {\n editedName.value = v;\n },\n }),\n h('div', {class: prefix('organization-profile__field-edit-actions')}, [\n h(\n Button,\n {\n onClick: async () => {\n await props.onUpdate?.({name: editedName.value});\n editingName.value = false;\n },\n size: 'small' as const,\n variant: 'solid' as const,\n },\n () => 'Save',\n ),\n h(\n Button,\n {\n onClick: () => {\n editingName.value = false;\n },\n size: 'small' as const,\n variant: 'text' as const,\n },\n () => 'Cancel',\n ),\n ]),\n ])\n : h('div', {class: prefix('organization-profile__field-display')}, [\n h(Typography, {class: prefix('organization-profile__field-value'), variant: 'body1'}, () => orgName),\n props.editable\n ? h(\n 'button',\n {\n 'aria-label': 'Edit Organization Name',\n class: prefix('organization-profile__field-edit-btn'),\n onClick: () => {\n editedName.value = orgName;\n editingName.value = true;\n },\n type: 'button',\n },\n [h(PencilIcon)],\n )\n : null,\n ]),\n ]),\n ]),\n );\n\n // Organization Description (editable)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'description'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Organization Description',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n editingDescription.value\n ? h('div', {class: prefix('organization-profile__field-edit')}, [\n h(TextField, {\n modelValue: editedDescription.value,\n 'onUpdate:modelValue': (v: string) => {\n editedDescription.value = v;\n },\n }),\n h('div', {class: prefix('organization-profile__field-edit-actions')}, [\n h(\n Button,\n {\n onClick: async () => {\n await props.onUpdate?.({description: editedDescription.value});\n editingDescription.value = false;\n },\n size: 'small' as const,\n variant: 'solid' as const,\n },\n () => 'Save',\n ),\n h(\n Button,\n {\n onClick: () => {\n editingDescription.value = false;\n },\n size: 'small' as const,\n variant: 'text' as const,\n },\n () => 'Cancel',\n ),\n ]),\n ])\n : h('div', {class: prefix('organization-profile__field-display')}, [\n orgDescription != null\n ? h(\n Typography,\n {class: prefix('organization-profile__field-value'), variant: 'body1'},\n () => orgDescription,\n )\n : h(\n 'span',\n {\n class: prefix('organization-profile__field-placeholder'),\n onClick: props.editable\n ? (): void => {\n editedDescription.value = '';\n editingDescription.value = true;\n }\n : undefined,\n },\n 'Enter organization description',\n ),\n props.editable\n ? h(\n 'button',\n {\n 'aria-label': 'Edit Organization Description',\n class: prefix('organization-profile__field-edit-btn'),\n onClick: () => {\n editedDescription.value = orgDescription ?? '';\n editingDescription.value = true;\n },\n type: 'button',\n },\n [h(PencilIcon)],\n )\n : null,\n ]),\n ]),\n ]),\n );\n\n // Created Date (readonly)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'created'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(Typography, {class: prefix('organization-profile__field-label'), variant: 'body2'}, () => 'Created Date'),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n h('div', {class: prefix('organization-profile__field-display')}, [\n createdDate\n ? h(\n Typography,\n {class: prefix('organization-profile__field-value'), variant: 'body1'},\n () => createdDate,\n )\n : h('span', {class: prefix('organization-profile__field-placeholder')}, 'Not available'),\n ]),\n ]),\n ]),\n );\n\n // Last Modified Date (readonly)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'lastModified'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Last Modified Date',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n h('div', {class: prefix('organization-profile__field-display')}, [\n lastModifiedDate\n ? h(\n Typography,\n {class: prefix('organization-profile__field-value'), variant: 'body1'},\n () => lastModifiedDate,\n )\n : h('span', {class: prefix('organization-profile__field-placeholder')}, 'Not available'),\n ]),\n ]),\n ]),\n );\n\n // Organization Handle (readonly)\n fieldRows.push(\n h('div', {class: prefix('organization-profile__field'), key: 'orgHandle'}, [\n h('div', {class: prefix('organization-profile__field-label-col')}, [\n h(\n Typography,\n {class: prefix('organization-profile__field-label'), variant: 'body2'},\n () => 'Organization Handle',\n ),\n ]),\n h('div', {class: prefix('organization-profile__field-value-col')}, [\n h('div', {class: prefix('organization-profile__field-display')}, [\n orgHandle\n ? h(Typography, {class: prefix('organization-profile__field-value'), variant: 'body1'}, () => orgHandle)\n : h('span', {class: prefix('organization-profile__field-placeholder')}, 'Not available'),\n ]),\n ]),\n ]),\n );\n\n children.push(h('div', {class: prefix('organization-profile__fields')}, fieldRows));\n\n return h(\n Card,\n {class: [prefix('organization-profile'), props.className].filter(Boolean).join(' ')},\n () => children,\n );\n };\n },\n});\n\nexport default BaseOrganizationProfile;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport BaseOrganizationSwitcher from './BaseOrganizationSwitcher';\nimport useOrganization from '../../../composables/useOrganization';\n\n/**\n * OrganizationSwitcher \u2014 styled organisation switcher component.\n *\n * Retrieves organisations from context and delegates to BaseOrganizationSwitcher.\n */\nconst OrganizationSwitcher: Component = defineComponent({\n name: 'OrganizationSwitcher',\n props: {\n className: {default: '', type: String},\n },\n setup(props: {className: string}, {slots}: {slots: any}): () => VNode | VNode[] | null {\n const {currentOrganization, myOrganizations, isLoading, switchOrganization} = useOrganization();\n\n return (): VNode | VNode[] | null =>\n h(\n BaseOrganizationSwitcher,\n {\n class: withVendorCSSClassPrefix('organization-switcher--styled'),\n className: props.className,\n currentOrganization: currentOrganization?.value ?? null,\n isLoading: isLoading?.value ?? false,\n onSwitch: switchOrganization,\n organizations: myOrganizations?.value ?? [],\n },\n slots,\n );\n },\n});\n\nexport default OrganizationSwitcher;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport type {Organization} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport Card from '../../primitives/Card';\nimport {BuildingIcon, ChevronDownIcon} from '../../primitives/Icons';\nimport Spinner from '../../primitives/Spinner';\nimport Typography from '../../primitives/Typography';\n\nconst cls = (name: string): string => withVendorCSSClassPrefix(`organization-switcher${name}`);\n\n/**\n * BaseOrganizationSwitcher \u2014 unstyled organisation dropdown switcher.\n *\n * Shows the current organization name and a dropdown list to switch.\n */\nconst BaseOrganizationSwitcher: Component = defineComponent({\n inheritAttrs: false,\n name: 'BaseOrganizationSwitcher',\n props: {\n className: {default: '', type: String},\n currentOrganization: {default: null, type: Object as PropType<Organization | null>},\n isLoading: {default: false, type: Boolean},\n onSwitch: {default: undefined, type: Function as PropType<(org: Organization) => void>},\n organizations: {default: () => [], type: Array as PropType<Organization[]>},\n },\n setup(\n props: {\n className: string;\n currentOrganization: Organization | null;\n isLoading: boolean;\n onSwitch?: (org: Organization) => void;\n organizations: Organization[];\n },\n {slots}: {slots: any},\n ): () => VNode | VNode[] | null {\n const isOpen: Ref<boolean> = ref(false);\n\n const toggle = (): void => {\n isOpen.value = !isOpen.value;\n };\n\n const handleSelect = (org: Organization): void => {\n isOpen.value = false;\n props.onSwitch?.(org);\n };\n\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({\n currentOrganization: props.currentOrganization,\n handleSelect,\n isLoading: props.isLoading,\n isOpen: isOpen.value,\n organizations: props.organizations,\n toggle,\n });\n }\n\n const currentName: string = props.currentOrganization?.name ?? 'No Organization';\n\n const triggerButton: VNode = h(\n 'button',\n {\n 'aria-expanded': isOpen.value,\n 'aria-haspopup': 'listbox',\n class: cls('__trigger'),\n onClick: toggle,\n type: 'button',\n },\n [\n h(BuildingIcon, {size: 16}),\n h(Typography, {class: cls('__trigger-label'), variant: 'body2'}, () => currentName),\n h(ChevronDownIcon, {size: 12}),\n ],\n );\n\n const dropdownChildren: VNode[] = [];\n\n if (props.isLoading) {\n dropdownChildren.push(h('div', {class: cls('__loading')}, [h(Spinner, {size: 'small'})]));\n } else if (props.organizations.length === 0) {\n dropdownChildren.push(\n h(Typography, {class: cls('__empty'), variant: 'body2'}, () => 'No organizations available'),\n );\n } else {\n props.organizations.forEach((org: Organization) => {\n const isActive: boolean = org['id'] === props.currentOrganization?.id;\n dropdownChildren.push(\n h(\n 'button',\n {\n 'aria-selected': isActive,\n class: [cls('__item'), isActive ? cls('__item--active') : ''],\n onClick: () => handleSelect(org),\n role: 'option',\n type: 'button',\n },\n [h(BuildingIcon, {size: 14}), h(Typography, {variant: 'body2'}, () => org['name'])],\n ),\n );\n });\n }\n\n const dropdown: VNode | null = isOpen.value\n ? h('div', {class: cls('__dropdown'), role: 'listbox'}, dropdownChildren)\n : null;\n\n return h(Card, {class: [cls(''), props.className].filter(Boolean).join(' ')}, () => [triggerButton, dropdown]);\n };\n },\n});\n\nexport default BaseOrganizationSwitcher;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type VNode, defineComponent, h} from 'vue';\nimport BaseCreateOrganization from './BaseCreateOrganization';\nimport useOrganization from '../../../composables/useOrganization';\n\ninterface CreateOrganizationSetupProps {\n className: string;\n description: string;\n title: string;\n}\n\n/**\n * CreateOrganization \u2014 styled sub-organisation creation component.\n *\n * Retrieves createOrganization from context and delegates to BaseCreateOrganization.\n */\nconst CreateOrganization: Component = defineComponent({\n name: 'CreateOrganization',\n props: {\n className: {default: '', type: String},\n description: {default: 'Create a new sub-organization.', type: String},\n title: {default: 'Create Organization', type: String},\n },\n setup(props: CreateOrganizationSetupProps, {slots}: {slots: any}): () => VNode {\n const {createOrganization} = useOrganization();\n\n return (): VNode =>\n h(\n BaseCreateOrganization,\n {\n class: withVendorCSSClassPrefix('create-organization--styled'),\n className: props.className,\n description: props.description,\n onCreate: createOrganization\n ? async (name: string): Promise<void> => {\n await createOrganization({description: '', name, parentId: '', type: 'TENANT'}, '');\n }\n : undefined,\n title: props.title,\n },\n slots,\n );\n },\n});\n\nexport default CreateOrganization;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport Alert from '../../primitives/Alert';\nimport Button from '../../primitives/Button';\nimport Card from '../../primitives/Card';\nimport TextField from '../../primitives/TextField';\nimport Typography from '../../primitives/Typography';\n\nconst cls = (name: string): string => withVendorCSSClassPrefix(`create-organization${name}`);\n\ninterface BaseCreateOrganizationSetupProps {\n className: string;\n description: string;\n onCreate?: (name: string) => Promise<void> | void;\n title: string;\n}\n\n/**\n * BaseCreateOrganization \u2014 unstyled sub-organisation creation form.\n *\n * Provides a form with an org name input and create button.\n */\nconst BaseCreateOrganization: Component = defineComponent({\n name: 'BaseCreateOrganization',\n props: {\n className: {default: '', type: String},\n description: {default: 'Create a new sub-organization.', type: String},\n onCreate: {default: undefined, type: Function as PropType<(name: string) => Promise<void> | void>},\n title: {default: 'Create Organization', type: String},\n },\n setup(props: BaseCreateOrganizationSetupProps, {slots}: {slots: any}): () => VNode | VNode[] {\n const orgName: Ref<string> = ref('');\n const isSubmitting: Ref<boolean> = ref(false);\n const error: Ref<string | null> = ref<string | null>(null);\n\n const handleSubmit = async (): Promise<void> => {\n const name: string = orgName.value.trim();\n if (!name) {\n error.value = 'Organization name is required.';\n return;\n }\n\n error.value = null;\n isSubmitting.value = true;\n try {\n await props.onCreate?.(name);\n orgName.value = '';\n } catch (err: unknown) {\n error.value = err instanceof Error ? err.message : 'Failed to create organization.';\n } finally {\n isSubmitting.value = false;\n }\n };\n\n return (): VNode | VNode[] | null => {\n if (slots['default']) {\n return slots['default']({\n error: error.value,\n handleSubmit,\n isSubmitting: isSubmitting.value,\n orgName: orgName.value,\n setOrgName: (v: string) => {\n orgName.value = v;\n },\n });\n }\n\n return h(Card, {class: [cls(''), props.className].filter(Boolean).join(' ')}, () => [\n h(Typography, {class: cls('__title'), variant: 'h6'}, () => props.title),\n props.description\n ? h(Typography, {class: cls('__description'), variant: 'body2'}, () => props.description)\n : null,\n error.value ? h(Alert, {class: cls('__error'), severity: 'error'}, () => error.value) : null,\n h(TextField, {\n class: cls('__input'),\n label: 'Organization Name',\n modelValue: orgName.value,\n 'onUpdate:modelValue': (v: string) => {\n orgName.value = v;\n },\n placeholder: 'Enter organization name',\n }),\n h(\n Button,\n {\n class: cls('__submit'),\n color: 'primary',\n disabled: isSubmitting.value,\n loading: isSubmitting.value,\n onClick: handleSubmit,\n variant: 'solid',\n },\n () => 'Create',\n ),\n ]);\n };\n },\n});\n\nexport default BaseCreateOrganization;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type VNode, defineComponent, h} from 'vue';\nimport BaseLanguageSwitcher from './BaseLanguageSwitcher';\nimport useI18n from '../../../composables/useI18n';\nimport type {SelectOption} from '../../primitives/Select/Select';\n\ninterface LanguageSwitcherSetupProps {\n className: string;\n languages: SelectOption[];\n}\n\n/**\n * LanguageSwitcher \u2014 styled language selection component.\n *\n * Retrieves current language and setLanguage from i18n context.\n */\nconst LanguageSwitcher: Component = defineComponent({\n name: 'LanguageSwitcher',\n props: {\n className: {default: '', type: String},\n languages: {\n default: () => [\n {label: 'English', value: 'en'},\n {label: 'French', value: 'fr'},\n {label: 'Spanish', value: 'es'},\n {label: 'Portuguese', value: 'pt'},\n ],\n type: Array as PropType<SelectOption[]>,\n },\n },\n setup(props: LanguageSwitcherSetupProps, {slots}: {slots: any}): () => VNode {\n const {currentLanguage, setLanguage} = useI18n();\n\n return (): VNode =>\n h(\n BaseLanguageSwitcher,\n {\n class: withVendorCSSClassPrefix('language-switcher--styled'),\n className: props.className,\n currentLanguage: currentLanguage?.value ?? 'en',\n languages: props.languages,\n onLanguageChange: setLanguage,\n },\n slots,\n );\n },\n});\n\nexport default LanguageSwitcher;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {withVendorCSSClassPrefix} from '@asgardeo/browser';\nimport {type Component, type PropType, type Ref, type VNode, defineComponent, h, ref} from 'vue';\nimport Card from '../../primitives/Card';\nimport {ChevronDownIcon, GlobeIcon} from '../../primitives/Icons';\nimport type {SelectOption} from '../../primitives/Select/Select';\nimport Typography from '../../primitives/Typography';\n\nconst cls = (name: string): string => withVendorCSSClassPrefix(`language-switcher${name}`);\n\ninterface BaseLanguageSwitcherSetupProps {\n className: string;\n currentLanguage: string;\n languages: SelectOption[];\n onLanguageChange?: (lang: string) => void;\n}\n\n/**\n * BaseLanguageSwitcher \u2014 unstyled language selection component.\n *\n * Shows the current language and a dropdown to select another.\n */\nconst BaseLanguageSwitcher: Component = defineComponent({\n name: 'BaseLanguageSwitcher',\n props: {\n className: {default: '', type: String},\n currentLanguage: {default: 'en', type: String},\n languages: {default: () => [{label: 'English', value: 'en'}], type: Array as PropType<SelectOption[]>},\n onLanguageChange: {default: undefined, type: Function as PropType<(lang: string) => void>},\n },\n setup(props: BaseLanguageSwitcherSetupProps, {slots}: {slots: any}): () => VNode | VNode[] {\n const isOpen: Ref<boolean> = ref(false);\n\n const toggle = (): void => {\n isOpen.value = !isOpen.value;\n };\n\n const handleSelect = (lang: string): void => {\n isOpen.value = false;\n props.onLanguageChange?.(lang);\n };\n\n return (): VNode | VNode[] => {\n if (slots['default']) {\n return slots['default']({\n currentLanguage: props.currentLanguage,\n handleSelect,\n isOpen: isOpen.value,\n languages: props.languages,\n toggle,\n });\n }\n\n const currentLabel: string =\n props.languages.find((l: SelectOption) => l.value === props.currentLanguage)?.label ?? props.currentLanguage;\n\n const triggerButton: VNode = h(\n 'button',\n {\n 'aria-expanded': isOpen.value,\n 'aria-haspopup': 'listbox',\n class: cls('__trigger'),\n onClick: toggle,\n type: 'button',\n },\n [\n h(GlobeIcon, {size: 16}),\n h(Typography, {class: cls('__trigger-label'), variant: 'body2'}, () => currentLabel),\n h(ChevronDownIcon, {size: 12}),\n ],\n );\n\n const dropdownItems: VNode[] = props.languages.map((lang: SelectOption) => {\n const isActive: boolean = lang.value === props.currentLanguage;\n return h(\n 'button',\n {\n 'aria-selected': isActive,\n class: [cls('__item'), isActive ? cls('__item--active') : ''],\n onClick: () => handleSelect(lang.value),\n role: 'option',\n type: 'button',\n },\n [h(Typography, {variant: 'body2'}, () => lang.label)],\n );\n });\n\n const dropdown: VNode | null = isOpen.value\n ? h('div', {class: cls('__dropdown'), role: 'listbox'}, dropdownItems)\n : null;\n\n return h(Card, {class: [cls(''), props.className].filter(Boolean).join(' ')}, () => [triggerButton, dropdown]);\n };\n },\n});\n\nexport default BaseLanguageSwitcher;\n", "/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetaTheme, FlowMetaThemeColorScheme, RecursivePartial, ThemeConfig} from '@asgardeo/browser';\n\n/**\n * Converts a v2 `FlowMetaTheme` into a `RecursivePartial<ThemeConfig>` that\n * `createTheme` can consume.\n *\n * Only fields explicitly present in the FlowMeta response are included so that\n * `createTheme` can deep-merge them onto its base (light/dark) defaults without\n * accidentally dropping sibling keys that were not returned by the server.\n */\nconst buildThemeConfigFromFlowMeta = (\n flowMetaTheme: FlowMetaTheme,\n colorScheme: 'light' | 'dark',\n): RecursivePartial<ThemeConfig> => {\n const scheme: FlowMetaThemeColorScheme | undefined = flowMetaTheme.colorSchemes?.[colorScheme];\n const borderRadius: number | undefined = flowMetaTheme.shape?.borderRadius;\n const borderRadiusStr: string | undefined = borderRadius !== undefined ? `${borderRadius}px` : undefined;\n\n let colors: RecursivePartial<ThemeConfig['colors']> | undefined;\n\n if (scheme?.palette) {\n colors = {};\n\n if (scheme.palette.primary) {\n colors.primary = scheme.palette.primary;\n }\n if (scheme.palette.secondary) {\n colors.secondary = scheme.palette.secondary;\n }\n if (scheme.palette.text) {\n colors.text = scheme.palette.text;\n }\n\n if (scheme.palette.background) {\n const bg: RecursivePartial<ThemeConfig['colors']['background']> = {};\n\n if (scheme.palette.background.default) {\n bg.body = {main: scheme.palette.background.default};\n }\n if (scheme.palette.background.paper) {\n bg.surface = scheme.palette.background.paper;\n }\n\n if (Object.keys(bg).length > 0) {\n colors.background = bg;\n }\n }\n }\n\n return {\n ...(flowMetaTheme.direction ? {direction: flowMetaTheme.direction} : {}),\n ...(borderRadiusStr\n ? {\n borderRadius: {\n large: borderRadiusStr,\n medium: borderRadiusStr,\n small: borderRadiusStr,\n },\n }\n : {}),\n ...(colors && Object.keys(colors).length > 0 ? {colors} : {}),\n ...(flowMetaTheme.typography?.fontFamily ? {typography: {fontFamily: flowMetaTheme.typography.fontFamily}} : {}),\n };\n};\n\nexport default buildThemeConfigFromFlowMeta;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the WebAuthn authentication handler from the Browser SDK.\n *\n * Handles WebAuthn/Passkey authentication flow for browser environments,\n * including browser compatibility checks, HTTPS validation, challenge processing,\n * and the credential authentication ceremony.\n *\n * @see {@link @asgardeo/browser#handleWebAuthnAuthentication}\n */\nexport {handleWebAuthnAuthentication, handleWebAuthnAuthentication as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the auth params URL check from the Browser SDK.\n *\n * Checks if `code` (and optionally `session_state`) are present in the URL search params,\n * indicating an OAuth2 authorization code callback.\n *\n * @see {@link @asgardeo/browser#hasAuthParamsInUrl}\n */\nexport {hasAuthParamsInUrl, hasAuthParamsInUrl as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the navigation helper from the Browser SDK.\n *\n * Navigates to a new URL within the browser:\n * - For same-origin URLs: Uses the History API and dispatches a `popstate` event (SPA navigation).\n * - For cross-origin URLs: Performs a full page load using `window.location.assign`.\n *\n * @see {@link @asgardeo/browser#navigate}\n */\nexport {navigate, navigate as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the HTTP utility from the Browser SDK.\n *\n * Creates an HTTP utility for making authenticated requests using a specific\n * AsgardeoSPAClient instance. The returned object has `request` and `requestAll` methods.\n *\n * @see {@link @asgardeo/browser#http}\n */\nexport {http, http as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {inject} from 'vue';\nimport {ASGARDEO_KEY} from '../keys';\nimport type {AsgardeoContext} from '../models/contexts';\nimport {createVueLogger} from '../utils/logger';\n\nconst logger: ReturnType<typeof createVueLogger> = createVueLogger('Guard');\n\n/**\n * Options for the Asgardeo navigation guard.\n */\nexport interface GuardOptions {\n /**\n * Maximum time (in ms) to wait for SDK initialization before redirecting.\n * Only applicable when `waitForInit` is `true`.\n * @default 10000\n */\n initTimeout?: number;\n\n /**\n * The path to redirect unauthenticated users to.\n * @default '/'\n */\n redirectTo?: string;\n\n /**\n * If `true`, the guard will wait for the SDK to finish initializing before\n * evaluating the authentication state. If `false`, the guard will reject\n * immediately when the SDK is not yet initialized.\n * @default true\n */\n waitForInit?: boolean;\n}\n\n/**\n * A minimal navigation guard type compatible with Vue Router's `NavigationGuard`.\n *\n * This avoids a hard dependency on `vue-router` while remaining structurally compatible.\n * When consumers pass this to `beforeEnter` or `router.beforeEach`, Vue Router will\n * accept it because it satisfies the shape of `NavigationGuard`.\n */\nexport type NavigationGuardReturn = boolean | string | {path: string} | {name: string} | undefined;\nexport type AsgardeoNavigationGuard = (\n to: {fullPath: string; path: string; query: Record<string, string | (string | null)[] | null | undefined>},\n from: {fullPath: string; path: string},\n next: (target?: NavigationGuardReturn) => void,\n) => void | Promise<void>;\n\n/**\n * Creates a Vue Router navigation guard that protects routes by requiring authentication.\n *\n * The guard injects the Asgardeo context to check `isSignedIn` state.\n * If the user is not authenticated, they are redirected to `redirectTo`.\n *\n * **Requires `vue-router` as a peer dependency.**\n *\n * @param options - Guard configuration options.\n * @returns A navigation guard function compatible with Vue Router's `beforeEnter` or `router.beforeEach`.\n *\n * @example\n * ```typescript\n * import { createRouter, createWebHistory } from 'vue-router';\n * import { createAsgardeoGuard } from '@asgardeo/vue';\n *\n * const router = createRouter({\n * history: createWebHistory(),\n * routes: [\n * {\n * path: '/dashboard',\n * component: Dashboard,\n * beforeEnter: createAsgardeoGuard({ redirectTo: '/login' }),\n * },\n * ],\n * });\n * ```\n *\n * @example\n * ```typescript\n * // Global guard on all routes\n * router.beforeEach(createAsgardeoGuard({ redirectTo: '/' }));\n * ```\n */\nexport const createAsgardeoGuard = (options: GuardOptions = {}): AsgardeoNavigationGuard => {\n const {redirectTo = '/', waitForInit = true, initTimeout = 10000} = options;\n\n return async (_to: unknown, _from: unknown, next: (target?: {path: string}) => void): Promise<void> => {\n const ctx: AsgardeoContext | undefined = inject(ASGARDEO_KEY);\n\n if (!ctx) {\n logger.error(\n 'createAsgardeoGuard: Asgardeo context not found. ' +\n 'Ensure the AsgardeoPlugin is installed before using the router guard.',\n );\n next({path: redirectTo});\n\n return;\n }\n\n // If initialized and signed in, allow navigation\n if (ctx.isInitialized.value && ctx.isSignedIn.value) {\n next();\n\n return;\n }\n\n // If initialized and not signed in, redirect\n if (ctx.isInitialized.value && !ctx.isSignedIn.value) {\n next({path: redirectTo});\n\n return;\n }\n\n // SDK not yet initialized \u2014 optionally wait for it\n if (!waitForInit) {\n next({path: redirectTo});\n\n return;\n }\n\n // Wait for initialization to complete\n try {\n await new Promise<void>((resolve: () => void, reject: (reason?: Error) => void) => {\n const timeout: ReturnType<typeof setTimeout> = setTimeout(() => {\n reject(new Error('Asgardeo SDK initialization timed out'));\n }, initTimeout);\n\n const check = (): void => {\n if (ctx.isInitialized.value) {\n clearTimeout(timeout);\n resolve();\n } else {\n requestAnimationFrame(check);\n }\n };\n\n check();\n });\n\n if (ctx.isSignedIn.value) {\n next();\n } else {\n next({path: redirectTo});\n }\n } catch {\n // Timed out \u2014 redirect to fallback\n next({path: redirectTo});\n }\n };\n};\n\nexport default createAsgardeoGuard;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {type Component, defineComponent, h} from 'vue';\nimport Callback from '../components/auth/Callback';\n\n/**\n * Options for creating a callback route.\n */\nexport interface CallbackRouteOptions {\n /**\n * The route name. If not provided, no name is set on the route record.\n */\n name?: string;\n\n /**\n * Optional error handler called when the OAuth callback encounters an error.\n */\n onError?: (error: Error) => void;\n\n /**\n * The URL path for the callback route.\n * @default '/callback'\n */\n path?: string;\n}\n\n/**\n * A minimal route record type compatible with Vue Router's `RouteRecordRaw`.\n *\n * This avoids a hard dependency on `vue-router` while remaining structurally compatible.\n */\nexport interface AsgardeoRouteRecord {\n component: ReturnType<typeof defineComponent>;\n meta?: Record<string, unknown>;\n name?: string;\n path: string;\n}\n\n/**\n * Creates a Vue Router route record for the OAuth2 callback.\n *\n * The generated route renders the `<Callback>` component which extracts OAuth parameters\n * (code, state, error) from the URL and redirects the user back to the original path.\n *\n * **Requires `vue-router` as a peer dependency.**\n *\n * @param options - Callback route configuration.\n * @returns A route record compatible with Vue Router's `RouteRecordRaw`.\n *\n * @example\n * ```typescript\n * import { createRouter, createWebHistory } from 'vue-router';\n * import { createCallbackRoute } from '@asgardeo/vue';\n *\n * const router = createRouter({\n * history: createWebHistory(),\n * routes: [\n * createCallbackRoute({ path: '/callback' }),\n * { path: '/', component: Home },\n * { path: '/dashboard', component: Dashboard },\n * ],\n * });\n * ```\n *\n * @example\n * ```typescript\n * // With error handling and Vue Router navigation\n * import { useRouter } from 'vue-router';\n *\n * createCallbackRoute({\n * path: '/auth/callback',\n * name: 'oauth-callback',\n * onError: (error) => console.error('OAuth error:', error),\n * });\n * ```\n */\nexport const createCallbackRoute = (options: CallbackRouteOptions = {}): AsgardeoRouteRecord => {\n const {path = '/callback', name, onError} = options;\n\n const CallbackWrapper: Component = defineComponent({\n name: 'AsgardeoCallbackRoute',\n setup() {\n return (): ReturnType<typeof h> =>\n h(Callback, {\n ...(onError && {onError}),\n });\n },\n });\n\n return {\n ...(name && {name}),\n component: CallbackWrapper,\n meta: {isAsgardeoCallback: true},\n path,\n };\n};\n\nexport default createCallbackRoute;\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-export of the active theme resolver from the Browser SDK.\n *\n * Gets the active theme based on the theme mode preference:\n * - `'light'` / `'dark'` \u2192 Returns the specified mode directly.\n * - `'system'` \u2192 Uses `matchMedia('(prefers-color-scheme: dark)')` to detect system preference.\n * - `'class'` \u2192 Inspects DOM element class list for dark/light classes.\n *\n * @see {@link @asgardeo/browser#getActiveTheme}\n */\nexport {getActiveTheme, getActiveTheme as default} from '@asgardeo/browser';\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/**\n * Re-exports of theme detection utilities from the Browser SDK.\n *\n * - `detectThemeMode` \u2014 Detects current theme mode based on system preference or DOM class.\n * - `createClassObserver` \u2014 Creates a MutationObserver watching for CSS class changes on a target element.\n * - `createMediaQueryListener` \u2014 Creates a media query listener for `prefers-color-scheme` changes.\n * - `BrowserThemeDetection` \u2014 Configuration interface for DOM-specific theme detection options.\n *\n * @see {@link @asgardeo/browser#detectThemeMode}\n * @see {@link @asgardeo/browser#createClassObserver}\n * @see {@link @asgardeo/browser#createMediaQueryListener}\n */\nexport {\n detectThemeMode,\n createClassObserver,\n createMediaQueryListener,\n type BrowserThemeDetection,\n} from '@asgardeo/browser';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA,oBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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;;ApI8LP,IAAAC,mBA2BO;",
6
+ "names": ["BaseSignIn_default", "BaseSignUp_default", "SignIn_default", "SignUp_default", "useOAuthCallback", "import_browser", "import_vue", "import_browser", "import_vue", "import_vue", "import_browser", "import_i18n", "import_vue", "import_browser", "logger", "import_browser", "import_vue", "import_browser", "import_vue", "logger", "import_vue", "import_browser", "import_browser", "import_browser", "baseGetAllOrganizations", "import_browser", "baseGetMeOrganizations", "import_browser", "baseGetSchemas", "import_browser", "baseGetScim2Me", "import_browser", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "cleanupUrlParams", "useOAuthCallback", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "logger", "navigate", "browserNavigate", "params", "import_browser", "import_vue", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_vue", "import_vue", "import_vue", "import_vue", "import_browser", "import_vue", "icon", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "logger", "EmbeddedFlowComponentType", "EmbeddedFlowEventType", "DOMPurify", "import_browser", "BaseSignIn", "BaseSignIn_default", "import_browser", "import_browser", "SignIn", "getUrlParams", "useOAuthCallback", "BaseSignIn_default", "SignIn_default", "SignIn", "SignIn_default", "import_browser", "import_vue", "BaseSignIn", "BaseSignIn_default", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "matchesSocialProvider", "renderSignUpComponents", "logger", "renderSignUpComponents", "import_browser", "import_vue", "import_browser", "import_vue", "logger", "extractFormFields", "EmbeddedFlowComponentType", "BaseSignUp", "BaseSignUp_default", "SignUp", "BaseSignUp_default", "SignUp_default", "SignUp", "SignUp_default", "import_browser", "import_vue", "BaseSignUp", "BaseSignUp_default", "import_vue", "import_vue", "import_vue", "import_vue", "User", "import_vue", "Organization", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_browser", "baseUpdateMeProfile", "UserProfile", "import_browser", "import_vue", "import_browser", "import_vue", "DEFAULT_ATTRIBUTE_MAPPINGS", "AVATAR_GRADIENTS", "getAvatarGradient", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "http", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "import_browser", "import_vue", "cls", "import_browser", "import_vue", "import_browser", "import_vue", "cls", "import_browser", "import_browser", "import_browser", "import_browser", "import_browser", "import_vue", "logger", "import_vue", "import_browser", "import_browser", "import_browser"]
7
7
  }